Commit graph

239 commits

Author SHA1 Message Date
Robin Van Roy
713429ac80
feat: adds display options configurability to the success validation 2025-08-07 17:20:34 +02:00
sainzrow
765a1a298c
fix(combobox): add support for disabled and readonly states
* fix(combobox): don't use setAttribute for disabled/enabled attributes

How to reproduce this bug:

1. Go to https://lion.js.org/components/combobox/overview/ or just use the combobox in your application.
2. Inspect the combobox in the browser. Click on the `<lion-combobox>` element at the DOM inspector.
3. At the JavaScript console, print `$0.disabled`. Observe it is currently `false`, and the user can interact with it normally.
4. (optional) Run `$0.disabled =true`. Observe the user cannot interact with it anymore. That's expected.
5. Run `$0.disabled = false`.

BUG: The user cannot interact with the combobox anymore, despite `disabled` being false.

Root cause: If you inspect the `<input>` element, you can see it has `disabled="false"`.

The [specs](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute) say:

> The `disabled` content attribute is a [boolean attribute](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attribute).
>
> A form control is **disabled** if any of the following are true:
> * the element is a `button`, `input`, `select`, `textarea`, or form-associated custom element, and the `disabled` attribute is specified on this element (regardless of its value);

And [also](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attribute):

> A number of attributes are **boolean attributes**. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

Thanks to @thematho for finding the root cause.

* fix(combobox): add support for disabled and readonly states with corresponding tests

* Update packages/ui/components/combobox/src/LionCombobox.js

Co-authored-by: Thijs Louisse <t_louisse@hotmail.com>

* Update packages/ui/components/combobox/src/LionCombobox.js

Co-authored-by: Thijs Louisse <t_louisse@hotmail.com>

* Update packages/ui/components/combobox/src/LionCombobox.js

Co-authored-by: Thijs Louisse <t_louisse@hotmail.com>

* fix(combobox): added accessibility tests

---------

