@boostdev/design-system-components 1.2.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -5
- package/README.md +55 -37
- package/dist/client.cjs +54 -51
- package/dist/client.css +525 -524
- package/dist/client.d.cts +39 -3
- package/dist/client.d.ts +39 -3
- package/dist/client.js +53 -51
- package/dist/index.cjs +54 -51
- package/dist/index.css +525 -524
- package/dist/index.d.cts +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +53 -51
- package/dist/native/index.cjs +3 -1
- package/dist/native/index.d.cts +11 -3
- package/dist/native/index.d.ts +11 -3
- package/dist/native/index.js +3 -1
- package/dist/web-components/{chunk-DZRSJGPB.js → chunk-3S42DZ7W.js} +1 -1
- package/dist/web-components/globals.js +1 -1
- package/dist/web-components/index.js +1 -1
- package/package.json +3 -3
- package/src/components/interaction/Button/Button.mdx +14 -4
- package/src/components/interaction/Button/Button.module.css +1 -1
- package/src/components/interaction/Button/Button.native.mdx +2 -2
- package/src/components/interaction/Button/Button.tsx +28 -0
- package/src/components/interaction/Command/Command.module.css +1 -1
- package/src/components/interaction/Dialog/Dialog.module.css +1 -1
- package/src/components/interaction/Dialog/Dialog.native.mdx +2 -2
- package/src/components/interaction/Drawer/Drawer.module.css +1 -1
- package/src/components/interaction/Drawer/Drawer.native.mdx +2 -2
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +1 -1
- package/src/components/interaction/DropdownMenu/DropdownMenu.native.mdx +2 -2
- package/src/components/interaction/Popover/Popover.module.css +1 -1
- package/src/components/interaction/Popover/Popover.native.mdx +2 -2
- package/src/components/interaction/Rating/Rating.module.css +1 -1
- package/src/components/interaction/Rating/Rating.native.mdx +1 -1
- package/src/components/interaction/Toast/Toast.module.css +1 -1
- package/src/components/interaction/Toast/Toast.native.mdx +3 -3
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -1
- package/src/components/interaction/form/Checkbox/Checkbox.native.mdx +1 -1
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.module.css +1 -1
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.mdx +1 -1
- package/src/components/interaction/form/Combobox/Combobox.module.css +1 -1
- package/src/components/interaction/form/Combobox/Combobox.native.mdx +1 -1
- package/src/components/interaction/form/FileInput/FileInput.module.css +1 -1
- package/src/components/interaction/form/FileInput/FileInput.native.mdx +1 -1
- package/src/components/interaction/form/FormInput/FormInput.module.css +1 -1
- package/src/components/interaction/form/FormInput/FormInput.native.mdx +1 -1
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -1
- package/src/components/interaction/form/NumberInput/NumberInput.native.mdx +1 -1
- package/src/components/interaction/form/Radio/Radio.module.css +1 -1
- package/src/components/interaction/form/RadioGroup/RadioGroup.module.css +1 -1
- package/src/components/interaction/form/RadioGroup/RadioGroup.native.mdx +1 -1
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +1 -1
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.native.mdx +1 -1
- package/src/components/interaction/form/Select/Select.module.css +1 -1
- package/src/components/interaction/form/Select/Select.native.mdx +1 -1
- package/src/components/interaction/form/Slider/Slider.module.css +1 -1
- package/src/components/interaction/form/Slider/Slider.native.mdx +1 -1
- package/src/components/interaction/form/Switch/Switch.module.css +1 -1
- package/src/components/interaction/form/Textarea/Textarea.module.css +1 -1
- package/src/components/interaction/form/Textarea/Textarea.native.mdx +1 -1
- package/src/components/interaction/form/atoms/InputContainer.module.css +1 -1
- package/src/components/interaction/form/atoms/Label.module.css +1 -1
- package/src/components/interaction/form/atoms/Message.module.css +1 -1
- package/src/components/layout/ButtonGroup/ButtonGroup.mdx +5 -3
- package/src/components/layout/ButtonGroup/ButtonGroup.module.css +2 -1
- package/src/components/layout/ButtonGroup/ButtonGroup.native.tsx +12 -2
- package/src/components/layout/ButtonGroup/ButtonGroup.spec.tsx +14 -5
- package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +10 -10
- package/src/components/layout/ButtonGroup/ButtonGroup.tsx +12 -2
- package/src/components/layout/ButtonGroup/index.ts +2 -2
- package/src/components/layout/Card/Card.module.css +1 -1
- package/src/components/layout/IconWrapper/IconWrapper.module.css +1 -1
- package/src/components/layout/SectionHeader/SectionHeader.module.css +1 -1
- package/src/components/ui/Accordion/Accordion.module.css +1 -1
- package/src/components/ui/Accordion/Accordion.native.mdx +1 -1
- package/src/components/ui/Accordion/Accordion.native.stories.tsx +1 -1
- package/src/components/ui/Alert/Alert.module.css +1 -1
- package/src/components/ui/Alert/Alert.native.mdx +1 -1
- package/src/components/ui/Avatar/Avatar.module.css +1 -1
- package/src/components/ui/Avatar/Avatar.native.mdx +1 -1
- package/src/components/ui/Badge/Badge.module.css +1 -1
- package/src/components/ui/Badge/Badge.native.mdx +1 -1
- package/src/components/ui/Breadcrumb/Breadcrumb.module.css +1 -1
- package/src/components/ui/Breadcrumb/Breadcrumb.native.mdx +1 -1
- package/src/components/ui/Calendar/Calendar.module.css +1 -1
- package/src/components/ui/Calendar/Calendar.native.mdx +1 -1
- package/src/components/ui/Carousel/Carousel.module.css +1 -1
- package/src/components/ui/Carousel/Carousel.native.mdx +1 -1
- package/src/components/ui/Collapsible/Collapsible.module.css +1 -1
- package/src/components/ui/Collapsible/Collapsible.native.mdx +1 -1
- package/src/components/ui/DescriptionList/DescriptionList.module.css +1 -1
- package/src/components/ui/DescriptionList/DescriptionList.native.mdx +1 -1
- package/src/components/ui/Link/Link.module.css +1 -1
- package/src/components/ui/Link/Link.native.mdx +1 -1
- package/src/components/ui/Loading/Loading.module.css +1 -1
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +1 -1
- package/src/components/ui/Pagination/Pagination.module.css +1 -1
- package/src/components/ui/Pagination/Pagination.native.mdx +1 -1
- package/src/components/ui/Progress/Progress.module.css +1 -1
- package/src/components/ui/ProgressCircle/ProgressCircle.module.css +1 -1
- package/src/components/ui/ProgressCircle/ProgressCircle.native.mdx +1 -1
- package/src/components/ui/Separator/Separator.module.css +1 -1
- package/src/components/ui/Skeleton/Skeleton.module.css +1 -1
- package/src/components/ui/SkipLink/SkipLink.module.css +1 -1
- package/src/components/ui/Table/Table.module.css +1 -1
- package/src/components/ui/Table/Table.native.mdx +1 -1
- package/src/components/ui/Tabs/Tabs.module.css +1 -1
- package/src/components/ui/Tabs/Tabs.native.mdx +1 -1
- package/src/components/ui/Tooltip/Tooltip.module.css +1 -1
- package/src/components/ui/Tooltip/Tooltip.native.mdx +1 -1
- package/src/components/ui/Typography/Typography.module.css +1 -1
- package/src/components/ui/Typography/Typography.native.mdx +1 -1
- package/src/css/bdc.css +1 -1
- package/src/css/index.css +1 -1
- package/src/index.ts +2 -2
- package/src/native.ts +2 -2
- package/src/stories/DesignSystem/Borders.mdx +3 -3
- package/src/stories/DesignSystem/Colors.mdx +1 -1
- package/src/stories/DesignSystem/DarkMode.mdx +3 -3
- package/src/stories/DesignSystem/Overview.mdx +16 -5
- package/src/stories/DesignSystem/Typography.mdx +1 -1
- package/src/stories/Introduction.mdx +4 -4
- package/src/stories/ReactNative.mdx +6 -6
- package/src/web-components/globals.ts +1 -1
- package/src/web-components/interaction/BdsAccordion.mdx +3 -3
- package/src/web-components/interaction/BdsAccordion.stories.tsx +1 -1
- package/src/web-components/interaction/BdsButton.mdx +2 -2
- package/src/web-components/interaction/BdsCollapsible.mdx +2 -2
- package/src/web-components/interaction/BdsDialog.mdx +2 -2
- package/src/web-components/interaction/BdsDrawer.mdx +2 -2
- package/src/web-components/interaction/BdsDropdownMenu.mdx +2 -2
- package/src/web-components/interaction/BdsPopover.mdx +1 -1
- package/src/web-components/interaction/BdsSkipLink.mdx +2 -2
- package/src/web-components/interaction/BdsTabs.mdx +2 -2
- package/src/web-components/interaction/BdsToastProvider.mdx +3 -3
- package/src/web-components/interaction/BdsTooltip.mdx +2 -2
- package/src/web-components/interaction/form/BdsCheckbox.mdx +1 -1
- package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +1 -1
- package/src/web-components/interaction/form/BdsCombobox.mdx +1 -1
- package/src/web-components/interaction/form/BdsFileInput.mdx +1 -1
- package/src/web-components/interaction/form/BdsFormInput.mdx +1 -1
- package/src/web-components/interaction/form/BdsNumberInput.mdx +1 -1
- package/src/web-components/interaction/form/BdsRadio.mdx +1 -1
- package/src/web-components/interaction/form/BdsRadioGroup.mdx +1 -1
- package/src/web-components/interaction/form/BdsSegmentedControl.mdx +1 -1
- package/src/web-components/interaction/form/BdsSelect.mdx +1 -1
- package/src/web-components/interaction/form/BdsSlider.mdx +1 -1
- package/src/web-components/interaction/form/BdsSwitch.mdx +1 -1
- package/src/web-components/interaction/form/BdsTextarea.mdx +1 -1
- package/src/web-components/ui/BdsAlert.mdx +1 -1
- package/src/web-components/ui/BdsAvatar.mdx +1 -1
- package/src/web-components/ui/BdsBadge.mdx +1 -1
- package/src/web-components/ui/BdsBreadcrumb.mdx +1 -1
- package/src/web-components/ui/BdsButtonGroup.mdx +1 -1
- package/src/web-components/ui/BdsCalendar.mdx +1 -1
- package/src/web-components/ui/BdsCard.mdx +1 -1
- package/src/web-components/ui/BdsCarousel.mdx +1 -1
- package/src/web-components/ui/BdsDescriptionList.mdx +1 -1
- package/src/web-components/ui/BdsIconWrapper.mdx +1 -1
- package/src/web-components/ui/BdsLink.mdx +1 -1
- package/src/web-components/ui/BdsLoading.mdx +1 -1
- package/src/web-components/ui/BdsNotificationBanner.mdx +1 -1
- package/src/web-components/ui/BdsPagination.mdx +1 -1
- package/src/web-components/ui/BdsProgress.mdx +1 -1
- package/src/web-components/ui/BdsProgressCircle.mdx +1 -1
- package/src/web-components/ui/BdsRating.mdx +1 -1
- package/src/web-components/ui/BdsSectionHeader.mdx +1 -1
- package/src/web-components/ui/BdsSeparator.mdx +2 -2
- package/src/web-components/ui/BdsSkeleton.mdx +1 -1
- package/src/web-components/ui/BdsTable.mdx +1 -1
- package/src/web-components/ui/BdsTypography.mdx +1 -1
package/dist/native/index.js
CHANGED
|
@@ -2045,7 +2045,7 @@ var styles23 = StyleSheet23.create({
|
|
|
2045
2045
|
gap: spacing.xs
|
|
2046
2046
|
}
|
|
2047
2047
|
});
|
|
2048
|
-
function
|
|
2048
|
+
function ButtonContainer({ children, variant, accessibilityLabel, style }) {
|
|
2049
2049
|
const isColumn = variant === "card" || variant === "modal";
|
|
2050
2050
|
return /* @__PURE__ */ jsx26(
|
|
2051
2051
|
View21,
|
|
@@ -2056,6 +2056,7 @@ function ButtonGroup({ children, variant, accessibilityLabel, style }) {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
);
|
|
2058
2058
|
}
|
|
2059
|
+
var ButtonGroup = ButtonContainer;
|
|
2059
2060
|
|
|
2060
2061
|
// src/components/interaction/Button/Button.native.tsx
|
|
2061
2062
|
import { StyleSheet as StyleSheet24, Pressable as Pressable14, Text as Text20, View as View22 } from "react-native";
|
|
@@ -4362,6 +4363,7 @@ export {
|
|
|
4362
4363
|
Badge,
|
|
4363
4364
|
Breadcrumb,
|
|
4364
4365
|
Button,
|
|
4366
|
+
ButtonContainer,
|
|
4365
4367
|
ButtonGroup,
|
|
4366
4368
|
Calendar,
|
|
4367
4369
|
Card,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-3S42DZ7W.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostdev/design-system-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "BoostDev React component library: accessible, token-driven components built on @boostdev/design-system-foundation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"changelog:unreleased": "pnpm exec git-cliff --unreleased"
|
|
285
285
|
},
|
|
286
286
|
"devDependencies": {
|
|
287
|
-
"@boostdev/design-system-foundation": "^
|
|
287
|
+
"@boostdev/design-system-foundation": "^2.0.0",
|
|
288
288
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
289
289
|
"@storybook/addon-docs": "8.6.14",
|
|
290
290
|
"@storybook/addon-essentials": "^8.6.14",
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
"zod": "^4.3.6"
|
|
320
320
|
},
|
|
321
321
|
"peerDependencies": {
|
|
322
|
-
"@boostdev/design-system-foundation": ">=
|
|
322
|
+
"@boostdev/design-system-foundation": ">=2.0.0",
|
|
323
323
|
"react": ">=18",
|
|
324
324
|
"react-dom": ">=18",
|
|
325
325
|
"react-native": ">=0.70"
|
|
@@ -8,16 +8,26 @@ import * as Stories from './Button.stories';
|
|
|
8
8
|
Primary interactive element for triggering actions. Renders as `<button>` or `<a>` depending on whether `href` is provided.
|
|
9
9
|
|
|
10
10
|
## When to use
|
|
11
|
-
- The main action on a page or dialog (`default`)
|
|
12
|
-
- Secondary or
|
|
11
|
+
- The main action on a page or dialog (`variant="default"`)
|
|
12
|
+
- Secondary or less emphatic actions (`variant="outline"`)
|
|
13
13
|
- Navigation that should look like an action (`href` → renders as `<a>`)
|
|
14
14
|
|
|
15
|
-
> **Form actions:** When using buttons in a form (submit, reset, cancel), always wrap them in a `
|
|
15
|
+
> **Form actions:** When using buttons in a form (submit, reset, cancel), always wrap them in a `ButtonContainer` component. This provides consistent spacing, alignment, and responsive layout for form actions. Use `variant="flow"` for step navigation or `variant="card"` for single-form submissions.
|
|
16
16
|
|
|
17
17
|
## When not to use
|
|
18
18
|
- Navigation to another page when it reads naturally as a link — use `Link` instead
|
|
19
19
|
- When the action is purely icon-based without a label — ensure `aria-label` is set
|
|
20
20
|
|
|
21
|
+
## HTML attribute forwarding
|
|
22
|
+
|
|
23
|
+
`Button` spreads all unrecognised props onto the underlying element (`<button>` when `href` is absent, `<a>` when `href` is provided). That means every standard HTML attribute for the target element is accepted as a prop, including:
|
|
24
|
+
|
|
25
|
+
- **Form-related (on `<button>`)**: `type` (default `"button"` — set to `"submit"` for form submission or `"reset"` to reset), `form`, `formAction`, `formMethod`, `formNoValidate`, `formTarget`, `name`, `value`, `autoFocus`.
|
|
26
|
+
- **Link-related (on `<a>`)**: `download`, `hreflang`, `ping`, `referrerPolicy` (plus the explicit `target` and `rel` props).
|
|
27
|
+
- **Universal**: `id`, `style`, `tabIndex`, `title`, `role`, all `aria-*` attributes, all `data-*` attributes, and every DOM event handler (`onFocus`, `onBlur`, `onKeyDown`, `onMouseEnter`, etc.).
|
|
28
|
+
|
|
29
|
+
> **Gotcha:** the rendered DOM shows `type="button"` by default because that is the component default — it is **not** forced. Pass `type="submit"` to wire the button to a parent `<form>`'s `onSubmit` handler (preferred over an `onClick` shim, because it preserves Enter-to-submit, native form validation, and assistive-tech semantics).
|
|
30
|
+
|
|
21
31
|
## Examples
|
|
22
32
|
|
|
23
33
|
### All variants & sizes
|
|
@@ -26,7 +36,7 @@ Primary interactive element for triggering actions. Renders as `<button>` or `<a
|
|
|
26
36
|
### Default
|
|
27
37
|
<Canvas of={Stories.Default} />
|
|
28
38
|
|
|
29
|
-
###
|
|
39
|
+
### Outline
|
|
30
40
|
<Canvas of={Stories.Ghost} />
|
|
31
41
|
|
|
32
42
|
### Sizes
|
|
@@ -12,7 +12,7 @@ React Native button component using `Pressable`. Matches the web `Button` API as
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Button } from '@boostdev/components';
|
|
15
|
+
import { Button } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
<Button variant="default" size="medium" onPress={() => console.log('pressed')}>
|
|
18
18
|
Save
|
|
@@ -22,7 +22,7 @@ import { Button } from '@boostdev/components';
|
|
|
22
22
|
Wrap your tree in `ThemeProvider` (once, at the app root):
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
25
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
25
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
26
26
|
|
|
27
27
|
export default function App() {
|
|
28
28
|
return <ThemeProvider><YourApp /></ThemeProvider>;
|
|
@@ -3,20 +3,48 @@ import css from './Button.module.css';
|
|
|
3
3
|
import { cn } from '@boostdev/design-system-foundation';
|
|
4
4
|
import type { WithClassName } from '../../../types';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Button component.
|
|
8
|
+
*
|
|
9
|
+
* Button spreads all unrecognised props onto the underlying element —
|
|
10
|
+
* `<button>` when `href` is absent, `<a>` when `href` is provided —
|
|
11
|
+
* so every standard HTML attribute for that element is accepted.
|
|
12
|
+
*
|
|
13
|
+
* Notably, this means `type`, `form`, `name`, `value`, `autoFocus`, all
|
|
14
|
+
* `aria-*`, all `data-*`, and every DOM event handler are valid props.
|
|
15
|
+
*/
|
|
6
16
|
export interface ButtonProps extends WithClassName, ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> {
|
|
17
|
+
/** When provided, the button renders as an `<a>` element pointing to this URL. */
|
|
7
18
|
href?: string;
|
|
19
|
+
/** Visual style. `'default'` is filled; `'outline'` is transparent with a border. `'ghost'` is a deprecated alias for `'outline'`. */
|
|
8
20
|
variant?: 'default' | 'outline' | /** @deprecated Use "outline" instead */ 'ghost';
|
|
21
|
+
/**
|
|
22
|
+
* Button behaviour within a form. Defaults to `'button'` (no form submission).
|
|
23
|
+
* Set to `'submit'` to trigger the parent `<form>`'s submit handler on click or Enter;
|
|
24
|
+
* `'reset'` to reset the form. Ignored when rendering as `<a>` (i.e. when `href` is set).
|
|
25
|
+
*/
|
|
9
26
|
type?: 'button' | 'submit' | 'reset';
|
|
27
|
+
/** Control height and padding. Defaults to `'medium'`. */
|
|
10
28
|
size?: 'small' | 'medium' | 'large';
|
|
29
|
+
/** Icon rendered before the label. */
|
|
11
30
|
iconStart?: ReactNode;
|
|
31
|
+
/** Icon rendered after the label. */
|
|
12
32
|
iconEnd?: ReactNode;
|
|
33
|
+
/** Label content. Required unless `aria-label` is set (icon-only button). */
|
|
13
34
|
children?: ReactNode;
|
|
35
|
+
/** When true, blocks interaction, sets `aria-disabled`, and removes the element from the tab order. */
|
|
14
36
|
disabled?: boolean;
|
|
37
|
+
/** Adds a pulsing animation for call-to-action emphasis. Respects `prefers-reduced-motion`. */
|
|
15
38
|
hasPulse?: boolean;
|
|
39
|
+
/** Click handler. Typed as `HTMLElement` because the root may be `<button>` or `<a>`. */
|
|
16
40
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
41
|
+
/** Anchor target (only applied when rendered as `<a>`). */
|
|
17
42
|
target?: string;
|
|
43
|
+
/** Anchor rel (only applied when rendered as `<a>`). */
|
|
18
44
|
rel?: string;
|
|
45
|
+
/** Accessible label. Required for icon-only buttons (no text children). */
|
|
19
46
|
'aria-label'?: string;
|
|
47
|
+
/** ID(s) of element(s) that describe the button (e.g. a tooltip or helper text). */
|
|
20
48
|
'aria-describedby'?: string;
|
|
21
49
|
}
|
|
22
50
|
|
|
@@ -12,7 +12,7 @@ A modal dialog overlay that centers content on screen with a semi-transparent ba
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Dialog } from '@boostdev/components';
|
|
15
|
+
import { Dialog } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
const [open, setOpen] = useState(false);
|
|
18
18
|
|
|
@@ -25,7 +25,7 @@ const [open, setOpen] = useState(false);
|
|
|
25
25
|
Wrap your tree in `ThemeProvider` (once, at the app root):
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
28
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
29
29
|
|
|
30
30
|
export default function App() {
|
|
31
31
|
return <ThemeProvider><YourApp /></ThemeProvider>;
|
|
@@ -12,7 +12,7 @@ A sliding panel that slides in from the bottom of the screen. Built on React Nat
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Drawer } from '@boostdev/components';
|
|
15
|
+
import { Drawer } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
const [open, setOpen] = useState(false);
|
|
18
18
|
|
|
@@ -25,7 +25,7 @@ const [open, setOpen] = useState(false);
|
|
|
25
25
|
Wrap your tree in `ThemeProvider` (once, at the app root):
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
28
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
29
29
|
|
|
30
30
|
export default function App() {
|
|
31
31
|
return <ThemeProvider><YourApp /></ThemeProvider>;
|
|
@@ -12,7 +12,7 @@ A dropdown menu that opens as a bottom sheet modal on mobile. Accepts a trigger
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { DropdownMenu } from '@boostdev/components';
|
|
15
|
+
import { DropdownMenu } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
<DropdownMenu
|
|
18
18
|
trigger={<Button>Actions</Button>}
|
|
@@ -27,7 +27,7 @@ import { DropdownMenu } from '@boostdev/components';
|
|
|
27
27
|
Wrap your tree in `ThemeProvider` (once, at the app root):
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
30
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
31
31
|
|
|
32
32
|
export default function App() {
|
|
33
33
|
return <ThemeProvider><YourApp /></ThemeProvider>;
|
|
@@ -12,7 +12,7 @@ A popover overlay that displays content in a centered modal. The trigger element
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Popover } from '@boostdev/components';
|
|
15
|
+
import { Popover } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
<Popover
|
|
18
18
|
content={<Text>Additional information here.</Text>}
|
|
@@ -25,7 +25,7 @@ import { Popover } from '@boostdev/components';
|
|
|
25
25
|
Wrap your tree in `ThemeProvider` (once, at the app root):
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
28
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
29
29
|
|
|
30
30
|
export default function App() {
|
|
31
31
|
return <ThemeProvider><YourApp /></ThemeProvider>;
|
|
@@ -12,7 +12,7 @@ React Native read-only star rating display using text characters. Shows filled a
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Rating } from '@boostdev/components';
|
|
15
|
+
import { Rating } from '@boostdev/design-system-components';
|
|
16
16
|
|
|
17
17
|
<Rating value={4} />
|
|
18
18
|
<Rating value={7} max={10} />
|
|
@@ -14,8 +14,8 @@ A toast notification system using React context. Provides `ToastProvider` and `u
|
|
|
14
14
|
Wrap your app root in `ToastProvider`:
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
-
import { ToastProvider } from '@boostdev/components';
|
|
18
|
-
import { ThemeProvider } from '@boostdev/components/native/ThemeContext';
|
|
17
|
+
import { ToastProvider } from '@boostdev/design-system-components';
|
|
18
|
+
import { ThemeProvider } from '@boostdev/design-system-components/native/ThemeContext';
|
|
19
19
|
|
|
20
20
|
export default function App() {
|
|
21
21
|
return (
|
|
@@ -31,7 +31,7 @@ export default function App() {
|
|
|
31
31
|
Then use `useToast` in any descendant:
|
|
32
32
|
|
|
33
33
|
```tsx
|
|
34
|
-
import { useToast } from '@boostdev/components';
|
|
34
|
+
import { useToast } from '@boostdev/design-system-components';
|
|
35
35
|
|
|
36
36
|
function SaveButton() {
|
|
37
37
|
const { showToast } = useToast();
|
|
@@ -12,7 +12,7 @@ React Native checkbox component with label, optional hint, and error state. Full
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Checkbox } from '@boostdev/components';
|
|
15
|
+
import { Checkbox } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ Groups related checkboxes under a common legend with optional hint and error mes
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { CheckboxGroup, Checkbox } from '@boostdev/components';
|
|
15
|
+
import { CheckboxGroup, Checkbox } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ A text input with a filterable dropdown list. Type to filter options, tap to sel
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Combobox } from '@boostdev/components';
|
|
15
|
+
import { Combobox } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
const options = [
|
|
@@ -12,7 +12,7 @@ A file selection area that displays an upload prompt. In React Native, actual fi
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { FileInput } from '@boostdev/components';
|
|
15
|
+
import { FileInput } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
import * as DocumentPicker from 'expo-document-picker';
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ Text input field with label, optional hint, and error state. Maps the `type` pro
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { FormInput } from '@boostdev/components';
|
|
15
|
+
import { FormInput } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ Numeric input with stepper buttons on each side. Supports min/max clamping, conf
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { NumberInput } from '@boostdev/components';
|
|
15
|
+
import { NumberInput } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ Groups related radio buttons under a common legend with optional hint and error
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { RadioGroup, Radio } from '@boostdev/components';
|
|
15
|
+
import { RadioGroup, Radio } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ A horizontal control with multiple segments, where each segment acts as a tab. S
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { SegmentedControl } from '@boostdev/components';
|
|
15
|
+
import { SegmentedControl } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ Dropdown-style select component. Renders a trigger button that opens a bottom sh
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Select } from '@boostdev/components';
|
|
15
|
+
import { Select } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
const options = [
|
|
@@ -12,7 +12,7 @@ Range slider with a draggable track, optional value display, and error/hint mess
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Slider } from '@boostdev/components';
|
|
15
|
+
import { Slider } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -12,7 +12,7 @@ Multiline text input with label, optional hint, and error state. Uses a `TextInp
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
|
-
import { Textarea } from '@boostdev/components';
|
|
15
|
+
import { Textarea } from '@boostdev/design-system-components';
|
|
16
16
|
import { useState } from 'react';
|
|
17
17
|
|
|
18
18
|
function Example() {
|
|
@@ -3,11 +3,13 @@ import * as Stories from './ButtonGroup.stories';
|
|
|
3
3
|
|
|
4
4
|
<Meta of={Stories} />
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# ButtonContainer
|
|
7
7
|
|
|
8
|
-
Layout wrapper that arranges `Button` children according to a contextual variant. Handles spacing, alignment, and direction.
|
|
8
|
+
Layout wrapper that arranges `Button` children according to a contextual variant. Handles spacing, alignment, and direction. Takes the full width of its parent container.
|
|
9
9
|
|
|
10
|
-
> **Recommended:** Always wrap buttons in a `
|
|
10
|
+
> **Recommended:** Always wrap buttons in a `ButtonContainer` when they appear inside a form. This ensures consistent spacing and alignment for form actions like submit, cancel, and navigation.
|
|
11
|
+
|
|
12
|
+
> **Migration:** `ButtonGroup` is deprecated in favour of `ButtonContainer`. Both names work — `ButtonGroup` is an alias that will be removed in the next major version.
|
|
11
13
|
|
|
12
14
|
## Variants
|
|
13
15
|
|