@konstructio/ui 0.1.2-alpha.104 → 0.1.2-alpha.106
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/dist/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-BOrb536P.js} +39 -39
- package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-DVBxqgW_.js} +2 -2
- package/dist/Checkbox-B20uoUKD.js +249 -0
- package/dist/{CommandInput-BLq69pOT.js → CommandInput-BWt6-vUK.js} +3 -3
- package/dist/{Counter-BV680M5r.js → Counter-DiQb-he2.js} +2 -2
- package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
- package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-hCVYZ1LA.js} +5 -5
- package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-CnJjnsp6.js} +11 -8
- package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-BT2yUUJ-.js} +2 -2
- package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-DgCBCa5X.js} +1 -1
- package/dist/{Input-Cf44DzfE.js → Input-wp-rsCmX.js} +2 -2
- package/dist/{Modal-Dyn088X7.js → Modal-CkAf9UY7.js} +3 -3
- package/dist/{Switch-aPhL5rNG.js → Switch-CyJXptgc.js} +80 -77
- package/dist/{Toast-3NEz7LLa.js → Toast-DLJDExxw.js} +7 -6
- package/dist/{Wrapper-DP6Sxngx.js → Wrapper-B8Ja3k4j.js} +63 -63
- package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CvDRHgN4.js} +3 -3
- package/dist/Wrapper-R8fik3ah.js +182 -0
- package/dist/components/Alert/Alert.js +1 -1
- 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/Autocomplete/hooks/useAutocomplete.js +27 -25
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
- 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/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- 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 +1 -1
- 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/Counter/Counter.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 +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- 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 +30 -28
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
- 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/Datepicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.js +27 -25
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +42 -40
- package/dist/components/Filter/utils/index.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/Modal/Modal.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/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 +11 -11
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +30 -27
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +36 -33
- package/dist/components/Select/components/List/List.js +31 -31
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +1 -1
- package/dist/components/Select/hooks/useNavigationList.js +2 -3
- package/dist/components/Select/hooks/useSelect.js +29 -41
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +15 -7
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.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/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 +11 -11
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +16 -16
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +19 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +3 -3
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-Cf345jTv.js → components-MnxnhLqM.js} +1 -1
- package/dist/{constants-CxJJRVK3.js → constants-CSsr7_YV.js} +1 -1
- package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
- package/dist/{dist-BaPW7qXd2.js → dist-B6ExqXM_2.js} +1 -1
- package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
- package/dist/{dist-BdobXn93.js → dist-C87gsBDM.js} +1 -1
- package/dist/{dist-DDck_2lb.js → dist-CqNOgbfR.js} +117 -116
- package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
- package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR2.js} +38 -38
- package/dist/{dist-DFCz63oC2.js → dist-Z0F27ATp2.js} +157 -158
- package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
- package/dist/{dist-tGUUcv8n.js → dist-oJzmvhAb.js} +114 -115
- package/dist/{dist-BlPTJNIm.js → dist-ut_BEHii.js} +1 -1
- package/dist/es2015-B_07N-UL.js +796 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
- package/dist/lib/components/Select/hooks/useSelect.d.ts +1 -3
- package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
- package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
- package/dist/package.json +21 -21
- package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
- package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
- package/dist/{react-CvUtBTMg.js → react-B6Nc0Fib.js} +835 -827
- package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-B0BafHuU.js → table.provider-DfZ74xMZ.js} +95 -95
- package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
- package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
- package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
- package/package.json +21 -21
- package/dist/Checkbox-B_ngk9Dj.js +0 -249
- package/dist/Wrapper-BhqUVI1G.js +0 -171
- package/dist/es2015-DigR3dar.js +0 -795
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@konstructio/ui",
|
|
3
3
|
"description": "A set of reusable and customizable React components built for konstruct.io",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.2-alpha.
|
|
5
|
+
"version": "0.1.2-alpha.106",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -92,19 +92,19 @@
|
|
|
92
92
|
"@radix-ui/react-visually-hidden": "^1.2.11",
|
|
93
93
|
"@react-input/mask": "^2.0.4",
|
|
94
94
|
"@tanstack/react-table": "^8.21.3",
|
|
95
|
-
"@tanstack/react-virtual": "^3.14.
|
|
95
|
+
"@tanstack/react-virtual": "^3.14.9",
|
|
96
96
|
"chart.js": "^4.5.1",
|
|
97
97
|
"class-variance-authority": "^0.7.1",
|
|
98
98
|
"clsx": "^2.1.1",
|
|
99
99
|
"cmdk": "^1.1.1",
|
|
100
|
-
"countries-and-timezones": "^3.
|
|
100
|
+
"countries-and-timezones": "^3.10.0",
|
|
101
101
|
"country-flag-icons": "^1.6.20",
|
|
102
102
|
"country-locale-map": "^1.9.13",
|
|
103
|
-
"google-libphonenumber": "^3.2.
|
|
103
|
+
"google-libphonenumber": "^3.2.46",
|
|
104
104
|
"i18n-iso-countries": "^7.14.0",
|
|
105
105
|
"js-cookie": "^3.0.8",
|
|
106
|
-
"lucide-react": "^1.
|
|
107
|
-
"motion": "^
|
|
106
|
+
"lucide-react": "^1.28.0",
|
|
107
|
+
"motion": "^13.0.0",
|
|
108
108
|
"react-chartjs-2": "^5.3.1",
|
|
109
109
|
"react-day-picker": "^10.0.1",
|
|
110
110
|
"react-feather": "^2.0.10",
|
|
@@ -147,22 +147,22 @@
|
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@faker-js/faker": "^10.5.0",
|
|
149
149
|
"@rollup/plugin-alias": "^6.0.0",
|
|
150
|
-
"@storybook/addon-docs": "^10.5.
|
|
151
|
-
"@storybook/addon-links": "^10.5.
|
|
152
|
-
"@storybook/react-vite": "^10.5.
|
|
150
|
+
"@storybook/addon-docs": "^10.5.6",
|
|
151
|
+
"@storybook/addon-links": "^10.5.6",
|
|
152
|
+
"@storybook/react-vite": "^10.5.6",
|
|
153
153
|
"@tailwindcss/vite": "^4.3.3",
|
|
154
154
|
"@tanstack/react-query": "^5.101.4",
|
|
155
155
|
"@testing-library/jest-dom": "^7.0.0",
|
|
156
156
|
"@testing-library/react": "^16.3.2",
|
|
157
|
-
"@testing-library/user-event": "^14.6.
|
|
158
|
-
"@types/google-libphonenumber": "^7.4.
|
|
157
|
+
"@testing-library/user-event": "^14.6.3",
|
|
158
|
+
"@types/google-libphonenumber": "^7.4.31",
|
|
159
159
|
"@types/jest-axe": "^3.5.9",
|
|
160
160
|
"@types/js-cookie": "^3.0.6",
|
|
161
|
-
"@types/lodash": "^4.17.
|
|
162
|
-
"@types/react": "^19.2.
|
|
163
|
-
"@types/react-dom": "^19.2.
|
|
164
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
165
|
-
"@typescript-eslint/parser": "^8.
|
|
161
|
+
"@types/lodash": "^4.17.25",
|
|
162
|
+
"@types/react": "^19.2.18",
|
|
163
|
+
"@types/react-dom": "^19.2.4",
|
|
164
|
+
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
165
|
+
"@typescript-eslint/parser": "^8.66.0",
|
|
166
166
|
"@vitejs/plugin-react": "^6.0.3",
|
|
167
167
|
"@vitest/coverage-v8": "^4.1.10",
|
|
168
168
|
"autoprefixer": "^10.5.4",
|
|
@@ -170,21 +170,21 @@
|
|
|
170
170
|
"eslint-plugin-react": "^7.37.5",
|
|
171
171
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
172
172
|
"eslint-plugin-react-refresh": "^0.5.3",
|
|
173
|
-
"eslint-plugin-storybook": "^10.5.
|
|
173
|
+
"eslint-plugin-storybook": "^10.5.6",
|
|
174
174
|
"eslint-plugin-vitest": "^0.5.4",
|
|
175
175
|
"glob": "^13.0.6",
|
|
176
176
|
"husky": "^9.1.7",
|
|
177
177
|
"jest-axe": "^11.0.0",
|
|
178
|
-
"jsdom": "^30.0.
|
|
178
|
+
"jsdom": "^30.0.1",
|
|
179
179
|
"lodash": "^4.18.1",
|
|
180
|
-
"postcss": "^8.5.
|
|
180
|
+
"postcss": "^8.5.25",
|
|
181
181
|
"prettier": "^3.9.6",
|
|
182
182
|
"rimraf": "^6.1.3",
|
|
183
|
-
"storybook": "^10.5.
|
|
183
|
+
"storybook": "^10.5.6",
|
|
184
184
|
"tailwindcss": "^4.3.3",
|
|
185
185
|
"ts-node": "^10.9.2",
|
|
186
186
|
"typescript": "^6.0.3",
|
|
187
|
-
"vite": "^8.
|
|
187
|
+
"vite": "^8.2.0",
|
|
188
188
|
"vite-plugin-dts": "^5.0.3",
|
|
189
189
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
190
190
|
"vite-plugin-svgr": "^5.2.0",
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { o as X } from "./rolldown-runtime-Ck3dxwZt.js";
|
|
2
|
-
import { t as J } from "./prop-types-CfEYxTbR.js";
|
|
3
|
-
import { a as U } from "./dist-xCbHbMLA.js";
|
|
4
|
-
import { t as N } from "./dist-CCdbu9GU.js";
|
|
5
|
-
import { t as O } from "./utils-Cx-WzRZF.js";
|
|
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
|
-
import { checkboxVariants as re, labelVariants as oe } from "./components/Checkbox/Checkbox.variants.js";
|
|
11
|
-
import * as u from "react";
|
|
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
|
-
var w = /* @__PURE__ */ X(J());
|
|
15
|
-
function j() {
|
|
16
|
-
return j = Object.assign || function(e) {
|
|
17
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
18
|
-
var n = arguments[o];
|
|
19
|
-
for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
20
|
-
}
|
|
21
|
-
return e;
|
|
22
|
-
}, j.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
function ae(e, o) {
|
|
25
|
-
if (e == null) return {};
|
|
26
|
-
var n = se(e, o), t, r;
|
|
27
|
-
if (Object.getOwnPropertySymbols) {
|
|
28
|
-
var c = Object.getOwnPropertySymbols(e);
|
|
29
|
-
for (r = 0; r < c.length; r++)
|
|
30
|
-
t = c[r], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
|
|
31
|
-
}
|
|
32
|
-
return n;
|
|
33
|
-
}
|
|
34
|
-
function se(e, o) {
|
|
35
|
-
if (e == null) return {};
|
|
36
|
-
var n = {}, t = Object.keys(e), r, c;
|
|
37
|
-
for (c = 0; c < t.length; c++)
|
|
38
|
-
r = t[c], !(o.indexOf(r) >= 0) && (n[r] = e[r]);
|
|
39
|
-
return n;
|
|
40
|
-
}
|
|
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 = ae(e, ["color", "size"]);
|
|
43
|
-
return /* @__PURE__ */ q.createElement("svg", j({
|
|
44
|
-
ref: o,
|
|
45
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
-
width: c,
|
|
47
|
-
height: c,
|
|
48
|
-
viewBox: "0 0 24 24",
|
|
49
|
-
fill: "none",
|
|
50
|
-
stroke: t,
|
|
51
|
-
strokeWidth: "2",
|
|
52
|
-
strokeLinecap: "round",
|
|
53
|
-
strokeLinejoin: "round"
|
|
54
|
-
}, a), /* @__PURE__ */ q.createElement("polyline", { points: "20 6 9 17 4 12" }));
|
|
55
|
-
});
|
|
56
|
-
B.propTypes = {
|
|
57
|
-
color: w.default.string,
|
|
58
|
-
size: w.default.oneOfType([w.default.string, w.default.number])
|
|
59
|
-
};
|
|
60
|
-
B.displayName = "Check";
|
|
61
|
-
var ie = Object.defineProperty, x = (e, o) => ie(e, "name", {
|
|
62
|
-
value: o,
|
|
63
|
-
configurable: !0
|
|
64
|
-
}), T = "Checkbox", [ue, je] = Q(T), [le, z] = ue(T);
|
|
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, [p, b] = Y({
|
|
67
|
-
prop: n,
|
|
68
|
-
defaultProp: r ?? !1,
|
|
69
|
-
onChange: s,
|
|
70
|
-
caller: T
|
|
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
|
-
disabled: c,
|
|
74
|
-
setChecked: b,
|
|
75
|
-
control: v,
|
|
76
|
-
setControl: m,
|
|
77
|
-
name: l,
|
|
78
|
-
form: a,
|
|
79
|
-
value: C,
|
|
80
|
-
hasConsumerStoppedPropagationRef: _,
|
|
81
|
-
userInteractionCount: i,
|
|
82
|
-
onUserInteraction: k,
|
|
83
|
-
required: d,
|
|
84
|
-
defaultChecked: g(r) ? !1 : r,
|
|
85
|
-
isFormControl: P,
|
|
86
|
-
bubbleInput: y,
|
|
87
|
-
setBubbleInput: R
|
|
88
|
-
};
|
|
89
|
-
return /* @__PURE__ */ f(le, {
|
|
90
|
-
scope: o,
|
|
91
|
-
...E,
|
|
92
|
-
children: H(h) ? h(E) : t
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
x(D, "CheckboxProvider");
|
|
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
|
-
return u.useEffect(() => {
|
|
99
|
-
const i = a?.form;
|
|
100
|
-
if (i) {
|
|
101
|
-
const k = /* @__PURE__ */ x(() => p(_.current), "reset");
|
|
102
|
-
return i.addEventListener("reset", k), () => i.removeEventListener("reset", k);
|
|
103
|
-
}
|
|
104
|
-
}, [a, p]), /* @__PURE__ */ f(N.button, {
|
|
105
|
-
type: "button",
|
|
106
|
-
role: "checkbox",
|
|
107
|
-
"aria-checked": g(d) ? "mixed" : d,
|
|
108
|
-
"aria-required": C,
|
|
109
|
-
"data-state": F(d),
|
|
110
|
-
"data-disabled": s ? "" : void 0,
|
|
111
|
-
disabled: s,
|
|
112
|
-
value: l,
|
|
113
|
-
...r,
|
|
114
|
-
ref: R,
|
|
115
|
-
onKeyDown: S(n, (i) => {
|
|
116
|
-
i.key === "Enter" && i.preventDefault();
|
|
117
|
-
}),
|
|
118
|
-
onClick: S(t, (i) => {
|
|
119
|
-
v(), p((k) => g(k) ? !0 : !k), y && m && (b.current = i.isPropagationStopped(), b.current || i.stopPropagation());
|
|
120
|
-
})
|
|
121
|
-
});
|
|
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
|
-
__scopeCheckbox: t,
|
|
126
|
-
checked: c,
|
|
127
|
-
defaultChecked: a,
|
|
128
|
-
disabled: s,
|
|
129
|
-
required: l,
|
|
130
|
-
onCheckedChange: C,
|
|
131
|
-
name: r,
|
|
132
|
-
form: h,
|
|
133
|
-
value: d,
|
|
134
|
-
internal_do_not_use_render: ({ isFormControl: b }) => /* @__PURE__ */ $(ce, { children: [/* @__PURE__ */ f(fe, {
|
|
135
|
-
...p,
|
|
136
|
-
ref: n,
|
|
137
|
-
__scopeCheckbox: t
|
|
138
|
-
}), b && /* @__PURE__ */ f(ke, { __scopeCheckbox: t })] })
|
|
139
|
-
});
|
|
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
|
-
present: r || g(a.checked) || a.checked === !0,
|
|
144
|
-
children: /* @__PURE__ */ f(N.span, {
|
|
145
|
-
"data-state": F(a.checked),
|
|
146
|
-
"data-disabled": a.disabled ? "" : void 0,
|
|
147
|
-
...c,
|
|
148
|
-
ref: n,
|
|
149
|
-
style: {
|
|
150
|
-
pointerEvents: "none",
|
|
151
|
-
...o.style
|
|
152
|
-
}
|
|
153
|
-
})
|
|
154
|
-
});
|
|
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
|
-
u.useEffect(() => {
|
|
158
|
-
const I = m;
|
|
159
|
-
if (!I) return;
|
|
160
|
-
const K = window.HTMLInputElement.prototype, L = Object.getOwnPropertyDescriptor(K, "checked").set, M = l !== P.current;
|
|
161
|
-
P.current = l;
|
|
162
|
-
const W = k.current !== s;
|
|
163
|
-
k.current = s;
|
|
164
|
-
const G = !(M && a.current);
|
|
165
|
-
if (W && L) {
|
|
166
|
-
i.current = !M;
|
|
167
|
-
const V = new Event("click", { bubbles: G });
|
|
168
|
-
I.indeterminate = g(s), L.call(I, g(s) ? !1 : s), I.dispatchEvent(V), i.current = !1;
|
|
169
|
-
}
|
|
170
|
-
}, [
|
|
171
|
-
m,
|
|
172
|
-
s,
|
|
173
|
-
a,
|
|
174
|
-
l
|
|
175
|
-
]);
|
|
176
|
-
const E = u.useRef(g(s) ? !1 : s);
|
|
177
|
-
return /* @__PURE__ */ f(N.input, {
|
|
178
|
-
type: "checkbox",
|
|
179
|
-
"aria-hidden": !0,
|
|
180
|
-
defaultChecked: d ?? E.current,
|
|
181
|
-
required: C,
|
|
182
|
-
disabled: h,
|
|
183
|
-
name: p,
|
|
184
|
-
value: b,
|
|
185
|
-
form: v,
|
|
186
|
-
...t,
|
|
187
|
-
tabIndex: -1,
|
|
188
|
-
ref: R,
|
|
189
|
-
onClick: S(n, (I) => {
|
|
190
|
-
i.current && I.stopPropagation();
|
|
191
|
-
}),
|
|
192
|
-
style: {
|
|
193
|
-
...t.style,
|
|
194
|
-
..._,
|
|
195
|
-
position: "absolute",
|
|
196
|
-
pointerEvents: "none",
|
|
197
|
-
opacity: 0,
|
|
198
|
-
margin: 0,
|
|
199
|
-
transform: "translateX(-100%)"
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}, "CheckboxBubbleInput"));
|
|
203
|
-
function H(e) {
|
|
204
|
-
return typeof e == "function";
|
|
205
|
-
}
|
|
206
|
-
x(H, "isFunction");
|
|
207
|
-
function g(e) {
|
|
208
|
-
return e === "indeterminate";
|
|
209
|
-
}
|
|
210
|
-
x(g, "isIndeterminate");
|
|
211
|
-
function F(e) {
|
|
212
|
-
return g(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
213
|
-
}
|
|
214
|
-
x(F, "getState");
|
|
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
|
-
return /* @__PURE__ */ $("div", {
|
|
220
|
-
className: O("flex items-center gap-4", l),
|
|
221
|
-
"data-theme": d,
|
|
222
|
-
children: [/* @__PURE__ */ f(pe, {
|
|
223
|
-
id: r ?? R,
|
|
224
|
-
checked: m,
|
|
225
|
-
ref: v,
|
|
226
|
-
name: s,
|
|
227
|
-
disabled: t,
|
|
228
|
-
"aria-labelledby": e,
|
|
229
|
-
title: C,
|
|
230
|
-
className: O(re({
|
|
231
|
-
className: o,
|
|
232
|
-
variant: h,
|
|
233
|
-
checked: m
|
|
234
|
-
})),
|
|
235
|
-
onCheckedChange: _,
|
|
236
|
-
...b,
|
|
237
|
-
children: /* @__PURE__ */ f(be, { children: /* @__PURE__ */ f(B, { className: "w-4 h-4 stroke-2" }) })
|
|
238
|
-
}), c ? /* @__PURE__ */ f("label", {
|
|
239
|
-
htmlFor: s ?? r,
|
|
240
|
-
className: O(oe({ className: a }), { "cursor-not-allowed": t }),
|
|
241
|
-
onClick: () => !t && _(!m),
|
|
242
|
-
children: c
|
|
243
|
-
}) : null]
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
Ce.displayName = "KonstructCheckbox";
|
|
247
|
-
export {
|
|
248
|
-
Ce as t
|
|
249
|
-
};
|
package/dist/Wrapper-BhqUVI1G.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { t as r } from "./utils-Cx-WzRZF.js";
|
|
2
|
-
import { LoaderIcon as le } from "./assets/icons/components/Loader.js";
|
|
3
|
-
import { t as se } from "./createLucideIcon-MbzNWCaI.js";
|
|
4
|
-
import { t as oe } from "./chevron-up-Bjpvg6ui.js";
|
|
5
|
-
import { Typography as ie } from "./components/Typography/Typography.js";
|
|
6
|
-
import { useSelectContext as ce } from "./components/Select/contexts/select.hook.js";
|
|
7
|
-
import { List as me } from "./components/Select/components/List/List.js";
|
|
8
|
-
import { inputVariants as pe, labelVariants as ue, selectVariants as fe } from "./components/Select/Select.variants.js";
|
|
9
|
-
import { useSelect as de } from "./components/Select/hooks/useSelect.js";
|
|
10
|
-
import { forwardRef as xe, useEffect as he, useId as ve, useImperativeHandle as Ne, useMemo as ge, useRef as x } from "react";
|
|
11
|
-
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
12
|
-
var Ce = [["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
|
-
}]], we = se("search", Ce), Fe = xe(({ additionalOptions: z, className: R, defaultValue: h, disabled: t = !1, error: f, groupedOptions: T, iconClassName: F, inputClassName: S, isInfiniteScrollEnabled: E = !1, isLoading: k, isRequired: v, label: N, labelAction: M, labelClassName: W, labelWrapperClassName: _, listClassName: $, listItemClassName: H, listItemSecondRowClassName: P, name: d, noOptionsText: U, placeholder: g, searchable: y = !1, showSearchIcon: C, theme: q, visibleItems: A, wrapperClassName: B, onFetchMoreOptions: D, onBlur: G, onSearchChange: J, ...I }, K) => {
|
|
21
|
-
const j = ve(), i = x(null), L = x(null), O = x(null), Q = x(0), { isOpen: c, options: l, searchTerm: X, value: s, setCanFilter: Y, setSearchTerm: Z, setValue: m, toggleOpen: ee } = ce(), e = ge(() => l.find(({ value: a }) => a === s), [l, s]), { wrapperRef: te, wrapperInputRef: V, handleOpen: w } = de({
|
|
22
|
-
ulRef: O,
|
|
23
|
-
inputRef: i,
|
|
24
|
-
searchInputRef: L,
|
|
25
|
-
disabled: t,
|
|
26
|
-
internalValue: e,
|
|
27
|
-
onBlur: G
|
|
28
|
-
}), ae = () => {
|
|
29
|
-
if (!t) {
|
|
30
|
-
if (c) {
|
|
31
|
-
ee(!1);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
w();
|
|
35
|
-
}
|
|
36
|
-
}, p = d ? `${j}-${d}` : j;
|
|
37
|
-
Ne(K, () => i.current, [i]), he(() => {
|
|
38
|
-
if (h && !s) {
|
|
39
|
-
const a = l && l.find((u) => u.value === h);
|
|
40
|
-
a && m(a.value);
|
|
41
|
-
}
|
|
42
|
-
}, [
|
|
43
|
-
h,
|
|
44
|
-
l,
|
|
45
|
-
m,
|
|
46
|
-
s
|
|
47
|
-
]);
|
|
48
|
-
const re = (a) => {
|
|
49
|
-
const u = a.target.value;
|
|
50
|
-
Y(!0), m(""), Z(u ?? ""), J?.(u);
|
|
51
|
-
const b = l.find((ne) => ne.value.toLocaleLowerCase() === u.toLocaleLowerCase());
|
|
52
|
-
m(b ? b.value : e?.value ?? "");
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ o("div", {
|
|
55
|
-
ref: te,
|
|
56
|
-
className: r("flex flex-col gap-2 w-full relative", B),
|
|
57
|
-
"data-theme": q,
|
|
58
|
-
children: [
|
|
59
|
-
N ? /* @__PURE__ */ o("div", {
|
|
60
|
-
className: r("flex items-center justify-between", _),
|
|
61
|
-
children: [/* @__PURE__ */ o("label", {
|
|
62
|
-
id: p,
|
|
63
|
-
className: r(ue({ className: W })),
|
|
64
|
-
htmlFor: p,
|
|
65
|
-
onClick: () => !t && w(),
|
|
66
|
-
children: [N, v && /* @__PURE__ */ n("span", {
|
|
67
|
-
className: "text-red-600 dark:text-red-500 ml-1",
|
|
68
|
-
children: "*"
|
|
69
|
-
})]
|
|
70
|
-
}), M]
|
|
71
|
-
}) : null,
|
|
72
|
-
/* @__PURE__ */ o("div", {
|
|
73
|
-
ref: V,
|
|
74
|
-
id: p,
|
|
75
|
-
className: r(fe({
|
|
76
|
-
className: R,
|
|
77
|
-
hasError: !!f,
|
|
78
|
-
disabled: t
|
|
79
|
-
})),
|
|
80
|
-
role: "combobox",
|
|
81
|
-
onClick: ae,
|
|
82
|
-
"aria-expanded": c,
|
|
83
|
-
tabIndex: Q.current,
|
|
84
|
-
"aria-labelledby": p,
|
|
85
|
-
children: [/* @__PURE__ */ o("div", {
|
|
86
|
-
className: "flex gap-2.5 items-center flex-1",
|
|
87
|
-
children: [
|
|
88
|
-
e?.leftIcon && !C && /* @__PURE__ */ n("span", {
|
|
89
|
-
className: "w-4 h-4 flex justify-center items-center dark:text-metal-50",
|
|
90
|
-
children: e.leftIcon
|
|
91
|
-
}),
|
|
92
|
-
C && /* @__PURE__ */ n(we, { 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") }),
|
|
93
|
-
y ? /* @__PURE__ */ n("input", {
|
|
94
|
-
ref: L,
|
|
95
|
-
type: "text",
|
|
96
|
-
value: c ? X : e?.label ?? s ?? "",
|
|
97
|
-
onChange: re,
|
|
98
|
-
placeholder: g,
|
|
99
|
-
className: r(pe({ className: S }), { "text-red-700 placeholder:text-red-700": !!f }),
|
|
100
|
-
onClick: (a) => {
|
|
101
|
-
a.stopPropagation(), t || w();
|
|
102
|
-
},
|
|
103
|
-
"aria-label": N || g,
|
|
104
|
-
"aria-labelledby": p,
|
|
105
|
-
required: v,
|
|
106
|
-
autoComplete: "off",
|
|
107
|
-
autoCapitalize: "words",
|
|
108
|
-
disabled: t,
|
|
109
|
-
tabIndex: -1,
|
|
110
|
-
...I
|
|
111
|
-
}) : /* @__PURE__ */ o(ie, {
|
|
112
|
-
variant: "body2",
|
|
113
|
-
className: r("flex-1 text-zinc-400 text-sm dark:text-metal-400 flex gap-2 items-center", {
|
|
114
|
-
"text-red-700": !!f,
|
|
115
|
-
"select-none": !e,
|
|
116
|
-
"text-metal-800 dark:text-metal-50": e,
|
|
117
|
-
"text-metal-400/50 dark:text-metal-50/50": t
|
|
118
|
-
}, e?.wrapperClassNameOnSelectedValue),
|
|
119
|
-
children: [
|
|
120
|
-
e?.label || g,
|
|
121
|
-
" ",
|
|
122
|
-
e?.showRightComponentOnselectedValue ? e?.rightComponent : null
|
|
123
|
-
]
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
}), k ? /* @__PURE__ */ n(le, {
|
|
127
|
-
size: 16,
|
|
128
|
-
className: "text-metal-400 animate-spin select-none"
|
|
129
|
-
}) : !C && /* @__PURE__ */ n(oe, {
|
|
130
|
-
"data-state": c ? "open" : "closed",
|
|
131
|
-
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", F, {
|
|
132
|
-
"text-red-700": !!f,
|
|
133
|
-
"text-metal-400/50 dark:group-focus-within:text-zinc-500": t
|
|
134
|
-
})
|
|
135
|
-
})]
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ n("input", {
|
|
138
|
-
ref: i,
|
|
139
|
-
type: "text",
|
|
140
|
-
name: d,
|
|
141
|
-
className: "hidden",
|
|
142
|
-
"aria-hidden": "true",
|
|
143
|
-
required: v,
|
|
144
|
-
inert: !0,
|
|
145
|
-
defaultValue: e?.value ?? s ?? void 0,
|
|
146
|
-
...I
|
|
147
|
-
}),
|
|
148
|
-
c && /* @__PURE__ */ n(me, {
|
|
149
|
-
ref: O,
|
|
150
|
-
additionalOptions: z,
|
|
151
|
-
className: $,
|
|
152
|
-
groupedOptions: T,
|
|
153
|
-
itemClassName: H,
|
|
154
|
-
name: d,
|
|
155
|
-
wrapperInputRef: V,
|
|
156
|
-
inputRef: i,
|
|
157
|
-
options: l,
|
|
158
|
-
isLoading: !!k,
|
|
159
|
-
searchable: y,
|
|
160
|
-
listItemSecondRowClassName: P,
|
|
161
|
-
isInfiniteScrollEnabled: E,
|
|
162
|
-
onFetchMoreOptions: D,
|
|
163
|
-
noOptionsText: U,
|
|
164
|
-
visibleItems: A
|
|
165
|
-
})
|
|
166
|
-
]
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
export {
|
|
170
|
-
Fe as t
|
|
171
|
-
};
|