@eightshift/ui-components 1.9.0 → 2.0.0
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/README.md +0 -7
- package/dist/{Button-BMFbEXg1.js → Button-OQ5EIPvt.js} +8 -8
- package/dist/{SelectionManager-D-89MUJW.js → Collection-CJM_asJz.js} +345 -197
- package/dist/{Color-B-cqXgPz.js → Color-B0HgM8f4.js} +1 -1
- package/dist/{ColorSwatch-B6s54Jb3.js → ColorSwatch-Dv3Wxdl_.js} +6 -7
- package/dist/{ComboBox-VR9-vNZv.js → ComboBox-BnlZjJ3T.js} +21 -22
- package/dist/{Dialog-BlYTPzgB.js → Dialog-CIh-hX93.js} +77 -65
- package/dist/{FieldError-DKicm3R0.js → FieldError-D7A6s7O5.js} +2 -2
- package/dist/{FocusScope-EoLYfbMp.js → FocusScope-Cs5_OoeA.js} +6 -4
- package/dist/{Group-D96edUPC.js → Group-D6tr3U_n.js} +5 -6
- package/dist/{Heading-GytTjUsy.js → Heading-DiYTXoIW.js} +3 -4
- package/dist/{Hidden-D3hHnmPI.js → Hidden-DnOd_jPX.js} +2 -2
- package/dist/{Input-BXSxJ_44.js → Input-Se0m3ubj.js} +13 -11
- package/dist/{Label-BtoiUpt8.js → Label-Ca9uelsn.js} +4 -5
- package/dist/{List-Ct3nzFZG.js → List-Br274SP1.js} +16 -8
- package/dist/{ListBox-BMpo-Cem.js → ListBox-D9dFEh5A.js} +36 -23
- package/dist/{OverlayArrow-4epQ99-E.js → OverlayArrow-1jx-ZyCR.js} +75 -13
- package/dist/{Select-aab027f3.esm-C7BxKjSc.js → Select-aab027f3.esm-HFNIFFya.js} +4 -4
- package/dist/{Separator-DUhFmbD-.js → Separator-BhZycTUp.js} +9 -7
- package/dist/{Slider-QNPrj4N9.js → Slider-BZNaJylD.js} +20 -24
- package/dist/{Text-DNDWaukZ.js → Text-aOUPPvTO.js} +3 -4
- package/dist/{VisuallyHidden-BHNhi-ls.js → VisuallyHidden-ClTQo25k.js} +2 -2
- package/dist/assets/index.css +37 -0
- package/dist/assets/style-editor.css +5287 -0
- package/dist/assets/style.css +5293 -1
- package/dist/assets/wp-font-enhancements.css +8 -1
- package/dist/assets/wp-ui-enhancements.css +299 -1
- package/dist/components/animated-visibility/animated-visibility.js +17 -21
- package/dist/components/base-control/base-control.js +7 -7
- package/dist/components/breakpoint-preview/breakpoint-preview.js +50 -50
- package/dist/components/button/button.js +190 -86
- package/dist/components/checkbox/checkbox.js +44 -27
- package/dist/components/color-pickers/color-picker.js +13 -9
- package/dist/components/color-pickers/color-swatch.js +4 -4
- package/dist/components/color-pickers/gradient-editor.js +25 -24
- package/dist/components/color-pickers/solid-color-picker.js +197 -229
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +17 -17
- package/dist/components/draggable/draggable-handle.js +6 -6
- package/dist/components/draggable/draggable.js +1414 -699
- package/dist/components/draggable-list/draggable-list-item.js +3 -3
- package/dist/components/draggable-list/draggable-list.js +12 -12
- package/dist/components/expandable/expandable.js +66 -78
- package/dist/components/index.js +2 -3
- package/dist/components/input-field/input-field.js +35 -22
- package/dist/components/layout/hstack.js +1 -1
- package/dist/components/layout/vstack.js +1 -1
- package/dist/components/link-input/link-input.js +69 -57
- package/dist/components/matrix-align/matrix-align.js +34 -86
- package/dist/components/menu/menu.js +22 -23
- package/dist/components/modal/modal.js +24 -25
- package/dist/components/notice/notice.js +32 -32
- package/dist/components/number-picker/number-picker.js +41 -40
- package/dist/components/option-select/option-select.js +9 -4
- package/dist/components/options-panel/options-panel.js +63 -28
- package/dist/components/placeholders/file-placeholder.js +6 -17
- package/dist/components/placeholders/image-placeholder.js +17 -17
- package/dist/components/placeholders/media-placeholder.js +12 -12
- package/dist/components/popover/popover.js +6 -5
- package/dist/components/radio/radio.js +60 -43
- package/dist/components/repeater/repeater-item.js +10 -10
- package/dist/components/repeater/repeater.js +8 -8
- package/dist/components/responsive/mini-responsive.js +41 -41
- package/dist/components/responsive/responsive-legacy.js +33 -33
- package/dist/components/responsive/responsive.js +48 -48
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.js +13 -11
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +3 -3
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +21 -21
- package/dist/components/select/v2/async-select.js +37 -47
- package/dist/components/select/v2/shared.js +8 -8
- package/dist/components/select/v2/single-select.js +44 -48
- package/dist/components/slider/column-config-slider.js +25 -25
- package/dist/components/slider/slider.js +173 -182
- package/dist/components/spacer/spacer.js +21 -21
- package/dist/components/tabs/tabs.js +111 -63
- package/dist/components/toggle/switch.js +27 -21
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +160 -83
- package/dist/components/tooltip/tooltip.js +25 -28
- package/dist/{context-KeRYAbEi.js → context-CDOs-GuR.js} +1 -1
- package/dist/{focusSafely-CZY36ssv.js → focusSafely-CiqTTjWy.js} +18 -17
- package/dist/icons/icons.js +52 -0
- package/dist/{index-641ee5b8.esm-DEB-c58F.js → index-641ee5b8.esm-DbdaYaxR.js} +45 -45
- package/dist/index-BRp93Yfa.js +28318 -0
- package/dist/index-CcCn9HWX.js +44 -0
- package/dist/index.js +2 -3
- package/dist/{multi-select-components-DM3GsNfb.js → multi-select-components-CkF3LyTF.js} +4 -4
- package/dist/{react-select-async.esm-Bq3N1-Wi.js → react-select-async.esm-DcVLw9X5.js} +3 -3
- package/dist/{react-select.esm-B38nY7_U.js → react-select.esm-OZ0cmTjg.js} +3 -3
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -1
- package/dist/{textSelection-G2G-nukT.js → textSelection-BlTDSskG.js} +2 -2
- package/dist/{useButton-CFtcz1T6.js → useButton-CmLbE5vg.js} +3 -3
- package/dist/{useEvent-B0yfN_Zu.js → useEvent-cLDJlznQ.js} +1 -1
- package/dist/{useFocusRing-DMAlRYjX.js → useFocusRing-CGp3guTX.js} +1 -1
- package/dist/{useFocusable-BlkOMLma.js → useFocusable-087cO5Ct.js} +9 -6
- package/dist/{useFormReset-BAEM0o25.js → useFormReset-NpLM2e3G.js} +1 -1
- package/dist/{useFormValidation-BNzOc2t9.js → useFormValidation-BWwmZQE2.js} +3 -3
- package/dist/{useLabel-D6FSp5_M.js → useLabel-C85N3Hzw.js} +2 -2
- package/dist/{useLabels-CraZ2Sej.js → useLabels-C_2wWraB.js} +1 -1
- package/dist/{useListState-C3dnPq2F.js → useListState-Z7FB_NzO.js} +1 -1
- package/dist/{useLocalizedStringFormatter-B73fhEA7.js → useLocalizedStringFormatter-BQ4TF72x.js} +1 -1
- package/dist/{useNumberField-CQP9-nH5.js → useNumberField-Bm6_BVl9.js} +10 -10
- package/dist/{useNumberFormatter-Cdctl6fg.js → useNumberFormatter-DlUVKkO7.js} +1 -1
- package/dist/{usePress-xTkcGUkt.js → usePress-rg_OQIGW.js} +15 -14
- package/dist/{useSingleSelectListState-BGXQSTy7.js → useSingleSelectListState-Cu3xtEJS.js} +2 -2
- package/dist/{useToggle-Dpw3WpSw.js → useToggle-DzlgBLAJ.js} +4 -4
- package/dist/{useToggleState-BSKwCUIW.js → useToggleState-DhSBQxkp.js} +1 -1
- package/dist/{utils-BSLBwuuO.js → utils-39D0mStj.js} +41 -93
- package/package.json +43 -41
- package/dist/GeistMonoVF.woff2 +0 -0
- package/dist/GeistVF.woff2 +0 -0
- package/dist/assets/fonts.css +0 -1
- package/dist/components/list-box/list-box.js +0 -157
- package/dist/fonts.js +0 -1
- package/dist/index-BYHhzLf-.js +0 -444
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -22,72 +22,74 @@
|
|
|
22
22
|
"./icons": "./dist/icons/index.js",
|
|
23
23
|
"./utilities": "./dist/utilities/index.js",
|
|
24
24
|
"./dist/assets/style.css": "./dist/assets/style.css",
|
|
25
|
-
"./dist/assets/
|
|
25
|
+
"./dist/assets/style-editor.css": "./dist/assets/style-editor.css",
|
|
26
26
|
"./dist/assets/wp-font-enhancements.css": "./dist/assets/wp-font-enhancements.css",
|
|
27
27
|
"./dist/assets/wp-ui-enhancements.css": "./dist/assets/wp-ui-enhancements.css",
|
|
28
28
|
"./styles": "./dist/assets/style.css",
|
|
29
|
-
"./fonts": "./dist/assets/fonts.css",
|
|
30
29
|
"./wp-font-enhancements": "./dist/assets/wp-font-enhancements.css",
|
|
31
30
|
"./wp-ui-enhancements": "./dist/assets/wp-ui-enhancements.css",
|
|
32
31
|
"./wp-overrides": "./dist/assets/wp.css"
|
|
33
32
|
},
|
|
34
33
|
"peerDependencies": {
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-dom": "^
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@dnd-kit/abstract": "^0.0.5",
|
|
40
|
-
"@dnd-kit/dom": "^0.0.5",
|
|
41
|
-
"@dnd-kit/helpers": "^0.0.5",
|
|
42
|
-
"@dnd-kit/react": "^0.0.5",
|
|
43
|
-
"react": "^19.0.0",
|
|
44
|
-
"react-dom": "^19.0.0",
|
|
45
|
-
"react-jsx-parser": "^2.2.2",
|
|
46
|
-
"react-movable": "^3.3.1",
|
|
47
|
-
"svg-to-jsx-string": "^0.1.1"
|
|
34
|
+
"react": "^18.3.1",
|
|
35
|
+
"react-dom": "^18.3.1"
|
|
48
36
|
},
|
|
49
37
|
"devDependencies": {
|
|
50
|
-
"@adobe/react-spectrum": "^3.
|
|
38
|
+
"@adobe/react-spectrum": "^3.39.0",
|
|
39
|
+
"@dnd-kit/abstract": "^0.0.6",
|
|
51
40
|
"@dnd-kit/core": "^6.3.1",
|
|
41
|
+
"@dnd-kit/dom": "^0.0.6",
|
|
42
|
+
"@dnd-kit/helpers": "^0.0.6",
|
|
52
43
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
44
|
+
"@dnd-kit/react": "^0.0.6",
|
|
53
45
|
"@dnd-kit/sortable": "^10.0.0",
|
|
54
46
|
"@dnd-kit/utilities": "^3.2.2",
|
|
55
|
-
"@eslint/compat": "^1.2.
|
|
56
|
-
"@react-stately/collections": "^3.12.
|
|
57
|
-
"@stylistic/eslint-plugin-js": "^
|
|
58
|
-
"@
|
|
59
|
-
"@types/react
|
|
47
|
+
"@eslint/compat": "^1.2.5",
|
|
48
|
+
"@react-stately/collections": "^3.12.1",
|
|
49
|
+
"@stylistic/eslint-plugin-js": "^3.0.0",
|
|
50
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
51
|
+
"@types/react": "^18.3.18",
|
|
52
|
+
"@types/react-dom": "^18.3.5",
|
|
60
53
|
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
61
|
-
"@wordpress/i18n": "^5.
|
|
54
|
+
"@wordpress/i18n": "^5.16.0",
|
|
62
55
|
"autoprefixer": "^10.4.20",
|
|
56
|
+
"class-variance-authority": "^0.7.1",
|
|
63
57
|
"clsx": "^2.1.1",
|
|
64
58
|
"css-gradient-parser": "^0.0.16",
|
|
65
|
-
"eslint": "^9.
|
|
66
|
-
"eslint-config-prettier": "^
|
|
67
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
68
|
-
"eslint-plugin-prettier": "^5.2.
|
|
69
|
-
"glob": "^11.0.
|
|
70
|
-
"globals": "^15.
|
|
59
|
+
"eslint": "^9.19.0",
|
|
60
|
+
"eslint-config-prettier": "^10.0.1",
|
|
61
|
+
"eslint-plugin-jsdoc": "^50.6.3",
|
|
62
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
63
|
+
"glob": "^11.0.1",
|
|
64
|
+
"globals": "^15.14.0",
|
|
71
65
|
"just-camel-case": "^6.2.0",
|
|
72
66
|
"just-debounce-it": "^3.2.0",
|
|
73
67
|
"just-has": "^2.3.0",
|
|
74
68
|
"just-is-empty": "^3.4.1",
|
|
75
69
|
"just-kebab-case": "^4.2.0",
|
|
76
70
|
"just-throttle": "^4.2.0",
|
|
77
|
-
"lightningcss": "^1.
|
|
78
|
-
"postcss": "^8.
|
|
71
|
+
"lightningcss": "^1.29.1",
|
|
72
|
+
"postcss": "^8.5.1",
|
|
79
73
|
"prettier": "^3.4.2",
|
|
80
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
81
|
-
"react
|
|
82
|
-
"react-aria
|
|
83
|
-
"react-
|
|
84
|
-
"react-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
74
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"react-aria": "^3.37.0",
|
|
77
|
+
"react-aria-components": "^1.6.0",
|
|
78
|
+
"react-dom": "^18.3.1",
|
|
79
|
+
"react-jsx-parser": "^2.2.2",
|
|
80
|
+
"react-movable": "^3.4.0",
|
|
81
|
+
"react-select": "^5.10.0",
|
|
82
|
+
"react-stately": "^3.35.0",
|
|
83
|
+
"svg-to-jsx-string": "^0.1.1",
|
|
84
|
+
"tailwindcss": "^4.0.0",
|
|
85
|
+
"tailwindcss-motion": "^1.0.1",
|
|
87
86
|
"tailwindcss-react-aria-components": "^1.2.0",
|
|
88
|
-
"
|
|
89
|
-
"vite": "^
|
|
90
|
-
|
|
87
|
+
"vite": "^6.0.11",
|
|
88
|
+
"vite-plugin-lib-inject-css": "^2.2.1"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@fontsource-variable/geist": "^5.0.1",
|
|
92
|
+
"@fontsource-variable/geist-mono": "^5.0.1"
|
|
91
93
|
},
|
|
92
94
|
"scripts": {
|
|
93
95
|
"dev": "vite",
|
package/dist/GeistMonoVF.woff2
DELETED
|
Binary file
|
package/dist/GeistVF.woff2
DELETED
|
Binary file
|
package/dist/assets/fonts.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Geist;src:url(../GeistVF.woff2)}@font-face{font-family:Geist Mono;src:url(../GeistMonoVF.woff2)}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-BMpo-Cem.js";
|
|
3
|
-
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
|
-
import { BaseControl } from "../base-control/base-control.js";
|
|
5
|
-
import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
|
|
6
|
-
import { RichLabel } from "../rich-label/rich-label.js";
|
|
7
|
-
/**
|
|
8
|
-
* A component that allows selecting a single or multiple options from a list.
|
|
9
|
-
*
|
|
10
|
-
* @component
|
|
11
|
-
* @param {Object} props - Component props.
|
|
12
|
-
* @param {JSX.Element} [props.icon] - Icon to display in the label.
|
|
13
|
-
* @param {string} [props.label] - Label to display.
|
|
14
|
-
* @param {string} [props.subtitle] - Subtitle to display.
|
|
15
|
-
* @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to display in the header.
|
|
16
|
-
* @param {string} [props.help] - Help text to display below the list.
|
|
17
|
-
* @param {boolean} [props.inline] - If `true`, the list is displayed inline with the label.
|
|
18
|
-
* @param {Object[]} props.options - The list of options to display.
|
|
19
|
-
* @param {string} props.options[].value - The value of the option. Should be unique!
|
|
20
|
-
* @param {string} [props.options[].label] - The label of the option.
|
|
21
|
-
* @param {JSX.Element} [props.options[].icon] - The icon of the option.
|
|
22
|
-
* @param {string} [props.options[].subtitle] - The subtitle of the option.
|
|
23
|
-
* @param {string} [props.options[].tooltip] - The tooltip text of the option.
|
|
24
|
-
* @param {boolean} [props.options[].disabled] - If `true`, the option is cannot be selected.
|
|
25
|
-
* @param {ListBoxSelectionMode} [props.selectionMode='single'] - The selection mode.
|
|
26
|
-
* @param {string} props.value - The currently selected value.
|
|
27
|
-
* @param {Function} props.onChange - Function to run when the selection changes.
|
|
28
|
-
* @param {boolean} [props.canDeselect=false] - If `true`, the selected value can be deselected (`null` is set in that case).
|
|
29
|
-
* @param {ListBoxOrientation} [props.orientation='horizontal'] - The orientation of the list. If all options have only an icon set, the orientation is forced to be horizontal.
|
|
30
|
-
* @param {string} [props.className] - Classes to pass to the list.
|
|
31
|
-
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
32
|
-
*
|
|
33
|
-
* @returns {JSX.Element} The ListBox component.
|
|
34
|
-
*
|
|
35
|
-
* @typedef {'single' | 'multiple'} ListBoxSelectionMode
|
|
36
|
-
* @typedef {'horizontal' | 'vertical' | 'horizontal-tiles'} ListBoxOrientation
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* <ListBox
|
|
40
|
-
* label='My list'
|
|
41
|
-
* options={[
|
|
42
|
-
* { value: 'option1', label: 'Option 1' },
|
|
43
|
-
* { value: 'option2', label: 'Option 2' },
|
|
44
|
-
* ]}
|
|
45
|
-
* value={selectedValue}
|
|
46
|
-
* onChange={setSelectedValue}
|
|
47
|
-
* />
|
|
48
|
-
*
|
|
49
|
-
* @preserve
|
|
50
|
-
*/
|
|
51
|
-
const ListBox = (props) => {
|
|
52
|
-
const {
|
|
53
|
-
icon,
|
|
54
|
-
label,
|
|
55
|
-
subtitle,
|
|
56
|
-
actions,
|
|
57
|
-
help,
|
|
58
|
-
inline,
|
|
59
|
-
options,
|
|
60
|
-
"aria-label": ariaLabel,
|
|
61
|
-
selectionMode = "single",
|
|
62
|
-
value,
|
|
63
|
-
onChange,
|
|
64
|
-
canDeselect = false,
|
|
65
|
-
orientation: setOrientation = "horizontal",
|
|
66
|
-
className,
|
|
67
|
-
hidden,
|
|
68
|
-
...rest
|
|
69
|
-
} = props;
|
|
70
|
-
if (hidden) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
const mappedOptions = options.map((option) => ({
|
|
74
|
-
...option,
|
|
75
|
-
id: option.id ?? option.value
|
|
76
|
-
}));
|
|
77
|
-
let orientation = setOrientation;
|
|
78
|
-
if (options.every(({ icon: icon2, label: label2, subtitle: subtitle2 }) => icon2 && !label2 && !subtitle2)) {
|
|
79
|
-
orientation = "horizontal";
|
|
80
|
-
}
|
|
81
|
-
let orientationPropValue = orientation;
|
|
82
|
-
if (orientation === "horizontal-tiles") {
|
|
83
|
-
orientationPropValue = "horizontal";
|
|
84
|
-
}
|
|
85
|
-
return /* @__PURE__ */ jsx(
|
|
86
|
-
BaseControl,
|
|
87
|
-
{
|
|
88
|
-
icon,
|
|
89
|
-
label,
|
|
90
|
-
subtitle,
|
|
91
|
-
actions,
|
|
92
|
-
inline,
|
|
93
|
-
help,
|
|
94
|
-
children: /* @__PURE__ */ jsx(
|
|
95
|
-
$eed445e0843c11d0$export$41f133550aa26f48,
|
|
96
|
-
{
|
|
97
|
-
selectionMode,
|
|
98
|
-
className: clsx(
|
|
99
|
-
"es-uic-rounded-lg es-uic-border es-uic-border-gray-300 es-uic-p-1 es-uic-text-sm es-uic-shadow-sm es-uic-transition",
|
|
100
|
-
"focus:es-uic-outline-none",
|
|
101
|
-
orientation === "horizontal" && "es-uic-flex es-uic-w-fit es-uic-max-w-full es-uic-gap-0.5",
|
|
102
|
-
orientation === "vertical" && "es-uic-flex es-uic-flex-col es-uic-gap-0.5",
|
|
103
|
-
orientation === "horizontal-tiles" && "es-uic-grid es-uic-min-h-20 es-uic-w-fit es-uic-max-w-full es-uic-auto-cols-[fit-content(6rem)] es-uic-grid-rows-[1fr,_minmax(auto,_0.5fr),_auto] es-uic-gap-x-0.5",
|
|
104
|
-
className
|
|
105
|
-
),
|
|
106
|
-
"aria-label": ariaLabel ?? __("Choose", "eightshift-ui-components"),
|
|
107
|
-
items: mappedOptions,
|
|
108
|
-
disallowEmptySelection: !canDeselect,
|
|
109
|
-
orientation: orientationPropValue,
|
|
110
|
-
selectedKeys: [value],
|
|
111
|
-
onSelectionChange: (key) => {
|
|
112
|
-
onChange((key == null ? void 0 : key.currentKey) ?? (key == null ? void 0 : key.anchorKey));
|
|
113
|
-
},
|
|
114
|
-
...rest,
|
|
115
|
-
children: (item) => {
|
|
116
|
-
const { label: label2, icon: icon2, subtitle: subtitle2, tooltip, disabled } = item;
|
|
117
|
-
return /* @__PURE__ */ jsx(
|
|
118
|
-
$eed445e0843c11d0$export$a11e76429ed99b4,
|
|
119
|
-
{
|
|
120
|
-
textValue: label2 ?? tooltip,
|
|
121
|
-
isDisabled: disabled,
|
|
122
|
-
className: ({ isDisabled, isSelected }) => {
|
|
123
|
-
return clsx(
|
|
124
|
-
"es-uic-flex es-uic-min-h-9 es-uic-select-none es-uic-rounded-md es-uic-border es-uic-transition",
|
|
125
|
-
"focus:es-uic-outline-none focus-visible:es-uic-outline-none focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500 focus-visible:es-uic-ring-opacity-50",
|
|
126
|
-
isSelected && !disabled && "es-uic-border es-uic-border-teal-600 es-uic-bg-teal-600 es-uic-text-white es-uic-shadow-md es-uic-shadow-teal-500/25 after:es-uic-opacity-45",
|
|
127
|
-
isSelected && !disabled && 'es-uic-relative es-uic-isolate after:es-uic-absolute after:es-uic-inset-0 after:-es-uic-z-10 after:es-uic-rounded-[0.3125rem] after:es-uic-bg-gradient-to-br after:es-uic-from-teal-100/40 after:es-uic-via-transparent after:es-uic-to-teal-200/50 after:es-uic-opacity-0 after:es-uic-transition-opacity after:es-uic-content-[""]',
|
|
128
|
-
!isSelected && !disabled && "es-uic-border-transparent hover:es-uic-bg-gray-100",
|
|
129
|
-
isDisabled && "es-uic-border-transparent es-uic-opacity-30 es-uic-grayscale",
|
|
130
|
-
orientation !== "horizontal-tiles" && "es-uic-px-2 es-uic-py-1.5",
|
|
131
|
-
icon2 && !label2 && !subtitle2 && "es-uic-size-9 !es-uic-p-1.5",
|
|
132
|
-
orientation === "horizontal-tiles" && "es-uic-row-start-1 es-uic-row-end-4 es-uic-grid es-uic-min-w-18 es-uic-grid-rows-subgrid es-uic-items-center es-uic-justify-items-center es-uic-p-1.5 es-uic-text-center es-uic-leading-tight",
|
|
133
|
-
orientation === "horizontal-tiles" && subtitle2 && "[&_svg]:es-uic-mb-1"
|
|
134
|
-
);
|
|
135
|
-
},
|
|
136
|
-
children: /* @__PURE__ */ jsx(
|
|
137
|
-
RichLabel,
|
|
138
|
-
{
|
|
139
|
-
icon: icon2,
|
|
140
|
-
label: label2,
|
|
141
|
-
subtitle: subtitle2,
|
|
142
|
-
className: clsx(orientation === "horizontal" && "leading-none"),
|
|
143
|
-
contentsOnly: orientation === "horizontal-tiles",
|
|
144
|
-
noColor: true
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
export {
|
|
156
|
-
ListBox
|
|
157
|
-
};
|
package/dist/fonts.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './assets/fonts.css';
|