@tipp/ui 0.1.4 → 0.1.6

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 (149) hide show
  1. package/dist/atoms/alert-dialog.js +1 -1
  2. package/dist/atoms/aspect-ratio.js +1 -1
  3. package/dist/atoms/avatar.cjs +53 -1
  4. package/dist/atoms/avatar.cjs.map +1 -1
  5. package/dist/atoms/avatar.d.cts +11 -1
  6. package/dist/atoms/avatar.d.ts +11 -1
  7. package/dist/atoms/avatar.js +2 -2
  8. package/dist/atoms/badge.cjs +62 -1
  9. package/dist/atoms/badge.cjs.map +1 -1
  10. package/dist/atoms/badge.d.cts +13 -1
  11. package/dist/atoms/badge.d.ts +13 -1
  12. package/dist/atoms/badge.js +2 -2
  13. package/dist/atoms/blockquote.js +1 -1
  14. package/dist/atoms/box.js +1 -1
  15. package/dist/atoms/button.cjs +51 -1
  16. package/dist/atoms/button.cjs.map +1 -1
  17. package/dist/atoms/button.d.cts +11 -1
  18. package/dist/atoms/button.d.ts +11 -1
  19. package/dist/atoms/button.js +2 -2
  20. package/dist/atoms/call-out.js +1 -1
  21. package/dist/atoms/card.js +1 -1
  22. package/dist/atoms/check-box-card.js +1 -1
  23. package/dist/atoms/check-box-group.cjs +52 -1
  24. package/dist/atoms/check-box-group.cjs.map +1 -1
  25. package/dist/atoms/check-box-group.d.cts +11 -1
  26. package/dist/atoms/check-box-group.d.ts +11 -1
  27. package/dist/atoms/check-box-group.js +2 -2
  28. package/dist/atoms/check-box.cjs +49 -1
  29. package/dist/atoms/check-box.cjs.map +1 -1
  30. package/dist/atoms/check-box.d.cts +11 -1
  31. package/dist/atoms/check-box.d.ts +11 -1
  32. package/dist/atoms/check-box.js +2 -2
  33. package/dist/atoms/code.js +1 -1
  34. package/dist/atoms/container.js +1 -1
  35. package/dist/atoms/data-list.js +1 -1
  36. package/dist/atoms/date-picker/index.d.cts +2 -2
  37. package/dist/atoms/date-picker/index.d.ts +2 -2
  38. package/dist/atoms/date-picker/index.js +2 -2
  39. package/dist/atoms/dialog.js +1 -1
  40. package/dist/atoms/dropdown-menu.js +1 -1
  41. package/dist/atoms/em.js +1 -1
  42. package/dist/atoms/flex.js +1 -1
  43. package/dist/atoms/grid.js +1 -1
  44. package/dist/atoms/heading.cjs +54 -2
  45. package/dist/atoms/heading.cjs.map +1 -1
  46. package/dist/atoms/heading.d.cts +9 -1
  47. package/dist/atoms/heading.d.ts +9 -1
  48. package/dist/atoms/heading.js +6 -4
  49. package/dist/atoms/hover-card.js +1 -1
  50. package/dist/atoms/icon-button.js +1 -1
  51. package/dist/atoms/inset.js +1 -1
  52. package/dist/atoms/kbd.js +1 -1
  53. package/dist/atoms/link.cjs +52 -2
  54. package/dist/atoms/link.cjs.map +1 -1
  55. package/dist/atoms/link.d.cts +9 -1
  56. package/dist/atoms/link.d.ts +9 -1
  57. package/dist/atoms/link.js +5 -3
  58. package/dist/atoms/popover.js +1 -1
  59. package/dist/atoms/progress.js +1 -1
  60. package/dist/atoms/quote.js +1 -1
  61. package/dist/atoms/radio-cards.js +1 -1
  62. package/dist/atoms/radio-group.js +1 -1
  63. package/dist/atoms/radio.js +1 -1
  64. package/dist/atoms/scroll-area.js +1 -1
  65. package/dist/atoms/section.js +1 -1
  66. package/dist/atoms/segmented-control.js +1 -1
  67. package/dist/atoms/select.js +1 -1
  68. package/dist/atoms/separator.js +1 -1
  69. package/dist/atoms/skeleton.js +1 -1
  70. package/dist/atoms/strong.js +1 -1
  71. package/dist/atoms/switch.js +1 -1
  72. package/dist/atoms/tab-nav.js +1 -1
  73. package/dist/atoms/tabs.js +1 -1
  74. package/dist/atoms/text-area.js +1 -1
  75. package/dist/atoms/text-field.js +1 -1
  76. package/dist/atoms/text.cjs +48 -1
  77. package/dist/atoms/text.cjs.map +1 -1
  78. package/dist/atoms/text.d.cts +9 -1
  79. package/dist/atoms/text.d.ts +9 -1
  80. package/dist/atoms/text.js +2 -2
  81. package/dist/atoms/tooltip.js +1 -1
  82. package/dist/chart/chart.cjs +12 -2
  83. package/dist/chart/chart.cjs.map +1 -1
  84. package/dist/chart/chart.d.cts +3 -2
  85. package/dist/chart/chart.d.ts +3 -2
  86. package/dist/chart/chart.js +3 -3
  87. package/dist/chart/chart.js.map +1 -1
  88. package/dist/chunk-ALOPZ54P.js +47 -0
  89. package/dist/chunk-ALOPZ54P.js.map +1 -0
  90. package/dist/chunk-CZEGRZBK.js +38 -0
  91. package/dist/chunk-CZEGRZBK.js.map +1 -0
  92. package/dist/chunk-HLOY6BIP.js +37 -0
  93. package/dist/chunk-HLOY6BIP.js.map +1 -0
  94. package/dist/{chunk-D5QWAVBB.js → chunk-IIBITN2G.js} +2 -2
  95. package/dist/chunk-IQEEPHOY.js +35 -0
  96. package/dist/chunk-IQEEPHOY.js.map +1 -0
  97. package/dist/chunk-JEHDCZQU.js +34 -0
  98. package/dist/chunk-JEHDCZQU.js.map +1 -0
  99. package/dist/{chunk-LGTAQGUA.js → chunk-N552FDTV.js} +15 -2
  100. package/dist/{chunk-LREYUDKD.js → chunk-PL3Q4UVY.js} +3 -3
  101. package/dist/{chunk-LREYUDKD.js.map → chunk-PL3Q4UVY.js.map} +1 -1
  102. package/dist/chunk-RET725VL.js +36 -0
  103. package/dist/chunk-RET725VL.js.map +1 -0
  104. package/dist/chunk-XJJDE4YP.js +31 -0
  105. package/dist/chunk-XJJDE4YP.js.map +1 -0
  106. package/dist/chunk-XQOZWYUA.js +35 -0
  107. package/dist/chunk-XQOZWYUA.js.map +1 -0
  108. package/dist/icon.js +1 -1
  109. package/dist/index.cjs +252 -65
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.d.cts +9 -1
  112. package/dist/index.d.ts +9 -1
  113. package/dist/index.js +40 -40
  114. package/dist/theme/theme-provider.cjs +1 -1
  115. package/dist/theme/theme-provider.cjs.map +1 -1
  116. package/dist/theme/theme-provider.d.cts +4 -4
  117. package/dist/theme/theme-provider.d.ts +4 -4
  118. package/dist/theme/theme-provider.js +2 -2
  119. package/dist/theme/use-theme.js +1 -1
  120. package/dist/ui-props/index.js +1 -1
  121. package/package.json +4 -2
  122. package/src/atoms/avatar.tsx +37 -1
  123. package/src/atoms/badge.tsx +47 -1
  124. package/src/atoms/button.tsx +32 -1
  125. package/src/atoms/check-box-group.tsx +38 -1
  126. package/src/atoms/check-box.tsx +30 -1
  127. package/src/atoms/heading.tsx +35 -1
  128. package/src/atoms/link.tsx +33 -1
  129. package/src/atoms/text.tsx +30 -1
  130. package/src/chart/chart.tsx +3 -4
  131. package/src/theme/theme-provider.tsx +1 -1
  132. package/dist/chunk-3566LFAS.js +0 -7
  133. package/dist/chunk-3566LFAS.js.map +0 -1
  134. package/dist/chunk-4PP245MS.js +0 -7
  135. package/dist/chunk-4PP245MS.js.map +0 -1
  136. package/dist/chunk-DYUKDKUS.js +0 -7
  137. package/dist/chunk-DYUKDKUS.js.map +0 -1
  138. package/dist/chunk-LFJCZVNE.js +0 -7
  139. package/dist/chunk-LFJCZVNE.js.map +0 -1
  140. package/dist/chunk-M4P36WOR.js +0 -7
  141. package/dist/chunk-M4P36WOR.js.map +0 -1
  142. package/dist/chunk-MLMWFOEE.js +0 -7
  143. package/dist/chunk-MLMWFOEE.js.map +0 -1
  144. package/dist/chunk-MYTJIEMB.js +0 -7
  145. package/dist/chunk-MYTJIEMB.js.map +0 -1
  146. package/dist/chunk-W4KST6UY.js +0 -7
  147. package/dist/chunk-W4KST6UY.js.map +0 -1
  148. /package/dist/{chunk-D5QWAVBB.js.map → chunk-IIBITN2G.js.map} +0 -0
  149. /package/dist/{chunk-LGTAQGUA.js.map → chunk-N552FDTV.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,18 +1,24 @@
1
1
  import {
2
- Tooltip
3
- } from "./chunk-ACVANQJ4.js";
2
+ TextField
3
+ } from "./chunk-JPIZP2PZ.js";
4
4
  import {
5
- ThemeProvider
6
- } from "./chunk-LREYUDKD.js";
5
+ Text
6
+ } from "./chunk-XJJDE4YP.js";
7
7
  import {
8
- useThemeContext
9
- } from "./chunk-MMGP4GEQ.js";
8
+ Tooltip
9
+ } from "./chunk-ACVANQJ4.js";
10
10
  import {
11
11
  uiProps
12
12
  } from "./chunk-NVKNDAIN.js";
