@konstructio/ui 0.1.2-alpha.106 → 0.1.2-alpha.107
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 +118 -31
- package/dist/{AdditionalOptions-D0BAS2HG.js → AdditionalOptions-Crcnz0_g.js} +1 -1
- package/dist/{AlertDialogTrigger-BOrb536P.js → AlertDialogTrigger-ouMGAlJW.js} +1 -1
- package/dist/{Breadcrumb-DVBxqgW_.js → Breadcrumb-MrF1Z6w2.js} +1 -1
- package/dist/{Checkbox-B20uoUKD.js → Checkbox-8KnRLpQG.js} +86 -87
- package/dist/{CommandInput-BWt6-vUK.js → CommandInput-CGnqfudl.js} +1 -1
- package/dist/{Counter-DiQb-he2.js → Counter-CDXdP1Af.js} +1 -1
- package/dist/{DropdownButton-hCVYZ1LA.js → DropdownButton-D4QlKGg7.js} +5 -5
- package/dist/{FlagSelectorList-CnJjnsp6.js → FlagSelectorList-tYZNl-tz.js} +22 -18
- package/dist/{HamburgerTrigger-BT2yUUJ-.js → HamburgerTrigger-B_NGSZ2r.js} +19 -19
- package/dist/{ImageUpload-DgCBCa5X.js → ImageUpload-D7HKSXK8.js} +71 -66
- package/dist/Input-is8n7emP.js +195 -0
- package/dist/{Loading-DUh9PMJN.js → Loading-DO8JOWBV.js} +1 -1
- package/dist/{Modal-CkAf9UY7.js → Modal-Dq9BHD_9.js} +2 -2
- package/dist/{Spinner-CUwE2bLm.js → Spinner-BJE79VTl.js} +1 -1
- package/dist/{StepIndicatorContent-CjbjVjS1.js → StepIndicatorContent-BGDvxLzV.js} +1 -1
- package/dist/{Switch-CyJXptgc.js → Switch-C7286Bcu.js} +2 -2
- package/dist/{Toast-DLJDExxw.js → Toast-jSx3Lao8.js} +2 -2
- package/dist/Wrapper-2AUlYAHQ.js +195 -0
- package/dist/{Wrapper-CvDRHgN4.js → Wrapper-CyHxGs4E.js} +1 -1
- package/dist/{Wrapper-B8Ja3k4j.js → Wrapper-a7RVCcrn.js} +238 -232
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +65 -60
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +10 -9
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +8 -6
- package/dist/components/Card/Card.js +25 -22
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.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 +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/CommandShortcut.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
- 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 +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Divider/Divider.js +7 -7
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/Drawer/components/Body/Body.js +1 -1
- package/dist/components/Drawer/components/Footer/Footer.js +1 -1
- package/dist/components/Drawer/components/Header/Header.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +2 -2
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
- package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +2 -2
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.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/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.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/contexts/MultiSelectDropdown.context.js +4 -3
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +17 -16
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
- 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 +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +2 -2
- package/dist/components/Select/Select.js +32 -28
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
- package/dist/components/Select/components/List/List.js +78 -67
- package/dist/components/Select/components/ListItem/ListItem.js +1 -1
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Label/Label.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +25 -24
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/components/Body.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Table/components/Head.js +1 -1
- package/dist/components/Table/components/Row.js +1 -1
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/components/Content.js +2 -2
- package/dist/components/Tabs/components/List.js +2 -2
- package/dist/components/Tabs/components/Trigger.js +2 -2
- package/dist/components/Tag/Tag.js +8 -8
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.js +1 -1
- package/dist/components/TagSelect/components/List/List.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/TextArea/TextArea.js +71 -26
- package/dist/components/TextArea/TextArea.variants.js +49 -13
- package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +113 -98
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +19 -18
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +2 -2
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +2 -2
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.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/index.js +12 -12
- package/dist/{components-MnxnhLqM.js → components-CaEW5ge4.js} +32 -32
- package/dist/{constants-CSsr7_YV.js → constants-HQIXhj2t.js} +1 -1
- package/dist/contexts/index.js +1 -1
- package/dist/contexts/theme.provider.js +1 -1
- package/dist/{dist-Z0F27ATp2.js → dist-9WbMf_jT.js} +1 -1
- package/dist/{dist-oJzmvhAb.js → dist-AxOGvL82.js} +1 -1
- package/dist/{dist-CqNOgbfR.js → dist-BIBFLVt1.js} +3 -3
- package/dist/{dist-B6ExqXM_2.js → dist-BnCbAI-c.js} +1 -1
- package/dist/{dist-C87gsBDM.js → dist-CszFjHAP.js} +2 -2
- package/dist/{dist-ut_BEHii.js → dist-pxvIAJzo.js} +2 -2
- package/dist/hooks/useMediaQuery.js +1 -1
- package/dist/index.js +14 -14
- package/dist/lib/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +2 -0
- package/dist/lib/components/Card/Card.types.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +1 -0
- package/dist/lib/components/Divider/Divider.d.ts +3 -2
- package/dist/lib/components/Divider/Divider.types.d.ts +4 -0
- package/dist/lib/components/Input/Input.types.d.ts +4 -0
- package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/Select/Select.types.d.ts +2 -0
- package/dist/lib/components/Select/components/List/List.types.d.ts +3 -0
- package/dist/lib/components/Select/components/Wrapper.d.ts +2 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -0
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +2 -0
- package/dist/lib/components/Tag/Tag.types.d.ts +1 -0
- package/dist/lib/components/TextArea/TextArea.d.ts +6 -0
- package/dist/lib/components/TextArea/TextArea.types.d.ts +13 -2
- package/dist/lib/components/TextArea/TextArea.variants.d.ts +4 -1
- package/dist/lib/components/TimePicker/TimePicker.types.d.ts +4 -0
- package/dist/lib/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -0
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/package.json +21 -21
- package/dist/{react-B6Nc0Fib.js → react-7zQ6bvbE.js} +290 -289
- package/dist/styles.css +1 -1
- package/dist/{table.provider-DfZ74xMZ.js → table.provider-CWzODR1t.js} +1 -1
- package/dist/{theme.provider-Dw4O3ocC.js → theme.provider-CSL1WCYG.js} +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/{utils-Cx-WzRZF.js → utils-B-6R7kNE.js} +8 -4
- package/package.json +21 -21
- package/dist/Input-wp-rsCmX.js +0 -188
- package/dist/Wrapper-R8fik3ah.js +0 -182
- /package/dist/{dist-DGOjiAnB2.js → dist-DGOjiAnB.js} +0 -0
- /package/dist/{dist-DwxO2RoR2.js → dist-DwxO2RoR.js} +0 -0
- /package/dist/{dist-pWlMx4Fi2.js → dist-pWlMx4Fi.js} +0 -0
- /package/dist/{x-a_LpoXzG2.js → x-a_LpoXzG.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./utils-
|
|
1
|
+
import { t as e } from "./utils-B-6R7kNE.js";
|
|
2
2
|
import { t as i } from "./createLucideIcon-MbzNWCaI.js";
|
|
3
3
|
import { loadingVariants as t } from "./components/Loading/Loading.variants.js";
|
|
4
4
|
import { jsx as d } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as F } from "./x-Ierxf0uI.js";
|
|
2
2
|
import { t as N } from "./dist-DX0sBG3Q.js";
|
|
3
|
-
import { t as h } from "./utils-
|
|
3
|
+
import { t as h } from "./utils-B-6R7kNE.js";
|
|
4
4
|
import { t as k } from "./Combination-CnMM05mt.js";
|
|
5
|
-
import { t as w } from "./react-
|
|
5
|
+
import { t as w } from "./react-7zQ6bvbE.js";
|
|
6
6
|
import { t as A } from "./es2015-B_07N-UL.js";
|
|
7
7
|
import { Body as R } from "./components/Modal/components/Body/Body.js";
|
|
8
8
|
import { Footer as x } from "./components/Modal/components/Footer/Footer.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as m } from "./dist-DX0sBG3Q.js";
|
|
2
|
-
import { t as L } from "./utils-
|
|
2
|
+
import { t as L } from "./utils-B-6R7kNE.js";
|
|
3
3
|
import { Typography as d } from "./components/Typography/Typography.js";
|
|
4
4
|
import { spinnerIconVariants as k, spinnerVariants as g } from "./components/Spinner/Spinner.variants.js";
|
|
5
5
|
import { jsx as e, jsxs as _ } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as d } from "./utils-
|
|
1
|
+
import { t as d } from "./utils-B-6R7kNE.js";
|
|
2
2
|
import { ExclamationIcon as m } from "./assets/icons/components/Exclamation.js";
|
|
3
3
|
import { t as p } from "./createLucideIcon-MbzNWCaI.js";
|
|
4
4
|
import { CHECK_ICON_SIZE_MAP as a, ICON_SIZE_MAP as c } from "./components/Stepper/constants/index.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as H } from "./dist-xCbHbMLA.js";
|
|
2
2
|
import { t as y } from "./dist-CCdbu9GU.js";
|
|
3
|
-
import { t as x } from "./utils-
|
|
3
|
+
import { t as x } from "./utils-B-6R7kNE.js";
|
|
4
4
|
import { i as D, r as $, t as G } from "./dist-D-yS0HN8.js";
|
|
5
5
|
import { Typography as U } from "./components/Typography/Typography.js";
|
|
6
|
-
import { t as V } from "./dist-
|
|
6
|
+
import { t as V } from "./dist-pWlMx4Fi.js";
|
|
7
7
|
import { switchVariants as W, thumbVariants as X } from "./components/Switch/Switch.variants.js";
|
|
8
8
|
import * as r from "react";
|
|
9
9
|
import { forwardRef as J, useEffect as K, useId as Q, useImperativeHandle as Y, useRef as Z } from "react";
|
|
@@ -2,7 +2,7 @@ import { t as Ce } from "./x-Ierxf0uI.js";
|
|
|
2
2
|
import { a as ce, t as q } from "./dist-xCbHbMLA.js";
|
|
3
3
|
import { n as xe, t as I } from "./dist-CCdbu9GU.js";
|
|
4
4
|
import { n as ue, t as Pe } from "./dist-DX0sBG3Q.js";
|
|
5
|
-
import { t as X } from "./utils-
|
|
5
|
+
import { t as X } from "./utils-B-6R7kNE.js";
|
|
6
6
|
import { CheckCircleFilledIcon as ye } from "./assets/icons/components/CheckCircleFilled.js";
|
|
7
7
|
import { ErrorIcon as Re } from "./assets/icons/components/Error.js";
|
|
8
8
|
import { InformationOutlineIcon as ge } from "./assets/icons/components/InformationOutline.js";
|
|
@@ -12,7 +12,7 @@ import { t as Y } from "./dist-D5XYRjmR.js";
|
|
|
12
12
|
import { r as De, t as Ie } from "./dist-DKryKPmP.js";
|
|
13
13
|
import { t as Ne } from "./dist-C4j75TwZ.js";
|
|
14
14
|
import { t as Fe } from "./dist-BUocnzkM.js";
|
|
15
|
-
import { t as Le } from "./dist-
|
|
15
|
+
import { t as Le } from "./dist-DwxO2RoR.js";
|
|
16
16
|
import { closeToastVariants as ke, toastVariants as Me, viewportToastVariants as Oe } from "./components/Toast/Toast.variants.js";
|
|
17
17
|
import * as s from "react";
|
|
18
18
|
import { isValidElement as G, useEffect as Ve, useRef as Ke } from "react";
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { t as r } from "./utils-B-6R7kNE.js";
|
|
2
|
+
import { LoaderIcon as ue } from "./assets/icons/components/Loader.js";
|
|
3
|
+
import { t as me } from "./createLucideIcon-MbzNWCaI.js";
|
|
4
|
+
import { t as de } from "./chevron-up-Bjpvg6ui.js";
|
|
5
|
+
import { Typography as pe } from "./components/Typography/Typography.js";
|
|
6
|
+
import { useSelectContext as fe } from "./components/Select/contexts/select.hook.js";
|
|
7
|
+
import { List as xe } from "./components/Select/components/List/List.js";
|
|
8
|
+
import { inputVariants as he, labelVariants as ve, selectVariants as ye } from "./components/Select/Select.variants.js";
|
|
9
|
+
import { useSelect as we } from "./components/Select/hooks/useSelect.js";
|
|
10
|
+
import { forwardRef as Ne, useEffect as ge, useImperativeHandle as ke, useMemo as Ce, useRef as y } from "react";
|
|
11
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
var be = [["path", {
|
|
13
|
+
d: "m21 21-4.34-4.34",
|
|
14
|
+
key: "14j7rj"
|
|
15
|
+
}], ["circle", {
|
|
16
|
+
cx: "11",
|
|
17
|
+
cy: "11",
|
|
18
|
+
r: "8",
|
|
19
|
+
key: "4ej97u"
|
|
20
|
+
}]], Ie = me("search", be), $e = Ne(({ additionalOptions: S, className: E, defaultValue: w, describedBy: k, fieldId: N, disabled: a = !1, error: s, groupedOptions: F, iconClassName: $, inputClassName: K, isInfiniteScrollEnabled: M = !1, isLoading: C, isRequired: f, loadingText: W, label: o, labelAction: _, labelClassName: q, labelWrapperClassName: A, listClassName: H, listItemClassName: P, listItemSecondRowClassName: U, name: b, noOptionsText: B, placeholder: x, searchable: I = !1, showSearchIcon: g, theme: G, visibleItems: J, wrapperClassName: Q, onFetchMoreOptions: X, onBlur: Y, onSearchChange: Z, ...j }, ee) => {
|
|
21
|
+
const h = `${N}-label`, L = `${N}-control`, O = `${N}-listbox`, m = y(null), V = y(null), z = y(null), te = y(0), { isOpen: l, options: i, searchTerm: ae, value: c, setCanFilter: re, setSearchTerm: ne, setValue: d, toggleOpen: oe } = fe(), t = Ce(() => i.find(({ value: e }) => e === c), [i, c]), { wrapperRef: le, wrapperInputRef: D, handleOpen: v } = we({
|
|
22
|
+
inputRef: m,
|
|
23
|
+
searchInputRef: V,
|
|
24
|
+
internalValue: t,
|
|
25
|
+
onBlur: Y
|
|
26
|
+
}), R = () => {
|
|
27
|
+
if (!a) {
|
|
28
|
+
if (l) {
|
|
29
|
+
oe(!1);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
v();
|
|
33
|
+
}
|
|
34
|
+
}, ie = (e) => {
|
|
35
|
+
if (!a) {
|
|
36
|
+
if (e.key === "ArrowDown") {
|
|
37
|
+
if (e.preventDefault(), !l) {
|
|
38
|
+
v();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
z.current?.querySelector('li:not([data-action="true"])')?.focus();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), R());
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
ke(ee, () => m.current, [m]), ge(() => {
|
|
48
|
+
if (w && !c) {
|
|
49
|
+
const e = i && i.find((p) => p.value === w);
|
|
50
|
+
e && d(e.value);
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
w,
|
|
54
|
+
i,
|
|
55
|
+
d,
|
|
56
|
+
c
|
|
57
|
+
]);
|
|
58
|
+
const se = (e) => {
|
|
59
|
+
const p = e.target.value;
|
|
60
|
+
re(!0), d(""), ne(p ?? ""), Z?.(p);
|
|
61
|
+
const T = i.find((ce) => ce.value.toLocaleLowerCase() === p.toLocaleLowerCase());
|
|
62
|
+
d(T ? T.value : t?.value ?? "");
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ u("div", {
|
|
65
|
+
ref: le,
|
|
66
|
+
className: r("flex flex-col gap-2 w-full relative", Q),
|
|
67
|
+
"data-theme": G,
|
|
68
|
+
children: [
|
|
69
|
+
o ? /* @__PURE__ */ u("div", {
|
|
70
|
+
className: r("flex items-center justify-between", A),
|
|
71
|
+
children: [/* @__PURE__ */ u("label", {
|
|
72
|
+
id: h,
|
|
73
|
+
className: r(ve({ className: q })),
|
|
74
|
+
htmlFor: L,
|
|
75
|
+
onClick: () => !a && v(),
|
|
76
|
+
children: [o, f && /* @__PURE__ */ n("span", {
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
className: "text-red-600 dark:text-red-500 ml-1",
|
|
79
|
+
children: "*"
|
|
80
|
+
})]
|
|
81
|
+
}), _]
|
|
82
|
+
}) : null,
|
|
83
|
+
/* @__PURE__ */ u("div", {
|
|
84
|
+
ref: D,
|
|
85
|
+
id: L,
|
|
86
|
+
className: r(ye({
|
|
87
|
+
className: E,
|
|
88
|
+
hasError: !!s,
|
|
89
|
+
disabled: a
|
|
90
|
+
})),
|
|
91
|
+
role: "combobox",
|
|
92
|
+
onClick: R,
|
|
93
|
+
onKeyDown: ie,
|
|
94
|
+
"aria-expanded": l,
|
|
95
|
+
tabIndex: te.current,
|
|
96
|
+
"aria-labelledby": o ? h : void 0,
|
|
97
|
+
"aria-label": o ? void 0 : x,
|
|
98
|
+
"aria-haspopup": "listbox",
|
|
99
|
+
"aria-controls": l ? O : void 0,
|
|
100
|
+
"aria-invalid": !!s || void 0,
|
|
101
|
+
"aria-describedby": k,
|
|
102
|
+
"aria-required": f || void 0,
|
|
103
|
+
"aria-disabled": a || void 0,
|
|
104
|
+
children: [/* @__PURE__ */ u("div", {
|
|
105
|
+
className: "flex gap-2.5 items-center flex-1",
|
|
106
|
+
children: [
|
|
107
|
+
t?.leftIcon && !g && /* @__PURE__ */ n("span", {
|
|
108
|
+
className: "w-4 h-4 flex justify-center items-center dark:text-metal-50",
|
|
109
|
+
children: t.leftIcon
|
|
110
|
+
}),
|
|
111
|
+
g && /* @__PURE__ */ n(Ie, { className: r("w-4", "h-4", "text-zinc-500", "select-none", "transition-colors", "duration-300", "dark:text-metal-300", "dark:group-focus-within:text-metal-50") }),
|
|
112
|
+
I ? /* @__PURE__ */ n("input", {
|
|
113
|
+
ref: V,
|
|
114
|
+
type: "text",
|
|
115
|
+
value: l ? ae : t?.label ?? c ?? "",
|
|
116
|
+
onChange: se,
|
|
117
|
+
placeholder: x,
|
|
118
|
+
className: r(he({ className: K }), { "text-red-700 placeholder:text-red-700": !!s }),
|
|
119
|
+
onClick: (e) => {
|
|
120
|
+
e.stopPropagation(), a || v();
|
|
121
|
+
},
|
|
122
|
+
"aria-labelledby": o ? h : void 0,
|
|
123
|
+
"aria-label": o ? void 0 : x,
|
|
124
|
+
"aria-invalid": !!s || void 0,
|
|
125
|
+
"aria-describedby": k,
|
|
126
|
+
required: f,
|
|
127
|
+
autoComplete: "off",
|
|
128
|
+
autoCapitalize: "words",
|
|
129
|
+
disabled: a,
|
|
130
|
+
tabIndex: -1,
|
|
131
|
+
...j
|
|
132
|
+
}) : /* @__PURE__ */ u(pe, {
|
|
133
|
+
variant: "body2",
|
|
134
|
+
className: r("flex-1 text-zinc-400 text-sm dark:text-metal-400 flex gap-2 items-center", {
|
|
135
|
+
"text-red-700": !!s,
|
|
136
|
+
"select-none": !t,
|
|
137
|
+
"text-metal-800 dark:text-metal-50": t,
|
|
138
|
+
"text-metal-400/50 dark:text-metal-50/50": a
|
|
139
|
+
}, t?.wrapperClassNameOnSelectedValue),
|
|
140
|
+
children: [
|
|
141
|
+
t?.label || x,
|
|
142
|
+
" ",
|
|
143
|
+
t?.showRightComponentOnselectedValue ? t?.rightComponent : null
|
|
144
|
+
]
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
}), C ? /* @__PURE__ */ n(ue, {
|
|
148
|
+
size: 16,
|
|
149
|
+
className: "text-metal-400 animate-spin select-none"
|
|
150
|
+
}) : !g && /* @__PURE__ */ n(de, {
|
|
151
|
+
"data-state": l ? "open" : "closed",
|
|
152
|
+
className: r("w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none dark:group-focus-within:text-metal-50", $, {
|
|
153
|
+
"text-red-700": !!s,
|
|
154
|
+
"text-metal-400/50 dark:group-focus-within:text-zinc-500": a
|
|
155
|
+
})
|
|
156
|
+
})]
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ n("input", {
|
|
159
|
+
ref: m,
|
|
160
|
+
type: "text",
|
|
161
|
+
name: b,
|
|
162
|
+
className: "hidden",
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
required: f,
|
|
165
|
+
inert: !0,
|
|
166
|
+
defaultValue: t?.value ?? c ?? void 0,
|
|
167
|
+
...j
|
|
168
|
+
}),
|
|
169
|
+
l && /* @__PURE__ */ n(xe, {
|
|
170
|
+
ref: z,
|
|
171
|
+
id: O,
|
|
172
|
+
labelledBy: o ? h : void 0,
|
|
173
|
+
additionalOptions: S,
|
|
174
|
+
className: H,
|
|
175
|
+
groupedOptions: F,
|
|
176
|
+
itemClassName: P,
|
|
177
|
+
name: b,
|
|
178
|
+
wrapperInputRef: D,
|
|
179
|
+
inputRef: m,
|
|
180
|
+
options: i,
|
|
181
|
+
isLoading: !!C,
|
|
182
|
+
searchable: I,
|
|
183
|
+
listItemSecondRowClassName: U,
|
|
184
|
+
isInfiniteScrollEnabled: M,
|
|
185
|
+
onFetchMoreOptions: X,
|
|
186
|
+
noOptionsText: B,
|
|
187
|
+
loadingText: W,
|
|
188
|
+
visibleItems: J
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
export {
|
|
194
|
+
$e as t
|
|
195
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as k } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
2
|
import { t as _ } from "./prop-types-BCUW56rg.js";
|
|
3
3
|
import { t as T } from "./x-Ierxf0uI.js";
|
|
4
|
-
import { t as l } from "./utils-
|
|
4
|
+
import { t as l } from "./utils-B-6R7kNE.js";
|
|
5
5
|
import { Tag as S } from "./components/Tag/Tag.js";
|
|
6
6
|
import { useTagSelect as C } from "./components/TagSelect/contexts/TagSelect.hook.js";
|
|
7
7
|
import { List as z } from "./components/TagSelect/components/List/List.js";
|