pixelize-design-library 2.2.192 → 3.0.1-beta.1

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 (216) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/MIGRATION.md +562 -0
  3. package/coverage/clover.xml +638 -0
  4. package/coverage/coverage-final.json +20 -0
  5. package/coverage/lcov-report/Table/CompactSelect.tsx.html +379 -0
  6. package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +514 -0
  7. package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +373 -0
  8. package/coverage/lcov-report/Table/Components/Pagination.tsx.html +574 -0
  9. package/coverage/lcov-report/Table/Components/TableActions.tsx.html +574 -0
  10. package/coverage/lcov-report/Table/Components/TableBody.tsx.html +1027 -0
  11. package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +397 -0
  12. package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +1060 -0
  13. package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +361 -0
  14. package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +337 -0
  15. package/coverage/lcov-report/Table/Components/index.html +266 -0
  16. package/coverage/lcov-report/Table/Components/useDebounce.ts.html +178 -0
  17. package/coverage/lcov-report/Table/Components/useTable.ts.html +778 -0
  18. package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +1810 -0
  19. package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +178 -0
  20. package/coverage/lcov-report/Table/Table.tsx.html +1567 -0
  21. package/coverage/lcov-report/Table/TableProps.tsx.html +658 -0
  22. package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +619 -0
  23. package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +229 -0
  24. package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +532 -0
  25. package/coverage/lcov-report/Table/TableSettings/index.html +146 -0
  26. package/coverage/lcov-report/Table/TableToDo.tsx.html +973 -0
  27. package/coverage/lcov-report/Table/TextOperationControls.tsx.html +271 -0
  28. package/coverage/lcov-report/Table/filterTypes.ts.html +97 -0
  29. package/coverage/lcov-report/Table/index.html +176 -0
  30. package/coverage/lcov-report/base.css +224 -0
  31. package/coverage/lcov-report/block-navigation.js +87 -0
  32. package/coverage/lcov-report/favicon.png +0 -0
  33. package/coverage/lcov-report/index.html +146 -0
  34. package/coverage/lcov-report/prettify.css +1 -0
  35. package/coverage/lcov-report/prettify.js +2 -0
  36. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  37. package/coverage/lcov-report/sorter.js +210 -0
  38. package/coverage/lcov.info +1836 -0
  39. package/dist/Assets/defaultLogo.tsx +31 -0
  40. package/dist/Components/Table/Components/ActiveFilters.js +3 -3
  41. package/dist/Theme/Dark/palette.d.ts +370 -0
  42. package/dist/Theme/Dark/palette.js +372 -0
  43. package/dist/components-v2/AlertDialog/AlertDialog.d.ts +23 -0
  44. package/dist/components-v2/AlertDialog/AlertDialog.js +98 -0
  45. package/dist/components-v2/Breadcrumbs/Breadcrumbs.d.ts +14 -0
  46. package/dist/components-v2/Breadcrumbs/Breadcrumbs.js +66 -0
  47. package/dist/components-v2/Charts/AreaChart.d.ts +23 -0
  48. package/dist/components-v2/Charts/AreaChart.js +63 -0
  49. package/dist/components-v2/Charts/BarChart.d.ts +25 -0
  50. package/dist/components-v2/Charts/BarChart.js +57 -0
  51. package/dist/components-v2/Charts/LineChart.d.ts +23 -0
  52. package/dist/components-v2/Charts/LineChart.js +55 -0
  53. package/dist/components-v2/Charts/PieChart.d.ts +15 -0
  54. package/dist/components-v2/Charts/PieChart.js +54 -0
  55. package/dist/components-v2/Charts/PolarChart.d.ts +14 -0
  56. package/dist/components-v2/Charts/PolarChart.js +54 -0
  57. package/dist/components-v2/Charts/chartOptions.d.ts +7 -0
  58. package/dist/components-v2/Charts/chartOptions.js +41 -0
  59. package/dist/components-v2/Charts/useChartTheme.d.ts +22 -0
  60. package/dist/components-v2/Charts/useChartTheme.js +106 -0
  61. package/dist/components-v2/ContactForm/ContactForm.d.ts +25 -0
  62. package/dist/components-v2/ContactForm/ContactForm.js +116 -0
  63. package/dist/components-v2/DatePicker/Calendar.d.ts +19 -0
  64. package/dist/components-v2/DatePicker/Calendar.js +212 -0
  65. package/dist/components-v2/DatePicker/DatePicker.d.ts +46 -0
  66. package/dist/components-v2/DatePicker/DatePicker.js +189 -0
  67. package/dist/components-v2/DatePicker/TimePicker.d.ts +12 -0
  68. package/dist/components-v2/DatePicker/TimePicker.js +105 -0
  69. package/dist/components-v2/DatePicker/utils.d.ts +31 -0
  70. package/dist/components-v2/DatePicker/utils.js +109 -0
  71. package/dist/components-v2/Drawer/Drawer.d.ts +27 -0
  72. package/dist/components-v2/Drawer/Drawer.js +132 -0
  73. package/dist/components-v2/FeedbackForm/FeedbackForm.d.ts +26 -0
  74. package/dist/components-v2/FeedbackForm/FeedbackForm.js +112 -0
  75. package/dist/components-v2/FileUploader/FileUploader.d.ts +28 -0
  76. package/dist/components-v2/FileUploader/FileUploader.js +127 -0
  77. package/dist/components-v2/Input/TextInput.d.ts +41 -0
  78. package/dist/components-v2/Input/TextInput.js +169 -0
  79. package/dist/components-v2/KanbanBoard/KanbanBoard.d.ts +39 -0
  80. package/dist/components-v2/KanbanBoard/KanbanBoard.js +101 -0
  81. package/dist/components-v2/Layout/AppLayout.d.ts +22 -0
  82. package/dist/components-v2/Layout/AppLayout.js +53 -0
  83. package/dist/components-v2/Loading/Loading.d.ts +19 -0
  84. package/dist/components-v2/Loading/Loading.js +55 -0
  85. package/dist/components-v2/Modal/Modal.d.ts +30 -0
  86. package/dist/components-v2/Modal/Modal.js +82 -0
  87. package/dist/components-v2/NavigationBar/NavigationBar.d.ts +47 -0
  88. package/dist/components-v2/NavigationBar/NavigationBar.js +148 -0
  89. package/dist/components-v2/Notification/Notification.d.ts +22 -0
  90. package/dist/components-v2/Notification/Notification.js +113 -0
  91. package/dist/components-v2/NumberInput/NumberInput.d.ts +37 -0
  92. package/dist/components-v2/NumberInput/NumberInput.js +210 -0
  93. package/dist/components-v2/PinInput/PinInput.d.ts +26 -0
  94. package/dist/components-v2/PinInput/PinInput.js +138 -0
  95. package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +18 -0
  96. package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.js +91 -0
  97. package/dist/components-v2/Select/Select.d.ts +41 -0
  98. package/dist/components-v2/Select/Select.js +284 -0
  99. package/dist/components-v2/Sidebar/Sidebar.d.ts +41 -0
  100. package/dist/components-v2/Sidebar/Sidebar.js +182 -0
  101. package/dist/components-v2/Slider/Slider.d.ts +18 -0
  102. package/dist/components-v2/Slider/Slider.js +101 -0
  103. package/dist/components-v2/Table/Table.d.ts +7 -0
  104. package/dist/components-v2/Table/Table.js +172 -0
  105. package/dist/components-v2/Table/TableProps.d.ts +139 -0
  106. package/dist/components-v2/Table/TableProps.js +9 -0
  107. package/dist/components-v2/Table/components/ActiveFilters.d.ts +10 -0
  108. package/dist/components-v2/Table/components/ActiveFilters.js +70 -0
  109. package/dist/components-v2/Table/components/BulkActionBar.d.ts +11 -0
  110. package/dist/components-v2/Table/components/BulkActionBar.js +92 -0
  111. package/dist/components-v2/Table/components/ColumnResizeHandle.d.ts +7 -0
  112. package/dist/components-v2/Table/components/ColumnResizeHandle.js +41 -0
  113. package/dist/components-v2/Table/components/Pagination.d.ts +11 -0
  114. package/dist/components-v2/Table/components/Pagination.js +92 -0
  115. package/dist/components-v2/Table/components/TableBody.d.ts +23 -0
  116. package/dist/components-v2/Table/components/TableBody.js +69 -0
  117. package/dist/components-v2/Table/components/TableCell.d.ts +14 -0
  118. package/dist/components-v2/Table/components/TableCell.js +63 -0
  119. package/dist/components-v2/Table/components/TableEmptyState.d.ts +12 -0
  120. package/dist/components-v2/Table/components/TableEmptyState.js +55 -0
  121. package/dist/components-v2/Table/components/TableErrorState.d.ts +6 -0
  122. package/dist/components-v2/Table/components/TableErrorState.js +52 -0
  123. package/dist/components-v2/Table/components/TableHeader.d.ts +21 -0
  124. package/dist/components-v2/Table/components/TableHeader.js +94 -0
  125. package/dist/components-v2/Table/components/TableRow.d.ts +20 -0
  126. package/dist/components-v2/Table/components/TableRow.js +64 -0
  127. package/dist/components-v2/Table/components/TableSearch.d.ts +8 -0
  128. package/dist/components-v2/Table/components/TableSearch.js +47 -0
  129. package/dist/components-v2/Table/filters/FilterChips.d.ts +6 -0
  130. package/dist/components-v2/Table/filters/FilterChips.js +9 -0
  131. package/dist/components-v2/Table/filters/LeftFilterPane.d.ts +17 -0
  132. package/dist/components-v2/Table/filters/LeftFilterPane.js +105 -0
  133. package/dist/components-v2/Table/filters/TableFilters.d.ts +12 -0
  134. package/dist/components-v2/Table/filters/TableFilters.js +127 -0
  135. package/dist/components-v2/Table/hooks/useColumnResize.d.ts +15 -0
  136. package/dist/components-v2/Table/hooks/useColumnResize.js +104 -0
  137. package/dist/components-v2/Table/hooks/useTable.d.ts +58 -0
  138. package/dist/components-v2/Table/hooks/useTable.js +254 -0
  139. package/dist/components-v2/Table/hooks/useTableKeyboard.d.ts +25 -0
  140. package/dist/components-v2/Table/hooks/useTableKeyboard.js +112 -0
  141. package/dist/components-v2/Table/hooks/useVirtualScroll.d.ts +29 -0
  142. package/dist/components-v2/Table/hooks/useVirtualScroll.js +83 -0
  143. package/dist/components-v2/Table/settings/ManageColumns.d.ts +12 -0
  144. package/dist/components-v2/Table/settings/ManageColumns.js +59 -0
  145. package/dist/components-v2/Table/settings/TableSettings.d.ts +12 -0
  146. package/dist/components-v2/Table/settings/TableSettings.js +57 -0
  147. package/dist/components-v2/Table/utils/filterUtils.d.ts +7 -0
  148. package/dist/components-v2/Table/utils/filterUtils.js +149 -0
  149. package/dist/components-v2/Table/utils/sortUtils.d.ts +6 -0
  150. package/dist/components-v2/Table/utils/sortUtils.js +65 -0
  151. package/dist/components-v2/Tag/Tag.d.ts +15 -0
  152. package/dist/components-v2/Tag/Tag.js +87 -0
  153. package/dist/components-v2/Timeline/Timeline.d.ts +18 -0
  154. package/dist/components-v2/Timeline/Timeline.js +76 -0
  155. package/dist/components-v2/Toaster/Toaster.d.ts +61 -0
  156. package/dist/components-v2/Toaster/Toaster.js +63 -0
  157. package/dist/components-v2/Toggle/Toggle.d.ts +28 -0
  158. package/dist/components-v2/Toggle/Toggle.js +90 -0
  159. package/dist/components-v2/ui/accordion.d.ts +12 -0
  160. package/dist/components-v2/ui/accordion.js +104 -0
  161. package/dist/components-v2/ui/alert.d.ts +18 -0
  162. package/dist/components-v2/ui/alert.js +99 -0
  163. package/dist/components-v2/ui/avatar.d.ts +12 -0
  164. package/dist/components-v2/ui/avatar.js +80 -0
  165. package/dist/components-v2/ui/badge.d.ts +10 -0
  166. package/dist/components-v2/ui/badge.js +76 -0
  167. package/dist/components-v2/ui/button.d.ts +18 -0
  168. package/dist/components-v2/ui/button.js +97 -0
  169. package/dist/components-v2/ui/checkbox.d.ts +15 -0
  170. package/dist/components-v2/ui/checkbox.js +86 -0
  171. package/dist/components-v2/ui/dialog.d.ts +30 -0
  172. package/dist/components-v2/ui/dialog.js +115 -0
  173. package/dist/components-v2/ui/dropdown-menu.d.ts +26 -0
  174. package/dist/components-v2/ui/dropdown-menu.js +121 -0
  175. package/dist/components-v2/ui/field.d.ts +32 -0
  176. package/dist/components-v2/ui/field.js +62 -0
  177. package/dist/components-v2/ui/form-field.d.ts +25 -0
  178. package/dist/components-v2/ui/form-field.js +96 -0
  179. package/dist/components-v2/ui/input.d.ts +9 -0
  180. package/dist/components-v2/ui/input.js +73 -0
  181. package/dist/components-v2/ui/label.d.ts +10 -0
  182. package/dist/components-v2/ui/label.js +70 -0
  183. package/dist/components-v2/ui/popover.d.ts +9 -0
  184. package/dist/components-v2/ui/popover.js +60 -0
  185. package/dist/components-v2/ui/progress.d.ts +12 -0
  186. package/dist/components-v2/ui/progress.js +75 -0
  187. package/dist/components-v2/ui/radio-group.d.ts +17 -0
  188. package/dist/components-v2/ui/radio-group.js +91 -0
  189. package/dist/components-v2/ui/select.d.ts +24 -0
  190. package/dist/components-v2/ui/select.js +122 -0
  191. package/dist/components-v2/ui/separator.d.ts +5 -0
  192. package/dist/components-v2/ui/separator.js +55 -0
  193. package/dist/components-v2/ui/skeleton.d.ts +9 -0
  194. package/dist/components-v2/ui/skeleton.js +68 -0
  195. package/dist/components-v2/ui/spinner.d.ts +16 -0
  196. package/dist/components-v2/ui/spinner.js +64 -0
  197. package/dist/components-v2/ui/switch.d.ts +10 -0
  198. package/dist/components-v2/ui/switch.js +81 -0
  199. package/dist/components-v2/ui/tabs.d.ts +13 -0
  200. package/dist/components-v2/ui/tabs.js +95 -0
  201. package/dist/components-v2/ui/textarea.d.ts +10 -0
  202. package/dist/components-v2/ui/textarea.js +96 -0
  203. package/dist/components-v2/ui/tooltip.d.ts +17 -0
  204. package/dist/components-v2/ui/tooltip.js +75 -0
  205. package/dist/index.d.ts +128 -64
  206. package/dist/index.js +246 -173
  207. package/dist/lib/utils.d.ts +2 -0
  208. package/dist/lib/utils.js +8 -0
  209. package/dist/theme-v2/ThemeProvider.d.ts +19 -0
  210. package/dist/theme-v2/ThemeProvider.js +149 -0
  211. package/dist/theme-v2/dark.css +47 -0
  212. package/dist/theme-v2/tokens.css +72 -0
  213. package/package.json +41 -20
  214. package/tailwind.config.ts +91 -0
  215. package/vite.config.ts +49 -10
  216. package/index.html +0 -13
