@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.
Files changed (136) hide show
  1. package/dist/i18n/locales/de.json.d.ts +3 -0
  2. package/dist/i18n/locales/de.json.js +4 -2
  3. package/dist/i18n/locales/en.json.d.ts +3 -0
  4. package/dist/i18n/locales/en.json.js +6 -4
  5. package/dist/i18n/locales/es.json.d.ts +3 -0
  6. package/dist/i18n/locales/es.json.js +6 -4
  7. package/dist/i18n/locales/fr.json.d.ts +3 -0
  8. package/dist/i18n/locales/fr.json.js +6 -4
  9. package/dist/i18n/locales/ja.json.d.ts +3 -0
  10. package/dist/i18n/locales/ja.json.js +6 -4
  11. package/dist/i18n/locales/ko.json.d.ts +3 -0
  12. package/dist/i18n/locales/ko.json.js +6 -4
  13. package/dist/i18n/locales/pt.json.d.ts +3 -0
  14. package/dist/i18n/locales/pt.json.js +6 -4
  15. package/dist/i18n/locales/ru.json.d.ts +3 -0
  16. package/dist/i18n/locales/ru.json.js +6 -4
  17. package/dist/i18n/locales/th.json.d.ts +3 -0
  18. package/dist/i18n/locales/th.json.js +6 -4
  19. package/dist/i18n/locales/tr.json.d.ts +3 -0
  20. package/dist/i18n/locales/tr.json.js +6 -4
  21. package/dist/i18n/locales/zh.json.d.ts +3 -0
  22. package/dist/i18n/locales/zh.json.js +6 -4
  23. package/dist/index.js +114 -113
  24. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  25. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +41 -41
  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 +35 -32
  29. package/dist/lib/Components/Banner/Banner.js +5 -5
  30. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  31. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  32. package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
  33. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  34. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  35. package/dist/lib/Components/Button/BaseButton.js +28 -25
  36. package/dist/lib/Components/Button/Button.js +9 -9
  37. package/dist/lib/Components/Card/Card.d.ts.map +1 -1
  38. package/dist/lib/Components/Card/Card.js +110 -107
  39. package/dist/lib/Components/Card/types.d.ts +1 -0
  40. package/dist/lib/Components/Card/types.d.ts.map +1 -1
  41. package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
  42. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  43. package/dist/lib/Components/CardButton/CardButton.js +28 -24
  44. package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
  45. package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  46. package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
  47. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
  48. package/dist/lib/Components/Dialog/types.d.ts +1 -1
  49. package/dist/lib/Components/Icon/Icon.js +4 -4
  50. package/dist/lib/Components/Icon/createIcon.js +4 -4
  51. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
  52. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  53. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +40 -20
  54. package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -1
  55. package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  56. package/dist/lib/Components/Link/Link.d.ts +1 -1
  57. package/dist/lib/Components/Link/Link.d.ts.map +1 -1
  58. package/dist/lib/Components/Link/Link.js +44 -33
  59. package/dist/lib/Components/Link/types.d.ts +5 -0
  60. package/dist/lib/Components/Link/types.d.ts.map +1 -1
  61. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  62. package/dist/lib/Components/ListItem/ListItem.js +72 -65
  63. package/dist/lib/Components/MediaCard/MediaCard.d.ts +33 -0
  64. package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -0
  65. package/dist/lib/Components/MediaCard/MediaCard.js +128 -0
  66. package/dist/lib/Components/MediaCard/index.d.ts +3 -0
  67. package/dist/lib/Components/MediaCard/index.d.ts.map +1 -0
  68. package/dist/lib/Components/MediaCard/types.d.ts +30 -0
  69. package/dist/lib/Components/MediaCard/types.d.ts.map +1 -0
  70. package/dist/lib/Components/Menu/Menu.d.ts +3 -3
  71. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  72. package/dist/lib/Components/Menu/Menu.js +133 -104
  73. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  74. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  75. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  76. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +88 -51
  77. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
  78. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  79. package/dist/lib/Components/Select/Select.d.ts +5 -5
  80. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  81. package/dist/lib/Components/Select/Select.js +94 -76
  82. package/dist/lib/Components/Select/index.d.ts +1 -1
  83. package/dist/lib/Components/Select/types.d.ts +4 -4
  84. package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
  85. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  86. package/dist/lib/Components/SideBar/SideBar.js +77 -74
  87. package/dist/lib/Components/SideBar/types.d.ts +12 -4
  88. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  89. package/dist/lib/Components/Spot/Spot.js +3 -3
  90. package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  91. package/dist/lib/Components/Stepper/Stepper.js +34 -24
  92. package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
  93. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  94. package/dist/lib/Components/Subheader/Subheader.js +31 -49
  95. package/dist/lib/Components/Subheader/index.d.ts +1 -1
  96. package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
  97. package/dist/lib/Components/Subheader/types.d.ts +1 -11
  98. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  99. package/dist/lib/Components/Switch/Switch.d.ts +1 -1
  100. package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
  101. package/dist/lib/Components/Switch/Switch.js +30 -22
  102. package/dist/lib/Components/Table/Table.js +49 -49
  103. package/dist/lib/Components/Tag/Tag.d.ts +1 -1
  104. package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
  105. package/dist/lib/Components/Tag/Tag.js +17 -14
  106. package/dist/lib/Components/Tile/Tile.d.ts +5 -12
  107. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  108. package/dist/lib/Components/Tile/Tile.js +79 -82
  109. package/dist/lib/Components/Tile/index.d.ts +1 -1
  110. package/dist/lib/Components/Tile/index.d.ts.map +1 -1
  111. package/dist/lib/Components/Tile/types.d.ts +1 -10
  112. package/dist/lib/Components/Tile/types.d.ts.map +1 -1
  113. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  114. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  115. package/dist/lib/Components/TileButton/TileButton.js +26 -23
  116. package/dist/lib/Components/{ButtonTrigger/ButtonTrigger.d.ts → TriggerButton/TriggerButton.d.ts} +10 -10
  117. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -0
  118. package/dist/lib/Components/TriggerButton/TriggerButton.js +76 -0
  119. package/dist/lib/Components/TriggerButton/index.d.ts +3 -0
  120. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/index.d.ts.map +1 -1
  121. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts +1 -1
  122. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts.map +1 -1
  123. package/dist/lib/Components/index.d.ts +2 -1
  124. package/dist/lib/Components/index.d.ts.map +1 -1
  125. package/dist/lib/Symbols/Icons/NanoGen5.d.ts +29 -0
  126. package/dist/lib/Symbols/Icons/NanoGen5.d.ts.map +1 -0
  127. package/dist/lib/Symbols/Icons/NanoGen5.js +27 -0
  128. package/dist/lib/Symbols/index.d.ts +1 -0
  129. package/dist/lib/Symbols/index.d.ts.map +1 -1
  130. package/dist/lib/Symbols/index.js +194 -192
  131. package/dist/libs/utils-shared/dist/index.js +95 -90
  132. package/dist/package.json +2 -2
  133. package/package.json +2 -2
  134. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +0 -1
  135. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +0 -73
  136. package/dist/lib/Components/ButtonTrigger/index.d.ts +0 -3
