@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.
Files changed (108) hide show
  1. package/dist/i18n/locales/de.json.d.ts +1 -3
  2. package/dist/i18n/locales/de.json.js +1 -1
  3. package/dist/i18n/locales/en.json.d.ts +1 -3
  4. package/dist/i18n/locales/en.json.js +1 -1
  5. package/dist/i18n/locales/es.json.d.ts +1 -3
  6. package/dist/i18n/locales/es.json.js +1 -1
  7. package/dist/i18n/locales/fr.json.d.ts +1 -3
  8. package/dist/i18n/locales/fr.json.js +1 -1
  9. package/dist/i18n/locales/ja.json.d.ts +1 -3
  10. package/dist/i18n/locales/ja.json.js +2 -2
  11. package/dist/i18n/locales/ko.json.d.ts +1 -3
  12. package/dist/i18n/locales/ko.json.js +2 -2
  13. package/dist/i18n/locales/pt.json.d.ts +1 -3
  14. package/dist/i18n/locales/pt.json.js +1 -1
  15. package/dist/i18n/locales/ru.json.d.ts +1 -3
  16. package/dist/i18n/locales/ru.json.js +1 -1
  17. package/dist/i18n/locales/th.json.d.ts +1 -3
  18. package/dist/i18n/locales/th.json.js +2 -2
  19. package/dist/i18n/locales/tr.json.d.ts +1 -3
  20. package/dist/i18n/locales/tr.json.js +2 -2
  21. package/dist/i18n/locales/zh.json.d.ts +1 -3
  22. package/dist/i18n/locales/zh.json.js +2 -2
  23. package/dist/index.js +172 -164
  24. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  25. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +1 -0
  26. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  27. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  28. package/dist/lib/Components/AmountInput/AmountInput.js +34 -32
  29. package/dist/lib/Components/AmountInput/types.d.ts +8 -0
  30. package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
  31. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts +1 -0
  32. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts.map +1 -1
  33. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +9 -8
  34. package/dist/lib/Components/Avatar/Avatar.d.ts +1 -4
  35. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  36. package/dist/lib/Components/Avatar/Avatar.js +33 -40
  37. package/dist/lib/Components/Avatar/types.d.ts +0 -6
  38. package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
  39. package/dist/lib/Components/BaseInput/BaseInput.js +13 -13
  40. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  41. package/dist/lib/Components/Button/Button.js +9 -9
  42. package/dist/lib/Components/Card/Card.js +18 -18
  43. package/dist/lib/Components/DataTable/DataTable.d.ts.map +1 -1
  44. package/dist/lib/Components/DataTable/DataTable.js +97 -80
  45. package/dist/lib/Components/DataTable/types.d.ts +2 -1
  46. package/dist/lib/Components/DataTable/types.d.ts.map +1 -1
  47. package/dist/lib/Components/Divider/Divider.js +4 -4
  48. package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
  49. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts +24 -0
  50. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts.map +1 -0
  51. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.js +11 -0
  52. package/dist/lib/Components/DotIndicator/index.d.ts +1 -0
  53. package/dist/lib/Components/DotIndicator/index.d.ts.map +1 -1
  54. package/dist/lib/Components/Icon/Icon.js +4 -4
  55. package/dist/lib/Components/Link/Link.js +6 -6
  56. package/dist/lib/Components/MediaCard/MediaCard.js +4 -4
  57. package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
  58. package/dist/lib/Components/Menu/Menu.d.ts +8 -3
  59. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  60. package/dist/lib/Components/Menu/Menu.js +40 -33
  61. package/dist/lib/Components/Menu/types.d.ts +6 -5
  62. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  63. package/dist/lib/Components/NavBar/NavBar.js +9 -9
  64. package/dist/lib/Components/Pagination/Pagination.js +10 -10
  65. package/dist/lib/Components/Popover/Popover.js +10 -10
  66. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +8 -3
  67. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  68. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +41 -32
  69. package/dist/lib/Components/SegmentedControl/types.d.ts +6 -5
  70. package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
  71. package/dist/lib/Components/Select/Select.d.ts +19 -5
  72. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  73. package/dist/lib/Components/Select/Select.js +127 -104
  74. package/dist/lib/Components/Select/index.d.ts +1 -1
  75. package/dist/lib/Components/Select/index.d.ts.map +1 -1
  76. package/dist/lib/Components/Select/types.d.ts +20 -19
  77. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  78. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +9 -9
  79. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -1
  80. package/dist/lib/Components/Select/utils/groupItems.d.ts +2 -2
  81. package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -1
  82. package/dist/lib/Components/SideBar/SideBar.d.ts +11 -3
  83. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  84. package/dist/lib/Components/SideBar/SideBar.js +61 -51
  85. package/dist/lib/Components/SideBar/index.d.ts +2 -2
  86. package/dist/lib/Components/SideBar/index.d.ts.map +1 -1
  87. package/dist/lib/Components/SideBar/types.d.ts +7 -6
  88. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  89. package/dist/lib/Components/Table/Table.d.ts +17 -1
  90. package/dist/lib/Components/Table/Table.d.ts.map +1 -1
  91. package/dist/lib/Components/Table/Table.js +74 -45
  92. package/dist/lib/Components/Table/types.d.ts +23 -0
  93. package/dist/lib/Components/Table/types.d.ts.map +1 -1
  94. package/dist/lib/Components/TileButton/TileButton.js +6 -6
  95. package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
  96. package/dist/lib/Symbols/Icons/ChevronAscending.js +1 -1
  97. package/dist/lib/Symbols/Icons/ChevronDescending.js +1 -1
  98. package/dist/lib/Symbols/Icons/Contact.d.ts +29 -0
  99. package/dist/lib/Symbols/Icons/Contact.d.ts.map +1 -0
  100. package/dist/lib/Symbols/Icons/Contact.js +28 -0
  101. package/dist/lib/Symbols/index.d.ts +1 -0
  102. package/dist/lib/Symbols/index.d.ts.map +1 -1
  103. package/dist/lib/Symbols/index.js +388 -386
  104. package/dist/libs/utils-shared/dist/index.js +149 -148
  105. package/dist/package.json +3 -3
  106. package/package.json +3 -3
  107. package/dist/lib/Components/Design-tokens/shared.d.ts +0 -20
  108. package/dist/lib/Components/Design-tokens/shared.d.ts.map +0 -1
