@boostdev/design-system-components 1.2.1 → 1.2.3

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.
Files changed (74) hide show
  1. package/AGENTS.md +26 -0
  2. package/README.md +36 -19
  3. package/dist/client.cjs +141 -120
  4. package/dist/client.css +506 -503
  5. package/dist/client.d.cts +71 -96
  6. package/dist/client.d.ts +71 -96
  7. package/dist/client.js +141 -120
  8. package/dist/index.cjs +141 -120
  9. package/dist/index.css +506 -503
  10. package/dist/index.d.cts +71 -96
  11. package/dist/index.d.ts +71 -96
  12. package/dist/index.js +141 -120
  13. package/package.json +3 -3
  14. package/src/components/interaction/Button/Button.module.css +1 -4
  15. package/src/components/interaction/Command/Command.tsx +4 -3
  16. package/src/components/interaction/Dialog/Dialog.module.css +1 -1
  17. package/src/components/interaction/Dialog/Dialog.tsx +4 -5
  18. package/src/components/interaction/Drawer/Drawer.module.css +1 -1
  19. package/src/components/interaction/Drawer/Drawer.spec.tsx +3 -3
  20. package/src/components/interaction/Drawer/Drawer.tsx +4 -7
  21. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +4 -0
  22. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +4 -4
  23. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +4 -2
  24. package/src/components/interaction/Popover/Popover.tsx +4 -3
  25. package/src/components/interaction/Rating/Rating.tsx +4 -2
  26. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +4 -6
  27. package/src/components/interaction/form/Combobox/Combobox.module.css +1 -1
  28. package/src/components/interaction/form/Combobox/Combobox.tsx +4 -2
  29. package/src/components/interaction/form/FileInput/FileInput.tsx +4 -3
  30. package/src/components/interaction/form/FormInput/FormInput.module.css +1 -1
  31. package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -1
  32. package/src/components/interaction/form/NumberInput/NumberInput.tsx +4 -3
  33. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +4 -6
  34. package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +5 -5
  35. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +4 -6
  36. package/src/components/interaction/form/Select/Select.module.css +1 -1
  37. package/src/components/interaction/form/Slider/Slider.module.css +4 -4
  38. package/src/components/interaction/form/Switch/Switch.module.css +3 -3
  39. package/src/components/interaction/form/atoms/InputContainer.tsx +2 -2
  40. package/src/components/layout/ButtonGroup/ButtonGroup.tsx +4 -6
  41. package/src/components/layout/Card/Card.tsx +4 -10
  42. package/src/components/layout/IconWrapper/IconWrapper.module.css +1 -1
  43. package/src/components/layout/IconWrapper/IconWrapper.tsx +4 -5
  44. package/src/components/layout/SectionHeader/SectionHeader.tsx +5 -4
  45. package/src/components/ui/Accordion/Accordion.tsx +4 -3
  46. package/src/components/ui/Alert/Alert.module.css +1 -1
  47. package/src/components/ui/Alert/Alert.tsx +4 -3
  48. package/src/components/ui/Avatar/Avatar.module.css +1 -1
  49. package/src/components/ui/Avatar/Avatar.tsx +5 -3
  50. package/src/components/ui/Badge/Badge.module.css +1 -1
  51. package/src/components/ui/Badge/Badge.tsx +4 -5
  52. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +4 -3
  53. package/src/components/ui/Calendar/Calendar.module.css +2 -2
  54. package/src/components/ui/Calendar/Calendar.tsx +4 -4
  55. package/src/components/ui/Carousel/Carousel.module.css +1 -1
  56. package/src/components/ui/Carousel/Carousel.tsx +4 -4
  57. package/src/components/ui/DescriptionList/DescriptionList.tsx +4 -4
  58. package/src/components/ui/Loading/Loading.module.css +1 -1
  59. package/src/components/ui/Loading/Loading.tsx +4 -3
  60. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +1 -1
  61. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +4 -2
  62. package/src/components/ui/Pagination/Pagination.module.css +5 -1
  63. package/src/components/ui/Pagination/Pagination.tsx +4 -2
  64. package/src/components/ui/Progress/Progress.module.css +2 -2
  65. package/src/components/ui/Progress/Progress.tsx +4 -2
  66. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +4 -1
  67. package/src/components/ui/Separator/Separator.tsx +5 -3
  68. package/src/components/ui/Skeleton/Skeleton.tsx +4 -3
  69. package/src/components/ui/SkipLink/SkipLink.tsx +4 -5
  70. package/src/components/ui/Tabs/Tabs.tsx +4 -4
  71. package/src/components/ui/Tooltip/Tooltip.module.css +1 -1
  72. package/src/components/ui/Tooltip/Tooltip.tsx +4 -2
  73. package/src/components/ui/Typography/Typography.tsx +4 -5
  74. package/src/stories/DesignSystem/Grid.mdx +2 -0
