@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/image.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { Skeleton } from './skeleton.js';\nimport { Box } from './box.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n loading?: 'eager' | 'lazy';\n /**\n * Placeholder image URL to show while the main image is loading.\n * Can be a low-quality/blurred version of the main image.\n */\n placeholder?: string;\n /**\n * Shows a skeleton placeholder while loading instead of a blank space.\n */\n showSkeleton?: boolean;\n /**\n * Whether the image should fade in when loaded. Set to false for background images or when you want immediate visibility.\n */\n fadeIn?: boolean;\n /**\n * Callback fired when the image successfully loads.\n */\n onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Callback fired when the image fails to load.\n */\n onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Style object to apply to the wrapper container. Useful for overriding display, width, height, etc.\n */\n wrapperStyle?: React.CSSProperties;\n};\n\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n LayoutProps,\n ImageOwnProps {\n /**\n * The alt attribute provides alternative information for an image if a user for some reason cannot view it.\n * Required for accessibility when not using asChild. Use empty string for decorative images.\n */\n alt: string;\n}\n\nconst Image = React.forwardRef<ImageElement, ImageProps>((props, forwardedRef) => {\n const { variant = 'surface', wrapperStyle, ...restProps } = props;\n const {\n asChild,\n className,\n radius,\n style,\n loading = 'lazy',\n alt,\n src,\n placeholder,\n showSkeleton = false,\n fadeIn = true,\n onLoad: userOnLoad,\n onError: userOnError,\n children,\n ...wrapperProps\n } = extractProps(\n restProps,\n imagePropDefs,\n marginPropDefs,\n widthPropDefs,\n heightPropDefs,\n layoutPropDefs,\n );\n\n // Loading state management\n const [imageLoaded, setImageLoaded] = React.useState(false);\n const [imageError, setImageError] = React.useState(false);\n const [showPlaceholder, setShowPlaceholder] = React.useState(!!placeholder);\n\n // Ref to check if image is already loaded (for cached images)\n const imgRef = React.useRef<HTMLImageElement>(null);\n\n // Handle image load\n const handleLoad = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n userOnLoad?.(event);\n },\n [userOnLoad],\n );\n\n // Handle image error\n const handleError = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setImageLoaded(false);\n setImageError(true);\n setShowPlaceholder(false);\n userOnError?.(event);\n },\n [userOnError],\n );\n\n // Check if image is already loaded (for cached images)\n React.useEffect(() => {\n const img = imgRef.current;\n if (img && img.complete && img.naturalWidth > 0) {\n setImageLoaded(true);\n setImageError(false);\n setShowPlaceholder(false);\n }\n }, [src]);\n\n // Validate required props\n if (!src) {\n console.warn('Image component: src prop is required');\n return null;\n }\n\n if (!asChild && alt === undefined) {\n console.warn('Image component: alt prop is required for accessibility when not using asChild');\n }\n\n // Common image styles that apply to the actual img element\n const imgStyle: React.CSSProperties = {\n width: '100%',\n height: '100%',\n display: 'block',\n opacity: fadeIn ? (imageLoaded ? 1 : 0) : 1,\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n ...style, // Allow style overrides for the image\n };\n\n // Wrapper styles that get all the sizing and positioning\n const wrapperStyleFinal: React.CSSProperties = {\n position: 'relative',\n display: 'block', // Use block instead of inline-block to work better with AspectRatio\n ...wrapperStyle,\n };\n\n // Create skeleton placeholder\n const skeletonElement =\n showSkeleton && !imageLoaded && !imageError ? (\n <Skeleton\n width=\"100%\"\n height=\"100px\" // Default height, can be overridden by wrapper\n style={{\n borderRadius: radius ? `var(--radius-${radius})` : undefined,\n }}\n className={className}\n />\n ) : null;\n\n // Create placeholder image element\n const placeholderElement =\n placeholder && showPlaceholder ? (\n <img\n data-radius={radius}\n style={{\n ...imgStyle,\n filter: 'blur(4px)',\n opacity: 0.7,\n transition: 'opacity 0.3s ease-out',\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--placeholder', className)}\n alt=\"\"\n src={placeholder}\n />\n ) : null;\n\n // Handle asChild - inject content into the child element\n if (asChild && children) {\n const child = React.Children.only(children) as React.ReactElement<any>;\n\n if (variant === 'blur') {\n // For blur variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-variant-blur'),\n style: {\n textDecoration: 'none',\n color: 'inherit',\n border: 'none',\n background: 'none',\n padding: 0,\n font: 'inherit',\n cursor: 'pointer',\n ...wrapperStyleFinal,\n ...style, // Apply sizing to the child element\n ...child.props?.style,\n },\n children: (\n <>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n position: 'absolute',\n top: '0',\n left: '0',\n width: '105%',\n height: '105%',\n transform: 'translate(-2.5%, -2.5%)',\n filter: 'blur(16px) saturate(1.5)',\n opacity: 0.5,\n zIndex: -1,\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur-bg', className)}\n alt=\"\"\n src={src}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={imgStyle}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </>\n ),\n });\n } else {\n // For surface variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className),\n style: {\n textDecoration: 'none',\n color: 'inherit',\n border: 'none',\n background: 'none',\n padding: 0,\n font: 'inherit',\n cursor: 'pointer',\n ...wrapperStyleFinal,\n ...child.props?.style,\n },\n children: (\n <>\n {skeletonElement}\n {placeholderElement}\n <img\n data-radius={radius}\n loading={loading}\n style={imgStyle}\n className={classNames('rt-reset', 'rt-Image', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </>\n ),\n });\n }\n }\n\n // Regular rendering without asChild - both variants use Box wrapper\n if (variant === 'blur') {\n return (\n <Box\n className={classNames('rt-variant-blur', className)}\n style={{\n ...style, // Include the width/height styles from extractProps\n ...wrapperStyleFinal,\n }}\n {...wrapperProps} // Apply other props to wrapper\n >\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n position: 'absolute',\n top: '0',\n left: '0',\n width: '105%',\n height: '105%',\n transform: 'translate(-2.5%, -2.5%)',\n filter: 'blur(16px) saturate(1.5)',\n opacity: 0.5,\n zIndex: -1,\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur-bg', className)}\n alt=\"\"\n src={src}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={imgStyle}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </Box>\n );\n }\n\n // Surface variant - also use Box wrapper for consistency\n return (\n <Box\n className={className}\n style={{\n ...style, // Include the width/height styles from extractProps\n ...wrapperStyleFinal,\n }}\n {...wrapperProps} // Apply other props to wrapper\n >\n {skeletonElement}\n {placeholderElement}\n <img\n data-radius={radius}\n loading={loading}\n style={imgStyle}\n className={classNames('rt-reset', 'rt-Image', className)}\n alt={alt}\n src={src}\n onLoad={handleLoad}\n onError={handleError}\n ref={(node) => {\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n />\n </Box>\n );\n});\n\nImage.displayName = 'Image';\n\nexport { Image };\nexport type { ImageProps };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["React", "classNames", "imagePropDefs", "extractProps", "marginPropDefs", "widthPropDefs", "heightPropDefs", "layoutPropDefs", "Skeleton", "
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { Skeleton } from './skeleton.js';\nimport { Slot } from './slot.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\n\n/**\n * Core Image props that extend the base image prop definitions\n * These props provide enhanced functionality beyond standard HTML img attributes\n */\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n /**\n * Native loading behavior for the image\n * 'lazy' defers loading until the image is near the viewport\n * 'eager' loads the image immediately\n */\n loading?: 'eager' | 'lazy';\n /**\n * Placeholder image URL to show while the main image is loading\n *\n * Best practices:\n * - Use a low-quality/blurred version of the main image\n * - Keep file size small (under 10KB recommended)\n * - Use same aspect ratio as main image\n * - Consider using base64 data URLs for inline placeholders\n *\n * @example\n * ```tsx\n * <Image\n * src=\"/high-res-image.jpg\"\n * placeholder=\"/low-res-placeholder.jpg\"\n * alt=\"Product photo\"\n * />\n * ```\n */\n placeholder?: string;\n /**\n * Shows a skeleton placeholder while loading instead of a blank space\n *\n * Use this when:\n * - You don't have a placeholder image\n * - You want consistent loading states across your interface\n * - The image is part of a content layout that needs stable dimensions\n */\n showSkeleton?: boolean;\n /**\n * Whether the image should fade in when loaded\n *\n * Set to false for:\n * - Background images where immediate visibility is important\n * - Images that need to appear instantly for UX reasons\n * - When you're implementing custom loading animations\n */\n fadeIn?: boolean;\n /**\n * Callback fired when the image successfully loads\n *\n * Use this to:\n * - Track image loading performance\n * - Trigger layout adjustments after load\n * - Implement custom loading state management\n */\n onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n /**\n * Callback fired when the image fails to load\n *\n * Use this to:\n * - Log errors for monitoring\n * - Show fallback content\n * - Implement retry logic\n */\n onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;\n};\n\n/**\n * Complete Image component props interface\n *\n * Combines HTML img attributes with design system props and enhanced functionality.\n * Excludes conflicting props like 'color', 'width', 'height' that are handled by the design system.\n */\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n LayoutProps,\n ImageOwnProps {\n /**\n * Alternative text for the image\n *\n * Required for accessibility when not using asChild pattern.\n * Describes the image content for screen readers and when images fail to load.\n *\n * Guidelines:\n * - Be descriptive but concise\n * - Don't include \"image of\" or \"picture of\"\n * - Use empty string (\"\") for purely decorative images\n * - Describe the content and context, not just what you see\n *\n * @example\n * ```tsx\n * // Good alt text\n * <Image src=\"/chart.png\" alt=\"Sales increased 25% from Q1 to Q2\" />\n *\n * // Decorative image\n * <Image src=\"/decoration.png\" alt=\"\" />\n *\n * // Avoid generic descriptions\n * <Image src=\"/photo.jpg\" alt=\"A photo\" /> // \u274C Too generic\n * <Image src=\"/photo.jpg\" alt=\"Team celebrating project launch\" /> // \u2705 Descriptive\n * ```\n */\n alt: string;\n}\n\n/**\n * Image component for displaying images with enhanced loading states and accessibility\n *\n * The Image component extends the standard HTML img element with advanced features\n * including placeholder images, skeleton loading states, fade-in animations, and\n * comprehensive accessibility support. It integrates seamlessly with the design\n * system's layout, spacing, and theming capabilities.\n *\n * Key features:\n * - Progressive loading with placeholder and skeleton states\n * - Fade-in animations with reduced motion support\n * - Comprehensive accessibility with ARIA attributes\n * - Object-fit control for responsive image scaling\n * - Caption support for additional context\n * - AsChild pattern for flexible composition\n * - Error handling with fallback states\n * - Performance optimizations for cached images\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Image src=\"/photo.jpg\" alt=\"Team photo\" />\n *\n * // With placeholder and skeleton\n * <Image\n * src=\"/high-res.jpg\"\n * placeholder=\"/low-res.jpg\"\n * showSkeleton\n * alt=\"Product showcase\"\n * />\n *\n * // With caption and custom fit\n * <Image\n * src=\"/chart.png\"\n * alt=\"Sales data visualization\"\n * caption=\"Q3 2024 Sales Performance\"\n * fit=\"contain\"\n * width=\"400px\"\n * height=\"300px\"\n * />\n *\n * // As clickable element\n * <Image\n * asChild\n * src=\"/thumbnail.jpg\"\n * alt=\"View full gallery\"\n * >\n * <a href=\"/gallery\">\n * View Gallery\n * </a>\n * </Image>\n * ```\n */\nconst Image = React.forwardRef<ImageElement, ImageProps>((props, forwardedRef) => {\n // Extract and organize props for different purposes\n const {\n asChild,\n className,\n style,\n loading = 'lazy', // Default to lazy loading for performance\n alt,\n src,\n placeholder,\n showSkeleton = false, // Default to no skeleton for simpler UX\n fadeIn = true, // Default to fade-in for smooth loading experience\n\n errorAriaLabel = 'Failed to load image',\n radius,\n caption,\n onLoad: userOnLoad,\n onError: userOnError,\n children,\n ...wrapperProps\n } = extractProps(\n props,\n imagePropDefs,\n marginPropDefs,\n widthPropDefs,\n heightPropDefs,\n layoutPropDefs,\n );\n\n // State management for loading, error, and placeholder states\n const [loadingState, setLoadingState] = React.useState<'loading' | 'loaded' | 'error'>('loading');\n const [showPlaceholder, setShowPlaceholder] = React.useState(!!placeholder);\n const imgRef = React.useRef<HTMLImageElement>(null);\n\n /**\n * Handle successful image load\n * Updates state and triggers user callback for load event\n */\n const handleLoad = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setLoadingState('loaded');\n setShowPlaceholder(false);\n // Call user's onLoad handler if provided\n userOnLoad?.(event);\n },\n [userOnLoad],\n );\n\n /**\n * Handle image load error\n * Updates state and triggers user callback for error event\n */\n const handleError = React.useCallback(\n (event: React.SyntheticEvent<HTMLImageElement>) => {\n setLoadingState('error');\n setShowPlaceholder(false);\n // Call user's onError handler if provided\n userOnError?.(event);\n },\n [userOnError],\n );\n\n /**\n * Check if image is already loaded (optimization for cached images)\n * This prevents unnecessary loading states for images that are already available\n */\n React.useEffect(() => {\n const img = imgRef.current;\n if (img && img.complete && img.naturalWidth > 0) {\n setLoadingState('loaded');\n setShowPlaceholder(false);\n }\n }, [src]);\n\n // Validate required props and provide helpful development warnings\n if (!src) {\n console.warn('Image component: src prop is required');\n return null;\n }\n\n if (!asChild && alt === undefined) {\n console.warn('Image component: alt prop is required for accessibility when not using asChild');\n }\n\n // Derive loading state flags for cleaner conditional rendering\n const isLoading = loadingState === 'loading';\n const isError = loadingState === 'error';\n const isLoaded = loadingState === 'loaded';\n\n /**\n * ARIA attributes for comprehensive accessibility support\n * These attributes help screen readers understand the image state\n */\n const ariaProps = {\n 'aria-busy': isLoading,\n 'aria-invalid': isError,\n 'aria-describedby': isError ? 'image-error' : undefined,\n };\n\n /**\n * Image styling that handles fade-in animation and responsive behavior\n * Respects user's motion preferences through CSS media queries\n */\n const imgStyle: React.CSSProperties = {\n width: '100%',\n height: '100%',\n display: 'block',\n // Conditional opacity for fade-in effect\n opacity: fadeIn ? (isLoaded ? 1 : 0) : 1,\n // Smooth transition for fade-in, respects reduced motion preferences\n transition: fadeIn ? 'opacity 0.3s ease-out' : 'none',\n };\n\n /**\n * Create the complete image content structure\n * This includes the main image, placeholder, skeleton, caption, and error states\n */\n const imageContent = (\n <>\n {/*\n * Image container - handles layout and positioning\n * Uses flex layout when caption is present for proper space distribution\n */}\n <div\n style={{\n position: 'relative',\n flex: caption ? '1 1 0%' : undefined,\n height: caption ? undefined : '100%',\n minHeight: 0, // Important for flex shrinking in constrained layouts\n }}\n >\n {/*\n * Error message for screen readers\n * Hidden visually but announced by assistive technology\n */}\n {isError && (\n <div id=\"image-error\" className=\"rt-sr-only\" aria-live=\"polite\">\n {errorAriaLabel}\n </div>\n )}\n\n {/*\n * Skeleton placeholder during loading\n * Provides visual feedback and prevents layout shift\n */}\n {showSkeleton && isLoading && (\n <Skeleton width=\"100%\" height=\"100%\" style={{ position: 'absolute', inset: 0 }} />\n )}\n\n {/*\n * Placeholder image with blur effect\n * Shows a low-quality version while the main image loads\n */}\n {placeholder && showPlaceholder && (\n <img\n style={{\n ...imgStyle,\n position: 'absolute',\n inset: 0,\n filter: 'blur(4px)', // Creates the blur effect for LQIP (Low Quality Image Placeholder)\n opacity: 0.7, // Subtle opacity to indicate it's a placeholder\n zIndex: 0, // Behind the main image\n }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--placeholder')}\n alt=\"\" // Decorative placeholder, no alt text needed\n src={placeholder}\n />\n )}\n\n {/*\n * Main image element\n * Handles all the core functionality and user interactions\n */}\n <img\n ref={(node) => {\n // Handle both internal ref and forwarded ref\n imgRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n loading={loading}\n style={{ ...imgStyle, position: 'relative', zIndex: 1 }}\n className={classNames('rt-reset', 'rt-Image', className)}\n alt={alt}\n src={src}\n data-radius={radius}\n onLoad={handleLoad}\n onError={handleError}\n {...ariaProps}\n />\n </div>\n\n {/*\n * Caption element - positioned below the image\n * Takes only the space it needs, doesn't interfere with image sizing\n */}\n {caption && (\n <div className=\"rt-Image-caption\" style={{ flex: '0 0 auto' }}>\n {caption}\n </div>\n )}\n </>\n );\n\n /**\n * Container styling that adapts based on caption presence\n * Uses flexbox when caption is present for proper layout control\n */\n const containerStyle: React.CSSProperties = {\n display: caption ? 'flex' : 'block',\n flexDirection: caption ? 'column' : undefined,\n ...style, // Allow user styles to override defaults\n };\n\n /**\n * Render with asChild pattern for composition\n * This allows the Image to be rendered as a child of another element\n * while maintaining all its functionality and styling\n */\n if (asChild) {\n return (\n <Slot className={className} style={containerStyle} {...wrapperProps}>\n {React.cloneElement(children as React.ReactElement, {}, imageContent)}\n </Slot>\n );\n }\n\n /**\n * Regular rendering as a standalone div container\n * This is the default rendering mode for most use cases\n */\n return (\n <div className={className} style={containerStyle} {...wrapperProps}>\n {imageContent}\n </div>\n );\n});\n\nImage.displayName = 'Image';\n\nexport { Image };\nexport type { ImageProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,M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,EAOA,OAAIF,EAEAb,EAAA,cAACS,EAAA,CAAK,UAAWK,EAAW,MAAO+B,EAAiB,GAAGjB,GACpD5B,EAAM,aAAa2B,EAAgC,CAAC,EAAGgB,CAAY,CACtE,EASF3C,EAAA,cAAC,OAAI,UAAWc,EAAW,MAAO+B,EAAiB,GAAGjB,GACnDe,CACH,CAEJ,CAAC,EAEDjC,EAAM,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "imagePropDefs", "extractProps", "marginPropDefs", "widthPropDefs", "heightPropDefs", "layoutPropDefs", "Skeleton", "Slot", "Image", "props", "forwardedRef", "asChild", "className", "style", "loading", "alt", "src", "placeholder", "showSkeleton", "fadeIn", "errorAriaLabel", "radius", "caption", "userOnLoad", "userOnError", "children", "wrapperProps", "loadingState", "setLoadingState", "showPlaceholder", "setShowPlaceholder", "imgRef", "handleLoad", "event", "handleError", "img", "isLoading", "isError", "isLoaded", "ariaProps", "imgStyle", "imageContent", "node", "containerStyle"]
|
|
7
7
|
}
|
|
@@ -1,25 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image component prop definitions that define the component's API
|
|
3
|
+
*
|
|
4
|
+
* These props control the visual appearance, behavior, and accessibility
|
|
5
|
+
* features of the Image component. The component supports responsive
|
|
6
|
+
* design, accessibility compliance, and flexible layout options.
|
|
7
|
+
*
|
|
8
|
+
* Key features:
|
|
9
|
+
* - Object-fit control for responsive image scaling
|
|
10
|
+
* - Radius control for rounded corners
|
|
11
|
+
* - Caption support for additional context
|
|
12
|
+
* - Accessibility labels for loading and error states
|
|
13
|
+
* - AsChild pattern for flexible composition
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* // Basic image with cover fit
|
|
18
|
+
* <Image src="/photo.jpg" alt="Team photo" fit="cover" />
|
|
19
|
+
*
|
|
20
|
+
* // Image with caption and custom radius
|
|
21
|
+
* <Image
|
|
22
|
+
* src="/chart.png"
|
|
23
|
+
* alt="Sales data"
|
|
24
|
+
* caption="Q3 2024 Performance"
|
|
25
|
+
* radius="medium"
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // Responsive object-fit
|
|
29
|
+
* <Image
|
|
30
|
+
* src="/banner.jpg"
|
|
31
|
+
* alt="Hero banner"
|
|
32
|
+
* fit={{ initial: 'cover', md: 'contain' }}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
1
36
|
declare const imagePropDefs: {
|
|
2
|
-
shadow: {
|
|
3
|
-
type: "enum";
|
|
4
|
-
className: string;
|
|
5
|
-
values: readonly ["1", "2", "3", "4", "5", "6"];
|
|
6
|
-
responsive: true;
|
|
7
|
-
};
|
|
8
|
-
radius: {
|
|
9
|
-
type: "enum";
|
|
10
|
-
values: readonly ["none", "small", "medium", "large", "full"];
|
|
11
|
-
default: undefined;
|
|
12
|
-
};
|
|
13
37
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
38
|
+
* Controls how the image should be resized to fit its container
|
|
39
|
+
*
|
|
40
|
+
* Sets the CSS object-fit property with responsive support.
|
|
41
|
+
* Choose the right fit based on your design needs:
|
|
42
|
+
*
|
|
43
|
+
* - 'cover': Best for hero images, thumbnails, and cards where you want to fill the space
|
|
44
|
+
* - 'contain': Best for product images, logos, and content where the entire image must be visible
|
|
45
|
+
* - 'fill': Use carefully, only when you want to stretch the image to exact dimensions
|
|
46
|
+
* - 'scale-down': Good for user-uploaded content where you don't want to enlarge small images
|
|
47
|
+
* - 'none': Useful for pixel-perfect images or when you want original sizing
|
|
16
48
|
*
|
|
17
49
|
* @example
|
|
18
|
-
*
|
|
19
|
-
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* // Fill the container, may crop edges
|
|
52
|
+
* <Image src="/hero.jpg" fit="cover" alt="Hero image" />
|
|
53
|
+
*
|
|
54
|
+
* // Show entire image, may have empty space
|
|
55
|
+
* <Image src="/logo.png" fit="contain" alt="Company logo" />
|
|
56
|
+
*
|
|
57
|
+
* // Responsive fit
|
|
58
|
+
* <Image
|
|
59
|
+
* src="/banner.jpg"
|
|
60
|
+
* fit={{ initial: 'cover', lg: 'contain' }}
|
|
61
|
+
* alt="Responsive banner"
|
|
62
|
+
* />
|
|
63
|
+
* ```
|
|
20
64
|
*
|
|
21
|
-
* @link
|
|
22
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
|
|
65
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
|
|
23
66
|
*/
|
|
24
67
|
fit: {
|
|
25
68
|
type: "enum";
|
|
@@ -29,18 +72,90 @@ declare const imagePropDefs: {
|
|
|
29
72
|
responsive: true;
|
|
30
73
|
};
|
|
31
74
|
/**
|
|
32
|
-
*
|
|
75
|
+
* Visual variant that determines the image's appearance style
|
|
76
|
+
*
|
|
77
|
+
* Currently supports 'surface' variant which provides subtle elevation
|
|
78
|
+
* and integrates well with card-based layouts and content sections.
|
|
33
79
|
*
|
|
34
80
|
* @example
|
|
35
|
-
*
|
|
36
|
-
* variant="
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Image src="/photo.jpg" variant="surface" alt="Elevated image" />
|
|
83
|
+
* ```
|
|
37
84
|
*/
|
|
38
85
|
variant: {
|
|
39
86
|
type: "enum";
|
|
40
87
|
className: string;
|
|
41
|
-
values: readonly ["surface"
|
|
88
|
+
values: readonly ["surface"];
|
|
42
89
|
default: "surface";
|
|
43
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* ARIA label announced by screen readers during image loading
|
|
93
|
+
*
|
|
94
|
+
* Provides accessibility feedback for users with visual impairments.
|
|
95
|
+
* Customize this message to match your application's language and tone.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <Image
|
|
100
|
+
* src="/chart.jpg"
|
|
101
|
+
* loadingAriaLabel="Loading sales chart..."
|
|
102
|
+
* alt="Sales performance chart"
|
|
103
|
+
* />
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
loadingAriaLabel: {
|
|
107
|
+
type: "string";
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* ARIA label announced by screen readers when image loading fails
|
|
112
|
+
*
|
|
113
|
+
* Provides accessibility feedback for error states.
|
|
114
|
+
* Should clearly indicate that the image failed to load and may suggest alternatives.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* <Image
|
|
119
|
+
* src="/photo.jpg"
|
|
120
|
+
* errorAriaLabel="Photo failed to load. Please refresh the page."
|
|
121
|
+
* alt="Team photo"
|
|
122
|
+
* />
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
errorAriaLabel: {
|
|
126
|
+
type: "string";
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Optional caption text displayed below the image
|
|
131
|
+
*
|
|
132
|
+
* Provides additional context, description, or attribution for the image.
|
|
133
|
+
* The caption is styled consistently and positioned below the image content.
|
|
134
|
+
*
|
|
135
|
+
* Use captions for:
|
|
136
|
+
* - Photo credits and attributions
|
|
137
|
+
* - Additional context or explanation
|
|
138
|
+
* - Data source information for charts
|
|
139
|
+
* - Descriptive text that supplements the alt attribute
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```tsx
|
|
143
|
+
* <Image
|
|
144
|
+
* src="/chart.png"
|
|
145
|
+
* alt="Q3 sales performance showing 25% growth"
|
|
146
|
+
* caption="Data source: Internal sales tracking system"
|
|
147
|
+
* />
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
caption: {
|
|
151
|
+
type: "string";
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
radius: {
|
|
155
|
+
type: "enum";
|
|
156
|
+
values: readonly ["none", "small", "medium", "large", "full"];
|
|
157
|
+
default: undefined;
|
|
158
|
+
};
|
|
44
159
|
asChild: {
|
|
45
160
|
type: "boolean";
|
|
46
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.props.d.ts","sourceRoot":"","sources":["../../../src/components/image.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.props.d.ts","sourceRoot":"","sources":["../../../src/components/image.props.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,aAAa;IAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;;;;;;;;IAQH;;;;;;;;;;OAUG;;;;;;;IAOH;;;;;;;;;;;;;;OAcG;;;;;IAKH;;;;;;;;;;;;;;OAcG;;;;;IAKH;;;;;;;;;;;;;;;;;;;;OAoBG;;;;;;;;;;;;;CAYJ,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as e}from"../props/as-child.prop.js";import{radiusPropDef as r}from"../props/radius.prop.js";
|
|
1
|
+
import{asChildPropDef as e}from"../props/as-child.prop.js";import{radiusPropDef as r}from"../props/radius.prop.js";const a=["cover","contain","fill","scale-down","none"],t=["surface"],o={...e,...r,fit:{type:"enum",className:"rt-r-fit",values:a,default:"cover",responsive:!0},variant:{type:"enum",className:"rt-variant",values:t,default:"surface"},loadingAriaLabel:{type:"string",default:"Loading image..."},errorAriaLabel:{type:"string",default:"Failed to load image"},caption:{type:"string",default:void 0}};export{o as imagePropDefs};
|
|
2
2
|
//# sourceMappingURL=image.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/image.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,iBAAAC,MAAqB,
|
|
6
|
-
"names": ["asChildPropDef", "radiusPropDef", "
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\n/**\n * Available object-fit values for controlling image scaling behavior\n * \n * - cover: Scales image to cover entire container, may crop edges\n * - contain: Scales image to fit entirely within container, may have empty space\n * - fill: Stretches image to fill container exactly, may distort aspect ratio\n * - scale-down: Acts like 'contain' but never scales up beyond original size\n * - none: Image keeps original size, may overflow or leave empty space\n */\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\n\n/**\n * Available visual variants for the Image component\n * Currently only 'surface' variant is available, providing subtle elevation\n */\nconst variants = ['surface'] as const;\n\n/**\n * Image component prop definitions that define the component's API\n * \n * These props control the visual appearance, behavior, and accessibility\n * features of the Image component. The component supports responsive\n * design, accessibility compliance, and flexible layout options.\n * \n * Key features:\n * - Object-fit control for responsive image scaling\n * - Radius control for rounded corners\n * - Caption support for additional context\n * - Accessibility labels for loading and error states\n * - AsChild pattern for flexible composition\n * \n * @example\n * ```tsx\n * // Basic image with cover fit\n * <Image src=\"/photo.jpg\" alt=\"Team photo\" fit=\"cover\" />\n * \n * // Image with caption and custom radius\n * <Image \n * src=\"/chart.png\" \n * alt=\"Sales data\"\n * caption=\"Q3 2024 Performance\"\n * radius=\"medium\"\n * />\n * \n * // Responsive object-fit\n * <Image \n * src=\"/banner.jpg\" \n * alt=\"Hero banner\"\n * fit={{ initial: 'cover', md: 'contain' }}\n * />\n * ```\n */\nconst imagePropDefs = {\n ...asChildPropDef,\n ...radiusPropDef,\n /**\n * Controls how the image should be resized to fit its container\n * \n * Sets the CSS object-fit property with responsive support.\n * Choose the right fit based on your design needs:\n * \n * - 'cover': Best for hero images, thumbnails, and cards where you want to fill the space\n * - 'contain': Best for product images, logos, and content where the entire image must be visible\n * - 'fill': Use carefully, only when you want to stretch the image to exact dimensions\n * - 'scale-down': Good for user-uploaded content where you don't want to enlarge small images\n * - 'none': Useful for pixel-perfect images or when you want original sizing\n * \n * @example\n * ```tsx\n * // Fill the container, may crop edges\n * <Image src=\"/hero.jpg\" fit=\"cover\" alt=\"Hero image\" />\n * \n * // Show entire image, may have empty space\n * <Image src=\"/logo.png\" fit=\"contain\" alt=\"Company logo\" />\n * \n * // Responsive fit\n * <Image \n * src=\"/banner.jpg\" \n * fit={{ initial: 'cover', lg: 'contain' }}\n * alt=\"Responsive banner\"\n * />\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit\n */\n fit: {\n type: 'enum',\n className: 'rt-r-fit',\n values: objectFitValues,\n default: 'cover',\n responsive: true,\n },\n /**\n * Visual variant that determines the image's appearance style\n * \n * Currently supports 'surface' variant which provides subtle elevation\n * and integrates well with card-based layouts and content sections.\n * \n * @example\n * ```tsx\n * <Image src=\"/photo.jpg\" variant=\"surface\" alt=\"Elevated image\" />\n * ```\n */\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'surface',\n },\n /**\n * ARIA label announced by screen readers during image loading\n * \n * Provides accessibility feedback for users with visual impairments.\n * Customize this message to match your application's language and tone.\n * \n * @example\n * ```tsx\n * <Image \n * src=\"/chart.jpg\" \n * loadingAriaLabel=\"Loading sales chart...\"\n * alt=\"Sales performance chart\"\n * />\n * ```\n */\n loadingAriaLabel: {\n type: 'string',\n default: 'Loading image...',\n },\n /**\n * ARIA label announced by screen readers when image loading fails\n * \n * Provides accessibility feedback for error states.\n * Should clearly indicate that the image failed to load and may suggest alternatives.\n * \n * @example\n * ```tsx\n * <Image \n * src=\"/photo.jpg\" \n * errorAriaLabel=\"Photo failed to load. Please refresh the page.\"\n * alt=\"Team photo\"\n * />\n * ```\n */\n errorAriaLabel: {\n type: 'string',\n default: 'Failed to load image',\n },\n /**\n * Optional caption text displayed below the image\n * \n * Provides additional context, description, or attribution for the image.\n * The caption is styled consistently and positioned below the image content.\n * \n * Use captions for:\n * - Photo credits and attributions\n * - Additional context or explanation\n * - Data source information for charts\n * - Descriptive text that supplements the alt attribute\n * \n * @example\n * ```tsx\n * <Image \n * src=\"/chart.png\" \n * alt=\"Q3 sales performance showing 25% growth\"\n * caption=\"Data source: Internal sales tracking system\"\n * />\n * ```\n */\n caption: {\n type: 'string',\n default: undefined,\n },\n} satisfies {\n fit: PropDef<(typeof objectFitValues)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loadingAriaLabel: PropDef<string>;\n errorAriaLabel: PropDef<string>;\n radius: PropDef<'none' | 'small' | 'medium' | 'large' | 'full'>;\n caption: PropDef<string | undefined>;\n};\n\nexport { imagePropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,iBAAAC,MAAqB,0BAa9B,MAAMC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,EAMnEC,EAAW,CAAC,SAAS,EAqCrBC,EAAgB,CACpB,GAAGJ,EACH,GAAGC,EA+BH,IAAK,CACH,KAAM,OACN,UAAW,WACX,OAAQC,EACR,QAAS,QACT,WAAY,EACd,EAYA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,SACX,EAgBA,iBAAkB,CAChB,KAAM,SACN,QAAS,kBACX,EAgBA,eAAgB,CACd,KAAM,SACN,QAAS,sBACX,EAsBA,QAAS,CACP,KAAM,SACN,QAAS,MACX,CACF",
|
|
6
|
+
"names": ["asChildPropDef", "radiusPropDef", "objectFitValues", "variants", "imagePropDefs"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';
|
|
2
|
+
export * as Accordion from './accordion.js';
|
|
2
3
|
export * as AlertDialog from './alert-dialog.js';
|
|
3
4
|
export { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';
|
|
4
5
|
export { Avatar, type AvatarProps } from './avatar.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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AAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./alert-dialog.js";import{AspectRatio as
|
|
1
|
+
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./accordion.js";import*as p from"./alert-dialog.js";import{AspectRatio as x}from"./aspect-ratio.js";import{Avatar as a}from"./avatar.js";import{Badge as n}from"./badge.js";import{Blockquote as y}from"./blockquote.js";import{Box as l}from"./box.js";import{Button as d}from"./button.js";import*as C from"./callout.js";import{Card as g}from"./card.js";import*as S from"./checkbox-cards.js";import*as u from"./checkbox-group.js";import{Checkbox as I}from"./checkbox.js";import{Code as B}from"./code.js";import{Container as A}from"./container.js";import*as R from"./context-menu.js";import*as v from"./data-list.js";import*as D from"./dialog.js";import*as H from"./dropdown-menu.js";import{Em as G}from"./em.js";import{Flex as L}from"./flex.js";import{Grid as E}from"./grid.js";import{Heading as M}from"./heading.js";import*as Q from"./hover-card.js";import{IconButton as V}from"./icon-button.js";import{ChevronDownIcon as N,ThickCheckIcon as j,ThickChevronRightIcon as J,ThickDividerHorizontalIcon as O}from"./icons.js";import{Image as X}from"./image.js";import{Inset as Z}from"./inset.js";import{Kbd as $}from"./kbd.js";import{Link as ro}from"./link.js";import*as eo from"./popover.js";import{Portal as po}from"./portal.js";import{Progress as xo}from"./progress.js";import{Quote as ao}from"./quote.js";import*as fo from"./radio-cards.js";import*as no from"./radio-group.js";import{Radio as yo}from"./radio.js";import{Reset as lo}from"./reset.js";import{ScrollArea as Co}from"./scroll-area.js";import*as To from"./segmented-control.js";import{Section as So}from"./section.js";import*as uo from"./select.js";import{Separator as Io}from"./separator.js";import{Skeleton as Bo}from"./skeleton.js";import{Slider as Ao}from"./slider.js";import{Slot as vo,Slottable as Do}from"./slot.js";import{Spinner as wo}from"./spinner.js";import{Strong as Fo}from"./strong.js";import{Switch as qo}from"./switch.js";import*as Eo from"./tab-nav.js";import*as Ko from"./table.js";import*as Mo from"./tabs.js";import{TextArea as Uo}from"./text-area.js";import*as Vo from"./text-field.js";import{Text as No}from"./text.js";import{ThemePanel as Jo}from"./theme-panel.js";import{Theme as Wo,ThemeContext as Xo,useThemeContext as Yo}from"./theme.js";import{ToggleButton as _o}from"./toggle-button.js";import{ToggleIconButton as or}from"./toggle-icon-button.js";import{Tooltip as er}from"./tooltip.js";import{UserCard as pr}from"./user-card.js";import{VisuallyHidden as xr}from"./visually-hidden.js";import*as mr from"./sidebar.js";export{e as AccessibleIcon,t as Accordion,p as AlertDialog,x as AspectRatio,a as Avatar,n as Badge,y as Blockquote,l as Box,d as Button,C as Callout,g as Card,I as Checkbox,S as CheckboxCards,u as CheckboxGroup,N as ChevronDownIcon,B as Code,A as Container,R as ContextMenu,v as DataList,D as Dialog,H as DropdownMenu,G as Em,L as Flex,E as Grid,M as Heading,Q as HoverCard,V as IconButton,X as Image,Z as Inset,$ as Kbd,ro as Link,eo as Popover,po as Portal,xo as Progress,ao as Quote,yo as Radio,fo as RadioCards,no as RadioGroup,lo as Reset,Co as ScrollArea,So as Section,To as SegmentedControl,uo as Select,Io as Separator,mr as Sidebar,Bo as Skeleton,Ao as Slider,vo as Slot,Do as Slottable,wo as Spinner,Fo as Strong,qo as Switch,Eo as TabNav,Ko as Table,Mo as Tabs,No as Text,Uo as TextArea,Vo as TextField,Wo as Theme,Xo as ThemeContext,Jo as ThemePanel,j as ThickCheckIcon,J as ThickChevronRightIcon,O as ThickDividerHorizontalIcon,_o as ToggleButton,or as ToggleIconButton,er as Tooltip,pr as UserCard,xr as VisuallyHidden,Yo as useThemeContext};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,S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C,OAAU,YACtB,OAAS,YAAAC,OAAoC,iBAC7C,UAAYC,OAAe,kBAC3B,OAAS,QAAAC,OAA4B,YACrC,OAAS,cAAAC,OAAwC,mBACjD,OAAS,SAAAC,GAAO,gBAAAC,GAA+B,mBAAAC,OAAuB,aACtE,OAAS,gBAAAC,OAA4C,qBACrD,OAAS,oBAAAC,OAAoD,0BAC7D,OAAS,WAAAC,OAAkC,eAC3C,OAAS,YAAAC,OAAoC,iBAC7C,OAAS,kBAAAC,OAAgD,uBACzD,UAAYC,OAAa",
|
|
6
|
-
"names": ["AccessibleIcon", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Image", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "ToggleButton", "ToggleIconButton", "Tooltip", "UserCard", "VisuallyHidden", "Sidebar"]
|
|
4
|
+
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as Accordion from './accordion.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAe,iBAC3B,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,SAAAC,MAA8B,aACvC,OAAS,cAAAC,MAAwC,kBACjD,OAAS,OAAAC,MAA0B,WACnC,OAAS,UAAAC,MAAgC,cACzC,UAAYC,MAAa,eACzB,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAmB,sBAC/B,UAAYC,MAAmB,sBAC/B,OAAS,YAAAC,MAAoC,gBAC7C,OAAS,QAAAC,MAA4B,YACrC,OAAS,aAAAC,MAAsC,iBAC/C,UAAYC,MAAiB,oBAC7B,UAAYC,MAAc,iBAC1B,UAAYC,MAAY,cACxB,UAAYC,MAAkB,qBAC9B,OAAS,MAAAC,MAAwB,UACjC,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,MAA4B,YACrC,OAAS,WAAAC,MAAkC,eAC3C,UAAYC,MAAe,kBAC3B,OAAS,cAAAC,MAAwC,mBACjD,OAEE,mBAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,8BAAAC,MACK,aACP,OAAS,SAAAC,MAA8B,aACvC,OAAS,SAAAC,MAA8B,aACvC,OAAS,OAAAC,MAA0B,WACnC,OAAS,QAAAC,OAA4B,YACrC,UAAYC,OAAa,eACzB,OAAS,UAAAC,OAAgC,cACzC,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,SAAAC,OAA8B,aACvC,UAAYC,OAAgB,mBAC5B,UAAYC,OAAgB,mBAC5B,OAAS,SAAAC,OAA8B,aACvC,OAAS,SAAAC,OAA8B,aACvC,OAAS,cAAAC,OAAwC,mBACjD,UAAYC,OAAsB,yBAClC,OAAS,WAAAC,OAAkC,eAC3C,UAAYC,OAAY,cACxB,OAAS,aAAAC,OAAsC,iBAC/C,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,UAAAC,OAAgC,cACzC,OAAS,QAAAC,GAAM,aAAAC,OAAiB,YAChC,OAAS,WAAAC,OAAkC,eAC3C,OAAS,UAAAC,OAAgC,cACzC,OAAS,UAAAC,OAAgC,cACzC,UAAYC,OAAY,eACxB,UAAYC,OAAW,aACvB,UAAYC,OAAU,YACtB,OAAS,YAAAC,OAAoC,iBAC7C,UAAYC,OAAe,kBAC3B,OAAS,QAAAC,OAA4B,YACrC,OAAS,cAAAC,OAAwC,mBACjD,OAAS,SAAAC,GAAO,gBAAAC,GAA+B,mBAAAC,OAAuB,aACtE,OAAS,gBAAAC,OAA4C,qBACrD,OAAS,oBAAAC,OAAoD,0BAC7D,OAAS,WAAAC,OAAkC,eAC3C,OAAS,YAAAC,OAAoC,iBAC7C,OAAS,kBAAAC,OAAgD,uBACzD,UAAYC,OAAa",
|
|
6
|
+
"names": ["AccessibleIcon", "Accordion", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Image", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "ToggleButton", "ToggleIconButton", "Tooltip", "UserCard", "VisuallyHidden", "Sidebar"]
|
|
7
7
|
}
|
|
@@ -34,7 +34,7 @@ declare const linkPropDefs: {
|
|
|
34
34
|
weight: {
|
|
35
35
|
type: "enum";
|
|
36
36
|
className: string;
|
|
37
|
-
values: readonly ["light", "regular", "medium", "bold"];
|
|
37
|
+
values: readonly ["thin", "extralight", "light", "regular", "medium", "semibold", "bold", "extrabold"];
|
|
38
38
|
responsive: true;
|
|
39
39
|
};
|
|
40
40
|
size: {
|
|
@@ -20,14 +20,14 @@ declare const progressPropDefs: {
|
|
|
20
20
|
size: {
|
|
21
21
|
type: "enum";
|
|
22
22
|
className: string;
|
|
23
|
-
values: readonly ["1", "2", "3"];
|
|
23
|
+
values: readonly ["1", "2", "3", "4"];
|
|
24
24
|
default: "2";
|
|
25
25
|
responsive: true;
|
|
26
26
|
};
|
|
27
27
|
variant: {
|
|
28
28
|
type: "enum";
|
|
29
29
|
className: string;
|
|
30
|
-
values: readonly ["
|
|
30
|
+
values: readonly ["surface", "soft", "outline"];
|
|
31
31
|
default: "surface";
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{colorPropDef as r}from"../props/color.prop.js";import{highContrastPropDef as
|
|
1
|
+
import{colorPropDef as r}from"../props/color.prop.js";import{highContrastPropDef as e}from"../props/high-contrast.prop.js";import{radiusPropDef as s}from"../props/radius.prop.js";const o=["1","2","3","4"],t=["surface","soft","outline"],a={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:t,default:"surface"},...r,...e,...s,duration:{type:"string"}};export{a as progressPropDefs};
|
|
2
2
|
//# sourceMappingURL=progress.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/progress.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { colorPropDef } 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'] as const;\nconst variants = ['
|
|
5
|
-
"mappings": "AAAA,OAAS,gBAAAA,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,
|
|
4
|
+
"sourcesContent": ["import { colorPropDef } 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 = ['surface', 'soft', 'outline'] as const;\n\nconst progressPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n duration: { type: 'string' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n duration: PropDef<string>;\n};\n\nexport { progressPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,gBAAAA,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,iBAAAC,MAAqB,0BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,OAAQ,SAAS,EAExCC,EAAmB,CACvB,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B",
|
|
6
6
|
"names": ["colorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "progressPropDefs"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-cards.d.ts","sourceRoot":"","sources":["../../../src/components/radio-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"radio-cards.d.ts","sourceRoot":"","sources":["../../../src/components/radio-cards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAexE,KAAK,sBAAsB,GAAG,eAAe,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC7E,UAAU,mBACR,SAAQ,qBAAqB,CACzB,OAAO,mBAAmB,CAAC,IAAI,EAC/B,SAAS,GAAG,OAAO,GAAG,gBAAgB,CACvC,EACD,WAAW,EACX,sBAAsB;CAAG;AAC7B,QAAA,MAAM,cAAc,4FAwBnB,CAAC;AAIF,UAAU,mBACR,SAAQ,qBAAqB,CAAC,OAAO,mBAAmB,CAAC,IAAI,EAAE,YAAY,CAAC,EAC1E,WAAW;CAAG;AAClB,QAAA,MAAM,cAAc,+FAsBnB,CAAC;AAGF,OAAO,EAAE,cAAc,IAAI,IAAI,EAAE,cAAc,IAAI,IAAI,EAAE,CAAC;AAC1D,YAAY,EAAE,mBAAmB,IAAI,SAAS,EAAE,mBAAmB,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as o from"react";import
|
|
1
|
+
import*as o from"react";import d from"classnames";import{RadioGroup as n}from"radix-ui";import{radioCardsRootPropDefs as f}from"./radio-cards.props.js";import{Grid as P}from"./grid.js";import{extractProps as c}from"../helpers/extract-props.js";import{marginPropDefs as l}from"../props/margin.props.js";import{useThemeContext as u}from"./theme.js";const p=o.createContext(void 0),v=()=>o.useContext(p),m=o.forwardRef((e,t)=>{const a=u(),r=e.panelBackground??a.panelBackground,{className:s,color:i,panelBackground:y,...C}=c(e,f,l);return o.createElement(p.Provider,{value:{size:e.size,variant:e.variant}},o.createElement(P,{asChild:!0},o.createElement(n.Root,{"data-accent-color":i,"data-panel-background":r,...C,ref:t,className:d("rt-RadioCardsRoot",s)})))});m.displayName="RadioCards.Root";const R=o.forwardRef(({className:e,...t},a)=>{const r=v(),s=r?.variant?`rt-variant-${r.variant}`:void 0,i=r?.size?`rt-r-size-${r.size}`:void 0;return o.createElement(n.Item,{...t,asChild:!1,ref:a,className:d("rt-reset","rt-BaseCard","rt-RadioCardsItem",s,i,e)})});R.displayName="RadioCards.Item";export{R as Item,m as Root};
|
|
2
2
|
//# sourceMappingURL=radio-cards.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/radio-cards.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\nimport { radioCardsRootPropDefs } from './radio-cards.props.js';\nimport { Grid } from './grid.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { useThemeContext } from './theme.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 RadioCardsRootElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;\ntype RadioCardsRootOwnProps = GetPropDefTypes<typeof radioCardsRootPropDefs>;\ninterface RadioCardsRootProps\n extends ComponentPropsWithout<\n typeof RadioGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n MarginProps,\n RadioCardsRootOwnProps {}\nconst RadioCardsRoot = React.forwardRef<RadioCardsRootElement, RadioCardsRootProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n color,\n panelBackground: _,\n ...rootProps\n } = extractProps(props, radioCardsRootPropDefs, marginPropDefs);\n return (\n <Grid asChild>\n
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,cAAcC,MAA2B,WAElD,OAAS,0BAAAC,MAA8B,yBACvC,OAAS,QAAAC,MAAY,YACrB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,mBAAAC,MAAuB,
|
|
6
|
-
"names": ["React", "classNames", "RadioGroupPrimitive", "radioCardsRootPropDefs", "Grid", "extractProps", "marginPropDefs", "useThemeContext", "RadioCardsRoot", "props", "forwardedRef", "themeContext", "panelBackground", "className", "color", "_", "rootProps", "RadioCardsItem"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\n\nimport { radioCardsRootPropDefs } from './radio-cards.props.js';\nimport { Grid } from './grid.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\ntype RadioCardsContextValue = {\n size?: Responsive<(typeof radioCardsRootPropDefs.size.values)[number]>;\n variant?: (typeof radioCardsRootPropDefs.variant.values)[number];\n};\n\nconst RadioCardsContext = React.createContext<RadioCardsContextValue | undefined>(undefined);\n\nconst useRadioCardsContext = () => {\n const context = React.useContext(RadioCardsContext);\n return context;\n};\n\ntype RadioCardsRootElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;\ntype RadioCardsRootOwnProps = GetPropDefTypes<typeof radioCardsRootPropDefs>;\ninterface RadioCardsRootProps\n extends ComponentPropsWithout<\n typeof RadioGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n MarginProps,\n RadioCardsRootOwnProps {}\nconst RadioCardsRoot = React.forwardRef<RadioCardsRootElement, RadioCardsRootProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n color,\n panelBackground: _,\n ...rootProps\n } = extractProps(props, radioCardsRootPropDefs, marginPropDefs);\n return (\n <RadioCardsContext.Provider value={{ size: props.size, variant: props.variant }}>\n <Grid asChild>\n <RadioGroupPrimitive.Root\n data-accent-color={color}\n data-panel-background={panelBackground}\n {...rootProps}\n ref={forwardedRef}\n className={classNames('rt-RadioCardsRoot', className)}\n />\n </Grid>\n </RadioCardsContext.Provider>\n );\n },\n);\nRadioCardsRoot.displayName = 'RadioCards.Root';\n\ntype RadioCardsItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;\ninterface RadioCardsItemProps\n extends ComponentPropsWithout<typeof RadioGroupPrimitive.Item, RemovedProps>,\n MarginProps {}\nconst RadioCardsItem = React.forwardRef<RadioCardsItemElement, RadioCardsItemProps>(\n ({ className, ...props }, forwardedRef) => {\n const context = useRadioCardsContext();\n const variantClass = context?.variant ? `rt-variant-${context.variant}` : undefined;\n const sizeClass = context?.size ? `rt-r-size-${context.size}` : undefined;\n\n return (\n <RadioGroupPrimitive.Item\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-reset',\n 'rt-BaseCard',\n 'rt-RadioCardsItem',\n variantClass,\n sizeClass,\n className,\n )}\n />\n );\n },\n);\nRadioCardsItem.displayName = 'RadioCards.Item';\n\nexport { RadioCardsRoot as Root, RadioCardsItem as Item };\nexport type { RadioCardsRootProps as RootProps, RadioCardsItemProps as ItemProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,cAAcC,MAA2B,WAElD,OAAS,0BAAAC,MAA8B,yBACvC,OAAS,QAAAC,MAAY,YACrB,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,mBAAAC,MAAuB,aAWhC,MAAMC,EAAoBR,EAAM,cAAkD,MAAS,EAErFS,EAAuB,IACXT,EAAM,WAAWQ,CAAiB,EAa9CE,EAAiBV,EAAM,WAC3B,CAACW,EAAOC,IAAiB,CACvB,MAAMC,EAAeN,EAAgB,EAC/BO,EAAkBH,EAAM,iBAAmBE,EAAa,gBACxD,CACJ,UAAAE,EACA,MAAAC,EACA,gBAAiBC,EACjB,GAAGC,CACL,EAAIb,EAAaM,EAAOR,EAAwBG,CAAc,EAC9D,OACEN,EAAA,cAACQ,EAAkB,SAAlB,CAA2B,MAAO,CAAE,KAAMG,EAAM,KAAM,QAASA,EAAM,OAAQ,GAC5EX,EAAA,cAACI,EAAA,CAAK,QAAO,IACXJ,EAAA,cAACE,EAAoB,KAApB,CACC,oBAAmBc,EACnB,wBAAuBF,EACtB,GAAGI,EACJ,IAAKN,EACL,UAAWX,EAAW,oBAAqBc,CAAS,EACtD,CACF,CACF,CAEJ,CACF,EACAL,EAAe,YAAc,kBAM7B,MAAMS,EAAiBnB,EAAM,WAC3B,CAAC,CAAE,UAAAe,EAAW,GAAGJ,CAAM,EAAGC,IAAiB,CACzC,MAAMQ,EAAUX,EAAqB,EAC/BY,EAAeD,GAAS,QAAU,cAAcA,EAAQ,OAAO,GAAK,OACpEE,EAAYF,GAAS,KAAO,aAAaA,EAAQ,IAAI,GAAK,OAEhE,OACEpB,EAAA,cAACE,EAAoB,KAApB,CACE,GAAGS,EACJ,QAAS,GACT,IAAKC,EACL,UAAWX,EACT,WACA,cACA,oBACAoB,EACAC,EACAP,CACF,EACF,CAEJ,CACF,EACAI,EAAe,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "RadioGroupPrimitive", "radioCardsRootPropDefs", "Grid", "extractProps", "marginPropDefs", "useThemeContext", "RadioCardsContext", "useRadioCardsContext", "RadioCardsRoot", "props", "forwardedRef", "themeContext", "panelBackground", "className", "color", "_", "rootProps", "RadioCardsItem", "context", "variantClass", "sizeClass"]
|
|
7
7
|
}
|
|
@@ -29,14 +29,14 @@ declare const radioCardsRootPropDefs: {
|
|
|
29
29
|
size: {
|
|
30
30
|
type: "enum";
|
|
31
31
|
className: string;
|
|
32
|
-
values: readonly ["1", "2", "3"];
|
|
32
|
+
values: readonly ["1", "2", "3", "4", "5"];
|
|
33
33
|
default: "2";
|
|
34
34
|
responsive: true;
|
|
35
35
|
};
|
|
36
36
|
variant: {
|
|
37
37
|
type: "enum";
|
|
38
38
|
className: string;
|
|
39
|
-
values: readonly ["
|
|
39
|
+
values: readonly ["outline", "classic", "ghost", "soft", "surface"];
|
|
40
40
|
default: "surface";
|
|
41
41
|
};
|
|
42
42
|
panelBackground: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as
|
|
1
|
+
import{asChildPropDef as o}from"../props/as-child.prop.js";import{colorPropDef as r}from"../props/color.prop.js";import{highContrastPropDef as s}from"../props/high-contrast.prop.js";import{gridPropDefs as e}from"./grid.props.js";const a=["1","2","3","4","5"],t=["outline","classic","ghost","soft","surface"],p=["solid","translucent"],n={...o,size:{type:"enum",className:"rt-r-size",values:a,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:t,default:"surface"},panelBackground:{type:"enum",values:p,default:void 0},...r,...s,columns:{...e.columns,default:"repeat(auto-fit, minmax(160px, 1fr))"},gap:{...e.gap,default:"4"}};export{n as radioCardsRootPropDefs};
|
|
2
2
|
//# sourceMappingURL=radio-cards.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/radio-cards.props.tsx"],
|
|
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';\nimport { gridPropDefs } from './grid.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,gBAAAC,MAAoB,kBAI7B,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,
|
|
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';\nimport { gridPropDefs } from './grid.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5'] as const;\nconst variants = ['outline', 'classic', 'ghost', 'soft', 'surface'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst radioCardsRootPropDefs = {\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: 'surface' },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n columns: { ...gridPropDefs.columns, default: 'repeat(auto-fit, minmax(160px, 1fr))' },\n gap: { ...gridPropDefs.gap, default: '4' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n columns: PropDef<(typeof gridPropDefs.columns.values)[number]>;\n gap: PropDef<(typeof gridPropDefs.gap.values)[number]>;\n};\n\nexport { radioCardsRootPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,4BAC/B,OAAS,gBAAAC,MAAoB,yBAC7B,OAAS,uBAAAC,MAA2B,iCACpC,OAAS,gBAAAC,MAAoB,kBAI7B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAChCC,EAAW,CAAC,UAAW,UAAW,QAAS,OAAQ,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAyB,CAC7B,GAAGP,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,gBAAiB,CAAE,KAAM,OAAQ,OAAQC,EAAkB,QAAS,MAAU,EAC9E,GAAGL,EACH,GAAGC,EACH,QAAS,CAAE,GAAGC,EAAa,QAAS,QAAS,sCAAuC,EACpF,IAAK,CAAE,GAAGA,EAAa,IAAK,QAAS,GAAI,CAC3C",
|
|
6
6
|
"names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "gridPropDefs", "sizes", "variants", "panelBackgrounds", "radioCardsRootPropDefs"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,KAAK,aAAa,GAAG,eAAe,CAAC,OAAO,aAAa,CAAC,GAAG;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AACF,KAAK,eAAe,GAAG,qBAAqB,CAC1C,OAAO,EACP,uBAAuB,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAC7D,CAAC;AACF,UAAU,UAAW,SAAQ,eAAe,EAAE,WAAW,EAAE,aAAa;CAAG;AAE3E,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sB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