@@ -8,26 +8,26 @@ import { Button as k } from "../Button/Button.js";
8
8
  import { ChevronRight as A } from "../../Symbols/Icons/ChevronRight.js";
9
9
  const R = ({
10
10
  page: p,
11
- totalPages: e,
11
+ totalPages: i,
12
12
  onPageChange: r,
13
13
  siblingCount: c = 1,
14
14
  className: l,
15
15
  ref: m,
16
16
  ...u
17
17
  }) => {
18
- const { t: i } = v();
19
- if (e <= 0)
18
+ const { t: e } = v();
19
+ if (i <= 0)
20
20
  return null;
21
- const a = Math.min(Math.max(p, 1), e), b = Math.max(c, 0), d = h(
21
+ const a = Math.min(Math.max(p, 1), i), b = Math.max(c, 0), d = h(
22
22
  a,
23
- e,
23
+ i,
24
24
  b
25
25
  );
26
26
  return /* @__PURE__ */ g(
27
27
  "nav",
28
28
  {
29
29
  ref: m,
30
- "aria-label": i("components.pagination.navigationAriaLabel"),
30
+ "aria-label": e("components.pagination.navigationAriaLabel"),
31
31
  className: x("flex items-center gap-8 overflow-x-auto p-4", l),
32
32
  ...u,
33
33
  children: [
@@ -39,7 +39,7 @@ const R = ({
39
39
  size: "sm",
40
40
  appearance: "gray",
41
41
  disabled: a <= 1,
42
- "aria-label": i("components.pagination.previousPageAriaLabel"),
42
+ "aria-label": e("components.pagination.previousPageAriaLabel"),
43
43
  onClick: () => r(a - 1)
44
44
  }
45
45
  ),
@@ -62,7 +62,7 @@ const R = ({
62
62
  size: "sm",
63
63
  appearance: t ? "gray" : "no-background",
64
64
  className: "shrink-0",
65
- "aria-label": i("components.pagination.pageAriaLabel", {
65
+ "aria-label": e("components.pagination.pageAriaLabel", {
66
66
  page: n
67
67
  }),
68
68
  "aria-current": t ? "page" : void 0,
@@ -79,8 +79,8 @@ const R = ({
79
79
  icon: A,
80
80
  size: "sm",
81
81
  appearance: "gray",
82
- disabled: a >= e,
83
- "aria-label": i("components.pagination.nextPageAriaLabel"),
82
+ disabled: a >= i,
83
+ "aria-label": e("components.pagination.nextPageAriaLabel"),
84
84
  onClick: () => r(a + 1)
85
85
  }
86
86
  )
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { createSafeContext as l, cn as p } from "../../../libs/utils-shared/dist/index.js";
2
+ import { createSafeContext as l, cn as s } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as v } from "class-variance-authority";
4
4
  import { createPopoverHandle as c } from "../../../node_modules/@base-ui/react/esm/popover/store/PopoverHandle.js";
5
5
  import { PopoverRoot as f } from "../../../node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js";
@@ -39,7 +39,7 @@ const [b, y] = l("Popover"), C = v(
39
39
  width: "fit"
40
40
  }
41
41
  }
42
- ), w = p(
42
+ ), w = s(
43
43
  "fixed inset-0 z-dialog-overlay bg-canvas-overlay-subtle",
44
44
  "data-open:animate-fade-in",
45
45
  "data-closed:animate-fade-out"
@@ -73,17 +73,17 @@ const [b, y] = l("Popover"), C = v(
73
73
  handle: o,
74
74
  payload: a,
75
75
  render: r,
76
- className: p("data-popup-open:z-menu", e),
76
+ className: s("data-popup-open:z-menu", e),
77
77
  ...n
78
78
  }
79
- ), V = ({
79
+ ), U = ({
80
80
  side: o = "bottom",
81
81
  sideOffset: a = 8,
82
82
  align: r = "start",
83
83
  width: e = "fit",
84
84
  initialFocus: n = !1,
85
85
  className: i,
86
- children: s
86
+ children: p
87
87
  }) => {
88
88
  const { overlay: d } = y({
89
89
  consumerName: "PopoverContent",
@@ -110,17 +110,17 @@ const [b, y] = l("Popover"), C = v(
110
110
  {
111
111
  "data-slot": "popover-content",
112
112
  initialFocus: n,
113
- className: p(C({ width: e, side: o }), i),
114
- children: s
113
+ className: s(C({ width: e, side: o }), i),
114
+ children: p
115
115
  }
116
116
  )
117
117
  }
118
118
  )
119
119
  ] });
120
- }, A = c;
120
+ }, V = c;
121
121
  export {
122
122
  B as Popover,
123
- V as PopoverContent,
123
+ U as PopoverContent,
124
124
  O as PopoverTrigger,
125
- A as createPopoverHandle
125
+ V as createPopoverHandle
126
126
  };
@@ -1,4 +1,9 @@
1
- import { SegmentedControlButtonProps, SegmentedControlProps } from './types';
2
- export declare function SegmentedControlButton({ value, children, icon: Icon, trailingContent, onClick, className, ...props }: SegmentedControlButtonProps): import("react/jsx-runtime").JSX.Element;
3
- export declare function SegmentedControl({ selectedValue, onSelectedChange, children, className, disabled: disabledProp, appearance, tabLayout, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ import { SegmentedControlButtonProps, SegmentedControlProps, SegmentedControlValue } from './types';
3
+ export declare function SegmentedControlButton<T extends SegmentedControlValue = SegmentedControlValue>({ value, children, icon: Icon, trailingContent, onClick, className, ...props }: SegmentedControlButtonProps<T>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function SegmentedControl<T extends SegmentedControlValue = SegmentedControlValue>({ selectedValue, onSelectedChange, children, className, disabled: disabledProp, appearance, tabLayout, ...props }: SegmentedControlProps<T>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function createSegmentedControl<T extends SegmentedControlValue = never>(): {
6
+ SegmentedControl: (props: SegmentedControlProps<T>) => ReactElement;
7
+ SegmentedControlButton: (props: SegmentedControlButtonProps<T>) => ReactElement;
8
+ };
4
9
  //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -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;AAwDjB,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,eAAe,EACf,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAgC7B;AAED,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"}
1
+ {"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAwDjB,wBAAgB,sBAAsB,CACpC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,EACvD,EACA,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,eAAe,EACf,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,CAAC,CAAC,CAAC,2CAgChC;AAED,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,EACvD,EACA,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,YAAY,EACtB,UAAyB,EACzB,SAAmB,EACnB,GAAG,KAAK,EACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAoD1B;AAED,wBAAgB,sBAAsB,CACpC,CAAC,SAAS,qBAAqB,GAAG,KAAK,KACpC;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC;IACpE,sBAAsB,EAAE,CACtB,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,KAClC,YAAY,CAAC;CACnB,CAEA"}
@@ -1,8 +1,8 @@
1
- import { jsx as a, jsxs as x } from "react/jsx-runtime";
2
- import { cn as g, useDisabledContext as h } from "../../../libs/utils-shared/dist/index.js";
1
+ import { jsx as r, jsxs as x } from "react/jsx-runtime";
2
+ import { cn as g, useDisabledContext as v } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as b } from "class-variance-authority";
4
- import { useRef as v } from "react";
5
- import { useSegmentedControlContext as y, SegmentedControlContextProvider as C } from "./SegmentedControlContext.js";
4
+ import { useRef as C } from "react";
5
+ import { useSegmentedControlContext as y, SegmentedControlContextProvider as S } from "./SegmentedControlContext.js";
6
6
  import { useSegmentedControlSelectedIndex as w, usePillElementLayoutEffect as N } from "./usePillElementLayoutEffect.js";
7
7
  const p = {
8
8
  root: b("relative flex flex-row items-center rounded-sm", {
@@ -53,66 +53,71 @@ const p = {
53
53
  }
54
54
  )
55
55
  };
56
- function L({
57
- value: n,
56
+ function k({
57
+ value: s,
58
58
  children: i,
59
59
  icon: t,
60
60
  trailingContent: l,
61
61
  onClick: d,
62
62
  className: c,
63
- ...r
63
+ ...a
64
64
  }) {
65
- const { selectedValue: u, onSelectedChange: o, disabled: e, tabLayout: m } = y(), s = u === n;
66
- return /* @__PURE__ */ a(
65
+ const { selectedValue: u, onSelectedChange: o, disabled: e, tabLayout: m } = y(), n = u === s;
66
+ return /* @__PURE__ */ r(
67
67
  "button",
68
68
  {
69
69
  type: "button",
70
70
  role: "radio",
71
- "aria-checked": s,
71
+ "aria-checked": n,
72
72
  "aria-disabled": e,
73
73
  disabled: e,
74
74
  onClick: (f) => {
75
- e || (o(n), d?.(f));
75
+ e || (o(s), d?.(f));
76
76
  },
77
77
  className: g(
78
- p.item({ selected: s, disabled: !!e }),
78
+ p.item({ selected: n, disabled: !!e }),
79
79
  m === "fixed" && "min-w-0 flex-1",
80
80
  c
81
81
  ),
82
- ...r,
82
+ ...a,
83
83
  children: /* @__PURE__ */ x("span", { className: "inline-flex min-w-0 items-center justify-center gap-8", children: [
84
- t && /* @__PURE__ */ a(t, { size: 16, className: "shrink-0" }),
85
- /* @__PURE__ */ a("span", { className: "min-w-0 truncate", children: i }),
84
+ t && /* @__PURE__ */ r(t, { size: 16, className: "shrink-0" }),
85
+ /* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: i }),
86
86
  l
87
87
  ] })
88
88
  }
89
89
  );
90
90
  }
91
- function P({
92
- selectedValue: n,
91
+ function j({
92
+ selectedValue: s,
93
93
  onSelectedChange: i,
94
94
  children: t,
95
95
  className: l,
96
96
  disabled: d,
97
97
  appearance: c = "background",
98
- tabLayout: r = "fixed",
98
+ tabLayout: a = "fixed",
99
99
  ...u
100
100
  }) {
101
- const o = h({
101
+ const o = v({
102
102
  consumerName: "SegmentedControl",
103
103
  mergeWith: { disabled: d }
104
- }), e = v(null), m = w(
105
- n,
104
+ }), e = C(null), m = w(
105
+ s,
106
106
  t
107
- ), { pill: s, isReady: f } = N({
107
+ ), { pill: n, isReady: f } = N({
108
108
  ref: e,
109
109
  selectedIndex: m,
110
110
  children: t
111
111
  });
112
- return /* @__PURE__ */ a(
113
- C,
112
+ return /* @__PURE__ */ r(
113
+ S,
114
114
  {
115
- value: { selectedValue: n, onSelectedChange: i, disabled: o, tabLayout: r },
115
+ value: {
116
+ selectedValue: s,
117
+ onSelectedChange: (h) => i(h),
118
+ disabled: o,
119
+ tabLayout: a
120
+ },
116
121
  children: /* @__PURE__ */ x(
117
122
  "div",
118
123
  {
@@ -123,21 +128,21 @@ function P({
123
128
  className: g(
124
129
  p.root({
125
130
  appearance: c,
126
- tabLayout: r
131
+ tabLayout: a
127
132
  }),
128
133
  l
129
134
  ),
130
135
  children: [
131
136
  t,
132
- /* @__PURE__ */ a(
137
+ /* @__PURE__ */ r(
133
138
  "div",
134
139
  {
135
140
  "aria-hidden": !0,
136
141
  className: p.pill({ disabled: o, isReady: f }),
137
142
  style: {
138
- width: s.width,
139
- height: s.height,
140
- transform: `translateX(${s.x}px)`
143
+ width: n.width,
144
+ height: n.height,
145
+ transform: `translateX(${n.x}px)`
141
146
  }
142
147
  }
143
148
  )
@@ -147,7 +152,11 @@ function P({
147
152
  }
148
153
  );
149
154
  }
155
+ function D() {
156
+ return { SegmentedControl: j, SegmentedControlButton: k };
157
+ }
150
158
  export {
151
- P as SegmentedControl,
152
- L as SegmentedControlButton
159
+ j as SegmentedControl,
160
+ k as SegmentedControlButton,
161
+ D as createSegmentedControl
153
162
  };
@@ -1,14 +1,15 @@
1
1
  import { ComponentType, ReactNode, ComponentPropsWithoutRef } from 'react';
2
2
  import { IconSize } from '../Icon/types';
3
- export type SegmentedControlProps = {
3
+ export type SegmentedControlValue = string;
4
+ export type SegmentedControlProps<T extends SegmentedControlValue = SegmentedControlValue> = {
4
5
  /**
5
6
  * The value of the currently selected segment (drives the sliding pill).
6
7
  */
7
- selectedValue: string;
8
+ selectedValue: T;
8
9
  /**
9
10
  * Callback when the selected segment value changes.
10
11
  */
11
- onSelectedChange: (value: string) => void;
12
+ onSelectedChange: (value: T) => void;
12
13
  /**
13
14
  * When true, the entire control is disabled (no interaction, selected uses muted styling).
14
15
  */
@@ -34,11 +35,11 @@ type IconComponent = ComponentType<{
34
35
  size?: IconSize;
35
36
  className?: string;
36
37
  }>;
37
- export type SegmentedControlButtonProps = {
38
+ export type SegmentedControlButtonProps<T extends SegmentedControlValue = SegmentedControlValue> = {
38
39
  /**
39
40
  * Value for this segment (must be unique among siblings).
40
41
  */
41
- value: string;
42
+ value: T;
42
43
  /**
43
44
  * Button label.
44
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SegmentedControl/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,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;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,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,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IACrD;IACF;;OAEG;IACH,aAAa,EAAE,CAAC,CAAC;IACjB;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC;;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,CACrC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IACrD;IACF;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
- import { MetaShape, SelectProps, SelectTriggerProps, SelectContentProps, SelectListProps, SelectSearchProps, SelectItemTextProps, SelectItemProps, SelectItemContentProps, SelectItemDescriptionProps, SelectSeparatorProps, SelectEmptyStateProps } from './types';
2
- declare function Select<TMeta extends MetaShape = MetaShape>({ value, defaultValue, onValueChange, disabled: disabledProp, items, filter, filteredItems, searchValue: searchValueProp, defaultSearchValue, onSearchValueChange, open, defaultOpen, onOpenChange, name, required, children, }: Readonly<SelectProps<TMeta>>): import("react/jsx-runtime").JSX.Element;
3
- declare const SelectTrigger: ({ render, disabled, ...props }: SelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ import { MetaShape, SelectProps, SelectTriggerProps, SelectContentProps, SelectListProps, SelectSearchProps, SelectItemTextProps, SelectItemProps, SelectItemContentProps, SelectItemDescriptionProps, SelectSeparatorProps, SelectEmptyStateProps, SelectValue } from './types';
3
+ declare function Select<T extends SelectValue = SelectValue, TMeta extends MetaShape = MetaShape>({ value, defaultValue, onValueChange, disabled: disabledProp, items, filter, filteredItems, searchValue: searchValueProp, defaultSearchValue, onSearchValueChange, open, defaultOpen, onOpenChange, name, required, children, }: Readonly<SelectProps<T, TMeta>>): import("react/jsx-runtime").JSX.Element;
4
+ declare const SelectTrigger: <T extends SelectValue = SelectValue>({ render, disabled, ...props }: SelectTriggerProps<T>) => import("react/jsx-runtime").JSX.Element;
4
5
  declare const SelectContent: ({ ref, className, children, side, sideOffset, align, initialFocus, ...props }: SelectContentProps) => import("react/jsx-runtime").JSX.Element;
5
- declare const SelectList: <TMeta extends MetaShape = MetaShape>({ ref, className, renderItem, ...props }: SelectListProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
6
- declare const SelectItem: ({ ref, className, children, ...props }: SelectItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const SelectList: <T extends SelectValue = SelectValue, TMeta extends MetaShape = MetaShape>({ ref, className, renderItem, ...props }: SelectListProps<T, TMeta>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const SelectItem: <T extends SelectValue = SelectValue>({ ref, className, children, ...props }: SelectItemProps<T>) => import("react/jsx-runtime").JSX.Element;
7
8
  declare const SelectSeparator: ({ ref, className, ...props }: SelectSeparatorProps) => import("react/jsx-runtime").JSX.Element;
8
9
  declare const SelectItemText: ({ ref, className, ...props }: SelectItemTextProps) => import("react/jsx-runtime").JSX.Element;
9
10
  declare const SelectItemContent: ({ ref, className, children, ...props }: SelectItemContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -11,4 +12,17 @@ declare const SelectItemDescription: ({ ref, className, children, ...props }: Se
11
12
  declare const SelectSearch: ({ className, placeholder, helperText, status, "aria-invalid": ariaInvalid, suffix, onClear, hideClearButton, }: SelectSearchProps) => import("react/jsx-runtime").JSX.Element;
12
13
  declare const SelectEmptyState: ({ ref, className, title, description, ...props }: SelectEmptyStateProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export { Select, SelectTrigger, SelectContent, SelectSearch, SelectList, SelectItemText, SelectItemContent, SelectItemDescription, SelectItem, SelectSeparator, SelectEmptyState, };
15
+ export declare function createSelect<T extends SelectValue = never, TMeta extends MetaShape = MetaShape>(): {
16
+ Select: (props: Readonly<SelectProps<T, TMeta>>) => ReactElement;
17
+ SelectTrigger: (props: SelectTriggerProps<T>) => ReactElement;
18
+ SelectContent: (props: SelectContentProps) => ReactElement;
19
+ SelectSearch: (props: SelectSearchProps) => ReactElement;
20
+ SelectList: (props: SelectListProps<T, TMeta>) => ReactElement;
21
+ SelectItemText: (props: SelectItemTextProps) => ReactElement;
22
+ SelectItemContent: (props: SelectItemContentProps) => ReactElement;
23
+ SelectItemDescription: (props: SelectItemDescriptionProps) => ReactElement;
24
+ SelectItem: (props: SelectItemProps<T>) => ReactElement;
25
+ SelectSeparator: (props: SelectSeparatorProps) => ReactElement;
26
+ SelectEmptyState: (props: SelectEmptyStateProps) => ReactElement;
27
+ };
14
28
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/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B,4CAcvB,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,GACjB,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EACV,SAAS,EAET,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EAEjB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACZ,MAAM,SAAS,CAAC;AAIjB,iBAAS,MAAM,CACb,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,KAAK,SAAS,SAAS,GAAG,SAAS,EACnC,EACA,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,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,2CA0DjC;AA6DD,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,gCAIzD,kBAAkB,CAAC,CAAC,CAAC,4CAsBvB,CAAC;AAgCF,QAAA,MAAM,aAAa,GAAI,+EASpB,kBAAkB,4CAoBpB,CAAC;AAEF,QAAA,MAAM,UAAU,GACd,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,KAAK,SAAS,SAAS,GAAG,SAAS,EACnC,0CAKC,eAAe,CAAC,CAAC,EAAE,KAA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