@dmsi/wedgekit-react 0.0.2

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 (263) hide show
  1. package/README.md +35 -0
  2. package/dist/chunk-27KIIUAR.js +59 -0
  3. package/dist/chunk-2G2E2JMA.js +123 -0
  4. package/dist/chunk-4C66DLIJ.js +51 -0
  5. package/dist/chunk-4RD5ZF2V.js +55 -0
  6. package/dist/chunk-4RJKB7LC.js +14 -0
  7. package/dist/chunk-4T7F5BZZ.js +26 -0
  8. package/dist/chunk-5GOBP2JS.js +53 -0
  9. package/dist/chunk-6ZY524ID.js +42 -0
  10. package/dist/chunk-AWQSSKCK.js +32 -0
  11. package/dist/chunk-BNHSAFMP.js +93 -0
  12. package/dist/chunk-BWRHL2AG.js +439 -0
  13. package/dist/chunk-DKKYR6DS.js +132 -0
  14. package/dist/chunk-E5ALT5W7.js +182 -0
  15. package/dist/chunk-FY7PTP6E.js +322 -0
  16. package/dist/chunk-GTCSRHPF.js +119 -0
  17. package/dist/chunk-I2UVVKQI.js +12 -0
  18. package/dist/chunk-IGQVA7SC.js +41 -0
  19. package/dist/chunk-K3IKUSZW.js +59 -0
  20. package/dist/chunk-KENSVWOY.js +151 -0
  21. package/dist/chunk-KX3O6GJ6.js +138 -0
  22. package/dist/chunk-L4UM372R.js +253 -0
  23. package/dist/chunk-ORMEWXMH.js +37 -0
  24. package/dist/chunk-Q3FKEKIN.js +23 -0
  25. package/dist/chunk-SEKKGFM6.js +28 -0
  26. package/dist/chunk-SY3HT54E.js +91 -0
  27. package/dist/chunk-TAW5ZZ4Z.js +346 -0
  28. package/dist/chunk-TRUPPHBQ.js +109 -0
  29. package/dist/chunk-TU55CHXU.js +30 -0
  30. package/dist/chunk-TWZZB4WO.js +114 -0
  31. package/dist/chunk-TYI74BSP.js +62 -0
  32. package/dist/chunk-U42SKNR6.js +104 -0
  33. package/dist/chunk-UU3FA6LV.js +72 -0
  34. package/dist/chunk-WVUIIBRR.js +51 -0
  35. package/dist/chunk-XUIPGYP5.js +39 -0
  36. package/dist/chunk-Z4UCFUF7.js +299 -0
  37. package/dist/components/Breadcrumbs.cjs +376 -0
  38. package/dist/components/Breadcrumbs.js +90 -0
  39. package/dist/components/Button.cjs +319 -0
  40. package/dist/components/Button.js +8 -0
  41. package/dist/components/CalendarRange.cjs +520 -0
  42. package/dist/components/CalendarRange.js +13 -0
  43. package/dist/components/Caption.cjs +283 -0
  44. package/dist/components/Caption.js +80 -0
  45. package/dist/components/Checkbox.cjs +378 -0
  46. package/dist/components/Checkbox.js +11 -0
  47. package/dist/components/ContentTab.cjs +382 -0
  48. package/dist/components/ContentTab.js +10 -0
  49. package/dist/components/ContentTabs.cjs +472 -0
  50. package/dist/components/ContentTabs.js +98 -0
  51. package/dist/components/DMSiLogo.cjs +79 -0
  52. package/dist/components/DMSiLogo.js +56 -0
  53. package/dist/components/DataGrid.cjs +3113 -0
  54. package/dist/components/DataGrid.js +758 -0
  55. package/dist/components/DataGridCell.cjs +1907 -0
  56. package/dist/components/DataGridCell.js +24 -0
  57. package/dist/components/DataTable.cjs +791 -0
  58. package/dist/components/DataTable.js +720 -0
  59. package/dist/components/DateInput.cjs +1130 -0
  60. package/dist/components/DateInput.js +170 -0
  61. package/dist/components/DateRangeInput.cjs +1131 -0
  62. package/dist/components/DateRangeInput.js +171 -0
  63. package/dist/components/DebugJson.cjs +50 -0
  64. package/dist/components/DebugJson.js +27 -0
  65. package/dist/components/Display.cjs +234 -0
  66. package/dist/components/Display.js +12 -0
  67. package/dist/components/EditingContext.cjs +73 -0
  68. package/dist/components/EditingContext.js +35 -0
  69. package/dist/components/FilterGroup.cjs +1431 -0
  70. package/dist/components/FilterGroup.js +231 -0
  71. package/dist/components/FullViewportBox.cjs +35 -0
  72. package/dist/components/FullViewportBox.js +12 -0
  73. package/dist/components/Grid.cjs +69 -0
  74. package/dist/components/Grid.js +36 -0
  75. package/dist/components/GridContainer.cjs +125 -0
  76. package/dist/components/GridContainer.js +92 -0
  77. package/dist/components/Heading.cjs +238 -0
  78. package/dist/components/Heading.js +14 -0
  79. package/dist/components/HorizontalDivider.cjs +33 -0
  80. package/dist/components/HorizontalDivider.js +10 -0
  81. package/dist/components/Icon.cjs +98 -0
  82. package/dist/components/Icon.js +7 -0
  83. package/dist/components/Input.cjs +672 -0
  84. package/dist/components/Input.js +21 -0
  85. package/dist/components/InputGroup.cjs +270 -0
  86. package/dist/components/InputGroup.js +60 -0
  87. package/dist/components/Label.cjs +223 -0
  88. package/dist/components/Label.js +8 -0
  89. package/dist/components/Link.cjs +262 -0
  90. package/dist/components/Link.js +8 -0
  91. package/dist/components/List.cjs +37 -0
  92. package/dist/components/List.js +14 -0
  93. package/dist/components/LiveChatComponent.cjs +63 -0
  94. package/dist/components/LiveChatComponent.js +40 -0
  95. package/dist/components/LogoAgilityTopBar.cjs +115 -0
  96. package/dist/components/LogoAgilityTopBar.js +92 -0
  97. package/dist/components/LogoDMSiTopBar.cjs +79 -0
  98. package/dist/components/LogoDMSiTopBar.js +7 -0
  99. package/dist/components/LogoMillworkTopBar.cjs +221 -0
  100. package/dist/components/LogoMillworkTopBar.js +198 -0
  101. package/dist/components/MainBar.cjs +211 -0
  102. package/dist/components/MainBar.js +65 -0
  103. package/dist/components/Menu.cjs +437 -0
  104. package/dist/components/Menu.js +11 -0
  105. package/dist/components/MenuOption.cjs +483 -0
  106. package/dist/components/MenuOption.js +13 -0
  107. package/dist/components/MobileDataGrid.cjs +658 -0
  108. package/dist/components/MobileDataGrid.js +125 -0
  109. package/dist/components/Modal.cjs +783 -0
  110. package/dist/components/Modal.js +245 -0
  111. package/dist/components/ModalButtons.cjs +385 -0
  112. package/dist/components/ModalButtons.js +10 -0
  113. package/dist/components/ModalContent.cjs +57 -0
  114. package/dist/components/ModalContent.js +7 -0
  115. package/dist/components/ModalHeader.cjs +426 -0
  116. package/dist/components/ModalHeader.js +11 -0
  117. package/dist/components/ModalScrim.cjs +64 -0
  118. package/dist/components/ModalScrim.js +7 -0
  119. package/dist/components/NavigationTab.cjs +431 -0
  120. package/dist/components/NavigationTab.js +10 -0
  121. package/dist/components/NavigationTabs.cjs +477 -0
  122. package/dist/components/NavigationTabs.js +56 -0
  123. package/dist/components/Notification.cjs +640 -0
  124. package/dist/components/Notification.js +117 -0
  125. package/dist/components/OptionPill.cjs +478 -0
  126. package/dist/components/OptionPill.js +11 -0
  127. package/dist/components/Paragraph.cjs +231 -0
  128. package/dist/components/Paragraph.js +8 -0
  129. package/dist/components/Password.cjs +700 -0
  130. package/dist/components/Password.js +53 -0
  131. package/dist/components/ProjectBar.cjs +242 -0
  132. package/dist/components/ProjectBar.js +63 -0
  133. package/dist/components/Radio.cjs +349 -0
  134. package/dist/components/Radio.js +131 -0
  135. package/dist/components/Search.cjs +767 -0
  136. package/dist/components/Search.js +12 -0
  137. package/dist/components/Select.cjs +758 -0
  138. package/dist/components/Select.js +12 -0
  139. package/dist/components/SideMenu.cjs +54 -0
  140. package/dist/components/SideMenu.js +21 -0
  141. package/dist/components/SideMenuGroup.cjs +422 -0
  142. package/dist/components/SideMenuGroup.js +83 -0
  143. package/dist/components/SideMenuItem.cjs +388 -0
  144. package/dist/components/SideMenuItem.js +70 -0
  145. package/dist/components/Stack.cjs +138 -0
  146. package/dist/components/Stack.js +7 -0
  147. package/dist/components/StatusPill.cjs +265 -0
  148. package/dist/components/StatusPill.js +52 -0
  149. package/dist/components/Stepper.cjs +885 -0
  150. package/dist/components/Stepper.js +105 -0
  151. package/dist/components/Subheader.cjs +226 -0
  152. package/dist/components/Subheader.js +8 -0
  153. package/dist/components/Surface.cjs +98 -0
  154. package/dist/components/Surface.js +40 -0
  155. package/dist/components/Swatch.cjs +1728 -0
  156. package/dist/components/Swatch.js +1319 -0
  157. package/dist/components/Textarea.cjs +269 -0
  158. package/dist/components/Textarea.js +96 -0
  159. package/dist/components/Theme.cjs +36 -0
  160. package/dist/components/Theme.js +7 -0
  161. package/dist/components/Time.cjs +1118 -0
  162. package/dist/components/Time.js +353 -0
  163. package/dist/components/Toast.cjs +644 -0
  164. package/dist/components/Toast.js +218 -0
  165. package/dist/components/Tooltip.cjs +273 -0
  166. package/dist/components/Tooltip.js +9 -0
  167. package/dist/components/TopBar.cjs +352 -0
  168. package/dist/components/TopBar.js +132 -0
  169. package/dist/components/useInfiniteScroll.cjs +57 -0
  170. package/dist/components/useInfiniteScroll.js +8 -0
  171. package/dist/components/useMatchesMedia.cjs +53 -0
  172. package/dist/components/useMatchesMedia.js +9 -0
  173. package/dist/components/useMenuSystem.cjs +358 -0
  174. package/dist/components/useMenuSystem.js +11 -0
  175. package/dist/components/useMounted.cjs +39 -0
  176. package/dist/components/useMounted.js +8 -0
  177. package/dist/fonts.css +21 -0
  178. package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
  179. package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
  180. package/dist/index.css +4401 -0
  181. package/dist/open-sans-55T6A4JE.woff2 +0 -0
  182. package/dist/types.cjs +18 -0
  183. package/dist/types.js +0 -0
  184. package/package.json +66 -0
  185. package/src/brand.css +125 -0
  186. package/src/classNames.ts +144 -0
  187. package/src/components/Breadcrumbs.tsx +116 -0
  188. package/src/components/Button.tsx +210 -0
  189. package/src/components/CalendarRange.tsx +429 -0
  190. package/src/components/Caption.tsx +101 -0
  191. package/src/components/Checkbox.tsx +196 -0
  192. package/src/components/ContentTab.tsx +66 -0
  193. package/src/components/ContentTabs.tsx +103 -0
  194. package/src/components/DMSiLogo.tsx +32 -0
  195. package/src/components/DataGrid.tsx +948 -0
  196. package/src/components/DataGridCell.tsx +384 -0
  197. package/src/components/DataTable.tsx +835 -0
  198. package/src/components/DateInput.tsx +188 -0
  199. package/src/components/DateRangeInput.tsx +179 -0
  200. package/src/components/DebugJson.tsx +24 -0
  201. package/src/components/Display.tsx +60 -0
  202. package/src/components/EditingContext.tsx +40 -0
  203. package/src/components/FilterGroup.tsx +234 -0
  204. package/src/components/FullViewportBox.tsx +11 -0
  205. package/src/components/Grid.tsx +75 -0
  206. package/src/components/GridContainer.tsx +124 -0
  207. package/src/components/Heading.tsx +66 -0
  208. package/src/components/HorizontalDivider.tsx +3 -0
  209. package/src/components/Icon.tsx +36 -0
  210. package/src/components/Input.tsx +511 -0
  211. package/src/components/InputGroup.tsx +51 -0
  212. package/src/components/Label.tsx +40 -0
  213. package/src/components/Link.tsx +106 -0
  214. package/src/components/List.tsx +10 -0
  215. package/src/components/LiveChatComponent.tsx +56 -0
  216. package/src/components/LogoAgilityTopBar.tsx +53 -0
  217. package/src/components/LogoDMSiTopBar.tsx +32 -0
  218. package/src/components/LogoMillworkTopBar.tsx +118 -0
  219. package/src/components/MainBar.tsx +83 -0
  220. package/src/components/Menu.tsx +286 -0
  221. package/src/components/MenuOption.tsx +275 -0
  222. package/src/components/MobileDataGrid.tsx +135 -0
  223. package/src/components/Modal.tsx +271 -0
  224. package/src/components/ModalButtons.tsx +44 -0
  225. package/src/components/ModalContent.tsx +23 -0
  226. package/src/components/ModalHeader.tsx +41 -0
  227. package/src/components/ModalScrim.tsx +35 -0
  228. package/src/components/NavigationTab.tsx +89 -0
  229. package/src/components/NavigationTabs.tsx +63 -0
  230. package/src/components/Notification.tsx +120 -0
  231. package/src/components/OptionPill.tsx +114 -0
  232. package/src/components/Paragraph.tsx +49 -0
  233. package/src/components/Password.tsx +46 -0
  234. package/src/components/ProjectBar.tsx +76 -0
  235. package/src/components/Radio.tsx +140 -0
  236. package/src/components/Search.tsx +129 -0
  237. package/src/components/Select.tsx +104 -0
  238. package/src/components/SideMenu.tsx +21 -0
  239. package/src/components/SideMenuGroup.tsx +81 -0
  240. package/src/components/SideMenuItem.tsx +90 -0
  241. package/src/components/Stack.tsx +179 -0
  242. package/src/components/StatusPill.tsx +51 -0
  243. package/src/components/Stepper.tsx +91 -0
  244. package/src/components/Subheader.tsx +44 -0
  245. package/src/components/Surface.tsx +34 -0
  246. package/src/components/Swatch.tsx +1066 -0
  247. package/src/components/Textarea.tsx +101 -0
  248. package/src/components/Theme.tsx +13 -0
  249. package/src/components/Time.tsx +438 -0
  250. package/src/components/Toast.tsx +244 -0
  251. package/src/components/Tooltip.tsx +137 -0
  252. package/src/components/TopBar.tsx +124 -0
  253. package/src/components/useInfiniteScroll.tsx +40 -0
  254. package/src/components/useMatchesMedia.tsx +28 -0
  255. package/src/components/useMenuSystem.tsx +367 -0
  256. package/src/components/useMounted.tsx +14 -0
  257. package/src/darkmode.css +140 -0
  258. package/src/fonts.css +23 -0
  259. package/src/index.css +509 -0
  260. package/src/index.tsx +2 -0
  261. package/src/types.ts +149 -0
  262. package/src/utils/formatting.tsx +81 -0
  263. package/src/utils.ts +23 -0
