@lion/ui 0.7.6 → 0.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +1 -2
  2. package/components/button/test-suites/LionButton.suite.js +3 -1
  3. package/components/calendar/src/LionCalendar.js +9 -5
  4. package/components/calendar/test/lion-calendar.test.js +33 -6
  5. package/components/combobox/src/LionCombobox.js +33 -9
  6. package/components/combobox/test/lion-combobox.test.js +134 -7
  7. package/components/dialog/test/lion-dialog.test.js +59 -1
  8. package/components/input-datepicker/src/LionInputDatepicker.js +1 -21
  9. package/components/input-datepicker/test/lion-input-datepicker.test.js +30 -3
  10. package/components/input-file/src/FileHandle.js +1 -1
  11. package/components/input-file/src/LionInputFile.js +1 -3
  12. package/components/input-file/test/lion-input-file.test.js +11 -14
  13. package/components/overlays/src/OverlayController.js +13 -7
  14. package/components/overlays/src/OverlayMixin.js +5 -1
  15. package/components/overlays/test/OverlayController.test.js +46 -0
  16. package/components/select-rich/src/LionSelectRich.js +12 -0
  17. package/components/select-rich/test/lion-select-rich.test.js +26 -0
  18. package/custom-elements.json +60 -73
  19. package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
  20. package/dist-types/components/calendar/src/LionCalendar.d.ts +1 -0
  21. package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
  22. package/dist-types/components/combobox/src/LionCombobox.d.ts +9 -0
  23. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  24. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +0 -5
  25. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
  26. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
  27. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  28. package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
  29. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  30. package/dist-types/tsconfig.tsbuildinfo +1 -1
  31. package/docs/components/button/use-cases.md +2 -2
  32. package/docs/components/calendar/use-cases.md +4 -4
  33. package/docs/components/checkbox-group/api-table.md +49 -55
  34. package/docs/components/checkbox-group/overview.md +5 -5
  35. package/docs/components/checkbox-group/use-cases.md +33 -33
  36. package/docs/components/collapsible/overview.md +1 -1
  37. package/docs/components/collapsible/use-cases.md +3 -3
  38. package/docs/components/combobox/api-table.md +84 -89
  39. package/docs/components/combobox/extensions.md +20 -20
  40. package/docs/components/combobox/overview.md +1 -1
  41. package/docs/components/combobox/use-cases.md +6 -6
  42. package/docs/components/dialog/api-table.md +3 -3
  43. package/docs/components/dialog/overview.md +2 -2
  44. package/docs/components/dialog/src/external-dialog.js +32 -0
  45. package/docs/components/dialog/src/slots-dialog-content.js +1 -1
  46. package/docs/components/dialog/src/styled-dialog-content.js +1 -1
  47. package/docs/components/dialog/use-cases.md +49 -3
  48. package/docs/components/drawer/use-cases.md +3 -3
  49. package/docs/components/fieldset/api-table.md +45 -51
  50. package/docs/components/fieldset/overview.md +7 -7
  51. package/docs/components/fieldset/use-cases.md +15 -15
  52. package/docs/components/form/overview.md +7 -7
  53. package/docs/components/form/use-cases.md +4 -4
  54. package/docs/components/icon/use-cases.md +1 -1
  55. package/docs/components/input/overview.md +1 -1
  56. package/docs/components/input/use-cases.md +3 -3
  57. package/docs/components/input-amount/overview.md +3 -3
  58. package/docs/components/input-amount/use-cases.md +8 -8
  59. package/docs/components/input-date/overview.md +3 -3
  60. package/docs/components/input-date/use-cases.md +8 -8
  61. package/docs/components/input-datepicker/api-table.md +1 -3
  62. package/docs/components/input-datepicker/overview.md +5 -5
  63. package/docs/components/input-datepicker/use-cases.md +5 -5
  64. package/docs/components/input-email/overview.md +2 -2
  65. package/docs/components/input-email/use-cases.md +3 -3
  66. package/docs/components/input-file/overview.md +1 -1
  67. package/docs/components/input-iban/overview.md +2 -2
  68. package/docs/components/input-iban/use-cases.md +8 -8
  69. package/docs/components/input-range/overview.md +2 -2
  70. package/docs/components/input-stepper/api-table.md +65 -69
  71. package/docs/components/input-stepper/overview.md +1 -1
  72. package/docs/components/input-tel/overview.md +1 -1
  73. package/docs/components/input-tel/use-cases.md +9 -9
  74. package/docs/components/input-tel-dropdown/api-table.md +70 -73
  75. package/docs/components/input-tel-dropdown/extensions.md +1 -1
  76. package/docs/components/input-tel-dropdown/overview.md +1 -1
  77. package/docs/components/input-tel-dropdown/use-cases.md +5 -5
  78. package/docs/components/listbox/api-table.md +64 -70
  79. package/docs/components/listbox/overview.md +5 -5
  80. package/docs/components/listbox/use-cases.md +61 -61
  81. package/docs/components/pagination/use-cases.md +5 -5
  82. package/docs/components/radio-group/api-table.md +49 -55
  83. package/docs/components/radio-group/overview.md +6 -6
  84. package/docs/components/radio-group/use-cases.md +18 -18
  85. package/docs/components/select/use-cases.md +2 -2
  86. package/docs/components/select-rich/api-table.md +79 -85
  87. package/docs/components/select-rich/overview.md +3 -3
  88. package/docs/components/select-rich/use-cases.md +33 -33
  89. package/docs/components/steps/overview.md +4 -4
  90. package/docs/components/steps/use-cases.md +7 -7
  91. package/docs/components/tabs/examples.md +1 -1
  92. package/docs/components/tabs/use-cases.md +1 -1
  93. package/docs/components/textarea/use-cases.md +3 -3
  94. package/docs/components/tooltip/api-table.md +3 -3
  95. package/docs/components/tooltip/use-cases.md +6 -6
  96. package/docs/fundamentals/index.md +4 -4
  97. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  98. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  99. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  100. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  101. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  102. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  103. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  104. package/docs/fundamentals/rationales/accessibility.md +1 -1
  105. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  106. package/docs/fundamentals/systems/core/overview.md +1 -1
  107. package/docs/fundamentals/systems/form/formatting-and-parsing.md +8 -8
  108. package/docs/fundamentals/systems/form/model-value.md +1 -1
  109. package/docs/fundamentals/systems/form/overview.md +28 -28
  110. package/docs/fundamentals/systems/form/use-cases.md +19 -19
  111. package/docs/fundamentals/systems/form/validate.md +50 -50
  112. package/docs/fundamentals/systems/localize/api-table.md +10 -17
  113. package/docs/fundamentals/systems/localize/overview.md +4 -4
  114. package/docs/fundamentals/systems/localize/use-cases.md +4 -4
  115. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +4 -4
  116. package/docs/fundamentals/systems/overlays/api-table.md +34 -90
  117. package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -9
  118. package/docs/fundamentals/systems/overlays/configuration.md +30 -30
  119. package/docs/fundamentals/systems/overlays/overview.md +6 -6
  120. package/docs/fundamentals/systems/overlays/use-cases.md +30 -30
  121. package/docs/fundamentals/tools/ajax/use-cases.md +20 -20
  122. package/docs/fundamentals/tools/helpers/action-logger.md +3 -3
  123. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  124. package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +2 -2
  125. package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +2 -2
  126. package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +2 -2
  127. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  128. package/docs/guides/how-to/create-a-custom-field.md +7 -7
  129. package/docs/guides/how-to/create-a-form.md +4 -4
  130. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  131. package/docs/guides/index.md +8 -8
  132. package/docs/guides/principles/index.md +5 -5
  133. package/docs/guides/principles/scoped-elements.md +1 -1
  134. package/docs/guides/principles/styling.md +1 -1
  135. package/package.json +1 -1
