@konstructio/ui 0.1.2-alpha.103 → 0.1.2-alpha.105
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 +15 -21
- package/dist/{AdditionalOptions-Cj29eeMF.js → AdditionalOptions-D0BAS2HG.js} +1 -1
- package/dist/{AlertDialogTrigger-CgcsW_ta.js → AlertDialogTrigger-BGo_acd5.js} +3 -3
- package/dist/{Checkbox-DzAx7n67.js → Checkbox-B_ngk9Dj.js} +56 -56
- package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
- package/dist/{CommandInput-BnvRMfLI.js → CommandInput-BLq69pOT.js} +1 -1
- package/dist/Counter-BV680M5r.js +195 -0
- package/dist/DropdownButton-DfNojmCW.js +493 -0
- package/dist/{FlagSelectorList-BoYG-_It.js → FlagSelectorList-CkTR3j6O.js} +222 -218
- package/dist/{HamburgerTrigger-1vOTrm8-.js → HamburgerTrigger-DRylBL2d.js} +1 -1
- package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
- package/dist/{Input-CW0VwW2T.js → Input-Cf44DzfE.js} +18 -18
- package/dist/{Loading-fD0Xiyeq.js → Loading-DUh9PMJN.js} +3 -1
- package/dist/Modal-Dyn088X7.js +81 -0
- package/dist/Sidebar.css +1 -1
- package/dist/{Spinner-Lw9mZYhg.js → Spinner-CUwE2bLm.js} +1 -1
- package/dist/{Switch-WBRr8uOJ.js → Switch-aPhL5rNG.js} +4 -4
- package/dist/{Toast-ByH-l4XK.js → Toast-3NEz7LLa.js} +149 -148
- package/dist/Wrapper-CVJSuYWx.js +114 -0
- package/dist/{Wrapper-XeeD3av7.js → Wrapper-DP6Sxngx.js} +185 -180
- package/dist/Wrapper-R8fik3ah.js +182 -0
- package/dist/components/Alert/Alert.js +21 -21
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
- package/dist/components/Autocomplete/components/List/List.js +22 -26
- package/dist/components/Autocomplete/components/List/List.variants.js +7 -19
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +39 -38
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -1
- package/dist/components/Badge/Badge.js +37 -36
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +6 -6
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Command/contexts/Command.provider.js +16 -12
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +42 -50
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +61 -79
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +89 -122
- package/dist/components/Datepicker/DatePicker.js +13 -13
- package/dist/components/Drawer/Drawer.js +54 -49
- package/dist/components/Drawer/hooks/useDrawer.js +39 -44
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +23 -22
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -56
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -43
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +36 -49
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +31 -45
- package/dist/components/Filter/contexts/filter.provider.js +15 -10
- package/dist/components/Filter/events/index.js +26 -5
- package/dist/components/Filter/hooks/index.js +4 -0
- package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +26 -19
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +14 -13
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +6 -4
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +16 -16
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PieChart/PieChart.js +33 -32
- package/dist/components/ProgressBar/ProgressBar.js +26 -20
- package/dist/components/Radio/Radio.js +28 -30
- package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +24 -24
- package/dist/components/Range/Range.js +15 -13
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Select/components/ListItem/ListItem.js +30 -30
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Select/hooks/useSelect.js +28 -39
- package/dist/components/Sidebar/Sidebar.js +21 -18
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +20 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +41 -37
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -5
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +75 -68
- package/dist/components/Sidebar/components/index.js +17 -15
- package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
- package/dist/components/Slider/Slider.js +17 -15
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.variants.js +6 -6
- package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +17 -17
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +12 -11
- package/dist/components/TimePicker/components/HoursList/HoursList.js +34 -38
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +25 -29
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +33 -33
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +91 -99
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +29 -30
- package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.variants.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -29
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +0 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +5 -5
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -53
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
- package/dist/components/VirtualizedTable/events/index.js +10 -25
- package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
- package/dist/components/VirtualizedTable/events/row/row.js +22 -0
- package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
- package/dist/components/VirtualizedTable/utils/index.js +4 -2
- package/dist/components/index.js +95 -89
- package/dist/{components-BIHlj4yH.js → components-Cf345jTv.js} +45 -41
- package/dist/constants-CxJJRVK3.js +31 -0
- package/dist/{dist-DISvWx7U.js → dist-BUocnzkM.js} +1 -1
- package/dist/{dist-Dse3gSmZ.js → dist-BZNE2Tnx.js} +4 -4
- package/dist/{dist-2bGlmy8N2.js → dist-BaPW7qXd2.js} +27 -26
- package/dist/dist-BdobXn93.js +192 -0
- package/dist/dist-BlPTJNIm.js +118 -0
- package/dist/{dist-BiJrNvNo.js → dist-C3YVLapk.js} +29 -28
- package/dist/dist-C4j75TwZ.js +20 -0
- package/dist/dist-CCdbu9GU.js +46 -0
- package/dist/dist-CzKqHuqJ2.js +427 -0
- package/dist/dist-D-yS0HN8.js +228 -0
- package/dist/dist-D5XYRjmR.js +15 -0
- package/dist/dist-DDck_2lb.js +451 -0
- package/dist/{dist-C2aTw0m62.js → dist-DFCz63oC2.js} +5 -5
- package/dist/dist-DGOjiAnB2.js +14 -0
- package/dist/dist-DKryKPmP.js +193 -0
- package/dist/{dist-CTvBzxW8.js → dist-DX0sBG3Q.js} +1 -1
- package/dist/dist-DYIabsrY.js +17 -0
- package/dist/dist-pWlMx4Fi2.js +36 -0
- package/dist/{dist-CVDFmWf2.js → dist-tGUUcv8n.js} +17 -16
- package/dist/dist-xCbHbMLA.js +116 -0
- package/dist/{es2015-BWf6xQHm.js → es2015-CoHq2g4y.js} +95 -86
- package/dist/es2015-DigR3dar.js +795 -0
- package/dist/events.types-BG1Uh8i6.js +6 -0
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useClickOutside.js +14 -0
- package/dist/index.js +146 -138
- package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +5 -6
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +2 -0
- package/dist/lib/components/Filter/Filter.types.d.ts +2 -0
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/Filter/events/index.d.ts +10 -2
- package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
- package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +2 -0
- package/dist/lib/components/Select/hooks/useSelect.d.ts +2 -3
- package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +6 -5
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
- package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
- package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
- package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useClickOutside.d.ts +2 -0
- package/dist/package.json +24 -24
- package/dist/styles.css +1 -1
- package/dist/{table.provider-2sAkE7z_.js → table.provider-B0BafHuU.js} +395 -381
- package/dist/ui/civo-theme.css +4 -0
- package/dist/ui/kubefirst-theme.css +4 -0
- package/package.json +24 -24
- package/dist/Counter-CY0xGnVM.js +0 -208
- package/dist/DropdownButton-DnlwdPmb.js +0 -92
- package/dist/Modal-Bfzggwlr.js +0 -76
- package/dist/Wrapper-ClJ_Mham.js +0 -110
- package/dist/Wrapper-DNEn4fef.js +0 -161
- package/dist/constants-DXrF9vV4.js +0 -31
- package/dist/dist-B-Aoze_D.js +0 -10
- package/dist/dist-BuFiu480.js +0 -13
- package/dist/dist-C2s4VX-42.js +0 -31
- package/dist/dist-CT6d9xe7.js +0 -441
- package/dist/dist-CVy-ulDZ.js +0 -42
- package/dist/dist-D4FePjTS.js +0 -194
- package/dist/dist-Db6UeFo4.js +0 -291
- package/dist/dist-DqKFpce5.js +0 -98
- package/dist/dist-j7FOUrFU.js +0 -206
- package/dist/dist-l-aDnQZC.js +0 -62
- package/dist/dist-ppXKUlVt.js +0 -10
- /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
package/README.md
CHANGED
|
@@ -28,39 +28,33 @@ npm install @konstructio/ui
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
### Step 2: Install Tailwind CSS
|
|
31
|
+
### Step 2: Install Tailwind CSS v4
|
|
32
32
|
|
|
33
|
-
If you don't already have
|
|
33
|
+
Tailwind CSS v4 is a peer dependency. If you don't already have it installed, follow the official [Tailwind CSS installation guide](https://tailwindcss.com/docs/installation).
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
### Step 3: Import
|
|
37
|
+
### Step 3: Import the theme styles
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
In your global CSS file, import Tailwind and the library theme, plus the brand theme you need:
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
import
|
|
45
|
-
|
|
46
|
-
const config: Config = {
|
|
47
|
-
plugins: [konstructPlugin],
|
|
48
|
-
};
|
|
41
|
+
```css
|
|
42
|
+
@import 'tailwindcss';
|
|
43
|
+
@import '@konstructio/ui/ui/theme.css';
|
|
44
|
+
@import '@konstructio/ui/ui/utilities.css';
|
|
45
|
+
@import '@konstructio/ui/ui/civo-theme.css'; /* or kubefirst-theme.css */
|
|
49
46
|
```
|
|
50
47
|
|
|
48
|
+
Component styles are bundled with the components and injected automatically — no extra CSS import is needed.
|
|
49
|
+
|
|
51
50
|
---
|
|
52
51
|
|
|
53
|
-
### Step 4: Include `@konstructio/ui` in Tailwind
|
|
52
|
+
### Step 4: Include `@konstructio/ui` in Tailwind's source detection
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
So Tailwind generates the utility classes used by the components, add the package to your global CSS with `@source` (the path is relative to your CSS file):
|
|
56
55
|
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
content: [
|
|
60
|
-
// Other content paths
|
|
61
|
-
'./node_modules/@konstructio/ui/dist/**/*.{js,ts,jsx,tsx}',
|
|
62
|
-
],
|
|
63
|
-
};
|
|
56
|
+
```css
|
|
57
|
+
@source '../node_modules/@konstructio/ui/dist';
|
|
64
58
|
```
|
|
65
59
|
|
|
66
60
|
## Final Steps
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as i } from "./dist-
|
|
1
|
+
import { t as i } from "./dist-xCbHbMLA.js";
|
|
2
2
|
import { t as p } from "./utils-Cx-WzRZF.js";
|
|
3
3
|
import { useSelectContext as s } from "./components/Select/contexts/select.hook.js";
|
|
4
4
|
import { listGroupLabelVariants as m } from "./components/Select/components/List/List.variants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as A } from "./dist-
|
|
1
|
+
import { a as A } from "./dist-xCbHbMLA.js";
|
|
2
2
|
import { t as d } from "./utils-Cx-WzRZF.js";
|
|
3
|
-
import { i as m, r as _ } from "./dist-
|
|
4
|
-
import { a as C, c as P, i as R, l as u, n as v, o as S, r as T, s as O, t as w } from "./dist-
|
|
3
|
+
import { i as m, r as _ } from "./dist-D-yS0HN8.js";
|
|
4
|
+
import { a as C, c as P, i as R, l as u, n as v, o as S, r as T, s as O, t as w } from "./dist-C3YVLapk.js";
|
|
5
5
|
import { Button as y } from "./components/Button/Button.js";
|
|
6
6
|
import * as n from "react";
|
|
7
7
|
import { forwardRef as h } from "react";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { o as X } from "./rolldown-runtime-Ck3dxwZt.js";
|
|
2
2
|
import { t as J } from "./prop-types-CfEYxTbR.js";
|
|
3
|
-
import { a as U } from "./dist-
|
|
4
|
-
import { t as N } from "./dist-
|
|
3
|
+
import { a as U } from "./dist-xCbHbMLA.js";
|
|
4
|
+
import { t as N } from "./dist-CCdbu9GU.js";
|
|
5
5
|
import { t as O } from "./utils-Cx-WzRZF.js";
|
|
6
|
-
import { i as Q, r as S, t as Y } from "./dist-
|
|
7
|
-
import { t as Z } from "./dist-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { i as Q, r as S, t as Y } from "./dist-D-yS0HN8.js";
|
|
7
|
+
import { t as Z } from "./dist-BUocnzkM.js";
|
|
8
|
+
import { useToggle as ee } from "./hooks/useToggle.js";
|
|
9
|
+
import { t as te } from "./dist-pWlMx4Fi2.js";
|
|
10
10
|
import { checkboxVariants as re, labelVariants as oe } from "./components/Checkbox/Checkbox.variants.js";
|
|
11
11
|
import * as u from "react";
|
|
12
|
-
import q, { forwardRef as A,
|
|
13
|
-
import { Fragment as
|
|
12
|
+
import q, { forwardRef as A, useId as ne } from "react";
|
|
13
|
+
import { Fragment as ce, jsx as f, jsxs as $ } from "react/jsx-runtime";
|
|
14
14
|
var w = /* @__PURE__ */ X(J());
|
|
15
15
|
function j() {
|
|
16
16
|
return j = Object.assign || function(e) {
|
|
@@ -21,9 +21,9 @@ function j() {
|
|
|
21
21
|
return e;
|
|
22
22
|
}, j.apply(this, arguments);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ae(e, o) {
|
|
25
25
|
if (e == null) return {};
|
|
26
|
-
var n =
|
|
26
|
+
var n = se(e, o), t, r;
|
|
27
27
|
if (Object.getOwnPropertySymbols) {
|
|
28
28
|
var c = Object.getOwnPropertySymbols(e);
|
|
29
29
|
for (r = 0; r < c.length; r++)
|
|
@@ -31,7 +31,7 @@ function se(e, o) {
|
|
|
31
31
|
}
|
|
32
32
|
return n;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function se(e, o) {
|
|
35
35
|
if (e == null) return {};
|
|
36
36
|
var n = {}, t = Object.keys(e), r, c;
|
|
37
37
|
for (c = 0; c < t.length; c++)
|
|
@@ -39,7 +39,7 @@ function ie(e, o) {
|
|
|
39
39
|
return n;
|
|
40
40
|
}
|
|
41
41
|
var B = A(function(e, o) {
|
|
42
|
-
var n = e.color, t = n === void 0 ? "currentColor" : n, r = e.size, c = r === void 0 ? 24 : r, a =
|
|
42
|
+
var n = e.color, t = n === void 0 ? "currentColor" : n, r = e.size, c = r === void 0 ? 24 : r, a = ae(e, ["color", "size"]);
|
|
43
43
|
return /* @__PURE__ */ q.createElement("svg", j({
|
|
44
44
|
ref: o,
|
|
45
45
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -58,18 +58,18 @@ B.propTypes = {
|
|
|
58
58
|
size: w.default.oneOfType([w.default.string, w.default.number])
|
|
59
59
|
};
|
|
60
60
|
B.displayName = "Check";
|
|
61
|
-
var
|
|
61
|
+
var ie = Object.defineProperty, x = (e, o) => ie(e, "name", {
|
|
62
62
|
value: o,
|
|
63
63
|
configurable: !0
|
|
64
|
-
}), T = "Checkbox", [
|
|
64
|
+
}), T = "Checkbox", [ue, je] = Q(T), [le, z] = ue(T);
|
|
65
65
|
function D(e) {
|
|
66
|
-
const { __scopeCheckbox: o, checked: n, children: t, defaultChecked: r, disabled: c, form: a, name: l, onCheckedChange: s, required: d, value: C = "on", internal_do_not_use_render: h } = e, [
|
|
66
|
+
const { __scopeCheckbox: o, checked: n, children: t, defaultChecked: r, disabled: c, form: a, name: l, onCheckedChange: s, required: d, value: C = "on", internal_do_not_use_render: h } = e, [p, b] = Y({
|
|
67
67
|
prop: n,
|
|
68
68
|
defaultProp: r ?? !1,
|
|
69
69
|
onChange: s,
|
|
70
70
|
caller: T
|
|
71
|
-
}), [v, m] = u.useState(null), [
|
|
72
|
-
checked:
|
|
71
|
+
}), [v, m] = u.useState(null), [y, R] = u.useState(null), _ = u.useRef(!1), [i, k] = u.useReducer((I) => I + 1, 0), P = v ? !!a || !!v.closest("form") : !0, E = {
|
|
72
|
+
checked: p,
|
|
73
73
|
disabled: c,
|
|
74
74
|
setChecked: b,
|
|
75
75
|
control: v,
|
|
@@ -77,31 +77,31 @@ function D(e) {
|
|
|
77
77
|
name: l,
|
|
78
78
|
form: a,
|
|
79
79
|
value: C,
|
|
80
|
-
hasConsumerStoppedPropagationRef:
|
|
80
|
+
hasConsumerStoppedPropagationRef: _,
|
|
81
81
|
userInteractionCount: i,
|
|
82
82
|
onUserInteraction: k,
|
|
83
83
|
required: d,
|
|
84
84
|
defaultChecked: g(r) ? !1 : r,
|
|
85
85
|
isFormControl: P,
|
|
86
|
-
bubbleInput:
|
|
86
|
+
bubbleInput: y,
|
|
87
87
|
setBubbleInput: R
|
|
88
88
|
};
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ f(le, {
|
|
90
90
|
scope: o,
|
|
91
91
|
...E,
|
|
92
92
|
children: H(h) ? h(E) : t
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
x(D, "CheckboxProvider");
|
|
96
|
-
var
|
|
97
|
-
const { control: a, value: l, disabled: s, checked: d, required: C, setControl: h, setChecked:
|
|
96
|
+
var de = "CheckboxTrigger", fe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function({ __scopeCheckbox: o, onKeyDown: n, onClick: t, ...r }, c) {
|
|
97
|
+
const { control: a, value: l, disabled: s, checked: d, required: C, setControl: h, setChecked: p, hasConsumerStoppedPropagationRef: b, onUserInteraction: v, isFormControl: m, bubbleInput: y } = z(de, o), R = U(c, h), _ = u.useRef(d);
|
|
98
98
|
return u.useEffect(() => {
|
|
99
99
|
const i = a?.form;
|
|
100
100
|
if (i) {
|
|
101
|
-
const k = /* @__PURE__ */ x(() =>
|
|
101
|
+
const k = /* @__PURE__ */ x(() => p(_.current), "reset");
|
|
102
102
|
return i.addEventListener("reset", k), () => i.removeEventListener("reset", k);
|
|
103
103
|
}
|
|
104
|
-
}, [a,
|
|
104
|
+
}, [a, p]), /* @__PURE__ */ f(N.button, {
|
|
105
105
|
type: "button",
|
|
106
106
|
role: "checkbox",
|
|
107
107
|
"aria-checked": g(d) ? "mixed" : d,
|
|
@@ -116,12 +116,12 @@ var fe = "CheckboxTrigger", pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(
|
|
|
116
116
|
i.key === "Enter" && i.preventDefault();
|
|
117
117
|
}),
|
|
118
118
|
onClick: S(t, (i) => {
|
|
119
|
-
v(),
|
|
119
|
+
v(), p((k) => g(k) ? !0 : !k), y && m && (b.current = i.isPropagationStopped(), b.current || i.stopPropagation());
|
|
120
120
|
})
|
|
121
121
|
});
|
|
122
|
-
}, "CheckboxTrigger")),
|
|
123
|
-
const { __scopeCheckbox: t, name: r, checked: c, defaultChecked: a, required: l, disabled: s, value: d, onCheckedChange: C, form: h, ...
|
|
124
|
-
return /* @__PURE__ */
|
|
122
|
+
}, "CheckboxTrigger")), pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function(o, n) {
|
|
123
|
+
const { __scopeCheckbox: t, name: r, checked: c, defaultChecked: a, required: l, disabled: s, value: d, onCheckedChange: C, form: h, ...p } = o;
|
|
124
|
+
return /* @__PURE__ */ f(D, {
|
|
125
125
|
__scopeCheckbox: t,
|
|
126
126
|
checked: c,
|
|
127
127
|
defaultChecked: a,
|
|
@@ -131,17 +131,17 @@ var fe = "CheckboxTrigger", pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(
|
|
|
131
131
|
name: r,
|
|
132
132
|
form: h,
|
|
133
133
|
value: d,
|
|
134
|
-
internal_do_not_use_render: ({ isFormControl: b }) => /* @__PURE__ */ $(
|
|
135
|
-
...
|
|
134
|
+
internal_do_not_use_render: ({ isFormControl: b }) => /* @__PURE__ */ $(ce, { children: [/* @__PURE__ */ f(fe, {
|
|
135
|
+
...p,
|
|
136
136
|
ref: n,
|
|
137
137
|
__scopeCheckbox: t
|
|
138
|
-
}), b && /* @__PURE__ */
|
|
138
|
+
}), b && /* @__PURE__ */ f(ke, { __scopeCheckbox: t })] })
|
|
139
139
|
});
|
|
140
|
-
}, "Checkbox")),
|
|
141
|
-
const { __scopeCheckbox: t, forceMount: r, ...c } = o, a = z(
|
|
142
|
-
return /* @__PURE__ */
|
|
140
|
+
}, "Checkbox")), he = "CheckboxIndicator", be = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function(o, n) {
|
|
141
|
+
const { __scopeCheckbox: t, forceMount: r, ...c } = o, a = z(he, t);
|
|
142
|
+
return /* @__PURE__ */ f(Z, {
|
|
143
143
|
present: r || g(a.checked) || a.checked === !0,
|
|
144
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ f(N.span, {
|
|
145
145
|
"data-state": F(a.checked),
|
|
146
146
|
"data-disabled": a.disabled ? "" : void 0,
|
|
147
147
|
...c,
|
|
@@ -152,11 +152,11 @@ var fe = "CheckboxTrigger", pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(
|
|
|
152
152
|
}
|
|
153
153
|
})
|
|
154
154
|
});
|
|
155
|
-
}, "CheckboxIndicator")),
|
|
156
|
-
const { control: c, hasConsumerStoppedPropagationRef: a, userInteractionCount: l, checked: s, defaultChecked: d, required: C, disabled: h, name:
|
|
155
|
+
}, "CheckboxIndicator")), me = "CheckboxBubbleInput", ke = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function({ __scopeCheckbox: o, onClick: n, ...t }, r) {
|
|
156
|
+
const { control: c, hasConsumerStoppedPropagationRef: a, userInteractionCount: l, checked: s, defaultChecked: d, required: C, disabled: h, name: p, value: b, form: v, bubbleInput: m, setBubbleInput: y } = z(me, o), R = U(r, y), _ = te(c), i = u.useRef(!1), k = u.useRef(s), P = u.useRef(l);
|
|
157
157
|
u.useEffect(() => {
|
|
158
|
-
const
|
|
159
|
-
if (!
|
|
158
|
+
const I = m;
|
|
159
|
+
if (!I) return;
|
|
160
160
|
const K = window.HTMLInputElement.prototype, L = Object.getOwnPropertyDescriptor(K, "checked").set, M = l !== P.current;
|
|
161
161
|
P.current = l;
|
|
162
162
|
const W = k.current !== s;
|
|
@@ -165,7 +165,7 @@ var fe = "CheckboxTrigger", pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(
|
|
|
165
165
|
if (W && L) {
|
|
166
166
|
i.current = !M;
|
|
167
167
|
const V = new Event("click", { bubbles: G });
|
|
168
|
-
|
|
168
|
+
I.indeterminate = g(s), L.call(I, g(s) ? !1 : s), I.dispatchEvent(V), i.current = !1;
|
|
169
169
|
}
|
|
170
170
|
}, [
|
|
171
171
|
m,
|
|
@@ -174,24 +174,24 @@ var fe = "CheckboxTrigger", pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(
|
|
|
174
174
|
l
|
|
175
175
|
]);
|
|
176
176
|
const E = u.useRef(g(s) ? !1 : s);
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ f(N.input, {
|
|
178
178
|
type: "checkbox",
|
|
179
179
|
"aria-hidden": !0,
|
|
180
180
|
defaultChecked: d ?? E.current,
|
|
181
181
|
required: C,
|
|
182
182
|
disabled: h,
|
|
183
|
-
name:
|
|
183
|
+
name: p,
|
|
184
184
|
value: b,
|
|
185
185
|
form: v,
|
|
186
186
|
...t,
|
|
187
187
|
tabIndex: -1,
|
|
188
188
|
ref: R,
|
|
189
|
-
onClick: S(n, (
|
|
190
|
-
i.current &&
|
|
189
|
+
onClick: S(n, (I) => {
|
|
190
|
+
i.current && I.stopPropagation();
|
|
191
191
|
}),
|
|
192
192
|
style: {
|
|
193
193
|
...t.style,
|
|
194
|
-
...
|
|
194
|
+
..._,
|
|
195
195
|
position: "absolute",
|
|
196
196
|
pointerEvents: "none",
|
|
197
197
|
opacity: 0,
|
|
@@ -212,14 +212,14 @@ function F(e) {
|
|
|
212
212
|
return g(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
213
213
|
}
|
|
214
214
|
x(F, "getState");
|
|
215
|
-
var
|
|
216
|
-
const [m,
|
|
217
|
-
|
|
218
|
-
}
|
|
215
|
+
var Ce = A(({ ariaLabelledBy: e, className: o, defaultChecked: n, disabled: t, id: r, label: c, labelClassName: a, labelWrapperClassName: l, name: s, theme: d, title: C, variant: h, onChange: p, ...b }, v) => {
|
|
216
|
+
const [m, y] = ee(n ?? !1), R = ne(), _ = (i) => {
|
|
217
|
+
y(i), p?.(i);
|
|
218
|
+
};
|
|
219
219
|
return /* @__PURE__ */ $("div", {
|
|
220
220
|
className: O("flex items-center gap-4", l),
|
|
221
221
|
"data-theme": d,
|
|
222
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
223
223
|
id: r ?? R,
|
|
224
224
|
checked: m,
|
|
225
225
|
ref: v,
|
|
@@ -232,18 +232,18 @@ var ve = A(({ ariaLabelledBy: e, className: o, defaultChecked: n, disabled: t, i
|
|
|
232
232
|
variant: h,
|
|
233
233
|
checked: m
|
|
234
234
|
})),
|
|
235
|
-
onCheckedChange:
|
|
235
|
+
onCheckedChange: _,
|
|
236
236
|
...b,
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
}), c ? /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ f(be, { children: /* @__PURE__ */ f(B, { className: "w-4 h-4 stroke-2" }) })
|
|
238
|
+
}), c ? /* @__PURE__ */ f("label", {
|
|
239
239
|
htmlFor: s ?? r,
|
|
240
240
|
className: O(oe({ className: a }), { "cursor-not-allowed": t }),
|
|
241
|
-
onClick: () => !t &&
|
|
241
|
+
onClick: () => !t && _(!m),
|
|
242
242
|
children: c
|
|
243
243
|
}) : null]
|
|
244
244
|
});
|
|
245
245
|
});
|
|
246
|
-
|
|
246
|
+
Ce.displayName = "KonstructCheckbox";
|
|
247
247
|
export {
|
|
248
|
-
|
|
248
|
+
Ce as t
|
|
249
249
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as re } from "react";
|
|
3
3
|
var y = function() {
|
|
4
4
|
return y = Object.assign || function(t) {
|
|
5
5
|
for (var r, n = 1, a = arguments.length; n < a; n++) {
|
|
@@ -16,17 +16,17 @@ function Q(e, t) {
|
|
|
16
16
|
for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++) t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (r[n[a]] = e[n[a]]);
|
|
17
17
|
return r;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function ae(e, t, r) {
|
|
20
20
|
if (r || arguments.length === 2)
|
|
21
21
|
for (var n = 0, a = t.length, c; n < a; n++) (c || !(n in t)) && (c || (c = Array.prototype.slice.call(t, 0, n)), c[n] = t[n]);
|
|
22
22
|
return e.concat(c || Array.prototype.slice.call(t));
|
|
23
23
|
}
|
|
24
|
-
var B = "right-scroll-bar-position", A = "width-before-scroll-bar",
|
|
24
|
+
var B = "right-scroll-bar-position", A = "width-before-scroll-bar", oe = "with-scroll-bars-hidden", ce = "--removed-body-scroll-bar-size";
|
|
25
25
|
function W(e, t) {
|
|
26
26
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
var r =
|
|
28
|
+
function ie(e, t) {
|
|
29
|
+
var r = re(function() {
|
|
30
30
|
return {
|
|
31
31
|
value: e,
|
|
32
32
|
callback: t,
|
|
@@ -43,14 +43,14 @@ function oe(e, t) {
|
|
|
43
43
|
})[0];
|
|
44
44
|
return r.callback = t, r.facade;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
var r =
|
|
46
|
+
var ue = typeof window < "u" ? i.useLayoutEffect : i.useEffect, F = /* @__PURE__ */ new WeakMap();
|
|
47
|
+
function le(e, t) {
|
|
48
|
+
var r = ie(t || null, function(n) {
|
|
49
49
|
return e.forEach(function(a) {
|
|
50
50
|
return W(a, n);
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
-
return
|
|
53
|
+
return ue(function() {
|
|
54
54
|
var n = F.get(r);
|
|
55
55
|
if (n) {
|
|
56
56
|
var a = new Set(n), c = new Set(e), f = r.current;
|
|
@@ -63,11 +63,11 @@ function ie(e, t) {
|
|
|
63
63
|
F.set(r, e);
|
|
64
64
|
}, [e]), r;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function U(e) {
|
|
67
67
|
return e;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
t === void 0 && (t =
|
|
69
|
+
function K(e, t) {
|
|
70
|
+
t === void 0 && (t = U);
|
|
71
71
|
var r = [], n = !1;
|
|
72
72
|
return {
|
|
73
73
|
read: function() {
|
|
@@ -120,26 +120,29 @@ function le(e, t) {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
+
function je(e, t) {
|
|
124
|
+
return t === void 0 && (t = U), K(e, t);
|
|
125
|
+
}
|
|
123
126
|
function fe(e) {
|
|
124
127
|
e === void 0 && (e = {});
|
|
125
|
-
var t =
|
|
128
|
+
var t = K(null);
|
|
126
129
|
return t.options = y({
|
|
127
130
|
async: !0,
|
|
128
131
|
ssr: !1
|
|
129
132
|
}, e), t;
|
|
130
133
|
}
|
|
131
|
-
var
|
|
134
|
+
var $ = function(e) {
|
|
132
135
|
var t = e.sideCar, r = Q(e, ["sideCar"]);
|
|
133
136
|
if (!t) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
134
137
|
var n = t.read();
|
|
135
138
|
if (!n) throw new Error("Sidecar medium not found");
|
|
136
139
|
return i.createElement(n, y({}, r));
|
|
137
140
|
};
|
|
138
|
-
|
|
141
|
+
$.isSideCarExport = !0;
|
|
139
142
|
function se(e, t) {
|
|
140
|
-
return e.useMedium(t),
|
|
143
|
+
return e.useMedium(t), $;
|
|
141
144
|
}
|
|
142
|
-
var
|
|
145
|
+
var q = fe(), D = function() {
|
|
143
146
|
}, I = i.forwardRef(function(e, t) {
|
|
144
147
|
var r = i.useRef(null), n = i.useState({
|
|
145
148
|
onScrollCapture: D,
|
|
@@ -159,9 +162,9 @@ var K = fe(), D = function() {
|
|
|
159
162
|
"allowPinchZoom",
|
|
160
163
|
"as",
|
|
161
164
|
"gapMode"
|
|
162
|
-
]), k = C, S =
|
|
165
|
+
]), k = C, S = le([r, t]), w = y(y({}, d), a);
|
|
163
166
|
return i.createElement(i.Fragment, null, p && i.createElement(k, {
|
|
164
|
-
sideCar:
|
|
167
|
+
sideCar: q,
|
|
165
168
|
removeScrollBar: s,
|
|
166
169
|
shards: b,
|
|
167
170
|
noRelative: E,
|
|
@@ -221,7 +224,7 @@ var ge = function() {
|
|
|
221
224
|
};
|
|
222
225
|
}, [t && r]);
|
|
223
226
|
};
|
|
224
|
-
},
|
|
227
|
+
}, J = function() {
|
|
225
228
|
var e = ye(), t = function(r) {
|
|
226
229
|
var n = r.styles, a = r.dynamic;
|
|
227
230
|
return e(n, a), null;
|
|
@@ -250,14 +253,14 @@ var ge = function() {
|
|
|
250
253
|
right: t[2],
|
|
251
254
|
gap: Math.max(0, n - r + t[2] - t[0])
|
|
252
255
|
};
|
|
253
|
-
}, pe =
|
|
256
|
+
}, pe = J(), M = "data-scroll-locked", Ce = function(e, t, r, n) {
|
|
254
257
|
var a = e.left, c = e.top, f = e.right, u = e.gap;
|
|
255
258
|
return r === void 0 && (r = "margin"), `
|
|
256
|
-
.`.concat(
|
|
259
|
+
.`.concat(oe, ` {
|
|
257
260
|
overflow: hidden `).concat(n, `;
|
|
258
261
|
padding-right: `).concat(u, "px ").concat(n, `;
|
|
259
262
|
}
|
|
260
|
-
body[`).concat(
|
|
263
|
+
body[`).concat(M, `] {
|
|
261
264
|
overflow: hidden `).concat(n, `;
|
|
262
265
|
overscroll-behavior: contain;
|
|
263
266
|
`).concat([
|
|
@@ -290,8 +293,8 @@ var ge = function() {
|
|
|
290
293
|
margin-right: 0 `).concat(n, `;
|
|
291
294
|
}
|
|
292
295
|
|
|
293
|
-
body[`).concat(
|
|
294
|
-
`).concat(
|
|
296
|
+
body[`).concat(M, `] {
|
|
297
|
+
`).concat(ce, ": ").concat(u, `px;
|
|
295
298
|
}
|
|
296
299
|
`);
|
|
297
300
|
}, H = function() {
|
|
@@ -299,9 +302,9 @@ var ge = function() {
|
|
|
299
302
|
return isFinite(e) ? e : 0;
|
|
300
303
|
}, Ee = function() {
|
|
301
304
|
i.useEffect(function() {
|
|
302
|
-
return document.body.setAttribute(
|
|
305
|
+
return document.body.setAttribute(M, (H() + 1).toString()), function() {
|
|
303
306
|
var e = H() - 1;
|
|
304
|
-
e <= 0 ? document.body.removeAttribute(
|
|
307
|
+
e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
|
|
305
308
|
};
|
|
306
309
|
}, []);
|
|
307
310
|
}, Re = function(e) {
|
|
@@ -322,48 +325,48 @@ if (typeof window < "u") try {
|
|
|
322
325
|
}
|
|
323
326
|
var P = Y ? { passive: !1 } : !1, ke = function(e) {
|
|
324
327
|
return e.tagName === "TEXTAREA";
|
|
325
|
-
},
|
|
328
|
+
}, ee = function(e, t) {
|
|
326
329
|
if (!(e instanceof Element)) return !1;
|
|
327
330
|
var r = window.getComputedStyle(e);
|
|
328
331
|
return r[t] !== "hidden" && !(r.overflowY === r.overflowX && !ke(e) && r[t] === "visible");
|
|
329
332
|
}, Pe = function(e) {
|
|
330
|
-
return
|
|
333
|
+
return ee(e, "overflowY");
|
|
331
334
|
}, Ne = function(e) {
|
|
332
|
-
return
|
|
335
|
+
return ee(e, "overflowX");
|
|
333
336
|
}, Z = function(e, t) {
|
|
334
337
|
var r = t.ownerDocument, n = t;
|
|
335
338
|
do {
|
|
336
|
-
if (typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host),
|
|
337
|
-
var a =
|
|
339
|
+
if (typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host), te(e, n)) {
|
|
340
|
+
var a = ne(e, n);
|
|
338
341
|
if (a[1] > a[2]) return !0;
|
|
339
342
|
}
|
|
340
343
|
n = n.parentNode;
|
|
341
344
|
} while (n && n !== r.body);
|
|
342
345
|
return !1;
|
|
343
|
-
},
|
|
346
|
+
}, Me = function(e) {
|
|
344
347
|
return [
|
|
345
348
|
e.scrollTop,
|
|
346
349
|
e.scrollHeight,
|
|
347
350
|
e.clientHeight
|
|
348
351
|
];
|
|
349
|
-
},
|
|
352
|
+
}, Te = function(e) {
|
|
350
353
|
return [
|
|
351
354
|
e.scrollLeft,
|
|
352
355
|
e.scrollWidth,
|
|
353
356
|
e.clientWidth
|
|
354
357
|
];
|
|
355
|
-
},
|
|
358
|
+
}, te = function(e, t) {
|
|
356
359
|
return e === "v" ? Pe(t) : Ne(t);
|
|
357
|
-
},
|
|
358
|
-
return e === "v" ?
|
|
360
|
+
}, ne = function(e, t) {
|
|
361
|
+
return e === "v" ? Me(t) : Te(t);
|
|
359
362
|
}, Le = function(e, t) {
|
|
360
363
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
361
364
|
}, xe = function(e, t, r, n, a) {
|
|
362
365
|
var c = Le(e, window.getComputedStyle(t).direction), f = c * n, u = r.target, v = t.contains(u), s = !1, p = f > 0, b = 0, C = 0;
|
|
363
366
|
do {
|
|
364
367
|
if (!u) break;
|
|
365
|
-
var E =
|
|
366
|
-
(R || o) &&
|
|
368
|
+
var E = ne(e, u), R = E[0], o = E[1] - E[2] - c * R;
|
|
369
|
+
(R || o) && te(e, u) && (b += o, C += R);
|
|
367
370
|
var l = u.parentNode;
|
|
368
371
|
u = l && l.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? l.host : l;
|
|
369
372
|
} while (!v && u !== document.body || v && (t.contains(u) || t === u));
|
|
@@ -383,13 +386,13 @@ var P = Y ? { passive: !1 } : !1, ke = function(e) {
|
|
|
383
386
|
`);
|
|
384
387
|
}, Ie = 0, N = [];
|
|
385
388
|
function Oe(e) {
|
|
386
|
-
var t = i.useRef([]), r = i.useRef([0, 0]), n = i.useRef(), a = i.useState(Ie++)[0], c = i.useState(
|
|
389
|
+
var t = i.useRef([]), r = i.useRef([0, 0]), n = i.useRef(), a = i.useState(Ie++)[0], c = i.useState(J)[0], f = i.useRef(e);
|
|
387
390
|
i.useEffect(function() {
|
|
388
391
|
f.current = e;
|
|
389
392
|
}, [e]), i.useEffect(function() {
|
|
390
393
|
if (e.inert) {
|
|
391
394
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
392
|
-
var o =
|
|
395
|
+
var o = ae([e.lockRef.current], (e.shards || []).map(G), !0).filter(Boolean);
|
|
393
396
|
return o.forEach(function(l) {
|
|
394
397
|
return l.classList.add("allow-interactivity-".concat(a));
|
|
395
398
|
}), function() {
|
|
@@ -409,9 +412,9 @@ function Oe(e) {
|
|
|
409
412
|
if ("touches" in o && w === "h" && S.type === "range") return !1;
|
|
410
413
|
var j = window.getSelection(), O = j && j.anchorNode;
|
|
411
414
|
if (O && (O === S || O.contains(S))) return !1;
|
|
412
|
-
var
|
|
413
|
-
if (!
|
|
414
|
-
if (
|
|
415
|
+
var T = Z(w, S);
|
|
416
|
+
if (!T) return !0;
|
|
417
|
+
if (T ? k = w : (k = w === "v" ? "h" : "v", T = Z(w, S)), !T) return !1;
|
|
415
418
|
if (!n.current && "changedTouches" in o && (h || d) && (n.current = k), !k) return !0;
|
|
416
419
|
var V = n.current || k;
|
|
417
420
|
return xe(V, l, o, V === "h" ? h : d, !0);
|
|
@@ -474,7 +477,7 @@ function We(e) {
|
|
|
474
477
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
475
478
|
return t;
|
|
476
479
|
}
|
|
477
|
-
var De = se(
|
|
480
|
+
var De = se(q, Oe), Xe = i.forwardRef(function(e, t) {
|
|
478
481
|
return i.createElement(I, y({}, e, {
|
|
479
482
|
ref: t,
|
|
480
483
|
sideCar: De
|
|
@@ -482,5 +485,8 @@ var De = se(K, Oe), Xe = i.forwardRef(function(e, t) {
|
|
|
482
485
|
});
|
|
483
486
|
Xe.classNames = I.classNames;
|
|
484
487
|
export {
|
|
488
|
+
le as i,
|
|
489
|
+
je as n,
|
|
490
|
+
fe as r,
|
|
485
491
|
Xe as t
|
|
486
492
|
};
|
|
@@ -2,7 +2,7 @@ import { o as v } from "./rolldown-runtime-Ck3dxwZt.js";
|
|
|
2
2
|
import { t as y } from "./prop-types-CfEYxTbR.js";
|
|
3
3
|
import { t as c } from "./utils-Cx-WzRZF.js";
|
|
4
4
|
import { inputVariants as g, searchInconInputVariants as h } from "./components/Command/Command.variants.js";
|
|
5
|
-
import { t as m } from "./dist-
|
|
5
|
+
import { t as m } from "./dist-BZNE2Tnx.js";
|
|
6
6
|
import p, { forwardRef as u } from "react";
|
|
7
7
|
import { jsx as f, jsxs as b } from "react/jsx-runtime";
|
|
8
8
|
var a = /* @__PURE__ */ v(y());
|