@ledgerhq/lumen-ui-react 0.1.15 → 0.1.17
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 +2 -2
- package/dist/i18n/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -142
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +24 -24
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +78 -85
- package/dist/lib/Components/CardButton/CardButton.js +10 -10
- package/dist/lib/Components/Dialog/Dialog.js +39 -39
- package/dist/lib/Components/Dialog/types.d.ts +3 -3
- package/dist/lib/Components/Icon/Icon.js +5 -5
- package/dist/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +25 -32
- package/dist/lib/Components/ListItem/ListItem.d.ts +17 -28
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +81 -93
- package/dist/lib/Components/ListItem/types.d.ts +13 -32
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +19 -0
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/MediaImage.js +75 -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 +4 -4
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts +0 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +7 -7
- package/dist/lib/Components/Popover/types.d.ts +3 -3
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +24 -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 +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +97 -81
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -0
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/types.d.ts +7 -0
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts +5 -6
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.js +30 -25
- package/dist/lib/Components/Select/Select.d.ts +27 -12
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +356 -202
- 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 +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +93 -89
- package/dist/lib/Components/SideBar/types.d.ts +7 -1
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.d.ts +5 -6
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +100 -102
- package/dist/lib/Components/Stepper/types.d.ts +2 -2
- package/dist/lib/Components/Stepper/types.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +1 -1
- package/dist/lib/Components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/lib/Components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.js +8 -8
- 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/node_modules/i18next/dist/esm/i18next.js +45 -47
- package/dist/package.json +1 -2
- package/dist/utils/icon-template.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/lib/Patterns/index.d.ts +0 -3
- package/dist/lib/Patterns/index.d.ts.map +0 -1
|
@@ -4,8 +4,8 @@ import { cva as l } from "class-variance-authority";
|
|
|
4
4
|
import { createPopoverHandle as v } from "../../../node_modules/@base-ui/react/esm/popover/store/PopoverHandle.js";
|
|
5
5
|
import { PopoverRoot as c } from "../../../node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js";
|
|
6
6
|
import { PopoverTrigger as f } from "../../../node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js";
|
|
7
|
-
import { PopoverPortal as
|
|
8
|
-
import { PopoverBackdrop as
|
|
7
|
+
import { PopoverPortal as P } from "../../../node_modules/@base-ui/react/esm/popover/portal/PopoverPortal.js";
|
|
8
|
+
import { PopoverBackdrop as u } from "../../../node_modules/@base-ui/react/esm/popover/backdrop/PopoverBackdrop.js";
|
|
9
9
|
import { PopoverPositioner as g } from "../../../node_modules/@base-ui/react/esm/popover/positioner/PopoverPositioner.js";
|
|
10
10
|
import { PopoverPopup as h } from "../../../node_modules/@base-ui/react/esm/popover/popup/PopoverPopup.js";
|
|
11
11
|
const [x, b] = m("Popover"), y = l(
|
|
@@ -13,7 +13,7 @@ const [x, b] = m("Popover"), y = l(
|
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
width: {
|
|
16
|
-
|
|
16
|
+
fit: "",
|
|
17
17
|
fixed: "w-400"
|
|
18
18
|
},
|
|
19
19
|
side: {
|
|
@@ -36,7 +36,7 @@ const [x, b] = m("Popover"), y = l(
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
defaultVariants: {
|
|
39
|
-
width: "
|
|
39
|
+
width: "fit"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
), C = p(
|
|
@@ -82,7 +82,7 @@ const O = ({
|
|
|
82
82
|
side: o = "bottom",
|
|
83
83
|
sideOffset: a = 8,
|
|
84
84
|
align: r = "start",
|
|
85
|
-
width: e = "
|
|
85
|
+
width: e = "fit",
|
|
86
86
|
className: n,
|
|
87
87
|
children: i
|
|
88
88
|
}) => {
|
|
@@ -90,9 +90,9 @@ const O = ({
|
|
|
90
90
|
consumerName: "PopoverContent",
|
|
91
91
|
contextRequired: !0
|
|
92
92
|
});
|
|
93
|
-
return /* @__PURE__ */ d(
|
|
93
|
+
return /* @__PURE__ */ d(P, { children: [
|
|
94
94
|
s && /* @__PURE__ */ t(
|
|
95
|
-
|
|
95
|
+
u,
|
|
96
96
|
{
|
|
97
97
|
"data-slot": "popover-overlay",
|
|
98
98
|
className: C
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PopoverRootChangeEventDetails, Popover as PopoverNamespace } from '@base-ui/react/popover';
|
|
2
2
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
3
|
type PopoverHandle<Payload> = PopoverNamespace.Handle<Payload>;
|
|
4
|
-
export type PopoverWidth = '
|
|
4
|
+
export type PopoverWidth = 'fit' | 'fixed';
|
|
5
5
|
export type PopoverSide = 'top' | 'right' | 'bottom' | 'left';
|
|
6
6
|
export type PopoverAlign = 'start' | 'center' | 'end';
|
|
7
7
|
/**
|
|
@@ -104,10 +104,10 @@ export type PopoverContentProps = {
|
|
|
104
104
|
align?: PopoverAlign;
|
|
105
105
|
/**
|
|
106
106
|
* The width behavior of the popover content panel.
|
|
107
|
-
* - `'
|
|
107
|
+
* - `'fit'`: Content-fit width (default), define custom width with the `className` prop
|
|
108
108
|
* - `'fixed'`: Always exactly 400px width
|
|
109
109
|
*
|
|
110
|
-
* @default '
|
|
110
|
+
* @default 'fit'
|
|
111
111
|
*/
|
|
112
112
|
width?: PopoverWidth;
|
|
113
113
|
/**
|
|
@@ -54,7 +54,7 @@ import { SearchInputProps } from './types';
|
|
|
54
54
|
* />
|
|
55
55
|
*/
|
|
56
56
|
export declare const SearchInput: {
|
|
57
|
-
({ ref, appearance, className, inputClassName, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
({ ref, appearance, className, inputClassName, containerClassName, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
displayName: string;
|
|
59
59
|
};
|
|
60
60
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4B3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4B3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW;mFAOrB,gBAAgB;;CAwBlB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { BaseInput as
|
|
5
|
-
import { Search as
|
|
6
|
-
const
|
|
2
|
+
import { cn as t } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as e } from "class-variance-authority";
|
|
4
|
+
import { BaseInput as d } from "../BaseInput/BaseInput.js";
|
|
5
|
+
import { Search as c } from "../../Symbols/Icons/Search.js";
|
|
6
|
+
const m = e("", {
|
|
7
7
|
variants: {
|
|
8
8
|
appearance: {
|
|
9
9
|
plain: "",
|
|
@@ -13,7 +13,7 @@ const c = t("", {
|
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
appearance: "plain"
|
|
15
15
|
}
|
|
16
|
-
}),
|
|
16
|
+
}), l = e("", {
|
|
17
17
|
variants: {
|
|
18
18
|
appearance: {
|
|
19
19
|
plain: "",
|
|
@@ -23,31 +23,35 @@ const c = t("", {
|
|
|
23
23
|
defaultVariants: {
|
|
24
24
|
appearance: "plain"
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
27
|
-
ref:
|
|
26
|
+
}), u = ({
|
|
27
|
+
ref: n,
|
|
28
28
|
appearance: a = "plain",
|
|
29
|
-
className:
|
|
30
|
-
inputClassName:
|
|
31
|
-
|
|
29
|
+
className: s,
|
|
30
|
+
inputClassName: p,
|
|
31
|
+
containerClassName: i,
|
|
32
|
+
...o
|
|
32
33
|
}) => /* @__PURE__ */ r(
|
|
33
|
-
|
|
34
|
+
d,
|
|
34
35
|
{
|
|
35
|
-
ref:
|
|
36
|
+
ref: n,
|
|
36
37
|
prefix: /* @__PURE__ */ r(
|
|
37
|
-
|
|
38
|
+
c,
|
|
38
39
|
{
|
|
39
40
|
size: 20,
|
|
40
41
|
className: "text-muted group-has-disabled:text-disabled",
|
|
41
42
|
"aria-hidden": "true"
|
|
42
43
|
}
|
|
43
44
|
),
|
|
44
|
-
className:
|
|
45
|
-
containerClassName:
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
className: s,
|
|
46
|
+
containerClassName: t(
|
|
47
|
+
m({ appearance: a }),
|
|
48
|
+
i
|
|
49
|
+
),
|
|
50
|
+
inputClassName: t(l({ appearance: a }), p),
|
|
51
|
+
...o
|
|
48
52
|
}
|
|
49
53
|
);
|
|
50
|
-
|
|
54
|
+
u.displayName = "SearchInput";
|
|
51
55
|
export {
|
|
52
|
-
|
|
56
|
+
u as SearchInput
|
|
53
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { BaseInputProps } from '../BaseInput/types';
|
|
3
|
-
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName'
|
|
3
|
+
export type SearchInputProps = Omit<BaseInputProps, 'prefix' | 'label' | 'labelClassName'> & {
|
|
4
4
|
/**
|
|
5
5
|
* The visual appearance of the search input
|
|
6
6
|
* @default 'plain'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SearchInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CACtC,GAAG;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;CACtC,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ export declare function SegmentedControlButton({ value, children, icon: Icon, on
|
|
|
3
3
|
export declare namespace SegmentedControlButton {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function SegmentedControl({ selectedValue, onSelectedChange, children, className, disabled: disabledProp, appearance, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function SegmentedControl({ selectedValue, onSelectedChange, children, className, disabled: disabledProp, appearance, tabLayout, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare namespace SegmentedControl {
|
|
8
8
|
var displayName: string;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAwDjB,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CA+B7B;yBAtCe,sBAAsB;;;AA0CtC,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,YAAY,EACtB,UAAyB,EACzB,SAAmB,EACnB,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA+CvB;yBAxDe,gBAAgB"}
|
|
@@ -1,126 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useSegmentedControlContext as
|
|
6
|
-
import { useSegmentedControlSelectedIndex as
|
|
7
|
-
const
|
|
8
|
-
root:
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x, useDisabledContext as h } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
import { useRef as v } from "react";
|
|
5
|
+
import { useSegmentedControlContext as y, SegmentedControlContextProvider as C } from "./SegmentedControlContext.js";
|
|
6
|
+
import { useSegmentedControlSelectedIndex as N, usePillElementLayoutEffect as S } from "./usePillElementLayoutEffect.js";
|
|
7
|
+
const b = {
|
|
8
|
+
root: f("relative flex flex-row items-center rounded-sm", {
|
|
9
9
|
variants: {
|
|
10
10
|
appearance: {
|
|
11
11
|
background: "bg-surface",
|
|
12
12
|
"no-background": "bg-transparent"
|
|
13
|
+
},
|
|
14
|
+
tabLayout: {
|
|
15
|
+
fit: "inline-flex",
|
|
16
|
+
fixed: "w-full"
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
}),
|
|
16
|
-
pill:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
pill: f("pointer-events-none absolute top-0 left-0 z-0 rounded-sm", {
|
|
21
|
+
variants: {
|
|
22
|
+
disabled: {
|
|
23
|
+
true: "bg-base-transparent-pressed",
|
|
24
|
+
false: "bg-muted-transparent"
|
|
25
|
+
},
|
|
26
|
+
isReady: {
|
|
27
|
+
true: "transition-[transform,width] duration-250 ease-in-out",
|
|
28
|
+
false: "transition-none"
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
|
-
),
|
|
27
|
-
item:
|
|
28
|
-
"z-10 flex
|
|
31
|
+
}),
|
|
32
|
+
item: f(
|
|
33
|
+
"z-10 flex cursor-pointer flex-row items-center justify-center rounded-sm px-16 py-8 select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-not-allowed",
|
|
29
34
|
{
|
|
30
35
|
variants: {
|
|
31
36
|
selected: {
|
|
32
|
-
true: "body-2-semi-bold
|
|
33
|
-
false: "body-2
|
|
37
|
+
true: "body-2-semi-bold",
|
|
38
|
+
false: "body-2"
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
true: "text-muted",
|
|
42
|
+
false: ""
|
|
34
43
|
}
|
|
35
|
-
}
|
|
44
|
+
},
|
|
45
|
+
compoundVariants: [
|
|
46
|
+
{ selected: !0, disabled: !1, className: "text-base" },
|
|
47
|
+
{
|
|
48
|
+
selected: !1,
|
|
49
|
+
disabled: !1,
|
|
50
|
+
className: "text-muted hover:text-muted-hover"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
36
53
|
}
|
|
37
54
|
)
|
|
38
55
|
};
|
|
39
|
-
function
|
|
40
|
-
value:
|
|
41
|
-
children:
|
|
42
|
-
icon:
|
|
43
|
-
onClick:
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
56
|
+
function w({
|
|
57
|
+
value: s,
|
|
58
|
+
children: l,
|
|
59
|
+
icon: t,
|
|
60
|
+
onClick: d,
|
|
61
|
+
className: m,
|
|
62
|
+
...c
|
|
46
63
|
}) {
|
|
47
|
-
const { selectedValue:
|
|
48
|
-
return /* @__PURE__ */
|
|
64
|
+
const { selectedValue: a, onSelectedChange: u, disabled: e, tabLayout: r } = y(), i = a === s;
|
|
65
|
+
return /* @__PURE__ */ o(
|
|
49
66
|
"button",
|
|
50
67
|
{
|
|
51
68
|
type: "button",
|
|
52
69
|
role: "radio",
|
|
53
70
|
"aria-checked": i,
|
|
54
|
-
"aria-disabled":
|
|
55
|
-
disabled:
|
|
56
|
-
onClick: (
|
|
57
|
-
|
|
71
|
+
"aria-disabled": e,
|
|
72
|
+
disabled: e,
|
|
73
|
+
onClick: (n) => {
|
|
74
|
+
e || (u(s), d?.(n));
|
|
58
75
|
},
|
|
59
|
-
className:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
d
|
|
76
|
+
className: x(
|
|
77
|
+
b.item({ selected: i, disabled: !!e }),
|
|
78
|
+
r === "fixed" && "min-w-0 flex-1",
|
|
79
|
+
m
|
|
64
80
|
),
|
|
65
|
-
...
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
/* @__PURE__ */
|
|
81
|
+
...c,
|
|
82
|
+
children: /* @__PURE__ */ p("span", { className: "inline-flex min-w-0 items-center justify-center gap-8", children: [
|
|
83
|
+
t && /* @__PURE__ */ o(t, { size: 16, className: "shrink-0" }),
|
|
84
|
+
/* @__PURE__ */ o("span", { className: "truncate", children: l })
|
|
69
85
|
] })
|
|
70
86
|
}
|
|
71
87
|
);
|
|
72
88
|
}
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
selectedValue:
|
|
76
|
-
onSelectedChange:
|
|
77
|
-
children:
|
|
78
|
-
className:
|
|
79
|
-
disabled:
|
|
80
|
-
appearance:
|
|
89
|
+
w.displayName = "SegmentedControlButton";
|
|
90
|
+
function k({
|
|
91
|
+
selectedValue: s,
|
|
92
|
+
onSelectedChange: l,
|
|
93
|
+
children: t,
|
|
94
|
+
className: d,
|
|
95
|
+
disabled: m,
|
|
96
|
+
appearance: c = "background",
|
|
97
|
+
tabLayout: a = "fixed",
|
|
81
98
|
...u
|
|
82
99
|
}) {
|
|
83
|
-
const
|
|
100
|
+
const e = h({
|
|
84
101
|
consumerName: "SegmentedControl",
|
|
85
|
-
mergeWith: { disabled:
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
), { pill:
|
|
90
|
-
ref:
|
|
102
|
+
mergeWith: { disabled: m }
|
|
103
|
+
}), r = v(null), i = N(
|
|
104
|
+
s,
|
|
105
|
+
t
|
|
106
|
+
), { pill: n, isReady: g } = S({
|
|
107
|
+
ref: r,
|
|
91
108
|
selectedIndex: i,
|
|
92
|
-
children:
|
|
109
|
+
children: t
|
|
93
110
|
});
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
111
|
+
return /* @__PURE__ */ o(
|
|
112
|
+
C,
|
|
96
113
|
{
|
|
97
|
-
value: { selectedValue:
|
|
98
|
-
children: /* @__PURE__ */
|
|
114
|
+
value: { selectedValue: s, onSelectedChange: l, disabled: e, tabLayout: a },
|
|
115
|
+
children: /* @__PURE__ */ p(
|
|
99
116
|
"div",
|
|
100
117
|
{
|
|
101
118
|
...u,
|
|
102
|
-
ref:
|
|
119
|
+
ref: r,
|
|
103
120
|
role: "radiogroup",
|
|
104
|
-
"aria-disabled":
|
|
105
|
-
className:
|
|
106
|
-
|
|
107
|
-
appearance:
|
|
121
|
+
"aria-disabled": e,
|
|
122
|
+
className: x(
|
|
123
|
+
b.root({
|
|
124
|
+
appearance: c,
|
|
125
|
+
tabLayout: a
|
|
108
126
|
}),
|
|
109
|
-
|
|
127
|
+
d
|
|
110
128
|
),
|
|
111
129
|
children: [
|
|
112
|
-
|
|
113
|
-
/* @__PURE__ */
|
|
130
|
+
t,
|
|
131
|
+
/* @__PURE__ */ o(
|
|
114
132
|
"div",
|
|
115
133
|
{
|
|
116
134
|
"aria-hidden": !0,
|
|
117
|
-
className:
|
|
118
|
-
disabled: n
|
|
119
|
-
}),
|
|
135
|
+
className: b.pill({ disabled: e, isReady: g }),
|
|
120
136
|
style: {
|
|
121
|
-
width:
|
|
122
|
-
height:
|
|
123
|
-
transform: `translateX(${
|
|
137
|
+
width: n.width,
|
|
138
|
+
height: n.height,
|
|
139
|
+
transform: `translateX(${n.x}px)`
|
|
124
140
|
}
|
|
125
141
|
}
|
|
126
142
|
)
|
|
@@ -130,8 +146,8 @@ function w({
|
|
|
130
146
|
}
|
|
131
147
|
);
|
|
132
148
|
}
|
|
133
|
-
|
|
149
|
+
k.displayName = "SegmentedControl";
|
|
134
150
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
k as SegmentedControl,
|
|
152
|
+
w as SegmentedControlButton
|
|
137
153
|
};
|
|
@@ -2,6 +2,7 @@ export type SegmentedControlContextValue = {
|
|
|
2
2
|
selectedValue: string;
|
|
3
3
|
onSelectedChange: (value: string) => void;
|
|
4
4
|
disabled: boolean;
|
|
5
|
+
tabLayout: 'fit' | 'fixed';
|
|
5
6
|
};
|
|
6
7
|
declare const SegmentedControlContextProvider: import('react').FC<{
|
|
7
8
|
children: import('react').ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/SegmentedControlContext.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,4BAA4B,GAAG;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControlContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/SegmentedControlContext.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,4BAA4B,GAAG;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,KAAK,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAO,+BAA+B;;;EAC+B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,oCAInC,CAAC;AAEL,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
|
|
@@ -18,6 +18,13 @@ export type SegmentedControlProps = {
|
|
|
18
18
|
* @default 'background'
|
|
19
19
|
*/
|
|
20
20
|
appearance?: 'background' | 'no-background';
|
|
21
|
+
/**
|
|
22
|
+
* Controls how tab widths are calculated.
|
|
23
|
+
* - "fit": each tab sizes to its content
|
|
24
|
+
* - "fixed": all tabs share equal width, filling the container
|
|
25
|
+
* @default 'fixed'
|
|
26
|
+
*/
|
|
27
|
+
tabLayout?: 'fit' | 'fixed';
|
|
21
28
|
/**
|
|
22
29
|
* Segment buttons (SegmentedControlButton).
|
|
23
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,GAAG,eAAe,CAAC;IAC5C;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD,KAAK,aAAa,GAAG,aAAa,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,GAAG,eAAe,CAAC;IAC5C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD,KAAK,aAAa,GAAG,aAAa,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export type PillLayout = {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
x: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
export declare function usePillElementLayoutEffect({ ref, selectedIndex, children, }: {
|
|
8
8
|
ref: React.RefObject<HTMLDivElement | null>;
|
|
9
9
|
selectedIndex: number;
|
|
10
10
|
children: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare function usePillElementLayoutEffect({ ref, selectedIndex, children, }: UsePillElementLayoutEffectParams): {
|
|
11
|
+
}): {
|
|
13
12
|
pill: PillLayout;
|
|
13
|
+
isReady: boolean;
|
|
14
14
|
};
|
|
15
|
-
export declare function useSegmentedControlSelectedIndex(selectedValue: string, children:
|
|
16
|
-
export {};
|
|
15
|
+
export declare function useSegmentedControlSelectedIndex(selectedValue: string, children: ReactNode): number;
|
|
17
16
|
//# sourceMappingURL=usePillElementLayoutEffect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePillElementLayoutEffect.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/usePillElementLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"usePillElementLayoutEffect.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/usePillElementLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,aAAa,EACb,QAAQ,GACT,EAAE;IACD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAkCzC;AAED,wBAAgB,gCAAgC,CAC9C,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,SAAS,GAClB,MAAM,CAUR"}
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
ref:
|
|
4
|
-
selectedIndex:
|
|
5
|
-
children:
|
|
1
|
+
import { useMemo as h, Children as y, isValidElement as g, useState as u, useLayoutEffect as p, useEffect as v } from "react";
|
|
2
|
+
function R({
|
|
3
|
+
ref: n,
|
|
4
|
+
selectedIndex: e,
|
|
5
|
+
children: r
|
|
6
6
|
}) {
|
|
7
|
-
const [f,
|
|
7
|
+
const [f, c] = u({ width: 0, height: 0, x: 0 }), [a, l] = u(!1);
|
|
8
8
|
return p(() => {
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
11
|
-
const
|
|
12
|
-
const {
|
|
13
|
-
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
16
|
-
x:
|
|
9
|
+
const t = n.current;
|
|
10
|
+
if (!t) return;
|
|
11
|
+
const o = () => {
|
|
12
|
+
const { height: d } = t.getBoundingClientRect(), m = Array.from(t.children).slice(0, -1), i = e >= 0 ? m[e] : void 0;
|
|
13
|
+
c({
|
|
14
|
+
width: i?.offsetWidth ?? 0,
|
|
15
|
+
height: d,
|
|
16
|
+
x: i?.offsetLeft ?? 0
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
if (
|
|
20
|
-
const s = new ResizeObserver(
|
|
21
|
-
return s.observe(
|
|
22
|
-
}, [
|
|
19
|
+
if (o(), typeof ResizeObserver > "u") return;
|
|
20
|
+
const s = new ResizeObserver(o);
|
|
21
|
+
return s.observe(t), () => s.disconnect();
|
|
22
|
+
}, [r, e, n]), v(() => {
|
|
23
|
+
const t = requestAnimationFrame(() => {
|
|
24
|
+
l(!0);
|
|
25
|
+
});
|
|
26
|
+
return () => cancelAnimationFrame(t);
|
|
27
|
+
}, []), { pill: f, isReady: a };
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
26
|
-
() =>
|
|
27
|
-
(
|
|
29
|
+
function b(n, e) {
|
|
30
|
+
return h(
|
|
31
|
+
() => y.toArray(e).findIndex(
|
|
32
|
+
(r) => g(r) && r.props.value === n
|
|
28
33
|
),
|
|
29
|
-
[
|
|
34
|
+
[n, e]
|
|
30
35
|
);
|
|
31
36
|
}
|
|
32
37
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
R as usePillElementLayoutEffect,
|
|
39
|
+
b as useSegmentedControlSelectedIndex
|
|
35
40
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { SelectProps, SelectTriggerProps, SelectContentProps,
|
|
2
|
-
declare function Select({ value, defaultValue, onValueChange, disabled: disabledProp,
|
|
3
|
-
declare function SelectGroup({ ...props }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { SelectProps, SelectTriggerProps, SelectContentProps, SelectListProps, SelectSearchProps, SelectItemTextProps, SelectItemProps, SelectItemContentProps, SelectItemDescriptionProps, SelectSeparatorProps, SelectEmptyStateProps, SelectTriggerButtonProps } from './types';
|
|
2
|
+
declare function Select({ value, defaultValue, onValueChange, disabled: disabledProp, items, filter, filteredItems, searchValue: searchValueProp, defaultSearchValue, onSearchValueChange, open, defaultOpen, onOpenChange, name, required, children, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare const SelectTrigger: {
|
|
5
4
|
({ render, disabled, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
displayName: string
|
|
5
|
+
displayName: string;
|
|
7
6
|
};
|
|
8
7
|
declare const SelectContent: {
|
|
9
|
-
({ ref, className, children,
|
|
10
|
-
displayName: string
|
|
8
|
+
({ ref, className, children, side, sideOffset, align, autoFocusSearch, ...props }: SelectContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
11
10
|
};
|
|
12
|
-
declare const
|
|
13
|
-
({ ref, className, ...props }:
|
|
14
|
-
displayName: string
|
|
11
|
+
declare const SelectList: {
|
|
12
|
+
({ ref, className, renderItem, ...props }: SelectListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
15
14
|
};
|
|
16
15
|
declare const SelectItem: {
|
|
17
16
|
({ ref, className, children, ...props }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
displayName: string
|
|
17
|
+
displayName: string;
|
|
19
18
|
};
|
|
20
19
|
declare const SelectSeparator: {
|
|
21
20
|
({ ref, className, ...props }: SelectSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,8 +22,24 @@ declare const SelectSeparator: {
|
|
|
23
22
|
};
|
|
24
23
|
declare const SelectItemText: {
|
|
25
24
|
({ ref, className, ...props }: SelectItemTextProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
displayName: string
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
declare const SelectItemContent: {
|
|
28
|
+
({ ref, className, children, ...props }: SelectItemContentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
declare const SelectItemDescription: {
|
|
32
|
+
({ ref, className, children, ...props }: SelectItemDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
declare const SelectSearch: {
|
|
36
|
+
({ className, placeholder, errorMessage, "aria-invalid": ariaInvalid, suffix, onClear, hideClearButton, }: SelectSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
declare const SelectEmptyState: {
|
|
40
|
+
({ ref, className, title, description, ...props }: SelectEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
27
42
|
};
|
|
28
43
|
declare const SelectTriggerButton: ({ selectedValue, selectedContent, label, ...props }: SelectTriggerButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export { Select,
|
|
44
|
+
export { Select, SelectTrigger, SelectContent, SelectSearch, SelectList, SelectItemText, SelectItemContent, SelectItemDescription, SelectItem, SelectSeparator, SelectEmptyState, SelectTriggerButton, };
|
|
30
45
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EAEjB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAGjB,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EAAE,YAAY,EACtB,KAAK,EACL,MAAM,EACN,aAAa,EACb,WAAW,EAAE,eAAe,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE,WAAW,2CAsDb;AA6DD,QAAA,MAAM,aAAa;qCAAoC,kBAAkB;;CAmBxE,CAAC;AAiCF,QAAA,MAAM,aAAa;uFAShB,kBAAkB;;CAmBpB,CAAC;AAGF,QAAA,MAAM,UAAU;+CAKb,eAAe;;CA+BjB,CAAC;AAuBF,QAAA,MAAM,UAAU;6CAKb,eAAe;;CAYjB,CAAC;AAGF,QAAA,MAAM,eAAe;mCAIlB,oBAAoB;;CAEtB,CAAC;AAGF,QAAA,MAAM,cAAc;mCAAkC,mBAAmB;;CAOxE,CAAC;AAGF,QAAA,MAAM,iBAAiB;6CAKpB,sBAAsB;;CASxB,CAAC;AAGF,QAAA,MAAM,qBAAqB;6CAKxB,0BAA0B;;CAa5B,CAAC;AAGF,QAAA,MAAM,YAAY;+GAQf,iBAAiB;;CAyBnB,CAAC;AAGF,QAAA,MAAM,gBAAgB;uDAMnB,qBAAqB;;CAcvB,CAAC;AAGF,QAAA,MAAM,mBAAmB,GAAI,qDAK1B,wBAAwB,4CAI1B,CAAC;AAEF,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,CAAC"}
|