@@ -4,76 +4,70 @@
4
4
 
5
5
  ### Fields
6
6
 
7
- | Name | Privacy | Type | Default | Description | Inherited From |
8
- | ------------------------------ | --------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
9
- | `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | ValidateMixin |
10
- | `_focusableNode` | protected | `HTMLElement` | | The focusable element:
could be an input, textarea, select, button or any other element with tabindex > -1 | FocusMixin |
11
- | `_inputNode` | protected | | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | FormControlMixin |
12
- | `_listboxNode` | protected | | | | ListboxMixin |
13
- | `_listboxActiveDescendantNode` | protected | `HTMLElement` | | | ListboxMixin |
14
- | `_listboxSlot` | protected | `HTMLElement` | | | ListboxMixin |
15
- | `_scrollTargetNode` | protected | `HTMLElement` | | | ListboxMixin |
16
- | `_activeDescendantOwnerNode` | protected | `HTMLElement` | | | ListboxMixin |
17
- | `activeIndex` | public | | | | ListboxMixin |
18
- | `checkedIndex` | public | `number \| number[]` | | | ListboxMixin |
19
- | `hasNoDefaultSelected` | public | `boolean` | `false` | When setting this to true, on initial render, no option will be selected.
It is advisable to override \`\_noSelectionTemplate\` method in the select-invoker
to render some kind of placeholder initially | ListboxMixin |
20
- | `orientation` | public | `string` | `'vertical'` | Informs screen reader and affects keyboard navigation.
By default 'vertical' | ListboxMixin |
21
- | `rotateKeyboardNavigation` | public | `boolean` | `false` | Will give first option active state when navigated to the next option from
last option. | ListboxMixin |
22
- | `selectionFollowsFocus` | public | `boolean` | `false` | When true, will synchronize activedescendant and selected element on&#xA;arrow key navigation.&#xA;This behavior can usually be seen on \<select> on the Windows platform.&#xA;Note that this behavior cannot be used when multiple-choice is true.&#xA;See: https\://www\.w3.org/TR/wai-aria-practices/#kbd\_selection\_follows\_focus | ListboxMixin |
23
- | `_noTypeAhead` | public | `boolean` | `false` | When false, a user can type on which the focus will jump to the matching option | ListboxMixin |
24
- | `_typeAheadTimeout` | protected | `number` | `1000` | The pending char sequence that will set active list item | ListboxMixin |
25
- | `_listboxActiveDescendant` | protected | `number \| null` | `null` | | ListboxMixin |
26
- | `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | FormControlMixin |
27
- | `_listboxReceivesNoFocus` | protected | `boolean` | `false` | When listbox is coupled to a textbox (in case we are dealing with a combobox),&#xA;spaces should not select an element (they need to be put in the textbox) | ListboxMixin |
28
- | `_oldModelValue` | protected | `string \| string[] \| undefined` | `undefined` | | ListboxMixin |
29
- | `label` | public | `string` | `''` | The label text for the input node.&#xA;When no value is defined, textContent of \[slot=label] will be used | FormControlMixin |
30
- | `helpText` | public | `string` | `''` | The helpt text for the input node.&#xA;When no value is defined, textContent of \[slot=help-text] will be used | FormControlMixin |
31
- | `fieldName` | public | `string` | | Will be used in validation messages to refer to the current field | FormControlMixin |
32
- | `_labelNode` | protected | | | Element where label will be rendered to | FormControlMixin |
33
- | `_helpTextNode` | protected | | | Element where help text will be rendered to | FormControlMixin |
34
- | `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | FormControlMixin |
35
- | `readOnly` | public | `boolean` | `false` | A Boolean attribute which, if present, indicates that the user should not be able to edit&#xA;the value of the input. The difference between disabled and readonly is that read-only&#xA;controls can still function, whereas disabled controls generally do not function as&#xA;controls until they are enabled.&#xA;(From: https\://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | FormControlMixin |
36
- | `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
37
- | `_inputId` | protected | `string` | | Unique id that can be used in all light dom | FormControlMixin |
38
- | `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
39
- | `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
40
- | `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an&#xA;'endpoint'. This means it will be considered as an individual field: for&#xA;a select, individual options will not be part of the formPath. They&#xA;will.&#xA;Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'&#xA;(from Application Developer perspective) need to be more like fields&#xA;(think of an amount-input with a currency select box next to it), can set this&#xA;to true to hide private internals in the formPath. | FormControlMixin |
41
- | `modelValue` | public | | | | FormControlMixin |
42
- | `serializedValue` | public | | | | ChoiceGroupMixin |
43
- | `formattedValue` | public | | | | ChoiceGroupMixin |
44
- | `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
45
- | `multipleChoice` | public | `boolean` | `false` | When false (default), modelValue and serializedValue will reflect the&#xA;currently selected choice (usually a string). When true, modelValue will and&#xA;serializedValue will be an array of strings. | ChoiceGroupMixin |
46
- | `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed&#xA;both like an array and an object (based on control/element names). | FormRegistrarMixin |
47
- | `_isFormOrFieldset` | protected | `boolean` | `false` | Flag that determines how ".formElements" should behave.&#xA;For a regular fieldset (see LionFieldset) we expect ".formElements"&#xA;to be accessible as an object.&#xA;In case of a radio-group, a checkbox-group or a select/listbox,&#xA;it should act like an array (see ChoiceGroupMixin).&#xA;Usually, when false, we deal with a choice-group (radio-group, checkbox-group,&#xA;(multi)select) | FormRegistrarMixin |
48
- | `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => {
49
- this.__resolveInitComplete = resolve;
50
- this.__rejectInitComplete = reject;
51
- })` | initComplete resolves after all pending initialization logic&#xA;(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)&#xA;is executed | FormRegistrarMixin |
52
- | `registrationComplete` | public | `Promise<any> & {done?:boolean}` | `new Promise((resolve, reject) => {
53
- this.__resolveRegistrationComplete = resolve;
54
- this.__rejectRegistrationComplete = reject;
55
- })` | registrationComplete waits for all children formElements to have registered | FormRegistrarMixin |
56
- | `done` | public | `boolean` | `false` | | FormRegistrarMixin |
57
- | `focused` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) is focused.&#xA;Reflects to attribute '\[focused]' as a styling hook | FocusMixin |
58
- | `focusedVisible` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) matches ':focus-visible'&#xA;Reflects to attribute '\[focused-visible]' as a styling hook&#xA;See: https\://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible | FocusMixin |
59
- | `autofocus` | public | `boolean` | `false` | | FocusMixin |
60
- | `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | InteractionStateMixin |
61
- | `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | InteractionStateMixin |
62
- | `prefilled` | public | `boolean` | `false` | True when user has left non-empty field or input is prefilled.&#xA;The name must be seen from the point of view of the input field:&#xA;once the user enters the input field, the value is non-empty. | InteractionStateMixin |
63
- | `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | InteractionStateMixin |
64
- | `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | InteractionStateMixin |
65
- | `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | InteractionStateMixin |
66
- | `submitted` | public | | | | InteractionStateMixin |
67
- | `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
68
- | `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this&#xA;array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).&#xA;Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on&#xA;\`.feedbackCondition()\`.&#xA;&#xA;For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can&#xA;be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
69
- | `showsFeedbackFor` | public | `ValidationType[]` | `[]` | Based on outcome of feedbackCondition, this array decides what ValidationTypes should be&#xA;shown in validationFeedback, based on meta data like interaction states.&#xA;&#xA;For styling purposes, it reflects it \`\[shows-feedback-for="error warning"]\` | ValidateMixin |
70
- | `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
71
- | `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.&#xA;Creates attribute \[is-pending] as a styling hook | ValidateMixin |
72
- | `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
73
- | `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.&#xA;A date input for instance, always needs the isDate validator. | ValidateMixin |
74
- | `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | ValidateMixin |
75
- | `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
76
- | `disabled` | public | `boolean` | `false` | | DisabledMixin |
7
+ | Name | Privacy | Type | Default | Description | Inherited From |
8
+ | ------------------------------ | --------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
9
+ | `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | ValidateMixin |
10
+ | `_focusableNode` | protected | `HTMLElement` | | The focusable element:&#xA;could be an input, textarea, select, button or any other element with tabindex > -1 | FocusMixin |
11
+ | `_inputNode` | protected | | | The interactive (form) element. Can be a native element like input/textarea/select or&#xA;an element with tabindex > -1 | FormControlMixin |
12
+ | `_listboxNode` | protected | | | | ListboxMixin |
13
+ | `_listboxActiveDescendantNode` | protected | `HTMLElement` | | | ListboxMixin |
14
+ | `_listboxSlot` | protected | `HTMLElement` | | | ListboxMixin |
15
+ | `_scrollTargetNode` | protected | `HTMLElement` | | | ListboxMixin |
16
+ | `_activeDescendantOwnerNode` | protected | `HTMLElement` | | | ListboxMixin |
17
+ | `activeIndex` | public | | | | ListboxMixin |
18
+ | `checkedIndex` | public | `number \| number[]` | | | ListboxMixin |
19
+ | `hasNoDefaultSelected` | public | `boolean` | `false` | When setting this to true, on initial render, no option will be selected.&#xA;It is advisable to override \`\_noSelectionTemplate\` method in the select-invoker&#xA;to render some kind of placeholder initially | ListboxMixin |
20
+ | `orientation` | public | `string` | `'vertical'` | Informs screen reader and affects keyboard navigation.&#xA;By default 'vertical' | ListboxMixin |
21
+ | `rotateKeyboardNavigation` | public | `boolean` | `false` | Will give first option active state when navigated to the next option from&#xA;last option. | ListboxMixin |
22
+ | `selectionFollowsFocus` | public | `boolean` | `false` | When true, will synchronize activedescendant and selected element on&#xA;arrow key navigation.&#xA;This behavior can usually be seen on \<select> on the Windows platform.&#xA;Note that this behavior cannot be used when multiple-choice is true.&#xA;See: https\://www\.w3.org/TR/wai-aria-practices/#kbd\_selection\_follows\_focus | ListboxMixin |
23
+ | `_noTypeAhead` | public | `boolean` | `false` | When false, a user can type on which the focus will jump to the matching option | ListboxMixin |
24
+ | `_typeAheadTimeout` | protected | `number` | `1000` | The pending char sequence that will set active list item | ListboxMixin |
25
+ | `_listboxActiveDescendant` | protected | `number \| null` | `null` | | ListboxMixin |
26
+ | `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | FormControlMixin |
27
+ | `_listboxReceivesNoFocus` | protected | `boolean` | `false` | When listbox is coupled to a textbox (in case we are dealing with a combobox),&#xA;spaces should not select an element (they need to be put in the textbox) | ListboxMixin |
28
+ | `_oldModelValue` | protected | `string \| string[] \| undefined` | `undefined` | | ListboxMixin |
29
+ | `label` | public | `string` | `''` | The label text for the input node.&#xA;When no value is defined, textContent of \[slot=label] will be used | FormControlMixin |
30
+ | `helpText` | public | `string` | `''` | The helpt text for the input node.&#xA;When no value is defined, textContent of \[slot=help-text] will be used | FormControlMixin |
31
+ | `fieldName` | public | `string` | | Will be used in validation messages to refer to the current field | FormControlMixin |
32
+ | `_labelNode` | protected | | | Element where label will be rendered to | FormControlMixin |
33
+ | `_helpTextNode` | protected | | | Element where help text will be rendered to | FormControlMixin |
34
+ | `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | FormControlMixin |
35
+ | `readOnly` | public | `boolean` | `false` | A Boolean attribute which, if present, indicates that the user should not be able to edit&#xA;the value of the input. The difference between disabled and readonly is that read-only&#xA;controls can still function, whereas disabled controls generally do not function as&#xA;controls until they are enabled.&#xA;(From: https\://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | FormControlMixin |
36
+ | `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
37
+ | `_inputId` | protected | `string` | | Unique id that can be used in all light dom | FormControlMixin |
38
+ | `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
39
+ | `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
40
+ | `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an&#xA;'endpoint'. This means it will be considered as an individual field: for&#xA;a select, individual options will not be part of the formPath. They&#xA;will.&#xA;Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'&#xA;(from Application Developer perspective) need to be more like fields&#xA;(think of an amount-input with a currency select box next to it), can set this&#xA;to true to hide private internals in the formPath. | FormControlMixin |
41
+ | `modelValue` | public | | | | FormControlMixin |
42
+ | `serializedValue` | public | | | | ChoiceGroupMixin |
43
+ | `formattedValue` | public | | | | ChoiceGroupMixin |
44
+ | `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
45
+ | `multipleChoice` | public | `boolean` | `false` | When false (default), modelValue and serializedValue will reflect the&#xA;currently selected choice (usually a string). When true, modelValue will and&#xA;serializedValue will be an array of strings. | ChoiceGroupMixin |
46
+ | `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed&#xA;both like an array and an object (based on control/element names). | FormRegistrarMixin |
47
+ | `_isFormOrFieldset` | protected | `boolean` | `false` | Flag that determines how ".formElements" should behave.&#xA;For a regular fieldset (see LionFieldset) we expect ".formElements"&#xA;to be accessible as an object.&#xA;In case of a radio-group, a checkbox-group or a select/listbox,&#xA;it should act like an array (see ChoiceGroupMixin).&#xA;Usually, when false, we deal with a choice-group (radio-group, checkbox-group,&#xA;(multi)select) | FormRegistrarMixin |
48
+ | `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => { this.__resolveInitComplete = resolve; this.__rejectInitComplete = reject; })` | initComplete resolves after all pending initialization logic&#xA;(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)&#xA;is executed | FormRegistrarMixin |
49
+ | `registrationComplete` | public | `Promise<any> & {done?:boolean}` | `new Promise((resolve, reject) => { this.__resolveRegistrationComplete = resolve; this.__rejectRegistrationComplete = reject; })` | registrationComplete waits for all children formElements to have registered | FormRegistrarMixin |
50
+ | `done` | public | `boolean` | `false` | | FormRegistrarMixin |
51
+ | `focused` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) is focused.&#xA;Reflects to attribute '\[focused]' as a styling hook | FocusMixin |
52
+ | `focusedVisible` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) matches ':focus-visible'&#xA;Reflects to attribute '\[focused-visible]' as a styling hook&#xA;See: https\://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible | FocusMixin |
53
+ | `autofocus` | public | `boolean` | `false` | | FocusMixin |
54
+ | `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | InteractionStateMixin |
55
+ | `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | InteractionStateMixin |
56
+ | `prefilled` | public | `boolean` | `false` | True when user has left non-empty field or input is prefilled.&#xA;The name must be seen from the point of view of the input field:&#xA;once the user enters the input field, the value is non-empty. | InteractionStateMixin |
57
+ | `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | InteractionStateMixin |
58
+ | `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | InteractionStateMixin |
59
+ | `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | InteractionStateMixin |
60
+ | `submitted` | public | | | | InteractionStateMixin |
61
+ | `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
62
+ | `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this&#xA;array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).&#xA;Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on&#xA;\`.feedbackCondition()\`.&#xA;&#xA;For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can&#xA;be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
63
+ | `showsFeedbackFor` | public | `ValidationType[]` | `[]` | Based on outcome of feedbackCondition, this array decides what ValidationTypes should be&#xA;shown in validationFeedback, based on meta data like interaction states.&#xA;&#xA;For styling purposes, it reflects it \`\[shows-feedback-for="error warning"]\` | ValidateMixin |
64
+ | `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
65
+ | `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.&#xA;Creates attribute \[is-pending] as a styling hook | ValidateMixin |
66
+ | `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
67
+ | `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.&#xA;A date input for instance, always needs the isDate validator. | ValidateMixin |
68
+ | `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | ValidateMixin |
69
+ | `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
70
+ | `disabled` | public | `boolean` | `false` | | DisabledMixin |
77
71
 
