@ledgerhq/lumen-ui-react 0.1.11 → 0.1.12

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 (89) hide show
  1. package/dist/index.js +53 -55
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +10 -10
  3. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  4. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  5. package/dist/lib/Components/AmountInput/AmountInput.js +35 -32
  6. package/dist/lib/Components/Banner/Banner.js +5 -5
  7. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  8. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  9. package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
  10. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  11. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  12. package/dist/lib/Components/Button/BaseButton.js +28 -25
  13. package/dist/lib/Components/Button/Button.js +9 -9
  14. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts +1 -1
  15. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +1 -1
  16. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +37 -34
  17. package/dist/lib/Components/Card/Card.d.ts.map +1 -1
  18. package/dist/lib/Components/Card/Card.js +132 -129
  19. package/dist/lib/Components/Card/types.d.ts +1 -0
  20. package/dist/lib/Components/Card/types.d.ts.map +1 -1
  21. package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
  22. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  23. package/dist/lib/Components/CardButton/CardButton.js +28 -24
  24. package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
  25. package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  26. package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
  27. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
  28. package/dist/lib/Components/Dialog/types.d.ts +1 -1
  29. package/dist/lib/Components/Icon/Icon.js +4 -4
  30. package/dist/lib/Components/Icon/createIcon.js +4 -4
  31. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
  32. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  33. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +24 -18
  34. package/dist/lib/Components/InteractiveIcon/types.d.ts +6 -1
  35. package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  36. package/dist/lib/Components/Link/Link.d.ts +1 -1
  37. package/dist/lib/Components/Link/Link.d.ts.map +1 -1
  38. package/dist/lib/Components/Link/Link.js +44 -33
  39. package/dist/lib/Components/Link/types.d.ts +5 -0
  40. package/dist/lib/Components/Link/types.d.ts.map +1 -1
  41. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  42. package/dist/lib/Components/ListItem/ListItem.js +72 -65
  43. package/dist/lib/Components/Menu/Menu.d.ts +3 -3
  44. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  45. package/dist/lib/Components/Menu/Menu.js +133 -104
  46. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  47. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  48. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  49. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +88 -51
  50. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
  51. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  52. package/dist/lib/Components/Select/Select.d.ts +2 -2
  53. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  54. package/dist/lib/Components/Select/Select.js +94 -76
  55. package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
  56. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  57. package/dist/lib/Components/SideBar/SideBar.js +77 -74
  58. package/dist/lib/Components/SideBar/types.d.ts +12 -4
  59. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  60. package/dist/lib/Components/Spot/Spot.js +3 -3
  61. package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  62. package/dist/lib/Components/Stepper/Stepper.js +34 -24
  63. package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
  64. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  65. package/dist/lib/Components/Subheader/Subheader.js +31 -49
  66. package/dist/lib/Components/Subheader/index.d.ts +1 -1
  67. package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
  68. package/dist/lib/Components/Subheader/types.d.ts +1 -11
  69. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  70. package/dist/lib/Components/Switch/Switch.d.ts +1 -1
  71. package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
  72. package/dist/lib/Components/Switch/Switch.js +30 -22
  73. package/dist/lib/Components/Table/Table.js +49 -49
  74. package/dist/lib/Components/Tag/Tag.d.ts +1 -1
  75. package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
  76. package/dist/lib/Components/Tag/Tag.js +17 -14
  77. package/dist/lib/Components/Tile/Tile.d.ts +5 -12
  78. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  79. package/dist/lib/Components/Tile/Tile.js +79 -82
  80. package/dist/lib/Components/Tile/index.d.ts +1 -1
  81. package/dist/lib/Components/Tile/index.d.ts.map +1 -1
  82. package/dist/lib/Components/Tile/types.d.ts +1 -10
  83. package/dist/lib/Components/Tile/types.d.ts.map +1 -1
  84. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  85. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  86. package/dist/lib/Components/TileButton/TileButton.js +26 -23
  87. package/dist/libs/utils-shared/dist/index.js +95 -90
  88. package/dist/package.json +1 -1
  89. package/package.json +2 -2
@@ -1,15 +1,15 @@
1
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { cn as o } from "../../../libs/utils-shared/dist/index.js";
1
+ import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
+ import { cn as o, useDisabledContext as c, DisabledProvider as p } from "../../../libs/utils-shared/dist/index.js";
3
3
  import * as t from "@radix-ui/react-dropdown-menu";
