@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.
- package/components/overlays/src/configurations/withDropdownConfig.js +2 -22
- package/components/overlays/src/configurations/withPopoverConfig.js +32 -0
- package/custom-elements.json +64 -30
- package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts +0 -1
- package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts +6 -0
- package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts.map +1 -0
- package/dist-types/exports/overlays.d.ts +1 -0
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/form/use-cases.md +2 -2
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/how-to/index.md +1 -1
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/exports/overlays.js +1 -0
- package/overlays.js +1 -0
- package/package.json +1 -1
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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
|
+
});
|
package/custom-elements.json
CHANGED
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDropdownConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withDropdownConfig.js"],"names":[],"mappings":"
|
|
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";
|