@hellboy/ds 0.1.3 → 0.2.7

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 (298) hide show
  1. package/README.md +512 -162
  2. package/{src/style/components/badge → dist/components}/badge.css +9 -25
  3. package/dist/components/badge.d.mts +12 -0
  4. package/dist/components/badge.d.ts +12 -0
  5. package/dist/components/badge.js +42 -0
  6. package/dist/components/badge.mjs +15 -0
  7. package/dist/components/banner.css +280 -0
  8. package/dist/components/banner.d.mts +12 -0
  9. package/dist/components/banner.d.ts +12 -0
  10. package/dist/components/banner.js +184 -0
  11. package/dist/components/banner.mjs +147 -0
  12. package/dist/components/button-group.css +289 -0
  13. package/dist/components/button-group.d.mts +81 -0
  14. package/dist/components/button-group.d.ts +81 -0
  15. package/dist/components/button-group.js +180 -0
  16. package/dist/components/button-group.mjs +143 -0
  17. package/{src/style/components/button → dist/components}/button.css +59 -62
  18. package/dist/components/button.d.mts +57 -0
  19. package/dist/components/button.d.ts +57 -0
  20. package/dist/components/button.js +129 -0
  21. package/dist/components/button.mjs +92 -0
  22. package/{src/style/components/card → dist/components}/card.css +9 -30
  23. package/dist/components/card.d.mts +31 -0
  24. package/dist/components/card.d.ts +31 -0
  25. package/dist/components/card.js +59 -0
  26. package/dist/components/card.mjs +32 -0
  27. package/{src/style → dist}/components/checkbox.css +51 -43
  28. package/dist/components/checkbox.d.mts +31 -0
  29. package/dist/components/checkbox.d.ts +31 -0
  30. package/dist/components/checkbox.js +130 -0
  31. package/dist/components/checkbox.mjs +93 -0
  32. package/{src/style/components/code-block → dist/components}/code-block.css +3 -7
  33. package/dist/components/code-block.d.mts +24 -0
  34. package/dist/components/code-block.d.ts +24 -0
  35. package/dist/components/code-block.js +43 -0
  36. package/dist/components/code-block.mjs +16 -0
  37. package/dist/components/color-control.css +285 -0
  38. package/dist/components/color-control.d.mts +5 -0
  39. package/dist/components/color-control.d.ts +5 -0
  40. package/dist/components/color-control.js +534 -0
  41. package/dist/components/color-control.mjs +497 -0
  42. package/dist/components/dialog.css +930 -0
  43. package/dist/components/dialog.d.mts +32 -0
  44. package/dist/components/dialog.d.ts +32 -0
  45. package/dist/components/dialog.js +1111 -0
  46. package/dist/components/dialog.mjs +1074 -0
  47. package/dist/components/divider.css +356 -0
  48. package/dist/components/divider.d.mts +32 -0
  49. package/dist/components/divider.d.ts +32 -0
  50. package/dist/components/divider.js +344 -0
  51. package/dist/components/divider.mjs +307 -0
  52. package/{src/style/components/drag-handle → dist/components}/drag-handle.css +3 -18
  53. package/dist/components/drag-handle.d.mts +11 -0
  54. package/dist/components/drag-handle.d.ts +11 -0
  55. package/dist/components/drag-handle.js +103 -0
  56. package/dist/components/drag-handle.mjs +66 -0
  57. package/dist/components/drawer.css +1027 -0
  58. package/dist/components/drawer.d.mts +14 -0
  59. package/dist/components/drawer.d.ts +14 -0
  60. package/dist/components/drawer.js +1072 -0
  61. package/dist/components/drawer.mjs +1035 -0
  62. package/dist/components/floating-bar.css +17 -0
  63. package/dist/components/floating-bar.d.mts +25 -0
  64. package/dist/components/floating-bar.d.ts +25 -0
  65. package/dist/components/floating-bar.js +52 -0
  66. package/dist/components/floating-bar.mjs +25 -0
  67. package/dist/components/footer.css +40 -0
  68. package/dist/components/footer.d.mts +8 -0
  69. package/dist/components/footer.d.ts +8 -0
  70. package/dist/components/footer.js +44 -0
  71. package/dist/components/footer.mjs +17 -0
  72. package/dist/components/grid.css +47 -0
  73. package/dist/components/grid.d.mts +27 -0
  74. package/dist/components/grid.d.ts +27 -0
  75. package/dist/components/grid.js +52 -0
  76. package/dist/components/grid.mjs +25 -0
  77. package/dist/components/header.css +1075 -0
  78. package/dist/components/header.d.mts +35 -0
  79. package/dist/components/header.d.ts +35 -0
  80. package/dist/components/header.js +1402 -0
  81. package/dist/components/header.mjs +1365 -0
  82. package/dist/components/hero.css +121 -0
  83. package/dist/components/hero.d.mts +111 -0
  84. package/dist/components/hero.d.ts +111 -0
  85. package/dist/components/hero.js +285 -0
  86. package/dist/components/hero.mjs +248 -0
  87. package/{src/style/components/icons → dist/components}/icons.css +14 -15
  88. package/dist/components/icons.d.mts +104 -0
  89. package/dist/components/icons.d.ts +104 -0
  90. package/dist/components/icons.js +239 -0
  91. package/dist/components/icons.mjs +203 -0
  92. package/{src/style/components/input → dist/components}/input.css +189 -102
  93. package/dist/components/input.d.mts +114 -0
  94. package/dist/components/input.d.ts +114 -0
  95. package/dist/components/input.js +926 -0
  96. package/dist/components/input.mjs +879 -0
  97. package/dist/components/layout.css +551 -0
  98. package/dist/components/layout.d.mts +16 -0
  99. package/dist/components/layout.d.ts +16 -0
  100. package/dist/components/layout.js +387 -0
  101. package/dist/components/layout.mjs +352 -0
  102. package/{src/style/components/list → dist/components}/list.css +47 -41
  103. package/dist/components/list.d.mts +46 -0
  104. package/dist/components/list.d.ts +46 -0
  105. package/dist/components/list.js +124 -0
  106. package/dist/components/list.mjs +96 -0
  107. package/dist/components/navbar.css +706 -0
  108. package/dist/components/navbar.d.mts +56 -0
  109. package/dist/components/navbar.d.ts +56 -0
  110. package/dist/components/navbar.js +994 -0
  111. package/dist/components/navbar.mjs +952 -0
  112. package/{src/style/components/page-index → dist/components}/page-index.css +2 -47
  113. package/dist/components/page-index.d.mts +25 -0
  114. package/dist/components/page-index.d.ts +25 -0
  115. package/dist/components/page-index.js +239 -0
  116. package/dist/components/page-index.mjs +202 -0
  117. package/{src/style/components/page → dist/components}/page.css +4 -15
  118. package/dist/components/page.d.mts +30 -0
  119. package/dist/components/page.d.ts +30 -0
  120. package/dist/components/page.js +40 -0
  121. package/dist/components/page.mjs +13 -0
  122. package/dist/components/popover.css +87 -0
  123. package/dist/components/popover.d.mts +22 -0
  124. package/dist/components/popover.d.ts +22 -0
  125. package/dist/components/popover.js +243 -0
  126. package/dist/components/popover.mjs +206 -0
  127. package/{src/style → dist}/components/radio.css +8 -51
  128. package/dist/components/radio.d.mts +59 -0
  129. package/dist/components/radio.d.ts +59 -0
  130. package/dist/components/radio.js +133 -0
  131. package/dist/components/radio.mjs +95 -0
  132. package/dist/components/section.css +993 -0
  133. package/dist/components/section.d.mts +33 -0
  134. package/dist/components/section.d.ts +33 -0
  135. package/dist/components/section.js +1401 -0
  136. package/dist/components/section.mjs +1364 -0
  137. package/dist/components/select.css +391 -0
  138. package/dist/components/select.d.mts +63 -0
  139. package/dist/components/select.d.ts +63 -0
  140. package/dist/components/select.js +452 -0
  141. package/dist/components/select.mjs +415 -0
  142. package/{src/style/components/slider → dist/components}/slider.css +55 -33
  143. package/dist/components/slider.d.mts +69 -0
  144. package/dist/components/slider.d.ts +69 -0
  145. package/dist/components/slider.js +254 -0
  146. package/dist/components/slider.mjs +217 -0
  147. package/dist/components/switch.css +1081 -0
  148. package/dist/components/switch.d.mts +33 -0
  149. package/dist/components/switch.d.ts +33 -0
  150. package/dist/components/switch.js +1092 -0
  151. package/dist/components/switch.mjs +1055 -0
  152. package/{src/style/components/table → dist/components}/table.css +3 -28
  153. package/dist/components/table.d.mts +42 -0
  154. package/dist/components/table.d.ts +42 -0
  155. package/dist/components/table.js +108 -0
  156. package/dist/components/table.mjs +76 -0
  157. package/dist/components/tag.css +97 -0
  158. package/dist/components/tag.d.mts +12 -0
  159. package/dist/components/tag.d.ts +12 -0
  160. package/dist/components/tag.js +42 -0
  161. package/dist/components/tag.mjs +15 -0
  162. package/dist/components/textarea.css +1359 -0
  163. package/dist/components/textarea.d.mts +84 -0
  164. package/dist/components/textarea.d.ts +84 -0
  165. package/dist/components/textarea.js +1962 -0
  166. package/dist/components/textarea.mjs +1924 -0
  167. package/{src/style/components/theme-control → dist/components}/theme-control.css +3 -7
  168. package/dist/components/theme-control.d.mts +9 -0
  169. package/dist/components/theme-control.d.ts +9 -0
  170. package/dist/components/theme-control.js +235 -0
  171. package/dist/components/theme-control.mjs +200 -0
  172. package/{src/style/components/tooltip → dist/components}/tooltip.css +5 -13
  173. package/dist/components/tooltip.d.mts +12 -0
  174. package/dist/components/tooltip.d.ts +12 -0
  175. package/dist/components/tooltip.js +200 -0
  176. package/dist/components/tooltip.mjs +163 -0
  177. package/dist/icons-Czahnf-r.d.mts +15 -0
  178. package/dist/icons-Czahnf-r.d.ts +15 -0
  179. package/dist/index.css +2914 -2067
  180. package/dist/index.d.mts +144 -721
  181. package/dist/index.d.ts +144 -721
  182. package/dist/index.js +4076 -2282
  183. package/dist/index.mjs +4132 -2366
  184. package/dist/theme.css +34 -34
  185. package/package.json +27 -8
  186. package/dist/index.css.map +0 -1
  187. package/dist/index.js.map +0 -1
  188. package/dist/index.mjs.map +0 -1
  189. package/hellboy-ds-0.1.2.tgz +0 -0
  190. package/src/components/badge/Badge.tsx +0 -29
  191. package/src/components/badge/index.ts +0 -1
  192. package/src/components/banner/Banner.tsx +0 -48
  193. package/src/components/banner/banner.css +0 -44
  194. package/src/components/banner/index.ts +0 -1
  195. package/src/components/button/button.tsx +0 -127
  196. package/src/components/button/index.ts +0 -1
  197. package/src/components/card/card.tsx +0 -57
  198. package/src/components/card/index.ts +0 -1
  199. package/src/components/checkbox/Checkbox.tsx +0 -98
  200. package/src/components/checkbox/index.ts +0 -1
  201. package/src/components/code-block/code-block.tsx +0 -44
  202. package/src/components/code-block/index.ts +0 -1
  203. package/src/components/color-control/color-control.tsx +0 -322
  204. package/src/components/color-control/index.ts +0 -1
  205. package/src/components/drag-handle/DragHandle.tsx +0 -78
  206. package/src/components/drag-handle/index.ts +0 -1
  207. package/src/components/drawer/drawer.tsx +0 -82
  208. package/src/components/drawer/index.ts +0 -1
  209. package/src/components/floating-bar/floating-bar.tsx +0 -52
  210. package/src/components/floating-bar/index.ts +0 -2
  211. package/src/components/footer/footer.tsx +0 -28
  212. package/src/components/footer/index.ts +0 -1
  213. package/src/components/grid/Grid.tsx +0 -53
  214. package/src/components/grid/index.ts +0 -1
  215. package/src/components/header/header.tsx +0 -57
  216. package/src/components/header/index.ts +0 -1
  217. package/src/components/icons/icons.tsx +0 -44
  218. package/src/components/icons/index.ts +0 -1
  219. package/src/components/index.ts +0 -29
  220. package/src/components/input/DatePicker.tsx +0 -133
  221. package/src/components/input/Input.tsx +0 -220
  222. package/src/components/input/InputDate.tsx +0 -10
  223. package/src/components/input/InputDateTime.tsx +0 -10
  224. package/src/components/input/InputEmail.tsx +0 -10
  225. package/src/components/input/InputField.tsx +0 -137
  226. package/src/components/input/InputNumber.tsx +0 -10
  227. package/src/components/input/InputPassword.tsx +0 -10
  228. package/src/components/input/InputSearch.tsx +0 -10
  229. package/src/components/input/InputTel.tsx +0 -10
  230. package/src/components/input/InputText.tsx +0 -10
  231. package/src/components/input/InputTime.tsx +0 -10
  232. package/src/components/input/InputUrl.tsx +0 -10
  233. package/src/components/input/TimePicker.tsx +0 -151
  234. package/src/components/input/index.ts +0 -11
  235. package/src/components/layout/Layout.tsx +0 -244
  236. package/src/components/layout/index.ts +0 -1
  237. package/src/components/list/List.tsx +0 -159
  238. package/src/components/list/index.ts +0 -1
  239. package/src/components/navbar/MenuCategory.tsx +0 -20
  240. package/src/components/navbar/MenuGroup.tsx +0 -288
  241. package/src/components/navbar/MenuItem.tsx +0 -65
  242. package/src/components/navbar/Navbar.tsx +0 -23
  243. package/src/components/navbar/index.ts +0 -4
  244. package/src/components/page/index.ts +0 -1
  245. package/src/components/page/page.tsx +0 -46
  246. package/src/components/page-index/PageIndex.tsx +0 -275
  247. package/src/components/page-index/index.ts +0 -1
  248. package/src/components/popover/index.ts +0 -1
  249. package/src/components/popover/popover.tsx +0 -199
  250. package/src/components/radio/Radio.tsx +0 -176
  251. package/src/components/radio/index.ts +0 -1
  252. package/src/components/section/index.ts +0 -1
  253. package/src/components/section/section.tsx +0 -66
  254. package/src/components/select/Select.tsx +0 -212
  255. package/src/components/select/index.ts +0 -1
  256. package/src/components/slider/Slider.tsx +0 -267
  257. package/src/components/slider/index.ts +0 -1
  258. package/src/components/switch/index.ts +0 -1
  259. package/src/components/switch/switch.tsx +0 -99
  260. package/src/components/table/Table.tsx +0 -147
  261. package/src/components/table/index.ts +0 -1
  262. package/src/components/theme-control/index.ts +0 -1
  263. package/src/components/theme-control/theme-control.tsx +0 -78
  264. package/src/components/tooltip/index.ts +0 -1
  265. package/src/components/tooltip/tooltip.tsx +0 -207
  266. package/src/contexts/NavbarTooltipContext.tsx +0 -48
  267. package/src/contexts/index.ts +0 -1
  268. package/src/foundations/motion.md +0 -136
  269. package/src/index.ts +0 -40
  270. package/src/style/_shared/field.css +0 -69
  271. package/src/style/components/color-control/color-control.css +0 -126
  272. package/src/style/components/drawer/drawer.css +0 -210
  273. package/src/style/components/floating-bar/floating-bar.css +0 -39
  274. package/src/style/components/footer/footer.css +0 -108
  275. package/src/style/components/grid/grid.css +0 -33
  276. package/src/style/components/header/header.css +0 -44
  277. package/src/style/components/layout/layout.css +0 -205
  278. package/src/style/components/navbar/navbar.css +0 -342
  279. package/src/style/components/popover/popover.css +0 -44
  280. package/src/style/components/section/section.css +0 -67
  281. package/src/style/components/select/select.css +0 -143
  282. package/src/style/components/switch/switch.css +0 -267
  283. package/src/style/foundations/global.css +0 -316
  284. package/src/style/foundations/motion.css +0 -164
  285. package/src/style/foundations/spacing.css +0 -51
  286. package/src/style/foundations/typography.css +0 -39
  287. package/src/style/foundations/z-index.css +0 -81
  288. package/src/style/modes/dark.css +0 -146
  289. package/src/style/modes/light.css +0 -147
  290. package/src/style/semantic.css +0 -52
  291. package/src/style/styles.css +0 -51
  292. package/src/style/themes/theme.json +0 -37
  293. package/src/utils/README.md +0 -305
  294. package/src/utils/USER_PREFERENCES.md +0 -558
  295. package/src/utils/theme.ts +0 -127
  296. package/src/utils/user-preferences.ts +0 -577
  297. package/tsconfig.json +0 -25
  298. package/tsup.config.ts +0 -52