13
13
  import {
14
14
  DatePicker
15
- } from "./chunk-D5QWAVBB.js";
15
+ } from "./chunk-IIBITN2G.js";
16
+ import {
17
+ Select
18
+ } from "./chunk-355MU6BH.js";
19
+ import {
20
+ Separator
21
+ } from "./chunk-HYITAA4J.js";
16
22
  import {
17
23
  Skeleton
18
24
  } from "./chunk-5H3YPCZK.js";
@@ -32,11 +38,11 @@ import {
32
38
  TextArea
33
39
  } from "./chunk-ILRUXI2E.js";
34
40
  import {
35
- TextField
36
- } from "./chunk-JPIZP2PZ.js";
41
+ Progress
42
+ } from "./chunk-365QMK4D.js";
37
43
  import {
38
- Text
39
- } from "./chunk-DYUKDKUS.js";
44
+ Quote
45
+ } from "./chunk-YO3BQW6S.js";
40
46
  import {
41
47
  RadioCards
42
48
  } from "./chunk-6IVCARWS.js";
@@ -56,11 +62,11 @@ import {
56
62
  SegmentedControl
57
63
  } from "./chunk-TVDKGMBI.js";
58
64
  import {
59
- Select
60
- } from "./chunk-355MU6BH.js";
65
+ Grid
66
+ } from "./chunk-EGEQY3KT.js";
61
67
  import {
62
- Separator
63
- } from "./chunk-HYITAA4J.js";
68
+ Heading
69
+ } from "./chunk-HLOY6BIP.js";
64
70
  import {
65
71
  HoverCard
66
72
  } from "./chunk-O3T3TM3V.js";