Co-authored-by: Denilson Sá Maia <denilsonsa@gmail.com>
Co-authored-by: Thijs Louisse <t_louisse@hotmail.com>
2025-07-28 16:29:32 +02:00
Thijs Louisse
e10a0ec93c chore: improve [slot=label] example 2025-07-26 12:38:14 +02:00
manuel
cf4a8fd1b0
feat(input-stepper): align value with step size (#2511)
* feat(input-stepper): add alignToStep property to align value with step size

* Create silver-eyes-count.md

* refactor: make alignTosTep property behavior as default behavior and remove property attribute

* test(input-stepper): handle min value as Infinity and update tests for decrement/increment behavior

---------

Co-authored-by: Manuel Servais <manuel.servais@ing.com>
2025-05-14 16:46:00 +02:00
Pavlik Kiselev
11bbc5fff5
feat: migrated the navigation metadata from inline MD title decorations to frontmatter
* feat: migrated the navigation metadata from inline MD title decorations to frontmatter

* fix: fixed frontmatter metadate for api-table MDs

* fix: fixed frontmatter eslint issue
2025-03-19 10:08:22 +01:00
okadurin
e6a33d92aa chore: update documentation for better extending 2025-01-21 10:41:00 +01:00
gerjanvangeest
dd598125ef
feat(dialog): add is-alert-dialog option (#2445)
* feat(dialog): add is-alert-dialog option

* chore: make alert-dialog example simpler
2025-01-21 09:21:34 +01:00
Thijs Louisse
71992cc0fb feat(providence): update version of oxc; cleanup; include .ts(x) and jsx by default 2025-01-15 10:37:36 +01:00
gerjanvangeest
5dc2205d7d
feat(input-stepper): add aria-valuemin, aria-valuemax and an option t… (#2423)
* feat(input-stepper): add aria-valuemin, aria-valuemax and an option to set aria-valuetext

* chore: change valueText into an Object

* chore: remove reflect of valueText

* Update packages/ui/components/input-stepper/src/LionInputStepper.js

Co-authored-by: Oleksii Kadurin <ovkadurin@gmail.com>

* Update packages/ui/components/input-stepper/src/LionInputStepper.js

Co-authored-by: Oleksii Kadurin <ovkadurin@gmail.com>

* chore: rename valueText to valueTextMapping

---------

Co-authored-by: Oleksii Kadurin <ovkadurin@gmail.com>
2024-12-04 11:59:09 +01:00
gerjanvangeest
3d1c723d39
chore: enhance form documentation (#2391) 2024-11-20 08:13:31 +01:00
Thijs Louisse
a19096e703
chore: improve providence docs (#2408)
* chore: improve providence docs

* Apply suggestions from code review
2024-11-12 17:10:06 +01:00
thatdudemanguy
1d2ab389a3 chore: adds lion-select docs about the repeat directive 2024-11-06 12:01:04 +01:00
Mikhail Bashkirov
8d178a548a feat(ajax): add interceptors for parsed response JSON objects 2024-11-05 22:37:42 +01:00
gerjanvangeest
bc175b5609 chore: update portal url 2024-10-29 12:15:39 +01:00
Thijs Louisse
dbb964077f chore: update/clean devDependencies for better security and perf 2024-10-16 14:14:26 +02:00
John Clifford
4696ad72c9
feat(accordion): add exclusive option (#2372)
* Added exclusive feature for accordion

* Changed position of exclusive accordion

* chore: accordion [exclusive] option

* chore: accordion [exclusive] option

* chore: fixes and cleanups

* chore: get docs of accordion back

---------

Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com>
Co-authored-by: gerjanvangeest <Gerjan.van.Geest@ing.com>
2024-10-03 15:52:39 +02:00
Arjen Bax
262faf2cc6
Fix typos (#2359) 2024-09-11 08:19:37 +02:00
gerjanvangeest
02a9427a7d
fix(combobox): when multiple choice reset all listbox options on select (#2332)
* fix(combobox): when multiple choice reset all listbox options on select

* Apply suggestions from code review

Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>

* chore: clear options also on click

* chore: adopt code to show list when only when showAllOnEmpty is true

---------

Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>
2024-08-27 10:48:12 +02:00
gerjanvangeest
61bf8cb4b1
fix(select-rich): sets and removes the button role and aria attributes on change of singleOption (#2341) 2024-08-22 15:08:28 +02:00
Rajkeshwar Prasad
e0ef676a36
opened-changed event detail exposes opened state (#2334)
* opened-changed event detail exposes opened state

* Fixed lint issue

* Generated changeset

---------

Co-authored-by: Rajkeshwar Prasad <rajkeshwarp@azuga.com>
Co-authored-by: Rajkeshwar Prasad <--global>
2024-08-22 13:12:50 +02:00
Thijs Louisse
95b7460367 chore: make broken demos work again 2024-08-08 14:17:37 +02:00
gerjanvangeest
cdf0a9e8f0
fix(input-stepper): add parseNumber and formatNumber to format the va… (#2312)
* fix(input-stepper): add parseNumber and formatNumber to format the value based on locale

* Update packages/ui/components/input-stepper/test/lion-input-stepper.test.js

* Update packages/ui/components/input-stepper/test/lion-input-stepper.test.js
2024-08-07 10:29:02 +02:00
gerjanvangeest
f9ba215675 fix(overlays): prevent closing of a modal dialog on pressing Esc and hidesOnEsc is set to false 2024-07-03 16:19:00 +02:00
Kristján Oddsson
c7c83d1d8b
update prettier
* update prettier to v3.x
* update prettify in @lion/nodejs-helpers to match updated prettier
* remove redundant await for promise
* remove `@types/prettier` as it's now included in `prettier`
* format lit template snippets with `jsx`
2024-05-17 21:43:23 +02:00
Thijs Louisse
aea90ae036 chore(root): cleanup and update dependencies 2024-05-14 13:47:11 +02:00
Alex Thirlwall
c5ffe9cffc feat: Allow getCacheIdentifier cache option to be an asynchronous function 2024-05-07 14:32:05 +02:00
gerjanvangeest
a53ded7ef8
fix(localize): make use of formatDate locale option to parse the date correctly (#2270) 2024-04-23 14:42:00 +02:00
Kristján Oddsson
c8093bd55b
Update eslint proper (#2254)
* update eslint

* Fix ESLint violations

* just ignore the rules for now
2024-04-23 10:31:22 +02:00
gerjanvangeest
4c69c7e34f
chore: update eslint-plugin-lit-a11y version (#2259) 2024-04-16 15:16:40 +02:00
okadurin
ac783460aa fix: optimize the way we focus the input field for LionInputTelDropdown 2024-04-15 11:18:37 +02:00
gerjanvangeest
e8e9c07ec5
fix(input-amount): returns Unparseable as a modelValue if a wrong value has been entered (#2242)
* fix(input-amount): returns Unparseable as a modelValue if a wrong value has been entered

* fix(input-amount): do not break when a large amount has been entered

* Update docs/components/input-amount/overview.md

Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>

* Update packages/ui/components/input-amount/test/parsers.test.js

Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>

---------

Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>
2024-04-10 11:20:48 +02:00
Robin Van Roy
efcd4bf15b
docs: adds sections on resetting a form and interactionState (#2246)
* docs: ✏️ adds section on resetting a form and interactionState

* chore: ran formatting
2024-04-09 11:33:16 +02:00
gerjanvangeest
21a4ef5452 chore: update scopedElementsMixin documentation (#2217) 2024-03-27 18:02:16 +01:00
gerjanvangeest
31e079d591 feat(form): set focus to the first erroneous form element on submit 2024-03-27 18:02:16 +01:00
okadurin
97456090c9 chore: remove validate-messages.js as redundant 2024-03-27 18:02:15 +01:00
Oleksii Kadurin
00a7e39aae feat(ui): adopt @open-wc/scoped-elements mixin v3
Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com>
2024-03-27 18:02:15 +01:00
Thijs Louisse
8b7cc43f26 feat: allow SlotRerenderObject to first render on connectedCallback via firstRenderOnConnected 2024-03-15 13:19:59 +01:00
gerjanvangeest
e72fd6d6ea feat(form-core): add select and upload specific required messages 2024-03-06 15:52:36 +01:00
gerjanvangeest
b68fa39924 chore: add data-label to doc examples with explanation 2024-03-06 15:49:28 +01:00
Henk van den Brink
c67247026e doc(ajax): add explanation on the new options 2024-03-01 10:32:12 +01:00
gerjanvangeest
87005afbd2
feat(input-stepper): a11y enhancement & added translations (#2173) 2024-02-19 17:01:32 +01:00
gerjanvangeest
059b018793 fix(input-range): add screen-reader labels for minimum and maximum value 2024-02-19 15:59:56 +01:00
Thijs Louisse
dd624c1412 chore: fix broken overlay system demos 2024-01-25 17:18:51 +01:00
thepassle
40a4e13736 docs: add proper ajax documentation 2023-12-04 17:03:43 +01:00
Thijs Louisse
45fe0b4bb3 chore(ui): lint and types fixes 2023-11-08 19:08:54 +01:00
Thijs Louisse
0315b33acd chore: move to swc + esm 2023-11-08 19:02:51 +01:00
Guilherme Amorim
be4e25a108
feat: support (multiselect) choice-groups with allow-custom-choice 2023-11-08 15:05:09 +01:00
Oleksii Kadurin
db2ab59aeb
chore: import missing dependencies for configuration.md 2023-11-07 11:24:53 +01:00
Oleksii Kadurin
f421bd7326
fix: update documentation and unit tests for validation 2023-11-07 11:21:41 +01:00
Thijs Louisse
7e72f60cc9
chore: cross-root-aria docs (#2107) 2023-10-23 11:46:40 +02:00