@@ -0,0 +1,57 @@
1
+ import React__default, { ReactNode } from 'react';
2
+ import { ButtonProps as ButtonProps$1 } from '@ariakit/react';
3
+ import { a as IconName } from '../icons-Czahnf-r.js';
4
+
5
+ type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
6
+ type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
7
+ interface ButtonProps extends Omit<ButtonProps$1, 'children'> {
8
+ /**
9
+ * Visual variant of the button
10
+ * @default 'primary'
11
+ */
12
+ variant?: ButtonVariant;
13
+ /**
14
+ * Size of the button
15
+ * @default 'md'
16
+ */
17
+ size?: ButtonSize;
18
+ /**
19
+ * Button content
20
+ */
21
+ children?: ReactNode;
22
+ /**
23
+ * Whether the button is in a loading state
24
+ * @default false
25
+ */
26
+ isLoading?: boolean;
27
+ /**
28
+ * Full width button
29
+ * @default false
30
+ */
31
+ fullWidth?: boolean;
32
+ /**
33
+ * Icon to display at the start of the button
34
+ */
35
+ startIcon?: IconName;
36
+ /**
37
+ * Icon to display at the end of the button
38
+ */
39
+ endIcon?: IconName;
40
+ /**
41
+ * Whether the button should only display an icon (no text)
42
+ * @default false
43
+ */
44
+ iconOnly?: boolean;
45
+ /**
46
+ * URL to navigate to when button is clicked (makes it work like a link)
47
+ */
48
+ href?: string;
49
+ /**
50
+ * Whether the button is in an active/selected state
51
+ * @default false
52
+ */
53
+ active?: boolean;
54
+ }
55
+ declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
56
+
57
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/button/index.ts
31
+ var button_exports = {};
32
+ __export(button_exports, {
33
+ Button: () => Button
34
+ });
35
+ module.exports = __toCommonJS(button_exports);
36
+
37
+ // src/components/button/button.tsx
38
+ var import_react2 = __toESM(require("react"));
39
+ var import_react3 = require("@ariakit/react");
40
+
41
+ // src/components/icons/icons.tsx
42
+ var import_react = require("@iconify/react");
43
+ var import_jsx_runtime = require("react/jsx-runtime");
44
+ var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
45
+ const iconName = name.includes(":") ? name : `heroicons:${name}`;
46
+ const classes = ["icon", className].filter(Boolean).join(" ");
47
+ if (loading) {
48
+ const style = { width: size, height: size };
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ "span",
51
+ {
52
+ className: `${classes} icon--skeleton`,
53
+ style,
54
+ "aria-hidden": rest["aria-label"] ? "false" : "true",
55
+ ...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
56
+ }
57
+ );
58
+ }
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_react.Icon,
61
+ {
62
+ icon: iconName,
63
+ width: size,
64
+ height: size,
65
+ className: classes,
66
+ ...rest
67
+ }
68
+ );
69
+ };
70
+
71
+ // src/components/button/button.tsx
72
+ var import_jsx_runtime2 = require("react/jsx-runtime");
73
+ var Button = import_react2.default.forwardRef(
74
+ ({
75
+ variant = "primary",
76
+ size = "md",
77
+ children,
78
+ isLoading = false,
79
+ disabled = false,
80
+ fullWidth = false,
81
+ startIcon,
82
+ endIcon,
83
+ iconOnly = false,
84
+ href,
85
+ active = false,
86
+ className,
87
+ onClick,
88
+ ...props
89
+ }, ref) => {
90
+ const buttonClasses = [
91
+ "btn",
92
+ `btn--${variant}`,
93
+ `btn--${size}`,
94
+ fullWidth && "btn--full-width",
95
+ iconOnly && "btn--icon-only",
96
+ active && "btn--active",
97
+ className
98
+ ].filter(Boolean).join(" ");
99
+ const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
100
+ const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
101
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "btn__spinner" }),
102
+ startIcon && (isLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "btn__icon-placeholder", style: { width: iconSize, height: iconSize } }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: startIcon, size: iconSize, className: "btn__icon" })),
103
+ !iconOnly && children,
104
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { name: endIcon, size: iconSize, className: "btn__icon" })
105
+ ] });
106
+ const handleClick = (e) => {
107
+ if (href && !isLoading && !disabled) {
108
+ window.location.href = href;
109
+ }
110
+ onClick?.(e);
111
+ };
112
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
113
+ import_react3.Button,
114
+ {
115
+ ref,
116
+ disabled: disabled || isLoading,
117
+ className: buttonClasses,
118
+ onClick: handleClick,
119
+ ...props,
120
+ children: buttonContent
121
+ }
122
+ );
123
+ }
124
+ );
125
+ Button.displayName = "Button";
126
+ // Annotate the CommonJS export names for ESM import in node:
127
+ 0 && (module.exports = {
128
+ Button
129
+ });
@@ -0,0 +1,92 @@
1
+ // src/components/button/button.tsx
2
+ import React from "react";
3
+ import { Button as AriakitButton } from "@ariakit/react";
4
+
5
+ // src/components/icons/icons.tsx
6
+ import { Icon as IconifyIcon } from "@iconify/react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
9
+ const iconName = name.includes(":") ? name : `heroicons:${name}`;
10
+ const classes = ["icon", className].filter(Boolean).join(" ");
11
+ if (loading) {
12
+ const style = { width: size, height: size };
13
+ return /* @__PURE__ */ jsx(
14
+ "span",
15
+ {
16
+ className: `${classes} icon--skeleton`,
17
+ style,
18
+ "aria-hidden": rest["aria-label"] ? "false" : "true",
19
+ ...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
20
+ }
21
+ );
22
+ }
23
+ return /* @__PURE__ */ jsx(
24
+ IconifyIcon,
25
+ {
26
+ icon: iconName,
27
+ width: size,
28
+ height: size,
29
+ className: classes,
30
+ ...rest
31
+ }
32
+ );
33
+ };
34
+
35
+ // src/components/button/button.tsx
36
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
37
+ var Button = React.forwardRef(
38
+ ({
39
+ variant = "primary",
40
+ size = "md",
41
+ children,
42
+ isLoading = false,
43
+ disabled = false,
44
+ fullWidth = false,
45
+ startIcon,
46
+ endIcon,
47
+ iconOnly = false,
48
+ href,
49
+ active = false,
50
+ className,
51
+ onClick,
52
+ ...props
53
+ }, ref) => {
54
+ const buttonClasses = [
55
+ "btn",
56
+ `btn--${variant}`,
57
+ `btn--${size}`,
58
+ fullWidth && "btn--full-width",
59
+ iconOnly && "btn--icon-only",
60
+ active && "btn--active",
61
+ className
62
+ ].filter(Boolean).join(" ");
63
+ const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
64
+ const buttonContent = /* @__PURE__ */ jsxs(Fragment, { children: [
65
+ isLoading && /* @__PURE__ */ jsx2("span", { className: "btn__spinner" }),
66
+ startIcon && (isLoading ? /* @__PURE__ */ jsx2("span", { className: "btn__icon-placeholder", style: { width: iconSize, height: iconSize } }) : /* @__PURE__ */ jsx2(Icon, { name: startIcon, size: iconSize, className: "btn__icon" })),
67
+ !iconOnly && children,
68
+ endIcon && /* @__PURE__ */ jsx2(Icon, { name: endIcon, size: iconSize, className: "btn__icon" })
69
+ ] });
70
+ const handleClick = (e) => {
71
+ if (href && !isLoading && !disabled) {
72
+ window.location.href = href;
73
+ }
74
+ onClick?.(e);
75
+ };
76
+ return /* @__PURE__ */ jsx2(
77
+ AriakitButton,
78
+ {
79
+ ref,
80
+ disabled: disabled || isLoading,
81
+ className: buttonClasses,
82
+ onClick: handleClick,
83
+ ...props,
84
+ children: buttonContent
85
+ }
86
+ );
87
+ }
88
+ );
89
+ Button.displayName = "Button";
90
+ export {
91
+ Button
92
+ };
@@ -1,69 +1,48 @@
1
- /**
2
- * Card Component Styles
3
- * Flexible card component for content containers
4
- *
5
- * Supports light/dark modes via data-theme or prefers-color-scheme fallback
6
- * Interactive cards have hover and active states with smooth transitions
7
- */
8
-
1
+ /* src/style/components/card/card.css */
9
2
  .card {
10
- /* Base card styles */
11
- background-color: var(--color-bg-1);
3
+ background-color: var(--color-bg-2);
4
+ color: var(--color-foreground-1);
12
5
  border-radius: 8px;
13
6
  padding: var(--spacing-4);
14
7
  border: none;
15
- transition: box-shadow var(--transition-base), transform var(--transition-base), background-color var(--transition-base);
8
+ transition:
9
+ box-shadow var(--transition-base),
10
+ transform var(--transition-base),
11
+ background-color var(--transition-base);
16
12
  overflow: visible;
17
13
  }
