@boostdev/design-system-components 0.1.17 → 1.0.0
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/AGENTS.md +65 -27
- package/README.md +64 -29
- package/dist/client.cjs +412 -241
- package/dist/client.css +1380 -1186
- package/dist/client.d.cts +43 -16
- package/dist/client.d.ts +43 -16
- package/dist/client.js +414 -245
- package/dist/index.cjs +412 -241
- package/dist/index.css +1380 -1186
- package/dist/index.d.cts +43 -16
- package/dist/index.d.ts +43 -16
- package/dist/index.js +414 -245
- package/package.json +9 -4
- package/src/components/interaction/Button/Button.mdx +2 -5
- package/src/components/interaction/Button/Button.module.css +74 -44
- package/src/components/interaction/Button/Button.stories.tsx +4 -4
- package/src/components/interaction/Button/Button.tsx +5 -5
- package/src/components/interaction/Button/index.ts +1 -0
- package/src/components/interaction/Command/Command.module.css +53 -38
- package/src/components/interaction/Command/Command.spec.tsx +24 -0
- package/src/components/interaction/Command/Command.tsx +5 -0
- package/src/components/interaction/Dialog/Dialog.mdx +2 -2
- package/src/components/interaction/Dialog/Dialog.module.css +20 -10
- package/src/components/interaction/Dialog/Dialog.spec.tsx +19 -0
- package/src/components/interaction/Dialog/Dialog.tsx +22 -0
- package/src/components/interaction/Drawer/Drawer.module.css +13 -11
- package/src/components/interaction/Drawer/Drawer.spec.tsx +30 -0
- package/src/components/interaction/Drawer/Drawer.tsx +7 -3
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +24 -19
- package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +4 -4
- package/src/components/interaction/Popover/Popover.module.css +17 -12
- package/src/components/interaction/Popover/Popover.spec.tsx +25 -4
- package/src/components/interaction/Popover/Popover.stories.tsx +1 -1
- package/src/components/interaction/Popover/Popover.tsx +5 -2
- package/src/components/interaction/Rating/Rating.module.css +3 -3
- package/src/components/interaction/Toast/Toast.module.css +19 -19
- package/src/components/interaction/Toast/Toast.tsx +1 -1
- package/src/components/interaction/form/Checkbox/Checkbox.mdx +2 -2
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +22 -18
- package/src/components/interaction/form/Checkbox/Checkbox.tsx +2 -2
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +29 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.spec.tsx +87 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.stories.tsx +62 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +46 -0
- package/src/components/interaction/form/CheckboxGroup/index.ts +2 -0
- package/src/components/interaction/form/Combobox/Combobox.module.css +44 -34
- package/src/components/interaction/form/Combobox/Combobox.tsx +0 -1
- package/src/components/interaction/form/FileInput/FileInput.module.css +24 -16
- package/src/components/interaction/form/FileInput/FileInput.tsx +5 -2
- package/src/components/interaction/form/FormInput/FormInput.module.css +21 -16
- package/src/components/interaction/form/FormInput/FormInput.tsx +3 -0
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +25 -19
- package/src/components/interaction/form/NumberInput/NumberInput.tsx +5 -2
- package/src/components/interaction/form/Radio/Radio.mdx +3 -3
- package/src/components/interaction/form/Radio/Radio.module.css +28 -24
- package/src/components/interaction/form/Radio/Radio.stories.tsx +1 -1
- package/src/components/interaction/form/Radio/Radio.tsx +2 -2
- package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +29 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.spec.tsx +75 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.stories.tsx +64 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +46 -0
- package/src/components/interaction/form/RadioGroup/index.ts +2 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +5 -5
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +26 -26
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +4 -0
- package/src/components/interaction/form/Select/Select.module.css +24 -19
- package/src/components/interaction/form/Select/Select.tsx +3 -0
- package/src/components/interaction/form/Slider/Slider.mdx +1 -1
- package/src/components/interaction/form/Slider/Slider.module.css +24 -24
- package/src/components/interaction/form/Slider/Slider.tsx +1 -0
- package/src/components/interaction/form/Switch/Switch.mdx +4 -4
- package/src/components/interaction/form/Switch/Switch.module.css +22 -16
- package/src/components/interaction/form/Switch/Switch.tsx +1 -1
- package/src/components/interaction/form/Textarea/Textarea.module.css +23 -18
- package/src/components/interaction/form/Textarea/Textarea.tsx +3 -0
- package/src/components/interaction/form/atoms/InputContainer.module.css +2 -2
- package/src/components/interaction/form/atoms/Label.module.css +2 -2
- package/src/components/interaction/form/atoms/Message.module.css +2 -2
- package/src/components/layout/ButtonGroup/ButtonGroup.module.css +2 -2
- package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +2 -2
- package/src/components/layout/ButtonGroup/ButtonGroup.tsx +8 -3
- package/src/components/layout/ButtonGroup/index.ts +1 -0
- package/src/components/layout/Card/Card.module.css +30 -16
- package/src/components/layout/Card/Card.tsx +1 -1
- package/src/components/layout/IconWrapper/IconWrapper.mdx +2 -2
- package/src/components/layout/IconWrapper/IconWrapper.module.css +5 -5
- package/src/components/layout/IconWrapper/IconWrapper.tsx +4 -3
- package/src/components/layout/IconWrapper/index.ts +1 -0
- package/src/components/layout/SectionHeader/SectionHeader.module.css +23 -23
- package/src/components/layout/SectionHeader/SectionHeader.spec.tsx +2 -2
- package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -2
- package/src/components/ui/Accordion/Accordion.module.css +23 -18
- package/src/components/ui/Alert/Alert.module.css +31 -27
- package/src/components/ui/Avatar/Avatar.module.css +6 -6
- package/src/components/ui/Avatar/Avatar.tsx +1 -1
- package/src/components/ui/Badge/Badge.mdx +2 -2
- package/src/components/ui/Badge/Badge.module.css +15 -15
- package/src/components/ui/Breadcrumb/Breadcrumb.module.css +11 -11
- package/src/components/ui/Calendar/Calendar.module.css +39 -29
- package/src/components/ui/Calendar/Calendar.tsx +6 -2
- package/src/components/ui/Carousel/Carousel.module.css +15 -10
- package/src/components/ui/Carousel/Carousel.stories.tsx +1 -1
- package/src/components/ui/Collapsible/Collapsible.mdx +6 -6
- package/src/components/ui/Collapsible/Collapsible.module.css +18 -18
- package/src/components/ui/DescriptionList/DescriptionList.module.css +8 -8
- package/src/components/ui/Link/Link.module.css +14 -14
- package/src/components/ui/Loading/Loading.module.css +8 -2
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +27 -23
- package/src/components/ui/Pagination/Pagination.module.css +22 -17
- package/src/components/ui/Progress/Progress.mdx +1 -1
- package/src/components/ui/Progress/Progress.module.css +10 -10
- package/src/components/ui/ProgressCircle/ProgressCircle.module.css +8 -8
- package/src/components/ui/Separator/Separator.module.css +1 -1
- package/src/components/ui/Separator/Separator.tsx +1 -1
- package/src/components/ui/Skeleton/Skeleton.module.css +5 -5
- package/src/components/ui/SkipLink/SkipLink.module.css +17 -12
- package/src/components/ui/Table/Table.module.css +35 -30
- package/src/components/ui/Table/Table.tsx +2 -1
- package/src/components/ui/Tabs/Tabs.module.css +17 -17
- package/src/components/ui/Tabs/Tabs.tsx +0 -1
- package/src/components/ui/Tooltip/Tooltip.module.css +12 -12
- package/src/components/ui/Tooltip/Tooltip.spec.tsx +3 -3
- package/src/components/ui/Tooltip/Tooltip.tsx +10 -2
- package/src/components/ui/Typography/Typography.module.css +18 -18
- package/src/css/bdc.css +61 -0
- package/src/css/index.css +5 -0
- package/src/index.ts +7 -0
- package/src/stories/DesignSystem/Borders.mdx +158 -0
- package/src/stories/DesignSystem/Colors.mdx +196 -0
- package/src/stories/DesignSystem/Elevation.mdx +127 -0
- package/src/stories/DesignSystem/Grid.mdx +140 -0
- package/src/stories/DesignSystem/Motion.mdx +96 -0
- package/src/stories/DesignSystem/Overview.mdx +99 -0
- package/src/stories/DesignSystem/Spacing.mdx +74 -0
- package/src/stories/DesignSystem/Typography.mdx +110 -0
- package/src/stories/Introduction.css +2 -2
- package/src/stories/Introduction.mdx +7 -7
package/dist/client.cjs
CHANGED
|
@@ -32,6 +32,7 @@ __export(client_exports, {
|
|
|
32
32
|
Card: () => Card,
|
|
33
33
|
Carousel: () => Carousel,
|
|
34
34
|
Checkbox: () => Checkbox,
|
|
35
|
+
CheckboxGroup: () => CheckboxGroup,
|
|
35
36
|
Collapsible: () => Collapsible,
|
|
36
37
|
Combobox: () => Combobox,
|
|
37
38
|
Command: () => Command,
|
|
@@ -51,6 +52,7 @@ __export(client_exports, {
|
|
|
51
52
|
Progress: () => Progress,
|
|
52
53
|
ProgressCircle: () => ProgressCircle,
|
|
53
54
|
Radio: () => Radio,
|
|
55
|
+
RadioGroup: () => RadioGroup,
|
|
54
56
|
Rating: () => Rating,
|
|
55
57
|
SectionHeader: () => SectionHeader,
|
|
56
58
|
SegmentedControl: () => SegmentedControl,
|
|
@@ -66,7 +68,7 @@ __export(client_exports, {
|
|
|
66
68
|
ToastProvider: () => ToastProvider,
|
|
67
69
|
Tooltip: () => Tooltip,
|
|
68
70
|
Typography: () => Typography,
|
|
69
|
-
cn: () =>
|
|
71
|
+
cn: () => import_design_system_foundation48.cn,
|
|
70
72
|
useToast: () => useToast
|
|
71
73
|
});
|
|
72
74
|
module.exports = __toCommonJS(client_exports);
|
|
@@ -75,7 +77,7 @@ module.exports = __toCommonJS(client_exports);
|
|
|
75
77
|
var import_react = require("react");
|
|
76
78
|
|
|
77
79
|
// src/components/ui/Accordion/Accordion.module.css
|
|
78
|
-
var Accordion_default = {"accordion":"
|
|
80
|
+
var Accordion_default = {"accordion":"bds100Accordion-accordion","item":"bds100Accordion-item","heading":"bds100Accordion-heading","trigger":"bds100Accordion-trigger","triggerLabel":"bds100Accordion-triggerLabel","chevron":"bds100Accordion-chevron","--open":"bds100Accordion---open","panel":"bds100Accordion-panel","panelContent":"bds100Accordion-panelContent"};
|
|
79
81
|
|
|
80
82
|
// src/components/ui/Accordion/Accordion.tsx
|
|
81
83
|
var import_design_system_foundation = require("@boostdev/design-system-foundation");
|
|
@@ -143,7 +145,7 @@ function Accordion({
|
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
// src/components/ui/Alert/Alert.module.css
|
|
146
|
-
var Alert_default = {"alert":"
|
|
148
|
+
var Alert_default = {"alert":"bds100Alert-alert","--variant_info":"bds100Alert---variant_info","--variant_success":"bds100Alert---variant_success","--variant_warning":"bds100Alert---variant_warning","--variant_error":"bds100Alert---variant_error","icon":"bds100Alert-icon","content":"bds100Alert-content","title":"bds100Alert-title","dismiss":"bds100Alert-dismiss"};
|
|
147
149
|
|
|
148
150
|
// src/components/ui/Alert/Alert.tsx
|
|
149
151
|
var import_design_system_foundation2 = require("@boostdev/design-system-foundation");
|
|
@@ -186,7 +188,7 @@ function Alert({
|
|
|
186
188
|
}
|
|
187
189
|
|
|
188
190
|
// src/components/ui/Avatar/Avatar.module.css
|
|
189
|
-
var Avatar_default = {"avatar":"
|
|
191
|
+
var Avatar_default = {"avatar":"bds100Avatar-avatar","--fallback":"bds100Avatar---fallback","--size_small":"bds100Avatar---size_small","--size_medium":"bds100Avatar---size_medium","--size_large":"bds100Avatar---size_large","image":"bds100Avatar-image","initials":"bds100Avatar-initials"};
|
|
190
192
|
|
|
191
193
|
// src/components/ui/Avatar/Avatar.tsx
|
|
192
194
|
var import_design_system_foundation3 = require("@boostdev/design-system-foundation");
|
|
@@ -197,7 +199,7 @@ function getInitials(name) {
|
|
|
197
199
|
function Avatar({ src, alt, name, size = "medium", className }) {
|
|
198
200
|
const sizeClass = Avatar_default[`--size_${size}`];
|
|
199
201
|
if (src) {
|
|
200
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system_foundation3.cn)(Avatar_default.avatar, sizeClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src, alt: alt ?? name ?? "", className: Avatar_default.image }) });
|
|
202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system_foundation3.cn)(Avatar_default.avatar, sizeClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src, alt: alt ?? name ?? "User avatar", className: Avatar_default.image }) });
|
|
201
203
|
}
|
|
202
204
|
const initials = name ? getInitials(name) : "";
|
|
203
205
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -212,7 +214,7 @@ function Avatar({ src, alt, name, size = "medium", className }) {
|
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
// src/components/ui/Badge/Badge.module.css
|
|
215
|
-
var Badge_default = {"badge":"
|
|
217
|
+
var Badge_default = {"badge":"bds100Badge-badge","--variant_primary":"bds100Badge---variant_primary","--variant_secondary":"bds100Badge---variant_secondary","--variant_success":"bds100Badge---variant_success","--variant_error":"bds100Badge---variant_error","--variant_warning":"bds100Badge---variant_warning"};
|
|
216
218
|
|
|
217
219
|
// src/components/ui/Badge/Badge.tsx
|
|
218
220
|
var import_design_system_foundation4 = require("@boostdev/design-system-foundation");
|
|
@@ -222,7 +224,7 @@ function Badge({ children, variant = "primary", className }) {
|
|
|
222
224
|
}
|
|
223
225
|
|
|
224
226
|
// src/components/ui/Breadcrumb/Breadcrumb.module.css
|
|
225
|
-
var Breadcrumb_default = {"breadcrumb":"
|
|
227
|
+
var Breadcrumb_default = {"breadcrumb":"bds100Breadcrumb-breadcrumb","list":"bds100Breadcrumb-list","item":"bds100Breadcrumb-item","link":"bds100Breadcrumb-link","separator":"bds100Breadcrumb-separator","current":"bds100Breadcrumb-current"};
|
|
226
228
|
|
|
227
229
|
// src/components/ui/Breadcrumb/Breadcrumb.tsx
|
|
228
230
|
var import_design_system_foundation5 = require("@boostdev/design-system-foundation");
|
|
@@ -238,7 +240,7 @@ function Breadcrumb({ items, className }) {
|
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
// src/components/ui/Collapsible/Collapsible.module.css
|
|
241
|
-
var Collapsible_default = {"collapsible":"
|
|
243
|
+
var Collapsible_default = {"collapsible":"bds100Collapsible-collapsible","summary":"bds100Collapsible-summary","summaryContent":"bds100Collapsible-summaryContent","icon":"bds100Collapsible-icon","content":"bds100Collapsible-content"};
|
|
242
244
|
|
|
243
245
|
// src/components/ui/Collapsible/Collapsible.tsx
|
|
244
246
|
var import_design_system_foundation6 = require("@boostdev/design-system-foundation");
|
|
@@ -279,12 +281,21 @@ function Collapsible({
|
|
|
279
281
|
var import_react2 = require("react");
|
|
280
282
|
|
|
281
283
|
// src/components/ui/Calendar/Calendar.module.css
|
|
282
|
-
var Calendar_default = {"calendar":"
|
|
284
|
+
var Calendar_default = {"calendar":"bds100Calendar-calendar","header":"bds100Calendar-header","monthYear":"bds100Calendar-monthYear","navBtn":"bds100Calendar-navBtn","grid":"bds100Calendar-grid","weekday":"bds100Calendar-weekday","empty":"bds100Calendar-empty","day":"bds100Calendar-day","disabled":"bds100Calendar-disabled","selected":"bds100Calendar-selected","today":"bds100Calendar-today"};
|
|
283
285
|
|
|
284
286
|
// src/components/ui/Calendar/Calendar.tsx
|
|
285
287
|
var import_design_system_foundation7 = require("@boostdev/design-system-foundation");
|
|
286
288
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
287
289
|
var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
290
|
+
var DAY_LABELS = {
|
|
291
|
+
Su: "Sunday",
|
|
292
|
+
Mo: "Monday",
|
|
293
|
+
Tu: "Tuesday",
|
|
294
|
+
We: "Wednesday",
|
|
295
|
+
Th: "Thursday",
|
|
296
|
+
Fr: "Friday",
|
|
297
|
+
Sa: "Saturday"
|
|
298
|
+
};
|
|
288
299
|
var MONTHS = [
|
|
289
300
|
"January",
|
|
290
301
|
"February",
|
|
@@ -405,7 +416,7 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
405
416
|
role: "grid",
|
|
406
417
|
"aria-labelledby": titleId,
|
|
407
418
|
children: [
|
|
408
|
-
/* @__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",
|
|
419
|
+
/* @__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", "aria-label": DAY_LABELS[d] ?? d, className: Calendar_default.weekday, children: d }, d)) }) }),
|
|
409
420
|
/* @__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) => {
|
|
410
421
|
if (!cell) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: Calendar_default.empty, "aria-hidden": "true" }, col);
|
|
411
422
|
const date = new Date(viewYear, viewMonth, cell.day);
|
|
@@ -424,7 +435,7 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
424
435
|
disabled && Calendar_default.disabled
|
|
425
436
|
),
|
|
426
437
|
"aria-label": date.toLocaleDateString("en", { month: "long", day: "numeric", year: "numeric" }),
|
|
427
|
-
"aria-
|
|
438
|
+
"aria-selected": isSelected,
|
|
428
439
|
"aria-current": isToday ? "date" : void 0,
|
|
429
440
|
"aria-disabled": disabled,
|
|
430
441
|
disabled,
|
|
@@ -445,7 +456,7 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
445
456
|
var import_react3 = require("react");
|
|
446
457
|
|
|
447
458
|
// src/components/ui/Carousel/Carousel.module.css
|
|
448
|
-
var Carousel_default = {"carousel":"
|
|
459
|
+
var Carousel_default = {"carousel":"bds100Carousel-carousel","track":"bds100Carousel-track","slide":"bds100Carousel-slide","navBtn":"bds100Carousel-navBtn"};
|
|
449
460
|
|
|
450
461
|
// src/components/ui/Carousel/Carousel.tsx
|
|
451
462
|
var import_design_system_foundation8 = require("@boostdev/design-system-foundation");
|
|
@@ -498,7 +509,7 @@ function Carousel({ items, label, className }) {
|
|
|
498
509
|
}
|
|
499
510
|
|
|
500
511
|
// src/components/ui/DescriptionList/DescriptionList.module.css
|
|
501
|
-
var DescriptionList_default = {"list":"
|
|
512
|
+
var DescriptionList_default = {"list":"bds100DescriptionList-list","group":"bds100DescriptionList-group","term":"bds100DescriptionList-term","details":"bds100DescriptionList-details","--layout_inline":"bds100DescriptionList---layout_inline"};
|
|
502
513
|
|
|
503
514
|
// src/components/ui/DescriptionList/DescriptionList.tsx
|
|
504
515
|
var import_design_system_foundation9 = require("@boostdev/design-system-foundation");
|
|
@@ -511,7 +522,7 @@ function DescriptionList({ items, layout = "stacked", className }) {
|
|
|
511
522
|
}
|
|
512
523
|
|
|
513
524
|
// src/components/ui/Link/Link.module.css
|
|
514
|
-
var Link_default = {"link":"
|
|
525
|
+
var Link_default = {"link":"bds100Link-link","--variant_default":"bds100Link---variant_default","--variant_subtle":"bds100Link---variant_subtle","--variant_standalone":"bds100Link---variant_standalone","externalLabel":"bds100Link-externalLabel"};
|
|
515
526
|
|
|
516
527
|
// src/components/ui/Link/Link.tsx
|
|
517
528
|
var import_design_system_foundation10 = require("@boostdev/design-system-foundation");
|
|
@@ -542,7 +553,7 @@ function Link({
|
|
|
542
553
|
}
|
|
543
554
|
|
|
544
555
|
// src/components/ui/Loading/Loading.module.css
|
|
545
|
-
var Loading_default = {"loading":"
|
|
556
|
+
var Loading_default = {"loading":"bds100Loading-loading","spinner":"bds100Loading-spinner","--size_small":"bds100Loading---size_small","--size_large":"bds100Loading---size_large"};
|
|
546
557
|
|
|
547
558
|
// src/components/ui/Loading/Loading.tsx
|
|
548
559
|
var import_design_system_foundation11 = require("@boostdev/design-system-foundation");
|
|
@@ -552,7 +563,7 @@ function Loading({ size = "medium", className }) {
|
|
|
552
563
|
}
|
|
553
564
|
|
|
554
565
|
// src/components/ui/NotificationBanner/NotificationBanner.module.css
|
|
555
|
-
var NotificationBanner_default = {"banner":"
|
|
566
|
+
var NotificationBanner_default = {"banner":"bds100NotificationBanner-banner","--variant_info":"bds100NotificationBanner---variant_info","--variant_success":"bds100NotificationBanner---variant_success","--variant_warning":"bds100NotificationBanner---variant_warning","--variant_error":"bds100NotificationBanner---variant_error","content":"bds100NotificationBanner-content","action":"bds100NotificationBanner-action","dismiss":"bds100NotificationBanner-dismiss"};
|
|
556
567
|
|
|
557
568
|
// src/components/ui/NotificationBanner/NotificationBanner.tsx
|
|
558
569
|
var import_design_system_foundation12 = require("@boostdev/design-system-foundation");
|
|
@@ -591,7 +602,7 @@ function NotificationBanner({
|
|
|
591
602
|
}
|
|
592
603
|
|
|
593
604
|
// src/components/ui/Pagination/Pagination.module.css
|
|
594
|
-
var Pagination_default = {"pagination":"
|
|
605
|
+
var Pagination_default = {"pagination":"bds100Pagination-pagination","list":"bds100Pagination-list","button":"bds100Pagination-button","--active":"bds100Pagination---active","--nav":"bds100Pagination---nav","ellipsis":"bds100Pagination-ellipsis"};
|
|
595
606
|
|
|
596
607
|
// src/components/ui/Pagination/Pagination.tsx
|
|
597
608
|
var import_design_system_foundation13 = require("@boostdev/design-system-foundation");
|
|
@@ -655,7 +666,7 @@ function Pagination({
|
|
|
655
666
|
}
|
|
656
667
|
|
|
657
668
|
// src/components/ui/Progress/Progress.module.css
|
|
658
|
-
var Progress_default = {"container":"
|
|
669
|
+
var Progress_default = {"container":"bds100Progress-container","labelRow":"bds100Progress-labelRow","value":"bds100Progress-value","track":"bds100Progress-track","--size_small":"bds100Progress---size_small","--size_medium":"bds100Progress---size_medium","--size_large":"bds100Progress---size_large","fill":"bds100Progress-fill"};
|
|
659
670
|
|
|
660
671
|
// src/components/ui/Progress/Progress.tsx
|
|
661
672
|
var import_design_system_foundation14 = require("@boostdev/design-system-foundation");
|
|
@@ -693,7 +704,7 @@ function Progress({
|
|
|
693
704
|
}
|
|
694
705
|
|
|
695
706
|
// src/components/ui/ProgressCircle/ProgressCircle.module.css
|
|
696
|
-
var ProgressCircle_default = {"wrapper":"
|
|
707
|
+
var ProgressCircle_default = {"wrapper":"bds100ProgressCircle-wrapper","svg":"bds100ProgressCircle-svg","track":"bds100ProgressCircle-track","fill":"bds100ProgressCircle-fill","value":"bds100ProgressCircle-value","--size_small":"bds100ProgressCircle---size_small","--size_medium":"bds100ProgressCircle---size_medium","--size_large":"bds100ProgressCircle---size_large"};
|
|
697
708
|
|
|
698
709
|
// src/components/ui/ProgressCircle/ProgressCircle.tsx
|
|
699
710
|
var import_design_system_foundation15 = require("@boostdev/design-system-foundation");
|
|
@@ -772,7 +783,7 @@ function ProgressCircle({
|
|
|
772
783
|
}
|
|
773
784
|
|
|
774
785
|
// src/components/ui/Separator/Separator.module.css
|
|
775
|
-
var Separator_default = {"separator":"
|
|
786
|
+
var Separator_default = {"separator":"bds100Separator-separator","--horizontal":"bds100Separator---horizontal","--vertical":"bds100Separator---vertical"};
|
|
776
787
|
|
|
777
788
|
// src/components/ui/Separator/Separator.tsx
|
|
778
789
|
var import_design_system_foundation16 = require("@boostdev/design-system-foundation");
|
|
@@ -788,14 +799,14 @@ function Separator({ orientation = "horizontal", className }) {
|
|
|
788
799
|
}
|
|
789
800
|
);
|
|
790
801
|
}
|
|
791
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("hr", { className: (0, import_design_system_foundation16.cn)(Separator_default.separator, Separator_default["--horizontal"], className) });
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("hr", { "aria-orientation": "horizontal", className: (0, import_design_system_foundation16.cn)(Separator_default.separator, Separator_default["--horizontal"], className) });
|
|
792
803
|
}
|
|
793
804
|
|
|
794
805
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
795
806
|
var import_design_system_foundation17 = require("@boostdev/design-system-foundation");
|
|
796
807
|
|
|
797
808
|
// src/components/ui/Skeleton/Skeleton.module.css
|
|
798
|
-
var Skeleton_default = {"skeleton":"
|
|
809
|
+
var Skeleton_default = {"skeleton":"bds100Skeleton-skeleton"};
|
|
799
810
|
|
|
800
811
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
801
812
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -804,7 +815,7 @@ function Skeleton({ className }) {
|
|
|
804
815
|
}
|
|
805
816
|
|
|
806
817
|
// src/components/ui/SkipLink/SkipLink.module.css
|
|
807
|
-
var SkipLink_default = {"skipLink":"
|
|
818
|
+
var SkipLink_default = {"skipLink":"bds100SkipLink-skipLink"};
|
|
808
819
|
|
|
809
820
|
// src/components/ui/SkipLink/SkipLink.tsx
|
|
810
821
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
@@ -813,7 +824,7 @@ function SkipLink({ href = "#main", children = "Skip to main content" }) {
|
|
|
813
824
|
}
|
|
814
825
|
|
|
815
826
|
// src/components/ui/Table/Table.module.css
|
|
816
|
-
var Table_default = {"wrapper":"
|
|
827
|
+
var Table_default = {"wrapper":"bds100Table-wrapper","table":"bds100Table-table","caption":"bds100Table-caption","thead":"bds100Table-thead","th":"bds100Table-th","--sortable":"bds100Table---sortable","sortButton":"bds100Table-sortButton","sortIcon":"bds100Table-sortIcon","--sort-active":"bds100Table---sort-active","--sort-desc":"bds100Table---sort-desc","tbody":"bds100Table-tbody","tr":"bds100Table-tr","td":"bds100Table-td"};
|
|
817
828
|
|
|
818
829
|
// src/components/ui/Table/Table.tsx
|
|
819
830
|
var import_design_system_foundation18 = require("@boostdev/design-system-foundation");
|
|
@@ -850,6 +861,7 @@ function Table({
|
|
|
850
861
|
type: "button",
|
|
851
862
|
className: Table_default.sortButton,
|
|
852
863
|
onClick: () => handleSort(col.key),
|
|
864
|
+
"aria-label": `Sort by ${String(col.header)}${sortKey === col.key ? `, currently ${sortDirection === "asc" ? "ascending" : "descending"}` : ""}`,
|
|
853
865
|
children: [
|
|
854
866
|
col.header,
|
|
855
867
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -874,7 +886,7 @@ function Table({
|
|
|
874
886
|
},
|
|
875
887
|
col.key
|
|
876
888
|
)) }) }),
|
|
877
|
-
/* @__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)) })
|
|
889
|
+
/* @__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)) }, JSON.stringify(row) || rowIndex)) })
|
|
878
890
|
] }) });
|
|
879
891
|
}
|
|
880
892
|
|
|
@@ -882,7 +894,7 @@ function Table({
|
|
|
882
894
|
var import_react4 = require("react");
|
|
883
895
|
|
|
884
896
|
// src/components/ui/Tabs/Tabs.module.css
|
|
885
|
-
var Tabs_default = {"tabs":"
|
|
897
|
+
var Tabs_default = {"tabs":"bds100Tabs-tabs","tabList":"bds100Tabs-tabList","tab":"bds100Tabs-tab","--active":"bds100Tabs---active","panel":"bds100Tabs-panel"};
|
|
886
898
|
|
|
887
899
|
// src/components/ui/Tabs/Tabs.tsx
|
|
888
900
|
var import_design_system_foundation19 = require("@boostdev/design-system-foundation");
|
|
@@ -948,7 +960,6 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
948
960
|
id: panelId,
|
|
949
961
|
role: "tabpanel",
|
|
950
962
|
"aria-labelledby": tabId,
|
|
951
|
-
tabIndex: 0,
|
|
952
963
|
hidden: !isActive,
|
|
953
964
|
className: Tabs_default.panel,
|
|
954
965
|
children: tab.content
|
|
@@ -963,7 +974,7 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
963
974
|
var import_react5 = require("react");
|
|
964
975
|
|
|
965
976
|
// src/components/ui/Tooltip/Tooltip.module.css
|
|
966
|
-
var Tooltip_default = {"wrapper":"
|
|
977
|
+
var Tooltip_default = {"wrapper":"bds100Tooltip-wrapper","tooltip":"bds100Tooltip-tooltip","--placement_top":"bds100Tooltip---placement_top","--placement_bottom":"bds100Tooltip---placement_bottom","--placement_left":"bds100Tooltip---placement_left","--placement_right":"bds100Tooltip---placement_right"};
|
|
967
978
|
|
|
968
979
|
// src/components/ui/Tooltip/Tooltip.tsx
|
|
969
980
|
var import_design_system_foundation20 = require("@boostdev/design-system-foundation");
|
|
@@ -975,25 +986,37 @@ function Tooltip({
|
|
|
975
986
|
className
|
|
976
987
|
}) {
|
|
977
988
|
const tooltipId = (0, import_react5.useId)();
|
|
989
|
+
const [isVisible, setIsVisible] = (0, import_react5.useState)(false);
|
|
978
990
|
const trigger = (0, import_react5.isValidElement)(children) ? (0, import_react5.cloneElement)(children, {
|
|
979
991
|
"aria-describedby": tooltipId
|
|
980
992
|
}) : children;
|
|
981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
994
|
+
"span",
|
|
995
|
+
{
|
|
996
|
+
className: (0, import_design_system_foundation20.cn)(Tooltip_default.wrapper, className),
|
|
997
|
+
onMouseEnter: () => setIsVisible(true),
|
|
998
|
+
onMouseLeave: () => setIsVisible(false),
|
|
999
|
+
onFocus: () => setIsVisible(true),
|
|
1000
|
+
onBlur: () => setIsVisible(false),
|
|
1001
|
+
children: [
|
|
1002
|
+
trigger,
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1004
|
+
"span",
|
|
1005
|
+
{
|
|
1006
|
+
id: tooltipId,
|
|
1007
|
+
role: "tooltip",
|
|
1008
|
+
"aria-hidden": !isVisible,
|
|
1009
|
+
className: (0, import_design_system_foundation20.cn)(Tooltip_default.tooltip, Tooltip_default[`--placement_${placement}`]),
|
|
1010
|
+
children: content
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
);
|
|
993
1016
|
}
|
|
994
1017
|
|
|
995
1018
|
// src/components/ui/Typography/Typography.module.css
|
|
996
|
-
var Typography_default = {"typography":"
|
|
1019
|
+
var Typography_default = {"typography":"bds100Typography-typography","--h1":"bds100Typography---h1","--h2":"bds100Typography---h2","--h3":"bds100Typography---h3","--body":"bds100Typography---body","--body_s":"bds100Typography---body_s"};
|
|
997
1020
|
|
|
998
1021
|
// src/components/ui/Typography/Typography.tsx
|
|
999
1022
|
var import_design_system_foundation21 = require("@boostdev/design-system-foundation");
|
|
@@ -1011,7 +1034,7 @@ function Typography({ variant = "body", component, children, className }) {
|
|
|
1011
1034
|
}
|
|
1012
1035
|
|
|
1013
1036
|
// src/components/interaction/Button/Button.module.css
|
|
1014
|
-
var Button_default = {"button":"
|
|
1037
|
+
var Button_default = {"button":"bds100Button-button","--default":"bds100Button---default","--ghost":"bds100Button---ghost","--size_small":"bds100Button---size_small","--size_medium":"bds100Button---size_medium","--size_large":"bds100Button---size_large","--hasPulse":"bds100Button---hasPulse","iconStart":"bds100Button-iconStart","iconEnd":"bds100Button-iconEnd"};
|
|
1015
1038
|
|
|
1016
1039
|
// src/components/interaction/Button/Button.tsx
|
|
1017
1040
|
var import_design_system_foundation22 = require("@boostdev/design-system-foundation");
|
|
@@ -1019,7 +1042,7 @@ var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
|
1019
1042
|
function Button({
|
|
1020
1043
|
children,
|
|
1021
1044
|
className,
|
|
1022
|
-
variant = "
|
|
1045
|
+
variant = "default",
|
|
1023
1046
|
type = "button",
|
|
1024
1047
|
iconStart,
|
|
1025
1048
|
iconEnd,
|
|
@@ -1050,9 +1073,9 @@ function Button({
|
|
|
1050
1073
|
onClick?.(e);
|
|
1051
1074
|
};
|
|
1052
1075
|
const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
1053
|
-
Boolean(iconStart) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.
|
|
1076
|
+
Boolean(iconStart) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.iconStart, children: iconStart }),
|
|
1054
1077
|
children,
|
|
1055
|
-
Boolean(iconEnd) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.
|
|
1078
|
+
Boolean(iconEnd) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Button_default.iconEnd, children: iconEnd })
|
|
1056
1079
|
] });
|
|
1057
1080
|
if (href) {
|
|
1058
1081
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -1087,7 +1110,7 @@ function Button({
|
|
|
1087
1110
|
var import_react6 = require("react");
|
|
1088
1111
|
|
|
1089
1112
|
// src/components/interaction/Command/Command.module.css
|
|
1090
|
-
var Command_default = {"dialog":"
|
|
1113
|
+
var Command_default = {"dialog":"bds100Command-dialog","palette":"bds100Command-palette","searchRow":"bds100Command-searchRow","searchIcon":"bds100Command-searchIcon","search":"bds100Command-search","escHint":"bds100Command-escHint","list":"bds100Command-list","groupList":"bds100Command-groupList","group":"bds100Command-group","item":"bds100Command-item","itemActive":"bds100Command-itemActive","itemLabel":"bds100Command-itemLabel","itemDesc":"bds100Command-itemDesc","shortcut":"bds100Command-shortcut","empty":"bds100Command-empty"};
|
|
1091
1114
|
|
|
1092
1115
|
// src/components/interaction/Command/Command.tsx
|
|
1093
1116
|
var import_design_system_foundation23 = require("@boostdev/design-system-foundation");
|
|
@@ -1120,10 +1143,12 @@ function Command({
|
|
|
1120
1143
|
});
|
|
1121
1144
|
return map;
|
|
1122
1145
|
}, [filtered]);
|
|
1146
|
+
const triggerRef = (0, import_react6.useRef)(null);
|
|
1123
1147
|
(0, import_react6.useEffect)(() => {
|
|
1124
1148
|
const dialog = dialogRef.current;
|
|
1125
1149
|
if (!dialog) return;
|
|
1126
1150
|
if (isOpen) {
|
|
1151
|
+
triggerRef.current = document.activeElement;
|
|
1127
1152
|
dialog.showModal();
|
|
1128
1153
|
document.body.style.overflow = "hidden";
|
|
1129
1154
|
setQuery("");
|
|
@@ -1132,6 +1157,7 @@ function Command({
|
|
|
1132
1157
|
} else if (dialog.open) {
|
|
1133
1158
|
dialog.close();
|
|
1134
1159
|
document.body.style.overflow = "";
|
|
1160
|
+
triggerRef.current?.focus();
|
|
1135
1161
|
}
|
|
1136
1162
|
return () => {
|
|
1137
1163
|
document.body.style.overflow = "";
|
|
@@ -1169,6 +1195,7 @@ function Command({
|
|
|
1169
1195
|
ref: dialogRef,
|
|
1170
1196
|
className: (0, import_design_system_foundation23.cn)(Command_default.dialog, className),
|
|
1171
1197
|
"aria-label": "Command palette",
|
|
1198
|
+
"aria-modal": "true",
|
|
1172
1199
|
onCancel: handleCancel,
|
|
1173
1200
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Command_default.palette, onKeyDown: handleKeyDown, children: [
|
|
1174
1201
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Command_default.searchRow, children: [
|
|
@@ -1231,22 +1258,26 @@ function Command({
|
|
|
1231
1258
|
var import_react7 = require("react");
|
|
1232
1259
|
|
|
1233
1260
|
// src/components/interaction/Dialog/Dialog.module.css
|
|
1234
|
-
var Dialog_default = {"dialog":"
|
|
1261
|
+
var Dialog_default = {"dialog":"bds100Dialog-dialog","dialogContent":"bds100Dialog-dialogContent","closeForm":"bds100Dialog-closeForm","closeButton":"bds100Dialog-closeButton"};
|
|
1235
1262
|
|
|
1236
1263
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
1237
1264
|
var import_design_system_foundation24 = require("@boostdev/design-system-foundation");
|
|
1238
1265
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1266
|
+
var FOCUSABLE_SELECTOR = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
1239
1267
|
function Dialog({ children, isOpen = false, className, onClose }) {
|
|
1240
1268
|
const dialogRef = (0, import_react7.useRef)(null);
|
|
1269
|
+
const triggerRef = (0, import_react7.useRef)(null);
|
|
1241
1270
|
(0, import_react7.useEffect)(() => {
|
|
1242
1271
|
const dialog = dialogRef.current;
|
|
1243
1272
|
if (!dialog) return;
|
|
1244
1273
|
if (isOpen) {
|
|
1274
|
+
triggerRef.current = document.activeElement;
|
|
1245
1275
|
dialog.showModal();
|
|
1246
1276
|
document.body.style.overflow = "hidden";
|
|
1247
1277
|
} else if (dialog.open) {
|
|
1248
1278
|
dialog.close();
|
|
1249
1279
|
document.body.style.overflow = "";
|
|
1280
|
+
triggerRef.current?.focus();
|
|
1250
1281
|
}
|
|
1251
1282
|
return () => {
|
|
1252
1283
|
document.body.style.overflow = "";
|
|
@@ -1259,13 +1290,35 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1259
1290
|
e.preventDefault();
|
|
1260
1291
|
onClose?.();
|
|
1261
1292
|
};
|
|
1293
|
+
const handleKeyDown = (e) => {
|
|
1294
|
+
if (e.key !== "Tab") return;
|
|
1295
|
+
const dialog = dialogRef.current;
|
|
1296
|
+
if (!dialog) return;
|
|
1297
|
+
const focusable = Array.from(dialog.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
1298
|
+
if (focusable.length === 0) return;
|
|
1299
|
+
const first = focusable[0];
|
|
1300
|
+
const last = focusable[focusable.length - 1];
|
|
1301
|
+
if (e.shiftKey) {
|
|
1302
|
+
if (document.activeElement === first) {
|
|
1303
|
+
e.preventDefault();
|
|
1304
|
+
last.focus();
|
|
1305
|
+
}
|
|
1306
|
+
} else {
|
|
1307
|
+
if (document.activeElement === last) {
|
|
1308
|
+
e.preventDefault();
|
|
1309
|
+
first.focus();
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
};
|
|
1262
1313
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1263
1314
|
"dialog",
|
|
1264
1315
|
{
|
|
1265
1316
|
ref: dialogRef,
|
|
1266
1317
|
className: (0, import_design_system_foundation24.cn)(className, Dialog_default.dialog),
|
|
1318
|
+
"aria-modal": "true",
|
|
1267
1319
|
onClick: handleBackdropClick,
|
|
1268
1320
|
onCancel: handleCancel,
|
|
1321
|
+
onKeyDown: handleKeyDown,
|
|
1269
1322
|
children: [
|
|
1270
1323
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("form", { method: "dialog", className: Dialog_default.closeForm, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1271
1324
|
"button",
|
|
@@ -1287,7 +1340,7 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1287
1340
|
var import_react8 = require("react");
|
|
1288
1341
|
|
|
1289
1342
|
// src/components/interaction/Drawer/Drawer.module.css
|
|
1290
|
-
var Drawer_default = {"drawer":"
|
|
1343
|
+
var Drawer_default = {"drawer":"bds100Drawer-drawer","panel":"bds100Drawer-panel","--side_right":"bds100Drawer---side_right","--side_left":"bds100Drawer---side_left","header":"bds100Drawer-header","closeButton":"bds100Drawer-closeButton","body":"bds100Drawer-body"};
|
|
1291
1344
|
|
|
1292
1345
|
// src/components/interaction/Drawer/Drawer.tsx
|
|
1293
1346
|
var import_design_system_foundation25 = require("@boostdev/design-system-foundation");
|
|
@@ -1298,19 +1351,22 @@ function Drawer({
|
|
|
1298
1351
|
title,
|
|
1299
1352
|
children,
|
|
1300
1353
|
side = "right",
|
|
1301
|
-
|
|
1354
|
+
ariaLabel,
|
|
1302
1355
|
className
|
|
1303
1356
|
}) {
|
|
1304
1357
|
const dialogRef = (0, import_react8.useRef)(null);
|
|
1358
|
+
const triggerRef = (0, import_react8.useRef)(null);
|
|
1305
1359
|
(0, import_react8.useEffect)(() => {
|
|
1306
1360
|
const dialog = dialogRef.current;
|
|
1307
1361
|
if (!dialog) return;
|
|
1308
1362
|
if (isOpen) {
|
|
1363
|
+
triggerRef.current = document.activeElement;
|
|
1309
1364
|
dialog.showModal();
|
|
1310
1365
|
document.body.style.overflow = "hidden";
|
|
1311
1366
|
} else if (dialog.open) {
|
|
1312
1367
|
dialog.close();
|
|
1313
1368
|
document.body.style.overflow = "";
|
|
1369
|
+
triggerRef.current?.focus();
|
|
1314
1370
|
}
|
|
1315
1371
|
return () => {
|
|
1316
1372
|
document.body.style.overflow = "";
|
|
@@ -1328,7 +1384,8 @@ function Drawer({
|
|
|
1328
1384
|
{
|
|
1329
1385
|
ref: dialogRef,
|
|
1330
1386
|
className: (0, import_design_system_foundation25.cn)(Drawer_default.drawer, Drawer_default[`--side_${side}`], className),
|
|
1331
|
-
"aria-label":
|
|
1387
|
+
"aria-label": ariaLabel,
|
|
1388
|
+
"aria-modal": "true",
|
|
1332
1389
|
onClick: handleClick,
|
|
1333
1390
|
onCancel: handleCancel,
|
|
1334
1391
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: Drawer_default.panel, children: [
|
|
@@ -1355,7 +1412,7 @@ function Drawer({
|
|
|
1355
1412
|
var import_react9 = require("react");
|
|
1356
1413
|
|
|
1357
1414
|
// src/components/interaction/DropdownMenu/DropdownMenu.module.css
|
|
1358
|
-
var DropdownMenu_default = {"wrapper":"
|
|
1415
|
+
var DropdownMenu_default = {"wrapper":"bds100DropdownMenu-wrapper","menu":"bds100DropdownMenu-menu","--placement_bottom-start":"bds100DropdownMenu---placement_bottom-start","--placement_bottom-end":"bds100DropdownMenu---placement_bottom-end","separator":"bds100DropdownMenu-separator","item":"bds100DropdownMenu-item","icon":"bds100DropdownMenu-icon"};
|
|
1359
1416
|
|
|
1360
1417
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
1361
1418
|
var import_design_system_foundation26 = require("@boostdev/design-system-foundation");
|
|
@@ -1468,7 +1525,7 @@ function DropdownMenu({
|
|
|
1468
1525
|
var import_react10 = require("react");
|
|
1469
1526
|
|
|
1470
1527
|
// src/components/interaction/Popover/Popover.module.css
|
|
1471
|
-
var Popover_default = {"wrapper":"
|
|
1528
|
+
var Popover_default = {"wrapper":"bds100Popover-wrapper","panel":"bds100Popover-panel","--placement_bottom":"bds100Popover---placement_bottom","--placement_top":"bds100Popover---placement_top","--placement_right":"bds100Popover---placement_right","--placement_left":"bds100Popover---placement_left"};
|
|
1472
1529
|
|
|
1473
1530
|
// src/components/interaction/Popover/Popover.tsx
|
|
1474
1531
|
var import_design_system_foundation27 = require("@boostdev/design-system-foundation");
|
|
@@ -1477,7 +1534,8 @@ function Popover({
|
|
|
1477
1534
|
children,
|
|
1478
1535
|
content,
|
|
1479
1536
|
placement = "bottom",
|
|
1480
|
-
className
|
|
1537
|
+
className,
|
|
1538
|
+
"aria-label": ariaLabel
|
|
1481
1539
|
}) {
|
|
1482
1540
|
const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
|
|
1483
1541
|
const containerRef = (0, import_react10.useRef)(null);
|
|
@@ -1502,6 +1560,7 @@ function Popover({
|
|
|
1502
1560
|
const trigger = (0, import_react10.isValidElement)(children) ? (0, import_react10.cloneElement)(children, {
|
|
1503
1561
|
"aria-expanded": isOpen,
|
|
1504
1562
|
"aria-controls": panelId,
|
|
1563
|
+
"aria-haspopup": true,
|
|
1505
1564
|
onClick: (e) => {
|
|
1506
1565
|
setIsOpen((prev) => !prev);
|
|
1507
1566
|
const existingOnClick = children.props.onClick;
|
|
@@ -1514,8 +1573,8 @@ function Popover({
|
|
|
1514
1573
|
"div",
|
|
1515
1574
|
{
|
|
1516
1575
|
id: panelId,
|
|
1517
|
-
role: "
|
|
1518
|
-
"aria-
|
|
1576
|
+
role: ariaLabel ? "region" : void 0,
|
|
1577
|
+
"aria-label": ariaLabel,
|
|
1519
1578
|
className: (0, import_design_system_foundation27.cn)(Popover_default.panel, Popover_default[`--placement_${placement}`]),
|
|
1520
1579
|
children: content
|
|
1521
1580
|
}
|
|
@@ -1524,7 +1583,7 @@ function Popover({
|
|
|
1524
1583
|
}
|
|
1525
1584
|
|
|
1526
1585
|
// src/components/interaction/Rating/Rating.module.css
|
|
1527
|
-
var Rating_default = {"rating":"
|
|
1586
|
+
var Rating_default = {"rating":"bds100Rating-rating","star":"bds100Rating-star","--filled":"bds100Rating---filled"};
|
|
1528
1587
|
|
|
1529
1588
|
// src/components/interaction/Rating/Rating.tsx
|
|
1530
1589
|
var import_design_system_foundation28 = require("@boostdev/design-system-foundation");
|
|
@@ -1555,7 +1614,7 @@ function Rating({ value, max = 5, className }) {
|
|
|
1555
1614
|
var import_react11 = require("react");
|
|
1556
1615
|
|
|
1557
1616
|
// src/components/interaction/Toast/Toast.module.css
|
|
1558
|
-
var Toast_default = {"toastContainer":"
|
|
1617
|
+
var Toast_default = {"toastContainer":"bds100Toast-toastContainer","toast":"bds100Toast-toast","--variant_success":"bds100Toast---variant_success","--variant_warning":"bds100Toast---variant_warning","--variant_info":"bds100Toast---variant_info","--variant_error":"bds100Toast---variant_error","message":"bds100Toast-message","closeButton":"bds100Toast-closeButton"};
|
|
1559
1618
|
|
|
1560
1619
|
// src/components/interaction/Toast/Toast.tsx
|
|
1561
1620
|
var import_design_system_foundation29 = require("@boostdev/design-system-foundation");
|
|
@@ -1588,7 +1647,7 @@ function ToastItem({ toast, onRemove }) {
|
|
|
1588
1647
|
const timer = setTimeout(onRemove, 5e3);
|
|
1589
1648
|
return () => clearTimeout(timer);
|
|
1590
1649
|
}, [onRemove]);
|
|
1591
|
-
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: [
|
|
1650
|
+
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", "aria-live": "polite", "aria-atomic": "true", children: [
|
|
1592
1651
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: Toast_default.message, children: toast.message }),
|
|
1593
1652
|
/* @__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" }) }) })
|
|
1594
1653
|
] });
|
|
@@ -1605,10 +1664,10 @@ function useToast() {
|
|
|
1605
1664
|
var import_react12 = require("react");
|
|
1606
1665
|
|
|
1607
1666
|
// src/components/interaction/form/Checkbox/Checkbox.module.css
|
|
1608
|
-
var Checkbox_default = {"checkboxGroup":"
|
|
1667
|
+
var Checkbox_default = {"checkboxGroup":"bds100Checkbox-checkboxGroup","inputWrapper":"bds100Checkbox-inputWrapper","checkbox":"bds100Checkbox-checkbox","checkboxError":"bds100Checkbox-checkboxError"};
|
|
1609
1668
|
|
|
1610
1669
|
// src/components/interaction/form/atoms/Message.module.css
|
|
1611
|
-
var Message_default = {"error":"
|
|
1670
|
+
var Message_default = {"error":"bds100Message-error","hint":"bds100Message-hint"};
|
|
1612
1671
|
|
|
1613
1672
|
// src/components/interaction/form/atoms/Message.tsx
|
|
1614
1673
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -1618,7 +1677,7 @@ var Message = ({ message, type, inputId }) => {
|
|
|
1618
1677
|
};
|
|
1619
1678
|
|
|
1620
1679
|
// src/components/interaction/form/atoms/Label.module.css
|
|
1621
|
-
var Label_default = {"label":"
|
|
1680
|
+
var Label_default = {"label":"bds100Label-label"};
|
|
1622
1681
|
|
|
1623
1682
|
// src/components/interaction/form/atoms/Label.tsx
|
|
1624
1683
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
@@ -1630,7 +1689,7 @@ var Label = ({ label, id }) => {
|
|
|
1630
1689
|
var import_design_system_foundation31 = require("@boostdev/design-system-foundation");
|
|
1631
1690
|
|
|
1632
1691
|
// src/components/interaction/form/atoms/InputContainer.module.css
|
|
1633
|
-
var InputContainer_default = {"container":"
|
|
1692
|
+
var InputContainer_default = {"container":"bds100InputContainer-container"};
|
|
1634
1693
|
|
|
1635
1694
|
// src/components/interaction/form/atoms/InputContainer.tsx
|
|
1636
1695
|
var import_design_system_foundation30 = require("@boostdev/design-system-foundation");
|
|
@@ -1667,15 +1726,57 @@ function Checkbox({ label, name, error, hint, className, ...props }) {
|
|
|
1667
1726
|
] });
|
|
1668
1727
|
}
|
|
1669
1728
|
|
|
1670
|
-
// src/components/interaction/form/
|
|
1729
|
+
// src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx
|
|
1671
1730
|
var import_react13 = require("react");
|
|
1672
1731
|
|
|
1673
|
-
// src/components/interaction/form/
|
|
1674
|
-
var
|
|
1732
|
+
// src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css
|
|
1733
|
+
var CheckboxGroup_default = {"group":"bds100CheckboxGroup-group","legend":"bds100CheckboxGroup-legend","required":"bds100CheckboxGroup-required","items":"bds100CheckboxGroup-items"};
|
|
1675
1734
|
|
|
1676
|
-
// src/components/interaction/form/
|
|
1735
|
+
// src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx
|
|
1677
1736
|
var import_design_system_foundation32 = require("@boostdev/design-system-foundation");
|
|
1678
1737
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1738
|
+
function CheckboxGroup({
|
|
1739
|
+
legend,
|
|
1740
|
+
children,
|
|
1741
|
+
error,
|
|
1742
|
+
hint,
|
|
1743
|
+
required,
|
|
1744
|
+
disabled,
|
|
1745
|
+
className
|
|
1746
|
+
}) {
|
|
1747
|
+
const id = (0, import_react13.useId)();
|
|
1748
|
+
const hintId = id + "hint";
|
|
1749
|
+
const errorId = id + "error";
|
|
1750
|
+
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1752
|
+
"fieldset",
|
|
1753
|
+
{
|
|
1754
|
+
className: (0, import_design_system_foundation32.cn)(CheckboxGroup_default.group, className),
|
|
1755
|
+
disabled,
|
|
1756
|
+
"aria-required": required || void 0,
|
|
1757
|
+
"aria-describedby": describedBy,
|
|
1758
|
+
children: [
|
|
1759
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("legend", { className: CheckboxGroup_default.legend, children: [
|
|
1760
|
+
legend,
|
|
1761
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: CheckboxGroup_default.required, "aria-hidden": "true", children: " *" })
|
|
1762
|
+
] }),
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: CheckboxGroup_default.items, children }),
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1766
|
+
]
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
1772
|
+
var import_react14 = require("react");
|
|
1773
|
+
|
|
1774
|
+
// src/components/interaction/form/Combobox/Combobox.module.css
|
|
1775
|
+
var Combobox_default = {"formGroup":"bds100Combobox-formGroup","inputWrapper":"bds100Combobox-inputWrapper","input":"bds100Combobox-input","inputError":"bds100Combobox-inputError","chevron":"bds100Combobox-chevron","listbox":"bds100Combobox-listbox","option":"bds100Combobox-option","--highlighted":"bds100Combobox---highlighted","--selected":"bds100Combobox---selected","--disabled":"bds100Combobox---disabled"};
|
|
1776
|
+
|
|
1777
|
+
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
1778
|
+
var import_design_system_foundation33 = require("@boostdev/design-system-foundation");
|
|
1779
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1679
1780
|
function Combobox({
|
|
1680
1781
|
label,
|
|
1681
1782
|
name,
|
|
@@ -1688,25 +1789,25 @@ function Combobox({
|
|
|
1688
1789
|
hint,
|
|
1689
1790
|
className
|
|
1690
1791
|
}) {
|
|
1691
|
-
const id = name + (0,
|
|
1792
|
+
const id = name + (0, import_react14.useId)();
|
|
1692
1793
|
const listboxId = id + "listbox";
|
|
1693
1794
|
const hintId = id + "hint";
|
|
1694
1795
|
const errorId = id + "error";
|
|
1695
1796
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1696
|
-
const selectedOption = (0,
|
|
1697
|
-
const [inputValue, setInputValue] = (0,
|
|
1698
|
-
(0,
|
|
1797
|
+
const selectedOption = (0, import_react14.useMemo)(() => options.find((o) => o.value === value), [options, value]);
|
|
1798
|
+
const [inputValue, setInputValue] = (0, import_react14.useState)(selectedOption?.label ?? "");
|
|
1799
|
+
(0, import_react14.useEffect)(() => {
|
|
1699
1800
|
setInputValue(selectedOption?.label ?? "");
|
|
1700
1801
|
}, [selectedOption]);
|
|
1701
|
-
const [isOpen, setIsOpen] = (0,
|
|
1702
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1703
|
-
const containerRef = (0,
|
|
1704
|
-
const inputRef = (0,
|
|
1802
|
+
const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
|
|
1803
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react14.useState)(-1);
|
|
1804
|
+
const containerRef = (0, import_react14.useRef)(null);
|
|
1805
|
+
const inputRef = (0, import_react14.useRef)(null);
|
|
1705
1806
|
const filtered = options.filter(
|
|
1706
1807
|
(o) => o.label.toLowerCase().includes(inputValue.toLowerCase())
|
|
1707
1808
|
);
|
|
1708
1809
|
const getOptionId = (index) => `${id}-option-${index}`;
|
|
1709
|
-
(0,
|
|
1810
|
+
(0, import_react14.useEffect)(() => {
|
|
1710
1811
|
if (!isOpen) return;
|
|
1711
1812
|
const handlePointerDown = (e) => {
|
|
1712
1813
|
if (!containerRef.current?.contains(e.target)) setIsOpen(false);
|
|
@@ -1753,10 +1854,10 @@ function Combobox({
|
|
|
1753
1854
|
setIsOpen(false);
|
|
1754
1855
|
}
|
|
1755
1856
|
};
|
|
1756
|
-
return /* @__PURE__ */ (0,
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(InputContainer, { className: (0, import_design_system_foundation33.cn)(Combobox_default.formGroup, className), children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label, { id, label }),
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref: containerRef, className: Combobox_default.inputWrapper, children: [
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1760
1861
|
"input",
|
|
1761
1862
|
{
|
|
1762
1863
|
ref: inputRef,
|
|
@@ -1775,28 +1876,27 @@ function Combobox({
|
|
|
1775
1876
|
placeholder,
|
|
1776
1877
|
value: inputValue,
|
|
1777
1878
|
disabled,
|
|
1778
|
-
className: (0,
|
|
1879
|
+
className: (0, import_design_system_foundation33.cn)(Combobox_default.input, error ? Combobox_default.inputError : void 0),
|
|
1779
1880
|
onChange: handleInputChange,
|
|
1780
1881
|
onKeyDown: handleKeyDown,
|
|
1781
1882
|
onFocus: () => setIsOpen(true)
|
|
1782
1883
|
}
|
|
1783
1884
|
),
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1785
|
-
isOpen && filtered.length > 0 && /* @__PURE__ */ (0,
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: Combobox_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) }),
|
|
1886
|
+
isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1786
1887
|
"ul",
|
|
1787
1888
|
{
|
|
1788
1889
|
id: listboxId,
|
|
1789
1890
|
role: "listbox",
|
|
1790
|
-
"aria-label": String(label),
|
|
1791
1891
|
className: Combobox_default.listbox,
|
|
1792
|
-
children: filtered.map((option, index) => /* @__PURE__ */ (0,
|
|
1892
|
+
children: filtered.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1793
1893
|
"li",
|
|
1794
1894
|
{
|
|
1795
1895
|
id: getOptionId(index),
|
|
1796
1896
|
role: "option",
|
|
1797
1897
|
"aria-selected": option.value === value,
|
|
1798
1898
|
"aria-disabled": option.disabled,
|
|
1799
|
-
className: (0,
|
|
1899
|
+
className: (0, import_design_system_foundation33.cn)(
|
|
1800
1900
|
Combobox_default.option,
|
|
1801
1901
|
index === highlightedIndex ? Combobox_default["--highlighted"] : void 0,
|
|
1802
1902
|
option.value === value ? Combobox_default["--selected"] : void 0,
|
|
@@ -1813,38 +1913,39 @@ function Combobox({
|
|
|
1813
1913
|
}
|
|
1814
1914
|
)
|
|
1815
1915
|
] }),
|
|
1816
|
-
/* @__PURE__ */ (0,
|
|
1817
|
-
/* @__PURE__ */ (0,
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1818
1918
|
] });
|
|
1819
1919
|
}
|
|
1820
1920
|
|
|
1821
1921
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
1822
|
-
var
|
|
1922
|
+
var import_react15 = require("react");
|
|
1823
1923
|
|
|
1824
1924
|
// src/components/interaction/form/FileInput/FileInput.module.css
|
|
1825
|
-
var FileInput_default = {"formGroup":"
|
|
1925
|
+
var FileInput_default = {"formGroup":"bds100FileInput-formGroup","fieldLabel":"bds100FileInput-fieldLabel","dropZone":"bds100FileInput-dropZone","isDragging":"bds100FileInput-isDragging","hasError":"bds100FileInput-hasError","isDisabled":"bds100FileInput-isDisabled","icon":"bds100FileInput-icon","prompt":"bds100FileInput-prompt","acceptHint":"bds100FileInput-acceptHint","hiddenInput":"bds100FileInput-hiddenInput"};
|
|
1826
1926
|
|
|
1827
1927
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
1828
|
-
var
|
|
1829
|
-
var
|
|
1928
|
+
var import_design_system_foundation34 = require("@boostdev/design-system-foundation");
|
|
1929
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1830
1930
|
function FileInput({
|
|
1831
1931
|
label,
|
|
1832
1932
|
name,
|
|
1833
1933
|
accept,
|
|
1834
1934
|
multiple = false,
|
|
1835
1935
|
disabled = false,
|
|
1936
|
+
required,
|
|
1836
1937
|
error,
|
|
1837
1938
|
hint,
|
|
1838
1939
|
onChange,
|
|
1839
1940
|
className
|
|
1840
1941
|
}) {
|
|
1841
|
-
const uid = name + (0,
|
|
1942
|
+
const uid = name + (0, import_react15.useId)();
|
|
1842
1943
|
const hintId = uid + "hint";
|
|
1843
1944
|
const errorId = uid + "error";
|
|
1844
1945
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1845
|
-
const inputRef = (0,
|
|
1846
|
-
const [isDragging, setIsDragging] = (0,
|
|
1847
|
-
const [fileNames, setFileNames] = (0,
|
|
1946
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
1947
|
+
const [isDragging, setIsDragging] = (0, import_react15.useState)(false);
|
|
1948
|
+
const [fileNames, setFileNames] = (0, import_react15.useState)([]);
|
|
1848
1949
|
const isFileAccepted = (file) => {
|
|
1849
1950
|
if (!accept) return true;
|
|
1850
1951
|
return accept.split(",").some((token) => {
|
|
@@ -1874,24 +1975,24 @@ function FileInput({
|
|
|
1874
1975
|
if (!disabled) setIsDragging(true);
|
|
1875
1976
|
};
|
|
1876
1977
|
const handleDragLeave = () => setIsDragging(false);
|
|
1877
|
-
return /* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1879
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(InputContainer, { className: (0, import_design_system_foundation34.cn)(FileInput_default.formGroup, className), children: [
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
1880
1980
|
"label",
|
|
1881
1981
|
{
|
|
1882
1982
|
htmlFor: uid,
|
|
1883
|
-
className: (0,
|
|
1983
|
+
className: (0, import_design_system_foundation34.cn)(FileInput_default.dropZone, isDragging && FileInput_default.isDragging, error && FileInput_default.hasError, disabled && FileInput_default.isDisabled),
|
|
1884
1984
|
onDrop: handleDrop,
|
|
1885
1985
|
onDragOver: handleDragOver,
|
|
1886
1986
|
onDragLeave: handleDragLeave,
|
|
1887
1987
|
children: [
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1890
|
-
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: FileInput_default.fieldLabel, children: label }),
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.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_runtime37.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" }) }),
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: FileInput_default.prompt, children: fileNames.length > 0 ? fileNames.join(", ") : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("strong", { children: "Click to upload" }),
|
|
1891
1992
|
" or drag and drop"
|
|
1892
1993
|
] }) }),
|
|
1893
|
-
accept && /* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
accept && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: FileInput_default.acceptHint, children: accept }),
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1895
1996
|
"input",
|
|
1896
1997
|
{
|
|
1897
1998
|
ref: inputRef,
|
|
@@ -1903,6 +2004,8 @@ function FileInput({
|
|
|
1903
2004
|
disabled,
|
|
1904
2005
|
"aria-invalid": !!error,
|
|
1905
2006
|
"aria-describedby": describedBy,
|
|
2007
|
+
"aria-required": required || void 0,
|
|
2008
|
+
required,
|
|
1906
2009
|
className: FileInput_default.hiddenInput,
|
|
1907
2010
|
onChange: handleChange
|
|
1908
2011
|
}
|
|
@@ -1910,20 +2013,20 @@ function FileInput({
|
|
|
1910
2013
|
]
|
|
1911
2014
|
}
|
|
1912
2015
|
),
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: uid, type: "error", message: error }),
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: uid, type: "hint", message: hint })
|
|
1915
2018
|
] });
|
|
1916
2019
|
}
|
|
1917
2020
|
|
|
1918
2021
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
1919
|
-
var
|
|
2022
|
+
var import_react16 = require("react");
|
|
1920
2023
|
|
|
1921
2024
|
// src/components/interaction/form/FormInput/FormInput.module.css
|
|
1922
|
-
var FormInput_default = {"formGroup":"
|
|
2025
|
+
var FormInput_default = {"formGroup":"bds100FormInput-formGroup","input":"bds100FormInput-input","inputError":"bds100FormInput-inputError"};
|
|
1923
2026
|
|
|
1924
2027
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
1925
|
-
var
|
|
1926
|
-
var
|
|
2028
|
+
var import_design_system_foundation35 = require("@boostdev/design-system-foundation");
|
|
2029
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1927
2030
|
function FormInput({
|
|
1928
2031
|
label,
|
|
1929
2032
|
name,
|
|
@@ -1931,40 +2034,43 @@ function FormInput({
|
|
|
1931
2034
|
error,
|
|
1932
2035
|
hint,
|
|
1933
2036
|
className,
|
|
2037
|
+
required,
|
|
1934
2038
|
...props
|
|
1935
2039
|
}) {
|
|
1936
|
-
const id = name + (0,
|
|
2040
|
+
const id = name + (0, import_react16.useId)();
|
|
1937
2041
|
const hintId = id + "hint";
|
|
1938
2042
|
const errorId = id + "error";
|
|
1939
2043
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1940
|
-
return /* @__PURE__ */ (0,
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(InputContainer, { className: (0, import_design_system_foundation35.cn)(FormInput_default.formGroup, className), children: [
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Label, { id, label }),
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1943
2047
|
"input",
|
|
1944
2048
|
{
|
|
1945
2049
|
"aria-invalid": !!error,
|
|
1946
2050
|
"aria-describedby": describedBy,
|
|
1947
2051
|
"aria-label": ariaLabel,
|
|
2052
|
+
"aria-required": required || void 0,
|
|
1948
2053
|
id,
|
|
1949
2054
|
name,
|
|
1950
|
-
|
|
2055
|
+
required,
|
|
2056
|
+
className: (0, import_design_system_foundation35.cn)(FormInput_default.input, error && FormInput_default.inputError),
|
|
1951
2057
|
...props
|
|
1952
2058
|
}
|
|
1953
2059
|
),
|
|
1954
|
-
/* @__PURE__ */ (0,
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
2060
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
1956
2062
|
] });
|
|
1957
2063
|
}
|
|
1958
2064
|
|
|
1959
2065
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
1960
|
-
var
|
|
2066
|
+
var import_react17 = require("react");
|
|
1961
2067
|
|
|
1962
2068
|
// src/components/interaction/form/NumberInput/NumberInput.module.css
|
|
1963
|
-
var NumberInput_default = {"formGroup":"
|
|
2069
|
+
var NumberInput_default = {"formGroup":"bds100NumberInput-formGroup","inputRow":"bds100NumberInput-inputRow","input":"bds100NumberInput-input","inputError":"bds100NumberInput-inputError","stepper":"bds100NumberInput-stepper"};
|
|
1964
2070
|
|
|
1965
2071
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
1966
|
-
var
|
|
1967
|
-
var
|
|
2072
|
+
var import_design_system_foundation36 = require("@boostdev/design-system-foundation");
|
|
2073
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1968
2074
|
function NumberInput({
|
|
1969
2075
|
label,
|
|
1970
2076
|
name,
|
|
@@ -1979,13 +2085,13 @@ function NumberInput({
|
|
|
1979
2085
|
onChange,
|
|
1980
2086
|
className
|
|
1981
2087
|
}) {
|
|
1982
|
-
const uid = name + (0,
|
|
2088
|
+
const uid = name + (0, import_react17.useId)();
|
|
1983
2089
|
const hintId = uid + "hint";
|
|
1984
2090
|
const errorId = uid + "error";
|
|
1985
2091
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
1986
|
-
const inputRef = (0,
|
|
2092
|
+
const inputRef = (0, import_react17.useRef)(null);
|
|
1987
2093
|
const isControlled = value !== void 0;
|
|
1988
|
-
const [internalValue, setInternalValue] = (0,
|
|
2094
|
+
const [internalValue, setInternalValue] = (0, import_react17.useState)(defaultValue ?? 0);
|
|
1989
2095
|
const currentValue = isControlled ? value : internalValue;
|
|
1990
2096
|
const clamp = (v) => {
|
|
1991
2097
|
const withMin = min !== void 0 ? Math.max(min, v) : v;
|
|
@@ -1996,22 +2102,23 @@ function NumberInput({
|
|
|
1996
2102
|
if (!isControlled) setInternalValue(next);
|
|
1997
2103
|
onChange?.(next);
|
|
1998
2104
|
};
|
|
1999
|
-
return /* @__PURE__ */ (0,
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
2105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(InputContainer, { className: (0, import_design_system_foundation36.cn)(NumberInput_default.formGroup, className), children: [
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label, { id: uid, label }),
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: NumberInput_default.inputRow, children: [
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2003
2109
|
"button",
|
|
2004
2110
|
{
|
|
2005
2111
|
type: "button",
|
|
2006
2112
|
className: NumberInput_default.stepper,
|
|
2007
2113
|
"aria-label": "Decrease",
|
|
2114
|
+
"aria-controls": uid,
|
|
2008
2115
|
disabled: disabled || min !== void 0 && currentValue <= min,
|
|
2009
2116
|
onClick: () => adjust(-step),
|
|
2010
2117
|
tabIndex: -1,
|
|
2011
|
-
children: /* @__PURE__ */ (0,
|
|
2118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12h14" }) })
|
|
2012
2119
|
}
|
|
2013
2120
|
),
|
|
2014
|
-
/* @__PURE__ */ (0,
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2015
2122
|
"input",
|
|
2016
2123
|
{
|
|
2017
2124
|
ref: inputRef,
|
|
@@ -2025,49 +2132,51 @@ function NumberInput({
|
|
|
2025
2132
|
disabled,
|
|
2026
2133
|
"aria-invalid": !!error,
|
|
2027
2134
|
"aria-describedby": describedBy,
|
|
2028
|
-
className: (0,
|
|
2135
|
+
className: (0, import_design_system_foundation36.cn)(NumberInput_default.input, error ? NumberInput_default.inputError : void 0),
|
|
2029
2136
|
onChange: (e) => {
|
|
2030
2137
|
const v = parseFloat(e.target.value);
|
|
2031
|
-
|
|
2032
|
-
|
|
2138
|
+
const safe = isNaN(v) ? 0 : v;
|
|
2139
|
+
if (!isControlled) setInternalValue(safe);
|
|
2140
|
+
onChange?.(safe);
|
|
2033
2141
|
}
|
|
2034
2142
|
}
|
|
2035
2143
|
),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2037
2145
|
"button",
|
|
2038
2146
|
{
|
|
2039
2147
|
type: "button",
|
|
2040
2148
|
className: NumberInput_default.stepper,
|
|
2041
2149
|
"aria-label": "Increase",
|
|
2150
|
+
"aria-controls": uid,
|
|
2042
2151
|
disabled: disabled || max !== void 0 && currentValue >= max,
|
|
2043
2152
|
onClick: () => adjust(step),
|
|
2044
2153
|
tabIndex: -1,
|
|
2045
|
-
children: /* @__PURE__ */ (0,
|
|
2154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) })
|
|
2046
2155
|
}
|
|
2047
2156
|
)
|
|
2048
2157
|
] }),
|
|
2049
|
-
/* @__PURE__ */ (0,
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: uid, type: "error", message: error }),
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: uid, type: "hint", message: hint })
|
|
2051
2160
|
] });
|
|
2052
2161
|
}
|
|
2053
2162
|
|
|
2054
2163
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
2055
|
-
var
|
|
2164
|
+
var import_react18 = require("react");
|
|
2056
2165
|
|
|
2057
2166
|
// src/components/interaction/form/Radio/Radio.module.css
|
|
2058
|
-
var Radio_default = {"radioGroup":"
|
|
2167
|
+
var Radio_default = {"radioGroup":"bds100Radio-radioGroup","inputWrapper":"bds100Radio-inputWrapper","textWrapper":"bds100Radio-textWrapper","description":"bds100Radio-description","radio":"bds100Radio-radio","radioError":"bds100Radio-radioError"};
|
|
2059
2168
|
|
|
2060
2169
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
2061
|
-
var
|
|
2062
|
-
var
|
|
2170
|
+
var import_design_system_foundation37 = require("@boostdev/design-system-foundation");
|
|
2171
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2063
2172
|
function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
2064
|
-
const id = name + (0,
|
|
2173
|
+
const id = name + (0, import_react18.useId)();
|
|
2065
2174
|
const hintId = id + "hint";
|
|
2066
2175
|
const errorId = id + "error";
|
|
2067
2176
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2068
|
-
return /* @__PURE__ */ (0,
|
|
2069
|
-
/* @__PURE__ */ (0,
|
|
2070
|
-
/* @__PURE__ */ (0,
|
|
2177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(InputContainer, { className: (0, import_design_system_foundation37.cn)(Radio_default.radioGroup, className), children: [
|
|
2178
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: Radio_default.inputWrapper, children: [
|
|
2179
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2071
2180
|
"input",
|
|
2072
2181
|
{
|
|
2073
2182
|
"aria-describedby": describedBy,
|
|
@@ -2075,29 +2184,71 @@ function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
|
2075
2184
|
type: "radio",
|
|
2076
2185
|
id,
|
|
2077
2186
|
name,
|
|
2078
|
-
className: (0,
|
|
2187
|
+
className: (0, import_design_system_foundation37.cn)(Radio_default.radio, error && Radio_default.radioError),
|
|
2079
2188
|
...props
|
|
2080
2189
|
}
|
|
2081
2190
|
),
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2084
|
-
description && /* @__PURE__ */ (0,
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: Radio_default.textWrapper, children: [
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { id, label }),
|
|
2193
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: Radio_default.description, children: description })
|
|
2085
2194
|
] })
|
|
2086
2195
|
] }),
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2088
|
-
/* @__PURE__ */ (0,
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2197
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2089
2198
|
] });
|
|
2090
2199
|
}
|
|
2091
2200
|
|
|
2201
|
+
// src/components/interaction/form/RadioGroup/RadioGroup.tsx
|
|
2202
|
+
var import_react19 = require("react");
|
|
2203
|
+
|
|
2204
|
+
// src/components/interaction/form/RadioGroup/RadioGroup.module.css
|
|
2205
|
+
var RadioGroup_default = {"group":"bds100RadioGroup-group","legend":"bds100RadioGroup-legend","required":"bds100RadioGroup-required","items":"bds100RadioGroup-items"};
|
|
2206
|
+
|
|
2207
|
+
// src/components/interaction/form/RadioGroup/RadioGroup.tsx
|
|
2208
|
+
var import_design_system_foundation38 = require("@boostdev/design-system-foundation");
|
|
2209
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2210
|
+
function RadioGroup({
|
|
2211
|
+
legend,
|
|
2212
|
+
children,
|
|
2213
|
+
error,
|
|
2214
|
+
hint,
|
|
2215
|
+
required,
|
|
2216
|
+
disabled,
|
|
2217
|
+
className
|
|
2218
|
+
}) {
|
|
2219
|
+
const id = (0, import_react19.useId)();
|
|
2220
|
+
const hintId = id + "hint";
|
|
2221
|
+
const errorId = id + "error";
|
|
2222
|
+
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2224
|
+
"fieldset",
|
|
2225
|
+
{
|
|
2226
|
+
className: (0, import_design_system_foundation38.cn)(RadioGroup_default.group, className),
|
|
2227
|
+
disabled,
|
|
2228
|
+
"aria-required": required || void 0,
|
|
2229
|
+
"aria-describedby": describedBy,
|
|
2230
|
+
children: [
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("legend", { className: RadioGroup_default.legend, children: [
|
|
2232
|
+
legend,
|
|
2233
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: RadioGroup_default.required, "aria-hidden": "true", children: " *" })
|
|
2234
|
+
] }),
|
|
2235
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: RadioGroup_default.items, children }),
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2238
|
+
]
|
|
2239
|
+
}
|
|
2240
|
+
);
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2092
2243
|
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2093
|
-
var
|
|
2244
|
+
var import_react20 = require("react");
|
|
2094
2245
|
|
|
2095
2246
|
// src/components/interaction/form/SegmentedControl/SegmentedControl.module.css
|
|
2096
|
-
var SegmentedControl_default = {"control":"
|
|
2247
|
+
var SegmentedControl_default = {"control":"bds100SegmentedControl-control","thumb":"bds100SegmentedControl-thumb","item":"bds100SegmentedControl-item","--disabled":"bds100SegmentedControl---disabled","radio":"bds100SegmentedControl-radio","label":"bds100SegmentedControl-label","--size_small":"bds100SegmentedControl---size_small","--size_large":"bds100SegmentedControl---size_large","--active":"bds100SegmentedControl---active"};
|
|
2097
2248
|
|
|
2098
2249
|
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2099
|
-
var
|
|
2100
|
-
var
|
|
2250
|
+
var import_design_system_foundation39 = require("@boostdev/design-system-foundation");
|
|
2251
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2101
2252
|
function SegmentedControl({
|
|
2102
2253
|
name,
|
|
2103
2254
|
options,
|
|
@@ -2107,10 +2258,11 @@ function SegmentedControl({
|
|
|
2107
2258
|
disabled,
|
|
2108
2259
|
size = "medium",
|
|
2109
2260
|
className,
|
|
2261
|
+
"aria-label": ariaLabel,
|
|
2110
2262
|
...rest
|
|
2111
2263
|
}) {
|
|
2112
|
-
const baseId = name + (0,
|
|
2113
|
-
const [internalValue, setInternalValue] = (0,
|
|
2264
|
+
const baseId = name + (0, import_react20.useId)();
|
|
2265
|
+
const [internalValue, setInternalValue] = (0, import_react20.useState)(
|
|
2114
2266
|
defaultValue ?? options[0]?.value ?? ""
|
|
2115
2267
|
);
|
|
2116
2268
|
const activeValue = value ?? internalValue;
|
|
@@ -2119,27 +2271,29 @@ function SegmentedControl({
|
|
|
2119
2271
|
if (value === void 0) setInternalValue(optionValue);
|
|
2120
2272
|
onChange?.(optionValue);
|
|
2121
2273
|
};
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2123
2275
|
"div",
|
|
2124
2276
|
{
|
|
2125
|
-
|
|
2277
|
+
role: "group",
|
|
2278
|
+
"aria-label": ariaLabel,
|
|
2279
|
+
className: (0, import_design_system_foundation39.cn)(SegmentedControl_default.control, SegmentedControl_default[`--size_${size}`], className),
|
|
2126
2280
|
style: {
|
|
2127
2281
|
"--control_count": options.length,
|
|
2128
2282
|
"--control_selected-index": Math.max(0, selectedIndex)
|
|
2129
2283
|
},
|
|
2130
2284
|
children: [
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: SegmentedControl_default.thumb, "aria-hidden": "true" }),
|
|
2132
2286
|
options.map((option, index) => {
|
|
2133
2287
|
const id = `${baseId}-${index}`;
|
|
2134
2288
|
const isChecked = option.value === activeValue;
|
|
2135
2289
|
const isDisabled = disabled || option.disabled;
|
|
2136
|
-
return /* @__PURE__ */ (0,
|
|
2290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2137
2291
|
"label",
|
|
2138
2292
|
{
|
|
2139
2293
|
htmlFor: id,
|
|
2140
|
-
className: (0,
|
|
2294
|
+
className: (0, import_design_system_foundation39.cn)(SegmentedControl_default.item, isChecked && SegmentedControl_default["--active"], isDisabled && SegmentedControl_default["--disabled"]),
|
|
2141
2295
|
children: [
|
|
2142
|
-
/* @__PURE__ */ (0,
|
|
2296
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2143
2297
|
"input",
|
|
2144
2298
|
{
|
|
2145
2299
|
...rest,
|
|
@@ -2153,7 +2307,7 @@ function SegmentedControl({
|
|
|
2153
2307
|
onChange: () => handleChange(option.value)
|
|
2154
2308
|
}
|
|
2155
2309
|
),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: SegmentedControl_default.label, children: option.label })
|
|
2157
2311
|
]
|
|
2158
2312
|
},
|
|
2159
2313
|
option.value
|
|
@@ -2165,14 +2319,14 @@ function SegmentedControl({
|
|
|
2165
2319
|
}
|
|
2166
2320
|
|
|
2167
2321
|
// src/components/interaction/form/Select/Select.tsx
|
|
2168
|
-
var
|
|
2322
|
+
var import_react21 = require("react");
|
|
2169
2323
|
|
|
2170
2324
|
// src/components/interaction/form/Select/Select.module.css
|
|
2171
|
-
var Select_default = {"formGroup":"
|
|
2325
|
+
var Select_default = {"formGroup":"bds100Select-formGroup","selectWrapper":"bds100Select-selectWrapper","select":"bds100Select-select","selectError":"bds100Select-selectError","chevron":"bds100Select-chevron"};
|
|
2172
2326
|
|
|
2173
2327
|
// src/components/interaction/form/Select/Select.tsx
|
|
2174
|
-
var
|
|
2175
|
-
var
|
|
2328
|
+
var import_design_system_foundation40 = require("@boostdev/design-system-foundation");
|
|
2329
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2176
2330
|
function Select({
|
|
2177
2331
|
label,
|
|
2178
2332
|
name,
|
|
@@ -2181,46 +2335,49 @@ function Select({
|
|
|
2181
2335
|
error,
|
|
2182
2336
|
hint,
|
|
2183
2337
|
className,
|
|
2338
|
+
required,
|
|
2184
2339
|
...props
|
|
2185
2340
|
}) {
|
|
2186
|
-
const id = name + (0,
|
|
2341
|
+
const id = name + (0, import_react21.useId)();
|
|
2187
2342
|
const hintId = id + "hint";
|
|
2188
2343
|
const errorId = id + "error";
|
|
2189
2344
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2190
|
-
return /* @__PURE__ */ (0,
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(InputContainer, { className: (0, import_design_system_foundation40.cn)(Select_default.formGroup, className), children: [
|
|
2346
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { id, label }),
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: Select_default.selectWrapper, children: [
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2194
2349
|
"select",
|
|
2195
2350
|
{
|
|
2196
2351
|
id,
|
|
2197
2352
|
name,
|
|
2198
2353
|
"aria-invalid": !!error,
|
|
2354
|
+
"aria-required": required || void 0,
|
|
2199
2355
|
"aria-describedby": describedBy,
|
|
2200
|
-
|
|
2356
|
+
required,
|
|
2357
|
+
className: (0, import_design_system_foundation40.cn)(Select_default.select, error ? Select_default.selectError : void 0),
|
|
2201
2358
|
...props,
|
|
2202
2359
|
children: [
|
|
2203
|
-
placeholder && /* @__PURE__ */ (0,
|
|
2204
|
-
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ (0,
|
|
2360
|
+
placeholder && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
2361
|
+
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value, disabled, children: optLabel }, value))
|
|
2205
2362
|
]
|
|
2206
2363
|
}
|
|
2207
2364
|
),
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: Select_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) })
|
|
2209
2366
|
] }),
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2212
2369
|
] });
|
|
2213
2370
|
}
|
|
2214
2371
|
|
|
2215
2372
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2216
|
-
var
|
|
2373
|
+
var import_react22 = require("react");
|
|
2217
2374
|
|
|
2218
2375
|
// src/components/interaction/form/Slider/Slider.module.css
|
|
2219
|
-
var Slider_default = {"formGroup":"
|
|
2376
|
+
var Slider_default = {"formGroup":"bds100Slider-formGroup","labelRow":"bds100Slider-labelRow","value":"bds100Slider-value","slider":"bds100Slider-slider","sliderError":"bds100Slider-sliderError"};
|
|
2220
2377
|
|
|
2221
2378
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2222
|
-
var
|
|
2223
|
-
var
|
|
2379
|
+
var import_design_system_foundation41 = require("@boostdev/design-system-foundation");
|
|
2380
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2224
2381
|
function Slider({
|
|
2225
2382
|
label,
|
|
2226
2383
|
name,
|
|
@@ -2233,24 +2390,24 @@ function Slider({
|
|
|
2233
2390
|
onChange,
|
|
2234
2391
|
...props
|
|
2235
2392
|
}) {
|
|
2236
|
-
const id = name + (0,
|
|
2393
|
+
const id = name + (0, import_react22.useId)();
|
|
2237
2394
|
const hintId = id + "hint";
|
|
2238
2395
|
const errorId = id + "error";
|
|
2239
2396
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2240
2397
|
const isControlled = props.value !== void 0;
|
|
2241
|
-
const [internalValue, setInternalValue] = (0,
|
|
2398
|
+
const [internalValue, setInternalValue] = (0, import_react22.useState)(Number(props.defaultValue ?? min));
|
|
2242
2399
|
const currentValue = isControlled ? Number(props.value) : internalValue;
|
|
2243
2400
|
const fillPct = (currentValue - min) / (max - min) * 100;
|
|
2244
2401
|
const handleChange = (e) => {
|
|
2245
2402
|
if (!isControlled) setInternalValue(Number(e.target.value));
|
|
2246
2403
|
onChange?.(e);
|
|
2247
2404
|
};
|
|
2248
|
-
return /* @__PURE__ */ (0,
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2250
|
-
/* @__PURE__ */ (0,
|
|
2251
|
-
showValue && /* @__PURE__ */ (0,
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(InputContainer, { className: (0, import_design_system_foundation41.cn)(Slider_default.formGroup, className), children: [
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: Slider_default.labelRow, children: [
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Label, { id, label }),
|
|
2408
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: Slider_default.value, children: currentValue })
|
|
2252
2409
|
] }),
|
|
2253
|
-
/* @__PURE__ */ (0,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2254
2411
|
"input",
|
|
2255
2412
|
{
|
|
2256
2413
|
type: "range",
|
|
@@ -2262,26 +2419,27 @@ function Slider({
|
|
|
2262
2419
|
"aria-valuemin": min,
|
|
2263
2420
|
"aria-valuemax": max,
|
|
2264
2421
|
"aria-valuenow": currentValue,
|
|
2265
|
-
|
|
2422
|
+
"aria-valuetext": String(currentValue),
|
|
2423
|
+
className: (0, import_design_system_foundation41.cn)(Slider_default.slider, error ? Slider_default.sliderError : void 0),
|
|
2266
2424
|
style: { "--slider_fill": `${fillPct}%` },
|
|
2267
2425
|
onChange: handleChange,
|
|
2268
2426
|
...props
|
|
2269
2427
|
}
|
|
2270
2428
|
),
|
|
2271
|
-
/* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2273
2431
|
] });
|
|
2274
2432
|
}
|
|
2275
2433
|
|
|
2276
2434
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2277
|
-
var
|
|
2435
|
+
var import_react23 = require("react");
|
|
2278
2436
|
|
|
2279
2437
|
// src/components/interaction/form/Switch/Switch.module.css
|
|
2280
|
-
var Switch_default = {"switchGroup":"
|
|
2438
|
+
var Switch_default = {"switchGroup":"bds100Switch-switchGroup","--size_small":"bds100Switch---size_small","--size_medium":"bds100Switch---size_medium","--size_large":"bds100Switch---size_large","inputWrapper":"bds100Switch-inputWrapper","trackWrapper":"bds100Switch-trackWrapper","switch":"bds100Switch-switch","track":"bds100Switch-track","thumb":"bds100Switch-thumb","switchError":"bds100Switch-switchError"};
|
|
2281
2439
|
|
|
2282
2440
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2283
|
-
var
|
|
2284
|
-
var
|
|
2441
|
+
var import_design_system_foundation42 = require("@boostdev/design-system-foundation");
|
|
2442
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2285
2443
|
function Switch({
|
|
2286
2444
|
label,
|
|
2287
2445
|
name,
|
|
@@ -2292,15 +2450,15 @@ function Switch({
|
|
|
2292
2450
|
prefix,
|
|
2293
2451
|
...props
|
|
2294
2452
|
}) {
|
|
2295
|
-
const id = name + (0,
|
|
2453
|
+
const id = name + (0, import_react23.useId)();
|
|
2296
2454
|
const hintId = id + "hint";
|
|
2297
2455
|
const errorId = id + "error";
|
|
2298
2456
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
-
/* @__PURE__ */ (0,
|
|
2301
|
-
prefix && /* @__PURE__ */ (0,
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2303
|
-
/* @__PURE__ */ (0,
|
|
2457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(InputContainer, { className: (0, import_design_system_foundation42.cn)(Switch_default.switchGroup, Switch_default[`--size_${size}`], className), children: [
|
|
2458
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: Switch_default.inputWrapper, children: [
|
|
2459
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: prefix }),
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: Switch_default.trackWrapper, children: [
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2304
2462
|
"input",
|
|
2305
2463
|
{
|
|
2306
2464
|
type: "checkbox",
|
|
@@ -2308,74 +2466,85 @@ function Switch({
|
|
|
2308
2466
|
id,
|
|
2309
2467
|
name,
|
|
2310
2468
|
"aria-describedby": describedBy,
|
|
2311
|
-
className: (0,
|
|
2469
|
+
className: (0, import_design_system_foundation42.cn)(Switch_default.switch, error ? Switch_default.switchError : void 0),
|
|
2312
2470
|
...props
|
|
2313
2471
|
}
|
|
2314
2472
|
),
|
|
2315
|
-
/* @__PURE__ */ (0,
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: Switch_default.thumb }) })
|
|
2316
2474
|
] }),
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Label, { id, label })
|
|
2318
2476
|
] }),
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2320
|
-
/* @__PURE__ */ (0,
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2321
2479
|
] });
|
|
2322
2480
|
}
|
|
2323
2481
|
|
|
2324
2482
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2325
|
-
var
|
|
2483
|
+
var import_react24 = require("react");
|
|
2326
2484
|
|
|
2327
2485
|
// src/components/interaction/form/Textarea/Textarea.module.css
|
|
2328
|
-
var Textarea_default = {"formGroup":"
|
|
2486
|
+
var Textarea_default = {"formGroup":"bds100Textarea-formGroup","textarea":"bds100Textarea-textarea","textareaError":"bds100Textarea-textareaError"};
|
|
2329
2487
|
|
|
2330
2488
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2331
|
-
var
|
|
2332
|
-
var
|
|
2489
|
+
var import_design_system_foundation43 = require("@boostdev/design-system-foundation");
|
|
2490
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2333
2491
|
function Textarea({
|
|
2334
2492
|
label,
|
|
2335
2493
|
name,
|
|
2336
2494
|
error,
|
|
2337
2495
|
hint,
|
|
2338
2496
|
className,
|
|
2497
|
+
required,
|
|
2339
2498
|
...props
|
|
2340
2499
|
}) {
|
|
2341
|
-
const id = name + (0,
|
|
2500
|
+
const id = name + (0, import_react24.useId)();
|
|
2342
2501
|
const hintId = id + "hint";
|
|
2343
2502
|
const errorId = id + "error";
|
|
2344
2503
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2345
|
-
return /* @__PURE__ */ (0,
|
|
2346
|
-
/* @__PURE__ */ (0,
|
|
2347
|
-
/* @__PURE__ */ (0,
|
|
2504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(InputContainer, { className: (0, import_design_system_foundation43.cn)(Textarea_default.formGroup, className), children: [
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Label, { id, label }),
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2348
2507
|
"textarea",
|
|
2349
2508
|
{
|
|
2350
2509
|
id,
|
|
2351
2510
|
name,
|
|
2352
2511
|
"aria-invalid": !!error,
|
|
2353
2512
|
"aria-describedby": describedBy,
|
|
2354
|
-
|
|
2513
|
+
"aria-required": required || void 0,
|
|
2514
|
+
required,
|
|
2515
|
+
className: (0, import_design_system_foundation43.cn)(Textarea_default.textarea, error ? Textarea_default.textareaError : void 0),
|
|
2355
2516
|
...props
|
|
2356
2517
|
}
|
|
2357
2518
|
),
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message, { inputId: id, type: "error", message: error }),
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message, { inputId: id, type: "hint", message: hint })
|
|
2360
2521
|
] });
|
|
2361
2522
|
}
|
|
2362
2523
|
|
|
2363
2524
|
// src/components/layout/ButtonGroup/ButtonGroup.module.css
|
|
2364
|
-
var ButtonGroup_default = {"buttonGroup":"
|
|
2525
|
+
var ButtonGroup_default = {"buttonGroup":"bds100ButtonGroup-buttonGroup","container":"bds100ButtonGroup-container","--variant_card":"bds100ButtonGroup---variant_card","--variant_flow":"bds100ButtonGroup---variant_flow","--variant_modal":"bds100ButtonGroup---variant_modal","--variant_content":"bds100ButtonGroup---variant_content","--variant_grid":"bds100ButtonGroup---variant_grid"};
|
|
2365
2526
|
|
|
2366
2527
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2367
|
-
var
|
|
2368
|
-
var
|
|
2369
|
-
function ButtonGroup({ children, className, variant }) {
|
|
2370
|
-
return /* @__PURE__ */ (0,
|
|
2528
|
+
var import_design_system_foundation44 = require("@boostdev/design-system-foundation");
|
|
2529
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2530
|
+
function ButtonGroup({ children, className, variant, "aria-label": ariaLabel }) {
|
|
2531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2532
|
+
"div",
|
|
2533
|
+
{
|
|
2534
|
+
role: "group",
|
|
2535
|
+
"aria-label": ariaLabel,
|
|
2536
|
+
className: (0, import_design_system_foundation44.cn)(ButtonGroup_default.buttonGroup, className, variant && ButtonGroup_default[`--variant_${variant}`]),
|
|
2537
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: ButtonGroup_default.container, children })
|
|
2538
|
+
}
|
|
2539
|
+
);
|
|
2371
2540
|
}
|
|
2372
2541
|
|
|
2373
2542
|
// src/components/layout/Card/Card.module.css
|
|
2374
|
-
var Card_default = {"card":"
|
|
2543
|
+
var Card_default = {"card":"bds100Card-card","--default":"bds100Card---default","--elevated":"bds100Card---elevated","--outlined":"bds100Card---outlined","--clickable":"bds100Card---clickable","--padding-none":"bds100Card---padding-none","--padding-small":"bds100Card---padding-small","--padding-medium":"bds100Card---padding-medium","--padding-large":"bds100Card---padding-large","--text-start":"bds100Card---text-start","--text-center":"bds100Card---text-center","--text-end":"bds100Card---text-end"};
|
|
2375
2544
|
|
|
2376
2545
|
// src/components/layout/Card/Card.tsx
|
|
2377
|
-
var
|
|
2378
|
-
var
|
|
2546
|
+
var import_design_system_foundation45 = require("@boostdev/design-system-foundation");
|
|
2547
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2379
2548
|
function Card({
|
|
2380
2549
|
children,
|
|
2381
2550
|
className,
|
|
@@ -2386,7 +2555,7 @@ function Card({
|
|
|
2386
2555
|
onClick,
|
|
2387
2556
|
"aria-label": ariaLabel
|
|
2388
2557
|
}) {
|
|
2389
|
-
const classNames = (0,
|
|
2558
|
+
const classNames = (0, import_design_system_foundation45.cn)(
|
|
2390
2559
|
Card_default.card,
|
|
2391
2560
|
Card_default[`--${variant}`],
|
|
2392
2561
|
Card_default[`--padding-${padding}`],
|
|
@@ -2395,7 +2564,7 @@ function Card({
|
|
|
2395
2564
|
className
|
|
2396
2565
|
);
|
|
2397
2566
|
const Component = onClick ? "button" : "div";
|
|
2398
|
-
return /* @__PURE__ */ (0,
|
|
2567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2399
2568
|
Component,
|
|
2400
2569
|
{
|
|
2401
2570
|
className: classNames,
|
|
@@ -2409,11 +2578,11 @@ function Card({
|
|
|
2409
2578
|
}
|
|
2410
2579
|
|
|
2411
2580
|
// src/components/layout/SectionHeader/SectionHeader.module.css
|
|
2412
|
-
var SectionHeader_default = {"sectionHeader":"
|
|
2581
|
+
var SectionHeader_default = {"sectionHeader":"bds100SectionHeader-sectionHeader","title":"bds100SectionHeader-title","subtitle":"bds100SectionHeader-subtitle","--start":"bds100SectionHeader---start","--center":"bds100SectionHeader---center","--end":"bds100SectionHeader---end","--small":"bds100SectionHeader---small","--medium":"bds100SectionHeader---medium","--large":"bds100SectionHeader---large"};
|
|
2413
2582
|
|
|
2414
2583
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2415
|
-
var
|
|
2416
|
-
var
|
|
2584
|
+
var import_design_system_foundation46 = require("@boostdev/design-system-foundation");
|
|
2585
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2417
2586
|
function SectionHeader({
|
|
2418
2587
|
title,
|
|
2419
2588
|
subtitle,
|
|
@@ -2423,24 +2592,24 @@ function SectionHeader({
|
|
|
2423
2592
|
titleAs = "h2"
|
|
2424
2593
|
}) {
|
|
2425
2594
|
const Title = titleAs;
|
|
2426
|
-
return /* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2428
|
-
subtitle && /* @__PURE__ */ (0,
|
|
2595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: (0, import_design_system_foundation46.cn)(SectionHeader_default.sectionHeader, SectionHeader_default[`--${alignment}`], SectionHeader_default[`--${size}`], className), children: [
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Title, { className: SectionHeader_default.title, children: title }),
|
|
2597
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: SectionHeader_default.subtitle, children: subtitle })
|
|
2429
2598
|
] });
|
|
2430
2599
|
}
|
|
2431
2600
|
|
|
2432
2601
|
// src/components/layout/IconWrapper/IconWrapper.module.css
|
|
2433
|
-
var IconWrapper_default = {"wrapper":"
|
|
2602
|
+
var IconWrapper_default = {"wrapper":"bds100IconWrapper-wrapper"};
|
|
2434
2603
|
|
|
2435
2604
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2436
|
-
var
|
|
2437
|
-
var
|
|
2438
|
-
function IconWrapper({ children, className }) {
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2605
|
+
var import_design_system_foundation47 = require("@boostdev/design-system-foundation");
|
|
2606
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2607
|
+
function IconWrapper({ children, className, "aria-hidden": ariaHidden }) {
|
|
2608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: (0, import_design_system_foundation47.cn)(className, IconWrapper_default.wrapper), "aria-hidden": ariaHidden, children });
|
|
2440
2609
|
}
|
|
2441
2610
|
|
|
2442
2611
|
// src/index.ts
|
|
2443
|
-
var
|
|
2612
|
+
var import_design_system_foundation48 = require("@boostdev/design-system-foundation");
|
|
2444
2613
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2445
2614
|
0 && (module.exports = {
|
|
2446
2615
|
Accordion,
|
|
@@ -2454,6 +2623,7 @@ var import_design_system_foundation46 = require("@boostdev/design-system-foundat
|
|
|
2454
2623
|
Card,
|
|
2455
2624
|
Carousel,
|
|
2456
2625
|
Checkbox,
|
|
2626
|
+
CheckboxGroup,
|
|
2457
2627
|
Collapsible,
|
|
2458
2628
|
Combobox,
|
|
2459
2629
|
Command,
|
|
@@ -2473,6 +2643,7 @@ var import_design_system_foundation46 = require("@boostdev/design-system-foundat
|
|
|
2473
2643
|
Progress,
|
|
2474
2644
|
ProgressCircle,
|
|
2475
2645
|
Radio,
|
|
2646
|
+
RadioGroup,
|
|
2476
2647
|
Rating,
|
|
2477
2648
|
SectionHeader,
|
|
2478
2649
|
SegmentedControl,
|