@@ -1,8 +1,9 @@
1
+ import { HTMLAttributes } from 'react';
1
2
  import css from './ProgressCircle.module.css';
2
3
  import { cn } from '@boostdev/design-system-foundation';
3
4
  import type { WithClassName } from '../../../types';
4
5
 
5
- interface ProgressCircleProps extends WithClassName {
6
+ interface ProgressCircleProps extends WithClassName, HTMLAttributes<HTMLDivElement> {
6
7
  value: number;
7
8
  max?: number;
8
9
  label: string;
@@ -20,6 +21,7 @@ export function ProgressCircle({
20
21
  showValue = false,
21
22
  size = 'medium',
22
23
  className,
24
+ ...rest
23
25
  }: Readonly<ProgressCircleProps>) {
24
26
  const percentage = Math.min(100, Math.max(0, (value / max) * 100));
25
27
  const px = SIZE_PX[size];
@@ -30,6 +32,7 @@ export function ProgressCircle({
30
32
 
31
33
  return (
32
34
  <div
35
+ {...rest}
33
36
  role="progressbar"
34
37
  aria-label={label}
35
38
  aria-valuenow={value}
@@ -1,15 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
1
2
  import css from './Separator.module.css';
2
3
  import { cn } from '@boostdev/design-system-foundation';
3
4
  import type { WithClassName } from '../../../types';
4
5
 
5
- interface SeparatorProps extends WithClassName {
6
+ interface SeparatorProps extends WithClassName, HTMLAttributes<HTMLElement> {
6
7
  orientation?: 'horizontal' | 'vertical';
7
8
  }
8
9
 
9
- export function Separator({ orientation = 'horizontal', className }: Readonly<SeparatorProps>) {
10
+ export function Separator({ orientation = 'horizontal', className, ...rest }: Readonly<SeparatorProps>) {
10
11
  if (orientation === 'vertical') {
11
12
  return (
12
13
  <div
14
+ {...rest}
13
15
  role="separator"
14
16
  aria-orientation="vertical"
15
17
  className={cn(css.separator, css['--vertical'], className)}
@@ -17,5 +19,5 @@ export function Separator({ orientation = 'horizontal', className }: Readonly<Se
17
19
  );
18
20
  }
19
21
 
20
- return <hr aria-orientation="horizontal" className={cn(css.separator, css['--horizontal'], className)} />;
22
+ return <hr {...rest} aria-orientation="horizontal" className={cn(css.separator, css['--horizontal'], className)} />;
21
23
  }
@@ -1,11 +1,12 @@
1
+ import { HTMLAttributes } from 'react';
1
2
  import { cn } from '@boostdev/design-system-foundation';
2
3
  import css from './Skeleton.module.css';
3
4
  import type { WithClassName } from '../../../types';
4
5
 
5
- type SkeletonProps = WithClassName;
6
+ type SkeletonProps = WithClassName & HTMLAttributes<HTMLDivElement>;
6
7
 
7
- export function Skeleton({ className }: SkeletonProps) {
8
+ export function Skeleton({ className, ...rest }: SkeletonProps) {
8
9
  return (
9
- <div aria-hidden="true" className={cn(css.skeleton, className)} />
10
+ <div {...rest} aria-hidden="true" className={cn(css.skeleton, className)} />
10
11
  );
11
12
  }
@@ -1,15 +1,14 @@
1
+ import { AnchorHTMLAttributes } from 'react';
1
2
  import css from './SkipLink.module.css';
2
3
  import { cn } from '@boostdev/design-system-foundation';
3
4
  import type { WithClassName } from '../../../types';
4
5
 
5
- interface SkipLinkProps extends WithClassName {
6
- href?: string;
7
- children?: string;
6
+ interface SkipLinkProps extends WithClassName, AnchorHTMLAttributes<HTMLAnchorElement> {
8
7
  }
9
8
 
10
- export function SkipLink({ href = '#main', children = 'Skip to main content', className }: SkipLinkProps) {
9
+ export function SkipLink({ href = '#main', children = 'Skip to main content', className, ...rest }: SkipLinkProps) {
11
10
  return (
12
- <a href={href} className={cn(css.skipLink, className)}>
11
+ <a {...rest} href={href} className={cn(css.skipLink, className)}>
13
12
  {children}
14
13
  </a>
15
14
  );
@@ -1,4 +1,4 @@
1
- import { KeyboardEvent, ReactNode, useId, useRef, useState } from 'react';
1
+ import { HTMLAttributes, KeyboardEvent, ReactNode, useId, useRef, useState } from 'react';
2
2
  import css from './Tabs.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
4
  import type { WithClassName } from '../../../types';
@@ -10,12 +10,12 @@ export interface TabItem {
10
10
  disabled?: boolean;
11
11
  }
12
12
 
13
- interface TabsProps extends WithClassName {
13
+ interface TabsProps extends WithClassName, HTMLAttributes<HTMLDivElement> {
14
14
  tabs: TabItem[];
15
15
  defaultTab?: string;
16
16
  }
17
17
 
18
- export function Tabs({ tabs, defaultTab, className }: Readonly<TabsProps>) {
18
+ export function Tabs({ tabs, defaultTab, className, ...rest }: Readonly<TabsProps>) {
19
19
  const baseId = useId();
20
20
  const [activeTab, setActiveTab] = useState(defaultTab ?? tabs[0]?.id);
21
21
  const tabRefs = useRef<(HTMLButtonElement | null)[]>([]);
@@ -49,7 +49,7 @@ export function Tabs({ tabs, defaultTab, className }: Readonly<TabsProps>) {
49
49
  };
50
50
 
51
51
  return (
52
- <div className={cn(css.tabs, className)}>
52
+ <div {...rest} className={cn(css.tabs, className)}>
53
53
  <div role="tablist" className={css.tabList}>
54
54
  {tabs.map((tab, i) => {
55
55
  const tabId = `${baseId}-tab-${tab.id}`;
@@ -9,7 +9,7 @@
9
9
  position: absolute;
10
10
  z-index: var(--bds-z-index_popover);
11
11
  padding: var(--bds-space_xxs) var(--bds-space_xs);
12
- border-radius: var(--bds-border_radius--xs);
12
+ border-radius: var(--tooltip_radius, var(--bds-border_radius--full));
13
13
  background-color: var(--tooltip_bg, var(--bds-color_on-bg));
14
14
  color: var(--tooltip_text, var(--bds-color_bg));
15
15
  font-size: var(--bds-font_size--body--s);
@@ -1,9 +1,9 @@
1
- import { ReactElement, ReactNode, cloneElement, isValidElement, useId, useState } from 'react';
1
+ import { HTMLAttributes, ReactElement, ReactNode, cloneElement, isValidElement, useId, useState } from 'react';
2
2
  import css from './Tooltip.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
4
  import type { WithClassName } from '../../../types';
5
5
 
6
- interface TooltipProps extends WithClassName {
6
+ interface TooltipProps extends WithClassName, Omit<HTMLAttributes<HTMLSpanElement>, 'content'> {
7
7
  content: ReactNode;
8
8
  placement?: 'top' | 'bottom' | 'left' | 'right';
9
9
  children: ReactElement;
@@ -14,6 +14,7 @@ export function Tooltip({
14
14
  placement = 'top',
15
15
  children,
16
16
  className,
17
+ ...rest
17
18
  }: Readonly<TooltipProps>) {
18
19
  const tooltipId = useId();
19
20
  const [isVisible, setIsVisible] = useState(false);
@@ -26,6 +27,7 @@ export function Tooltip({
26
27
 
27
28
  return (
28
29
  <span
30
+ {...rest}
29
31
  className={cn(css.wrapper, className)}
30
32
  onMouseEnter={() => setIsVisible(true)}
31
33
  onMouseLeave={() => setIsVisible(false)}
@@ -1,14 +1,13 @@
1
- import { ReactNode, ElementType } from 'react';
1
+ import { ElementType, HTMLAttributes } from 'react';
2
2
  import css from './Typography.module.css';
3
3
  import { cn } from '@boostdev/design-system-foundation';
4
4
  import type { WithClassName } from '../../../types';
5
5
 
6
6
  type TypographyVariant = 'h1' | 'h2' | 'h3' | 'body' | 'body_s';
7
7
 
8
- interface TypographyProps extends WithClassName {
8
+ interface TypographyProps extends WithClassName, HTMLAttributes<HTMLElement> {
9
9
  variant?: TypographyVariant;
10
10
  component?: ElementType;
11
- children: ReactNode;
12
11
  }
13
12
 
14
13
  const variantToElement: Record<TypographyVariant, ElementType> = {
@@ -19,10 +18,10 @@ const variantToElement: Record<TypographyVariant, ElementType> = {
19
18
  body_s: 'p',
20
19
  };
21
20
 
22
- export function Typography({ variant = 'body', component, children, className }: TypographyProps) {
21
+ export function Typography({ variant = 'body', component, children, className, ...rest }: TypographyProps) {
23
22
  const Component = component || variantToElement[variant];
24
23
 
25
24
  return (
26
- <Component className={cn(css.typography, css[`--${variant}`], className)}>{children}</Component>
25
+ <Component {...rest} className={cn(css.typography, css[`--${variant}`], className)}>{children}</Component>
27
26
  );
28
27
  }
@@ -122,6 +122,8 @@ Apply the built-in layout utilities to use the grid system without writing CSS:
122
122
  </div>
123
123
  ```
124
124
 
125
+ > **Important:** Every direct child of `utl-main-grid` **must** set `grid-column: var(--bds-grid_span-<variant>);` (e.g. `--bds-grid_span-100`, `--bds-grid_span-50`). Without it the child collapses to a single column and the responsive grid behaviour is lost.
126
+
125
127
  ## Custom grid usage
126
128
 
127
129
  ```css