@cimpress-ui/react 0.0.1 → 0.2.1
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/LICENSE +201 -0
- package/README.md +5 -1
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts +22 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.js +37 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/commonjs/components/button/button.d.ts +1 -1
- package/dist/commonjs/components/button/button.js +2 -2
- package/dist/commonjs/components/button/button.js.map +1 -1
- package/dist/commonjs/components/button/icon-button.d.ts +1 -1
- package/dist/commonjs/components/button/icon-button.js +2 -2
- package/dist/commonjs/components/button/icon-button.js.map +1 -1
- package/dist/commonjs/components/button/icon-link-button.d.ts +2 -2
- package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -1
- package/dist/commonjs/components/button/icon-link-button.js +1 -1
- package/dist/commonjs/components/button/icon-link-button.js.map +1 -1
- package/dist/commonjs/components/button/link-button.d.ts +2 -2
- package/dist/commonjs/components/button/link-button.d.ts.map +1 -1
- package/dist/commonjs/components/button/link-button.js +1 -1
- package/dist/commonjs/components/button/link-button.js.map +1 -1
- package/dist/commonjs/components/button/types.d.ts +1 -1
- package/dist/commonjs/components/button/types.d.ts.map +1 -1
- package/dist/commonjs/components/button/types.js.map +1 -1
- package/dist/commonjs/components/card/card-context.d.ts +4 -0
- package/dist/commonjs/components/card/card-context.d.ts.map +1 -0
- package/dist/commonjs/components/card/card-context.js +6 -0
- package/dist/commonjs/components/card/card-context.js.map +1 -0
- package/dist/commonjs/components/card/card.d.ts +15 -0
- package/dist/commonjs/components/card/card.d.ts.map +1 -0
- package/dist/commonjs/components/card/card.js +24 -0
- package/dist/commonjs/components/card/card.js.map +1 -0
- package/dist/commonjs/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/commonjs/components/checkbox/checkbox-group.js +1 -1
- package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -1
- package/dist/commonjs/components/checkbox/checkbox.d.ts +2 -2
- package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/commonjs/components/checkbox/checkbox.js +1 -1
- package/dist/commonjs/components/checkbox/checkbox.js.map +1 -1
- package/dist/commonjs/components/combo-box/combo-box.d.ts +8 -4
- package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
- package/dist/commonjs/components/combo-box/combo-box.js +7 -7
- package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
- package/dist/commonjs/components/disclosure/disclosure-group.d.ts +10 -0
- package/dist/commonjs/components/disclosure/disclosure-group.d.ts.map +1 -0
- package/dist/commonjs/components/disclosure/disclosure-group.js +18 -0
- package/dist/commonjs/components/disclosure/disclosure-group.js.map +1 -0
- package/dist/commonjs/components/disclosure/disclosure.d.ts +14 -0
- package/dist/commonjs/components/disclosure/disclosure.d.ts.map +1 -0
- package/dist/commonjs/components/disclosure/disclosure.js +20 -0
- package/dist/commonjs/components/disclosure/disclosure.js.map +1 -0
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts +0 -14
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -1
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js +2 -4
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js.map +1 -1
- package/dist/commonjs/components/internal/form-field/form-field.d.ts +1 -28
- package/dist/commonjs/components/internal/form-field/form-field.d.ts.map +1 -1
- package/dist/commonjs/components/internal/form-field/form-field.js +10 -0
- package/dist/commonjs/components/internal/form-field/form-field.js.map +1 -1
- package/dist/commonjs/components/internal/spinner/spinner.d.ts +0 -16
- package/dist/commonjs/components/internal/spinner/spinner.d.ts.map +1 -1
- package/dist/commonjs/components/menu/menu.d.ts +5 -4
- package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
- package/dist/commonjs/components/menu/menu.js +3 -3
- package/dist/commonjs/components/menu/menu.js.map +1 -1
- package/dist/commonjs/components/modal/modal.d.ts +19 -0
- package/dist/commonjs/components/modal/modal.d.ts.map +1 -0
- package/dist/commonjs/components/modal/modal.js +25 -0
- package/dist/commonjs/components/modal/modal.js.map +1 -0
- package/dist/commonjs/components/nav-tabs/nav-tabs.d.ts +23 -0
- package/dist/commonjs/components/nav-tabs/nav-tabs.d.ts.map +1 -0
- package/dist/commonjs/components/nav-tabs/nav-tabs.js +27 -0
- package/dist/commonjs/components/nav-tabs/nav-tabs.js.map +1 -0
- package/dist/commonjs/components/number-field/number-field.d.ts +10 -0
- package/dist/commonjs/components/number-field/number-field.d.ts.map +1 -0
- package/dist/commonjs/components/number-field/number-field.js +32 -0
- package/dist/commonjs/components/number-field/number-field.js.map +1 -0
- package/dist/commonjs/components/pagination/pagination.d.ts +14 -0
- package/dist/commonjs/components/pagination/pagination.d.ts.map +1 -0
- package/dist/commonjs/components/pagination/pagination.js +69 -0
- package/dist/commonjs/components/pagination/pagination.js.map +1 -0
- package/dist/commonjs/components/radio/radio-group.d.ts +1 -1
- package/dist/commonjs/components/radio/radio-group.js +1 -1
- package/dist/commonjs/components/radio/radio-group.js.map +1 -1
- package/dist/commonjs/components/radio/radio.d.ts +2 -2
- package/dist/commonjs/components/radio/radio.d.ts.map +1 -1
- package/dist/commonjs/components/radio/radio.js +1 -1
- package/dist/commonjs/components/radio/radio.js.map +1 -1
- package/dist/commonjs/components/select/select.d.ts +4 -4
- package/dist/commonjs/components/select/select.d.ts.map +1 -1
- package/dist/commonjs/components/select/select.js +3 -3
- package/dist/commonjs/components/select/select.js.map +1 -1
- package/dist/commonjs/components/spinner/spinner.d.ts +5 -1
- package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -1
- package/dist/commonjs/components/spinner/spinner.js +5 -2
- package/dist/commonjs/components/spinner/spinner.js.map +1 -1
- package/dist/commonjs/components/table/contexts/focus.d.ts +13 -0
- package/dist/commonjs/components/table/contexts/focus.d.ts.map +1 -0
- package/dist/commonjs/components/table/contexts/focus.js +51 -0
- package/dist/commonjs/components/table/contexts/focus.js.map +1 -0
- package/dist/commonjs/components/table/contexts/row-state.d.ts +10 -0
- package/dist/commonjs/components/table/contexts/row-state.d.ts.map +1 -0
- package/dist/commonjs/components/table/contexts/row-state.js +22 -0
- package/dist/commonjs/components/table/contexts/row-state.js.map +1 -0
- package/dist/commonjs/components/table/hooks/use-table-cell.d.ts +7 -0
- package/dist/commonjs/components/table/hooks/use-table-cell.d.ts.map +1 -0
- package/dist/commonjs/components/table/hooks/use-table-cell.js +125 -0
- package/dist/commonjs/components/table/hooks/use-table-cell.js.map +1 -0
- package/dist/commonjs/components/table/hooks/use-table.d.ts +7 -0
- package/dist/commonjs/components/table/hooks/use-table.d.ts.map +1 -0
- package/dist/commonjs/components/table/hooks/use-table.js +142 -0
- package/dist/commonjs/components/table/hooks/use-table.js.map +1 -0
- package/dist/commonjs/components/table/table-body-cell.d.ts +26 -0
- package/dist/commonjs/components/table/table-body-cell.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-body-cell.js +17 -0
- package/dist/commonjs/components/table/table-body-cell.js.map +1 -0
- package/dist/commonjs/components/table/table-body.d.ts +8 -0
- package/dist/commonjs/components/table/table-body.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-body.js +11 -0
- package/dist/commonjs/components/table/table-body.js.map +1 -0
- package/dist/commonjs/components/table/table-container.d.ts +8 -0
- package/dist/commonjs/components/table/table-container.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-container.js +40 -0
- package/dist/commonjs/components/table/table-container.js.map +1 -0
- package/dist/commonjs/components/table/table-header-cell.d.ts +26 -0
- package/dist/commonjs/components/table/table-header-cell.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-header-cell.js +17 -0
- package/dist/commonjs/components/table/table-header-cell.js.map +1 -0
- package/dist/commonjs/components/table/table-header.d.ts +8 -0
- package/dist/commonjs/components/table/table-header.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-header.js +11 -0
- package/dist/commonjs/components/table/table-header.js.map +1 -0
- package/dist/commonjs/components/table/table-row.d.ts +21 -0
- package/dist/commonjs/components/table/table-row.d.ts.map +1 -0
- package/dist/commonjs/components/table/table-row.js +14 -0
- package/dist/commonjs/components/table/table-row.js.map +1 -0
- package/dist/commonjs/components/table/table.d.ts +26 -0
- package/dist/commonjs/components/table/table.d.ts.map +1 -0
- package/dist/commonjs/components/table/table.js +27 -0
- package/dist/commonjs/components/table/table.js.map +1 -0
- package/dist/commonjs/components/table/utils/focus-table-child.d.ts +4 -0
- package/dist/commonjs/components/table/utils/focus-table-child.d.ts.map +1 -0
- package/dist/commonjs/components/table/utils/focus-table-child.js +14 -0
- package/dist/commonjs/components/table/utils/focus-table-child.js.map +1 -0
- package/dist/commonjs/components/tag/tag-group.d.ts +18 -0
- package/dist/commonjs/components/tag/tag-group.d.ts.map +1 -0
- package/dist/commonjs/components/tag/tag-group.js +27 -0
- package/dist/commonjs/components/tag/tag-group.js.map +1 -0
- package/dist/commonjs/components/tag/tag.d.ts +17 -0
- package/dist/commonjs/components/tag/tag.d.ts.map +1 -0
- package/dist/commonjs/components/tag/tag.js +20 -0
- package/dist/commonjs/components/tag/tag.js.map +1 -0
- package/dist/commonjs/components/text-inputs/text-area.d.ts +1 -1
- package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
- package/dist/commonjs/components/text-inputs/text-area.js +1 -1
- package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
- package/dist/commonjs/components/text-inputs/text-field.d.ts +2 -2
- package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
- package/dist/commonjs/components/text-inputs/text-field.js +2 -2
- package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
- package/dist/commonjs/components/tooltip/tooltip.d.ts +9 -0
- package/dist/commonjs/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/commonjs/components/tooltip/tooltip.js +15 -0
- package/dist/commonjs/components/tooltip/tooltip.js.map +1 -0
- package/dist/commonjs/components/types.d.ts +32 -6
- package/dist/commonjs/components/types.d.ts.map +1 -1
- package/dist/commonjs/components/types.js.map +1 -1
- package/dist/commonjs/components/typography/link.d.ts +7 -3
- package/dist/commonjs/components/typography/link.d.ts.map +1 -1
- package/dist/commonjs/components/typography/link.js +8 -4
- package/dist/commonjs/components/typography/link.js.map +1 -1
- package/dist/commonjs/components/typography/text.d.ts +5 -1
- package/dist/commonjs/components/typography/text.d.ts.map +1 -1
- package/dist/commonjs/components/typography/text.js +5 -2
- package/dist/commonjs/components/typography/text.js.map +1 -1
- package/dist/commonjs/components/typography/types.d.ts +3 -2
- package/dist/commonjs/components/typography/types.d.ts.map +1 -1
- package/dist/commonjs/components/typography/types.js.map +1 -1
- package/dist/commonjs/components/typography/utils.d.ts.map +1 -1
- package/dist/commonjs/components/typography/utils.js +2 -2
- package/dist/commonjs/components/typography/utils.js.map +1 -1
- package/dist/commonjs/components/visually-hidden/visually-hidden.d.ts +17 -0
- package/dist/commonjs/components/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/commonjs/components/visually-hidden/visually-hidden.js +20 -0
- package/dist/commonjs/components/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/commonjs/icons/accounting-document.d.ts +8 -0
- package/dist/commonjs/icons/accounting-document.d.ts.map +1 -0
- package/dist/commonjs/icons/accounting-document.js +24 -0
- package/dist/commonjs/icons/accounting-document.js.map +1 -0
- package/dist/commonjs/icons/add-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/add-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/add-circle-fill.js +24 -0
- package/dist/commonjs/icons/add-circle-fill.js.map +1 -0
- package/dist/commonjs/icons/add-circle.d.ts +8 -0
- package/dist/commonjs/icons/add-circle.d.ts.map +1 -0
- package/dist/commonjs/icons/add-circle.js +24 -0
- package/dist/commonjs/icons/add-circle.js.map +1 -0
- package/dist/commonjs/icons/add.d.ts +1 -1
- package/dist/commonjs/icons/add.d.ts.map +1 -1
- package/dist/commonjs/icons/add.js +6 -3
- package/dist/commonjs/icons/add.js.map +1 -1
- package/dist/commonjs/icons/alert-triangle.d.ts +1 -1
- package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -1
- package/dist/commonjs/icons/alert-triangle.js +6 -3
- package/dist/commonjs/icons/alert-triangle.js.map +1 -1
- package/dist/commonjs/icons/calculator-alt.d.ts +8 -0
- package/dist/commonjs/icons/calculator-alt.d.ts.map +1 -0
- package/dist/commonjs/icons/calculator-alt.js +24 -0
- package/dist/commonjs/icons/calculator-alt.js.map +1 -0
- package/dist/commonjs/icons/calculator.d.ts +8 -0
- package/dist/commonjs/icons/calculator.d.ts.map +1 -0
- package/dist/commonjs/icons/calculator.js +24 -0
- package/dist/commonjs/icons/calculator.js.map +1 -0
- package/dist/commonjs/icons/checkmark-circle-fill.d.ts +1 -1
- package/dist/commonjs/icons/checkmark-circle-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark-circle-fill.js +6 -3
- package/dist/commonjs/icons/checkmark-circle-fill.js.map +1 -1
- package/dist/commonjs/icons/checkmark-circle.d.ts +8 -0
- package/dist/commonjs/icons/checkmark-circle.d.ts.map +1 -0
- package/dist/commonjs/icons/checkmark-circle.js +24 -0
- package/dist/commonjs/icons/checkmark-circle.js.map +1 -0
- package/dist/commonjs/icons/checkmark-small.d.ts +1 -1
- package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark-small.js +6 -3
- package/dist/commonjs/icons/checkmark-small.js.map +1 -1
- package/dist/commonjs/icons/checkmark.d.ts +1 -1
- package/dist/commonjs/icons/checkmark.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark.js +6 -3
- package/dist/commonjs/icons/checkmark.js.map +1 -1
- package/dist/commonjs/icons/chevron-down-fill.d.ts +1 -1
- package/dist/commonjs/icons/chevron-down-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/chevron-down-fill.js +6 -3
- package/dist/commonjs/icons/chevron-down-fill.js.map +1 -1
- package/dist/commonjs/icons/error-circle-fill.d.ts +1 -1
- package/dist/commonjs/icons/error-circle-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/error-circle-fill.js +6 -3
- package/dist/commonjs/icons/error-circle-fill.js.map +1 -1
- package/dist/commonjs/icons/index.d.ts +14 -0
- package/dist/commonjs/icons/index.d.ts.map +1 -1
- package/dist/commonjs/icons/index.js +29 -1
- package/dist/commonjs/icons/index.js.map +1 -1
- package/dist/commonjs/icons/info-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/info-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/info-circle-fill.js +24 -0
- package/dist/commonjs/icons/info-circle-fill.js.map +1 -0
- package/dist/commonjs/icons/minus-small.d.ts +1 -1
- package/dist/commonjs/icons/minus-small.d.ts.map +1 -1
- package/dist/commonjs/icons/minus-small.js +6 -3
- package/dist/commonjs/icons/minus-small.js.map +1 -1
- package/dist/commonjs/icons/minus.d.ts +8 -0
- package/dist/commonjs/icons/minus.d.ts.map +1 -0
- package/dist/commonjs/icons/minus.js +24 -0
- package/dist/commonjs/icons/minus.js.map +1 -0
- package/dist/commonjs/icons/unstable-chevron-left-fill.d.ts +8 -0
- package/dist/commonjs/icons/unstable-chevron-left-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/unstable-chevron-left-fill.js +24 -0
- package/dist/commonjs/icons/unstable-chevron-left-fill.js.map +1 -0
- package/dist/commonjs/icons/unstable-chevron-right-fill.d.ts +8 -0
- package/dist/commonjs/icons/unstable-chevron-right-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/unstable-chevron-right-fill.js +24 -0
- package/dist/commonjs/icons/unstable-chevron-right-fill.js.map +1 -0
- package/dist/commonjs/icons/unstable-close.d.ts +8 -0
- package/dist/commonjs/icons/unstable-close.d.ts.map +1 -0
- package/dist/commonjs/icons/unstable-close.js +24 -0
- package/dist/commonjs/icons/unstable-close.js.map +1 -0
- package/dist/commonjs/icons/unstable-info-circle.d.ts +8 -0
- package/dist/commonjs/icons/unstable-info-circle.d.ts.map +1 -0
- package/dist/commonjs/icons/unstable-info-circle.js +24 -0
- package/dist/commonjs/icons/unstable-info-circle.js.map +1 -0
- package/dist/commonjs/icons/unstable-placeholder.d.ts +8 -0
- package/dist/commonjs/icons/unstable-placeholder.d.ts.map +1 -0
- package/dist/commonjs/icons/unstable-placeholder.js +24 -0
- package/dist/commonjs/icons/unstable-placeholder.js.map +1 -0
- package/dist/commonjs/icons/warning-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/warning-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/warning-circle-fill.js +24 -0
- package/dist/commonjs/icons/warning-circle-fill.js.map +1 -0
- package/dist/commonjs/index.d.ts +21 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/utils/style/tone.d.ts +3 -0
- package/dist/commonjs/utils/style/tone.d.ts.map +1 -0
- package/dist/commonjs/utils/style/tone.js +7 -0
- package/dist/commonjs/utils/style/tone.js.map +1 -0
- package/dist/commonjs/utils/style/types.d.ts +2 -0
- package/dist/commonjs/utils/style/types.d.ts.map +1 -0
- package/dist/commonjs/utils/style/types.js +3 -0
- package/dist/commonjs/utils/style/types.js.map +1 -0
- package/dist/commonjs/with-style-props.d.ts +1 -1
- package/dist/commonjs/with-style-props.d.ts.map +1 -1
- package/dist/commonjs/with-style-props.js.map +1 -1
- package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts +22 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +30 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/esm/components/button/button.d.ts +1 -1
- package/dist/esm/components/button/button.js +2 -2
- package/dist/esm/components/button/button.js.map +1 -1
- package/dist/esm/components/button/icon-button.d.ts +1 -1
- package/dist/esm/components/button/icon-button.js +2 -2
- package/dist/esm/components/button/icon-button.js.map +1 -1
- package/dist/esm/components/button/icon-link-button.d.ts +2 -2
- package/dist/esm/components/button/icon-link-button.d.ts.map +1 -1
- package/dist/esm/components/button/icon-link-button.js +1 -1
- package/dist/esm/components/button/icon-link-button.js.map +1 -1
- package/dist/esm/components/button/link-button.d.ts +2 -2
- package/dist/esm/components/button/link-button.d.ts.map +1 -1
- package/dist/esm/components/button/link-button.js +1 -1
- package/dist/esm/components/button/link-button.js.map +1 -1
- package/dist/esm/components/button/types.d.ts +1 -1
- package/dist/esm/components/button/types.d.ts.map +1 -1
- package/dist/esm/components/button/types.js.map +1 -1
- package/dist/esm/components/card/card-context.d.ts +4 -0
- package/dist/esm/components/card/card-context.d.ts.map +1 -0
- package/dist/esm/components/card/card-context.js +3 -0
- package/dist/esm/components/card/card-context.js.map +1 -0
- package/dist/esm/components/card/card.d.ts +15 -0
- package/dist/esm/components/card/card.d.ts.map +1 -0
- package/dist/esm/components/card/card.js +17 -0
- package/dist/esm/components/card/card.js.map +1 -0
- package/dist/esm/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/esm/components/checkbox/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
- package/dist/esm/components/checkbox/checkbox.d.ts +2 -2
- package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/esm/components/checkbox/checkbox.js +1 -1
- package/dist/esm/components/checkbox/checkbox.js.map +1 -1
- package/dist/esm/components/combo-box/combo-box.d.ts +8 -4
- package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
- package/dist/esm/components/combo-box/combo-box.js +8 -8
- package/dist/esm/components/combo-box/combo-box.js.map +1 -1
- package/dist/esm/components/disclosure/disclosure-group.d.ts +10 -0
- package/dist/esm/components/disclosure/disclosure-group.d.ts.map +1 -0
- package/dist/esm/components/disclosure/disclosure-group.js +12 -0
- package/dist/esm/components/disclosure/disclosure-group.js.map +1 -0
- package/dist/esm/components/disclosure/disclosure.d.ts +14 -0
- package/dist/esm/components/disclosure/disclosure.d.ts.map +1 -0
- package/dist/esm/components/disclosure/disclosure.js +14 -0
- package/dist/esm/components/disclosure/disclosure.js.map +1 -0
- package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts +0 -14
- package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -1
- package/dist/esm/components/internal/collapsible-list/collapsible-list.js +2 -4
- package/dist/esm/components/internal/collapsible-list/collapsible-list.js.map +1 -1
- package/dist/esm/components/internal/form-field/form-field.d.ts +1 -28
- package/dist/esm/components/internal/form-field/form-field.d.ts.map +1 -1
- package/dist/esm/components/internal/form-field/form-field.js +10 -1
- package/dist/esm/components/internal/form-field/form-field.js.map +1 -1
- package/dist/esm/components/internal/spinner/spinner.d.ts +0 -16
- package/dist/esm/components/internal/spinner/spinner.d.ts.map +1 -1
- package/dist/esm/components/menu/menu.d.ts +5 -4
- package/dist/esm/components/menu/menu.d.ts.map +1 -1
- package/dist/esm/components/menu/menu.js +3 -3
- package/dist/esm/components/menu/menu.js.map +1 -1
- package/dist/esm/components/modal/modal.d.ts +19 -0
- package/dist/esm/components/modal/modal.d.ts.map +1 -0
- package/dist/esm/components/modal/modal.js +18 -0
- package/dist/esm/components/modal/modal.js.map +1 -0
- package/dist/esm/components/nav-tabs/nav-tabs.d.ts +23 -0
- package/dist/esm/components/nav-tabs/nav-tabs.d.ts.map +1 -0
- package/dist/esm/components/nav-tabs/nav-tabs.js +20 -0
- package/dist/esm/components/nav-tabs/nav-tabs.js.map +1 -0
- package/dist/esm/components/number-field/number-field.d.ts +10 -0
- package/dist/esm/components/number-field/number-field.d.ts.map +1 -0
- package/dist/esm/components/number-field/number-field.js +26 -0
- package/dist/esm/components/number-field/number-field.js.map +1 -0
- package/dist/esm/components/pagination/pagination.d.ts +14 -0
- package/dist/esm/components/pagination/pagination.d.ts.map +1 -0
- package/dist/esm/components/pagination/pagination.js +66 -0
- package/dist/esm/components/pagination/pagination.js.map +1 -0
- package/dist/esm/components/radio/radio-group.d.ts +1 -1
- package/dist/esm/components/radio/radio-group.js +1 -1
- package/dist/esm/components/radio/radio-group.js.map +1 -1
- package/dist/esm/components/radio/radio.d.ts +2 -2
- package/dist/esm/components/radio/radio.d.ts.map +1 -1
- package/dist/esm/components/radio/radio.js +1 -1
- package/dist/esm/components/radio/radio.js.map +1 -1
- package/dist/esm/components/select/select.d.ts +4 -4
- package/dist/esm/components/select/select.d.ts.map +1 -1
- package/dist/esm/components/select/select.js +3 -3
- package/dist/esm/components/select/select.js.map +1 -1
- package/dist/esm/components/spinner/spinner.d.ts +5 -1
- package/dist/esm/components/spinner/spinner.d.ts.map +1 -1
- package/dist/esm/components/spinner/spinner.js +5 -2
- package/dist/esm/components/spinner/spinner.js.map +1 -1
- package/dist/esm/components/table/contexts/focus.d.ts +13 -0
- package/dist/esm/components/table/contexts/focus.d.ts.map +1 -0
- package/dist/esm/components/table/contexts/focus.js +47 -0
- package/dist/esm/components/table/contexts/focus.js.map +1 -0
- package/dist/esm/components/table/contexts/row-state.d.ts +10 -0
- package/dist/esm/components/table/contexts/row-state.d.ts.map +1 -0
- package/dist/esm/components/table/contexts/row-state.js +18 -0
- package/dist/esm/components/table/contexts/row-state.js.map +1 -0
- package/dist/esm/components/table/hooks/use-table-cell.d.ts +7 -0
- package/dist/esm/components/table/hooks/use-table-cell.d.ts.map +1 -0
- package/dist/esm/components/table/hooks/use-table-cell.js +122 -0
- package/dist/esm/components/table/hooks/use-table-cell.js.map +1 -0
- package/dist/esm/components/table/hooks/use-table.d.ts +7 -0
- package/dist/esm/components/table/hooks/use-table.d.ts.map +1 -0
- package/dist/esm/components/table/hooks/use-table.js +139 -0
- package/dist/esm/components/table/hooks/use-table.js.map +1 -0
- package/dist/esm/components/table/table-body-cell.d.ts +26 -0
- package/dist/esm/components/table/table-body-cell.d.ts.map +1 -0
- package/dist/esm/components/table/table-body-cell.js +14 -0
- package/dist/esm/components/table/table-body-cell.js.map +1 -0
- package/dist/esm/components/table/table-body.d.ts +8 -0
- package/dist/esm/components/table/table-body.d.ts.map +1 -0
- package/dist/esm/components/table/table-body.js +8 -0
- package/dist/esm/components/table/table-body.js.map +1 -0
- package/dist/esm/components/table/table-container.d.ts +8 -0
- package/dist/esm/components/table/table-container.d.ts.map +1 -0
- package/dist/esm/components/table/table-container.js +34 -0
- package/dist/esm/components/table/table-container.js.map +1 -0
- package/dist/esm/components/table/table-header-cell.d.ts +26 -0
- package/dist/esm/components/table/table-header-cell.d.ts.map +1 -0
- package/dist/esm/components/table/table-header-cell.js +14 -0
- package/dist/esm/components/table/table-header-cell.js.map +1 -0
- package/dist/esm/components/table/table-header.d.ts +8 -0
- package/dist/esm/components/table/table-header.d.ts.map +1 -0
- package/dist/esm/components/table/table-header.js +8 -0
- package/dist/esm/components/table/table-header.js.map +1 -0
- package/dist/esm/components/table/table-row.d.ts +21 -0
- package/dist/esm/components/table/table-row.d.ts.map +1 -0
- package/dist/esm/components/table/table-row.js +11 -0
- package/dist/esm/components/table/table-row.js.map +1 -0
- package/dist/esm/components/table/table.d.ts +26 -0
- package/dist/esm/components/table/table.d.ts.map +1 -0
- package/dist/esm/components/table/table.js +24 -0
- package/dist/esm/components/table/table.js.map +1 -0
- package/dist/esm/components/table/utils/focus-table-child.d.ts +4 -0
- package/dist/esm/components/table/utils/focus-table-child.d.ts.map +1 -0
- package/dist/esm/components/table/utils/focus-table-child.js +11 -0
- package/dist/esm/components/table/utils/focus-table-child.js.map +1 -0
- package/dist/esm/components/tag/tag-group.d.ts +18 -0
- package/dist/esm/components/tag/tag-group.d.ts.map +1 -0
- package/dist/esm/components/tag/tag-group.js +21 -0
- package/dist/esm/components/tag/tag-group.js.map +1 -0
- package/dist/esm/components/tag/tag.d.ts +17 -0
- package/dist/esm/components/tag/tag.d.ts.map +1 -0
- package/dist/esm/components/tag/tag.js +14 -0
- package/dist/esm/components/tag/tag.js.map +1 -0
- package/dist/esm/components/text-inputs/text-area.d.ts +1 -1
- package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-inputs/text-area.js +3 -3
- package/dist/esm/components/text-inputs/text-area.js.map +1 -1
- package/dist/esm/components/text-inputs/text-field.d.ts +2 -2
- package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-inputs/text-field.js +4 -4
- package/dist/esm/components/text-inputs/text-field.js.map +1 -1
- package/dist/esm/components/tooltip/tooltip.d.ts +9 -0
- package/dist/esm/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/esm/components/tooltip/tooltip.js +9 -0
- package/dist/esm/components/tooltip/tooltip.js.map +1 -0
- package/dist/esm/components/types.d.ts +32 -6
- package/dist/esm/components/types.d.ts.map +1 -1
- package/dist/esm/components/types.js.map +1 -1
- package/dist/esm/components/typography/link.d.ts +7 -3
- package/dist/esm/components/typography/link.d.ts.map +1 -1
- package/dist/esm/components/typography/link.js +8 -4
- package/dist/esm/components/typography/link.js.map +1 -1
- package/dist/esm/components/typography/text.d.ts +5 -1
- package/dist/esm/components/typography/text.d.ts.map +1 -1
- package/dist/esm/components/typography/text.js +5 -2
- package/dist/esm/components/typography/text.js.map +1 -1
- package/dist/esm/components/typography/types.d.ts +3 -2
- package/dist/esm/components/typography/types.d.ts.map +1 -1
- package/dist/esm/components/typography/types.js.map +1 -1
- package/dist/esm/components/typography/utils.d.ts.map +1 -1
- package/dist/esm/components/typography/utils.js +2 -2
- package/dist/esm/components/typography/utils.js.map +1 -1
- package/dist/esm/components/visually-hidden/visually-hidden.d.ts +17 -0
- package/dist/esm/components/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/esm/components/visually-hidden/visually-hidden.js +14 -0
- package/dist/esm/components/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/esm/icons/accounting-document.d.ts +8 -0
- package/dist/esm/icons/accounting-document.d.ts.map +1 -0
- package/dist/esm/icons/accounting-document.js +19 -0
- package/dist/esm/icons/accounting-document.js.map +1 -0
- package/dist/esm/icons/add-circle-fill.d.ts +8 -0
- package/dist/esm/icons/add-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/add-circle-fill.js +19 -0
- package/dist/esm/icons/add-circle-fill.js.map +1 -0
- package/dist/esm/icons/add-circle.d.ts +8 -0
- package/dist/esm/icons/add-circle.d.ts.map +1 -0
- package/dist/esm/icons/add-circle.js +19 -0
- package/dist/esm/icons/add-circle.js.map +1 -0
- package/dist/esm/icons/add.d.ts +1 -1
- package/dist/esm/icons/add.d.ts.map +1 -1
- package/dist/esm/icons/add.js +6 -3
- package/dist/esm/icons/add.js.map +1 -1
- package/dist/esm/icons/alert-triangle.d.ts +1 -1
- package/dist/esm/icons/alert-triangle.d.ts.map +1 -1
- package/dist/esm/icons/alert-triangle.js +6 -3
- package/dist/esm/icons/alert-triangle.js.map +1 -1
- package/dist/esm/icons/calculator-alt.d.ts +8 -0
- package/dist/esm/icons/calculator-alt.d.ts.map +1 -0
- package/dist/esm/icons/calculator-alt.js +19 -0
- package/dist/esm/icons/calculator-alt.js.map +1 -0
- package/dist/esm/icons/calculator.d.ts +8 -0
- package/dist/esm/icons/calculator.d.ts.map +1 -0
- package/dist/esm/icons/calculator.js +19 -0
- package/dist/esm/icons/calculator.js.map +1 -0
- package/dist/esm/icons/checkmark-circle-fill.d.ts +1 -1
- package/dist/esm/icons/checkmark-circle-fill.d.ts.map +1 -1
- package/dist/esm/icons/checkmark-circle-fill.js +6 -3
- package/dist/esm/icons/checkmark-circle-fill.js.map +1 -1
- package/dist/esm/icons/checkmark-circle.d.ts +8 -0
- package/dist/esm/icons/checkmark-circle.d.ts.map +1 -0
- package/dist/esm/icons/checkmark-circle.js +19 -0
- package/dist/esm/icons/checkmark-circle.js.map +1 -0
- package/dist/esm/icons/checkmark-small.d.ts +1 -1
- package/dist/esm/icons/checkmark-small.d.ts.map +1 -1
- package/dist/esm/icons/checkmark-small.js +6 -3
- package/dist/esm/icons/checkmark-small.js.map +1 -1
- package/dist/esm/icons/checkmark.d.ts +1 -1
- package/dist/esm/icons/checkmark.d.ts.map +1 -1
- package/dist/esm/icons/checkmark.js +6 -3
- package/dist/esm/icons/checkmark.js.map +1 -1
- package/dist/esm/icons/chevron-down-fill.d.ts +1 -1
- package/dist/esm/icons/chevron-down-fill.d.ts.map +1 -1
- package/dist/esm/icons/chevron-down-fill.js +6 -3
- package/dist/esm/icons/chevron-down-fill.js.map +1 -1
- package/dist/esm/icons/error-circle-fill.d.ts +1 -1
- package/dist/esm/icons/error-circle-fill.d.ts.map +1 -1
- package/dist/esm/icons/error-circle-fill.js +7 -4
- package/dist/esm/icons/error-circle-fill.js.map +1 -1
- package/dist/esm/icons/index.d.ts +14 -0
- package/dist/esm/icons/index.d.ts.map +1 -1
- package/dist/esm/icons/index.js +14 -0
- package/dist/esm/icons/index.js.map +1 -1
- package/dist/esm/icons/info-circle-fill.d.ts +8 -0
- package/dist/esm/icons/info-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/info-circle-fill.js +19 -0
- package/dist/esm/icons/info-circle-fill.js.map +1 -0
- package/dist/esm/icons/minus-small.d.ts +1 -1
- package/dist/esm/icons/minus-small.d.ts.map +1 -1
- package/dist/esm/icons/minus-small.js +6 -3
- package/dist/esm/icons/minus-small.js.map +1 -1
- package/dist/esm/icons/minus.d.ts +8 -0
- package/dist/esm/icons/minus.d.ts.map +1 -0
- package/dist/esm/icons/minus.js +19 -0
- package/dist/esm/icons/minus.js.map +1 -0
- package/dist/esm/icons/unstable-chevron-left-fill.d.ts +8 -0
- package/dist/esm/icons/unstable-chevron-left-fill.d.ts.map +1 -0
- package/dist/esm/icons/unstable-chevron-left-fill.js +19 -0
- package/dist/esm/icons/unstable-chevron-left-fill.js.map +1 -0
- package/dist/esm/icons/unstable-chevron-right-fill.d.ts +8 -0
- package/dist/esm/icons/unstable-chevron-right-fill.d.ts.map +1 -0
- package/dist/esm/icons/unstable-chevron-right-fill.js +19 -0
- package/dist/esm/icons/unstable-chevron-right-fill.js.map +1 -0
- package/dist/esm/icons/unstable-close.d.ts +8 -0
- package/dist/esm/icons/unstable-close.d.ts.map +1 -0
- package/dist/esm/icons/unstable-close.js +19 -0
- package/dist/esm/icons/unstable-close.js.map +1 -0
- package/dist/esm/icons/unstable-info-circle.d.ts +8 -0
- package/dist/esm/icons/unstable-info-circle.d.ts.map +1 -0
- package/dist/esm/icons/unstable-info-circle.js +19 -0
- package/dist/esm/icons/unstable-info-circle.js.map +1 -0
- package/dist/esm/icons/unstable-placeholder.d.ts +8 -0
- package/dist/esm/icons/unstable-placeholder.d.ts.map +1 -0
- package/dist/esm/icons/unstable-placeholder.js +19 -0
- package/dist/esm/icons/unstable-placeholder.js.map +1 -0
- package/dist/esm/icons/warning-circle-fill.d.ts +8 -0
- package/dist/esm/icons/warning-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/warning-circle-fill.js +19 -0
- package/dist/esm/icons/warning-circle-fill.js.map +1 -0
- package/dist/esm/index.d.ts +21 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +19 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/style/tone.d.ts +3 -0
- package/dist/esm/utils/style/tone.d.ts.map +1 -0
- package/dist/esm/utils/style/tone.js +4 -0
- package/dist/esm/utils/style/tone.js.map +1 -0
- package/dist/esm/utils/style/types.d.ts +2 -0
- package/dist/esm/utils/style/types.d.ts.map +1 -0
- package/dist/esm/utils/style/types.js +2 -0
- package/dist/esm/utils/style/types.js.map +1 -0
- package/dist/esm/with-style-props.d.ts +1 -1
- package/dist/esm/with-style-props.d.ts.map +1 -1
- package/dist/esm/with-style-props.js.map +1 -1
- package/dist-styles/styles.css +1 -1
- package/package.json +28 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,C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AK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACrG,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACxB,8BACE,cAAK,SAAS,EAAC,6BAA6B,YAC1C,cAAK,SAAS,EAAC,qBAAqB,YAAE,eAAe,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC,CAAC,CAAC,KAAC,kBAAkB,KAAG,GAAO,GACtG,EACL,QAAQ,IAAI,CACX,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACA,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Checkbox as RACCheckbox, type CheckboxProps as RACCheckboxProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmarkSmall, IconMinusSmall } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface CheckboxProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<\n RACCheckboxProps,\n | 'onChange'\n | 'isSelected'\n | 'isIndeterminate'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isRequired'\n | 'isInvalid'\n | 'name'\n | 'value'\n | 'defaultSelected'\n | 'autoFocus'\n > {\n /** The label rendered next to the checkbox. */\n children?: StringLikeChildren;\n}\n\nfunction Checkbox(\n { children, UNSAFE_className, UNSAFE_style, ...props }: CheckboxProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACCheckbox {...props} ref={ref} className={clsx('cim-checkbox', UNSAFE_className)} style={UNSAFE_style}>\n {({ isIndeterminate }) => (\n <>\n <div className=\"cim-checkbox-toggle-wrapper\">\n <div className=\"cim-checkbox-toggle\">{isIndeterminate ? <IconMinusSmall /> : <IconCheckmarkSmall />}</div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </>\n )}\n </RACCheckbox>\n );\n}\n\n/**\n * Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).\n */\nconst _Checkbox = withStyleProps(forwardRef(Checkbox), 'Checkbox');\n\nexport { _Checkbox as Checkbox };\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
|
|
1
|
+
import { type ListBoxProps as RACListBoxProps, type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
|
|
2
2
|
import type { CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js';
|
|
3
3
|
/** Represents the state of the `ComboBox` component for validation purposes. */
|
|
4
4
|
export interface ComboBoxValidationValue {
|
|
@@ -7,12 +7,16 @@ export interface ComboBoxValidationValue {
|
|
|
7
7
|
/** The value of the ComboBox input. */
|
|
8
8
|
inputValue: string;
|
|
9
9
|
}
|
|
10
|
-
export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, Pick<RACComboBoxProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange'> {
|
|
10
|
+
export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, Pick<RACComboBoxProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick<RACListBoxProps<T>, 'onScroll'> {
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Allows users to filter a collapsible list and select one item from it.
|
|
14
|
+
*
|
|
15
|
+
* See [combo box usage guidelines](https://ui.cimpress.com/components/combo-box)
|
|
16
|
+
*/
|
|
13
17
|
declare const _ComboBox: <T extends CollectionItem>(props: ComboBoxProps<T> & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
14
18
|
export { _ComboBox as ComboBox };
|
|
15
|
-
export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled'> {
|
|
19
|
+
export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
16
20
|
children: StringLikeChildren;
|
|
17
21
|
}
|
|
18
22
|
/** Renders a single list item within `ComboBox`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"comb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AC9B;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAiBlG;yBAjBe,YAAY;;;AAqB5B,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxF,6EAA6E;IAC7E,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,EACxD,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAezB;yBApBe,eAAe"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { useContext, useEffect
|
|
4
|
+
import { useContext, useEffect } from 'react';
|
|
5
5
|
import { Button as RACButton, Collection as RACCollection, ComboBox as RACComboBox, ComboBoxStateContext as RACComboBoxStateContext, Group as RACGroup, Header as RACHeader, Input as RACInput, ListBox as RACListBox, ListBoxItem as RACListBoxItem, ListBoxSection as RACListBoxSection, Text as RACText, } from 'react-aria-components';
|
|
6
6
|
import { forwardRef } from '../../forward-ref.js';
|
|
7
7
|
import { IconCheckmark, IconChevronDownFill } from '../../icons/index.js';
|
|
@@ -9,8 +9,7 @@ import { withStyleProps } from '../../with-style-props.js';
|
|
|
9
9
|
import { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';
|
|
10
10
|
import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';
|
|
11
11
|
import { textStyle } from '../typography/utils.js';
|
|
12
|
-
function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, ...props }, ref) {
|
|
13
|
-
const triggerPositioningRef = useRef(null);
|
|
12
|
+
function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, onScroll, ...props }, ref) {
|
|
14
13
|
const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
|
|
15
14
|
useEffect(() => {
|
|
16
15
|
if (!label && !ariaLabel && !ariaLabelledBy) {
|
|
@@ -20,12 +19,13 @@ function ComboBox({ label, description, error, items, children, placeholder, UNS
|
|
|
20
19
|
if (items != null && typeof children !== 'function') {
|
|
21
20
|
console.warn('`ComboBox` requires `children` to be a function when using `items` prop');
|
|
22
21
|
}
|
|
23
|
-
return (_jsxs(RACComboBox, { ...props, ref: ref, className: clsx('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-combo-box-input-
|
|
24
|
-
// Position the list relative to wrapper div instead of input to account for border
|
|
25
|
-
triggerRef: triggerPositioningRef, widthCorrection: 2, children: _jsx(RACListBox, { className: "cim-combo-box-listbox", items: items, children: children }) })] }));
|
|
22
|
+
return (_jsxs(RACComboBox, { ...props, ref: ref, className: clsx('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-combo-box-input-group", children: [_jsx(ComboBoxInput, { isReadOnly: isReadOnly, placeholder: placeholder }), _jsx(RACButton, { className: "cim-combo-box-button", children: _jsx(IconChevronDownFill, {}) })] }), _jsx(FormFieldError, { children: error }), _jsx(FormFieldDescription, { children: description }), _jsx(CollapsibleList, { offset: 5, maxHeight: 315, children: _jsx(RACListBox, { className: "cim-combo-box-listbox", onScroll: onScroll, items: items, children: children }) })] }));
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Allows users to filter a collapsible list and select one item from it.
|
|
26
|
+
*
|
|
27
|
+
* See [combo box usage guidelines](https://ui.cimpress.com/components/combo-box)
|
|
28
|
+
*/
|
|
29
29
|
const _ComboBox = withStyleProps(forwardRef(ComboBox), 'ComboBox');
|
|
30
30
|
export { _ComboBox as ComboBox };
|
|
31
31
|
function ComboBoxInput({ isReadOnly, placeholder, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo-box.js","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAqB,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,MAAM,IAAI,SAAS,EACnB,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,EACvB,oBAAoB,IAAI,uBAAuB,EAC/C,KAAK,IAAI,QAAQ,EACjB,MAAM,IAAI,SAAS,EACnB,KAAK,IAAI,QAAQ,EACjB,OAAO,IAAI,UAAU,EACrB,WAAW,IAAI,cAAc,EAC7B,cAAc,IAAI,iBAAiB,EACnC,IAAI,IAAI,OAAO,GAGhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAs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CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEhH,OAAO,CACL,KAAC,cAAc,OAAK,KAAK,EAAE,SAAS,EAAC,oBAAoB,EAAC,SAAS,EAAE,SAAS,YAC3E,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACnB,8BACE,KAAC,aAAa,KAAG,EAEjB,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YACjG,QAAQ,GACD,IACT,CACJ,GACc,CAClB,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAS1C,0DAA0D;AAC1D,MAAM,UAAU,eAAe,CAA2B,EACxD,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACgB;IACxB,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;IACjG,CAAC;IAED,OAAO,CACL,MAAC,iBAAiB,OAAK,KAAK,EAAE,SAAS,EAAC,uBAAuB,aAC7D,KAAC,SAAS,IACR,SAAS,EAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,YAExG,KAAK,GACI,EACZ,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAiB,IACrC,CACrB,CAAC;AACJ,CAAC;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useContext, useEffect, useRef, type ForwardedRef } from 'react';\nimport {\n Button as RACButton,\n Collection as RACCollection,\n ComboBox as RACComboBox,\n ComboBoxStateContext as RACComboBoxStateContext,\n Group as RACGroup,\n Header as RACHeader,\n Input as RACInput,\n ListBox as RACListBox,\n ListBoxItem as RACListBoxItem,\n ListBoxSection as RACListBoxSection,\n Text as RACText,\n type ComboBoxProps as RACComboBoxProps,\n type ListBoxItemProps as RACListBoxItemProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmark, IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type {\n CollectionItem,\n CollectionProps,\n CommonProps,\n FieldWithPlaceholderProps,\n Key,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\n/** Represents the state of the `ComboBox` component for validation purposes. */\nexport interface ComboBoxValidationValue {\n /** The selected key in the ComboBox. */\n selectedKey: Key | null;\n /** The value of the ComboBox input. */\n inputValue: string;\n}\n\nexport interface ComboBoxProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n FieldWithPlaceholderProps<ComboBoxValidationValue>,\n CollectionProps<T>,\n Pick<\n RACComboBoxProps<T>,\n | 'name'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'inputValue'\n | 'defaultInputValue'\n | 'autoFocus'\n | 'onSelectionChange'\n | 'onInputChange'\n > {}\n\nfunction ComboBox<T extends CollectionItem>(\n {\n label,\n description,\n error,\n items,\n children,\n placeholder,\n UNSAFE_className,\n UNSAFE_style,\n isReadOnly,\n ...props\n }: ComboBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const triggerPositioningRef = useRef<HTMLDivElement>(null);\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('ComboBox requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`ComboBox` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACComboBox\n {...props}\n ref={ref}\n className={clsx('cim-combo-box', UNSAFE_className)}\n style={UNSAFE_style}\n menuTrigger=\"focus\"\n isReadOnly={isReadOnly}\n data-readonly={isReadOnly ? true : undefined}\n >\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-combo-box-input-wrapper\" ref={triggerPositioningRef}>\n <ComboBoxInput isReadOnly={isReadOnly} placeholder={placeholder} />\n <RACButton className=\"cim-combo-box-button\">\n <IconChevronDownFill />\n </RACButton>\n </RACGroup>\n <FormFieldError>{error}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n <CollapsibleList\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n // Position the list relative to wrapper div instead of input to account for border\n triggerRef={triggerPositioningRef}\n widthCorrection={2} // React Aria calculates the width of the trigger based on the width of the input + button, so we need to add 2px to account for the border on `.cim-combo-box-input-wrapper`\n >\n <RACListBox className=\"cim-combo-box-listbox\" items={items}>\n {children}\n </RACListBox>\n </CollapsibleList>\n </RACComboBox>\n );\n}\n\n// TODO: add link to usage guidelines\n/** Allows users to filter a collapsible list and select one item from it. */\nconst _ComboBox = withStyleProps(forwardRef(ComboBox), 'ComboBox');\n\nexport { _ComboBox as ComboBox };\n\nfunction ComboBoxInput({\n isReadOnly,\n placeholder,\n}: {\n isReadOnly: boolean | undefined;\n placeholder: string | undefined;\n}) {\n const comboBoxState = useContext(RACComboBoxStateContext);\n\n return (\n <RACInput\n className={clsx('cim-combo-box-input', textStyle({ variant: 'medium' }))}\n // Ensure the popover opens when the input is clicked.\n // By default, React Aria only opens the popover when the input is focused.\n onClick={() => !isReadOnly && comboBoxState!.open()}\n placeholder={placeholder}\n />\n );\n}\n\nexport interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled'> {\n children: StringLikeChildren;\n}\n\n/** Renders a single list item within `ComboBox`. */\nexport function ComboBoxItem<T extends CollectionItem>({ children, ...props }: ComboBoxItemProps<T>) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACListBoxItem {...props} className=\"cim-combo-box-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n <IconCheckmark />\n\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n </>\n )}\n </RACListBoxItem>\n );\n}\n\nComboBoxItem.displayName = 'ComboBoxItem';\n\nexport interface ComboBoxSectionProps<T extends CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `ComboBox` into a section. */\nexport function ComboBoxSection<T extends CollectionItem>({\n title,\n children,\n items,\n ...props\n}: ComboBoxSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`ComboBoxSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACListBoxSection {...props} className=\"cim-combo-box-section\">\n <RACHeader\n className={clsx('cim-combo-box-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}\n >\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACListBoxSection>\n );\n}\n\nComboBoxSection.displayName = 'ComboBoxSection';\n"]}
|
|
1
|
+
{"version":3,"file":"combo-box.js","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AACjE,OAAO,EACL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AO,CACL,MAAC,iBAAiB,OAAK,KAAK,EAAE,SAAS,EAAC,uBAAuB,aAC7D,KAAC,SAAS,IACR,SAAS,EAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,YAExG,KAAK,GACI,EACZ,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAiB,IACrC,CACrB,CAAC;AACJ,CAAC;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useContext, useEffect, type ForwardedRef } from 'react';\nimport {\n Button as RACButton,\n Collection as RACCollection,\n ComboBox as RACComboBox,\n ComboBoxStateContext as RACComboBoxStateContext,\n Group as RACGroup,\n Header as RACHeader,\n Input as RACInput,\n ListBox as RACListBox,\n type ListBoxProps as RACListBoxProps,\n ListBoxItem as RACListBoxItem,\n ListBoxSection as RACListBoxSection,\n Text as RACText,\n type ComboBoxProps as RACComboBoxProps,\n type ListBoxItemProps as RACListBoxItemProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmark, IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type {\n CollectionItem,\n CollectionProps,\n CommonProps,\n FieldWithPlaceholderProps,\n Key,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\n/** Represents the state of the `ComboBox` component for validation purposes. */\nexport interface ComboBoxValidationValue {\n /** The selected key in the ComboBox. */\n selectedKey: Key | null;\n /** The value of the ComboBox input. */\n inputValue: string;\n}\n\nexport interface ComboBoxProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n FieldWithPlaceholderProps<ComboBoxValidationValue>,\n CollectionProps<T>,\n Pick<\n RACComboBoxProps<T>,\n | 'name'\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'inputValue'\n | 'defaultInputValue'\n | 'autoFocus'\n | 'onSelectionChange'\n | 'onInputChange'\n | 'onFocus'\n | 'onBlur'\n | 'onOpenChange'\n >,\n Pick<RACListBoxProps<T>, 'onScroll'> {}\n\nfunction ComboBox<T extends CollectionItem>(\n {\n label,\n description,\n error,\n items,\n children,\n placeholder,\n UNSAFE_className,\n UNSAFE_style,\n isReadOnly,\n onScroll,\n ...props\n }: ComboBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('ComboBox requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`ComboBox` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACComboBox\n {...props}\n ref={ref}\n className={clsx('cim-combo-box', UNSAFE_className)}\n style={UNSAFE_style}\n menuTrigger=\"focus\"\n isReadOnly={isReadOnly}\n data-readonly={isReadOnly ? true : undefined}\n >\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-combo-box-input-group\">\n <ComboBoxInput isReadOnly={isReadOnly} placeholder={placeholder} />\n <RACButton className=\"cim-combo-box-button\">\n <IconChevronDownFill />\n </RACButton>\n </RACGroup>\n <FormFieldError>{error}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n <CollapsibleList\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n >\n <RACListBox className=\"cim-combo-box-listbox\" onScroll={onScroll} items={items}>\n {children}\n </RACListBox>\n </CollapsibleList>\n </RACComboBox>\n );\n}\n\n/**\n * Allows users to filter a collapsible list and select one item from it.\n *\n * See [combo box usage guidelines](https://ui.cimpress.com/components/combo-box)\n */\nconst _ComboBox = withStyleProps(forwardRef(ComboBox), 'ComboBox');\n\nexport { _ComboBox as ComboBox };\n\nfunction ComboBoxInput({\n isReadOnly,\n placeholder,\n}: {\n isReadOnly: boolean | undefined;\n placeholder: string | undefined;\n}) {\n const comboBoxState = useContext(RACComboBoxStateContext);\n\n return (\n <RACInput\n className={clsx('cim-combo-box-input', textStyle({ variant: 'medium' }))}\n // Ensure the popover opens when the input is clicked.\n // By default, React Aria only opens the popover when the input is focused.\n onClick={() => !isReadOnly && comboBoxState!.open()}\n placeholder={placeholder}\n />\n );\n}\n\nexport interface ComboBoxItemProps<T extends CollectionItem>\n extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n children: StringLikeChildren;\n}\n\n/** Renders a single list item within `ComboBox`. */\nexport function ComboBoxItem<T extends CollectionItem>({ children, ...props }: ComboBoxItemProps<T>) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACListBoxItem {...props} className=\"cim-combo-box-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n <IconCheckmark />\n\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n </>\n )}\n </RACListBoxItem>\n );\n}\n\nComboBoxItem.displayName = 'ComboBoxItem';\n\nexport interface ComboBoxSectionProps<T extends CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `ComboBox` into a section. */\nexport function ComboBoxSection<T extends CollectionItem>({\n title,\n children,\n items,\n ...props\n}: ComboBoxSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`ComboBoxSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACListBoxSection {...props} className=\"cim-combo-box-section\">\n <RACHeader\n className={clsx('cim-combo-box-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}\n >\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACListBoxSection>\n );\n}\n\nComboBoxSection.displayName = 'ComboBoxSection';\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type DisclosureGroupProps as RACDisclosureGroupProps } from 'react-aria-components';
|
|
3
|
+
import type { CommonProps } from '../types.js';
|
|
4
|
+
export interface UNSTABLE_DisclosureGroupProps extends CommonProps, Pick<RACDisclosureGroupProps, 'isDisabled' | 'allowsMultipleExpanded' | 'defaultExpandedKeys'> {
|
|
5
|
+
/** The disclosures to group together */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const _DisclosureGroup: (props: UNSTABLE_DisclosureGroupProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
9
|
+
export { _DisclosureGroup as UNSTABLE_DisclosureGroup };
|
|
10
|
+
//# sourceMappingURL=disclosure-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure-group.d.ts","sourceRoot":"","sources":["../../../../src/components/disclosure/disclosure-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAEL,KAAK,oBAAoB,IAAI,uBAAuB,EACrD,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,6BACf,SAAQ,WAAW,EACjB,IAAI,CAAC,uBAAuB,EAAE,YAAY,GAAG,wBAAwB,GAAG,qBAAqB,CAAC;IAChG,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAkBD,QAAA,MAAM,gBAAgB,+KAA0E,CAAC;AAEjG,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { DisclosureGroup as RACDisclosureGroup, } from 'react-aria-components';
|
|
5
|
+
import { forwardRef } from '../../forward-ref.js';
|
|
6
|
+
import { withStyleProps } from '../../with-style-props.js';
|
|
7
|
+
function UNSTABLE_DisclosureGroup({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
8
|
+
return (_jsx(RACDisclosureGroup, { ...props, ref: ref, className: clsx('cim-disclosure-group', UNSAFE_className), style: UNSAFE_style, children: children }));
|
|
9
|
+
}
|
|
10
|
+
const _DisclosureGroup = withStyleProps(forwardRef(UNSTABLE_DisclosureGroup), 'DisclosureGroup');
|
|
11
|
+
export { _DisclosureGroup as UNSTABLE_DisclosureGroup };
|
|
12
|
+
//# sourceMappingURL=disclosure-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure-group.js","sourceRoot":"","sources":["../../../../src/components/disclosure/disclosure-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,eAAe,IAAI,kBAAkB,GAEtC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,SAAS,wBAAwB,CAC/B,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiC,EACrF,GAAiC;IAEjC,OAAO,CACL,KAAC,kBAAkB,OACb,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,EACzD,KAAK,EAAE,YAAY,YAElB,QAAQ,GACU,CACtB,CAAC;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAG,cAAc,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAEjG,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport {\n DisclosureGroup as RACDisclosureGroup,\n type DisclosureGroupProps as RACDisclosureGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps } from '../types.js';\n\nexport interface UNSTABLE_DisclosureGroupProps\n extends CommonProps,\n Pick<RACDisclosureGroupProps, 'isDisabled' | 'allowsMultipleExpanded' | 'defaultExpandedKeys'> {\n /** The disclosures to group together */\n children: ReactNode;\n}\n\nfunction UNSTABLE_DisclosureGroup(\n { children, UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_DisclosureGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACDisclosureGroup\n {...props}\n ref={ref}\n className={clsx('cim-disclosure-group', UNSAFE_className)}\n style={UNSAFE_style}\n >\n {children}\n </RACDisclosureGroup>\n );\n}\n\nconst _DisclosureGroup = withStyleProps(forwardRef(UNSTABLE_DisclosureGroup), 'DisclosureGroup');\n\nexport { _DisclosureGroup as UNSTABLE_DisclosureGroup };\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type DisclosureProps as RACDisclosureProps } from 'react-aria-components';
|
|
3
|
+
import type { CommonProps, StringLikeChildren } from '../types.js';
|
|
4
|
+
export interface UNSTABLE_DisclosureProps extends Omit<CommonProps, 'id'>, Pick<RACDisclosureProps, 'id' | 'isDisabled' | 'defaultExpanded'> {
|
|
5
|
+
/** The content to display when the disclosure is expanded */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** The title that remains visible and triggers expand/collapse */
|
|
8
|
+
title: StringLikeChildren;
|
|
9
|
+
/** The content to display at the end of the heading */
|
|
10
|
+
contentEnd?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const _Disclosure: (props: UNSTABLE_DisclosureProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
13
|
+
export { _Disclosure as UNSTABLE_Disclosure };
|
|
14
|
+
//# sourceMappingURL=disclosure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../../../src/components/disclosure/disclosure.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAKL,KAAK,eAAe,IAAI,kBAAkB,EAC3C,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGnE,MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAC7B,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,YAAY,GAAG,iBAAiB,CAAC;IACnE,6DAA6D;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,KAAK,EAAE,kBAAkB,CAAC;IAC1B,uDAAuD;IACvD,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AA0BD,QAAA,MAAM,WAAW,0KAAgE,CAAC;AAElF,OAAO,EAAE,WAAW,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Disclosure as RACDisclosure, Button as RACButton, Heading as RACHeading, DisclosurePanel as RACDisclosurePanel, } from 'react-aria-components';
|
|
5
|
+
import { forwardRef } from '../../forward-ref.js';
|
|
6
|
+
import { IconChevronDownFill } from '../../icons/index.js';
|
|
7
|
+
import { withStyleProps } from '../../with-style-props.js';
|
|
8
|
+
import { Text } from '../typography/text.js';
|
|
9
|
+
function UNSTABLE_Disclosure({ children, title, contentEnd, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
10
|
+
return (_jsxs(RACDisclosure, { ref: ref, ...props, className: clsx('cim-disclosure', UNSAFE_className), style: UNSAFE_style, children: [_jsxs("div", { className: "cim-disclosure-heading-wrapper", children: [_jsx(RACHeading, { className: "cim-disclosure-heading", children: _jsxs(RACButton, { className: "cim-disclosure-button", slot: "trigger", children: [_jsx(IconChevronDownFill, { size: 24, UNSAFE_className: "cim-disclosure-icon" }), _jsx(Text, { as: "span", variant: "body-semibold", children: title })] }) }), contentEnd && _jsx("div", { className: "cim-disclosure-content-end", children: contentEnd })] }), _jsx(RACDisclosurePanel, { className: "cim-disclosure-panel", children: _jsx("div", { className: "cim-disclosure-panel-content", children: children }) })] }));
|
|
11
|
+
}
|
|
12
|
+
const _Disclosure = withStyleProps(forwardRef(UNSTABLE_Disclosure), 'Disclosure');
|
|
13
|
+
export { _Disclosure as UNSTABLE_Disclosure };
|
|
14
|
+
//# sourceMappingURL=disclosure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure.js","sourceRoot":"","sources":["../../../../src/components/disclosure/disclosure.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,MAAM,IAAI,SAAS,EACnB,OAAO,IAAI,UAAU,EACrB,eAAe,IAAI,kBAAkB,GAEtC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAa7C,SAAS,mBAAmB,CAC1B,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAA4B,EACnG,GAAiC;IAEjC,OAAO,CACL,MAAC,aAAa,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC1G,eAAK,SAAS,EAAC,gCAAgC,aAC7C,KAAC,UAAU,IAAC,SAAS,EAAC,wBAAwB,YAC5C,MAAC,SAAS,IAAC,SAAS,EAAC,uBAAuB,EAAC,IAAI,EAAC,SAAS,aACzD,KAAC,mBAAmB,IAAC,IAAI,EAAE,EAAE,EAAE,gBAAgB,EAAC,qBAAqB,GAAG,EACxE,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,YACpC,KAAK,GACD,IACG,GACD,EACZ,UAAU,IAAI,cAAK,SAAS,EAAC,4BAA4B,YAAE,UAAU,GAAO,IACzE,EACN,KAAC,kBAAkB,IAAC,SAAS,EAAC,sBAAsB,YAClD,cAAK,SAAS,EAAC,8BAA8B,YAAE,QAAQ,GAAO,GAC3C,IACP,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,YAAY,CAAC,CAAC;AAElF,OAAO,EAAE,WAAW,IAAI,mBAAmB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport {\n Disclosure as RACDisclosure,\n Button as RACButton,\n Heading as RACHeading,\n DisclosurePanel as RACDisclosurePanel,\n type DisclosureProps as RACDisclosureProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface UNSTABLE_DisclosureProps\n extends Omit<CommonProps, 'id'>,\n Pick<RACDisclosureProps, 'id' | 'isDisabled' | 'defaultExpanded'> {\n /** The content to display when the disclosure is expanded */\n children: ReactNode;\n /** The title that remains visible and triggers expand/collapse */\n title: StringLikeChildren;\n /** The content to display at the end of the heading */\n contentEnd?: ReactNode;\n}\n\nfunction UNSTABLE_Disclosure(\n { children, title, contentEnd, UNSAFE_className, UNSAFE_style, ...props }: UNSTABLE_DisclosureProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACDisclosure ref={ref} {...props} className={clsx('cim-disclosure', UNSAFE_className)} style={UNSAFE_style}>\n <div className=\"cim-disclosure-heading-wrapper\">\n <RACHeading className=\"cim-disclosure-heading\">\n <RACButton className=\"cim-disclosure-button\" slot=\"trigger\">\n <IconChevronDownFill size={24} UNSAFE_className=\"cim-disclosure-icon\" />\n <Text as=\"span\" variant=\"body-semibold\">\n {title}\n </Text>\n </RACButton>\n </RACHeading>\n {contentEnd && <div className=\"cim-disclosure-content-end\">{contentEnd}</div>}\n </div>\n <RACDisclosurePanel className=\"cim-disclosure-panel\">\n <div className=\"cim-disclosure-panel-content\">{children}</div>\n </RACDisclosurePanel>\n </RACDisclosure>\n );\n}\n\nconst _Disclosure = withStyleProps(forwardRef(UNSTABLE_Disclosure), 'Disclosure');\n\nexport { _Disclosure as UNSTABLE_Disclosure };\n"]}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import { type PopoverProps as RACPopoverProps } from 'react-aria-components';
|
|
2
|
-
interface CollapsibleListProps extends Pick<RACPopoverProps, 'placement' | 'offset' | 'maxHeight' | 'children' | 'triggerRef'> {
|
|
3
|
-
/** A correction amount (in px) to add to the minimum list width. */
|
|
4
|
-
widthCorrection?: number;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Displays a collapsible list activated via a trigger element.
|
|
8
|
-
*
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export declare function CollapsibleList({ children, widthCorrection, ...props }: CollapsibleListProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare namespace CollapsibleList {
|
|
13
|
-
var displayName: string;
|
|
14
|
-
}
|
|
15
1
|
export {};
|
|
16
2
|
//# sourceMappingURL=collapsible-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collapsible-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":""}
|
|
@@ -5,10 +5,8 @@ import { Popover as RACPopover } from 'react-aria-components';
|
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export function CollapsibleList({ children,
|
|
9
|
-
return (_jsx(RACPopover, { ...props, className: "cim-collapsible-list",
|
|
10
|
-
// @ts-expect-error `style` doesn't expect CSS variables
|
|
11
|
-
style: { '--trigger-width-corr': `${widthCorrection}px` }, containerPadding: 16, "data-cim-style-root": true, children: children }));
|
|
8
|
+
export function CollapsibleList({ children, ...props }) {
|
|
9
|
+
return (_jsx(RACPopover, { ...props, className: "cim-collapsible-list", containerPadding: 16, "data-cim-style-root": true, children: children }));
|
|
12
10
|
}
|
|
13
11
|
CollapsibleList.displayName = 'CollapsibleList';
|
|
14
12
|
//# sourceMappingURL=collapsible-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-list.js","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAwC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"collapsible-list.js","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAwC,MAAM,uBAAuB,CAAC;AAKpG;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAwB;IAC1E,OAAO,CACL,KAAC,UAAU,OAAK,KAAK,EAAE,SAAS,EAAC,sBAAsB,EAAC,gBAAgB,EAAE,EAAE,yCACzE,QAAQ,GACE,CACd,CAAC;AACJ,CAAC;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import { Popover as RACPopover, type PopoverProps as RACPopoverProps } from 'react-aria-components';\n\ninterface CollapsibleListProps\n extends Pick<RACPopoverProps, 'placement' | 'offset' | 'maxHeight' | 'children' | 'triggerRef'> {}\n\n/**\n * Displays a collapsible list activated via a trigger element.\n *\n * @internal\n */\nexport function CollapsibleList({ children, ...props }: CollapsibleListProps) {\n return (\n <RACPopover {...props} className=\"cim-collapsible-list\" containerPadding={16} data-cim-style-root>\n {children}\n </RACPopover>\n );\n}\n\nCollapsibleList.displayName = 'CollapsibleList';\n"]}
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Renders a label for a form field.
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare function FormFieldLabel({ children, isRequired, isDisabled, }: {
|
|
7
|
-
children: string | undefined;
|
|
8
|
-
isRequired: boolean | undefined;
|
|
9
|
-
isDisabled?: boolean | undefined;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
-
/**
|
|
12
|
-
* Renders a description for a form field.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function FormFieldDescription({ children }: {
|
|
16
|
-
children: string | undefined;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
-
/**
|
|
19
|
-
* Renders an error message for a form field.
|
|
20
|
-
*
|
|
21
|
-
* Must be rendered unconditionally, as it can be populated with browser validation errors
|
|
22
|
-
* even if an explicit error message isn't provided.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
export declare function FormFieldError({ children }: {
|
|
27
|
-
children: FieldError;
|
|
28
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export {};
|
|
29
2
|
//# sourceMappingURL=form-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/form-field/form-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/form-field/form-field.tsx"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import {
|
|
3
|
+
import { FieldError as RACFieldError, Label as RACLabel, Text as RACText, } from 'react-aria-components';
|
|
4
4
|
import { IconAlertTriangle } from '../../../icons/index.js';
|
|
5
5
|
import { Text } from '../../typography/text.js';
|
|
6
6
|
import { textStyle } from '../../typography/utils.js';
|
|
@@ -45,4 +45,13 @@ function renderFieldError(fieldError, validation) {
|
|
|
45
45
|
function ErrorMessage({ message }) {
|
|
46
46
|
return (_jsxs("div", { className: "cim-form-field-error-message", children: [_jsx("div", { className: "cim-form-field-error-icon-wrapper", "aria-hidden": true, children: _jsx(IconAlertTriangle, {}) }), message] }));
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Renders an error message for `errorMessage` slot.
|
|
50
|
+
* Used by `TagGroup` to show error messages, since `FieldError` is not supported as it is not a form field.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export function FormFieldErrorText({ children }) {
|
|
55
|
+
return (_jsx(RACText, { slot: "errorMessage", className: clsx('cim-form-field-error', textStyle({ variant: 'small', tone: 'critical' })), children: _jsx(ErrorMessage, { message: children }) }));
|
|
56
|
+
}
|
|
48
57
|
//# sourceMappingURL=form-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../../src/components/internal/form-field/form-field.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,KAAK,IAAI,QAAQ,EACjB,IAAI,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../../src/components/internal/form-field/form-field.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,KAAK,IAAI,QAAQ,EACjB,IAAI,IAAI,OAAO,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,UAAU,EACV,UAAU,GAKX;IACC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAC,QAAQ,IACP,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,aAE7G,QAAQ,EACR,UAAU,I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AO,EAAE,KAAK,IAArB,KAAK,CAAoB,CAAC,CACpE,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,OAAO,EAAE,MAAM,GAAI,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,OAAO,EAAuB;IACpD,OAAO,CACL,eAAK,SAAS,EAAC,8BAA8B,aAC3C,cAAK,SAAS,EAAC,mCAAmC,iCAChD,KAAC,iBAAiB,KAAG,GACjB,EACL,OAAO,IACJ,CACP,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAwB;IACnE,OAAO,CACL,KAAC,OAAO,IACN,IAAI,EAAC,cAAc,EACnB,SAAS,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,YAE1F,KAAC,YAAY,IAAC,OAAO,EAAE,QAAQ,GAAI,GAC3B,CACX,CAAC;AACJ,CAAC","sourcesContent":["import clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport {\n FieldError as RACFieldError,\n Label as RACLabel,\n Text as RACText,\n type ValidationResult as RACValidationResult,\n} from 'react-aria-components';\nimport { IconAlertTriangle } from '../../../icons/index.js';\nimport type { FieldError } from '../../types.js';\nimport { Text } from '../../typography/text.js';\nimport { textStyle } from '../../typography/utils.js';\n\n/**\n * Renders a label for a form field.\n * @internal\n */\nexport function FormFieldLabel({\n children,\n isRequired,\n isDisabled,\n}: {\n children: string | undefined;\n isRequired: boolean | undefined;\n isDisabled?: boolean | undefined;\n}) {\n if (!children) {\n return null;\n }\n\n return (\n <RACLabel\n className={clsx('cim-form-field-label', textStyle({ variant: 'medium', tone: isDisabled ? 'muted' : 'base' }))}\n >\n {children}\n {isRequired && (\n <Text tone=\"critical\" as=\"span\" aria-hidden>\n *\n </Text>\n )}\n </RACLabel>\n );\n}\n\n/**\n * Renders a description for a form field.\n * @internal\n */\nexport function FormFieldDescription({ children }: { children: string | undefined }) {\n if (!children) {\n return null;\n }\n\n return (\n <RACText\n slot=\"description\"\n className={clsx('cim-form-field-description', textStyle({ variant: 'small', tone: 'subtle' }))}\n >\n {children}\n </RACText>\n );\n}\n\n/**\n * Renders an error message for a form field.\n *\n * Must be rendered unconditionally, as it can be populated with browser validation errors\n * even if an explicit error message isn't provided.\n *\n * @internal\n */\nexport function FormFieldError({ children }: { children: FieldError }) {\n return (\n <RACFieldError className={clsx('cim-form-field-error', textStyle({ variant: 'small', tone: 'critical' }))}>\n {(validation) => renderFieldError(children, validation)}\n </RACFieldError>\n );\n}\n\nfunction renderFieldError(fieldError: FieldError, validation: RACValidationResult): string | ReactNode | undefined {\n const errors =\n typeof fieldError === 'function' ? fieldError(validation) : (fieldError ?? validation.validationErrors);\n\n if (!errors || !errors.length) {\n return null;\n }\n\n return typeof errors === 'object' ? (\n errors.map((error) => <ErrorMessage key={error} message={error} />)\n ) : (\n <ErrorMessage message={errors} />\n );\n}\n\nfunction ErrorMessage({ message }: { message: string }) {\n return (\n <div className=\"cim-form-field-error-message\">\n <div className=\"cim-form-field-error-icon-wrapper\" aria-hidden>\n <IconAlertTriangle />\n </div>\n {message}\n </div>\n );\n}\n\n/**\n * Renders an error message for `errorMessage` slot.\n * Used by `TagGroup` to show error messages, since `FieldError` is not supported as it is not a form field.\n *\n * @internal\n */\nexport function FormFieldErrorText({ children }: { children: string }) {\n return (\n <RACText\n slot=\"errorMessage\"\n className={clsx('cim-form-field-error', textStyle({ variant: 'small', tone: 'critical' }))}\n >\n <ErrorMessage message={children} />\n </RACText>\n );\n}\n"]}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import type { ReactNode, Ref } from 'react';
|
|
2
|
-
import type { CommonProps, LabellableProps } from '../../types.js';
|
|
3
|
-
interface SpinnerProps extends CommonProps, Omit<LabellableProps, 'label'> {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
spinnerRef?: Ref<HTMLDivElement>;
|
|
6
|
-
size: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Displays a variable-size loading indicator to represent an ongoing operation.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
declare function Spinner({ children, spinnerRef, size, UNSAFE_className, UNSAFE_style, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare namespace Spinner {
|
|
15
|
-
var displayName: string;
|
|
16
|
-
}
|
|
17
1
|
export { Spinner as InternalSpinner };
|
|
18
2
|
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/spinner/spinner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/spinner/spinner.tsx"],"names":[],"mappings":"AA2CA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type MenuItemProps as RACMenuItemProps } from 'react-aria-components';
|
|
2
|
+
import { type MenuProps as RACMenuProps, type MenuItemProps as RACMenuItemProps, type MenuTriggerProps as RACMenuTriggerProps } from 'react-aria-components';
|
|
3
|
+
import type { ActionButtonProps } from '../button/types.js';
|
|
3
4
|
import type { CommonProps, Key, LabellableProps, NavigationProps, CollectionProps, CollectionItem, StringLikeChildren } from '../types.js';
|
|
4
|
-
export interface MenuProps<T extends CollectionItem = CollectionItem> extends CommonProps, CollectionProps<T>, LabellableProps {
|
|
5
|
+
export interface MenuProps<T extends CollectionItem = CollectionItem> extends CommonProps, CollectionProps<T>, LabellableProps, Pick<RACMenuTriggerProps, 'onOpenChange'>, Pick<RACMenuProps<T>, 'onScroll'>, Pick<ActionButtonProps, 'onHoverStart' | 'onHoverEnd'> {
|
|
5
6
|
/** Whether the menu trigger is disabled. */
|
|
6
7
|
isDisabled?: boolean;
|
|
7
8
|
/** Handler that is called when an item is selected. When using `onAction`, all items must have an `id` prop defined. */
|
|
@@ -10,7 +11,7 @@ export interface MenuProps<T extends CollectionItem = CollectionItem> extends Co
|
|
|
10
11
|
/**
|
|
11
12
|
* Displays a collapsible list of options and actions that users can choose from.
|
|
12
13
|
*
|
|
13
|
-
* See [menu usage guidelines](https://ui.cimpress.io/components/menu/
|
|
14
|
+
* See [menu usage guidelines](https://ui.cimpress.io/components/menu/).
|
|
14
15
|
*/
|
|
15
16
|
declare const _Menu: <T extends CollectionItem>(props: MenuProps<T> & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
16
17
|
export { _Menu as Menu };
|
|
@@ -25,7 +26,7 @@ export declare function MenuSection<T extends CollectionItem>({ title, children,
|
|
|
25
26
|
export declare namespace MenuSection {
|
|
26
27
|
var displayName: string;
|
|
27
28
|
}
|
|
28
|
-
export interface MenuItemProps extends NavigationProps, Pick<RACMenuItemProps, 'isDisabled' | 'onAction'> {
|
|
29
|
+
export interface MenuItemProps extends NavigationProps, Pick<RACMenuItemProps, 'isDisabled' | 'onAction' | 'onHoverStart' | 'onHoverEnd'> {
|
|
29
30
|
/** The ID of the item. Has to be unique across all sections and items. */
|
|
30
31
|
id?: Key;
|
|
31
32
|
/** The content to display as the label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,IAAI,YAA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WAAW,aACf,SAAQ,eAAe,EACrB,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC;IACnF,0EAA0E;IAC1E,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,2CAA2C;IAC3C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CA4BhF;yBA5Be,QAAQ;;;AAgCxB,qEAAqE;AACrE,wBAAgB,WAAW,4CAE1B;yBAFe,WAAW"}
|
|
@@ -10,7 +10,7 @@ import { Button } from '../button/button.js';
|
|
|
10
10
|
import { IconButton } from '../button/icon-button.js';
|
|
11
11
|
import { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';
|
|
12
12
|
import { textStyle } from '../typography/utils.js';
|
|
13
|
-
function Menu({ children, isDisabled, onAction, items, ...props }, ref) {
|
|
13
|
+
function Menu({ children, isDisabled, onAction, items, onOpenChange, onScroll, ...props }, ref) {
|
|
14
14
|
const { label, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
if (!label && !ariaLabel && !ariaLabelledBy) {
|
|
@@ -20,12 +20,12 @@ function Menu({ children, isDisabled, onAction, items, ...props }, ref) {
|
|
|
20
20
|
if (items != null && typeof children !== 'function') {
|
|
21
21
|
console.warn('`Menu` requires `children` to be a function when using `items` prop');
|
|
22
22
|
}
|
|
23
|
-
return (_jsxs(RACMenuTrigger, { children: [_jsx(MenuTrigger, { ...props, triggerRef: ref, isDisabled: isDisabled }), _jsx(CollapsibleList, { placement: "bottom start", offset:
|
|
23
|
+
return (_jsxs(RACMenuTrigger, { onOpenChange: onOpenChange, children: [_jsx(MenuTrigger, { ...props, triggerRef: ref, isDisabled: isDisabled }), _jsx(CollapsibleList, { placement: "bottom start", offset: 5, maxHeight: 315, children: _jsx(RACMenu, { className: "cim-menu", onAction: onAction, onScroll: onScroll, items: items, children: children }) })] }));
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Displays a collapsible list of options and actions that users can choose from.
|
|
27
27
|
*
|
|
28
|
-
* See [menu usage guidelines](https://ui.cimpress.io/components/menu/
|
|
28
|
+
* See [menu usage guidelines](https://ui.cimpress.io/components/menu/).
|
|
29
29
|
*/
|
|
30
30
|
const _Menu = withStyleProps(forwardRef(Menu), 'Menu');
|
|
31
31
|
export { _Menu as Menu };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAqC,SAAS,EAAY,MAAM,OAAO,CAAC;AAC/E,OAAO,EACL,MAAM,IAAI,SAAS,EACnB,IAAI,IAAI,OAAO,EACf,QAAQ,IAAI,WAAW,EAEvB,WAAW,IAAI,cAAc,EAC7B,WAAW,IAAI,cAAc,EAC7B,SAAS,IAAI,YAAY,EACzB,UAAU,IAAI,aAAa,EAC3B,IAAI,IAAI,OAAO,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAUnF,OAAO,EAAE,SAA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AQ,CAAC,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEhH,OAAO,CACL,KAAC,WAAW,OAAK,KAAK,EAAE,SAAS,EAAC,eAAe,EAAC,SAAS,EAAE,SAAS,YACnE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACnB,8BACG,IAAI,EAEL,eAAK,SAAS,EAAC,oBAAoB,aACjC,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YACjG,QAAQ,GACD,EAET,WAAW,IAAI,CACd,KAAC,OAAO,IACN,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,YAEhF,WAAW,GACJ,CACX,IACG,IACL,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,qEAAqE;AACrE,MAAM,UAAU,WAAW;IACzB,OAAO,KAAC,YAAY,IAAC,SAAS,EAAC,kBAAkB,GAAG,CAAC;AACvD,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ReactNode, type ForwardedRef, useEffect, type Ref } from 'react';\nimport {\n Header as RACHeader,\n Menu as RACMenu,\n MenuItem as RACMenuItem,\n type MenuItemProps as RACMenuItemProps,\n MenuTrigger as RACMenuTrigger,\n MenuSection as RACMenuSection,\n Separator as RACSeparator,\n Collection as RACCollection,\n Text as RACText,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport type {\n CommonProps,\n Key,\n LabellableProps,\n NavigationProps,\n CollectionProps,\n CollectionItem,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface MenuProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n CollectionProps<T>,\n LabellableProps {\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Handler that is called when an item is selected. When using `onAction`, all items must have an `id` prop defined. */\n onAction?: (key: Key) => void;\n}\n\nfunction Menu<T extends CollectionItem>(\n { children, isDisabled, onAction, items, ...props }: MenuProps<T>,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const { label, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('`Menu` requires one of `label` / `aria-label` / `aria-labelledby` for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Menu` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuTrigger>\n <MenuTrigger {...props} triggerRef={ref} isDisabled={isDisabled} />\n <CollapsibleList\n placement=\"bottom start\"\n offset={1} // Account for border\n maxHeight={315}\n >\n <RACMenu className=\"cim-menu\" onAction={onAction} items={items}>\n {children}\n </RACMenu>\n </CollapsibleList>\n </RACMenuTrigger>\n );\n}\n\n/**\n * Displays a collapsible list of options and actions that users can choose from.\n *\n * See [menu usage guidelines](https://ui.cimpress.io/components/menu/usage-guidelines/).\n */\nconst _Menu = withStyleProps(forwardRef(Menu), 'Menu');\n\nexport { _Menu as Menu };\n\ninterface MenuTriggerProps extends CommonProps, LabellableProps {\n triggerRef: Ref<HTMLButtonElement>;\n isDisabled?: boolean;\n}\n\nfunction MenuTrigger({ label, triggerRef, ...props }: MenuTriggerProps) {\n if (label) {\n return (\n <Button\n {...props}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n iconEnd={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n >\n {label}\n </Button>\n );\n }\n\n return (\n <IconButton\n {...props}\n // The warning for missing aria-label would have been already emitted in the <Menu> component, so this is fine\n aria-label={props['aria-label'] ?? ''}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n icon={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n />\n );\n}\n\nexport interface MenuSectionProps<T extends CollectionItem = CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Menu` into a section. */\nexport function MenuSection<T extends CollectionItem>({ title, children, items, ...props }: MenuSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`MenuSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuSection {...props} className=\"cim-menu-section\">\n <RACHeader className={clsx('cim-menu-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}>\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACMenuSection>\n );\n}\n\nMenuSection.displayName = 'MenuSection';\n\nexport interface MenuItemProps extends NavigationProps, Pick<RACMenuItemProps, 'isDisabled' | 'onAction'> {\n /** The ID of the item. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the label. */\n children: StringLikeChildren;\n /** Additional description for the menu item. */\n description?: string;\n /** An icon representing the menu item. */\n icon?: ReactNode;\n}\n\n/** Renders a single list item within `Menu`. */\nexport function MenuItem({ children, description, icon, ...props }: MenuItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACMenuItem {...props} className=\"cim-menu-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n {icon}\n\n <div className=\"cim-menu-item-text\">\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n\n {description && (\n <RACText\n slot=\"description\"\n className={textStyle({ variant: 'small', tone: isDisabled ? 'muted' : 'subtle' })}\n >\n {description}\n </RACText>\n )}\n </div>\n </>\n )}\n </RACMenuItem>\n );\n}\n\nMenuItem.displayName = 'MenuItem';\n\n/** Renders a horizontal divider between list items within `Menu`. */\nexport function MenuDivider() {\n return <RACSeparator className=\"cim-menu-divider\" />;\n}\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAqC,SAAS,EAAY,MAAM,OAAO,CAAC;AAC/E,OAAO,EACL,MAAM,IAAI,SAAS,EACnB,IAAI,IAAI,OAAO,EAEf,QAAQ,IAAI,WAAW,EAEvB,WAAW,IAAI,cAAc,EAE7B,WAAW,IAAI,cAAc,EAC7B,SAAS,IAAI,YAAY,EACzB,UAAU,IAAI,aAAa,EAC3B,IAAI,IAAI,OAAO,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAUnF,OAAO,EAAE,SAAS,EAAE,MAAM,w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,SAAS,GACb,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEhH,OAAO,CACL,KAAC,WAAW,OAAK,KAAK,EAAE,SAAS,EAAC,eAAe,EAAC,SAAS,EAAE,SAAS,YACnE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACnB,8BACG,IAAI,EAEL,eAAK,SAAS,EAAC,oBAAoB,aACjC,KAAC,OAAO,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YACjG,QAAQ,GACD,EAET,WAAW,IAAI,CACd,KAAC,OAAO,IACN,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,YAEhF,WAAW,GACJ,CACX,IACG,IACL,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,qEAAqE;AACrE,MAAM,UAAU,WAAW;IACzB,OAAO,KAAC,YAAY,IAAC,SAAS,EAAC,kBAAkB,GAAG,CAAC;AACvD,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ReactNode, type ForwardedRef, useEffect, type Ref } from 'react';\nimport {\n Header as RACHeader,\n Menu as RACMenu,\n type MenuProps as RACMenuProps,\n MenuItem as RACMenuItem,\n type MenuItemProps as RACMenuItemProps,\n MenuTrigger as RACMenuTrigger,\n type MenuTriggerProps as RACMenuTriggerProps,\n MenuSection as RACMenuSection,\n Separator as RACSeparator,\n Collection as RACCollection,\n Text as RACText,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconChevronDownFill } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport type { ActionButtonProps } from '../button/types.js';\nimport { CollapsibleList } from '../internal/collapsible-list/collapsible-list.js';\nimport type {\n CommonProps,\n Key,\n LabellableProps,\n NavigationProps,\n CollectionProps,\n CollectionItem,\n StringLikeChildren,\n} from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface MenuProps<T extends CollectionItem = CollectionItem>\n extends CommonProps,\n CollectionProps<T>,\n LabellableProps,\n Pick<RACMenuTriggerProps, 'onOpenChange'>,\n Pick<RACMenuProps<T>, 'onScroll'>,\n Pick<ActionButtonProps, 'onHoverStart' | 'onHoverEnd'> {\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Handler that is called when an item is selected. When using `onAction`, all items must have an `id` prop defined. */\n onAction?: (key: Key) => void;\n}\n\nfunction Menu<T extends CollectionItem>(\n { children, isDisabled, onAction, items, onOpenChange, onScroll, ...props }: MenuProps<T>,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const { label, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('`Menu` requires one of `label` / `aria-label` / `aria-labelledby` for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n if (items != null && typeof children !== 'function') {\n console.warn('`Menu` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuTrigger onOpenChange={onOpenChange}>\n <MenuTrigger {...props} triggerRef={ref} isDisabled={isDisabled} />\n <CollapsibleList\n placement=\"bottom start\"\n offset={5} // 1px border + 4px actual offset\n maxHeight={315}\n >\n <RACMenu className=\"cim-menu\" onAction={onAction} onScroll={onScroll} items={items}>\n {children}\n </RACMenu>\n </CollapsibleList>\n </RACMenuTrigger>\n );\n}\n\n/**\n * Displays a collapsible list of options and actions that users can choose from.\n *\n * See [menu usage guidelines](https://ui.cimpress.io/components/menu/).\n */\nconst _Menu = withStyleProps(forwardRef(Menu), 'Menu');\n\nexport { _Menu as Menu };\n\ninterface MenuTriggerProps\n extends CommonProps,\n LabellableProps,\n Pick<ActionButtonProps, 'onHoverStart' | 'onHoverEnd'> {\n triggerRef: Ref<HTMLButtonElement>;\n isDisabled?: boolean;\n}\n\nfunction MenuTrigger({ label, triggerRef, ...props }: MenuTriggerProps) {\n if (label) {\n return (\n <Button\n {...props}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n iconEnd={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n >\n {label}\n </Button>\n );\n }\n\n return (\n <IconButton\n {...props}\n // The warning for missing aria-label would have been already emitted in the <Menu> component, so this is fine\n aria-label={props['aria-label'] ?? ''}\n variant=\"secondary\"\n size=\"medium\"\n ref={triggerRef}\n icon={<IconChevronDownFill UNSAFE_className=\"cim-menu-trigger-icon\" />}\n />\n );\n}\n\nexport interface MenuSectionProps<T extends CollectionItem = CollectionItem> extends CollectionProps<T> {\n /** The ID of the section. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the section title. */\n title: string;\n}\n\n/** Groups list items within `Menu` into a section. */\nexport function MenuSection<T extends CollectionItem>({ title, children, items, ...props }: MenuSectionProps<T>) {\n if (items != null && typeof children !== 'function') {\n console.warn('`MenuSection` requires `children` to be a function when using `items` prop');\n }\n\n return (\n <RACMenuSection {...props} className=\"cim-menu-section\">\n <RACHeader className={clsx('cim-menu-section-header', textStyle({ variant: 'small-semibold', tone: 'subtle' }))}>\n {title}\n </RACHeader>\n <RACCollection items={items}>{children}</RACCollection>\n </RACMenuSection>\n );\n}\n\nMenuSection.displayName = 'MenuSection';\n\nexport interface MenuItemProps\n extends NavigationProps,\n Pick<RACMenuItemProps, 'isDisabled' | 'onAction' | 'onHoverStart' | 'onHoverEnd'> {\n /** The ID of the item. Has to be unique across all sections and items. */\n id?: Key;\n /** The content to display as the label. */\n children: StringLikeChildren;\n /** Additional description for the menu item. */\n description?: string;\n /** An icon representing the menu item. */\n icon?: ReactNode;\n}\n\n/** Renders a single list item within `Menu`. */\nexport function MenuItem({ children, description, icon, ...props }: MenuItemProps) {\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n return (\n <RACMenuItem {...props} className=\"cim-menu-item\" textValue={textValue}>\n {({ isDisabled }) => (\n <>\n {icon}\n\n <div className=\"cim-menu-item-text\">\n <RACText slot=\"label\" className={textStyle({ variant: 'body', tone: isDisabled ? 'muted' : 'base' })}>\n {children}\n </RACText>\n\n {description && (\n <RACText\n slot=\"description\"\n className={textStyle({ variant: 'small', tone: isDisabled ? 'muted' : 'subtle' })}\n >\n {description}\n </RACText>\n )}\n </div>\n </>\n )}\n </RACMenuItem>\n );\n}\n\nMenuItem.displayName = 'MenuItem';\n\n/** Renders a horizontal divider between list items within `Menu`. */\nexport function MenuDivider() {\n return <RACSeparator className=\"cim-menu-divider\" />;\n}\n\nMenuDivider.displayName = 'MenuDivider';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type ModalOverlayProps as RACModalOverlayProps } from 'react-aria-components';
|
|
3
|
+
import type { CommonProps } from '../types.js';
|
|
4
|
+
export interface UNSTABLE_ModalProps extends CommonProps, Pick<RACModalOverlayProps, 'isDismissable'> {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
size?: 'small' | 'medium' | 'large';
|
|
8
|
+
/** Whether the modal is open (controlled). */
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
/** Whether the modal is open by default (uncontrolled). */
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
/** Handler that is called when the modal's open state changes. */
|
|
13
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function UNSTABLE_DialogTrigger({ children }: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function UNSTABLE_Modal({ children, title, size, UNSAFE_className, UNSAFE_style, isDismissable, isOpen, defaultOpen, onOpenChange, ...props }: UNSTABLE_ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAML,KAAK,iBAAiB,IAAI,oBAAoB,EAC/C,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,mBAAoB,SAAQ,WAAW,EAAE,IAAI,CAAC,oBAAoB,EAAE,eAAe,CAAC;IACnG,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAE3E;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,IAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAoB,EACpB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAsCrB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Heading as RACHeading, Dialog as RACDialog, DialogTrigger as RACDialogTrigger, Modal as RACModal, ModalOverlay as RACModalOverlay, } from 'react-aria-components';
|
|
5
|
+
import { UNSTABLE_IconClose } from '../../icons/index.js';
|
|
6
|
+
import { IconButton } from '../button/icon-button.js';
|
|
7
|
+
import { textStyle } from '../typography/utils.js';
|
|
8
|
+
export function UNSTABLE_DialogTrigger({ children }) {
|
|
9
|
+
return _jsx(RACDialogTrigger, { children: children });
|
|
10
|
+
}
|
|
11
|
+
export function UNSTABLE_Modal({ children, title, size = 'medium', UNSAFE_className, UNSAFE_style, isDismissable = true, isOpen, defaultOpen, onOpenChange, ...props }) {
|
|
12
|
+
return (_jsx(RACModalOverlay, { className: "cim-modal-overlay", isDismissable: isDismissable, isOpen: isOpen, defaultOpen: defaultOpen, onOpenChange: onOpenChange, "data-cim-style-root": true, children: _jsx(RACModal, { className: clsx('cim-modal', UNSAFE_className, {
|
|
13
|
+
'cim-modal-small': size === 'small',
|
|
14
|
+
'cim-modal-medium': size === 'medium',
|
|
15
|
+
'cim-modal-large': size === 'large',
|
|
16
|
+
}), children: _jsxs(RACDialog, { ...props, className: clsx('cim-modal-dialog'), style: UNSAFE_style, children: [_jsxs("div", { className: "cim-modal-header", children: [title && (_jsx(RACHeading, { slot: "title", className: clsx('cim-modal-title', textStyle({ variant: 'title-3' })), children: title })), _jsx(IconButton, { slot: "close", icon: _jsx(UNSTABLE_IconClose, {}), variant: "tertiary", size: "small", "aria-label": "Close modal", UNSAFE_className: "cim-modal-close-button" })] }), _jsx("div", { className: "cim-modal-content", children: children })] }) }) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=modal.js.map
|