@ledgerhq/lumen-ui-react 0.1.62 → 0.1.64

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 (179) hide show
  1. package/ai-rules/RULES.md +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +80 -78
  5. package/dist/lib/Components/core/AddressInput/AddressInput.js +1 -1
  6. package/dist/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
  7. package/dist/lib/Components/core/AmountInput/AmountInput.js +22 -22
  8. package/dist/lib/Components/core/Avatar/Avatar.js +7 -7
  9. package/dist/lib/Components/core/AvatarButton/AvatarButton.js +8 -8
  10. package/dist/lib/Components/core/Banner/Banner.js +1 -1
  11. package/dist/lib/Components/core/Button/Button.js +6 -6
  12. package/dist/lib/Components/core/Card/Card.js +17 -17
  13. package/dist/lib/Components/core/ContentBanner/ContentBanner.d.ts +1 -1
  14. package/dist/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
  15. package/dist/lib/Components/core/DataTable/DataTable.js +45 -45
  16. package/dist/lib/Components/core/Dialog/DialogHeader/DialogHeader.js +1 -1
  17. package/dist/lib/Components/core/Divider/Divider.js +4 -4
  18. package/dist/lib/Components/core/DotCount/DotCount.js +3 -3
  19. package/dist/lib/Components/core/DotIcon/DotIcon.js +4 -4
  20. package/dist/lib/Components/core/DotSymbol/DotSymbol.js +18 -18
  21. package/dist/lib/Components/core/Link/Link.d.ts.map +1 -1
  22. package/dist/lib/Components/core/Link/Link.js +25 -24
  23. package/dist/lib/Components/core/ListItem/ListItem.d.ts +1 -1
  24. package/dist/lib/Components/core/ListItem/ListItem.js +4 -4
  25. package/dist/lib/Components/core/MediaBanner/MediaBanner.js +16 -16
  26. package/dist/lib/Components/core/MediaButton/MediaButton.js +2 -2
  27. package/dist/lib/Components/core/MediaCard/MediaCard.js +1 -1
  28. package/dist/lib/Components/core/MediaImage/MediaImage.js +5 -5
  29. package/dist/lib/Components/core/Menu/Menu.js +25 -25
  30. package/dist/lib/Components/core/NavBar/CoinCapsule.js +4 -4
  31. package/dist/lib/Components/core/NavBar/NavBar.js +3 -3
  32. package/dist/lib/Components/core/PageIndicator/PageIndicator.js +5 -5
  33. package/dist/lib/Components/core/Pagination/Pagination.js +15 -15
  34. package/dist/lib/Components/core/Popover/Popover.js +13 -13
  35. package/dist/lib/Components/core/SearchInput/SearchInput.js +5 -5
  36. package/dist/lib/Components/core/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  37. package/dist/lib/Components/core/SegmentedControl/SegmentedControl.js +78 -82
  38. package/dist/lib/Components/core/Select/Select.d.ts.map +1 -1
  39. package/dist/lib/Components/core/Select/Select.js +105 -104
  40. package/dist/lib/Components/core/SideBar/SideBar.js +28 -28
  41. package/dist/lib/Components/core/Spinner/Spinner.js +5 -5
  42. package/dist/lib/Components/core/Spot/Spot.d.ts +7 -25
  43. package/dist/lib/Components/core/Spot/Spot.d.ts.map +1 -1
  44. package/dist/lib/Components/core/Spot/Spot.js +33 -102
  45. package/dist/lib/Components/core/Spot/SpotNumber.d.ts +16 -0
  46. package/dist/lib/Components/core/Spot/SpotNumber.d.ts.map +1 -0
  47. package/dist/lib/Components/core/Spot/SpotNumber.js +46 -0
  48. package/dist/lib/Components/core/Spot/index.d.ts +1 -0
  49. package/dist/lib/Components/core/Spot/index.d.ts.map +1 -1
  50. package/dist/lib/Components/core/Spot/styles.d.ts +14 -0
  51. package/dist/lib/Components/core/Spot/styles.d.ts.map +1 -0
  52. package/dist/lib/Components/core/Spot/styles.js +275 -0
  53. package/dist/lib/Components/core/Spot/types.d.ts +27 -38
  54. package/dist/lib/Components/core/Spot/types.d.ts.map +1 -1
  55. package/dist/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
  56. package/dist/lib/Components/core/Stepper/Stepper.js +51 -48
  57. package/dist/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
  58. package/dist/lib/Components/core/Subheader/Subheader.js +33 -29
  59. package/dist/lib/Components/core/Switch/Switch.js +5 -5
  60. package/dist/lib/Components/core/Table/Table.d.ts.map +1 -1
  61. package/dist/lib/Components/core/Table/Table.js +64 -63
  62. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.js +6 -6
  63. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts +1 -1
  64. package/dist/lib/Components/core/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
  65. package/dist/lib/Components/core/Tile/Tile.d.ts +2 -2
  66. package/dist/lib/Components/core/TileButton/TileButton.js +8 -8
  67. package/dist/lib/Components/core/Timeline/Timeline.js +16 -16
  68. package/dist/lib/Components/core/Toast/Toast.js +4 -4
  69. package/dist/lib/Components/core/Toast/Toaster.js +9 -9
  70. package/dist/lib/Components/core/Trend/Trend.js +3 -3
  71. package/dist/lib/Components/internal/BaseButton/BaseButton.js +9 -9
  72. package/dist/lib/Components/internal/BaseInput/BaseInput.js +21 -21
  73. package/dist/lib/Components/internal/BaseInput/useAutosizeTextarea/useAutosizeTextarea.js +4 -4
  74. package/dist/lib/Components/internal/BaseTag/BaseTag.js +4 -4
  75. package/dist/lib/Components/symbols/Icon/Icon.js +4 -4
  76. package/dist/lib/Components/symbols/Icon/createIcon.js +5 -5
  77. package/dist/lib/Components/symbols/icons/AiBubble.d.ts +29 -0
  78. package/dist/lib/Components/symbols/icons/AiBubble.d.ts.map +1 -0
  79. package/dist/lib/Components/symbols/icons/AiBubble.js +30 -0
  80. package/dist/lib/Components/symbols/icons/ArrowBottomLeft.d.ts +29 -0
  81. package/dist/lib/Components/symbols/icons/ArrowBottomLeft.d.ts.map +1 -0
  82. package/dist/lib/Components/symbols/icons/ArrowBottomLeft.js +27 -0
  83. package/dist/lib/Components/symbols/icons/Bug.js +3 -3
  84. package/dist/lib/Components/symbols/icons/Hourglass.d.ts +29 -0
  85. package/dist/lib/Components/symbols/icons/Hourglass.d.ts.map +1 -0
  86. package/dist/lib/Components/symbols/icons/Hourglass.js +27 -0
  87. package/dist/lib/Components/symbols/icons/Repeat.d.ts +29 -0
  88. package/dist/lib/Components/symbols/icons/Repeat.d.ts.map +1 -0
  89. package/dist/lib/Components/symbols/icons/Repeat.js +27 -0
  90. package/dist/lib/Components/symbols/icons/Robot.d.ts +29 -0
  91. package/dist/lib/Components/symbols/icons/Robot.d.ts.map +1 -0
  92. package/dist/lib/Components/symbols/icons/Robot.js +29 -0
  93. package/dist/lib/Components/symbols/icons/Switch.d.ts.map +1 -1
  94. package/dist/lib/Components/symbols/icons/Switch.js +24 -12
  95. package/dist/lib/Components/symbols/icons/Wifi.d.ts +29 -0
  96. package/dist/lib/Components/symbols/icons/Wifi.d.ts.map +1 -0
  97. package/dist/lib/Components/symbols/icons/Wifi.js +36 -0
  98. package/dist/lib/Components/symbols/index.d.ts +6 -0
  99. package/dist/lib/Components/symbols/index.d.ts.map +1 -1
  100. package/dist/lib/Components/symbols/index.js +610 -598
  101. package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
  102. package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +36 -35
  103. package/dist/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
  104. package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
  105. package/dist/lib/Components/visualization/DonutChart/DonutChart.js +31 -31
  106. package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +4 -4
  107. package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
  108. package/dist/lib/Components/visualization/DonutChart/DonutRing.js +13 -12
  109. package/dist/lib/Components/visualization/DonutChart/donutSizeContext.js +2 -2
  110. package/dist/lib/Components/visualization/DonutChart/types.d.ts +1 -1
  111. package/dist/lib/Components/visualization/Legend/Legend.d.ts +1 -1
  112. package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
  113. package/dist/lib/Components/visualization/Legend/Legend.js +7 -11
  114. package/dist/lib/Components/visualization/Legend/types.d.ts +2 -2
  115. package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
  116. package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
  117. package/dist/lib/Components/visualization/LineChart/LineChart.js +90 -84
  118. package/dist/lib/Components/visualization/LineChart/types.d.ts +1 -1
  119. package/dist/lib/Components/visualization/LineChart/utils.d.ts +2 -1
  120. package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
  121. package/dist/lib/Components/visualization/LineChart/utils.js +23 -22
  122. package/dist/lib/Components/visualization/config.d.ts +0 -3
  123. package/dist/lib/Components/visualization/config.d.ts.map +1 -1
  124. package/dist/lib/Components/visualization/config.js +3 -6
  125. package/dist/libs/utils-shared/dist/index.js +191 -143
  126. package/dist/package.json +4 -6
  127. package/dist/translations/index.d.ts +3 -0
  128. package/dist/translations/index.d.ts.map +1 -0
  129. package/dist/{i18n → translations}/languages.d.ts +0 -5
  130. package/dist/translations/languages.d.ts.map +1 -0
  131. package/dist/{i18n → translations}/languages.js +1 -2
  132. package/dist/{i18n → translations}/locales/en.json.d.ts +11 -0
  133. package/dist/{i18n → translations}/locales/en.json.js +2 -2
  134. package/dist/translations/translations.d.ts +727 -0
  135. package/dist/translations/translations.d.ts.map +1 -0
  136. package/dist/translations/translations.js +22 -0
  137. package/package.json +4 -6
  138. package/dist/_virtual/dynamic-import-helper.js +0 -9
  139. package/dist/i18n/I18nProvider.d.ts +0 -8
  140. package/dist/i18n/I18nProvider.d.ts.map +0 -1
  141. package/dist/i18n/I18nProvider.js +0 -14
  142. package/dist/i18n/i18n.d.ts +0 -12
  143. package/dist/i18n/i18n.d.ts.map +0 -1
  144. package/dist/i18n/i18n.js +0 -42
  145. package/dist/i18n/index.d.ts +0 -4
  146. package/dist/i18n/index.d.ts.map +0 -1
  147. package/dist/i18n/languages.d.ts.map +0 -1
  148. package/dist/i18n/useCommonTranslation.d.ts +0 -2
  149. package/dist/i18n/useCommonTranslation.d.ts.map +0 -1
  150. package/dist/i18n/useCommonTranslation.js +0 -6
  151. package/dist/node_modules/i18next/dist/esm/i18next.js +0 -1479
  152. package/dist/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -19
  153. package/dist/node_modules/react-i18next/dist/es/context.js +0 -17
  154. package/dist/node_modules/react-i18next/dist/es/defaults.js +0 -22
  155. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +0 -8
  156. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +0 -11
  157. package/dist/node_modules/react-i18next/dist/es/unescape.js +0 -25
  158. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +0 -65
  159. package/dist/node_modules/react-i18next/dist/es/utils.js +0 -57
  160. /package/dist/{i18n → translations}/locales/de.json.d.ts +0 -0
  161. /package/dist/{i18n → translations}/locales/de.json.js +0 -0
  162. /package/dist/{i18n → translations}/locales/es.json.d.ts +0 -0
  163. /package/dist/{i18n → translations}/locales/es.json.js +0 -0
  164. /package/dist/{i18n → translations}/locales/fr.json.d.ts +0 -0
  165. /package/dist/{i18n → translations}/locales/fr.json.js +0 -0
  166. /package/dist/{i18n → translations}/locales/ja.json.d.ts +0 -0
  167. /package/dist/{i18n → translations}/locales/ja.json.js +0 -0
  168. /package/dist/{i18n → translations}/locales/ko.json.d.ts +0 -0
  169. /package/dist/{i18n → translations}/locales/ko.json.js +0 -0
  170. /package/dist/{i18n → translations}/locales/pt.json.d.ts +0 -0
  171. /package/dist/{i18n → translations}/locales/pt.json.js +0 -0
  172. /package/dist/{i18n → translations}/locales/ru.json.d.ts +0 -0
  173. /package/dist/{i18n → translations}/locales/ru.json.js +0 -0
  174. /package/dist/{i18n → translations}/locales/th.json.d.ts +0 -0
  175. /package/dist/{i18n → translations}/locales/th.json.js +0 -0
  176. /package/dist/{i18n → translations}/locales/tr.json.d.ts +0 -0
  177. /package/dist/{i18n → translations}/locales/tr.json.js +0 -0
  178. /package/dist/{i18n → translations}/locales/zh.json.d.ts +0 -0
  179. /package/dist/{i18n → translations}/locales/zh.json.js +0 -0
