@konstructio/ui 0.0.12-alpha.1 → 0.0.12
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/{index-BVppSRDQ.js → AlertDialogTrigger-D4Tm_9M0.js} +21 -19
- package/dist/{Combination-BQYb0Gw7.js → Combination-Cmu9JRkv.js} +72 -72
- package/dist/{Modal-W2GbkC_F.js → Modal-L73dmnHv.js} +246 -238
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-CvquEaNg.js} +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.js +23 -20
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +18 -0
- package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +6 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
- package/dist/components/AlertDialog/components/index.d.ts +1 -0
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/dist/components/Autocomplete/Autocomplete.js +17 -15
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
- package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
- package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List/List.js +7 -7
- package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List/List.types.js +1 -0
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +16 -0
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +69 -68
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +17 -16
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +3 -2
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +16 -14
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/Button.types.js +1 -0
- package/dist/components/Button/Button.variants.d.ts +7 -0
- package/dist/components/Card/Card.d.ts +4 -0
- package/dist/components/Card/Card.js +12 -10
- package/dist/components/Card/Card.types.d.ts +8 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/Card.variants.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +15 -13
- package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.types.js +1 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +6 -4
- package/dist/components/Dropdown/Dropdown.types.d.ts +16 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
- package/dist/components/Dropdown/components/List/List.d.ts +3 -0
- package/dist/components/Dropdown/components/List/List.js +10 -9
- package/dist/components/Dropdown/components/List/List.types.d.ts +6 -0
- package/dist/components/Dropdown/components/List/List.types.js +1 -0
- package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.js +21 -20
- package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.js +34 -31
- package/dist/components/Dropdown/components/index.d.ts +3 -0
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +5 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
- package/dist/components/Dropdown/contexts/index.d.ts +2 -0
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
- package/dist/components/Dropdown/hooks/useDropdown.js +14 -12
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
- package/dist/components/Dropdown/hooks/useNavigationList.js +10 -8
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +14 -12
- package/dist/components/Input/Input.types.d.ts +9 -0
- package/dist/components/Input/Input.types.js +1 -0
- package/dist/components/Input/Input.variants.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts +8 -0
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/Modal.types.d.ts +12 -0
- package/dist/components/Modal/Modal.types.js +1 -0
- package/dist/components/Modal/components/Body/Body.d.ts +3 -0
- package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
- package/dist/components/Modal/components/Body/Body.types.js +1 -0
- package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
- package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
- package/dist/components/Modal/components/Header/Header.d.ts +3 -0
- package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Modal/components/Header/Header.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.js +9 -7
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.provider.js +4 -4
- package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
- package/dist/components/Modal/contexts/Modal.types.js +1 -0
- package/dist/components/Modal/contexts/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.js +11 -9
- package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
- package/dist/components/NumberInput/NumberInput.types.js +1 -0
- package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +16 -13
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
- package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +37 -55
- package/dist/components/Radio/Radio.types.d.ts +12 -0
- package/dist/components/Radio/Radio.types.js +1 -0
- package/dist/components/Radio/Radio.variants.d.ts +3 -0
- package/dist/components/Radio/Radio.variants.js +16 -69
- package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.js +27 -37
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
- package/dist/components/Range/Range.d.ts +3 -0
- package/dist/components/Range/Range.js +22 -20
- package/dist/components/Range/Range.types.d.ts +13 -0
- package/dist/components/Range/Range.types.js +1 -0
- package/dist/components/Range/Range.variants.d.ts +14 -0
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.js +22 -20
- package/dist/components/Sidebar/Sidebar.types.d.ts +18 -0
- package/dist/components/Sidebar/Sidebar.types.js +1 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Sidebar/components/Footer/Footer.js +12 -9
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.js +12 -9
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -12
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +26 -24
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +20 -17
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +11 -8
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +13 -10
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -29
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Slider/Slider.d.ts +3 -0
- package/dist/components/Slider/Slider.js +20 -18
- package/dist/components/Slider/Slider.types.d.ts +13 -0
- package/dist/components/Slider/Slider.types.js +1 -0
- package/dist/components/Slider/Slider.variants.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +21 -19
- package/dist/components/Switch/Switch.types.d.ts +10 -0
- package/dist/components/Switch/Switch.types.js +1 -0
- package/dist/components/Switch/Switch.variants.d.ts +6 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.types.d.ts +4 -0
- package/dist/components/Tag/Tag.types.js +1 -0
- package/dist/components/Tag/Tag.variants.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.js +21 -19
- package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
- package/dist/components/TagSelect/TagSelect.types.js +1 -0
- package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
- package/dist/components/TextArea/TextArea.d.ts +3 -0
- package/dist/components/TextArea/TextArea.js +19 -17
- package/dist/components/TextArea/TextArea.types.d.ts +10 -0
- package/dist/components/TextArea/TextArea.types.js +1 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
- package/dist/components/Toast/Toast.d.ts +3 -0
- package/dist/components/Toast/Toast.js +54 -52
- package/dist/components/Toast/Toast.types.d.ts +12 -0
- package/dist/components/Toast/Toast.types.js +1 -0
- package/dist/components/Toast/Toast.variants.d.ts +9 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.js +12 -10
- package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.types.js +1 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.js +44 -50
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.provider.d.ts +6 -0
- package/dist/contexts/theme.provider.js +14 -84
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/{index-1GLoikpT.js → index-BaNV0qac.js} +6585 -6555
- package/dist/{index-CoqDsznq.js → index-BedjZUuB.js} +1 -1
- package/dist/{index-KEdwcThH.js → index-BtibbG81.js} +1 -1
- package/dist/{index-C5psggHV.js → index-D68N8v8R.js} +17 -17
- package/dist/{index-CJsYodgi.js → index-z-AJyzdv.js} +10 -10
- package/dist/index.d.ts +4 -522
- package/dist/index.js +53 -59
- package/dist/js.cookie-OLEfuq_g.js +74 -0
- package/dist/package.json +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/konstruct.d.ts +4 -0
- package/dist/plugins/konstruct.js +3 -3
- package/dist/plugins/utils/colors.d.ts +328 -0
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/styles.js +1 -1
- package/dist/useBreadcrumb-DxYsZvj_.js +1398 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/{x-DU-Zw-L_.js → x-CRBgmX1Q.js} +1 -1
- package/package.json +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +0 -61
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +0 -90
- package/dist/components/Breadcrumb/components/index.js +0 -4
- package/dist/components/RadioCard/RadioCard.js +0 -41
- package/dist/components/RadioCard/RadioCard.variants.js +0 -19
- package/dist/components/RadioCardGroup/RadioCardGroup.js +0 -47
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +0 -21
- package/dist/components/RadioGroup/RadioGroup.variants.js +0 -21
- package/dist/useBreadcrumb-CojbXFVD.js +0 -1279
|
@@ -2,12 +2,14 @@ import { jsx as c, jsxs as U, Fragment as j } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { u as xe, b as Y, c as ee, d as R, e as Le, a as ke } from "./index-8vgf-x5i.js";
|
|
4
4
|
import { u as O, S as We, a as $e } from "./index-DoOsnuB6.js";
|
|
5
|
-
import { D as Ue, P as Ge } from "./index-
|
|
6
|
-
import { P } from "./index-
|
|
5
|
+
import { D as Ue, P as Ge } from "./index-BedjZUuB.js";
|
|
6
|
+
import { P } from "./index-BaNV0qac.js";
|
|
7
7
|
import { P as G } from "./index-D4Q2rMby.js";
|
|
8
|
-
import { R as Ke } from "./Combination-
|
|
9
|
-
import
|
|
10
|
-
import { useTheme as
|
|
8
|
+
import { R as Ke } from "./Combination-Cmu9JRkv.js";
|
|
9
|
+
import "./contexts/theme.context.js";
|
|
10
|
+
import { useTheme as Be } from "./contexts/theme.hook.js";
|
|
11
|
+
import "./js.cookie-OLEfuq_g.js";
|
|
12
|
+
import { Button as He } from "./components/Button/Button.js";
|
|
11
13
|
var qe = i.useId || (() => {
|
|
12
14
|
}), Ve = 0;
|
|
13
15
|
function x(e) {
|
|
@@ -430,7 +432,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${o.do
|
|
|
430
432
|
const n = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
431
433
|
o && n && (document.getElementById(o) || console.warn(r));
|
|
432
434
|
}, [r, e, o]), null;
|
|
433
|
-
}, gt = se, vt = ce, mt = ue, Dt = de, At = fe, Et = ge, ht = me, ye = Ae, Ce = "AlertDialog", [yt,
|
|
435
|
+
}, gt = se, vt = ce, mt = ue, Dt = de, At = fe, Et = ge, ht = me, ye = Ae, Ce = "AlertDialog", [yt, Gt] = ee(Ce, [
|
|
434
436
|
ae
|
|
435
437
|
]), y = ae(), be = (e) => {
|
|
436
438
|
const { __scopeAlertDialog: o, ...t } = e, r = y(o);
|
|
@@ -529,23 +531,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
529
531
|
(r = e.current) == null ? void 0 : r.getAttribute("aria-describedby")
|
|
530
532
|
) || console.warn(o);
|
|
531
533
|
}, [o, e]), null;
|
|
532
|
-
},
|
|
533
|
-
const
|
|
534
|
+
}, Kt = be, Pt = Ne, Bt = _e, Ht = Re, qt = Te, Vt = Me, jt = Fe, Yt = Pe, Zt = Ie;
|
|
535
|
+
const zt = ({
|
|
534
536
|
text: e,
|
|
535
537
|
theme: o,
|
|
536
538
|
onOpen: t
|
|
537
539
|
}) => {
|
|
538
|
-
const { theme: r } =
|
|
539
|
-
return /* @__PURE__ */ c(Pt, { asChild: !0, children: /* @__PURE__ */ c(
|
|
540
|
+
const { theme: r } = Be();
|
|
541
|
+
return /* @__PURE__ */ c(Pt, { asChild: !0, children: /* @__PURE__ */ c(He, { type: "button", theme: o ?? r, onClick: t, children: e }) });
|
|
540
542
|
};
|
|
541
543
|
export {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
544
|
+
zt as A,
|
|
545
|
+
qt as C,
|
|
546
|
+
Zt as D,
|
|
547
|
+
Ht as O,
|
|
548
|
+
Bt as P,
|
|
549
|
+
Kt as R,
|
|
550
|
+
Yt as T,
|
|
551
|
+
jt as a,
|
|
552
|
+
Vt as b
|
|
551
553
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as u from "react";
|
|
2
2
|
import { useState as ee } from "react";
|
|
3
3
|
var S = function() {
|
|
4
4
|
return S = Object.assign || function(t) {
|
|
@@ -47,7 +47,7 @@ function ae(e, t) {
|
|
|
47
47
|
})[0];
|
|
48
48
|
return n.callback = t, n.facade;
|
|
49
49
|
}
|
|
50
|
-
var oe = typeof window < "u" ?
|
|
50
|
+
var oe = typeof window < "u" ? u.useLayoutEffect : u.useEffect, D = /* @__PURE__ */ new WeakMap();
|
|
51
51
|
function ce(e, t) {
|
|
52
52
|
var n = ae(null, function(r) {
|
|
53
53
|
return e.forEach(function(a) {
|
|
@@ -57,11 +57,11 @@ function ce(e, t) {
|
|
|
57
57
|
return oe(function() {
|
|
58
58
|
var r = D.get(n);
|
|
59
59
|
if (r) {
|
|
60
|
-
var a = new Set(r), i = new Set(e),
|
|
60
|
+
var a = new Set(r), i = new Set(e), l = n.current;
|
|
61
61
|
a.forEach(function(o) {
|
|
62
62
|
i.has(o) || W(o, null);
|
|
63
63
|
}), i.forEach(function(o) {
|
|
64
|
-
a.has(o) || W(o,
|
|
64
|
+
a.has(o) || W(o, l);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
D.set(n, e);
|
|
@@ -79,17 +79,17 @@ function Q(e, t) {
|
|
|
79
79
|
return n.length ? n[n.length - 1] : e;
|
|
80
80
|
},
|
|
81
81
|
useMedium: function(i) {
|
|
82
|
-
var
|
|
83
|
-
return n.push(
|
|
82
|
+
var l = t(i, r);
|
|
83
|
+
return n.push(l), function() {
|
|
84
84
|
n = n.filter(function(o) {
|
|
85
|
-
return o !==
|
|
85
|
+
return o !== l;
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
},
|
|
89
89
|
assignSyncMedium: function(i) {
|
|
90
90
|
for (r = !0; n.length; ) {
|
|
91
|
-
var
|
|
92
|
-
n = [],
|
|
91
|
+
var l = n;
|
|
92
|
+
n = [], l.forEach(i);
|
|
93
93
|
}
|
|
94
94
|
n = {
|
|
95
95
|
push: function(o) {
|
|
@@ -102,23 +102,23 @@ function Q(e, t) {
|
|
|
102
102
|
},
|
|
103
103
|
assignMedium: function(i) {
|
|
104
104
|
r = !0;
|
|
105
|
-
var
|
|
105
|
+
var l = [];
|
|
106
106
|
if (n.length) {
|
|
107
107
|
var o = n;
|
|
108
|
-
n = [], o.forEach(i),
|
|
108
|
+
n = [], o.forEach(i), l = n;
|
|
109
109
|
}
|
|
110
110
|
var h = function() {
|
|
111
|
-
var d =
|
|
112
|
-
|
|
111
|
+
var d = l;
|
|
112
|
+
l = [], d.forEach(i);
|
|
113
113
|
}, m = function() {
|
|
114
114
|
return Promise.resolve().then(h);
|
|
115
115
|
};
|
|
116
116
|
m(), n = {
|
|
117
117
|
push: function(d) {
|
|
118
|
-
|
|
118
|
+
l.push(d), m();
|
|
119
119
|
},
|
|
120
120
|
filter: function(d) {
|
|
121
|
-
return
|
|
121
|
+
return l = l.filter(d), n;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
124
|
}
|
|
@@ -140,24 +140,24 @@ var G = function(e) {
|
|
|
140
140
|
var r = t.read();
|
|
141
141
|
if (!r)
|
|
142
142
|
throw new Error("Sidecar medium not found");
|
|
143
|
-
return
|
|
143
|
+
return u.createElement(r, S({}, n));
|
|
144
144
|
};
|
|
145
145
|
G.isSideCarExport = !0;
|
|
146
|
-
function
|
|
146
|
+
function ue(e, t) {
|
|
147
147
|
return e.useMedium(t), G;
|
|
148
148
|
}
|
|
149
149
|
var K = ie(), O = function() {
|
|
150
|
-
}, I =
|
|
151
|
-
var n =
|
|
150
|
+
}, I = u.forwardRef(function(e, t) {
|
|
151
|
+
var n = u.useRef(null), r = u.useState({
|
|
152
152
|
onScrollCapture: O,
|
|
153
153
|
onWheelCapture: O,
|
|
154
154
|
onTouchMoveCapture: O
|
|
155
|
-
}), a = r[0], i = r[1],
|
|
156
|
-
return
|
|
157
|
-
|
|
155
|
+
}), a = r[0], i = r[1], l = e.forwardProps, o = e.children, h = e.className, m = e.removeScrollBar, d = e.enabled, b = e.shards, E = e.sideCar, w = e.noIsolation, C = e.inert, c = e.allowPinchZoom, f = e.as, v = f === void 0 ? "div" : f, y = e.gapMode, g = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), p = E, s = ce([n, t]), R = S(S({}, g), a);
|
|
156
|
+
return u.createElement(
|
|
157
|
+
u.Fragment,
|
|
158
158
|
null,
|
|
159
|
-
d &&
|
|
160
|
-
|
|
159
|
+
d && u.createElement(p, { sideCar: K, removeScrollBar: m, shards: b, noIsolation: w, inert: C, setCallbacks: i, allowPinchZoom: !!c, lockRef: n, gapMode: y }),
|
|
160
|
+
l ? u.cloneElement(u.Children.only(o), S(S({}, R), { ref: s })) : u.createElement(v, S({}, R, { className: h, ref: s }), o)
|
|
161
161
|
);
|
|
162
162
|
});
|
|
163
163
|
I.defaultProps = {
|
|
@@ -169,7 +169,7 @@ I.classNames = {
|
|
|
169
169
|
fullWidth: A,
|
|
170
170
|
zeroRight: N
|
|
171
171
|
};
|
|
172
|
-
var
|
|
172
|
+
var le = function() {
|
|
173
173
|
if (typeof __webpack_nonce__ < "u")
|
|
174
174
|
return __webpack_nonce__;
|
|
175
175
|
};
|
|
@@ -178,7 +178,7 @@ function fe() {
|
|
|
178
178
|
return null;
|
|
179
179
|
var e = document.createElement("style");
|
|
180
180
|
e.type = "text/css";
|
|
181
|
-
var t =
|
|
181
|
+
var t = le();
|
|
182
182
|
return t && e.setAttribute("nonce", t), e;
|
|
183
183
|
}
|
|
184
184
|
function se(e, t) {
|
|
@@ -201,7 +201,7 @@ var ve = function() {
|
|
|
201
201
|
}, he = function() {
|
|
202
202
|
var e = ve();
|
|
203
203
|
return function(t, n) {
|
|
204
|
-
|
|
204
|
+
u.useEffect(function() {
|
|
205
205
|
return e.add(t), function() {
|
|
206
206
|
e.remove();
|
|
207
207
|
};
|
|
@@ -233,8 +233,8 @@ var ve = function() {
|
|
|
233
233
|
right: t[2],
|
|
234
234
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
235
235
|
};
|
|
236
|
-
}, Se = U(), M = "data-scroll-locked",
|
|
237
|
-
var a = e.left, i = e.top,
|
|
236
|
+
}, Se = U(), M = "data-scroll-locked", pe = function(e, t, n, r) {
|
|
237
|
+
var a = e.left, i = e.top, l = e.right, o = e.gap;
|
|
238
238
|
return n === void 0 && (n = "margin"), `
|
|
239
239
|
.`.concat(re, ` {
|
|
240
240
|
overflow: hidden `).concat(r, `;
|
|
@@ -248,7 +248,7 @@ var ve = function() {
|
|
|
248
248
|
n === "margin" && `
|
|
249
249
|
padding-left: `.concat(a, `px;
|
|
250
250
|
padding-top: `).concat(i, `px;
|
|
251
|
-
padding-right: `).concat(
|
|
251
|
+
padding-right: `).concat(l, `px;
|
|
252
252
|
margin-left:0;
|
|
253
253
|
margin-top:0;
|
|
254
254
|
margin-right: `).concat(o, "px ").concat(r, `;
|
|
@@ -280,20 +280,20 @@ var ve = function() {
|
|
|
280
280
|
}, V = function() {
|
|
281
281
|
var e = parseInt(document.body.getAttribute(M) || "0", 10);
|
|
282
282
|
return isFinite(e) ? e : 0;
|
|
283
|
-
},
|
|
284
|
-
|
|
283
|
+
}, be = function() {
|
|
284
|
+
u.useEffect(function() {
|
|
285
285
|
return document.body.setAttribute(M, (V() + 1).toString()), function() {
|
|
286
286
|
var e = V() - 1;
|
|
287
287
|
e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
|
|
288
288
|
};
|
|
289
289
|
}, []);
|
|
290
|
-
},
|
|
290
|
+
}, we = function(e) {
|
|
291
291
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
|
|
292
|
-
|
|
293
|
-
var i =
|
|
292
|
+
be();
|
|
293
|
+
var i = u.useMemo(function() {
|
|
294
294
|
return ye(a);
|
|
295
295
|
}, [a]);
|
|
296
|
-
return
|
|
296
|
+
return u.createElement(Se, { styles: pe(i, !t, a, n ? "" : "!important") });
|
|
297
297
|
}, Y = !1;
|
|
298
298
|
if (typeof window < "u")
|
|
299
299
|
try {
|
|
@@ -327,8 +327,8 @@ var k = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
327
327
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
328
328
|
var a = q(e, r);
|
|
329
329
|
if (a) {
|
|
330
|
-
var i = J(e, r),
|
|
331
|
-
if (
|
|
330
|
+
var i = J(e, r), l = i[1], o = i[2];
|
|
331
|
+
if (l > o)
|
|
332
332
|
return !0;
|
|
333
333
|
}
|
|
334
334
|
r = r.parentNode;
|
|
@@ -355,16 +355,16 @@ var k = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
355
355
|
}, Me = function(e, t) {
|
|
356
356
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
357
357
|
}, Le = function(e, t, n, r, a) {
|
|
358
|
-
var i = Me(e, window.getComputedStyle(t).direction),
|
|
358
|
+
var i = Me(e, window.getComputedStyle(t).direction), l = i * r, o = n.target, h = t.contains(o), m = !1, d = l > 0, b = 0, E = 0;
|
|
359
359
|
do {
|
|
360
|
-
var
|
|
361
|
-
(C || v) && q(e, o) && (
|
|
360
|
+
var w = J(e, o), C = w[0], c = w[1], f = w[2], v = c - f - i * C;
|
|
361
|
+
(C || v) && q(e, o) && (b += v, E += C), o instanceof ShadowRoot ? o = o.host : o = o.parentNode;
|
|
362
362
|
} while (
|
|
363
363
|
// portaled content
|
|
364
364
|
!h && o !== document.body || // self content
|
|
365
365
|
h && (t.contains(o) || t === o)
|
|
366
366
|
);
|
|
367
|
-
return (d && (Math.abs(
|
|
367
|
+
return (d && (Math.abs(b) < 1 || !a) || !d && (Math.abs(E) < 1 || !a)) && (m = !0), m;
|
|
368
368
|
}, x = function(e) {
|
|
369
369
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
370
370
|
}, z = function(e) {
|
|
@@ -380,10 +380,10 @@ var k = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
380
380
|
`);
|
|
381
381
|
}, xe = 0, P = [];
|
|
382
382
|
function Ne(e) {
|
|
383
|
-
var t =
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}, [e]),
|
|
383
|
+
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), a = u.useState(xe++)[0], i = u.useState(U)[0], l = u.useRef(e);
|
|
384
|
+
u.useEffect(function() {
|
|
385
|
+
l.current = e;
|
|
386
|
+
}, [e]), u.useEffect(function() {
|
|
387
387
|
if (e.inert) {
|
|
388
388
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
389
389
|
var c = te([e.lockRef.current], (e.shards || []).map(F), !0).filter(Boolean);
|
|
@@ -396,10 +396,10 @@ function Ne(e) {
|
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
399
|
-
var o =
|
|
399
|
+
var o = u.useCallback(function(c, f) {
|
|
400
400
|
if ("touches" in c && c.touches.length === 2 || c.type === "wheel" && c.ctrlKey)
|
|
401
|
-
return !
|
|
402
|
-
var v = x(c), y = n.current, g = "deltaX" in c ? c.deltaX : y[0] - v[0],
|
|
401
|
+
return !l.current.allowPinchZoom;
|
|
402
|
+
var v = x(c), y = n.current, g = "deltaX" in c ? c.deltaX : y[0] - v[0], p = "deltaY" in c ? c.deltaY : y[1] - v[1], s, R = c.target, L = Math.abs(g) > Math.abs(p) ? "h" : "v";
|
|
403
403
|
if ("touches" in c && L === "h" && R.type === "range")
|
|
404
404
|
return !1;
|
|
405
405
|
var T = H(L, R);
|
|
@@ -407,11 +407,11 @@ function Ne(e) {
|
|
|
407
407
|
return !0;
|
|
408
408
|
if (T ? s = L : (s = L === "v" ? "h" : "v", T = H(L, R)), !T)
|
|
409
409
|
return !1;
|
|
410
|
-
if (!r.current && "changedTouches" in c && (g ||
|
|
410
|
+
if (!r.current && "changedTouches" in c && (g || p) && (r.current = s), !s)
|
|
411
411
|
return !0;
|
|
412
412
|
var j = r.current || s;
|
|
413
|
-
return Le(j, f, c, j === "h" ? g :
|
|
414
|
-
}, []), h =
|
|
413
|
+
return Le(j, f, c, j === "h" ? g : p, !0);
|
|
414
|
+
}, []), h = u.useCallback(function(c) {
|
|
415
415
|
var f = c;
|
|
416
416
|
if (!(!P.length || P[P.length - 1] !== i)) {
|
|
417
417
|
var v = "deltaY" in f ? z(f) : x(f), y = t.current.filter(function(s) {
|
|
@@ -422,30 +422,30 @@ function Ne(e) {
|
|
|
422
422
|
return;
|
|
423
423
|
}
|
|
424
424
|
if (!y) {
|
|
425
|
-
var g = (
|
|
425
|
+
var g = (l.current.shards || []).map(F).filter(Boolean).filter(function(s) {
|
|
426
426
|
return s.contains(f.target);
|
|
427
|
-
}),
|
|
428
|
-
|
|
427
|
+
}), p = g.length > 0 ? o(f, g[0]) : !l.current.noIsolation;
|
|
428
|
+
p && f.cancelable && f.preventDefault();
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}, []), m =
|
|
431
|
+
}, []), m = u.useCallback(function(c, f, v, y) {
|
|
432
432
|
var g = { name: c, delta: f, target: v, should: y, shadowParent: Ae(v) };
|
|
433
433
|
t.current.push(g), setTimeout(function() {
|
|
434
|
-
t.current = t.current.filter(function(
|
|
435
|
-
return
|
|
434
|
+
t.current = t.current.filter(function(p) {
|
|
435
|
+
return p !== g;
|
|
436
436
|
});
|
|
437
437
|
}, 1);
|
|
438
|
-
}, []), d =
|
|
438
|
+
}, []), d = u.useCallback(function(c) {
|
|
439
439
|
n.current = x(c), r.current = void 0;
|
|
440
|
-
}, []),
|
|
440
|
+
}, []), b = u.useCallback(function(c) {
|
|
441
441
|
m(c.type, z(c), c.target, o(c, e.lockRef.current));
|
|
442
|
-
}, []), E =
|
|
442
|
+
}, []), E = u.useCallback(function(c) {
|
|
443
443
|
m(c.type, x(c), c.target, o(c, e.lockRef.current));
|
|
444
444
|
}, []);
|
|
445
|
-
|
|
445
|
+
u.useEffect(function() {
|
|
446
446
|
return P.push(i), e.setCallbacks({
|
|
447
|
-
onScrollCapture:
|
|
448
|
-
onWheelCapture:
|
|
447
|
+
onScrollCapture: b,
|
|
448
|
+
onWheelCapture: b,
|
|
449
449
|
onTouchMoveCapture: E
|
|
450
450
|
}), document.addEventListener("wheel", h, k), document.addEventListener("touchmove", h, k), document.addEventListener("touchstart", d, k), function() {
|
|
451
451
|
P = P.filter(function(c) {
|
|
@@ -453,12 +453,12 @@ function Ne(e) {
|
|
|
453
453
|
}), document.removeEventListener("wheel", h, k), document.removeEventListener("touchmove", h, k), document.removeEventListener("touchstart", d, k);
|
|
454
454
|
};
|
|
455
455
|
}, []);
|
|
456
|
-
var
|
|
457
|
-
return
|
|
458
|
-
|
|
456
|
+
var w = e.removeScrollBar, C = e.inert;
|
|
457
|
+
return u.createElement(
|
|
458
|
+
u.Fragment,
|
|
459
459
|
null,
|
|
460
|
-
C ?
|
|
461
|
-
|
|
460
|
+
C ? u.createElement(i, { styles: Be(a) }) : null,
|
|
461
|
+
w ? u.createElement(we, { gapMode: e.gapMode }) : null
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
464
|
function Ae(e) {
|
|
@@ -466,9 +466,9 @@ function Ae(e) {
|
|
|
466
466
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
467
467
|
return t;
|
|
468
468
|
}
|
|
469
|
-
const Ie =
|
|
470
|
-
var We =
|
|
471
|
-
return
|
|
469
|
+
const Ie = ue(K, Ne);
|
|
470
|
+
var We = u.forwardRef(function(e, t) {
|
|
471
|
+
return u.createElement(I, S({}, e, { ref: t, sideCar: Ie }));
|
|
472
472
|
});
|
|
473
473
|
We.classNames = I.classNames;
|
|
474
474
|
export {
|