78
72
  ### Methods
79
73
 
@@ -15,11 +15,11 @@ import '@lion/ui/define/lion-option.js';
15
15
  ```js preview-story
16
16
  export const main = () => html`
17
17
  <lion-listbox name="listbox" label="Default">
18
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
19
- <lion-option checked .choiceValue=${'Artichoke'}>Artichoke</lion-option>
20
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
21
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
22
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
18
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
19
+ <lion-option checked .choiceValue="${'Artichoke'}">Artichoke</lion-option>
20
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
21
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
22
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
23
23
  </lion-listbox>
24
24
  `;
25
25
  ```
@@ -21,16 +21,16 @@ This will:
21
21
 
22
22
  ```html preview-story
23
23
  <lion-listbox name="combo" label="Multiple" multiple-choice>
24
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
25
- <lion-option .choiceValue=${'Artichoke'}>Artichoke</lion-option>
26
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
27
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
28
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
29
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
30
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
31
- <lion-option .choiceValue=${'Brussels sprout'}>Brussels sprout</lion-option>
32
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
33
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
24
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
25
+ <lion-option .choiceValue="${'Artichoke'}">Artichoke</lion-option>
26
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
27
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
28
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
29
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
30
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
31
+ <lion-option .choiceValue="${'Brussels sprout'}">Brussels sprout</lion-option>
32
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
33
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
34
34
  </lion-listbox>
35
35
  ```