@@ -1,37 +1,19 @@
1
1
  import { SpotProps } from './types';
2
2
  /**
3
- * A circular status indicator component that displays different types of content based on appearance.
4
- *
5
- * Uses a discriminated union type system where the required props depend on the `appearance` value:
6
- * - `'icon'` appearance requires an `icon` prop
7
- * - `'number'` appearance requires a `number` prop
8
- * - All other appearances are self-contained
3
+ * A circular icon container. `appearance` selects the color palette and `fill` selects whether that palette paints only the icon or the circle as well.
9
4
  *
10
5
  * @see {@link https://ldls.vercel.app/?path=/docs/react-spot--docs Storybook}
11
6
  *
12
7
  * @warning The `className` prop should only be used for layout adjustments like margins or positioning.
13
- * Do not use it to modify the spot's core appearance (colors, size, etc). Use the `appearance` prop instead.
8
+ * Do not use it to modify the spot's core appearance (colors, size, etc). Use the `appearance` and `fill` props instead.
14
9
  *
15
10
  * @example
16
11
  * import { Spot } from '@ledgerhq/lumen-ui-react';
12
+ * import { Settings, CheckmarkCircleFill } from '@ledgerhq/lumen-ui-react/symbols';
17
13
  *
18
- * // Custom icon spot
19
- * import { Settings } from '@ledgerhq/lumen-ui-react/symbols';
20
- *
21
- * <Spot appearance="icon" icon={Settings} />
22
- *
23
- * // Number spot
24
- * <Spot appearance="number" number={5} />
25
- *
26
- * // Status indicators (no additional props needed)
27
- * <Spot appearance="check" />
28
- * <Spot appearance="error" />
29
- * <Spot appearance="warning" />
30
- * <Spot appearance="loader" />
31
- *
32
- * // Bluetooth states
33
- * <Spot appearance="bluetooth" />
34
- * <Spot appearance="bluetooth" disabled />
14
+ * <Spot icon={Settings} />
15
+ * <Spot appearance="success" icon={CheckmarkCircleFill} />
16
+ * <Spot appearance="success" fill="plain" icon={Settings} />
35
17
  */
