@lion/ui 0.17.0 → 0.17.1

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 (61) hide show
  1. package/components/overlays/src/configurations/withDropdownConfig.js +2 -22
  2. package/components/overlays/src/configurations/withPopoverConfig.js +32 -0
  3. package/custom-elements.json +64 -30
  4. package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts +0 -1
  5. package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts.map +1 -1
  6. package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts +6 -0
  7. package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts.map +1 -0
  8. package/dist-types/exports/overlays.d.ts +1 -0
  9. package/dist-types/tsconfig.tsbuildinfo +1 -1
  10. package/docs/components/checkbox-group/overview.md +2 -2
  11. package/docs/components/collapsible/overview.md +1 -1
  12. package/docs/components/combobox/overview.md +1 -1
  13. package/docs/components/combobox/use-cases.md +1 -1
  14. package/docs/components/dialog/overview.md +1 -1
  15. package/docs/components/fieldset/overview.md +5 -5
  16. package/docs/components/form/overview.md +3 -3
  17. package/docs/components/form/use-cases.md +2 -2
  18. package/docs/components/icon/use-cases.md +1 -1
  19. package/docs/components/input/overview.md +1 -1
  20. package/docs/components/input-amount/overview.md +3 -3
  21. package/docs/components/input-date/overview.md +3 -3
  22. package/docs/components/input-datepicker/overview.md +5 -5
  23. package/docs/components/input-email/overview.md +2 -2
  24. package/docs/components/input-file/overview.md +1 -1
  25. package/docs/components/input-iban/overview.md +2 -2
  26. package/docs/components/input-range/overview.md +2 -2
  27. package/docs/components/input-stepper/overview.md +1 -1
  28. package/docs/components/input-tel/overview.md +1 -1
  29. package/docs/components/input-tel/use-cases.md +6 -6
  30. package/docs/components/input-tel-dropdown/overview.md +1 -1
  31. package/docs/components/listbox/use-cases.md +1 -1
  32. package/docs/components/radio-group/overview.md +3 -3
  33. package/docs/components/select/use-cases.md +1 -1
  34. package/docs/components/select-rich/use-cases.md +2 -2
  35. package/docs/components/tabs/examples.md +1 -1
  36. package/docs/fundamentals/index.md +4 -4
  37. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  38. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  39. package/docs/fundamentals/rationales/accessibility.md +1 -1
  40. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  41. package/docs/fundamentals/systems/core/overview.md +1 -1
  42. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  43. package/docs/fundamentals/systems/form/model-value.md +1 -1
  44. package/docs/fundamentals/systems/form/overview.md +28 -28
  45. package/docs/fundamentals/systems/form/validate.md +2 -2
  46. package/docs/fundamentals/systems/localize/overview.md +4 -4
  47. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  48. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  49. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  50. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  51. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  52. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  53. package/docs/guides/how-to/create-a-form.md +4 -4
  54. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  55. package/docs/guides/how-to/index.md +1 -1
  56. package/docs/guides/index.md +8 -8
  57. package/docs/guides/principles/index.md +5 -5
  58. package/docs/guides/principles/styling.md +1 -1
  59. package/exports/overlays.js +1 -0
  60. package/overlays.js +1 -0
  61. package/package.json +1 -1
@@ -1,24 +1,4 @@
1
- import { withClickInteraction } from './visibility-trigger-partials/withClickInteraction.js';
2
-
3
- /**
4
- * @typedef {import('../../types/OverlayConfig.js').OverlayConfig} OverlayConfig
5
- */
1
+ import { withPopoverConfig } from './withPopoverConfig.js';
6
2
 
7
3
  export const withDropdownConfig = () =>