@@ -0,0 +1,149 @@
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
+ }
@@ -0,0 +1,47 @@
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
+ }
@@ -0,0 +1,72 @@
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.2.192",
3
+ "version": "3.0.1-beta.1",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -8,20 +8,41 @@
8
8
  "dependencies": {
9
9
  "@fontsource-variable/inter": "^5.2.8",
10
10
  "@hello-pangea/dnd": "^18.0.1",
11
- "jodit-react": "^5.2.38",
11
+ "@radix-ui/react-accordion": "^1.2.2",
12
+ "@radix-ui/react-alert-dialog": "^1.1.4",
13
+ "@radix-ui/react-avatar": "^1.1.2",
14
+ "@radix-ui/react-checkbox": "^1.1.3",
15
+ "@radix-ui/react-dialog": "^1.1.4",
16
+ "@radix-ui/react-dropdown-menu": "^2.1.4",
17
+ "@radix-ui/react-label": "^2.1.1",
18
+ "@radix-ui/react-popover": "^1.1.4",
19
+ "@radix-ui/react-progress": "^1.1.1",
20
+ "@radix-ui/react-radio-group": "^1.2.2",
21
+ "@radix-ui/react-select": "^2.1.4",
22
+ "@radix-ui/react-separator": "^1.1.1",
23
+ "@radix-ui/react-slider": "^1.2.2",
24
+ "@radix-ui/react-slot": "^1.1.2",
25
+ "@radix-ui/react-switch": "^1.1.2",
26
+ "@radix-ui/react-tabs": "^1.1.2",
27
+ "@radix-ui/react-tooltip": "^1.1.6",
28
+ "class-variance-authority": "^0.7.1",
29
+ "clsx": "^2.1.1",
30
+ "cmdk": "^1.0.4",
31
+ "date-fns": "^3.6.0",
12
32
  "lucide-react": "^0.487.0",
13
33
  "react-apexcharts": "^1.4.1",
14
- "react-datepicker": "^7.3.0",
15
34
  "react-dropzone": "^14.3.8",
16
- "react-window": "^1.8.11"
35
+ "sonner": "^1.7.2",
36
+ "tailwind-merge": "^2.5.4"
17
37
  },