@@ -75,16 +81,16 @@ import {
75
81
  } from "./chunk-TULWX7D6.js";
76
82
  import {
77
83
  Link
78
- } from "./chunk-MLMWFOEE.js";
84
+ } from "./chunk-XQOZWYUA.js";
79
85
  import {
80
86
  Popover
81
87
  } from "./chunk-5AVBYDPB.js";
82
88
  import {
83
- Progress
84
- } from "./chunk-365QMK4D.js";
89
+ Checkbox
90
+ } from "./chunk-JEHDCZQU.js";
85
91
  import {
86
- Quote
87
- } from "./chunk-YO3BQW6S.js";
92
+ Code
93
+ } from "./chunk-OHMOP5PV.js";
88
94
  import {
89
95
  Container
90
96
  } from "./chunk-Q37G2GS6.js";
@@ -104,17 +110,17 @@ import {
104
110
  Flex
105
111
  } from "./chunk-25HMMI7R.js";
106
112
  import {
107
- Grid
108
- } from "./chunk-EGEQY3KT.js";
113
+ Badge
114
+ } from "./chunk-ALOPZ54P.js";
109
115
  import {
110
- Heading
111
- } from "./chunk-MYTJIEMB.js";
116
+ Blockquote
117
+ } from "./chunk-YGL6SWKN.js";
112
118
  import {
113
119
  Box
114
120
  } from "./chunk-4Y5BEXVN.js";