8
- /** @type {OverlayConfig} */ ({
9
- placementMode: 'local',
10
- inheritsReferenceWidth: 'min',
11
- hidesOnOutsideClick: true,
12
- hidesOnEsc: true,
13
- popperConfig: {
14
- placement: 'bottom-start',
15
- modifiers: [
16
- {
17
- name: 'offset',
18
- enabled: false,
19
- },
20
- ],
21
- },
22
- handlesAccessibility: true,
23
- ...withClickInteraction(),
24
- });
4
+ withPopoverConfig({ horizontalFallback: false, placement: 'bottom-start' });
@@ -0,0 +1,32 @@
1
+ import { withClickInteraction } from './visibility-trigger-partials/withClickInteraction.js';
2
+
3
+ /**
4
+ * @typedef {import('../../types/OverlayConfig.js').OverlayConfig} OverlayConfig
5
+ */
6
+
7
+ export const withPopoverConfig = ({ horizontalFallback = true, placement = 'auto' } = {}) =>
8
+ /** @type {OverlayConfig} */ ({
9
+ placementMode: 'local',
10
+ inheritsReferenceWidth: 'min',
11
+ hidesOnOutsideClick: true,
12
+ hidesOnEsc: true,
13
+ popperConfig: {
14
+ placement,
15
+ modifiers: [
16
+ {
17
+ name: 'offset',
18
+ enabled: false,
19
+ },
20
+ {
21
+ name: 'flip',
22
+ options: {
23
+ fallbackPlacements: horizontalFallback
24
+ ? ['bottom', 'top', 'right', 'left']
25
+ : ['bottom', 'top'],
26
+ },
27
+ },
28
+ ],
29
+ },
30
+ handlesAccessibility: true,
31
+ ...withClickInteraction(),
32
+ });
@@ -1857,6 +1857,14 @@
1857
1857
  "module": "../components/overlays/src/configurations/withTooltipConfig.js"
1858
1858
  }
1859
1859
  },
1860
+ {
1861
+ "kind": "js",
1862
+ "name": "withPopoverConfig",
1863
+ "declaration": {
1864
+ "name": "withPopoverConfig",
1865
+ "module": "../components/overlays/src/configurations/withPopoverConfig.js"
1866
+ }
1867
+ },
1860
1868
  {
1861
1869
  "kind": "js",
1862
1870
  "name": "deepContains",
@@ -2158,36 +2166,6 @@
2158
2166
  }
2159
2167
  ]
2160
2168
  },
2161
- {
2162
- "kind": "javascript-module",
2163
- "path": "exports/define-helpers/sb-action-logger.js",
2164
- "declarations": [],
2165
- "exports": [
2166
- {
2167
- "kind": "custom-element-definition",
2168
- "name": "sb-action-logger",
2169
- "declaration": {
2170
- "name": "SbActionLogger",
2171
- "module": "/exports/helpers.js"
2172
- }
2173
- }
2174
- ]
2175
- },
2176
- {
2177
- "kind": "javascript-module",
2178
- "path": "exports/define-helpers/sb-locale-switcher.js",
2179
- "declarations": [],
2180
- "exports": [
2181
- {
2182
- "kind": "custom-element-definition",
2183
- "name": "sb-locale-switcher",
2184
- "declaration": {
2185
- "name": "SbLocaleSwitcher",
2186
- "module": "/exports/helpers.js"
2187
- }
2188
- }
2189
- ]
2190
- },
2191
2169
  {
2192
2170
  "kind": "javascript-module",
2193
2171
  "path": "exports/define/lion-accordion.js",
@@ -2893,6 +2871,36 @@
2893
2871
  }
2894
2872
  ]
2895
2873
  },