18
38
  "scripts": {
19
- "start": "vite",
20
- "build": "tsc && copyfiles -u 1 src/**/*.css src/assets/**/* dist/",
39
+ "start": "storybook dev -p 6006",
40
+ "build": "tsc && copyfiles -u 1 src/**/*.css dist/",
21
41
  "test": "jest",
22
42
  "test:watch": "jest --watch",
23
- "remove": "rm -rf dist/Pages dist/App.js dist/App.d.ts dist/Layout.js dist/Layout.d.ts dist/bootstrap.js dist/bootstrap.d.ts",
24
- "package": "npm version patch && npm run build && npm run remove && npm publish"
43
+ "package": "npm version patch && npm run build && npm publish",
44
+ "storybook": "storybook dev -p 6006",
45
+ "build-storybook": "storybook build"
25
46
  },
26
47
  "jest": {
27
48
  "testEnvironment": "jsdom",
@@ -69,19 +90,21 @@
69
90
  "@babel/preset-env": "^7.24.5",
70
91
  "@babel/preset-react": "^7.24.5",
71
92
  "@babel/preset-typescript": "^7.24.5",
72
- "@chakra-ui/react": "^2.8.2",
73
- "@emotion/react": "^11.11.4",
74
- "@emotion/styled": "^11.11.5",
93
+ "@storybook/addon-a11y": "^8.4.7",
94
+ "@storybook/addon-essentials": "^8.4.7",
95
+ "@storybook/addon-interactions": "^8.4.7",
96
+ "@storybook/blocks": "^8.4.7",
97
+ "@storybook/react": "^8.4.7",
98
+ "@storybook/react-vite": "^8.4.7",
99
+ "@storybook/test": "^8.4.7",
100
+ "@tailwindcss/typography": "^0.5.15",
75
101
  "@testing-library/jest-dom": "^5.17.0",
76
102
  "@testing-library/react": "^13.4.0",
77
103
  "@testing-library/user-event": "^13.5.0",
78
104
  "@types/jest": "^27.5.2",
79
- "@types/leaflet": "^1.9.21",
80
- "@types/leaflet-routing-machine": "^3.2.9",
81
105
  "@types/node": "^20.0.0",
82
106
  "@types/react": "^18.3.2",
83
107
  "@types/react-dom": "^18.3.0",
84
- "@types/react-window": "^1.8.8",
85
108
  "@vitejs/plugin-react": "^4.4.1",
86
109
  "autoprefixer": "^10.4.21",
87
110
  "babel-jest": "^29.7.0",
@@ -89,21 +112,19 @@
89
112
  "framer-motion": "^10.18.0",
90
113
  "jest": "^29.7.0",
91
114
  "jest-environment-jsdom": "^29.7.0",
92
- "path": "^0.12.7",
93
115
  "postcss": "^8.5.4",
94
116
  "prettier": "^3.3.2",
95
- "prop-types": "^15.8.1",
96
117
  "react": "^18.3.1",
97
118
  "react-dom": "^18.3.1",
119
+ "storybook": "^8.4.7",
98
120
  "tailwindcss": "^3.4.17",
121
+ "tailwindcss-animate": "^1.0.7",
99
122
  "typescript": "^5.9.3",
100
- "vite": "^6.2.0",
101
- "webpack": "^5.91.0"
123
+ "vite": "^6.2.0"
102
124
  },