115
121
  import {
116
122
  Button
117
- } from "./chunk-LFJCZVNE.js";
123
+ } from "./chunk-RET725VL.js";
118
124
  import {
119
125
  Callout
120
126
  } from "./chunk-B6XJN6EC.js";
@@ -126,13 +132,7 @@ import {
126
132
  } from "./chunk-MIMJ7LON.js";
127
133
  import {
128
134
  CheckboxGroup
129
- } from "./chunk-4PP245MS.js";
130
- import {
131
- Checkbox
132
- } from "./chunk-3566LFAS.js";
133
- import {
134
- Code
135
- } from "./chunk-OHMOP5PV.js";
135
+ } from "./chunk-IQEEPHOY.js";
136
136
  import {
137
137
  BookmarkIcon,
138
138
  ChatBubbleIcon,
@@ -143,6 +143,12 @@ import {
143
143
  MagnifyingGlassIcon,
144
144
  PlusIcon
145
145
  } from "./chunk-UVZ6CCUI.js";
146
+ import {
147
+ ThemeProvider
148
+ } from "./chunk-PL3Q4UVY.js";
149
+ import {
150
+ useThemeContext
151
+ } from "./chunk-MMGP4GEQ.js";
146
152
  import {
147
153
  AlertDialog
148
154
  } from "./chunk-J242TTFH.js";
@@ -151,14 +157,8 @@ import {
151
157
  } from "./chunk-EAXUQEO5.js";
152
158
  import {
153
159
  Avatar
154
- } from "./chunk-M4P36WOR.js";
155
- import {
156
- Badge
157
- } from "./chunk-W4KST6UY.js";
158
- import {
159
- Blockquote
160
- } from "./chunk-YGL6SWKN.js";
161
- import "./chunk-LGTAQGUA.js";
160
+ } from "./chunk-CZEGRZBK.js";
161
+ import "./chunk-N552FDTV.js";
162
162
  export {
163
163
  AlertDialog,
164
164
  AspectRatio,
@@ -40,7 +40,7 @@ module.exports = __toCommonJS(theme_provider_exports);
40
40
  var import_themes = require("@radix-ui/themes");
41
41
  var import_jsx_runtime = require("react/jsx-runtime");
42
42
  function ThemeProvider(props) {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Theme, __spreadValues({ accentColor: "iris" }, props));
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Theme, __spreadValues({ accentColor: "iris", radius: "large" }, props));
44
44
  }
45
45
  // Annotate the CommonJS export names for ESM import in node:
46
46
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/theme-provider.tsx"],"sourcesContent":["import React from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\ninterface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactNode {\n return <Theme accentColor=\"iris\" {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAsB;AASb;AADF,SAAS,cAAc,OAA4C;AACxE,SAAO,4CAAC,sCAAM,aAAY,UAAW,MAAO;AAC9C;","names":[]}
1
+ {"version":3,"sources":["../../src/theme/theme-provider.tsx"],"sourcesContent":["import React from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\ninterface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactNode {\n return <Theme accentColor=\"iris\" radius=\"large\" {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAsB;AASb;AADF,SAAS,cAAc,OAA4C;AACxE,SAAO,4CAAC,sCAAM,aAAY,QAAO,QAAO,WAAY,MAAO;AAC7D;","names":[]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Theme } from '@radix-ui/themes';
3
3
 
4
- type ThemeProps = React.ComponentProps<typeof Theme>;
4
+ type ThemeProps = React__default.ComponentProps<typeof Theme>;
5
5
  interface ThemeProviderProps extends ThemeProps {
6
- children: React.ReactNode;
6
+ children: React__default.ReactNode;
7
7
  }
8
- declare function ThemeProvider(props: ThemeProviderProps): React.ReactNode;
8
+ declare function ThemeProvider(props: ThemeProviderProps): React__default.ReactNode;
9
9
 
10
10
  export { ThemeProvider };
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Theme } from '@radix-ui/themes';
3
3
 