36
36
 
@@ -42,16 +42,16 @@ By default, `orientation="vertical"` is set, which enables up and down arrow key
42
42
 
43
43
  ```html preview-story
44
44
  <lion-listbox name="combo" label="Orientation horizontal" orientation="horizontal">
45
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
46
- <lion-option .choiceValue=${'Artichoke'}>Artichoke</lion-option>
47
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
48
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
49
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
50
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
51
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
52
- <lion-option .choiceValue=${'Brussels sprout'}>Brussels sprout</lion-option>
53
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
54
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
45
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
46
+ <lion-option .choiceValue="${'Artichoke'}">Artichoke</lion-option>
47
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
48
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
49
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
50
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
51
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
52
+ <lion-option .choiceValue="${'Brussels sprout'}">Brussels sprout</lion-option>
53
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
54
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
55
55
  </lion-listbox>
56
56
  ```
57
57
 
@@ -64,16 +64,16 @@ With `multiple-choice` flag configured, multiple options can be checked.
64
64
  orientation="horizontal"
65
65
  multiple-choice
66
66
  >
67
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
68
- <lion-option .choiceValue=${'Artichoke'}>Artichoke</lion-option>
69
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
70
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
71
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
72
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
73
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
74
- <lion-option .choiceValue=${'Brussels sprout'}>Brussels sprout</lion-option>
75
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
76
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
67
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
68
+ <lion-option .choiceValue="${'Artichoke'}">Artichoke</lion-option>
69
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
70
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
71
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
72
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
73
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
74
+ <lion-option .choiceValue="${'Brussels sprout'}">Brussels sprout</lion-option>
75
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
76
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
77
77
  </lion-listbox>
