@kushagradhawan/kookie-ui 0.1.28 → 0.1.30
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/components.css +4742 -2680
- package/dist/cjs/components/_internal/base-button.d.ts +36 -0
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/_internal/base-button.props.d.ts +61 -0
- package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.props.js +1 -1
- package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
- package/dist/cjs/components/_internal/base-checkbox.props.d.ts +6 -1
- package/dist/cjs/components/_internal/base-checkbox.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js.map +3 -3
- package/dist/cjs/components/_internal/base-menu.props.d.ts +8 -0
- package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
- package/dist/cjs/components/_internal/base-radio.props.d.ts +6 -1
- package/dist/cjs/components/_internal/base-radio.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js.map +3 -3
- package/dist/cjs/components/accordion.d.ts +22 -0
- package/dist/cjs/components/accordion.d.ts.map +1 -0
- package/dist/cjs/components/accordion.js +2 -0
- package/dist/cjs/components/accordion.js.map +7 -0
- package/dist/cjs/components/accordion.props.d.ts +97 -0
- package/dist/cjs/components/accordion.props.d.ts.map +1 -0
- package/dist/cjs/components/accordion.props.js +2 -0
- package/dist/cjs/components/accordion.props.js.map +7 -0
- package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +3 -3
- package/dist/cjs/components/alert-dialog.props.d.ts +69 -2
- package/dist/cjs/components/alert-dialog.props.d.ts.map +1 -1
- package/dist/cjs/components/alert-dialog.props.js +1 -1
- package/dist/cjs/components/alert-dialog.props.js.map +3 -3
- package/dist/cjs/components/avatar.d.ts.map +1 -1
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +3 -3
- package/dist/cjs/components/avatar.props.d.ts +9 -1
- package/dist/cjs/components/avatar.props.d.ts.map +1 -1
- package/dist/cjs/components/avatar.props.js +1 -1
- package/dist/cjs/components/avatar.props.js.map +3 -3
- package/dist/cjs/components/badge.d.ts +8 -1
- package/dist/cjs/components/badge.d.ts.map +1 -1
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/badge.props.d.ts +14 -6
- package/dist/cjs/components/badge.props.d.ts.map +1 -1
- package/dist/cjs/components/badge.props.js +1 -1
- package/dist/cjs/components/badge.props.js.map +3 -3
- package/dist/cjs/components/blockquote.props.d.ts +1 -1
- package/dist/cjs/components/button.d.ts +53 -1
- package/dist/cjs/components/button.d.ts.map +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/button.props.d.ts +17 -0
- package/dist/cjs/components/button.props.d.ts.map +1 -1
- package/dist/cjs/components/button.props.js.map +2 -2
- package/dist/cjs/components/callout.d.ts +4 -0
- package/dist/cjs/components/callout.d.ts.map +1 -1
- package/dist/cjs/components/callout.js +1 -1
- package/dist/cjs/components/callout.js.map +3 -3
- package/dist/cjs/components/callout.props.d.ts +9 -1
- package/dist/cjs/components/callout.props.d.ts.map +1 -1
- package/dist/cjs/components/callout.props.js +1 -1
- package/dist/cjs/components/callout.props.js.map +3 -3
- package/dist/cjs/components/card.d.ts.map +1 -1
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +3 -3
- package/dist/cjs/components/card.props.d.ts +5 -0
- package/dist/cjs/components/card.props.d.ts.map +1 -1
- package/dist/cjs/components/card.props.js +1 -1
- package/dist/cjs/components/card.props.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.props.d.ts +2 -2
- package/dist/cjs/components/checkbox-cards.props.js +1 -1
- package/dist/cjs/components/checkbox-cards.props.js.map +2 -2
- package/dist/cjs/components/checkbox-group.props.d.ts +6 -1
- package/dist/cjs/components/checkbox-group.props.d.ts.map +1 -1
- package/dist/cjs/components/checkbox.d.ts.map +1 -1
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/code.js.map +1 -1
- package/dist/cjs/components/code.props.d.ts +1 -1
- package/dist/cjs/components/context-menu.d.ts +1 -1
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dialog.d.ts.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/dialog.props.d.ts +6 -1
- package/dist/cjs/components/dialog.props.d.ts.map +1 -1
- package/dist/cjs/components/dialog.props.js +1 -1
- package/dist/cjs/components/dialog.props.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.d.ts +1 -1
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/heading.props.d.ts +1 -1
- package/dist/cjs/components/icon-button.d.ts +79 -1
- package/dist/cjs/components/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button.js +4 -1
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/image.d.ts +131 -12
- package/dist/cjs/components/image.d.ts.map +1 -1
- package/dist/cjs/components/image.js +1 -1
- package/dist/cjs/components/image.js.map +3 -3
- package/dist/cjs/components/image.props.d.ts +136 -21
- package/dist/cjs/components/image.props.d.ts.map +1 -1
- package/dist/cjs/components/image.props.js +1 -1
- package/dist/cjs/components/image.props.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/link.props.d.ts +1 -1
- package/dist/cjs/components/progress.props.d.ts +2 -2
- package/dist/cjs/components/progress.props.js +1 -1
- package/dist/cjs/components/progress.props.js.map +2 -2
- package/dist/cjs/components/radio-cards.d.ts.map +1 -1
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +3 -3
- package/dist/cjs/components/radio-cards.props.d.ts +2 -2
- package/dist/cjs/components/radio-cards.props.js +1 -1
- package/dist/cjs/components/radio-cards.props.js.map +2 -2
- package/dist/cjs/components/radio.d.ts.map +1 -1
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +3 -3
- package/dist/cjs/components/segmented-control.props.d.ts +3 -3
- package/dist/cjs/components/segmented-control.props.js +1 -1
- package/dist/cjs/components/segmented-control.props.js.map +2 -2
- package/dist/cjs/components/select.d.ts.map +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +3 -3
- package/dist/cjs/components/select.props.d.ts +12 -0
- package/dist/cjs/components/select.props.d.ts.map +1 -1
- package/dist/cjs/components/select.props.js +1 -1
- package/dist/cjs/components/select.props.js.map +2 -2
- package/dist/cjs/components/sidebar.d.ts +5 -0
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/slider.d.ts +5 -0
- package/dist/cjs/components/slider.d.ts.map +1 -1
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +3 -3
- package/dist/cjs/components/slider.props.d.ts +10 -2
- package/dist/cjs/components/slider.props.d.ts.map +1 -1
- package/dist/cjs/components/slider.props.js +1 -1
- package/dist/cjs/components/slider.props.js.map +2 -2
- package/dist/cjs/components/switch.d.ts.map +1 -1
- package/dist/cjs/components/switch.js +1 -1
- package/dist/cjs/components/switch.js.map +3 -3
- package/dist/cjs/components/switch.props.d.ts +17 -4
- package/dist/cjs/components/switch.props.d.ts.map +1 -1
- package/dist/cjs/components/switch.props.js +1 -1
- package/dist/cjs/components/switch.props.js.map +3 -3
- package/dist/cjs/components/tab-nav.d.ts.map +1 -1
- package/dist/cjs/components/tab-nav.js +1 -1
- package/dist/cjs/components/tab-nav.js.map +3 -3
- package/dist/cjs/components/tabs.d.ts.map +1 -1
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +2 -2
- package/dist/cjs/components/text-area.d.ts.map +1 -1
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +3 -3
- package/dist/cjs/components/text-area.props.d.ts +29 -0
- package/dist/cjs/components/text-area.props.d.ts.map +1 -1
- package/dist/cjs/components/text-area.props.js +1 -1
- package/dist/cjs/components/text-area.props.js.map +3 -3
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +4 -4
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.d.ts +29 -0
- package/dist/cjs/components/text-field.props.d.ts.map +1 -1
- package/dist/cjs/components/text-field.props.js +1 -1
- package/dist/cjs/components/text-field.props.js.map +3 -3
- package/dist/cjs/components/text.props.d.ts +1 -1
- package/dist/cjs/components/theme.d.ts +3 -0
- package/dist/cjs/components/theme.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +3 -3
- package/dist/cjs/components/theme.props.d.ts +14 -0
- package/dist/cjs/components/theme.props.d.ts.map +1 -1
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +3 -3
- package/dist/cjs/components/toggle-button.d.ts +52 -0
- package/dist/cjs/components/toggle-button.d.ts.map +1 -1
- package/dist/cjs/components/toggle-button.js +1 -1
- package/dist/cjs/components/toggle-button.js.map +3 -3
- package/dist/cjs/components/toggle-icon-button.d.ts +84 -2
- package/dist/cjs/components/toggle-icon-button.d.ts.map +1 -1
- package/dist/cjs/components/toggle-icon-button.js +1 -1
- package/dist/cjs/components/toggle-icon-button.js.map +3 -3
- package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
- package/dist/cjs/hooks/index.d.ts +2 -0
- package/dist/cjs/hooks/index.d.ts.map +1 -0
- package/dist/cjs/hooks/index.js +2 -0
- package/dist/cjs/hooks/index.js.map +7 -0
- package/dist/cjs/hooks/use-live-announcer.d.ts +6 -0
- package/dist/cjs/hooks/use-live-announcer.d.ts.map +1 -0
- package/dist/cjs/hooks/use-live-announcer.js +10 -0
- package/dist/cjs/hooks/use-live-announcer.js.map +7 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/props/weight.prop.d.ts +1 -1
- package/dist/cjs/props/weight.prop.js +1 -1
- package/dist/cjs/props/weight.prop.js.map +2 -2
- package/dist/esm/components/_internal/base-button.d.ts +36 -0
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.js.map +3 -3
- package/dist/esm/components/_internal/base-button.props.d.ts +61 -0
- package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -1
- package/dist/esm/components/_internal/base-button.props.js.map +3 -3
- package/dist/esm/components/_internal/base-checkbox.props.d.ts +6 -1
- package/dist/esm/components/_internal/base-checkbox.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
- package/dist/esm/components/_internal/base-checkbox.props.js.map +3 -3
- package/dist/esm/components/_internal/base-menu.props.d.ts +8 -0
- package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-menu.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.props.js.map +3 -3
- package/dist/esm/components/_internal/base-radio.props.d.ts +6 -1
- package/dist/esm/components/_internal/base-radio.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-radio.props.js +1 -1
- package/dist/esm/components/_internal/base-radio.props.js.map +3 -3
- package/dist/esm/components/accordion.d.ts +22 -0
- package/dist/esm/components/accordion.d.ts.map +1 -0
- package/dist/esm/components/accordion.js +2 -0
- package/dist/esm/components/accordion.js.map +7 -0
- package/dist/esm/components/accordion.props.d.ts +97 -0
- package/dist/esm/components/accordion.props.d.ts.map +1 -0
- package/dist/esm/components/accordion.props.js +2 -0
- package/dist/esm/components/accordion.props.js.map +7 -0
- package/dist/esm/components/alert-dialog.d.ts.map +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/alert-dialog.js.map +3 -3
- package/dist/esm/components/alert-dialog.props.d.ts +69 -2
- package/dist/esm/components/alert-dialog.props.d.ts.map +1 -1
- package/dist/esm/components/alert-dialog.props.js +1 -1
- package/dist/esm/components/alert-dialog.props.js.map +3 -3
- package/dist/esm/components/avatar.d.ts.map +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.js.map +3 -3
- package/dist/esm/components/avatar.props.d.ts +9 -1
- package/dist/esm/components/avatar.props.d.ts.map +1 -1
- package/dist/esm/components/avatar.props.js +1 -1
- package/dist/esm/components/avatar.props.js.map +3 -3
- package/dist/esm/components/badge.d.ts +8 -1
- package/dist/esm/components/badge.d.ts.map +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.js.map +3 -3
- package/dist/esm/components/badge.props.d.ts +14 -6
- package/dist/esm/components/badge.props.d.ts.map +1 -1
- package/dist/esm/components/badge.props.js +1 -1
- package/dist/esm/components/badge.props.js.map +3 -3
- package/dist/esm/components/blockquote.props.d.ts +1 -1
- package/dist/esm/components/button.d.ts +53 -1
- package/dist/esm/components/button.d.ts.map +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +3 -3
- package/dist/esm/components/button.props.d.ts +17 -0
- package/dist/esm/components/button.props.d.ts.map +1 -1
- package/dist/esm/components/button.props.js.map +2 -2
- package/dist/esm/components/callout.d.ts +4 -0
- package/dist/esm/components/callout.d.ts.map +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/callout.js.map +3 -3
- package/dist/esm/components/callout.props.d.ts +9 -1
- package/dist/esm/components/callout.props.d.ts.map +1 -1
- package/dist/esm/components/callout.props.js +1 -1
- package/dist/esm/components/callout.props.js.map +3 -3
- package/dist/esm/components/card.d.ts.map +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.js.map +3 -3
- package/dist/esm/components/card.props.d.ts +5 -0
- package/dist/esm/components/card.props.d.ts.map +1 -1
- package/dist/esm/components/card.props.js +1 -1
- package/dist/esm/components/card.props.js.map +3 -3
- package/dist/esm/components/checkbox-cards.d.ts.map +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-cards.js.map +3 -3
- package/dist/esm/components/checkbox-cards.props.d.ts +2 -2
- package/dist/esm/components/checkbox-cards.props.js +1 -1
- package/dist/esm/components/checkbox-cards.props.js.map +2 -2
- package/dist/esm/components/checkbox-group.props.d.ts +6 -1
- package/dist/esm/components/checkbox-group.props.d.ts.map +1 -1
- package/dist/esm/components/checkbox.d.ts.map +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/esm/components/code.js.map +1 -1
- package/dist/esm/components/code.props.d.ts +1 -1
- package/dist/esm/components/context-menu.d.ts +1 -1
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/context-menu.js.map +3 -3
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +3 -3
- package/dist/esm/components/dialog.props.d.ts +6 -1
- package/dist/esm/components/dialog.props.d.ts.map +1 -1
- package/dist/esm/components/dialog.props.js +1 -1
- package/dist/esm/components/dialog.props.js.map +3 -3
- package/dist/esm/components/dropdown-menu.d.ts +1 -1
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.js.map +3 -3
- package/dist/esm/components/heading.props.d.ts +1 -1
- package/dist/esm/components/icon-button.d.ts +79 -1
- package/dist/esm/components/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button.js +4 -1
- package/dist/esm/components/icon-button.js.map +3 -3
- package/dist/esm/components/image.d.ts +131 -12
- package/dist/esm/components/image.d.ts.map +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/image.js.map +3 -3
- package/dist/esm/components/image.props.d.ts +136 -21
- package/dist/esm/components/image.props.d.ts.map +1 -1
- package/dist/esm/components/image.props.js +1 -1
- package/dist/esm/components/image.props.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/link.props.d.ts +1 -1
- package/dist/esm/components/progress.props.d.ts +2 -2
- package/dist/esm/components/progress.props.js +1 -1
- package/dist/esm/components/progress.props.js.map +2 -2
- package/dist/esm/components/radio-cards.d.ts.map +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-cards.js.map +3 -3
- package/dist/esm/components/radio-cards.props.d.ts +2 -2
- package/dist/esm/components/radio-cards.props.js +1 -1
- package/dist/esm/components/radio-cards.props.js.map +2 -2
- package/dist/esm/components/radio.d.ts.map +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.js.map +3 -3
- package/dist/esm/components/segmented-control.props.d.ts +3 -3
- package/dist/esm/components/segmented-control.props.js +1 -1
- package/dist/esm/components/segmented-control.props.js.map +2 -2
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.js.map +3 -3
- package/dist/esm/components/select.props.d.ts +12 -0
- package/dist/esm/components/select.props.d.ts.map +1 -1
- package/dist/esm/components/select.props.js +1 -1
- package/dist/esm/components/select.props.js.map +2 -2
- package/dist/esm/components/sidebar.d.ts +5 -0
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.js.map +3 -3
- package/dist/esm/components/slider.d.ts +5 -0
- package/dist/esm/components/slider.d.ts.map +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/slider.js.map +3 -3
- package/dist/esm/components/slider.props.d.ts +10 -2
- package/dist/esm/components/slider.props.d.ts.map +1 -1
- package/dist/esm/components/slider.props.js +1 -1
- package/dist/esm/components/slider.props.js.map +2 -2
- package/dist/esm/components/switch.d.ts.map +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.js.map +3 -3
- package/dist/esm/components/switch.props.d.ts +17 -4
- package/dist/esm/components/switch.props.d.ts.map +1 -1
- package/dist/esm/components/switch.props.js +1 -1
- package/dist/esm/components/switch.props.js.map +3 -3
- package/dist/esm/components/tab-nav.d.ts.map +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/tab-nav.js.map +3 -3
- package/dist/esm/components/tabs.d.ts.map +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.js.map +2 -2
- package/dist/esm/components/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-area.js.map +3 -3
- package/dist/esm/components/text-area.props.d.ts +29 -0
- package/dist/esm/components/text-area.props.d.ts.map +1 -1
- package/dist/esm/components/text-area.props.js +1 -1
- package/dist/esm/components/text-area.props.js.map +3 -3
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +4 -4
- package/dist/esm/components/text-field.js.map +3 -3
- package/dist/esm/components/text-field.props.d.ts +29 -0
- package/dist/esm/components/text-field.props.d.ts.map +1 -1
- package/dist/esm/components/text-field.props.js +1 -1
- package/dist/esm/components/text-field.props.js.map +3 -3
- package/dist/esm/components/text.props.d.ts +1 -1
- package/dist/esm/components/theme.d.ts +3 -0
- package/dist/esm/components/theme.d.ts.map +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.js.map +3 -3
- package/dist/esm/components/theme.props.d.ts +14 -0
- package/dist/esm/components/theme.props.d.ts.map +1 -1
- package/dist/esm/components/theme.props.js +1 -1
- package/dist/esm/components/theme.props.js.map +3 -3
- package/dist/esm/components/toggle-button.d.ts +52 -0
- package/dist/esm/components/toggle-button.d.ts.map +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-button.js.map +3 -3
- package/dist/esm/components/toggle-icon-button.d.ts +84 -2
- package/dist/esm/components/toggle-icon-button.d.ts.map +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js.map +3 -3
- package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
- package/dist/esm/hooks/index.d.ts +2 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/index.js.map +7 -0
- package/dist/esm/hooks/use-live-announcer.d.ts +6 -0
- package/dist/esm/hooks/use-live-announcer.d.ts.map +1 -0
- package/dist/esm/hooks/use-live-announcer.js +10 -0
- package/dist/esm/hooks/use-live-announcer.js.map +7 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/props/weight.prop.d.ts +1 -1
- package/dist/esm/props/weight.prop.js +1 -1
- package/dist/esm/props/weight.prop.js.map +2 -2
- package/layout/components.css +1 -0
- package/layout.css +1 -0
- package/package.json +2 -1
- package/src/components/_internal/base-button.css +483 -284
- package/src/components/_internal/base-button.props.ts +87 -0
- package/src/components/_internal/base-button.tsx +127 -10
- package/src/components/_internal/base-card.css +866 -83
- package/src/components/_internal/base-checkbox.css +252 -52
- package/src/components/_internal/base-checkbox.props.ts +4 -1
- package/src/components/_internal/base-dialog.css +39 -8
- package/src/components/_internal/base-menu.css +55 -32
- package/src/components/_internal/base-menu.props.ts +10 -0
- package/src/components/_internal/base-radio.css +222 -52
- package/src/components/_internal/base-radio.props.ts +4 -1
- package/src/components/_internal/base-sidebar-menu.css +223 -0
- package/src/components/_internal/base-sidebar.css +141 -0
- package/src/components/_internal/base-tab-list.css +16 -0
- package/src/components/accordion.css +657 -0
- package/src/components/accordion.props.tsx +90 -0
- package/src/components/accordion.tsx +209 -0
- package/src/components/alert-dialog.props.tsx +22 -2
- package/src/components/alert-dialog.tsx +94 -3
- package/src/components/avatar.css +294 -152
- package/src/components/avatar.props.tsx +7 -1
- package/src/components/avatar.tsx +12 -2
- package/src/components/badge.css +160 -138
- package/src/components/badge.props.tsx +10 -3
- package/src/components/badge.tsx +71 -9
- package/src/components/button.css +88 -0
- package/src/components/button.props.tsx +17 -0
- package/src/components/button.tsx +107 -5
- package/src/components/callout.css +122 -35
- package/src/components/callout.props.tsx +7 -1
- package/src/components/callout.tsx +32 -9
- package/src/components/card.css +0 -597
- package/src/components/card.props.tsx +3 -0
- package/src/components/card.tsx +4 -2
- package/src/components/checkbox-cards.css +27 -104
- package/src/components/checkbox-cards.props.tsx +2 -2
- package/src/components/checkbox-cards.tsx +21 -3
- package/src/components/checkbox.tsx +2 -0
- package/src/components/code.css +1 -1
- package/src/components/code.tsx +1 -1
- package/src/components/container.css +1 -0
- package/src/components/context-menu.tsx +54 -12
- package/src/components/dialog.props.tsx +3 -0
- package/src/components/dialog.tsx +93 -3
- package/src/components/dropdown-menu.tsx +49 -12
- package/src/components/icon-button.css +73 -4
- package/src/components/icon-button.tsx +125 -19
- package/src/components/image.css +160 -91
- package/src/components/image.props.ts +152 -15
- package/src/components/image.tsx +290 -247
- package/src/components/index.css +1 -0
- package/src/components/index.tsx +1 -0
- package/src/components/kbd.css +23 -44
- package/src/components/progress.css +130 -149
- package/src/components/progress.props.tsx +2 -2
- package/src/components/radio-cards.css +23 -113
- package/src/components/radio-cards.props.tsx +2 -2
- package/src/components/radio-cards.tsx +45 -18
- package/src/components/radio.tsx +4 -3
- package/src/components/scroll-area.css +1 -1
- package/src/components/segmented-control.css +83 -64
- package/src/components/segmented-control.props.tsx +3 -3
- package/src/components/select.css +502 -224
- package/src/components/select.props.tsx +8 -0
- package/src/components/select.tsx +45 -2
- package/src/components/sidebar.css +186 -630
- package/src/components/sidebar.tsx +61 -5
- package/src/components/slider.css +228 -88
- package/src/components/slider.props.tsx +6 -2
- package/src/components/slider.tsx +201 -24
- package/src/components/spinner.css +12 -0
- package/src/components/switch.css +135 -216
- package/src/components/switch.props.tsx +16 -4
- package/src/components/switch.tsx +5 -3
- package/src/components/tab-nav.tsx +6 -3
- package/src/components/tabs.tsx +2 -0
- package/src/components/text-area.css +222 -140
- package/src/components/text-area.props.tsx +18 -1
- package/src/components/text-area.tsx +58 -7
- package/src/components/text-field.css +214 -131
- package/src/components/text-field.props.tsx +17 -0
- package/src/components/text-field.tsx +79 -28
- package/src/components/theme.props.tsx +12 -0
- package/src/components/theme.tsx +31 -1
- package/src/components/toggle-button.tsx +102 -3
- package/src/components/toggle-icon-button.tsx +150 -7
- package/src/components/tooltip.css +3 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-live-announcer.ts +52 -0
- package/src/index.ts +1 -0
- package/src/props/weight.prop.ts +1 -1
- package/src/styles/fonts.css +27 -13
- package/src/styles/index.css +1 -1
- package/src/styles/tokens/base.css +2 -0
- package/src/styles/tokens/blur.css +32 -0
- package/src/styles/tokens/color.css +9 -9
- package/src/styles/tokens/constants.css +88 -140
- package/src/styles/tokens/index.css +2 -0
- package/src/styles/tokens/opacity.css +32 -0
- package/src/styles/tokens/radius.css +6 -10
- package/src/styles/tokens/shadow.css +25 -25
- package/src/styles/tokens/transition.css +49 -13
- package/src/styles/tokens/typography.css +7 -3
- package/src/styles/utilities/font-weight.css +16 -0
- package/styles.css +11129 -8945
- package/tokens/base.css +127 -49
- package/tokens.css +158 -114
- package/utilities.css +72 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/toggle-icon-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\nimport { BaseButton } from './_internal/base-button.js';\nimport type {
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAA2B,4BAC3BC,EAA2B,
|
|
6
|
-
"names": ["toggle_icon_button_exports", "__export", "ToggleIconButton", "__toCommonJS", "React", "import_radix_ui", "import_icon_button", "import_base_button", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\nimport { BaseButton } from './_internal/base-button.js';\nimport { useLiveAnnouncer } from '../hooks/use-live-announcer.js';\nimport type { IconButtonProps } from './icon-button.js';\n\ntype ToggleIconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Extract toggle-specific props from Radix Toggle\n * These props control the toggle state and behavior\n */\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof Toggle.Root>;\n\n/**\n * Required accessibility props for icon buttons (same as IconButton)\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Combine IconButton props with Toggle-specific props\n * Includes tooltip props from IconButton for comprehensive functionality\n */\ninterface ToggleIconButtonProps extends Omit<IconButtonProps, 'as'> {\n /** Controlled pressed state */\n pressed?: ToggleProps['pressed'];\n /** Callback when pressed state changes */\n onPressedChange?: ToggleProps['onPressedChange'];\n /** Default pressed state for uncontrolled usage */\n defaultPressed?: ToggleProps['defaultPressed'];\n}\n\n/**\n * Intersection with accessibility props to ensure compliance\n * This type ensures all ToggleIconButton instances have proper accessibility\n */\ntype ToggleIconButtonPropsWithAccessibility = ToggleIconButtonProps & AccessibilityProps;\n\n/**\n * ToggleIconButton component for icon buttons that can be pressed/unpressed\n *\n * The ToggleIconButton component extends IconButton with toggle functionality\n * using Radix UI's Toggle primitive. It provides proper accessibility announcements,\n * controlled/uncontrolled state management, and seamless integration with\n * the existing IconButton component.\n *\n * Key features:\n * - Controlled and uncontrolled state management\n * - Live accessibility announcements for screen readers\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic state validation and warnings\n * - Seamless integration with IconButton props and styling\n * - Proper ARIA attributes for toggle functionality\n * - Built-in tooltip support from IconButton\n *\n * @example\n * ```tsx\n * // Uncontrolled toggle icon button\n * <ToggleIconButton defaultPressed={false} aria-label=\"Toggle notifications\">\n * <Bell />\n * </ToggleIconButton>\n *\n * // Controlled toggle icon button\n * const [pressed, setPressed] = React.useState(false);\n * <ToggleIconButton\n * pressed={pressed}\n * onPressedChange={setPressed}\n * aria-label=\"Toggle notifications\"\n * >\n * <Bell />\n * </ToggleIconButton>\n *\n * // Toggle icon button with tooltip\n * <ToggleIconButton\n * variant=\"solid\"\n * size=\"3\"\n * color=\"blue\"\n * pressed={isActive}\n * onPressedChange={setIsActive}\n * aria-label=\"Toggle feature\"\n * tooltip=\"Toggle this feature on/off\"\n * >\n * <Star />\n * </ToggleIconButton>\n *\n * // Toggle icon button with aria-labelledby\n * <ToggleIconButton\n * aria-labelledby=\"notifications-label\"\n * pressed={notificationsEnabled}\n * onPressedChange={setNotificationsEnabled}\n * >\n * <Bell />\n * </ToggleIconButton>\n * <span id=\"notifications-label\">Toggle notifications</span>\n * ```\n */\nconst ToggleIconButton = React.forwardRef<\n ToggleIconButtonElement,\n ToggleIconButtonPropsWithAccessibility\n>(({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {\n // Get the live announcer for accessibility announcements\n const announce = useLiveAnnouncer();\n\n /**\n * Extract accessible name from various sources for announcements\n * This ensures screen readers announce meaningful state changes\n * Priority: aria-label > aria-labelledby > children > fallback\n */\n const getAccessibleName = React.useCallback(() => {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n children,\n } = iconButtonProps;\n\n // First priority: direct aria-label\n if (ariaLabel) return ariaLabel;\n\n // Second priority: referenced label element\n if (ariaLabelledBy) {\n const labelElement = document.getElementById(ariaLabelledBy);\n return labelElement?.textContent || 'Toggle icon button';\n }\n\n // Third priority: visible text children\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n\n // Fallback for edge cases\n return 'Toggle icon button';\n }, [iconButtonProps]);\n\n /**\n * Memoized handler for state changes with accessibility announcements\n * This ensures screen readers announce the new state immediately\n */\n const handlePressedChange = React.useCallback(\n (newPressed: boolean) => {\n const accessibleName = getAccessibleName();\n // Announce the state change for screen readers\n announce(`${accessibleName} ${newPressed ? 'pressed' : 'unpressed'}`);\n // Call the user's change handler\n onPressedChange?.(newPressed);\n },\n [announce, onPressedChange, getAccessibleName],\n );\n\n // Development-only warning for controlled/uncontrolled pattern\n // This helps developers avoid common state management mistakes\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'development' && pressed !== undefined && onPressedChange === undefined) {\n console.warn(\n 'ToggleIconButton: You provided a `pressed` prop without an `onPressedChange` handler. ' +\n 'This will result in a read-only toggle button. If you want the button to be interactive, ' +\n 'you should provide an `onPressedChange` handler.',\n );\n }\n }, [pressed, onPressedChange]);\n\n // Render the toggle icon button using Radix UI's Toggle primitive\n // This provides proper ARIA attributes and keyboard navigation\n // The IconButton component handles accessibility validation internally\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={handlePressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <IconButton {...iconButtonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n});\nToggleIconButton.displayName = 'ToggleIconButton';\n\nexport { ToggleIconButton };\nexport type { ToggleIconButtonPropsWithAccessibility as ToggleIconButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAA2B,4BAC3BC,EAA2B,sCAC3BC,EAAiC,0CAsGjC,MAAMN,EAAmBE,EAAM,WAG7B,CAAC,CAAE,QAAAK,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAgB,EAAGC,IAAiB,CAEpF,MAAMC,KAAW,oBAAiB,EAO5BC,EAAoBX,EAAM,YAAY,IAAM,CAChD,KAAM,CACJ,aAAcY,EACd,kBAAmBC,EACnB,SAAAC,CACF,EAAIN,EAGJ,OAAII,IAGAC,EACmB,SAAS,eAAeA,CAAc,GACtC,aAAe,qBAIlC,OAAOC,GAAa,SAAiBA,EACrCd,EAAM,eAAec,CAAQ,GAAK,OAAQA,EAAS,OAAe,UAAa,SACzEA,EAAS,MAAc,SAI1B,qBACT,EAAG,CAACN,CAAe,CAAC,EAMdO,EAAsBf,EAAM,YAC/BgB,GAAwB,CACvB,MAAMC,EAAiBN,EAAkB,EAEzCD,EAAS,GAAGO,CAAc,IAAID,EAAa,UAAY,WAAW,EAAE,EAEpEV,IAAkBU,CAAU,CAC9B,EACA,CAACN,EAAUJ,EAAiBK,CAAiB,CAC/C,EAIA,OAAAX,EAAM,UAAU,IAAM,CAQtB,EAAG,CAACK,EAASC,CAAe,CAAC,EAM3BN,EAAA,cAAC,SAAO,KAAP,CACC,QAASK,EACT,gBAAiBU,EACjB,eAAgBR,EAChB,QAAO,IAEPP,EAAA,cAAC,cAAY,GAAGQ,EAAiB,IAAKC,EAAc,CACtD,CAEJ,CAAC,EACDX,EAAiB,YAAc",
|
|
6
|
+
"names": ["toggle_icon_button_exports", "__export", "ToggleIconButton", "__toCommonJS", "React", "import_radix_ui", "import_icon_button", "import_base_button", "import_use_live_announcer", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef", "announce", "getAccessibleName", "ariaLabel", "ariaLabelledBy", "children", "handlePressedChange", "newPressed", "accessibleName"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { MarginProps } from '../props/margin.props.js';
|
|
2
2
|
export declare function extractMarginProps<T extends MarginProps>(props: T): {
|
|
3
|
-
m: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
4
|
-
mx: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
5
|
-
my: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
6
|
-
mt: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
7
|
-
mr: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
8
|
-
mb: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
9
|
-
ml: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "
|
|
3
|
+
m: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
4
|
+
mx: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
5
|
+
my: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
6
|
+
mt: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
7
|
+
mr: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
8
|
+
mb: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
9
|
+
ml: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
|
|
10
10
|
rest: Omit<T, "m" | "ml" | "mr" | "mt" | "mb" | "mx" | "my">;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=extract-margin-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(n,e)=>{for(var r in e)u(n,r,{get:e[r],enumerable:!0})},t=(n,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!p.call(n,o)&&o!==r&&u(n,o,{get:()=>e[o],enumerable:!(c=i(e,o))||c.enumerable});return n};var v=n=>t(u({},"__esModule",{value:!0}),n);var x={};s(x,{useLiveAnnouncer:()=>f.useLiveAnnouncer});module.exports=v(x);var f=require("./use-live-announcer.js");
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { useLiveAnnouncer } from './use-live-announcer.js'; "],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0DAAAE,EAAAF,GAAA,IAAAG,EAAiC",
|
|
6
|
+
"names": ["hooks_exports", "__export", "__toCommonJS", "import_use_live_announcer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-live-announcer.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-live-announcer.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,gBAAgB,cA+Be,MAAM,UAcpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";var a=Object.create;var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},c=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!m.call(t,i)&&i!==n&&o(t,i,{get:()=>e[i],enumerable:!(r=l(e,i))||r.enumerable});return t};var v=(t,e,n)=>(n=t!=null?a(d(t)):{},c(e||!t||!t.__esModule?o(n,"default",{value:t,enumerable:!0}):n,t)),f=t=>c(o({},"__esModule",{value:!0}),t);var x={};p(x,{useLiveAnnouncer:()=>h});module.exports=f(x);var u=v(require("react"));function h(){return u.useEffect(()=>{let e=document.getElementById("rt-live-announcer");return e||(e=document.createElement("div"),e.id="rt-live-announcer",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.style.cssText=`
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: -10000px;
|
|
4
|
+
width: 1px;
|
|
5
|
+
height: 1px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
clip: rect(0, 0, 0, 0);
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
`,document.body.appendChild(e)),()=>{e&&!e.hasChildNodes()&&e.remove()}},[]),u.useCallback(e=>{const n=document.getElementById("rt-live-announcer");n&&(n.textContent="",setTimeout(()=>{n.textContent=e},100))},[])}
|
|
10
|
+
//# sourceMappingURL=use-live-announcer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/use-live-announcer.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\n/**\n * Hook for making live announcements to screen readers\n * Creates a hidden aria-live region for announcing dynamic content changes\n */\nexport function useLiveAnnouncer() {\n\n // Create aria-live region if it doesn't exist\n React.useEffect(() => {\n let liveRegion = document.getElementById('rt-live-announcer');\n \n if (!liveRegion) {\n liveRegion = document.createElement('div');\n liveRegion.id = 'rt-live-announcer';\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = `\n position: absolute;\n left: -10000px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n `;\n document.body.appendChild(liveRegion);\n }\n\n return () => {\n // Clean up on unmount if no other components are using it\n if (liveRegion && !liveRegion.hasChildNodes()) {\n liveRegion.remove();\n }\n };\n }, []);\n\n const announce = React.useCallback((message: string) => {\n const liveRegion = document.getElementById('rt-live-announcer');\n if (liveRegion) {\n // Clear previous announcements\n liveRegion.textContent = '';\n \n // Add new announcement with a small delay to ensure it's announced\n setTimeout(() => {\n liveRegion.textContent = message;\n }, 100);\n }\n }, []);\n\n return announce;\n} "],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBAMhB,SAASF,GAAmB,CAGjC,OAAAE,EAAM,UAAU,IAAM,CACpB,IAAIC,EAAa,SAAS,eAAe,mBAAmB,EAE5D,OAAKA,IACHA,EAAa,SAAS,cAAc,KAAK,EACzCA,EAAW,GAAK,oBAChBA,EAAW,aAAa,YAAa,QAAQ,EAC7CA,EAAW,aAAa,cAAe,MAAM,EAC7CA,EAAW,MAAM,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAS3B,SAAS,KAAK,YAAYA,CAAU,GAG/B,IAAM,CAEPA,GAAc,CAACA,EAAW,cAAc,GAC1CA,EAAW,OAAO,CAEtB,CACF,EAAG,CAAC,CAAC,EAEYD,EAAM,YAAaE,GAAoB,CACtD,MAAMD,EAAa,SAAS,eAAe,mBAAmB,EAC1DA,IAEFA,EAAW,YAAc,GAGzB,WAAW,IAAM,CACfA,EAAW,YAAcC,CAC3B,EAAG,GAAG,EAEV,EAAG,CAAC,CAAC,CAGP",
|
|
6
|
+
"names": ["use_live_announcer_exports", "__export", "useLiveAnnouncer", "__toCommonJS", "React", "liveRegion", "message"]
|
|
7
|
+
}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(r,o,p,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of c(o))!d.call(r,m)&&m!==p&&a(r,m,{get:()=>o[m],enumerable:!(x=b(o,m))||x.enumerable});return r},f=(r,o,p)=>(t(r,o,"default"),p&&t(p,o,"default"));var g=r=>t(a({},"__esModule",{value:!0}),r);var e={};module.exports=g(e);f(e,require("./components/index.js"),module.exports);f(e,require("./hooks/index.js"),module.exports);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './components/index.js';\n"],
|
|
5
|
-
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,iCAAd",
|
|
4
|
+
"sourcesContent": ["export * from './components/index.js';\nexport * from './hooks/index.js';\n"],
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,iCAAd,gBACAE,EAAAF,EAAc,4BADd",
|
|
6
6
|
"names": ["src_exports", "__toCommonJS", "__reExport"]
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ declare const weightPropDef: {
|
|
|
2
2
|
weight: {
|
|
3
3
|
type: "enum";
|
|
4
4
|
className: string;
|
|
5
|
-
values: readonly ["light", "regular", "medium", "bold"];
|
|
5
|
+
values: readonly ["thin", "extralight", "light", "regular", "medium", "semibold", "bold", "extrabold"];
|
|
6
6
|
responsive: true;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},m=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!a.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(o=g(e,r))||o.enumerable});return t};var f=t=>m(i({},"__esModule",{value:!0}),t);var u={};l(u,{weightPropDef:()=>p});module.exports=f(u);const n=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],p={weight:{type:"enum",className:"rt-r-weight",values:n,responsive:!0}};
|
|
2
2
|
//# sourceMappingURL=weight.prop.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/props/weight.prop.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PropDef } from './prop-def.js';\n\nconst weights = ['light', 'regular', 'medium', 'bold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAU,CAAC,QAAS,UAAW,SAAU,
|
|
4
|
+
"sourcesContent": ["import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAU,CAAC,OAAQ,aAAc,QAAS,UAAW,SAAU,WAAY,OAAQ,WAAW,EAE9FF,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,UAAW,cACX,OAAQE,EACR,WAAY,EACd,CACF",
|
|
6
6
|
"names": ["weight_prop_exports", "__export", "weightPropDef", "__toCommonJS", "weights"]
|
|
7
7
|
}
|
|
@@ -4,11 +4,47 @@ import type { MarginProps } from '../../props/margin.props.js';
|
|
|
4
4
|
import type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';
|
|
5
5
|
import type { GetPropDefTypes } from '../../props/prop-def.js';
|
|
6
6
|
type BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;
|
|
7
|
+
/**
|
|
8
|
+
* Polymorphic BaseButton props that support rendering as different HTML elements
|
|
9
|
+
* Uses the proper ComponentPropsWithout pattern for type safety
|
|
10
|
+
* @template C - The element type to render as (defaults to 'button')
|
|
11
|
+
*/
|
|
7
12
|
type PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {
|
|
13
|
+
/** Element type to render as (e.g., 'a', 'span', etc.) */
|
|
8
14
|
as?: C;
|
|
9
15
|
} & BaseButtonOwnProps & MarginProps & ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;
|
|
16
|
+
/**
|
|
17
|
+
* BaseButton props interface that combines all available props
|
|
18
|
+
*/
|
|
10
19
|
interface BaseButtonProps extends PolymorphicBaseButtonProps {
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* BaseButton component that provides the core button functionality
|
|
23
|
+
*
|
|
24
|
+
* This is the foundational button component that handles all the complex logic
|
|
25
|
+
* including loading states, accessibility, performance optimizations, and
|
|
26
|
+
* polymorphic rendering. It's used by Button, IconButton, and other button
|
|
27
|
+
* variants to ensure consistent behavior across the design system.
|
|
28
|
+
*
|
|
29
|
+
* Key features:
|
|
30
|
+
* - Loading state with spinner and accessibility announcements
|
|
31
|
+
* - Performance optimizations for backdrop-filter effects
|
|
32
|
+
* - Comprehensive accessibility support
|
|
33
|
+
* - Polymorphic rendering support
|
|
34
|
+
* - Material/panel background handling
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* // Basic usage
|
|
39
|
+
* <BaseButton>Click me</BaseButton>
|
|
40
|
+
*
|
|
41
|
+
* // With loading state
|
|
42
|
+
* <BaseButton loading>Processing...</BaseButton>
|
|
43
|
+
*
|
|
44
|
+
* // Polymorphic rendering
|
|
45
|
+
* <BaseButton as="a" href="/link">Link Button</BaseButton>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
12
48
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
49
|
export { BaseButton };
|
|
14
50
|
export type { BaseButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAErE;;;;GAIG;AACH,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,0DAA0D;IAC1D,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F;;GAEG;AACH,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,UAAU,2FAoKd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import
|
|
1
|
+
import*as e from"react";import S from"classnames";import{Slot as z}from"radix-ui";import{baseButtonPropDefs as m}from"./base-button.props.js";import{Flex as j}from"../flex.js";import{Spinner as I}from"../spinner.js";import{VisuallyHidden as N}from"../visually-hidden.js";import{extractProps as O}from"../../helpers/extract-props.js";import{mapResponsiveProp as V,mapButtonSizeToSpinnerSize as F}from"../../helpers/map-prop-values.js";import{marginPropDefs as H}from"../../props/margin.props.js";const f=e.forwardRef((n,r)=>{const{size:y=m.size.default}=n,{className:B,children:o,asChild:p,as:a,color:b,radius:P,material:g,panelBackground:h,flush:C,disabled:u=n.loading,...T}=O(n,m,H);e.useEffect(()=>{n.panelBackground!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.")},[n.panelBackground]);const s=g??h,d=e.useRef(null);e.useEffect(()=>{const t=d.current;if(!t)return;if(s==="translucent"){t.style.setProperty("will-change","backdrop-filter");const k=()=>{const E=getComputedStyle(t).getPropertyValue("--duration-2")||"75ms",D=parseInt(E)||75;setTimeout(()=>{t&&s!=="translucent"&&t.style.setProperty("will-change","auto")},D)},c=new MutationObserver(k);return c.observe(t,{attributes:!0,attributeFilter:["data-material"]}),()=>{c.disconnect(),t.style.setProperty("will-change","auto")}}else t.style.setProperty("will-change","auto")},[s]);const v=p?z.Root:a||"button",w=p||!a||["button","input","textarea","select"].includes(a),M=e.useId(),i=n.loading?`${M}-loading`:void 0,l=e.useMemo(()=>typeof o=="string"?o:e.isValidElement(o)&&typeof o.props?.children=="string"?o.props.children:"button",[o]),x=e.useMemo(()=>n.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":i,"aria-label":`${l} (loading)`}:{},[n.loading,i,l]);return e.createElement(v,{"data-disabled":u||void 0,"data-accent-color":b,"data-radius":P,"data-material":s,"data-panel-background":s,"data-flush":C?"true":void 0,...T,...x,ref:t=>{typeof r=="function"?r(t):r&&(r.current=t),d.current=t},className:S("rt-reset","rt-BaseButton",B),...w&&{disabled:u}},n.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},o),e.createElement(N,null,e.createElement("span",{id:i},l," is loading, please wait..."),o),e.createElement(j,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(I,{size:V(y,F),"aria-hidden":"true"})))):o)});f.displayName="BaseButton";export{f as BaseButton};
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,
|
|
6
|
-
"names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "panelBackground", "flush", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled", "loadingId", "describedById", "accessibilityProps"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // Show deprecation warning for panelBackground when used\n // This helps developers migrate to the new material prop\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // Will-change cleanup for backdrop-filter performance optimization\n // This prevents layout thrashing when using translucent materials\n const buttonRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n const button = buttonRef.current;\n if (!button) return;\n\n const hasTranslucentMaterial = effectiveMaterial === 'translucent';\n\n if (hasTranslucentMaterial) {\n // Add will-change when material is translucent to optimize rendering\n button.style.setProperty('will-change', 'backdrop-filter');\n\n // Clean up will-change after transition completes to prevent memory leaks\n const cleanup = () => {\n const transitionDuration =\n getComputedStyle(button).getPropertyValue('--duration-2') || '75ms';\n const duration = parseInt(transitionDuration) || 75;\n\n setTimeout(() => {\n if (button && effectiveMaterial !== 'translucent') {\n button.style.setProperty('will-change', 'auto');\n }\n }, duration);\n };\n\n // Listen for material changes to clean up will-change property\n const observer = new MutationObserver(cleanup);\n observer.observe(button, { attributes: true, attributeFilter: ['data-material'] });\n\n return () => {\n observer.disconnect();\n button.style.setProperty('will-change', 'auto');\n };\n } else {\n // Remove will-change when material is not translucent\n button.style.setProperty('will-change', 'auto');\n }\n }, [effectiveMaterial]);\n\n // asChild takes precedence over as prop for Radix Slot integration\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={(node) => {\n // Handle both forwarded ref and internal ref for performance optimization\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n buttonRef.current = node;\n }}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner\n size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)}\n aria-hidden=\"true\"\n />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAqD/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAG7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,SAAAC,EAAWZ,EAAM,QACjB,GAAGa,CACL,EAAIlB,EAAaK,EAAOT,EAAoBO,CAAc,EAI1DV,EAAM,UAAU,IAAM,CAChBY,EAAM,kBAAoB,QAC5B,QAAQ,KACN,yHACF,CAEJ,EAAG,CAACA,EAAM,eAAe,CAAC,EAG1B,MAAMc,EAAoBL,GAAYC,EAIhCK,EAAY3B,EAAM,OAAoB,IAAI,EAEhDA,EAAM,UAAU,IAAM,CACpB,MAAM4B,EAASD,EAAU,QACzB,GAAI,CAACC,EAAQ,OAIb,GAF+BF,IAAsB,cAEzB,CAE1BE,EAAO,MAAM,YAAY,cAAe,iBAAiB,EAGzD,MAAMC,EAAU,IAAM,CACpB,MAAMC,EACJ,iBAAiBF,CAAM,EAAE,iBAAiB,cAAc,GAAK,OACzDG,EAAW,SAASD,CAAkB,GAAK,GAEjD,WAAW,IAAM,CACXF,GAAUF,IAAsB,eAClCE,EAAO,MAAM,YAAY,cAAe,MAAM,CAElD,EAAGG,CAAQ,CACb,EAGMC,EAAW,IAAI,iBAAiBH,CAAO,EAC7C,OAAAG,EAAS,QAAQJ,EAAQ,CAAE,WAAY,GAAM,gBAAiB,CAAC,eAAe,CAAE,CAAC,EAE1E,IAAM,CACXI,EAAS,WAAW,EACpBJ,EAAO,MAAM,YAAY,cAAe,MAAM,CAChD,CACF,MAEEA,EAAO,MAAM,YAAY,cAAe,MAAM,CAElD,EAAG,CAACF,CAAiB,CAAC,EAGtB,MAAMO,EAAOhB,EAAUf,EAAK,KAAOgB,GAAM,SAInCgB,EACJjB,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAGnEiB,EAAYnC,EAAM,MAAM,EACxBoC,EAAgBxB,EAAM,QAAU,GAAGuB,CAAS,WAAa,OAGzDE,EAAarC,EAAM,QAAQ,IAC3B,OAAOgB,GAAa,SAAiBA,EACrChB,EAAM,eAAegB,CAAQ,GAAK,OAAQA,EAAS,OAAe,UAAa,SACzEA,EAAS,MAAc,SAE1B,SACN,CAACA,CAAQ,CAAC,EAIPsB,EAAqBtC,EAAM,QAAQ,IACnCY,EAAM,QACD,CACL,YAAa,GACb,gBAAiB,GACjB,mBAAoBwB,EACpB,aAAc,GAAGC,CAAU,YAC7B,EAEK,CAAC,EACP,CAACzB,EAAM,QAASwB,EAAeC,CAAU,CAAC,EAE7C,OACErC,EAAA,cAACiC,EAAA,CAEC,gBAAeT,GAAY,OAC3B,oBAAmBL,EACnB,cAAaC,EACb,gBAAeM,EACf,wBAAuBA,EACvB,aAAYH,EAAQ,OAAS,OAC5B,GAAGE,EACH,GAAGa,EACJ,IAAMC,GAAS,CAET,OAAO1B,GAAiB,WAC1BA,EAAa0B,CAAI,EACR1B,IACTA,EAAa,QAAU0B,GAEzBZ,EAAU,QAAUY,CACtB,EACA,UAAWtC,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAImB,GAAsB,CAAE,SAAAV,CAAS,GAErCZ,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EAGAhB,EAAA,cAACM,EAAA,KACCN,EAAA,cAAC,QAAK,GAAIoC,GAAgBC,EAAW,6BAA2B,EAC/DrB,CACH,EAGAhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CACC,KAAMG,EAAkBM,EAAML,CAA0B,EACxD,cAAY,OACd,CACF,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "material", "panelBackground", "flush", "disabled", "baseButtonProps", "effectiveMaterial", "buttonRef", "button", "cleanup", "transitionDuration", "duration", "observer", "Comp", "shouldPassDisabled", "loadingId", "describedById", "buttonText", "accessibilityProps", "node"]
|
|
7
7
|
}
|
|
@@ -1,19 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base button prop definitions that define the component's API
|
|
3
|
+
*
|
|
4
|
+
* These props are used by all button variants (Button, IconButton, etc.)
|
|
5
|
+
* to ensure consistent behavior and styling across the design system.
|
|
6
|
+
*
|
|
7
|
+
* Key features:
|
|
8
|
+
* - Responsive sizing with mobile-first approach
|
|
9
|
+
* - Six visual variants for different interface contexts
|
|
10
|
+
* - Comprehensive color system with semantic meanings
|
|
11
|
+
* - Loading states with automatic accessibility
|
|
12
|
+
* - Material system for visual depth and elevation
|
|
13
|
+
* - Polymorphic rendering support via asChild
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* // Basic button with default props
|
|
18
|
+
* <BaseButton>Click me</BaseButton>
|
|
19
|
+
*
|
|
20
|
+
* // Button with custom size and variant
|
|
21
|
+
* <BaseButton size="3" variant="solid">Primary Action</BaseButton>
|
|
22
|
+
*
|
|
23
|
+
* // Button with loading state
|
|
24
|
+
* <BaseButton loading>Processing...</BaseButton>
|
|
25
|
+
*
|
|
26
|
+
* // Button with material and high contrast
|
|
27
|
+
* <BaseButton material="translucent" highContrast>Elevated Button</BaseButton>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
1
30
|
declare const baseButtonPropDefs: {
|
|
31
|
+
/**
|
|
32
|
+
* Loading state that shows a spinner and disables interaction
|
|
33
|
+
* Automatically sets disabled=true and provides accessibility announcements
|
|
34
|
+
*/
|
|
2
35
|
loading: {
|
|
3
36
|
type: "boolean";
|
|
4
37
|
className: string;
|
|
5
38
|
default: false;
|
|
6
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Full width mode that expands the button to fill its container
|
|
42
|
+
* Useful for mobile layouts and form submissions
|
|
43
|
+
*/
|
|
7
44
|
fullWidth: {
|
|
8
45
|
type: "boolean";
|
|
9
46
|
className: string;
|
|
10
47
|
default: false;
|
|
11
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Material type for visual rendering and depth effects
|
|
51
|
+
* Controls how the button renders its visual elements
|
|
52
|
+
*/
|
|
53
|
+
material: {
|
|
54
|
+
type: "enum";
|
|
55
|
+
values: readonly ["solid", "translucent"];
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Panel background type (deprecated)
|
|
60
|
+
* @deprecated Use `material` prop instead. This prop will be removed in a future version.
|
|
61
|
+
*/
|
|
12
62
|
panelBackground: {
|
|
13
63
|
type: "enum";
|
|
14
64
|
values: readonly ["solid", "translucent"];
|
|
15
65
|
default: undefined;
|
|
16
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* Flush mode that removes visual padding for seamless text integration
|
|
69
|
+
* Only effective with ghost variant
|
|
70
|
+
*/
|
|
17
71
|
flush: {
|
|
18
72
|
type: "boolean";
|
|
19
73
|
default: false;
|
|
@@ -33,6 +87,10 @@ declare const baseButtonPropDefs: {
|
|
|
33
87
|
values: readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"];
|
|
34
88
|
default: "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky";
|
|
35
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Button size for responsive design and interface density
|
|
92
|
+
* Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }
|
|
93
|
+
*/
|
|
36
94
|
size: {
|
|
37
95
|
type: "enum";
|
|
38
96
|
className: string;
|
|
@@ -40,6 +98,9 @@ declare const baseButtonPropDefs: {
|
|
|
40
98
|
default: "2";
|
|
41
99
|
responsive: true;
|
|
42
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Visual variant that determines the button's appearance and context
|
|
103
|
+
*/
|
|
43
104
|
variant: {
|
|
44
105
|
type: "enum";
|
|
45
106
|
className: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAwCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,kBAAkB;IActB;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;IAnCH;;;OAGG;;;;;;;;IAEH;;OAEG;;;;;;;;;;CAsCJ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as
|
|
1
|
+
import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as a}from"../../props/color.prop.js";import{highContrastPropDef as o}from"../../props/high-contrast.prop.js";import{radiusPropDef as s}from"../../props/radius.prop.js";const t=["1","2","3","4"],n=["classic","solid","soft","surface","outline","ghost"],r=["solid","translucent"],l=["solid","translucent"],f={...e,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:n,default:"solid"},...a,...o,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:l,default:void 0},panelBackground:{type:"enum",values:r,default:void 0},flush:{type:"boolean",default:!1}};export{f as baseButtonPropDefs};
|
|
2
2
|
//# sourceMappingURL=base-button.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,
|
|
6
|
-
"names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "baseButtonPropDefs"]
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAW9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAMrEC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGR,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQI,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
|
|
6
|
+
"names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs"]
|
|
7
7
|
}
|
|
@@ -19,9 +19,14 @@ declare const baseCheckboxPropDefs: {
|
|
|
19
19
|
variant: {
|
|
20
20
|
type: "enum";
|
|
21
21
|
className: string;
|
|
22
|
-
values: readonly ["classic", "solid", "soft"];
|
|
22
|
+
values: readonly ["classic", "solid", "soft", "outline", "surface"];
|
|
23
23
|
default: "solid";
|
|
24
24
|
};
|
|
25
|
+
material: {
|
|
26
|
+
type: "enum";
|
|
27
|
+
values: readonly ["solid", "translucent"];
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
25
30
|
};
|
|
26
31
|
export { baseCheckboxPropDefs };
|
|
27
32
|
//# sourceMappingURL=base-checkbox.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-checkbox.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-checkbox.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-checkbox.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-checkbox.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUzB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{colorPropDef as
|
|
1
|
+
import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const t=["1","2","3"],a=["classic","solid","soft","outline","surface"],r=["solid","translucent"],o={size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:a,default:"solid"},material:{type:"enum",values:r,default:void 0},...e,...s};export{o as baseCheckboxPropDefs};
|
|
2
2
|
//# sourceMappingURL=base-checkbox.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-checkbox.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'solid', 'soft'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,QAAS,
|
|
6
|
-
"names": ["colorPropDef", "highContrastPropDef", "sizes", "variants", "baseCheckboxPropDefs"]
|
|
4
|
+
"sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'solid', 'soft', 'outline', 'surface'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n material: { type: 'enum', values: materials, default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n};\n\nexport { baseCheckboxPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAY,CAAC,QAAS,aAAa,EAEnCC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,SAAU,CAAE,KAAM,OAAQ,OAAQC,EAAW,QAAS,MAAU,EAChE,GAAGJ,EACH,GAAGC,CACL",
|
|
6
|
+
"names": ["colorPropDef", "highContrastPropDef", "sizes", "variants", "materials", "baseCheckboxPropDefs"]
|
|
7
7
|
}
|
|
@@ -22,6 +22,14 @@ declare const baseMenuContentPropDefs: {
|
|
|
22
22
|
values: readonly ["solid", "soft"];
|
|
23
23
|
default: "solid";
|
|
24
24
|
};
|
|
25
|
+
material: {
|
|
26
|
+
type: "enum";
|
|
27
|
+
values: readonly ["solid", "translucent"];
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `material` prop instead. This prop will be removed in a future version.
|
|
32
|
+
*/
|
|
25
33
|
panelBackground: {
|
|
26
34
|
type: "enum";
|
|
27
35
|
values: readonly ["solid", "translucent"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmB3B;;OAEG;;;;;;CAaJ,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAMzB,CAAC;AAEF,QAAA,MAAM,4BAA4B;;;;;;;;;CAKjC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;CAE9B,CAAC;AAEF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as t}from"../../props/as-child.prop.js";import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const
|
|
1
|
+
import{asChildPropDef as t}from"../../props/as-child.prop.js";import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const n=["1","2"],o=["solid","soft"],r=["solid","translucent"],a=["solid","translucent"],i={size:{type:"enum",className:"rt-r-size",values:n,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:o,default:"solid"},material:{type:"enum",values:a,default:void 0},panelBackground:{type:"enum",values:r,default:void 0},...e,...s},p={...t,...e,shortcut:{type:"string"}},f={...e,shortcut:{type:"string"}},u={...e};export{f as baseMenuCheckboxItemPropDefs,i as baseMenuContentPropDefs,p as baseMenuItemPropDefs,u as baseMenuRadioItemPropDefs};
|
|
2
2
|
//# sourceMappingURL=base-menu.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-menu.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,
|
|
6
|
-
"names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n material: {\n type: 'enum',\n values: materials,\n default: undefined,\n },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EAEnCC,EAA0B,CAC9B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQJ,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,SAAU,CACR,KAAM,OACN,OAAQE,EACR,QAAS,MACX,EAIA,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,MACX,EACA,GAAGJ,EACH,GAAGC,CACL,EAOMM,EAAuB,CAC3B,GAAGR,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMQ,EAA+B,CACnC,GAAGR,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMS,EAA4B,CAChC,GAAGT,CACL",
|
|
6
|
+
"names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "materials", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
|
|
7
7
|
}
|
|
@@ -19,9 +19,14 @@ declare const baseRadioPropDefs: {
|
|
|
19
19
|
variant: {
|
|
20
20
|
type: "enum";
|
|
21
21
|
className: string;
|
|
22
|
-
values: readonly ["classic", "solid", "soft"];
|
|
22
|
+
values: readonly ["classic", "solid", "soft", "outline", "surface"];
|
|
23
23
|
default: "solid";
|
|
24
24
|
};
|
|
25
|
+
material: {
|
|
26
|
+
type: "enum";
|
|
27
|
+
values: readonly ["solid", "translucent"];
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
25
30
|
};
|
|
26
31
|
export { baseRadioPropDefs };
|
|
27
32
|
//# sourceMappingURL=base-radio.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-radio.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-radio.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-radio.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-radio.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUtB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|