103
125
  "peerDependencies": {
104
- "@chakra-ui/react": "^2.8.2",
105
126
  "framer-motion": "^10.18.0",
106
127
  "react": "^18.3.1",
107
128
  "react-dom": "^18.3.1"
108
129
  }
109
- }
130
+ }
@@ -0,0 +1,91 @@
1
+ import type { Config } from "tailwindcss";
2
+
3
+ const config: Config = {
4
+ darkMode: "class",
5
+ content: ["./src/**/*.{ts,tsx}", "./.storybook/**/*.{ts,tsx}"],
6
+ theme: {
7
+ extend: {
8
+ colors: {
9
+ primary: {
10
+ DEFAULT: "hsl(var(--color-primary) / <alpha-value>)",
11
+ foreground:
12
+ "hsl(var(--color-primary-foreground) / <alpha-value>)",
13
+ },
14
+ secondary: {
15
+ DEFAULT: "hsl(var(--color-secondary) / <alpha-value>)",
16
+ foreground:
17
+ "hsl(var(--color-secondary-foreground) / <alpha-value>)",
18
+ },
19
+ background: "hsl(var(--color-background) / <alpha-value>)",
20
+ foreground: "hsl(var(--color-foreground) / <alpha-value>)",
21
+ card: {
22
+ DEFAULT: "hsl(var(--color-card) / <alpha-value>)",
23
+ foreground:
24
+ "hsl(var(--color-card-foreground) / <alpha-value>)",
25
+ },
26
+ muted: {
27
+ DEFAULT: "hsl(var(--color-muted) / <alpha-value>)",
28
+ foreground:
29
+ "hsl(var(--color-muted-foreground) / <alpha-value>)",
30
+ },
31
+ accent: {
32
+ DEFAULT: "hsl(var(--color-accent) / <alpha-value>)",
33
+ foreground:
34
+ "hsl(var(--color-accent-foreground) / <alpha-value>)",
35
+ },
36
+ destructive: {
37
+ DEFAULT: "hsl(var(--color-destructive) / <alpha-value>)",
38
+ foreground:
39
+ "hsl(var(--color-destructive-foreground) / <alpha-value>)",
40
+ },
41
+ success: {
42
+ DEFAULT: "hsl(var(--color-success) / <alpha-value>)",
43
+ foreground:
44
+ "hsl(var(--color-success-foreground) / <alpha-value>)",
45
+ },
46
+ warning: {
47
+ DEFAULT: "hsl(var(--color-warning) / <alpha-value>)",
48
+ foreground:
49
+ "hsl(var(--color-warning-foreground) / <alpha-value>)",
50
+ },
51
+ border: "hsl(var(--color-border) / <alpha-value>)",
52
+ input: "hsl(var(--color-input) / <alpha-value>)",
53
+ ring: "hsl(var(--color-ring) / <alpha-value>)",
54
+ },
55
+ borderRadius: {
56
+ lg: "var(--radius)",
57
+ md: "calc(var(--radius) - 2px)",
58
+ sm: "calc(var(--radius) - 4px)",
59
+ },
60
+ boxShadow: {
61
+ sm: "var(--shadow-sm)",
62
+ md: "var(--shadow-md)",
63
+ lg: "var(--shadow-lg)",
64
+ },
65
+ keyframes: {
66
+ "accordion-down": {
67
+ from: { height: "0" },
68
+ to: { height: "var(--radix-accordion-content-height)" },
69
+ },
70
+ "accordion-up": {
71
+ from: { height: "var(--radix-accordion-content-height)" },
72
+ to: { height: "0" },
73
+ },
74
+ shimmer: {
75
+ "100%": { transform: "translateX(100%)" },
76
+ },
77
+ },
78
+ animation: {
79
+ "accordion-down": "accordion-down 0.2s ease-out",
80
+ "accordion-up": "accordion-up 0.2s ease-out",
81
+ shimmer: "shimmer 1.5s infinite",
82
+ },
83
+ },
84
+ },
85
+ plugins: [
86
+ require("@tailwindcss/typography"),
87
+ require("tailwindcss-animate"),
88
+ ],
89
+ };
90
+
91
+ export default config;
package/vite.config.ts CHANGED
@@ -1,13 +1,52 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- import path from 'path'
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import path from "path";
4
4
 
