@ledgerhq/lumen-ui-react 0.1.11 → 0.1.13
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/i18n/locales/de.json.d.ts +3 -0
- package/dist/i18n/locales/de.json.js +4 -2
- package/dist/i18n/locales/en.json.d.ts +3 -0
- package/dist/i18n/locales/en.json.js +6 -4
- package/dist/i18n/locales/es.json.d.ts +3 -0
- package/dist/i18n/locales/es.json.js +6 -4
- package/dist/i18n/locales/fr.json.d.ts +3 -0
- package/dist/i18n/locales/fr.json.js +6 -4
- package/dist/i18n/locales/ja.json.d.ts +3 -0
- package/dist/i18n/locales/ja.json.js +6 -4
- package/dist/i18n/locales/ko.json.d.ts +3 -0
- package/dist/i18n/locales/ko.json.js +6 -4
- package/dist/i18n/locales/pt.json.d.ts +3 -0
- package/dist/i18n/locales/pt.json.js +6 -4
- package/dist/i18n/locales/ru.json.d.ts +3 -0
- package/dist/i18n/locales/ru.json.js +6 -4
- package/dist/i18n/locales/th.json.d.ts +3 -0
- package/dist/i18n/locales/th.json.js +6 -4
- package/dist/i18n/locales/tr.json.d.ts +3 -0
- package/dist/i18n/locales/tr.json.js +6 -4
- package/dist/i18n/locales/zh.json.d.ts +3 -0
- package/dist/i18n/locales/zh.json.js +6 -4
- package/dist/index.js +114 -113
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +41 -41
- package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.js +35 -32
- package/dist/lib/Components/Banner/Banner.js +5 -5
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
- package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.js +28 -25
- package/dist/lib/Components/Button/Button.js +9 -9
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +110 -107
- package/dist/lib/Components/Card/types.d.ts +1 -0
- package/dist/lib/Components/Card/types.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +28 -24
- package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
- package/dist/lib/Components/Dialog/types.d.ts +1 -1
- package/dist/lib/Components/Icon/Icon.js +4 -4
- package/dist/lib/Components/Icon/createIcon.js +4 -4
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +40 -20
- package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -1
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +44 -33
- package/dist/lib/Components/Link/types.d.ts +5 -0
- package/dist/lib/Components/Link/types.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +72 -65
- package/dist/lib/Components/MediaCard/MediaCard.d.ts +33 -0
- package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -0
- package/dist/lib/Components/MediaCard/MediaCard.js +128 -0
- package/dist/lib/Components/MediaCard/index.d.ts +3 -0
- package/dist/lib/Components/MediaCard/index.d.ts.map +1 -0
- package/dist/lib/Components/MediaCard/types.d.ts +30 -0
- package/dist/lib/Components/MediaCard/types.d.ts.map +1 -0
- package/dist/lib/Components/Menu/Menu.d.ts +3 -3
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +133 -104
- package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
- 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 +88 -51
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +5 -5
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +94 -76
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/types.d.ts +4 -4
- 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 +77 -74
- package/dist/lib/Components/SideBar/types.d.ts +12 -4
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +3 -3
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +34 -24
- package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +31 -49
- package/dist/lib/Components/Subheader/index.d.ts +1 -1
- package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/types.d.ts +1 -11
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.js +30 -22
- package/dist/lib/Components/Table/Table.js +49 -49
- package/dist/lib/Components/Tag/Tag.d.ts +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +17 -14
- package/dist/lib/Components/Tile/Tile.d.ts +5 -12
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +79 -82
- package/dist/lib/Components/Tile/index.d.ts +1 -1
- package/dist/lib/Components/Tile/index.d.ts.map +1 -1
- package/dist/lib/Components/Tile/types.d.ts +1 -10
- package/dist/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +26 -23
- package/dist/lib/Components/{ButtonTrigger/ButtonTrigger.d.ts → TriggerButton/TriggerButton.d.ts} +10 -10
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -0
- package/dist/lib/Components/TriggerButton/TriggerButton.js +76 -0
- package/dist/lib/Components/TriggerButton/index.d.ts +3 -0
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/index.d.ts.map +1 -1
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts +1 -1
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts.map +1 -1
- package/dist/lib/Components/index.d.ts +2 -1
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/lib/Symbols/Icons/NanoGen5.d.ts +29 -0
- package/dist/lib/Symbols/Icons/NanoGen5.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/NanoGen5.js +27 -0
- package/dist/lib/Symbols/index.d.ts +1 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +194 -192
- package/dist/libs/utils-shared/dist/index.js +95 -90
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +0 -1
- package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +0 -73
- package/dist/lib/Components/ButtonTrigger/index.d.ts +0 -3
|
@@ -1,74 +1,112 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsx as s, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { cn as p, useDisabledContext as g } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import { useRef as x } from "react";
|
|
5
|
+
import { useSegmentedControlContext as h, SegmentedControlContextProvider as v } from "./SegmentedControlContext.js";
|
|
6
|
+
import { useSegmentedControlSelectedIndex as C, usePillElementLayoutEffect as y } from "./usePillElementLayoutEffect.js";
|
|
7
|
+
const f = {
|
|
8
|
+
root: c("relative flex w-full flex-row items-center rounded-sm", {
|
|
9
|
+
variants: {
|
|
10
|
+
appearance: {
|
|
11
|
+
background: "bg-surface",
|
|
12
|
+
"no-background": "bg-transparent"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
pill: c(
|
|
17
|
+
"pointer-events-none absolute top-0 left-0 z-0 rounded-sm transition-transform duration-250 ease-in-out",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
disabled: {
|
|
21
|
+
true: "bg-base-transparent-pressed",
|
|
22
|
+
false: "bg-muted-transparent"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
item: c(
|
|
28
|
+
"z-10 flex min-w-0 flex-1 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
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
selected: {
|
|
32
|
+
true: "body-2-semi-bold text-base",
|
|
33
|
+
false: "body-2 text-muted hover:body-2-semi-bold hover:text-muted-hover"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
};
|
|
39
|
+
function S({
|
|
7
40
|
value: o,
|
|
8
|
-
children:
|
|
41
|
+
children: a,
|
|
9
42
|
icon: e,
|
|
10
|
-
onClick:
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
43
|
+
onClick: l,
|
|
44
|
+
className: d,
|
|
45
|
+
...m
|
|
13
46
|
}) {
|
|
14
|
-
const { selectedValue: u, onSelectedChange:
|
|
47
|
+
const { selectedValue: u, onSelectedChange: n, disabled: t } = h(), i = u === o;
|
|
15
48
|
return /* @__PURE__ */ s(
|
|
16
49
|
"button",
|
|
17
50
|
{
|
|
18
51
|
type: "button",
|
|
19
52
|
role: "radio",
|
|
20
|
-
"aria-checked":
|
|
21
|
-
"aria-disabled":
|
|
22
|
-
disabled:
|
|
23
|
-
onClick: (
|
|
24
|
-
|
|
53
|
+
"aria-checked": i,
|
|
54
|
+
"aria-disabled": t,
|
|
55
|
+
disabled: t,
|
|
56
|
+
onClick: (r) => {
|
|
57
|
+
t || (n(o), l?.(r));
|
|
25
58
|
},
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
59
|
+
className: p(
|
|
60
|
+
f.item({
|
|
61
|
+
selected: i
|
|
62
|
+
}),
|
|
63
|
+
d
|
|
30
64
|
),
|
|
31
|
-
...
|
|
32
|
-
children: /* @__PURE__ */
|
|
65
|
+
...m,
|
|
66
|
+
children: /* @__PURE__ */ b("span", { className: "inline-flex shrink-0 items-center justify-center gap-8", children: [
|
|
33
67
|
e && /* @__PURE__ */ s(e, { size: 16 }),
|
|
34
|
-
/* @__PURE__ */ s("span", { children:
|
|
68
|
+
/* @__PURE__ */ s("span", { children: a })
|
|
35
69
|
] })
|
|
36
70
|
}
|
|
37
71
|
);
|
|
38
72
|
}
|
|
39
|
-
|
|
40
|
-
function
|
|
73
|
+
S.displayName = "SegmentedControlButton";
|
|
74
|
+
function w({
|
|
41
75
|
selectedValue: o,
|
|
42
|
-
onSelectedChange:
|
|
76
|
+
onSelectedChange: a,
|
|
43
77
|
children: e,
|
|
44
|
-
className:
|
|
45
|
-
disabled:
|
|
46
|
-
appearance:
|
|
78
|
+
className: l,
|
|
79
|
+
disabled: d,
|
|
80
|
+
appearance: m = "background",
|
|
47
81
|
...u
|
|
48
82
|
}) {
|
|
49
|
-
const
|
|
83
|
+
const n = g({
|
|
84
|
+
consumerName: "SegmentedControl",
|
|
85
|
+
mergeWith: { disabled: d }
|
|
86
|
+
}), t = x(null), i = C(
|
|
50
87
|
o,
|
|
51
88
|
e
|
|
52
|
-
), { pill:
|
|
53
|
-
ref:
|
|
54
|
-
selectedIndex:
|
|
89
|
+
), { pill: r } = y({
|
|
90
|
+
ref: t,
|
|
91
|
+
selectedIndex: i,
|
|
55
92
|
children: e
|
|
56
93
|
});
|
|
57
94
|
return /* @__PURE__ */ s(
|
|
58
|
-
|
|
95
|
+
v,
|
|
59
96
|
{
|
|
60
|
-
value: { selectedValue: o, onSelectedChange:
|
|
61
|
-
children: /* @__PURE__ */
|
|
97
|
+
value: { selectedValue: o, onSelectedChange: a, disabled: n },
|
|
98
|
+
children: /* @__PURE__ */ b(
|
|
62
99
|
"div",
|
|
63
100
|
{
|
|
64
101
|
...u,
|
|
65
|
-
ref:
|
|
102
|
+
ref: t,
|
|
66
103
|
role: "radiogroup",
|
|
67
104
|
"aria-disabled": n,
|
|
68
|
-
className:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
105
|
+
className: p(
|
|
106
|
+
f.root({
|
|
107
|
+
appearance: m
|
|
108
|
+
}),
|
|
109
|
+
l
|
|
72
110
|
),
|
|
73
111
|
children: [
|
|
74
112
|
e,
|
|
@@ -76,14 +114,13 @@ function y({
|
|
|
76
114
|
"div",
|
|
77
115
|
{
|
|
78
116
|
"aria-hidden": !0,
|
|
79
|
-
className:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
),
|
|
117
|
+
className: f.pill({
|
|
118
|
+
disabled: n
|
|
119
|
+
}),
|
|
83
120
|
style: {
|
|
84
|
-
width:
|
|
85
|
-
height:
|
|
86
|
-
transform: `translateX(${
|
|
121
|
+
width: r.width,
|
|
122
|
+
height: r.height,
|
|
123
|
+
transform: `translateX(${r.x}px)`
|
|
87
124
|
}
|
|
88
125
|
}
|
|
89
126
|
)
|
|
@@ -93,8 +130,8 @@ function y({
|
|
|
93
130
|
}
|
|
94
131
|
);
|
|
95
132
|
}
|
|
96
|
-
|
|
133
|
+
w.displayName = "SegmentedControl";
|
|
97
134
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
135
|
+
w as SegmentedControl,
|
|
136
|
+
S as SegmentedControlButton
|
|
100
137
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type SegmentedControlContextValue = {
|
|
2
2
|
selectedValue: string;
|
|
3
3
|
onSelectedChange: (value: string) => void;
|
|
4
|
-
disabled
|
|
4
|
+
disabled: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare const SegmentedControlContextProvider: import('react').FC<{
|
|
7
7
|
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,
|
|
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;CACnB,CAAC;AAEF,QAAA,MAAO,+BAA+B;;;EAC+B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,oCAInC,CAAC;AAEL,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SelectProps, SelectTriggerProps, SelectContentProps, SelectGroupProps, SelectLabelProps, SelectItemTextProps, SelectItemProps, SelectSeparatorProps,
|
|
2
|
-
declare function Select({ value, defaultValue, onValueChange, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { SelectProps, SelectTriggerProps, SelectContentProps, SelectGroupProps, SelectLabelProps, SelectItemTextProps, SelectItemProps, SelectSeparatorProps, SelectTriggerButtonProps } from './types';
|
|
2
|
+
declare function Select({ value, defaultValue, onValueChange, disabled: disabledProp, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare function SelectGroup({ ...props }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const SelectTrigger: {
|
|
5
|
-
({ render, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
({ render, disabled, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
displayName: string | undefined;
|
|
7
7
|
};
|
|
8
8
|
declare const SelectContent: {
|
|
@@ -25,6 +25,6 @@ declare const SelectItemText: {
|
|
|
25
25
|
({ ref, className, ...props }: SelectItemTextProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
displayName: string | undefined;
|
|
27
27
|
};
|
|
28
|
-
declare const
|
|
29
|
-
export { Select, SelectGroup, SelectTrigger, SelectContent, SelectLabel, SelectItemText, SelectItem, SelectSeparator,
|
|
28
|
+
declare const SelectTriggerButton: ({ selectedValue, selectedContent, label, ...props }: SelectTriggerButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { Select, SelectGroup, SelectTrigger, SelectContent, SelectLabel, SelectItemText, SelectItem, SelectSeparator, SelectTriggerButton, };
|
|
30
30
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,iBAAS,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EAAE,YAAY,EACtB,GAAG,KAAK,EACT,EAAE,WAAW,2CAsBb;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAElD;AAwDD,QAAA,MAAM,aAAa;qCAAoC,kBAAkB;;CA2BxE,CAAC;AAwCF,QAAA,MAAM,aAAa;uDAMhB,kBAAkB;;CAgBpB,CAAC;AAGF,QAAA,MAAM,WAAW;mCAAkC,gBAAgB;;CAOlE,CAAC;AAcF,QAAA,MAAM,UAAU;6CAKb,eAAe;;CAcjB,CAAC;AAGF,QAAA,MAAM,eAAe;mCAIlB,oBAAoB;;CAEtB,CAAC;AAGF,QAAA,MAAM,cAAc;mCAAkC,mBAAmB;;CAOxE,CAAC;AAuCF,QAAA,MAAM,mBAAmB,GAAI,qDAK1B,wBAAwB,4CAI1B,CAAC;AAEF,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,UAAU,EACV,eAAe,EACf,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,51 +1,61 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
2
|
+
import { useDisabledContext as g, cn as o } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import * as l from "@radix-ui/react-select";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { SelectProvider as
|
|
6
|
-
import { useControllableState as
|
|
7
|
-
import { Check as
|
|
8
|
-
import { Divider as
|
|
9
|
-
import {
|
|
10
|
-
import { ChevronDown as
|
|
11
|
-
import { ChevronUp as
|
|
12
|
-
function
|
|
13
|
-
|
|
4
|
+
import { cva as m } from "class-variance-authority";
|
|
5
|
+
import { SelectProvider as f, useSelectContext as b } from "./SelectContext.js";
|
|
6
|
+
import { useControllableState as h } from "../../../utils/useControllableState/useControllableState.js";
|
|
7
|
+
import { Check as x } from "../../Symbols/Icons/Check.js";
|
|
8
|
+
import { Divider as y } from "../Divider/Divider.js";
|
|
9
|
+
import { TriggerButton as S } from "../TriggerButton/TriggerButton.js";
|
|
10
|
+
import { ChevronDown as u } from "../../Symbols/Icons/ChevronDown.js";
|
|
11
|
+
import { ChevronUp as N } from "../../Symbols/Icons/ChevronUp.js";
|
|
12
|
+
function M({
|
|
13
|
+
value: t,
|
|
14
|
+
defaultValue: a,
|
|
15
|
+
onValueChange: r,
|
|
16
|
+
disabled: s,
|
|
17
|
+
...i
|
|
18
|
+
}) {
|
|
19
|
+
const n = g({
|
|
20
|
+
consumerName: "Select",
|
|
21
|
+
mergeWith: { disabled: s }
|
|
22
|
+
}), [c, p] = h({
|
|
14
23
|
prop: t,
|
|
15
24
|
defaultProp: a ?? "",
|
|
16
25
|
onChange: r
|
|
17
26
|
});
|
|
18
|
-
return /* @__PURE__ */ e(
|
|
27
|
+
return /* @__PURE__ */ e(f, { value: { selectedValue: c }, children: /* @__PURE__ */ e(
|
|
19
28
|
l.Root,
|
|
20
29
|
{
|
|
21
30
|
"data-slot": "select",
|
|
22
|
-
value:
|
|
23
|
-
onValueChange:
|
|
24
|
-
|
|
31
|
+
value: c,
|
|
32
|
+
onValueChange: p,
|
|
33
|
+
disabled: n,
|
|
34
|
+
...i
|
|
25
35
|
}
|
|
26
36
|
) });
|
|
27
37
|
}
|
|
28
|
-
function
|
|
38
|
+
function O({ ...t }) {
|
|
29
39
|
return /* @__PURE__ */ e(l.Group, { "data-slot": "select-group", ...t });
|
|
30
40
|
}
|
|
31
|
-
const
|
|
41
|
+
const v = o(
|
|
32
42
|
"group relative flex h-48 w-full cursor-pointer items-center justify-between gap-8",
|
|
33
43
|
"rounded-sm bg-muted px-16",
|
|
34
44
|
"body-2 text-base",
|
|
35
45
|
"hover:bg-muted-hover",
|
|
36
46
|
"transition-colors duration-200 focus:ring-2 focus:ring-focus focus:outline-hidden",
|
|
37
47
|
"disabled:cursor-not-allowed disabled:text-disabled"
|
|
38
|
-
),
|
|
48
|
+
), w = o(
|
|
39
49
|
"pointer-events-none absolute left-16 origin-left text-muted transition-all duration-300",
|
|
40
50
|
"top-10 -translate-y-4 body-4",
|
|
41
51
|
"group-data-placeholder:top-14 group-data-placeholder:translate-y-0 group-data-placeholder:body-2",
|
|
42
52
|
"group-data-disabled:text-disabled disabled:text-disabled",
|
|
43
53
|
"max-w-[calc(100%-var(--size-56))] truncate"
|
|
44
|
-
),
|
|
54
|
+
), C = ({
|
|
45
55
|
ref: t,
|
|
46
56
|
className: a,
|
|
47
57
|
labelClassName: r,
|
|
48
|
-
label:
|
|
58
|
+
label: s,
|
|
49
59
|
selectedContent: i,
|
|
50
60
|
...n
|
|
51
61
|
}) => /* @__PURE__ */ d(
|
|
@@ -53,22 +63,22 @@ const y = s(
|
|
|
53
63
|
{
|
|
54
64
|
ref: t,
|
|
55
65
|
"data-slot": "select-trigger",
|
|
56
|
-
className:
|
|
66
|
+
className: o(v, a),
|
|
57
67
|
...n,
|
|
58
68
|
children: [
|
|
59
|
-
|
|
69
|
+
s && /* @__PURE__ */ e("label", { className: o(w, r), children: s }),
|
|
60
70
|
/* @__PURE__ */ e(
|
|
61
71
|
"span",
|
|
62
72
|
{
|
|
63
|
-
className:
|
|
73
|
+
className: o(
|
|
64
74
|
"flex-1 truncate text-left",
|
|
65
|
-
|
|
75
|
+
s && "mt-16 opacity-100 transition-opacity delay-100 duration-300 group-data-placeholder:mt-0 group-data-placeholder:opacity-0"
|
|
66
76
|
),
|
|
67
77
|
children: i
|
|
68
78
|
}
|
|
69
79
|
),
|
|
70
80
|
/* @__PURE__ */ e(l.Icon, { asChild: !0, children: /* @__PURE__ */ e(
|
|
71
|
-
|
|
81
|
+
u,
|
|
72
82
|
{
|
|
73
83
|
size: 20,
|
|
74
84
|
className: "shrink-0 text-muted group-data-disabled:text-disabled"
|
|
@@ -76,23 +86,31 @@ const y = s(
|
|
|
76
86
|
) })
|
|
77
87
|
]
|
|
78
88
|
}
|
|
79
|
-
),
|
|
80
|
-
const { selectedValue:
|
|
89
|
+
), T = ({ render: t, disabled: a, ...r }) => {
|
|
90
|
+
const { selectedValue: s } = b({
|
|
81
91
|
consumerName: "SelectTrigger",
|
|
82
92
|
contextRequired: !0
|
|
83
|
-
}),
|
|
93
|
+
}), i = /* @__PURE__ */ e(l.Value, { "data-slot": "select-value" });
|
|
84
94
|
return t ? /* @__PURE__ */ e(
|
|
85
95
|
l.Trigger,
|
|
86
96
|
{
|
|
87
|
-
|
|
97
|
+
disabled: a,
|
|
98
|
+
ref: r.ref,
|
|
88
99
|
"data-slot": "select-trigger",
|
|
89
100
|
asChild: !0,
|
|
90
|
-
children: t({ selectedValue:
|
|
101
|
+
children: t({ selectedValue: s, selectedContent: i })
|
|
91
102
|
}
|
|
92
|
-
) : /* @__PURE__ */ e(
|
|
103
|
+
) : /* @__PURE__ */ e(
|
|
104
|
+
C,
|
|
105
|
+
{
|
|
106
|
+
...r,
|
|
107
|
+
disabled: a,
|
|
108
|
+
selectedContent: i
|
|
109
|
+
}
|
|
110
|
+
);
|
|
93
111
|
};
|
|
94
|
-
|
|
95
|
-
const
|
|
112
|
+
T.displayName = l.Trigger.displayName;
|
|
113
|
+
const I = m(
|
|
96
114
|
[
|
|
97
115
|
"relative z-select max-h-(--radix-select-content-available-height) overflow-x-hidden overflow-y-auto",
|
|
98
116
|
"rounded-sm bg-muted",
|
|
@@ -113,7 +131,7 @@ const w = c(
|
|
|
113
131
|
position: "popper"
|
|
114
132
|
}
|
|
115
133
|
}
|
|
116
|
-
),
|
|
134
|
+
), V = m("p-8", {
|
|
117
135
|
variants: {
|
|
118
136
|
position: {
|
|
119
137
|
popper: "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)",
|
|
@@ -123,39 +141,39 @@ const w = c(
|
|
|
123
141
|
defaultVariants: {
|
|
124
142
|
position: "popper"
|
|
125
143
|
}
|
|
126
|
-
}),
|
|
144
|
+
}), z = ({
|
|
127
145
|
ref: t,
|
|
128
146
|
className: a,
|
|
129
147
|
children: r,
|
|
130
|
-
position:
|
|
148
|
+
position: s = "popper",
|
|
131
149
|
...i
|
|
132
150
|
}) => /* @__PURE__ */ e(l.Portal, { "data-slot": "select-portal", children: /* @__PURE__ */ d(
|
|
133
151
|
l.Content,
|
|
134
152
|
{
|
|
135
153
|
ref: t,
|
|
136
154
|
"data-slot": "select-content",
|
|
137
|
-
className:
|
|
138
|
-
position:
|
|
155
|
+
className: o(I({ position: s }), a),
|
|
156
|
+
position: s,
|
|
139
157
|
...i,
|
|
140
158
|
children: [
|
|
141
|
-
/* @__PURE__ */ e(
|
|
142
|
-
/* @__PURE__ */ e(l.Viewport, { className:
|
|
143
|
-
/* @__PURE__ */ e(
|
|
159
|
+
/* @__PURE__ */ e(L, {}),
|
|
160
|
+
/* @__PURE__ */ e(l.Viewport, { className: V({ position: s }), children: r }),
|
|
161
|
+
/* @__PURE__ */ e(U, {})
|
|
144
162
|
]
|
|
145
163
|
}
|
|
146
164
|
) });
|
|
147
|
-
|
|
148
|
-
const
|
|
165
|
+
z.displayName = l.Content.displayName;
|
|
166
|
+
const j = ({ ref: t, className: a, ...r }) => /* @__PURE__ */ e(
|
|
149
167
|
l.Label,
|
|
150
168
|
{
|
|
151
169
|
ref: t,
|
|
152
170
|
"data-slot": "select-label",
|
|
153
|
-
className:
|
|
171
|
+
className: o("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", a),
|
|
154
172
|
...r
|
|
155
173
|
}
|
|
156
174
|
);
|
|
157
|
-
|
|
158
|
-
const
|
|
175
|
+
j.displayName = l.Label.displayName;
|
|
176
|
+
const B = o(
|
|
159
177
|
"relative flex w-full cursor-pointer items-center bg-base-transparent select-none",
|
|
160
178
|
"rounded-sm p-8",
|
|
161
179
|
"body-2 text-base",
|
|
@@ -164,42 +182,42 @@ const V = s(
|
|
|
164
182
|
"focus:bg-base-transparent-hover",
|
|
165
183
|
"active:bg-base-transparent-pressed",
|
|
166
184
|
"data-disabled:cursor-not-allowed data-disabled:text-disabled"
|
|
167
|
-
),
|
|
185
|
+
), D = ({
|
|
168
186
|
ref: t,
|
|
169
187
|
className: a,
|
|
170
188
|
children: r,
|
|
171
|
-
...
|
|
189
|
+
...s
|
|
172
190
|
}) => /* @__PURE__ */ d(
|
|
173
191
|
l.Item,
|
|
174
192
|
{
|
|
175
193
|
ref: t,
|
|
176
194
|
"data-slot": "select-item",
|
|
177
|
-
className:
|
|
178
|
-
...
|
|
195
|
+
className: o(B, a),
|
|
196
|
+
...s,
|
|
179
197
|
children: [
|
|
180
198
|
r,
|
|
181
|
-
/* @__PURE__ */ e("span", { className: "absolute right-8 flex size-24 items-center justify-center", children: /* @__PURE__ */ e(l.ItemIndicator, { children: /* @__PURE__ */ e(
|
|
199
|
+
/* @__PURE__ */ e("span", { className: "absolute right-8 flex size-24 items-center justify-center", children: /* @__PURE__ */ e(l.ItemIndicator, { children: /* @__PURE__ */ e(x, { size: 24, className: "ms-8 shrink-0 text-active" }) }) })
|
|
182
200
|
]
|
|
183
201
|
}
|
|
184
202
|
);
|
|
185
|
-
|
|
186
|
-
const
|
|
203
|
+
D.displayName = l.Item.displayName;
|
|
204
|
+
const P = ({
|
|
187
205
|
ref: t,
|
|
188
206
|
className: a,
|
|
189
207
|
...r
|
|
190
|
-
}) => /* @__PURE__ */ e(
|
|
191
|
-
|
|
192
|
-
const
|
|
208
|
+
}) => /* @__PURE__ */ e(y, { ref: t, className: o("mx-8 my-4 w-auto", a), ...r });
|
|
209
|
+
P.displayName = "SelectSeparator";
|
|
210
|
+
const k = ({ ref: t, className: a, ...r }) => /* @__PURE__ */ e(
|
|
193
211
|
l.ItemText,
|
|
194
212
|
{
|
|
195
213
|
ref: t,
|
|
196
214
|
"data-slot": "select-item-text",
|
|
197
|
-
className:
|
|
215
|
+
className: o("body-2 text-muted", a),
|
|
198
216
|
...r
|
|
199
217
|
}
|
|
200
218
|
);
|
|
201
|
-
|
|
202
|
-
function
|
|
219
|
+
k.displayName = l.ItemText.displayName;
|
|
220
|
+
function L({
|
|
203
221
|
className: t,
|
|
204
222
|
...a
|
|
205
223
|
}) {
|
|
@@ -207,16 +225,16 @@ function D({
|
|
|
207
225
|
l.ScrollUpButton,
|
|
208
226
|
{
|
|
209
227
|
"data-slot": "select-scroll-up-button",
|
|
210
|
-
className:
|
|
228
|
+
className: o(
|
|
211
229
|
"flex cursor-default items-center justify-center py-1 text-muted",
|
|
212
230
|
t
|
|
213
231
|
),
|
|
214
232
|
...a,
|
|
215
|
-
children: /* @__PURE__ */ e(
|
|
233
|
+
children: /* @__PURE__ */ e(N, { className: "size-4" })
|
|
216
234
|
}
|
|
217
235
|
);
|
|
218
236
|
}
|
|
219
|
-
function
|
|
237
|
+
function U({
|
|
220
238
|
className: t,
|
|
221
239
|
...a
|
|
222
240
|
}) {
|
|
@@ -224,29 +242,29 @@ function P({
|
|
|
224
242
|
l.ScrollDownButton,
|
|
225
243
|
{
|
|
226
244
|
"data-slot": "select-scroll-down-button",
|
|
227
|
-
className:
|
|
245
|
+
className: o(
|
|
228
246
|
"flex cursor-default items-center justify-center py-1 text-muted",
|
|
229
247
|
t
|
|
230
248
|
),
|
|
231
249
|
...a,
|
|
232
|
-
children: /* @__PURE__ */ e(
|
|
250
|
+
children: /* @__PURE__ */ e(u, { className: "size-4" })
|
|
233
251
|
}
|
|
234
252
|
);
|
|
235
253
|
}
|
|
236
|
-
const
|
|
254
|
+
const Q = ({
|
|
237
255
|
selectedValue: t,
|
|
238
256
|
selectedContent: a,
|
|
239
257
|
label: r,
|
|
240
|
-
...
|
|
241
|
-
}) => /* @__PURE__ */ e(
|
|
258
|
+
...s
|
|
259
|
+
}) => /* @__PURE__ */ e(S, { ...s, children: t ? a : r });
|
|
242
260
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
261
|
+
M as Select,
|
|
262
|
+
z as SelectContent,
|
|
263
|
+
O as SelectGroup,
|
|
264
|
+
D as SelectItem,
|
|
265
|
+
k as SelectItemText,
|
|
266
|
+
j as SelectLabel,
|
|
267
|
+
P as SelectSeparator,
|
|
268
|
+
T as SelectTrigger,
|
|
269
|
+
Q as SelectTriggerButton
|
|
252
270
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './Select';
|
|
2
|
-
export type { SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectGroupProps, SelectLabelProps, SelectItemTextProps, SelectItemProps, SelectSeparatorProps,
|
|
2
|
+
export type { SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectGroupProps, SelectLabelProps, SelectItemTextProps, SelectItemProps, SelectSeparatorProps, SelectTriggerButtonProps, } from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TriggerButtonProps } from '../TriggerButton';
|
|
3
3
|
type Direction = 'ltr' | 'rtl';
|
|
4
4
|
type PointerDownOutsideEvent = CustomEvent<{
|
|
5
5
|
originalEvent: PointerEvent;
|
|
@@ -73,9 +73,9 @@ export type SelectTriggerProps = {
|
|
|
73
73
|
* Render function that replaces the default input-style trigger.
|
|
74
74
|
* When provided, `SelectPrimitive.Trigger` renders with `asChild` and
|
|
75
75
|
* delegates rendering to this function.
|
|
76
|
-
* Can be a preset component (e.g. `
|
|
76
|
+
* Can be a preset component (e.g. `SelectTriggerButton`) or a custom render function.
|
|
77
77
|
*
|
|
78
|
-
* @example render={(props) => <
|
|
78
|
+
* @example render={(props) => <SelectTriggerButton {...props} label="Label" />}
|
|
79
79
|
* @example render={({ selectedValue, selectedContent }) => <MyTrigger />}
|
|
80
80
|
*/
|
|
81
81
|
render?: (props: SelectTriggerRenderProps) => ReactElement;
|
|
@@ -253,7 +253,7 @@ export type SelectSeparatorProps = {
|
|
|
253
253
|
*/
|
|
254
254
|
className?: string;
|
|
255
255
|
} & ComponentPropsWithRef<'div'>;
|
|
256
|
-
export type
|
|
256
|
+
export type SelectTriggerButtonProps = SelectTriggerRenderProps & Omit<TriggerButtonProps, 'children'> & {
|
|
257
257
|
/**
|
|
258
258
|
* The label displayed when no value is selected.
|
|
259
259
|
* Once a value is selected, it is replaced by the selected item's content.
|
|
@@ -63,7 +63,7 @@ export declare const SideBarTrailing: {
|
|
|
63
63
|
* />
|
|
64
64
|
*/
|
|
65
65
|
export declare const SideBarItem: {
|
|
66
|
-
({ ref, value, icon: Icon, activeIcon: ActiveIcon, label, tooltipContent: tooltipContentProp, disabled, className, onClick, ...props }: SideBarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
({ ref, value, icon: Icon, activeIcon: ActiveIcon, label, tooltipContent: tooltipContentProp, disabled: disabledProp, className, onClick, ...props }: SideBarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
67
67
|
displayName: string;
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/SideBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/SideBar.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAmDjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO;2KAWjB,YAAY;;CA2Bd,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,cAAc;6CAKxB,mBAAmB;;CAUrB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,eAAe;6CAKzB,oBAAoB;;CAUtB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW;0JAWrB,gBAAgB;;CAuDlB,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;8BAG/B,0BAA0B;;CAgC5B,CAAC"}
|