18
-
19
14
  .card--default {
20
- /* Default variant - subtle border */
21
15
  border: 1px solid var(--color-foreground-2);
22
16
  border-color: rgba(0, 0, 0, 0.1);
23
17
  }
24
-
25
18
  .card--elevated {
26
- /* Elevated variant - shadow */
27
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
19
+ box-shadow: var(--shadow-sm);
28
20
  }
29
-
30
21
  .card--outlined {
31
- /* Outlined variant - stronger border */
32
22
  border: 2px solid var(--color-foreground-2);
33
23
  border-color: rgba(0, 0, 0, 0.15);
34
24
  }
35
-
36
- /* ===== INTERACTIVE CARD STYLES ===== */
37
25
  .card--interactive {
38
- /* Interactive styles */
39
26
  cursor: pointer;
40
27
  user-select: none;
41
28
  background-color: var(--color-bg-2);
42
29
  }
43
-
44
- /* Pointer hover */
45
30
  .card--interactive:hover {
46
31
  background-color: hsla(0, 0%, var(--lightness-bg-2), 0.8);
47
32
  transform: translateY(-2px);
48
33
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
49
34
  }
50
-
51
- /* Active / Pressed */
52
35
  .card--interactive:active {
53
36
  background-color: hsla(0, 0%, var(--lightness-bg-2), 0.9);
54
37
  transform: translateY(0);
55
38
  }
