@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as Ae } from "./rolldown-runtime-
|
|
2
|
-
import { t as Le } from "./prop-types-
|
|
1
|
+
import { o as Ae } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
|
+
import { t as Le } from "./prop-types-BCUW56rg.js";
|
|
3
3
|
import { a as D, n as Fe } from "./dist-xCbHbMLA.js";
|
|
4
4
|
import { n as Ne, t as se } from "./dist-CCdbu9GU.js";
|
|
5
5
|
import { t as A } from "./utils-Cx-WzRZF.js";
|
|
@@ -11,10 +11,10 @@ import { n as Ue, r as Be, t as $e } from "./es2015-CoHq2g4y.js";
|
|
|
11
11
|
import { t as Ve } from "./dist-BUocnzkM.js";
|
|
12
12
|
import { t as ze } from "./Combination-CnMM05mt.js";
|
|
13
13
|
import { Button as We } from "./components/Button/Button.js";
|
|
14
|
-
import { t as Ye } from "./dist-
|
|
14
|
+
import { t as Ye } from "./dist-DwxO2RoR2.js";
|
|
15
15
|
import { t as Xe } from "./dist-DGOjiAnB2.js";
|
|
16
|
-
import { a as de, i as He, r as qe, t as Ze } from "./dist-
|
|
17
|
-
import { n as Je, r as fe, t as Qe } from "./dist-
|
|
16
|
+
import { a as de, i as He, r as qe, t as Ze } from "./dist-Z0F27ATp2.js";
|
|
17
|
+
import { n as Je, r as fe, t as Qe } from "./dist-C87gsBDM.js";
|
|
18
18
|
import * as i from "react";
|
|
19
19
|
import ce, { forwardRef as et } from "react";
|
|
20
20
|
import { jsx as s, jsxs as ie } from "react/jsx-runtime";
|
|
@@ -500,7 +500,9 @@ var Q = (l, t) => Math.abs(l - t) < 1.01, X = (l, t, e) => {
|
|
|
500
500
|
end: o + n,
|
|
501
501
|
lane: 0
|
|
502
502
|
}, c, this) : S);
|
|
503
|
-
(this.pendingMin === null || t < this.pendingMin) && (this.pendingMin = t), this.itemSizeCache.set(h, e), this.itemSizeCacheVersion
|
|
503
|
+
(this.pendingMin === null || t < this.pendingMin) && (this.pendingMin = t), this.itemSizeCache.set(h, e), this.itemSizeCacheVersion++;
|
|
504
|
+
let u = !1;
|
|
505
|
+
r ? u = this.applyScrollAdjustment(this.getTotalSize() - f) : p && (u = this.applyScrollAdjustment(c)), this.notify(u);
|
|
504
506
|
}
|
|
505
507
|
}, this.getVirtualItems = I(() => [this.getVirtualIndexes(), this.getMeasurements()], (t, e) => {
|
|
506
508
|
const s = [];
|
|
@@ -515,8 +517,8 @@ var Q = (l, t) => Math.abs(l - t) < 1.01, X = (l, t, e) => {
|
|
|
515
517
|
}), this.getVirtualItemForOffset = (t) => {
|
|
516
518
|
const e = this.getMeasurements();
|
|
517
519
|
if (e.length === 0) return;
|
|
518
|
-
const s = this._flatMeasurements, i = this.options.lanes === 1 && s != null;
|
|
519
|
-
return L(e[
|
|
520
|
+
const s = this._flatMeasurements, i = this.options.lanes === 1 && s != null, n = P(0, e.length - 1, i ? (o) => s[o * 2] : (o) => L(e[o]).start, t);
|
|
521
|
+
return L(e[n]);
|
|
520
522
|
}, this.getMaxScrollOffset = () => {
|
|
521
523
|
if (!this.scrollElement) return 0;
|
|
522
524
|
if ("scrollHeight" in this.scrollElement) return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
|
|
@@ -534,9 +536,10 @@ var Q = (l, t) => Math.abs(l - t) < 1.01, X = (l, t, e) => {
|
|
|
534
536
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
535
537
|
const s = this.getSize(), i = this.getScrollOffset(), n = this.measurementsCache[t];
|
|
536
538
|
if (!n) return;
|
|
537
|
-
if (e === "auto")
|
|
538
|
-
|
|
539
|
-
|
|
539
|
+
if (e === "auto")
|
|
540
|
+
if (n.end >= i + s - this.options.scrollPaddingEnd) e = "end";
|
|
541
|
+
else if (n.start <= i + this.options.scrollPaddingStart) e = "start";
|
|
542
|
+
else return [i, e];
|
|
540
543
|
if (e === "end" && t === this.options.count - 1) return [this.getMaxScrollOffset(), e];
|
|
541
544
|
const o = e === "end" ? n.end + this.options.scrollPaddingEnd : n.start - this.options.scrollPaddingStart;
|
|
542
545
|
return [this.getOffsetForAlignment(o, e, n.size), e];
|
|
@@ -633,10 +636,10 @@ var Q = (l, t) => Math.abs(l - t) < 1.01, X = (l, t, e) => {
|
|
|
633
636
|
}, this.setOptions(l);
|
|
634
637
|
}
|
|
635
638
|
applyScrollAdjustment(l, t) {
|
|
636
|
-
l
|
|
639
|
+
return l === 0 ? !1 : (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", l), D() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded) ? (this._iosDeferredAdjustment += l, !1) : (this._scrollToOffset(this.getScrollOffset(), {
|
|
637
640
|
adjustments: this.scrollAdjustments += l,
|
|
638
641
|
behavior: t
|
|
639
|
-
}), this.scrollOffset !== null && (this.scrollOffset += this.scrollAdjustments, this.scrollOffset < 0 && (this.scrollOffset = 0), this.scrollAdjustments = 0)));
|
|
642
|
+
}), this.scrollOffset !== null && (this.scrollOffset += this.scrollAdjustments, this.scrollOffset < 0 && (this.scrollOffset = 0), this.scrollAdjustments = 0), !0));
|
|
640
643
|
}
|
|
641
644
|
scheduleScrollReconcile() {
|
|
642
645
|
if (!this.targetWindow) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as m } from "./rolldown-runtime-
|
|
2
|
-
import { t as g } from "./prop-types-
|
|
1
|
+
import { o as m } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
|
+
import { t as g } from "./prop-types-BCUW56rg.js";
|
|
3
3
|
import { t as c } from "./dist-DX0sBG3Q.js";
|
|
4
4
|
import { t as y } from "./utils-Cx-WzRZF.js";
|
|
5
5
|
import { hamburgerTriggerVariants as d } from "./components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js";
|
|
@@ -9,7 +9,7 @@ import { useEffect as ne, useId as ce, useRef as V, useState as N } from "react"
|
|
|
9
9
|
import { Fragment as P, jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
10
10
|
var t = /* @__PURE__ */ (function(n) {
|
|
11
11
|
return n.Default = "default", n.Uploading = "uploading", n.Complete = "complete", n.Error = "error", n;
|
|
12
|
-
})({}), oe = ({ className: n, error: y, fileName: b, fileSize: z, fileUrl: E, helperText: R = "Logo should be 32 x 32 pixels with transparent background (larger images will be downscaled proportionally to fit). Accepted file type is SVG, PNG, JPEG. Max file size is 5MB.", isRequired: S = !1, label: p = "Item logo", labelClassName: T, labelWrapperClassName: L, name: A, onChange: k, onRemove: J, status: v = t.Default, theme: f, uploadButtonText: $ = "Upload logo", accept: M = "image/svg+xml,image/png,image/jpeg,image/jpg", maxSize: K =
|
|
12
|
+
})({}), oe = ({ className: n, error: y, fileName: b, fileSize: z, fileUrl: E, helperText: R = "Logo should be 32 x 32 pixels with transparent background (larger images will be downscaled proportionally to fit). Accepted file type is SVG, PNG, JPEG. Max file size is 5MB.", isRequired: S = !1, label: p = "Item logo", labelClassName: T, labelWrapperClassName: L, name: A, onChange: k, onRemove: J, status: v = t.Default, theme: f, uploadButtonText: $ = "Upload logo", accept: M = "image/svg+xml,image/png,image/jpeg,image/jpg", maxSize: K = 5242880 }) => {
|
|
13
13
|
const U = ce(), h = V(null), c = V(null), [W, d] = N(v), [H, B] = N(E), [X, C] = N(b), [q, G] = N(z);
|
|
14
14
|
ne(() => () => {
|
|
15
15
|
c.current && clearTimeout(c.current);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as W } from "./rolldown-runtime-
|
|
2
|
-
import { t as $ } from "./prop-types-
|
|
1
|
+
import { o as W } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
|
+
import { t as $ } from "./prop-types-BCUW56rg.js";
|
|
3
3
|
import { t as i } from "./utils-Cx-WzRZF.js";
|
|
4
4
|
import { SearchIcon as S } from "./assets/icons/components/Search.js";
|
|
5
5
|
import { WarningIcon as T } from "./assets/icons/components/Warning.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as F } from "./x-
|
|
1
|
+
import { t as F } from "./x-Ierxf0uI.js";
|
|
2
2
|
import { t as N } from "./dist-DX0sBG3Q.js";
|
|
3
3
|
import { t as h } from "./utils-Cx-WzRZF.js";
|
|
4
4
|
import { t as k } from "./Combination-CnMM05mt.js";
|
|
5
|
-
import { t as w } from "./react-
|
|
6
|
-
import { t as A } from "./es2015-
|
|
5
|
+
import { t as w } from "./react-B6Nc0Fib.js";
|
|
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";
|
|
9
9
|
import { Header as B } from "./components/Modal/components/Header/Header.js";
|
|
@@ -8,134 +8,134 @@ import { switchVariants as W, thumbVariants as X } from "./components/Switch/Swi
|
|
|
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";
|
|
10
10
|
import { Fragment as ee, jsx as p, jsxs as E } from "react/jsx-runtime";
|
|
11
|
-
var te = Object.defineProperty,
|
|
12
|
-
value:
|
|
11
|
+
var te = Object.defineProperty, R = (s, a) => te(s, "name", {
|
|
12
|
+
value: a,
|
|
13
13
|
configurable: !0
|
|
14
14
|
}), T = "Switch", [re, ve] = D(T), [ne, N] = re(T);
|
|
15
|
-
function q(
|
|
16
|
-
const { __scopeSwitch:
|
|
17
|
-
prop:
|
|
18
|
-
defaultProp:
|
|
15
|
+
function q(s) {
|
|
16
|
+
const { __scopeSwitch: a, checked: f, children: n, defaultChecked: i, disabled: o, form: e, name: l, onCheckedChange: t, required: u, value: w = "on", internal_do_not_use_render: m } = s, [d, b] = G({
|
|
17
|
+
prop: f,
|
|
18
|
+
defaultProp: i ?? !1,
|
|
19
19
|
onChange: t,
|
|
20
20
|
caller: T
|
|
21
|
-
}), [S,
|
|
22
|
-
checked:
|
|
21
|
+
}), [S, v] = r.useState(null), [h, k] = r.useState(null), g = r.useRef(!1), [c, C] = r.useReducer((P) => P + 1, 0), I = {
|
|
22
|
+
checked: d,
|
|
23
23
|
setChecked: b,
|
|
24
24
|
disabled: o,
|
|
25
25
|
control: S,
|
|
26
|
-
setControl:
|
|
27
|
-
name:
|
|
26
|
+
setControl: v,
|
|
27
|
+
name: l,
|
|
28
28
|
form: e,
|
|
29
29
|
value: w,
|
|
30
|
-
hasConsumerStoppedPropagationRef:
|
|
31
|
-
userInteractionCount:
|
|
30
|
+
hasConsumerStoppedPropagationRef: g,
|
|
31
|
+
userInteractionCount: c,
|
|
32
32
|
onUserInteraction: C,
|
|
33
|
-
required:
|
|
34
|
-
defaultChecked:
|
|
33
|
+
required: u,
|
|
34
|
+
defaultChecked: i,
|
|
35
35
|
isFormControl: S ? !!e || !!S.closest("form") : !0,
|
|
36
|
-
bubbleInput:
|
|
36
|
+
bubbleInput: h,
|
|
37
37
|
setBubbleInput: k
|
|
38
38
|
};
|
|
39
39
|
return /* @__PURE__ */ p(ne, {
|
|
40
|
-
scope:
|
|
40
|
+
scope: a,
|
|
41
41
|
...I,
|
|
42
42
|
children: L(m) ? m(I) : n
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
var oe = "SwitchTrigger", ce = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */
|
|
47
|
-
const { control: o, form: e, value:
|
|
45
|
+
R(q, "SwitchProvider");
|
|
46
|
+
var oe = "SwitchTrigger", ce = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ R(function({ __scopeSwitch: a, onClick: f, ...n }, i) {
|
|
47
|
+
const { control: o, form: e, value: l, disabled: t, checked: u, required: w, setControl: m, setChecked: d, hasConsumerStoppedPropagationRef: b, onUserInteraction: S, isFormControl: v, bubbleInput: h } = N(oe, a), k = H(i, m), g = r.useRef(u);
|
|
48
48
|
return r.useEffect(() => {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
const C = /* @__PURE__ */
|
|
52
|
-
return
|
|
49
|
+
const c = e ? o?.ownerDocument.getElementById(e) : o?.form;
|
|
50
|
+
if (c instanceof HTMLFormElement) {
|
|
51
|
+
const C = /* @__PURE__ */ R(() => d(g.current), "reset");
|
|
52
|
+
return c.addEventListener("reset", C), () => c.removeEventListener("reset", C);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
55
55
|
o,
|
|
56
56
|
e,
|
|
57
|
-
|
|
57
|
+
d
|
|
58
58
|
]), /* @__PURE__ */ p(y.button, {
|
|
59
59
|
type: "button",
|
|
60
60
|
role: "switch",
|
|
61
|
-
"aria-checked":
|
|
61
|
+
"aria-checked": u,
|
|
62
62
|
"aria-required": w,
|
|
63
|
-
"data-state": B(
|
|
63
|
+
"data-state": B(u),
|
|
64
64
|
"data-disabled": t ? "" : void 0,
|
|
65
65
|
disabled: t,
|
|
66
|
-
value:
|
|
66
|
+
value: l,
|
|
67
67
|
...n,
|
|
68
68
|
ref: k,
|
|
69
|
-
onClick: $(
|
|
70
|
-
S(),
|
|
69
|
+
onClick: $(f, (c) => {
|
|
70
|
+
S(), d((C) => !C), h && v && (b.current = c.isPropagationStopped(), b.current || c.stopPropagation());
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
|
-
}, "SwitchTrigger")), se = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */
|
|
74
|
-
const { __scopeSwitch: n, name:
|
|
73
|
+
}, "SwitchTrigger")), se = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ R(function(a, f) {
|
|
74
|
+
const { __scopeSwitch: n, name: i, checked: o, defaultChecked: e, required: l, disabled: t, value: u, onCheckedChange: w, form: m, ...d } = a;
|
|
75
75
|
return /* @__PURE__ */ p(q, {
|
|
76
76
|
__scopeSwitch: n,
|
|
77
77
|
checked: o,
|
|
78
78
|
defaultChecked: e,
|
|
79
79
|
disabled: t,
|
|
80
|
-
required:
|
|
80
|
+
required: l,
|
|
81
81
|
onCheckedChange: w,
|
|
82
|
-
name:
|
|
82
|
+
name: i,
|
|
83
83
|
form: m,
|
|
84
|
-
value:
|
|
84
|
+
value: u,
|
|
85
85
|
internal_do_not_use_render: ({ isFormControl: b }) => /* @__PURE__ */ E(ee, { children: [/* @__PURE__ */ p(ce, {
|
|
86
|
-
...
|
|
87
|
-
ref:
|
|
86
|
+
...d,
|
|
87
|
+
ref: f,
|
|
88
88
|
__scopeSwitch: n
|
|
89
89
|
}), b && /* @__PURE__ */ p(de, { __scopeSwitch: n })] })
|
|
90
90
|
});
|
|
91
|
-
}, "Switch")), ae = "SwitchThumb", ie = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */
|
|
92
|
-
const { __scopeSwitch: n, ...
|
|
91
|
+
}, "Switch")), ae = "SwitchThumb", ie = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ R(function(a, f) {
|
|
92
|
+
const { __scopeSwitch: n, ...i } = a, o = N(ae, n);
|
|
93
93
|
return /* @__PURE__ */ p(y.span, {
|
|
94
94
|
"data-state": B(o.checked),
|
|
95
95
|
"data-disabled": o.disabled ? "" : void 0,
|
|
96
|
-
...
|
|
97
|
-
ref:
|
|
96
|
+
...i,
|
|
97
|
+
ref: f
|
|
98
98
|
});
|
|
99
|
-
}, "SwitchThumb")), ue = "SwitchBubbleInput", de = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */
|
|
100
|
-
const { control: o, hasConsumerStoppedPropagationRef: e, userInteractionCount:
|
|
99
|
+
}, "SwitchThumb")), ue = "SwitchBubbleInput", de = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ R(function({ __scopeSwitch: a, onClick: f, ...n }, i) {
|
|
100
|
+
const { control: o, hasConsumerStoppedPropagationRef: e, userInteractionCount: l, checked: t, defaultChecked: u, required: w, disabled: m, name: d, value: b, form: S, bubbleInput: v, setBubbleInput: h } = N(ue, a), k = H(i, h), g = V(o), c = r.useRef(!1), C = r.useRef(t), I = r.useRef(l);
|
|
101
101
|
r.useEffect(() => {
|
|
102
|
-
const _ =
|
|
102
|
+
const _ = v;
|
|
103
103
|
if (!_) return;
|
|
104
|
-
const j = window.HTMLInputElement.prototype, F = Object.getOwnPropertyDescriptor(j, "checked").set, M =
|
|
105
|
-
I.current =
|
|
104
|
+
const j = window.HTMLInputElement.prototype, F = Object.getOwnPropertyDescriptor(j, "checked").set, M = l !== I.current;
|
|
105
|
+
I.current = l;
|
|
106
106
|
const A = C.current !== t;
|
|
107
107
|
C.current = t;
|
|
108
108
|
const z = !(M && e.current);
|
|
109
109
|
if (A && F) {
|
|
110
|
-
|
|
110
|
+
c.current = !M;
|
|
111
111
|
const O = new Event("click", { bubbles: z });
|
|
112
|
-
F.call(_, t), _.dispatchEvent(O),
|
|
112
|
+
F.call(_, t), _.dispatchEvent(O), c.current = !1;
|
|
113
113
|
}
|
|
114
114
|
}, [
|
|
115
|
-
|
|
115
|
+
v,
|
|
116
116
|
t,
|
|
117
117
|
e,
|
|
118
|
-
|
|
118
|
+
l
|
|
119
119
|
]);
|
|
120
120
|
const P = r.useRef(t);
|
|
121
121
|
return /* @__PURE__ */ p(y.input, {
|
|
122
122
|
type: "checkbox",
|
|
123
123
|
"aria-hidden": !0,
|
|
124
|
-
defaultChecked:
|
|
124
|
+
defaultChecked: u ?? P.current,
|
|
125
125
|
required: w,
|
|
126
126
|
disabled: m,
|
|
127
|
-
name:
|
|
127
|
+
name: d,
|
|
128
128
|
value: b,
|
|
129
129
|
form: S,
|
|
130
130
|
...n,
|
|
131
131
|
tabIndex: -1,
|
|
132
132
|
ref: k,
|
|
133
|
-
onClick: $(
|
|
134
|
-
|
|
133
|
+
onClick: $(f, (_) => {
|
|
134
|
+
c.current && _.stopPropagation();
|
|
135
135
|
}),
|
|
136
136
|
style: {
|
|
137
137
|
...n.style,
|
|
138
|
-
...
|
|
138
|
+
...g,
|
|
139
139
|
position: "absolute",
|
|
140
140
|
pointerEvents: "none",
|
|
141
141
|
opacity: 0,
|
|
@@ -144,46 +144,49 @@ var oe = "SwitchTrigger", ce = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ g(fu
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
}, "SwitchBubbleInput"));
|
|
147
|
-
function L(
|
|
148
|
-
return typeof
|
|
147
|
+
function L(s) {
|
|
148
|
+
return typeof s == "function";
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
function B(
|
|
152
|
-
return
|
|
150
|
+
R(L, "isFunction");
|
|
151
|
+
function B(s) {
|
|
152
|
+
return s ? "checked" : "unchecked";
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
var ke = J(({ alignment:
|
|
156
|
-
const
|
|
157
|
-
return Y(
|
|
158
|
-
|
|
159
|
-
}, [
|
|
160
|
-
className: x("w-full", "flex", "gap-3",
|
|
154
|
+
R(B, "getState");
|
|
155
|
+
var ke = J(({ alignment: s = "horizontal", className: a, defaultChecked: f, disabled: n = !1, helperText: i, helperTextClassName: o, label: e, labelClassName: l, labelWrapperClassName: t, name: u, theme: w, thumbClassName: m, value: d, variant: b, onChange: S }, v) => {
|
|
156
|
+
const h = Z(null), k = Q(), g = u ? `${k}-${u}` : k;
|
|
157
|
+
return Y(v, () => h.current, [h]), K(() => {
|
|
158
|
+
h.current && (h.current.value = `${d}`);
|
|
159
|
+
}, [d]), /* @__PURE__ */ E("div", {
|
|
160
|
+
className: x("w-full", "flex", "gap-3", s === "vertical" ? "flex-col" : "flex-row", t),
|
|
161
161
|
"data-theme": w,
|
|
162
162
|
children: [
|
|
163
163
|
/* @__PURE__ */ p(se, {
|
|
164
|
-
id:
|
|
165
|
-
defaultChecked:
|
|
166
|
-
checked:
|
|
167
|
-
onCheckedChange: (
|
|
168
|
-
className: x(W({
|
|
164
|
+
id: g,
|
|
165
|
+
defaultChecked: f,
|
|
166
|
+
checked: d,
|
|
167
|
+
onCheckedChange: (c) => S?.(c),
|
|
168
|
+
className: x(W({
|
|
169
|
+
variant: b,
|
|
170
|
+
className: a
|
|
171
|
+
})),
|
|
169
172
|
"aria-label": e,
|
|
170
173
|
disabled: n,
|
|
171
174
|
children: /* @__PURE__ */ p(ie, { className: X({ className: m }) })
|
|
172
175
|
}),
|
|
173
176
|
e ? /* @__PURE__ */ E(U, {
|
|
174
177
|
component: "label",
|
|
175
|
-
className: x("flex", "flex-col", "text-sm", "dark:text-white", "select-none",
|
|
176
|
-
htmlFor:
|
|
178
|
+
className: x("flex", "flex-col", "text-sm", "dark:text-white", "select-none", l),
|
|
179
|
+
htmlFor: g,
|
|
177
180
|
style: { paddingRight: 15 },
|
|
178
|
-
children: [e,
|
|
181
|
+
children: [e, i ? /* @__PURE__ */ p(U, {
|
|
179
182
|
component: "span",
|
|
180
183
|
className: x("text-xs", "select-none", "text-slate-600", "dark:text-metal-400", o),
|
|
181
|
-
children:
|
|
184
|
+
children: i
|
|
182
185
|
}) : null]
|
|
183
186
|
}) : null,
|
|
184
187
|
/* @__PURE__ */ p("input", {
|
|
185
|
-
ref:
|
|
186
|
-
name:
|
|
188
|
+
ref: h,
|
|
189
|
+
name: u,
|
|
187
190
|
type: "text",
|
|
188
191
|
className: "hidden",
|
|
189
192
|
"aria-hidden": "true"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Ce } from "./x-
|
|
1
|
+
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";
|
|
@@ -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-DwxO2RoR2.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";
|
|
@@ -329,10 +329,11 @@ function ee(a) {
|
|
|
329
329
|
return Array.from(a.childNodes).forEach((t) => {
|
|
330
330
|
if (t.nodeType === t.TEXT_NODE && t.textContent && e.push(t.textContent), ve(t)) {
|
|
331
331
|
const o = t.ariaHidden || t.hidden || t.style.display === "none", n = t.dataset.radixToastAnnounceExclude === "";
|
|
332
|
-
if (!o)
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
if (!o)
|
|
333
|
+
if (n) {
|
|
334
|
+
const l = t.dataset.radixToastAnnounceAlt;
|
|
335
|
+
l && e.push(l);
|
|
336
|
+
} else e.push(...ee(t));
|
|
336
337
|
}
|
|
337
338
|
}), e;
|
|
338
339
|
}
|