@womp/kookie-ui 0.13.3 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.css +867 -231
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +4 -4
- package/dist/cjs/components/_internal/base-button.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/_internal/base-checkbox.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/_internal/base-menu.props.d.ts +2 -2
- package/dist/cjs/components/_internal/base-menu.props.js +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +2 -2
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +4 -4
- package/dist/cjs/components/_internal/base-radio.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/_internal/base-tab-list.props.d.ts +7 -1
- package/dist/cjs/components/_internal/base-tab-list.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js.map +2 -2
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +2 -2
- package/dist/cjs/components/accordion.js +1 -1
- package/dist/cjs/components/accordion.js.map +4 -4
- package/dist/cjs/components/accordion.props.d.ts +5 -3
- package/dist/cjs/components/accordion.props.d.ts.map +1 -1
- package/dist/cjs/components/accordion.props.js +1 -1
- package/dist/cjs/components/accordion.props.js.map +4 -4
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +2 -2
- package/dist/cjs/components/app-bar.d.ts +1 -0
- package/dist/cjs/components/app-bar.d.ts.map +1 -1
- package/dist/cjs/components/app-bar.js +1 -1
- package/dist/cjs/components/app-bar.js.map +4 -4
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +4 -4
- package/dist/cjs/components/avatar.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +4 -4
- package/dist/cjs/components/badge.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/blockquote.js +1 -1
- package/dist/cjs/components/blockquote.js.map +1 -1
- package/dist/cjs/components/blockquote.props.js +1 -1
- package/dist/cjs/components/blockquote.props.js.map +1 -1
- package/dist/cjs/components/button.d.ts +5 -0
- package/dist/cjs/components/button.d.ts.map +1 -1
- package/dist/cjs/components/button.js +4 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/button.props.js +1 -1
- package/dist/cjs/components/button.props.js.map +4 -4
- package/dist/cjs/components/callout.d.ts +1 -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 +4 -4
- package/dist/cjs/components/callout.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +4 -4
- package/dist/cjs/components/card.props.d.ts +4 -2
- 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 +4 -4
- package/dist/cjs/components/chatbar.d.ts +2 -1
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +4 -4
- 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 +4 -4
- package/dist/cjs/components/checkbox-cards.props.d.ts +10 -2
- package/dist/cjs/components/checkbox-cards.props.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-cards.props.js +1 -1
- package/dist/cjs/components/checkbox-cards.props.js.map +4 -4
- package/dist/cjs/components/checkbox-group.js +1 -1
- package/dist/cjs/components/checkbox-group.js.map +4 -4
- package/dist/cjs/components/checkbox-group.props.d.ts +3 -2
- package/dist/cjs/components/checkbox-group.props.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-group.props.js +1 -1
- package/dist/cjs/components/checkbox-group.props.js.map +4 -4
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +4 -4
- package/dist/cjs/components/checkbox.props.js +1 -1
- package/dist/cjs/components/checkbox.props.js.map +4 -4
- package/dist/cjs/components/code.js +1 -1
- package/dist/cjs/components/code.js.map +3 -3
- package/dist/cjs/components/code.props.js +1 -1
- package/dist/cjs/components/code.props.js.map +3 -3
- package/dist/cjs/components/combobox.d.ts +0 -16
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/combobox.props.d.ts +6 -4
- package/dist/cjs/components/combobox.props.d.ts.map +1 -1
- package/dist/cjs/components/combobox.props.js +1 -1
- package/dist/cjs/components/combobox.props.js.map +4 -4
- package/dist/cjs/components/context-menu.d.ts +2 -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 +4 -4
- package/dist/cjs/components/context-menu.props.js +1 -1
- package/dist/cjs/components/context-menu.props.js.map +2 -2
- package/dist/cjs/components/data-list.js +1 -1
- package/dist/cjs/components/data-list.js.map +1 -1
- package/dist/cjs/components/data-list.props.js +1 -1
- package/dist/cjs/components/data-list.props.js.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/dropdown-menu.d.ts +2 -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 +4 -4
- package/dist/cjs/components/dropdown-menu.props.js +1 -1
- package/dist/cjs/components/dropdown-menu.props.js.map +2 -2
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +1 -1
- package/dist/cjs/components/heading.props.js +1 -1
- package/dist/cjs/components/heading.props.js.map +1 -1
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +2 -2
- package/dist/cjs/components/icon-button.d.ts +2 -1
- package/dist/cjs/components/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +4 -4
- package/dist/cjs/components/icon-button.props.js +1 -1
- package/dist/cjs/components/icon-button.props.js.map +4 -4
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/kbd.js +1 -1
- package/dist/cjs/components/kbd.js.map +4 -4
- package/dist/cjs/components/kbd.props.d.ts +4 -2
- package/dist/cjs/components/kbd.props.d.ts.map +1 -1
- package/dist/cjs/components/kbd.props.js +1 -1
- package/dist/cjs/components/kbd.props.js.map +4 -4
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +1 -1
- package/dist/cjs/components/link.props.js +1 -1
- package/dist/cjs/components/link.props.js.map +1 -1
- package/dist/cjs/components/message-scroller.js +2 -2
- package/dist/cjs/components/message-scroller.js.map +4 -4
- package/dist/cjs/components/navbar.js +1 -1
- package/dist/cjs/components/navbar.js.map +2 -2
- package/dist/cjs/components/navbar.props.d.ts +1 -1
- package/dist/cjs/components/navbar.props.js +1 -1
- package/dist/cjs/components/navbar.props.js.map +2 -2
- package/dist/cjs/components/notice.js +2 -2
- package/dist/cjs/components/notice.js.map +4 -4
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +4 -4
- package/dist/cjs/components/popover.props.d.ts +6 -0
- package/dist/cjs/components/popover.props.d.ts.map +1 -1
- package/dist/cjs/components/popover.props.js +1 -1
- package/dist/cjs/components/popover.props.js.map +2 -2
- package/dist/cjs/components/progress.js +1 -1
- package/dist/cjs/components/progress.js.map +1 -1
- package/dist/cjs/components/progress.props.js +1 -1
- package/dist/cjs/components/progress.props.js.map +1 -1
- 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 +4 -4
- package/dist/cjs/components/radio-cards.props.d.ts +10 -2
- package/dist/cjs/components/radio-cards.props.d.ts.map +1 -1
- package/dist/cjs/components/radio-cards.props.js +1 -1
- package/dist/cjs/components/radio-cards.props.js.map +4 -4
- package/dist/cjs/components/radio-group.js +1 -1
- package/dist/cjs/components/radio-group.js.map +4 -4
- package/dist/cjs/components/radio-group.props.d.ts +4 -2
- package/dist/cjs/components/radio-group.props.d.ts.map +1 -1
- package/dist/cjs/components/radio-group.props.js +1 -1
- package/dist/cjs/components/radio-group.props.js.map +4 -4
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +4 -4
- package/dist/cjs/components/radio.props.js +1 -1
- package/dist/cjs/components/radio.props.js.map +4 -4
- package/dist/cjs/components/schemas/base-button.schema.d.ts +2 -1
- package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/button.schema.d.ts +2 -1
- package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/button.schema.js +1 -1
- package/dist/cjs/components/schemas/button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/icon-button.schema.d.ts +2 -1
- package/dist/cjs/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/icon-button.schema.js +1 -1
- package/dist/cjs/components/schemas/icon-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +2 -2
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts +2 -1
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle-button.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +2 -1
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle-icon-button.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle-icon-button.schema.js.map +2 -2
- package/dist/cjs/components/segmented-control.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +4 -4
- package/dist/cjs/components/segmented-control.props.d.ts +5 -1
- package/dist/cjs/components/segmented-control.props.d.ts.map +1 -1
- 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 +4 -4
- package/dist/cjs/components/select.props.d.ts +11 -5
- 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 +4 -4
- package/dist/cjs/components/separator.js +1 -1
- package/dist/cjs/components/separator.js.map +1 -1
- package/dist/cjs/components/separator.props.js +1 -1
- package/dist/cjs/components/separator.props.js.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +2 -2
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/sidebar.props.js +1 -1
- package/dist/cjs/components/sidebar.props.js.map +2 -2
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +1 -1
- package/dist/cjs/components/slider.props.js +1 -1
- package/dist/cjs/components/slider.props.js.map +1 -1
- package/dist/cjs/components/switch.js +1 -1
- package/dist/cjs/components/switch.js.map +1 -1
- package/dist/cjs/components/switch.props.js +1 -1
- package/dist/cjs/components/switch.props.js.map +1 -1
- 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 +4 -4
- package/dist/cjs/components/tab-nav.props.js +1 -1
- package/dist/cjs/components/tab-nav.props.js.map +2 -2
- 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 +4 -4
- package/dist/cjs/components/tabs.props.js +1 -1
- package/dist/cjs/components/tabs.props.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 +4 -4
- package/dist/cjs/components/text-area.props.d.ts +6 -4
- 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 +4 -4
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +4 -4
- package/dist/cjs/components/text-field.props.d.ts +6 -4
- 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 +4 -4
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +1 -1
- package/dist/cjs/components/text.props.js +1 -1
- package/dist/cjs/components/text.props.js.map +1 -1
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +4 -4
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +2 -2
- package/dist/cjs/components/theme.props.d.ts +4 -4
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +2 -2
- package/dist/cjs/components/toggle-button.d.ts.map +1 -1
- package/dist/cjs/components/toggle-button.js +5 -2
- package/dist/cjs/components/toggle-button.js.map +4 -4
- package/dist/cjs/components/toggle-icon-button.d.ts +2 -1
- package/dist/cjs/components/toggle-icon-button.d.ts.map +1 -1
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +4 -4
- package/dist/cjs/components/toolbar.js +2 -2
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +2 -2
- package/dist/cjs/components/user-card.d.ts +1 -0
- package/dist/cjs/components/user-card.d.ts.map +1 -1
- package/dist/cjs/components/user-card.js +1 -1
- package/dist/cjs/components/user-card.js.map +4 -4
- package/dist/cjs/components/user-card.props.d.ts +5 -3
- package/dist/cjs/components/user-card.props.d.ts.map +1 -1
- package/dist/cjs/components/user-card.props.js +1 -1
- package/dist/cjs/components/user-card.props.js.map +4 -4
- package/dist/cjs/components/virtual-menu.js +1 -1
- package/dist/cjs/components/virtual-menu.js.map +2 -2
- package/dist/cjs/helpers/parse-variant.d.ts +8 -0
- package/dist/cjs/helpers/parse-variant.d.ts.map +1 -0
- package/dist/cjs/helpers/parse-variant.js +2 -0
- package/dist/cjs/helpers/parse-variant.js.map +7 -0
- package/dist/cjs/helpers/warn-deprecated.d.ts +7 -0
- package/dist/cjs/helpers/warn-deprecated.d.ts.map +1 -0
- package/dist/cjs/helpers/warn-deprecated.js +2 -0
- package/dist/cjs/helpers/warn-deprecated.js.map +7 -0
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/color.prop.d.ts +8 -1
- package/dist/cjs/props/color.prop.d.ts.map +1 -1
- package/dist/cjs/props/color.prop.js +1 -1
- package/dist/cjs/props/color.prop.js.map +3 -3
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/esm/chunk-27SCVCQY.js +2 -0
- package/dist/esm/chunk-27SCVCQY.js.map +7 -0
- package/dist/esm/{chunk-HJU4I34X.js → chunk-27YQS6MM.js} +2 -2
- package/dist/esm/chunk-2C5WLKEZ.js +2 -0
- package/dist/esm/chunk-2C5WLKEZ.js.map +7 -0
- package/dist/esm/chunk-2D5QJ6MX.js +2 -0
- package/dist/esm/chunk-2D5QJ6MX.js.map +7 -0
- package/dist/esm/chunk-2DKLJMUU.js +2 -0
- package/dist/esm/chunk-2DKLJMUU.js.map +7 -0
- package/dist/esm/chunk-2T74JEVN.js +2 -0
- package/dist/esm/chunk-2T74JEVN.js.map +7 -0
- package/dist/esm/{chunk-XVYTOZES.js → chunk-34UMKY2L.js} +2 -2
- package/dist/esm/{chunk-N4GTDLRD.js → chunk-3IUDPNGP.js} +2 -2
- package/dist/esm/chunk-3LMC3CZW.js +2 -0
- package/dist/esm/chunk-3LMC3CZW.js.map +7 -0
- package/dist/esm/{chunk-NQ3D3UXZ.js → chunk-3O7A3XQ7.js} +2 -2
- package/dist/esm/{chunk-54JFIP5S.js → chunk-3QCRDSYU.js} +2 -2
- package/dist/esm/chunk-3QCRDSYU.js.map +7 -0
- package/dist/esm/chunk-3QJED5UA.js +2 -0
- package/dist/esm/chunk-3QJED5UA.js.map +7 -0
- package/dist/esm/chunk-3TIO3EMN.js +2 -0
- package/dist/esm/chunk-3TIO3EMN.js.map +7 -0
- package/dist/esm/{chunk-AF6XKU3W.js → chunk-3WCSLQNH.js} +2 -2
- package/dist/esm/chunk-47CEZJM2.js +2 -0
- package/dist/esm/chunk-47CEZJM2.js.map +7 -0
- package/dist/esm/{chunk-MS5J4MF6.js → chunk-4QHJ7P3D.js} +2 -2
- package/dist/esm/chunk-4TBUUGR4.js +2 -0
- package/dist/esm/chunk-4TBUUGR4.js.map +7 -0
- package/dist/esm/chunk-4WSSOS2W.js +2 -0
- package/dist/esm/chunk-4WSSOS2W.js.map +7 -0
- package/dist/esm/chunk-53IGKC4E.js +2 -0
- package/dist/esm/chunk-53IGKC4E.js.map +7 -0
- package/dist/esm/{chunk-JDGJSNWT.js → chunk-5ADGYTG5.js} +2 -2
- package/dist/esm/{chunk-OJU5GCDZ.js → chunk-5G4WWJ4Z.js} +2 -2
- package/dist/esm/{chunk-YBSRX63K.js → chunk-64GJCQFX.js} +2 -2
- package/dist/esm/{chunk-Y5RCH23Z.js → chunk-6JP5PIOO.js} +2 -2
- package/dist/esm/{chunk-CIYF56YS.js → chunk-77NDG5HJ.js} +2 -2
- package/dist/esm/{chunk-ZO7TTWJI.js → chunk-77TGP2LO.js} +2 -2
- package/dist/esm/chunk-7IFCYZHG.js +2 -0
- package/dist/esm/chunk-7IFCYZHG.js.map +7 -0
- package/dist/esm/chunk-7YIQV7VO.js +2 -0
- package/dist/esm/chunk-7YIQV7VO.js.map +7 -0
- package/dist/esm/chunk-7ZOGH5NT.js +2 -0
- package/dist/esm/chunk-7ZOGH5NT.js.map +7 -0
- package/dist/esm/{chunk-KZWNGWIM.js → chunk-ADDXOZRI.js} +2 -2
- package/dist/esm/chunk-ADDXOZRI.js.map +7 -0
- package/dist/esm/{chunk-KJUDZCYK.js → chunk-AFOJ6OL3.js} +2 -2
- package/dist/esm/chunk-AVFGMLL4.js +2 -0
- package/dist/esm/chunk-AVFGMLL4.js.map +7 -0
- package/dist/esm/chunk-AVV55MFY.js +2 -0
- package/dist/esm/chunk-AVV55MFY.js.map +7 -0
- package/dist/esm/{chunk-KFR3CK24.js → chunk-AYAKS3DT.js} +2 -2
- package/dist/esm/{chunk-DD6SJPOU.js → chunk-B2MGVXYL.js} +2 -2
- package/dist/esm/chunk-BUV4ZVEQ.js +2 -0
- package/dist/esm/chunk-BUV4ZVEQ.js.map +7 -0
- package/dist/esm/{chunk-5XV4QEP5.js → chunk-CMEKH4I5.js} +2 -2
- package/dist/esm/chunk-CSUEZWN5.js +2 -0
- package/dist/esm/chunk-CSUEZWN5.js.map +7 -0
- package/dist/esm/{chunk-ESPWYN5C.js → chunk-DJJ6UGT2.js} +2 -2
- package/dist/esm/chunk-DKRNQAU6.js +2 -0
- package/dist/esm/chunk-DKRNQAU6.js.map +7 -0
- package/dist/esm/chunk-DSSF6SEA.js +2 -0
- package/dist/esm/chunk-DSSF6SEA.js.map +7 -0
- package/dist/esm/chunk-DVSXWSAT.js +2 -0
- package/dist/esm/chunk-DVSXWSAT.js.map +7 -0
- package/dist/esm/chunk-DWB4PFIW.js +2 -0
- package/dist/esm/chunk-DWB4PFIW.js.map +7 -0
- package/dist/esm/chunk-E7LJHM3S.js +2 -0
- package/dist/esm/chunk-E7LJHM3S.js.map +7 -0
- package/dist/esm/{chunk-OMGZG52I.js → chunk-E7ZXB36J.js} +2 -2
- package/dist/esm/{chunk-2OSGPH7E.js → chunk-EH7LNNGU.js} +2 -2
- package/dist/esm/{chunk-C34HCTGS.js → chunk-EKYRZ54E.js} +2 -2
- package/dist/esm/{chunk-CET7V3FZ.js → chunk-F4VC2WAU.js} +2 -2
- package/dist/esm/{chunk-VICP2RNA.js → chunk-FISGGGPC.js} +2 -2
- package/dist/esm/chunk-FKFCOVSW.js +2 -0
- package/dist/esm/chunk-FKFCOVSW.js.map +7 -0
- package/dist/esm/{chunk-7R73ISNJ.js → chunk-FLO6QCGB.js} +2 -2
- package/dist/esm/chunk-FNB47XDO.js +2 -0
- package/dist/esm/chunk-FNB47XDO.js.map +7 -0
- package/dist/esm/{chunk-2I7QRVJ5.js → chunk-GQDDJK4N.js} +2 -2
- package/dist/esm/chunk-GRRV4I2I.js +2 -0
- package/dist/esm/chunk-GRRV4I2I.js.map +7 -0
- package/dist/esm/chunk-GRZ77YNL.js +2 -0
- package/dist/esm/chunk-GRZ77YNL.js.map +7 -0
- package/dist/esm/chunk-GSBKR7G3.js +5 -0
- package/dist/esm/chunk-GSBKR7G3.js.map +7 -0
- package/dist/esm/{chunk-7UHKEJ7Q.js → chunk-GZG35274.js} +2 -2
- package/dist/esm/{chunk-VR7ZAFYN.js → chunk-HSLP2HVS.js} +2 -2
- package/dist/esm/chunk-JTN3KTAS.js +2 -0
- package/dist/esm/chunk-JTN3KTAS.js.map +7 -0
- package/dist/esm/{chunk-64PFYID5.js → chunk-JW3FRP5N.js} +2 -2
- package/dist/esm/chunk-KFLQI2CP.js +2 -0
- package/dist/esm/chunk-KFLQI2CP.js.map +7 -0
- package/dist/esm/{chunk-PZ7OYATT.js → chunk-LBJEAC2S.js} +2 -2
- package/dist/esm/{chunk-7NVLCYCL.js → chunk-LVPWM7CC.js} +2 -2
- package/dist/esm/{chunk-JUJYMZ2F.js → chunk-LWIIIPSF.js} +2 -2
- package/dist/esm/chunk-MNEUC27U.js +5 -0
- package/dist/esm/chunk-MNEUC27U.js.map +7 -0
- package/dist/esm/chunk-NFBZUINB.js +2 -0
- package/dist/esm/chunk-NFBZUINB.js.map +7 -0
- package/dist/esm/{chunk-VZSQATP6.js → chunk-NLJIXW5S.js} +2 -2
- package/dist/esm/{chunk-CDG5WH4U.js → chunk-NMXERIOL.js} +2 -2
- package/dist/esm/{chunk-4XKK32M4.js → chunk-NSFH3PJ4.js} +2 -2
- package/dist/esm/{chunk-4LDVSTXI.js → chunk-NTVCOEJE.js} +2 -2
- package/dist/esm/chunk-O2RISF37.js +2 -0
- package/dist/esm/chunk-O2RISF37.js.map +7 -0
- package/dist/esm/chunk-OVGPUFRI.js +2 -0
- package/dist/esm/chunk-OVGPUFRI.js.map +7 -0
- package/dist/esm/{chunk-NIIEIZKQ.js → chunk-OW4KAIWF.js} +2 -2
- package/dist/esm/{chunk-SAJY4H6J.js → chunk-P7FYIMYU.js} +2 -2
- package/dist/esm/chunk-PLTTQFRQ.js +2 -0
- package/dist/esm/chunk-PLTTQFRQ.js.map +7 -0
- package/dist/esm/{chunk-E67CIG6A.js → chunk-QC2UOUUI.js} +2 -2
- package/dist/esm/chunk-QINRF3V2.js +2 -0
- package/dist/esm/chunk-QINRF3V2.js.map +7 -0
- package/dist/esm/{chunk-2CMM7MEL.js → chunk-QUAPA57G.js} +2 -2
- package/dist/esm/{chunk-GO7OHBHW.js → chunk-QUM2TSRR.js} +2 -2
- package/dist/esm/{chunk-GL5QTWYI.js → chunk-QYU2HSGF.js} +2 -2
- package/dist/esm/chunk-RON6FXLO.js +2 -0
- package/dist/esm/chunk-RON6FXLO.js.map +7 -0
- package/dist/esm/{chunk-KOFEFBB3.js → chunk-T6Z4JUH6.js} +2 -2
- package/dist/esm/{chunk-67MKPTZJ.js → chunk-TCEQ5VVE.js} +2 -2
- package/dist/esm/{chunk-CRSHBENJ.js → chunk-UBWRIE4C.js} +2 -2
- package/dist/esm/{chunk-WGYUWEQV.js → chunk-UYKEBIUD.js} +2 -2
- package/dist/esm/{chunk-RNTCHVFI.js → chunk-V7BPRUNP.js} +2 -2
- package/dist/esm/chunk-VJUFYYKP.js +2 -0
- package/dist/esm/{chunk-FC2DBBJ3.js.map → chunk-VJUFYYKP.js.map} +2 -2
- package/dist/esm/{chunk-OTXCKEWT.js → chunk-VJXHEDCE.js} +2 -2
- package/dist/esm/{chunk-ZOY43B55.js → chunk-WCQ2VRQU.js} +2 -2
- package/dist/esm/chunk-WDNTAQ6G.js +2 -0
- package/dist/esm/chunk-WDNTAQ6G.js.map +7 -0
- package/dist/esm/chunk-WHAKQCNV.js +2 -0
- package/dist/esm/chunk-WHAKQCNV.js.map +7 -0
- package/dist/esm/chunk-WTXQB2EV.js +2 -0
- package/dist/esm/chunk-WTXQB2EV.js.map +7 -0
- package/dist/esm/chunk-XILM2OMC.js +2 -0
- package/dist/esm/chunk-XILM2OMC.js.map +7 -0
- package/dist/esm/chunk-YIK4ACXS.js +2 -0
- package/dist/esm/chunk-YIK4ACXS.js.map +7 -0
- package/dist/esm/chunk-YL62I5SI.js +2 -0
- package/dist/esm/{chunk-5WRCK4R7.js → chunk-YS74SW5S.js} +2 -2
- package/dist/esm/{chunk-ZNK6AH2G.js → chunk-Z4DTHR2S.js} +2 -2
- package/dist/esm/{chunk-ZNK6AH2G.js.map → chunk-Z4DTHR2S.js.map} +3 -3
- package/dist/esm/{chunk-AGSSWWFI.js → chunk-ZK55O7TN.js} +2 -2
- package/dist/esm/chunk-ZVIWTYHE.js +2 -0
- package/dist/esm/chunk-ZVIWTYHE.js.map +7 -0
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.props.d.ts +4 -2
- 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-checkbox.props.d.ts +4 -2
- 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-menu.props.d.ts +2 -2
- package/dist/esm/components/_internal/base-menu.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/base-radio.props.d.ts +4 -2
- 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-tab-list.props.d.ts +7 -1
- package/dist/esm/components/_internal/base-tab-list.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/accordion.props.d.ts +5 -3
- package/dist/esm/components/accordion.props.d.ts.map +1 -1
- package/dist/esm/components/accordion.props.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/app-bar.d.ts +1 -0
- package/dist/esm/components/app-bar.d.ts.map +1 -1
- package/dist/esm/components/app-bar.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.props.d.ts +4 -2
- package/dist/esm/components/avatar.props.d.ts.map +1 -1
- package/dist/esm/components/avatar.props.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.props.d.ts +4 -2
- package/dist/esm/components/badge.props.d.ts.map +1 -1
- package/dist/esm/components/badge.props.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -1
- package/dist/esm/components/button.d.ts +5 -0
- package/dist/esm/components/button.d.ts.map +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.props.js +1 -1
- package/dist/esm/components/callout.d.ts +1 -0
- package/dist/esm/components/callout.d.ts.map +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/callout.props.d.ts +4 -2
- package/dist/esm/components/callout.props.d.ts.map +1 -1
- package/dist/esm/components/callout.props.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.props.d.ts +4 -2
- package/dist/esm/components/card.props.d.ts.map +1 -1
- package/dist/esm/components/card.props.js +1 -1
- package/dist/esm/components/chatbar.d.ts +2 -1
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- 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.props.d.ts +10 -2
- package/dist/esm/components/checkbox-cards.props.d.ts.map +1 -1
- package/dist/esm/components/checkbox-cards.props.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.props.d.ts +3 -2
- package/dist/esm/components/checkbox-group.props.d.ts.map +1 -1
- package/dist/esm/components/checkbox-group.props.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.props.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -1
- package/dist/esm/components/combobox.d.ts +0 -16
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.d.ts +6 -4
- package/dist/esm/components/combobox.props.d.ts.map +1 -1
- package/dist/esm/components/combobox.props.js +1 -1
- package/dist/esm/components/context-menu.d.ts +2 -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.props.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/data-list.props.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.d.ts +2 -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.props.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.d.ts +2 -1
- package/dist/esm/components/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/icon-button.props.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/kbd.props.d.ts +4 -2
- package/dist/esm/components/kbd.props.d.ts.map +1 -1
- package/dist/esm/components/kbd.props.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.d.ts +1 -1
- package/dist/esm/components/navbar.props.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.props.d.ts +6 -0
- package/dist/esm/components/popover.props.d.ts.map +1 -1
- package/dist/esm/components/popover.props.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/progress.props.js +1 -1
- 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.props.d.ts +10 -2
- package/dist/esm/components/radio-cards.props.d.ts.map +1 -1
- package/dist/esm/components/radio-cards.props.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio-group.props.d.ts +4 -2
- package/dist/esm/components/radio-group.props.d.ts.map +1 -1
- package/dist/esm/components/radio-group.props.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.props.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +2 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/base-button.schema.js +1 -1
- package/dist/esm/components/schemas/button.schema.d.ts +2 -1
- package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/button.schema.js +1 -1
- package/dist/esm/components/schemas/icon-button.schema.d.ts +2 -1
- package/dist/esm/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/icon-button.schema.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.d.ts +2 -1
- package/dist/esm/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +2 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
- package/dist/esm/components/segmented-control.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.d.ts +5 -1
- package/dist/esm/components/segmented-control.props.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -1
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.props.d.ts +11 -5
- package/dist/esm/components/select.props.d.ts.map +1 -1
- package/dist/esm/components/select.props.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/separator.props.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.props.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/slider.props.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.props.js +1 -1
- 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.props.js +1 -1
- package/dist/esm/components/tabs.d.ts.map +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.props.js +1 -1
- 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.props.d.ts +6 -4
- 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-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.d.ts +6 -4
- 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.js +1 -1
- package/dist/esm/components/text.props.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.d.ts +4 -4
- package/dist/esm/components/theme.props.js +1 -1
- 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-icon-button.d.ts +2 -1
- 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/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.d.ts +1 -0
- package/dist/esm/components/user-card.d.ts.map +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/components/user-card.props.d.ts +5 -3
- package/dist/esm/components/user-card.props.d.ts.map +1 -1
- package/dist/esm/components/user-card.props.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/parse-variant.d.ts +8 -0
- package/dist/esm/helpers/parse-variant.d.ts.map +1 -0
- package/dist/esm/helpers/parse-variant.js +2 -0
- package/dist/esm/helpers/parse-variant.js.map +7 -0
- package/dist/esm/helpers/warn-deprecated.d.ts +7 -0
- package/dist/esm/helpers/warn-deprecated.d.ts.map +1 -0
- package/dist/esm/helpers/warn-deprecated.js +2 -0
- package/dist/esm/helpers/warn-deprecated.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/color.prop.d.ts +8 -1
- package/dist/esm/props/color.prop.d.ts.map +1 -1
- package/dist/esm/props/color.prop.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +1 -1
- package/schemas/base-button.json +4 -3
- package/schemas/button.json +4 -3
- package/schemas/icon-button.json +4 -3
- package/schemas/index.json +20 -15
- package/schemas/toggle-button.json +4 -3
- package/schemas/toggle-icon-button.json +4 -3
- package/src/components/_internal/base-button.css +7 -7
- package/src/components/_internal/base-button.props.ts +4 -3
- package/src/components/_internal/base-card.css +2 -2
- package/src/components/_internal/base-checkbox.css +4 -4
- package/src/components/_internal/base-checkbox.props.ts +3 -2
- package/src/components/_internal/base-menu.css +33 -0
- package/src/components/_internal/base-menu.props.ts +1 -1
- package/src/components/_internal/base-radio.css +4 -4
- package/src/components/_internal/base-radio.props.ts +3 -2
- package/src/components/_internal/base-tab-list.css +42 -0
- package/src/components/_internal/base-tab-list.props.ts +4 -1
- package/src/components/accordion.css +5 -5
- package/src/components/accordion.props.tsx +3 -2
- package/src/components/app-bar.tsx +5 -0
- package/src/components/avatar.css +7 -7
- package/src/components/avatar.props.tsx +5 -4
- package/src/components/badge.css +8 -8
- package/src/components/badge.props.tsx +5 -4
- package/src/components/button.css +1 -1
- package/src/components/button.tsx +37 -2
- package/src/components/callout.css +7 -7
- package/src/components/callout.props.tsx +5 -4
- package/src/components/callout.tsx +5 -0
- package/src/components/card.props.tsx +3 -2
- package/src/components/chatbar.css +4 -4
- package/src/components/chatbar.tsx +4 -2
- package/src/components/checkbox-cards.props.tsx +8 -2
- package/src/components/checkbox-cards.tsx +5 -1
- package/src/components/code.props.tsx +2 -2
- package/src/components/combobox.props.tsx +9 -6
- package/src/components/combobox.tsx +10 -2
- package/src/components/context-menu.tsx +4 -0
- package/src/components/dropdown-menu.tsx +4 -0
- package/src/components/heading.css +1 -1
- package/src/components/icon-button.tsx +4 -48
- package/src/components/kbd.css +24 -24
- package/src/components/kbd.props.tsx +4 -2
- package/src/components/navbar.css +4 -0
- package/src/components/navbar.props.tsx +1 -1
- package/src/components/popover.props.tsx +3 -0
- package/src/components/popover.tsx +5 -1
- package/src/components/radio-cards.props.tsx +8 -2
- package/src/components/radio-cards.tsx +5 -1
- package/src/components/radio-group.props.tsx +5 -2
- package/src/components/schemas/base-button.schema.ts +3 -3
- package/src/components/segmented-control.props.tsx +4 -5
- package/src/components/segmented-control.tsx +12 -0
- package/src/components/select.css +37 -4
- package/src/components/select.props.tsx +9 -9
- package/src/components/select.tsx +8 -2
- package/src/components/tab-nav.tsx +6 -2
- package/src/components/tabs.tsx +6 -2
- package/src/components/text-area.css +18 -5
- package/src/components/text-area.props.tsx +6 -4
- package/src/components/text-area.tsx +5 -1
- package/src/components/text-field.css +36 -3
- package/src/components/text-field.props.tsx +6 -4
- package/src/components/text-field.tsx +5 -1
- package/src/components/theme.props.tsx +4 -4
- package/src/components/toggle-button.tsx +19 -4
- package/src/components/toggle-icon-button.tsx +6 -60
- package/src/components/user-card.props.tsx +8 -5
- package/src/components/user-card.tsx +5 -0
- package/src/helpers/parse-variant.ts +21 -0
- package/src/helpers/warn-deprecated.ts +13 -0
- package/src/props/color.prop.ts +13 -0
- package/src/styles/tokens/constants.css +46 -27
- package/src/styles/tokens/typography.css +2 -0
- package/styles.css +901 -247
- package/tokens/base.css +1 -0
- package/tokens.css +34 -16
- package/dist/esm/chunk-3KSGRY6I.js +0 -2
- package/dist/esm/chunk-3KSGRY6I.js.map +0 -7
- package/dist/esm/chunk-3OELU3EO.js +0 -2
- package/dist/esm/chunk-3OELU3EO.js.map +0 -7
- package/dist/esm/chunk-4WVNMGI5.js +0 -2
- package/dist/esm/chunk-4WVNMGI5.js.map +0 -7
- package/dist/esm/chunk-54JFIP5S.js.map +0 -7
- package/dist/esm/chunk-5SNHUVDA.js +0 -2
- package/dist/esm/chunk-667BKCUG.js +0 -2
- package/dist/esm/chunk-667BKCUG.js.map +0 -7
- package/dist/esm/chunk-72AHPGPN.js +0 -2
- package/dist/esm/chunk-72AHPGPN.js.map +0 -7
- package/dist/esm/chunk-7E2BPXIP.js +0 -2
- package/dist/esm/chunk-7E2BPXIP.js.map +0 -7
- package/dist/esm/chunk-7FS2VDHO.js +0 -5
- package/dist/esm/chunk-7FS2VDHO.js.map +0 -7
- package/dist/esm/chunk-7RUVID3O.js +0 -2
- package/dist/esm/chunk-7RUVID3O.js.map +0 -7
- package/dist/esm/chunk-ALWNS44Q.js +0 -5
- package/dist/esm/chunk-ALWNS44Q.js.map +0 -7
- package/dist/esm/chunk-ARIV4AT5.js +0 -2
- package/dist/esm/chunk-ARIV4AT5.js.map +0 -7
- package/dist/esm/chunk-CFNESRYI.js +0 -2
- package/dist/esm/chunk-CFNESRYI.js.map +0 -7
- package/dist/esm/chunk-CKMMUHKE.js +0 -2
- package/dist/esm/chunk-CKMMUHKE.js.map +0 -7
- package/dist/esm/chunk-CLMOWP5T.js +0 -2
- package/dist/esm/chunk-CLMOWP5T.js.map +0 -7
- package/dist/esm/chunk-EBQZ3Z22.js +0 -2
- package/dist/esm/chunk-EBQZ3Z22.js.map +0 -7
- package/dist/esm/chunk-EDKQURDU.js +0 -2
- package/dist/esm/chunk-EDKQURDU.js.map +0 -7
- package/dist/esm/chunk-EPTYNVCU.js +0 -2
- package/dist/esm/chunk-EPTYNVCU.js.map +0 -7
- package/dist/esm/chunk-EPX34Y7S.js +0 -2
- package/dist/esm/chunk-EPX34Y7S.js.map +0 -7
- package/dist/esm/chunk-F6V7GBNQ.js +0 -2
- package/dist/esm/chunk-F6V7GBNQ.js.map +0 -7
- package/dist/esm/chunk-FC2DBBJ3.js +0 -2
- package/dist/esm/chunk-FG7XM7KJ.js +0 -2
- package/dist/esm/chunk-FG7XM7KJ.js.map +0 -7
- package/dist/esm/chunk-JFWMAYEH.js +0 -2
- package/dist/esm/chunk-JFWMAYEH.js.map +0 -7
- package/dist/esm/chunk-K3UAS7RW.js +0 -2
- package/dist/esm/chunk-K3UAS7RW.js.map +0 -7
- package/dist/esm/chunk-KZWNGWIM.js.map +0 -7
- package/dist/esm/chunk-KZYFTDGO.js +0 -2
- package/dist/esm/chunk-KZYFTDGO.js.map +0 -7
- package/dist/esm/chunk-MN3XALXD.js +0 -2
- package/dist/esm/chunk-MN3XALXD.js.map +0 -7
- package/dist/esm/chunk-NJ7S43EK.js +0 -2
- package/dist/esm/chunk-NJ7S43EK.js.map +0 -7
- package/dist/esm/chunk-OGVKSYLL.js +0 -2
- package/dist/esm/chunk-OGVKSYLL.js.map +0 -7
- package/dist/esm/chunk-OO652UQW.js +0 -2
- package/dist/esm/chunk-OO652UQW.js.map +0 -7
- package/dist/esm/chunk-OWMA6GTG.js +0 -2
- package/dist/esm/chunk-OWMA6GTG.js.map +0 -7
- package/dist/esm/chunk-P2NZLSAD.js +0 -2
- package/dist/esm/chunk-P2NZLSAD.js.map +0 -7
- package/dist/esm/chunk-PHZNRO3D.js +0 -2
- package/dist/esm/chunk-PHZNRO3D.js.map +0 -7
- package/dist/esm/chunk-PLYOBXAF.js +0 -2
- package/dist/esm/chunk-PLYOBXAF.js.map +0 -7
- package/dist/esm/chunk-QFPHEY77.js +0 -2
- package/dist/esm/chunk-QFPHEY77.js.map +0 -7
- package/dist/esm/chunk-QQ62LO3X.js +0 -2
- package/dist/esm/chunk-QQ62LO3X.js.map +0 -7
- package/dist/esm/chunk-RDAMYQFF.js +0 -2
- package/dist/esm/chunk-RDAMYQFF.js.map +0 -7
- package/dist/esm/chunk-TIT3QMV7.js +0 -2
- package/dist/esm/chunk-TIT3QMV7.js.map +0 -7
- package/dist/esm/chunk-TVV6IHBN.js +0 -2
- package/dist/esm/chunk-TVV6IHBN.js.map +0 -7
- package/dist/esm/chunk-VDTB4JG3.js +0 -2
- package/dist/esm/chunk-VDTB4JG3.js.map +0 -7
- package/dist/esm/chunk-VLTXI4A7.js +0 -2
- package/dist/esm/chunk-VLTXI4A7.js.map +0 -7
- package/dist/esm/chunk-VNH7BJOA.js +0 -2
- package/dist/esm/chunk-VNH7BJOA.js.map +0 -7
- package/dist/esm/chunk-WBMCZ4Z3.js +0 -2
- package/dist/esm/chunk-WBMCZ4Z3.js.map +0 -7
- package/dist/esm/chunk-WMGIFPI2.js +0 -2
- package/dist/esm/chunk-WMGIFPI2.js.map +0 -7
- package/dist/esm/chunk-XYVLQDGR.js +0 -2
- package/dist/esm/chunk-XYVLQDGR.js.map +0 -7
- package/dist/esm/chunk-Y3A6ZU24.js +0 -2
- package/dist/esm/chunk-Y3A6ZU24.js.map +0 -7
- /package/dist/esm/{chunk-HJU4I34X.js.map → chunk-27YQS6MM.js.map} +0 -0
- /package/dist/esm/{chunk-XVYTOZES.js.map → chunk-34UMKY2L.js.map} +0 -0
- /package/dist/esm/{chunk-N4GTDLRD.js.map → chunk-3IUDPNGP.js.map} +0 -0
- /package/dist/esm/{chunk-NQ3D3UXZ.js.map → chunk-3O7A3XQ7.js.map} +0 -0
- /package/dist/esm/{chunk-AF6XKU3W.js.map → chunk-3WCSLQNH.js.map} +0 -0
- /package/dist/esm/{chunk-MS5J4MF6.js.map → chunk-4QHJ7P3D.js.map} +0 -0
- /package/dist/esm/{chunk-JDGJSNWT.js.map → chunk-5ADGYTG5.js.map} +0 -0
- /package/dist/esm/{chunk-OJU5GCDZ.js.map → chunk-5G4WWJ4Z.js.map} +0 -0
- /package/dist/esm/{chunk-YBSRX63K.js.map → chunk-64GJCQFX.js.map} +0 -0
- /package/dist/esm/{chunk-Y5RCH23Z.js.map → chunk-6JP5PIOO.js.map} +0 -0
- /package/dist/esm/{chunk-CIYF56YS.js.map → chunk-77NDG5HJ.js.map} +0 -0
- /package/dist/esm/{chunk-ZO7TTWJI.js.map → chunk-77TGP2LO.js.map} +0 -0
- /package/dist/esm/{chunk-KJUDZCYK.js.map → chunk-AFOJ6OL3.js.map} +0 -0
- /package/dist/esm/{chunk-KFR3CK24.js.map → chunk-AYAKS3DT.js.map} +0 -0
- /package/dist/esm/{chunk-DD6SJPOU.js.map → chunk-B2MGVXYL.js.map} +0 -0
- /package/dist/esm/{chunk-5XV4QEP5.js.map → chunk-CMEKH4I5.js.map} +0 -0
- /package/dist/esm/{chunk-ESPWYN5C.js.map → chunk-DJJ6UGT2.js.map} +0 -0
- /package/dist/esm/{chunk-OMGZG52I.js.map → chunk-E7ZXB36J.js.map} +0 -0
- /package/dist/esm/{chunk-2OSGPH7E.js.map → chunk-EH7LNNGU.js.map} +0 -0
- /package/dist/esm/{chunk-C34HCTGS.js.map → chunk-EKYRZ54E.js.map} +0 -0
- /package/dist/esm/{chunk-CET7V3FZ.js.map → chunk-F4VC2WAU.js.map} +0 -0
- /package/dist/esm/{chunk-VICP2RNA.js.map → chunk-FISGGGPC.js.map} +0 -0
- /package/dist/esm/{chunk-7R73ISNJ.js.map → chunk-FLO6QCGB.js.map} +0 -0
- /package/dist/esm/{chunk-2I7QRVJ5.js.map → chunk-GQDDJK4N.js.map} +0 -0
- /package/dist/esm/{chunk-7UHKEJ7Q.js.map → chunk-GZG35274.js.map} +0 -0
- /package/dist/esm/{chunk-VR7ZAFYN.js.map → chunk-HSLP2HVS.js.map} +0 -0
- /package/dist/esm/{chunk-64PFYID5.js.map → chunk-JW3FRP5N.js.map} +0 -0
- /package/dist/esm/{chunk-PZ7OYATT.js.map → chunk-LBJEAC2S.js.map} +0 -0
- /package/dist/esm/{chunk-7NVLCYCL.js.map → chunk-LVPWM7CC.js.map} +0 -0
- /package/dist/esm/{chunk-JUJYMZ2F.js.map → chunk-LWIIIPSF.js.map} +0 -0
- /package/dist/esm/{chunk-VZSQATP6.js.map → chunk-NLJIXW5S.js.map} +0 -0
- /package/dist/esm/{chunk-CDG5WH4U.js.map → chunk-NMXERIOL.js.map} +0 -0
- /package/dist/esm/{chunk-4XKK32M4.js.map → chunk-NSFH3PJ4.js.map} +0 -0
- /package/dist/esm/{chunk-4LDVSTXI.js.map → chunk-NTVCOEJE.js.map} +0 -0
- /package/dist/esm/{chunk-NIIEIZKQ.js.map → chunk-OW4KAIWF.js.map} +0 -0
- /package/dist/esm/{chunk-SAJY4H6J.js.map → chunk-P7FYIMYU.js.map} +0 -0
- /package/dist/esm/{chunk-E67CIG6A.js.map → chunk-QC2UOUUI.js.map} +0 -0
- /package/dist/esm/{chunk-2CMM7MEL.js.map → chunk-QUAPA57G.js.map} +0 -0
- /package/dist/esm/{chunk-GO7OHBHW.js.map → chunk-QUM2TSRR.js.map} +0 -0
- /package/dist/esm/{chunk-GL5QTWYI.js.map → chunk-QYU2HSGF.js.map} +0 -0
- /package/dist/esm/{chunk-KOFEFBB3.js.map → chunk-T6Z4JUH6.js.map} +0 -0
- /package/dist/esm/{chunk-67MKPTZJ.js.map → chunk-TCEQ5VVE.js.map} +0 -0
- /package/dist/esm/{chunk-CRSHBENJ.js.map → chunk-UBWRIE4C.js.map} +0 -0
- /package/dist/esm/{chunk-WGYUWEQV.js.map → chunk-UYKEBIUD.js.map} +0 -0
- /package/dist/esm/{chunk-RNTCHVFI.js.map → chunk-V7BPRUNP.js.map} +0 -0
- /package/dist/esm/{chunk-OTXCKEWT.js.map → chunk-VJXHEDCE.js.map} +0 -0
- /package/dist/esm/{chunk-ZOY43B55.js.map → chunk-WCQ2VRQU.js.map} +0 -0
- /package/dist/esm/{chunk-5SNHUVDA.js.map → chunk-YL62I5SI.js.map} +0 -0
- /package/dist/esm/{chunk-5WRCK4R7.js.map → chunk-YS74SW5S.js.map} +0 -0
- /package/dist/esm/{chunk-AGSSWWFI.js.map → chunk-ZK55O7TN.js.map} +0 -0
package/tokens/base.css
CHANGED
|
@@ -1219,6 +1219,7 @@
|
|
|
1219
1219
|
--code-padding-right: 0.25em;
|
|
1220
1220
|
--strong-font-size-adjust: 1;
|
|
1221
1221
|
--strong-font-style: inherit;
|
|
1222
|
+
--heading-font-weight: var(--font-weight-bold);
|
|
1222
1223
|
--strong-font-weight: var(--font-weight-medium);
|
|
1223
1224
|
--strong-letter-spacing: 0em;
|
|
1224
1225
|
--em-font-size-adjust: 1.18;
|
package/tokens.css
CHANGED
|
@@ -3325,21 +3325,21 @@
|
|
|
3325
3325
|
--surface-opacity: var(--opacity-7);
|
|
3326
3326
|
--surface-opacity-percentage: calc(var(--surface-opacity) * 100%);
|
|
3327
3327
|
--border-width-standard: 1px;
|
|
3328
|
-
--
|
|
3329
|
-
--
|
|
3330
|
-
--
|
|
3331
|
-
--
|
|
3332
|
-
--
|
|
3333
|
-
--
|
|
3334
|
-
--
|
|
3335
|
-
--
|
|
3336
|
-
--
|
|
3337
|
-
--
|
|
3338
|
-
--
|
|
3339
|
-
--
|
|
3340
|
-
--
|
|
3341
|
-
--
|
|
3342
|
-
--
|
|
3328
|
+
--raised-elevation-offset: -0.02em;
|
|
3329
|
+
--raised-active-padding-offset-1: 0.5px;
|
|
3330
|
+
--raised-active-padding-offset-2: 1px;
|
|
3331
|
+
--raised-shadow-blur-small: 0.15em;
|
|
3332
|
+
--raised-border-width: 0.03em;
|
|
3333
|
+
--raised-border-width-thick: 0.05em;
|
|
3334
|
+
--raised-shadow-offset-y: 0.04em;
|
|
3335
|
+
--raised-word-spacing: -0.1em;
|
|
3336
|
+
--raised-elevation-factor-subtle: 3;
|
|
3337
|
+
--raised-shadow-factor-light: 1.5;
|
|
3338
|
+
--raised-border-multiplier-double: 2;
|
|
3339
|
+
--raised-shadow-blur-medium: 0.2em;
|
|
3340
|
+
--raised-shadow-blur-large: 0.4em;
|
|
3341
|
+
--raised-shadow-medium-factor-third: 3;
|
|
3342
|
+
--raised-inset-shadow-dark: inset 0 var(--raised-border-width) calc(var(--raised-shadow-blur-small) / var(--raised-shadow-factor-light)) var(--gray-a4), inset 0 calc(-1 * var(--raised-border-width)) var(--gray-a2), inset 0 calc(var(--raised-border-width) * var(--raised-border-multiplier-double)) calc(var(--raised-shadow-blur-medium) / var(--raised-shadow-medium-factor-third)) var(--gray-a3), 0 0 0 var(--raised-border-width) var(--gray-a5);
|
|
3343
3343
|
--trigger-icon-size-default: 9px;
|
|
3344
3344
|
--trigger-icon-size-1: 10px;
|
|
3345
3345
|
--trigger-icon-size-2: 11px;
|
|
@@ -3355,6 +3355,7 @@
|
|
|
3355
3355
|
--select-indicator-icon-size-1: calc(8px * var(--scaling));
|
|
3356
3356
|
--select-indicator-icon-size-2: calc(10px * var(--scaling));
|
|
3357
3357
|
--select-indicator-icon-size-3: calc(10px * var(--scaling));
|
|
3358
|
+
--select-indicator-icon-size-4: calc(12px * var(--scaling));
|
|
3358
3359
|
--select-item-indicator-width-factor: 1.2;
|
|
3359
3360
|
--separator-height-thin: 1px;
|
|
3360
3361
|
--progress-default-duration: 5s;
|
|
@@ -3378,7 +3379,7 @@
|
|
|
3378
3379
|
--slider-thumb-inset-factor: 0.25;
|
|
3379
3380
|
--slider-focus-ring-inner: 3px;
|
|
3380
3381
|
--slider-focus-ring-outer: 5px;
|
|
3381
|
-
--slider-
|
|
3382
|
+
--slider-raised-inset-offset: 1.5px;
|
|
3382
3383
|
--progress-slider-height-1: var(--space-1);
|
|
3383
3384
|
--progress-slider-height-2: calc(var(--space-1) * 1.5);
|
|
3384
3385
|
--progress-slider-height-3: var(--space-2);
|
|
@@ -3412,6 +3413,22 @@
|
|
|
3412
3413
|
--focus-outline-offset: 2px;
|
|
3413
3414
|
--focus-outline-offset-inset: -1px;
|
|
3414
3415
|
--padding-ratio-horizontal: 1.5;
|
|
3416
|
+
--classic-active-padding-offset-1: var(--raised-active-padding-offset-1);
|
|
3417
|
+
--classic-active-padding-offset-2: var(--raised-active-padding-offset-2);
|
|
3418
|
+
--classic-border-multiplier-double: var(--raised-border-multiplier-double);
|
|
3419
|
+
--classic-border-width: var(--raised-border-width);
|
|
3420
|
+
--classic-border-width-thick: var(--raised-border-width-thick);
|
|
3421
|
+
--classic-elevation-factor-subtle: var(--raised-elevation-factor-subtle);
|
|
3422
|
+
--classic-elevation-offset: var(--raised-elevation-offset);
|
|
3423
|
+
--classic-inset-shadow-dark: var(--raised-inset-shadow-dark);
|
|
3424
|
+
--classic-shadow-blur-large: var(--raised-shadow-blur-large);
|
|
3425
|
+
--classic-shadow-blur-medium: var(--raised-shadow-blur-medium);
|
|
3426
|
+
--classic-shadow-blur-small: var(--raised-shadow-blur-small);
|
|
3427
|
+
--classic-shadow-factor-light: var(--raised-shadow-factor-light);
|
|
3428
|
+
--classic-shadow-medium-factor-third: var(--raised-shadow-medium-factor-third);
|
|
3429
|
+
--classic-shadow-offset-y: var(--raised-shadow-offset-y);
|
|
3430
|
+
--classic-word-spacing: var(--raised-word-spacing);
|
|
3431
|
+
--slider-classic-inset-offset: var(--slider-raised-inset-offset);
|
|
3415
3432
|
--color-background: white;
|
|
3416
3433
|
--color-overlay: var(--black-a6);
|
|
3417
3434
|
--color-panel-solid: white;
|
|
@@ -4603,6 +4620,7 @@
|
|
|
4603
4620
|
--code-padding-right: 0.25em;
|
|
4604
4621
|
--strong-font-size-adjust: 1;
|
|
4605
4622
|
--strong-font-style: inherit;
|
|
4623
|
+
--heading-font-weight: var(--font-weight-bold);
|
|
4606
4624
|
--strong-font-weight: var(--font-weight-medium);
|
|
4607
4625
|
--strong-letter-spacing: 0em;
|
|
4608
4626
|
--em-font-size-adjust: 1.18;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-NZJGC6ZW.js";import{c as e}from"./chunk-ZNK6AH2G.js";var n=["1","2"],o=["solid","soft"],r=["solid","translucent"],a=["solid","translucent"],u=["cascade","drill-down"],t={size:{type:"enum",className:"rt-r-size",values:n,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:o,default:"solid"},material:{type:"enum",values:a,default:void 0},panelBackground:{type:"enum",values:r,default:void 0},...e},f={...t,submenuBehavior:{type:"enum",values:u,default:"cascade",responsive:!0}},c=t,d={...s,...e,shortcut:{type:"string"}},m={...e,shortcut:{type:"string"}},l={...e};export{u as a,f as b,c,d,m as e,l as f};
|
|
2
|
-
//# sourceMappingURL=chunk-3KSGRY6I.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/base-menu.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst submenuBehaviors = ['cascade', 'drill-down'] as const;\n\n// Base props shared between Content and SubContent\nconst baseMenuSharedPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n material: {\n type: 'enum',\n values: materials,\n default: undefined,\n },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\n// Content-specific props (includes submenuBehavior)\nconst baseMenuContentPropDefs = {\n ...baseMenuSharedPropDefs,\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior: {\n type: 'enum',\n values: submenuBehaviors,\n default: 'cascade',\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n submenuBehavior: PropDef<(typeof submenuBehaviors)[number]>;\n};\n\n// SubContent props (no submenuBehavior)\nconst baseMenuSubContentPropDefs = baseMenuSharedPropDefs;\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuSubContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n submenuBehaviors,\n};\n"],
|
|
5
|
-
"mappings": "gFAKA,IAAMA,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EACnCC,EAAmB,CAAC,UAAW,YAAY,EAG3CC,EAAyB,CAC7B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQL,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,SAAU,CACR,KAAM,OACN,OAAQE,EACR,QAAS,MACX,EAIA,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,MACX,EACA,GAAGI,CACL,EAQMC,EAA0B,CAC9B,GAAGF,EAOH,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,UACT,WAAY,EACd,CACF,EASMI,EAA6BH,EAE7BI,EAAuB,CAC3B,GAAGC,EACH,GAAGJ,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMK,EAA+B,CACnC,GAAGL,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMM,EAA4B,CAChC,GAAGN,CACL",
|
|
6
|
-
"names": ["contentSizes", "contentVariants", "panelBackgrounds", "materials", "submenuBehaviors", "baseMenuSharedPropDefs", "colorPropDef", "baseMenuContentPropDefs", "baseMenuSubContentPropDefs", "baseMenuItemPropDefs", "asChildPropDef", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as ot}from"./chunk-64PFYID5.js";import{a as Ve}from"./chunk-7FS2VDHO.js";import{a as nt}from"./chunk-COWZAUZR.js";import{g as tt,j as at}from"./chunk-IX5HIHVI.js";import{a as we}from"./chunk-5WRCK4R7.js";import{a as Be}from"./chunk-HF5WY5YE.js";import{a as je}from"./chunk-AGAQC4HH.js";import{a as De}from"./chunk-FHOCUZDR.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as Ft}from"./chunk-OS3FCYZY.js";var _t={};Ft(_t,{AttachTrigger:()=>Ct,Attachment:()=>Ue,AttachmentsRow:()=>ht,InlineEnd:()=>pt,InlineStart:()=>mt,Item:()=>Rt,Root:()=>dt,Row:()=>gt,RowEnd:()=>yt,RowStart:()=>vt,Send:()=>xt,Textarea:()=>ut});import*as e from"react";import E from"classnames";import{LazyMotion as zt,MotionConfig as Dt,domAnimation as Bt,m as me}from"motion/react";import{useComposedRefs as it}from"radix-ui/internal";import{useDropzone as jt}from"react-dropzone";var We=typeof window<"u"?e.useLayoutEffect:e.useEffect;function rt(a,r){let{placeholder:n}=a;if(!n){r();return}a.placeholder="";try{r()}finally{a.placeholder=n}}var pe={layout:{type:"spring",visualDuration:.15,bounce:.1}},ct=e.createContext(null),Ke=e.createContext(""),H=()=>{let a=e.useContext(ct);if(!a)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return a},ue=a=>Array.isArray(a)?a:typeof a=="string"?a.split(",").map(r=>r.trim()).filter(Boolean):[],Vt=(a,r)=>{if(r.length===0)return!0;let n=a.type.toLowerCase(),i=a.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[f,b]=n.split("/");if(d==="*"||d===f&&(u==="*"||u===b))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},Wt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,lt=(a,r)=>(r||"").toLowerCase().startsWith("image/")||Wt.test(a),$e=a=>a.trim().length>0,st=(a,r)=>`${a} ${r}${a===1?"":"s"}`,$t=0,Kt=()=>`chatbar-attachment-${Date.now()}-${++$t}`,dt=e.forwardRef((a,r)=>{let{className:n,style:i,children:c,value:l,defaultValue:d="",onValueChange:u,open:f,defaultOpen:b=!1,onOpenChange:C,expandOn:v="both",minLines:m=3,maxLines:N=6,sendMode:I="whenDirty",disabled:R,readOnly:S,onSubmit:j,size:A="2",variant:F,color:L,radius:z,panelBackground:y,material:k,width:V,maxWidth:oe,attachments:x,defaultAttachments:D,onAttachmentsChange:_,accept:he,multiple:O=!0,maxAttachments:G,maxFileSize:q,paste:B=!0,pasteAccept:M,clearOnSubmit:Y=!0,onAttachmentReject:Se,dropzone:re=!0,apiRef:Ee,onBlurCapture:fe,notices:be,context:Re,...Te}=a,t=k||y,g=l!=null,[w,se]=e.useState(d),W=g?l:w,X=f!=null,[Le,ie]=e.useState(b),Q=X?f:Le,Z="attachments"in a,[_e,Pt]=e.useState(()=>D??[]),ce=e.useMemo(()=>Z?x??[]:_e,[Z,x,_e]),[Ge,At]=e.useState({text:"",id:0}),le=e.useCallback(o=>At(s=>({text:o,id:s.id+1})),[]),qe=e.useRef(null),wt=it(r,qe),ke=e.useRef(null),Me=e.useRef(null),de=e.useRef(!1),Ce=e.useRef(!1),ge=e.useRef(void 0),Ne=e.useRef(null),Ye=ue(he).join(","),Oe=ue(M).join(","),He=e.useMemo(()=>ue(Ye),[Ye]),St=e.useMemo(()=>Oe?ue(Oe):He,[Oe,He]),Xe={value:W,attachments:ce,accepts:He,pasteAccepts:St,multiple:O,maxAttachments:G,maxFileSize:q,disabled:R,readOnly:S,expandOn:v,isValueControlled:g,isOpenControlled:X,isAttachmentsControlled:Z,onValueChange:u,onOpenChange:C,onAttachmentsChange:_,onAttachmentReject:Se,onSubmit:j},P=e.useRef(Xe);P.current=Xe;let Ie=e.useRef(null),$=e.useCallback(()=>Ie.current??P.current.attachments,[]),ee=e.useCallback(o=>{P.current.isOpenControlled||ie(o),P.current.onOpenChange?.(o)},[]),ve=e.useCallback(o=>{P.current.isValueControlled||se(o),P.current.onValueChange?.(o)},[]),te=e.useCallback(o=>{Ie.current=o,queueMicrotask(()=>{Ie.current=null}),P.current.isAttachmentsControlled||Pt(o),P.current.onAttachmentsChange?.(o)},[]),ye=e.useRef(new Set),ae=e.useCallback((o,s,p=P.current.multiple)=>{let h=P.current;if(h.disabled||h.readOnly||o.length===0)return 0;let K=$(),J=[],ne=[],Ht=typeof h.maxAttachments=="number"?Math.max(h.maxAttachments-K.length,0):1/0,It=p?1/0:1;for(let T of o){if(J.length>=Ht||J.length>=It){ne.push({file:T,reason:"count"});continue}if(typeof h.maxFileSize=="number"&&T.size>h.maxFileSize){ne.push({file:T,reason:"size"});continue}if(!Vt(T,s)){ne.push({file:T,reason:"type"});continue}let ze=lt(T.name,T.type)?URL.createObjectURL(T):void 0;ze&&ye.current.add(ze),J.push({id:Kt(),name:T.name,size:T.size,type:T.type,file:T,url:ze,status:"idle"})}let Ae=[];return J.length>0&&(te(K.concat(J)),h.expandOn!=="none"&&ee(!0),Ae.push(`${st(J.length,"file")} attached.`)),ne.length>0&&(h.onAttachmentReject?.(ne),Ae.push(`${st(ne.length,"file")} could not be attached.`)),Ae.length>0&&le(Ae.join(" ")),J.length},[$,te,ee,le]),xe=e.useCallback(o=>ae(o,P.current.accepts),[ae]),Je=e.useCallback(o=>ae(o,P.current.pasteAccepts),[ae]),Qe=e.useCallback(o=>{let s=$(),p=s.find(h=>h.id===o);p&&(te(s.filter(h=>h.id!==o)),le(`Removed ${p.name}.`))},[$,te,le]),Ze=e.useCallback(o=>{let s=P.current;if(s.disabled||s.readOnly)return!1;let p=$();if(!$e(s.value)&&p.length===0)return!1;let h={value:s.value,attachments:p};if(o&&s.onSubmit)for(let K of p)K.url&&ye.current.delete(K.url);return s.onSubmit?.(h),o&&(ve(""),te([])),!0},[$,ve,te]);e.useEffect(()=>{let o=ye.current;if(o.size===0)return;let s=new Set(ce.map(p=>p.url));for(let p of Array.from(o))s.has(p)||(URL.revokeObjectURL(p),o.delete(p))},[ce]),e.useEffect(()=>{let o=ye.current;return()=>{if(!P.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let Pe=e.useCallback(o=>{let s=P.current,p=Me.current;if(clearTimeout(ge.current),Ce.current=!1,!p||s.disabled||s.readOnly)return;let h=o?.accept!=null?ue(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:h,multiple:K},p.accept=h.join(","),p.multiple=K,de.current=!0,p.click(),setTimeout(()=>{document.hasFocus()&&(de.current=!1)},1e3)},[]),et=e.useCallback(()=>{Ce.current=!0,clearTimeout(ge.current),ge.current=setTimeout(()=>{Ce.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ge.current),[]),e.useEffect(()=>{let o=Me.current,s=()=>{de.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let Et=e.useCallback(o=>{let s=o.currentTarget,p=Array.from(s.files??[]),h=Ne.current;ae(p,h?.patterns??P.current.accepts,h?.multiple),de.current=!1,Ne.current=null,s.value=""},[ae]),Tt=e.useCallback(o=>{fe?.(o);let s=P.current,p=qe.current;if(!p||s.expandOn==="none")return;let h=o.relatedTarget;h&&p.contains(h)||de.current||Ce.current||!$e(s.value)&&$().length===0&&ee(!1)},[fe,ee,$]),Lt=e.useCallback(o=>{xe(o)},[xe]),{getRootProps:kt,isDragActive:Mt}=jt({onDrop:Lt,onDragEnter:()=>le(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!re||R||S}),Fe=re&&Mt;e.useImperativeHandle(Ee,()=>({focusTextarea:()=>ke.current?.focus({preventScroll:!0}),openFilePicker:()=>Pe()}),[Pe]);let Nt=e.useCallback(o=>{if(R||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),ke.current?.focus({preventScroll:!0}))},[R]),Ot=e.useMemo(()=>({open:Q,setOpen:ee,setValue:ve,size:A,expandOn:v,minLines:m,maxLines:N,sendMode:I,disabled:R,readOnly:S,paste:B,clearOnSubmit:Y,multiple:O,textareaRef:ke,attachments:ce,removeAttachment:Qe,submit:Ze,appendFiles:xe,appendFilesFromPaste:Je,openFilePicker:Pe,beginFilePickerPress:et}),[Q,ee,ve,A,v,m,N,I,R,S,B,Y,O,ce,Qe,Ze,xe,Je,Pe,et]);return e.createElement(ct.Provider,{value:Ot},e.createElement(Ke.Provider,{value:W},e.createElement(zt,{features:Bt},e.createElement(Dt,{reducedMotion:"user"},e.createElement("div",{...Te,ref:wt,className:E("rt-ChatbarRoot",`rt-r-size-${A}`,n),style:{position:"relative",width:V,maxWidth:oe,...i},"data-state":Q?"open":"closed","data-disabled":R?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":L,"data-radius":z,"data-panel-background":t,"data-material":t,onBlurCapture:Tt},e.createElement("input",{ref:Me,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:Et}),be?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(ot.Provider,{value:A},be)):null,e.createElement("div",{...re?kt():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Nt},e.createElement(me.div,{className:E("rt-ChatbarBox",`rt-variant-${F??"surface"}`),style:{position:"relative"},"data-accent-color":L,"data-radius":z,"data-panel-background":t,"data-material":t,layout:!0,transition:pe},e.createElement(me.div,{className:"rt-ChatbarGrid",layout:"position",transition:pe},c),Fe&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(we,{emphasis:"medium",size:A,weight:"medium"},"Drop files here to attach"))))),Re?e.createElement(we,{as:"div",size:A==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},Re):null,e.createElement(je,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ge.id},Ge.text)))))))});dt.displayName="Chatbar.Root";var ut=e.forwardRef((a,r)=>{let{className:n,style:i,asChild:c,onFocus:l,onChange:d,onPaste:u,onKeyDown:f,onCompositionStart:b,onCompositionEnd:C,submitOnEnter:v=!1,...m}=a,N=H(),I=e.useContext(Ke),{open:R,minLines:S,maxLines:j,expandOn:A,disabled:F,readOnly:L,setOpen:z,setValue:y,textareaRef:k,paste:V,appendFilesFromPaste:oe,size:x,submit:D,clearOnSubmit:_}=N,he=it(r,k),O=e.useRef(0),G=e.useRef(0),q=e.useRef(!1),B=e.useRef({open:R,minLines:S,maxLines:j});We(()=>{B.current={open:R,minLines:S,maxLines:j}},[R,S,j]);let M=e.useCallback(()=>{let t=k.current;if(!t)return;let g=window.getComputedStyle(t);O.current=parseFloat(g.lineHeight)||20,G.current=(parseFloat(g.paddingTop)||0)+(parseFloat(g.paddingBottom)||0)},[k]),Y=e.useCallback((t,g)=>{let{minLines:w,maxLines:se}=B.current,W=O.current,X=G.current,Le=Math.ceil((g?w:1)*W)+X,ie=Math.ceil((g?se:1)*W)+X,Q=Math.max(t.scrollHeight,Le);t.style.height=`${Math.min(Q,ie)}px`;let Z=Q>ie;t.style.overflowY=Z?"auto":"hidden",t.style.maxHeight=Z?`${ie}px`:"none"},[]);We(()=>{M()},[M,x]),We(()=>{let t=k.current;t&&(O.current===0&&M(),rt(t,()=>{t.style.height="auto";let g=R;if(!R&&(A==="overflow"||A==="both")){let w=Math.ceil(O.current)+G.current;t.scrollHeight>w+1&&(g=!0,z(!0))}Y(t,g)}))},[I,R,A,S,j,x,z,k,M,Y]),e.useEffect(()=>{let t=k.current;if(!t||typeof ResizeObserver>"u")return;let g=-1,w=new ResizeObserver(se=>{let W=se[0]?.contentRect.width??0;if(W===g)return;let X=g===-1;g=W,!X&&(M(),rt(t,()=>{t.style.height="auto",Y(t,B.current.open)}))});return w.observe(t),()=>w.disconnect()},[k,M,Y]),e.useEffect(()=>{},[]);let Se=e.useCallback(t=>{l?.(t),!(F||L)&&(A==="focus"||A==="both")&&!R&&z(!0)},[F,L,A,R,z,l]),re=e.useCallback(t=>{y(t.currentTarget.value),d?.(t)},[y,d]),Ee=e.useCallback(t=>{if(u?.(t),t.defaultPrevented||!V||F||L)return;let g=Array.from(t.clipboardData?.items??[]).filter(w=>w.kind==="file").map(w=>w.getAsFile()).filter(w=>!!w);g.length!==0&&oe(g)>0&&t.preventDefault()},[V,F,L,u,oe]),fe=e.useCallback(t=>{q.current=!0,b?.(t)},[b]),be=e.useCallback(t=>{q.current=!1,C?.(t)},[C]),Re=e.useCallback(t=>{f?.(t),!(t.defaultPrevented||!v)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||q.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),D(_)))},[v,f,D,_]),Te=c?U:"textarea";return e.createElement(me.div,{className:E("rt-ChatbarField","rt-ChatbarTextarea",n),layout:"position",transition:pe},e.createElement(Te,{...m,ref:he,className:"rt-ChatbarInput",value:I,onChange:re,onFocus:Se,onPaste:Ee,onKeyDown:Re,onCompositionStart:fe,onCompositionEnd:be,disabled:F,readOnly:L,rows:R?S:1,spellCheck:m.spellCheck??!0,autoCorrect:m.autoCorrect??"on",style:i}))});ut.displayName="Chatbar.Textarea";var mt=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("rt-ChatbarInlineStart",c)},n)});mt.displayName="Chatbar.InlineStart";var pt=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("rt-ChatbarInlineEnd",c)},n)});pt.displayName="Chatbar.InlineEnd";var ht=e.forwardRef((a,r)=>{let{asChild:n,forceMount:i,renderAttachment:c,className:l,children:d,...u}=a,f=H(),b=e.Children.toArray(d).length>0;if(f.attachments.length===0&&!b&&!i)return null;let C=n?U:"div";return e.createElement(me.div,{layout:"position",transition:pe},e.createElement(C,{...u,ref:r,className:E("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(nt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(De,{align:"center",gap:"2",minWidth:"fit-content"},f.attachments.map(v=>e.createElement(Ue,{key:v.id,attachment:v,asChild:!!c},c?.(v))),d))))});ht.displayName="Chatbar.AttachmentsRow";function ft(a,r){let n=a.closest('[role="listitem"]'),i=n?.parentElement?Array.from(n.parentElement.children):[],c=n?i.indexOf(n):-1,d=(i[c+1]??i[c-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():r.current?.focus({preventScroll:!0})}var bt=({lead:a,leadKind:r,label:n,detail:i,removeLabel:c,onRemove:l})=>{let d=H();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":r,"aria-hidden":!0},a),e.createElement(we,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},n,i?e.createElement(je,null,", ",i):null),l&&e.createElement(Ve,{className:"rt-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(tt,null)))},Ut={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((a,r)=>{let{attachment:n,asChild:i,className:c,children:l,...d}=a,u=H(),f=i?U:"div",b=!!n.url&<(n.name,n.type),C=`${Math.ceil(n.size/1024)} KB`,v=n.status?Ut[n.status]:void 0,m=u.disabled||u.readOnly,N=R=>{ft(R.currentTarget,u.textareaRef),u.removeAttachment(n.id)},I=n.status==="uploading"?e.createElement(Be,{size:"1"}):b?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:n.url,alt:""}):e.createElement(at,null);return e.createElement(f,{...d,ref:r,className:E(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",c),role:"listitem","data-kind":b?"image":"file","data-status":n.status,title:n.name},l??e.createElement(bt,{lead:I,leadKind:b&&n.status!=="uploading"?"image":"icon",label:n.name,detail:v?`${C}, ${v}`:C,removeLabel:`Remove ${n.name}`,onRemove:m?void 0:N}))});Ue.displayName="Chatbar.Attachment";var Rt=e.forwardRef((a,r)=>{let{children:n,icon:i,image:c,color:l,onRemove:d,removeLabel:u,className:f,...b}=a,C=H(),v=C.disabled||C.readOnly,m=d?N=>{ft(N.currentTarget,C.textareaRef),d()}:void 0;return e.createElement("div",{...b,ref:r,className:E("rt-ChatbarItem",f),role:"listitem","data-accent-color":c?void 0:l??"gray",title:n},e.createElement(bt,{lead:c?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:n,removeLabel:u??`Remove ${n}`,onRemove:v?void 0:m}))});Rt.displayName="Chatbar.Item";var Ct=e.forwardRef((a,r)=>{let{asChild:n,accept:i,multiple:c,disabled:l,onPointerDown:d,onClick:u,...f}=a,b=H(),C=l||b.disabled||b.readOnly;return e.createElement(n?U:"button",{...f,ref:r,className:E("rt-ChatbarAttachTrigger",f.className),type:f.type??"button","aria-label":f["aria-label"]??"Add attachments",disabled:C,onPointerDown:m=>{d?.(m),!C&&!m.defaultPrevented&&b.beginFilePickerPress()},onClick:m=>{u?.(m),!(C||m.defaultPrevented)&&b.openFilePicker({accept:i,multiple:c})}})});Ct.displayName="Chatbar.AttachTrigger";var gt=e.forwardRef((a,r)=>{let{asChild:n,children:i,className:c,...l}=a;if(!H().open)return null;let u=n?U:"div";return e.createElement(me.div,{layout:"position",transition:pe},e.createElement(u,{...l,ref:r,className:E("rt-ChatbarRow",c)},e.createElement(De,{align:"center",justify:"between",width:"100%"},i)))});gt.displayName="Chatbar.Row";var vt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:E("rt-ChatbarRowStart",n)})});vt.displayName="Chatbar.RowStart";var yt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:E("rt-ChatbarRowEnd",n)})});yt.displayName="Chatbar.RowEnd";var xt=e.forwardRef((a,r)=>{let{asChild:n,clearOnSend:i,disabled:c,children:l,style:d,className:u,size:f,variant:b,tabIndex:C,onClick:v,status:m="ready",onStop:N,onRetry:I,stopLabel:R="Stop",retryLabel:S="Retry",stopIcon:j,retryIcon:A,"aria-label":F,"aria-labelledby":L,...z}=a,y=H(),k=e.useContext(Ke),V=$e(k)||y.attachments.length>0,x=V?"send":m==="submitted"||m==="streaming"?"stop":m==="error"?"retry":"send";if(y.sendMode==="never"&&x==="send")return null;let D=x!=="send"||y.sendMode==="always"||V,_=x==="send"?c||y.disabled||y.readOnly||!V:c||y.disabled,O=x==="stop"?{"aria-label":R}:x==="retry"?{"aria-label":S}:L?{"aria-labelledby":L}:{"aria-label":F??"Send"},G=B=>{if(v?.(B),B.defaultPrevented||_)return;if(x==="stop"){N?.();return}if(x==="retry"){I?.();return}let M=i??y.clearOnSubmit;y.submit(M)&&M&&y.textareaRef.current?.focus({preventScroll:!0})},q=x==="stop"?j??(m==="submitted"?e.createElement(Be,{size:y.size}):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):x==="retry"?A??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(Ve,{...z,ref:r,size:f??y.size,variant:b??(y.open||x!=="send"?"solid":"ghost"),disabled:_,className:E("rt-ChatbarSend",u),style:{opacity:D?1:0,pointerEvents:D?void 0:"none",...d},"aria-hidden":D?void 0:!0,tabIndex:D?C:-1,asChild:n,onClick:G,"data-status":m,"data-mode":x,...O},q)});xt.displayName="Chatbar.Send";export{dt as a,ut as b,mt as c,pt as d,ht as e,Ue as f,Rt as g,Ct as h,gt as i,vt as j,yt as k,xt as l,_t as m};
|
|
2
|
-
//# sourceMappingURL=chunk-3OELU3EO.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/chatbar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { LazyMotion, MotionConfig, domAnimation, m } from 'motion/react';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { useDropzone } from 'react-dropzone';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { NoticeSizeContext } from './notice.js';\nimport { Spinner } from './spinner.js';\nimport { Text } from './text.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { accentColors } from '../props/color.prop.js';\nimport type { radii } from '../props/radius.prop.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\n/**\n * Runs `measure` with the placeholder taken out of layout, so a height read\n * reflects the value alone.\n *\n * A textarea with an empty value lays its placeholder out as real text, so\n * `scrollHeight` reports the placeholder wrapped at whatever width the field\n * has at that instant. That sizes an empty bar to the suggestion showing in it\n * rather than to `minLines`, and when the read lands before the field has its\n * final width -- a panel still animating open, a flex parent whose basis is 0\n * -- it wraps that text at a fraction of the real width and opens the bar at\n * `maxLines`. The first keystroke takes the placeholder out of layout and the\n * height snaps back, which is what made the bug look intermittent rather than\n * simply wrong.\n *\n * The reset to 'auto' and the `scrollHeight` read sit in different functions\n * here, so the whole measurement window is wrapped rather than a single read.\n * Costs one extra style recalc on a path that is already forcing a reflow.\n */\nfunction withoutPlaceholder(el: HTMLTextAreaElement, measure: () => void): void {\n const { placeholder } = el;\n if (!placeholder) {\n measure();\n return;\n }\n el.placeholder = '';\n try {\n measure();\n } finally {\n el.placeholder = placeholder;\n }\n}\n\n// Shared layout spring; hoisted so every motion node receives the same object\nconst LAYOUT_TRANSITION = { layout: { type: 'spring', visualDuration: 0.15, bounce: 0.1 } } as const;\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews. Chatbar revokes it when the\n * attachment is removed; once an attachment is handed to `onSubmit`, the\n * consumer owns the URL and is responsible for revoking it.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ntype ChatbarRejectReason = 'type' | 'size' | 'count';\ninterface ChatbarAttachmentRejection {\n file: File;\n reason: ChatbarRejectReason;\n}\n\ninterface ChatbarSubmitPayload {\n value: string;\n attachments: ChatbarAttachment[];\n}\n\ninterface FilePickerOptions {\n accept?: string | string[];\n multiple?: boolean;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n\n setValue(next: string): void;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n paste: boolean;\n clearOnSubmit: boolean;\n multiple: boolean;\n\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n attachments: ChatbarAttachment[];\n removeAttachment(id: string): void;\n\n /** Validates and submits; returns false when there was nothing to submit */\n submit(clear: boolean): boolean;\n appendFiles(files: File[]): number;\n appendFilesFromPaste(files: File[]): number;\n openFilePicker(options?: FilePickerOptions): void;\n /** Guards blur-collapse between pointerdown on a picker trigger and its click */\n beginFilePickerPress(): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\n// Value lives in its own context so keystrokes only re-render parts that read it\nconst ChatbarValueContext = React.createContext<string>('');\n\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\nconst toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];\n\nconst matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype))) return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n};\n\nconst IMAGE_EXT_RE = /\\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i;\nconst isImageLike = (name: string, type: string) => (type || '').toLowerCase().startsWith('image/') || IMAGE_EXT_RE.test(name);\n\nconst hasText = (value: string) => value.trim().length > 0;\n\nconst plural = (n: number, word: string) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nlet attachmentCounter = 0;\nconst createAttachmentId = () => `chatbar-attachment-${Date.now()}-${++attachmentCounter}`;\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `multiple`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - Submitting requires text or at least one attachment.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n /** When the chatbar expands on its own. `none` leaves open state entirely to the consumer. */\n expandOn?: ExpandOn;\n\n /** Minimum visible lines when expanded (default: 3). The compact state is always one line. */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n /** Controls Send button visibility only. Enter-to-submit is controlled by `Textarea submitOnEnter`. */\n sendMode?: SendMode;\n\n /** Disables text input, submission and every way of adding attachments */\n disabled?: boolean;\n /** Prevents editing, submission and adding attachments */\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: ChatbarSubmitPayload) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'surface' | 'outline' | 'classic' | 'ghost' | 'soft';\n /** Accent color for the control (matches TextArea) */\n color?: (typeof accentColors)[number];\n /** Optional radius override (matches TextArea) */\n radius?: (typeof radii)[number];\n /** Panel/material translucency flags (matches TextArea) */\n panelBackground?: 'solid' | 'translucent';\n material?: 'solid' | 'translucent';\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n /** Allow more than one file per pick, paste or drop */\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n /** Accepted types for pasted files. Replaces `accept` for paste when set. */\n pasteAccept?: string | string[];\n /** Clear message and attachments after submit */\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: ChatbarAttachmentRejection[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, multiple, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n\n /**\n * Optional API ref to control Chatbar imperatively without relying on DOM refs.\n * Provides methods to focus the textarea and open the file picker.\n */\n apiRef?: React.Ref<ChatbarApi>;\n\n /**\n * Messages that need an answer before the next message, such as `Notice` and `Confirmation`.\n * They stack in a column above the chatbar, in the order given, so put the one the next\n * message answers last, nearest the text. They sit outside the box: a button in a notice never\n * submits the message, and pressing one never collapses the chatbar.\n */\n notices?: React.ReactNode;\n /**\n * Short facts that stay true about the conversation, such as the model or the context left.\n * They sit below the chatbar, inset from its sides.\n */\n context?: React.ReactNode;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/** Imperative API for Chatbar.Root */\nexport interface ChatbarApi {\n /** Focus the textarea input */\n focusTextarea: () => void;\n /** Open the file picker dialog (respects accept/multiple). No-op when disabled or read-only. */\n openFilePicker: () => void;\n}\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n *\n * Attachments\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n * - Additions and rejections are announced through a polite live region.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n */\ninterface RootProps extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit' | 'color'>, ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n expandOn = 'both',\n minLines = 3,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n color,\n radius,\n panelBackground,\n material,\n width,\n maxWidth,\n attachments: attachmentsProp,\n defaultAttachments,\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n apiRef,\n onBlurCapture,\n notices,\n context,\n ...divProps\n } = props;\n const effectiveMaterial = material || panelBackground;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? valueProp : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? openProp : openUncontrolled;\n\n // Treat `attachments` as controlled if the prop is provided, even if its value is `undefined`.\n // This avoids switching between controlled and uncontrolled when a consumer sets\n // `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.\n const isAttachmentsControlled = 'attachments' in props;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(() => defaultAttachments ?? []);\n const attachments = React.useMemo(\n () => (isAttachmentsControlled ? (attachmentsProp ?? []) : attachmentsUncontrolled),\n [isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],\n );\n\n // `id` changes on every announcement so identical messages still update the live region\n const [announcement, setAnnouncementState] = React.useState({ text: '', id: 0 });\n const announce = React.useCallback((text: string) => setAnnouncementState((prev) => ({ text, id: prev.id + 1 })), []);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRootRef = useComposedRefs(forwardedRef, rootRef);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n const fileInputRef = React.useRef<HTMLInputElement>(null);\n\n // Blur-collapse guards: `pickerOpenRef` is true while the native dialog is open,\n // `pressGuardRef` covers the gap between pointerdown on a trigger and its click\n // (Safari blurs the textarea before the click fires).\n const pickerOpenRef = React.useRef(false);\n const pressGuardRef = React.useRef(false);\n const pressGuardTimerRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const pickerRef = React.useRef<{ patterns: string[]; multiple: boolean } | null>(null);\n\n const acceptKey = toArray(accept).join(',');\n const pasteAcceptKey = toArray(pasteAccept).join(',');\n const accepts = React.useMemo(() => toArray(acceptKey), [acceptKey]);\n const pasteAccepts = React.useMemo(() => (pasteAcceptKey ? toArray(pasteAcceptKey) : accepts), [pasteAcceptKey, accepts]);\n\n // Latest props/state for stable callbacks. Synced during render (not in an effect) so\n // child layout effects that call setOpen/setValue see this render's handlers.\n const snapshot = {\n value,\n attachments,\n accepts,\n pasteAccepts,\n multiple,\n maxAttachments,\n maxFileSize,\n disabled,\n readOnly,\n expandOn,\n isValueControlled,\n isOpenControlled,\n isAttachmentsControlled,\n onValueChange,\n onOpenChange,\n onAttachmentsChange,\n onAttachmentReject,\n onSubmit,\n };\n const latest = React.useRef(snapshot);\n // eslint-disable-next-line react-hooks/refs -- read only in callbacks/effects; see comment above\n latest.current = snapshot;\n\n // Attachments set during the current event, before Root re-renders. Cleared at the end\n // of the task so a controlled parent that rejects the change is not overridden.\n const pendingAttachmentsRef = React.useRef<ChatbarAttachment[] | null>(null);\n const getAttachments = React.useCallback(() => pendingAttachmentsRef.current ?? latest.current.attachments, []);\n\n const setOpen = React.useCallback((next: boolean) => {\n if (!latest.current.isOpenControlled) setOpenUncontrolled(next);\n latest.current.onOpenChange?.(next);\n }, []);\n\n const setValue = React.useCallback((next: string) => {\n if (!latest.current.isValueControlled) setValueUncontrolled(next);\n latest.current.onValueChange?.(next);\n }, []);\n\n const setAttachments = React.useCallback((next: ChatbarAttachment[]) => {\n // Back-to-back updates in one event must see each other\n pendingAttachmentsRef.current = next;\n queueMicrotask(() => {\n pendingAttachmentsRef.current = null;\n });\n if (!latest.current.isAttachmentsControlled) setAttachmentsUncontrolled(next);\n latest.current.onAttachmentsChange?.(next);\n }, []);\n\n // Object URLs Chatbar created and still owns\n const ownedUrlsRef = React.useRef<Set<string>>(new Set());\n\n const addFiles = React.useCallback(\n (files: File[], patterns: string[], multiple: boolean = latest.current.multiple): number => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly || files.length === 0) return 0;\n\n const current = getAttachments();\n const next: ChatbarAttachment[] = [];\n const rejected: ChatbarAttachmentRejection[] = [];\n const remainingSlots = typeof cfg.maxAttachments === 'number' ? Math.max(cfg.maxAttachments - current.length, 0) : Infinity;\n const perActionLimit = multiple ? Infinity : 1;\n\n for (const file of files) {\n if (next.length >= remainingSlots || next.length >= perActionLimit) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof cfg.maxFileSize === 'number' && file.size > cfg.maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, patterns)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const url = isImageLike(file.name, file.type) ? URL.createObjectURL(file) : undefined;\n if (url) ownedUrlsRef.current.add(url);\n next.push({ id: createAttachmentId(), name: file.name, size: file.size, type: file.type, file, url, status: 'idle' });\n }\n\n const messages: string[] = [];\n if (next.length > 0) {\n setAttachments(current.concat(next));\n if (cfg.expandOn !== 'none') setOpen(true);\n messages.push(`${plural(next.length, 'file')} attached.`);\n }\n if (rejected.length > 0) {\n cfg.onAttachmentReject?.(rejected);\n messages.push(`${plural(rejected.length, 'file')} could not be attached.`);\n }\n if (messages.length > 0) announce(messages.join(' '));\n return next.length;\n },\n [getAttachments, setAttachments, setOpen, announce],\n );\n\n const appendFiles = React.useCallback((files: File[]) => addFiles(files, latest.current.accepts), [addFiles]);\n const appendFilesFromPaste = React.useCallback((files: File[]) => addFiles(files, latest.current.pasteAccepts), [addFiles]);\n\n const removeAttachment = React.useCallback(\n (id: string) => {\n const current = getAttachments();\n const removed = current.find((a) => a.id === id);\n if (!removed) return;\n setAttachments(current.filter((a) => a.id !== id));\n announce(`Removed ${removed.name}.`);\n },\n [getAttachments, setAttachments, announce],\n );\n\n const submit = React.useCallback(\n (clear: boolean) => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly) return false;\n const current = getAttachments();\n if (!hasText(cfg.value) && current.length === 0) return false;\n const payload = { value: cfg.value, attachments: current };\n // Hand preview URLs to the consumer only when they leave the chatbar; URLs still\n // rendered here stay owned so removing them later revokes them\n if (clear && cfg.onSubmit) {\n for (const att of current) if (att.url) ownedUrlsRef.current.delete(att.url);\n }\n cfg.onSubmit?.(payload);\n if (clear) {\n setValue('');\n setAttachments([]);\n }\n return true;\n },\n [getAttachments, setValue, setAttachments],\n );\n\n // Revoke owned object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n if (owned.size === 0) return;\n const current = new Set(attachments.map((a) => a.url));\n for (const url of Array.from(owned)) {\n if (!current.has(url)) {\n URL.revokeObjectURL(url);\n owned.delete(url);\n }\n }\n }, [attachments]);\n\n // On unmount, revoke URLs only when Chatbar owns the attachment list;\n // controlled attachments may still be rendered by the parent.\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n return () => {\n if (latest.current.isAttachmentsControlled) return;\n for (const url of Array.from(owned)) URL.revokeObjectURL(url);\n owned.clear();\n };\n }, []);\n\n const openFilePicker = React.useCallback((options?: FilePickerOptions) => {\n const cfg = latest.current;\n const input = fileInputRef.current;\n // The picker guard takes over from the press guard\n clearTimeout(pressGuardTimerRef.current);\n pressGuardRef.current = false;\n if (!input || cfg.disabled || cfg.readOnly) return;\n const patterns = options?.accept != null ? toArray(options.accept) : cfg.accepts;\n const multiple = options?.multiple ?? cfg.multiple;\n pickerRef.current = { patterns, multiple };\n input.accept = patterns.join(',');\n input.multiple = multiple;\n pickerOpenRef.current = true;\n input.click();\n // Browsers block the dialog outside a user gesture; if the window kept focus,\n // no dialog opened and no focus/cancel/change event will clear the guard\n setTimeout(() => {\n if (document.hasFocus()) pickerOpenRef.current = false;\n }, 1000);\n }, []);\n\n const beginFilePickerPress = React.useCallback(() => {\n // On touch (notably iOS), the compatibility mousedown, blur and click arrive in later\n // tasks than pointerup, so hold the guard until the click or a timeout\n pressGuardRef.current = true;\n clearTimeout(pressGuardTimerRef.current);\n pressGuardTimerRef.current = setTimeout(() => {\n pressGuardRef.current = false;\n }, 800);\n }, []);\n\n React.useEffect(() => () => clearTimeout(pressGuardTimerRef.current), []);\n\n // Clear the picker guard when the dialog closes, whichever way it closes\n React.useEffect(() => {\n const input = fileInputRef.current;\n const reset = () => {\n pickerOpenRef.current = false;\n };\n window.addEventListener('focus', reset);\n input?.addEventListener('cancel', reset);\n return () => {\n window.removeEventListener('focus', reset);\n input?.removeEventListener('cancel', reset);\n };\n }, []);\n\n const handleFileInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const input = event.currentTarget;\n const files = Array.from(input.files ?? []);\n const picker = pickerRef.current;\n addFiles(files, picker?.patterns ?? latest.current.accepts, picker?.multiple);\n pickerOpenRef.current = false;\n pickerRef.current = null;\n // Reset so selecting the same file again still fires change\n input.value = '';\n },\n [addFiles],\n );\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n onBlurCapture?.(event);\n const cfg = latest.current;\n const rootEl = rootRef.current;\n if (!rootEl || cfg.expandOn === 'none') return;\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget && rootEl.contains(nextTarget)) return;\n if (pickerOpenRef.current || pressGuardRef.current) return;\n if (!hasText(cfg.value) && getAttachments().length === 0) setOpen(false);\n },\n [onBlurCapture, setOpen, getAttachments],\n );\n\n const handleDrop = React.useCallback((files: File[]) => {\n appendFiles(files);\n }, [appendFiles]);\n\n // Validation happens in addFiles so drop, paste and picker share one rule set\n const { getRootProps, isDragActive } = useDropzone({\n onDrop: handleDrop,\n // Drop any earlier message so it is not re-announced when the drag hint goes away\n onDragEnter: () => announce(''),\n noClick: true,\n noKeyboard: true,\n // Textarea handles paste itself; letting the dropzone see it attaches twice\n noPaste: true,\n disabled: !dropzone || disabled || readOnly,\n });\n const dragActive = dropzone && isDragActive;\n\n React.useImperativeHandle(\n apiRef,\n () => ({\n focusTextarea: () => textareaRef.current?.focus({ preventScroll: true }),\n openFilePicker: () => openFilePicker(),\n }),\n [openFilePicker],\n );\n\n // Click-to-focus: focus textarea when clicking non-interactive areas inside the container\n const handleContainerPointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (disabled) return;\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target;\n if (target instanceof Element && target.closest('button, [role=\"button\"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex=\"-1\"])')) return;\n event.preventDefault();\n textareaRef.current?.focus({ preventScroll: true });\n },\n [disabled],\n );\n\n const contextValue = React.useMemo<ChatbarContextValue>(\n () => ({\n open,\n setOpen,\n setValue,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n paste,\n clearOnSubmit,\n multiple,\n textareaRef,\n attachments,\n removeAttachment,\n submit,\n appendFiles,\n appendFilesFromPaste,\n openFilePicker,\n beginFilePickerPress,\n }),\n [\n open, setOpen, setValue, size, expandOn, minLines, maxLines, sendMode, disabled, readOnly, paste,\n clearOnSubmit, multiple, attachments, removeAttachment, submit, appendFiles, appendFilesFromPaste,\n openFilePicker, beginFilePickerPress,\n ],\n );\n\n return (\n <ChatbarContext.Provider value={contextValue}>\n <ChatbarValueContext.Provider value={value}>\n <LazyMotion features={domAnimation}>\n <MotionConfig reducedMotion=\"user\">\n <div\n {...divProps}\n ref={composedRootRef}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dragActive ? '' : undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n onBlurCapture={handleBlurCapture}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n tabIndex={-1}\n aria-hidden\n style={{ display: 'none' }}\n onChange={handleFileInputChange}\n />\n {notices ? (\n <div className=\"rt-ChatbarNotices\">\n <NoticeSizeContext.Provider value={size}>{notices}</NoticeSizeContext.Provider>\n </div>\n ) : null}\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', flex: '1 1 auto', minHeight: 0 }} onPointerDown={handleContainerPointerDown}>\n <m.div\n className={classNames('rt-ChatbarBox', `rt-variant-${variant ?? 'surface'}`)}\n style={{ position: 'relative' }}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n layout\n transition={LAYOUT_TRANSITION}\n >\n <m.div className=\"rt-ChatbarGrid\" layout=\"position\" transition={LAYOUT_TRANSITION}>\n {children}\n </m.div>\n {dragActive && (\n <div className=\"rt-ChatbarDropOverlay\" aria-hidden>\n <div className=\"rt-ChatbarDropContent\">\n <Text emphasis=\"medium\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </m.div>\n </div>\n {context ? (\n <Text as=\"div\" size={size === '3' ? '2' : '1'} emphasis=\"medium\" className=\"rt-ChatbarContext\">\n {context}\n </Text>\n ) : null}\n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {dragActive ? 'Drop files here to attach.' : <span key={announcement.id}>{announcement.text}</span>}\n </VisuallyHidden>\n </div>\n </MotionConfig>\n </LazyMotion>\n </ChatbarValueContext.Provider>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size' | 'rows' | 'value' | 'defaultValue'> {\n asChild?: boolean;\n /**\n * When true, pressing Enter submits (Shift+Enter inserts a newline).\n * Works with every `sendMode`. Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange.\n * - Auto-resizes between minLines and maxLines in a single layout effect, which\n * also opens the Chatbar when content overflows the compact height and\n * `expandOn` is `overflow` or `both`.\n * - Consumer handlers run first; calling `preventDefault` in `onKeyDown` or\n * `onPaste` skips the built-in submit or attach behavior.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onChange,\n onPaste,\n onKeyDown,\n onCompositionStart,\n onCompositionEnd,\n submitOnEnter = false,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n const { open, minLines, maxLines, expandOn, disabled, readOnly, setOpen, setValue, textareaRef, paste, appendFilesFromPaste, size, submit, clearOnSubmit } = ctx;\n const composedRef = useComposedRefs(forwardedRef, textareaRef);\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef(0);\n const paddingRef = React.useRef(0);\n const composingRef = React.useRef(false);\n\n const sizingRef = React.useRef({ open, minLines, maxLines });\n // Declared before the sizing effect so it runs first in the same commit\n useIsomorphicLayoutEffect(() => {\n sizingRef.current = { open, minLines, maxLines };\n }, [open, minLines, maxLines]);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n lineHeightRef.current = parseFloat(computedStyle.lineHeight) || 20;\n paddingRef.current = (parseFloat(computedStyle.paddingTop) || 0) + (parseFloat(computedStyle.paddingBottom) || 0);\n }, [textareaRef]);\n\n // Sizes `el` for the given open state; caller must have set height to 'auto' first\n const applyHeight = React.useCallback((el: HTMLTextAreaElement, isOpen: boolean) => {\n const { minLines: min, maxLines: max } = sizingRef.current;\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n const minHeight = Math.ceil((isOpen ? min : 1) * lineHeight) + padding;\n const maxHeight = Math.ceil((isOpen ? max : 1) * lineHeight) + padding;\n const contentHeight = Math.max(el.scrollHeight, minHeight);\n el.style.height = `${Math.min(contentHeight, maxHeight)}px`;\n const overflowing = contentHeight > maxHeight;\n el.style.overflowY = overflowing ? 'auto' : 'hidden';\n el.style.maxHeight = overflowing ? `${maxHeight}px` : 'none';\n }, []);\n\n // Typography depends on size\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n }, [recomputeMetrics, size]);\n\n // Single place for sizing and overflow auto-open: one height reset, one scrollHeight read\n useIsomorphicLayoutEffect(() => {\n const el = textareaRef.current;\n if (!el) return;\n if (lineHeightRef.current === 0) recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n let isOpen = open;\n if (!open && (expandOn === 'overflow' || expandOn === 'both')) {\n const compactHeight = Math.ceil(lineHeightRef.current) + paddingRef.current;\n if (el.scrollHeight > compactHeight + 1) {\n isOpen = true;\n setOpen(true);\n }\n }\n applyHeight(el, isOpen);\n });\n }, [value, open, expandOn, minLines, maxLines, size, setOpen, textareaRef, recomputeMetrics, applyHeight]);\n\n // Width changes re-wrap text; re-measure only when the width actually changes\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevWidth = -1;\n const ro = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width === prevWidth) return;\n const first = prevWidth === -1;\n prevWidth = width;\n if (first) return;\n recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n applyHeight(el, sizingRef.current.open);\n });\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, applyHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onFocus?.(event);\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n },\n [setValue, onChange],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onPaste?.(event);\n if (event.defaultPrevented || !paste || disabled || readOnly) return;\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === 'file')\n .map((item) => item.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length === 0) return;\n // Suppress the filename/text representation only when a file was actually attached\n if (appendFilesFromPaste(files) > 0) event.preventDefault();\n },\n [paste, disabled, readOnly, onPaste, appendFilesFromPaste],\n );\n\n const handleCompositionStart = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = true;\n onCompositionStart?.(event);\n },\n [onCompositionStart],\n );\n\n const handleCompositionEnd = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = false;\n onCompositionEnd?.(event);\n },\n [onCompositionEnd],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !submitOnEnter) return;\n if (event.key !== 'Enter' || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;\n // Safari fires the IME-confirming Enter after compositionend with keyCode 229\n if (composingRef.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n // Plain Enter never inserts a newline when submitOnEnter is on, even with nothing to send\n event.preventDefault();\n submit(clearOnSubmit);\n },\n [submitOnEnter, onKeyDown, submit, clearOnSubmit],\n );\n\n const Comp = asChild ? Slot : 'textarea';\n return (\n <m.div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)} layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp\n {...textareaProps}\n ref={composedRef}\n className=\"rt-ChatbarInput\"\n value={value}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </m.div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineStart', className)}>\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineEnd', className)}>\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n * `Chatbar.Item`s passed as children follow the attachments in the same row.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n /** `Chatbar.Item`s: things the message refers to that are not files. */\n children?: React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>((props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const hasItems = React.Children.toArray(children).length > 0;\n if (ctx.attachments.length === 0 && !hasItems && !forceMount) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarAttachmentsRow', className)} role=\"list\" aria-label={divProps['aria-label'] ?? 'Attachments'}>\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"2\" minWidth=\"fit-content\">\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n {children}\n </Flex>\n </ScrollArea>\n </Comp>\n </m.div>\n );\n});\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/**\n * Moves focus off a pill that is about to unmount, to the next pill's remove\n * button, the previous one's, or the text, so keyboard users are not dropped\n * to <body>.\n */\nfunction moveFocusOffPill(button: HTMLButtonElement, textareaRef: React.RefObject<HTMLTextAreaElement | null>) {\n const pill = button.closest('[role=\"listitem\"]');\n const pills = pill?.parentElement ? Array.from(pill.parentElement.children) : [];\n const index = pill ? pills.indexOf(pill) : -1;\n const neighbour = pills[index + 1] ?? pills[index - 1];\n const nextButton = neighbour?.querySelector<HTMLButtonElement>('.rt-ChatbarItemRemove');\n if (nextButton) nextButton.focus();\n else textareaRef.current?.focus({ preventScroll: true });\n}\n\n/** The pill an attachment and an item share: a lead tile, a label and \u00D7. */\nconst Pill: React.FC<{\n lead: React.ReactNode;\n leadKind: 'image' | 'icon';\n label: React.ReactNode;\n /** Read after the label by screen readers only, e.g. a file's size. */\n detail?: string;\n removeLabel: string;\n onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n}> = ({ lead, leadKind, label, detail, removeLabel, onRemove }) => {\n const ctx = useChatbarContext();\n return (\n <>\n <span className=\"rt-ChatbarItemLead\" data-kind={leadKind} aria-hidden>\n {lead}\n </span>\n <Text className=\"rt-ChatbarItemLabel\" size={ctx.size} truncate>\n {label}\n {detail ? <VisuallyHidden>, {detail}</VisuallyHidden> : null}\n </Text>\n {onRemove && (\n <IconButton className=\"rt-ChatbarItemRemove\" aria-label={removeLabel} size=\"1\" variant=\"ghost\" color=\"gray\" onClick={onRemove}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst STATUS_LABEL: Partial<Record<AttachmentStatus, string>> = { uploading: 'uploading', error: 'failed to upload' };\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : 'div';\n const isImage = !!attachment.url && isImageLike(attachment.name, attachment.type);\n const sizeLabel = `${Math.ceil(attachment.size / 1024)} KB`;\n const statusLabel = attachment.status ? STATUS_LABEL[attachment.status] : undefined;\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = (event: React.MouseEvent<HTMLButtonElement>) => {\n moveFocusOffPill(event.currentTarget, ctx.textareaRef);\n ctx.removeAttachment(attachment.id);\n };\n\n const lead =\n attachment.status === 'uploading' ? (\n <Spinner size=\"1\" />\n ) : isImage ? (\n <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" />\n ) : (\n <FileTextIcon />\n );\n\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames(children ? 'rt-ChatbarAttachment' : 'rt-ChatbarAttachment rt-ChatbarItem', className)}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n data-status={attachment.status}\n title={attachment.name}\n >\n {children ?? (\n <Pill\n lead={lead}\n leadKind={isImage && attachment.status !== 'uploading' ? 'image' : 'icon'}\n label={attachment.name}\n detail={statusLabel ? `${sizeLabel}, ${statusLabel}` : sizeLabel}\n removeLabel={`Remove ${attachment.name}`}\n onRemove={locked ? undefined : handleRemove}\n />\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\n/**\n * Something the message refers to that is not a file: a scene object, a\n * picked mode, a selection. The same pill as an attachment, placed in\n * `Chatbar.AttachmentsRow` as a child. The app owns the list, so removing one\n * calls `onRemove` and nothing else; leave it out for a pill that cannot be\n * removed.\n */\ninterface ItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children' | 'color'> {\n /** The label. Also names the remove button: \"Remove {label}\". */\n children: string;\n /** Drawn in the lead tile, tinted with `color`. */\n icon?: React.ReactNode;\n /** A thumbnail for the lead tile, in place of the icon. */\n image?: string;\n /** Tint of the icon tile. Defaults to gray. */\n color?: (typeof accentColors)[number];\n onRemove?: () => void;\n /** Overrides the remove button's label. */\n removeLabel?: string;\n}\n\nconst Item = React.forwardRef<HTMLDivElement, ItemProps>((props, forwardedRef) => {\n const { children, icon, image, color, onRemove, removeLabel, className, ...divProps } = props;\n const ctx = useChatbarContext();\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = onRemove\n ? (event: React.MouseEvent<HTMLButtonElement>) => {\n moveFocusOffPill(event.currentTarget, ctx.textareaRef);\n onRemove();\n }\n : undefined;\n\n return (\n <div\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarItem', className)}\n role=\"listitem\"\n data-accent-color={image ? undefined : (color ?? 'gray')}\n title={children}\n >\n <Pill\n lead={image ? <img className=\"rt-ChatbarAttachmentImage\" src={image} alt=\"\" /> : icon}\n leadKind={image ? 'image' : 'icon'}\n label={children}\n removeLabel={removeLabel ?? `Remove ${children}`}\n onRemove={locked ? undefined : handleRemove}\n />\n </div>\n );\n});\nItem.displayName = 'Chatbar.Item';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n /** Overrides Root `accept` for files chosen through this trigger */\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>((props, forwardedRef) => {\n const { asChild, accept, multiple, disabled: disabledProp, onPointerDown, onClick, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const disabled = disabledProp || ctx.disabled || ctx.readOnly;\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n {...buttonProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachTrigger', buttonProps.className)}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n disabled={disabled}\n onPointerDown={(event: React.PointerEvent<HTMLButtonElement>) => {\n onPointerDown?.(event);\n if (!disabled && !event.defaultPrevented) ctx.beginFilePickerPress();\n }}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (disabled || event.defaultPrevented) return;\n ctx.openFilePicker({ accept, multiple });\n }}\n />\n );\n});\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\n\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRow', className)}>\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n </m.div>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\ntype RowSlotProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst RowStart = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowStart', className)} />;\n});\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowEnd', className)} />;\n});\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ntype SendStatus = 'ready' | 'submitted' | 'streaming' | 'error';\n\ntype SendProps = Omit<IconButtonProps, 'aria-label' | 'aria-labelledby'> & {\n /** Optional override for accessible name. Defaults to \"Send\". */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n asChild?: boolean;\n /** Clear message and attachments after sending. Defaults to Root `clearOnSubmit`. */\n clearOnSend?: boolean;\n /**\n * What the button means. `ready` sends. While a reply is `submitted` or `streaming` and the\n * box is empty, the button STOPS the reply (`onStop`); with a draft in the box it still sends,\n * and the app decides whether sending interrupts the reply. After an `error`, an empty box\n * makes it RETRY (`onRetry`). Default `ready`.\n */\n status?: SendStatus;\n /** Called when the button is pressed to stop a reply. */\n onStop?: () => void;\n /** Called when the button is pressed to retry after an error. */\n onRetry?: () => void;\n /** Accessible name while it stops. Default \"Stop\". */\n stopLabel?: string;\n /** Accessible name while it retries. Default \"Retry\". */\n retryLabel?: string;\n /** Glyph while it stops. Defaults to a square, or a spinner while `submitted`. */\n stopIcon?: React.ReactNode;\n /** Glyph while it retries. */\n retryIcon?: React.ReactNode;\n};\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend,\n disabled,\n children,\n style,\n className,\n size: sizeProp,\n variant: variantProp,\n tabIndex,\n onClick,\n status = 'ready',\n onStop,\n onRetry,\n stopLabel = 'Stop',\n retryLabel = 'Retry',\n stopIcon,\n retryIcon,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n\n const hasContent = hasText(value) || ctx.attachments.length > 0;\n const running = status === 'submitted' || status === 'streaming';\n const mode: 'send' | 'stop' | 'retry' = hasContent ? 'send' : running ? 'stop' : status === 'error' ? 'retry' : 'send';\n\n if (ctx.sendMode === 'never' && mode === 'send') return null;\n\n const visible = mode !== 'send' || ctx.sendMode === 'always' || hasContent;\n const inactive = mode === 'send' ? disabled || ctx.disabled || ctx.readOnly || !hasContent : disabled || ctx.disabled;\n\n const sendName = ariaLabel ?? 'Send';\n const labelProps: { 'aria-label': string } | { 'aria-labelledby': string } =\n mode === 'stop' ? { 'aria-label': stopLabel } : mode === 'retry' ? { 'aria-label': retryLabel } : ariaLabelledby ? { 'aria-labelledby': ariaLabelledby } : { 'aria-label': sendName };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || inactive) return;\n if (mode === 'stop') {\n onStop?.();\n return;\n }\n if (mode === 'retry') {\n onRetry?.();\n return;\n }\n const clear = clearOnSend ?? ctx.clearOnSubmit;\n // Clearing hides and disables this button; keep keyboard focus in the composer\n if (ctx.submit(clear) && clear) ctx.textareaRef.current?.focus({ preventScroll: true });\n };\n\n const glyph =\n mode === 'stop' ? (\n stopIcon ?? (status === 'submitted' ? <Spinner size={ctx.size} /> : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\" />\n </svg>\n ))\n ) : mode === 'retry' ? (\n retryIcon ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n )\n ) : (\n children ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n )\n );\n\n return (\n <IconButton\n {...buttonProps}\n ref={forwardedRef}\n size={sizeProp ?? ctx.size}\n variant={variantProp ?? (ctx.open || mode !== 'send' ? 'solid' : 'ghost')}\n disabled={inactive}\n className={classNames('rt-ChatbarSend', className)}\n style={{ opacity: visible ? 1 : 0, pointerEvents: visible ? undefined : 'none', ...style }}\n // Hidden Send must not be reachable by keyboard or announced\n aria-hidden={visible ? undefined : true}\n tabIndex={visible ? tabIndex : -1}\n asChild={asChild}\n onClick={handleClick}\n data-status={status}\n data-mode={mode}\n {...labelProps}\n >\n {glyph}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport { Root, Textarea, InlineStart, InlineEnd, AttachmentsRow, Attachment, Item, AttachTrigger, Row, RowStart, RowEnd, Send };\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n InlineSlotProps as ChatbarInlineSlotProps,\n AttachmentsRowProps as ChatbarAttachmentsRowProps,\n AttachmentProps as ChatbarAttachmentProps,\n ItemProps as ChatbarItemProps,\n AttachTriggerProps as ChatbarAttachTriggerProps,\n RowProps as ChatbarRowProps,\n RowSlotProps as ChatbarRowSlotProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n ChatbarAttachmentRejection,\n ChatbarRejectReason,\n ChatbarSubmitPayload,\n Attachm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C1B,EAIN,OACE,gBAAC6L,GAAA,CACE,GAAGkB,EACJ,IAAKlN,EACL,KAAMwN,GAAYlP,EAAI,KACtB,QAASmP,IAAgBnP,EAAI,MAAQ+P,IAAS,OAAS,QAAU,SACjE,SAAUE,EACV,UAAW5G,EAAW,iBAAkB1H,CAAS,EACjD,MAAO,CAAE,QAASqO,EAAU,EAAI,EAAG,cAAeA,EAAU,OAAY,OAAQ,GAAGpO,CAAM,EAEzF,cAAaoO,EAAU,OAAY,GACnC,SAAUA,EAAUZ,EAAW,GAC/B,QAASzF,EACT,QAASwG,EACT,cAAad,EACb,YAAWU,EACV,GAAGG,GAEHE,CACH,CAEJ,CAAC,EACDpB,GAAK,YAAc",
|
|
6
|
-
"names": ["chatbar_exports", "__export", "AttachTrigger", "Attachment", "AttachmentsRow", "InlineEnd", "InlineStart", "Item", "Root", "Row", "RowEnd", "RowStart", "Send", "Textarea", "React", "classNames", "LazyMotion", "MotionConfig", "domAnimation", "m", "useComposedRefs", "useDropzone", "useIsomorphicLayoutEffect", "withoutPlaceholder", "el", "measure", "placeholder", "LAYOUT_TRANSITION", "ChatbarContext", "ChatbarValueContext", "useChatbarContext", "ctx", "toArray", "val", "s", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "IMAGE_EXT_RE", "isImageLike", "hasText", "value", "plural", "n", "word", "attachmentCounter", "createAttachmentId", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "color", "radius", "panelBackground", "material", "width", "maxWidth", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "apiRef", "onBlurCapture", "notices", "context", "divProps", "effectiveMaterial", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "announcement", "setAnnouncementState", "announce", "text", "prev", "rootRef", "composedRootRef", "useComposedRefs", "textareaRef", "fileInputRef", "pickerOpenRef", "pressGuardRef", "pressGuardTimerRef", "pickerRef", "acceptKey", "pasteAcceptKey", "accepts", "pasteAccepts", "snapshot", "latest", "pendingAttachmentsRef", "getAttachments", "setOpen", "next", "setValue", "setAttachments", "ownedUrlsRef", "addFiles", "files", "cfg", "current", "rejected", "remainingSlots", "perActionLimit", "url", "messages", "appendFiles", "appendFilesFromPaste", "removeAttachment", "id", "removed", "a", "submit", "clear", "payload", "att", "owned", "openFilePicker", "options", "input", "beginFilePickerPress", "reset", "handleFileInputChange", "event", "picker", "handleBlurCapture", "rootEl", "nextTarget", "handleDrop", "getRootProps", "isDragActive", "useDropzone", "dragActive", "handleContainerPointerDown", "target", "contextValue", "LazyMotion", "domAnimation", "MotionConfig", "classNames", "NoticeSizeContext", "m", "Text", "VisuallyHidden", "Textarea", "asChild", "onFocus", "onChange", "onPaste", "onKeyDown", "onCompositionStart", "onCompositionEnd", "submitOnEnter", "textareaProps", "composedRef", "lineHeightRef", "paddingRef", "composingRef", "sizingRef", "recomputeMetrics", "computedStyle", "applyHeight", "isOpen", "min", "max", "lineHeight", "padding", "minHeight", "maxHeight", "contentHeight", "overflowing", "compactHeight", "prevWidth", "ro", "entries", "first", "handleFocus", "handleChange", "handlePaste", "item", "f", "handleCompositionStart", "handleCompositionEnd", "handleKeyDown", "Comp", "Slot", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "hasItems", "ScrollArea", "Flex", "Attachment", "moveFocusOffPill", "button", "pill", "pills", "index", "nextButton", "Pill", "lead", "leadKind", "label", "detail", "removeLabel", "onRemove", "IconButton", "CloseIcon", "STATUS_LABEL", "attachment", "isImage", "sizeLabel", "statusLabel", "locked", "handleRemove", "Spinner", "FileTextIcon", "Item", "icon", "image", "AttachTrigger", "disabledProp", "onPointerDown", "onClick", "buttonProps", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "sizeProp", "variantProp", "tabIndex", "status", "onStop", "onRetry", "stopLabel", "retryLabel", "stopIcon", "retryIcon", "ariaLabel", "ariaLabelledby", "hasContent", "mode", "visible", "inactive", "labelProps", "handleClick", "glyph"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-KRJTW535.js";import{a as e}from"./chunk-NZJGC6ZW.js";import{d as a}from"./chunk-ZNK6AH2G.js";var t=["1","2","3","4"],s=["ghost","surface","classic"],o=["solid","soft","surface","outline"],n=["solid","translucent"],u={...e,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:s,default:"surface"},src:{type:"string"},fallback:{type:"ReactNode",required:!0},name:{type:"string",required:!0},description:{type:"string"},avatarVariant:{type:"enum",values:o,default:"soft"},...r,...a,panelBackground:{type:"enum",values:n,default:void 0},flush:{type:"boolean",default:!1}};export{u as a};
|
|
2
|
-
//# sourceMappingURL=chunk-4WVNMGI5.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/user-card.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColorPropDef } from '../props/color.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 = ['ghost', 'surface', 'classic'] as const;\nconst avatarVariants = ['solid', 'soft', 'surface', 'outline'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst userCardPropDefs = {\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\n // Content props\n src: { type: 'string' },\n fallback: { type: 'ReactNode', required: true },\n name: { type: 'string', required: true },\n description: { type: 'string' },\n\n // Avatar styling\n avatarVariant: { type: 'enum', values: avatarVariants, default: 'soft' },\n ...radiusPropDef,\n\n // Card styling\n ...accentColorPropDef,\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n src: PropDef<string>;\n fallback: PropDef<React.ReactNode>;\n name: PropDef<string>;\n description: PropDef<string>;\n avatarVariant: PropDef<(typeof avatarVariants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { userCardPropDefs };\n"],
|
|
5
|
-
"mappings": "wHAMA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,QAAS,UAAW,SAAS,EACzCC,EAAiB,CAAC,QAAS,OAAQ,UAAW,SAAS,EACvDC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAmB,CACvB,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EAGvF,IAAK,CAAE,KAAM,QAAS,EACtB,SAAU,CAAE,KAAM,YAAa,SAAU,EAAK,EAC9C,KAAM,CAAE,KAAM,SAAU,SAAU,EAAK,EACvC,YAAa,CAAE,KAAM,QAAS,EAG9B,cAAe,CAAE,KAAM,OAAQ,OAAQC,EAAgB,QAAS,MAAO,EACvE,GAAGI,EAGH,GAAGC,EACH,gBAAiB,CAAE,KAAM,OAAQ,OAAQJ,EAAkB,QAAS,MAAU,EAC9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
|
|
6
|
-
"names": ["sizes", "variants", "avatarVariants", "panelBackgrounds", "userCardPropDefs", "asChildPropDef", "radiusPropDef", "accentColorPropDef"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/app-bar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Card } from './card.js';\nimport { Flex } from './flex.js';\nimport { Heading } from './heading.js';\n\nimport type { CardProps } from './card.js';\nimport type { FlexProps } from './flex.js';\n\n// ============================================================================\n// AppBar Root\n// ============================================================================\n\ntype AppBarRootElement = React.ElementRef<'div'>;\ntype Anchor = 'top' | 'bottom' | 'left' | 'right';\ntype SpaceScale = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';\n\ninterface AppBarRootProps extends Omit<CardProps, 'asChild'> {\n /**\n * Which edge to anchor to. Sets position: sticky and the appropriate edge.\n * @default \"top\"\n */\n anchor?: Anchor;\n /**\n * Floating mode adds margin from edges for a detached look with absolute positioning.\n * When false (default), uses inset mode with negative margins to go edge-to-edge inside Cards.\n * @default false\n */\n floating?: boolean;\n /**\n * Margin offset from edges when floating. Uses space scale values.\n * @default \"2\"\n */\n offset?: SpaceScale;\n}\n\n/**\n * An app bar: the band anchored to one edge of a pane, with left, center and right sections\n * and a title. It publishes its height (or width) to its parent as `--rt-app-bar-height`\n * (`--rt-app-bar-width`) so content can pad itself clear of it.\n *\n * This component was called `Toolbar` until 0.11.0. It is not a `role=\"toolbar\"`: for a row of\n * controls with one tab stop and arrow-key navigation, use `Toolbar`.\n */\nconst AppBarRoot = React.forwardRef<AppBarRootElement, AppBarRootProps>(\n (props, forwardedRef) => {\n const {\n anchor = 'top',\n floating = false,\n offset = '2',\n size = '1',\n variant = 'ghost',\n material,\n className,\n style,\n children,\n ...restProps\n } = props;\n\n const isHorizontal = anchor === 'top' || anchor === 'bottom';\n const internalRef = React.useRef<HTMLDivElement>(null);\n\n // Merge refs\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (internalRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n },\n [forwardedRef],\n );\n\n // Expose height/width as CSS variable on parent element\n React.useEffect(() => {\n const element = internalRef.current;\n if (!element) return;\n\n const parent = element.parentElement;\n if (!parent) return;\n\n const update = () => {\n let dimension = isHorizontal ? element.offsetHeight : element.offsetWidth;\n\n // For floating mode, include the margin in the total space\n if (floating) {\n const computedStyle = getComputedStyle(element);\n const margin = parseFloat(computedStyle.marginTop) || 0;\n dimension += margin * 2;\n }\n\n // `--rt-toolbar-*` are the names this bar published while it was called Toolbar.\n // They are still written so existing layouts keep their offset; prefer `--rt-app-bar-*`.\n if (isHorizontal) {\n parent.style.setProperty('--rt-app-bar-height', `${dimension}px`);\n parent.style.setProperty('--rt-toolbar-height', `${dimension}px`);\n } else {\n parent.style.setProperty('--rt-app-bar-width', `${dimension}px`);\n parent.style.setProperty('--rt-toolbar-width', `${dimension}px`);\n }\n };\n\n update();\n\n const resizeObserver = new ResizeObserver(update);\n resizeObserver.observe(element);\n\n return () => resizeObserver.disconnect();\n }, [isHorizontal, floating]);\n\n const computedStyle = floating\n ? { margin: `var(--space-${offset})`, ...style }\n : style;\n\n return (\n <Card\n ref={mergedRef}\n size={size}\n variant={variant}\n material={material}\n data-anchor={anchor}\n data-floating={floating || undefined}\n className={classNames('rt-AppBar', className)}\n style={computedStyle}\n {...restProps}\n >\n <div className=\"rt-AppBarInner\">\n {children}\n </div>\n </Card>\n );\n },\n);\nAppBarRoot.displayName = 'AppBar.Root';\n\n// ============================================================================\n// AppBar Left (for horizontal) / Start (alias)\n// ============================================================================\n\ntype AppBarSectionElement = React.ElementRef<'div'>;\ntype AppBarSectionProps = FlexProps;\n\nconst AppBarLeft = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarLeft', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarLeft.displayName = 'AppBar.Left';\n\n// ============================================================================\n// AppBar Center\n// ============================================================================\n\nconst AppBarCenter = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', justify = 'center', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n justify={justify}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarCenter', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarCenter.displayName = 'AppBar.Center';\n\n// ============================================================================\n// AppBar Right (for horizontal) / End (alias)\n// ============================================================================\n\nconst AppBarRight = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', justify = 'end', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n justify={justify}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarRight', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarRight.displayName = 'AppBar.Right';\n\n// ============================================================================\n// AppBar Title\n// ============================================================================\n\ntype AppBarTitleElement = React.ElementRef<typeof Heading>;\ntype AppBarTitleProps = React.ComponentPropsWithoutRef<typeof Heading>;\n\nconst AppBarTitle = React.forwardRef<AppBarTitleElement, AppBarTitleProps>(\n ({ className, size = '2', weight = 'medium', truncate = true, children, ...props }, forwardedRef) => (\n <Heading\n ref={forwardedRef}\n size={size}\n weight={weight}\n truncate={truncate}\n className={classNames('rt-AppBarTitle', className)}\n {...props}\n >\n {children}\n </Heading>\n ),\n);\nAppBarTitle.displayName = 'AppBar.Title';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nconst AppBar = AppBarRoot as typeof AppBarRoot & {\n Root: typeof AppBarRoot;\n Left: typeof AppBarLeft;\n Center: typeof AppBarCenter;\n Right: typeof AppBarRight;\n Title: typeof AppBarTitle;\n};\n\nAppBar.Root = AppBarRoot;\nAppBar.Left = AppBarLeft;\nAppBar.Center = AppBarCenter;\nAppBar.Right = AppBarRight;\nAppBar.Title = AppBarTitle;\n\nexport {\n AppBar,\n AppBarRoot as Root,\n AppBarLeft as Left,\n AppBarCenter as Center,\n AppBarRight as Right,\n AppBarTitle as Title,\n};\nexport type {\n AppBarRootProps as RootProps,\n AppBarSectionProps as LeftProps,\n AppBarSectionProps as CenterProps,\n AppBarSectionProps as RightProps,\n AppBarTitleProps as TitleProps,\n};\n"],
|
|
5
|
-
"mappings": "wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aA4CvB,IAAMC,EAAmB,aACvB,CAACC,EAAOC,IAAiB,CACvB,GAAM,CACJ,OAAAC,EAAS,MACT,SAAAC,EAAW,GACX,OAAAC,EAAS,IACT,KAAAC,EAAO,IACP,QAAAC,EAAU,QACV,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAeV,IAAW,OAASA,IAAW,SAC9CW,EAAoB,SAAuB,IAAI,EAG/CC,EAAkB,cACrBC,GAAgC,CAC9BF,EAA8D,QAAUE,EACrE,OAAOd,GAAiB,WAC1BA,EAAac,CAAI,EACRd,IACTA,EAAa,QAAUc,EAE3B,EACA,CAACd,CAAY,CACf,EAGM,YAAU,IAAM,CACpB,IAAMe,EAAUH,EAAY,QAC5B,GAAI,CAACG,EAAS,OAEd,IAAMC,EAASD,EAAQ,cACvB,GAAI,CAACC,EAAQ,OAEb,IAAMC,EAAS,IAAM,CACnB,IAAIC,EAAYP,EAAeI,EAAQ,aAAeA,EAAQ,YAG9D,GAAIb,EAAU,CACZ,IAAMiB,EAAgB,iBAAiBJ,CAAO,EACxCK,EAAS,WAAWD,EAAc,SAAS,GAAK,EACtDD,GAAaE,EAAS,CACxB,CAIIT,GACFK,EAAO,MAAM,YAA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GAEHU,CACH,CAEJ,EACAmB,EAAa,YAAc,gBAM3B,IAAME,EAAoB,aACxB,CAAC,CAAE,IAAAL,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAG,EAAU,MAAO,UAAAtB,EAAW,SAAAE,EAAU,GAAGV,CAAM,EAAGC,IAChF,gBAAC2B,EAAA,CACC,IAAK3B,EACL,MAAO0B,EACP,QAASG,EACT,IAAKJ,EACL,UAAWF,EAAW,mBAAoB,iBAAkBhB,CAAS,EACpE,GAAGR,GAEHU,CACH,CAEJ,EACAqB,EAAY,YAAc,eAS1B,IAAMC,EAAoB,aACxB,CAAC,CAAE,UAAAxB,EAAW,KAAAH,EAAO,IAAK,OAAA4B,EAAS,SAAU,SAAAC,EAAW,GAAM,SAAAxB,EAAU,GAAGV,CAAM,EAAGC,IAClF,gBAACkC,EAAA,CACC,IAAKlC,EACL,KAAMI,EACN,OAAQ4B,EACR,SAAUC,EACV,UAAWV,EAAW,iBAAkBhB,CAAS,EAChD,GAAGR,GAEHU,CACH,CAEJ,EACAsB,EAAY,YAAc,eAM1B,IAAMI,EAASrC,EAQfqC,EAAO,KAAOrC,EACdqC,EAAO,KAAOX,EACdW,EAAO,OAASP,EAChBO,EAAO,MAAQL,EACfK,EAAO,MAAQJ",
|
|
6
|
-
"names": ["React", "classNames", "AppBarRoot", "props", "forwardedRef", "anchor", "floating", "offset", "size", "variant", "material", "className", "style", "children", "restProps", "isHorizontal", "internalRef", "mergedRef", "node", "element", "parent", "update", "dimension", "computedStyle", "margin", "resizeObserver", "Card", "classNames", "AppBarLeft", "gap", "align", "Flex", "AppBarCenter", "justify", "AppBarRight", "AppBarTitle", "weight", "truncate", "Heading", "AppBar"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-HAGKI7NA.js";import{a as s}from"./chunk-NZJGC6ZW.js";import{c as o}from"./chunk-ZNK6AH2G.js";var r=["1","2","3","4","5","6","7","8","9","10","11","12"],a=["outline","classic","ghost","soft","surface"],t=["solid","translucent"],u={...s,size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:a,default:"surface"},panelBackground:{type:"enum",values:t,default:void 0},...o,columns:{...e.columns,default:"repeat(auto-fit, minmax(200px, 1fr))"},gap:{...e.gap,default:"4"}};export{u as a};
|
|
2
|
-
//# sourceMappingURL=chunk-667BKCUG.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/checkbox-cards.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.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', '6', '7', '8', '9', '10', '11', '12'] as const;\nconst variants = ['outline', 'classic', 'ghost', 'soft', 'surface'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst checkboxCardsRootPropDefs = {\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 columns: { ...gridPropDefs.columns, default: 'repeat(auto-fit, minmax(200px, 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 { checkboxCardsRootPropDefs };\n"],
|
|
5
|
-
"mappings": "wHAMA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACtEC,EAAW,CAAC,UAAW,UAAW,QAAS,OAAQ,SAAS,EAC5DC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAA4B,CAChC,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQJ,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,GAAGG,EACH,QAAS,CAAE,GAAGC,EAAa,QAAS,QAAS,sCAAuC,EACpF,IAAK,CAAE,GAAGA,EAAa,IAAK,QAAS,GAAI,CAC3C",
|
|
6
|
-
"names": ["sizes", "variants", "panelBackgrounds", "checkboxCardsRootPropDefs", "asChildPropDef", "colorPropDef", "gridPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-VX44UTQ5.js";import{a as e}from"./chunk-ERGJN7FJ.js";import{a as o}from"./chunk-NZJGC6ZW.js";var p=["1","2","3","4"],r=["solid","translucent"],f={...o,size:{type:"enum",className:"rt-r-size",values:p,default:"2",responsive:!0},panelBackground:{type:"enum",values:r,default:void 0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...t};export{f as a};
|
|
2
|
-
//# sourceMappingURL=chunk-72AHPGPN.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/popover.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n"],
|
|
5
|
-
"mappings": "wHAMA,IAAMA,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAyB,CAC7B,GAAGC,EACH,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQH,EACR,QAAS,IACT,WAAY,EACd,EACA,gBAAiB,CAAE,KAAM,OAAQ,OAAQC,EAAkB,QAAS,MAAU,EAC9E,MAAOG,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL",
|
|
6
|
-
"names": ["contentSizes", "panelBackgrounds", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m,b as T,c as N}from"./chunk-EBQZ3Z22.js";import{b as h,c as I}from"./chunk-IX5HIHVI.js";import{b as v,c as y}from"./chunk-VICP2RNA.js";import{a as g}from"./chunk-GSTOGDAJ.js";import{a as f}from"./chunk-6FLLFCBU.js";import{a as A}from"./chunk-OS3FCYZY.js";var M={};A(M,{Content:()=>w,Group:()=>G,Item:()=>E,Label:()=>L,Root:()=>x,Separator:()=>D,Trigger:()=>b});import*as e from"react";import c from"classnames";import{Select as a,ScrollArea as S}from"radix-ui";var u=e.createContext({}),x=t=>{let{children:o,size:r=m.size.default,...l}=t;return e.createElement(a.Root,{...l},e.createElement(u.Provider,{value:e.useMemo(()=>({size:r}),[r])},o))};x.displayName="Select.Root";var b=e.forwardRef((t,o)=>{let r=e.useContext(u),{children:l,className:i,color:n,radius:P,placeholder:d,error:p,loading:s,disabled:R,readOnly:C,...V}=f({size:r?.size,...t},{size:m.size},T,g),{panelBackground:z}=t,k=e.useMemo(()=>({"aria-invalid":p||void 0,"aria-busy":s||void 0,"aria-disabled":R||void 0,"aria-readonly":C||void 0}),[p,s,R,C]);return e.createElement(a.Trigger,{asChild:!0},e.createElement("button",{"data-accent-color":n,"data-radius":P,"data-panel-background":z,"data-error":p,"data-loading":s,...V,...k,ref:o,className:c("rt-reset","rt-SelectTrigger",i)},e.createElement("span",{className:"rt-SelectTriggerInner"},e.createElement(a.Value,{placeholder:d},l)),e.createElement(a.Icon,{asChild:!0},s?e.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",className:"rt-SelectLoadingIconCircle"}))):e.createElement(I,{className:"rt-SelectIcon"}))))});b.displayName="Select.Trigger";var w=e.forwardRef((t,o)=>{let r=e.useContext(u),{className:l,children:i,color:n,container:P,...d}=f({size:r?.size,...t},{size:m.size},N),p=v(),s=n||p.accentColor;return e.createElement(a.Portal,{container:P},e.createElement(y,{asChild:!0},e.createElement(a.Content,{"data-accent-color":s,sideOffset:4,...d,asChild:!1,ref:o,className:c("rt-PopperContent","rt-BaseMenuContent","rt-SelectContent",l)},e.createElement(S.Root,{type:"auto",className:"rt-ScrollAreaRoot"},e.createElement(a.Viewport,{asChild:!0,className:c("rt-BaseMenuViewport","rt-SelectViewport")},e.createElement(S.Viewport,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),e.createElement(S.Scrollbar,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},e.createElement(S.Thumb,{className:"rt-ScrollAreaThumb"}))))))});w.displayName="Select.Content";var E=e.forwardRef((t,o)=>{let{className:r,children:l,...i}=t,n=typeof l!="string";return e.createElement(a.Item,{...i,asChild:!1,ref:o,className:c("rt-reset","rt-BaseMenuItem","rt-SelectItem",{"rt-SelectItemRich":n},r)},e.createElement(a.ItemIndicator,{className:"rt-SelectItemIndicator"},e.createElement(h,{className:"rt-SelectItemIndicatorIcon"})),e.createElement(a.ItemText,null,l))});E.displayName="Select.Item";var G=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Group,{...o,asChild:!1,ref:r,className:c("rt-SelectGroup",t)}));G.displayName="Select.Group";var L=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Label,{...o,asChild:!1,ref:r,className:c("rt-BaseMenuLabel","rt-SelectLabel",t)}));L.displayName="Select.Label";var D=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Separator,{...o,asChild:!1,ref:r,className:c("rt-BaseMenuSeparator","rt-SelectSeparator",t)}));D.displayName="Select.Separator";export{x as a,b,w as c,E as d,G as e,L as f,D as g,M as h};
|
|
2
|
-
//# sourceMappingURL=chunk-7E2BPXIP.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/select.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport {\n selectRootPropDefs,\n selectTriggerPropDefs,\n selectContentPropDefs,\n} from './select.props.js';\nimport { useThemeContext, Theme } from './theme.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype SelectRootOwnProps = GetPropDefTypes<typeof selectRootPropDefs>;\n\ntype SelectContextValue = SelectRootOwnProps;\nconst SelectContext = React.createContext<SelectContextValue>({});\n\ninterface SelectRootProps extends SelectPrimitive.SelectProps, SelectContextValue {}\nconst SelectRoot: React.FC<SelectRootProps> = (props) => {\n const { children, size = selectRootPropDefs.size.default, ...rootProps } = props;\n return (\n <SelectPrimitive.Root {...rootProps}>\n <SelectContext.Provider value={React.useMemo(() => ({ size }), [size])}>\n {children}\n </SelectContext.Provider>\n </SelectPrimitive.Root>\n );\n};\nSelectRoot.displayName = 'Select.Root';\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerOwnProps = GetPropDefTypes<typeof selectTriggerPropDefs>;\ninterface SelectTriggerProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Trigger, RemovedProps>,\n MarginProps,\n SelectTriggerOwnProps {}\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const {\n children,\n className,\n color,\n radius,\n placeholder,\n error,\n loading,\n disabled,\n readOnly,\n ...triggerProps\n } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n { size: selectRootPropDefs.size },\n selectTriggerPropDefs,\n marginPropDefs,\n );\n\n // Extract panelBackground separately since it needs to be passed as data attribute\n const { panelBackground } = props;\n\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': error || undefined,\n 'aria-busy': loading || undefined,\n 'aria-disabled': disabled || undefined,\n 'aria-readonly': readOnly || undefined,\n }),\n [error, loading, disabled, readOnly],\n );\n\n return (\n <SelectPrimitive.Trigger asChild>\n <button\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={panelBackground}\n data-error={error}\n data-loading={loading}\n {...triggerProps}\n {...ariaProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', className)}\n >\n <span className=\"rt-SelectTriggerInner\">\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n </span>\n <SelectPrimitive.Icon asChild>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray=\"32\"\n strokeDashoffset=\"32\"\n className=\"rt-SelectLoadingIconCircle\"\n />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </SelectPrimitive.Icon>\n </button>\n </SelectPrimitive.Trigger>\n );\n },\n);\nSelectTrigger.displayName = 'Select.Trigger';\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentOwnProps = GetPropDefTypes<typeof selectContentPropDefs>;\ninterface SelectContentProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Content, RemovedProps>,\n SelectContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Portal>['container'];\n}\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n (props, forwardedRef) => {\n const context = React.useContext(SelectContext);\n const { className, children, color, container, ...contentProps } = extractProps(\n // Pass size value from the context to generate styles\n { size: context?.size, ...props },\n // Pass size prop def to allow it to be extracted\n { size: selectRootPropDefs.size },\n selectContentPropDefs,\n );\n const themeContext = useThemeContext();\n const resolvedColor = color || themeContext.accentColor;\n return (\n <SelectPrimitive.Portal container={container}>\n <Theme asChild>\n <SelectPrimitive.Content\n data-accent-color={resolvedColor}\n sideOffset={4}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-SelectContent',\n className,\n )}\n >\n <ScrollAreaPrimitive.Root type=\"auto\" className=\"rt-ScrollAreaRoot\">\n <SelectPrimitive.Viewport\n asChild\n className={classNames('rt-BaseMenuViewport', 'rt-SelectViewport')}\n >\n <ScrollAreaPrimitive.Viewport\n className=\"rt-ScrollAreaViewport\"\n style={{ overflowY: undefined }}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className=\"rt-ScrollAreaScrollbar rt-r-size-1\"\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </SelectPrimitive.Content>\n </Theme>\n </SelectPrimitive.Portal>\n );\n },\n);\nSelectContent.displayName = 'Select.Content';\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ninterface SelectItemProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Item, RemovedProps> {}\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>((props, forwardedRef) => {\n const { className, children, ...itemProps } = props;\n\n // Detect if this is rich content (not just a string)\n const isRichContent = typeof children !== 'string';\n\n return (\n <SelectPrimitive.Item\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-SelectItem',\n { 'rt-SelectItemRich': isRichContent },\n className,\n )}\n >\n <SelectPrimitive.ItemIndicator className=\"rt-SelectItemIndicator\">\n <ThickCheckIcon className=\"rt-SelectItemIndicatorIcon\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n});\nSelectItem.displayName = 'Select.Item';\n\ntype SelectGroupElement = React.ElementRef<typeof SelectPrimitive.Group>;\ninterface SelectGroupProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Group, RemovedProps> {}\nconst SelectGroup = React.forwardRef<SelectGroupElement, SelectGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-SelectGroup', className)}\n />\n ),\n);\nSelectGroup.displayName = 'Select.Group';\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ninterface SelectLabelProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Label, RemovedProps> {}\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-SelectLabel', className)}\n />\n ),\n);\nSelectLabel.displayName = 'Select.Label';\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ninterface SelectSeparatorProps\n extends ComponentPropsWithout<typeof SelectPrimitive.Separator, RemovedProps> {}\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-SelectSeparator', className)}\n />\n ),\n);\nSelectSeparator.displayName = 'Select.Separator';\n\nexport {\n SelectRoot as Root,\n SelectTrigger as Trigger,\n SelectContent as Content,\n SelectItem as Item,\n SelectGroup as Group,\n SelectLabel as Label,\n SelectSeparator as Separator,\n};\n\nexport type {\n SelectRootProps as RootProps,\n SelectTriggerProps as TriggerProps,\n SelectContentProps as ContentProps,\n SelectItemProps as ItemProps,\n SelectGroupProps as GroupProps,\n SelectLabelProps as Label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,CACE,GAAGL,EACJ,QAAS,GACT,IAAKO,EACL,UAAWgB,EAAW,uBAAwB,qBAAsBd,CAAS,EAC/E,CAEJ,EACA+B,EAAgB,YAAc",
|
|
6
|
-
"names": ["select_exports", "__export", "SelectContent", "SelectGroup", "SelectItem", "SelectLabel", "SelectRoot", "SelectSeparator", "SelectTrigger", "React", "classNames", "SelectPrimitive", "ScrollAreaPrimitive", "SelectContext", "SelectRoot", "props", "children", "size", "selectRootPropDefs", "rootProps", "SelectPrimitive", "SelectTrigger", "forwardedRef", "context", "className", "color", "radius", "placeholder", "error", "loading", "disabled", "readOnly", "triggerProps", "extractProps", "selectTriggerPropDefs", "marginPropDefs", "panelBackground", "ariaProps", "classNames", "ChevronDownIcon", "SelectContent", "container", "contentProps", "selectContentPropDefs", "themeContext", "useThemeContext", "resolvedColor", "Theme", "ScrollAreaPrimitive", "SelectItem", "itemProps", "isRichContent", "ThickCheckIcon", "SelectGroup", "SelectLabel", "SelectSeparator"]
|
|
7
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-2N2AQNJH.js";import{a as r}from"./chunk-SAJY4H6J.js";import{a}from"./chunk-4LDVSTXI.js";import*as t from"react";import R from"classnames";var P=t.forwardRef(({className:i,tooltip:o,tooltipSide:s="top",tooltipAlign:c="center",tooltipDelayDuration:p,tooltipDisableHoverableContent:b,...e},u)=>{let{tooltipId:m,hasTooltip:d,accessibilityProps:B}=l(o),y="aria-label"in e&&e["aria-label"],f="aria-labelledby"in e&&e["aria-labelledby"],I="children"in e&&e.children;!y&&!f&&!I&&console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
2
|
-
- aria-label prop with descriptive text
|
|
3
|
-
- aria-labelledby prop referencing a label element
|
|
4
|
-
- or visible text children`);let n=t.createElement(a,{...e,...B,ref:u,className:R("rt-IconButton",i)});return d?t.createElement(r,{content:o,side:s,align:c,delayDuration:p,disableHoverableContent:b,id:m},n):n});P.displayName="IconButton";export{P as a};
|
|
5
|
-
//# sourceMappingURL=chunk-7FS2VDHO.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/icon-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> }) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n { className, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Validate accessible name - throw in development, log error in production\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n\n if (process.env.NODE_ENV === 'development') {\n throw new Error(errorMessage);\n } else {\n console.error(errorMessage);\n }\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-IconButton', className)} />;\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!hasTooltip) {\n return iconButton;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n"],
|
|
5
|
-
"mappings": "mHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAqGvB,IAAMC,EAAmB,aACvB,CACE,CAAE,UAAAC,EAAW,QAAAC,EAAS,YAAAC,EAAc,MAAO,aAAAC,EAAe,SAAU,qBAAAC,EAAsB,+BAAAC,EAAgC,GAAGC,CAAM,EACnIC,IACG,CAEH,GAAM,CAAE,UAAAC,EAAW,WAAAC,EAAY,mBAAoBC,CAA0B,EAAIC,EAAkBV,CAAO,EAIpGW,EAAe,eAAgBN,GAASA,EAAM,YAAY,EAC1DO,EAAoB,oBAAqBP,GAASA,EAAM,iBAAiB,EACzEQ,EAAc,aAAcR,GAASA,EAAM,SAG7C,CAACM,GAAgB,CAACC,GAAqB,CAACC,GAUxC,QAAQ,MARR;AAAA;AAAA;AAAA,2BAQ0B,EAK9B,IAAMC,EAAa,gBAACC,EAAA,CAAY,GAAGV,EAAQ,GAAGI,EAA2B,IAAKH,EAAc,UAAWU,EAAW,gBAAiBjB,CAAS,EAAG,EAG/I,OAAKS,EAOH,gBAACS,EAAA,CAAQ,QAASjB,EAAS,KAAMC,EAAa,MAAOC,EAAc,cAAeC,EAAsB,wBAAyBC,EAAgC,GAAIG,GAClKO,CACH,EAROA,CAUX,CACF,EAEAhB,EAAW,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "iconButton", "BaseButton", "classNames", "Tooltip"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-VK7RNXUO.js";import{a}from"./chunk-7FS2VDHO.js";import*as e from"react";import{Toggle as b}from"radix-ui";var m=e.forwardRef(({pressed:l,onPressedChange:i,defaultPressed:g,...s},p)=>{let{"aria-label":r,"aria-labelledby":o,children:t}=s,n=e.useRef(null);e.useEffect(()=>{n.current=null},[o]);let u=e.useCallback(()=>{if(r)return r;if(o){if(n.current===null){let f=document.getElementById(o);n.current=f?.textContent||"Toggle icon button"}return n.current}return typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle icon button"},[r,o,t]),{handlePressedChange:d}=c({pressed:l,onPressedChange:i,getAccessibleName:u,componentName:"ToggleIconButton"});return e.createElement(b.Root,{pressed:l,onPressedChange:d,defaultPressed:g,asChild:!0},e.createElement(a,{...s,ref:p}))});m.displayName="ToggleIconButton";export{m as a};
|
|
2
|
-
//# sourceMappingURL=chunk-7RUVID3O.js.map
|