@dmsi/wedgekit-react 0.0.26 → 0.0.28
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
package/dist/components/Toast.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-J6LETUNM.js";
|
|
5
5
|
import {
|
|
6
6
|
Button
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-MZJS2ZAU.js";
|
|
8
8
|
import {
|
|
9
9
|
Paragraph
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-VG4EPHJA.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon
|
|
13
13
|
} from "../chunk-IGQVA7SC.js";
|
|
@@ -92,6 +92,7 @@ function getToastRoot() {
|
|
|
92
92
|
}
|
|
93
93
|
var Toast = (_a) => {
|
|
94
94
|
var _b = _a, {
|
|
95
|
+
id,
|
|
95
96
|
variant = "success",
|
|
96
97
|
title,
|
|
97
98
|
message,
|
|
@@ -101,6 +102,7 @@ var Toast = (_a) => {
|
|
|
101
102
|
viewButtonLink,
|
|
102
103
|
showViewButton = false
|
|
103
104
|
} = _b, props = __objRest(_b, [
|
|
105
|
+
"id",
|
|
104
106
|
"variant",
|
|
105
107
|
"title",
|
|
106
108
|
"message",
|
|
@@ -118,9 +120,7 @@ var Toast = (_a) => {
|
|
|
118
120
|
useEffect(() => {
|
|
119
121
|
if (show && !showToast) {
|
|
120
122
|
if (toastElementRef.current) {
|
|
121
|
-
const animation = slideInFromBottomAnimation(
|
|
122
|
-
toastElementRef.current
|
|
123
|
-
);
|
|
123
|
+
const animation = slideInFromBottomAnimation(toastElementRef.current);
|
|
124
124
|
animationRef.current = animation;
|
|
125
125
|
animation.onfinish = () => {
|
|
126
126
|
onClose == null ? void 0 : onClose();
|
|
@@ -152,7 +152,10 @@ var Toast = (_a) => {
|
|
|
152
152
|
animationRef.current.addEventListener("finish", handleAnimationEnd);
|
|
153
153
|
return () => {
|
|
154
154
|
if (animationRef.current) {
|
|
155
|
-
animationRef.current.removeEventListener(
|
|
155
|
+
animationRef.current.removeEventListener(
|
|
156
|
+
"finish",
|
|
157
|
+
handleAnimationEnd
|
|
158
|
+
);
|
|
156
159
|
}
|
|
157
160
|
};
|
|
158
161
|
}
|
|
@@ -169,6 +172,7 @@ var Toast = (_a) => {
|
|
|
169
172
|
return /* @__PURE__ */ jsxs(
|
|
170
173
|
"div",
|
|
171
174
|
__spreadProps(__spreadValues({
|
|
175
|
+
id,
|
|
172
176
|
ref: toastElementRef,
|
|
173
177
|
onMouseEnter: handleMouseEnter,
|
|
174
178
|
onMouseLeave: handleMouseLeave,
|
|
@@ -184,10 +188,18 @@ var Toast = (_a) => {
|
|
|
184
188
|
iconElement,
|
|
185
189
|
/* @__PURE__ */ jsxs("div", { className: clsx("flex items-center", layoutGroupGap), children: [
|
|
186
190
|
/* @__PURE__ */ jsxs("div", { className: clsx("flex flex-col w-68", componentGap), children: [
|
|
187
|
-
title && /* @__PURE__ */ jsx(Heading3, { children: title }),
|
|
188
|
-
message && /* @__PURE__ */ jsx(Paragraph, { children: message })
|
|
191
|
+
title && /* @__PURE__ */ jsx(Heading3, { id: id ? `${id}-title` : void 0, children: title }),
|
|
192
|
+
message && /* @__PURE__ */ jsx(Paragraph, { id: id ? `${id}-message` : void 0, children: message })
|
|
189
193
|
] }),
|
|
190
|
-
showViewButton && /* @__PURE__ */ jsx(
|
|
194
|
+
showViewButton && /* @__PURE__ */ jsx(
|
|
195
|
+
Button,
|
|
196
|
+
{
|
|
197
|
+
id: id ? `${id}-view-button` : void 0,
|
|
198
|
+
variant: "tertiary",
|
|
199
|
+
href: viewButtonLink,
|
|
200
|
+
children: "View"
|
|
201
|
+
}
|
|
202
|
+
)
|
|
191
203
|
] })
|
|
192
204
|
]
|
|
193
205
|
})
|
|
@@ -207,6 +219,7 @@ function createToast(config) {
|
|
|
207
219
|
/* @__PURE__ */ jsx(
|
|
208
220
|
Toast,
|
|
209
221
|
{
|
|
222
|
+
id: config.id,
|
|
210
223
|
show: true,
|
|
211
224
|
onClose: handleClose,
|
|
212
225
|
variant: config.variant,
|
|
@@ -167,6 +167,7 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
167
167
|
// src/components/Tooltip.tsx
|
|
168
168
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
169
169
|
var Tooltip = ({
|
|
170
|
+
id,
|
|
170
171
|
message,
|
|
171
172
|
position = "top",
|
|
172
173
|
children,
|
|
@@ -175,7 +176,6 @@ var Tooltip = ({
|
|
|
175
176
|
}) => {
|
|
176
177
|
const ref = (0, import_react.useRef)(null);
|
|
177
178
|
const tooltipRef = (0, import_react.useRef)(null);
|
|
178
|
-
const [isTruncated, setIsTruncated] = (0, import_react.useState)(false);
|
|
179
179
|
const [tooltipPosition, setTooltipPosition] = (0, import_react.useState)({ top: 0, left: 0 });
|
|
180
180
|
const [isVisible, setIsVisible] = (0, import_react.useState)(false);
|
|
181
181
|
const [removeOpacity, setRemoveOpacity] = (0, import_react.useState)(false);
|
|
@@ -233,6 +233,7 @@ var Tooltip = ({
|
|
|
233
233
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
234
234
|
"div",
|
|
235
235
|
{
|
|
236
|
+
id,
|
|
236
237
|
ref,
|
|
237
238
|
className: "relative inline-grid grid-cols-[auto_1fr] items-center",
|
|
238
239
|
onMouseEnter: handleMouseEnter,
|
|
@@ -243,6 +244,7 @@ var Tooltip = ({
|
|
|
243
244
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
244
245
|
"div",
|
|
245
246
|
{
|
|
247
|
+
id: id ? `${id}-message` : void 0,
|
|
246
248
|
ref: tooltipRef,
|
|
247
249
|
style: {
|
|
248
250
|
position: "fixed",
|
|
@@ -268,9 +270,8 @@ var Tooltip = ({
|
|
|
268
270
|
if (showOnTruncation && ref.current) {
|
|
269
271
|
const paragraph = ref.current.querySelector("p");
|
|
270
272
|
if (paragraph) {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
return isTruncated2;
|
|
273
|
+
const isTruncated = paragraph.scrollWidth > paragraph.clientWidth;
|
|
274
|
+
return isTruncated;
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
277
|
return false;
|
|
@@ -193,13 +193,14 @@ var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
|
193
193
|
|
|
194
194
|
// src/components/LogoDMSiTopBar.tsx
|
|
195
195
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
196
|
-
function LogoDMSiTopBar() {
|
|
196
|
+
function LogoDMSiTopBar(props) {
|
|
197
197
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
198
198
|
"svg",
|
|
199
|
-
{
|
|
199
|
+
__spreadProps(__spreadValues({
|
|
200
200
|
width: "106",
|
|
201
201
|
height: "24",
|
|
202
|
-
viewBox: "0 0 106 24"
|
|
202
|
+
viewBox: "0 0 106 24"
|
|
203
|
+
}, props), {
|
|
203
204
|
fill: "none",
|
|
204
205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
205
206
|
children: [
|
|
@@ -239,7 +240,7 @@ function LogoDMSiTopBar() {
|
|
|
239
240
|
}
|
|
240
241
|
)
|
|
241
242
|
]
|
|
242
|
-
}
|
|
243
|
+
})
|
|
243
244
|
);
|
|
244
245
|
}
|
|
245
246
|
|
|
@@ -252,19 +253,22 @@ var TopBarBase = (_a) => {
|
|
|
252
253
|
topNavLinks,
|
|
253
254
|
mobileLeft,
|
|
254
255
|
mobileRight,
|
|
255
|
-
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {})
|
|
256
|
+
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {}),
|
|
257
|
+
id
|
|
256
258
|
} = _b, props = __objRest(_b, [
|
|
257
259
|
"left",
|
|
258
260
|
"right",
|
|
259
261
|
"topNavLinks",
|
|
260
262
|
"mobileLeft",
|
|
261
263
|
"mobileRight",
|
|
262
|
-
"brandLogo"
|
|
264
|
+
"brandLogo",
|
|
265
|
+
"id"
|
|
263
266
|
]);
|
|
264
267
|
const defaultStyles = (0, import_clsx2.default)("bg-background-primary-normal");
|
|
265
268
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
266
269
|
"div",
|
|
267
270
|
__spreadProps(__spreadValues({
|
|
271
|
+
id,
|
|
268
272
|
className: (0, import_clsx2.default)(
|
|
269
273
|
"flex items-center justify-between",
|
|
270
274
|
containerPaddingX,
|
|
@@ -330,19 +334,23 @@ var TopBarBase = (_a) => {
|
|
|
330
334
|
var TopBar = (_a) => {
|
|
331
335
|
var _b = _a, {
|
|
332
336
|
left,
|
|
333
|
-
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {})
|
|
337
|
+
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {}),
|
|
338
|
+
id
|
|
334
339
|
} = _b, props = __objRest(_b, [
|
|
335
340
|
"left",
|
|
336
|
-
"brandLogo"
|
|
341
|
+
"brandLogo",
|
|
342
|
+
"id"
|
|
337
343
|
]);
|
|
338
344
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
339
345
|
TopBarBase,
|
|
340
346
|
__spreadProps(__spreadValues({}, props), {
|
|
347
|
+
id,
|
|
341
348
|
brandLogo,
|
|
342
349
|
left: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
343
350
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
344
351
|
"a",
|
|
345
352
|
{
|
|
353
|
+
id: id ? `${id}-brand-logo-link` : void 0,
|
|
346
354
|
href: "/",
|
|
347
355
|
className: "grow max-w-[400px] h-auto max-h-10 *:max-h-[inherit]",
|
|
348
356
|
children: brandLogo && brandLogo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LogoDMSiTopBar
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QBIEU25R.js";
|
|
4
4
|
import {
|
|
5
5
|
containerPaddingX,
|
|
6
6
|
gapUsingContainerPadding,
|
|
@@ -24,19 +24,22 @@ var TopBarBase = (_a) => {
|
|
|
24
24
|
topNavLinks,
|
|
25
25
|
mobileLeft,
|
|
26
26
|
mobileRight,
|
|
27
|
-
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {})
|
|
27
|
+
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {}),
|
|
28
|
+
id
|
|
28
29
|
} = _b, props = __objRest(_b, [
|
|
29
30
|
"left",
|
|
30
31
|
"right",
|
|
31
32
|
"topNavLinks",
|
|
32
33
|
"mobileLeft",
|
|
33
34
|
"mobileRight",
|
|
34
|
-
"brandLogo"
|
|
35
|
+
"brandLogo",
|
|
36
|
+
"id"
|
|
35
37
|
]);
|
|
36
38
|
const defaultStyles = clsx("bg-background-primary-normal");
|
|
37
39
|
return /* @__PURE__ */ jsxs(
|
|
38
40
|
"div",
|
|
39
41
|
__spreadProps(__spreadValues({
|
|
42
|
+
id,
|
|
40
43
|
className: clsx(
|
|
41
44
|
"flex items-center justify-between",
|
|
42
45
|
containerPaddingX,
|
|
@@ -102,19 +105,23 @@ var TopBarBase = (_a) => {
|
|
|
102
105
|
var TopBar = (_a) => {
|
|
103
106
|
var _b = _a, {
|
|
104
107
|
left,
|
|
105
|
-
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {})
|
|
108
|
+
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {}),
|
|
109
|
+
id
|
|
106
110
|
} = _b, props = __objRest(_b, [
|
|
107
111
|
"left",
|
|
108
|
-
"brandLogo"
|
|
112
|
+
"brandLogo",
|
|
113
|
+
"id"
|
|
109
114
|
]);
|
|
110
115
|
return /* @__PURE__ */ jsx(
|
|
111
116
|
TopBarBase,
|
|
112
117
|
__spreadProps(__spreadValues({}, props), {
|
|
118
|
+
id,
|
|
113
119
|
brandLogo,
|
|
114
120
|
left: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
115
121
|
/* @__PURE__ */ jsx(
|
|
116
122
|
"a",
|
|
117
123
|
{
|
|
124
|
+
id: id ? `${id}-brand-logo-link` : void 0,
|
|
118
125
|
href: "/",
|
|
119
126
|
className: "grow max-w-[400px] h-auto max-h-10 *:max-h-[inherit]",
|
|
120
127
|
children: brandLogo && brandLogo
|
package/package.json
CHANGED
|
@@ -3,22 +3,28 @@
|
|
|
3
3
|
import React, { useLayoutEffect, useState } from "react";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { Link } from "./Link";
|
|
6
|
-
|
|
7
6
|
import { Icon } from "./Icon";
|
|
8
7
|
|
|
9
8
|
type BreadcrumbsProps = {
|
|
10
9
|
asCardStyle?: boolean;
|
|
11
10
|
path?: string; // Optional override for SSR / testing
|
|
12
11
|
crumbs: BreadcrumbProps[];
|
|
12
|
+
id?: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
type BreadcrumbProps = {
|
|
16
16
|
href: string;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
onClick?: () => void; // Optional click handler
|
|
19
|
+
id?: string;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
export const Breadcrumb = ({
|
|
22
|
+
export const Breadcrumb = ({
|
|
23
|
+
href,
|
|
24
|
+
children,
|
|
25
|
+
onClick,
|
|
26
|
+
id,
|
|
27
|
+
}: BreadcrumbProps) => {
|
|
22
28
|
const linkPadding = clsx(
|
|
23
29
|
"!text-text-link-normal whitespace-nowrap",
|
|
24
30
|
"py-[calc(var(--spacing-mobile-component-padding)_+_3px)]",
|
|
@@ -27,8 +33,13 @@ export const Breadcrumb = ({ href, children, onClick }: BreadcrumbProps) => {
|
|
|
27
33
|
);
|
|
28
34
|
|
|
29
35
|
return (
|
|
30
|
-
<li key={href} className="flex items-center">
|
|
31
|
-
<Link
|
|
36
|
+
<li key={href} id={id} className="flex items-center">
|
|
37
|
+
<Link
|
|
38
|
+
id={id ? `${id}-link` : undefined}
|
|
39
|
+
className={linkPadding}
|
|
40
|
+
href={href}
|
|
41
|
+
onClick={onClick}
|
|
42
|
+
>
|
|
32
43
|
{children}
|
|
33
44
|
</Link>
|
|
34
45
|
</li>
|
|
@@ -36,35 +47,27 @@ export const Breadcrumb = ({ href, children, onClick }: BreadcrumbProps) => {
|
|
|
36
47
|
};
|
|
37
48
|
|
|
38
49
|
const Chevron = () => (
|
|
39
|
-
<li className="flex items-center">
|
|
50
|
+
<li className="flex items-center" aria-hidden="true">
|
|
40
51
|
<Icon name="chevron_right" size={16} />
|
|
41
52
|
</li>
|
|
42
53
|
);
|
|
43
54
|
|
|
44
|
-
export const Breadcrumbs = ({
|
|
45
|
-
asCardStyle,
|
|
46
|
-
|
|
47
|
-
crumbs,
|
|
48
|
-
}: BreadcrumbsProps) => {
|
|
55
|
+
export const Breadcrumbs = ({ asCardStyle, id, crumbs }: BreadcrumbsProps) => {
|
|
49
56
|
const scrollableElement = React.useRef<HTMLElement | null>(null);
|
|
50
|
-
|
|
51
57
|
const [isOverflow, setIsOverflow] = useState(false);
|
|
52
58
|
|
|
53
59
|
useLayoutEffect(() => {
|
|
54
|
-
console.log(scrollableElement.current);
|
|
55
60
|
scrollableElement.current?.scrollTo({
|
|
56
61
|
left: scrollableElement.current?.scrollWidth ?? 0,
|
|
57
62
|
behavior: "instant",
|
|
58
63
|
});
|
|
59
64
|
|
|
60
65
|
updateOverflow();
|
|
61
|
-
// Scroll to the start of the breadcrumbs when the component mounts
|
|
62
66
|
}, [scrollableElement, crumbs]);
|
|
63
67
|
|
|
64
68
|
const updateOverflow = () => {
|
|
65
69
|
if (!scrollableElement.current) return;
|
|
66
70
|
|
|
67
|
-
// Check if the scrollable element has overflow
|
|
68
71
|
setIsOverflow(
|
|
69
72
|
scrollableElement.current.scrollWidth !==
|
|
70
73
|
scrollableElement.current.clientWidth &&
|
|
@@ -74,6 +77,7 @@ export const Breadcrumbs = ({
|
|
|
74
77
|
|
|
75
78
|
return (
|
|
76
79
|
<nav
|
|
80
|
+
id={id}
|
|
77
81
|
className={clsx(
|
|
78
82
|
"relative select-none flex items-center max-w-full w-full",
|
|
79
83
|
{
|
|
@@ -92,6 +96,7 @@ export const Breadcrumbs = ({
|
|
|
92
96
|
/>
|
|
93
97
|
|
|
94
98
|
<ol
|
|
99
|
+
id={id ? `${id}-list` : undefined}
|
|
95
100
|
className="flex items-center overflow-x-scroll"
|
|
96
101
|
style={{ scrollbarWidth: "none" }}
|
|
97
102
|
onScroll={updateOverflow}
|
|
@@ -105,7 +110,11 @@ export const Breadcrumbs = ({
|
|
|
105
110
|
return (
|
|
106
111
|
<React.Fragment key={index}>
|
|
107
112
|
{index > 0 && <Chevron />}
|
|
108
|
-
<Breadcrumb
|
|
113
|
+
<Breadcrumb
|
|
114
|
+
href={href}
|
|
115
|
+
onClick={onClick}
|
|
116
|
+
id={id ? `${id}-crumb-${index}` : undefined}
|
|
117
|
+
>
|
|
109
118
|
{children}
|
|
110
119
|
</Breadcrumb>
|
|
111
120
|
</React.Fragment>
|
|
@@ -31,6 +31,7 @@ type BaseButtonProps = Omit<
|
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
colorClassName?: string;
|
|
33
33
|
href?: string;
|
|
34
|
+
id?: string;
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
// At least one of leftIcon, rightIcon, or children must be provided
|
|
@@ -54,9 +55,9 @@ export const Button = ({
|
|
|
54
55
|
iconOnly = false,
|
|
55
56
|
colorClassName,
|
|
56
57
|
href,
|
|
58
|
+
id,
|
|
57
59
|
...props
|
|
58
60
|
}: AsProps<Tags> & ButtonProps) => {
|
|
59
|
-
|
|
60
61
|
const primaryVariantStyles =
|
|
61
62
|
variant === "primary" &&
|
|
62
63
|
clsx(
|
|
@@ -147,7 +148,7 @@ export const Button = ({
|
|
|
147
148
|
? colorClassName
|
|
148
149
|
: "text-text-on-action-primary-normal",
|
|
149
150
|
"bg-transparent",
|
|
150
|
-
"hover:bg-background-on-action-secondary-hover hover:text-brand-text-action-primary-hover",
|
|
151
|
+
"hover:bg-background-on-action-secondary-hover hover:text-brand-text-action-primary-hover",
|
|
151
152
|
// "hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover", // Will use this once colors are finalized
|
|
152
153
|
"focus:bg-background-on-action-secondary-hover focus:text-brand-text-action-primary-hover focus:outline-0",
|
|
153
154
|
// "focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover", // Will use this once colors are finalized
|
|
@@ -190,6 +191,7 @@ export const Button = ({
|
|
|
190
191
|
|
|
191
192
|
return (
|
|
192
193
|
<Element
|
|
194
|
+
id={id}
|
|
193
195
|
type={Element === "button" ? "button" : undefined}
|
|
194
196
|
className={buttonClasses}
|
|
195
197
|
{...props}
|
|
@@ -199,7 +201,9 @@ export const Button = ({
|
|
|
199
201
|
{leftIcon && leftIcon}
|
|
200
202
|
|
|
201
203
|
{!iconOnly && children && (
|
|
202
|
-
<span className={labelClasses}>
|
|
204
|
+
<span id={id ? `${id}-label` : undefined} className={labelClasses}>
|
|
205
|
+
{children}
|
|
206
|
+
</span>
|
|
203
207
|
)}
|
|
204
208
|
|
|
205
209
|
{rightIcon && rightIcon}
|
|
@@ -25,6 +25,7 @@ export interface CalendarRangeProps {
|
|
|
25
25
|
* Only applies when mode is "single".
|
|
26
26
|
*/
|
|
27
27
|
disableRange?: boolean;
|
|
28
|
+
id?: string;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
/**
|
|
@@ -53,6 +54,7 @@ interface DateCellProps {
|
|
|
53
54
|
isRangeEnd?: boolean;
|
|
54
55
|
/** True if range selection is disabled in single mode */
|
|
55
56
|
isRangeDisabled?: boolean;
|
|
57
|
+
id?: string;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
function DateCell({
|
|
@@ -69,11 +71,13 @@ function DateCell({
|
|
|
69
71
|
onMouseLeave,
|
|
70
72
|
cellPadding = "",
|
|
71
73
|
isRangeDisabled = false,
|
|
74
|
+
id,
|
|
72
75
|
...props
|
|
73
76
|
}: DateCellProps & { cellPadding?: string }) {
|
|
74
77
|
return (
|
|
75
78
|
<span
|
|
76
79
|
{...props}
|
|
80
|
+
id={id}
|
|
77
81
|
className={clsx(
|
|
78
82
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
79
83
|
typography.caption,
|
|
@@ -137,6 +141,7 @@ export function CalendarRange({
|
|
|
137
141
|
mode = "double",
|
|
138
142
|
cardStyle = false,
|
|
139
143
|
disableRange = false,
|
|
144
|
+
id,
|
|
140
145
|
}: CalendarRangeProps) {
|
|
141
146
|
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
142
147
|
// Parse from/to props
|
|
@@ -238,6 +243,7 @@ export function CalendarRange({
|
|
|
238
243
|
// Render
|
|
239
244
|
return (
|
|
240
245
|
<div
|
|
246
|
+
id={id}
|
|
241
247
|
className={clsx(
|
|
242
248
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
243
249
|
layoutPaddding,
|
|
@@ -275,6 +281,7 @@ export function CalendarRange({
|
|
|
275
281
|
>
|
|
276
282
|
{idx === 0 ? (
|
|
277
283
|
<button
|
|
284
|
+
id={id ? `${id}-prev-month-button` : undefined}
|
|
278
285
|
type="button"
|
|
279
286
|
className={clsx(
|
|
280
287
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -300,6 +307,7 @@ export function CalendarRange({
|
|
|
300
307
|
</div>
|
|
301
308
|
{(mode === "double" ? idx === 1 : true) ? (
|
|
302
309
|
<button
|
|
310
|
+
id={id ? `${id}-next-month-button` : undefined}
|
|
303
311
|
type="button"
|
|
304
312
|
className={clsx(
|
|
305
313
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
@@ -379,6 +387,7 @@ export function CalendarRange({
|
|
|
379
387
|
return (
|
|
380
388
|
<DateCell
|
|
381
389
|
key={i}
|
|
390
|
+
id={id ? `${id}-date-${date.toString()}` : undefined}
|
|
382
391
|
date={date}
|
|
383
392
|
isInMonth={!!isInMonth}
|
|
384
393
|
isToday={!!isToday}
|
|
@@ -11,6 +11,7 @@ type Style = {
|
|
|
11
11
|
type CaptionProps = {
|
|
12
12
|
as?: Tags;
|
|
13
13
|
style?: Style["style"];
|
|
14
|
+
id?: string;
|
|
14
15
|
} & AsProps<Tags> &
|
|
15
16
|
TextAttributes &
|
|
16
17
|
TypographyProps;
|
|
@@ -22,15 +23,22 @@ export const Caption = ({
|
|
|
22
23
|
style = "default",
|
|
23
24
|
color,
|
|
24
25
|
align,
|
|
26
|
+
id,
|
|
25
27
|
...props
|
|
26
28
|
}: CaptionProps) => {
|
|
27
29
|
const Element = as;
|
|
28
30
|
|
|
29
31
|
return (
|
|
30
|
-
<div className="flex gap-1">
|
|
31
|
-
<WhichIcon
|
|
32
|
+
<div id={id} className="flex gap-1">
|
|
33
|
+
<WhichIcon
|
|
34
|
+
id={id}
|
|
35
|
+
style={style}
|
|
36
|
+
size={16}
|
|
37
|
+
className="mt-[3px] desktop:mt-0"
|
|
38
|
+
/>
|
|
32
39
|
|
|
33
40
|
<Element
|
|
41
|
+
id={id ? `${id}-text` : undefined}
|
|
34
42
|
className={clsx(
|
|
35
43
|
typography.caption.replace("text-text-primary-normal", ""),
|
|
36
44
|
(style === "default" || style === "info") &&
|
|
@@ -58,15 +66,22 @@ const WhichIcon = ({
|
|
|
58
66
|
style,
|
|
59
67
|
size,
|
|
60
68
|
className,
|
|
69
|
+
id,
|
|
61
70
|
}: {
|
|
62
71
|
style: Style["style"];
|
|
63
72
|
size: IconSize;
|
|
64
73
|
className?: string;
|
|
74
|
+
id?: string;
|
|
65
75
|
}) => {
|
|
66
76
|
if (style === "success") {
|
|
67
77
|
return (
|
|
68
78
|
<span className="text-icon-success-normal contents">
|
|
69
|
-
<Icon
|
|
79
|
+
<Icon
|
|
80
|
+
id={id ? `${id}-icon` : undefined}
|
|
81
|
+
className={className}
|
|
82
|
+
name="check_circle"
|
|
83
|
+
size={size}
|
|
84
|
+
/>
|
|
70
85
|
</span>
|
|
71
86
|
);
|
|
72
87
|
}
|
|
@@ -74,7 +89,12 @@ const WhichIcon = ({
|
|
|
74
89
|
if (style === "warning") {
|
|
75
90
|
return (
|
|
76
91
|
<span className="text-icon-warning-normal contents">
|
|
77
|
-
<Icon
|
|
92
|
+
<Icon
|
|
93
|
+
id={id ? `${id}-icon` : undefined}
|
|
94
|
+
className={className}
|
|
95
|
+
name="warning"
|
|
96
|
+
size={size}
|
|
97
|
+
/>
|
|
78
98
|
</span>
|
|
79
99
|
);
|
|
80
100
|
}
|
|
@@ -82,7 +102,12 @@ const WhichIcon = ({
|
|
|
82
102
|
if (style === "error") {
|
|
83
103
|
return (
|
|
84
104
|
<span className="text-icon-critical-normal contents">
|
|
85
|
-
<Icon
|
|
105
|
+
<Icon
|
|
106
|
+
id={id ? `${id}-icon` : undefined}
|
|
107
|
+
className={className}
|
|
108
|
+
name="info"
|
|
109
|
+
size={size}
|
|
110
|
+
/>
|
|
86
111
|
</span>
|
|
87
112
|
);
|
|
88
113
|
}
|
|
@@ -90,7 +115,12 @@ const WhichIcon = ({
|
|
|
90
115
|
if (style === "info") {
|
|
91
116
|
return (
|
|
92
117
|
<span className="text-icon-primary-normal contents">
|
|
93
|
-
<Icon
|
|
118
|
+
<Icon
|
|
119
|
+
id={id ? `${id}-icon` : undefined}
|
|
120
|
+
className={className}
|
|
121
|
+
name="info"
|
|
122
|
+
size={size}
|
|
123
|
+
/>
|
|
94
124
|
</span>
|
|
95
125
|
);
|
|
96
126
|
}
|
|
@@ -8,12 +8,13 @@ import { Paragraph } from "./Paragraph";
|
|
|
8
8
|
interface CheckboxProps
|
|
9
9
|
extends Omit<
|
|
10
10
|
ComponentProps<"input">,
|
|
11
|
-
"type" | "className" | "children" | "dangerouslySetInnerHTML"
|
|
11
|
+
"type" | "className" | "children" | "dangerouslySetInnerHTML" | "id"
|
|
12
12
|
> {
|
|
13
13
|
label?: string;
|
|
14
14
|
error?: boolean;
|
|
15
15
|
indeterminate?: boolean;
|
|
16
16
|
paragraphClassName?: string;
|
|
17
|
+
id?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const Checkbox = ({
|
|
@@ -25,6 +26,7 @@ export const Checkbox = ({
|
|
|
25
26
|
onChange,
|
|
26
27
|
indeterminate,
|
|
27
28
|
paragraphClassName,
|
|
29
|
+
id,
|
|
28
30
|
...props
|
|
29
31
|
}: CheckboxProps) => {
|
|
30
32
|
const selected = indeterminate || checked;
|
|
@@ -78,6 +80,8 @@ export const Checkbox = ({
|
|
|
78
80
|
|
|
79
81
|
return (
|
|
80
82
|
<label
|
|
83
|
+
id={id}
|
|
84
|
+
htmlFor={`${id}-input`}
|
|
81
85
|
className={clsx(
|
|
82
86
|
"flex items-center",
|
|
83
87
|
componentGap,
|
|
@@ -87,12 +91,12 @@ export const Checkbox = ({
|
|
|
87
91
|
>
|
|
88
92
|
<div className="relative">
|
|
89
93
|
<input
|
|
94
|
+
id={id ? `${id}-input` : undefined}
|
|
90
95
|
type="checkbox"
|
|
91
96
|
className="sr-only peer"
|
|
92
97
|
disabled={disabled}
|
|
93
98
|
checked={selected}
|
|
94
99
|
onChange={handleOnChange}
|
|
95
|
-
id={props.id}
|
|
96
100
|
data-indeterminate={indeterminate}
|
|
97
101
|
{...props}
|
|
98
102
|
/>
|
|
@@ -169,6 +173,7 @@ export const Checkbox = ({
|
|
|
169
173
|
|
|
170
174
|
{label && (
|
|
171
175
|
<Paragraph
|
|
176
|
+
id={id ? `${id}-label` : undefined}
|
|
172
177
|
as="span"
|
|
173
178
|
padded
|
|
174
179
|
className={clsx(
|