@ledgerhq/lumen-ui-react 0.1.44 → 0.1.46
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 +1 -3
- package/dist/i18n/locales/de.json.js +1 -1
- package/dist/i18n/locales/en.json.d.ts +1 -3
- package/dist/i18n/locales/en.json.js +1 -1
- package/dist/i18n/locales/es.json.d.ts +1 -3
- package/dist/i18n/locales/es.json.js +1 -1
- package/dist/i18n/locales/fr.json.d.ts +1 -3
- package/dist/i18n/locales/fr.json.js +1 -1
- package/dist/i18n/locales/ja.json.d.ts +1 -3
- package/dist/i18n/locales/ja.json.js +2 -2
- package/dist/i18n/locales/ko.json.d.ts +1 -3
- package/dist/i18n/locales/ko.json.js +2 -2
- package/dist/i18n/locales/pt.json.d.ts +1 -3
- package/dist/i18n/locales/pt.json.js +1 -1
- package/dist/i18n/locales/ru.json.d.ts +1 -3
- package/dist/i18n/locales/ru.json.js +1 -1
- package/dist/i18n/locales/th.json.d.ts +1 -3
- package/dist/i18n/locales/th.json.js +2 -2
- package/dist/i18n/locales/tr.json.d.ts +1 -3
- package/dist/i18n/locales/tr.json.js +2 -2
- package/dist/i18n/locales/zh.json.d.ts +1 -3
- package/dist/i18n/locales/zh.json.js +2 -2
- package/dist/index.js +172 -164
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +1 -0
- 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 +34 -32
- package/dist/lib/Components/AmountInput/types.d.ts +8 -0
- package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts +1 -0
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +9 -8
- 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 +33 -40
- package/dist/lib/Components/Avatar/types.d.ts +0 -6
- package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +13 -13
- package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
- package/dist/lib/Components/Button/Button.js +9 -9
- package/dist/lib/Components/Card/Card.js +18 -18
- package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/lib/Components/DataTable/DataTable.js +97 -80
- package/dist/lib/Components/DataTable/types.d.ts +2 -1
- package/dist/lib/Components/DataTable/types.d.ts.map +1 -1
- package/dist/lib/Components/Divider/Divider.js +4 -4
- package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts +24 -0
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts.map +1 -0
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.js +11 -0
- package/dist/lib/Components/DotIndicator/index.d.ts +1 -0
- package/dist/lib/Components/DotIndicator/index.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +4 -4
- package/dist/lib/Components/Link/Link.js +6 -6
- package/dist/lib/Components/MediaCard/MediaCard.js +4 -4
- package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
- package/dist/lib/Components/Menu/Menu.d.ts +8 -3
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +40 -33
- package/dist/lib/Components/Menu/types.d.ts +6 -5
- package/dist/lib/Components/Menu/types.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +9 -9
- package/dist/lib/Components/Pagination/Pagination.js +10 -10
- package/dist/lib/Components/Popover/Popover.js +10 -10
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +8 -3
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +41 -32
- package/dist/lib/Components/SegmentedControl/types.d.ts +6 -5
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +19 -5
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +127 -104
- 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 +20 -19
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +9 -9
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -1
- package/dist/lib/Components/Select/utils/groupItems.d.ts +2 -2
- package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts +11 -3
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +61 -51
- package/dist/lib/Components/SideBar/index.d.ts +2 -2
- package/dist/lib/Components/SideBar/index.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/types.d.ts +7 -6
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.d.ts +17 -1
- package/dist/lib/Components/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.js +74 -45
- package/dist/lib/Components/Table/types.d.ts +23 -0
- package/dist/lib/Components/Table/types.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +6 -6
- package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
- package/dist/lib/Symbols/Icons/ChevronAscending.js +1 -1
- package/dist/lib/Symbols/Icons/ChevronDescending.js +1 -1
- package/dist/lib/Symbols/Icons/Contact.d.ts +29 -0
- package/dist/lib/Symbols/Icons/Contact.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Contact.js +28 -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 +388 -386
- package/dist/libs/utils-shared/dist/index.js +149 -148
- package/dist/package.json +3 -3
- package/package.json +3 -3
- package/dist/lib/Components/Design-tokens/shared.d.ts +0 -20
- package/dist/lib/Components/Design-tokens/shared.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MetaShape, SelectItemData, SelectItemGroup } from '../types';
|
|
1
|
+
import { MetaShape, SelectItemData, SelectItemGroup, SelectValue } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* base-ui's Combobox calls onValueChange with either a string (click on
|
|
4
4
|
* Combobox.Item) or a full SelectItemData object (keyboard selection, which
|
|
@@ -10,7 +10,7 @@ export declare const resolveValue: (value: unknown) => string | null;
|
|
|
10
10
|
* the insertion order of the first occurrence of each group key.
|
|
11
11
|
* Items without a `group` value are collected under an empty-string key.
|
|
12
12
|
*/
|
|
13
|
-
export declare function groupItemsByKey<TMeta extends MetaShape = MetaShape>(items: SelectItemData<TMeta>[]): SelectItemGroup<TMeta>[];
|
|
13
|
+
export declare function groupItemsByKey<T extends SelectValue = SelectValue, TMeta extends MetaShape = MetaShape>(items: SelectItemData<T, TMeta>[]): SelectItemGroup<T, TMeta>[];
|
|
14
14
|
/**
|
|
15
15
|
* Case-insensitive substring match on `item.label`.
|
|
16
16
|
* Returns `true` for empty/whitespace-only queries so all items are shown.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupItems.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Select/utils/groupItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"groupItems.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Select/utils/groupItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAWtD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,KAAK,SAAS,SAAS,GAAG,SAAS,EACnC,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAYhE;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,cAAc,EACpB,OAAO,MAAM,KACZ,OAIF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { SideBarProps, SideBarLeadingProps, SideBarTrailingProps, SideBarItemProps, SideBarCollapseToggleProps, SideBarValue } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* A responsive sidebar navigation component with collapsible functionality.
|
|
4
5
|
* Uses a composite pattern for maximum flexibility with value-based selection.
|
|
@@ -19,7 +20,7 @@ import { SideBarProps, SideBarLeadingProps, SideBarTrailingProps, SideBarItemPro
|
|
|
19
20
|
* </SideBarTrailing>
|
|
20
21
|
* </SideBar>
|
|
21
22
|
*/
|
|
22
|
-
export declare const SideBar: ({ ref, collapsed: controlledCollapsed, defaultCollapsed, onCollapsedChange, active: controlledActive, defaultActive, onActiveChange, children, className, ...props }: SideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const SideBar: <T extends SideBarValue = SideBarValue>({ ref, collapsed: controlledCollapsed, defaultCollapsed, onCollapsedChange, active: controlledActive, defaultActive, onActiveChange, children, className, ...props }: SideBarProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
/**
|
|
24
25
|
* Container for the leading (top) section of the sidebar.
|
|
25
26
|
* Typically contains the main navigation items.
|
|
@@ -53,7 +54,7 @@ export declare const SideBarTrailing: ({ ref, children, className, ...props }: S
|
|
|
53
54
|
* tooltipContent="Wallet"
|
|
54
55
|
* />
|
|
55
56
|
*/
|
|
56
|
-
export declare const SideBarItem: ({ ref, value, icon: Icon, activeIcon: ActiveIcon, label, tooltipContent: tooltipContentProp, disabled: disabledProp, className, onClick, ...props }: SideBarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const SideBarItem: <T extends SideBarValue = SideBarValue>({ ref, value, icon: Icon, activeIcon: ActiveIcon, label, tooltipContent: tooltipContentProp, disabled: disabledProp, className, onClick, ...props }: SideBarItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
57
58
|
/**
|
|
58
59
|
* Collapse toggle button for the sidebar.
|
|
59
60
|
* Place inside SideBarTrailing to allow users to collapse/expand the sidebar.
|
|
@@ -64,4 +65,11 @@ export declare const SideBarItem: ({ ref, value, icon: Icon, activeIcon: ActiveI
|
|
|
64
65
|
* </SideBarTrailing>
|
|
65
66
|
*/
|
|
66
67
|
export declare const SideBarCollapseToggle: ({ className, tooltipContent: tooltipContentProp, ...props }: SideBarCollapseToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
export declare function createSideBar<T extends SideBarValue = never>(): {
|
|
69
|
+
SideBar: (props: SideBarProps<T>) => ReactElement;
|
|
70
|
+
SideBarLeading: (props: SideBarLeadingProps) => ReactElement;
|
|
71
|
+
SideBarTrailing: (props: SideBarTrailingProps) => ReactElement;
|
|
72
|
+
SideBarItem: (props: SideBarItemProps<T>) => ReactElement;
|
|
73
|
+
SideBarCollapseToggle: (props: SideBarCollapseToggleProps) => ReactElement;
|
|
74
|
+
};
|
|
67
75
|
//# sourceMappingURL=SideBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/SideBar.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KAAK,YAAY,CAAC;CAC5E,CAQA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { createSafeContext as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Tooltip as
|
|
1
|
+
import { jsx as e, jsxs as x, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as V, cn as m, useDisabledContext as q } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as C } from "class-variance-authority";
|
|
4
|
+
import { useCallback as S } from "react";
|
|
5
|
+
import { Tooltip as N, TooltipTrigger as T, TooltipContent as w } from "../Tooltip/Tooltip.js";
|
|
6
6
|
import { useCommonTranslation as A } from "../../../i18n/useCommonTranslation.js";
|
|
7
|
-
import { useControllableState as
|
|
8
|
-
import { ExpandRight as
|
|
7
|
+
import { useControllableState as B } from "../../../utils/useControllableState/useControllableState.js";
|
|
8
|
+
import { ExpandRight as z } from "../../Symbols/Icons/ExpandRight.js";
|
|
9
9
|
import { ExpandLeft as E } from "../../Symbols/Icons/ExpandLeft.js";
|
|
10
|
-
const [O,
|
|
11
|
-
root:
|
|
10
|
+
const [O, y] = V("SideBar"), f = {
|
|
11
|
+
root: C(
|
|
12
12
|
[
|
|
13
13
|
"flex h-full flex-col justify-between gap-16 overflow-y-auto rounded-xl bg-surface-transparent p-16",
|
|
14
14
|
"transition-[width] duration-300 ease-in-out",
|
|
@@ -26,8 +26,8 @@ const [O, w] = R("SideBar"), f = {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
section:
|
|
30
|
-
item:
|
|
29
|
+
section: C(["flex flex-col gap-16"]),
|
|
30
|
+
item: C(
|
|
31
31
|
[
|
|
32
32
|
"flex h-44 w-full cursor-pointer items-center overflow-hidden rounded-md p-12",
|
|
33
33
|
"transition-all duration-300",
|
|
@@ -50,26 +50,26 @@ const [O, w] = R("SideBar"), f = {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
|
-
},
|
|
53
|
+
}, D = ({
|
|
54
54
|
ref: n,
|
|
55
55
|
collapsed: t,
|
|
56
56
|
defaultCollapsed: s = !1,
|
|
57
57
|
onCollapsedChange: a,
|
|
58
58
|
active: o,
|
|
59
59
|
defaultActive: r,
|
|
60
|
-
onActiveChange:
|
|
60
|
+
onActiveChange: i,
|
|
61
61
|
children: d,
|
|
62
|
-
className:
|
|
62
|
+
className: l,
|
|
63
63
|
...p
|
|
64
64
|
}) => {
|
|
65
|
-
const { t:
|
|
65
|
+
const { t: c } = A(), [b, g] = B({
|
|
66
66
|
prop: t,
|
|
67
67
|
defaultProp: s,
|
|
68
68
|
onChange: a
|
|
69
|
-
}), [v, u] =
|
|
69
|
+
}), [v, u] = B({
|
|
70
70
|
prop: o,
|
|
71
71
|
defaultProp: r ?? "",
|
|
72
|
-
onChange:
|
|
72
|
+
onChange: i ? (h) => i(h) : void 0
|
|
73
73
|
});
|
|
74
74
|
return /* @__PURE__ */ e(
|
|
75
75
|
O,
|
|
@@ -79,15 +79,15 @@ const [O, w] = R("SideBar"), f = {
|
|
|
79
79
|
"nav",
|
|
80
80
|
{
|
|
81
81
|
ref: n,
|
|
82
|
-
className: m(f.root({ collapsed: b }),
|
|
83
|
-
"aria-label":
|
|
82
|
+
className: m(f.root({ collapsed: b }), l),
|
|
83
|
+
"aria-label": c("components.sideBar.navigationAriaLabel"),
|
|
84
84
|
...p,
|
|
85
85
|
children: d
|
|
86
86
|
}
|
|
87
87
|
)
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
|
-
},
|
|
90
|
+
}, F = ({
|
|
91
91
|
ref: n,
|
|
92
92
|
children: t,
|
|
93
93
|
className: s,
|
|
@@ -100,7 +100,7 @@ const [O, w] = R("SideBar"), f = {
|
|
|
100
100
|
...a,
|
|
101
101
|
children: t
|
|
102
102
|
}
|
|
103
|
-
),
|
|
103
|
+
), U = ({
|
|
104
104
|
ref: n,
|
|
105
105
|
children: t,
|
|
106
106
|
className: s,
|
|
@@ -113,41 +113,41 @@ const [O, w] = R("SideBar"), f = {
|
|
|
113
113
|
...a,
|
|
114
114
|
children: t
|
|
115
115
|
}
|
|
116
|
-
),
|
|
116
|
+
), W = ({
|
|
117
117
|
ref: n,
|
|
118
118
|
value: t,
|
|
119
119
|
icon: s,
|
|
120
120
|
activeIcon: a,
|
|
121
121
|
label: o,
|
|
122
122
|
tooltipContent: r,
|
|
123
|
-
disabled:
|
|
123
|
+
disabled: i = !1,
|
|
124
124
|
className: d,
|
|
125
|
-
onClick:
|
|
125
|
+
onClick: l,
|
|
126
126
|
...p
|
|
127
127
|
}) => {
|
|
128
|
-
const
|
|
128
|
+
const c = q({
|
|
129
129
|
consumerName: "SideBarItem",
|
|
130
|
-
mergeWith: { disabled:
|
|
131
|
-
}), { collapsed: b, active: g, onActiveChange: v } =
|
|
130
|
+
mergeWith: { disabled: i }
|
|
131
|
+
}), { collapsed: b, active: g, onActiveChange: v } = y({
|
|
132
132
|
consumerName: "SideBarItem",
|
|
133
133
|
contextRequired: !0
|
|
134
|
-
}), u = g === t,
|
|
135
|
-
(
|
|
136
|
-
|
|
134
|
+
}), u = g === t, h = u ? a : s, I = r ?? o, L = S(
|
|
135
|
+
(P) => {
|
|
136
|
+
c || (l?.(P), v?.(t));
|
|
137
137
|
},
|
|
138
|
-
[
|
|
139
|
-
), j = /* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */ e(
|
|
138
|
+
[c, l, v, t]
|
|
139
|
+
), j = /* @__PURE__ */ x(R, { children: [
|
|
140
|
+
/* @__PURE__ */ e(h, { size: 20 }),
|
|
141
141
|
o != null && /* @__PURE__ */ e("span", { className: "translate-x-8 truncate", children: o })
|
|
142
142
|
] }), k = /* @__PURE__ */ e(
|
|
143
143
|
"button",
|
|
144
144
|
{
|
|
145
145
|
ref: n,
|
|
146
146
|
type: "button",
|
|
147
|
-
disabled:
|
|
147
|
+
disabled: c,
|
|
148
148
|
onClick: L,
|
|
149
149
|
className: m(
|
|
150
|
-
f.item({ active: u, disabled:
|
|
150
|
+
f.item({ active: u, disabled: c }),
|
|
151
151
|
d
|
|
152
152
|
),
|
|
153
153
|
"aria-current": u ? "page" : void 0,
|
|
@@ -155,25 +155,25 @@ const [O, w] = R("SideBar"), f = {
|
|
|
155
155
|
children: j
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
/* @__PURE__ */ e(
|
|
158
|
+
return /* @__PURE__ */ x(N, { open: b ? void 0 : !1, children: [
|
|
159
|
+
/* @__PURE__ */ e(T, { asChild: !0, children: k }),
|
|
160
|
+
/* @__PURE__ */ e(w, { side: "right", sideOffset: 8, children: I })
|
|
161
161
|
] });
|
|
162
|
-
},
|
|
162
|
+
}, G = ({
|
|
163
163
|
className: n,
|
|
164
164
|
tooltipContent: t,
|
|
165
165
|
...s
|
|
166
166
|
}) => {
|
|
167
|
-
const { t: a } = A(), { collapsed: o, setCollapsed: r } =
|
|
167
|
+
const { t: a } = A(), { collapsed: o, setCollapsed: r } = y({
|
|
168
168
|
consumerName: "SideBarCollapseToggle",
|
|
169
169
|
contextRequired: !0
|
|
170
|
-
}),
|
|
170
|
+
}), i = S(() => {
|
|
171
171
|
r(!o);
|
|
172
|
-
}, [o, r]), d = o ?
|
|
172
|
+
}, [o, r]), d = o ? z : E, l = /* @__PURE__ */ e(
|
|
173
173
|
"button",
|
|
174
174
|
{
|
|
175
175
|
type: "button",
|
|
176
|
-
onClick:
|
|
176
|
+
onClick: i,
|
|
177
177
|
className: m(
|
|
178
178
|
f.item({ active: !1, disabled: !1 }),
|
|
179
179
|
n
|
|
@@ -183,15 +183,25 @@ const [O, w] = R("SideBar"), f = {
|
|
|
183
183
|
children: /* @__PURE__ */ e(d, { size: 20 })
|
|
184
184
|
}
|
|
185
185
|
), p = t ?? a("components.sideBar.collapseAriaLabel");
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */ e(
|
|
188
|
-
/* @__PURE__ */ e(
|
|
186
|
+
return /* @__PURE__ */ x(N, { open: o ? void 0 : !1, children: [
|
|
187
|
+
/* @__PURE__ */ e(T, { asChild: !0, children: l }),
|
|
188
|
+
/* @__PURE__ */ e(w, { side: "right", sideOffset: 8, children: p })
|
|
189
189
|
] });
|
|
190
190
|
};
|
|
191
|
+
function $() {
|
|
192
|
+
return {
|
|
193
|
+
SideBar: D,
|
|
194
|
+
SideBarLeading: F,
|
|
195
|
+
SideBarTrailing: U,
|
|
196
|
+
SideBarItem: W,
|
|
197
|
+
SideBarCollapseToggle: G
|
|
198
|
+
};
|
|
199
|
+
}
|
|
191
200
|
export {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
D as SideBar,
|
|
202
|
+
G as SideBarCollapseToggle,
|
|
203
|
+
W as SideBarItem,
|
|
204
|
+
F as SideBarLeading,
|
|
205
|
+
U as SideBarTrailing,
|
|
206
|
+
$ as createSideBar
|
|
197
207
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './SideBar';
|
|
2
|
+
export type * from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ComponentType, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { IconSize } from '../Icon/types';
|
|
3
|
+
export type SideBarValue = string;
|
|
3
4
|
/**
|
|
4
5
|
* Context value for passing state to SideBar sub-components
|
|
5
6
|
*/
|
|
@@ -24,7 +25,7 @@ export type SideBarContextValue = {
|
|
|
24
25
|
/**
|
|
25
26
|
* Props for the SideBar root component
|
|
26
27
|
*/
|
|
27
|
-
export type SideBarProps = {
|
|
28
|
+
export type SideBarProps<T extends SideBarValue = SideBarValue> = {
|
|
28
29
|
/**
|
|
29
30
|
* Controlled collapsed state. When provided, the component becomes controlled.
|
|
30
31
|
*/
|
|
@@ -42,15 +43,15 @@ export type SideBarProps = {
|
|
|
42
43
|
* The value of the currently active item.
|
|
43
44
|
* When provided, the component becomes controlled for selection.
|
|
44
45
|
*/
|
|
45
|
-
active?:
|
|
46
|
+
active?: T;
|
|
46
47
|
/**
|
|
47
48
|
* Default active item value for uncontrolled mode.
|
|
48
49
|
*/
|
|
49
|
-
defaultActive?:
|
|
50
|
+
defaultActive?: T;
|
|
50
51
|
/**
|
|
51
52
|
* Callback fired when the active item changes.
|
|
52
53
|
*/
|
|
53
|
-
onActiveChange?: (value:
|
|
54
|
+
onActiveChange?: (value: T) => void;
|
|
54
55
|
/**
|
|
55
56
|
* The children of the sidebar (SideBarLeading, SideBarTrailing).
|
|
56
57
|
*/
|
|
@@ -89,11 +90,11 @@ export type SideBarTrailingProps = {
|
|
|
89
90
|
/**
|
|
90
91
|
* Props for the SideBarItem component
|
|
91
92
|
*/
|
|
92
|
-
export type SideBarItemProps = {
|
|
93
|
+
export type SideBarItemProps<T extends SideBarValue = SideBarValue> = {
|
|
93
94
|
/**
|
|
94
95
|
* Unique identifier for this item. Used to determine which item is active.
|
|
95
96
|
*/
|
|
96
|
-
value:
|
|
97
|
+
value: T;
|
|
97
98
|
/**
|
|
98
99
|
* The icon component to display when inactive.
|
|
99
100
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,IAAI;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE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AS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableBodyProps, TableCellProps, TableHeaderCellProps, TableHeaderRowProps, TableHeaderProps, TableProps, TableRowProps, TableActionBarLeadingProps, TableActionBarProps, TableActionBarTrailingProps, TableCellContentProps, TableLoadingRowProps, TableRootProps, TableInfoIconProps, TableSortButtonProps, TableGroupHeaderRowProps } from './types';
|
|
1
|
+
import { TableBodyProps, TableCellProps, TableColGroupProps, TableColProps, TableHeaderCellProps, TableHeaderRowProps, TableHeaderProps, TableProps, TableRowProps, TableActionBarLeadingProps, TableActionBarProps, TableActionBarTrailingProps, TableCellContentProps, TableLoadingRowProps, TableRootProps, TableInfoIconProps, TableSortButtonProps, TableGroupHeaderRowProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Root table container component. Wraps a scrollable HTML `<div>` around the `Table` element.
|
|
4
4
|
*
|
|
@@ -22,6 +22,22 @@ import { TableBodyProps, TableCellProps, TableHeaderCellProps, TableHeaderRowPro
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const TableRoot: ({ children, appearance, className, onScrollBottom, loading, ref, ...props }: TableRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export declare const Table: ({ children, className, ref, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Column group component. Wraps the HTML `<colgroup>` element.
|
|
27
|
+
* Use with `TableCol` to define column widths.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <TableColGroup>
|
|
31
|
+
* <TableCol className="w-40" />
|
|
32
|
+
* <TableCol className="w-144" />
|
|
33
|
+
* </TableColGroup>
|
|
34
|
+
*/
|
|
35
|
+
export declare const TableColGroup: ({ children, className, ref, ...props }: TableColGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Column component. Wraps the HTML `<col>` element.
|
|
38
|
+
* Use to define column widths within a `TableColGroup`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const TableCol: ({ className, hideBelow, ref, ...props }: TableColProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
41
|
/**
|
|
26
42
|
* Table head component. Wraps the HTML `<thead>` element.
|
|
27
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Table/Table.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAoBjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,GAAI,6EAQvB,cAAc,4CAkBhB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,wCAAwC,UAAU,4CAUvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,wCAKzB,gBAAgB,4CAMlB,C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