4
- type ThemeProps = React.ComponentProps<typeof Theme>;
4
+ type ThemeProps = React__default.ComponentProps<typeof Theme>;
5
5
  interface ThemeProviderProps extends ThemeProps {
6
- children: React.ReactNode;
6
+ children: React__default.ReactNode;
7
7
  }
8
- declare function ThemeProvider(props: ThemeProviderProps): React.ReactNode;
8
+ declare function ThemeProvider(props: ThemeProviderProps): React__default.ReactNode;
9
9
 
10
10
  export { ThemeProvider };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ThemeProvider
3
- } from "../chunk-LREYUDKD.js";
4
- import "../chunk-LGTAQGUA.js";
3
+ } from "../chunk-PL3Q4UVY.js";
4
+ import "../chunk-N552FDTV.js";
5
5
  export {
6
6
  ThemeProvider
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useThemeContext
3
3
  } from "../chunk-MMGP4GEQ.js";
4
- import "../chunk-LGTAQGUA.js";
4
+ import "../chunk-N552FDTV.js";
5
5
  export {
6
6
  useThemeContext
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  uiProps
3
3
  } from "../chunk-NVKNDAIN.js";
4
- import "../chunk-LGTAQGUA.js";
4
+ import "../chunk-N552FDTV.js";
5
5
  export {
6
6
  uiProps
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tipp/ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -54,9 +54,11 @@
54
54
  "dist/**"
55
55
  ],
