@boostdev/design-system-components 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.cjs +49 -47
- package/dist/client.css +431 -435
- package/dist/client.d.cts +3 -2
- package/dist/client.d.ts +3 -2
- package/dist/client.js +49 -47
- package/dist/index.cjs +49 -47
- package/dist/index.css +431 -435
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +49 -47
- package/package.json +1 -1
- package/src/components/interaction/form/Switch/Switch.mdx +7 -2
- package/src/components/interaction/form/Switch/Switch.module.css +6 -6
- package/src/components/interaction/form/Switch/Switch.spec.tsx +23 -0
- package/src/components/interaction/form/Switch/Switch.stories.tsx +8 -0
- package/src/components/interaction/form/Switch/Switch.tsx +5 -2
- package/src/components/interaction/form/atoms/Label.module.css +0 -1
- package/src/components/ui/Progress/Progress.module.css +0 -4
package/dist/index.d.cts
CHANGED
|
@@ -419,15 +419,16 @@ interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'
|
|
|
419
419
|
}
|
|
420
420
|
declare function Slider({ label, name, min, max, showValue, error, hint, className, onChange, ...props }: Readonly<SliderProps>): react_jsx_runtime.JSX.Element;
|
|
421
421
|
|
|
422
|
-
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
422
|
+
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'prefix'> {
|
|
423
423
|
label: string;
|
|
424
424
|
name: string;
|
|
425
425
|
size?: 'small' | 'medium' | 'large';
|
|
426
426
|
error?: string;
|
|
427
427
|
hint?: string;
|
|
428
428
|
className?: string;
|
|
429
|
+
prefix?: ReactNode;
|
|
429
430
|
}
|
|
430
|
-
declare function Switch({ label, name, size, error, hint, className, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
|
|
431
|
+
declare function Switch({ label, name, size, error, hint, className, prefix, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
|
|
431
432
|
|
|
432
433
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
433
434
|
label: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -419,15 +419,16 @@ interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'
|
|
|
419
419
|
}
|
|
420
420
|
declare function Slider({ label, name, min, max, showValue, error, hint, className, onChange, ...props }: Readonly<SliderProps>): react_jsx_runtime.JSX.Element;
|
|
421
421
|
|
|
422
|
-
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
422
|
+
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'prefix'> {
|
|
423
423
|
label: string;
|
|
424
424
|
name: string;
|
|
425
425
|
size?: 'small' | 'medium' | 'large';
|
|
426
426
|
error?: string;
|
|
427
427
|
hint?: string;
|
|
428
428
|
className?: string;
|
|
429
|
+
prefix?: ReactNode;
|
|
429
430
|
}
|
|
430
|
-
declare function Switch({ label, name, size, error, hint, className, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
|
|
431
|
+
declare function Switch({ label, name, size, error, hint, className, prefix, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
|
|
431
432
|
|
|
432
433
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
433
434
|
label: ReactNode;
|
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":"bds0116Accordion-accordion","item":"bds0116Accordion-item","heading":"bds0116Accordion-heading","trigger":"bds0116Accordion-trigger","triggerLabel":"bds0116Accordion-triggerLabel","chevron":"bds0116Accordion-chevron","--open":"bds0116Accordion---open","panel":"bds0116Accordion-panel","panelContent":"bds0116Accordion-panelContent"};
|
|
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":"bds0116Alert-alert","--variant_info":"bds0116Alert---variant_info","--variant_success":"bds0116Alert---variant_success","--variant_warning":"bds0116Alert---variant_warning","--variant_error":"bds0116Alert---variant_error","icon":"bds0116Alert-icon","content":"bds0116Alert-content","title":"bds0116Alert-title","dismiss":"bds0116Alert-dismiss"};
|
|
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":"bds0116Avatar-avatar","--fallback":"bds0116Avatar---fallback","--size_small":"bds0116Avatar---size_small","--size_medium":"bds0116Avatar---size_medium","--size_large":"bds0116Avatar---size_large","image":"bds0116Avatar-image","initials":"bds0116Avatar-initials"};
|
|
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":"bds0116Badge-badge","--variant_primary":"bds0116Badge---variant_primary","--variant_secondary":"bds0116Badge---variant_secondary","--variant_success":"bds0116Badge---variant_success","--variant_error":"bds0116Badge---variant_error","--variant_warning":"bds0116Badge---variant_warning"};
|
|
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":"bds0116Breadcrumb-breadcrumb","list":"bds0116Breadcrumb-list","item":"bds0116Breadcrumb-item","link":"bds0116Breadcrumb-link","separator":"bds0116Breadcrumb-separator","current":"bds0116Breadcrumb-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":"bds0116Collapsible-collapsible","summary":"bds0116Collapsible-summary","summaryContent":"bds0116Collapsible-summaryContent","icon":"bds0116Collapsible-icon","content":"bds0116Collapsible-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":"bds0116Calendar-calendar","header":"bds0116Calendar-header","monthYear":"bds0116Calendar-monthYear","navBtn":"bds0116Calendar-navBtn","grid":"bds0116Calendar-grid","weekday":"bds0116Calendar-weekday","empty":"bds0116Calendar-empty","day":"bds0116Calendar-day","disabled":"bds0116Calendar-disabled","selected":"bds0116Calendar-selected","today":"bds0116Calendar-today"};
|
|
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":"bds0116Carousel-carousel","track":"bds0116Carousel-track","slide":"bds0116Carousel-slide","navBtn":"bds0116Carousel-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":"bds0116DescriptionList-list","group":"bds0116DescriptionList-group","term":"bds0116DescriptionList-term","details":"bds0116DescriptionList-details","--layout_inline":"bds0116DescriptionList---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":"bds0116Link-link","--variant_default":"bds0116Link---variant_default","--variant_subtle":"bds0116Link---variant_subtle","--variant_standalone":"bds0116Link---variant_standalone","externalLabel":"bds0116Link-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":"bds0116Loading-loading","spinner":"bds0116Loading-spinner","--size_small":"bds0116Loading---size_small","--size_large":"bds0116Loading---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":"bds0116NotificationBanner-banner","--variant_info":"bds0116NotificationBanner---variant_info","--variant_success":"bds0116NotificationBanner---variant_success","--variant_warning":"bds0116NotificationBanner---variant_warning","--variant_error":"bds0116NotificationBanner---variant_error","content":"bds0116NotificationBanner-content","action":"bds0116NotificationBanner-action","dismiss":"bds0116NotificationBanner-dismiss"};
|
|
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":"bds0116Pagination-pagination","list":"bds0116Pagination-list","button":"bds0116Pagination-button","--active":"bds0116Pagination---active","--nav":"bds0116Pagination---nav","ellipsis":"bds0116Pagination-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":"bds0116Progress-container","labelRow":"bds0116Progress-labelRow","value":"bds0116Progress-value","track":"bds0116Progress-track","--size_small":"bds0116Progress---size_small","--size_medium":"bds0116Progress---size_medium","--size_large":"bds0116Progress---size_large","fill":"bds0116Progress-fill"};
|
|
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":"bds0116ProgressCircle-wrapper","svg":"bds0116ProgressCircle-svg","track":"bds0116ProgressCircle-track","fill":"bds0116ProgressCircle-fill","value":"bds0116ProgressCircle-value","--size_small":"bds0116ProgressCircle---size_small","--size_medium":"bds0116ProgressCircle---size_medium","--size_large":"bds0116ProgressCircle---size_large"};
|
|
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":"bds0116Separator-separator","--horizontal":"bds0116Separator---horizontal","--vertical":"bds0116Separator---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":"bds0116Skeleton-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":"bds0116SkipLink-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":"bds0116Table-wrapper","table":"bds0116Table-table","caption":"bds0116Table-caption","thead":"bds0116Table-thead","th":"bds0116Table-th","--sortable":"bds0116Table---sortable","sortButton":"bds0116Table-sortButton","sortIcon":"bds0116Table-sortIcon","--sort-active":"bds0116Table---sort-active","--sort-desc":"bds0116Table---sort-desc","tbody":"bds0116Table-tbody","tr":"bds0116Table-tr","td":"bds0116Table-td"};
|
|
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":"bds0116Tabs-tabs","tabList":"bds0116Tabs-tabList","tab":"bds0116Tabs-tab","--active":"bds0116Tabs---active","panel":"bds0116Tabs-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":"bds0116Tooltip-wrapper","tooltip":"bds0116Tooltip-tooltip","--placement_top":"bds0116Tooltip---placement_top","--placement_bottom":"bds0116Tooltip---placement_bottom","--placement_left":"bds0116Tooltip---placement_left","--placement_right":"bds0116Tooltip---placement_right"};
|
|
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":"bds0116Typography-typography","--h1":"bds0116Typography---h1","--h2":"bds0116Typography---h2","--h3":"bds0116Typography---h3","--body":"bds0116Typography---body","--body_s":"bds0116Typography---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":"bds0116Button-button","--primary":"bds0116Button---primary","--secondary":"bds0116Button---secondary","--size_small":"bds0116Button---size_small","--size_medium":"bds0116Button---size_medium","--size_large":"bds0116Button---size_large","--hasPulse":"bds0116Button---hasPulse","prefix":"bds0116Button-prefix","suffix":"bds0116Button-suffix"};
|
|
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":"bds0116Command-dialog","palette":"bds0116Command-palette","searchRow":"bds0116Command-searchRow","searchIcon":"bds0116Command-searchIcon","search":"bds0116Command-search","escHint":"bds0116Command-escHint","list":"bds0116Command-list","groupList":"bds0116Command-groupList","group":"bds0116Command-group","item":"bds0116Command-item","itemActive":"bds0116Command-itemActive","itemLabel":"bds0116Command-itemLabel","itemDesc":"bds0116Command-itemDesc","shortcut":"bds0116Command-shortcut","empty":"bds0116Command-empty"};
|
|
1018
1018
|
|
|
1019
1019
|
// src/components/interaction/Command/Command.tsx
|
|
1020
1020
|
import { cn as cn23 } from "@boostdev/design-system-foundation";
|
|
@@ -1153,7 +1153,7 @@ function Command({
|
|
|
1153
1153
|
import { useEffect as useEffect2, useRef as useRef4 } from "react";
|
|
1154
1154
|
|
|
1155
1155
|
// src/components/interaction/Dialog/Dialog.module.css
|
|
1156
|
-
var Dialog_default = {"dialog":"
|
|
1156
|
+
var Dialog_default = {"dialog":"bds0116Dialog-dialog","dialogContent":"bds0116Dialog-dialogContent","closeForm":"bds0116Dialog-closeForm","closeButton":"bds0116Dialog-closeButton"};
|
|
1157
1157
|
|
|
1158
1158
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
1159
1159
|
import { cn as cn24 } from "@boostdev/design-system-foundation";
|
|
@@ -1209,7 +1209,7 @@ function Dialog({ children, isOpen = false, className, onClose }) {
|
|
|
1209
1209
|
import { useEffect as useEffect3, useRef as useRef5 } from "react";
|
|
1210
1210
|
|
|
1211
1211
|
// src/components/interaction/Drawer/Drawer.module.css
|
|
1212
|
-
var Drawer_default = {"drawer":"
|
|
1212
|
+
var Drawer_default = {"drawer":"bds0116Drawer-drawer","panel":"bds0116Drawer-panel","--side_right":"bds0116Drawer---side_right","--side_left":"bds0116Drawer---side_left","header":"bds0116Drawer-header","closeButton":"bds0116Drawer-closeButton","body":"bds0116Drawer-body"};
|
|
1213
1213
|
|
|
1214
1214
|
// src/components/interaction/Drawer/Drawer.tsx
|
|
1215
1215
|
import { cn as cn25 } from "@boostdev/design-system-foundation";
|
|
@@ -1279,7 +1279,7 @@ import {
|
|
|
1279
1279
|
} from "react";
|
|
1280
1280
|
|
|
1281
1281
|
// src/components/interaction/DropdownMenu/DropdownMenu.module.css
|
|
1282
|
-
var DropdownMenu_default = {"wrapper":"
|
|
1282
|
+
var DropdownMenu_default = {"wrapper":"bds0116DropdownMenu-wrapper","menu":"bds0116DropdownMenu-menu","--placement_bottom-start":"bds0116DropdownMenu---placement_bottom-start","--placement_bottom-end":"bds0116DropdownMenu---placement_bottom-end","separator":"bds0116DropdownMenu-separator","item":"bds0116DropdownMenu-item","icon":"bds0116DropdownMenu-icon"};
|
|
1283
1283
|
|
|
1284
1284
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
1285
1285
|
import { cn as cn26 } from "@boostdev/design-system-foundation";
|
|
@@ -1399,7 +1399,7 @@ import {
|
|
|
1399
1399
|
} from "react";
|
|
1400
1400
|
|
|
1401
1401
|
// src/components/interaction/Popover/Popover.module.css
|
|
1402
|
-
var Popover_default = {"wrapper":"
|
|
1402
|
+
var Popover_default = {"wrapper":"bds0116Popover-wrapper","panel":"bds0116Popover-panel","--placement_bottom":"bds0116Popover---placement_bottom","--placement_top":"bds0116Popover---placement_top","--placement_right":"bds0116Popover---placement_right","--placement_left":"bds0116Popover---placement_left"};
|
|
1403
1403
|
|
|
1404
1404
|
// src/components/interaction/Popover/Popover.tsx
|
|
1405
1405
|
import { cn as cn27 } from "@boostdev/design-system-foundation";
|
|
@@ -1455,7 +1455,7 @@ function Popover({
|
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
1457
|
// src/components/interaction/Rating/Rating.module.css
|
|
1458
|
-
var Rating_default = {"rating":"
|
|
1458
|
+
var Rating_default = {"rating":"bds0116Rating-rating","star":"bds0116Rating-star","--filled":"bds0116Rating---filled"};
|
|
1459
1459
|
|
|
1460
1460
|
// src/components/interaction/Rating/Rating.tsx
|
|
1461
1461
|
import { cn as cn28 } from "@boostdev/design-system-foundation";
|
|
@@ -1486,7 +1486,7 @@ function Rating({ value, max = 5, className }) {
|
|
|
1486
1486
|
import { useState as useState7, useEffect as useEffect6, createContext, useContext, useCallback, useMemo as useMemo2 } from "react";
|
|
1487
1487
|
|
|
1488
1488
|
// src/components/interaction/Toast/Toast.module.css
|
|
1489
|
-
var Toast_default = {"toastContainer":"
|
|
1489
|
+
var Toast_default = {"toastContainer":"bds0116Toast-toastContainer","toast":"bds0116Toast-toast","--variant_success":"bds0116Toast---variant_success","--variant_warning":"bds0116Toast---variant_warning","--variant_info":"bds0116Toast---variant_info","--variant_error":"bds0116Toast---variant_error","message":"bds0116Toast-message","closeButton":"bds0116Toast-closeButton"};
|
|
1490
1490
|
|
|
1491
1491
|
// src/components/interaction/Toast/Toast.tsx
|
|
1492
1492
|
import { cn as cn29 } from "@boostdev/design-system-foundation";
|
|
@@ -1536,10 +1536,10 @@ function useToast() {
|
|
|
1536
1536
|
import { useId as useId9 } from "react";
|
|
1537
1537
|
|
|
1538
1538
|
// src/components/interaction/form/Checkbox/Checkbox.module.css
|
|
1539
|
-
var Checkbox_default = {"checkboxGroup":"
|
|
1539
|
+
var Checkbox_default = {"checkboxGroup":"bds0116Checkbox-checkboxGroup","inputWrapper":"bds0116Checkbox-inputWrapper","checkbox":"bds0116Checkbox-checkbox","checkboxError":"bds0116Checkbox-checkboxError"};
|
|
1540
1540
|
|
|
1541
1541
|
// src/components/interaction/form/atoms/Message.module.css
|
|
1542
|
-
var Message_default = {"error":"
|
|
1542
|
+
var Message_default = {"error":"bds0116Message-error","hint":"bds0116Message-hint"};
|
|
1543
1543
|
|
|
1544
1544
|
// src/components/interaction/form/atoms/Message.tsx
|
|
1545
1545
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
@@ -1549,7 +1549,7 @@ var Message = ({ message, type, inputId }) => {
|
|
|
1549
1549
|
};
|
|
1550
1550
|
|
|
1551
1551
|
// src/components/interaction/form/atoms/Label.module.css
|
|
1552
|
-
var Label_default = {"label":"
|
|
1552
|
+
var Label_default = {"label":"bds0116Label-label"};
|
|
1553
1553
|
|
|
1554
1554
|
// src/components/interaction/form/atoms/Label.tsx
|
|
1555
1555
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
@@ -1561,7 +1561,7 @@ var Label = ({ label, id }) => {
|
|
|
1561
1561
|
import { cn as cn31 } from "@boostdev/design-system-foundation";
|
|
1562
1562
|
|
|
1563
1563
|
// src/components/interaction/form/atoms/InputContainer.module.css
|
|
1564
|
-
var InputContainer_default = {"container":"
|
|
1564
|
+
var InputContainer_default = {"container":"bds0116InputContainer-container"};
|
|
1565
1565
|
|
|
1566
1566
|
// src/components/interaction/form/atoms/InputContainer.tsx
|
|
1567
1567
|
import { cn as cn30 } from "@boostdev/design-system-foundation";
|
|
@@ -1608,7 +1608,7 @@ import {
|
|
|
1608
1608
|
} from "react";
|
|
1609
1609
|
|
|
1610
1610
|
// src/components/interaction/form/Combobox/Combobox.module.css
|
|
1611
|
-
var Combobox_default = {"formGroup":"
|
|
1611
|
+
var Combobox_default = {"formGroup":"bds0116Combobox-formGroup","inputWrapper":"bds0116Combobox-inputWrapper","input":"bds0116Combobox-input","inputError":"bds0116Combobox-inputError","chevron":"bds0116Combobox-chevron","listbox":"bds0116Combobox-listbox","option":"bds0116Combobox-option","--highlighted":"bds0116Combobox---highlighted","--selected":"bds0116Combobox---selected","--disabled":"bds0116Combobox---disabled"};
|
|
1612
1612
|
|
|
1613
1613
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
1614
1614
|
import { cn as cn32 } from "@boostdev/design-system-foundation";
|
|
@@ -1759,7 +1759,7 @@ function Combobox({
|
|
|
1759
1759
|
import { useId as useId11, useRef as useRef9, useState as useState9 } from "react";
|
|
1760
1760
|
|
|
1761
1761
|
// src/components/interaction/form/FileInput/FileInput.module.css
|
|
1762
|
-
var FileInput_default = {"formGroup":"
|
|
1762
|
+
var FileInput_default = {"formGroup":"bds0116FileInput-formGroup","dropZone":"bds0116FileInput-dropZone","isDragging":"bds0116FileInput-isDragging","hasError":"bds0116FileInput-hasError","isDisabled":"bds0116FileInput-isDisabled","icon":"bds0116FileInput-icon","prompt":"bds0116FileInput-prompt","acceptHint":"bds0116FileInput-acceptHint","hiddenInput":"bds0116FileInput-hiddenInput"};
|
|
1763
1763
|
|
|
1764
1764
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
1765
1765
|
import { cn as cn33 } from "@boostdev/design-system-foundation";
|
|
@@ -1856,7 +1856,7 @@ function FileInput({
|
|
|
1856
1856
|
import { useId as useId12 } from "react";
|
|
1857
1857
|
|
|
1858
1858
|
// src/components/interaction/form/FormInput/FormInput.module.css
|
|
1859
|
-
var FormInput_default = {"formGroup":"
|
|
1859
|
+
var FormInput_default = {"formGroup":"bds0116FormInput-formGroup","input":"bds0116FormInput-input","inputError":"bds0116FormInput-inputError"};
|
|
1860
1860
|
|
|
1861
1861
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
1862
1862
|
import { cn as cn34 } from "@boostdev/design-system-foundation";
|
|
@@ -1897,7 +1897,7 @@ function FormInput({
|
|
|
1897
1897
|
import { useId as useId13, useRef as useRef10, useState as useState10 } from "react";
|
|
1898
1898
|
|
|
1899
1899
|
// src/components/interaction/form/NumberInput/NumberInput.module.css
|
|
1900
|
-
var NumberInput_default = {"formGroup":"
|
|
1900
|
+
var NumberInput_default = {"formGroup":"bds0116NumberInput-formGroup","inputRow":"bds0116NumberInput-inputRow","input":"bds0116NumberInput-input","inputError":"bds0116NumberInput-inputError","stepper":"bds0116NumberInput-stepper"};
|
|
1901
1901
|
|
|
1902
1902
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
1903
1903
|
import { cn as cn35 } from "@boostdev/design-system-foundation";
|
|
@@ -1992,7 +1992,7 @@ function NumberInput({
|
|
|
1992
1992
|
import { useId as useId14 } from "react";
|
|
1993
1993
|
|
|
1994
1994
|
// src/components/interaction/form/Radio/Radio.module.css
|
|
1995
|
-
var Radio_default = {"radioGroup":"
|
|
1995
|
+
var Radio_default = {"radioGroup":"bds0116Radio-radioGroup","inputWrapper":"bds0116Radio-inputWrapper","textWrapper":"bds0116Radio-textWrapper","description":"bds0116Radio-description","radio":"bds0116Radio-radio","radioError":"bds0116Radio-radioError"};
|
|
1996
1996
|
|
|
1997
1997
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
1998
1998
|
import { cn as cn36 } from "@boostdev/design-system-foundation";
|
|
@@ -2030,7 +2030,7 @@ function Radio({ label, name, description, error, hint, className, ...props }) {
|
|
|
2030
2030
|
import { useId as useId15 } from "react";
|
|
2031
2031
|
|
|
2032
2032
|
// src/components/interaction/form/Select/Select.module.css
|
|
2033
|
-
var Select_default = {"formGroup":"
|
|
2033
|
+
var Select_default = {"formGroup":"bds0116Select-formGroup","selectWrapper":"bds0116Select-selectWrapper","select":"bds0116Select-select","selectError":"bds0116Select-selectError","chevron":"bds0116Select-chevron"};
|
|
2034
2034
|
|
|
2035
2035
|
// src/components/interaction/form/Select/Select.tsx
|
|
2036
2036
|
import { cn as cn37 } from "@boostdev/design-system-foundation";
|
|
@@ -2078,7 +2078,7 @@ function Select({
|
|
|
2078
2078
|
import { useId as useId16, useState as useState11 } from "react";
|
|
2079
2079
|
|
|
2080
2080
|
// src/components/interaction/form/Slider/Slider.module.css
|
|
2081
|
-
var Slider_default = {"formGroup":"
|
|
2081
|
+
var Slider_default = {"formGroup":"bds0116Slider-formGroup","labelRow":"bds0116Slider-labelRow","value":"bds0116Slider-value","slider":"bds0116Slider-slider","sliderError":"bds0116Slider-sliderError"};
|
|
2082
2082
|
|
|
2083
2083
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
2084
2084
|
import { cn as cn38 } from "@boostdev/design-system-foundation";
|
|
@@ -2139,7 +2139,7 @@ function Slider({
|
|
|
2139
2139
|
import { useId as useId17 } from "react";
|
|
2140
2140
|
|
|
2141
2141
|
// src/components/interaction/form/Switch/Switch.module.css
|
|
2142
|
-
var Switch_default = {"switchGroup":"
|
|
2142
|
+
var Switch_default = {"switchGroup":"bds0116Switch-switchGroup","--size_small":"bds0116Switch---size_small","--size_medium":"bds0116Switch---size_medium","--size_large":"bds0116Switch---size_large","inputWrapper":"bds0116Switch-inputWrapper","trackWrapper":"bds0116Switch-trackWrapper","switch":"bds0116Switch-switch","track":"bds0116Switch-track","thumb":"bds0116Switch-thumb","switchError":"bds0116Switch-switchError"};
|
|
2143
2143
|
|
|
2144
2144
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2145
2145
|
import { cn as cn39 } from "@boostdev/design-system-foundation";
|
|
@@ -2151,6 +2151,7 @@ function Switch({
|
|
|
2151
2151
|
error,
|
|
2152
2152
|
hint,
|
|
2153
2153
|
className,
|
|
2154
|
+
prefix,
|
|
2154
2155
|
...props
|
|
2155
2156
|
}) {
|
|
2156
2157
|
const id = name + useId17();
|
|
@@ -2159,6 +2160,7 @@ function Switch({
|
|
|
2159
2160
|
const describedBy = [error && errorId, hint && hintId].filter(Boolean).join(" ") || void 0;
|
|
2160
2161
|
return /* @__PURE__ */ jsxs31(InputContainer, { className: cn39(Switch_default.switchGroup, Switch_default[`--size_${size}`], className), children: [
|
|
2161
2162
|
/* @__PURE__ */ jsxs31("div", { className: Switch_default.inputWrapper, children: [
|
|
2163
|
+
prefix && /* @__PURE__ */ jsx42(Label, { id, label: prefix }),
|
|
2162
2164
|
/* @__PURE__ */ jsxs31("div", { className: Switch_default.trackWrapper, children: [
|
|
2163
2165
|
/* @__PURE__ */ jsx42(
|
|
2164
2166
|
"input",
|
|
@@ -2185,7 +2187,7 @@ function Switch({
|
|
|
2185
2187
|
import { useId as useId18 } from "react";
|
|
2186
2188
|
|
|
2187
2189
|
// src/components/interaction/form/Textarea/Textarea.module.css
|
|
2188
|
-
var Textarea_default = {"formGroup":"
|
|
2190
|
+
var Textarea_default = {"formGroup":"bds0116Textarea-formGroup","textarea":"bds0116Textarea-textarea","textareaError":"bds0116Textarea-textareaError"};
|
|
2189
2191
|
|
|
2190
2192
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
2191
2193
|
import { cn as cn40 } from "@boostdev/design-system-foundation";
|
|
@@ -2221,7 +2223,7 @@ function Textarea({
|
|
|
2221
2223
|
}
|
|
2222
2224
|
|
|
2223
2225
|
// src/components/layout/ButtonGroup/ButtonGroup.module.css
|
|
2224
|
-
var ButtonGroup_default = {"buttonGroup":"
|
|
2226
|
+
var ButtonGroup_default = {"buttonGroup":"bds0116ButtonGroup-buttonGroup","container":"bds0116ButtonGroup-container","--variant_card":"bds0116ButtonGroup---variant_card","--variant_flow":"bds0116ButtonGroup---variant_flow","--variant_modal":"bds0116ButtonGroup---variant_modal","--variant_content":"bds0116ButtonGroup---variant_content","--variant_grid":"bds0116ButtonGroup---variant_grid"};
|
|
2225
2227
|
|
|
2226
2228
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2227
2229
|
import { cn as cn41 } from "@boostdev/design-system-foundation";
|
|
@@ -2231,7 +2233,7 @@ function ButtonGroup({ children, className, variant }) {
|
|
|
2231
2233
|
}
|
|
2232
2234
|
|
|
2233
2235
|
// src/components/layout/Card/Card.module.css
|
|
2234
|
-
var Card_default = {"card":"
|
|
2236
|
+
var Card_default = {"card":"bds0116Card-card","--default":"bds0116Card---default","--elevated":"bds0116Card---elevated","--outlined":"bds0116Card---outlined","--clickable":"bds0116Card---clickable","--padding-none":"bds0116Card---padding-none","--padding-small":"bds0116Card---padding-small","--padding-medium":"bds0116Card---padding-medium","--padding-large":"bds0116Card---padding-large","--text-start":"bds0116Card---text-start","--text-center":"bds0116Card---text-center","--text-end":"bds0116Card---text-end"};
|
|
2235
2237
|
|
|
2236
2238
|
// src/components/layout/Card/Card.tsx
|
|
2237
2239
|
import { cn as cn42 } from "@boostdev/design-system-foundation";
|
|
@@ -2269,7 +2271,7 @@ function Card({
|
|
|
2269
2271
|
}
|
|
2270
2272
|
|
|
2271
2273
|
// src/components/layout/SectionHeader/SectionHeader.module.css
|
|
2272
|
-
var SectionHeader_default = {"sectionHeader":"
|
|
2274
|
+
var SectionHeader_default = {"sectionHeader":"bds0116SectionHeader-sectionHeader","title":"bds0116SectionHeader-title","subtitle":"bds0116SectionHeader-subtitle","--start":"bds0116SectionHeader---start","--center":"bds0116SectionHeader---center","--end":"bds0116SectionHeader---end","--small":"bds0116SectionHeader---small","--medium":"bds0116SectionHeader---medium","--large":"bds0116SectionHeader---large"};
|
|
2273
2275
|
|
|
2274
2276
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2275
2277
|
import { cn as cn43 } from "@boostdev/design-system-foundation";
|
|
@@ -2290,7 +2292,7 @@ function SectionHeader({
|
|
|
2290
2292
|
}
|
|
2291
2293
|
|
|
2292
2294
|
// src/components/layout/IconWrapper/IconWrapper.module.css
|
|
2293
|
-
var IconWrapper_default = {"wrapper":"
|
|
2295
|
+
var IconWrapper_default = {"wrapper":"bds0116IconWrapper-wrapper"};
|
|
2294
2296
|
|
|
2295
2297
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2296
2298
|
import { cn as cn44 } from "@boostdev/design-system-foundation";
|
package/package.json
CHANGED
|
@@ -37,6 +37,9 @@ Toggle control for binary settings that take immediate effect — without requir
|
|
|
37
37
|
### Disabled + checked
|
|
38
38
|
<Canvas of={Stories.DisabledChecked} />
|
|
39
39
|
|
|
40
|
+
### With prefix label
|
|
41
|
+
<Canvas of={Stories.WithPrefix} />
|
|
42
|
+
|
|
40
43
|
## Props
|
|
41
44
|
|
|
42
45
|
<ArgTypes of={Stories} />
|
|
@@ -49,8 +52,10 @@ Toggle control for binary settings that take immediate effect — without requir
|
|
|
49
52
|
<tr><th>Variable</th><th>Default</th><th>Description</th></tr>
|
|
50
53
|
</thead>
|
|
51
54
|
<tbody>
|
|
52
|
-
<tr><td>`--
|
|
53
|
-
<tr><td>`--
|
|
55
|
+
<tr><td>`--switch_track-bg`</td><td>`var(--color_grey--subtle)`</td><td>Track background when off</td></tr>
|
|
56
|
+
<tr><td>`--switch_thumb-bg`</td><td>`var(--color_grey)`</td><td>Thumb colour when off (also track outline)</td></tr>
|
|
57
|
+
<tr><td>`--switch_track-bg--active`</td><td>`var(--color_active--subtle)`</td><td>Track background when on</td></tr>
|
|
58
|
+
<tr><td>`--switch_thumb-bg--active`</td><td>`var(--color_active--strong)`</td><td>Thumb colour when on (also track outline)</td></tr>
|
|
54
59
|
</tbody>
|
|
55
60
|
</table>
|
|
56
61
|
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
width: var(--switch_track-width);
|
|
54
54
|
height: var(--switch_track-height);
|
|
55
55
|
border-radius: 999px;
|
|
56
|
-
background-color: var(--
|
|
56
|
+
background-color: var(--switch_track-bg, var(--color_grey--subtle));
|
|
57
57
|
padding-inline: var(--switch_track-pad);
|
|
58
58
|
pointer-events: none;
|
|
59
59
|
transition: var(--animation_transition);
|
|
60
|
-
outline: 1px solid var(--
|
|
60
|
+
outline: 1px solid var(--switch_thumb-bg, var(--color_grey));
|
|
61
61
|
outline-offset: var(--outline_offset);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
width: var(--switch_thumb-size);
|
|
68
68
|
height: var(--switch_thumb-size);
|
|
69
69
|
border-radius: 50%;
|
|
70
|
-
background-color: var(--
|
|
70
|
+
background-color: var(--switch_thumb-bg, var(--color_grey));
|
|
71
71
|
box-shadow: var(--shadow_s);
|
|
72
72
|
transition: var(--animation_transition);
|
|
73
73
|
transform: translateX(0);
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
|
|
81
81
|
/* Checked state via CSS sibling combinator */
|
|
82
82
|
.switch:checked + .track {
|
|
83
|
-
background-color: var(--
|
|
84
|
-
outline-color: var(--
|
|
83
|
+
background-color: var(--switch_track-bg--active, var(--color_active--subtle));
|
|
84
|
+
outline-color: var(--switch_thumb-bg--active, var(--color_active--strong));
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.switch:checked + .track .thumb {
|
|
88
|
-
background-color: var(--
|
|
88
|
+
background-color: var(--switch_thumb-bg--active, var(--color_active--strong));
|
|
89
89
|
transform: translateX(var(--switch_thumb-size));
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -45,4 +45,27 @@ describe('Switch', () => {
|
|
|
45
45
|
render(<Switch label="Disabled" name="disabled" disabled />);
|
|
46
46
|
expect(screen.getByRole('switch')).toBeDisabled();
|
|
47
47
|
});
|
|
48
|
+
|
|
49
|
+
it('renders a prefix label when provided', () => {
|
|
50
|
+
render(<Switch label="On" name="theme" prefix="Off" />);
|
|
51
|
+
expect(screen.getByText('Off')).toBeInTheDocument();
|
|
52
|
+
expect(screen.getByText('On')).toBeInTheDocument();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('associates error message via aria-describedby', () => {
|
|
56
|
+
render(<Switch label="Accept" name="accept" error="Required" />);
|
|
57
|
+
const input = screen.getByRole('switch');
|
|
58
|
+
const error = screen.getByText('Required');
|
|
59
|
+
expect(input).toHaveAttribute('aria-describedby', expect.stringContaining(error.id));
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('renders small size', () => {
|
|
63
|
+
render(<Switch label="Toggle" name="size-s" size="small" />);
|
|
64
|
+
expect(screen.getByRole('switch').closest('.switchGroup')).toHaveClass('--size_small');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('renders large size', () => {
|
|
68
|
+
render(<Switch label="Toggle" name="size-l" size="large" />);
|
|
69
|
+
expect(screen.getByRole('switch').closest('.switchGroup')).toHaveClass('--size_large');
|
|
70
|
+
});
|
|
48
71
|
});
|