@boostdev/design-system-components 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement, ButtonHTMLAttributes, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, SelectHTMLAttributes, TextareaHTMLAttributes, CSSProperties, JSX } from 'react';
2
+ import { ReactNode, HTMLAttributes, ElementType, ComponentPropsWithoutRef, ReactElement, ButtonHTMLAttributes, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, SelectHTMLAttributes, TextareaHTMLAttributes, CSSProperties, JSX } from 'react';
3
3
  export { cn } from '@boostdev/design-system-foundation';
4
4
 
5
5
  interface AccordionItem {
@@ -52,6 +52,26 @@ interface BreadcrumbProps {
52
52
  }
53
53
  declare function Breadcrumb({ items, className }: Readonly<BreadcrumbProps>): react_jsx_runtime.JSX.Element;
54
54
 
55
+ interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDetailsElement>, 'onToggle'> {
56
+ /** The trigger label — always visible */
57
+ summary: ReactNode;
58
+ /** The content revealed when expanded */
59
+ children: ReactNode;
60
+ /** Controlled open state */
61
+ open?: boolean;
62
+ /** Uncontrolled initial open state */
63
+ defaultOpen?: boolean;
64
+ /** Called after each toggle with the new open state */
65
+ onToggle?: (open: boolean) => void;
66
+ /**
67
+ * Groups multiple Collapsible elements so only one is open at a time
68
+ * (native <details name="…"> behaviour).
69
+ */
70
+ name?: string;
71
+ className?: string;
72
+ }
73
+ declare function Collapsible({ summary, children, open, defaultOpen, onToggle, name, className, ...rest }: Readonly<CollapsibleProps>): react_jsx_runtime.JSX.Element;
74
+
55
75
  interface CalendarProps {
56
76
  value?: Date;
57
77
  defaultValue?: Date;
@@ -399,15 +419,16 @@ interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'
399
419
  }
400
420
  declare function Slider({ label, name, min, max, showValue, error, hint, className, onChange, ...props }: Readonly<SliderProps>): react_jsx_runtime.JSX.Element;
401
421
 
402
- interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
422
+ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'prefix'> {
403
423
  label: string;
404
424
  name: string;
405
425
  size?: 'small' | 'medium' | 'large';
406
426
  error?: string;
407
427
  hint?: string;
408
428
  className?: string;
429
+ prefix?: ReactNode;
409
430
  }
410
- declare function Switch({ label, name, size, error, hint, className, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
431
+ declare function Switch({ label, name, size, error, hint, className, prefix, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
411
432
 
412
433
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
413
434
  label: ReactNode;
@@ -454,4 +475,4 @@ interface Props {
454
475
  }
455
476
  declare function IconWrapper({ children, className }: Props): react_jsx_runtime.JSX.Element;
456
477
 
457
- export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, Rating, SectionHeader, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, useToast };
478
+ export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, Rating, SectionHeader, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, useToast };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement, ButtonHTMLAttributes, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, SelectHTMLAttributes, TextareaHTMLAttributes, CSSProperties, JSX } from 'react';
2
+ import { ReactNode, HTMLAttributes, ElementType, ComponentPropsWithoutRef, ReactElement, ButtonHTMLAttributes, MouseEventHandler, InputHTMLAttributes, HTMLInputTypeAttribute, SelectHTMLAttributes, TextareaHTMLAttributes, CSSProperties, JSX } from 'react';
3
3
  export { cn } from '@boostdev/design-system-foundation';
4
4
 
5
5
  interface AccordionItem {
@@ -52,6 +52,26 @@ interface BreadcrumbProps {
52
52
  }
53
53
  declare function Breadcrumb({ items, className }: Readonly<BreadcrumbProps>): react_jsx_runtime.JSX.Element;
54
54
 
55
+ interface CollapsibleProps extends Omit<HTMLAttributes<HTMLDetailsElement>, 'onToggle'> {
56
+ /** The trigger label — always visible */
57
+ summary: ReactNode;
58
+ /** The content revealed when expanded */
59
+ children: ReactNode;
60
+ /** Controlled open state */
61
+ open?: boolean;
62
+ /** Uncontrolled initial open state */
63
+ defaultOpen?: boolean;
64
+ /** Called after each toggle with the new open state */
65
+ onToggle?: (open: boolean) => void;
66
+ /**
67
+ * Groups multiple Collapsible elements so only one is open at a time
68
+ * (native <details name="…"> behaviour).
69
+ */
70
+ name?: string;
71
+ className?: string;
72
+ }
73
+ declare function Collapsible({ summary, children, open, defaultOpen, onToggle, name, className, ...rest }: Readonly<CollapsibleProps>): react_jsx_runtime.JSX.Element;
74
+
55
75
  interface CalendarProps {
56
76
  value?: Date;
57
77
  defaultValue?: Date;
@@ -399,15 +419,16 @@ interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'
399
419
  }
400
420
  declare function Slider({ label, name, min, max, showValue, error, hint, className, onChange, ...props }: Readonly<SliderProps>): react_jsx_runtime.JSX.Element;
401
421
 
402
- interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
422
+ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'prefix'> {
403
423
  label: string;
404
424
  name: string;
405
425
  size?: 'small' | 'medium' | 'large';
406
426
  error?: string;
407
427
  hint?: string;
408
428
  className?: string;
429
+ prefix?: ReactNode;
409
430
  }
410
- declare function Switch({ label, name, size, error, hint, className, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
431
+ declare function Switch({ label, name, size, error, hint, className, prefix, ...props }: Readonly<SwitchProps>): react_jsx_runtime.JSX.Element;
411
432
 
412
433
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
413
434
  label: ReactNode;
@@ -454,4 +475,4 @@ interface Props {
454
475
  }
455
476
  declare function IconWrapper({ children, className }: Props): react_jsx_runtime.JSX.Element;
456
477
 
457
- export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, Rating, SectionHeader, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, useToast };
478
+ export { Accordion, type AccordionItem, Alert, Avatar, Badge, Breadcrumb, type BreadcrumbItem, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, Command, type CommandItem, type DescriptionItem, DescriptionList, Dialog, Drawer, DropdownMenu, type DropdownMenuItem, FileInput, FormInput, IconWrapper, Link, Loading, NotificationBanner, NumberInput, Pagination, Popover, Progress, ProgressCircle, Radio, Rating, SectionHeader, Select, type SelectOption, Separator, Skeleton, SkipLink, Slider, Switch, type TabItem, Table, type TableColumn, Tabs, Textarea, ToastProvider, Tooltip, Typography, useToast };