@ledgerhq/lumen-ui-react 0.1.16 → 0.1.18
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/ai-rules/RULES.md +7 -1
- package/dist/index.js +148 -142
- package/dist/lib/Components/AddressInput/AddressInput.d.ts +1 -4
- package/dist/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
- package/dist/lib/Components/AddressInput/AddressInput.js +21 -21
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -4
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +32 -29
- package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -4
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.js +13 -14
- package/dist/lib/Components/Avatar/Avatar.d.ts +1 -4
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +8 -9
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -4
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +66 -73
- package/dist/lib/Components/Button/BaseButton.d.ts +1 -4
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.js +14 -15
- package/dist/lib/Components/Button/Button.d.ts +1 -4
- package/dist/lib/Components/Button/Button.d.ts.map +1 -1
- package/dist/lib/Components/Button/Button.js +6 -7
- package/dist/lib/Components/Card/Card.d.ts +10 -40
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +115 -134
- package/dist/lib/Components/CardButton/CardButton.d.ts +1 -4
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +10 -11
- package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -4
- package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.js +2 -3
- package/dist/lib/Components/ContentBanner/ContentBanner.d.ts +4 -16
- package/dist/lib/Components/ContentBanner/ContentBanner.d.ts.map +1 -1
- package/dist/lib/Components/ContentBanner/ContentBanner.js +48 -54
- package/dist/lib/Components/DataTable/DataTable.d.ts +3 -12
- package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/DataTable.js +84 -97
- package/dist/lib/Components/Dialog/Dialog.d.ts +3 -12
- package/dist/lib/Components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/Dialog.js +44 -50
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts +1 -4
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +31 -34
- package/dist/lib/Components/Divider/Divider.d.ts +1 -4
- package/dist/lib/Components/Divider/Divider.d.ts.map +1 -1
- package/dist/lib/Components/Divider/Divider.js +10 -11
- package/dist/lib/Components/Icon/Icon.d.ts +1 -4
- package/dist/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +6 -7
- package/dist/lib/Components/IconButton/IconButton.d.ts +1 -4
- package/dist/lib/Components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/lib/Components/IconButton/IconButton.js +5 -6
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +3 -11
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +24 -22
- package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -9
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts +1 -4
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +13 -14
- package/dist/lib/Components/ListItem/ListItem.d.ts +7 -28
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +60 -63
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts +3 -12
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
- package/dist/lib/Components/MediaBanner/MediaBanner.js +39 -43
- package/dist/lib/Components/MediaCard/MediaCard.d.ts +2 -8
- package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -1
- package/dist/lib/Components/MediaCard/MediaCard.js +38 -40
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +16 -0
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/MediaImage.js +74 -0
- package/dist/lib/Components/MediaImage/index.d.ts +3 -0
- package/dist/lib/Components/MediaImage/index.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/types.d.ts +38 -0
- package/dist/lib/Components/MediaImage/types.d.ts.map +1 -0
- package/dist/lib/Components/Menu/Menu.d.ts +11 -38
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +100 -116
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts +1 -4
- package/dist/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/CoinCapsule.js +8 -9
- package/dist/lib/Components/NavBar/NavBar.d.ts +7 -22
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +25 -34
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts +1 -4
- package/dist/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -1
- package/dist/lib/Components/PageIndicator/PageIndicator.js +15 -16
- package/dist/lib/Components/Popover/Popover.d.ts +1 -4
- package/dist/lib/Components/Popover/Popover.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +5 -7
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -4
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +23 -20
- package/dist/lib/Components/SearchInput/types.d.ts +1 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +0 -6
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +19 -21
- package/dist/lib/Components/Select/Select.d.ts +13 -28
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +339 -207
- package/dist/lib/Components/Select/SelectContext.d.ts +3 -1
- package/dist/lib/Components/Select/SelectContext.d.ts.map +1 -1
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/index.d.ts.map +1 -1
- package/dist/lib/Components/Select/types.d.ts +171 -140
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/useSelectItems/index.d.ts +2 -0
- package/dist/lib/Components/Select/useSelectItems/index.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +30 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.js +42 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts +13 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/utils/groupItems.js +16 -0
- package/dist/lib/Components/Select/utils/index.d.ts +2 -0
- package/dist/lib/Components/Select/utils/index.d.ts.map +1 -0
- package/dist/lib/Components/SideBar/SideBar.d.ts +5 -20
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +44 -53
- package/dist/lib/Components/Skeleton/Skeleton.d.ts +1 -4
- package/dist/lib/Components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/lib/Components/Skeleton/Skeleton.js +15 -22
- package/dist/lib/Components/Spot/Spot.d.ts +1 -4
- package/dist/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +11 -12
- package/dist/lib/Components/Stepper/Stepper.d.ts +1 -4
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +10 -11
- package/dist/lib/Components/Subheader/Subheader.d.ts +1 -4
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +14 -15
- package/dist/lib/Components/Subheader/types.d.ts +1 -1
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts +1 -4
- package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.js +2 -3
- package/dist/lib/Components/Table/Table.d.ts +16 -64
- package/dist/lib/Components/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.js +146 -176
- package/dist/lib/Components/Tag/Tag.d.ts +1 -4
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +10 -11
- package/dist/lib/Components/TextInput/TextInput.d.ts +1 -4
- package/dist/lib/Components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/lib/Components/TextInput/TextInput.js +4 -5
- package/dist/lib/Components/Tile/Tile.d.ts +6 -24
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +58 -71
- package/dist/lib/Components/TileButton/TileButton.d.ts +1 -4
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +12 -13
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts +1 -4
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.js +11 -12
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/libs/utils-shared/dist/index.js +151 -124
- package/dist/node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js +17 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js +26 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js +34 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js +27 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js +221 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js +113 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js +52 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js +65 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js +76 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js +24 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js +102 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js +596 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js +41 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/constants.js +8 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/index.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/useFilter.js +43 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/store.js +74 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js +135 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js +32 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/stateAttributesMapping.js +15 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeList.js +81 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js +55 -0
- package/dist/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js +53 -0
- package/dist/node_modules/@base-ui/react/esm/field/useField.js +51 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/constants.js +37 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js +12 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js +287 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js +71 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js +218 -4
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js +7 -3
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +3 -3
- package/dist/node_modules/@base-ui/react/esm/form/FormContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js +44 -0
- package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -8
- package/dist/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js +22 -13
- package/dist/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js +18 -0
- package/dist/node_modules/@base-ui/react/esm/utils/itemEquality.js +20 -0
- package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +13 -6
- package/dist/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/utils/resolveValueLabel.js +73 -0
- package/dist/node_modules/@base-ui/react/esm/utils/serializeValue.js +14 -0
- package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +8 -7
- package/dist/node_modules/@base-ui/utils/esm/empty.js +3 -2
- package/dist/node_modules/@base-ui/utils/esm/useControlled.js +31 -0
- package/dist/node_modules/@base-ui/utils/esm/visuallyHidden.js +5 -1
- package/dist/package.json +1 -2
- package/package.json +1 -2
|
@@ -1,109 +1,133 @@
|
|
|
1
1
|
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
function
|
|
2
|
+
import { useMemo as M, createContext as R, useRef as E, useContext as L } from "react";
|
|
3
|
+
import { clsx as W } from "clsx";
|
|
4
|
+
import { twMerge as q } from "tailwind-merge";
|
|
5
|
+
function G(e) {
|
|
6
6
|
return e ? e.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
|
|
7
7
|
}
|
|
8
|
-
const
|
|
9
|
-
function
|
|
8
|
+
const N = 48, I = 17, z = 2;
|
|
9
|
+
function H(e) {
|
|
10
10
|
const t = e.replace(/\D/g, "").length;
|
|
11
11
|
return Math.max(
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
I,
|
|
13
|
+
N - t * z
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function T(e, t = !0) {
|
|
17
17
|
if (!e) return "";
|
|
18
|
-
const
|
|
19
|
-
return
|
|
18
|
+
const a = e.includes("."), [u, l] = e.split("."), o = u.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
19
|
+
return a && t ? l ? `${o}.${l}` : `${o}.` : o;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function V(e, t = {}) {
|
|
22
22
|
const {
|
|
23
|
-
allowDecimals:
|
|
24
|
-
thousandsSeparator:
|
|
25
|
-
maxIntegerLength:
|
|
26
|
-
maxDecimalLength:
|
|
27
|
-
} = t,
|
|
28
|
-
let
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
const g =
|
|
37
|
-
|
|
23
|
+
allowDecimals: a = !0,
|
|
24
|
+
thousandsSeparator: u = !0,
|
|
25
|
+
maxIntegerLength: l = 9,
|
|
26
|
+
maxDecimalLength: o = 9
|
|
27
|
+
} = t, r = e.replace(",", ".").replace(/[^\d.]/g, "");
|
|
28
|
+
let n = r;
|
|
29
|
+
if (n = n.replace(/^0+(?=\d)/, ""), !a)
|
|
30
|
+
return n = n.replace(/\D/g, ""), l > 0 && n.length > l && (n = n.slice(0, l)), u ? T(n) : n;
|
|
31
|
+
n === "." && (n = "0.");
|
|
32
|
+
const s = n.indexOf(".");
|
|
33
|
+
if (s !== -1) {
|
|
34
|
+
let i = n.slice(0, s), f = n.slice(s + 1).replace(/\./g, "");
|
|
35
|
+
l > 0 && i.length > l && (i = i.slice(0, l)), f = f.slice(0, o), i === "" && (i = "0");
|
|
36
|
+
const g = r.endsWith(".") || n.endsWith(".");
|
|
37
|
+
n = f.length > 0 ? `${i}.${f}` : g ? `${i}.` : i;
|
|
38
38
|
} else
|
|
39
|
-
|
|
40
|
-
return
|
|
39
|
+
l > 0 && n.length > l && (n = n.slice(0, l));
|
|
40
|
+
return u ? T(n) : n;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function B(e, t) {
|
|
43
43
|
if (Object.is(e, t)) return !0;
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
(
|
|
44
|
+
const a = e, u = t, l = Object.keys(a), o = Object.keys(u);
|
|
45
|
+
return l.length !== o.length ? !1 : l.every(
|
|
46
|
+
(r) => Object.prototype.hasOwnProperty.call(u, r) && Object.is(a[r], u[r])
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
return
|
|
49
|
+
function F(e, t) {
|
|
50
|
+
const a = R(t), u = ({ children: o, value: r }) => {
|
|
51
|
+
const n = E(r);
|
|
52
|
+
return B(n.current, r) || (n.current = r), /* @__PURE__ */ S(a.Provider, { value: n.current, children: o });
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
consumerName:
|
|
57
|
-
contextRequired:
|
|
54
|
+
u.displayName = e + "Provider";
|
|
55
|
+
function l({
|
|
56
|
+
consumerName: o,
|
|
57
|
+
contextRequired: r
|
|
58
58
|
}) {
|
|
59
|
-
const
|
|
60
|
-
if (r)
|
|
61
|
-
return r;
|
|
59
|
+
const n = L(a);
|
|
62
60
|
if (n)
|
|
61
|
+
return n;
|
|
62
|
+
if (r)
|
|
63
63
|
throw new Error(
|
|
64
|
-
`${
|
|
64
|
+
`${o} must be used within ${e}`
|
|
65
65
|
);
|
|
66
66
|
return t || {};
|
|
67
67
|
}
|
|
68
|
-
return [
|
|
68
|
+
return [u, l];
|
|
69
69
|
}
|
|
70
|
-
const [
|
|
70
|
+
const [X, K] = F("Disabled", { disabled: !1 }), ee = ({
|
|
71
71
|
consumerName: e,
|
|
72
72
|
contextRequired: t,
|
|
73
|
-
mergeWith:
|
|
73
|
+
mergeWith: a
|
|
74
74
|
}) => {
|
|
75
|
-
const
|
|
75
|
+
const u = K({
|
|
76
76
|
consumerName: e,
|
|
77
77
|
contextRequired: t ?? !1
|
|
78
78
|
});
|
|
79
|
-
return !!(
|
|
79
|
+
return !!(a?.disabled || u.disabled);
|
|
80
80
|
};
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function te(...e) {
|
|
82
|
+
return q(W(e));
|
|
83
|
+
}
|
|
84
|
+
function v(e, t) {
|
|
85
|
+
if (typeof e == "function")
|
|
86
|
+
return e(t);
|
|
87
|
+
typeof e == "object" && e !== null && "current" in e && (e.current = t);
|
|
88
|
+
}
|
|
89
|
+
function U(...e) {
|
|
90
|
+
const t = /* @__PURE__ */ new Map();
|
|
91
|
+
return (a) => {
|
|
92
|
+
if (a === null) {
|
|
93
|
+
e.forEach((u) => {
|
|
94
|
+
const l = t.get(u);
|
|
95
|
+
typeof l == "function" && l(), v(u, null);
|
|
96
|
+
}), t.clear();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
e.forEach((u) => {
|
|
100
|
+
const l = v(u, a);
|
|
101
|
+
typeof l == "function" && t.set(u, l);
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function ne(...e) {
|
|
106
|
+
return M(() => U(...e), e);
|
|
83
107
|
}
|
|
84
|
-
const
|
|
108
|
+
const re = ({
|
|
85
109
|
currentStep: e,
|
|
86
110
|
totalSteps: t,
|
|
87
|
-
size:
|
|
88
|
-
label:
|
|
89
|
-
strokeWidth:
|
|
90
|
-
arcPercentage:
|
|
111
|
+
size: a,
|
|
112
|
+
label: u,
|
|
113
|
+
strokeWidth: l = 4,
|
|
114
|
+
arcPercentage: o = 0.75
|
|
91
115
|
}) => {
|
|
92
|
-
const
|
|
116
|
+
const r = Math.min(Math.max(e, 0), t), n = u ?? `${r}/${t}`, s = t <= 0 ? 0 : r / t, i = (a - l) / 2, f = a / 2, g = a / 2, d = 2 * Math.PI * i, p = d * o, b = p * (1 - s), h = r <= 0, D = `${p} ${d}`, $ = h ? p - 2 : b;
|
|
93
117
|
return {
|
|
94
|
-
displayLabel:
|
|
95
|
-
progress:
|
|
96
|
-
r:
|
|
97
|
-
cx:
|
|
118
|
+
displayLabel: n,
|
|
119
|
+
progress: s,
|
|
120
|
+
r: i,
|
|
121
|
+
cx: f,
|
|
98
122
|
cy: g,
|
|
99
|
-
circumference:
|
|
123
|
+
circumference: d,
|
|
100
124
|
trackArcLength: p,
|
|
101
|
-
trackDashArray: `${p} ${
|
|
125
|
+
trackDashArray: `${p} ${d}`,
|
|
102
126
|
progressDashArray: D,
|
|
103
|
-
progressDashOffset:
|
|
127
|
+
progressDashOffset: $,
|
|
104
128
|
showMinimalDot: h
|
|
105
129
|
};
|
|
106
|
-
},
|
|
130
|
+
}, le = (e) => M(
|
|
107
131
|
() => ({
|
|
108
132
|
integerPart: Array.from(e.integerPart, (t) => ({
|
|
109
133
|
value: t,
|
|
@@ -115,57 +139,57 @@ const ee = ({
|
|
|
115
139
|
})) : []
|
|
116
140
|
}),
|
|
117
141
|
[e.integerPart, e.decimalPart]
|
|
118
|
-
),
|
|
119
|
-
if (t) return
|
|
120
|
-
const
|
|
121
|
-
return e.currencyPosition === "end" ? `${
|
|
142
|
+
), ae = (e, t, a) => {
|
|
143
|
+
if (t) return a;
|
|
144
|
+
const u = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", l = `${e.integerPart}${u}`;
|
|
145
|
+
return e.currencyPosition === "end" ? `${l} ${e.currencyText}` : `${e.currencyText} ${l}`;
|
|
122
146
|
};
|
|
123
|
-
function
|
|
124
|
-
const { leading:
|
|
125
|
-
let
|
|
126
|
-
const p =
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
return
|
|
130
|
-
}, D = (
|
|
131
|
-
const
|
|
132
|
-
return t -
|
|
133
|
-
},
|
|
134
|
-
const
|
|
135
|
-
return
|
|
136
|
-
},
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
|
|
147
|
+
function J(e, t, a = {}) {
|
|
148
|
+
const { leading: u = !1, trailing: l = !0, maxWait: o } = a;
|
|
149
|
+
let r = null, n = null, s = null, i = 0, f = null, g = null, d;
|
|
150
|
+
const p = o !== void 0, b = p ? Math.max(o, t) : 0, h = (c) => {
|
|
151
|
+
i = c;
|
|
152
|
+
const m = f, y = g;
|
|
153
|
+
return f = null, g = null, d = e.apply(y, m), d;
|
|
154
|
+
}, D = (c) => {
|
|
155
|
+
const m = s ? c - s : 0;
|
|
156
|
+
return t - m;
|
|
157
|
+
}, $ = (c) => {
|
|
158
|
+
const m = s ? c - s : t, y = c - i;
|
|
159
|
+
return s === null || m >= t || m < 0 || p && y >= b;
|
|
160
|
+
}, w = (c) => (r = null, l && f ? h(c) : (f = null, g = null, d)), x = () => {
|
|
161
|
+
const c = Date.now();
|
|
162
|
+
if ($(c)) {
|
|
163
|
+
w(c);
|
|
140
164
|
return;
|
|
141
165
|
}
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
}, A = () =>
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
if (
|
|
152
|
-
return
|
|
166
|
+
r = setTimeout(x, D(c));
|
|
167
|
+
}, k = () => {
|
|
168
|
+
const c = Date.now();
|
|
169
|
+
n = null, f && (h(c), r !== null && (clearTimeout(r), r = setTimeout(x, t)));
|
|
170
|
+
}, C = (c) => (i = c, r = setTimeout(x, t), p && (n = setTimeout(k, b)), u ? h(c) : d), j = () => {
|
|
171
|
+
r !== null && clearTimeout(r), n !== null && clearTimeout(n), i = 0, f = null, g = null, s = null, r = null, n = null;
|
|
172
|
+
}, A = () => r === null && n === null ? d : w(Date.now()), O = () => r !== null || n !== null, P = function(...c) {
|
|
173
|
+
const m = Date.now(), y = $(m);
|
|
174
|
+
if (f = c, g = this, s = m, y) {
|
|
175
|
+
if (r === null)
|
|
176
|
+
return C(m);
|
|
153
177
|
if (p)
|
|
154
|
-
return clearTimeout(
|
|
178
|
+
return clearTimeout(r), r = setTimeout(x, t), h(m);
|
|
155
179
|
}
|
|
156
|
-
return
|
|
180
|
+
return r === null && (r = setTimeout(x, t)), d;
|
|
157
181
|
};
|
|
158
|
-
return P.cancel =
|
|
182
|
+
return P.cancel = j, P.flush = A, P.pending = O, P;
|
|
159
183
|
}
|
|
160
|
-
function
|
|
161
|
-
const { leading:
|
|
162
|
-
return
|
|
163
|
-
leading:
|
|
164
|
-
trailing:
|
|
184
|
+
function ue(e, t, a = {}) {
|
|
185
|
+
const { leading: u = !0, trailing: l = !0 } = a;
|
|
186
|
+
return J(e, t, {
|
|
187
|
+
leading: u,
|
|
188
|
+
trailing: l,
|
|
165
189
|
maxWait: t
|
|
166
190
|
});
|
|
167
191
|
}
|
|
168
|
-
const
|
|
192
|
+
const ce = ({
|
|
169
193
|
onClick: e,
|
|
170
194
|
disabled: t
|
|
171
195
|
}) => e ? t ? {
|
|
@@ -175,25 +199,28 @@ const le = ({
|
|
|
175
199
|
} : {
|
|
176
200
|
role: "button",
|
|
177
201
|
tabIndex: 0,
|
|
178
|
-
onKeyDown: (
|
|
179
|
-
(
|
|
202
|
+
onKeyDown: (a) => {
|
|
203
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), e?.(a));
|
|
180
204
|
},
|
|
181
205
|
onClick: e
|
|
182
206
|
} : void 0;
|
|
183
207
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
208
|
+
X as DisabledProvider,
|
|
209
|
+
v as assignRef,
|
|
210
|
+
ae as buildAriaLabel,
|
|
211
|
+
te as cn,
|
|
212
|
+
F as createSafeContext,
|
|
213
|
+
J as debounce,
|
|
214
|
+
T as formatThousands,
|
|
215
|
+
ce as getButtonA11yProps,
|
|
216
|
+
H as getFontSize,
|
|
217
|
+
re as getStepperCalculations,
|
|
218
|
+
U as mergeRefs,
|
|
219
|
+
B as shallowEqual,
|
|
220
|
+
V as textFormatter,
|
|
221
|
+
ue as throttle,
|
|
222
|
+
G as toPascalCase,
|
|
223
|
+
ee as useDisabledContext,
|
|
224
|
+
ne as useMergedRef,
|
|
225
|
+
le as useSplitText
|
|
199
226
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
const t = /* @__PURE__ */ o.createContext(void 0);
|
|
3
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "ComboboxChipsContext");
|
|
4
|
+
function e() {
|
|
5
|
+
return o.useContext(t);
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
t as ComboboxChipsContext,
|
|
9
|
+
e as useComboboxChipsContext
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as m from "react";
|
|
2
|
+
import { useComboboxDerivedItemsContext as i } from "../root/ComboboxRootContext.js";
|
|
3
|
+
import { useGroupCollectionContext as s } from "./GroupCollectionContext.js";
|
|
4
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
+
function f(e) {
|
|
6
|
+
const {
|
|
7
|
+
children: r
|
|
8
|
+
} = e, {
|
|
9
|
+
filteredItems: n
|
|
10
|
+
} = i(), o = s(), t = o ? o.items : n;
|
|
11
|
+
return t ? /* @__PURE__ */ c(m.Fragment, {
|
|
12
|
+
children: t.map(r)
|
|
13
|
+
}) : null;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
f as ComboboxCollection
|
|
17
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
const e = /* @__PURE__ */ o.createContext(null);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (e.displayName = "GroupCollectionContext");
|
|
5
|
+
function u() {
|
|
6
|
+
return o.useContext(e);
|
|
7
|
+
}
|
|
8
|
+
function s(n) {
|
|
9
|
+
const {
|
|
10
|
+
children: r,
|
|
11
|
+
items: t
|
|
12
|
+
} = n, c = o.useMemo(() => ({
|
|
13
|
+
items: t
|
|
14
|
+
}), [t]);
|
|
15
|
+
return /* @__PURE__ */ i(e.Provider, {
|
|
16
|
+
value: c,
|
|
17
|
+
children: r
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
s as GroupCollectionProvider,
|
|
22
|
+
u as useGroupCollectionContext
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { useRenderElement as a } from "../../utils/useRenderElement.js";
|
|
3
|
+
import { useComboboxDerivedItemsContext as l, useComboboxRootContext as p } from "../root/ComboboxRootContext.js";
|
|
4
|
+
const c = /* @__PURE__ */ i.forwardRef(function(e, o) {
|
|
5
|
+
const {
|
|
6
|
+
render: b,
|
|
7
|
+
className: f,
|
|
8
|
+
children: t,
|
|
9
|
+
...r
|
|
10
|
+
} = e, {
|
|
11
|
+
filteredItems: m
|
|
12
|
+
} = l(), s = p(), n = m.length === 0 ? t : null;
|
|
13
|
+
return a("div", e, {
|
|
14
|
+
ref: [o, s.state.emptyRef],
|
|
15
|
+
props: [{
|
|
16
|
+
children: n,
|
|
17
|
+
role: "status",
|
|
18
|
+
"aria-live": "polite",
|
|
19
|
+
"aria-atomic": !0
|
|
20
|
+
}, r]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "ComboboxEmpty");
|
|
24
|
+
export {
|
|
25
|
+
c as ComboboxEmpty
|
|
26
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { useRenderElement as u } from "../../utils/useRenderElement.js";
|
|
3
|
+
import { ComboboxGroupContext as c } from "./ComboboxGroupContext.js";
|
|
4
|
+
import { GroupCollectionProvider as d } from "../collection/GroupCollectionContext.js";
|
|
5
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
6
|
+
const b = /* @__PURE__ */ r.forwardRef(function(t, i) {
|
|
7
|
+
const {
|
|
8
|
+
render: x,
|
|
9
|
+
className: C,
|
|
10
|
+
items: o,
|
|
11
|
+
...l
|
|
12
|
+
} = t, [e, m] = r.useState(), p = r.useMemo(() => ({
|
|
13
|
+
labelId: e,
|
|
14
|
+
setLabelId: m,
|
|
15
|
+
items: o
|
|
16
|
+
}), [e, m, o]), a = u("div", t, {
|
|
17
|
+
ref: i,
|
|
18
|
+
props: [{
|
|
19
|
+
role: "group",
|
|
20
|
+
"aria-labelledby": e
|
|
21
|
+
}, l]
|
|
22
|
+
}), n = /* @__PURE__ */ s(c.Provider, {
|
|
23
|
+
value: p,
|
|
24
|
+
children: a
|
|
25
|
+
});
|
|
26
|
+
return o ? /* @__PURE__ */ s(d, {
|
|
27
|
+
items: o,
|
|
28
|
+
children: n
|
|
29
|
+
}) : n;
|
|
30
|
+
});
|
|
31
|
+
process.env.NODE_ENV !== "production" && (b.displayName = "ComboboxGroup");
|
|
32
|
+
export {
|
|
33
|
+
b as ComboboxGroup
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import r from "../../../../utils/esm/formatErrorMessage.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
const e = /* @__PURE__ */ t.createContext(void 0);
|
|
4
|
+
process.env.NODE_ENV !== "production" && (e.displayName = "ComboboxGroupContext");
|
|
5
|
+
function s() {
|
|
6
|
+
const o = t.useContext(e);
|
|
7
|
+
if (o === void 0)
|
|
8
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>." : r(18));
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
e as ComboboxGroupContext,
|
|
13
|
+
s as useComboboxGroupContext
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useIsoLayoutEffect as i } from "../../../../utils/esm/useIsoLayoutEffect.js";
|
|
3
|
+
import { useBaseUiId as p } from "../../utils/useBaseUiId.js";
|
|
4
|
+
import { useComboboxGroupContext as u } from "../group/ComboboxGroupContext.js";
|
|
5
|
+
import { useRenderElement as a } from "../../utils/useRenderElement.js";
|
|
6
|
+
const d = /* @__PURE__ */ n.forwardRef(function(r, t) {
|
|
7
|
+
const {
|
|
8
|
+
render: b,
|
|
9
|
+
className: c,
|
|
10
|
+
id: m,
|
|
11
|
+
...s
|
|
12
|
+
} = r, {
|
|
13
|
+
setLabelId: o
|
|
14
|
+
} = u(), e = p(m);
|
|
15
|
+
return i(() => (o(e), () => {
|
|
16
|
+
o(void 0);
|
|
17
|
+
}), [e, o]), a("div", r, {
|
|
18
|
+
ref: t,
|
|
19
|
+
props: [{
|
|
20
|
+
id: e
|
|
21
|
+
}, s]
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
process.env.NODE_ENV !== "production" && (d.displayName = "ComboboxGroupLabel");
|
|
25
|
+
export {
|
|
26
|
+
d as ComboboxGroupLabel
|
|
27
|
+
};
|