78
78
  ```
79
79
 
@@ -86,16 +86,16 @@ See [wai aria spec](https://www.w3.org/TR/wai-aria-practices/#kbd_selection_foll
86
86
 
87
87
  ```html preview-story
88
88
  <lion-listbox name="combo" label="Selection follows focus" selection-follows-focus>
89
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
90
- <lion-option .choiceValue=${'Artichoke'} disabled>Artichoke</lion-option>
91
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
92
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
93
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
94
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
95
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
96
- <lion-option .choiceValue=${'Brussels sprout'}>Brussels sprout</lion-option>
97
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
98
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
89
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
90
+ <lion-option .choiceValue="${'Artichoke'}" disabled>Artichoke</lion-option>
91
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
92
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
93
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
94
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
95
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
96
+ <lion-option .choiceValue="${'Brussels sprout'}">Brussels sprout</lion-option>
97
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
98
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
99
99
  </lion-listbox>
100
100
  ```
101
101
 
@@ -105,16 +105,16 @@ See [wai aria spec](https://www.w3.org/TR/wai-aria-practices/#kbd_selection_foll
105
105
 
106
106
  ```html preview-story
107
107
  <lion-listbox name="combo" label="Rotate keyboard navigation" rotate-keyboard-navigation>
108
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
109
- <lion-option .choiceValue=${'Artichoke'}>Artichoke</lion-option>
110
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
111
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
112
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
113
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
114
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
115
- <lion-option .choiceValue=${'Brussels sprout'}>Brussels sprout</lion-option>
116
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
117
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
108
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
109
+ <lion-option .choiceValue="${'Artichoke'}">Artichoke</lion-option>
110
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
111
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
112
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
113
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
114
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
115
+ <lion-option .choiceValue="${'Brussels sprout'}">Brussels sprout</lion-option>
116
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
117
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
118
118
  </lion-listbox>
