@boostdev/design-system-components 0.1.15 → 0.1.17
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 +4 -4
- package/README.md +50 -1
- package/dist/client.cjs +203 -114
- package/dist/client.css +520 -435
- package/dist/client.d.cts +23 -3
- package/dist/client.d.ts +23 -3
- package/dist/client.js +202 -114
- package/dist/index.cjs +203 -114
- package/dist/index.css +520 -435
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +202 -114
- package/package.json +1 -1
- package/src/components/interaction/Command/Command.mdx +1 -0
- package/src/components/interaction/Command/Command.spec.tsx +18 -0
- package/src/components/interaction/Command/Command.tsx +5 -0
- package/src/components/interaction/Dialog/Dialog.spec.tsx +18 -0
- package/src/components/interaction/Drawer/Drawer.spec.tsx +18 -0
- package/src/components/interaction/Drawer/Drawer.tsx +5 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +64 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +99 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +87 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +110 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +89 -0
- package/src/components/interaction/form/SegmentedControl/index.ts +2 -0
- package/src/components/interaction/form/Switch/Switch.mdx +7 -2
- package/src/components/interaction/form/Switch/Switch.module.css +6 -6
- package/src/components/interaction/form/Switch/Switch.spec.tsx +23 -0
- package/src/components/interaction/form/Switch/Switch.stories.tsx +8 -0
- package/src/components/interaction/form/Switch/Switch.tsx +5 -2
- package/src/components/interaction/form/atoms/Label.module.css +0 -1
- package/src/components/ui/Progress/Progress.module.css +0 -4
- package/src/index.ts +2 -0
- package/src/stories/Introduction.mdx +4 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
3
|
|
|
4
4
|
// src/components/ui/Accordion/Accordion.module.css
|
|
5
|
-
var Accordion_default = {"accordion":"
|
|
5
|
+
var Accordion_default = {"accordion":"bds0117Accordion-accordion","item":"bds0117Accordion-item","heading":"bds0117Accordion-heading","trigger":"bds0117Accordion-trigger","triggerLabel":"bds0117Accordion-triggerLabel","chevron":"bds0117Accordion-chevron","--open":"bds0117Accordion---open","panel":"bds0117Accordion-panel","panelContent":"bds0117Accordion-panelContent"};
|
|
6
6
|
|
|
7
7
|
// src/components/ui/Accordion/Accordion.tsx
|
|
8
8
|
import { cn } from "@boostdev/design-system-foundation";
|
|
@@ -70,7 +70,7 @@ function Accordion({
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// src/components/ui/Alert/Alert.module.css
|
|
73
|
-
var Alert_default = {"alert":"
|
|
73
|
+
var Alert_default = {"alert":"bds0117Alert-alert","--variant_info":"bds0117Alert---variant_info","--variant_success":"bds0117Alert---variant_success","--variant_warning":"bds0117Alert---variant_warning","--variant_error":"bds0117Alert---variant_error","icon":"bds0117Alert-icon","content":"bds0117Alert-content","title":"bds0117Alert-title","dismiss":"bds0117Alert-dismiss"};
|
|
74
74
|
|
|
75
75
|
// src/components/ui/Alert/Alert.tsx
|
|
76
76
|
import { cn as cn2 } from "@boostdev/design-system-foundation";
|
|
@@ -113,7 +113,7 @@ function Alert({
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
// src/components/ui/Avatar/Avatar.module.css
|
|
116
|
-
var Avatar_default = {"avatar":"
|
|
116
|
+
var Avatar_default = {"avatar":"bds0117Avatar-avatar","--fallback":"bds0117Avatar---fallback","--size_small":"bds0117Avatar---size_small","--size_medium":"bds0117Avatar---size_medium","--size_large":"bds0117Avatar---size_large","image":"bds0117Avatar-image","initials":"bds0117Avatar-initials"};
|
|
117
117
|
|
|
118
118
|
// src/components/ui/Avatar/Avatar.tsx
|
|
119
119
|
import { cn as cn3 } from "@boostdev/design-system-foundation";
|
|
@@ -139,7 +139,7 @@ function Avatar({ src, alt, name, size = "medium", className }) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
// src/components/ui/Badge/Badge.module.css
|
|
142
|
-
var Badge_default = {"badge":"
|
|
142
|
+
var Badge_default = {"badge":"bds0117Badge-badge","--variant_primary":"bds0117Badge---variant_primary","--variant_secondary":"bds0117Badge---variant_secondary","--variant_success":"bds0117Badge---variant_success","--variant_error":"bds0117Badge---variant_error","--variant_warning":"bds0117Badge---variant_warning"};
|
|
143
143
|
|
|
144
144
|
// src/components/ui/Badge/Badge.tsx
|
|
145
145
|
import { cn as cn4 } from "@boostdev/design-system-foundation";
|
|
@@ -149,7 +149,7 @@ function Badge({ children, variant = "primary", className }) {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/components/ui/Breadcrumb/Breadcrumb.module.css
|
|
152
|
-
var Breadcrumb_default = {"breadcrumb":"
|
|
152
|
+
var Breadcrumb_default = {"breadcrumb":"bds0117Breadcrumb-breadcrumb","list":"bds0117Breadcrumb-list","item":"bds0117Breadcrumb-item","link":"bds0117Breadcrumb-link","separator":"bds0117Breadcrumb-separator","current":"bds0117Breadcrumb-current"};
|
|
153
153
|
|
|
154
154
|
// src/components/ui/Breadcrumb/Breadcrumb.tsx
|
|
155
155
|
import { cn as cn5 } from "@boostdev/design-system-foundation";
|
|
@@ -165,7 +165,7 @@ function Breadcrumb({ items, className }) {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
// src/components/ui/Collapsible/Collapsible.module.css
|
|
168
|
-
var Collapsible_default = {"collapsible":"
|
|
168
|
+
var Collapsible_default = {"collapsible":"bds0117Collapsible-collapsible","summary":"bds0117Collapsible-summary","summaryContent":"bds0117Collapsible-summaryContent","icon":"bds0117Collapsible-icon","content":"bds0117Collapsible-content"};
|
|
169
169
|
|
|
170
170
|
// src/components/ui/Collapsible/Collapsible.tsx
|
|
171
171
|
import { cn as cn6 } from "@boostdev/design-system-foundation";
|
|
@@ -206,7 +206,7 @@ function Collapsible({
|
|
|
206
206
|
import { useState as useState2, useId as useId2 } from "react";
|
|
207
207
|
|
|
208
208
|
// src/components/ui/Calendar/Calendar.module.css
|
|
209
|
-
var Calendar_default = {"calendar":"
|
|
209
|
+
var Calendar_default = {"calendar":"bds0117Calendar-calendar","header":"bds0117Calendar-header","monthYear":"bds0117Calendar-monthYear","navBtn":"bds0117Calendar-navBtn","grid":"bds0117Calendar-grid","weekday":"bds0117Calendar-weekday","empty":"bds0117Calendar-empty","day":"bds0117Calendar-day","disabled":"bds0117Calendar-disabled","selected":"bds0117Calendar-selected","today":"bds0117Calendar-today"};
|
|
210
210
|
|
|
211
211
|
// src/components/ui/Calendar/Calendar.tsx
|
|
212
212
|
import { cn as cn7 } from "@boostdev/design-system-foundation";
|
|
@@ -372,7 +372,7 @@ function Calendar({ value, defaultValue, min, max, onChange, className }) {
|
|
|
372
372
|
import { useRef, useId as useId3 } from "react";
|
|
373
373
|
|
|
374
374
|
// src/components/ui/Carousel/Carousel.module.css
|
|
375
|
-
var Carousel_default = {"carousel":"
|
|
375
|
+
var Carousel_default = {"carousel":"bds0117Carousel-carousel","track":"bds0117Carousel-track","slide":"bds0117Carousel-slide","navBtn":"bds0117Carousel-navBtn"};
|
|
376
376
|
|
|
377
377
|
// src/components/ui/Carousel/Carousel.tsx
|
|
378
378
|
import { cn as cn8 } from "@boostdev/design-system-foundation";
|
|
@@ -425,7 +425,7 @@ function Carousel({ items, label, className }) {
|
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
// src/components/ui/DescriptionList/DescriptionList.module.css
|
|
428
|
-
var DescriptionList_default = {"list":"
|
|
428
|
+
var DescriptionList_default = {"list":"bds0117DescriptionList-list","group":"bds0117DescriptionList-group","term":"bds0117DescriptionList-term","details":"bds0117DescriptionList-details","--layout_inline":"bds0117DescriptionList---layout_inline"};
|
|
429
429
|
|
|
430
430
|
// src/components/ui/DescriptionList/DescriptionList.tsx
|
|
431
431
|
import { cn as cn9 } from "@boostdev/design-system-foundation";
|
|
@@ -438,7 +438,7 @@ function DescriptionList({ items, layout = "stacked", className }) {
|
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
// src/components/ui/Link/Link.module.css
|
|
441
|
-
var Link_default = {"link":"
|
|
441
|
+
var Link_default = {"link":"bds0117Link-link","--variant_default":"bds0117Link---variant_default","--variant_subtle":"bds0117Link---variant_subtle","--variant_standalone":"bds0117Link---variant_standalone","externalLabel":"bds0117Link-externalLabel"};
|
|
442
442
|
|
|
443
443
|
// src/components/ui/Link/Link.tsx
|
|
444
444
|
import { cn as cn10 } from "@boostdev/design-system-foundation";
|
|
@@ -469,7 +469,7 @@ function Link({
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
// src/components/ui/Loading/Loading.module.css
|
|
472
|
-
var Loading_default = {"loading":"
|
|
472
|
+
var Loading_default = {"loading":"bds0117Loading-loading","spinner":"bds0117Loading-spinner","--size_small":"bds0117Loading---size_small","--size_large":"bds0117Loading---size_large"};
|
|
473
473
|
|
|
474
474
|
// src/components/ui/Loading/Loading.tsx
|
|
475
475
|
import { cn as cn11 } from "@boostdev/design-system-foundation";
|
|
@@ -479,7 +479,7 @@ function Loading({ size = "medium", className }) {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
// src/components/ui/NotificationBanner/NotificationBanner.module.css
|
|
482
|
-
var NotificationBanner_default = {"banner":"
|
|
482
|
+
var NotificationBanner_default = {"banner":"bds0117NotificationBanner-banner","--variant_info":"bds0117NotificationBanner---variant_info","--variant_success":"bds0117NotificationBanner---variant_success","--variant_warning":"bds0117NotificationBanner---variant_warning","--variant_error":"bds0117NotificationBanner---variant_error","content":"bds0117NotificationBanner-content","action":"bds0117NotificationBanner-action","dismiss":"bds0117NotificationBanner-dismiss"};
|
|
483
483
|
|
|
484
484
|
// src/components/ui/NotificationBanner/NotificationBanner.tsx
|
|
485
485
|
import { cn as cn12 } from "@boostdev/design-system-foundation";
|
|
@@ -518,7 +518,7 @@ function NotificationBanner({
|
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
// src/components/ui/Pagination/Pagination.module.css
|
|
521
|
-
var Pagination_default = {"pagination":"
|
|
521
|
+
var Pagination_default = {"pagination":"bds0117Pagination-pagination","list":"bds0117Pagination-list","button":"bds0117Pagination-button","--active":"bds0117Pagination---active","--nav":"bds0117Pagination---nav","ellipsis":"bds0117Pagination-ellipsis"};
|
|
522
522
|
|
|
523
523
|
// src/components/ui/Pagination/Pagination.tsx
|
|
524
524
|
import { cn as cn13 } from "@boostdev/design-system-foundation";
|
|
@@ -582,7 +582,7 @@ function Pagination({
|
|
|
582
582
|
}
|
|
583
583
|
|
|
584
584
|
// src/components/ui/Progress/Progress.module.css
|
|
585
|
-
var Progress_default = {"container":"
|
|
585
|
+
var Progress_default = {"container":"bds0117Progress-container","labelRow":"bds0117Progress-labelRow","value":"bds0117Progress-value","track":"bds0117Progress-track","--size_small":"bds0117Progress---size_small","--size_medium":"bds0117Progress---size_medium","--size_large":"bds0117Progress---size_large","fill":"bds0117Progress-fill"};
|
|
586
586
|
|
|
587
587
|
// src/components/ui/Progress/Progress.tsx
|
|
588
588
|
import { cn as cn14 } from "@boostdev/design-system-foundation";
|
|
@@ -620,7 +620,7 @@ function Progress({
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
// src/components/ui/ProgressCircle/ProgressCircle.module.css
|
|
623
|
-
var ProgressCircle_default = {"wrapper":"
|
|
623
|
+
var ProgressCircle_default = {"wrapper":"bds0117ProgressCircle-wrapper","svg":"bds0117ProgressCircle-svg","track":"bds0117ProgressCircle-track","fill":"bds0117ProgressCircle-fill","value":"bds0117ProgressCircle-value","--size_small":"bds0117ProgressCircle---size_small","--size_medium":"bds0117ProgressCircle---size_medium","--size_large":"bds0117ProgressCircle---size_large"};
|
|
624
624
|
|
|
625
625
|
// src/components/ui/ProgressCircle/ProgressCircle.tsx
|
|
626
626
|
import { cn as cn15 } from "@boostdev/design-system-foundation";
|
|
@@ -699,7 +699,7 @@ function ProgressCircle({
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
// src/components/ui/Separator/Separator.module.css
|
|
702
|
-
var Separator_default = {"separator":"
|
|
702
|
+
var Separator_default = {"separator":"bds0117Separator-separator","--horizontal":"bds0117Separator---horizontal","--vertical":"bds0117Separator---vertical"};
|
|
703
703
|
|
|
704
704
|
// src/components/ui/Separator/Separator.tsx
|
|
705
705
|
import { cn as cn16 } from "@boostdev/design-system-foundation";
|
|
@@ -722,7 +722,7 @@ function Separator({ orientation = "horizontal", className }) {
|
|
|
722
722
|
import { cn as cn17 } from "@boostdev/design-system-foundation";
|
|
723
723
|
|
|
724
724
|
// src/components/ui/Skeleton/Skeleton.module.css
|
|
725
|
-
var Skeleton_default = {"skeleton":"
|
|
725
|
+
var Skeleton_default = {"skeleton":"bds0117Skeleton-skeleton"};
|
|
726
726
|
|
|
727
727
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
728
728
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
@@ -731,7 +731,7 @@ function Skeleton({ className }) {
|
|
|
731
731
|
}
|
|
732
732
|
|
|
733
733
|
// src/components/ui/SkipLink/SkipLink.module.css
|
|
734
|
-
var SkipLink_default = {"skipLink":"
|
|
734
|
+
var SkipLink_default = {"skipLink":"bds0117SkipLink-skipLink"};
|
|
735
735
|
|
|
736
736
|
// src/components/ui/SkipLink/SkipLink.tsx
|
|
737
737
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
@@ -740,7 +740,7 @@ function SkipLink({ href = "#main", children = "Skip to main content" }) {
|
|
|
740
740
|
}
|
|
741
741
|
|
|
742
742
|
// src/components/ui/Table/Table.module.css
|
|
743
|
-
var Table_default = {"wrapper":"
|
|
743
|
+
var Table_default = {"wrapper":"bds0117Table-wrapper","table":"bds0117Table-table","caption":"bds0117Table-caption","thead":"bds0117Table-thead","th":"bds0117Table-th","--sortable":"bds0117Table---sortable","sortButton":"bds0117Table-sortButton","sortIcon":"bds0117Table-sortIcon","--sort-active":"bds0117Table---sort-active","--sort-desc":"bds0117Table---sort-desc","tbody":"bds0117Table-tbody","tr":"bds0117Table-tr","td":"bds0117Table-td"};
|
|
744
744
|
|
|
745
745
|
// src/components/ui/Table/Table.tsx
|
|
746
746
|
import { cn as cn18 } from "@boostdev/design-system-foundation";
|
|
@@ -809,7 +809,7 @@ function Table({
|
|
|
809
809
|
import { useId as useId4, useRef as useRef2, useState as useState3 } from "react";
|
|
810
810
|
|
|
811
811
|
// src/components/ui/Tabs/Tabs.module.css
|
|
812
|
-
var Tabs_default = {"tabs":"
|
|
812
|
+
var Tabs_default = {"tabs":"bds0117Tabs-tabs","tabList":"bds0117Tabs-tabList","tab":"bds0117Tabs-tab","--active":"bds0117Tabs---active","panel":"bds0117Tabs-panel"};
|
|
813
813
|
|
|
814
814
|
// src/components/ui/Tabs/Tabs.tsx
|
|
815
815
|
import { cn as cn19 } from "@boostdev/design-system-foundation";
|
|
@@ -890,7 +890,7 @@ function Tabs({ tabs, defaultTab, className }) {
|
|
|
890
890
|
import { cloneElement, isValidElement, useId as useId5 } from "react";
|
|
891
891
|
|
|
892
892
|
// src/components/ui/Tooltip/Tooltip.module.css
|
|
893
|
-
var Tooltip_default = {"wrapper":"
|
|
893
|
+
var Tooltip_default = {"wrapper":"bds0117Tooltip-wrapper","tooltip":"bds0117Tooltip-tooltip","--placement_top":"bds0117Tooltip---placement_top","--placement_bottom":"bds0117Tooltip---placement_bottom","--placement_left":"bds0117Tooltip---placement_left","--placement_right":"bds0117Tooltip---placement_right"};
|
|
894
894
|
|
|
895
895
|
// src/components/ui/Tooltip/Tooltip.tsx
|
|
896
896
|
import { cn as cn20 } from "@boostdev/design-system-foundation";
|
|
@@ -920,7 +920,7 @@ function Tooltip({
|
|
|
920
920
|
}
|
|
921
921
|
|
|
922
922
|
// src/components/ui/Typography/Typography.module.css
|
|
923
|
-
var Typography_default = {"typography":"
|
|
923
|
+
var Typography_default = {"typography":"bds0117Typography-typography","--h1":"bds0117Typography---h1","--h2":"bds0117Typography---h2","--h3":"bds0117Typography---h3","--body":"bds0117Typography---body","--body_s":"bds0117Typography---body_s"};
|
|
924
924
|
|
|
925
925
|
// src/components/ui/Typography/Typography.tsx
|
|
926
926
|
import { cn as cn21 } from "@boostdev/design-system-foundation";
|
|
@@ -938,7 +938,7 @@ function Typography({ variant = "body", component, children, className }) {
|
|
|
938
938
|
}
|
|
939
939
|
|
|
940
940
|
// src/components/interaction/Button/Button.module.css
|
|
941
|
-
var Button_default = {"button":"
|
|
941
|
+
var Button_default = {"button":"bds0117Button-button","--primary":"bds0117Button---primary","--secondary":"bds0117Button---secondary","--size_small":"bds0117Button---size_small","--size_medium":"bds0117Button---size_medium","--size_large":"bds0117Button---size_large","--hasPulse":"bds0117Button---hasPulse","prefix":"bds0117Button-prefix","suffix":"bds0117Button-suffix"};
|
|
942
942
|
|
|
943
943
|
// src/components/interaction/Button/Button.tsx
|
|
944
944
|
import { cn as cn22 } from "@boostdev/design-system-foundation";
|
|
@@ -1014,7 +1014,7 @@ function Button({
|
|
|
1014
1014
|
import { useState as useState4, useEffect, useRef as useRef3, useId as useId6, useMemo } from "react";
|
|
1015
1015
|
|
|
1016
1016
|
// src/components/interaction/Command/Command.module.css
|
|
1017
|
-
var Command_default = {"dialog":"
|
|
1017
|
+
var Command_default = {"dialog":"bds0117Command-dialog","palette":"bds0117Command-palette","searchRow":"bds0117Command-searchRow","searchIcon":"bds0117Command-searchIcon","search":"bds0117Command-search","escHint":"bds0117Command-escHint","list":"bds0117Command-list","groupList":"bds0117Command-groupList","group":"bds0117Command-group","item":"bds0117Command-item","itemActive":"bds0117Command-itemActive","itemLabel":"bds0117Command-itemLabel","itemDesc":"bds0117Command-itemDesc","shortcut":"bds0117Command-shortcut","empty":"bds0117Command-empty"};
|
|
1018
1018
|
|
|
1019
1019
|
// src/components/interaction/Command/Command.tsx
|
|
1020
1020
|
import { cn as cn23 } from "@boostdev/design-system-foundation";
|
|
@@ -1052,12 +1052,17 @@ function Command({
|
|
|
1052
1052
|
if (!dialog) return;
|
|
1053
1053
|
if (isOpen) {
|
|
1054
1054
|
dialog.showModal();
|
|
1055
|
+
document.body.style.overflow = "hidden";
|
|
1055
1056
|
setQuery("");
|
|
1056
1057
|
setActiveIndex(0);
|
|
1057
1058
|
setTimeout(() => inputRef.current?.focus(), 0);
|
|
1058
1059
|
} else if (dialog.open) {
|
|
1059
1060
|
dialog.close();
|
|
1061
|
+
document.body.style.overflow = "";
|
|
1060
1062
|
}
|
|
1063
|
+
return () => {
|
|
1064
|
+
document.body.style.overflow = "";
|
|
1065
|
+
};
|
|
1061
1066
|
}, [isOpen]);
|
|
1062
1067
|
useEffect(() => {
|
|
1063
1068
|
setActiveIndex(0);
|
|
@@ -1153,7 +1158,7 @@ function Command({
|
|
|
1153
1158
|
import { useEffect as useEffect2, useRef as useRef4 } from "react";
|
|
1154
1159
|
|
|
1155
1160
|
// src/components/interaction/Dialog/Dialog.module.css
|
|
1156
|
-
var Dialog_default = {"dialog":"
|
|
1161
|
+
var Dialog_default = {"dialog":"bds0117Dialog-dialog","dialogContent":"bds0117Dialog-dialogContent","closeForm":"bds0117Dialog-closeForm","closeButton":"bds0117Dialog-closeButton"};
|
|
1157
1162
|
|
|
1158
1163
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
1159
1164
|
import { cn as cn24 } from "@boostdev/design-system-foundation";
|
|
@@ -1209,7 +1214,7 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1209
1214
|
import { useEffect as useEffect3, useRef as useRef5 } from "react";
|
|
1210
1215
|
|
|
1211
1216
|
// src/components/interaction/Drawer/Drawer.module.css
|
|
1212
|
-
var Drawer_default = {"drawer":"
|
|
1217
|
+
var Drawer_default = {"drawer":"bds0117Drawer-drawer","panel":"bds0117Drawer-panel","--side_right":"bds0117Drawer---side_right","--side_left":"bds0117Drawer---side_left","header":"bds0117Drawer-header","closeButton":"bds0117Drawer-closeButton","body":"bds0117Drawer-body"};
|
|
1213
1218
|
|
|
1214
1219
|
// src/components/interaction/Drawer/Drawer.tsx
|
|
1215
1220
|
import { cn as cn25 } from "@boostdev/design-system-foundation";
|
|
@@ -1229,9 +1234,14 @@ function Drawer({
|
|
|
1229
1234
|
if (!dialog) return;
|
|
1230
1235
|
if (isOpen) {
|
|
1231
1236
|
dialog.showModal();
|
|
1237
|
+
document.body.style.overflow = "hidden";
|
|
1232
1238
|
} else if (dialog.open) {
|
|
1233
1239
|
dialog.close();
|
|
1240
|
+
document.body.style.overflow = "";
|
|
1234
1241
|
}
|
|
1242
|
+
return () => {
|
|
1243
|
+
document.body.style.overflow = "";
|
|
1244
|
+
};
|
|
1235
1245
|
}, [isOpen]);
|
|
1236
1246
|
const handleClick = (e) => {
|
|
1237
1247
|
if (e.target === dialogRef.current) onClose();
|
|
@@ -1279,7 +1289,7 @@ import {
|
|
|
1279
1289
|
} from "react";
|
|
1280
1290
|
|
|
1281
1291
|
// src/components/interaction/DropdownMenu/DropdownMenu.module.css
|
|
1282
|
-
var DropdownMenu_default = {"wrapper":"
|
|
1292
|
+
var DropdownMenu_default = {"wrapper":"bds0117DropdownMenu-wrapper","menu":"bds0117DropdownMenu-menu","--placement_bottom-start":"bds0117DropdownMenu---placement_bottom-start","--placement_bottom-end":"bds0117DropdownMenu---placement_bottom-end","separator":"bds0117DropdownMenu-separator","item":"bds0117DropdownMenu-item","icon":"bds0117DropdownMenu-icon"};
|
|
1283
1293
|
|
|
1284
1294
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
1285
1295
|
import { cn as cn26 } from "@boostdev/design-system-foundation";
|
|
@@ -1399,7 +1409,7 @@ import {
|
|
|
1399
1409
|
} from "react";
|
|
1400
1410
|
|
|
1401
1411
|
// src/components/interaction/Popover/Popover.module.css
|
|
1402
|
-
var Popover_default = {"wrapper":"
|
|
1412
|
+
var Popover_default = {"wrapper":"bds0117Popover-wrapper","panel":"bds0117Popover-panel","--placement_bottom":"bds0117Popover---placement_bottom","--placement_top":"bds0117Popover---placement_top","--placement_right":"bds0117Popover---placement_right","--placement_left":"bds0117Popover---placement_left"};
|
|
1403
1413
|
|
|
1404
1414
|
// src/components/interaction/Popover/Popover.tsx
|
|
1405
1415
|
import { cn as cn27 } from "@boostdev/design-system-foundation";
|
|
@@ -1455,7 +1465,7 @@ function Popover({
|
|
|
1455
1465
|
}
|
|
1456
1466
|
|
|
1457
1467
|
// src/components/interaction/Rating/Rating.module.css
|
|
1458
|
-
var Rating_default = {"rating":"
|
|
1468
|
+
var Rating_default = {"rating":"bds0117Rating-rating","star":"bds0117Rating-star","--filled":"bds0117Rating---filled"};
|
|
1459
1469
|
|
|
1460
1470
|
// src/components/interaction/Rating/Rating.tsx
|
|
1461
1471
|
import { cn as cn28 } from "@boostdev/design-system-foundation";
|
|
@@ -1486,7 +1496,7 @@ function Rating({ value, max = 5, className }) {
|
|
|
1486
1496
|
import { useState as useState7, useEffect as useEffect6, createContext, useContext, useCallback, useMemo as useMemo2 } from "react";
|
|
1487
1497
|
|
|
1488
1498
|
// src/components/interaction/Toast/Toast.module.css
|
|
1489
|
-
var Toast_default = {"toastContainer":"
|
|
1499
|
+
var Toast_default = {"toastContainer":"bds0117Toast-toastContainer","toast":"bds0117Toast-toast","--variant_success":"bds0117Toast---variant_success","--variant_warning":"bds0117Toast---variant_warning","--variant_info":"bds0117Toast---variant_info","--variant_error":"bds0117Toast---variant_error","message":"bds0117Toast-message","closeButton":"bds0117Toast-closeButton"};
|
|
1490
1500
|
|
|
1491
1501
|
// src/components/interaction/Toast/Toast.tsx
|
|
1492
1502
|
import { cn as cn29 } from "@boostdev/design-system-foundation";
|
|
@@ -1536,10 +1546,10 @@ function useToast() {
|
|
|
1536
1546
|
import { useId as useId9 } from "react";
|
|
1537
1547
|
|
|
1538
1548
|
// src/components/interaction/form/Checkbox/Checkbox.module.css
|
|
1539
|
-
var Checkbox_default = {"checkboxGroup":"
|
|
1549
|
+
var Checkbox_default = {"checkboxGroup":"bds0117Checkbox-checkboxGroup","inputWrapper":"bds0117Checkbox-inputWrapper","checkbox":"bds0117Checkbox-checkbox","checkboxError":"bds0117Checkbox-checkboxError"};
|
|
1540
1550
|
|
|
1541
1551
|
// src/components/interaction/form/atoms/Message.module.css
|
|
1542
|
-
var Message_default = {"error":"
|
|
1552
|
+
var Message_default = {"error":"bds0117Message-error","hint":"bds0117Message-hint"};
|
|
1543
1553
|
|
|
1544
1554
|
// src/components/interaction/form/atoms/Message.tsx
|
|
1545
1555
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
@@ -1549,7 +1559,7 @@ var Message = ({ message, type, inputId }) => {
|
|
|
1549
1559
|
};
|
|
1550
1560
|
|
|
1551
1561
|
// src/components/interaction/form/atoms/Label.module.css
|
|
1552
|
-
var Label_default = {"label":"
|
|
1562
|
+
var Label_default = {"label":"bds0117Label-label"};
|
|
1553
1563
|
|
|
1554
1564
|
// src/components/interaction/form/atoms/Label.tsx
|
|
1555
1565
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
@@ -1561,7 +1571,7 @@ var Label = ({ label, id }) => {
|
|
|
1561
1571
|
import { cn as cn31 } from "@boostdev/design-system-foundation";
|
|
1562
1572
|
|
|
1563
1573
|
// src/components/interaction/form/atoms/InputContainer.module.css
|
|
1564
|
-
var InputContainer_default = {"container":"
|
|
1574
|
+
var InputContainer_default = {"container":"bds0117InputContainer-container"};
|
|
1565
1575
|
|
|
1566
1576
|
// src/components/interaction/form/atoms/InputContainer.tsx
|
|
1567
1577
|
import { cn as cn30 } from "@boostdev/design-system-foundation";
|
|
@@ -1608,7 +1618,7 @@ import {
|
|
|
1608
1618
|
} from "react";
|
|
1609
1619
|
|
|
1610
1620
|
// src/components/interaction/form/Combobox/Combobox.module.css
|
|
1611
|
-
var Combobox_default = {"formGroup":"
|
|
1621
|
+
var Combobox_default = {"formGroup":"bds0117Combobox-formGroup","inputWrapper":"bds0117Combobox-inputWrapper","input":"bds0117Combobox-input","inputError":"bds0117Combobox-inputError","chevron":"bds0117Combobox-chevron","listbox":"bds0117Combobox-listbox","option":"bds0117Combobox-option","--highlighted":"bds0117Combobox---highlighted","--selected":"bds0117Combobox---selected","--disabled":"bds0117Combobox---disabled"};
|
|
1612
1622
|
|
|
1613
1623
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
1614
1624
|
import { cn as cn32 } from "@boostdev/design-system-foundation";
|
|
@@ -1759,7 +1769,7 @@ function Combobox({
|
|
|
1759
1769
|
import { useId as useId11, useRef as useRef9, useState as useState9 } from "react";
|
|
1760
1770
|
|
|
1761
1771
|
// src/components/interaction/form/FileInput/FileInput.module.css
|
|
1762
|
-
var FileInput_default = {"formGroup":"
|
|
1772
|
+
var FileInput_default = {"formGroup":"bds0117FileInput-formGroup","dropZone":"bds0117FileInput-dropZone","isDragging":"bds0117FileInput-isDragging","hasError":"bds0117FileInput-hasError","isDisabled":"bds0117FileInput-isDisabled","icon":"bds0117FileInput-icon","prompt":"bds0117FileInput-prompt","acceptHint":"bds0117FileInput-acceptHint","hiddenInput":"bds0117FileInput-hiddenInput"};
|
|
1763
1773
|
|
|
1764
1774
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
1765
1775
|
import { cn as cn33 } from "@boostdev/design-system-foundation";
|
|
@@ -1856,7 +1866,7 @@ function FileInput({
|
|
|
1856
1866
|
import { useId as useId12 } from "react";
|
|
1857
1867
|
|
|
1858
1868
|
// src/components/interaction/form/FormInput/FormInput.module.css
|
|
1859
|
-
var FormInput_default = {"formGroup":"
|
|
1869
|
+
var FormInput_default = {"formGroup":"bds0117FormInput-formGroup","input":"bds0117FormInput-input","inputError":"bds0117FormInput-inputError"};
|
|
1860
1870
|
|
|
1861
1871
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
1862
1872
|
import { cn as cn34 } from "@boostdev/design-system-foundation";
|
|
@@ -1897,7 +1907,7 @@ function FormInput({
|
|
|
1897
1907
|
import { useId as useId13, useRef as useRef10, useState as useState10 } from "react";
|
|
1898
1908
|
|
|
1899
1909
|
// src/components/interaction/form/NumberInput/NumberInput.module.css
|
|
1900
|
-
var NumberInput_default = {"formGroup":"
|
|
1910
|
+
var NumberInput_default = {"formGroup":"bds0117NumberInput-formGroup","inputRow":"bds0117NumberInput-inputRow","input":"bds0117NumberInput-input","inputError":"bds0117NumberInput-inputError","stepper":"bds0117NumberInput-stepper"};
|
|
1901
1911
|
|
|
1902
1912
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
1903
1913
|
import { cn as cn35 } from "@boostdev/design-system-foundation";
|
|
@@ -1992,7 +2002,7 @@ function NumberInput({
|
|
|
1992
2002
|
import { useId as useId14 } from "react";
|
|
1993
2003
|
|
|
1994
2004
|
// src/components/interaction/form/Radio/Radio.module.css
|
|
1995
|
-
var Radio_default = {"radioGroup":"
|
|
2005
|
+
var Radio_default = {"radioGroup":"bds0117Radio-radioGroup","inputWrapper":"bds0117Radio-inputWrapper","textWrapper":"bds0117Radio-textWrapper","description":"bds0117Radio-description","radio":"bds0117Radio-radio","radioError":"bds0117Radio-radioError"};
|
|
1996
2006
|
|
|
1997
2007
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
1998
2008
|
import { cn as cn36 } from "@boostdev/design-system-foundation";
|
|
@@ -2026,15 +2036,90 @@ function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
|
2026
2036
|
] });
|
|
2027
2037
|
}
|
|
2028
2038
|
|
|
2039
|
+
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2040
|
+
import { useId as useId15, useState as useState11 } from "react";
|
|
2041
|
+
|
|
2042
|
+
// src/components/interaction/form/SegmentedControl/SegmentedControl.module.css
|
|
2043
|
+
var SegmentedControl_default = {"control":"bds0117SegmentedControl-control","thumb":"bds0117SegmentedControl-thumb","item":"bds0117SegmentedControl-item","--disabled":"bds0117SegmentedControl---disabled","radio":"bds0117SegmentedControl-radio","label":"bds0117SegmentedControl-label","--size_small":"bds0117SegmentedControl---size_small","--size_large":"bds0117SegmentedControl---size_large","--active":"bds0117SegmentedControl---active"};
|
|
2044
|
+
|
|
2045
|
+
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2046
|
+
import { cn as cn37 } from "@boostdev/design-system-foundation";
|
|
2047
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2048
|
+
function SegmentedControl({
|
|
2049
|
+
name,
|
|
2050
|
+
options,
|
|
2051
|
+
value,
|
|
2052
|
+
defaultValue,
|
|
2053
|
+
onChange,
|
|
2054
|
+
disabled,
|
|
2055
|
+
size = "medium",
|
|
2056
|
+
className,
|
|
2057
|
+
...rest
|
|
2058
|
+
}) {
|
|
2059
|
+
const baseId = name + useId15();
|
|
2060
|
+
const [internalValue, setInternalValue] = useState11(
|
|
2061
|
+
defaultValue ?? options[0]?.value ?? ""
|
|
2062
|
+
);
|
|
2063
|
+
const activeValue = value ?? internalValue;
|
|
2064
|
+
const selectedIndex = options.findIndex((o) => o.value === activeValue);
|
|
2065
|
+
const handleChange = (optionValue) => {
|
|
2066
|
+
if (value === void 0) setInternalValue(optionValue);
|
|
2067
|
+
onChange?.(optionValue);
|
|
2068
|
+
};
|
|
2069
|
+
return /* @__PURE__ */ jsxs29(
|
|
2070
|
+
"div",
|
|
2071
|
+
{
|
|
2072
|
+
className: cn37(SegmentedControl_default.control, SegmentedControl_default[`--size_${size}`], className),
|
|
2073
|
+
style: {
|
|
2074
|
+
"--control_count": options.length,
|
|
2075
|
+
"--control_selected-index": Math.max(0, selectedIndex)
|
|
2076
|
+
},
|
|
2077
|
+
children: [
|
|
2078
|
+
/* @__PURE__ */ jsx40("span", { className: SegmentedControl_default.thumb, "aria-hidden": "true" }),
|
|
2079
|
+
options.map((option, index) => {
|
|
2080
|
+
const id = `${baseId}-${index}`;
|
|
2081
|
+
const isChecked = option.value === activeValue;
|
|
2082
|
+
const isDisabled = disabled || option.disabled;
|
|
2083
|
+
return /* @__PURE__ */ jsxs29(
|
|
2084
|
+
"label",
|
|
2085
|
+
{
|
|
2086
|
+
htmlFor: id,
|
|
2087
|
+
className: cn37(SegmentedControl_default.item, isChecked && SegmentedControl_default["--active"], isDisabled && SegmentedControl_default["--disabled"]),
|
|
2088
|
+
children: [
|
|
2089
|
+
/* @__PURE__ */ jsx40(
|
|
2090
|
+
"input",
|
|
2091
|
+
{
|
|
2092
|
+
...rest,
|
|
2093
|
+
type: "radio",
|
|
2094
|
+
id,
|
|
2095
|
+
name,
|
|
2096
|
+
value: option.value,
|
|
2097
|
+
checked: isChecked,
|
|
2098
|
+
disabled: isDisabled,
|
|
2099
|
+
className: SegmentedControl_default.radio,
|
|
2100
|
+
onChange: () => handleChange(option.value)
|
|
2101
|
+
}
|
|
2102
|
+
),
|
|
2103
|
+
/* @__PURE__ */ jsx40("span", { className: SegmentedControl_default.label, children: option.label })
|
|
2104
|
+
]
|
|
2105
|
+
},
|
|
2106
|
+
option.value
|
|
2107
|
+
);
|
|
2108
|
+
})
|
|
2109
|
+
]
|
|
2110
|
+
}
|
|
2111
|
+
);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2029
2114
|
// src/components/interaction/form/Select/Select.tsx
|
|
2030
|
-
import { useId as
|
|
2115
|
+
import { useId as useId16 } from "react";
|
|
2031
2116
|
|
|
2032
2117
|
// src/components/interaction/form/Select/Select.module.css
|
|
2033
|
-
var Select_default = {"formGroup":"
|
|
2118
|
+
var Select_default = {"formGroup":"bds0117Select-formGroup","selectWrapper":"bds0117Select-selectWrapper","select":"bds0117Select-select","selectError":"bds0117Select-selectError","chevron":"bds0117Select-chevron"};
|
|
2034
2119
|
|
|
2035
2120
|
// src/components/interaction/form/Select/Select.tsx
|
|
2036
|
-
import { cn as
|
|
2037
|
-
import { jsx as
|
|
2121
|
+
import { cn as cn38 } from "@boostdev/design-system-foundation";
|
|
2122
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2038
2123
|
function Select({
|
|
2039
2124
|
label,
|
|
2040
2125
|
name,
|
|
@@ -2045,44 +2130,44 @@ function Select({
|
|
|
2045
2130
|
className,
|
|
2046
2131
|
...props
|
|
2047
2132
|
}) {
|
|
2048
|
-
const id = name +
|
|
2133
|
+
const id = name + useId16();
|
|
2049
2134
|
const hintId = id + "hint";
|
|
2050
2135
|
const errorId = id + "error";
|
|
2051
2136
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2052
|
-
return /* @__PURE__ */
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2137
|
+
return /* @__PURE__ */ jsxs30(InputContainer, { className: cn38(Select_default.formGroup, className), children: [
|
|
2138
|
+
/* @__PURE__ */ jsx41(Label, { id, label }),
|
|
2139
|
+
/* @__PURE__ */ jsxs30("div", { className: Select_default.selectWrapper, children: [
|
|
2140
|
+
/* @__PURE__ */ jsxs30(
|
|
2056
2141
|
"select",
|
|
2057
2142
|
{
|
|
2058
2143
|
id,
|
|
2059
2144
|
name,
|
|
2060
2145
|
"aria-invalid": !!error,
|
|
2061
2146
|
"aria-describedby": describedBy,
|
|
2062
|
-
className:
|
|
2147
|
+
className: cn38(Select_default.select, error ? Select_default.selectError : void 0),
|
|
2063
2148
|
...props,
|
|
2064
2149
|
children: [
|
|
2065
|
-
placeholder && /* @__PURE__ */
|
|
2066
|
-
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */
|
|
2150
|
+
placeholder && /* @__PURE__ */ jsx41("option", { value: "", disabled: true, hidden: true, children: placeholder }),
|
|
2151
|
+
options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ jsx41("option", { value, disabled, children: optLabel }, value))
|
|
2067
2152
|
]
|
|
2068
2153
|
}
|
|
2069
2154
|
),
|
|
2070
|
-
/* @__PURE__ */
|
|
2155
|
+
/* @__PURE__ */ jsx41("span", { className: Select_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx41("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx41("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) })
|
|
2071
2156
|
] }),
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx41(Message, { inputId: id, type: "error", message: error }),
|
|
2158
|
+
/* @__PURE__ */ jsx41(Message, { inputId: id, type: "hint", message: hint })
|
|
2074
2159
|
] });
|
|
2075
2160
|
}
|
|
2076
2161
|
|
|
2077
2162
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2078
|
-
import { useId as
|
|
2163
|
+
import { useId as useId17, useState as useState12 } from "react";
|
|
2079
2164
|
|
|
2080
2165
|
// src/components/interaction/form/Slider/Slider.module.css
|
|
2081
|
-
var Slider_default = {"formGroup":"
|
|
2166
|
+
var Slider_default = {"formGroup":"bds0117Slider-formGroup","labelRow":"bds0117Slider-labelRow","value":"bds0117Slider-value","slider":"bds0117Slider-slider","sliderError":"bds0117Slider-sliderError"};
|
|
2082
2167
|
|
|
2083
2168
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2084
|
-
import { cn as
|
|
2085
|
-
import { jsx as
|
|
2169
|
+
import { cn as cn39 } from "@boostdev/design-system-foundation";
|
|
2170
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2086
2171
|
function Slider({
|
|
2087
2172
|
label,
|
|
2088
2173
|
name,
|
|
@@ -2095,24 +2180,24 @@ function Slider({
|
|
|
2095
2180
|
onChange,
|
|
2096
2181
|
...props
|
|
2097
2182
|
}) {
|
|
2098
|
-
const id = name +
|
|
2183
|
+
const id = name + useId17();
|
|
2099
2184
|
const hintId = id + "hint";
|
|
2100
2185
|
const errorId = id + "error";
|
|
2101
2186
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2102
2187
|
const isControlled = props.value !== void 0;
|
|
2103
|
-
const [internalValue, setInternalValue] =
|
|
2188
|
+
const [internalValue, setInternalValue] = useState12(Number(props.defaultValue ?? min));
|
|
2104
2189
|
const currentValue = isControlled ? Number(props.value) : internalValue;
|
|
2105
2190
|
const fillPct = (currentValue - min) / (max - min) * 100;
|
|
2106
2191
|
const handleChange = (e) => {
|
|
2107
2192
|
if (!isControlled) setInternalValue(Number(e.target.value));
|
|
2108
2193
|
onChange?.(e);
|
|
2109
2194
|
};
|
|
2110
|
-
return /* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
showValue && /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ jsxs31(InputContainer, { className: cn39(Slider_default.formGroup, className), children: [
|
|
2196
|
+
/* @__PURE__ */ jsxs31("div", { className: Slider_default.labelRow, children: [
|
|
2197
|
+
/* @__PURE__ */ jsx42(Label, { id, label }),
|
|
2198
|
+
showValue && /* @__PURE__ */ jsx42("span", { className: Slider_default.value, children: currentValue })
|
|
2114
2199
|
] }),
|
|
2115
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ jsx42(
|
|
2116
2201
|
"input",
|
|
2117
2202
|
{
|
|
2118
2203
|
type: "range",
|
|
@@ -2124,26 +2209,26 @@ function Slider({
|
|
|
2124
2209
|
"aria-valuemin": min,
|
|
2125
2210
|
"aria-valuemax": max,
|
|
2126
2211
|
"aria-valuenow": currentValue,
|
|
2127
|
-
className:
|
|
2212
|
+
className: cn39(Slider_default.slider, error ? Slider_default.sliderError : void 0),
|
|
2128
2213
|
style: { "--slider_fill": `${fillPct}%` },
|
|
2129
2214
|
onChange: handleChange,
|
|
2130
2215
|
...props
|
|
2131
2216
|
}
|
|
2132
2217
|
),
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ jsx42(Message, { inputId: id, type: "error", message: error }),
|
|
2219
|
+
/* @__PURE__ */ jsx42(Message, { inputId: id, type: "hint", message: hint })
|
|
2135
2220
|
] });
|
|
2136
2221
|
}
|
|
2137
2222
|
|
|
2138
2223
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2139
|
-
import { useId as
|
|
2224
|
+
import { useId as useId18 } from "react";
|
|
2140
2225
|
|
|
2141
2226
|
// src/components/interaction/form/Switch/Switch.module.css
|
|
2142
|
-
var Switch_default = {"switchGroup":"
|
|
2227
|
+
var Switch_default = {"switchGroup":"bds0117Switch-switchGroup","--size_small":"bds0117Switch---size_small","--size_medium":"bds0117Switch---size_medium","--size_large":"bds0117Switch---size_large","inputWrapper":"bds0117Switch-inputWrapper","trackWrapper":"bds0117Switch-trackWrapper","switch":"bds0117Switch-switch","track":"bds0117Switch-track","thumb":"bds0117Switch-thumb","switchError":"bds0117Switch-switchError"};
|
|
2143
2228
|
|
|
2144
2229
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2145
|
-
import { cn as
|
|
2146
|
-
import { jsx as
|
|
2230
|
+
import { cn as cn40 } from "@boostdev/design-system-foundation";
|
|
2231
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2147
2232
|
function Switch({
|
|
2148
2233
|
label,
|
|
2149
2234
|
name,
|
|
@@ -2151,16 +2236,18 @@ function Switch({
|
|
|
2151
2236
|
error,
|
|
2152
2237
|
hint,
|
|
2153
2238
|
className,
|
|
2239
|
+
prefix,
|
|
2154
2240
|
...props
|
|
2155
2241
|
}) {
|
|
2156
|
-
const id = name +
|
|
2242
|
+
const id = name + useId18();
|
|
2157
2243
|
const hintId = id + "hint";
|
|
2158
2244
|
const errorId = id + "error";
|
|
2159
2245
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2160
|
-
return /* @__PURE__ */
|
|
2161
|
-
/* @__PURE__ */
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
|
|
2246
|
+
return /* @__PURE__ */ jsxs32(InputContainer, { className: cn40(Switch_default.switchGroup, Switch_default[`--size_${size}`], className), children: [
|
|
2247
|
+
/* @__PURE__ */ jsxs32("div", { className: Switch_default.inputWrapper, children: [
|
|
2248
|
+
prefix && /* @__PURE__ */ jsx43(Label, { id, label: prefix }),
|
|
2249
|
+
/* @__PURE__ */ jsxs32("div", { className: Switch_default.trackWrapper, children: [
|
|
2250
|
+
/* @__PURE__ */ jsx43(
|
|
2164
2251
|
"input",
|
|
2165
2252
|
{
|
|
2166
2253
|
type: "checkbox",
|
|
@@ -2168,28 +2255,28 @@ function Switch({
|
|
|
2168
2255
|
id,
|
|
2169
2256
|
name,
|
|
2170
2257
|
"aria-describedby": describedBy,
|
|
2171
|
-
className:
|
|
2258
|
+
className: cn40(Switch_default.switch, error ? Switch_default.switchError : void 0),
|
|
2172
2259
|
...props
|
|
2173
2260
|
}
|
|
2174
2261
|
),
|
|
2175
|
-
/* @__PURE__ */
|
|
2262
|
+
/* @__PURE__ */ jsx43("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ jsx43("span", { className: Switch_default.thumb }) })
|
|
2176
2263
|
] }),
|
|
2177
|
-
/* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ jsx43(Label, { id, label })
|
|
2178
2265
|
] }),
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx43(Message, { inputId: id, type: "error", message: error }),
|
|
2267
|
+
/* @__PURE__ */ jsx43(Message, { inputId: id, type: "hint", message: hint })
|
|
2181
2268
|
] });
|
|
2182
2269
|
}
|
|
2183
2270
|
|
|
2184
2271
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2185
|
-
import { useId as
|
|
2272
|
+
import { useId as useId19 } from "react";
|
|
2186
2273
|
|
|
2187
2274
|
// src/components/interaction/form/Textarea/Textarea.module.css
|
|
2188
|
-
var Textarea_default = {"formGroup":"
|
|
2275
|
+
var Textarea_default = {"formGroup":"bds0117Textarea-formGroup","textarea":"bds0117Textarea-textarea","textareaError":"bds0117Textarea-textareaError"};
|
|
2189
2276
|
|
|
2190
2277
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2191
|
-
import { cn as
|
|
2192
|
-
import { jsx as
|
|
2278
|
+
import { cn as cn41 } from "@boostdev/design-system-foundation";
|
|
2279
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2193
2280
|
function Textarea({
|
|
2194
2281
|
label,
|
|
2195
2282
|
name,
|
|
@@ -2198,44 +2285,44 @@ function Textarea({
|
|
|
2198
2285
|
className,
|
|
2199
2286
|
...props
|
|
2200
2287
|
}) {
|
|
2201
|
-
const id = name +
|
|
2288
|
+
const id = name + useId19();
|
|
2202
2289
|
const hintId = id + "hint";
|
|
2203
2290
|
const errorId = id + "error";
|
|
2204
2291
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2205
|
-
return /* @__PURE__ */
|
|
2206
|
-
/* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsxs33(InputContainer, { className: cn41(Textarea_default.formGroup, className), children: [
|
|
2293
|
+
/* @__PURE__ */ jsx44(Label, { id, label }),
|
|
2294
|
+
/* @__PURE__ */ jsx44(
|
|
2208
2295
|
"textarea",
|
|
2209
2296
|
{
|
|
2210
2297
|
id,
|
|
2211
2298
|
name,
|
|
2212
2299
|
"aria-invalid": !!error,
|
|
2213
2300
|
"aria-describedby": describedBy,
|
|
2214
|
-
className:
|
|
2301
|
+
className: cn41(Textarea_default.textarea, error ? Textarea_default.textareaError : void 0),
|
|
2215
2302
|
...props
|
|
2216
2303
|
}
|
|
2217
2304
|
),
|
|
2218
|
-
/* @__PURE__ */
|
|
2219
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ jsx44(Message, { inputId: id, type: "error", message: error }),
|
|
2306
|
+
/* @__PURE__ */ jsx44(Message, { inputId: id, type: "hint", message: hint })
|
|
2220
2307
|
] });
|
|
2221
2308
|
}
|
|
2222
2309
|
|
|
2223
2310
|
// src/components/layout/ButtonGroup/ButtonGroup.module.css
|
|
2224
|
-
var ButtonGroup_default = {"buttonGroup":"
|
|
2311
|
+
var ButtonGroup_default = {"buttonGroup":"bds0117ButtonGroup-buttonGroup","container":"bds0117ButtonGroup-container","--variant_card":"bds0117ButtonGroup---variant_card","--variant_flow":"bds0117ButtonGroup---variant_flow","--variant_modal":"bds0117ButtonGroup---variant_modal","--variant_content":"bds0117ButtonGroup---variant_content","--variant_grid":"bds0117ButtonGroup---variant_grid"};
|
|
2225
2312
|
|
|
2226
2313
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2227
|
-
import { cn as
|
|
2228
|
-
import { jsx as
|
|
2314
|
+
import { cn as cn42 } from "@boostdev/design-system-foundation";
|
|
2315
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2229
2316
|
function ButtonGroup({ children, className, variant }) {
|
|
2230
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ jsx45("div", { className: cn42(ButtonGroup_default.buttonGroup, className, variant && ButtonGroup_default[`--variant_${variant}`]), children: /* @__PURE__ */ jsx45("div", { className: ButtonGroup_default.container, children }) });
|
|
2231
2318
|
}
|
|
2232
2319
|
|
|
2233
2320
|
// src/components/layout/Card/Card.module.css
|
|
2234
|
-
var Card_default = {"card":"
|
|
2321
|
+
var Card_default = {"card":"bds0117Card-card","--default":"bds0117Card---default","--elevated":"bds0117Card---elevated","--outlined":"bds0117Card---outlined","--clickable":"bds0117Card---clickable","--padding-none":"bds0117Card---padding-none","--padding-small":"bds0117Card---padding-small","--padding-medium":"bds0117Card---padding-medium","--padding-large":"bds0117Card---padding-large","--text-start":"bds0117Card---text-start","--text-center":"bds0117Card---text-center","--text-end":"bds0117Card---text-end"};
|
|
2235
2322
|
|
|
2236
2323
|
// src/components/layout/Card/Card.tsx
|
|
2237
|
-
import { cn as
|
|
2238
|
-
import { jsx as
|
|
2324
|
+
import { cn as cn43 } from "@boostdev/design-system-foundation";
|
|
2325
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2239
2326
|
function Card({
|
|
2240
2327
|
children,
|
|
2241
2328
|
className,
|
|
@@ -2246,7 +2333,7 @@ function Card({
|
|
|
2246
2333
|
onClick,
|
|
2247
2334
|
"aria-label": ariaLabel
|
|
2248
2335
|
}) {
|
|
2249
|
-
const classNames =
|
|
2336
|
+
const classNames = cn43(
|
|
2250
2337
|
Card_default.card,
|
|
2251
2338
|
Card_default[`--${variant}`],
|
|
2252
2339
|
Card_default[`--padding-${padding}`],
|
|
@@ -2255,7 +2342,7 @@ function Card({
|
|
|
2255
2342
|
className
|
|
2256
2343
|
);
|
|
2257
2344
|
const Component = onClick ? "button" : "div";
|
|
2258
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ jsx46(
|
|
2259
2346
|
Component,
|
|
2260
2347
|
{
|
|
2261
2348
|
className: classNames,
|
|
@@ -2269,11 +2356,11 @@ function Card({
|
|
|
2269
2356
|
}
|
|
2270
2357
|
|
|
2271
2358
|
// src/components/layout/SectionHeader/SectionHeader.module.css
|
|
2272
|
-
var SectionHeader_default = {"sectionHeader":"
|
|
2359
|
+
var SectionHeader_default = {"sectionHeader":"bds0117SectionHeader-sectionHeader","title":"bds0117SectionHeader-title","subtitle":"bds0117SectionHeader-subtitle","--start":"bds0117SectionHeader---start","--center":"bds0117SectionHeader---center","--end":"bds0117SectionHeader---end","--small":"bds0117SectionHeader---small","--medium":"bds0117SectionHeader---medium","--large":"bds0117SectionHeader---large"};
|
|
2273
2360
|
|
|
2274
2361
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2275
|
-
import { cn as
|
|
2276
|
-
import { jsx as
|
|
2362
|
+
import { cn as cn44 } from "@boostdev/design-system-foundation";
|
|
2363
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2277
2364
|
function SectionHeader({
|
|
2278
2365
|
title,
|
|
2279
2366
|
subtitle,
|
|
@@ -2283,24 +2370,24 @@ function SectionHeader({
|
|
|
2283
2370
|
titleAs = "h2"
|
|
2284
2371
|
}) {
|
|
2285
2372
|
const Title = titleAs;
|
|
2286
|
-
return /* @__PURE__ */
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
subtitle && /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ jsxs34("header", { className: cn44(SectionHeader_default.sectionHeader, SectionHeader_default[`--${alignment}`], SectionHeader_default[`--${size}`], className), children: [
|
|
2374
|
+
/* @__PURE__ */ jsx47(Title, { className: SectionHeader_default.title, children: title }),
|
|
2375
|
+
subtitle && /* @__PURE__ */ jsx47("p", { className: SectionHeader_default.subtitle, children: subtitle })
|
|
2289
2376
|
] });
|
|
2290
2377
|
}
|
|
2291
2378
|
|
|
2292
2379
|
// src/components/layout/IconWrapper/IconWrapper.module.css
|
|
2293
|
-
var IconWrapper_default = {"wrapper":"
|
|
2380
|
+
var IconWrapper_default = {"wrapper":"bds0117IconWrapper-wrapper"};
|
|
2294
2381
|
|
|
2295
2382
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2296
|
-
import { cn as
|
|
2297
|
-
import { jsx as
|
|
2383
|
+
import { cn as cn45 } from "@boostdev/design-system-foundation";
|
|
2384
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2298
2385
|
function IconWrapper({ children, className }) {
|
|
2299
|
-
return /* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ jsx48("div", { className: cn45(className, IconWrapper_default.wrapper), children });
|
|
2300
2387
|
}
|
|
2301
2388
|
|
|
2302
2389
|
// src/index.ts
|
|
2303
|
-
import { cn as
|
|
2390
|
+
import { cn as cn46 } from "@boostdev/design-system-foundation";
|
|
2304
2391
|
export {
|
|
2305
2392
|
Accordion,
|
|
2306
2393
|
Alert,
|
|
@@ -2334,6 +2421,7 @@ export {
|
|
|
2334
2421
|
Radio,
|
|
2335
2422
|
Rating,
|
|
2336
2423
|
SectionHeader,
|
|
2424
|
+
SegmentedControl,
|
|
2337
2425
|
Select,
|
|
2338
2426
|
Separator,
|
|
2339
2427
|
Skeleton,
|
|
@@ -2346,6 +2434,6 @@ export {
|
|
|
2346
2434
|
ToastProvider,
|
|
2347
2435
|
Tooltip,
|
|
2348
2436
|
Typography,
|
|
2349
|
-
|
|
2437
|
+
cn46 as cn,
|
|
2350
2438
|
useToast
|
|
2351
2439
|
};
|