4
- import { Check as u } from "../../Symbols/Icons/Check.js";
5
- import { Divider as p } from "../Divider/Divider.js";
6
- import { ChevronRight as b } from "../../Symbols/Icons/ChevronRight.js";
7
- const c = o(
4
+ import { Check as b } from "../../Symbols/Icons/Check.js";
5
+ import { Divider as g } from "../Divider/Divider.js";
6
+ import { ChevronRight as h } from "../../Symbols/Icons/ChevronRight.js";
7
+ const N = o(
8
8
  "z-menu min-w-160 overflow-hidden rounded-sm bg-muted p-8",
9
9
  "shadow-sm",
10
10
  "data-[state=open]:animate-fade-in",
11
11
  "data-[state=closed]:animate-fade-out"
12
- ), m = o(
12
+ ), l = o(
13
13
  "relative flex cursor-default items-center gap-12 select-none",
14
14
  "h-44 rounded-sm px-8 outline-hidden",
15
15
  "body-2-semi-bold text-base",
@@ -17,169 +17,198 @@ const c = o(
17
17
  "focus:bg-base-transparent-hover",
18
18
  "active:bg-base-transparent-pressed",
19
19
  "data-disabled:pointer-events-none data-disabled:text-disabled"
20
- ), N = o("px-8 py-4 body-3-semi-bold text-muted"), g = o(
21
- m,
20
+ ), y = o("px-8 py-4 body-3-semi-bold text-muted"), f = o(
21
+ l,
22
22
  "data-[state=open]:bg-base-transparent-hover"
23
23
  );
24
- function P({ ...e }) {
24
+ function G({ ...e }) {
25
25
  return /* @__PURE__ */ a(t.Root, { "data-slot": "menu", ...e });
26
26
  }
27
- const y = ({ ref: e, ...n }) => /* @__PURE__ */ a(
27
+ const x = ({ ref: e, ...s }) => /* @__PURE__ */ a(
28
28
  t.Trigger,
29
29
  {
30
30
  ref: e,
31
31
  "data-slot": "menu-trigger",
32
- ...n
32
+ ...s
33
33
  }
34
34
  );
35
- y.displayName = t.Trigger.displayName;
36
- function j({ ...e }) {
35
+ x.displayName = t.Trigger.displayName;
36
+ function L({ ...e }) {
37
37
  return /* @__PURE__ */ a(t.Group, { "data-slot": "menu-group", ...e });
38
38
  }
39
- function G({
39
+ function W({
40
40
  ...e
41
41
  }) {
42
42
  return /* @__PURE__ */ a(t.Portal, { ...e });
43
43
  }
44
- function L({
44
+ function q({
45
45
  ...e
46
46
  }) {
47
47
  return /* @__PURE__ */ a(t.Sub, { ...e });
48
48
  }
49
- function D({ ...e }) {
49
+ function A({ ...e }) {
50
50
  return /* @__PURE__ */ a(t.RadioGroup, { "data-slot": "menu-radio-group", ...e });
51
51
  }
52
- const f = ({
52
+ const M = ({
53
53
  ref: e,
54
- className: n,
55
- inset: s,
54
+ className: s,
55
+ inset: n,
56
56
  children: i,
57
- ...r
58
- }) => /* @__PURE__ */ l(
57
+ ...d
58
+ }) => /* @__PURE__ */ u(
59
59
  t.SubTrigger,
60
60
  {
61
61
  ref: e,
62
62
  "data-slot": "menu-sub-trigger",
63
- className: o(g, s && "pl-32", n),
64
- ...r,
63
+ className: o(f, n && "pl-32", s),
64
+ ...d,
65
65
  children: [
66
66
  i,
67
- /* @__PURE__ */ a(b, { size: 20, className: "ml-auto text-muted" })
67
+ /* @__PURE__ */ a(h, { size: 20, className: "ml-auto text-muted" })
68
68
  ]
69
69
  }
70
70
  );
71
- f.displayName = t.SubTrigger.displayName;
72
- const h = ({ ref: e, className: n, ...s }) => /* @__PURE__ */ a(
71
+ M.displayName = t.SubTrigger.displayName;
72
+ const I = ({ ref: e, className: s, ...n }) => /* @__PURE__ */ a(
73
73
  t.SubContent,
74
74
  {
75
75
  ref: e,
76
76
  "data-slot": "menu-sub-content",
77
- className: o(c, n),
78
- ...s
77
+ className: o(N, s),
78
+ ...n
79
79
  }
80
80
  );
81
- h.displayName = t.SubContent.displayName;
82
- const x = ({
81
+ I.displayName = t.SubContent.displayName;
82
+ const v = ({
83
83
  ref: e,
84
- className: n,
85
- sideOffset: s = 4,
84
+ className: s,
85
+ sideOffset: n = 4,
86
86
  align: i = "start",
87
- ...r
87
+ ...d
88
88
  }) => /* @__PURE__ */ a(t.Portal, { children: /* @__PURE__ */ a(
89
89
  t.Content,
90
90
  {
91
91
  ref: e,
92
92
  "data-slot": "menu-content",
93
- sideOffset: s,
94
- className: o(c, n),
95
- onClick: (d) => {
96
- d.stopPropagation(), r.onClick?.(d);
93
+ sideOffset: n,
94
+ className: o(N, s),
95
+ onClick: (r) => {
96
+ r.stopPropagation(), d.onClick?.(r);
97
97
  },
98
98
  align: i,
99
- ...r
99
+ ...d
100
100
  }
101
101
  ) });
102
- x.displayName = t.Content.displayName;
103
- const M = ({ ref: e, className: n, inset: s, ...i }) => /* @__PURE__ */ a(
104
- t.Item,
105
- {
106
- ref: e,
107
- "data-slot": "menu-item",
108
- className: o(m, s && "pl-32", n),
109
- ...i
110
- }
111
- );
112
- M.displayName = t.Item.displayName;
102
+ v.displayName = t.Content.displayName;
103
+ const C = ({
104
+ ref: e,
105
+ className: s,
106
+ inset: n,
107
+ disabled: i,
108
+ ...d
109
+ }) => {
110
+ const r = c({
111
+ consumerName: "MenuItem",
112
+ mergeWith: { disabled: i }
113
+ });
114
+ return /* @__PURE__ */ a(p, { value: { disabled: r }, children: /* @__PURE__ */ a(
115
+ t.Item,
116
+ {
117
+ ref: e,
118
+ "data-slot": "menu-item",
119
+ className: o(l, n && "pl-32", s),
120
+ disabled: r,
121
+ ...d
122
+ }
123
+ ) });
124
+ };
125
+ C.displayName = t.Item.displayName;
113
126
  const S = ({
114
127
  ref: e,
115
- className: n,
116
- children: s,
128
+ className: s,
129
+ children: n,
117
130
  checked: i,
131
+ disabled: d,
118
132
  ...r
119
- }) => /* @__PURE__ */ l(
120
- t.CheckboxItem,
121
- {
122
- ref: e,
123
- "data-slot": "menu-checkbox-item",
124
- className: o(m, n),
125
- checked: i,
126
- ...r,
127
- children: [
128
- s,
129
- /* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(u, { size: 24, className: "text-active" }) }) })
130
- ]
131
- }
132
- );
133
+ }) => {
134
+ const m = c({
135
+ consumerName: "MenuCheckboxItem",
136
+ mergeWith: { disabled: d }
137
+ });
138
+ return /* @__PURE__ */ a(p, { value: { disabled: m }, children: /* @__PURE__ */ u(
139
+ t.CheckboxItem,
140
+ {
141
+ ref: e,
142
+ "data-slot": "menu-checkbox-item",
143
+ className: o(l, s),
144
+ checked: i,
145
+ disabled: m,
146
+ ...r,
147
+ children: [
148
+ n,
149
+ /* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(b, { disabled: m, size: 24, className: "text-active" }) }) })
150
+ ]
151
+ }
152
+ ) });
153
+ };
133
154
  S.displayName = t.CheckboxItem.displayName;
134
- const C = ({
155
+ const k = ({
135
156
  ref: e,
136
- className: n,
137
- children: s,
138
- ...i
139
- }) => /* @__PURE__ */ l(
140
- t.RadioItem,
141
- {
142
- ref: e,
143
- "data-slot": "menu-radio-item",
144
- className: o(m, n),
145
- ...i,
146
- children: [
147
- s,
148
- /* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(u, { size: 24, className: "text-active" }) }) })
149
- ]
150
- }
151
- );
152
- C.displayName = t.RadioItem.displayName;
153
- const I = ({
157
+ className: s,
158
+ children: n,
159
+ disabled: i,
160
+ ...d
161
+ }) => {
162
+ const r = c({
163
+ consumerName: "MenuRadioItem",
164
+ mergeWith: { disabled: i }
165
+ });
166
+ return /* @__PURE__ */ a(p, { value: { disabled: r }, children: /* @__PURE__ */ u(
167
+ t.RadioItem,
168
+ {
169
+ ref: e,
170
+ "data-slot": "menu-radio-item",
171
+ disabled: r,
172
+ className: o(l, s),
173
+ ...d,
174
+ children: [
175
+ n,
176
+ /* @__PURE__ */ a("span", { className: "ml-auto flex size-24 items-center justify-center", children: /* @__PURE__ */ a(t.ItemIndicator, { children: /* @__PURE__ */ a(b, { disabled: r, size: 24, className: "text-active" }) }) })
177
+ ]
178
+ }
179
+ ) });
180
+ };
181
+ k.displayName = t.RadioItem.displayName;
182
+ const R = ({
154
183
  ref: e,
155
- className: n,
156
- inset: s,
184
+ className: s,
185
+ inset: n,
157
186
  ...i
158
187
  }) => /* @__PURE__ */ a(
159
188
  t.Label,
160
189
  {
161
190
  ref: e,
162
191
  "data-slot": "menu-label",
163
- className: o(N, s && "pl-32", n),
192
+ className: o(y, n && "pl-32", s),
164
193
  ...i
165
194
  }
166
195
  );
167
- I.displayName = t.Label.displayName;
168
- const v = ({ ref: e, className: n, ...s }) => /* @__PURE__ */ a(p, { ref: e, className: o("mx-8 my-4 w-auto", n), ...s });
169
- v.displayName = "MenuSeparator";
196
+ R.displayName = t.Label.displayName;
197
+ const T = ({ ref: e, className: s, ...n }) => /* @__PURE__ */ a(g, { ref: e, className: o("mx-8 my-4 w-auto", s), ...n });
198
+ T.displayName = "MenuSeparator";
170
199
  export {
171
- P as Menu,
200
+ G as Menu,
172
201
  S as MenuCheckboxItem,
173
- x as MenuContent,
174
- j as MenuGroup,
175
- M as MenuItem,
176
- I as MenuLabel,
177
- G as MenuPortal,
178
- D as MenuRadioGroup,
179
- C as MenuRadioItem,
180
- v as MenuSeparator,
181
- L as MenuSub,
182
- h as MenuSubContent,
183
- f as MenuSubTrigger,
184
- y as MenuTrigger
202
+ v as MenuContent,
203
+ L as MenuGroup,
204
+ C as MenuItem,
205
+ R as MenuLabel,
206
+ W as MenuPortal,
207
+ A as MenuRadioGroup,
208
+ k as MenuRadioItem,
209
+ T as MenuSeparator,
210
+ q as MenuSub,
211
+ I as MenuSubContent,
212
+ M as MenuSubTrigger,
213
+ x as MenuTrigger
185
214
  };
@@ -2,21 +2,21 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { cn as l } from "../../../libs/utils-shared/dist/index.js";
3
3
  const i = ({
4
4
  ref: s,
5
- ticker: t,
5
+ ticker: n,
6
6
  icon: a,
7
- className: n
7
+ className: t
8
8
  }) => /* @__PURE__ */ r(
9
9
  "div",
10
10
  {
11
11
  ref: s,
12
12
  className: l(
13
13
  "flex items-center gap-8 rounded-full bg-muted-transparent py-8 pr-12 pl-8",
14
- n
14
+ t
15
15
  ),
16
16
  "data-slot": "coin-capsule",
17
17
  children: [
18
18
  /* @__PURE__ */ e("span", { className: "flex size-24 shrink-0 items-center justify-center", children: a }),
19
- /* @__PURE__ */ e("span", { className: "body-1 text-base select-none", children: t })
19
+ /* @__PURE__ */ e("span", { className: "body-1 text-base select-none", children: n })
20
20
  ]
21
21
  }
22
22
  );
@@ -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, appearance, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SegmentedControl({ selectedValue, onSelectedChange, children, className, disabled: disabledProp, appearance, ...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":"AAMA,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAMjB,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAiC7B;yBAxCe,sBAAsB;;;AA4CtC,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAyB,EACzB,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA2CvB;yBAnDe,gBAAgB"}
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;AAwCjB,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAgC7B;yBAvCe,sBAAsB;;;AA2CtC,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,QAAQ,EAAE,YAAY,EACtB,UAAyB,EACzB,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAgDvB;yBAxDe,gBAAgB"}
@@ -1,74 +1,112 @@
1
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
2
- import { cn as m } from "../../../libs/utils-shared/dist/index.js";
3
- import { useRef as p } from "react";
4
- import { useSegmentedControlContext as b, SegmentedControlContextProvider as x } from "./SegmentedControlContext.js";
5
- import { useSegmentedControlSelectedIndex as g, usePillElementLayoutEffect as h } from "./usePillElementLayoutEffect.js";
6
- function v({
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: l,
41
+ children: a,
9
42
  icon: e,
10
- onClick: d,
11
- className: n,
12
- ...a
43
+ onClick: l,
44
+ className: d,
45
+ ...m
13
46
  }) {
14
- const { selectedValue: u, onSelectedChange: i, disabled: r } = b(), t = u === o;
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": t,
21
- "aria-disabled": r,
22
- disabled: r,
23
- onClick: (f) => {
24
- r || (i(o), d?.(f));
53
+ "aria-checked": i,
54
+ "aria-disabled": t,
55
+ disabled: t,
56
+ onClick: (r) => {
57
+ t || (n(o), l?.(r));
25
58
  },
26
- className: m(
27
- "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",
28
- t ? "body-2-semi-bold text-base" : "body-2 text-muted hover:body-2-semi-bold hover:text-muted-hover",
29
- n
59
+ className: p(
60
+ f.item({
61
+ selected: i
62
+ }),
63
+ d
30
64
  ),
31
- ...a,
32
- children: /* @__PURE__ */ c("span", { className: "inline-flex shrink-0 items-center justify-center gap-8", children: [
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: l })
68
+ /* @__PURE__ */ s("span", { children: a })
35
69
  ] })
36
70
  }
37
71
  );
38
72
  }
39
- v.displayName = "SegmentedControlButton";
40
- function y({
73
+ S.displayName = "SegmentedControlButton";
74
+ function w({
41
75
  selectedValue: o,
42
- onSelectedChange: l,
76
+ onSelectedChange: a,
43
77
  children: e,
44
- className: d,
45
- disabled: n,
46
- appearance: a = "background",
78
+ className: l,
79
+ disabled: d,
80
+ appearance: m = "background",
47
81
  ...u
48
82
  }) {
49
- const i = p(null), r = g(
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: t } = h({
53
- ref: i,
54
- selectedIndex: r,
89
+ ), { pill: r } = y({
90
+ ref: t,
91
+ selectedIndex: i,
55
92
  children: e
56
93
  });
57
94
  return /* @__PURE__ */ s(
58
- x,
95
+ v,
59
96
  {
60
- value: { selectedValue: o, onSelectedChange: l, disabled: n },
61
- children: /* @__PURE__ */ c(
97
+ value: { selectedValue: o, onSelectedChange: a, disabled: n },
98
+ children: /* @__PURE__ */ b(
62
99
  "div",
63
100
  {
64
101
  ...u,
65
- ref: i,
102
+ ref: t,
66
103
  role: "radiogroup",
67
104
  "aria-disabled": n,
68
- className: m(
69
- "relative flex w-full flex-row items-center rounded-sm",
70
- a === "background" && "bg-surface",
71
- d
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: m(
80
- "pointer-events-none absolute top-0 left-0 z-0 rounded-sm transition-transform duration-250 ease-in-out",
81
- n ? "bg-base-transparent-pressed" : "bg-muted-transparent"
82
- ),
117
+ className: f.pill({
118
+ disabled: n
119
+ }),
83
120
  style: {
84
- width: t.width,
85
- height: t.height,
86
- transform: `translateX(${t.x}px)`
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
- y.displayName = "SegmentedControl";
133
+ w.displayName = "SegmentedControl";
97
134
  export {
98
- y as SegmentedControl,
99
- v as SegmentedControlButton
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?: boolean;
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,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,QAAA,MAAO,+BAA+B;;;EAC+B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,oCAInC,CAAC;AAEL,OAAO,EAAE,+BAA+B,EAAE,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;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
1
  import { SelectProps, SelectTriggerProps, SelectContentProps, SelectGroupProps, SelectLabelProps, SelectItemTextProps, SelectItemProps, SelectSeparatorProps, SelectButtonTriggerProps } from './types';
2
- declare function Select({ value, defaultValue, onValueChange, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
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: {
@@ -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,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAiB5E;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAElD;AAwDD,QAAA,MAAM,aAAa;2BAA0B,kBAAkB;;CAoB9D,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
+ {"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"}