@boostdev/design-system-components 2.0.0 → 2.2.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 +2 -1
- package/README.md +42 -1
- package/dist/client.cjs +305 -60
- package/dist/client.css +577 -523
- package/dist/client.d.cts +42 -2
- package/dist/client.d.ts +42 -2
- package/dist/client.js +311 -60
- package/dist/index.cjs +305 -60
- package/dist/index.css +577 -523
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +311 -60
- package/dist/native/index.cjs +5 -2
- package/dist/native/index.d.cts +3 -1
- package/dist/native/index.d.ts +3 -1
- package/dist/native/index.js +5 -2
- package/dist/web-components/{chunk-3REOIRDW.js → chunk-N3TN6WCH.js} +26 -1
- package/dist/web-components/index.d.ts +129 -1
- package/dist/web-components/index.js +312 -1
- package/dist/web-components/interaction/bds-button.d.ts +7 -0
- package/dist/web-components/interaction/bds-button.js +1 -1
- package/package.json +1 -1
- package/src/components/interaction/Button/Button.mdx +81 -36
- package/src/components/interaction/Button/Button.module.css +24 -0
- package/src/components/interaction/Button/Button.native.mdx +31 -12
- package/src/components/interaction/Button/Button.native.spec.tsx +20 -0
- package/src/components/interaction/Button/Button.native.stories.tsx +110 -9
- package/src/components/interaction/Button/Button.native.tsx +13 -4
- package/src/components/interaction/Button/Button.spec.tsx +16 -0
- package/src/components/interaction/Button/Button.stories.tsx +134 -16
- package/src/components/interaction/Button/Button.tsx +4 -0
- package/src/components/layout/Grid/Grid.mdx +244 -0
- package/src/components/layout/Grid/Grid.module.css +59 -0
- package/src/components/layout/Grid/Grid.spec.tsx +401 -0
- package/src/components/layout/Grid/Grid.stories.tsx +160 -0
- package/src/components/layout/Grid/Grid.tsx +85 -0
- package/src/components/layout/Grid/GridItem.tsx +150 -0
- package/src/components/layout/Grid/autoSpan.ts +77 -0
- package/src/components/layout/Grid/index.ts +4 -0
- package/src/components/layout/Grid/masonry.ts +134 -0
- package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +46 -14
- package/src/index.ts +2 -0
- package/src/web-components/index.ts +4 -0
- package/src/web-components/interaction/BdsButton.mdx +46 -14
- package/src/web-components/interaction/BdsButton.stories.tsx +171 -19
- package/src/web-components/interaction/bds-button.spec.ts +35 -0
- package/src/web-components/interaction/bds-button.ts +28 -1
- package/src/web-components/layout/BdsGrid.mdx +210 -0
- package/src/web-components/layout/BdsGrid.stories.tsx +209 -0
- package/src/web-components/layout/BdsGridItem.mdx +52 -0
- package/src/web-components/layout/BdsGridItem.stories.tsx +72 -0
- package/src/web-components/layout/bds-grid-item.spec.ts +102 -0
- package/src/web-components/layout/bds-grid-item.ts +177 -0
- package/src/web-components/layout/bds-grid.spec.ts +62 -0
- package/src/web-components/layout/bds-grid.ts +184 -0
package/dist/index.d.cts
CHANGED
|
@@ -229,6 +229,8 @@ interface ButtonProps extends WithClassName, ButtonHTMLAttributes<HTMLButtonElem
|
|
|
229
229
|
disabled?: boolean;
|
|
230
230
|
/** Adds a pulsing animation for call-to-action emphasis. Respects `prefers-reduced-motion`. */
|
|
231
231
|
hasPulse?: boolean;
|
|
232
|
+
/** When true, forces a 1:1 aspect ratio with equal `xs` padding on both axes. Pass the icon as `children`; composable with any `variant`. Requires `aria-label`. */
|
|
233
|
+
isIconOnly?: boolean;
|
|
232
234
|
/** Click handler. Typed as `HTMLElement` because the root may be `<button>` or `<a>`. */
|
|
233
235
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
234
236
|
/** Anchor target (only applied when rendered as `<a>`). */
|
|
@@ -240,7 +242,7 @@ interface ButtonProps extends WithClassName, ButtonHTMLAttributes<HTMLButtonElem
|
|
|
240
242
|
/** ID(s) of element(s) that describe the button (e.g. a tooltip or helper text). */
|
|
241
243
|
'aria-describedby'?: string;
|
|
242
244
|
}
|
|
243
|
-
declare function Button({ children, className, variant, type, iconStart, iconEnd, size, hasPulse, href, target, rel, disabled, onClick, ...rest }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function Button({ children, className, variant, type, iconStart, iconEnd, size, hasPulse, isIconOnly, href, target, rel, disabled, onClick, ...rest }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
|
|
244
246
|
|
|
245
247
|
interface CommandItem {
|
|
246
248
|
id: string;
|
|
@@ -481,6 +483,44 @@ type CardOwnProps = WithClassName & {
|
|
|
481
483
|
type CardProps<C extends ElementType = 'div'> = CardOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof CardOwnProps>;
|
|
482
484
|
declare function Card<C extends ElementType = 'div'>({ children, className, variant, padding, textAlign, as, onClick, ...rest }: CardProps<C>): react_jsx_runtime.JSX.Element;
|
|
483
485
|
|
|
486
|
+
type GridVariant = 'main' | 'page' | 'funnel' | 'custom';
|
|
487
|
+
type GridOwnProps = WithClassName & {
|
|
488
|
+
variant?: GridVariant;
|
|
489
|
+
columns?: number;
|
|
490
|
+
isCentered?: boolean;
|
|
491
|
+
isMasonry?: boolean;
|
|
492
|
+
/**
|
|
493
|
+
* When true, any child `GridItem` without an explicit `columnSpan` resolves
|
|
494
|
+
* to `"auto"` — column span is derived from the intrinsic aspect ratio of
|
|
495
|
+
* the first `<img>`/`<video>` child. Items that set `columnSpan` explicitly
|
|
496
|
+
* are unaffected.
|
|
497
|
+
*/
|
|
498
|
+
autoSpanMedia?: boolean;
|
|
499
|
+
as?: ElementType;
|
|
500
|
+
};
|
|
501
|
+
type GridProps<C extends ElementType = 'div'> = GridOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof GridOwnProps>;
|
|
502
|
+
declare function Grid<C extends ElementType = 'div'>({ children, className, variant, columns, isCentered, isMasonry, autoSpanMedia, as, style, ...rest }: GridProps<C>): react_jsx_runtime.JSX.Element;
|
|
503
|
+
|
|
504
|
+
type GridItemSpanValue = 'full' | 'three-quarters' | 'two-thirds' | 'half' | 'one-third' | 'one-quarter' | 'auto' | number;
|
|
505
|
+
declare const GridItemSpan: {
|
|
506
|
+
readonly full: "full";
|
|
507
|
+
readonly threeQuarters: "three-quarters";
|
|
508
|
+
readonly twoThirds: "two-thirds";
|
|
509
|
+
readonly half: "half";
|
|
510
|
+
readonly oneThird: "one-third";
|
|
511
|
+
readonly oneQuarter: "one-quarter";
|
|
512
|
+
readonly auto: "auto";
|
|
513
|
+
};
|
|
514
|
+
type GridItemOwnProps = WithClassName & {
|
|
515
|
+
columnSpan?: GridItemSpanValue;
|
|
516
|
+
rowSpan?: number;
|
|
517
|
+
startColumn?: number;
|
|
518
|
+
endColumn?: number;
|
|
519
|
+
as?: ElementType;
|
|
520
|
+
};
|
|
521
|
+
type GridItemProps<C extends ElementType = 'div'> = GridItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof GridItemOwnProps>;
|
|
522
|
+
declare function GridItem<C extends ElementType = 'div'>({ children, className, columnSpan, rowSpan, startColumn, endColumn, as, style, ...rest }: GridItemProps<C>): react_jsx_runtime.JSX.Element;
|
|
523
|
+
|
|
484
524
|
type IntrinsicElement = keyof JSX.IntrinsicElements;
|
|
485
525
|
type SectionHeaderProps = WithClassName & Omit<HTMLAttributes<HTMLDivElement>, 'title'> & {
|
|
486
526
|
title: string;
|
|
@@ -496,4 +536,4 @@ interface IconWrapperProps extends WithClassName, HTMLAttributes<HTMLDivElement>
|
|
|
496
536
|
}
|
|
497
537
|
declare function IconWrapper({ children, className, ...rest }: IconWrapperProps): react_jsx_runtime.JSX.Element;
|
|
498
538
|
|
|
499
|
-
export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonContainer, type ButtonContainerProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, Card, Carousel, Checkbox, CheckboxGroup, type CheckboxGroupProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, type IconWrapperProps, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, RadioGroup, type RadioGroupProps, Rating, SectionHeader, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, type WithClassName, useToast };
|
|
539
|
+
export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonContainer, type ButtonContainerProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, Card, Carousel, Checkbox, CheckboxGroup, type CheckboxGroupProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, Grid, GridItem, GridItemSpan, type GridItemSpanValue, type GridVariant, IconWrapper, type IconWrapperProps, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, RadioGroup, type RadioGroupProps, Rating, SectionHeader, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, type WithClassName, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -229,6 +229,8 @@ interface ButtonProps extends WithClassName, ButtonHTMLAttributes<HTMLButtonElem
|
|
|
229
229
|
disabled?: boolean;
|
|
230
230
|
/** Adds a pulsing animation for call-to-action emphasis. Respects `prefers-reduced-motion`. */
|
|
231
231
|
hasPulse?: boolean;
|
|
232
|
+
/** When true, forces a 1:1 aspect ratio with equal `xs` padding on both axes. Pass the icon as `children`; composable with any `variant`. Requires `aria-label`. */
|
|
233
|
+
isIconOnly?: boolean;
|
|
232
234
|
/** Click handler. Typed as `HTMLElement` because the root may be `<button>` or `<a>`. */
|
|
233
235
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
234
236
|
/** Anchor target (only applied when rendered as `<a>`). */
|
|
@@ -240,7 +242,7 @@ interface ButtonProps extends WithClassName, ButtonHTMLAttributes<HTMLButtonElem
|
|
|
240
242
|
/** ID(s) of element(s) that describe the button (e.g. a tooltip or helper text). */
|
|
241
243
|
'aria-describedby'?: string;
|
|
242
244
|
}
|
|
243
|
-
declare function Button({ children, className, variant, type, iconStart, iconEnd, size, hasPulse, href, target, rel, disabled, onClick, ...rest }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
|
|
245
|
+
declare function Button({ children, className, variant, type, iconStart, iconEnd, size, hasPulse, isIconOnly, href, target, rel, disabled, onClick, ...rest }: Readonly<ButtonProps>): react_jsx_runtime.JSX.Element;
|
|
244
246
|
|
|
245
247
|
interface CommandItem {
|
|
246
248
|
id: string;
|
|
@@ -481,6 +483,44 @@ type CardOwnProps = WithClassName & {
|
|
|
481
483
|
type CardProps<C extends ElementType = 'div'> = CardOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof CardOwnProps>;
|
|
482
484
|
declare function Card<C extends ElementType = 'div'>({ children, className, variant, padding, textAlign, as, onClick, ...rest }: CardProps<C>): react_jsx_runtime.JSX.Element;
|
|
483
485
|
|
|
486
|
+
type GridVariant = 'main' | 'page' | 'funnel' | 'custom';
|
|
487
|
+
type GridOwnProps = WithClassName & {
|
|
488
|
+
variant?: GridVariant;
|
|
489
|
+
columns?: number;
|
|
490
|
+
isCentered?: boolean;
|
|
491
|
+
isMasonry?: boolean;
|
|
492
|
+
/**
|
|
493
|
+
* When true, any child `GridItem` without an explicit `columnSpan` resolves
|
|
494
|
+
* to `"auto"` — column span is derived from the intrinsic aspect ratio of
|
|
495
|
+
* the first `<img>`/`<video>` child. Items that set `columnSpan` explicitly
|
|
496
|
+
* are unaffected.
|
|
497
|
+
*/
|
|
498
|
+
autoSpanMedia?: boolean;
|
|
499
|
+
as?: ElementType;
|
|
500
|
+
};
|
|
501
|
+
type GridProps<C extends ElementType = 'div'> = GridOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof GridOwnProps>;
|
|
502
|
+
declare function Grid<C extends ElementType = 'div'>({ children, className, variant, columns, isCentered, isMasonry, autoSpanMedia, as, style, ...rest }: GridProps<C>): react_jsx_runtime.JSX.Element;
|
|
503
|
+
|
|
504
|
+
type GridItemSpanValue = 'full' | 'three-quarters' | 'two-thirds' | 'half' | 'one-third' | 'one-quarter' | 'auto' | number;
|
|
505
|
+
declare const GridItemSpan: {
|
|
506
|
+
readonly full: "full";
|
|
507
|
+
readonly threeQuarters: "three-quarters";
|
|
508
|
+
readonly twoThirds: "two-thirds";
|
|
509
|
+
readonly half: "half";
|
|
510
|
+
readonly oneThird: "one-third";
|
|
511
|
+
readonly oneQuarter: "one-quarter";
|
|
512
|
+
readonly auto: "auto";
|
|
513
|
+
};
|
|
514
|
+
type GridItemOwnProps = WithClassName & {
|
|
515
|
+
columnSpan?: GridItemSpanValue;
|
|
516
|
+
rowSpan?: number;
|
|
517
|
+
startColumn?: number;
|
|
518
|
+
endColumn?: number;
|
|
519
|
+
as?: ElementType;
|
|
520
|
+
};
|
|
521
|
+
type GridItemProps<C extends ElementType = 'div'> = GridItemOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof GridItemOwnProps>;
|
|
522
|
+
declare function GridItem<C extends ElementType = 'div'>({ children, className, columnSpan, rowSpan, startColumn, endColumn, as, style, ...rest }: GridItemProps<C>): react_jsx_runtime.JSX.Element;
|
|
523
|
+
|
|
484
524
|
type IntrinsicElement = keyof JSX.IntrinsicElements;
|
|
485
525
|
type SectionHeaderProps = WithClassName & Omit<HTMLAttributes<HTMLDivElement>, 'title'> & {
|
|
486
526
|
title: string;
|
|
@@ -496,4 +536,4 @@ interface IconWrapperProps extends WithClassName, HTMLAttributes<HTMLDivElement>
|
|
|
496
536
|
}
|
|
497
537
|
declare function IconWrapper({ children, className, ...rest }: IconWrapperProps): react_jsx_runtime.JSX.Element;
|
|
498
538
|
|
|
499
|
-
export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonContainer, type ButtonContainerProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, Card, Carousel, Checkbox, CheckboxGroup, type CheckboxGroupProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, type IconWrapperProps, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, RadioGroup, type RadioGroupProps, Rating, SectionHeader, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, type WithClassName, useToast };
|
|
539
|
+
export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonContainer, type ButtonContainerProps, ButtonGroup, type ButtonGroupProps, type ButtonProps, Calendar, Card, Carousel, Checkbox, CheckboxGroup, type CheckboxGroupProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, Grid, GridItem, GridItemSpan, type GridItemSpanValue, type GridVariant, IconWrapper, type IconWrapperProps, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, RadioGroup, type RadioGroupProps, Rating, SectionHeader, SegmentedControl, type SegmentedControlProps, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, type WithClassName, useToast };
|