@boostdev/design-system-components 0.1.14 → 0.1.16
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/client.cjs +403 -361
- package/dist/client.css +485 -424
- package/dist/client.d.cts +25 -4
- package/dist/client.d.ts +25 -4
- package/dist/client.js +402 -361
- package/dist/index.cjs +403 -361
- package/dist/index.css +485 -424
- package/dist/index.d.cts +25 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +402 -361
- package/package.json +1 -1
- package/src/components/interaction/form/Switch/Switch.mdx +7 -2
- package/src/components/interaction/form/Switch/Switch.module.css +6 -6
- package/src/components/interaction/form/Switch/Switch.spec.tsx +23 -0
- package/src/components/interaction/form/Switch/Switch.stories.tsx +8 -0
- package/src/components/interaction/form/Switch/Switch.tsx +5 -2
- package/src/components/interaction/form/atoms/Label.module.css +0 -1
- package/src/components/ui/Collapsible/Collapsible.mdx +59 -0
- package/src/components/ui/Collapsible/Collapsible.module.css +76 -0
- package/src/components/ui/Collapsible/Collapsible.spec.tsx +75 -0
- package/src/components/ui/Collapsible/Collapsible.stories.tsx +57 -0
- package/src/components/ui/Collapsible/Collapsible.tsx +55 -0
- package/src/components/ui/Collapsible/index.ts +2 -0
- package/src/components/ui/Progress/Progress.module.css +0 -4
- package/src/index.ts +2 -0
- package/src/stories/Introduction.mdx +2 -2
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ __export(index_exports, {
|
|
|
31
31
|
Card: () => Card,
|
|
32
32
|
Carousel: () => Carousel,
|
|
33
33
|
Checkbox: () => Checkbox,
|
|
34
|
+
Collapsible: () => Collapsible,
|
|
34
35
|
Combobox: () => Combobox,
|
|
35
36
|
Command: () => Command,
|
|
36
37
|
DescriptionList: () => DescriptionList,
|
|
@@ -63,7 +64,7 @@ __export(index_exports, {
|
|
|
63
64
|
ToastProvider: () => ToastProvider,
|
|
64
65
|
Tooltip: () => Tooltip,
|
|
65
66
|
Typography: () => Typography,
|
|
66
|
-
cn: () =>
|
|
67
|
+
cn: () => import_design_system_foundation45.cn,
|
|
67
68
|
useToast: () => useToast
|
|
68
69
|
});
|
|
69
70
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -72,7 +73,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
72
73
|
var import_react = require("react");
|
|
73
74
|
|
|
74
75
|
// src/components/ui/Accordion/Accordion.module.css
|
|
75
|
-
var Accordion_default = {"accordion":"
|
|
76
|
+
var Accordion_default = {"accordion":"bds0116Accordion-accordion","item":"bds0116Accordion-item","heading":"bds0116Accordion-heading","trigger":"bds0116Accordion-trigger","triggerLabel":"bds0116Accordion-triggerLabel","chevron":"bds0116Accordion-chevron","--open":"bds0116Accordion---open","panel":"bds0116Accordion-panel","panelContent":"bds0116Accordion-panelContent"};
|
|
76
77
|
|
|
77
78
|
// src/components/ui/Accordion/Accordion.tsx
|
|
78
79
|
var import_design_system_foundation = require("@boostdev/design-system-foundation");
|
|
@@ -140,7 +141,7 @@ function Accordion({
|
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
// src/components/ui/Alert/Alert.module.css
|
|
143
|
-
var Alert_default = {"alert":"
|
|
144
|
+
var Alert_default = {"alert":"bds0116Alert-alert","--variant_info":"bds0116Alert---variant_info","--variant_success":"bds0116Alert---variant_success","--variant_warning":"bds0116Alert---variant_warning","--variant_error":"bds0116Alert---variant_error","icon":"bds0116Alert-icon","content":"bds0116Alert-content","title":"bds0116Alert-title","dismiss":"bds0116Alert-dismiss"};
|
|
144
145
|
|
|
145
146
|
// src/components/ui/Alert/Alert.tsx
|
|
146
147
|
var import_design_system_foundation2 = require("@boostdev/design-system-foundation");
|
|
@@ -183,7 +184,7 @@ function Alert({
|
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
// src/components/ui/Avatar/Avatar.module.css
|
|
186
|
-
var Avatar_default = {"avatar":"
|
|
187
|
+
var Avatar_default = {"avatar":"bds0116Avatar-avatar","--fallback":"bds0116Avatar---fallback","--size_small":"bds0116Avatar---size_small","--size_medium":"bds0116Avatar---size_medium","--size_large":"bds0116Avatar---size_large","image":"bds0116Avatar-image","initials":"bds0116Avatar-initials"};
|
|
187
188
|
|
|
188
189
|
// src/components/ui/Avatar/Avatar.tsx
|
|
189
190
|
var import_design_system_foundation3 = require("@boostdev/design-system-foundation");
|
|
@@ -209,7 +210,7 @@ function Avatar({ src, alt, name, size = "medium", className }) {
|
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
// src/components/ui/Badge/Badge.module.css
|
|
212
|
-
var Badge_default = {"badge":"
|
|
213
|
+
var Badge_default = {"badge":"bds0116Badge-badge","--variant_primary":"bds0116Badge---variant_primary","--variant_secondary":"bds0116Badge---variant_secondary","--variant_success":"bds0116Badge---variant_success","--variant_error":"bds0116Badge---variant_error","--variant_warning":"bds0116Badge---variant_warning"};
|
|
213
214
|
|
|
214
215
|
// src/components/ui/Badge/Badge.tsx
|
|
215
216
|
var import_design_system_foundation4 = require("@boostdev/design-system-foundation");
|
|
@@ -219,7 +220,7 @@ function Badge({ children, variant = "primary", className }) {
|
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
// src/components/ui/Breadcrumb/Breadcrumb.module.css
|
|
222
|
-
var Breadcrumb_default = {"breadcrumb":"
|
|
223
|
+
var Breadcrumb_default = {"breadcrumb":"bds0116Breadcrumb-breadcrumb","list":"bds0116Breadcrumb-list","item":"bds0116Breadcrumb-item","link":"bds0116Breadcrumb-link","separator":"bds0116Breadcrumb-separator","current":"bds0116Breadcrumb-current"};
|
|
223
224
|
|
|
224
225
|
// src/components/ui/Breadcrumb/Breadcrumb.tsx
|
|
225
226
|
var import_design_system_foundation5 = require("@boostdev/design-system-foundation");
|
|
@@ -234,15 +235,53 @@ function Breadcrumb({ items, className }) {
|
|
|
234
235
|
}) }) });
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
// src/components/ui/Collapsible/Collapsible.module.css
|
|
239
|
+
var Collapsible_default = {"collapsible":"bds0116Collapsible-collapsible","summary":"bds0116Collapsible-summary","summaryContent":"bds0116Collapsible-summaryContent","icon":"bds0116Collapsible-icon","content":"bds0116Collapsible-content"};
|
|
240
|
+
|
|
241
|
+
// src/components/ui/Collapsible/Collapsible.tsx
|
|
242
|
+
var import_design_system_foundation6 = require("@boostdev/design-system-foundation");
|
|
243
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
244
|
+
function Collapsible({
|
|
245
|
+
summary,
|
|
246
|
+
children,
|
|
247
|
+
open,
|
|
248
|
+
defaultOpen,
|
|
249
|
+
onToggle,
|
|
250
|
+
name,
|
|
251
|
+
className,
|
|
252
|
+
...rest
|
|
253
|
+
}) {
|
|
254
|
+
const handleToggle = (e) => {
|
|
255
|
+
onToggle?.(e.currentTarget.open);
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
258
|
+
"details",
|
|
259
|
+
{
|
|
260
|
+
className: (0, import_design_system_foundation6.cn)(Collapsible_default.collapsible, className),
|
|
261
|
+
open: open ?? defaultOpen,
|
|
262
|
+
name,
|
|
263
|
+
onToggle: handleToggle,
|
|
264
|
+
...rest,
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("summary", { className: Collapsible_default.summary, children: [
|
|
267
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: Collapsible_default.summaryContent, children: summary }),
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: Collapsible_default.icon, "aria-hidden": "true" })
|
|
269
|
+
] }),
|
|
270
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: Collapsible_default.content, children })
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
237
276
|
// src/components/ui/Calendar/Calendar.tsx
|
|
238
277
|
var import_react2 = require("react");
|
|
239
278
|
|
|
240
279
|
// src/components/ui/Calendar/Calendar.module.css
|
|
241
|
-
var Calendar_default = {"calendar":"
|
|
280
|
+
var Calendar_default = {"calendar":"bds0116Calendar-calendar","header":"bds0116Calendar-header","monthYear":"bds0116Calendar-monthYear","navBtn":"bds0116Calendar-navBtn","grid":"bds0116Calendar-grid","weekday":"bds0116Calendar-weekday","empty":"bds0116Calendar-empty","day":"bds0116Calendar-day","disabled":"bds0116Calendar-disabled","selected":"bds0116Calendar-selected","today":"bds0116Calendar-today"};
|
|
242
281
|
|
|
243
282
|
// src/components/ui/Calendar/Calendar.tsx
|
|
244
|
-
var
|
|
245
|
-
var
|
|
283
|
+
var import_design_system_foundation7 = require("@boostdev/design-system-foundation");
|
|
284
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
246
285
|
var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
247
286
|
var MONTHS = [
|
|
248
287
|
"January",
|
|
@@ -329,54 +368,54 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
329
368
|
...Array.from({ length: daysInMonth }, (_, i) => ({ day: i + 1 }))
|
|
330
369
|
];
|
|
331
370
|
while (cells.length % 7 !== 0) cells.push(null);
|
|
332
|
-
return /* @__PURE__ */ (0,
|
|
333
|
-
/* @__PURE__ */ (0,
|
|
334
|
-
/* @__PURE__ */ (0,
|
|
371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_design_system_foundation7.cn)(Calendar_default.calendar, className), role: "group", "aria-labelledby": titleId, children: [
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: Calendar_default.header, children: [
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
335
374
|
"button",
|
|
336
375
|
{
|
|
337
376
|
type: "button",
|
|
338
377
|
className: Calendar_default.navBtn,
|
|
339
378
|
"aria-label": "Previous month",
|
|
340
379
|
onClick: () => navigate(-1),
|
|
341
|
-
children: /* @__PURE__ */ (0,
|
|
380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
342
381
|
}
|
|
343
382
|
),
|
|
344
|
-
/* @__PURE__ */ (0,
|
|
383
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { id: titleId, className: Calendar_default.monthYear, "aria-live": "polite", children: [
|
|
345
384
|
MONTHS[viewMonth],
|
|
346
385
|
" ",
|
|
347
386
|
viewYear
|
|
348
387
|
] }),
|
|
349
|
-
/* @__PURE__ */ (0,
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
350
389
|
"button",
|
|
351
390
|
{
|
|
352
391
|
type: "button",
|
|
353
392
|
className: Calendar_default.navBtn,
|
|
354
393
|
"aria-label": "Next month",
|
|
355
394
|
onClick: () => navigate(1),
|
|
356
|
-
children: /* @__PURE__ */ (0,
|
|
395
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
357
396
|
}
|
|
358
397
|
)
|
|
359
398
|
] }),
|
|
360
|
-
/* @__PURE__ */ (0,
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
361
400
|
"table",
|
|
362
401
|
{
|
|
363
402
|
className: Calendar_default.grid,
|
|
364
403
|
role: "grid",
|
|
365
404
|
"aria-labelledby": titleId,
|
|
366
405
|
children: [
|
|
367
|
-
/* @__PURE__ */ (0,
|
|
368
|
-
/* @__PURE__ */ (0,
|
|
369
|
-
if (!cell) return /* @__PURE__ */ (0,
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { scope: "col", abbr: d, className: Calendar_default.weekday, children: d }, d)) }) }),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tbody", { children: Array.from({ length: cells.length / 7 }, (_, row) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tr", { children: cells.slice(row * 7, row * 7 + 7).map((cell, col) => {
|
|
408
|
+
if (!cell) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: Calendar_default.empty, "aria-hidden": "true" }, col);
|
|
370
409
|
const date = new Date(viewYear, viewMonth, cell.day);
|
|
371
410
|
const isSelected = selected ? isSameDay(date, selected) : false;
|
|
372
411
|
const isToday = isSameDay(date, today);
|
|
373
412
|
const disabled = isOutOfRange(date, min, max);
|
|
374
413
|
const isFocused = focusedDay === cell.day;
|
|
375
|
-
return /* @__PURE__ */ (0,
|
|
414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
376
415
|
"button",
|
|
377
416
|
{
|
|
378
417
|
type: "button",
|
|
379
|
-
className: (0,
|
|
418
|
+
className: (0, import_design_system_foundation7.cn)(
|
|
380
419
|
Calendar_default.day,
|
|
381
420
|
isSelected && Calendar_default.selected,
|
|
382
421
|
isToday && !isSelected && Calendar_default.today,
|
|
@@ -404,11 +443,11 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
404
443
|
var import_react3 = require("react");
|
|
405
444
|
|
|
406
445
|
// src/components/ui/Carousel/Carousel.module.css
|
|
407
|
-
var Carousel_default = {"carousel":"
|
|
446
|
+
var Carousel_default = {"carousel":"bds0116Carousel-carousel","track":"bds0116Carousel-track","slide":"bds0116Carousel-slide","navBtn":"bds0116Carousel-navBtn"};
|
|
408
447
|
|
|
409
448
|
// src/components/ui/Carousel/Carousel.tsx
|
|
410
|
-
var
|
|
411
|
-
var
|
|
449
|
+
var import_design_system_foundation8 = require("@boostdev/design-system-foundation");
|
|
450
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
412
451
|
function Carousel({ items, label, className }) {
|
|
413
452
|
const trackRef = (0, import_react3.useRef)(null);
|
|
414
453
|
const listId = (0, import_react3.useId)();
|
|
@@ -420,61 +459,61 @@ function Carousel({ items, label, className }) {
|
|
|
420
459
|
behavior: "smooth"
|
|
421
460
|
});
|
|
422
461
|
};
|
|
423
|
-
return /* @__PURE__ */ (0,
|
|
424
|
-
/* @__PURE__ */ (0,
|
|
462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { "aria-label": label, className: (0, import_design_system_foundation8.cn)(Carousel_default.carousel, className), children: [
|
|
463
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
425
464
|
"button",
|
|
426
465
|
{
|
|
427
466
|
type: "button",
|
|
428
|
-
className: (0,
|
|
467
|
+
className: (0, import_design_system_foundation8.cn)(Carousel_default.navBtn, Carousel_default["--prev"]),
|
|
429
468
|
"aria-label": "Previous",
|
|
430
469
|
"aria-controls": listId,
|
|
431
470
|
onClick: () => scroll("prev"),
|
|
432
|
-
children: /* @__PURE__ */ (0,
|
|
471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
433
472
|
}
|
|
434
473
|
),
|
|
435
|
-
/* @__PURE__ */ (0,
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
436
475
|
"div",
|
|
437
476
|
{
|
|
438
477
|
ref: trackRef,
|
|
439
478
|
id: listId,
|
|
440
479
|
role: "list",
|
|
441
480
|
className: Carousel_default.track,
|
|
442
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
481
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { role: "listitem", className: Carousel_default.slide, children: item }, i))
|
|
443
482
|
}
|
|
444
483
|
),
|
|
445
|
-
/* @__PURE__ */ (0,
|
|
484
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
446
485
|
"button",
|
|
447
486
|
{
|
|
448
487
|
type: "button",
|
|
449
|
-
className: (0,
|
|
488
|
+
className: (0, import_design_system_foundation8.cn)(Carousel_default.navBtn, Carousel_default["--next"]),
|
|
450
489
|
"aria-label": "Next",
|
|
451
490
|
"aria-controls": listId,
|
|
452
491
|
onClick: () => scroll("next"),
|
|
453
|
-
children: /* @__PURE__ */ (0,
|
|
492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
454
493
|
}
|
|
455
494
|
)
|
|
456
495
|
] });
|
|
457
496
|
}
|
|
458
497
|
|
|
459
498
|
// src/components/ui/DescriptionList/DescriptionList.module.css
|
|
460
|
-
var DescriptionList_default = {"list":"
|
|
499
|
+
var DescriptionList_default = {"list":"bds0116DescriptionList-list","group":"bds0116DescriptionList-group","term":"bds0116DescriptionList-term","details":"bds0116DescriptionList-details","--layout_inline":"bds0116DescriptionList---layout_inline"};
|
|
461
500
|
|
|
462
501
|
// src/components/ui/DescriptionList/DescriptionList.tsx
|
|
463
|
-
var
|
|
464
|
-
var
|
|
502
|
+
var import_design_system_foundation9 = require("@boostdev/design-system-foundation");
|
|
503
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
465
504
|
function DescriptionList({ items, layout = "stacked", className }) {
|
|
466
|
-
return /* @__PURE__ */ (0,
|
|
467
|
-
/* @__PURE__ */ (0,
|
|
468
|
-
Array.isArray(item.details) ? item.details.map((d, j) => /* @__PURE__ */ (0,
|
|
505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dl", { className: (0, import_design_system_foundation9.cn)(DescriptionList_default.list, DescriptionList_default[`--layout_${layout}`], className), children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: DescriptionList_default.group, children: [
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dt", { className: DescriptionList_default.term, children: item.term }),
|
|
507
|
+
Array.isArray(item.details) ? item.details.map((d, j) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dd", { className: DescriptionList_default.details, children: d }, j)) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dd", { className: DescriptionList_default.details, children: item.details })
|
|
469
508
|
] }, i)) });
|
|
470
509
|
}
|
|
471
510
|
|
|
472
511
|
// src/components/ui/Link/Link.module.css
|
|
473
|
-
var Link_default = {"link":"
|
|
512
|
+
var Link_default = {"link":"bds0116Link-link","--variant_default":"bds0116Link---variant_default","--variant_subtle":"bds0116Link---variant_subtle","--variant_standalone":"bds0116Link---variant_standalone","externalLabel":"bds0116Link-externalLabel"};
|
|
474
513
|
|
|
475
514
|
// src/components/ui/Link/Link.tsx
|
|
476
|
-
var
|
|
477
|
-
var
|
|
515
|
+
var import_design_system_foundation10 = require("@boostdev/design-system-foundation");
|
|
516
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
478
517
|
function Link({
|
|
479
518
|
as,
|
|
480
519
|
children,
|
|
@@ -486,36 +525,36 @@ function Link({
|
|
|
486
525
|
}) {
|
|
487
526
|
const Component = as ?? "a";
|
|
488
527
|
const externalProps = external ? { target: "_blank", rel: "noreferrer noopener" } : {};
|
|
489
|
-
return /* @__PURE__ */ (0,
|
|
528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
490
529
|
Component,
|
|
491
530
|
{
|
|
492
|
-
className: (0,
|
|
531
|
+
className: (0, import_design_system_foundation10.cn)(Link_default.link, Link_default[`--variant_${variant}`], className),
|
|
493
532
|
...externalProps,
|
|
494
533
|
...props,
|
|
495
534
|
children: [
|
|
496
535
|
children,
|
|
497
|
-
external && /* @__PURE__ */ (0,
|
|
536
|
+
external && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: Link_default.externalLabel, children: externalLabel })
|
|
498
537
|
]
|
|
499
538
|
}
|
|
500
539
|
);
|
|
501
540
|
}
|
|
502
541
|
|
|
503
542
|
// src/components/ui/Loading/Loading.module.css
|
|
504
|
-
var Loading_default = {"loading":"
|
|
543
|
+
var Loading_default = {"loading":"bds0116Loading-loading","spinner":"bds0116Loading-spinner","--size_small":"bds0116Loading---size_small","--size_large":"bds0116Loading---size_large"};
|
|
505
544
|
|
|
506
545
|
// src/components/ui/Loading/Loading.tsx
|
|
507
|
-
var
|
|
508
|
-
var
|
|
546
|
+
var import_design_system_foundation11 = require("@boostdev/design-system-foundation");
|
|
547
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
509
548
|
function Loading({ size = "medium", className }) {
|
|
510
|
-
return /* @__PURE__ */ (0,
|
|
549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: (0, import_design_system_foundation11.cn)(Loading_default.loading, Loading_default[`--size_${size}`], className), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: Loading_default.spinner, role: "status", "aria-label": "Loading" }) });
|
|
511
550
|
}
|
|
512
551
|
|
|
513
552
|
// src/components/ui/NotificationBanner/NotificationBanner.module.css
|
|
514
|
-
var NotificationBanner_default = {"banner":"
|
|
553
|
+
var NotificationBanner_default = {"banner":"bds0116NotificationBanner-banner","--variant_info":"bds0116NotificationBanner---variant_info","--variant_success":"bds0116NotificationBanner---variant_success","--variant_warning":"bds0116NotificationBanner---variant_warning","--variant_error":"bds0116NotificationBanner---variant_error","content":"bds0116NotificationBanner-content","action":"bds0116NotificationBanner-action","dismiss":"bds0116NotificationBanner-dismiss"};
|
|
515
554
|
|
|
516
555
|
// src/components/ui/NotificationBanner/NotificationBanner.tsx
|
|
517
|
-
var
|
|
518
|
-
var
|
|
556
|
+
var import_design_system_foundation12 = require("@boostdev/design-system-foundation");
|
|
557
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
519
558
|
function NotificationBanner({
|
|
520
559
|
variant = "info",
|
|
521
560
|
children,
|
|
@@ -524,24 +563,24 @@ function NotificationBanner({
|
|
|
524
563
|
className
|
|
525
564
|
}) {
|
|
526
565
|
const isUrgent = variant === "error" || variant === "warning";
|
|
527
|
-
return /* @__PURE__ */ (0,
|
|
566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
528
567
|
"div",
|
|
529
568
|
{
|
|
530
569
|
role: isUrgent ? "alert" : "status",
|
|
531
570
|
"aria-live": isUrgent ? "assertive" : "polite",
|
|
532
571
|
"aria-atomic": "true",
|
|
533
|
-
className: (0,
|
|
572
|
+
className: (0, import_design_system_foundation12.cn)(NotificationBanner_default.banner, NotificationBanner_default[`--variant_${variant}`], className),
|
|
534
573
|
children: [
|
|
535
|
-
/* @__PURE__ */ (0,
|
|
536
|
-
action && /* @__PURE__ */ (0,
|
|
537
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: NotificationBanner_default.content, children }),
|
|
575
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: NotificationBanner_default.action, children: action }),
|
|
576
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
538
577
|
"button",
|
|
539
578
|
{
|
|
540
579
|
type: "button",
|
|
541
580
|
className: NotificationBanner_default.dismiss,
|
|
542
581
|
onClick: onDismiss,
|
|
543
582
|
"aria-label": "Dismiss notification",
|
|
544
|
-
children: /* @__PURE__ */ (0,
|
|
583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
|
|
545
584
|
}
|
|
546
585
|
)
|
|
547
586
|
]
|
|
@@ -550,11 +589,11 @@ function NotificationBanner({
|
|
|
550
589
|
}
|
|
551
590
|
|
|
552
591
|
// src/components/ui/Pagination/Pagination.module.css
|
|
553
|
-
var Pagination_default = {"pagination":"
|
|
592
|
+
var Pagination_default = {"pagination":"bds0116Pagination-pagination","list":"bds0116Pagination-list","button":"bds0116Pagination-button","--active":"bds0116Pagination---active","--nav":"bds0116Pagination---nav","ellipsis":"bds0116Pagination-ellipsis"};
|
|
554
593
|
|
|
555
594
|
// src/components/ui/Pagination/Pagination.tsx
|
|
556
|
-
var
|
|
557
|
-
var
|
|
595
|
+
var import_design_system_foundation13 = require("@boostdev/design-system-foundation");
|
|
596
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
558
597
|
function getPageRange(current, total) {
|
|
559
598
|
const delta = 1;
|
|
560
599
|
const range = [];
|
|
@@ -574,24 +613,24 @@ function Pagination({
|
|
|
574
613
|
className
|
|
575
614
|
}) {
|
|
576
615
|
const pages = getPageRange(currentPage, totalPages);
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": "Pagination", className: (0, import_design_system_foundation13.cn)(Pagination_default.pagination, className), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("ul", { className: Pagination_default.list, children: [
|
|
617
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
579
618
|
"button",
|
|
580
619
|
{
|
|
581
620
|
type: "button",
|
|
582
|
-
className: (0,
|
|
621
|
+
className: (0, import_design_system_foundation13.cn)(Pagination_default.button, Pagination_default["--nav"]),
|
|
583
622
|
onClick: () => onPageChange(currentPage - 1),
|
|
584
623
|
disabled: currentPage <= 1,
|
|
585
624
|
"aria-label": "Previous page",
|
|
586
|
-
children: /* @__PURE__ */ (0,
|
|
625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
587
626
|
}
|
|
588
627
|
) }),
|
|
589
628
|
pages.map(
|
|
590
|
-
(page, index) => page === "..." ? /* @__PURE__ */ (0,
|
|
629
|
+
(page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Pagination_default.ellipsis, "aria-hidden": "true", children: "\u2026" }) }, `ellipsis-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
591
630
|
"button",
|
|
592
631
|
{
|
|
593
632
|
type: "button",
|
|
594
|
-
className: (0,
|
|
633
|
+
className: (0, import_design_system_foundation13.cn)(Pagination_default.button, currentPage === page ? Pagination_default["--active"] : void 0),
|
|
595
634
|
onClick: () => onPageChange(page),
|
|
596
635
|
"aria-label": `Page ${page}`,
|
|
597
636
|
"aria-current": currentPage === page ? "page" : void 0,
|
|
@@ -599,26 +638,26 @@ function Pagination({
|
|
|
599
638
|
}
|
|
600
639
|
) }, page)
|
|
601
640
|
),
|
|
602
|
-
/* @__PURE__ */ (0,
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
603
642
|
"button",
|
|
604
643
|
{
|
|
605
644
|
type: "button",
|
|
606
|
-
className: (0,
|
|
645
|
+
className: (0, import_design_system_foundation13.cn)(Pagination_default.button, Pagination_default["--nav"]),
|
|
607
646
|
onClick: () => onPageChange(currentPage + 1),
|
|
608
647
|
disabled: currentPage >= totalPages,
|
|
609
648
|
"aria-label": "Next page",
|
|
610
|
-
children: /* @__PURE__ */ (0,
|
|
649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
611
650
|
}
|
|
612
651
|
) })
|
|
613
652
|
] }) });
|
|
614
653
|
}
|
|
615
654
|
|
|
616
655
|
// src/components/ui/Progress/Progress.module.css
|
|
617
|
-
var Progress_default = {"container":"
|
|
656
|
+
var Progress_default = {"container":"bds0116Progress-container","labelRow":"bds0116Progress-labelRow","value":"bds0116Progress-value","track":"bds0116Progress-track","--size_small":"bds0116Progress---size_small","--size_medium":"bds0116Progress---size_medium","--size_large":"bds0116Progress---size_large","fill":"bds0116Progress-fill"};
|
|
618
657
|
|
|
619
658
|
// src/components/ui/Progress/Progress.tsx
|
|
620
|
-
var
|
|
621
|
-
var
|
|
659
|
+
var import_design_system_foundation14 = require("@boostdev/design-system-foundation");
|
|
660
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
622
661
|
function Progress({
|
|
623
662
|
value,
|
|
624
663
|
max = 100,
|
|
@@ -628,15 +667,15 @@ function Progress({
|
|
|
628
667
|
className
|
|
629
668
|
}) {
|
|
630
669
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
631
|
-
return /* @__PURE__ */ (0,
|
|
632
|
-
showLabel && /* @__PURE__ */ (0,
|
|
633
|
-
/* @__PURE__ */ (0,
|
|
634
|
-
/* @__PURE__ */ (0,
|
|
670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_design_system_foundation14.cn)(Progress_default.container, className), children: [
|
|
671
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: Progress_default.labelRow, children: [
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: Progress_default.label, children: label }),
|
|
673
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: Progress_default.value, children: [
|
|
635
674
|
Math.round(percentage),
|
|
636
675
|
"%"
|
|
637
676
|
] })
|
|
638
677
|
] }),
|
|
639
|
-
/* @__PURE__ */ (0,
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
640
679
|
"div",
|
|
641
680
|
{
|
|
642
681
|
role: "progressbar",
|
|
@@ -644,19 +683,19 @@ function Progress({
|
|
|
644
683
|
"aria-valuenow": value,
|
|
645
684
|
"aria-valuemin": 0,
|
|
646
685
|
"aria-valuemax": max,
|
|
647
|
-
className: (0,
|
|
648
|
-
children: /* @__PURE__ */ (0,
|
|
686
|
+
className: (0, import_design_system_foundation14.cn)(Progress_default.track, Progress_default[`--size_${size}`]),
|
|
687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: Progress_default.fill, style: { width: `${percentage}%` } })
|
|
649
688
|
}
|
|
650
689
|
)
|
|
651
690
|
] });
|
|
652
691
|
}
|
|
653
692
|
|
|
654
693
|
// src/components/ui/ProgressCircle/ProgressCircle.module.css
|
|
655
|
-
var ProgressCircle_default = {"wrapper":"
|
|
694
|
+
var ProgressCircle_default = {"wrapper":"bds0116ProgressCircle-wrapper","svg":"bds0116ProgressCircle-svg","track":"bds0116ProgressCircle-track","fill":"bds0116ProgressCircle-fill","value":"bds0116ProgressCircle-value","--size_small":"bds0116ProgressCircle---size_small","--size_medium":"bds0116ProgressCircle---size_medium","--size_large":"bds0116ProgressCircle---size_large"};
|
|
656
695
|
|
|
657
696
|
// src/components/ui/ProgressCircle/ProgressCircle.tsx
|
|
658
|
-
var
|
|
659
|
-
var
|
|
697
|
+
var import_design_system_foundation15 = require("@boostdev/design-system-foundation");
|
|
698
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
660
699
|
var SIZE_PX = { small: 40, medium: 64, large: 96 };
|
|
661
700
|
var STROKE_WIDTH = 4;
|
|
662
701
|
function ProgressCircle({
|
|
@@ -673,7 +712,7 @@ function ProgressCircle({
|
|
|
673
712
|
const circumference = 2 * Math.PI * radius;
|
|
674
713
|
const offset = circumference - percentage / 100 * circumference;
|
|
675
714
|
const cx = px / 2;
|
|
676
|
-
return /* @__PURE__ */ (0,
|
|
715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
677
716
|
"div",
|
|
678
717
|
{
|
|
679
718
|
role: "progressbar",
|
|
@@ -681,9 +720,9 @@ function ProgressCircle({
|
|
|
681
720
|
"aria-valuenow": value,
|
|
682
721
|
"aria-valuemin": 0,
|
|
683
722
|
"aria-valuemax": max,
|
|
684
|
-
className: (0,
|
|
723
|
+
className: (0, import_design_system_foundation15.cn)(ProgressCircle_default.wrapper, ProgressCircle_default[`--size_${size}`], className),
|
|
685
724
|
children: [
|
|
686
|
-
/* @__PURE__ */ (0,
|
|
725
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
687
726
|
"svg",
|
|
688
727
|
{
|
|
689
728
|
width: px,
|
|
@@ -692,7 +731,7 @@ function ProgressCircle({
|
|
|
692
731
|
"aria-hidden": "true",
|
|
693
732
|
className: ProgressCircle_default.svg,
|
|
694
733
|
children: [
|
|
695
|
-
/* @__PURE__ */ (0,
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
696
735
|
"circle",
|
|
697
736
|
{
|
|
698
737
|
className: ProgressCircle_default.track,
|
|
@@ -703,7 +742,7 @@ function ProgressCircle({
|
|
|
703
742
|
fill: "none"
|
|
704
743
|
}
|
|
705
744
|
),
|
|
706
|
-
/* @__PURE__ */ (0,
|
|
745
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
707
746
|
"circle",
|
|
708
747
|
{
|
|
709
748
|
className: ProgressCircle_default.fill,
|
|
@@ -721,7 +760,7 @@ function ProgressCircle({
|
|
|
721
760
|
]
|
|
722
761
|
}
|
|
723
762
|
),
|
|
724
|
-
showValue && /* @__PURE__ */ (0,
|
|
763
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: ProgressCircle_default.value, "aria-hidden": "true", children: [
|
|
725
764
|
Math.round(percentage),
|
|
726
765
|
"%"
|
|
727
766
|
] })
|
|
@@ -731,52 +770,52 @@ function ProgressCircle({
|
|
|
731
770
|
}
|
|
732
771
|
|
|
733
772
|
// src/components/ui/Separator/Separator.module.css
|
|
734
|
-
var Separator_default = {"separator":"
|
|
773
|
+
var Separator_default = {"separator":"bds0116Separator-separator","--horizontal":"bds0116Separator---horizontal","--vertical":"bds0116Separator---vertical"};
|
|
735
774
|
|
|
736
775
|
// src/components/ui/Separator/Separator.tsx
|
|
737
|
-
var
|
|
738
|
-
var
|
|
776
|
+
var import_design_system_foundation16 = require("@boostdev/design-system-foundation");
|
|
777
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
739
778
|
function Separator({ orientation = "horizontal", className }) {
|
|
740
779
|
if (orientation === "vertical") {
|
|
741
|
-
return /* @__PURE__ */ (0,
|
|
780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
742
781
|
"div",
|
|
743
782
|
{
|
|
744
783
|
role: "separator",
|
|
745
784
|
"aria-orientation": "vertical",
|
|
746
|
-
className: (0,
|
|
785
|
+
className: (0, import_design_system_foundation16.cn)(Separator_default.separator, Separator_default["--vertical"], className)
|
|
747
786
|
}
|
|
748
787
|
);
|
|
749
788
|
}
|
|
750
|
-
return /* @__PURE__ */ (0,
|
|
789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("hr", { className: (0, import_design_system_foundation16.cn)(Separator_default.separator, Separator_default["--horizontal"], className) });
|
|
751
790
|
}
|
|
752
791
|
|
|
753
792
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
754
|
-
var
|
|
793
|
+
var import_design_system_foundation17 = require("@boostdev/design-system-foundation");
|
|
755
794
|
|
|
756
795
|
// src/components/ui/Skeleton/Skeleton.module.css
|
|
757
|
-
var Skeleton_default = {"skeleton":"
|
|
796
|
+
var Skeleton_default = {"skeleton":"bds0116Skeleton-skeleton"};
|
|
758
797
|
|
|
759
798
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
760
|
-
var
|
|
799
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
761
800
|
function Skeleton({ className }) {
|
|
762
|
-
return /* @__PURE__ */ (0,
|
|
801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "aria-hidden": "true", className: (0, import_design_system_foundation17.cn)(Skeleton_default.skeleton, className) });
|
|
763
802
|
}
|
|
764
803
|
|
|
765
804
|
// src/components/ui/SkipLink/SkipLink.module.css
|
|
766
|
-
var SkipLink_default = {"skipLink":"
|
|
805
|
+
var SkipLink_default = {"skipLink":"bds0116SkipLink-skipLink"};
|
|
767
806
|
|
|
768
807
|
// src/components/ui/SkipLink/SkipLink.tsx
|
|
769
|
-
var
|
|
808
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
770
809
|
function SkipLink({ href = "#main", children = "Skip to main content" }) {
|
|
771
|
-
return /* @__PURE__ */ (0,
|
|
810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href, className: SkipLink_default.skipLink, children });
|
|
772
811
|
}
|
|
773
812
|
|
|
774
813
|
// src/components/ui/Table/Table.module.css
|
|
775
|
-
var Table_default = {"wrapper":"
|
|
814
|
+
var Table_default = {"wrapper":"bds0116Table-wrapper","table":"bds0116Table-table","caption":"bds0116Table-caption","thead":"bds0116Table-thead","th":"bds0116Table-th","--sortable":"bds0116Table---sortable","sortButton":"bds0116Table-sortButton","sortIcon":"bds0116Table-sortIcon","--sort-active":"bds0116Table---sort-active","--sort-desc":"bds0116Table---sort-desc","tbody":"bds0116Table-tbody","tr":"bds0116Table-tr","td":"bds0116Table-td"};
|
|
776
815
|
|
|
777
816
|
// src/components/ui/Table/Table.tsx
|
|
778
|
-
var
|
|
779
|
-
var
|
|
817
|
+
var import_design_system_foundation18 = require("@boostdev/design-system-foundation");
|
|
818
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
780
819
|
function Table({
|
|
781
820
|
columns,
|
|
782
821
|
rows,
|
|
@@ -795,15 +834,15 @@ function Table({
|
|
|
795
834
|
if (sortKey !== key) return "none";
|
|
796
835
|
return sortDirection === "asc" ? "ascending" : "descending";
|
|
797
836
|
};
|
|
798
|
-
return /* @__PURE__ */ (0,
|
|
799
|
-
caption && /* @__PURE__ */ (0,
|
|
800
|
-
/* @__PURE__ */ (0,
|
|
837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_design_system_foundation18.cn)(Table_default.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("table", { className: Table_default.table, children: [
|
|
838
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("caption", { className: Table_default.caption, children: caption }),
|
|
839
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("thead", { className: Table_default.thead, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
801
840
|
"th",
|
|
802
841
|
{
|
|
803
842
|
scope: "col",
|
|
804
843
|
"aria-sort": col.sortable ? getAriaSort(col.key) : void 0,
|
|
805
|
-
className: (0,
|
|
806
|
-
children: col.sortable ? /* @__PURE__ */ (0,
|
|
844
|
+
className: (0, import_design_system_foundation18.cn)(Table_default.th, col.sortable ? Table_default["--sortable"] : void 0),
|
|
845
|
+
children: col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
807
846
|
"button",
|
|
808
847
|
{
|
|
809
848
|
type: "button",
|
|
@@ -811,11 +850,11 @@ function Table({
|
|
|
811
850
|
onClick: () => handleSort(col.key),
|
|
812
851
|
children: [
|
|
813
852
|
col.header,
|
|
814
|
-
/* @__PURE__ */ (0,
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
815
854
|
"svg",
|
|
816
855
|
{
|
|
817
856
|
"aria-hidden": "true",
|
|
818
|
-
className: (0,
|
|
857
|
+
className: (0, import_design_system_foundation18.cn)(
|
|
819
858
|
Table_default.sortIcon,
|
|
820
859
|
sortKey === col.key ? Table_default["--sort-active"] : void 0,
|
|
821
860
|
sortKey === col.key && sortDirection === "desc" ? Table_default["--sort-desc"] : void 0
|
|
@@ -824,7 +863,7 @@ function Table({
|
|
|
824
863
|
fill: "none",
|
|
825
864
|
stroke: "currentColor",
|
|
826
865
|
strokeWidth: "2",
|
|
827
|
-
children: /* @__PURE__ */ (0,
|
|
866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" })
|
|
828
867
|
}
|
|
829
868
|
)
|
|
830
869
|
]
|
|
@@ -833,7 +872,7 @@ function Table({
|
|
|
833
872
|
},
|
|
834
873
|
col.key
|
|
835
874
|
)) }) }),
|
|
836
|
-
/* @__PURE__ */ (0,
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tbody", { className: Table_default.tbody, children: rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { className: Table_default.tr, children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { className: Table_default.td, children: col.render ? col.render(row) : String(row[col.key] ?? "") }, col.key)) }, rowIndex)) })
|
|
837
876
|
] }) });
|
|
838
877
|
}
|
|
839
878
|
|
|
@@ -841,11 +880,11 @@ function Table({
|
|
|
841
880
|
var import_react4 = require("react");
|
|
842
881
|
|
|
843
882
|
// src/components/ui/Tabs/Tabs.module.css
|
|
844
|
-
var Tabs_default = {"tabs":"
|
|
883
|
+
var Tabs_default = {"tabs":"bds0116Tabs-tabs","tabList":"bds0116Tabs-tabList","tab":"bds0116Tabs-tab","--active":"bds0116Tabs---active","panel":"bds0116Tabs-panel"};
|
|
845
884
|
|
|
846
885
|
// src/components/ui/Tabs/Tabs.tsx
|
|
847
|
-
var
|
|
848
|
-
var
|
|
886
|
+
var import_design_system_foundation19 = require("@boostdev/design-system-foundation");
|
|
887
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
849
888
|
function Tabs({ tabs, defaultTab, className }) {
|
|
850
889
|
const baseId = (0, import_react4.useId)();
|
|
851
890
|
const [activeTab, setActiveTab] = (0, import_react4.useState)(defaultTab ?? tabs[0]?.id);
|
|
@@ -871,12 +910,12 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
871
910
|
focusAt(enabledIndexes[enabledIndexes.length - 1]);
|
|
872
911
|
}
|
|
873
912
|
};
|
|
874
|
-
return /* @__PURE__ */ (0,
|
|
875
|
-
/* @__PURE__ */ (0,
|
|
913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_design_system_foundation19.cn)(Tabs_default.tabs, className), children: [
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { role: "tablist", className: Tabs_default.tabList, children: tabs.map((tab, i) => {
|
|
876
915
|
const tabId = `${baseId}-tab-${tab.id}`;
|
|
877
916
|
const panelId = `${baseId}-panel-${tab.id}`;
|
|
878
917
|
const isActive = activeTab === tab.id;
|
|
879
|
-
return /* @__PURE__ */ (0,
|
|
918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
880
919
|
"button",
|
|
881
920
|
{
|
|
882
921
|
ref: (el) => {
|
|
@@ -889,7 +928,7 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
889
928
|
"aria-controls": panelId,
|
|
890
929
|
tabIndex: isActive ? 0 : -1,
|
|
891
930
|
disabled: tab.disabled,
|
|
892
|
-
className: (0,
|
|
931
|
+
className: (0, import_design_system_foundation19.cn)(Tabs_default.tab, isActive ? Tabs_default["--active"] : void 0),
|
|
893
932
|
onClick: () => setActiveTab(tab.id),
|
|
894
933
|
onKeyDown: (e) => handleKeyDown(e, i),
|
|
895
934
|
children: tab.label
|
|
@@ -901,7 +940,7 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
901
940
|
const tabId = `${baseId}-tab-${tab.id}`;
|
|
902
941
|
const panelId = `${baseId}-panel-${tab.id}`;
|
|
903
942
|
const isActive = activeTab === tab.id;
|
|
904
|
-
return /* @__PURE__ */ (0,
|
|
943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
905
944
|
"div",
|
|
906
945
|
{
|
|
907
946
|
id: panelId,
|
|
@@ -922,11 +961,11 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
922
961
|
var import_react5 = require("react");
|
|
923
962
|
|
|
924
963
|
// src/components/ui/Tooltip/Tooltip.module.css
|
|
925
|
-
var Tooltip_default = {"wrapper":"
|
|
964
|
+
var Tooltip_default = {"wrapper":"bds0116Tooltip-wrapper","tooltip":"bds0116Tooltip-tooltip","--placement_top":"bds0116Tooltip---placement_top","--placement_bottom":"bds0116Tooltip---placement_bottom","--placement_left":"bds0116Tooltip---placement_left","--placement_right":"bds0116Tooltip---placement_right"};
|
|
926
965
|
|
|
927
966
|
// src/components/ui/Tooltip/Tooltip.tsx
|
|
928
|
-
var
|
|
929
|
-
var
|
|
967
|
+
var import_design_system_foundation20 = require("@boostdev/design-system-foundation");
|
|
968
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
930
969
|
function Tooltip({
|
|
931
970
|
content,
|
|
932
971
|
placement = "top",
|
|
@@ -937,14 +976,14 @@ function Tooltip({
|
|
|
937
976
|
const trigger = (0, import_react5.isValidElement)(children) ? (0, import_react5.cloneElement)(children, {
|
|
938
977
|
"aria-describedby": tooltipId
|
|
939
978
|
}) : children;
|
|
940
|
-
return /* @__PURE__ */ (0,
|
|
979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: (0, import_design_system_foundation20.cn)(Tooltip_default.wrapper, className), children: [
|
|
941
980
|
trigger,
|
|
942
|
-
/* @__PURE__ */ (0,
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
943
982
|
"span",
|
|
944
983
|
{
|
|
945
984
|
id: tooltipId,
|
|
946
985
|
role: "tooltip",
|
|
947
|
-
className: (0,
|
|
986
|
+
className: (0, import_design_system_foundation20.cn)(Tooltip_default.tooltip, Tooltip_default[`--placement_${placement}`]),
|
|
948
987
|
children: content
|
|
949
988
|
}
|
|
950
989
|
)
|
|
@@ -952,11 +991,11 @@ function Tooltip({
|
|
|
952
991
|
}
|
|
953
992
|
|
|
954
993
|
// src/components/ui/Typography/Typography.module.css
|
|
955
|
-
var Typography_default = {"typography":"
|
|
994
|
+
var Typography_default = {"typography":"bds0116Typography-typography","--h1":"bds0116Typography---h1","--h2":"bds0116Typography---h2","--h3":"bds0116Typography---h3","--body":"bds0116Typography---body","--body_s":"bds0116Typography---body_s"};
|
|
956
995
|
|
|
957
996
|
// src/components/ui/Typography/Typography.tsx
|
|
958
|
-
var
|
|
959
|
-
var
|
|
997
|
+
var import_design_system_foundation21 = require("@boostdev/design-system-foundation");
|
|
998
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
960
999
|
var variantToElement = {
|
|
961
1000
|
h1: "h1",
|
|
962
1001
|
h2: "h2",
|
|
@@ -966,15 +1005,15 @@ var variantToElement = {
|
|
|
966
1005
|
};
|
|
967
1006
|
function Typography({ variant = "body", component, children, className }) {
|
|
968
1007
|
const Component = component || variantToElement[variant];
|
|
969
|
-
return /* @__PURE__ */ (0,
|
|
1008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Component, { className: (0, import_design_system_foundation21.cn)(Typography_default.typography, Typography_default[`--${variant}`], className), children });
|
|
970
1009
|
}
|
|
971
1010
|
|
|
972
1011
|
// src/components/interaction/Button/Button.module.css
|
|
973
|
-
var Button_default = {"button":"
|
|
1012
|
+
var Button_default = {"button":"bds0116Button-button","--primary":"bds0116Button---primary","--secondary":"bds0116Button---secondary","--size_small":"bds0116Button---size_small","--size_medium":"bds0116Button---size_medium","--size_large":"bds0116Button---size_large","--hasPulse":"bds0116Button---hasPulse","prefix":"bds0116Button-prefix","suffix":"bds0116Button-suffix"};
|
|
974
1013
|
|
|
975
1014
|
// src/components/interaction/Button/Button.tsx
|
|
976
|
-
var
|
|
977
|
-
var
|
|
1015
|
+
var import_design_system_foundation22 = require("@boostdev/design-system-foundation");
|
|
1016
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
978
1017
|
function Button({
|
|
979
1018
|
children,
|
|
980
1019
|
className,
|
|
@@ -991,7 +1030,7 @@ function Button({
|
|
|
991
1030
|
onClick,
|
|
992
1031
|
...rest
|
|
993
1032
|
}) {
|
|
994
|
-
const classNames = (0,
|
|
1033
|
+
const classNames = (0, import_design_system_foundation22.cn)(
|
|
995
1034
|
Button_default.button,
|
|
996
1035
|
Button_default[`--${variant}`],
|
|
997
1036
|
Button_default[`--size_${size}`],
|
|
@@ -1008,13 +1047,13 @@ function Button({
|
|
|
1008
1047
|
const handleButtonClick = (e) => {
|
|
1009
1048
|
onClick?.(e);
|
|
1010
1049
|
};
|
|
1011
|
-
const content = /* @__PURE__ */ (0,
|
|
1012
|
-
Boolean(iconStart) && /* @__PURE__ */ (0,
|
|
1050
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1051
|
+
Boolean(iconStart) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.prefix, children: iconStart }),
|
|
1013
1052
|
children,
|
|
1014
|
-
Boolean(iconEnd) && /* @__PURE__ */ (0,
|
|
1053
|
+
Boolean(iconEnd) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.suffix, children: iconEnd })
|
|
1015
1054
|
] });
|
|
1016
1055
|
if (href) {
|
|
1017
|
-
return /* @__PURE__ */ (0,
|
|
1056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1018
1057
|
"a",
|
|
1019
1058
|
{
|
|
1020
1059
|
className: classNames,
|
|
@@ -1029,7 +1068,7 @@ function Button({
|
|
|
1029
1068
|
}
|
|
1030
1069
|
);
|
|
1031
1070
|
}
|
|
1032
|
-
return /* @__PURE__ */ (0,
|
|
1071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1033
1072
|
"button",
|
|
1034
1073
|
{
|
|
1035
1074
|
type,
|
|
@@ -1046,11 +1085,11 @@ function Button({
|
|
|
1046
1085
|
var import_react6 = require("react");
|
|
1047
1086
|
|
|
1048
1087
|
// src/components/interaction/Command/Command.module.css
|
|
1049
|
-
var Command_default = {"dialog":"
|
|
1088
|
+
var Command_default = {"dialog":"bds0116Command-dialog","palette":"bds0116Command-palette","searchRow":"bds0116Command-searchRow","searchIcon":"bds0116Command-searchIcon","search":"bds0116Command-search","escHint":"bds0116Command-escHint","list":"bds0116Command-list","groupList":"bds0116Command-groupList","group":"bds0116Command-group","item":"bds0116Command-item","itemActive":"bds0116Command-itemActive","itemLabel":"bds0116Command-itemLabel","itemDesc":"bds0116Command-itemDesc","shortcut":"bds0116Command-shortcut","empty":"bds0116Command-empty"};
|
|
1050
1089
|
|
|
1051
1090
|
// src/components/interaction/Command/Command.tsx
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1091
|
+
var import_design_system_foundation23 = require("@boostdev/design-system-foundation");
|
|
1092
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1054
1093
|
function Command({
|
|
1055
1094
|
isOpen,
|
|
1056
1095
|
onClose,
|
|
@@ -1117,20 +1156,20 @@ function Command({
|
|
|
1117
1156
|
item.onSelect();
|
|
1118
1157
|
onClose();
|
|
1119
1158
|
};
|
|
1120
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1121
1160
|
"dialog",
|
|
1122
1161
|
{
|
|
1123
1162
|
ref: dialogRef,
|
|
1124
|
-
className: (0,
|
|
1163
|
+
className: (0, import_design_system_foundation23.cn)(Command_default.dialog, className),
|
|
1125
1164
|
"aria-label": "Command palette",
|
|
1126
1165
|
onCancel: handleCancel,
|
|
1127
|
-
children: /* @__PURE__ */ (0,
|
|
1128
|
-
/* @__PURE__ */ (0,
|
|
1129
|
-
/* @__PURE__ */ (0,
|
|
1130
|
-
/* @__PURE__ */ (0,
|
|
1131
|
-
/* @__PURE__ */ (0,
|
|
1166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Command_default.palette, onKeyDown: handleKeyDown, children: [
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Command_default.searchRow, children: [
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { "aria-hidden": "true", className: Command_default.searchIcon, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { strokeLinecap: "round", d: "M21 21l-4.35-4.35" })
|
|
1132
1171
|
] }),
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1134
1173
|
"input",
|
|
1135
1174
|
{
|
|
1136
1175
|
ref: inputRef,
|
|
@@ -1146,32 +1185,32 @@ function Command({
|
|
|
1146
1185
|
onChange: (e) => setQuery(e.target.value)
|
|
1147
1186
|
}
|
|
1148
1187
|
),
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("kbd", { className: Command_default.escHint, children: "Esc" })
|
|
1150
1189
|
] }),
|
|
1151
|
-
filtered.length > 0 ? /* @__PURE__ */ (0,
|
|
1152
|
-
group && /* @__PURE__ */ (0,
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1190
|
+
filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { id: listboxId, role: "listbox", className: Command_default.list, "aria-label": "Commands", children: Array.from(groups.entries()).map(([group, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("li", { role: "presentation", children: [
|
|
1191
|
+
group && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: Command_default.group, role: "presentation", children: group }),
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { role: "group", "aria-label": group || void 0, className: Command_default.groupList, children: groupItems.map((item) => {
|
|
1154
1193
|
const flatIndex = filtered.indexOf(item);
|
|
1155
1194
|
const isActive = flatIndex === activeIndex;
|
|
1156
|
-
return /* @__PURE__ */ (0,
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1157
1196
|
"li",
|
|
1158
1197
|
{
|
|
1159
1198
|
id: `cmd-${item.id}`,
|
|
1160
1199
|
role: "option",
|
|
1161
1200
|
"aria-selected": isActive,
|
|
1162
|
-
className: (0,
|
|
1201
|
+
className: (0, import_design_system_foundation23.cn)(Command_default.item, isActive && Command_default.itemActive),
|
|
1163
1202
|
onPointerDown: (e) => e.preventDefault(),
|
|
1164
1203
|
onClick: () => selectItem(item),
|
|
1165
1204
|
children: [
|
|
1166
|
-
/* @__PURE__ */ (0,
|
|
1167
|
-
item.description && /* @__PURE__ */ (0,
|
|
1168
|
-
item.shortcut && /* @__PURE__ */ (0,
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: Command_default.itemLabel, children: item.label }),
|
|
1206
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: Command_default.itemDesc, children: item.description }),
|
|
1207
|
+
item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("kbd", { className: Command_default.shortcut, children: item.shortcut })
|
|
1169
1208
|
]
|
|
1170
1209
|
},
|
|
1171
1210
|
item.id
|
|
1172
1211
|
);
|
|
1173
1212
|
}) })
|
|
1174
|
-
] }, group)) }) : /* @__PURE__ */ (0,
|
|
1213
|
+
] }, group)) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Command_default.empty, "aria-live": "polite", children: [
|
|
1175
1214
|
"No results for \u201C",
|
|
1176
1215
|
query,
|
|
1177
1216
|
"\u201D"
|
|
@@ -1185,11 +1224,11 @@ function Command({
|
|
|
1185
1224
|
var import_react7 = require("react");
|
|
1186
1225
|
|
|
1187
1226
|
// src/components/interaction/Dialog/Dialog.module.css
|
|
1188
|
-
var Dialog_default = {"dialog":"
|
|
1227
|
+
var Dialog_default = {"dialog":"bds0116Dialog-dialog","dialogContent":"bds0116Dialog-dialogContent","closeForm":"bds0116Dialog-closeForm","closeButton":"bds0116Dialog-closeButton"};
|
|
1189
1228
|
|
|
1190
1229
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
1191
|
-
var
|
|
1192
|
-
var
|
|
1230
|
+
var import_design_system_foundation24 = require("@boostdev/design-system-foundation");
|
|
1231
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1193
1232
|
function Dialog({ children, isOpen = false, className, onClose }) {
|
|
1194
1233
|
const dialogRef = (0, import_react7.useRef)(null);
|
|
1195
1234
|
(0, import_react7.useEffect)(() => {
|
|
@@ -1213,25 +1252,25 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1213
1252
|
e.preventDefault();
|
|
1214
1253
|
onClose?.();
|
|
1215
1254
|
};
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1217
1256
|
"dialog",
|
|
1218
1257
|
{
|
|
1219
1258
|
ref: dialogRef,
|
|
1220
|
-
className: (0,
|
|
1259
|
+
className: (0, import_design_system_foundation24.cn)(className, Dialog_default.dialog),
|
|
1221
1260
|
onClick: handleBackdropClick,
|
|
1222
1261
|
onCancel: handleCancel,
|
|
1223
1262
|
children: [
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("form", { method: "dialog", className: Dialog_default.closeForm, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1225
1264
|
"button",
|
|
1226
1265
|
{
|
|
1227
1266
|
type: "submit",
|
|
1228
1267
|
className: Dialog_default.closeButton,
|
|
1229
1268
|
onClick: onClose,
|
|
1230
1269
|
"aria-label": "Close dialog",
|
|
1231
|
-
children: /* @__PURE__ */ (0,
|
|
1270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
|
|
1232
1271
|
}
|
|
1233
1272
|
) }),
|
|
1234
|
-
/* @__PURE__ */ (0,
|
|
1273
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: Dialog_default.dialogContent, children })
|
|
1235
1274
|
]
|
|
1236
1275
|
}
|
|
1237
1276
|
);
|
|
@@ -1241,11 +1280,11 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1241
1280
|
var import_react8 = require("react");
|
|
1242
1281
|
|
|
1243
1282
|
// src/components/interaction/Drawer/Drawer.module.css
|
|
1244
|
-
var Drawer_default = {"drawer":"
|
|
1283
|
+
var Drawer_default = {"drawer":"bds0116Drawer-drawer","panel":"bds0116Drawer-panel","--side_right":"bds0116Drawer---side_right","--side_left":"bds0116Drawer---side_left","header":"bds0116Drawer-header","closeButton":"bds0116Drawer-closeButton","body":"bds0116Drawer-body"};
|
|
1245
1284
|
|
|
1246
1285
|
// src/components/interaction/Drawer/Drawer.tsx
|
|
1247
|
-
var
|
|
1248
|
-
var
|
|
1286
|
+
var import_design_system_foundation25 = require("@boostdev/design-system-foundation");
|
|
1287
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1249
1288
|
function Drawer({
|
|
1250
1289
|
isOpen,
|
|
1251
1290
|
onClose,
|
|
@@ -1272,29 +1311,29 @@ function Drawer({
|
|
|
1272
1311
|
e.preventDefault();
|
|
1273
1312
|
onClose();
|
|
1274
1313
|
};
|
|
1275
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1276
1315
|
"dialog",
|
|
1277
1316
|
{
|
|
1278
1317
|
ref: dialogRef,
|
|
1279
|
-
className: (0,
|
|
1318
|
+
className: (0, import_design_system_foundation25.cn)(Drawer_default.drawer, Drawer_default[`--side_${side}`], className),
|
|
1280
1319
|
"aria-label": arialLabel,
|
|
1281
1320
|
onClick: handleClick,
|
|
1282
1321
|
onCancel: handleCancel,
|
|
1283
|
-
children: /* @__PURE__ */ (0,
|
|
1284
|
-
/* @__PURE__ */ (0,
|
|
1322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: Drawer_default.panel, children: [
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: Drawer_default.header, children: [
|
|
1285
1324
|
!!title && title,
|
|
1286
|
-
/* @__PURE__ */ (0,
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1287
1326
|
"button",
|
|
1288
1327
|
{
|
|
1289
1328
|
type: "button",
|
|
1290
1329
|
className: Drawer_default.closeButton,
|
|
1291
1330
|
onClick: onClose,
|
|
1292
1331
|
"aria-label": "Close drawer",
|
|
1293
|
-
children: /* @__PURE__ */ (0,
|
|
1332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
|
|
1294
1333
|
}
|
|
1295
1334
|
)
|
|
1296
1335
|
] }),
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1336
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: Drawer_default.body, children })
|
|
1298
1337
|
] })
|
|
1299
1338
|
}
|
|
1300
1339
|
);
|
|
@@ -1304,11 +1343,11 @@ function Drawer({
|
|
|
1304
1343
|
var import_react9 = require("react");
|
|
1305
1344
|
|
|
1306
1345
|
// src/components/interaction/DropdownMenu/DropdownMenu.module.css
|
|
1307
|
-
var DropdownMenu_default = {"wrapper":"
|
|
1346
|
+
var DropdownMenu_default = {"wrapper":"bds0116DropdownMenu-wrapper","menu":"bds0116DropdownMenu-menu","--placement_bottom-start":"bds0116DropdownMenu---placement_bottom-start","--placement_bottom-end":"bds0116DropdownMenu---placement_bottom-end","separator":"bds0116DropdownMenu-separator","item":"bds0116DropdownMenu-item","icon":"bds0116DropdownMenu-icon"};
|
|
1308
1347
|
|
|
1309
1348
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
1310
|
-
var
|
|
1311
|
-
var
|
|
1349
|
+
var import_design_system_foundation26 = require("@boostdev/design-system-foundation");
|
|
1350
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1312
1351
|
function DropdownMenu({
|
|
1313
1352
|
trigger,
|
|
1314
1353
|
items,
|
|
@@ -1376,17 +1415,17 @@ function DropdownMenu({
|
|
|
1376
1415
|
if (typeof existingOnClick === "function") existingOnClick(e);
|
|
1377
1416
|
}
|
|
1378
1417
|
}) : trigger;
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { ref: containerRef, className: (0, import_design_system_foundation26.cn)(DropdownMenu_default.wrapper, className), children: [
|
|
1380
1419
|
triggerEl,
|
|
1381
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1420
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1382
1421
|
"ul",
|
|
1383
1422
|
{
|
|
1384
1423
|
id: menuId,
|
|
1385
1424
|
role: "menu",
|
|
1386
|
-
className: (0,
|
|
1387
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
1388
|
-
item.separator && /* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1425
|
+
className: (0, import_design_system_foundation26.cn)(DropdownMenu_default.menu, DropdownMenu_default[`--placement_${placement}`]),
|
|
1426
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("li", { role: "presentation", children: [
|
|
1427
|
+
item.separator && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("hr", { className: DropdownMenu_default.separator, role: "separator" }),
|
|
1428
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1390
1429
|
"button",
|
|
1391
1430
|
{
|
|
1392
1431
|
ref: (el) => {
|
|
@@ -1402,7 +1441,7 @@ function DropdownMenu({
|
|
|
1402
1441
|
},
|
|
1403
1442
|
onKeyDown: (e) => handleItemKeyDown(e, index),
|
|
1404
1443
|
children: [
|
|
1405
|
-
item.icon && /* @__PURE__ */ (0,
|
|
1444
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: DropdownMenu_default.icon, "aria-hidden": "true", children: item.icon }),
|
|
1406
1445
|
item.label
|
|
1407
1446
|
]
|
|
1408
1447
|
}
|
|
@@ -1417,11 +1456,11 @@ function DropdownMenu({
|
|
|
1417
1456
|
var import_react10 = require("react");
|
|
1418
1457
|
|
|
1419
1458
|
// src/components/interaction/Popover/Popover.module.css
|
|
1420
|
-
var Popover_default = {"wrapper":"
|
|
1459
|
+
var Popover_default = {"wrapper":"bds0116Popover-wrapper","panel":"bds0116Popover-panel","--placement_bottom":"bds0116Popover---placement_bottom","--placement_top":"bds0116Popover---placement_top","--placement_right":"bds0116Popover---placement_right","--placement_left":"bds0116Popover---placement_left"};
|
|
1421
1460
|
|
|
1422
1461
|
// src/components/interaction/Popover/Popover.tsx
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1462
|
+
var import_design_system_foundation27 = require("@boostdev/design-system-foundation");
|
|
1463
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1425
1464
|
function Popover({
|
|
1426
1465
|
children,
|
|
1427
1466
|
content,
|
|
@@ -1457,15 +1496,15 @@ function Popover({
|
|
|
1457
1496
|
if (typeof existingOnClick === "function") existingOnClick(e);
|
|
1458
1497
|
}
|
|
1459
1498
|
}) : children;
|
|
1460
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { ref: containerRef, className: (0, import_design_system_foundation27.cn)(Popover_default.wrapper, className), children: [
|
|
1461
1500
|
trigger,
|
|
1462
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1501
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1463
1502
|
"div",
|
|
1464
1503
|
{
|
|
1465
1504
|
id: panelId,
|
|
1466
1505
|
role: "dialog",
|
|
1467
1506
|
"aria-modal": "false",
|
|
1468
|
-
className: (0,
|
|
1507
|
+
className: (0, import_design_system_foundation27.cn)(Popover_default.panel, Popover_default[`--placement_${placement}`]),
|
|
1469
1508
|
children: content
|
|
1470
1509
|
}
|
|
1471
1510
|
)
|
|
@@ -1473,26 +1512,26 @@ function Popover({
|
|
|
1473
1512
|
}
|
|
1474
1513
|
|
|
1475
1514
|
// src/components/interaction/Rating/Rating.module.css
|
|
1476
|
-
var Rating_default = {"rating":"
|
|
1515
|
+
var Rating_default = {"rating":"bds0116Rating-rating","star":"bds0116Rating-star","--filled":"bds0116Rating---filled"};
|
|
1477
1516
|
|
|
1478
1517
|
// src/components/interaction/Rating/Rating.tsx
|
|
1479
|
-
var
|
|
1480
|
-
var
|
|
1518
|
+
var import_design_system_foundation28 = require("@boostdev/design-system-foundation");
|
|
1519
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1481
1520
|
function Rating({ value, max = 5, className }) {
|
|
1482
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1483
1522
|
"div",
|
|
1484
1523
|
{
|
|
1485
|
-
className: (0,
|
|
1524
|
+
className: (0, import_design_system_foundation28.cn)(Rating_default.rating, className),
|
|
1486
1525
|
role: "img",
|
|
1487
1526
|
"aria-label": `${value} out of ${max} stars`,
|
|
1488
|
-
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0,
|
|
1527
|
+
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1489
1528
|
"svg",
|
|
1490
1529
|
{
|
|
1491
1530
|
"aria-hidden": "true",
|
|
1492
|
-
className: (0,
|
|
1531
|
+
className: (0, import_design_system_foundation28.cn)(Rating_default.star, i < value && Rating_default["--filled"]),
|
|
1493
1532
|
fill: "currentColor",
|
|
1494
1533
|
viewBox: "0 0 24 24",
|
|
1495
|
-
children: /* @__PURE__ */ (0,
|
|
1534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" })
|
|
1496
1535
|
},
|
|
1497
1536
|
i
|
|
1498
1537
|
))
|
|
@@ -1504,11 +1543,11 @@ function Rating({ value, max = 5, className }) {
|
|
|
1504
1543
|
var import_react11 = require("react");
|
|
1505
1544
|
|
|
1506
1545
|
// src/components/interaction/Toast/Toast.module.css
|
|
1507
|
-
var Toast_default = {"toastContainer":"
|
|
1546
|
+
var Toast_default = {"toastContainer":"bds0116Toast-toastContainer","toast":"bds0116Toast-toast","--variant_success":"bds0116Toast---variant_success","--variant_warning":"bds0116Toast---variant_warning","--variant_info":"bds0116Toast---variant_info","--variant_error":"bds0116Toast---variant_error","message":"bds0116Toast-message","closeButton":"bds0116Toast-closeButton"};
|
|
1508
1547
|
|
|
1509
1548
|
// src/components/interaction/Toast/Toast.tsx
|
|
1510
|
-
var
|
|
1511
|
-
var
|
|
1549
|
+
var import_design_system_foundation29 = require("@boostdev/design-system-foundation");
|
|
1550
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1512
1551
|
var ToastContext = (0, import_react11.createContext)(void 0);
|
|
1513
1552
|
function ToastProvider({ children }) {
|
|
1514
1553
|
const [toasts, setToasts] = (0, import_react11.useState)([]);
|
|
@@ -1520,9 +1559,9 @@ function ToastProvider({ children }) {
|
|
|
1520
1559
|
setToasts((prev) => prev.filter((toast) => toast.id !== id));
|
|
1521
1560
|
}, []);
|
|
1522
1561
|
const value = (0, import_react11.useMemo)(() => ({ showToast }), [showToast]);
|
|
1523
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value, children: [
|
|
1524
1563
|
children,
|
|
1525
|
-
/* @__PURE__ */ (0,
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: Toast_default.toastContainer, children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1526
1565
|
ToastItem,
|
|
1527
1566
|
{
|
|
1528
1567
|
toast,
|
|
@@ -1537,9 +1576,9 @@ function ToastItem({ toast, onRemove }) {
|
|
|
1537
1576
|
const timer = setTimeout(onRemove, 5e3);
|
|
1538
1577
|
return () => clearTimeout(timer);
|
|
1539
1578
|
}, [onRemove]);
|
|
1540
|
-
return /* @__PURE__ */ (0,
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
1579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_design_system_foundation29.cn)(Toast_default.toast, Toast_default[`--variant_${toast.variant}`]), role: "status", children: [
|
|
1580
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: Toast_default.message, children: toast.message }),
|
|
1581
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: Toast_default.closeButton, onClick: onRemove, "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) }) })
|
|
1543
1582
|
] });
|
|
1544
1583
|
}
|
|
1545
1584
|
function useToast() {
|
|
@@ -1554,50 +1593,50 @@ function useToast() {
|
|
|
1554
1593
|
var import_react12 = require("react");
|
|
1555
1594
|
|
|
1556
1595
|
// src/components/interaction/form/Checkbox/Checkbox.module.css
|
|
1557
|
-
var Checkbox_default = {"checkboxGroup":"
|
|
1596
|
+
var Checkbox_default = {"checkboxGroup":"bds0116Checkbox-checkboxGroup","inputWrapper":"bds0116Checkbox-inputWrapper","checkbox":"bds0116Checkbox-checkbox","checkboxError":"bds0116Checkbox-checkboxError"};
|
|
1558
1597
|
|
|
1559
1598
|
// src/components/interaction/form/atoms/Message.module.css
|
|
1560
|
-
var Message_default = {"error":"
|
|
1599
|
+
var Message_default = {"error":"bds0116Message-error","hint":"bds0116Message-hint"};
|
|
1561
1600
|
|
|
1562
1601
|
// src/components/interaction/form/atoms/Message.tsx
|
|
1563
|
-
var
|
|
1602
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1564
1603
|
var Message = ({ message, type, inputId }) => {
|
|
1565
1604
|
if (!message) return null;
|
|
1566
|
-
return /* @__PURE__ */ (0,
|
|
1605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: inputId + type, className: Message_default[type], children: message });
|
|
1567
1606
|
};
|
|
1568
1607
|
|
|
1569
1608
|
// src/components/interaction/form/atoms/Label.module.css
|
|
1570
|
-
var Label_default = {"label":"
|
|
1609
|
+
var Label_default = {"label":"bds0116Label-label"};
|
|
1571
1610
|
|
|
1572
1611
|
// src/components/interaction/form/atoms/Label.tsx
|
|
1573
|
-
var
|
|
1612
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1574
1613
|
var Label = ({ label, id }) => {
|
|
1575
|
-
return /* @__PURE__ */ (0,
|
|
1614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("label", { htmlFor: id, className: Label_default.label, children: label });
|
|
1576
1615
|
};
|
|
1577
1616
|
|
|
1578
1617
|
// src/components/interaction/form/Checkbox/Checkbox.tsx
|
|
1579
|
-
var
|
|
1618
|
+
var import_design_system_foundation31 = require("@boostdev/design-system-foundation");
|
|
1580
1619
|
|
|
1581
1620
|
// src/components/interaction/form/atoms/InputContainer.module.css
|
|
1582
|
-
var InputContainer_default = {"container":"
|
|
1621
|
+
var InputContainer_default = {"container":"bds0116InputContainer-container"};
|
|
1583
1622
|
|
|
1584
1623
|
// src/components/interaction/form/atoms/InputContainer.tsx
|
|
1585
|
-
var
|
|
1586
|
-
var
|
|
1624
|
+
var import_design_system_foundation30 = require("@boostdev/design-system-foundation");
|
|
1625
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1587
1626
|
var InputContainer = ({ children, className }) => {
|
|
1588
|
-
return /* @__PURE__ */ (0,
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_design_system_foundation30.cn)(InputContainer_default.container, className), children });
|
|
1589
1628
|
};
|
|
1590
1629
|
|
|
1591
1630
|
// src/components/interaction/form/Checkbox/Checkbox.tsx
|
|
1592
|
-
var
|
|
1631
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1593
1632
|
function Checkbox({ label, name, error, hint, className, ...props }) {
|
|
1594
1633
|
const id = name + (0, import_react12.useId)();
|
|
1595
1634
|
const hintId = id + "hint";
|
|
1596
1635
|
const errorId = id + "error";
|
|
1597
1636
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1598
|
-
return /* @__PURE__ */ (0,
|
|
1599
|
-
/* @__PURE__ */ (0,
|
|
1600
|
-
/* @__PURE__ */ (0,
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(InputContainer, { className: (0, import_design_system_foundation31.cn)(Checkbox_default.checkboxGroup, className), children: [
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: Checkbox_default.inputWrapper, children: [
|
|
1639
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1601
1640
|
"input",
|
|
1602
1641
|
{
|
|
1603
1642
|
"aria-describedby": describedBy,
|
|
@@ -1605,14 +1644,14 @@ function Checkbox({ label, name, error, hint, className, ...props }) {
|
|
|
1605
1644
|
type: "checkbox",
|
|
1606
1645
|
id,
|
|
1607
1646
|
name,
|
|
1608
|
-
className: (0,
|
|
1647
|
+
className: (0, import_design_system_foundation31.cn)(Checkbox_default.checkbox, error && Checkbox_default.checkboxError),
|
|
1609
1648
|
...props
|
|
1610
1649
|
}
|
|
1611
1650
|
),
|
|
1612
|
-
/* @__PURE__ */ (0,
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label, { id, label })
|
|
1613
1652
|
] }),
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1616
1655
|
] });
|
|
1617
1656
|
}
|
|
1618
1657
|
|
|
@@ -1620,11 +1659,11 @@ function Checkbox({ label, name, error, hint, className, ...props }) {
|
|
|
1620
1659
|
var import_react13 = require("react");
|
|
1621
1660
|
|
|
1622
1661
|
// src/components/interaction/form/Combobox/Combobox.module.css
|
|
1623
|
-
var Combobox_default = {"formGroup":"
|
|
1662
|
+
var Combobox_default = {"formGroup":"bds0116Combobox-formGroup","inputWrapper":"bds0116Combobox-inputWrapper","input":"bds0116Combobox-input","inputError":"bds0116Combobox-inputError","chevron":"bds0116Combobox-chevron","listbox":"bds0116Combobox-listbox","option":"bds0116Combobox-option","--highlighted":"bds0116Combobox---highlighted","--selected":"bds0116Combobox---selected","--disabled":"bds0116Combobox---disabled"};
|
|
1624
1663
|
|
|
1625
1664
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
1626
|
-
var
|
|
1627
|
-
var
|
|
1665
|
+
var import_design_system_foundation32 = require("@boostdev/design-system-foundation");
|
|
1666
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1628
1667
|
function Combobox({
|
|
1629
1668
|
label,
|
|
1630
1669
|
name,
|
|
@@ -1702,10 +1741,10 @@ function Combobox({
|
|
|
1702
1741
|
setIsOpen(false);
|
|
1703
1742
|
}
|
|
1704
1743
|
};
|
|
1705
|
-
return /* @__PURE__ */ (0,
|
|
1706
|
-
/* @__PURE__ */ (0,
|
|
1707
|
-
/* @__PURE__ */ (0,
|
|
1708
|
-
/* @__PURE__ */ (0,
|
|
1744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(InputContainer, { className: (0, import_design_system_foundation32.cn)(Combobox_default.formGroup, className), children: [
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Label, { id, label }),
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { ref: containerRef, className: Combobox_default.inputWrapper, children: [
|
|
1747
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1709
1748
|
"input",
|
|
1710
1749
|
{
|
|
1711
1750
|
ref: inputRef,
|
|
@@ -1724,28 +1763,28 @@ function Combobox({
|
|
|
1724
1763
|
placeholder,
|
|
1725
1764
|
value: inputValue,
|
|
1726
1765
|
disabled,
|
|
1727
|
-
className: (0,
|
|
1766
|
+
className: (0, import_design_system_foundation32.cn)(Combobox_default.input, error ? Combobox_default.inputError : void 0),
|
|
1728
1767
|
onChange: handleInputChange,
|
|
1729
1768
|
onKeyDown: handleKeyDown,
|
|
1730
1769
|
onFocus: () => setIsOpen(true)
|
|
1731
1770
|
}
|
|
1732
1771
|
),
|
|
1733
|
-
/* @__PURE__ */ (0,
|
|
1734
|
-
isOpen && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
1772
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: Combobox_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) }),
|
|
1773
|
+
isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1735
1774
|
"ul",
|
|
1736
1775
|
{
|
|
1737
1776
|
id: listboxId,
|
|
1738
1777
|
role: "listbox",
|
|
1739
1778
|
"aria-label": String(label),
|
|
1740
1779
|
className: Combobox_default.listbox,
|
|
1741
|
-
children: filtered.map((option, index) => /* @__PURE__ */ (0,
|
|
1780
|
+
children: filtered.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1742
1781
|
"li",
|
|
1743
1782
|
{
|
|
1744
1783
|
id: getOptionId(index),
|
|
1745
1784
|
role: "option",
|
|
1746
1785
|
"aria-selected": option.value === value,
|
|
1747
1786
|
"aria-disabled": option.disabled,
|
|
1748
|
-
className: (0,
|
|
1787
|
+
className: (0, import_design_system_foundation32.cn)(
|
|
1749
1788
|
Combobox_default.option,
|
|
1750
1789
|
index === highlightedIndex ? Combobox_default["--highlighted"] : void 0,
|
|
1751
1790
|
option.value === value ? Combobox_default["--selected"] : void 0,
|
|
@@ -1762,8 +1801,8 @@ function Combobox({
|
|
|
1762
1801
|
}
|
|
1763
1802
|
)
|
|
1764
1803
|
] }),
|
|
1765
|
-
/* @__PURE__ */ (0,
|
|
1766
|
-
/* @__PURE__ */ (0,
|
|
1804
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1767
1806
|
] });
|
|
1768
1807
|
}
|
|
1769
1808
|
|
|
@@ -1771,11 +1810,11 @@ function Combobox({
|
|
|
1771
1810
|
var import_react14 = require("react");
|
|
1772
1811
|
|
|
1773
1812
|
// src/components/interaction/form/FileInput/FileInput.module.css
|
|
1774
|
-
var FileInput_default = {"formGroup":"
|
|
1813
|
+
var FileInput_default = {"formGroup":"bds0116FileInput-formGroup","dropZone":"bds0116FileInput-dropZone","isDragging":"bds0116FileInput-isDragging","hasError":"bds0116FileInput-hasError","isDisabled":"bds0116FileInput-isDisabled","icon":"bds0116FileInput-icon","prompt":"bds0116FileInput-prompt","acceptHint":"bds0116FileInput-acceptHint","hiddenInput":"bds0116FileInput-hiddenInput"};
|
|
1775
1814
|
|
|
1776
1815
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
1777
|
-
var
|
|
1778
|
-
var
|
|
1816
|
+
var import_design_system_foundation33 = require("@boostdev/design-system-foundation");
|
|
1817
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1779
1818
|
function FileInput({
|
|
1780
1819
|
label,
|
|
1781
1820
|
name,
|
|
@@ -1823,24 +1862,24 @@ function FileInput({
|
|
|
1823
1862
|
if (!disabled) setIsDragging(true);
|
|
1824
1863
|
};
|
|
1825
1864
|
const handleDragLeave = () => setIsDragging(false);
|
|
1826
|
-
return /* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(InputContainer, { className: (0, import_design_system_foundation33.cn)(FileInput_default.formGroup, className), children: [
|
|
1866
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label, { id: uid, label }),
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1829
1868
|
"label",
|
|
1830
1869
|
{
|
|
1831
1870
|
htmlFor: uid,
|
|
1832
|
-
className: (0,
|
|
1871
|
+
className: (0, import_design_system_foundation33.cn)(FileInput_default.dropZone, isDragging && FileInput_default.isDragging, error && FileInput_default.hasError, disabled && FileInput_default.isDisabled),
|
|
1833
1872
|
onDrop: handleDrop,
|
|
1834
1873
|
onDragOver: handleDragOver,
|
|
1835
1874
|
onDragLeave: handleDragLeave,
|
|
1836
1875
|
children: [
|
|
1837
|
-
/* @__PURE__ */ (0,
|
|
1838
|
-
/* @__PURE__ */ (0,
|
|
1839
|
-
/* @__PURE__ */ (0,
|
|
1876
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("svg", { "aria-hidden": "true", className: FileInput_default.icon, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }) }),
|
|
1877
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: FileInput_default.prompt, children: fileNames.length > 0 ? fileNames.join(", ") : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
1878
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { children: "Click to upload" }),
|
|
1840
1879
|
" or drag and drop"
|
|
1841
1880
|
] }) }),
|
|
1842
|
-
accept && /* @__PURE__ */ (0,
|
|
1843
|
-
/* @__PURE__ */ (0,
|
|
1881
|
+
accept && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: FileInput_default.acceptHint, children: accept }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1844
1883
|
"input",
|
|
1845
1884
|
{
|
|
1846
1885
|
ref: inputRef,
|
|
@@ -1859,8 +1898,8 @@ function FileInput({
|
|
|
1859
1898
|
]
|
|
1860
1899
|
}
|
|
1861
1900
|
),
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: uid, type: "error", message: error }),
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: uid, type: "hint", message: hint })
|
|
1864
1903
|
] });
|
|
1865
1904
|
}
|
|
1866
1905
|
|
|
@@ -1868,11 +1907,11 @@ function FileInput({
|
|
|
1868
1907
|
var import_react15 = require("react");
|
|
1869
1908
|
|
|
1870
1909
|
// src/components/interaction/form/FormInput/FormInput.module.css
|
|
1871
|
-
var FormInput_default = {"formGroup":"
|
|
1910
|
+
var FormInput_default = {"formGroup":"bds0116FormInput-formGroup","input":"bds0116FormInput-input","inputError":"bds0116FormInput-inputError"};
|
|
1872
1911
|
|
|
1873
1912
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
1874
|
-
var
|
|
1875
|
-
var
|
|
1913
|
+
var import_design_system_foundation34 = require("@boostdev/design-system-foundation");
|
|
1914
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1876
1915
|
function FormInput({
|
|
1877
1916
|
label,
|
|
1878
1917
|
name,
|
|
@@ -1886,9 +1925,9 @@ function FormInput({
|
|
|
1886
1925
|
const hintId = id + "hint";
|
|
1887
1926
|
const errorId = id + "error";
|
|
1888
1927
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1889
|
-
return /* @__PURE__ */ (0,
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
1891
|
-
/* @__PURE__ */ (0,
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(InputContainer, { className: (0, import_design_system_foundation34.cn)(FormInput_default.formGroup, className), children: [
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { id, label }),
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1892
1931
|
"input",
|
|
1893
1932
|
{
|
|
1894
1933
|
"aria-invalid": !!error,
|
|
@@ -1896,12 +1935,12 @@ function FormInput({
|
|
|
1896
1935
|
"aria-label": ariaLabel,
|
|
1897
1936
|
id,
|
|
1898
1937
|
name,
|
|
1899
|
-
className: (0,
|
|
1938
|
+
className: (0, import_design_system_foundation34.cn)(FormInput_default.input, error && FormInput_default.inputError),
|
|
1900
1939
|
...props
|
|
1901
1940
|
}
|
|
1902
1941
|
),
|
|
1903
|
-
/* @__PURE__ */ (0,
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1905
1944
|
] });
|
|
1906
1945
|
}
|
|
1907
1946
|
|
|
@@ -1909,11 +1948,11 @@ function FormInput({
|
|
|
1909
1948
|
var import_react16 = require("react");
|
|
1910
1949
|
|
|
1911
1950
|
// src/components/interaction/form/NumberInput/NumberInput.module.css
|
|
1912
|
-
var NumberInput_default = {"formGroup":"
|
|
1951
|
+
var NumberInput_default = {"formGroup":"bds0116NumberInput-formGroup","inputRow":"bds0116NumberInput-inputRow","input":"bds0116NumberInput-input","inputError":"bds0116NumberInput-inputError","stepper":"bds0116NumberInput-stepper"};
|
|
1913
1952
|
|
|
1914
1953
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
1915
|
-
var
|
|
1916
|
-
var
|
|
1954
|
+
var import_design_system_foundation35 = require("@boostdev/design-system-foundation");
|
|
1955
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1917
1956
|
function NumberInput({
|
|
1918
1957
|
label,
|
|
1919
1958
|
name,
|
|
@@ -1945,10 +1984,10 @@ function NumberInput({
|
|
|
1945
1984
|
if (!isControlled) setInternalValue(next);
|
|
1946
1985
|
onChange?.(next);
|
|
1947
1986
|
};
|
|
1948
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
1987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(InputContainer, { className: (0, import_design_system_foundation35.cn)(NumberInput_default.formGroup, className), children: [
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Label, { id: uid, label }),
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: NumberInput_default.inputRow, children: [
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1952
1991
|
"button",
|
|
1953
1992
|
{
|
|
1954
1993
|
type: "button",
|
|
@@ -1957,10 +1996,10 @@ function NumberInput({
|
|
|
1957
1996
|
disabled: disabled || min !== void 0 && currentValue <= min,
|
|
1958
1997
|
onClick: () => adjust(-step),
|
|
1959
1998
|
tabIndex: -1,
|
|
1960
|
-
children: /* @__PURE__ */ (0,
|
|
1999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12h14" }) })
|
|
1961
2000
|
}
|
|
1962
2001
|
),
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1964
2003
|
"input",
|
|
1965
2004
|
{
|
|
1966
2005
|
ref: inputRef,
|
|
@@ -1974,7 +2013,7 @@ function NumberInput({
|
|
|
1974
2013
|
disabled,
|
|
1975
2014
|
"aria-invalid": !!error,
|
|
1976
2015
|
"aria-describedby": describedBy,
|
|
1977
|
-
className: (0,
|
|
2016
|
+
className: (0, import_design_system_foundation35.cn)(NumberInput_default.input, error ? NumberInput_default.inputError : void 0),
|
|
1978
2017
|
onChange: (e) => {
|
|
1979
2018
|
const v = parseFloat(e.target.value);
|
|
1980
2019
|
if (!isControlled) setInternalValue(isNaN(v) ? 0 : v);
|
|
@@ -1982,7 +2021,7 @@ function NumberInput({
|
|
|
1982
2021
|
}
|
|
1983
2022
|
}
|
|
1984
2023
|
),
|
|
1985
|
-
/* @__PURE__ */ (0,
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1986
2025
|
"button",
|
|
1987
2026
|
{
|
|
1988
2027
|
type: "button",
|
|
@@ -1991,12 +2030,12 @@ function NumberInput({
|
|
|
1991
2030
|
disabled: disabled || max !== void 0 && currentValue >= max,
|
|
1992
2031
|
onClick: () => adjust(step),
|
|
1993
2032
|
tabIndex: -1,
|
|
1994
|
-
children: /* @__PURE__ */ (0,
|
|
2033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) })
|
|
1995
2034
|
}
|
|
1996
2035
|
)
|
|
1997
2036
|
] }),
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1999
|
-
/* @__PURE__ */ (0,
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: uid, type: "error", message: error }),
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: uid, type: "hint", message: hint })
|
|
2000
2039
|
] });
|
|
2001
2040
|
}
|
|
2002
2041
|
|
|
@@ -2004,19 +2043,19 @@ function NumberInput({
|
|
|
2004
2043
|
var import_react17 = require("react");
|
|
2005
2044
|
|
|
2006
2045
|
// src/components/interaction/form/Radio/Radio.module.css
|
|
2007
|
-
var Radio_default = {"radioGroup":"
|
|
2046
|
+
var Radio_default = {"radioGroup":"bds0116Radio-radioGroup","inputWrapper":"bds0116Radio-inputWrapper","textWrapper":"bds0116Radio-textWrapper","description":"bds0116Radio-description","radio":"bds0116Radio-radio","radioError":"bds0116Radio-radioError"};
|
|
2008
2047
|
|
|
2009
2048
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
2010
|
-
var
|
|
2011
|
-
var
|
|
2049
|
+
var import_design_system_foundation36 = require("@boostdev/design-system-foundation");
|
|
2050
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2012
2051
|
function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
2013
2052
|
const id = name + (0, import_react17.useId)();
|
|
2014
2053
|
const hintId = id + "hint";
|
|
2015
2054
|
const errorId = id + "error";
|
|
2016
2055
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(InputContainer, { className: (0, import_design_system_foundation36.cn)(Radio_default.radioGroup, className), children: [
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: Radio_default.inputWrapper, children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2020
2059
|
"input",
|
|
2021
2060
|
{
|
|
2022
2061
|
"aria-describedby": describedBy,
|
|
@@ -2024,17 +2063,17 @@ function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
|
2024
2063
|
type: "radio",
|
|
2025
2064
|
id,
|
|
2026
2065
|
name,
|
|
2027
|
-
className: (0,
|
|
2066
|
+
className: (0, import_design_system_foundation36.cn)(Radio_default.radio, error && Radio_default.radioError),
|
|
2028
2067
|
...props
|
|
2029
2068
|
}
|
|
2030
2069
|
),
|
|
2031
|
-
/* @__PURE__ */ (0,
|
|
2032
|
-
/* @__PURE__ */ (0,
|
|
2033
|
-
description && /* @__PURE__ */ (0,
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: Radio_default.textWrapper, children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label, { id, label }),
|
|
2072
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: Radio_default.description, children: description })
|
|
2034
2073
|
] })
|
|
2035
2074
|
] }),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2038
2077
|
] });
|
|
2039
2078
|
}
|
|
2040
2079
|
|
|
@@ -2042,11 +2081,11 @@ function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
|
2042
2081
|
var import_react18 = require("react");
|
|
2043
2082
|
|
|
2044
2083
|
// src/components/interaction/form/Select/Select.module.css
|
|
2045
|
-
var Select_default = {"formGroup":"
|
|
2084
|
+
var Select_default = {"formGroup":"bds0116Select-formGroup","selectWrapper":"bds0116Select-selectWrapper","select":"bds0116Select-select","selectError":"bds0116Select-selectError","chevron":"bds0116Select-chevron"};
|
|
2046
2085
|
|
|
2047
2086
|
// src/components/interaction/form/Select/Select.tsx
|
|
2048
|
-
var
|
|
2049
|
-
var
|
|
2087
|
+
var import_design_system_foundation37 = require("@boostdev/design-system-foundation");
|
|
2088
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2050
2089
|
function Select({
|
|
2051
2090
|
label,
|
|
2052
2091
|
name,
|
|
@@ -2061,28 +2100,28 @@ function Select({
|
|
|
2061
2100
|
const hintId = id + "hint";
|
|
2062
2101
|
const errorId = id + "error";
|
|
2063
2102
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2064
|
-
return /* @__PURE__ */ (0,
|
|
2065
|
-
/* @__PURE__ */ (0,
|
|
2066
|
-
/* @__PURE__ */ (0,
|
|
2067
|
-
/* @__PURE__ */ (0,
|
|
2103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(InputContainer, { className: (0, import_design_system_foundation37.cn)(Select_default.formGroup, className), children: [
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { id, label }),
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: Select_default.selectWrapper, children: [
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2068
2107
|
"select",
|
|
2069
2108
|
{
|
|
2070
2109
|
id,
|
|
2071
2110
|
name,
|
|
2072
2111
|
"aria-invalid": !!error,
|
|
2073
2112
|
"aria-describedby": describedBy,
|
|
2074
|
-
className: (0,
|
|
2113
|
+
className: (0, import_design_system_foundation37.cn)(Select_default.select, error ? Select_default.selectError : void 0),
|
|
2075
2114
|
...props,
|
|
2076
2115
|
children: [
|
|
2077
|
-
placeholder && /* @__PURE__ */ (0,
|
|
2078
|
-
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ (0,
|
|
2116
|
+
placeholder && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
2117
|
+
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value, disabled, children: optLabel }, value))
|
|
2079
2118
|
]
|
|
2080
2119
|
}
|
|
2081
2120
|
),
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: Select_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) })
|
|
2083
2122
|
] }),
|
|
2084
|
-
/* @__PURE__ */ (0,
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2086
2125
|
] });
|
|
2087
2126
|
}
|
|
2088
2127
|
|
|
@@ -2090,11 +2129,11 @@ function Select({
|
|
|
2090
2129
|
var import_react19 = require("react");
|
|
2091
2130
|
|
|
2092
2131
|
// src/components/interaction/form/Slider/Slider.module.css
|
|
2093
|
-
var Slider_default = {"formGroup":"
|
|
2132
|
+
var Slider_default = {"formGroup":"bds0116Slider-formGroup","labelRow":"bds0116Slider-labelRow","value":"bds0116Slider-value","slider":"bds0116Slider-slider","sliderError":"bds0116Slider-sliderError"};
|
|
2094
2133
|
|
|
2095
2134
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2135
|
+
var import_design_system_foundation38 = require("@boostdev/design-system-foundation");
|
|
2136
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2098
2137
|
function Slider({
|
|
2099
2138
|
label,
|
|
2100
2139
|
name,
|
|
@@ -2119,12 +2158,12 @@ function Slider({
|
|
|
2119
2158
|
if (!isControlled) setInternalValue(Number(e.target.value));
|
|
2120
2159
|
onChange?.(e);
|
|
2121
2160
|
};
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2125
|
-
showValue && /* @__PURE__ */ (0,
|
|
2161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(InputContainer, { className: (0, import_design_system_foundation38.cn)(Slider_default.formGroup, className), children: [
|
|
2162
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: Slider_default.labelRow, children: [
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Label, { id, label }),
|
|
2164
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Slider_default.value, children: currentValue })
|
|
2126
2165
|
] }),
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2166
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2128
2167
|
"input",
|
|
2129
2168
|
{
|
|
2130
2169
|
type: "range",
|
|
@@ -2136,14 +2175,14 @@ function Slider({
|
|
|
2136
2175
|
"aria-valuemin": min,
|
|
2137
2176
|
"aria-valuemax": max,
|
|
2138
2177
|
"aria-valuenow": currentValue,
|
|
2139
|
-
className: (0,
|
|
2178
|
+
className: (0, import_design_system_foundation38.cn)(Slider_default.slider, error ? Slider_default.sliderError : void 0),
|
|
2140
2179
|
style: { "--slider_fill": `${fillPct}%` },
|
|
2141
2180
|
onChange: handleChange,
|
|
2142
2181
|
...props
|
|
2143
2182
|
}
|
|
2144
2183
|
),
|
|
2145
|
-
/* @__PURE__ */ (0,
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2147
2186
|
] });
|
|
2148
2187
|
}
|
|
2149
2188
|
|
|
@@ -2151,11 +2190,11 @@ function Slider({
|
|
|
2151
2190
|
var import_react20 = require("react");
|
|
2152
2191
|
|
|
2153
2192
|
// src/components/interaction/form/Switch/Switch.module.css
|
|
2154
|
-
var Switch_default = {"switchGroup":"
|
|
2193
|
+
var Switch_default = {"switchGroup":"bds0116Switch-switchGroup","--size_small":"bds0116Switch---size_small","--size_medium":"bds0116Switch---size_medium","--size_large":"bds0116Switch---size_large","inputWrapper":"bds0116Switch-inputWrapper","trackWrapper":"bds0116Switch-trackWrapper","switch":"bds0116Switch-switch","track":"bds0116Switch-track","thumb":"bds0116Switch-thumb","switchError":"bds0116Switch-switchError"};
|
|
2155
2194
|
|
|
2156
2195
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2157
|
-
var
|
|
2158
|
-
var
|
|
2196
|
+
var import_design_system_foundation39 = require("@boostdev/design-system-foundation");
|
|
2197
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2159
2198
|
function Switch({
|
|
2160
2199
|
label,
|
|
2161
2200
|
name,
|
|
@@ -2163,16 +2202,18 @@ function Switch({
|
|
|
2163
2202
|
error,
|
|
2164
2203
|
hint,
|
|
2165
2204
|
className,
|
|
2205
|
+
prefix,
|
|
2166
2206
|
...props
|
|
2167
2207
|
}) {
|
|
2168
2208
|
const id = name + (0, import_react20.useId)();
|
|
2169
2209
|
const hintId = id + "hint";
|
|
2170
2210
|
const errorId = id + "error";
|
|
2171
2211
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2172
|
-
return /* @__PURE__ */ (0,
|
|
2173
|
-
/* @__PURE__ */ (0,
|
|
2174
|
-
/* @__PURE__ */ (0,
|
|
2175
|
-
|
|
2212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(InputContainer, { className: (0, import_design_system_foundation39.cn)(Switch_default.switchGroup, Switch_default[`--size_${size}`], className), children: [
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: Switch_default.inputWrapper, children: [
|
|
2214
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { id, label: prefix }),
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: Switch_default.trackWrapper, children: [
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2176
2217
|
"input",
|
|
2177
2218
|
{
|
|
2178
2219
|
type: "checkbox",
|
|
@@ -2180,16 +2221,16 @@ function Switch({
|
|
|
2180
2221
|
id,
|
|
2181
2222
|
name,
|
|
2182
2223
|
"aria-describedby": describedBy,
|
|
2183
|
-
className: (0,
|
|
2224
|
+
className: (0, import_design_system_foundation39.cn)(Switch_default.switch, error ? Switch_default.switchError : void 0),
|
|
2184
2225
|
...props
|
|
2185
2226
|
}
|
|
2186
2227
|
),
|
|
2187
|
-
/* @__PURE__ */ (0,
|
|
2228
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: Switch_default.thumb }) })
|
|
2188
2229
|
] }),
|
|
2189
|
-
/* @__PURE__ */ (0,
|
|
2230
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { id, label })
|
|
2190
2231
|
] }),
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2193
2234
|
] });
|
|
2194
2235
|
}
|
|
2195
2236
|
|
|
@@ -2197,11 +2238,11 @@ function Switch({
|
|
|
2197
2238
|
var import_react21 = require("react");
|
|
2198
2239
|
|
|
2199
2240
|
// src/components/interaction/form/Textarea/Textarea.module.css
|
|
2200
|
-
var Textarea_default = {"formGroup":"
|
|
2241
|
+
var Textarea_default = {"formGroup":"bds0116Textarea-formGroup","textarea":"bds0116Textarea-textarea","textareaError":"bds0116Textarea-textareaError"};
|
|
2201
2242
|
|
|
2202
2243
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2203
|
-
var
|
|
2204
|
-
var
|
|
2244
|
+
var import_design_system_foundation40 = require("@boostdev/design-system-foundation");
|
|
2245
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2205
2246
|
function Textarea({
|
|
2206
2247
|
label,
|
|
2207
2248
|
name,
|
|
@@ -2214,40 +2255,40 @@ function Textarea({
|
|
|
2214
2255
|
const hintId = id + "hint";
|
|
2215
2256
|
const errorId = id + "error";
|
|
2216
2257
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2217
|
-
return /* @__PURE__ */ (0,
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(InputContainer, { className: (0, import_design_system_foundation40.cn)(Textarea_default.formGroup, className), children: [
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { id, label }),
|
|
2260
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2220
2261
|
"textarea",
|
|
2221
2262
|
{
|
|
2222
2263
|
id,
|
|
2223
2264
|
name,
|
|
2224
2265
|
"aria-invalid": !!error,
|
|
2225
2266
|
"aria-describedby": describedBy,
|
|
2226
|
-
className: (0,
|
|
2267
|
+
className: (0, import_design_system_foundation40.cn)(Textarea_default.textarea, error ? Textarea_default.textareaError : void 0),
|
|
2227
2268
|
...props
|
|
2228
2269
|
}
|
|
2229
2270
|
),
|
|
2230
|
-
/* @__PURE__ */ (0,
|
|
2231
|
-
/* @__PURE__ */ (0,
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2232
2273
|
] });
|
|
2233
2274
|
}
|
|
2234
2275
|
|
|
2235
2276
|
// src/components/layout/ButtonGroup/ButtonGroup.module.css
|
|
2236
|
-
var ButtonGroup_default = {"buttonGroup":"
|
|
2277
|
+
var ButtonGroup_default = {"buttonGroup":"bds0116ButtonGroup-buttonGroup","container":"bds0116ButtonGroup-container","--variant_card":"bds0116ButtonGroup---variant_card","--variant_flow":"bds0116ButtonGroup---variant_flow","--variant_modal":"bds0116ButtonGroup---variant_modal","--variant_content":"bds0116ButtonGroup---variant_content","--variant_grid":"bds0116ButtonGroup---variant_grid"};
|
|
2237
2278
|
|
|
2238
2279
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2239
|
-
var
|
|
2240
|
-
var
|
|
2280
|
+
var import_design_system_foundation41 = require("@boostdev/design-system-foundation");
|
|
2281
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2241
2282
|
function ButtonGroup({ children, className, variant }) {
|
|
2242
|
-
return /* @__PURE__ */ (0,
|
|
2283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: (0, import_design_system_foundation41.cn)(ButtonGroup_default.buttonGroup, className, variant && ButtonGroup_default[`--variant_${variant}`]), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: ButtonGroup_default.container, children }) });
|
|
2243
2284
|
}
|
|
2244
2285
|
|
|
2245
2286
|
// src/components/layout/Card/Card.module.css
|
|
2246
|
-
var Card_default = {"card":"
|
|
2287
|
+
var Card_default = {"card":"bds0116Card-card","--default":"bds0116Card---default","--elevated":"bds0116Card---elevated","--outlined":"bds0116Card---outlined","--clickable":"bds0116Card---clickable","--padding-none":"bds0116Card---padding-none","--padding-small":"bds0116Card---padding-small","--padding-medium":"bds0116Card---padding-medium","--padding-large":"bds0116Card---padding-large","--text-start":"bds0116Card---text-start","--text-center":"bds0116Card---text-center","--text-end":"bds0116Card---text-end"};
|
|
2247
2288
|
|
|
2248
2289
|
// src/components/layout/Card/Card.tsx
|
|
2249
|
-
var
|
|
2250
|
-
var
|
|
2290
|
+
var import_design_system_foundation42 = require("@boostdev/design-system-foundation");
|
|
2291
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2251
2292
|
function Card({
|
|
2252
2293
|
children,
|
|
2253
2294
|
className,
|
|
@@ -2258,7 +2299,7 @@ function Card({
|
|
|
2258
2299
|
onClick,
|
|
2259
2300
|
"aria-label": ariaLabel
|
|
2260
2301
|
}) {
|
|
2261
|
-
const classNames = (0,
|
|
2302
|
+
const classNames = (0, import_design_system_foundation42.cn)(
|
|
2262
2303
|
Card_default.card,
|
|
2263
2304
|
Card_default[`--${variant}`],
|
|
2264
2305
|
Card_default[`--padding-${padding}`],
|
|
@@ -2267,7 +2308,7 @@ function Card({
|
|
|
2267
2308
|
className
|
|
2268
2309
|
);
|
|
2269
2310
|
const Component = onClick ? "button" : "div";
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2271
2312
|
Component,
|
|
2272
2313
|
{
|
|
2273
2314
|
className: classNames,
|
|
@@ -2281,11 +2322,11 @@ function Card({
|
|
|
2281
2322
|
}
|
|
2282
2323
|
|
|
2283
2324
|
// src/components/layout/SectionHeader/SectionHeader.module.css
|
|
2284
|
-
var SectionHeader_default = {"sectionHeader":"
|
|
2325
|
+
var SectionHeader_default = {"sectionHeader":"bds0116SectionHeader-sectionHeader","title":"bds0116SectionHeader-title","subtitle":"bds0116SectionHeader-subtitle","--start":"bds0116SectionHeader---start","--center":"bds0116SectionHeader---center","--end":"bds0116SectionHeader---end","--small":"bds0116SectionHeader---small","--medium":"bds0116SectionHeader---medium","--large":"bds0116SectionHeader---large"};
|
|
2285
2326
|
|
|
2286
2327
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2287
|
-
var
|
|
2288
|
-
var
|
|
2328
|
+
var import_design_system_foundation43 = require("@boostdev/design-system-foundation");
|
|
2329
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2289
2330
|
function SectionHeader({
|
|
2290
2331
|
title,
|
|
2291
2332
|
subtitle,
|
|
@@ -2295,24 +2336,24 @@ function SectionHeader({
|
|
|
2295
2336
|
titleAs = "h2"
|
|
2296
2337
|
}) {
|
|
2297
2338
|
const Title = titleAs;
|
|
2298
|
-
return /* @__PURE__ */ (0,
|
|
2299
|
-
/* @__PURE__ */ (0,
|
|
2300
|
-
subtitle && /* @__PURE__ */ (0,
|
|
2339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("header", { className: (0, import_design_system_foundation43.cn)(SectionHeader_default.sectionHeader, SectionHeader_default[`--${alignment}`], SectionHeader_default[`--${size}`], className), children: [
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Title, { className: SectionHeader_default.title, children: title }),
|
|
2341
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: SectionHeader_default.subtitle, children: subtitle })
|
|
2301
2342
|
] });
|
|
2302
2343
|
}
|
|
2303
2344
|
|
|
2304
2345
|
// src/components/layout/IconWrapper/IconWrapper.module.css
|
|
2305
|
-
var IconWrapper_default = {"wrapper":"
|
|
2346
|
+
var IconWrapper_default = {"wrapper":"bds0116IconWrapper-wrapper"};
|
|
2306
2347
|
|
|
2307
2348
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2308
|
-
var
|
|
2309
|
-
var
|
|
2349
|
+
var import_design_system_foundation44 = require("@boostdev/design-system-foundation");
|
|
2350
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2310
2351
|
function IconWrapper({ children, className }) {
|
|
2311
|
-
return /* @__PURE__ */ (0,
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: (0, import_design_system_foundation44.cn)(className, IconWrapper_default.wrapper), children });
|
|
2312
2353
|
}
|
|
2313
2354
|
|
|
2314
2355
|
// src/index.ts
|
|
2315
|
-
var
|
|
2356
|
+
var import_design_system_foundation45 = require("@boostdev/design-system-foundation");
|
|
2316
2357
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2317
2358
|
0 && (module.exports = {
|
|
2318
2359
|
Accordion,
|
|
@@ -2326,6 +2367,7 @@ var import_design_system_foundation44 = require("@boostdev/design-system-foundat
|
|
|
2326
2367
|
Card,
|
|
2327
2368
|
Carousel,
|
|
2328
2369
|
Checkbox,
|
|
2370
|
+
Collapsible,
|
|
2329
2371
|
Combobox,
|
|
2330
2372
|
Command,
|
|
2331
2373
|
DescriptionList,
|