2874
+ {
2875
+ "kind": "javascript-module",
2876
+ "path": "exports/define-helpers/sb-action-logger.js",
2877
+ "declarations": [],
2878
+ "exports": [
2879
+ {
2880
+ "kind": "custom-element-definition",
2881
+ "name": "sb-action-logger",
2882
+ "declaration": {
2883
+ "name": "SbActionLogger",
2884
+ "module": "/exports/helpers.js"
2885
+ }
2886
+ }
2887
+ ]
2888
+ },
2889
+ {
2890
+ "kind": "javascript-module",
2891
+ "path": "exports/define-helpers/sb-locale-switcher.js",
2892
+ "declarations": [],
2893
+ "exports": [
2894
+ {
2895
+ "kind": "custom-element-definition",
2896
+ "name": "sb-locale-switcher",
2897
+ "declaration": {
2898
+ "name": "SbLocaleSwitcher",
2899
+ "module": "/exports/helpers.js"
2900
+ }
2901
+ }
2902
+ ]
2903
+ },
2896
2904
  {
2897
2905
  "kind": "javascript-module",
2898
2906
  "path": "components/accordion/src/LionAccordion.js",
@@ -123655,6 +123663,32 @@
123655
123663
  }
123656
123664
  ]
123657
123665
  },
123666
+ {
123667
+ "kind": "javascript-module",
123668
+ "path": "components/overlays/src/configurations/withPopoverConfig.js",
123669
+ "declarations": [
123670
+ {
123671
+ "kind": "function",
123672
+ "name": "withPopoverConfig",
123673
+ "parameters": [
123674
+ {
123675
+ "name": "{ horizontalFallback = true, placement = 'auto' }",
123676
+ "default": "{}"
123677
+ }
123678
+ ]
123679
+ }
123680
+ ],
123681
+ "exports": [
123682
+ {
123683
+ "kind": "js",
123684
+ "name": "withPopoverConfig",
123685
+ "declaration": {
123686
+ "name": "withPopoverConfig",
123687
+ "module": "components/overlays/src/configurations/withPopoverConfig.js"
123688
+ }
123689
+ }
123690
+ ]
123691
+ },
123658
123692
  {
123659
123693
  "kind": "javascript-module",
123660
123694
  "path": "components/overlays/src/utils/deep-contains.js",
@@ -1,3 +1,2 @@
1
1
  export function withDropdownConfig(): import("../../types/OverlayConfig.js").OverlayConfig;
2
- export type OverlayConfig = import('../../types/OverlayConfig.js').OverlayConfig;
3
2
  //# sourceMappingURL=withDropdownConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withDropdownConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withDropdownConfig.js"],"names":[],"mappings":"AAMO,2FAiBH;4BApBS,OAAO,8BAA8B,EAAE,aAAa"}
1
+ {"version":3,"file":"withDropdownConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withDropdownConfig.js"],"names":[],"mappings":"AAEO,2FACsE"}
@@ -0,0 +1,6 @@
1
+ export function withPopoverConfig({ horizontalFallback, placement }?: {
2
+ horizontalFallback?: boolean | undefined;
3
+ placement?: string | undefined;
4
+ }): import("../../types/OverlayConfig.js").OverlayConfig;
5
+ export type OverlayConfig = import('../../types/OverlayConfig.js').OverlayConfig;
6
+ //# sourceMappingURL=withPopoverConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withPopoverConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withPopoverConfig.js"],"names":[],"mappings":"AAMO;;;yDAyBH;4BA5BS,OAAO,8BAA8B,EAAE,aAAa"}
@@ -6,6 +6,7 @@ export { withBottomSheetConfig } from "../components/overlays/src/configurations
6
6
  export { withModalDialogConfig } from "../components/overlays/src/configurations/withModalDialogConfig.js";
7
7
  export { withDropdownConfig } from "../components/overlays/src/configurations/withDropdownConfig.js";
8
8
  export { withTooltipConfig } from "../components/overlays/src/configurations/withTooltipConfig.js";
9
+ export { withPopoverConfig } from "../components/overlays/src/configurations/withPopoverConfig.js";
9
10
  export { deepContains } from "../components/overlays/src/utils/deep-contains.js";
10
11
  export { getDeepActiveElement } from "../components/core/src/getDeepActiveElement.js";
11
12
  export { getFocusableElements } from "../components/overlays/src/utils/get-focusable-elements.js";