56
56
  "dependencies": {
57
- "@kbox-labs/react-echarts": "^1.2.0",
58
57
  "@radix-ui/react-icons": "^1.3.0",
59
58
  "@radix-ui/themes": "^3.1.1",
59
+ "echarts-for-react": "^3.0.2",
60
+ "i": "^0.3.7",
61
+ "npm": "^10.8.2",
60
62
  "react": "^18.3.1",
61
63
  "react-datepicker": "^7.3.0",
62
64
  "react-dom": "^18.3.1",
@@ -1 +1,37 @@
1
- export { Avatar, type AvatarProps } from '@radix-ui/themes';
1
+ import {
2
+ Avatar as RadixAvatar,
3
+ type AvatarProps as RadixAvatarProps,
4
+ } from '@radix-ui/themes';
5
+ import { useMemo, forwardRef } from 'react';
6
+
7
+ export type AvatarProps = Omit<RadixAvatarProps, 'size'> & {
8
+ size?: 'small' | 'medium' | 'large' | 'full';
9
+ };
10
+
11
+ export const Avatar = forwardRef<HTMLImageElement, AvatarProps>(
12
+ (props: AvatarProps, ref): React.ReactNode => {
13
+ const { children, size, variant = 'soft', ...rest } = props;
14
+ const radixSize = useMemo<RadixAvatarProps['size']>(() => {
15
+ switch (size) {
16
+ case 'small':
17
+ return '1';
18
+ case 'medium':
19
+ return '2';
20
+ case 'large':
21
+ return '3';
22
+ case 'full':
23
+ return '4';
24
+ default:
25
+ return size;
26
+ }
27
+ }, [size]);
28
+
29
+ return (
30
+ <RadixAvatar {...rest} ref={ref} size={radixSize} variant={variant}>
31
+ {children}
32
+ </RadixAvatar>
33
+ );
34
+ }
35
+ );
36
+
37
+ Avatar.displayName = 'Avatar';
@@ -1 +1,47 @@
1
- export { Badge } from '@radix-ui/themes';
1
+ import {
2
+ Badge as RadixBadge,
3
+ type BadgeProps as RadixBadgeProps,
4
+ } from '@radix-ui/themes';
5
+ import { useMemo, forwardRef } from 'react';
6
+
7
+ export type BadgeProps = Omit<RadixBadgeProps, 'color'> & {
8
+ size: 'small' | 'large';
9
+ color: 'error' | 'accent' | 'neutral' | 'success';
10
+ };
11
+
12
+ export const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
13
+ (props: BadgeProps, ref): React.ReactNode => {
14
+ const { size, color, ...rest } = props;
15
+
16
+ const radixSize = useMemo(() => {
17
+ switch (size) {
18
+ case 'small':
19
+ return '1';
20
+ case 'large':
21
+ return '3';
22
+ default:
23
+ return '1';
24
+ }
25
+ }, [size]);
26
+
27
+ const radixColor = useMemo(() => {
28
+ switch (color) {
29
+ case 'error':
30
+ return 'red';
31
+ case 'neutral':
32
+ return 'gray';
33
+ case 'success':
34
+ return 'green';
35
+ case 'accent':
36
+ default:
37
+ return undefined;
38
+ }
39
+ }, [color]);
40
+
41
+ return (
42
+ <RadixBadge {...rest} color={radixColor} ref={ref} size={radixSize} />
43
+ );
44
+ }
45
+ );
46
+
47
+ Badge.displayName = 'Badge';
@@ -1 +1,32 @@
1
- export { Button, type ButtonProps } from '@radix-ui/themes';
1
+ import {
2
+ Button as RadixButton,
3
+ type ButtonProps as RadixButtonProps,
4
+ } from '@radix-ui/themes';
5
+ import React, { forwardRef, useMemo } from 'react';
6
+
7
+ export type ButtonProps = Omit<RadixButtonProps, 'size'> & {
8
+ size: 'small' | 'medium' | 'large';
9
+ };
10
+
11
+ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
12
+ (props, ref): React.ReactNode => {
13
+ const { size, ...restProps } = props;
14
+
15
+ const radixSize = useMemo(() => {
16
+ switch (size) {
17
+ case 'small':
18
+ return '2';
19
+ case 'medium':
20
+ return '3';
21
+ case 'large':
22
+ return '4';
23
+ default:
24
+ return '3';
25
+ }
26
+ }, [size]);
27
+
28
+ return <RadixButton {...restProps} ref={ref} size={radixSize} />;
29
+ }
30
+ );
31
+
32
+ Button.displayName = 'Button';
@@ -1 +1,38 @@
1
- export { CheckboxGroup } from '@radix-ui/themes';
1
+ import { CheckboxGroup as RadixCheckboxGroup } from '@radix-ui/themes';
2
+ import React, { forwardRef, useMemo } from 'react';
3
+
4
+ type RadixCheckboxGroupProps = React.ComponentPropsWithoutRef<
5
+ typeof RadixCheckboxGroup.Root
6
+ >;
7
+ type CheckboxGroupProps = Omit<RadixCheckboxGroupProps, 'size'> & {
8
+ size: 'small' | 'medium' | 'large';
9
+ };
10
+
11
+ const Root = forwardRef<HTMLDivElement, CheckboxGroupProps>((props, ref) => {
12
+ const { children, size, ...rest } = props;
13
+
14
+ const groupSize = useMemo<RadixCheckboxGroupProps['size']>(() => {
15
+ switch (size) {
16
+ case 'small':
17
+ return '1';
18
+ case 'large':
19
+ return '3';
20
+ case 'medium':
21
+ default:
22
+ return '2';
23
+ }
24
+ }, [size]);
25
+
26
+ return (
27
+ <RadixCheckboxGroup.Root {...rest} ref={ref} size={groupSize}>
28
+ {children}
29
+ </RadixCheckboxGroup.Root>
30
+ );
31
+ });
32
+
33
+ Root.displayName = 'CheckboxGroup.Root';
34
+
35
+ export const CheckboxGroup = {
36
+ Root,
37
+ Item: RadixCheckboxGroup.Item,
38
+ };
@@ -1 +1,30 @@
1
- export { Checkbox, type CheckboxProps } from '@radix-ui/themes';
1
+ import {
2
+ Checkbox as RadixCheckbox,
3
+ type CheckboxProps as RadixCheckboxProps,
4
+ } from '@radix-ui/themes';
5
+ import { useMemo, forwardRef } from 'react';
6
+
7
+ export type CheckboxProps = Omit<RadixCheckboxProps, 'size'> & {
8
+ size?: 'small' | 'medium' | 'large';
9
+ };
10
+
11
+ export const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(
12
+ (props, ref): React.ReactNode => {
13
+ const { size = 'medium', ...rest } = props;
14
+
15
+ const radixSize = useMemo<RadixCheckboxProps['size']>(() => {
16
+ switch (size) {
17
+ case 'small':
18
+ return '1';
19
+ case 'medium':
20
+ return '2';
21
+ case 'large':
22
+ return '3';
23
+ }
24
+ }, [size]);
25
+
26
+ return <RadixCheckbox {...rest} ref={ref} size={radixSize} />;
27
+ }
28
+ );
29
+
30
+ Checkbox.displayName = 'Checkbox';
@@ -1 +1,35 @@
1
- export { Heading, type HeadingProps } from '@radix-ui/themes';
1
+ import {
2
+ Heading as RadixHeading,
3
+ type HeadingProps as RadixHeadingProps,
4
+ } from '@radix-ui/themes';
5
+ import { useMemo } from 'react';
6
+
7
+ export { Heading as RadixHeading } from '@radix-ui/themes';
8
+
9
+ export type HeadingProps = RadixHeadingProps & {
10
+ variant?: 'subtitle1' | 'heading1' | 'heading2' | 'heading3';
11
+ };
12
+
13
+ export function Heading(props: HeadingProps): React.ReactNode {
14
+ const { size, children, variant, ...rest } = props;
15
+ const radixSize = useMemo<RadixHeadingProps['size']>(() => {
16
+ switch (variant) {
17
+ case 'subtitle1':
18
+ return '4';
19
+ case 'heading1':
20
+ return '7';
21
+ case 'heading2':
22
+ return '6';
23
+ case 'heading3':
24
+ return '5';
25
+ default:
26
+ return size;
27
+ }
28
+ }, [size, variant]);
29
+
30
+ return (
31
+ <RadixHeading {...rest} size={radixSize}>
32
+ {children}
33
+ </RadixHeading>
34
+ );
35
+ }
@@ -1 +1,33 @@
1
- export { Link, type LinkProps } from '@radix-ui/themes';
1
+ import {
2
+ Link as RadixLink,
3
+ type LinkProps as RadixLinkProps,
4
+ } from '@radix-ui/themes';
5
+ import { useMemo } from 'react';
6
+
7
+ export { Heading as RadixHeading } from '@radix-ui/themes';
8
+
9
+ export type LinkProps = RadixLinkProps & {
10
+ variant?: 'caption' | 'body' | 'subtitle';
11
+ };
12
+
13
+ export function Link(props: LinkProps): React.ReactNode {
14
+ const { size, children, variant, ...rest } = props;
15
+ const radixSize = useMemo<RadixLinkProps['size']>(() => {
16
+ switch (variant) {
17
+ case 'caption':
18
+ return '1';
19
+ case 'body':
20
+ return '2';
21
+ case 'subtitle':
22
+ return '3';
23
+ default:
24
+ return size;
25
+ }
26
+ }, [size, variant]);
27
+
28
+ return (
29
+ <RadixLink {...rest} size={radixSize}>
30
+ {children}
31
+ </RadixLink>
32
+ );
33
+ }
@@ -1 +1,30 @@
1
- export { Text, type TextProps } from '@radix-ui/themes';
1
+ import type { TextProps as RadixTextProps } from '@radix-ui/themes';
2
+ import { Text as RadixText } from '@radix-ui/themes';
3
+ import React, { useMemo } from 'react';
4
+
5
+ export type TextProps = RadixTextProps & {
6
+ variant?: 'body' | 'caption' | 'subtitle';
7
+ };
8
+
9
+ export function Text(props: TextProps): React.ReactNode {
10
+ const { size, variant, children, ...rest } = props;
11
+
12
+ const radixSize = useMemo<RadixTextProps['size']>(() => {
13
+ switch (variant) {
14
+ case 'caption':
15
+ return '1';
16
+ case 'subtitle':
17
+ return '3';
18
+ case 'body':
19
+ return '2';
20
+ default:
21
+ return size;
22
+ }
23
+ }, [size, variant]);
24
+
25
+ return (
26
+ <RadixText {...rest} size={radixSize}>
27
+ {children}
28
+ </RadixText>
29
+ );
30
+ }
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { EChart } from '@kbox-labs/react-echarts';
3
- import type { EChartProps } from '@kbox-labs/react-echarts';
4
2
  import { useResizeDetector } from 'react-resize-detector';