119
119
  ```
120
120
 
@@ -124,19 +124,19 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
124
124
 
125
125
  ```html preview-story
126
126
  <lion-listbox name="combo" label="Rotate with disabled options" rotate-keyboard-navigation>
127
- <lion-option .choiceValue=${'Apple'}>Apple</lion-option>
128
- <lion-option .choiceValue=${'Artichoke'} disabled>Artichoke</lion-option>
129
- <lion-option .choiceValue=${'Asparagus'}>Asparagus</lion-option>
130
- <lion-option .choiceValue=${'Banana'}>Banana</lion-option>
131
- <lion-option .choiceValue=${'Beets'}>Beets</lion-option>
132
- <lion-option .choiceValue=${'Bell pepper'}>Bell pepper</lion-option>
133
- <lion-option .choiceValue=${'Broccoli'}>Broccoli</lion-option>
134
- <lion-option .choiceValue=${'Brussels sprout'} disabled>Brussels sprout</lion-option>
135
- <lion-option .choiceValue=${'Cabbage'}>Cabbage</lion-option>
136
- <lion-option .choiceValue=${'Carrot'}>Carrot</lion-option>
127
+ <lion-option .choiceValue="${'Apple'}">Apple</lion-option>
128
+ <lion-option .choiceValue="${'Artichoke'}" disabled>Artichoke</lion-option>
129
+ <lion-option .choiceValue="${'Asparagus'}">Asparagus</lion-option>
130
+ <lion-option .choiceValue="${'Banana'}">Banana</lion-option>
131
+ <lion-option .choiceValue="${'Beets'}">Beets</lion-option>
132
+ <lion-option .choiceValue="${'Bell pepper'}">Bell pepper</lion-option>
133
+ <lion-option .choiceValue="${'Broccoli'}">Broccoli</lion-option>
134
+ <lion-option .choiceValue="${'Brussels sprout'}" disabled>Brussels sprout</lion-option>
135
+ <lion-option .choiceValue="${'Cabbage'}">Cabbage</lion-option>
136
+ <lion-option .choiceValue="${'Carrot'}">Carrot</lion-option>
137
137
  </lion-listbox>