56
-
57
- /* Focus indicator (keyboard navigation) */
58
39
  .card--interactive:focus-visible {
59
40
  outline: 2px solid var(--color-action-primary);
60
41
  outline-offset: 2px;
61
42
  }
62
-
63
- /* Touch device support: respond to :active without :hover */
64
43
  @media (hover: none) and (pointer: coarse) {
65
44
  .card--interactive:active {
66
45
  background-color: hsla(0, 0%, var(--lightness-bg-2), 0.8);
67
46
  transform: translateY(-1px);
68
47
  }
69
- }
48
+ }
@@ -0,0 +1,31 @@
1
+ import React__default, { ReactNode } from 'react';
2
+
3
+ type CardVariant = 'default' | 'elevated' | 'outlined';
4
+ interface CardProps {
5
+ /**
6
+ * Visual variant of the card
7
+ * @default 'default'
8
+ */
9
+ variant?: CardVariant;
10
+ /**
11
+ * Card content
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Additional CSS classes
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Whether the card should have interactive styling (hover effects, cursor pointer)
20
+ * Use this to visually indicate a card is clickable, independent of onClick handler
21
+ * @default false
22
+ */
23
+ clickable?: boolean;
24
+ /**
25
+ * Click handler for interactive cards
26
+ */
27
+ onClick?: () => void;
28
+ }
29
+ declare const Card: React__default.FC<CardProps>;
30
+
31
+ export { Card, type CardProps, type CardVariant };
@@ -0,0 +1,31 @@
1
+ import React__default, { ReactNode } from 'react';
2
+
3
+ type CardVariant = 'default' | 'elevated' | 'outlined';
4
+ interface CardProps {
5
+ /**
6
+ * Visual variant of the card
7
+ * @default 'default'
8
+ */
9
+ variant?: CardVariant;
10
+ /**
11
+ * Card content
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Additional CSS classes
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Whether the card should have interactive styling (hover effects, cursor pointer)
20
+ * Use this to visually indicate a card is clickable, independent of onClick handler
21
+ * @default false
22
+ */
23
+ clickable?: boolean;
24
+ /**
25
+ * Click handler for interactive cards
26
+ */
27
+ onClick?: () => void;
28
+ }
29
+ declare const Card: React__default.FC<CardProps>;
30
+
31
+ export { Card, type CardProps, type CardVariant };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/card/index.ts
21
+ var card_exports = {};
22
+ __export(card_exports, {
23
+ Card: () => Card
24
+ });
25
+ module.exports = __toCommonJS(card_exports);
26
+
27
+ // src/components/card/card.tsx
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var Card = ({
30
+ variant = "default",
31
+ children,
32
+ className = "",
33
+ clickable = false,
34
+ onClick,
35
+ ...props
36
+ }) => {
37
+ const isInteractive = clickable || !!onClick;
38
+ const cardClasses = [
39
+ "card",
40
+ `card--${variant}`,
41
+ isInteractive && "card--interactive",
42
+ className
43
+ ].filter(Boolean).join(" ");
44
+ const Component = onClick ? "button" : "div";
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ Component,
47
+ {
48
+ className: cardClasses,
49
+ onClick,
50
+ ...onClick && { type: "button" },
51
+ ...props,
52
+ children
53
+ }
54
+ );
55
+ };
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ Card
59
+ });
@@ -0,0 +1,32 @@
1
+ // src/components/card/card.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ var Card = ({
4
+ variant = "default",
5
+ children,
6
+ className = "",
7
+ clickable = false,
8
+ onClick,
9
+ ...props
10
+ }) => {
11
+ const isInteractive = clickable || !!onClick;
12
+ const cardClasses = [
13
+ "card",
14
+ `card--${variant}`,
15
+ isInteractive && "card--interactive",
16
+ className
17
+ ].filter(Boolean).join(" ");
18
+ const Component = onClick ? "button" : "div";
19
+ return /* @__PURE__ */ jsx(
20
+ Component,
21
+ {
22
+ className: cardClasses,
23
+ onClick,
24
+ ...onClick && { type: "button" },
25
+ ...props,
26
+ children
27
+ }
28
+ );
29
+ };
30
+ export {
31
+ Card
32
+ };
@@ -1,11 +1,53 @@
1
- /* Checkbox Component Styles */
1
+ /* src/style/components/icons/icons.css */
2
+ .icon {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
7
+ .icon--skeleton {
8
+ background:
9
+ linear-gradient(
10
+ 90deg,
11
+ rgba(0, 0, 0, 0.06) 0%,
12
+ rgba(0, 0, 0, 0.03) 50%,
13
+ rgba(0, 0, 0, 0.06) 100%);
14
+ border-radius: 4px;
15
+ animation: hb-skeleton 1.2s ease-in-out infinite;
16
+ }
17
+ @keyframes hb-skeleton {
18
+ 0% {
19
+ background-position: 200% 0;
20
+ }
21
+ 100% {
22
+ background-position: -200% 0;
23
+ }
24
+ }
25
+ .icon {
26
+ display: inline-block;
27
+ flex-shrink: 0;
28
+ transition: color var(--transition-base, 0.2s ease);
29
+ }
30
+ .icon--interactive {
31
+ cursor: pointer;
32
+ color: var(--color-foreground-1);
33
+ }
34
+ .icon--interactive:hover:not(:disabled) {
35
+ color: var(--color-action-primary-hover);
36
+ }
37
+ .icon--interactive:active:not(:disabled) {
38
+ color: var(--color-action-primary-active);
39
+ }
40
+ .icon--interactive:disabled {
41
+ cursor: not-allowed;
42
+ color: var(--color-foreground-2);
43
+ }
2
44
 
45
+ /* src/style/components/checkbox.css */
3
46
  .checkbox {
4
47
  display: inline-flex;
5
48
  flex-direction: column;
6
49
  gap: var(--spacing-1);
7
50
  }
8
-
9
51
  .checkbox__container {
10
52
  display: inline-flex;
11
53
  align-items: center;
@@ -13,7 +55,6 @@
13
55
  cursor: pointer;
14
56
  user-select: none;
15
57
  }
16
-
17
58
  .checkbox__input {
18
59
  position: absolute;
19
60
  opacity: 0;
@@ -21,7 +62,6 @@
21
62
  height: 0;
22
63
  pointer-events: none;
23
64
  }
24
-
25
65
  .checkbox__box {
26
66
  position: relative;
27
67
  display: inline-flex;
@@ -31,110 +71,78 @@
31
71
  border: 2px solid var(--color-foreground-2);
32
72
  border-radius: 4px;
33
73
  background-color: var(--color-bg-1);
34
- transition: all 0.2s ease;
74
+ transition: all var(--motion-transition-base);
35
75
  }
36
-
37
76
  .checkbox__icon {
38
77
  color: var(--color-on-primary);
39
- transition: opacity 0.2s ease;
78
+ transition: opacity var(--motion-transition-base);
40
79
  }
41
-
42
80
  .checkbox__label {
43
81
  font-size: var(--font-size-md);
44
82
  color: var(--color-foreground-1);
45
83
  line-height: 1.5;
46
84
  }
47
-
48
- /* Size variants */
49
85
  .checkbox--sm .checkbox__box {
50
86
  width: 16px;
51
87
  height: 16px;
52
88
  }
53
-
54
89
  .checkbox--sm .checkbox__label {
55
90
  font-size: var(--font-size-sm);
56
91
  }
57
-
58
92
  .checkbox--md .checkbox__box {
59
93
  width: 20px;
60
94
  height: 20px;
61
95
  }
62
-
63
96
  .checkbox--lg .checkbox__box {
64
97
  width: 24px;
65
98
  height: 24px;
66
99
  }
67
-
68
100
  .checkbox--lg .checkbox__label {
69
101
  font-size: var(--font-size-lg);
70
102
  }
71
-
72
- /* Checked state */
73
- .checkbox__input[aria-checked="true"] + .checkbox__box,
103
+ .checkbox__input[aria-checked=true] + .checkbox__box,
74
104
  .checkbox__input:checked + .checkbox__box {
75
105
  background-color: var(--color-primary);
76
106
  border-color: var(--color-primary);
77
107
  }
78
-
79
- /* Indeterminate state */
80
- .checkbox__input[aria-checked="mixed"] + .checkbox__box {
108
+ .checkbox__input[aria-checked=mixed] + .checkbox__box {
81
109
  background-color: var(--color-primary);
82
110
  border-color: var(--color-primary);
83
111
  }
84
-
85
- /* Focus state */
86
112
  .checkbox__input:focus-visible + .checkbox__box {
87
113
  outline: 2px solid var(--color-primary);
88
114
  outline-offset: 2px;
89
115
  }
90
-
91
- /* Hover state */
92
116
  .checkbox__container:hover .checkbox__box {
93
117
  border-color: var(--color-primary);
94
118
  }
95
-
96
- .checkbox__container:hover .checkbox__input[aria-checked="true"] + .checkbox__box,
119
+ .checkbox__container:hover .checkbox__input[aria-checked=true] + .checkbox__box,
97
120
  .checkbox__container:hover .checkbox__input:checked + .checkbox__box,
98
- .checkbox__container:hover .checkbox__input[aria-checked="mixed"] + .checkbox__box {
99
- background-color: HSLA(
100
- var(--primary-hue),
101
- var(--primary-saturation),
102
- calc(var(--primary-lightness) - 5%),
103
- 1
104
- );
121
+ .checkbox__container:hover .checkbox__input[aria-checked=mixed] + .checkbox__box {
122
+ background-color: HSLA(var(--primary-hue), var(--primary-saturation), calc(var(--primary-lightness) - 5%), 1);
105
123
  }
106
-
107
- /* Disabled state */
108
124
  .checkbox--disabled .checkbox__container {
109
125
  cursor: not-allowed;
110
126
  opacity: 0.5;
111
127
  }
112
-
113
128
  .checkbox--disabled .checkbox__box {
114
129
  background-color: var(--color-bg-2);
115
130
  border-color: var(--color-foreground-3);
116
131
  }
117
-
118
- /* Error state */
119
132
  .checkbox--error .checkbox__box {
120
133
  border-color: hsla(var(--error-hue), var(--error-saturation), 50%, 1);
121
134
  }
122
-
123
135
  .checkbox--error .checkbox__input:focus-visible + .checkbox__box {
124
136
  outline-color: hsla(var(--error-hue), var(--error-saturation), 50%, 1);
125
137
  }
126
-
127
- /* Feedback text */
128
138
  .checkbox__feedback {
129
139
  padding-left: calc(var(--spacing-2) + 20px);
130
140
  }
131
-
132
141
  .checkbox__error-text {
133
142
  font-size: var(--font-size-sm);
134
143
  color: hsla(var(--error-hue), var(--error-saturation), var(--error-lightness), 1);
135
144
  display: block;
136
145
  }
137
-
138
146
  .checkbox__helper-text {
139
147
  font-size: var(--font-size-sm);
140
148
  color: var(--color-foreground-2);