@boostdev/design-system-components 2.14.1 → 2.16.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 +20 -15
- package/dist/client.cjs +271 -205
- package/dist/client.css +808 -648
- package/dist/client.d.cts +19 -4
- package/dist/client.d.ts +19 -4
- package/dist/client.js +206 -139
- package/dist/index.cjs +271 -205
- package/dist/index.css +808 -648
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +206 -139
- package/dist/web-components/chunk-2DHW2WJZ.js +154 -0
- package/dist/web-components/{chunk-LDIPCTRN.js → chunk-2MJTO2IW.js} +48 -2
- package/dist/web-components/{chunk-3WAV6MDN.js → chunk-3FSGP35V.js} +1 -0
- package/dist/web-components/{chunk-KA3VPKMY.js → chunk-4MB2ICSK.js} +1 -0
- package/dist/web-components/{chunk-IDSM74LM.js → chunk-6XL5P76D.js} +3 -3
- package/dist/web-components/{chunk-P24JYC5V.js → chunk-7VXRMCAL.js} +10 -4
- package/dist/web-components/{chunk-CUKQ2L5B.js → chunk-AGI6YQRC.js} +9 -16
- package/dist/web-components/chunk-BDRV452N.js +51 -0
- package/dist/web-components/{chunk-3AY2YKCM.js → chunk-CKCPV347.js} +1 -0
- package/dist/web-components/{chunk-HBLJ4SLY.js → chunk-DD3OUXNG.js} +5 -5
- package/dist/web-components/{chunk-RVF7W653.js → chunk-DGOCPKHI.js} +30 -10
- package/dist/web-components/{chunk-2OLVQUBU.js → chunk-EYCW7TKB.js} +8 -15
- package/dist/web-components/{chunk-VANAKB6D.js → chunk-GPJWLAKU.js} +33 -16
- package/dist/web-components/{chunk-VED2DFJ6.js → chunk-GQNQBEYR.js} +8 -15
- package/dist/web-components/{chunk-WFVKU4GX.js → chunk-IKAJLROF.js} +49 -4
- package/dist/web-components/{chunk-RSZ3BWBK.js → chunk-KSK4RZZQ.js} +30 -7
- package/dist/web-components/{chunk-FEDABOR5.js → chunk-LHFUXZ52.js} +7 -15
- package/dist/web-components/{chunk-M3ECULRH.js → chunk-RBF7WPLI.js} +10 -8
- package/dist/web-components/{chunk-6G22I2CK.js → chunk-RZH5IVB5.js} +31 -1
- package/dist/web-components/chunk-SRKQ6GST.js +40 -0
- package/dist/web-components/{chunk-5HUAFCU6.js → chunk-TJV7UIXC.js} +7 -0
- package/dist/web-components/{chunk-J3HVUIUH.js → chunk-XI2U6U26.js} +8 -15
- package/dist/web-components/{chunk-JH6LQKLK.js → chunk-XJU7KITO.js} +8 -15
- package/dist/web-components/{chunk-XIZWAWMJ.js → chunk-XTPUKUN5.js} +16 -6
- package/dist/web-components/{chunk-JV5QT2OU.js → chunk-YLDQOESI.js} +27 -13
- package/dist/web-components/globals.js +1 -1
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components/index.js +34 -29
- package/dist/web-components/interaction/bds-button.js +1 -1
- package/dist/web-components/interaction/bds-dropdown-menu-group.d.ts +41 -0
- package/dist/web-components/interaction/bds-dropdown-menu-group.js +7 -0
- package/dist/web-components/interaction/bds-dropdown-menu-item.d.ts +14 -1
- package/dist/web-components/interaction/bds-dropdown-menu-item.js +1 -1
- package/dist/web-components/interaction/bds-dropdown-menu.d.ts +2 -1
- package/dist/web-components/interaction/bds-dropdown-menu.js +1 -1
- package/dist/web-components/interaction/bds-tab.d.ts +5 -0
- package/dist/web-components/interaction/bds-tab.js +1 -1
- package/dist/web-components/interaction/bds-tooltip.js +1 -1
- package/dist/web-components/interaction/form/bds-checkbox-group.d.ts +6 -0
- package/dist/web-components/interaction/form/bds-checkbox-group.js +2 -1
- package/dist/web-components/interaction/form/bds-checkbox.js +1 -1
- package/dist/web-components/interaction/form/bds-combobox.js +2 -1
- package/dist/web-components/interaction/form/bds-form-input.js +2 -1
- package/dist/web-components/interaction/form/bds-number-input.js +2 -1
- package/dist/web-components/interaction/form/bds-radio-group.d.ts +5 -0
- package/dist/web-components/interaction/form/bds-radio-group.js +2 -1
- package/dist/web-components/interaction/form/bds-radio.js +1 -1
- package/dist/web-components/interaction/form/bds-select.js +2 -1
- package/dist/web-components/interaction/form/bds-slider.js +2 -1
- package/dist/web-components/interaction/form/bds-switch.js +1 -1
- package/dist/web-components/interaction/form/bds-textarea.js +2 -1
- package/dist/web-components/ui/bds-alert.d.ts +8 -1
- package/dist/web-components/ui/bds-alert.js +1 -1
- package/dist/web-components/ui/bds-avatar.d.ts +11 -0
- package/dist/web-components/ui/bds-avatar.js +1 -1
- package/dist/web-components/ui/bds-notification-banner.d.ts +14 -1
- package/dist/web-components/ui/bds-notification-banner.js +1 -1
- package/dist/web-components/ui/bds-section-header.d.ts +6 -0
- package/dist/web-components/ui/bds-section-header.js +1 -1
- package/dist/web-components/ui/bds-separator.js +1 -1
- package/dist/web-components/ui/bds-table.js +1 -1
- package/package.json +6 -2
- package/src/components/interaction/Button/Button.mdx +7 -0
- package/src/components/interaction/Button/Button.module.css +17 -9
- package/src/components/interaction/Button/Button.stories.tsx +28 -0
- package/src/components/interaction/DropdownMenu/DropdownMenu.mdx +35 -4
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +58 -10
- package/src/components/interaction/DropdownMenu/DropdownMenu.spec.tsx +114 -1
- package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +25 -0
- package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +69 -17
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -0
- package/src/components/interaction/form/Checkbox/Checkbox.spec.tsx +7 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +1 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +7 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.spec.tsx +22 -0
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +1 -1
- package/src/components/interaction/form/Combobox/Combobox.module.css +1 -0
- package/src/components/interaction/form/Combobox/Combobox.spec.tsx +7 -0
- package/src/components/interaction/form/FormInput/FormInput.mdx +9 -0
- package/src/components/interaction/form/FormInput/FormInput.module.css +1 -0
- package/src/components/interaction/form/FormInput/FormInput.spec.tsx +7 -0
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -0
- package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +7 -0
- package/src/components/interaction/form/Radio/Radio.module.css +1 -0
- package/src/components/interaction/form/Radio/Radio.spec.tsx +7 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +1 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +7 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.spec.tsx +22 -0
- package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +1 -1
- package/src/components/interaction/form/Select/Select.module.css +1 -0
- package/src/components/interaction/form/Select/Select.spec.tsx +7 -0
- package/src/components/interaction/form/Switch/Switch.module.css +1 -0
- package/src/components/interaction/form/Switch/Switch.spec.tsx +7 -0
- package/src/components/interaction/form/Textarea/Textarea.module.css +1 -0
- package/src/components/interaction/form/Textarea/Textarea.spec.tsx +7 -0
- package/src/components/interaction/form/atoms/Message.module.css +14 -3
- package/src/components/interaction/form/atoms/Message.spec.tsx +22 -0
- package/src/components/interaction/form/atoms/Message.tsx +5 -0
- package/src/components/layout/SectionHeader/SectionHeader.mdx +18 -5
- package/src/components/layout/SectionHeader/SectionHeader.module.css +35 -14
- package/src/components/layout/SectionHeader/SectionHeader.spec.tsx +44 -0
- package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +5 -0
- package/src/components/layout/SectionHeader/SectionHeader.tsx +3 -1
- package/src/components/ui/Alert/Alert.mdx +11 -0
- package/src/components/ui/Alert/Alert.module.css +30 -1
- package/src/components/ui/Alert/Alert.spec.tsx +21 -0
- package/src/components/ui/Alert/Alert.stories.tsx +20 -0
- package/src/components/ui/Alert/Alert.tsx +8 -1
- package/src/components/ui/Avatar/Avatar.mdx +22 -2
- package/src/components/ui/Avatar/Avatar.module.css +29 -2
- package/src/components/ui/Avatar/Avatar.spec.tsx +26 -0
- package/src/components/ui/Avatar/Avatar.stories.tsx +23 -0
- package/src/components/ui/Avatar/Avatar.tsx +4 -2
- package/src/components/ui/Avatar/avatarTone.spec.ts +41 -0
- package/src/components/ui/Avatar/avatarTone.ts +22 -0
- package/src/components/ui/Collapsible/Collapsible.module.css +1 -2
- package/src/components/ui/NotificationBanner/NotificationBanner.mdx +14 -0
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +31 -1
- package/src/components/ui/NotificationBanner/NotificationBanner.spec.tsx +29 -0
- package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +25 -0
- package/src/components/ui/NotificationBanner/NotificationBanner.tsx +15 -1
- package/src/components/ui/Separator/Separator.mdx +1 -0
- package/src/components/ui/Separator/Separator.module.css +6 -0
- package/src/components/ui/Separator/Separator.spec.tsx +19 -0
- package/src/components/ui/Separator/Separator.stories.tsx +15 -0
- package/src/components/ui/Table/Table.mdx +4 -1
- package/src/components/ui/Table/Table.module.css +7 -7
- package/src/components/ui/Table/Table.spec.tsx +11 -0
- package/src/components/ui/Tabs/Tabs.mdx +11 -5
- package/src/components/ui/Tabs/Tabs.module.css +23 -5
- package/src/components/ui/Tabs/Tabs.spec.tsx +39 -0
- package/src/components/ui/Tabs/Tabs.tsx +2 -1
- package/src/components/ui/Tabs/getNodeText.spec.tsx +23 -0
- package/src/components/ui/Tabs/getNodeText.ts +13 -0
- package/src/components/ui/Tooltip/Tooltip.mdx +6 -3
- package/src/components/ui/Tooltip/Tooltip.module.css +6 -2
- package/src/components/ui/Tooltip/Tooltip.spec.tsx +10 -0
- package/src/components/ui/Tooltip/Tooltip.stories.tsx +13 -0
- package/src/css/bdc.css +5 -2
- package/src/css/bdc.spec.ts +65 -0
- package/src/stories/DesignSystem/Borders.mdx +17 -9
- package/src/web-components/globals.ts +10 -4
- package/src/web-components/index.ts +1 -0
- package/src/web-components/interaction/BdsAccordion.mdx +1 -1
- package/src/web-components/interaction/BdsAccordion.stories.tsx +1 -1
- package/src/web-components/interaction/BdsButton.mdx +9 -1
- package/src/web-components/interaction/BdsButton.stories.tsx +42 -1
- package/src/web-components/interaction/BdsCollapsible.mdx +1 -1
- package/src/web-components/interaction/BdsCollapsible.stories.tsx +1 -1
- package/src/web-components/interaction/BdsDialog.mdx +1 -1
- package/src/web-components/interaction/BdsDialog.stories.tsx +1 -1
- package/src/web-components/interaction/BdsDrawer.mdx +1 -1
- package/src/web-components/interaction/BdsDrawer.stories.tsx +1 -1
- package/src/web-components/interaction/BdsDropdownMenu.mdx +62 -6
- package/src/web-components/interaction/BdsDropdownMenu.stories.tsx +32 -7
- package/src/web-components/interaction/BdsPopover.mdx +1 -1
- package/src/web-components/interaction/BdsPopover.stories.tsx +1 -1
- package/src/web-components/interaction/BdsSkipLink.mdx +1 -1
- package/src/web-components/interaction/BdsSkipLink.stories.tsx +1 -1
- package/src/web-components/interaction/BdsTabs.mdx +10 -1
- package/src/web-components/interaction/BdsTabs.stories.tsx +1 -1
- package/src/web-components/interaction/BdsToastProvider.mdx +1 -1
- package/src/web-components/interaction/BdsToastProvider.stories.tsx +1 -1
- package/src/web-components/interaction/BdsTooltip.mdx +13 -5
- package/src/web-components/interaction/BdsTooltip.stories.tsx +12 -12
- package/src/web-components/interaction/bds-button.ts +16 -6
- package/src/web-components/interaction/bds-dropdown-menu-group.ts +72 -0
- package/src/web-components/interaction/bds-dropdown-menu-item.ts +65 -17
- package/src/web-components/interaction/bds-dropdown-menu.spec.ts +135 -0
- package/src/web-components/interaction/bds-dropdown-menu.ts +5 -4
- package/src/web-components/interaction/bds-tab.spec.ts +34 -2
- package/src/web-components/interaction/bds-tab.ts +31 -6
- package/src/web-components/interaction/bds-tooltip.spec.ts +16 -0
- package/src/web-components/interaction/bds-tooltip.ts +10 -8
- package/src/web-components/interaction/form/BdsCheckbox.mdx +5 -1
- package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +5 -1
- package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsCombobox.mdx +5 -1
- package/src/web-components/interaction/form/BdsCombobox.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsFieldGroup.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsFileInput.mdx +1 -1
- package/src/web-components/interaction/form/BdsFileInput.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsFormInput.mdx +8 -1
- package/src/web-components/interaction/form/BdsFormInput.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsNumberInput.mdx +5 -1
- package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsRadio.mdx +5 -1
- package/src/web-components/interaction/form/BdsRadio.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsRadioGroup.mdx +5 -1
- package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsSegmentedControl.mdx +1 -1
- package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsSelect.mdx +5 -1
- package/src/web-components/interaction/form/BdsSelect.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsSlider.mdx +5 -1
- package/src/web-components/interaction/form/BdsSlider.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsSwitch.mdx +5 -1
- package/src/web-components/interaction/form/BdsSwitch.stories.tsx +1 -1
- package/src/web-components/interaction/form/BdsTextarea.mdx +5 -1
- package/src/web-components/interaction/form/BdsTextarea.stories.tsx +1 -1
- package/src/web-components/interaction/form/bds-checkbox-group.spec.ts +32 -3
- package/src/web-components/interaction/form/bds-checkbox-group.ts +33 -17
- package/src/web-components/interaction/form/bds-checkbox.ts +1 -0
- package/src/web-components/interaction/form/bds-combobox.ts +6 -16
- package/src/web-components/interaction/form/bds-form-input.ts +6 -16
- package/src/web-components/interaction/form/bds-number-input.ts +6 -16
- package/src/web-components/interaction/form/bds-radio-group.spec.ts +32 -3
- package/src/web-components/interaction/form/bds-radio-group.ts +26 -14
- package/src/web-components/interaction/form/bds-radio.ts +1 -0
- package/src/web-components/interaction/form/bds-select.ts +6 -16
- package/src/web-components/interaction/form/bds-slider.ts +5 -16
- package/src/web-components/interaction/form/bds-switch.ts +1 -0
- package/src/web-components/interaction/form/bds-textarea.ts +6 -16
- package/src/web-components/interaction/form/field-message.spec.ts +62 -0
- package/src/web-components/interaction/form/field-message.ts +55 -0
- package/src/web-components/layout/BdsGrid.mdx +1 -1
- package/src/web-components/layout/BdsGrid.stories.tsx +1 -1
- package/src/web-components/layout/BdsGridItem.mdx +1 -1
- package/src/web-components/layout/BdsGridItem.stories.tsx +1 -1
- package/src/web-components/ui/BdsAlert.mdx +19 -1
- package/src/web-components/ui/BdsAlert.stories.tsx +29 -3
- package/src/web-components/ui/BdsAvatar.mdx +20 -3
- package/src/web-components/ui/BdsAvatar.stories.tsx +25 -2
- package/src/web-components/ui/BdsBadge.mdx +1 -1
- package/src/web-components/ui/BdsBadge.stories.tsx +1 -1
- package/src/web-components/ui/BdsBreadcrumb.mdx +1 -1
- package/src/web-components/ui/BdsBreadcrumb.stories.tsx +1 -1
- package/src/web-components/ui/BdsButtonContainer.mdx +1 -1
- package/src/web-components/ui/BdsButtonContainer.stories.tsx +1 -1
- package/src/web-components/ui/BdsCalendar.mdx +1 -1
- package/src/web-components/ui/BdsCalendar.stories.tsx +1 -1
- package/src/web-components/ui/BdsCalendarRange.mdx +1 -1
- package/src/web-components/ui/BdsCalendarRange.stories.tsx +1 -1
- package/src/web-components/ui/BdsCard.mdx +1 -1
- package/src/web-components/ui/BdsCard.stories.tsx +1 -1
- package/src/web-components/ui/BdsCarousel.mdx +1 -1
- package/src/web-components/ui/BdsCarousel.stories.tsx +1 -1
- package/src/web-components/ui/BdsDescriptionList.mdx +1 -1
- package/src/web-components/ui/BdsDescriptionList.stories.tsx +1 -1
- package/src/web-components/ui/BdsIconWrapper.mdx +1 -1
- package/src/web-components/ui/BdsIconWrapper.stories.tsx +1 -1
- package/src/web-components/ui/BdsLink.mdx +1 -1
- package/src/web-components/ui/BdsLink.stories.tsx +1 -1
- package/src/web-components/ui/BdsLoading.mdx +1 -1
- package/src/web-components/ui/BdsLoading.stories.tsx +1 -1
- package/src/web-components/ui/BdsNotificationBanner.mdx +10 -1
- package/src/web-components/ui/BdsNotificationBanner.stories.tsx +29 -2
- package/src/web-components/ui/BdsPagination.mdx +1 -1
- package/src/web-components/ui/BdsPagination.stories.tsx +1 -1
- package/src/web-components/ui/BdsProgress.mdx +1 -1
- package/src/web-components/ui/BdsProgress.stories.tsx +1 -1
- package/src/web-components/ui/BdsProgressCircle.mdx +1 -1
- package/src/web-components/ui/BdsProgressCircle.stories.tsx +1 -1
- package/src/web-components/ui/BdsRating.mdx +1 -1
- package/src/web-components/ui/BdsRating.stories.tsx +1 -1
- package/src/web-components/ui/BdsSectionHeader.mdx +18 -6
- package/src/web-components/ui/BdsSectionHeader.stories.tsx +10 -2
- package/src/web-components/ui/BdsSeparator.mdx +2 -1
- package/src/web-components/ui/BdsSeparator.stories.tsx +13 -1
- package/src/web-components/ui/BdsSkeleton.mdx +1 -1
- package/src/web-components/ui/BdsSkeleton.stories.tsx +1 -1
- package/src/web-components/ui/BdsTable.mdx +5 -1
- package/src/web-components/ui/BdsTable.stories.tsx +1 -1
- package/src/web-components/ui/BdsTypography.mdx +1 -1
- package/src/web-components/ui/BdsTypography.stories.tsx +1 -1
- package/src/web-components/ui/bds-alert.spec.ts +27 -0
- package/src/web-components/ui/bds-alert.ts +34 -1
- package/src/web-components/ui/bds-avatar.spec.ts +47 -0
- package/src/web-components/ui/bds-avatar.ts +36 -3
- package/src/web-components/ui/bds-notification-banner.spec.ts +45 -0
- package/src/web-components/ui/bds-notification-banner.ts +53 -1
- package/src/web-components/ui/bds-section-header.spec.ts +36 -3
- package/src/web-components/ui/bds-section-header.ts +32 -10
- package/src/web-components/ui/bds-separator.spec.ts +8 -0
- package/src/web-components/ui/bds-separator.ts +7 -0
- package/src/web-components/ui/bds-table.spec.ts +11 -0
- package/src/web-components/ui/bds-table.ts +5 -5
- package/dist/web-components/chunk-QZAIRJ75.js +0 -111
|
@@ -70,7 +70,7 @@ const cellStyle = {
|
|
|
70
70
|
const meta = {
|
|
71
71
|
title: 'Web Components/Layout/Grid',
|
|
72
72
|
component: BdsGrid,
|
|
73
|
-
tags: ['!stable', '
|
|
73
|
+
tags: ['!stable', 'alpha'],
|
|
74
74
|
parameters: { layout: 'padded' },
|
|
75
75
|
argTypes: {
|
|
76
76
|
variant: { control: 'select', options: ['main', 'page', 'funnel', 'custom'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsGridItem.stories';
|
|
|
7
7
|
|
|
8
8
|
Grid cell for `<bds-grid>`. Sets `grid-column` / `grid-row` on its host element using the foundation span tokens.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Examples
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsAlert.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic alert custom element for inline status messages. Supports four semantic variants, an optional heading, and a dismissible mode.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -38,6 +38,9 @@ import '@boostdev/design-system-components/web-components';
|
|
|
38
38
|
### Dismissible
|
|
39
39
|
<Canvas of={Stories.Dismissible} />
|
|
40
40
|
|
|
41
|
+
### Gradient
|
|
42
|
+
<Canvas of={Stories.Gradient} />
|
|
43
|
+
|
|
41
44
|
## Props
|
|
42
45
|
|
|
43
46
|
<ArgTypes of={Stories} />
|
|
@@ -47,6 +50,7 @@ import '@boostdev/design-system-components/web-components';
|
|
|
47
50
|
| Attribute | Type | Default | Description |
|
|
48
51
|
|-----------|------|---------|-------------|
|
|
49
52
|
| `variant` | `"info" \| "success" \| "warning" \| "error"` | `"info"` | Semantic colour and icon |
|
|
53
|
+
| `appearance` | `"default" \| "gradient"` | `"default"` | `gradient` fades the variant tint to the surface, with a 3px accent line and a shadow |
|
|
50
54
|
| `heading` | string | — | Optional heading displayed above body content |
|
|
51
55
|
| `title` | string | — | **Deprecated.** Alias for `heading`, used as a fallback when `heading` is unset. Avoid: it shares its name with the global HTML `title` attribute, which makes the browser show a native tooltip on hover. Will be removed in a later major — use `heading` instead. |
|
|
52
56
|
| `dismissible` | boolean | `false` | Shows a dismiss (×) button |
|
|
@@ -58,6 +62,20 @@ import '@boostdev/design-system-components/web-components';
|
|
|
58
62
|
| `(default)` | Alert body text or content |
|
|
59
63
|
| `icon` | Custom icon, placed left of the content area |
|
|
60
64
|
|
|
65
|
+
## CSS Custom Properties
|
|
66
|
+
|
|
67
|
+
| Property | Default | Description |
|
|
68
|
+
|----------|---------|-------------|
|
|
69
|
+
| `--alert_bg` / `--alert_text` / `--alert_border` | per variant | Colours for all variants. Per-variant forms: `--alert_bg--info`, `--alert_text--info`, `--alert_border--info` (and `success`, `warning`, `error`). |
|
|
70
|
+
| `--alert_border-width` | `var(--bds-space_s)` (`3px` with `appearance="gradient"`) | Width of the inline-start accent line |
|
|
71
|
+
| `--alert_gradient` | `linear-gradient(100deg, transparent 35%, var(--bds-color_bg--strong, var(--bds-color_bg)) 100%)` | Gradient over the variant background, `appearance="gradient"` only |
|
|
72
|
+
| `--alert_shadow` | `var(--bds-shadow_s)` | Box shadow, `appearance="gradient"` only |
|
|
73
|
+
| `--alert_accent--info` | `var(--bds-color_on-blue--subtle)` | Accent line colour with `appearance="gradient"`; `--alert_border--info` and `--alert_border` win |
|
|
74
|
+
| `--alert_accent--success` | `var(--bds-color_on-success--subtle)` | Same, success |
|
|
75
|
+
| `--alert_accent--warning` | `var(--bds-color_warning)` | Same, warning |
|
|
76
|
+
| `--alert_accent--error` | `var(--bds-color_error)` | Same, error |
|
|
77
|
+
| `--alert_dismiss-border` / `--alert_dismiss-radius` / `--alert_dismiss-opacity--hover` | | Dismiss button border, radius and hover opacity |
|
|
78
|
+
|
|
61
79
|
## Events
|
|
62
80
|
|
|
63
81
|
| Event | Detail | Bubbles | Composed | Description |
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import type { AlertVariant } from './bds-alert';
|
|
3
|
+
import type { AlertAppearance, AlertVariant } from './bds-alert';
|
|
4
4
|
import '../index'; // auto-registers all custom elements
|
|
5
5
|
|
|
6
6
|
// Thin React wrapper so Storybook controls work with the custom element's props
|
|
7
7
|
function BdsAlert({
|
|
8
8
|
variant = 'info',
|
|
9
|
+
appearance,
|
|
9
10
|
heading,
|
|
10
11
|
dismissible,
|
|
11
12
|
children,
|
|
12
13
|
onDismiss,
|
|
13
14
|
}: {
|
|
14
15
|
variant?: AlertVariant;
|
|
16
|
+
appearance?: AlertAppearance;
|
|
15
17
|
heading?: string;
|
|
16
18
|
dismissible?: boolean;
|
|
17
19
|
children?: React.ReactNode;
|
|
@@ -19,7 +21,7 @@ function BdsAlert({
|
|
|
19
21
|
}) {
|
|
20
22
|
return React.createElement(
|
|
21
23
|
'bds-alert',
|
|
22
|
-
{ variant, heading, dismissible: dismissible || undefined, onbdsdismiss: onDismiss },
|
|
24
|
+
{ variant, appearance, heading, dismissible: dismissible || undefined, onbdsdismiss: onDismiss },
|
|
23
25
|
children,
|
|
24
26
|
);
|
|
25
27
|
}
|
|
@@ -27,10 +29,11 @@ function BdsAlert({
|
|
|
27
29
|
const meta = {
|
|
28
30
|
title: 'Web Components/UI/Alert',
|
|
29
31
|
component: BdsAlert,
|
|
30
|
-
tags: ['!stable', '
|
|
32
|
+
tags: ['!stable', 'alpha'],
|
|
31
33
|
parameters: { layout: 'padded' },
|
|
32
34
|
argTypes: {
|
|
33
35
|
variant: { control: 'select', options: ['info', 'success', 'warning', 'error'] },
|
|
36
|
+
appearance: { control: 'select', options: ['default', 'gradient'] },
|
|
34
37
|
},
|
|
35
38
|
} satisfies Meta<typeof BdsAlert>;
|
|
36
39
|
|
|
@@ -58,3 +61,26 @@ export const AllVariants: Story = {
|
|
|
58
61
|
</div>
|
|
59
62
|
),
|
|
60
63
|
};
|
|
64
|
+
|
|
65
|
+
const gradientIcon = (path: string) =>
|
|
66
|
+
React.createElement(
|
|
67
|
+
'svg',
|
|
68
|
+
{ slot: 'icon', viewBox: '0 0 24 24', width: 20, height: 20, fill: 'none', stroke: 'currentColor', strokeWidth: 2, strokeLinecap: 'round', strokeLinejoin: 'round' },
|
|
69
|
+
React.createElement('circle', { cx: 12, cy: 12, r: 10 }),
|
|
70
|
+
React.createElement('path', { d: path }),
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
export const Gradient: Story = {
|
|
74
|
+
render: () => (
|
|
75
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px', maxWidth: 500 }}>
|
|
76
|
+
{(['info', 'success', 'warning', 'error'] as const).map(v =>
|
|
77
|
+
React.createElement(
|
|
78
|
+
'bds-alert',
|
|
79
|
+
{ key: v, variant: v, appearance: 'gradient', heading: v.charAt(0).toUpperCase() + v.slice(1) },
|
|
80
|
+
gradientIcon(v === 'success' ? 'm8 12 3 3 5-6' : v === 'info' ? 'M12 16v-4M12 8h.01' : 'M12 7v6M12 16h.01'),
|
|
81
|
+
`This is a ${v} alert.`,
|
|
82
|
+
),
|
|
83
|
+
)}
|
|
84
|
+
</div>
|
|
85
|
+
),
|
|
86
|
+
};
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsAvatar.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Avatar custom element. Displays a user photo when `src` is provided, or falls back to initials derived from the `name` attribute.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -37,6 +37,12 @@ import '@boostdev/design-system-components/web-components';
|
|
|
37
37
|
### Large
|
|
38
38
|
<Canvas of={Stories.Large} />
|
|
39
39
|
|
|
40
|
+
### Tones
|
|
41
|
+
<Canvas of={Stories.AllTones} />
|
|
42
|
+
|
|
43
|
+
### Automatic tone from the name
|
|
44
|
+
<Canvas of={Stories.AutoTone} />
|
|
45
|
+
|
|
40
46
|
## Props
|
|
41
47
|
|
|
42
48
|
<ArgTypes of={Stories} />
|
|
@@ -49,6 +55,7 @@ import '@boostdev/design-system-components/web-components';
|
|
|
49
55
|
| `alt` | string | `name` or `"User avatar"` | Alt text for the `<img>` element. Pass `alt=""` explicitly to mark a decorative image — an empty attribute is preserved as-is and is not replaced by `name`/`"User avatar"`. |
|
|
50
56
|
| `name` | string | — | Full name; used to compute up to two initials and as `aria-label` |
|
|
51
57
|
| `size` | `"small" \| "medium" \| "large"` | `"medium"` | Diameter scale |
|
|
58
|
+
| `tone` | `"auto" \| "primary" \| "secondary" \| "accent-1" \| "accent-2" \| "accent-3"` | `"auto"` | Colour of the initials fallback. `auto` picks a tone from `name` (same name, same tone; no name gives `primary`). Image avatars ignore it. |
|
|
52
59
|
|
|
53
60
|
## CSS Custom Properties
|
|
54
61
|
|
|
@@ -56,8 +63,18 @@ import '@boostdev/design-system-components/web-components';
|
|
|
56
63
|
|----------|-------------|
|
|
57
64
|
| `--avatar_size` | Diameter override (wins over the `size` attribute's preset); defaults to `3em` |
|
|
58
65
|
| `--avatar_radius` | Corner radius; defaults to `var(--bds-border_radius--circle)` |
|
|
59
|
-
| `--avatar_bg` | Background colour of the fallback initials circle |
|
|
60
|
-
| `--avatar_text` | Text colour of the initials |
|
|
66
|
+
| `--avatar_bg` | Background colour of the fallback initials circle; wins over every tone |
|
|
67
|
+
| `--avatar_text` | Text colour of the initials; wins over every tone |
|
|
68
|
+
| `--avatar_bg--primary` | Background for `tone="primary"`; defaults to `var(--bds-color_primary--subtle)` |
|
|
69
|
+
| `--avatar_text--primary` | Text colour for `tone="primary"`; defaults to `var(--bds-color_on-primary--subtle)` |
|
|
70
|
+
| `--avatar_bg--secondary` | Background for `tone="secondary"`; defaults to `var(--bds-color_secondary--subtle)` |
|
|
71
|
+
| `--avatar_text--secondary` | Text colour for `tone="secondary"`; defaults to `var(--bds-color_on-secondary--subtle)` |
|
|
72
|
+
| `--avatar_bg--accent-1` | Background for `tone="accent-1"`; defaults to `var(--bds-color_accent-1--subtle)` |
|
|
73
|
+
| `--avatar_text--accent-1` | Text colour for `tone="accent-1"`; defaults to `var(--bds-color_on-accent-1--subtle)` |
|
|
74
|
+
| `--avatar_bg--accent-2` | Background for `tone="accent-2"`; defaults to `var(--bds-color_accent-2--subtle)` |
|
|
75
|
+
| `--avatar_text--accent-2` | Text colour for `tone="accent-2"`; defaults to `var(--bds-color_on-accent-2--subtle)` |
|
|
76
|
+
| `--avatar_bg--accent-3` | Background for `tone="accent-3"`; defaults to `var(--bds-color_accent-3--subtle)` |
|
|
77
|
+
| `--avatar_text--accent-3` | Text colour for `tone="accent-3"`; defaults to `var(--bds-color_on-accent-3--subtle)` |
|
|
61
78
|
|
|
62
79
|
## Usage in plain HTML
|
|
63
80
|
|
|
@@ -7,22 +7,25 @@ function BdsAvatar({
|
|
|
7
7
|
alt,
|
|
8
8
|
name,
|
|
9
9
|
size = 'medium',
|
|
10
|
+
tone = 'auto',
|
|
10
11
|
}: {
|
|
11
12
|
src?: string;
|
|
12
13
|
alt?: string;
|
|
13
14
|
name?: string;
|
|
14
15
|
size?: 'small' | 'medium' | 'large';
|
|
16
|
+
tone?: 'auto' | 'primary' | 'secondary' | 'accent-1' | 'accent-2' | 'accent-3';
|
|
15
17
|
}) {
|
|
16
|
-
return React.createElement('bds-avatar', { src, alt, name, size });
|
|
18
|
+
return React.createElement('bds-avatar', { src, alt, name, size, tone });
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
const meta = {
|
|
20
22
|
title: 'Web Components/UI/Avatar',
|
|
21
23
|
component: BdsAvatar,
|
|
22
|
-
tags: ['!stable', '
|
|
24
|
+
tags: ['!stable', 'alpha'],
|
|
23
25
|
parameters: { layout: 'centered' },
|
|
24
26
|
argTypes: {
|
|
25
27
|
size: { control: 'select', options: ['small', 'medium', 'large'] },
|
|
28
|
+
tone: { control: 'select', options: ['auto', 'primary', 'secondary', 'accent-1', 'accent-2', 'accent-3'] },
|
|
26
29
|
},
|
|
27
30
|
} satisfies Meta<typeof BdsAvatar>;
|
|
28
31
|
|
|
@@ -46,3 +49,23 @@ export const AllSizes: Story = {
|
|
|
46
49
|
</div>
|
|
47
50
|
),
|
|
48
51
|
};
|
|
52
|
+
|
|
53
|
+
export const AllTones: Story = {
|
|
54
|
+
render: () => (
|
|
55
|
+
<div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
|
|
56
|
+
{['primary', 'secondary', 'accent-1', 'accent-2', 'accent-3'].map(tone =>
|
|
57
|
+
React.createElement('bds-avatar', { key: tone, name: tone, tone }),
|
|
58
|
+
)}
|
|
59
|
+
</div>
|
|
60
|
+
),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const AutoTone: Story = {
|
|
64
|
+
render: () => (
|
|
65
|
+
<div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
|
|
66
|
+
{['Jane Doe', 'Bjorn Boonen', 'Sam Visser', 'Noor de Vries', 'Lars Bakker'].map(name =>
|
|
67
|
+
React.createElement('bds-avatar', { key: name, name }),
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
),
|
|
71
|
+
};
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsBadge.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic badge custom element for short status labels and counts. Five semantic variants covering the common status palette.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -11,7 +11,7 @@ function BdsBadge({ variant = 'primary', children }: { variant?: BadgeVariant; c
|
|
|
11
11
|
const meta = {
|
|
12
12
|
title: 'Web Components/UI/Badge',
|
|
13
13
|
component: BdsBadge,
|
|
14
|
-
tags: ['!stable', '
|
|
14
|
+
tags: ['!stable', 'alpha'],
|
|
15
15
|
parameters: { layout: 'centered' },
|
|
16
16
|
argTypes: {
|
|
17
17
|
variant: { control: 'select', options: ['primary', 'secondary', 'success', 'error', 'warning'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsBreadcrumb.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Breadcrumb custom element. Renders a horizontal navigation trail from a JSON array of `{ label, href? }` items. The last item is treated as the current page and rendered without a link. Non-last items without an `href` render as plain (non-interactive) text instead of an unusable link.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -10,7 +10,7 @@ function BdsBreadcrumb({ items = [] }: { items?: BreadcrumbItem[] }) {
|
|
|
10
10
|
const meta = {
|
|
11
11
|
title: 'Web Components/UI/Breadcrumb',
|
|
12
12
|
component: BdsBreadcrumb,
|
|
13
|
-
tags: ['!stable', '
|
|
13
|
+
tags: ['!stable', 'alpha'],
|
|
14
14
|
parameters: { layout: 'centered' },
|
|
15
15
|
} satisfies Meta<typeof BdsBreadcrumb>;
|
|
16
16
|
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsButtonContainer.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic layout wrapper for a row of action buttons (Cancel / Confirm, Back / Next). Web-component port of the React `ButtonContainer`.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
Buttons stack vertically (primary on top, via `column-reverse`) on narrow containers and lay out in a row once the container is at least `30rem` wide. The `variant` controls alignment: `flow` (multi-step navigation), `card` (single-form submit), `modal` (dialog actions, aligned end), `content` (inline actions, aligned start).
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ function BdsButtonContainer({
|
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'Web Components/Layout/ButtonContainer',
|
|
20
20
|
component: BdsButtonContainer,
|
|
21
|
-
tags: ['!stable', '
|
|
21
|
+
tags: ['!stable', 'alpha'],
|
|
22
22
|
parameters: { layout: 'padded' },
|
|
23
23
|
argTypes: {
|
|
24
24
|
variant: { control: 'radio', options: ['flow', 'card', 'modal', 'content'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsCalendar.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Calendar date picker custom element. Renders a keyboard-navigable month grid for selecting a date. Participates in HTML forms via the Form-Associated Custom Elements API.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ function BdsCalendar({
|
|
|
20
20
|
const meta = {
|
|
21
21
|
title: 'Web Components/UI/Calendar',
|
|
22
22
|
component: BdsCalendar,
|
|
23
|
-
tags: ['!stable', '
|
|
23
|
+
tags: ['!stable', 'alpha'],
|
|
24
24
|
parameters: { layout: 'centered' },
|
|
25
25
|
argTypes: {
|
|
26
26
|
value: { control: 'text' },
|
|
@@ -8,7 +8,7 @@ import * as Stories from './BdsCalendarRange.stories';
|
|
|
8
8
|
Form-associated range date picker custom element. Two-click selection with
|
|
9
9
|
hover/focus preview; value is an ISO range `"YYYY-MM-DD/YYYY-MM-DD"`.
|
|
10
10
|
|
|
11
|
-
> **Status:
|
|
11
|
+
> **Status: alpha** — API may change before stable release.
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
@@ -13,7 +13,7 @@ function BdsCalendarRange({
|
|
|
13
13
|
const meta = {
|
|
14
14
|
title: 'Web Components/UI/CalendarRange',
|
|
15
15
|
component: BdsCalendarRange,
|
|
16
|
-
tags: ['!stable', '
|
|
16
|
+
tags: ['!stable', 'alpha'],
|
|
17
17
|
parameters: { layout: 'centered' },
|
|
18
18
|
argTypes: {
|
|
19
19
|
value: { control: 'text' },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsCard.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Card layout custom element. A versatile container with three visual variants, five padding variants, text alignment, and an optional clickable mode. Each padding variant's resolved value can be overridden via the `--card_padding` CSS custom property.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -34,7 +34,7 @@ function BdsCard({
|
|
|
34
34
|
const meta = {
|
|
35
35
|
title: 'Web Components/Layout/Card',
|
|
36
36
|
component: BdsCard,
|
|
37
|
-
tags: ['!stable', '
|
|
37
|
+
tags: ['!stable', 'alpha'],
|
|
38
38
|
parameters: { layout: 'centered' },
|
|
39
39
|
argTypes: {
|
|
40
40
|
variant: { control: 'select', options: ['default', 'elevated', 'outlined'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsCarousel.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Carousel custom element. A scroll-snap based slider where each direct child becomes a slide. Supports dot indicators, looping, and custom previous/next buttons via named slots.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -47,7 +47,7 @@ const slides = ['Slide 1', 'Slide 2', 'Slide 3'].map(label =>
|
|
|
47
47
|
const meta = {
|
|
48
48
|
title: 'Web Components/UI/Carousel',
|
|
49
49
|
component: BdsCarousel,
|
|
50
|
-
tags: ['!stable', '
|
|
50
|
+
tags: ['!stable', 'alpha'],
|
|
51
51
|
parameters: { layout: 'padded' },
|
|
52
52
|
argTypes: {
|
|
53
53
|
currentIndex: { control: 'number' },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsDescriptionList.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Description List custom element. Wraps slotted `<dt>`/`<dd>` pairs in a styled `<dl>` with stacked or inline layout.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ function BdsDescriptionList({
|
|
|
15
15
|
const meta = {
|
|
16
16
|
title: 'Web Components/UI/DescriptionList',
|
|
17
17
|
component: BdsDescriptionList,
|
|
18
|
-
tags: ['!stable', '
|
|
18
|
+
tags: ['!stable', 'alpha'],
|
|
19
19
|
parameters: { layout: 'centered' },
|
|
20
20
|
argTypes: {
|
|
21
21
|
layout: { control: 'radio', options: ['stacked', 'inline'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsIconWrapper.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Icon Wrapper custom element. Displays a slotted icon inside a circular container with design-system background and foreground colour theming.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ function BdsIconWrapper({
|
|
|
25
25
|
const meta = {
|
|
26
26
|
title: 'Web Components/Layout/IconWrapper',
|
|
27
27
|
component: BdsIconWrapper,
|
|
28
|
-
tags: ['!stable', '
|
|
28
|
+
tags: ['!stable', 'alpha'],
|
|
29
29
|
parameters: { layout: 'centered' },
|
|
30
30
|
argTypes: {
|
|
31
31
|
ariaHidden: { control: 'text' },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsLink.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Link custom element. Renders a styled `<a>` tag with three visual variants, automatic external link handling, and design-token colours.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -34,7 +34,7 @@ function BdsLink({
|
|
|
34
34
|
const meta = {
|
|
35
35
|
title: 'Web Components/UI/Link',
|
|
36
36
|
component: BdsLink,
|
|
37
|
-
tags: ['!stable', '
|
|
37
|
+
tags: ['!stable', 'alpha'],
|
|
38
38
|
parameters: { layout: 'centered' },
|
|
39
39
|
argTypes: {
|
|
40
40
|
variant: { control: 'select', options: ['default', 'subtle', 'standalone'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsLoading.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Loading spinner custom element. Displays an animated circular spinner to indicate that a process is in progress.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -9,7 +9,7 @@ function BdsLoading({ size = 'medium' }: { size?: 'small' | 'medium' | 'large' }
|
|
|
9
9
|
const meta = {
|
|
10
10
|
title: 'Web Components/UI/Loading',
|
|
11
11
|
component: BdsLoading,
|
|
12
|
-
tags: ['!stable', '
|
|
12
|
+
tags: ['!stable', 'alpha'],
|
|
13
13
|
parameters: { layout: 'centered' },
|
|
14
14
|
argTypes: {
|
|
15
15
|
size: { control: 'select', options: ['small', 'medium', 'large'] },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsNotificationBanner.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Notification Banner custom element. Renders a full-width status banner at the top of a page or section with optional dismiss button and action slot.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -38,6 +38,9 @@ import '@boostdev/design-system-components/web-components';
|
|
|
38
38
|
### Error
|
|
39
39
|
<Canvas of={Stories.Error} />
|
|
40
40
|
|
|
41
|
+
### Gradient
|
|
42
|
+
<Canvas of={Stories.Gradient} />
|
|
43
|
+
|
|
41
44
|
### Dismissible
|
|
42
45
|
<Canvas of={Stories.Dismissible} />
|
|
43
46
|
|
|
@@ -53,6 +56,7 @@ import '@boostdev/design-system-components/web-components';
|
|
|
53
56
|
| Attribute | Type | Default | Description |
|
|
54
57
|
|-----------|------|---------|-------------|
|
|
55
58
|
| `variant` | `"info" \| "success" \| "warning" \| "error"` | `"info"` | Visual style and semantic urgency |
|
|
59
|
+
| `appearance` | `"default" \| "gradient"` | `"default"` | `gradient` fades the variant tint to the surface and adds a shadow |
|
|
56
60
|
| `dismissible` | boolean | `false` | Shows a dismiss (×) button |
|
|
57
61
|
| `dismiss-label` | string | `"Dismiss notification"` | `aria-label` for the dismiss button |
|
|
58
62
|
|
|
@@ -61,6 +65,7 @@ import '@boostdev/design-system-components/web-components';
|
|
|
61
65
|
| Slot | Description |
|
|
62
66
|
|------|-------------|
|
|
63
67
|
| `(default)` | Banner body text or HTML |
|
|
68
|
+
| `icon` | Optional icon before the content (rendered `aria-hidden`) |
|
|
64
69
|
| `action` | Optional action area (e.g. a `<button>` or `<a>`) |
|
|
65
70
|
|
|
66
71
|
## CSS Custom Properties
|
|
@@ -74,6 +79,10 @@ import '@boostdev/design-system-components/web-components';
|
|
|
74
79
|
| `--banner_bg--success` / `--banner_text--success` / `--banner_border--success` | Success variant colours |
|
|
75
80
|
| `--banner_bg--warning` / `--banner_text--warning` / `--banner_border--warning` | Warning variant colours |
|
|
76
81
|
| `--banner_bg--error` / `--banner_text--error` / `--banner_border--error` | Error variant colours |
|
|
82
|
+
| `--banner_border-width` | Width of the block-end accent line (default `3px`) |
|
|
83
|
+
| `--banner_gradient` | Gradient over the variant background, `appearance="gradient"` only (default `linear-gradient(100deg, transparent 35%, var(--bds-color_bg--strong, var(--bds-color_bg)) 100%)`) |
|
|
84
|
+
| `--banner_shadow` | Box shadow, `appearance="gradient"` only (default `var(--bds-shadow_s)`) |
|
|
85
|
+
| `--banner_accent--info` / `--banner_accent--success` / `--banner_accent--warning` / `--banner_accent--error` | Accent line colour with `appearance="gradient"` (defaults `--bds-color_on-blue--subtle`, `--bds-color_on-success--subtle`, `--bds-color_warning`, `--bds-color_error`). `--banner_border--{variant}` and `--banner_border` win. |
|
|
77
86
|
| `--banner_dismiss-size` | Dismiss button minimum touch target (default `2.75rem`, WCAG 2.5.5); the visible icon stays 1rem |
|
|
78
87
|
| `--banner_dismiss-radius` | Dismiss button border radius |
|
|
79
88
|
| `--banner_dismiss-border` | Dismiss button border |
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import type { NotificationBannerVariant } from './bds-notification-banner';
|
|
3
|
+
import type { NotificationBannerAppearance, NotificationBannerVariant } from './bds-notification-banner';
|
|
4
4
|
import '../index'; // auto-registers all custom elements
|
|
5
5
|
|
|
6
6
|
function BdsNotificationBanner({
|
|
7
7
|
variant = 'info',
|
|
8
|
+
appearance,
|
|
8
9
|
dismissible,
|
|
9
10
|
dismissLabel,
|
|
10
11
|
children,
|
|
11
12
|
action,
|
|
12
13
|
}: {
|
|
13
14
|
variant?: NotificationBannerVariant;
|
|
15
|
+
appearance?: NotificationBannerAppearance;
|
|
14
16
|
dismissible?: boolean;
|
|
15
17
|
dismissLabel?: string;
|
|
16
18
|
children?: React.ReactNode;
|
|
@@ -20,6 +22,7 @@ function BdsNotificationBanner({
|
|
|
20
22
|
'bds-notification-banner',
|
|
21
23
|
{
|
|
22
24
|
variant,
|
|
25
|
+
appearance,
|
|
23
26
|
dismissible: dismissible || undefined,
|
|
24
27
|
'dismiss-label': dismissLabel,
|
|
25
28
|
},
|
|
@@ -33,10 +36,11 @@ function BdsNotificationBanner({
|
|
|
33
36
|
const meta = {
|
|
34
37
|
title: 'Web Components/UI/NotificationBanner',
|
|
35
38
|
component: BdsNotificationBanner,
|
|
36
|
-
tags: ['!stable', '
|
|
39
|
+
tags: ['!stable', 'alpha'],
|
|
37
40
|
parameters: { layout: 'fullscreen' },
|
|
38
41
|
argTypes: {
|
|
39
42
|
variant: { control: 'select', options: ['info', 'success', 'warning', 'error'] },
|
|
43
|
+
appearance: { control: 'select', options: ['default', 'gradient'] },
|
|
40
44
|
dismissible: { control: 'boolean' },
|
|
41
45
|
},
|
|
42
46
|
} satisfies Meta<typeof BdsNotificationBanner>;
|
|
@@ -82,3 +86,26 @@ export const AllVariants: Story = {
|
|
|
82
86
|
</div>
|
|
83
87
|
),
|
|
84
88
|
};
|
|
89
|
+
|
|
90
|
+
const gradientIcon = (path: string) =>
|
|
91
|
+
React.createElement(
|
|
92
|
+
'svg',
|
|
93
|
+
{ slot: 'icon', viewBox: '0 0 24 24', width: 20, height: 20, fill: 'none', stroke: 'currentColor', strokeWidth: 2, strokeLinecap: 'round', strokeLinejoin: 'round' },
|
|
94
|
+
React.createElement('circle', { cx: 12, cy: 12, r: 10 }),
|
|
95
|
+
React.createElement('path', { d: path }),
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
export const Gradient: Story = {
|
|
99
|
+
render: () => (
|
|
100
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
|
101
|
+
{(['info', 'success', 'warning', 'error'] as const).map(v =>
|
|
102
|
+
React.createElement(
|
|
103
|
+
'bds-notification-banner',
|
|
104
|
+
{ key: v, variant: v, appearance: 'gradient' },
|
|
105
|
+
gradientIcon(v === 'success' ? 'm8 12 3 3 5-6' : v === 'info' ? 'M12 16v-4M12 8h.01' : 'M12 7v6M12 16h.01'),
|
|
106
|
+
`This is a ${v} notification banner.`,
|
|
107
|
+
),
|
|
108
|
+
)}
|
|
109
|
+
</div>
|
|
110
|
+
),
|
|
111
|
+
};
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsPagination.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic Pagination navigation custom element. Renders previous/next buttons and a page number list with smart ellipsis truncation.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ function BdsPagination({
|
|
|
18
18
|
const meta = {
|
|
19
19
|
title: 'Web Components/UI/Pagination',
|
|
20
20
|
component: BdsPagination,
|
|
21
|
-
tags: ['!stable', '
|
|
21
|
+
tags: ['!stable', 'alpha'],
|
|
22
22
|
parameters: { layout: 'centered' },
|
|
23
23
|
argTypes: {
|
|
24
24
|
currentPage: { control: { type: 'number', min: 1 } },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsProgress.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic horizontal Progress bar custom element. Tracks progress toward a goal with optional label and percentage display.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ function BdsProgress({
|
|
|
27
27
|
const meta = {
|
|
28
28
|
title: 'Web Components/UI/Progress',
|
|
29
29
|
component: BdsProgress,
|
|
30
|
-
tags: ['!stable', '
|
|
30
|
+
tags: ['!stable', 'alpha'],
|
|
31
31
|
parameters: { layout: 'centered' },
|
|
32
32
|
argTypes: {
|
|
33
33
|
value: { control: { type: 'range', min: 0, max: 100 } },
|
|
@@ -7,7 +7,7 @@ import * as Stories from './BdsProgressCircle.stories';
|
|
|
7
7
|
|
|
8
8
|
Framework-agnostic circular Progress custom element. Renders an SVG ring that fills proportionally to the `value` attribute, with an optional centred percentage label.
|
|
9
9
|
|
|
10
|
-
> **Status:
|
|
10
|
+
> **Status: alpha** — API may change before stable release.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|