36
- export declare const Spot: (props: SpotProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Spot: ({ appearance, fill, icon: Icon, disabled: disabledProp, size, className, ref, ...rest }: SpotProps) => import("react/jsx-runtime").JSX.Element;
37
19
  //# sourceMappingURL=Spot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/Spot.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AA8BnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,4CAyFpC,CAAC"}
1
+ {"version":3,"file":"Spot.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/Spot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAUnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,GAAI,yFASlB,SAAS,4CAuBX,CAAC"}
@@ -1,112 +1,43 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { useDisabledContext as x, cn as w } from "../../../../libs/utils-shared/dist/index.js";
3
- import { cva as y } from "class-variance-authority";
4
- import { useMemo as C } from "react";
5
- import { Spinner as P } from "../Spinner/Spinner.js";
6
- import { InformationFill as F } from "../../symbols/icons/InformationFill.js";
7
- import { WarningFill as k } from "../../symbols/icons/WarningFill.js";
8
- import { DeleteCircleFill as N } from "../../symbols/icons/DeleteCircleFill.js";
9
- import { CheckmarkCircleFill as S } from "../../symbols/icons/CheckmarkCircleFill.js";
10
- import { BluetoothCircleFill as v } from "../../symbols/icons/BluetoothCircleFill.js";
11
- const I = y(
12
- "flex shrink-0 items-center justify-center rounded-full bg-muted-transparent",
13
- {
14
- variants: {
15
- appearance: {
16
- icon: "text-base",
17
- bluetooth: "text-[#0082FC]",
18
- check: "text-success",
19
- error: "text-error",
20
- warning: "text-warning",
21
- info: "text-muted",
22
- loader: "",
23
- number: "heading-5 text-base"
24
- },
25
- disabled: {
26
- true: "text-disabled"
27
- },
28
- size: {
29
- 32: "spot-h-32 spot-w-32",
30
- 40: "spot-h-40 spot-w-40",
31
- 48: "spot-h-48 spot-w-48",
32
- 56: "spot-h-56 spot-w-56",
33
- 72: "spot-h-72 spot-w-72"
34
- }
35
- }
36
- }
37
- ), E = (t) => {
38
- const s = t.size ?? 48, i = {
39
- 32: 12,
40
- 40: 16,
41
- 48: 20,
42
- 56: 24,
43
- 72: 40
44
- }, c = {
45
- 32: "body-2-semi-bold",
46
- 40: "body-1-semi-bold",
47
- 48: "heading-5",
48
- 56: "heading-4",
49
- 72: "heading-2"
50
- }, o = i[s] ?? 20, a = c[s] ?? "heading-5", { componentProps: m, content: p } = C(() => {
51
- if (t.appearance === "icon") {
52
- const { icon: n, ...r } = t;
53
- return {
54
- componentProps: r,
55
- content: /* @__PURE__ */ e(n, { size: o })
56
- };
57
- }
58
- if (t.appearance === "number") {
59
- const { number: n, ...r } = t;
60
- return {
61
- componentProps: r,
62
- content: /* @__PURE__ */ e("span", { className: a, children: n })
63
- };
64
- }
65
- const z = (() => {
66
- switch (t.appearance) {
67
- case "bluetooth":
68
- return /* @__PURE__ */ e(v, { size: o });
69
- case "check":
70
- return /* @__PURE__ */ e(S, { size: o });
71
- case "error":
72
- return /* @__PURE__ */ e(N, { size: o });
73
- case "warning":
74
- return /* @__PURE__ */ e(k, { size: o });
75
- case "info":
76
- return /* @__PURE__ */ e(F, { size: o });
77
- case "loader":
78
- return /* @__PURE__ */ e(P, { size: o });
79
- }
80
- })();
81
- return { componentProps: t, content: z };
82
- }, [t, o, a]), {
83
- appearance: l,
84
- className: d,
85
- disabled: u = !1,
86
- size: h = 48,
87
- ref: b,
88
- ...f
89
- } = m, g = x({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useDisabledContext as l, cn as p } from "../../../../libs/utils-shared/dist/index.js";
3
+ import { contentVariants as b, spotVariants as N } from "./styles.js";
4
+ const f = {
5
+ 32: 12,
6
+ 40: 16,
7
+ 48: 20,
8
+ 56: 24,
9
+ 72: 40
10
+ }, h = ({
11
+ appearance: s = "base",
12
+ fill: t = "transparent",
13
+ icon: a,
14
+ disabled: n = !1,
15
+ size: e = 48,
16
+ className: r,
17
+ ref: i,
18
+ ...c
19
+ }) => {
20
+ const m = l({
90
21
  consumerName: "Spot",
91
- mergeWith: { disabled: u }
92
- });
93
- return /* @__PURE__ */ e(
22
+ mergeWith: { disabled: n }
23
+ }), d = b({ appearance: s, fill: t, disabled: m });
24
+ return /* @__PURE__ */ o(
94
25
  "div",
95
26
  {
96
- ref: b,
97
- className: w(
98
- I({
99
- disabled: g,
100
- appearance: l,
101
- size: h
27
+ ref: i,
28
+ className: p(
29
+ N({
30
+ appearance: s,
31
+ fill: t,
32
+ size: e
102
33
  }),
103
- d
34
+ r
104
35
  ),
105
- ...f,
106
- children: p
36
+ ...c,
37
+ children: /* @__PURE__ */ o(a, { size: f[e], className: d })
107
38
  }
108
39
  );
109
40
  };
110
41
  export {
111
- E as Spot
42
+ h as Spot
112
43
  };
@@ -0,0 +1,16 @@
1
+ import { SpotNumberProps } from './types';
2
+ /**
3
+ * A circular digit. Uses the same palette, fill, and size as `Spot`.
4
+ *
5
+ * @see {@link https://ldls.vercel.app/?path=/docs/react-spot--docs Storybook}
6
+ *
7
+ * @warning The `className` prop should only be used for layout adjustments like margins or positioning.
8
+ * Do not use it to modify the circle's core appearance (colors, size, etc). Use the `appearance` and `fill` props instead.
9
+ *
10
+ * @example
11
+ * import { SpotNumber } from '@ledgerhq/lumen-ui-react';
12
+ *
13
+ * <SpotNumber value={9} />
14
+ */
15
+ export declare const SpotNumber: ({ appearance, fill, value, disabled: disabledProp, size, className, ref, ...rest }: SpotNumberProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=SpotNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotNumber.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/SpotNumber.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GAAI,oFASxB,eAAe,4CA6BjB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useDisabledContext as c, cn as a } from "../../../../libs/utils-shared/dist/index.js";
3
+ import { contentVariants as l, numberVariants as p, spotVariants as u } from "./styles.js";
4
+ const x = ({
5
+ appearance: s = "base",
6
+ fill: t = "transparent",
7
+ value: n,
8
+ disabled: o = !1,
9
+ size: e = 48,
10
+ className: m,
11
+ ref: i,
12
+ ...d
13
+ }) => {
14
+ const b = c({
15
+ consumerName: "SpotNumber",
16
+ mergeWith: { disabled: o }
17
+ });
18
+ return /* @__PURE__ */ r(
19
+ "div",
20
+ {
21
+ ref: i,
22
+ className: a(
23
+ u({
24
+ appearance: s,
25
+ fill: t,
26
+ size: e
27
+ }),
28
+ m
29
+ ),
30
+ ...d,
31
+ children: /* @__PURE__ */ r(
32
+ "span",
33
+ {
34
+ className: a(
35
+ p({ size: e }),
36
+ l({ appearance: s, fill: t, disabled: b })
37
+ ),
38
+ children: n
39
+ }
40
+ )
41
+ }
42
+ );
43
+ };
44
+ export {
45
+ x as SpotNumber
46
+ };
@@ -1,3 +1,4 @@
1
1
  export { Spot } from './Spot';
2
+ export { SpotNumber } from './SpotNumber';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,SAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const spotVariants: (props?: ({
2
+ fill?: "transparent" | "plain" | null | undefined;
3
+ appearance?: "base" | "muted" | "error" | "success" | "warning" | "decorative-blue" | "decorative-pink" | "decorative-purple" | "decorative-green" | "decorative-turquoise" | "decorative-yellow" | "decorative-orange" | "decorative-red" | null | undefined;
4
+ size?: 32 | 40 | 48 | 56 | 72 | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export declare const contentVariants: (props?: ({
7
+ fill?: "transparent" | "plain" | null | undefined;
8
+ appearance?: "base" | "muted" | "error" | "success" | "warning" | "decorative-blue" | "decorative-pink" | "decorative-purple" | "decorative-green" | "decorative-turquoise" | "decorative-yellow" | "decorative-orange" | "decorative-red" | null | undefined;
9
+ disabled?: boolean | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
11
+ export declare const numberVariants: (props?: ({
12
+ size?: 32 | 40 | 48 | 56 | 72 | null | undefined;
13
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
14
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;8EA+ExB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;8EAmL1B,CAAC;AAEH,eAAO,MAAM,cAAc;;8EAUzB,CAAC"}
@@ -0,0 +1,275 @@
1
+ import { cva as e } from "class-variance-authority";
2
+ const l = e(
3
+ "flex shrink-0 items-center justify-center rounded-full",
4
+ {
5
+ variants: {
6
+ fill: {
7
+ transparent: "bg-muted-transparent",
8
+ plain: ""
9
+ },
10
+ appearance: {
11
+ base: "",
12
+ success: "",
13
+ error: "",
14
+ warning: "",
15
+ muted: "",
16
+ "decorative-blue": "",
17
+ "decorative-pink": "",
18
+ "decorative-purple": "",
19
+ "decorative-green": "",
20
+ "decorative-turquoise": "",
21
+ "decorative-yellow": "",
22
+ "decorative-orange": "",
23
+ "decorative-red": ""
24
+ },
25
+ size: {
26
+ 32: "spot-h-32 spot-w-32",
27
+ 40: "spot-h-40 spot-w-40",
28
+ 48: "spot-h-48 spot-w-48",
29
+ 56: "spot-h-56 spot-w-56",
30
+ 72: "spot-h-72 spot-w-72"
31
+ }
32
+ },
33
+ compoundVariants: [
34
+ { fill: "plain", appearance: "base", class: "bg-muted" },
35
+ { fill: "plain", appearance: "success", class: "bg-success" },
36
+ { fill: "plain", appearance: "error", class: "bg-error" },
37
+ { fill: "plain", appearance: "warning", class: "bg-warning" },
38
+ { fill: "plain", appearance: "muted", class: "bg-muted-pressed" },
39
+ {
40
+ fill: "plain",
41
+ appearance: "decorative-blue",
42
+ class: "bg-decorative-blue"
43
+ },
44
+ {
45
+ fill: "plain",
46
+ appearance: "decorative-pink",
47
+ class: "bg-decorative-pink"
48
+ },
49
+ {
50
+ fill: "plain",
51
+ appearance: "decorative-purple",
52
+ class: "bg-decorative-purple"
53
+ },
54
+ {
55
+ fill: "plain",
56
+ appearance: "decorative-green",
57
+ class: "bg-decorative-green"
58
+ },
59
+ {
60
+ fill: "plain",
61
+ appearance: "decorative-turquoise",
62
+ class: "bg-decorative-turquoise"
63
+ },
64
+ {
65
+ fill: "plain",
66
+ appearance: "decorative-yellow",
67
+ class: "bg-decorative-yellow"
68
+ },
69
+ {
70
+ fill: "plain",
71
+ appearance: "decorative-orange",
72
+ class: "bg-decorative-orange"
73
+ },
74
+ {
75
+ fill: "plain",
76
+ appearance: "decorative-red",
77
+ class: "bg-decorative-red"
78
+ }
79
+ ]
80
+ }
81
+ ), r = e("", {
82
+ variants: {
83
+ fill: {
84
+ transparent: "",
85
+ plain: ""
86
+ },
87
+ appearance: {
88
+ base: "",
89
+ success: "",
90
+ error: "",
91
+ warning: "",
92
+ muted: "",
93
+ "decorative-blue": "",
94
+ "decorative-pink": "",
95
+ "decorative-purple": "",
96
+ "decorative-green": "",
97
+ "decorative-turquoise": "",
98
+ "decorative-yellow": "",
99
+ "decorative-orange": "",
100
+ "decorative-red": ""
101
+ },
102
+ disabled: {
103
+ true: "text-disabled",
104
+ false: ""
105
+ }
106
+ },
107
+ compoundVariants: [
108
+ {
109
+ disabled: !1,
110
+ fill: "transparent",
111
+ appearance: "base",
112
+ class: "text-base"
113
+ },
114
+ {
115
+ disabled: !1,
116
+ fill: "transparent",
117
+ appearance: "success",
118
+ class: "text-success"
119
+ },
120
+ {
121
+ disabled: !1,
122
+ fill: "transparent",
123
+ appearance: "error",
124
+ class: "text-error"
125
+ },
126
+ {
127
+ disabled: !1,
128
+ fill: "transparent",
129
+ appearance: "warning",
130
+ class: "text-warning"
131
+ },
132
+ {
133
+ disabled: !1,
134
+ fill: "transparent",
135
+ appearance: "muted",
136
+ class: "text-muted"
137
+ },
138
+ {
139
+ disabled: !1,
140
+ fill: "transparent",
141
+ appearance: "decorative-blue",
142
+ class: "text-decorative-blue"
143
+ },
144
+ {
145
+ disabled: !1,
146
+ fill: "transparent",
147
+ appearance: "decorative-pink",
148
+ class: "text-decorative-pink"
149
+ },
150
+ {
151
+ disabled: !1,
152
+ fill: "transparent",
153
+ appearance: "decorative-purple",
154
+ class: "text-decorative-purple"
155
+ },
156
+ {
157
+ disabled: !1,
158
+ fill: "transparent",
159
+ appearance: "decorative-green",
160
+ class: "text-decorative-green"
161
+ },
162
+ {
163
+ disabled: !1,
164
+ fill: "transparent",
165
+ appearance: "decorative-turquoise",
166
+ class: "text-decorative-turquoise"
167
+ },
168
+ {
169
+ disabled: !1,
170
+ fill: "transparent",
171
+ appearance: "decorative-yellow",
172
+ class: "text-decorative-yellow"
173
+ },
174
+ {
175
+ disabled: !1,
176
+ fill: "transparent",
177
+ appearance: "decorative-orange",
178
+ class: "text-decorative-orange"
179
+ },
180
+ {
181
+ disabled: !1,
182
+ fill: "transparent",
183
+ appearance: "decorative-red",
184
+ class: "text-decorative-red"
185
+ },
186
+ { disabled: !1, fill: "plain", appearance: "base", class: "text-base" },
187
+ {
188
+ disabled: !1,
189
+ fill: "plain",
190
+ appearance: "success",
191
+ class: "text-success-strong"
192
+ },
193
+ {
194
+ disabled: !1,
195
+ fill: "plain",
196
+ appearance: "error",
197
+ class: "text-error-strong"
198
+ },
199
+ {
200
+ disabled: !1,
201
+ fill: "plain",
202
+ appearance: "warning",
203
+ class: "text-warning-strong"
204
+ },
205
+ {
206
+ disabled: !1,
207
+ fill: "plain",
208
+ appearance: "muted",
209
+ class: "text-muted"
210
+ },
211
+ {
212
+ disabled: !1,
213
+ fill: "plain",
214
+ appearance: "decorative-blue",
215
+ class: "text-decorative-strong-blue"
216
+ },
217
+ {
218
+ disabled: !1,
219
+ fill: "plain",
220
+ appearance: "decorative-pink",
221
+ class: "text-decorative-strong-pink"
222
+ },
223
+ {
224
+ disabled: !1,
225
+ fill: "plain",
226
+ appearance: "decorative-purple",
227
+ class: "text-decorative-strong-purple"
228
+ },
229
+ {
230
+ disabled: !1,
231
+ fill: "plain",
232
+ appearance: "decorative-green",
233
+ class: "text-decorative-strong-green"
234
+ },
235
+ {
236
+ disabled: !1,
237
+ fill: "plain",
238
+ appearance: "decorative-turquoise",
239
+ class: "text-decorative-strong-turquoise"
240
+ },
241
+ {
242
+ disabled: !1,
243
+ fill: "plain",
244
+ appearance: "decorative-yellow",
245
+ class: "text-decorative-strong-yellow"
246
+ },
247
+ {
248
+ disabled: !1,
249
+ fill: "plain",
250
+ appearance: "decorative-orange",
251
+ class: "text-decorative-strong-orange"
252
+ },
253
+ {
254
+ disabled: !1,
255
+ fill: "plain",
256
+ appearance: "decorative-red",
257
+ class: "text-decorative-strong-red"
258
+ }
259
+ ]
260
+ }), s = e("truncate", {
261
+ variants: {
262
+ size: {
263
+ 32: "body-2-semi-bold",
264
+ 40: "body-1-semi-bold",
265
+ 48: "heading-5",
266
+ 56: "heading-4",
267
+ 72: "heading-2"
268
+ }
269
+ }
270
+ });
271
+ export {
272
+ r as contentVariants,
273
+ s as numberVariants,
274
+ l as spotVariants
275
+ };
@@ -1,45 +1,20 @@
1
1
  import { ComponentPropsWithRef, ComponentType } from 'react';
2
2
  import { IconSize } from '../../symbols/Icon';
3
- export type SpotAppearance = 'icon' | 'bluetooth' | 'check' | 'error' | 'warning' | 'info' | 'loader' | 'number';
4
- type SpotIconProps = {
5
- /**
6
- * Custom icon appearance with neutral base styling.
7
- * @example <Spot appearance="icon" icon={SettingsIcon} />
8
- */
9
- appearance: 'icon';
10
- /**
11
- * Icon component to render. Required when appearance is 'icon'.
12
- */
13
- icon: ComponentType<{
14
- size?: IconSize;
15
- className?: string;
16
- }>;
17
- };
18
- type SpotNumberProps = {
19
- /**
20
- * Number appearance for displaying a single digit (0-9).
21
- * @example <Spot appearance="number" number={5} />
22
- */
23
- appearance: 'number';
3
+ export type SpotAppearance = 'base' | 'success' | 'error' | 'warning' | 'muted' | 'decorative-blue' | 'decorative-pink' | 'decorative-purple' | 'decorative-green' | 'decorative-turquoise' | 'decorative-yellow' | 'decorative-orange' | 'decorative-red';
4
+ export type SpotFill = 'transparent' | 'plain';
5
+ export type SpotSize = 32 | 40 | 48 | 56 | 72;
6
+ export type SpotDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
7
+ export type SpotProps = {
24
8
  /**
25
- * Digit (0-9) to display. Required when appearance is 'number'.
9
+ * Color palette for the icon, and for the circle when `fill` is plain.
10
+ * @default 'base'
26
11
  */
27
- number: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
28
- };
29
- type SpotStatusProps = {
12
+ appearance?: SpotAppearance;
30
13
  /**
31
- * Predefined status indicators with semantic styling.
32
- * Options: 'bluetooth' | 'check' | 'error' | 'warning' | 'info' | 'loader'
33
- * @example <Spot appearance="check" />
14
+ * Circle treatment. Transparent keeps a muted transparent fill. Plain uses the palette's solid background and paired text color.
15
+ * @default 'transparent'
34
16
  */
35
- appearance: Exclude<SpotAppearance, 'icon' | 'number'>;
36
- };
37
- /**
38
- * A discriminated union that enforces type-safe props based on the `appearance`.
39
- */
40
- export type DiscriminatedSpotProps = SpotIconProps | SpotNumberProps | SpotStatusProps;
41
- export type SpotSize = 32 | 40 | 48 | 56 | 72;
42
- export type SpotProps = DiscriminatedSpotProps & {
17
+ fill?: SpotFill;
43
18
  /**
44
19
  * Whether the spot is disabled.
45
20
  * @default false
@@ -50,6 +25,20 @@ export type SpotProps = DiscriminatedSpotProps & {
50
25
  * @default 48
51
26
  */
52
27
  size?: SpotSize;
53
- } & ComponentPropsWithRef<'div'>;
54
- export {};
28
+ /**
29
+ * Icon rendered inside the circle.
30
+ * @required
31
+ */
32
+ icon: ComponentType<{
33
+ size?: IconSize;
34
+ className?: string;
35
+ }>;
36
+ } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
37
+ export type SpotNumberProps = {
38
+ /**
39
+ * Digit rendered inside the circle.
40
+ * @required
41
+ */
42
+ value: SpotDigit;
43
+ } & Omit<SpotProps, 'icon'>;
55
44
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,WAAW,GACX,OAAO,GACP,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,CAAC;AAEb,KAAK,aAAa,GAAG;IACnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB;;;OAGG;IACH,UAAU,EAAE,QAAQ,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;CACxD,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,aAAa,GACb,eAAe,GACf,eAAe,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,sBAAsB,GAAG;IAC/C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Spot/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,OAAO,GACP,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,kBAAkB,GAClB,sBAAsB,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,gBAAgB,CAAC;AAErB,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Stepper/Stepper.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,GAAI,wGAUrB,YAAY,4CAkId,CAAC"}
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Stepper/Stepper.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,GAAI,wGAUrB,YAAY,4CAwId,CAAC"}