138
138
  ```
139
139
 
140
140
  ## Validation
141
141
 
142
- A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/form/validate.md).
142
+ A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/b25478e4cc0cb51c4fda1eccadf5e630b679f53c/docs/fundamentals/systems/form/validate.md).
@@ -52,17 +52,17 @@ export const methods = ({ shadowRoot }) => {
52
52
  }}
53
53
  ></lion-pagination>
54
54
  <section style="margin-top:16px">
55
- <button @click=${() => shadowRoot.getElementById('pagination-method').previous()}>
55
+ <button @click="${() => shadowRoot.getElementById('pagination-method').previous()}">
56
56
  Previous
57
57
  </button>
58
- <button @click=${() => shadowRoot.getElementById('pagination-method').next()}>Next</button>
58
+ <button @click="${() => shadowRoot.getElementById('pagination-method').next()}">Next</button>
59
59
  <br />
60
60
  <br />
61
- <button @click=${() => shadowRoot.getElementById('pagination-method').first()}>First</button>
62
- <button @click=${() => shadowRoot.getElementById('pagination-method').last()}>Last</button>
61
+ <button @click="${() => shadowRoot.getElementById('pagination-method').first()}">First</button>
62
+ <button @click="${() => shadowRoot.getElementById('pagination-method').last()}">Last</button>
63
63
  <br />
64
64
  <br />
65
- <button @click=${() => shadowRoot.getElementById('pagination-method').goto(55)}>
65
+ <button @click="${() => shadowRoot.getElementById('pagination-method').goto(55)}">
66
66
  Go to 55
67
67
  </button>
68
68
  </section>