@dmsi/wedgekit-react 0.0.26 → 0.0.27
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.
- package/dist/{chunk-KDEPZ6I7.js → chunk-2S2Z3L56.js} +5 -1
- package/dist/{chunk-TU55CHXU.js → chunk-4JLU7TAC.js} +3 -1
- package/dist/{chunk-Z2LOGSGE.js → chunk-4N2PED4P.js} +15 -3
- package/dist/{chunk-U42SKNR6.js → chunk-57WRM337.js} +68 -30
- package/dist/{chunk-ZFGGZXB6.js → chunk-AY7ELVQY.js} +5 -2
- package/dist/{chunk-I2UVVKQI.js → chunk-CHTO7PW4.js} +3 -2
- package/dist/{chunk-WIDBAFBU.js → chunk-FWPJ73IK.js} +3 -1
- package/dist/{chunk-5TLFMKSR.js → chunk-INYI65WW.js} +15 -5
- package/dist/{chunk-TJ44JJCB.js → chunk-J6LETUNM.js} +5 -2
- package/dist/{chunk-T6HZARR7.js → chunk-MZJS2ZAU.js} +6 -3
- package/dist/{chunk-ZCBSLV7U.js → chunk-O4M2GISS.js} +5 -2
- package/dist/{chunk-OUTEIXV4.js → chunk-OUSNH76S.js} +11 -3
- package/dist/{chunk-YDREJNAS.js → chunk-PDDZ5PMY.js} +18 -4
- package/dist/{chunk-4RD5ZF2V.js → chunk-QBIEU25R.js} +10 -4
- package/dist/chunk-QUPHLL7D.js +61 -0
- package/dist/{chunk-OISE6NMA.js → chunk-QV2EFOYF.js} +17 -6
- package/dist/{chunk-YZQNTOIF.js → chunk-QZGUMB7T.js} +10 -5
- package/dist/{chunk-S7R37IUP.js → chunk-S5K22XTH.js} +5 -2
- package/dist/{chunk-GCPJH5R6.js → chunk-S5KPS4IQ.js} +22 -7
- package/dist/{chunk-VELXLFMJ.js → chunk-SAMX4YGM.js} +4 -1
- package/dist/{chunk-TWP6YSFO.js → chunk-SKHSGGO3.js} +14 -6
- package/dist/chunk-TVDFTRGL.js +57 -0
- package/dist/{chunk-N32PXOA5.js → chunk-UT7XCBZF.js} +9 -4
- package/dist/{chunk-L4UM372R.js → chunk-VC3R5EUH.js} +3 -0
- package/dist/{chunk-UIQ733QP.js → chunk-VG4EPHJA.js} +7 -3
- package/dist/components/Breadcrumbs.cjs +29 -9
- package/dist/components/Breadcrumbs.js +29 -9
- package/dist/components/Button.cjs +6 -3
- package/dist/components/Button.js +1 -1
- package/dist/components/CalendarRange.cjs +11 -3
- package/dist/components/CalendarRange.js +1 -1
- package/dist/components/Caption.cjs +53 -9
- package/dist/components/Caption.js +53 -9
- package/dist/components/Checkbox.cjs +15 -6
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/ContentTab.cjs +20 -7
- package/dist/components/ContentTab.js +2 -2
- package/dist/components/ContentTabs.cjs +32 -18
- package/dist/components/ContentTabs.js +14 -13
- package/dist/components/DMSiLogo.cjs +22 -4
- package/dist/components/DMSiLogo.js +9 -5
- package/dist/components/DataGrid.cjs +374 -243
- package/dist/components/DataGrid.js +283 -226
- package/dist/components/DataGridCell.cjs +79 -21
- package/dist/components/DataGridCell.js +7 -7
- package/dist/components/DataTable.cjs +197 -139
- package/dist/components/DataTable.js +197 -139
- package/dist/components/DateInput.cjs +36 -10
- package/dist/components/DateInput.js +7 -3
- package/dist/components/DateRangeInput.cjs +36 -10
- package/dist/components/DateRangeInput.js +7 -3
- package/dist/components/DebugJson.cjs +21 -13
- package/dist/components/DebugJson.js +21 -13
- package/dist/components/Display.cjs +5 -2
- package/dist/components/Display.js +1 -1
- package/dist/components/EditingContext.cjs +4 -1
- package/dist/components/EditingContext.js +4 -1
- package/dist/components/FilterGroup.cjs +102 -32
- package/dist/components/FilterGroup.js +41 -17
- package/dist/components/FullViewportBox.cjs +10 -2
- package/dist/components/FullViewportBox.js +10 -2
- package/dist/components/Grid.cjs +3 -1
- package/dist/components/Grid.js +3 -1
- package/dist/components/Heading.cjs +5 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/HorizontalDivider.cjs +2 -2
- package/dist/components/HorizontalDivider.js +2 -2
- package/dist/components/Input.cjs +21 -7
- package/dist/components/Input.js +2 -2
- package/dist/components/InputGroup.cjs +13 -6
- package/dist/components/InputGroup.js +9 -5
- package/dist/components/Label.cjs +5 -2
- package/dist/components/Label.js +1 -1
- package/dist/components/List.cjs +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/LogoAgilityTopBar.cjs +22 -4
- package/dist/components/LogoAgilityTopBar.js +9 -5
- package/dist/components/LogoDMSiTopBar.cjs +22 -4
- package/dist/components/LogoDMSiTopBar.js +1 -1
- package/dist/components/LogoMillworkTopBar.cjs +22 -4
- package/dist/components/LogoMillworkTopBar.js +9 -5
- package/dist/components/MainBar.cjs +2 -0
- package/dist/components/MainBar.js +2 -0
- package/dist/components/Menu.cjs +3 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/MenuOption.cjs +28 -7
- package/dist/components/MenuOption.js +3 -3
- package/dist/components/MobileDataGrid.cjs +101 -46
- package/dist/components/MobileDataGrid.js +23 -11
- package/dist/components/Modal.cjs +96 -51
- package/dist/components/Modal.js +19 -7
- package/dist/components/ModalButtons.cjs +43 -26
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalContent.cjs +3 -1
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.cjs +40 -25
- package/dist/components/ModalHeader.js +3 -3
- package/dist/components/ModalScrim.cjs +3 -1
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/NavigationTab.cjs +9 -3
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.cjs +15 -7
- package/dist/components/NavigationTabs.js +8 -6
- package/dist/components/NestedMenu.cjs +28 -7
- package/dist/components/NestedMenu.js +3 -3
- package/dist/components/Notification.cjs +84 -38
- package/dist/components/Notification.js +8 -4
- package/dist/components/OptionPill.cjs +24 -6
- package/dist/components/OptionPill.js +3 -3
- package/dist/components/Paragraph.cjs +7 -3
- package/dist/components/Paragraph.js +1 -1
- package/dist/components/Password.cjs +33 -11
- package/dist/components/Password.js +14 -6
- package/dist/components/ProjectBar.cjs +3 -1
- package/dist/components/ProjectBar.js +3 -1
- package/dist/components/Radio.cjs +13 -7
- package/dist/components/Radio.js +7 -5
- package/dist/components/Search.cjs +34 -12
- package/dist/components/Search.js +3 -3
- package/dist/components/Select.cjs +25 -7
- package/dist/components/Select.js +3 -3
- package/dist/components/SideMenu.cjs +6 -1
- package/dist/components/SideMenu.js +6 -1
- package/dist/components/SideMenuGroup.cjs +96 -49
- package/dist/components/SideMenuGroup.js +31 -19
- package/dist/components/SideMenuItem.cjs +99 -43
- package/dist/components/SideMenuItem.js +32 -12
- package/dist/components/Stack.cjs +91 -30
- package/dist/components/Stack.js +1 -1
- package/dist/components/StatusPill.cjs +13 -6
- package/dist/components/StatusPill.js +9 -5
- package/dist/components/Stepper.cjs +35 -17
- package/dist/components/Stepper.js +11 -10
- package/dist/components/Subheader.cjs +5 -2
- package/dist/components/Subheader.js +1 -1
- package/dist/components/Surface.cjs +5 -2
- package/dist/components/Surface.js +5 -2
- package/dist/components/Swatch.cjs +1544 -1308
- package/dist/components/Swatch.js +1469 -1275
- package/dist/components/Textarea.cjs +5 -2
- package/dist/components/Textarea.js +5 -2
- package/dist/components/Theme.cjs +3 -2
- package/dist/components/Theme.js +1 -1
- package/dist/components/Time.cjs +98 -40
- package/dist/components/Time.js +18 -6
- package/dist/components/Toast.cjs +38 -15
- package/dist/components/Toast.js +23 -10
- package/dist/components/Tooltip.cjs +5 -4
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/TopBar.cjs +16 -8
- package/dist/components/TopBar.js +12 -5
- package/package.json +1 -1
- package/src/components/Breadcrumbs.tsx +24 -15
- package/src/components/Button.tsx +7 -3
- package/src/components/CalendarRange.tsx +9 -0
- package/src/components/Caption.tsx +36 -6
- package/src/components/Checkbox.tsx +7 -2
- package/src/components/ContentTab.tsx +13 -3
- package/src/components/ContentTabs.tsx +11 -8
- package/src/components/DMSiLogo.tsx +2 -1
- package/src/components/DataGrid.tsx +85 -23
- package/src/components/DataGridCell.tsx +15 -2
- package/src/components/DataTable.tsx +64 -14
- package/src/components/DateInput.tsx +5 -1
- package/src/components/DateRangeInput.tsx +5 -1
- package/src/components/DebugJson.tsx +7 -3
- package/src/components/Display.tsx +3 -0
- package/src/components/EditingContext.tsx +8 -6
- package/src/components/FilterGroup.tsx +23 -3
- package/src/components/FullViewportBox.tsx +6 -1
- package/src/components/Grid.tsx +3 -0
- package/src/components/Heading.tsx +3 -0
- package/src/components/HorizontalDivider.tsx +4 -2
- package/src/components/Input.tsx +19 -10
- package/src/components/InputGroup.tsx +8 -4
- package/src/components/Label.tsx +3 -0
- package/src/components/Link.tsx +1 -0
- package/src/components/List.tsx +7 -1
- package/src/components/LogoAgilityTopBar.tsx +2 -1
- package/src/components/LogoDMSiTopBar.tsx +2 -1
- package/src/components/LogoMillworkTopBar.tsx +2 -1
- package/src/components/MainBar.tsx +3 -0
- package/src/components/Menu.tsx +3 -0
- package/src/components/MenuOption.tsx +72 -58
- package/src/components/MobileDataGrid.tsx +15 -4
- package/src/components/Modal.tsx +10 -1
- package/src/components/ModalButtons.tsx +12 -1
- package/src/components/ModalContent.tsx +3 -0
- package/src/components/ModalHeader.tsx +16 -6
- package/src/components/ModalScrim.tsx +3 -0
- package/src/components/NavigationTab.tsx +6 -3
- package/src/components/NavigationTabs.tsx +5 -2
- package/src/components/Notification.tsx +4 -0
- package/src/components/OptionPill.tsx +9 -1
- package/src/components/Paragraph.tsx +3 -0
- package/src/components/Password.tsx +9 -3
- package/src/components/ProjectBar.tsx +3 -0
- package/src/components/Radio.tsx +3 -2
- package/src/components/Search.tsx +56 -41
- package/src/components/Select.tsx +6 -1
- package/src/components/SideMenu.tsx +7 -1
- package/src/components/SideMenuGroup.tsx +13 -2
- package/src/components/SideMenuItem.tsx +15 -2
- package/src/components/Stack.tsx +8 -3
- package/src/components/StatusPill.tsx +4 -2
- package/src/components/Stepper.tsx +5 -5
- package/src/components/Subheader.tsx +3 -0
- package/src/components/Surface.tsx +3 -0
- package/src/components/Swatch.tsx +415 -140
- package/src/components/Textarea.tsx +6 -3
- package/src/components/Theme.tsx +3 -1
- package/src/components/Time.tsx +21 -5
- package/src/components/Toast.tsx +29 -14
- package/src/components/Tooltip.tsx +46 -32
- package/src/components/TopBar.tsx +7 -3
- package/dist/chunk-DBYSGYST.js +0 -47
- package/dist/chunk-UK3WG7HQ.js +0 -48
|
@@ -201,18 +201,21 @@ var Label = (_a) => {
|
|
|
201
201
|
padded,
|
|
202
202
|
className,
|
|
203
203
|
color,
|
|
204
|
-
align
|
|
204
|
+
align,
|
|
205
|
+
id
|
|
205
206
|
} = _b, props = __objRest(_b, [
|
|
206
207
|
"as",
|
|
207
208
|
"padded",
|
|
208
209
|
"className",
|
|
209
210
|
"color",
|
|
210
|
-
"align"
|
|
211
|
+
"align",
|
|
212
|
+
"id"
|
|
211
213
|
]);
|
|
212
214
|
const Element = as;
|
|
213
215
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
214
216
|
Element,
|
|
215
217
|
__spreadProps(__spreadValues({
|
|
218
|
+
id,
|
|
216
219
|
className: (0, import_clsx2.default)(
|
|
217
220
|
typography.label,
|
|
218
221
|
align === "left" && "text-left",
|
|
@@ -242,7 +245,8 @@ var Paragraph = (_a) => {
|
|
|
242
245
|
tall,
|
|
243
246
|
addOverflow,
|
|
244
247
|
children,
|
|
245
|
-
as = "p"
|
|
248
|
+
as = "p",
|
|
249
|
+
id
|
|
246
250
|
} = _b, props = __objRest(_b, [
|
|
247
251
|
"className",
|
|
248
252
|
"color",
|
|
@@ -251,12 +255,15 @@ var Paragraph = (_a) => {
|
|
|
251
255
|
"tall",
|
|
252
256
|
"addOverflow",
|
|
253
257
|
"children",
|
|
254
|
-
"as"
|
|
258
|
+
"as",
|
|
259
|
+
"id"
|
|
255
260
|
]);
|
|
256
261
|
const Element = as;
|
|
257
262
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
258
263
|
Element,
|
|
259
|
-
__spreadProps(__spreadValues({
|
|
264
|
+
__spreadProps(__spreadValues({
|
|
265
|
+
id
|
|
266
|
+
}, props), {
|
|
260
267
|
className: (0, import_clsx3.default)(
|
|
261
268
|
typography.paragraph,
|
|
262
269
|
className,
|
|
@@ -335,6 +342,7 @@ var useMatchesMobile = () => {
|
|
|
335
342
|
// src/components/MenuOption.tsx
|
|
336
343
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
337
344
|
var MenuOption = ({
|
|
345
|
+
id,
|
|
338
346
|
children,
|
|
339
347
|
disabled = false,
|
|
340
348
|
variant = "normal",
|
|
@@ -406,6 +414,7 @@ var MenuOption = ({
|
|
|
406
414
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
407
415
|
"div",
|
|
408
416
|
__spreadProps(__spreadValues({
|
|
417
|
+
id,
|
|
409
418
|
ref: actualRef,
|
|
410
419
|
className: (0, import_clsx5.default)(
|
|
411
420
|
"flex items-center cursor-pointer w-full text-left relative outline-none",
|
|
@@ -446,7 +455,15 @@ var MenuOption = ({
|
|
|
446
455
|
onMouseLeave: handleMouseLeave,
|
|
447
456
|
"data-submenu-parent": menuId.current,
|
|
448
457
|
"data-menu-level": subMenuLevel + 1,
|
|
449
|
-
children: subMenu({
|
|
458
|
+
children: subMenu({
|
|
459
|
+
menuId: menuId.current,
|
|
460
|
+
positionTo: actualRef,
|
|
461
|
+
mobilePositionTo,
|
|
462
|
+
position: "right",
|
|
463
|
+
subMenuLevel,
|
|
464
|
+
mobileBackMenuOption,
|
|
465
|
+
mobileHide: isMobile && activeMenu !== menuId.current
|
|
466
|
+
})
|
|
450
467
|
}
|
|
451
468
|
)
|
|
452
469
|
] });
|
|
@@ -465,6 +482,7 @@ var MenuOption = ({
|
|
|
465
482
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
466
483
|
MenuOption,
|
|
467
484
|
{
|
|
485
|
+
id: id ? `${id}-back` : void 0,
|
|
468
486
|
onClick: () => {
|
|
469
487
|
closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
|
|
470
488
|
},
|
|
@@ -480,7 +498,10 @@ function highlightMatch(text, searchValue) {
|
|
|
480
498
|
if (!searchValue || !searchValue.trim()) {
|
|
481
499
|
return text;
|
|
482
500
|
}
|
|
483
|
-
const regex = new RegExp(
|
|
501
|
+
const regex = new RegExp(
|
|
502
|
+
`(${searchValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
|
|
503
|
+
"gi"
|
|
504
|
+
);
|
|
484
505
|
const parts = text.split(regex);
|
|
485
506
|
return parts.map(
|
|
486
507
|
(part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-bold", children: part }, index) : part
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-PDDZ5PMY.js";
|
|
5
5
|
import "../chunk-SEKKGFM6.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-S5K22XTH.js";
|
|
7
|
+
import "../chunk-VG4EPHJA.js";
|
|
8
8
|
import "../chunk-IGQVA7SC.js";
|
|
9
9
|
import "../chunk-RDLEIAQU.js";
|
|
10
10
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -114,38 +114,70 @@ var useFlexClassNames = ({ items, justify, grow }) => (0, import_clsx2.default)(
|
|
|
114
114
|
justify === "between" && "justify-between",
|
|
115
115
|
justify === "around" && "justify-around"
|
|
116
116
|
);
|
|
117
|
-
var Stack = ({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
117
|
+
var Stack = (_a) => {
|
|
118
|
+
var _b = _a, {
|
|
119
|
+
children,
|
|
120
|
+
items,
|
|
121
|
+
justify,
|
|
122
|
+
grow,
|
|
123
|
+
padding,
|
|
124
|
+
paddingX,
|
|
125
|
+
horizontal,
|
|
126
|
+
horizontalMobile,
|
|
127
|
+
elevation = 0,
|
|
128
|
+
rounded,
|
|
129
|
+
centered,
|
|
130
|
+
width,
|
|
131
|
+
maxWidth,
|
|
132
|
+
minWidth,
|
|
133
|
+
height,
|
|
134
|
+
maxHeight,
|
|
135
|
+
borderColor,
|
|
136
|
+
backgroundColor,
|
|
137
|
+
sizing = "none",
|
|
138
|
+
overflowY = "inherit",
|
|
139
|
+
overflowX = "inherit",
|
|
140
|
+
flexShrink,
|
|
141
|
+
flexGrow,
|
|
142
|
+
position,
|
|
143
|
+
top,
|
|
144
|
+
left,
|
|
145
|
+
id
|
|
146
|
+
} = _b, props = __objRest(_b, [
|
|
147
|
+
"children",
|
|
148
|
+
"items",
|
|
149
|
+
"justify",
|
|
150
|
+
"grow",
|
|
151
|
+
"padding",
|
|
152
|
+
"paddingX",
|
|
153
|
+
"horizontal",
|
|
154
|
+
"horizontalMobile",
|
|
155
|
+
"elevation",
|
|
156
|
+
"rounded",
|
|
157
|
+
"centered",
|
|
158
|
+
"width",
|
|
159
|
+
"maxWidth",
|
|
160
|
+
"minWidth",
|
|
161
|
+
"height",
|
|
162
|
+
"maxHeight",
|
|
163
|
+
"borderColor",
|
|
164
|
+
"backgroundColor",
|
|
165
|
+
"sizing",
|
|
166
|
+
"overflowY",
|
|
167
|
+
"overflowX",
|
|
168
|
+
"flexShrink",
|
|
169
|
+
"flexGrow",
|
|
170
|
+
"position",
|
|
171
|
+
"top",
|
|
172
|
+
"left",
|
|
173
|
+
"id"
|
|
174
|
+
]);
|
|
145
175
|
const flexClassNames = useFlexClassNames({ items, justify, grow });
|
|
146
176
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
147
177
|
"div",
|
|
148
|
-
{
|
|
178
|
+
__spreadProps(__spreadValues({
|
|
179
|
+
id
|
|
180
|
+
}, props), {
|
|
149
181
|
style: {
|
|
150
182
|
height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
|
|
151
183
|
maxHeight: maxHeight !== void 0 ? `${maxHeight}px` : void 0,
|
|
@@ -193,7 +225,7 @@ var Stack = ({
|
|
|
193
225
|
rounded && "rounded"
|
|
194
226
|
),
|
|
195
227
|
children
|
|
196
|
-
}
|
|
228
|
+
})
|
|
197
229
|
);
|
|
198
230
|
};
|
|
199
231
|
|
|
@@ -341,7 +373,8 @@ var Button = (_a) => {
|
|
|
341
373
|
children,
|
|
342
374
|
iconOnly = false,
|
|
343
375
|
colorClassName,
|
|
344
|
-
href
|
|
376
|
+
href,
|
|
377
|
+
id
|
|
345
378
|
} = _b, props = __objRest(_b, [
|
|
346
379
|
"variant",
|
|
347
380
|
"as",
|
|
@@ -354,7 +387,8 @@ var Button = (_a) => {
|
|
|
354
387
|
"children",
|
|
355
388
|
"iconOnly",
|
|
356
389
|
"colorClassName",
|
|
357
|
-
"href"
|
|
390
|
+
"href",
|
|
391
|
+
"id"
|
|
358
392
|
]);
|
|
359
393
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx4.default)(
|
|
360
394
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -444,6 +478,7 @@ var Button = (_a) => {
|
|
|
444
478
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
445
479
|
Element,
|
|
446
480
|
__spreadProps(__spreadValues({
|
|
481
|
+
id,
|
|
447
482
|
type: Element === "button" ? "button" : void 0,
|
|
448
483
|
className: buttonClasses
|
|
449
484
|
}, props), {
|
|
@@ -451,7 +486,7 @@ var Button = (_a) => {
|
|
|
451
486
|
href,
|
|
452
487
|
children: [
|
|
453
488
|
leftIcon && leftIcon,
|
|
454
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: labelClasses, children }),
|
|
489
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
455
490
|
rightIcon && rightIcon
|
|
456
491
|
]
|
|
457
492
|
})
|
|
@@ -463,9 +498,10 @@ Button.displayName = "Button";
|
|
|
463
498
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
464
499
|
function Theme({
|
|
465
500
|
theme,
|
|
466
|
-
children
|
|
501
|
+
children,
|
|
502
|
+
id
|
|
467
503
|
}) {
|
|
468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "contents", "data-theme": theme, children });
|
|
504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { id, className: "contents", "data-theme": theme, children });
|
|
469
505
|
}
|
|
470
506
|
|
|
471
507
|
// src/components/Heading.tsx
|
|
@@ -478,20 +514,23 @@ var Heading = (_a) => {
|
|
|
478
514
|
as,
|
|
479
515
|
color,
|
|
480
516
|
align,
|
|
481
|
-
variant = "heading1"
|
|
517
|
+
variant = "heading1",
|
|
518
|
+
id
|
|
482
519
|
} = _b, props = __objRest(_b, [
|
|
483
520
|
"className",
|
|
484
521
|
"children",
|
|
485
522
|
"as",
|
|
486
523
|
"color",
|
|
487
524
|
"align",
|
|
488
|
-
"variant"
|
|
525
|
+
"variant",
|
|
526
|
+
"id"
|
|
489
527
|
]);
|
|
490
528
|
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
491
529
|
const Element = as != null ? as : defaultElement;
|
|
492
530
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
493
531
|
Element,
|
|
494
532
|
__spreadProps(__spreadValues({
|
|
533
|
+
id,
|
|
495
534
|
className: (0, import_clsx5.default)(
|
|
496
535
|
typography[variant],
|
|
497
536
|
className,
|
|
@@ -527,7 +566,8 @@ var Paragraph = (_a) => {
|
|
|
527
566
|
tall,
|
|
528
567
|
addOverflow,
|
|
529
568
|
children,
|
|
530
|
-
as = "p"
|
|
569
|
+
as = "p",
|
|
570
|
+
id
|
|
531
571
|
} = _b, props = __objRest(_b, [
|
|
532
572
|
"className",
|
|
533
573
|
"color",
|
|
@@ -536,12 +576,15 @@ var Paragraph = (_a) => {
|
|
|
536
576
|
"tall",
|
|
537
577
|
"addOverflow",
|
|
538
578
|
"children",
|
|
539
|
-
"as"
|
|
579
|
+
"as",
|
|
580
|
+
"id"
|
|
540
581
|
]);
|
|
541
582
|
const Element = as;
|
|
542
583
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
543
584
|
Element,
|
|
544
|
-
__spreadProps(__spreadValues({
|
|
585
|
+
__spreadProps(__spreadValues({
|
|
586
|
+
id
|
|
587
|
+
}, props), {
|
|
545
588
|
className: (0, import_clsx6.default)(
|
|
546
589
|
typography.paragraph,
|
|
547
590
|
className,
|
|
@@ -569,11 +612,13 @@ function MobileDataGrid({
|
|
|
569
612
|
header,
|
|
570
613
|
getId,
|
|
571
614
|
renderLink,
|
|
572
|
-
renderChevron
|
|
615
|
+
renderChevron,
|
|
616
|
+
id
|
|
573
617
|
}) {
|
|
574
618
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
575
619
|
"div",
|
|
576
620
|
{
|
|
621
|
+
id,
|
|
577
622
|
className: (0, import_clsx7.default)(
|
|
578
623
|
"rounded",
|
|
579
624
|
"overflow-hidden",
|
|
@@ -582,10 +627,17 @@ function MobileDataGrid({
|
|
|
582
627
|
"overflow-y-scroll scrollbar-thin"
|
|
583
628
|
),
|
|
584
629
|
children: [
|
|
585
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
630
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
631
|
+
MobileDataGridHeader,
|
|
632
|
+
{
|
|
633
|
+
id: id ? `${id}-header` : void 0,
|
|
634
|
+
header
|
|
635
|
+
}
|
|
636
|
+
),
|
|
586
637
|
data.map((item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
587
638
|
MobileDataGridCard,
|
|
588
639
|
{
|
|
640
|
+
id: id ? `${id}-card-${getId(item)}` : void 0,
|
|
589
641
|
data: item,
|
|
590
642
|
columns,
|
|
591
643
|
renderLink,
|
|
@@ -597,8 +649,8 @@ function MobileDataGrid({
|
|
|
597
649
|
}
|
|
598
650
|
);
|
|
599
651
|
}
|
|
600
|
-
function MobileDataGridHeader({ header }) {
|
|
601
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
652
|
+
function MobileDataGridHeader({ header, id }) {
|
|
653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, className: "sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
602
654
|
Stack,
|
|
603
655
|
{
|
|
604
656
|
horizontal: true,
|
|
@@ -615,9 +667,10 @@ function MobileDataGridCard({
|
|
|
615
667
|
data,
|
|
616
668
|
columns,
|
|
617
669
|
renderLink,
|
|
618
|
-
renderChevron
|
|
670
|
+
renderChevron,
|
|
671
|
+
id
|
|
619
672
|
}) {
|
|
620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
|
|
673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, children: [
|
|
621
674
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { sizing: "component", padding: true, children: [
|
|
622
675
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
|
|
623
676
|
renderLink && renderLink(data),
|
|
@@ -625,6 +678,7 @@ function MobileDataGridCard({
|
|
|
625
678
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
626
679
|
Button,
|
|
627
680
|
{
|
|
681
|
+
id: id ? `${id}-docs-button` : void 0,
|
|
628
682
|
iconOnly: true,
|
|
629
683
|
variant: "tertiary",
|
|
630
684
|
onClick: () => console.log("Edit", data.id),
|
|
@@ -634,6 +688,7 @@ function MobileDataGridCard({
|
|
|
634
688
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
635
689
|
Button,
|
|
636
690
|
{
|
|
691
|
+
id: id ? `${id}-swap-button` : void 0,
|
|
637
692
|
iconOnly: true,
|
|
638
693
|
variant: "tertiary",
|
|
639
694
|
onClick: () => console.log("Edit", data.id),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Theme
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-CHTO7PW4.js";
|
|
4
4
|
import {
|
|
5
5
|
Stack
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-57WRM337.js";
|
|
7
7
|
import {
|
|
8
8
|
Heading3
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-J6LETUNM.js";
|
|
10
10
|
import {
|
|
11
11
|
Button
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-MZJS2ZAU.js";
|
|
13
13
|
import {
|
|
14
14
|
Paragraph
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-VG4EPHJA.js";
|
|
16
16
|
import {
|
|
17
17
|
Icon
|
|
18
18
|
} from "../chunk-IGQVA7SC.js";
|
|
@@ -28,11 +28,13 @@ function MobileDataGrid({
|
|
|
28
28
|
header,
|
|
29
29
|
getId,
|
|
30
30
|
renderLink,
|
|
31
|
-
renderChevron
|
|
31
|
+
renderChevron,
|
|
32
|
+
id
|
|
32
33
|
}) {
|
|
33
34
|
return /* @__PURE__ */ jsxs(
|
|
34
35
|
"div",
|
|
35
36
|
{
|
|
37
|
+
id,
|
|
36
38
|
className: clsx(
|
|
37
39
|
"rounded",
|
|
38
40
|
"overflow-hidden",
|
|
@@ -41,10 +43,17 @@ function MobileDataGrid({
|
|
|
41
43
|
"overflow-y-scroll scrollbar-thin"
|
|
42
44
|
),
|
|
43
45
|
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
MobileDataGridHeader,
|
|
48
|
+
{
|
|
49
|
+
id: id ? `${id}-header` : void 0,
|
|
50
|
+
header
|
|
51
|
+
}
|
|
52
|
+
),
|
|
45
53
|
data.map((item) => /* @__PURE__ */ jsx(
|
|
46
54
|
MobileDataGridCard,
|
|
47
55
|
{
|
|
56
|
+
id: id ? `${id}-card-${getId(item)}` : void 0,
|
|
48
57
|
data: item,
|
|
49
58
|
columns,
|
|
50
59
|
renderLink,
|
|
@@ -56,8 +65,8 @@ function MobileDataGrid({
|
|
|
56
65
|
}
|
|
57
66
|
);
|
|
58
67
|
}
|
|
59
|
-
function MobileDataGridHeader({ header }) {
|
|
60
|
-
return /* @__PURE__ */ jsx("div", { className: "sticky top-0", children: /* @__PURE__ */ jsx(Theme, { theme: "brand", children: /* @__PURE__ */ jsx(
|
|
68
|
+
function MobileDataGridHeader({ header, id }) {
|
|
69
|
+
return /* @__PURE__ */ jsx("div", { id, className: "sticky top-0", children: /* @__PURE__ */ jsx(Theme, { theme: "brand", children: /* @__PURE__ */ jsx(
|
|
61
70
|
Stack,
|
|
62
71
|
{
|
|
63
72
|
horizontal: true,
|
|
@@ -74,9 +83,10 @@ function MobileDataGridCard({
|
|
|
74
83
|
data,
|
|
75
84
|
columns,
|
|
76
85
|
renderLink,
|
|
77
|
-
renderChevron
|
|
86
|
+
renderChevron,
|
|
87
|
+
id
|
|
78
88
|
}) {
|
|
79
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", { id, children: [
|
|
80
90
|
/* @__PURE__ */ jsxs(Stack, { sizing: "component", padding: true, children: [
|
|
81
91
|
/* @__PURE__ */ jsxs(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
|
|
82
92
|
renderLink && renderLink(data),
|
|
@@ -84,6 +94,7 @@ function MobileDataGridCard({
|
|
|
84
94
|
/* @__PURE__ */ jsx(
|
|
85
95
|
Button,
|
|
86
96
|
{
|
|
97
|
+
id: id ? `${id}-docs-button` : void 0,
|
|
87
98
|
iconOnly: true,
|
|
88
99
|
variant: "tertiary",
|
|
89
100
|
onClick: () => console.log("Edit", data.id),
|
|
@@ -93,6 +104,7 @@ function MobileDataGridCard({
|
|
|
93
104
|
/* @__PURE__ */ jsx(
|
|
94
105
|
Button,
|
|
95
106
|
{
|
|
107
|
+
id: id ? `${id}-swap-button` : void 0,
|
|
96
108
|
iconOnly: true,
|
|
97
109
|
variant: "tertiary",
|
|
98
110
|
onClick: () => console.log("Edit", data.id),
|