Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion static/css/v3/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,27 @@
.field__control--disabled,
.field__control--disabled:hover,
.field__control--disabled:focus-within {
opacity: 0.5;
background-color: var(--color-surface-mid);
border-color: var(--color-stroke-strong);
cursor: not-allowed;
}

.field__control--disabled .field__input,
.field__control--disabled .field__input::placeholder,
.field__control--disabled:hover .field__input::placeholder {
color: var(--color-text-secondary);
}

.field__control--disabled .field__input {
cursor: not-allowed;
}

.field__control--disabled .field__icon,
.field__control--disabled:hover .field__icon,
.field__control--disabled:focus-within .field__icon {
color: var(--color-icon-secondary);
}

/* ========== Datetime-local: hide native icon, full-area click ========== */
.field__control--datetime {
position: relative;
Expand Down
1 change: 1 addition & 0 deletions templates/v3/examples/_v3_example_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ <h3>{{ section_title }}</h3>
{% include "v3/includes/_field_text.html" with name="ex_basic" label="Text field" placeholder="Enter text..." %}
{% include "v3/includes/_field_text.html" with name="ex_search" label="With icon" placeholder="Search..." icon_left="search" %}
{% include "v3/includes/_field_text.html" with name="ex_error" label="Error state" placeholder="Enter value" error="This field is required." %}
{% include "v3/includes/_field_text.html" with name="ex_disabled" label="Disabled state" placeholder="Enter value" value="Disabled value" disabled="true" %}
{% include "v3/includes/_field_checkbox.html" with name="ex_agree" label="I agree to the terms and conditions" %}
{% include "v3/includes/_field_dropdown.html" with name="ex_type" label="Dropdown" options=demo_dropdown_options placeholder="Select type..." %}
{% include "v3/includes/_field_combo.html" with name="ex_library" label="Combo (searchable)" placeholder="Search libraries..." options=demo_libs %}
Expand Down
6 changes: 5 additions & 1 deletion templates/v3/includes/_field_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@
aria-describedby="field-{{ name }}-help"
{% endif %}
{% if validate_type == "email" %}x-model="value" @blur="touched = true"{% elif submit_icon %}x-model="q" {% if dispatch_field_change %}@input.debounce.150ms="$dispatch('field-change', { name: '{{ name }}', value: q })"{% endif %}{% elif max_chars %}x-model="value"{% endif %}>
{% if submit_icon %}
{% if disabled %}
<span class="field__icon" aria-hidden="true">
{% include "includes/icon.html" with icon_name="lock" icon_class="field__icon" icon_size=16 icon_viewbox="0 0 16 16" %}
</span>
{% elif submit_icon %}
<button type="submit"
class="field__submit"
aria-label="{{ submit_label|default:'Submit' }}"
Expand Down
Loading