@dmsi/wedgekit-react 0.0.475 → 0.0.477
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-IG2YUDHI.js → chunk-24K4HHV5.js} +4 -4
- package/dist/{chunk-OEMLNGE2.js → chunk-4Q7T4GJ2.js} +2 -2
- package/dist/chunk-4UH72JT2.js +104 -0
- package/dist/{chunk-KJNK7KEV.js → chunk-QMSPTD6L.js} +1 -1
- package/dist/{chunk-GTPSPGSJ.js → chunk-WIDUWFLX.js} +761 -47
- package/dist/components/Accordion.js +2 -2
- package/dist/components/Alert.cjs +787 -0
- package/dist/components/Alert.js +13 -0
- package/dist/components/CalendarRange.cjs +465 -160
- package/dist/components/CalendarRange.css +3 -0
- package/dist/components/CalendarRange.js +19 -19
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +918 -148
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +3 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +19 -18
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +928 -158
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +3 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +19 -18
- package/dist/components/DataGrid/PinnedColumns.cjs +943 -173
- package/dist/components/DataGrid/PinnedColumns.css +3 -0
- package/dist/components/DataGrid/PinnedColumns.js +19 -18
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +919 -149
- package/dist/components/DataGrid/TableBody/LoadingCell.css +3 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +19 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +925 -155
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +3 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +19 -18
- package/dist/components/DataGrid/TableBody/index.cjs +940 -170
- package/dist/components/DataGrid/TableBody/index.css +3 -0
- package/dist/components/DataGrid/TableBody/index.js +19 -18
- package/dist/components/DataGrid/index.cjs +1029 -259
- package/dist/components/DataGrid/index.css +3 -0
- package/dist/components/DataGrid/index.js +19 -18
- package/dist/components/DataGrid/utils.cjs +919 -149
- package/dist/components/DataGrid/utils.css +3 -0
- package/dist/components/DataGrid/utils.js +19 -18
- package/dist/components/DataGridCell.js +2 -2
- package/dist/components/DateInput.cjs +70 -65
- package/dist/components/DateInput.css +3 -0
- package/dist/components/DateInput.js +25 -271
- package/dist/components/DateRangeInput.cjs +419 -184
- package/dist/components/DateRangeInput.css +3 -0
- package/dist/components/DateRangeInput.js +19 -19
- package/dist/components/FilterGroup.js +6 -6
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +925 -155
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +3 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +19 -18
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +923 -153
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +3 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +19 -18
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +6 -6
- package/dist/components/MobileDataGrid/index.cjs +973 -203
- package/dist/components/MobileDataGrid/index.css +3 -0
- package/dist/components/MobileDataGrid/index.js +19 -18
- package/dist/components/Modal.js +3 -3
- package/dist/components/Notification.js +3 -3
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.js +6 -6
- package/dist/components/SideMenuItem.js +3 -3
- package/dist/components/Swatch.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +1212 -363
- package/dist/components/index.css +3 -0
- package/dist/components/index.js +34 -28
- package/dist/index.css +3 -0
- package/package.json +1 -1
- package/src/components/Alert.tsx +81 -0
- package/src/components/index.ts +2 -0
- package/dist/chunk-X35NLL3N.js +0 -493
- package/dist/{chunk-IT4VFU6T.js → chunk-3DEYCNUE.js} +3 -3
- package/dist/{chunk-GTBGPBH6.js → chunk-B53XDCLO.js} +3 -3
- package/dist/{chunk-ZQSD74IJ.js → chunk-IY7SXEVY.js} +3 -3
- package/dist/{chunk-BFFNSUNS.js → chunk-QBSEKZWX.js} +3 -3
- package/dist/{chunk-NIWXVOBW.js → chunk-X67L3NZI.js} +3 -3
- package/dist/{chunk-TVXBP5CW.js → chunk-XIXQUEYC.js} +3 -3
|
@@ -0,0 +1,787 @@
|
|
|
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/Alert.tsx
|
|
60
|
+
var Alert_exports = {};
|
|
61
|
+
__export(Alert_exports, {
|
|
62
|
+
Alert: () => Alert
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(Alert_exports);
|
|
65
|
+
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
66
|
+
|
|
67
|
+
// src/components/Button.tsx
|
|
68
|
+
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
69
|
+
|
|
70
|
+
// src/classNames.ts
|
|
71
|
+
var import_clsx = __toESM(require("clsx"), 1);
|
|
72
|
+
var typography = {
|
|
73
|
+
display1: (0, import_clsx.default)(
|
|
74
|
+
"font-sans font-semibold",
|
|
75
|
+
"text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
|
|
76
|
+
"leading-display-1-mobile desktop:leading-display-1-desktop"
|
|
77
|
+
),
|
|
78
|
+
display2: (0, import_clsx.default)(
|
|
79
|
+
"font-sans font-bold",
|
|
80
|
+
"text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
|
|
81
|
+
"leading-display-2-mobile desktop:leading-display-2-desktop"
|
|
82
|
+
),
|
|
83
|
+
heading1: (0, import_clsx.default)(
|
|
84
|
+
"font-sans font-semibold",
|
|
85
|
+
"text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
|
|
86
|
+
"leading-heading-1-mobile desktop:leading-heading-1-desktop"
|
|
87
|
+
),
|
|
88
|
+
heading2: (0, import_clsx.default)(
|
|
89
|
+
"font-sans font-normal",
|
|
90
|
+
"text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
|
|
91
|
+
"leading-heading-2-mobile desktop:leading-heading-2-desktop"
|
|
92
|
+
),
|
|
93
|
+
heading3: (0, import_clsx.default)(
|
|
94
|
+
"font-sans font-semibold",
|
|
95
|
+
"text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
|
|
96
|
+
"leading-heading-3-mobile desktop:leading-heading-3-desktop"
|
|
97
|
+
),
|
|
98
|
+
subheader: (0, import_clsx.default)(
|
|
99
|
+
"font-sans font-semibold",
|
|
100
|
+
"text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
|
|
101
|
+
"leading-subheader-mobile desktop:leading-subheader-desktop"
|
|
102
|
+
),
|
|
103
|
+
link: (0, import_clsx.default)(
|
|
104
|
+
"font-sans font-normal",
|
|
105
|
+
"text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
|
|
106
|
+
"leading-link-mobile desktop:leading-link-desktop"
|
|
107
|
+
),
|
|
108
|
+
buttonLabel: (0, import_clsx.default)(
|
|
109
|
+
"font-sans font-semibold",
|
|
110
|
+
"text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
|
|
111
|
+
"leading-label-mobile desktop:leading-label-desktop"
|
|
112
|
+
),
|
|
113
|
+
label: (0, import_clsx.default)(
|
|
114
|
+
"font-sans font-semibold",
|
|
115
|
+
"text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
|
|
116
|
+
"leading-label-mobile desktop:leading-label-desktop"
|
|
117
|
+
),
|
|
118
|
+
paragraph: (0, import_clsx.default)(
|
|
119
|
+
"font-sans font-normal",
|
|
120
|
+
"text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
|
|
121
|
+
"leading-paragraph-mobile desktop:leading-paragraph-desktop"
|
|
122
|
+
),
|
|
123
|
+
caption: (0, import_clsx.default)(
|
|
124
|
+
"font-sans font-normal",
|
|
125
|
+
"text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
|
|
126
|
+
"leading-caption-mobile desktop:leading-caption-desktop"
|
|
127
|
+
),
|
|
128
|
+
breadcrumb: (0, import_clsx.default)(
|
|
129
|
+
"font-sans font-normal",
|
|
130
|
+
"text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
|
|
131
|
+
"leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
|
|
132
|
+
)
|
|
133
|
+
};
|
|
134
|
+
var baseTransition = (0, import_clsx.default)(
|
|
135
|
+
"transition-colors duration-100 ease-in-out"
|
|
136
|
+
);
|
|
137
|
+
var componentGap = (0, import_clsx.default)(
|
|
138
|
+
"gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
|
|
139
|
+
);
|
|
140
|
+
var paddingUsingComponentGap = (0, import_clsx.default)(
|
|
141
|
+
"p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
|
|
142
|
+
);
|
|
143
|
+
var paddingXUsingLayoutGroupGap = (0, import_clsx.default)(
|
|
144
|
+
"px-mobile-layout-group-gap desktop:px-desktop-layout-group-gap compact:px-desktop-compact-layout-group-gap"
|
|
145
|
+
);
|
|
146
|
+
var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
|
|
147
|
+
"py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
|
|
148
|
+
);
|
|
149
|
+
var componentPadding = (0, import_clsx.default)(
|
|
150
|
+
"p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
|
|
151
|
+
);
|
|
152
|
+
var componentPaddingBottom = (0, import_clsx.default)(
|
|
153
|
+
"pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
|
|
154
|
+
);
|
|
155
|
+
var componentPaddingX = (0, import_clsx.default)(
|
|
156
|
+
"px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding"
|
|
157
|
+
);
|
|
158
|
+
var componentPaddingY = (0, import_clsx.default)(
|
|
159
|
+
"py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
|
|
160
|
+
);
|
|
161
|
+
var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
|
|
162
|
+
"px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
|
|
163
|
+
);
|
|
164
|
+
var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
|
|
165
|
+
"py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
|
|
166
|
+
);
|
|
167
|
+
var componentPaddingYUsingComponentGap2xMobile = (0, import_clsx.default)(
|
|
168
|
+
"py-[calc(var(--spacing-mobile-component-gap)_+_8px)] desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
|
|
169
|
+
);
|
|
170
|
+
var componentPaddingMinusBorder = (0, import_clsx.default)(
|
|
171
|
+
"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)]"
|
|
172
|
+
);
|
|
173
|
+
var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
|
|
174
|
+
"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)]"
|
|
175
|
+
);
|
|
176
|
+
var componentPaddingMinusBorderDesktop = (0, import_clsx.default)(
|
|
177
|
+
"p-[calc(var(--spacing-desktop-component-padding)_-_1px)]"
|
|
178
|
+
);
|
|
179
|
+
var layoutPaddding = (0, import_clsx.default)(
|
|
180
|
+
"p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding"
|
|
181
|
+
);
|
|
182
|
+
var layoutPaddingBottom = (0, import_clsx.default)(
|
|
183
|
+
"pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
|
|
184
|
+
);
|
|
185
|
+
var layoutPaddingY = (0, import_clsx.default)(
|
|
186
|
+
"py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
|
|
187
|
+
);
|
|
188
|
+
var containerPaddingX = (0, import_clsx.default)(
|
|
189
|
+
"px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
|
|
190
|
+
);
|
|
191
|
+
var containerPaddingY = (0, import_clsx.default)(
|
|
192
|
+
"py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
|
|
193
|
+
);
|
|
194
|
+
var layoutGroupGapPaddingY = (0, import_clsx.default)(
|
|
195
|
+
"py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
|
|
196
|
+
);
|
|
197
|
+
var layoutGroupGap = (0, import_clsx.default)(
|
|
198
|
+
"gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
|
|
199
|
+
);
|
|
200
|
+
var layoutGap = (0, import_clsx.default)(
|
|
201
|
+
"gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
|
|
202
|
+
);
|
|
203
|
+
var gapUsingContainerPadding = (0, import_clsx.default)(
|
|
204
|
+
"gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
// src/components/Button.tsx
|
|
208
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
209
|
+
var Button = (_a) => {
|
|
210
|
+
var _b = _a, {
|
|
211
|
+
variant = "primary",
|
|
212
|
+
as = "button",
|
|
213
|
+
block,
|
|
214
|
+
leftIcon,
|
|
215
|
+
rightIcon,
|
|
216
|
+
className,
|
|
217
|
+
classNameLabel,
|
|
218
|
+
disabled = false,
|
|
219
|
+
children,
|
|
220
|
+
iconOnly = false,
|
|
221
|
+
colorClassName,
|
|
222
|
+
href,
|
|
223
|
+
id,
|
|
224
|
+
testid
|
|
225
|
+
} = _b, props = __objRest(_b, [
|
|
226
|
+
"variant",
|
|
227
|
+
"as",
|
|
228
|
+
"block",
|
|
229
|
+
"leftIcon",
|
|
230
|
+
"rightIcon",
|
|
231
|
+
"className",
|
|
232
|
+
"classNameLabel",
|
|
233
|
+
"disabled",
|
|
234
|
+
"children",
|
|
235
|
+
"iconOnly",
|
|
236
|
+
"colorClassName",
|
|
237
|
+
"href",
|
|
238
|
+
"id",
|
|
239
|
+
"testid"
|
|
240
|
+
]);
|
|
241
|
+
const primaryVariantStyles = variant === "primary" && (0, import_clsx2.default)(
|
|
242
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
243
|
+
"bg-background-action-primary-normal border-background-action-primary-normal",
|
|
244
|
+
"hover:bg-background-action-primary-hover hover:border-background-action-primary-hover",
|
|
245
|
+
"focus:bg-background-action-primary-hover focus:border-background-action-primary-hover focus:outline-0",
|
|
246
|
+
"active:bg-background-action-primary-active active:border-background-action-primary-active",
|
|
247
|
+
"disabled:bg-background-action-primary-disabled disabled:border-background-action-primary-disabled disabled:text-text-on-action-primary-disabled"
|
|
248
|
+
);
|
|
249
|
+
const secondaryVariantStyles = variant === "secondary" && (0, import_clsx2.default)(
|
|
250
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
251
|
+
"bg-background-action-secondary-normal border-border-action-normal",
|
|
252
|
+
"hover:bg-background-action-secondary-hover hover:border-border-action-hover hover:text-text-action-primary-hover",
|
|
253
|
+
"focus:bg-background-action-secondary-hover focus:border-border-action-hover focus:text-text-action-primary-hover focus:outline-0",
|
|
254
|
+
"active:bg-background-action-secondary-active active:border-border-action-active active:text-text-action-primary-active",
|
|
255
|
+
"disabled:bg-background-action-primary-disabled disabled:border-border-action-disabled disabled:text-text-action-primary-disabled"
|
|
256
|
+
);
|
|
257
|
+
const tertiaryVariantStyles = variant === "tertiary" && (0, import_clsx2.default)(
|
|
258
|
+
"bg-transparent border-transparent",
|
|
259
|
+
iconOnly ? (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-icon-action-primary-normal" : (colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
260
|
+
"bg-transparent border-transparent",
|
|
261
|
+
"hover:bg-background-action-secondary-hover hover:border-background-action-secondary-hover hover:text-text-action-primary-hover",
|
|
262
|
+
"focus:bg-background-action-secondary-hover focus:border-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
|
|
263
|
+
"active:bg-background-action-secondary-active active:border-transparent active:text-text-action-primary-active",
|
|
264
|
+
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-primary-disabled"
|
|
265
|
+
);
|
|
266
|
+
const primaryCriticalVariantStyles = variant === "primary-critical" && (0, import_clsx2.default)(
|
|
267
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
268
|
+
"bg-background-action-critical-primary-normal border-background-action-critical-primary-normal",
|
|
269
|
+
"hover:bg-background-action-critical-primary-hover hover:border-background-action-critical-primary-hover",
|
|
270
|
+
"focus:bg-background-action-critical-primary-hover focus:border-background-action-critical-primary-hover focus:outline-0",
|
|
271
|
+
"active:bg-background-action-critical-primary-active active:border-background-action-critical-primary-active",
|
|
272
|
+
"disabled:bg-background-action-critical-primary-disabled disabled:border-background-action-critical-primary-disabled disabled:text-text-on-action-primary-disabled"
|
|
273
|
+
);
|
|
274
|
+
const secondaryCriticalVariantStyles = variant === "secondary-critical" && (0, import_clsx2.default)(
|
|
275
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
|
|
276
|
+
"bg-background-action-critical-secondary-normal border-border-action-critical-normal",
|
|
277
|
+
"hover:bg-background-action-critical-secondary-hover hover:border-border-action-critical-hover hover:text-text-action-critical-hover",
|
|
278
|
+
"focus:bg-background-action-critical-secondary-hover focus:border-border-action-critical-hover focus:text-text-action-critical-hover focus:outline-0",
|
|
279
|
+
"active:bg-background-action-critical-secondary-active active:border-border-action-critical-active active:text-text-action-critical-active",
|
|
280
|
+
"disabled:bg-background-action-critical-disabled disabled:border-border-action-critical-disabled disabled:text-text-action-critical-disabled"
|
|
281
|
+
);
|
|
282
|
+
const tertiaryCriticalVariantStyles = variant === "tertiary-critical" && (0, import_clsx2.default)(
|
|
283
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-critical-normal",
|
|
284
|
+
"bg-transparent border-transparent text-text-action-critical-normal",
|
|
285
|
+
"hover:bg-background-action-critical-secondary-hover hover:border-background-action-critical-secondary-hover hover:text-text-action-critical-hover",
|
|
286
|
+
"focus:bg-background-action-critical-secondary-hover focus:border-background-action-critical-secondary-hover focus:text-text-action-critical-hover focus:outline-0",
|
|
287
|
+
"active:bg-background-action-critical-secondary-active active:border-background-action-critical-secondary-active active:text-text-action-critical-active",
|
|
288
|
+
"disabled:bg-transparent disabled:border-transparent disabled:text-text-action-critical-disabled"
|
|
289
|
+
);
|
|
290
|
+
const navigationVarianStyles = variant === "navigation" && (0, import_clsx2.default)(
|
|
291
|
+
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-action-primary-normal",
|
|
292
|
+
"bg-transparent",
|
|
293
|
+
"hover:bg-background-action-secondary-hover hover:text-text-action-primary-hover",
|
|
294
|
+
"focus:bg-background-action-secondary-hover focus:text-text-action-primary-hover focus:outline-0",
|
|
295
|
+
"active:bg-background-action-secondary-active active:text-text-action-primary-active",
|
|
296
|
+
"disabled:bg-transparent disabled:text-text-on-action-primary-disabled",
|
|
297
|
+
"flex-col",
|
|
298
|
+
paddingUsingComponentGap
|
|
299
|
+
);
|
|
300
|
+
const notNavigationVariantStyles = variant !== "navigation" && (0, import_clsx2.default)("border-2 flex-row", componentPaddingMinus2pxBorder, componentGap);
|
|
301
|
+
const buttonClasses = (0, import_clsx2.default)(
|
|
302
|
+
disabled ? "cursor-default" : "cursor-pointer",
|
|
303
|
+
block ? "w-full" : "w-fit",
|
|
304
|
+
baseTransition,
|
|
305
|
+
"rounded-sm whitespace-nowrap inline-flex items-center justify-center group/btn",
|
|
306
|
+
primaryVariantStyles,
|
|
307
|
+
secondaryVariantStyles,
|
|
308
|
+
tertiaryVariantStyles,
|
|
309
|
+
primaryCriticalVariantStyles,
|
|
310
|
+
secondaryCriticalVariantStyles,
|
|
311
|
+
tertiaryCriticalVariantStyles,
|
|
312
|
+
navigationVarianStyles,
|
|
313
|
+
notNavigationVariantStyles,
|
|
314
|
+
className
|
|
315
|
+
);
|
|
316
|
+
const labelClasses = (0, import_clsx2.default)(
|
|
317
|
+
"min-h-6 flex items-center justify-center",
|
|
318
|
+
classNameLabel,
|
|
319
|
+
componentPaddingXUsingComponentGap,
|
|
320
|
+
typography.buttonLabel
|
|
321
|
+
);
|
|
322
|
+
const Element = href && !as ? "a" : as;
|
|
323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
324
|
+
Element,
|
|
325
|
+
__spreadProps(__spreadValues({
|
|
326
|
+
id,
|
|
327
|
+
"data-testid": testid,
|
|
328
|
+
type: Element === "button" ? "button" : void 0,
|
|
329
|
+
className: buttonClasses
|
|
330
|
+
}, props), {
|
|
331
|
+
onClick: props.onClick,
|
|
332
|
+
disabled,
|
|
333
|
+
href,
|
|
334
|
+
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
335
|
+
children: [
|
|
336
|
+
leftIcon && leftIcon,
|
|
337
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
338
|
+
rightIcon && rightIcon
|
|
339
|
+
]
|
|
340
|
+
})
|
|
341
|
+
);
|
|
342
|
+
};
|
|
343
|
+
Button.displayName = "Button";
|
|
344
|
+
|
|
345
|
+
// src/components/Heading.tsx
|
|
346
|
+
var import_clsx3 = __toESM(require("clsx"), 1);
|
|
347
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
348
|
+
var Heading = (_a) => {
|
|
349
|
+
var _b = _a, {
|
|
350
|
+
className,
|
|
351
|
+
children,
|
|
352
|
+
as,
|
|
353
|
+
color,
|
|
354
|
+
align,
|
|
355
|
+
variant = "heading1",
|
|
356
|
+
id,
|
|
357
|
+
testid
|
|
358
|
+
} = _b, props = __objRest(_b, [
|
|
359
|
+
"className",
|
|
360
|
+
"children",
|
|
361
|
+
"as",
|
|
362
|
+
"color",
|
|
363
|
+
"align",
|
|
364
|
+
"variant",
|
|
365
|
+
"id",
|
|
366
|
+
"testid"
|
|
367
|
+
]);
|
|
368
|
+
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
369
|
+
const Element = as != null ? as : defaultElement;
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
371
|
+
Element,
|
|
372
|
+
__spreadProps(__spreadValues({
|
|
373
|
+
id,
|
|
374
|
+
"data-testid": testid,
|
|
375
|
+
className: (0, import_clsx3.default)(
|
|
376
|
+
typography[variant],
|
|
377
|
+
className,
|
|
378
|
+
align === "left" && "text-left",
|
|
379
|
+
align === "center" && "text-center",
|
|
380
|
+
align === "right" && "text-right"
|
|
381
|
+
),
|
|
382
|
+
style: __spreadProps(__spreadValues({}, props.style), {
|
|
383
|
+
color: color ? `var(--color-${color})` : void 0
|
|
384
|
+
})
|
|
385
|
+
}, props), {
|
|
386
|
+
children
|
|
387
|
+
})
|
|
388
|
+
);
|
|
389
|
+
};
|
|
390
|
+
Heading.displayName = "Heading";
|
|
391
|
+
var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
|
|
392
|
+
var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
|
|
393
|
+
var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
|
|
394
|
+
Heading1.displayName = "Heading1";
|
|
395
|
+
Heading2.displayName = "Heading2";
|
|
396
|
+
Heading3.displayName = "Heading3";
|
|
397
|
+
|
|
398
|
+
// src/components/Icon.tsx
|
|
399
|
+
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
400
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
401
|
+
function Icon(_a) {
|
|
402
|
+
var _b = _a, {
|
|
403
|
+
name,
|
|
404
|
+
size = 24,
|
|
405
|
+
variant = "outline",
|
|
406
|
+
testid
|
|
407
|
+
} = _b, props = __objRest(_b, [
|
|
408
|
+
"name",
|
|
409
|
+
"size",
|
|
410
|
+
"variant",
|
|
411
|
+
"testid"
|
|
412
|
+
]);
|
|
413
|
+
const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
|
|
414
|
+
const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
|
|
415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
416
|
+
"span",
|
|
417
|
+
__spreadProps(__spreadValues({}, props), {
|
|
418
|
+
"data-testid": testid,
|
|
419
|
+
className: (0, import_clsx4.default)(
|
|
420
|
+
"icon",
|
|
421
|
+
`icon-${size}`,
|
|
422
|
+
// size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
|
|
423
|
+
props.className
|
|
424
|
+
),
|
|
425
|
+
style: __spreadValues({
|
|
426
|
+
fontVariationSettings: variantStyle + `, ${weightStyle}`
|
|
427
|
+
}, props.style),
|
|
428
|
+
children: name
|
|
429
|
+
})
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// src/components/Paragraph.tsx
|
|
434
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
435
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
436
|
+
var Paragraph = (_a) => {
|
|
437
|
+
var _b = _a, {
|
|
438
|
+
className,
|
|
439
|
+
color,
|
|
440
|
+
padded,
|
|
441
|
+
align = "left",
|
|
442
|
+
tall,
|
|
443
|
+
addOverflow,
|
|
444
|
+
children,
|
|
445
|
+
as = "p",
|
|
446
|
+
id,
|
|
447
|
+
testid
|
|
448
|
+
} = _b, props = __objRest(_b, [
|
|
449
|
+
"className",
|
|
450
|
+
"color",
|
|
451
|
+
"padded",
|
|
452
|
+
"align",
|
|
453
|
+
"tall",
|
|
454
|
+
"addOverflow",
|
|
455
|
+
"children",
|
|
456
|
+
"as",
|
|
457
|
+
"id",
|
|
458
|
+
"testid"
|
|
459
|
+
]);
|
|
460
|
+
const Element = as;
|
|
461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
462
|
+
Element,
|
|
463
|
+
__spreadProps(__spreadValues({
|
|
464
|
+
id,
|
|
465
|
+
"data-testid": testid
|
|
466
|
+
}, props), {
|
|
467
|
+
className: (0, import_clsx5.default)(
|
|
468
|
+
typography.paragraph,
|
|
469
|
+
className,
|
|
470
|
+
padded && componentPaddingXUsingComponentGap,
|
|
471
|
+
align === "left" && "text-left",
|
|
472
|
+
align === "center" && "text-center",
|
|
473
|
+
align === "right" && "text-right",
|
|
474
|
+
tall && "!leading-6",
|
|
475
|
+
addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
|
|
476
|
+
),
|
|
477
|
+
style: __spreadProps(__spreadValues({}, props.style), {
|
|
478
|
+
color: color ? `var(--color-${color})` : void 0
|
|
479
|
+
}),
|
|
480
|
+
children
|
|
481
|
+
})
|
|
482
|
+
);
|
|
483
|
+
};
|
|
484
|
+
Paragraph.displayName = "Paragraph";
|
|
485
|
+
|
|
486
|
+
// src/components/Stack.tsx
|
|
487
|
+
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
488
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
489
|
+
var getFlexClassNames = ({ items, justify, grow }) => (0, import_clsx6.default)(
|
|
490
|
+
"flex",
|
|
491
|
+
items === "start" && "items-start",
|
|
492
|
+
grow && "grow",
|
|
493
|
+
items === "start" && "items-start",
|
|
494
|
+
items === "center" && "items-center",
|
|
495
|
+
items === "end" && "items-end",
|
|
496
|
+
items === "start-center" && "items-start desktop:items-center",
|
|
497
|
+
justify === "start" && "justify-start",
|
|
498
|
+
justify === "center" && "justify-center",
|
|
499
|
+
justify === "end" && "justify-end",
|
|
500
|
+
justify === "end" && "justify-end",
|
|
501
|
+
justify === "between" && "justify-between",
|
|
502
|
+
justify === "around" && "justify-around"
|
|
503
|
+
);
|
|
504
|
+
var useGapClassNames = (sizing) => {
|
|
505
|
+
return (0, import_clsx6.default)(
|
|
506
|
+
sizing === "layout-group" && "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-compact-layout-group-gap",
|
|
507
|
+
sizing === "layout" && "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-compact-layout-gap",
|
|
508
|
+
sizing === "container" && "gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-compact-container-gap",
|
|
509
|
+
sizing === "component" && "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-compact-component-gap"
|
|
510
|
+
);
|
|
511
|
+
};
|
|
512
|
+
var Stack = (_a) => {
|
|
513
|
+
var _b = _a, {
|
|
514
|
+
children,
|
|
515
|
+
items,
|
|
516
|
+
justify,
|
|
517
|
+
grow,
|
|
518
|
+
padding,
|
|
519
|
+
paddingX,
|
|
520
|
+
paddingY,
|
|
521
|
+
paddingBottom,
|
|
522
|
+
paddingTop,
|
|
523
|
+
paddingLeft,
|
|
524
|
+
paddingRight,
|
|
525
|
+
margin,
|
|
526
|
+
marginX,
|
|
527
|
+
marginY,
|
|
528
|
+
horizontal,
|
|
529
|
+
horizontalMobile,
|
|
530
|
+
elevation = 0,
|
|
531
|
+
rounded,
|
|
532
|
+
centered,
|
|
533
|
+
width,
|
|
534
|
+
minHeight,
|
|
535
|
+
maxWidth,
|
|
536
|
+
minWidth,
|
|
537
|
+
height,
|
|
538
|
+
maxHeight,
|
|
539
|
+
borderColor,
|
|
540
|
+
borderTopColor,
|
|
541
|
+
borderRightColor,
|
|
542
|
+
borderBottomColor,
|
|
543
|
+
borderLeftColor,
|
|
544
|
+
backgroundColor,
|
|
545
|
+
sizing = "none",
|
|
546
|
+
overflowY = "inherit",
|
|
547
|
+
overflowX = "inherit",
|
|
548
|
+
flexShrink,
|
|
549
|
+
flexGrow,
|
|
550
|
+
position,
|
|
551
|
+
top,
|
|
552
|
+
left,
|
|
553
|
+
id,
|
|
554
|
+
noGap,
|
|
555
|
+
marginTop,
|
|
556
|
+
marginBottom,
|
|
557
|
+
testid,
|
|
558
|
+
bottom,
|
|
559
|
+
zIndex,
|
|
560
|
+
flexWrap
|
|
561
|
+
} = _b, props = __objRest(_b, [
|
|
562
|
+
"children",
|
|
563
|
+
"items",
|
|
564
|
+
"justify",
|
|
565
|
+
"grow",
|
|
566
|
+
"padding",
|
|
567
|
+
"paddingX",
|
|
568
|
+
"paddingY",
|
|
569
|
+
"paddingBottom",
|
|
570
|
+
"paddingTop",
|
|
571
|
+
"paddingLeft",
|
|
572
|
+
"paddingRight",
|
|
573
|
+
"margin",
|
|
574
|
+
"marginX",
|
|
575
|
+
"marginY",
|
|
576
|
+
"horizontal",
|
|
577
|
+
"horizontalMobile",
|
|
578
|
+
"elevation",
|
|
579
|
+
"rounded",
|
|
580
|
+
"centered",
|
|
581
|
+
"width",
|
|
582
|
+
"minHeight",
|
|
583
|
+
"maxWidth",
|
|
584
|
+
"minWidth",
|
|
585
|
+
"height",
|
|
586
|
+
"maxHeight",
|
|
587
|
+
"borderColor",
|
|
588
|
+
"borderTopColor",
|
|
589
|
+
"borderRightColor",
|
|
590
|
+
"borderBottomColor",
|
|
591
|
+
"borderLeftColor",
|
|
592
|
+
"backgroundColor",
|
|
593
|
+
"sizing",
|
|
594
|
+
"overflowY",
|
|
595
|
+
"overflowX",
|
|
596
|
+
"flexShrink",
|
|
597
|
+
"flexGrow",
|
|
598
|
+
"position",
|
|
599
|
+
"top",
|
|
600
|
+
"left",
|
|
601
|
+
"id",
|
|
602
|
+
"noGap",
|
|
603
|
+
"marginTop",
|
|
604
|
+
"marginBottom",
|
|
605
|
+
"testid",
|
|
606
|
+
"bottom",
|
|
607
|
+
"zIndex",
|
|
608
|
+
"flexWrap"
|
|
609
|
+
]);
|
|
610
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
611
|
+
const flexClassNames = getFlexClassNames({ items, justify, grow });
|
|
612
|
+
const gapClassNames = useGapClassNames(sizing);
|
|
613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
614
|
+
"div",
|
|
615
|
+
__spreadProps(__spreadValues({
|
|
616
|
+
id,
|
|
617
|
+
"data-testid": testid
|
|
618
|
+
}, props), {
|
|
619
|
+
style: {
|
|
620
|
+
height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
|
|
621
|
+
maxHeight: maxHeight !== void 0 ? isNaN(+maxHeight) ? maxHeight : `${maxHeight}px` : (_a2 = props.style) == null ? void 0 : _a2.maxHeight,
|
|
622
|
+
maxWidth: maxWidth !== void 0 ? isNaN(+maxWidth) ? maxWidth : `${maxWidth}px` : (_b2 = props.style) == null ? void 0 : _b2.maxWidth,
|
|
623
|
+
minHeight: minHeight !== void 0 ? isNaN(+minHeight) ? minHeight : `${minHeight}px` : (_c = props.style) == null ? void 0 : _c.minHeight,
|
|
624
|
+
width: width !== void 0 && typeof width === "number" ? `${width}px` : void 0,
|
|
625
|
+
minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
|
|
626
|
+
border: borderColor ? `1px solid var(--color-${borderColor})` : void 0,
|
|
627
|
+
borderTop: borderTopColor ? `1px solid var(--color-${borderTopColor})` : void 0,
|
|
628
|
+
borderRight: borderRightColor ? `1px solid var(--color-${borderRightColor})` : void 0,
|
|
629
|
+
borderBottom: borderBottomColor ? `1px solid var(--color-${borderBottomColor})` : void 0,
|
|
630
|
+
borderLeft: borderLeftColor ? `1px solid var(--color-${borderLeftColor})` : void 0,
|
|
631
|
+
backgroundColor: backgroundColor ? `var(--color-${backgroundColor})` : void 0,
|
|
632
|
+
flexGrow: flexGrow !== void 0 ? flexGrow : void 0,
|
|
633
|
+
flexShrink: flexShrink !== void 0 ? flexShrink : void 0,
|
|
634
|
+
position: position !== void 0 ? position : void 0,
|
|
635
|
+
top: top !== void 0 ? `${top}px` : void 0,
|
|
636
|
+
bottom: bottom !== void 0 ? `${bottom}px` : void 0,
|
|
637
|
+
left: left !== void 0 ? `${left}px` : void 0,
|
|
638
|
+
borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
|
|
639
|
+
marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
|
|
640
|
+
zIndex: zIndex !== void 0 ? zIndex : void 0,
|
|
641
|
+
flexWrap,
|
|
642
|
+
paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
|
|
643
|
+
gap: (_g = props.style) == null ? void 0 : _g.gap
|
|
644
|
+
},
|
|
645
|
+
className: (0, import_clsx6.default)(
|
|
646
|
+
"scrollbar-thin",
|
|
647
|
+
"max-w-screen",
|
|
648
|
+
width !== "fit" && "w-full",
|
|
649
|
+
width === "full" && "w-full",
|
|
650
|
+
width === "max" && "w-max",
|
|
651
|
+
centered && "mx-auto",
|
|
652
|
+
overflowY == "auto" && "overflow-y-auto",
|
|
653
|
+
overflowY == "hidden" && "overflow-y-hidden",
|
|
654
|
+
overflowY == "scroll" && "overflow-y-scroll",
|
|
655
|
+
overflowX == "auto" && "overflow-x-auto",
|
|
656
|
+
overflowX == "hidden" && "overflow-x-hidden",
|
|
657
|
+
overflowX == "scroll" && "overflow-x-scroll",
|
|
658
|
+
padding && sizing === "container" && "p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding",
|
|
659
|
+
padding && sizing === "layout" && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
|
|
660
|
+
padding && sizing === "layout-group" && "p-mobile-layout-group-padding desktop:p-desktop-layout-group-padding compact:p-desktop-compact-layout-group-padding",
|
|
661
|
+
padding && sizing === "component" && "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
|
|
662
|
+
paddingX && sizing === "container" && "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
|
|
663
|
+
paddingX && sizing === "layout" && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
|
|
664
|
+
paddingX && sizing === "layout-group" && "px-mobile-layout-group-padding desktop:px-desktop-layout-group-padding compact:px-desktop-compact-layout-group-padding",
|
|
665
|
+
paddingX && sizing === "component" && "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
|
|
666
|
+
paddingY && sizing === "container" && "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
|
|
667
|
+
paddingY && sizing === "layout" && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
|
|
668
|
+
paddingY && sizing === "layout-group" && paddingYUsingLayoutGroupGap,
|
|
669
|
+
paddingY && sizing === "component" && "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
|
|
670
|
+
paddingBottom && sizing === "container" && "pb-mobile-container-padding desktop:pb-desktop-container-padding compact:pb-desktop-compact-container-padding",
|
|
671
|
+
paddingBottom && sizing === "layout" && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
|
|
672
|
+
paddingBottom && sizing === "layout-group" && "pb-mobile-layout-group-padding desktop:pb-desktop-layout-group-padding compact:pb-desktop-compact-layout-group-padding",
|
|
673
|
+
paddingBottom && sizing === "component" && "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
|
|
674
|
+
paddingTop && sizing === "container" && "pt-mobile-container-padding desktop:pt-desktop-container-padding compact:pt-desktop-compact-container-padding",
|
|
675
|
+
paddingTop && sizing === "layout" && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
|
|
676
|
+
paddingTop && sizing === "layout-group" && "pt-mobile-layout-group-padding desktop:pt-desktop-layout-group-padding compact:pt-desktop-compact-layout-group-padding",
|
|
677
|
+
paddingTop && sizing === "component" && "pt-mobile-component-padding desktop:pt-desktop-component-padding compact:pt-desktop-compact-component-padding",
|
|
678
|
+
paddingLeft && sizing === "container" && "pl-mobile-container-padding desktop:pl-desktop-container-padding compact:pl-desktop-compact-container-padding",
|
|
679
|
+
paddingLeft && sizing === "layout" && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
|
|
680
|
+
paddingLeft && sizing === "layout-group" && "pl-mobile-layout-group-padding desktop:pl-desktop-layout-group-padding compact:pl-desktop-compact-layout-group-padding",
|
|
681
|
+
paddingLeft && sizing === "component" && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding",
|
|
682
|
+
paddingRight && sizing === "container" && "pr-mobile-container-padding desktop:pr-desktop-container-padding compact:pr-desktop-compact-container-padding",
|
|
683
|
+
paddingRight && sizing === "layout" && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
|
|
684
|
+
paddingRight && sizing === "layout-group" && "pr-mobile-layout-group-padding desktop:pr-desktop-layout-group-padding compact:pr-desktop-compact-layout-group-padding",
|
|
685
|
+
paddingRight && sizing === "component" && "pr-mobile-component-padding desktop:pr-desktop-component-padding compact:pr-desktop-compact-component-padding",
|
|
686
|
+
margin && sizing === "container" && "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
|
|
687
|
+
marginX && sizing === "container" && "mx-mobile-container-padding desktop:mx-desktop-container-padding compact:mx-compact-container-padding",
|
|
688
|
+
marginTop && sizing === "container" && "mt-mobile-container-padding desktop:mt-desktop-container-padding compact:mt-compact-container-padding",
|
|
689
|
+
marginBottom && sizing === "container" && "mb-mobile-container-padding desktop:mb-desktop-container-padding compact:mb-compact-container-padding",
|
|
690
|
+
marginY && sizing === "container" && "my-mobile-container-padding desktop:my-desktop-container-padding compact:my-compact-container-padding",
|
|
691
|
+
horizontal ? "desktop:flex-row" : "desktop:flex-col",
|
|
692
|
+
horizontalMobile ? "flex-row" : "flex-col",
|
|
693
|
+
flexClassNames,
|
|
694
|
+
!noGap && gapClassNames,
|
|
695
|
+
elevation === 0 && "shadow-none",
|
|
696
|
+
elevation === 2 && "shadow-2",
|
|
697
|
+
elevation === 4 && "shadow-4",
|
|
698
|
+
elevation === 16 && "shadow-16",
|
|
699
|
+
rounded && "rounded"
|
|
700
|
+
),
|
|
701
|
+
children
|
|
702
|
+
})
|
|
703
|
+
);
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
// src/components/Alert.tsx
|
|
707
|
+
var import_react = require("react");
|
|
708
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
709
|
+
function Alert(_a) {
|
|
710
|
+
var _b = _a, {
|
|
711
|
+
id,
|
|
712
|
+
testId,
|
|
713
|
+
variant,
|
|
714
|
+
title,
|
|
715
|
+
message,
|
|
716
|
+
dismissible = false,
|
|
717
|
+
onClose
|
|
718
|
+
} = _b, rest = __objRest(_b, [
|
|
719
|
+
"id",
|
|
720
|
+
"testId",
|
|
721
|
+
"variant",
|
|
722
|
+
"title",
|
|
723
|
+
"message",
|
|
724
|
+
"dismissible",
|
|
725
|
+
"onClose"
|
|
726
|
+
]);
|
|
727
|
+
const isError = variant === "error";
|
|
728
|
+
const handleClose = (0, import_react.useCallback)(() => {
|
|
729
|
+
if (onClose) onClose();
|
|
730
|
+
}, [onClose]);
|
|
731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
732
|
+
Stack,
|
|
733
|
+
__spreadProps(__spreadValues({
|
|
734
|
+
id,
|
|
735
|
+
"data-testid": testId,
|
|
736
|
+
sizing: "container",
|
|
737
|
+
backgroundColor: "background-grouped-primary-normal",
|
|
738
|
+
borderColor: "border-primary-normal",
|
|
739
|
+
items: "start",
|
|
740
|
+
elevation: 4,
|
|
741
|
+
rounded: true,
|
|
742
|
+
padding: true,
|
|
743
|
+
horizontal: true,
|
|
744
|
+
horizontalMobile: true
|
|
745
|
+
}, rest), {
|
|
746
|
+
children: [
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
748
|
+
"div",
|
|
749
|
+
{
|
|
750
|
+
className: (0, import_clsx7.default)("min-w-[2px] min-h-full flex", {
|
|
751
|
+
"bg-background-critical-normal": isError,
|
|
752
|
+
"bg-background-warning-normal": !isError
|
|
753
|
+
})
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
757
|
+
"span",
|
|
758
|
+
{
|
|
759
|
+
className: (0, import_clsx7.default)({
|
|
760
|
+
"text-icon-critical-normal": isError,
|
|
761
|
+
"text-icon-warning-normal": !isError
|
|
762
|
+
}),
|
|
763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "warning" })
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Stack, { flexGrow: 1, sizing: "component", children: [
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Heading2, { children: title }),
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Paragraph, { children: message })
|
|
769
|
+
] }),
|
|
770
|
+
dismissible && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
771
|
+
Button,
|
|
772
|
+
{
|
|
773
|
+
"aria-label": "Dismiss alert",
|
|
774
|
+
iconOnly: true,
|
|
775
|
+
variant: "tertiary",
|
|
776
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "close" }),
|
|
777
|
+
onClick: handleClose
|
|
778
|
+
}
|
|
779
|
+
)
|
|
780
|
+
]
|
|
781
|
+
})
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
785
|
+
0 && (module.exports = {
|
|
786
|
+
Alert
|
|
787
|
+
});
|