3
+ import ReactECharts from 'echarts-for-react';
5
4
 
6
- export type ChartProps = EChartProps;
5
+ export type ChartProps = React.ComponentProps<typeof ReactECharts>;
7
6
 
8
7
  export function Chart(props: ChartProps): JSX.Element {
9
8
  const { width, height, ref } = useResizeDetector({
@@ -14,7 +13,7 @@ export function Chart(props: ChartProps): JSX.Element {
14
13
 
15
14
  return (
16
15
  <div ref={ref} style={{ width: '100%', height: '100%' }}>
17
- <EChart style={{ width, height }} {...props} />
16
+ <ReactECharts style={{ width, height }} {...props} />
18
17
  </div>
19
18
  );
20
19
  }
@@ -8,5 +8,5 @@ interface ThemeProviderProps extends ThemeProps {
8
8
  }
9
9
 
10
10
  export function ThemeProvider(props: ThemeProviderProps): React.ReactNode {
11
- return <Theme accentColor="iris" {...props} />;
11
+ return <Theme accentColor="iris" radius="large" {...props} />;
12
12
  }
@@ -1,7 +0,0 @@
1
- // src/atoms/check-box.tsx
2
- import { Checkbox } from "@radix-ui/themes";
3
-
4
- export {
5
- Checkbox
6
- };
7
- //# sourceMappingURL=chunk-3566LFAS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/check-box.tsx"],"sourcesContent":["export { Checkbox, type CheckboxProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,gBAAoC;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/check-box-group.tsx
2
- import { CheckboxGroup } from "@radix-ui/themes";
3
-
4
- export {
5
- CheckboxGroup
6
- };
7
- //# sourceMappingURL=chunk-4PP245MS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/check-box-group.tsx"],"sourcesContent":["export { CheckboxGroup } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,qBAAqB;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/text.tsx
2
- import { Text } from "@radix-ui/themes";
3
-
4
- export {
5
- Text
6
- };
7
- //# sourceMappingURL=chunk-DYUKDKUS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/text.tsx"],"sourcesContent":["export { Text, type TextProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,YAA4B;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/button.tsx
2
- import { Button } from "@radix-ui/themes";
3
-
4
- export {
5
- Button
6
- };
7
- //# sourceMappingURL=chunk-LFJCZVNE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/button.tsx"],"sourcesContent":["export { Button, type ButtonProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,cAAgC;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/avatar.tsx
2
- import { Avatar } from "@radix-ui/themes";
3
-
4
- export {
5
- Avatar
6
- };
7
- //# sourceMappingURL=chunk-M4P36WOR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/avatar.tsx"],"sourcesContent":["export { Avatar, type AvatarProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,cAAgC;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/link.tsx
2
- import { Link } from "@radix-ui/themes";
3
-
4
- export {
5
- Link
6
- };
7
- //# sourceMappingURL=chunk-MLMWFOEE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/link.tsx"],"sourcesContent":["export { Link, type LinkProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,YAA4B;","names":[]}
@@ -1,7 +0,0 @@
1
- // src/atoms/heading.tsx
2
- import { Heading } from "@radix-ui/themes";
3
-
4
- export {
5
- Heading
6
- };
7
- //# sourceMappingURL=chunk-MYTJIEMB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/atoms/heading.tsx"],"sourcesContent":["export { Heading, type HeadingProps } from '@radix-ui/themes';\n"],"mappings":";AAAA,SAAS,eAAkC;","names":[]}