@@ -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
- 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;
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 SelectButtonTrigger: ({ selectedValue, selectedContent, label, ...props }: SelectButtonTriggerProps) => import("react/jsx-runtime").JSX.Element;
29
- export { Select, SelectGroup, SelectTrigger, SelectContent, SelectLabel, SelectItemText, SelectItem, SelectSeparator, SelectButtonTrigger, };
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,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"}
@@ -1,51 +1,61 @@
1
1
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { cn as s } from "../../../libs/utils-shared/dist/index.js";
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 c } from "class-variance-authority";
5
- import { SelectProvider as p, useSelectContext as u } from "./SelectContext.js";
6
- import { useControllableState as g } from "../../../utils/useControllableState/useControllableState.js";
7
- import { Check as f } from "../../Symbols/Icons/Check.js";
8
- import { Divider as h } from "../Divider/Divider.js";
9
- import { ButtonTrigger as b } from "../ButtonTrigger/ButtonTrigger.js";
10
- import { ChevronDown as m } from "../../Symbols/Icons/ChevronDown.js";
11
- import { ChevronUp as x } from "../../Symbols/Icons/ChevronUp.js";
12
- function J({ value: t, defaultValue: a, onValueChange: r, ...o }) {
13
- const [i, n] = g({
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(p, { value: { selectedValue: i }, children: /* @__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: i,
23
- onValueChange: n,
24
- ...o
31
+ value: c,
32
+ onValueChange: p,
33
+ disabled: n,
34
+ ...i
25
35
  }
26
36
  ) });
27
37
  }
28
- function K({ ...t }) {
38
+ function O({ ...t }) {
29
39
  return /* @__PURE__ */ e(l.Group, { "data-slot": "select-group", ...t });
30
40
  }
31
- const y = s(
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
- ), S = s(
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
- ), N = ({
54
+ ), C = ({
45
55
  ref: t,
46
56
  className: a,
47
57
  labelClassName: r,
48
- label: o,
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: s(y, a),
66
+ className: o(v, a),
57
67
  ...n,
58
68
  children: [
59
- o && /* @__PURE__ */ e("label", { className: s(S, r), children: o }),
69
+ s && /* @__PURE__ */ e("label", { className: o(w, r), children: s }),
60
70
  /* @__PURE__ */ e(
61
71
  "span",
62
72
  {
63
- className: s(
73
+ className: o(
64
74
  "flex-1 truncate text-left",
65
- o && "mt-16 opacity-100 transition-opacity delay-100 duration-300 group-data-placeholder:mt-0 group-data-placeholder:opacity-0"
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
- m,
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
- ), v = ({ render: t, ...a }) => {
80
- const { selectedValue: r } = u({
89
+ ), T = ({ render: t, disabled: a, ...r }) => {
90
+ const { selectedValue: s } = b({
81
91
  consumerName: "SelectTrigger",
82
92
  contextRequired: !0
83
- }), o = /* @__PURE__ */ e(l.Value, { "data-slot": "select-value" });
93
+ }), i = /* @__PURE__ */ e(l.Value, { "data-slot": "select-value" });
84
94
  return t ? /* @__PURE__ */ e(
85
95
  l.Trigger,
86
96
  {
87
- ref: a.ref,
97
+ disabled: a,
98
+ ref: r.ref,
88
99
  "data-slot": "select-trigger",
89
100
  asChild: !0,
90
- children: t({ selectedValue: r, selectedContent: o })
101
+ children: t({ selectedValue: s, selectedContent: i })
91
102
  }
92
- ) : /* @__PURE__ */ e(N, { ...a, selectedContent: o });
103
+ ) : /* @__PURE__ */ e(
104
+ C,
105
+ {
106
+ ...r,
107
+ disabled: a,
108
+ selectedContent: i
109
+ }
110
+ );
93
111
  };
94
- v.displayName = l.Trigger.displayName;
95
- const w = c(
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
- ), C = c("p-8", {
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
- }), T = ({
144
+ }), z = ({
127
145
  ref: t,
128
146
  className: a,
129
147
  children: r,
130
- position: o = "popper",
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: s(w({ position: o }), a),
138
- position: o,
155
+ className: o(I({ position: s }), a),
156
+ position: s,
139
157
  ...i,
140
158
  children: [
141
- /* @__PURE__ */ e(D, {}),
142
- /* @__PURE__ */ e(l.Viewport, { className: C({ position: o }), children: r }),
143
- /* @__PURE__ */ e(P, {})
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
- T.displayName = l.Content.displayName;
148
- const I = ({ ref: t, className: a, ...r }) => /* @__PURE__ */ e(
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: s("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", a),
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
- I.displayName = l.Label.displayName;
158
- const V = s(
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
- ), z = ({
185
+ ), D = ({
168
186
  ref: t,
169
187
  className: a,
170
188
  children: r,
171
- ...o
189
+ ...s
172
190
  }) => /* @__PURE__ */ d(
173
191
  l.Item,
174
192
  {
175
193
  ref: t,
176
194
  "data-slot": "select-item",
177
- className: s(V, a),
178
- ...o,
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(f, { size: 24, className: "ms-8 shrink-0 text-active" }) }) })
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
- z.displayName = l.Item.displayName;
186
- const j = ({
203
+ D.displayName = l.Item.displayName;
204
+ const P = ({
187
205
  ref: t,
188
206
  className: a,
189
207
  ...r
190
- }) => /* @__PURE__ */ e(h, { ref: t, className: s("mx-8 my-4 w-auto", a), ...r });
191
- j.displayName = "SelectSeparator";
192
- const B = ({ ref: t, className: a, ...r }) => /* @__PURE__ */ e(
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: s("body-2 text-muted", a),
215
+ className: o("body-2 text-muted", a),
198
216
  ...r
199
217
  }
200
218
  );
201
- B.displayName = l.ItemText.displayName;
202
- function D({
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: s(
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(x, { className: "size-4" })
233
+ children: /* @__PURE__ */ e(N, { className: "size-4" })
216
234
  }
217
235
  );
218
236
  }
219
- function P({
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: s(
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(m, { className: "size-4" })
250
+ children: /* @__PURE__ */ e(u, { className: "size-4" })
233
251
  }
234
252
  );
235
253
  }
236
- const M = ({
254
+ const Q = ({
237
255
  selectedValue: t,
238
256
  selectedContent: a,
239
257
  label: r,
240
- ...o
241
- }) => /* @__PURE__ */ e(b, { ...o, children: t ? a : r });
258
+ ...s
259
+ }) => /* @__PURE__ */ e(S, { ...s, children: t ? a : r });
242
260
  export {
243
- J as Select,
244
- M as SelectButtonTrigger,
245
- T as SelectContent,
246
- K as SelectGroup,
247
- z as SelectItem,
248
- B as SelectItemText,
249
- I as SelectLabel,
250
- j as SelectSeparator,
251
- v as SelectTrigger
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, SelectButtonTriggerProps, } from './types';
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 { ButtonTriggerProps } from '../ButtonTrigger';
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. `SelectButtonTrigger`) or a custom render function.
76
+ * Can be a preset component (e.g. `SelectTriggerButton`) or a custom render function.
77
77
  *
78
- * @example render={(props) => <SelectButtonTrigger {...props} label="Label" />}
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 SelectButtonTriggerProps = SelectTriggerRenderProps & Omit<ButtonTriggerProps, 'children'> & {
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":"AAOA,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;4IAWrB,gBAAgB;;CAmDlB,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;8BAG/B,0BAA0B;;CAgC5B,CAAC"}
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"}