@@ -0,0 +1,171 @@
1
+ import {
2
+ findDocumentRoot
3
+ } from "../chunk-4T7F5BZZ.js";
4
+ import {
5
+ InputBase
6
+ } from "../chunk-BWRHL2AG.js";
7
+ import "../chunk-4C66DLIJ.js";
8
+ import {
9
+ CalendarRange
10
+ } from "../chunk-FY7PTP6E.js";
11
+ import {
12
+ Icon
13
+ } from "../chunk-IGQVA7SC.js";
14
+ import "../chunk-KX3O6GJ6.js";
15
+ import {
16
+ __objRest,
17
+ __spreadProps,
18
+ __spreadValues
19
+ } from "../chunk-ORMEWXMH.js";
20
+
21
+ // src/components/DateRangeInput.tsx
22
+ import { useRef, useEffect, useState } from "react";
23
+ import { createPortal } from "react-dom";
24
+ import { jsx, jsxs } from "react/jsx-runtime";
25
+ var DateRangeInput = (_a) => {
26
+ var _b = _a, {
27
+ value,
28
+ onChange,
29
+ placeholder = "MM/DD/YYYY - MM/DD/YYYY",
30
+ disabled,
31
+ readOnly = false,
32
+ single = false,
33
+ label: label
34
+ } = _b, props = __objRest(_b, [
35
+ "value",
36
+ "onChange",
37
+ "placeholder",
38
+ "disabled",
39
+ "readOnly",
40
+ "single",
41
+ // Enables single date selection instead of range
42
+ "label"
43
+ ]);
44
+ const [visible, setVisible] = useState(false);
45
+ const popoverRef = useRef(null);
46
+ const triggerRef = useRef(null);
47
+ const [calendarPosition, setCalendarPosition] = useState({
48
+ top: 0,
49
+ left: 0,
50
+ width: 0
51
+ });
52
+ const [from, to] = value.split("|");
53
+ const updatePosition = () => {
54
+ if (triggerRef.current) {
55
+ requestAnimationFrame(() => {
56
+ const rect = triggerRef.current.getBoundingClientRect();
57
+ setCalendarPosition({
58
+ top: rect.bottom + window.scrollY,
59
+ left: rect.left + window.scrollX,
60
+ width: rect.width
61
+ });
62
+ });
63
+ }
64
+ };
65
+ useEffect(() => {
66
+ updatePosition();
67
+ const resizeObserver = new ResizeObserver(updatePosition);
68
+ if (triggerRef.current) {
69
+ resizeObserver.observe(triggerRef.current);
70
+ }
71
+ window.addEventListener("scroll", updatePosition);
72
+ return () => {
73
+ resizeObserver.disconnect();
74
+ window.removeEventListener("scroll", updatePosition);
75
+ };
76
+ }, []);
77
+ useEffect(() => {
78
+ const handleKeyDown = (event) => {
79
+ var _a2;
80
+ if (event.key === "Escape" && popoverRef.current) {
81
+ setVisible(false);
82
+ (_a2 = triggerRef.current) == null ? void 0 : _a2.blur();
83
+ }
84
+ };
85
+ document.addEventListener("keydown", handleKeyDown);
86
+ return () => {
87
+ document.removeEventListener("keydown", handleKeyDown);
88
+ };
89
+ });
90
+ useEffect(() => {
91
+ const handleClickOutside = (event) => {
92
+ if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
93
+ setVisible(false);
94
+ }
95
+ };
96
+ document.addEventListener("mousedown", handleClickOutside);
97
+ return () => {
98
+ document.removeEventListener("mousedown", handleClickOutside);
99
+ };
100
+ }, []);
101
+ function handleRangeChange(fromValue, toValue) {
102
+ onChange(`${fromValue}|${toValue}`);
103
+ setVisible(false);
104
+ }
105
+ const handleFocus = () => {
106
+ if (readOnly) return;
107
+ setVisible(true);
108
+ updatePosition();
109
+ };
110
+ function formatDisplayValue(from2, to2) {
111
+ if (!from2 && !to2) return "";
112
+ if (from2 && to2) return `${formatDate(from2)} - ${formatDate(to2)}`;
113
+ if (from2) return `${formatDate(from2)} -`;
114
+ return "";
115
+ }
116
+ function formatDate(date) {
117
+ const [y, m, d] = date.split("-");
118
+ return `${m}/${d}/${y}`;
119
+ }
120
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
121
+ /* @__PURE__ */ jsx(
122
+ InputBase,
123
+ __spreadProps(__spreadValues({
124
+ ref: (el) => {
125
+ triggerRef.current = el;
126
+ }
127
+ }, props), {
128
+ value: formatDisplayValue(from, to),
129
+ placeholder,
130
+ disabled,
131
+ after: /* @__PURE__ */ jsx(Icon, { name: "calendar_month" }),
132
+ onFocus: handleFocus,
133
+ readOnly,
134
+ label,
135
+ onChange: () => {
136
+ }
137
+ })
138
+ ),
139
+ visible && !readOnly && createPortal(
140
+ /* @__PURE__ */ jsx(
141
+ "div",
142
+ {
143
+ ref: (el) => {
144
+ popoverRef.current = el;
145
+ },
146
+ className: "absolute z-40 bg-white",
147
+ style: {
148
+ top: `${calendarPosition.top + 16}px`,
149
+ left: `${calendarPosition.left - 4}px`,
150
+ minWidth: `${calendarPosition.width}px`
151
+ },
152
+ children: /* @__PURE__ */ jsx(
153
+ CalendarRange,
154
+ {
155
+ from,
156
+ to,
157
+ onChange: handleRangeChange,
158
+ cardStyle: true,
159
+ mode: single ? "single" : "double"
160
+ }
161
+ )
162
+ }
163
+ ),
164
+ findDocumentRoot(popoverRef.current)
165
+ )
166
+ ] });
167
+ };
168
+ DateRangeInput.displayName = "DateRangeInput";
169
+ export {
170
+ DateRangeInput
171
+ };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/DebugJson.tsx
22
+ var DebugJson_exports = {};
23
+ __export(DebugJson_exports, {
24
+ DebugJson: () => DebugJson
25
+ });
26
+ module.exports = __toCommonJS(DebugJson_exports);
27
+ var import_react = require("react");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ function DebugJson({ data }) {
30
+ const [open, setOpen] = (0, import_react.useState)(false);
31
+ if (process.env.NODE_ENV !== "development") {
32
+ return null;
33
+ }
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-2 rounded bg-neutral-100 border border-red-500 my-4", children: [
35
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
36
+ "button",
37
+ {
38
+ onClick: () => setOpen((prev) => !prev),
39
+ className: "px-4 py-2 border rounded bg-white",
40
+ children: open ? "Hide JSON" : "Show JSON"
41
+ }
42
+ ),
43
+ open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "mt-4", children: JSON.stringify(data, null, 4) })
44
+ ] });
45
+ }
46
+ DebugJson.displayName = "dasda";
47
+ // Annotate the CommonJS export names for ESM import in node:
48
+ 0 && (module.exports = {
49
+ DebugJson
50
+ });
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import "../chunk-ORMEWXMH.js";
3
+
4
+ // src/components/DebugJson.tsx
5
+ import { useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function DebugJson({ data }) {
8
+ const [open, setOpen] = useState(false);
9
+ if (process.env.NODE_ENV !== "development") {
10
+ return null;
11
+ }
12
+ return /* @__PURE__ */ jsxs("div", { className: "p-2 rounded bg-neutral-100 border border-red-500 my-4", children: [
13
+ /* @__PURE__ */ jsx(
14
+ "button",
15
+ {
16
+ onClick: () => setOpen((prev) => !prev),
17
+ className: "px-4 py-2 border rounded bg-white",
18
+ children: open ? "Hide JSON" : "Show JSON"
19
+ }
20
+ ),
21
+ open && /* @__PURE__ */ jsx("pre", { className: "mt-4", children: JSON.stringify(data, null, 4) })
22
+ ] });
23
+ }
24
+ DebugJson.displayName = "dasda";
25
+ export {
26
+ DebugJson
27
+ };
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/Display.tsx
60
+ var Display_exports = {};
61
+ __export(Display_exports, {
62
+ Display: () => Display,
63
+ Display1: () => Display1,
64
+ Display2: () => Display2
65
+ });
66
+ module.exports = __toCommonJS(Display_exports);
67
+ var import_clsx2 = __toESM(require("clsx"), 1);
68
+
69
+ // src/classNames.ts
70
+ var import_clsx = __toESM(require("clsx"), 1);
71
+ var typography = {
72
+ display1: (0, import_clsx.default)(
73
+ "font-sans font-semibold",
74
+ "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
75
+ "leading-display-1-mobile desktop:leading-display-1-desktop"
76
+ ),
77
+ display2: (0, import_clsx.default)(
78
+ "font-sans font-bold",
79
+ "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
80
+ "leading-display-2-mobile desktop:leading-display-2-desktop"
81
+ ),
82
+ heading1: (0, import_clsx.default)(
83
+ "font-sans font-semibold",
84
+ "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
85
+ "leading-heading-1-mobile desktop:leading-heading-1-desktop"
86
+ ),
87
+ heading2: (0, import_clsx.default)(
88
+ "font-sans font-normal",
89
+ "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
90
+ "leading-heading-2-mobile desktop:leading-heading-2-desktop"
91
+ ),
92
+ heading3: (0, import_clsx.default)(
93
+ "font-sans font-semibold",
94
+ "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
95
+ "leading-heading-3-mobile desktop:leading-heading-3-desktop"
96
+ ),
97
+ subheader: (0, import_clsx.default)(
98
+ "font-sans font-semibold",
99
+ "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
100
+ "leading-subheader-mobile desktop:leading-subheader-desktop"
101
+ ),
102
+ link: (0, import_clsx.default)(
103
+ "font-sans font-normal",
104
+ "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
105
+ "leading-link-mobile desktop:leading-link-desktop"
106
+ ),
107
+ buttonLabel: (0, import_clsx.default)(
108
+ "font-sans font-semibold",
109
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
110
+ "leading-label-mobile desktop:leading-label-desktop"
111
+ ),
112
+ label: (0, import_clsx.default)(
113
+ "font-sans font-semibold",
114
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
115
+ "leading-label-mobile desktop:leading-label-desktop"
116
+ ),
117
+ paragraph: (0, import_clsx.default)(
118
+ "font-sans font-normal",
119
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
120
+ "leading-paragraph-mobile desktop:leading-paragraph-desktop"
121
+ ),
122
+ caption: (0, import_clsx.default)(
123
+ "font-sans font-normal",
124
+ "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
125
+ "leading-caption-mobile desktop:leading-caption-desktop"
126
+ )
127
+ };
128
+ var baseTransition = (0, import_clsx.default)(
129
+ "transition-colors duration-100 ease-in-out"
130
+ );
131
+ var componentGap = (0, import_clsx.default)(
132
+ "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
133
+ );
134
+ var paddingUsingComponentGap = (0, import_clsx.default)(
135
+ "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
136
+ );
137
+ var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
138
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
139
+ );
140
+ var componentPadding = (0, import_clsx.default)(
141
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
142
+ );
143
+ var componentPaddingBottom = (0, import_clsx.default)(
144
+ "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
145
+ );
146
+ var componentPaddingY = (0, import_clsx.default)(
147
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
148
+ );
149
+ var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
150
+ "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
151
+ );
152
+ var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
153
+ "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
154
+ );
155
+ var componentPaddingMinusBorder = (0, import_clsx.default)(
156
+ "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
157
+ );
158
+ var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
159
+ "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
160
+ );
161
+ var layoutPaddingBottom = (0, import_clsx.default)(
162
+ "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
163
+ );
164
+ var layoutPaddingY = (0, import_clsx.default)(
165
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
166
+ );
167
+ var containerPaddingX = (0, import_clsx.default)(
168
+ "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
169
+ );
170
+ var containerPaddingY = (0, import_clsx.default)(
171
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
172
+ );
173
+ var layoutGroupGapPaddingY = (0, import_clsx.default)(
174
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
175
+ );
176
+ var layoutGroupGap = (0, import_clsx.default)(
177
+ "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
178
+ );
179
+ var layoutGap = (0, import_clsx.default)(
180
+ "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
181
+ );
182
+ var gapUsingContainerPadding = (0, import_clsx.default)(
183
+ "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
184
+ );
185
+
186
+ // src/components/Display.tsx
187
+ var import_jsx_runtime = require("react/jsx-runtime");
188
+ var Display = (_a) => {
189
+ var _b = _a, {
190
+ className,
191
+ children,
192
+ as,
193
+ color,
194
+ align,
195
+ variant = "display1"
196
+ } = _b, props = __objRest(_b, [
197
+ "className",
198
+ "children",
199
+ "as",
200
+ "color",
201
+ "align",
202
+ "variant"
203
+ ]);
204
+ const defaultElement = variant === "display1" ? "h1" : "h2";
205
+ const Element = as != null ? as : defaultElement;
206
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
207
+ Element,
208
+ __spreadProps(__spreadValues({
209
+ className: (0, import_clsx2.default)(
210
+ typography[variant],
211
+ className,
212
+ align === "left" && "text-left",
213
+ align === "center" && "text-center",
214
+ align === "right" && "text-right"
215
+ ),
216
+ style: __spreadProps(__spreadValues({}, props.style), {
217
+ color: color ? `var(--color-${color})` : void 0
218
+ })
219
+ }, props), {
220
+ children
221
+ })
222
+ );
223
+ };
224
+ Display.displayName = "Display";
225
+ var Display1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Display, __spreadProps(__spreadValues({}, props), { variant: "display1" }));
226
+ var Display2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Display, __spreadProps(__spreadValues({}, props), { variant: "display2" }));
227
+ Display1.displayName = "Display1";
228
+ Display2.displayName = "Display2";
229
+ // Annotate the CommonJS export names for ESM import in node:
230
+ 0 && (module.exports = {
231
+ Display,
232
+ Display1,
233
+ Display2
234
+ });
@@ -0,0 +1,12 @@
1
+ import {
2
+ Display,
3
+ Display1,
4
+ Display2
5
+ } from "../chunk-27KIIUAR.js";
6
+ import "../chunk-KX3O6GJ6.js";
7
+ import "../chunk-ORMEWXMH.js";
8
+ export {
9
+ Display,
10
+ Display1,
11
+ Display2
12
+ };
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+
38
+ // src/components/EditingContext.tsx
39
+ var EditingContext_exports = {};
40
+ __export(EditingContext_exports, {
41
+ EditingContext: () => EditingContext,
42
+ EditingProvider: () => EditingProvider
43
+ });
44
+ module.exports = __toCommonJS(EditingContext_exports);
45
+ var import_react = require("react");
46
+ var import_jsx_runtime = require("react/jsx-runtime");
47
+ var EditingContext = (0, import_react.createContext)({
48
+ data: [],
49
+ setData: (row, key, value) => {
50
+ console.log(row, key, value);
51
+ }
52
+ });
53
+ var EditingProvider = ({ data, children }) => {
54
+ const [actual, setData] = (0, import_react.useState)(data);
55
+ const context = {
56
+ data: actual,
57
+ setData: (row, key, value) => {
58
+ setData((prev) => {
59
+ const newData = [...prev];
60
+ newData[row] = __spreadProps(__spreadValues({}, newData[row]), {
61
+ [key]: value
62
+ });
63
+ return newData;
64
+ });
65
+ }
66
+ };
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditingContext, { value: context, children });
68
+ };
69
+ // Annotate the CommonJS export names for ESM import in node:
70
+ 0 && (module.exports = {
71
+ EditingContext,
72
+ EditingProvider
73
+ });
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import {
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../chunk-ORMEWXMH.js";
6
+
7
+ // src/components/EditingContext.tsx
8
+ import { createContext, useState } from "react";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var EditingContext = createContext({
11
+ data: [],
12
+ setData: (row, key, value) => {
13
+ console.log(row, key, value);
14
+ }
15
+ });
16
+ var EditingProvider = ({ data, children }) => {
17
+ const [actual, setData] = useState(data);
18
+ const context = {
19
+ data: actual,
20
+ setData: (row, key, value) => {
21
+ setData((prev) => {
22
+ const newData = [...prev];
23
+ newData[row] = __spreadProps(__spreadValues({}, newData[row]), {
24
+ [key]: value
25
+ });
26
+ return newData;
27
+ });
28
+ }
29
+ };
30
+ return /* @__PURE__ */ jsx(EditingContext, { value: context, children });
31
+ };
32
+ export {
33
+ EditingContext,
34
+ EditingProvider
35
+ };