pixelize-design-library 2.2.193 → 2.2.194

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 (209) hide show
  1. package/package.json +1 -1
  2. package/.claude/settings.local.json +0 -15
  3. package/coverage/clover.xml +0 -638
  4. package/coverage/coverage-final.json +0 -20
  5. package/coverage/lcov-report/Table/CompactSelect.tsx.html +0 -379
  6. package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +0 -514
  7. package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +0 -373
  8. package/coverage/lcov-report/Table/Components/Pagination.tsx.html +0 -574
  9. package/coverage/lcov-report/Table/Components/TableActions.tsx.html +0 -574
  10. package/coverage/lcov-report/Table/Components/TableBody.tsx.html +0 -1027
  11. package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +0 -397
  12. package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +0 -1060
  13. package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +0 -361
  14. package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +0 -337
  15. package/coverage/lcov-report/Table/Components/index.html +0 -266
  16. package/coverage/lcov-report/Table/Components/useDebounce.ts.html +0 -178
  17. package/coverage/lcov-report/Table/Components/useTable.ts.html +0 -778
  18. package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +0 -1810
  19. package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +0 -178
  20. package/coverage/lcov-report/Table/Table.tsx.html +0 -1567
  21. package/coverage/lcov-report/Table/TableProps.tsx.html +0 -658
  22. package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +0 -619
  23. package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +0 -229
  24. package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +0 -532
  25. package/coverage/lcov-report/Table/TableSettings/index.html +0 -146
  26. package/coverage/lcov-report/Table/TableToDo.tsx.html +0 -973
  27. package/coverage/lcov-report/Table/TextOperationControls.tsx.html +0 -271
  28. package/coverage/lcov-report/Table/filterTypes.ts.html +0 -97
  29. package/coverage/lcov-report/Table/index.html +0 -176
  30. package/coverage/lcov-report/base.css +0 -224
  31. package/coverage/lcov-report/block-navigation.js +0 -87
  32. package/coverage/lcov-report/favicon.png +0 -0
  33. package/coverage/lcov-report/index.html +0 -146
  34. package/coverage/lcov-report/prettify.css +0 -1
  35. package/coverage/lcov-report/prettify.js +0 -2
  36. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  37. package/coverage/lcov-report/sorter.js +0 -210
  38. package/coverage/lcov.info +0 -1836
  39. package/dist/Assets/defaultLogo.tsx +0 -31
  40. package/dist/Theme/Dark/palette.d.ts +0 -370
  41. package/dist/Theme/Dark/palette.js +0 -372
  42. package/dist/components-v2/AlertDialog/AlertDialog.d.ts +0 -23
  43. package/dist/components-v2/AlertDialog/AlertDialog.js +0 -98
  44. package/dist/components-v2/Breadcrumbs/Breadcrumbs.d.ts +0 -14
  45. package/dist/components-v2/Breadcrumbs/Breadcrumbs.js +0 -66
  46. package/dist/components-v2/Charts/AreaChart.d.ts +0 -23
  47. package/dist/components-v2/Charts/AreaChart.js +0 -63
  48. package/dist/components-v2/Charts/BarChart.d.ts +0 -25
  49. package/dist/components-v2/Charts/BarChart.js +0 -57
  50. package/dist/components-v2/Charts/LineChart.d.ts +0 -23
  51. package/dist/components-v2/Charts/LineChart.js +0 -55
  52. package/dist/components-v2/Charts/PieChart.d.ts +0 -15
  53. package/dist/components-v2/Charts/PieChart.js +0 -54
  54. package/dist/components-v2/Charts/PolarChart.d.ts +0 -14
  55. package/dist/components-v2/Charts/PolarChart.js +0 -54
  56. package/dist/components-v2/Charts/chartOptions.d.ts +0 -7
  57. package/dist/components-v2/Charts/chartOptions.js +0 -41
  58. package/dist/components-v2/Charts/useChartTheme.d.ts +0 -22
  59. package/dist/components-v2/Charts/useChartTheme.js +0 -106
  60. package/dist/components-v2/ContactForm/ContactForm.d.ts +0 -25
  61. package/dist/components-v2/ContactForm/ContactForm.js +0 -116
  62. package/dist/components-v2/DatePicker/Calendar.d.ts +0 -19
  63. package/dist/components-v2/DatePicker/Calendar.js +0 -212
  64. package/dist/components-v2/DatePicker/DatePicker.d.ts +0 -46
  65. package/dist/components-v2/DatePicker/DatePicker.js +0 -189
  66. package/dist/components-v2/DatePicker/TimePicker.d.ts +0 -12
  67. package/dist/components-v2/DatePicker/TimePicker.js +0 -105
  68. package/dist/components-v2/DatePicker/utils.d.ts +0 -31
  69. package/dist/components-v2/DatePicker/utils.js +0 -109
  70. package/dist/components-v2/Drawer/Drawer.d.ts +0 -27
  71. package/dist/components-v2/Drawer/Drawer.js +0 -132
  72. package/dist/components-v2/FeedbackForm/FeedbackForm.d.ts +0 -26
  73. package/dist/components-v2/FeedbackForm/FeedbackForm.js +0 -112
  74. package/dist/components-v2/FileUploader/FileUploader.d.ts +0 -28
  75. package/dist/components-v2/FileUploader/FileUploader.js +0 -127
  76. package/dist/components-v2/Input/TextInput.d.ts +0 -41
  77. package/dist/components-v2/Input/TextInput.js +0 -169
  78. package/dist/components-v2/KanbanBoard/KanbanBoard.d.ts +0 -39
  79. package/dist/components-v2/KanbanBoard/KanbanBoard.js +0 -101
  80. package/dist/components-v2/Layout/AppLayout.d.ts +0 -22
  81. package/dist/components-v2/Layout/AppLayout.js +0 -53
  82. package/dist/components-v2/Loading/Loading.d.ts +0 -19
  83. package/dist/components-v2/Loading/Loading.js +0 -55
  84. package/dist/components-v2/Modal/Modal.d.ts +0 -30
  85. package/dist/components-v2/Modal/Modal.js +0 -82
  86. package/dist/components-v2/NavigationBar/NavigationBar.d.ts +0 -47
  87. package/dist/components-v2/NavigationBar/NavigationBar.js +0 -148
  88. package/dist/components-v2/Notification/Notification.d.ts +0 -22
  89. package/dist/components-v2/Notification/Notification.js +0 -113
  90. package/dist/components-v2/NumberInput/NumberInput.d.ts +0 -37
  91. package/dist/components-v2/NumberInput/NumberInput.js +0 -210
  92. package/dist/components-v2/PinInput/PinInput.d.ts +0 -26
  93. package/dist/components-v2/PinInput/PinInput.js +0 -138
  94. package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +0 -18
  95. package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.js +0 -91
  96. package/dist/components-v2/Select/Select.d.ts +0 -41
  97. package/dist/components-v2/Select/Select.js +0 -284
  98. package/dist/components-v2/Sidebar/Sidebar.d.ts +0 -41
  99. package/dist/components-v2/Sidebar/Sidebar.js +0 -182
  100. package/dist/components-v2/Slider/Slider.d.ts +0 -18
  101. package/dist/components-v2/Slider/Slider.js +0 -101
  102. package/dist/components-v2/Table/Table.d.ts +0 -7
  103. package/dist/components-v2/Table/Table.js +0 -172
  104. package/dist/components-v2/Table/TableProps.d.ts +0 -139
  105. package/dist/components-v2/Table/TableProps.js +0 -9
  106. package/dist/components-v2/Table/components/ActiveFilters.d.ts +0 -10
  107. package/dist/components-v2/Table/components/ActiveFilters.js +0 -70
  108. package/dist/components-v2/Table/components/BulkActionBar.d.ts +0 -11
  109. package/dist/components-v2/Table/components/BulkActionBar.js +0 -92
  110. package/dist/components-v2/Table/components/ColumnResizeHandle.d.ts +0 -7
  111. package/dist/components-v2/Table/components/ColumnResizeHandle.js +0 -41
  112. package/dist/components-v2/Table/components/Pagination.d.ts +0 -11
  113. package/dist/components-v2/Table/components/Pagination.js +0 -92
  114. package/dist/components-v2/Table/components/TableBody.d.ts +0 -23
  115. package/dist/components-v2/Table/components/TableBody.js +0 -69
  116. package/dist/components-v2/Table/components/TableCell.d.ts +0 -14
  117. package/dist/components-v2/Table/components/TableCell.js +0 -63
  118. package/dist/components-v2/Table/components/TableEmptyState.d.ts +0 -12
  119. package/dist/components-v2/Table/components/TableEmptyState.js +0 -55
  120. package/dist/components-v2/Table/components/TableErrorState.d.ts +0 -6
  121. package/dist/components-v2/Table/components/TableErrorState.js +0 -52
  122. package/dist/components-v2/Table/components/TableHeader.d.ts +0 -21
  123. package/dist/components-v2/Table/components/TableHeader.js +0 -94
  124. package/dist/components-v2/Table/components/TableRow.d.ts +0 -20
  125. package/dist/components-v2/Table/components/TableRow.js +0 -64
  126. package/dist/components-v2/Table/components/TableSearch.d.ts +0 -8
  127. package/dist/components-v2/Table/components/TableSearch.js +0 -47
  128. package/dist/components-v2/Table/filters/FilterChips.d.ts +0 -6
  129. package/dist/components-v2/Table/filters/FilterChips.js +0 -9
  130. package/dist/components-v2/Table/filters/LeftFilterPane.d.ts +0 -17
  131. package/dist/components-v2/Table/filters/LeftFilterPane.js +0 -105
  132. package/dist/components-v2/Table/filters/TableFilters.d.ts +0 -12
  133. package/dist/components-v2/Table/filters/TableFilters.js +0 -127
  134. package/dist/components-v2/Table/hooks/useColumnResize.d.ts +0 -15
  135. package/dist/components-v2/Table/hooks/useColumnResize.js +0 -104
  136. package/dist/components-v2/Table/hooks/useTable.d.ts +0 -58
  137. package/dist/components-v2/Table/hooks/useTable.js +0 -254
  138. package/dist/components-v2/Table/hooks/useTableKeyboard.d.ts +0 -25
  139. package/dist/components-v2/Table/hooks/useTableKeyboard.js +0 -112
  140. package/dist/components-v2/Table/hooks/useVirtualScroll.d.ts +0 -29
  141. package/dist/components-v2/Table/hooks/useVirtualScroll.js +0 -83
  142. package/dist/components-v2/Table/settings/ManageColumns.d.ts +0 -12
  143. package/dist/components-v2/Table/settings/ManageColumns.js +0 -59
  144. package/dist/components-v2/Table/settings/TableSettings.d.ts +0 -12
  145. package/dist/components-v2/Table/settings/TableSettings.js +0 -57
  146. package/dist/components-v2/Table/utils/filterUtils.d.ts +0 -7
  147. package/dist/components-v2/Table/utils/filterUtils.js +0 -149
  148. package/dist/components-v2/Table/utils/sortUtils.d.ts +0 -6
  149. package/dist/components-v2/Table/utils/sortUtils.js +0 -65
  150. package/dist/components-v2/Tag/Tag.d.ts +0 -15
  151. package/dist/components-v2/Tag/Tag.js +0 -87
  152. package/dist/components-v2/Timeline/Timeline.d.ts +0 -18
  153. package/dist/components-v2/Timeline/Timeline.js +0 -76
  154. package/dist/components-v2/Toaster/Toaster.d.ts +0 -61
  155. package/dist/components-v2/Toaster/Toaster.js +0 -63
  156. package/dist/components-v2/Toggle/Toggle.d.ts +0 -28
  157. package/dist/components-v2/Toggle/Toggle.js +0 -90
  158. package/dist/components-v2/ui/accordion.d.ts +0 -12
  159. package/dist/components-v2/ui/accordion.js +0 -104
  160. package/dist/components-v2/ui/alert.d.ts +0 -18
  161. package/dist/components-v2/ui/alert.js +0 -99
  162. package/dist/components-v2/ui/avatar.d.ts +0 -12
  163. package/dist/components-v2/ui/avatar.js +0 -80
  164. package/dist/components-v2/ui/badge.d.ts +0 -10
  165. package/dist/components-v2/ui/badge.js +0 -76
  166. package/dist/components-v2/ui/button.d.ts +0 -18
  167. package/dist/components-v2/ui/button.js +0 -97
  168. package/dist/components-v2/ui/checkbox.d.ts +0 -15
  169. package/dist/components-v2/ui/checkbox.js +0 -86
  170. package/dist/components-v2/ui/dialog.d.ts +0 -30
  171. package/dist/components-v2/ui/dialog.js +0 -115
  172. package/dist/components-v2/ui/dropdown-menu.d.ts +0 -26
  173. package/dist/components-v2/ui/dropdown-menu.js +0 -121
  174. package/dist/components-v2/ui/field.d.ts +0 -32
  175. package/dist/components-v2/ui/field.js +0 -62
  176. package/dist/components-v2/ui/form-field.d.ts +0 -25
  177. package/dist/components-v2/ui/form-field.js +0 -96
  178. package/dist/components-v2/ui/input.d.ts +0 -9
  179. package/dist/components-v2/ui/input.js +0 -73
  180. package/dist/components-v2/ui/label.d.ts +0 -10
  181. package/dist/components-v2/ui/label.js +0 -70
  182. package/dist/components-v2/ui/popover.d.ts +0 -9
  183. package/dist/components-v2/ui/popover.js +0 -60
  184. package/dist/components-v2/ui/progress.d.ts +0 -12
  185. package/dist/components-v2/ui/progress.js +0 -75
  186. package/dist/components-v2/ui/radio-group.d.ts +0 -17
  187. package/dist/components-v2/ui/radio-group.js +0 -91
  188. package/dist/components-v2/ui/select.d.ts +0 -24
  189. package/dist/components-v2/ui/select.js +0 -122
  190. package/dist/components-v2/ui/separator.d.ts +0 -5
  191. package/dist/components-v2/ui/separator.js +0 -55
  192. package/dist/components-v2/ui/skeleton.d.ts +0 -9
  193. package/dist/components-v2/ui/skeleton.js +0 -68
  194. package/dist/components-v2/ui/spinner.d.ts +0 -16
  195. package/dist/components-v2/ui/spinner.js +0 -64
  196. package/dist/components-v2/ui/switch.d.ts +0 -10
  197. package/dist/components-v2/ui/switch.js +0 -81
  198. package/dist/components-v2/ui/tabs.d.ts +0 -13
  199. package/dist/components-v2/ui/tabs.js +0 -95
  200. package/dist/components-v2/ui/textarea.d.ts +0 -10
  201. package/dist/components-v2/ui/textarea.js +0 -96
  202. package/dist/components-v2/ui/tooltip.d.ts +0 -17
  203. package/dist/components-v2/ui/tooltip.js +0 -75
  204. package/dist/lib/utils.d.ts +0 -2
  205. package/dist/lib/utils.js +0 -8
  206. package/dist/theme-v2/ThemeProvider.d.ts +0 -19
  207. package/dist/theme-v2/ThemeProvider.js +0 -149
  208. package/dist/theme-v2/dark.css +0 -47
  209. package/dist/theme-v2/tokens.css +0 -72
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __rest = (this && this.__rest) || function (s, e) {
36
- var t = {};
37
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
- t[p] = s[p];
39
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
- t[p[i]] = s[p[i]];
43
- }
44
- return t;
45
- };
46
- Object.defineProperty(exports, "__esModule", { value: true });
47
- exports.Textarea = void 0;
48
- const React = __importStar(require("react"));
49
- const utils_1 = require("../../lib/utils");
50
- const form_field_1 = require("./form-field");
51
- function syncHeight(element, minRows, maxRows) {
52
- const computed = window.getComputedStyle(element);
53
- const lineHeight = parseFloat(computed.lineHeight) || 20;
54
- const paddingTop = parseFloat(computed.paddingTop) || 0;
55
- const paddingBottom = parseFloat(computed.paddingBottom) || 0;
56
- element.style.height = "auto";
57
- const contentHeight = element.scrollHeight - paddingTop - paddingBottom;
58
- const rows = Math.ceil(contentHeight / lineHeight);
59
- const clamped = Math.max(minRows, maxRows ? Math.min(rows, maxRows) : rows);
60
- element.style.height = `${clamped * lineHeight + paddingTop + paddingBottom}px`;
61
- element.style.overflowY = maxRows && rows > maxRows ? "auto" : "hidden";
62
- }
63
- exports.Textarea = React.forwardRef((_a, ref) => {
64
- var { className, autoResize = false, maxRows, minRows = 3, id: idProp, value, defaultValue, onChange, "aria-describedby": ariaDescribedByProp, "aria-invalid": ariaInvalidProp } = _a, rest = __rest(_a, ["className", "autoResize", "maxRows", "minRows", "id", "value", "defaultValue", "onChange", "aria-describedby", "aria-invalid"]);
65
- const field = (0, form_field_1.useFormField)();
66
- const id = idProp !== null && idProp !== void 0 ? idProp : (field.id || undefined);
67
- const describedBy = ariaDescribedByProp !== null && ariaDescribedByProp !== void 0 ? ariaDescribedByProp : (0, form_field_1.buildAriaDescribedBy)(field);
68
- const invalid = ariaInvalidProp !== undefined ? ariaInvalidProp : field.hasError || undefined;
69
- const innerRef = React.useRef(null);
70
- const setRefs = React.useCallback((node) => {
71
- innerRef.current = node;
72
- if (typeof ref === "function") {
73
- ref(node);
74
- }
75
- else if (ref) {
76
- ref.current =
77
- node;
78
- }
79
- }, [ref]);
80
- React.useLayoutEffect(() => {
81
- if (!autoResize)
82
- return;
83
- const node = innerRef.current;
84
- if (!node)
85
- return;
86
- syncHeight(node, minRows, maxRows);
87
- }, [autoResize, minRows, maxRows, value, defaultValue]);
88
- const handleChange = (event) => {
89
- if (autoResize && innerRef.current) {
90
- syncHeight(innerRef.current, minRows, maxRows);
91
- }
92
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
93
- };
94
- return (React.createElement("textarea", Object.assign({ ref: setRefs, id: id, rows: minRows, value: value, defaultValue: defaultValue, onChange: handleChange, "aria-describedby": describedBy, "aria-invalid": invalid, className: (0, utils_1.cn)("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive", autoResize ? "resize-none" : "resize-y", className) }, rest)));
95
- });
96
- exports.Textarea.displayName = "Textarea";
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
- import { type VariantProps } from "class-variance-authority";
4
- /**
5
- * TooltipProvider is mounted globally by ThemeProvider. Re-exported here for
6
- * consumers who render outside ThemeProvider (e.g. portal roots, tests).
7
- */
8
- export declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
9
- export declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
10
- export declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
11
- declare const contentVariants: (props?: ({
12
- size?: "sm" | "md" | null | undefined;
13
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
- export interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, VariantProps<typeof contentVariants> {
15
- }
16
- export declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
17
- export {};
@@ -1,75 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __rest = (this && this.__rest) || function (s, e) {
36
- var t = {};
37
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
- t[p] = s[p];
39
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
- t[p[i]] = s[p[i]];
43
- }
44
- return t;
45
- };
46
- Object.defineProperty(exports, "__esModule", { value: true });
47
- exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.TooltipProvider = void 0;
48
- const React = __importStar(require("react"));
49
- const TooltipPrimitive = __importStar(require("@radix-ui/react-tooltip"));
50
- const class_variance_authority_1 = require("class-variance-authority");
51
- const utils_1 = require("../../lib/utils");
52
- /**
53
- * TooltipProvider is mounted globally by ThemeProvider. Re-exported here for
54
- * consumers who render outside ThemeProvider (e.g. portal roots, tests).
55
- */
56
- exports.TooltipProvider = TooltipPrimitive.Provider;
57
- exports.Tooltip = TooltipPrimitive.Root;
58
- exports.TooltipTrigger = TooltipPrimitive.Trigger;
59
- const contentVariants = (0, class_variance_authority_1.cva)((0, utils_1.cn)("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-background shadow-md", "animate-in fade-in-0 zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2"), {
60
- variants: {
61
- size: {
62
- sm: "px-2 py-1 text-xs",
63
- md: "px-3 py-1.5 text-xs",
64
- },
65
- },
66
- defaultVariants: {
67
- size: "md",
68
- },
69
- });
70
- exports.TooltipContent = React.forwardRef((_a, ref) => {
71
- var { className, size, sideOffset = 4, side = "top" } = _a, rest = __rest(_a, ["className", "size", "sideOffset", "side"]);
72
- return (React.createElement(TooltipPrimitive.Portal, null,
73
- React.createElement(TooltipPrimitive.Content, Object.assign({ ref: ref, sideOffset: sideOffset, side: side, className: (0, utils_1.cn)(contentVariants({ size }), className) }, rest))));
74
- });
75
- exports.TooltipContent.displayName = TooltipPrimitive.Content.displayName;
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
package/dist/lib/utils.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cn = cn;
4
- const clsx_1 = require("clsx");
5
- const tailwind_merge_1 = require("tailwind-merge");
6
- function cn(...inputs) {
7
- return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
8
- }
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- export type ThemeName = "default" | "meadow" | "rosewood" | "skyline" | "slate" | "emerald" | "radiant";
3
- export type ThemeMode = "light" | "dark" | "system";
4
- export type ResolvedMode = "light" | "dark";
5
- export interface ThemeContextValue {
6
- theme: ThemeName;
7
- setTheme: (theme: ThemeName) => void;
8
- mode: ThemeMode;
9
- setMode: (mode: ThemeMode) => void;
10
- resolvedMode: ResolvedMode;
11
- }
12
- export interface ThemeProviderProps {
13
- children: React.ReactNode;
14
- defaultTheme?: ThemeName;
15
- defaultMode?: ThemeMode;
16
- storageKey?: string;
17
- }
18
- export declare function ThemeProvider({ children, defaultTheme, defaultMode, storageKey, }: ThemeProviderProps): React.ReactElement;
19
- export declare function useTheme(): ThemeContextValue;
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ThemeProvider = ThemeProvider;
37
- exports.useTheme = useTheme;
38
- const React = __importStar(require("react"));
39
- const TooltipPrimitive = __importStar(require("@radix-ui/react-tooltip"));
40
- const ThemeContext = React.createContext(null);
41
- const THEME_NAMES = [
42
- "default",
43
- "meadow",
44
- "rosewood",
45
- "skyline",
46
- "slate",
47
- "emerald",
48
- "radiant",
49
- ];
50
- const MODES = ["light", "dark", "system"];
51
- function isThemeName(value) {
52
- return typeof value === "string" && THEME_NAMES.includes(value);
53
- }
54
- function isThemeMode(value) {
55
- return typeof value === "string" && MODES.includes(value);
56
- }
57
- function readStorage(key) {
58
- if (typeof window === "undefined")
59
- return {};
60
- try {
61
- const raw = window.localStorage.getItem(key);
62
- if (!raw)
63
- return {};
64
- const parsed = JSON.parse(raw);
65
- if (!parsed || typeof parsed !== "object")
66
- return {};
67
- const candidate = parsed;
68
- return {
69
- theme: isThemeName(candidate.theme) ? candidate.theme : undefined,
70
- mode: isThemeMode(candidate.mode) ? candidate.mode : undefined,
71
- };
72
- }
73
- catch (_a) {
74
- return {};
75
- }
76
- }
77
- function getSystemMode() {
78
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
79
- return "light";
80
- }
81
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
82
- }
83
- function ThemeProvider({ children, defaultTheme = "default", defaultMode = "system", storageKey = "px-ui-theme", }) {
84
- const [theme, setThemeState] = React.useState(defaultTheme);
85
- const [mode, setModeState] = React.useState(defaultMode);
86
- const [systemMode, setSystemMode] = React.useState("light");
87
- // Hydrate from storage + initial system mode after mount (SSR-safe).
88
- React.useEffect(() => {
89
- const stored = readStorage(storageKey);
90
- if (stored.theme)
91
- setThemeState(stored.theme);
92
- if (stored.mode)
93
- setModeState(stored.mode);
94
- setSystemMode(getSystemMode());
95
- }, [storageKey]);
96
- // Subscribe to OS color-scheme changes.
97
- React.useEffect(() => {
98
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
99
- return undefined;
100
- }
101
- const mq = window.matchMedia("(prefers-color-scheme: dark)");
102
- const handler = (event) => {
103
- setSystemMode(event.matches ? "dark" : "light");
104
- };
105
- mq.addEventListener("change", handler);
106
- return () => mq.removeEventListener("change", handler);
107
- }, []);
108
- const resolvedMode = mode === "system" ? systemMode : mode;
109
- // Apply data-theme + .dark class to <html>.
110
- React.useEffect(() => {
111
- if (typeof document === "undefined")
112
- return;
113
- const root = document.documentElement;
114
- root.setAttribute("data-theme", theme);
115
- if (resolvedMode === "dark") {
116
- root.classList.add("dark");
117
- }
118
- else {
119
- root.classList.remove("dark");
120
- }
121
- }, [theme, resolvedMode]);
122
- // Persist selections.
123
- React.useEffect(() => {
124
- if (typeof window === "undefined")
125
- return;
126
- try {
127
- window.localStorage.setItem(storageKey, JSON.stringify({ theme, mode }));
128
- }
129
- catch (_a) {
130
- // Storage may be unavailable (private mode, quota). Ignore.
131
- }
132
- }, [theme, mode, storageKey]);
133
- const setTheme = React.useCallback((next) => {
134
- setThemeState(next);
135
- }, []);
136
- const setMode = React.useCallback((next) => {
137
- setModeState(next);
138
- }, []);
139
- const value = React.useMemo(() => ({ theme, setTheme, mode, setMode, resolvedMode }), [theme, setTheme, mode, setMode, resolvedMode]);
140
- return (React.createElement(ThemeContext.Provider, { value: value },
141
- React.createElement(TooltipPrimitive.Provider, { delayDuration: 200, skipDelayDuration: 300 }, children)));
142
- }
143
- function useTheme() {
144
- const ctx = React.useContext(ThemeContext);
145
- if (!ctx) {
146
- throw new Error("useTheme must be used within a ThemeProvider");
147
- }
148
- return ctx;
149
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Dark mode token overrides.
3
- *
4
- * Activated by adding `.dark` to the <html> element (handled by ThemeProvider).
5
- * Avoids pure black: surfaces sit on a desaturated blue-gray to feel premium
6
- * while staying inside WCAG AA contrast against `--color-foreground`.
7
- */
8
- .dark {
9
- --color-primary: 217 91% 60%;
10
- --color-primary-foreground: 222 47% 11%;
11
-
12
- --color-background: 222 47% 8%;
13
- --color-foreground: 210 40% 98%;
14
-
15
- --color-card: 222 47% 11%;
16
- --color-card-foreground: 210 40% 98%;
17
-
18
- --color-secondary: 217 33% 18%;
19
- --color-secondary-foreground: 210 40% 98%;
20
-
21
- --color-muted: 217 33% 17%;
22
- --color-muted-foreground: 215 20% 65%;
23
-
24
- --color-accent: 217 33% 20%;
25
- --color-accent-foreground: 210 40% 98%;
26
-
27
- --color-border: 217 33% 20%;
28
- --color-input: 217 33% 22%;
29
- --color-ring: 217 91% 60%;
30
-
31
- --color-destructive: 0 63% 50%;
32
- --color-destructive-foreground: 210 40% 98%;
33
-
34
- --color-success: 142 65% 45%;
35
- --color-success-foreground: 222 47% 11%;
36
-
37
- --color-warning: 38 92% 55%;
38
- --color-warning-foreground: 222 47% 11%;
39
-
40
- --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.4);
41
- --shadow-md:
42
- 0 4px 6px -1px hsl(0 0% 0% / 0.5),
43
- 0 2px 4px -2px hsl(0 0% 0% / 0.4);
44
- --shadow-lg:
45
- 0 10px 15px -3px hsl(0 0% 0% / 0.6),
46
- 0 4px 6px -4px hsl(0 0% 0% / 0.45);
47
- }
@@ -1,72 +0,0 @@
1
- /**
2
- * Base design tokens — light mode defaults.
3
- *
4
- * All color values are HSL channels without the hsl() wrapper so they can be
5
- * composed with Tailwind opacity modifiers (e.g. `bg-primary/50`).
6
- *
7
- * --color-primary: 221 83% 53%;
8
- * background-color: hsl(var(--color-primary) / 0.5);
9
- *
10
- * Consumers can override any of these variables on :root (or a scoped element)
11
- * to fully restyle the library.
12
- */
13
- :root {
14
- /* Brand */
15
- --color-primary: 221 83% 53%;
16
- --color-primary-foreground: 0 0% 100%;
17
-
18
- /* Surfaces */
19
- --color-background: 0 0% 100%;
20
- --color-foreground: 222 47% 11%;
21
-
22
- --color-card: 0 0% 100%;
23
- --color-card-foreground: 222 47% 11%;
24
-
25
- /* Secondary action surfaces */
26
- --color-secondary: 210 40% 96%;
27
- --color-secondary-foreground: 222 47% 11%;
28
-
29
- --color-muted: 210 40% 96%;
30
- --color-muted-foreground: 215 16% 47%;
31
-
32
- --color-accent: 210 40% 96%;
33
- --color-accent-foreground: 222 47% 11%;
34
-
35
- /* Lines / focus */
36
- --color-border: 214 32% 91%;
37
- --color-input: 214 32% 91%;
38
- --color-ring: 221 83% 53%;
39
-
40
- /* Status */
41
- --color-destructive: 0 84% 60%;
42
- --color-destructive-foreground: 0 0% 100%;
43
-
44
- --color-success: 142 71% 45%;
45
- --color-success-foreground: 0 0% 100%;
46
-
47
- --color-warning: 38 92% 50%;
48
- --color-warning-foreground: 222 47% 11%;
49
-
50
- /* Radius */
51
- --radius: 0.5rem;
52
-
53
- /* Elevation */
54
- --shadow-sm: 0 1px 2px 0 hsl(222 47% 11% / 0.05);
55
- --shadow-md:
56
- 0 4px 6px -1px hsl(222 47% 11% / 0.08),
57
- 0 2px 4px -2px hsl(222 47% 11% / 0.06);
58
- --shadow-lg:
59
- 0 10px 15px -3px hsl(222 47% 11% / 0.1),
60
- 0 4px 6px -4px hsl(222 47% 11% / 0.06);
61
- }
62
-
63
- @media (prefers-reduced-motion: reduce) {
64
- *,
65
- *::before,
66
- *::after {
67
- animation-duration: 0.01ms !important;
68
- animation-iteration-count: 1 !important;
69
- transition-duration: 0.01ms !important;
70
- scroll-behavior: auto !important;
71
- }
72
- }