5
5
  export default defineConfig({
6
- plugins: [react()],
7
- resolve: {
8
- alias: {
9
- src: path.resolve(__dirname, './src'),
6
+ plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ src: path.resolve(__dirname, "./src"),
10
+ },
10
11
  },
11
- },
12
- publicDir: 'public',
13
- })
12
+ publicDir: "public",
13
+ css: {
14
+ postcss: "./postcss.config.js",
15
+ },
16
+ build: {
17
+ cssCodeSplit: false,
18
+ lib: {
19
+ entry: path.resolve(__dirname, "src/index.ts"),
20
+ formats: ["es", "cjs"],
21
+ fileName: (format) => `index.${format === "es" ? "js" : "cjs"}`,
22
+ },
23
+ rollupOptions: {
24
+ external: [
25
+ "react",
26
+ "react-dom",
27
+ "react/jsx-runtime",
28
+ "framer-motion",
29
+ "lucide-react",
30
+ "react-apexcharts",
31
+ "@hello-pangea/dnd",
32
+ "date-fns",
33
+ "@radix-ui/react-slot",
34
+ "class-variance-authority",
35
+ "clsx",
36
+ "tailwind-merge",
37
+ ],
38
+ output: {
39
+ globals: {
40
+ react: "React",
41
+ "react-dom": "ReactDOM",
42
+ },
43
+ assetFileNames: (info) => {
44
+ if (info.name && info.name.endsWith(".css")) {
45
+ return "index.css";
46
+ }
47
+ return "assets/[name][extname]";
48
+ },
49
+ },
50
+ },
51
+ },
52
+ });
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>Pixelize Design System</title>
7
- </head>
8
- <body>
9
- <noscript>You need to enable JavaScript to run this app.</noscript>
10
- <div id="root"></div>
11
- <script type="module" src="/src/bootstrap.tsx"></script>
12
- </body>
13
- </html>