@cimpress-ui/react 0.0.0-20250203144600
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 +21 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts +19 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.js +32 -0
- package/dist/commonjs/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/commonjs/components/button/button.d.ts +11 -0
- package/dist/commonjs/components/button/button.d.ts.map +1 -0
- package/dist/commonjs/components/button/button.js +31 -0
- package/dist/commonjs/components/button/button.js.map +1 -0
- package/dist/commonjs/components/button/constants.d.ts +3 -0
- package/dist/commonjs/components/button/constants.d.ts.map +1 -0
- package/dist/commonjs/components/button/constants.js +9 -0
- package/dist/commonjs/components/button/constants.js.map +1 -0
- package/dist/commonjs/components/button/icon-button.d.ts +11 -0
- package/dist/commonjs/components/button/icon-button.d.ts.map +1 -0
- package/dist/commonjs/components/button/icon-button.js +31 -0
- package/dist/commonjs/components/button/icon-button.js.map +1 -0
- package/dist/commonjs/components/button/icon-link-button.d.ts +13 -0
- package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -0
- package/dist/commonjs/components/button/icon-link-button.js +23 -0
- package/dist/commonjs/components/button/icon-link-button.js.map +1 -0
- package/dist/commonjs/components/button/link-button.d.ts +13 -0
- package/dist/commonjs/components/button/link-button.d.ts.map +1 -0
- package/dist/commonjs/components/button/link-button.js +23 -0
- package/dist/commonjs/components/button/link-button.js.map +1 -0
- package/dist/commonjs/components/button/types.d.ts +68 -0
- package/dist/commonjs/components/button/types.d.ts.map +1 -0
- package/dist/commonjs/components/button/types.js +3 -0
- package/dist/commonjs/components/button/types.js.map +1 -0
- 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 +21 -0
- package/dist/commonjs/components/checkbox/checkbox-group.d.ts.map +1 -0
- package/dist/commonjs/components/checkbox/checkbox-group.js +37 -0
- package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -0
- package/dist/commonjs/components/checkbox/checkbox.d.ts +14 -0
- package/dist/commonjs/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/commonjs/components/checkbox/checkbox.js +32 -0
- package/dist/commonjs/components/checkbox/checkbox.js.map +1 -0
- package/dist/commonjs/components/combo-box/combo-box.d.ts +38 -0
- package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -0
- package/dist/commonjs/components/combo-box/combo-box.js +60 -0
- package/dist/commonjs/components/combo-box/combo-box.js.map +1 -0
- 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/form/form.d.ts +12 -0
- package/dist/commonjs/components/form/form.d.ts.map +1 -0
- package/dist/commonjs/components/form/form.js +23 -0
- package/dist/commonjs/components/form/form.js.map +1 -0
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts +2 -0
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -0
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js +15 -0
- package/dist/commonjs/components/internal/collapsible-list/collapsible-list.js.map +1 -0
- package/dist/commonjs/components/internal/form-field/form-field.d.ts +2 -0
- package/dist/commonjs/components/internal/form-field/form-field.d.ts.map +1 -0
- package/dist/commonjs/components/internal/form-field/form-field.js +66 -0
- package/dist/commonjs/components/internal/form-field/form-field.js.map +1 -0
- package/dist/commonjs/components/internal/spinner/spinner.d.ts +2 -0
- package/dist/commonjs/components/internal/spinner/spinner.d.ts.map +1 -0
- package/dist/commonjs/components/internal/spinner/spinner.js +19 -0
- package/dist/commonjs/components/internal/spinner/spinner.js.map +1 -0
- package/dist/commonjs/components/menu/menu.d.ts +49 -0
- package/dist/commonjs/components/menu/menu.d.ts.map +1 -0
- package/dist/commonjs/components/menu/menu.js +66 -0
- package/dist/commonjs/components/menu/menu.js.map +1 -0
- 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 +21 -0
- package/dist/commonjs/components/radio/radio-group.d.ts.map +1 -0
- package/dist/commonjs/components/radio/radio-group.js +37 -0
- package/dist/commonjs/components/radio/radio-group.js.map +1 -0
- package/dist/commonjs/components/radio/radio.d.ts +14 -0
- package/dist/commonjs/components/radio/radio.d.ts.map +1 -0
- package/dist/commonjs/components/radio/radio.js +31 -0
- package/dist/commonjs/components/radio/radio.js.map +1 -0
- package/dist/commonjs/components/select/select.d.ts +31 -0
- package/dist/commonjs/components/select/select.d.ts.map +1 -0
- package/dist/commonjs/components/select/select.js +53 -0
- package/dist/commonjs/components/select/select.js.map +1 -0
- package/dist/commonjs/components/spacing/box/box.d.ts +10 -0
- package/dist/commonjs/components/spacing/box/box.d.ts.map +1 -0
- package/dist/commonjs/components/spacing/box/box.js +14 -0
- package/dist/commonjs/components/spacing/box/box.js.map +1 -0
- package/dist/commonjs/components/spacing/stack/stack.d.ts +35 -0
- package/dist/commonjs/components/spacing/stack/stack.d.ts.map +1 -0
- package/dist/commonjs/components/spacing/stack/stack.js +31 -0
- package/dist/commonjs/components/spacing/stack/stack.js.map +1 -0
- package/dist/commonjs/components/spacing/types.d.ts +32 -0
- package/dist/commonjs/components/spacing/types.d.ts.map +1 -0
- package/dist/commonjs/components/spacing/types.js +46 -0
- package/dist/commonjs/components/spacing/types.js.map +1 -0
- package/dist/commonjs/components/spinner/spinner.d.ts +16 -0
- package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -0
- package/dist/commonjs/components/spinner/spinner.js +38 -0
- package/dist/commonjs/components/spinner/spinner.js.map +1 -0
- package/dist/commonjs/components/table/contexts/focus.d.ts +11 -0
- package/dist/commonjs/components/table/contexts/focus.d.ts.map +1 -0
- package/dist/commonjs/components/table/contexts/focus.js +42 -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 +27 -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 +114 -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 +16 -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/tag/tag-group.d.ts +16 -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 +13 -0
- package/dist/commonjs/components/tag/tag.d.ts.map +1 -0
- package/dist/commonjs/components/tag/tag.js +21 -0
- package/dist/commonjs/components/tag/tag.js.map +1 -0
- package/dist/commonjs/components/text-inputs/text-area.d.ts +8 -0
- package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -0
- package/dist/commonjs/components/text-inputs/text-area.js +29 -0
- package/dist/commonjs/components/text-inputs/text-area.js.map +1 -0
- package/dist/commonjs/components/text-inputs/text-field.d.ts +12 -0
- package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -0
- package/dist/commonjs/components/text-inputs/text-field.js +32 -0
- package/dist/commonjs/components/text-inputs/text-field.js.map +1 -0
- 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 +156 -0
- package/dist/commonjs/components/types.d.ts.map +1 -0
- package/dist/commonjs/components/types.js +3 -0
- package/dist/commonjs/components/types.js.map +1 -0
- package/dist/commonjs/components/typography/link.d.ts +18 -0
- package/dist/commonjs/components/typography/link.d.ts.map +1 -0
- package/dist/commonjs/components/typography/link.js +26 -0
- package/dist/commonjs/components/typography/link.js.map +1 -0
- package/dist/commonjs/components/typography/text.d.ts +15 -0
- package/dist/commonjs/components/typography/text.d.ts.map +1 -0
- package/dist/commonjs/components/typography/text.js +28 -0
- package/dist/commonjs/components/typography/text.js.map +1 -0
- package/dist/commonjs/components/typography/types.d.ts +23 -0
- package/dist/commonjs/components/typography/types.d.ts.map +1 -0
- package/dist/commonjs/components/typography/types.js +3 -0
- package/dist/commonjs/components/typography/types.js.map +1 -0
- package/dist/commonjs/components/typography/utils.d.ts +4 -0
- package/dist/commonjs/components/typography/utils.d.ts.map +1 -0
- package/dist/commonjs/components/typography/utils.js +18 -0
- package/dist/commonjs/components/typography/utils.js.map +1 -0
- 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/forward-ref.d.ts +3 -0
- package/dist/commonjs/forward-ref.d.ts.map +1 -0
- package/dist/commonjs/forward-ref.js +21 -0
- package/dist/commonjs/forward-ref.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 +8 -0
- package/dist/commonjs/icons/add.d.ts.map +1 -0
- package/dist/commonjs/icons/add.js +24 -0
- package/dist/commonjs/icons/add.js.map +1 -0
- package/dist/commonjs/icons/alert-triangle.d.ts +8 -0
- package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -0
- package/dist/commonjs/icons/alert-triangle.js +24 -0
- package/dist/commonjs/icons/alert-triangle.js.map +1 -0
- 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 +8 -0
- package/dist/commonjs/icons/checkmark-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/checkmark-circle-fill.js +24 -0
- package/dist/commonjs/icons/checkmark-circle-fill.js.map +1 -0
- 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 +8 -0
- package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -0
- package/dist/commonjs/icons/checkmark-small.js +24 -0
- package/dist/commonjs/icons/checkmark-small.js.map +1 -0
- package/dist/commonjs/icons/checkmark.d.ts +8 -0
- package/dist/commonjs/icons/checkmark.d.ts.map +1 -0
- package/dist/commonjs/icons/checkmark.js +24 -0
- package/dist/commonjs/icons/checkmark.js.map +1 -0
- package/dist/commonjs/icons/chevron-down-fill.d.ts +8 -0
- package/dist/commonjs/icons/chevron-down-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/chevron-down-fill.js +24 -0
- package/dist/commonjs/icons/chevron-down-fill.js.map +1 -0
- package/dist/commonjs/icons/error-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/error-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/error-circle-fill.js +24 -0
- package/dist/commonjs/icons/error-circle-fill.js.map +1 -0
- package/dist/commonjs/icons/index.d.ts +24 -0
- package/dist/commonjs/icons/index.d.ts.map +1 -0
- package/dist/commonjs/icons/index.js +51 -0
- package/dist/commonjs/icons/index.js.map +1 -0
- 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 +8 -0
- package/dist/commonjs/icons/minus-small.d.ts.map +1 -0
- package/dist/commonjs/icons/minus-small.js +24 -0
- package/dist/commonjs/icons/minus-small.js.map +1 -0
- 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 +45 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +58 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/providers/router/router-provider.d.ts +20 -0
- package/dist/commonjs/providers/router/router-provider.d.ts.map +1 -0
- package/dist/commonjs/providers/router/router-provider.js +15 -0
- package/dist/commonjs/providers/router/router-provider.js.map +1 -0
- package/dist/commonjs/providers/ssr/ssr-provider.d.ts +17 -0
- package/dist/commonjs/providers/ssr/ssr-provider.d.ts.map +1 -0
- package/dist/commonjs/providers/ssr/ssr-provider.js +20 -0
- package/dist/commonjs/providers/ssr/ssr-provider.js.map +1 -0
- 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 +21 -0
- package/dist/commonjs/with-style-props.d.ts.map +1 -0
- package/dist/commonjs/with-style-props.js +29 -0
- package/dist/commonjs/with-style-props.js.map +1 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts +19 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +25 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/esm/components/button/button.d.ts +11 -0
- package/dist/esm/components/button/button.d.ts.map +1 -0
- package/dist/esm/components/button/button.js +25 -0
- package/dist/esm/components/button/button.js.map +1 -0
- package/dist/esm/components/button/constants.d.ts +3 -0
- package/dist/esm/components/button/constants.d.ts.map +1 -0
- package/dist/esm/components/button/constants.js +6 -0
- package/dist/esm/components/button/constants.js.map +1 -0
- package/dist/esm/components/button/icon-button.d.ts +11 -0
- package/dist/esm/components/button/icon-button.d.ts.map +1 -0
- package/dist/esm/components/button/icon-button.js +25 -0
- package/dist/esm/components/button/icon-button.js.map +1 -0
- package/dist/esm/components/button/icon-link-button.d.ts +13 -0
- package/dist/esm/components/button/icon-link-button.d.ts.map +1 -0
- package/dist/esm/components/button/icon-link-button.js +17 -0
- package/dist/esm/components/button/icon-link-button.js.map +1 -0
- package/dist/esm/components/button/link-button.d.ts +13 -0
- package/dist/esm/components/button/link-button.d.ts.map +1 -0
- package/dist/esm/components/button/link-button.js +17 -0
- package/dist/esm/components/button/link-button.js.map +1 -0
- package/dist/esm/components/button/types.d.ts +68 -0
- package/dist/esm/components/button/types.d.ts.map +1 -0
- package/dist/esm/components/button/types.js +2 -0
- package/dist/esm/components/button/types.js.map +1 -0
- 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 +21 -0
- package/dist/esm/components/checkbox/checkbox-group.d.ts.map +1 -0
- package/dist/esm/components/checkbox/checkbox-group.js +31 -0
- package/dist/esm/components/checkbox/checkbox-group.js.map +1 -0
- package/dist/esm/components/checkbox/checkbox.d.ts +14 -0
- package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/esm/components/checkbox/checkbox.js +26 -0
- package/dist/esm/components/checkbox/checkbox.js.map +1 -0
- package/dist/esm/components/combo-box/combo-box.d.ts +38 -0
- package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -0
- package/dist/esm/components/combo-box/combo-box.js +52 -0
- package/dist/esm/components/combo-box/combo-box.js.map +1 -0
- 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/form/form.d.ts +12 -0
- package/dist/esm/components/form/form.d.ts.map +1 -0
- package/dist/esm/components/form/form.js +17 -0
- package/dist/esm/components/form/form.js.map +1 -0
- package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts +2 -0
- package/dist/esm/components/internal/collapsible-list/collapsible-list.d.ts.map +1 -0
- package/dist/esm/components/internal/collapsible-list/collapsible-list.js +12 -0
- package/dist/esm/components/internal/collapsible-list/collapsible-list.js.map +1 -0
- package/dist/esm/components/internal/form-field/form-field.d.ts +2 -0
- package/dist/esm/components/internal/form-field/form-field.d.ts.map +1 -0
- package/dist/esm/components/internal/form-field/form-field.js +57 -0
- package/dist/esm/components/internal/form-field/form-field.js.map +1 -0
- package/dist/esm/components/internal/spinner/spinner.d.ts +2 -0
- package/dist/esm/components/internal/spinner/spinner.d.ts.map +1 -0
- package/dist/esm/components/internal/spinner/spinner.js +14 -0
- package/dist/esm/components/internal/spinner/spinner.js.map +1 -0
- package/dist/esm/components/menu/menu.d.ts +49 -0
- package/dist/esm/components/menu/menu.d.ts.map +1 -0
- package/dist/esm/components/menu/menu.js +57 -0
- package/dist/esm/components/menu/menu.js.map +1 -0
- 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 +21 -0
- package/dist/esm/components/radio/radio-group.d.ts.map +1 -0
- package/dist/esm/components/radio/radio-group.js +31 -0
- package/dist/esm/components/radio/radio-group.js.map +1 -0
- package/dist/esm/components/radio/radio.d.ts +14 -0
- package/dist/esm/components/radio/radio.d.ts.map +1 -0
- package/dist/esm/components/radio/radio.js +25 -0
- package/dist/esm/components/radio/radio.js.map +1 -0
- package/dist/esm/components/select/select.d.ts +31 -0
- package/dist/esm/components/select/select.d.ts.map +1 -0
- package/dist/esm/components/select/select.js +45 -0
- package/dist/esm/components/select/select.js.map +1 -0
- package/dist/esm/components/spacing/box/box.d.ts +10 -0
- package/dist/esm/components/spacing/box/box.d.ts.map +1 -0
- package/dist/esm/components/spacing/box/box.js +11 -0
- package/dist/esm/components/spacing/box/box.js.map +1 -0
- package/dist/esm/components/spacing/stack/stack.d.ts +35 -0
- package/dist/esm/components/spacing/stack/stack.d.ts.map +1 -0
- package/dist/esm/components/spacing/stack/stack.js +25 -0
- package/dist/esm/components/spacing/stack/stack.js.map +1 -0
- package/dist/esm/components/spacing/types.d.ts +32 -0
- package/dist/esm/components/spacing/types.d.ts.map +1 -0
- package/dist/esm/components/spacing/types.js +43 -0
- package/dist/esm/components/spacing/types.js.map +1 -0
- package/dist/esm/components/spinner/spinner.d.ts +16 -0
- package/dist/esm/components/spinner/spinner.d.ts.map +1 -0
- package/dist/esm/components/spinner/spinner.js +35 -0
- package/dist/esm/components/spinner/spinner.js.map +1 -0
- package/dist/esm/components/table/contexts/focus.d.ts +11 -0
- package/dist/esm/components/table/contexts/focus.d.ts.map +1 -0
- package/dist/esm/components/table/contexts/focus.js +38 -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 +24 -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 +111 -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 +10 -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/tag/tag-group.d.ts +16 -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 +13 -0
- package/dist/esm/components/tag/tag.d.ts.map +1 -0
- package/dist/esm/components/tag/tag.js +15 -0
- package/dist/esm/components/tag/tag.js.map +1 -0
- package/dist/esm/components/text-inputs/text-area.d.ts +8 -0
- package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -0
- package/dist/esm/components/text-inputs/text-area.js +23 -0
- package/dist/esm/components/text-inputs/text-area.js.map +1 -0
- package/dist/esm/components/text-inputs/text-field.d.ts +12 -0
- package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -0
- package/dist/esm/components/text-inputs/text-field.js +26 -0
- package/dist/esm/components/text-inputs/text-field.js.map +1 -0
- 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 +156 -0
- package/dist/esm/components/types.d.ts.map +1 -0
- package/dist/esm/components/types.js +2 -0
- package/dist/esm/components/types.js.map +1 -0
- package/dist/esm/components/typography/link.d.ts +18 -0
- package/dist/esm/components/typography/link.d.ts.map +1 -0
- package/dist/esm/components/typography/link.js +20 -0
- package/dist/esm/components/typography/link.js.map +1 -0
- package/dist/esm/components/typography/text.d.ts +15 -0
- package/dist/esm/components/typography/text.d.ts.map +1 -0
- package/dist/esm/components/typography/text.js +22 -0
- package/dist/esm/components/typography/text.js.map +1 -0
- package/dist/esm/components/typography/types.d.ts +23 -0
- package/dist/esm/components/typography/types.d.ts.map +1 -0
- package/dist/esm/components/typography/types.js +2 -0
- package/dist/esm/components/typography/types.js.map +1 -0
- package/dist/esm/components/typography/utils.d.ts +4 -0
- package/dist/esm/components/typography/utils.d.ts.map +1 -0
- package/dist/esm/components/typography/utils.js +12 -0
- package/dist/esm/components/typography/utils.js.map +1 -0
- 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/forward-ref.d.ts +3 -0
- package/dist/esm/forward-ref.d.ts.map +1 -0
- package/dist/esm/forward-ref.js +20 -0
- package/dist/esm/forward-ref.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 +8 -0
- package/dist/esm/icons/add.d.ts.map +1 -0
- package/dist/esm/icons/add.js +19 -0
- package/dist/esm/icons/add.js.map +1 -0
- package/dist/esm/icons/alert-triangle.d.ts +8 -0
- package/dist/esm/icons/alert-triangle.d.ts.map +1 -0
- package/dist/esm/icons/alert-triangle.js +19 -0
- package/dist/esm/icons/alert-triangle.js.map +1 -0
- 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 +8 -0
- package/dist/esm/icons/checkmark-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/checkmark-circle-fill.js +19 -0
- package/dist/esm/icons/checkmark-circle-fill.js.map +1 -0
- 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 +8 -0
- package/dist/esm/icons/checkmark-small.d.ts.map +1 -0
- package/dist/esm/icons/checkmark-small.js +19 -0
- package/dist/esm/icons/checkmark-small.js.map +1 -0
- package/dist/esm/icons/checkmark.d.ts +8 -0
- package/dist/esm/icons/checkmark.d.ts.map +1 -0
- package/dist/esm/icons/checkmark.js +19 -0
- package/dist/esm/icons/checkmark.js.map +1 -0
- package/dist/esm/icons/chevron-down-fill.d.ts +8 -0
- package/dist/esm/icons/chevron-down-fill.d.ts.map +1 -0
- package/dist/esm/icons/chevron-down-fill.js +19 -0
- package/dist/esm/icons/chevron-down-fill.js.map +1 -0
- package/dist/esm/icons/error-circle-fill.d.ts +8 -0
- package/dist/esm/icons/error-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/error-circle-fill.js +19 -0
- package/dist/esm/icons/error-circle-fill.js.map +1 -0
- package/dist/esm/icons/index.d.ts +24 -0
- package/dist/esm/icons/index.d.ts.map +1 -0
- package/dist/esm/icons/index.js +23 -0
- package/dist/esm/icons/index.js.map +1 -0
- 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 +8 -0
- package/dist/esm/icons/minus-small.d.ts.map +1 -0
- package/dist/esm/icons/minus-small.js +19 -0
- package/dist/esm/icons/minus-small.js.map +1 -0
- 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 +45 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +42 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/providers/router/router-provider.d.ts +20 -0
- package/dist/esm/providers/router/router-provider.d.ts.map +1 -0
- package/dist/esm/providers/router/router-provider.js +12 -0
- package/dist/esm/providers/router/router-provider.js.map +1 -0
- package/dist/esm/providers/ssr/ssr-provider.d.ts +17 -0
- package/dist/esm/providers/ssr/ssr-provider.d.ts.map +1 -0
- package/dist/esm/providers/ssr/ssr-provider.js +17 -0
- package/dist/esm/providers/ssr/ssr-provider.js.map +1 -0
- 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 +21 -0
- package/dist/esm/with-style-props.d.ts.map +1 -0
- package/dist/esm/with-style-props.js +23 -0
- package/dist/esm/with-style-props.js.map +1 -0
- package/dist-styles/styles.css +2 -0
- package/package.json +152 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonProps as RACButtonProps } from 'react-aria-components';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\n\n/**\n * Props available on all buttons.\n */\nexport interface BaseButtonProps extends CommonProps {\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /**\n * Determines the color tone of the button.\n * @default 'base'\n */\n tone?: 'base' | 'critical';\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether the button should take up the whole available width.\n *\n * @default false\n */\n fullWidth?: boolean;\n}\n\n/**\n * Props available on buttons containing text.\n */\nexport interface TextButtonProps extends Omit<LabellableProps, 'label'> {\n /** The text displayed on the button. */\n children: StringLikeChildren;\n /** An icon displayed before the button text. */\n iconStart?: ReactNode;\n /** An icon displayed after the button text. */\n iconEnd?: ReactNode;\n}\n\n/**\n * Props available on buttons containing a single icon.\n */\nexport interface SingleIconButtonProps extends Omit<LabellableProps, 'label' | 'aria-label'> {\n /** The icon displayed on the button. */\n icon: ReactNode;\n /** The label describing the function of this button for assistive technologies. */\n 'aria-label': string;\n}\n\n/**\n * Props available on buttons that perform an action (non-navigational).\n */\nexport interface ActionButtonProps\n extends Pick<\n RACButtonProps,\n 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'\n > {\n /**\n * Whether the button is in a loading state.\n * This disables the button and replaces its contents with a spinner.\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * A string that identifies the loading state to assistive technologies.\n * It will be announced by screen readers together with the button label.\n * You must provide this prop if `isLoading` is `true`.\n */\n loadingLabel?: string;\n /**\n * A slot name for the component. Slots allow the component to receive props from a parent component.\n * An explicit null value indicates that the local props completely override all props received from a parent.\n *\n * @internal\n */\n slot?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-context.d.ts","sourceRoot":"","sources":["../../../../src/components/card/card-context.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;EAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-context.js","sourceRoot":"","sources":["../../../../src/components/card/card-context.tsx"],"names":[],"mappings":";;;AAAA,iCAAsC;AAEzB,QAAA,WAAW,GAAG,IAAA,qBAAa,EAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC","sourcesContent":["import { createContext } from 'react';\n\nexport const CardContext = createContext({ withBorder: false });\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { CommonProps } from '../types.js';
|
|
3
|
+
export interface UNSTABLE_CardProps extends CommonProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
withBorder?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface UNSTABLE_CardSectionProps extends CommonProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
bleed?: boolean;
|
|
10
|
+
withBorder?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _UNSTABLE_Card: (props: UNSTABLE_CardProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
13
|
+
declare const _UNSTABLE_CardSection: (props: UNSTABLE_CardSectionProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
14
|
+
export { _UNSTABLE_Card as UNSTABLE_Card, _UNSTABLE_CardSection as UNSTABLE_CardSection };
|
|
15
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/card/card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAeD,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAyBD,QAAA,MAAM,cAAc,oKAAoD,CAAC;AACzE,QAAA,MAAM,qBAAqB,2KAAkE,CAAC;AAE9F,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,qBAAqB,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UNSTABLE_CardSection = exports.UNSTABLE_Card = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
11
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
12
|
+
const card_context_js_1 = require("./card-context.js");
|
|
13
|
+
function UNSTABLE_Card({ children, UNSAFE_className, UNSAFE_style, withBorder = false, ...props }, ref) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(card_context_js_1.CardContext.Provider, { value: { withBorder }, children: (0, jsx_runtime_1.jsx)("div", { ...props, className: (0, clsx_1.default)('cim-card', UNSAFE_className), style: UNSAFE_style, ref: ref, children: children }) }));
|
|
15
|
+
}
|
|
16
|
+
function UNSTABLE_CardSection({ children, UNSAFE_className, UNSAFE_style, bleed, withBorder, ...props }, ref) {
|
|
17
|
+
const { withBorder: contextWithBorder } = (0, react_1.useContext)(card_context_js_1.CardContext);
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...props, className: (0, clsx_1.default)('cim-card-section', bleed && 'cim-card-section-bleed', (withBorder || contextWithBorder) && 'cim-card-section-with-border', UNSAFE_className), style: UNSAFE_style, ref: ref, children: children }));
|
|
19
|
+
}
|
|
20
|
+
const _UNSTABLE_Card = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_Card), 'Card');
|
|
21
|
+
exports.UNSTABLE_Card = _UNSTABLE_Card;
|
|
22
|
+
const _UNSTABLE_CardSection = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_CardSection), 'CardSection');
|
|
23
|
+
exports.UNSTABLE_CardSection = _UNSTABLE_CardSection;
|
|
24
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../../src/components/card/card.tsx"],"names":[],"mappings":";;;;;;;AAAA,gDAAwB;AACxB,iCAAsE;AACtE,yDAAkD;AAClD,mEAA2D;AAE3D,uDAAgD;AAOhD,SAAS,aAAa,CACpB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,KAAK,EAAsB,EAC9F,GAAiC;IAEjC,OAAO,CACL,uBAAC,6BAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,YACzC,mCAAS,KAAK,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,UAAU,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,YACzF,QAAQ,GACL,GACe,CACxB,CAAC;AACJ,CAAC;AAQD,SAAS,oBAAoB,CAC3B,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,EAA6B,EACpG,GAAiC;IAEjC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,IAAA,kBAAU,EAAC,6BAAW,CAAC,CAAC;IAElE,OAAO,CACL,mCACM,KAAK,EACT,SAAS,EAAE,IAAA,cAAI,EACb,kBAAkB,EAClB,KAAK,IAAI,wBAAwB,EACjC,CAAC,UAAU,IAAI,iBAAiB,CAAC,IAAI,8BAA8B,EACnE,gBAAgB,CACjB,EACD,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,GAAG,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC;AAG9C,uCAAa;AAFxC,MAAM,qBAAqB,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,oBAAoB,CAAC,EAAE,aAAa,CAAC,CAAC;AAE3B,qDAAoB","sourcesContent":["import clsx from 'clsx';\nimport { useContext, type ForwardedRef, type ReactNode } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps } from '../types.js';\nimport { CardContext } from './card-context.js';\n\nexport interface UNSTABLE_CardProps extends CommonProps {\n children: ReactNode;\n withBorder?: boolean;\n}\n\nfunction UNSTABLE_Card(\n { children, UNSAFE_className, UNSAFE_style, withBorder = false, ...props }: UNSTABLE_CardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <CardContext.Provider value={{ withBorder }}>\n <div {...props} className={clsx('cim-card', UNSAFE_className)} style={UNSAFE_style} ref={ref}>\n {children}\n </div>\n </CardContext.Provider>\n );\n}\n\nexport interface UNSTABLE_CardSectionProps extends CommonProps {\n children: ReactNode;\n bleed?: boolean;\n withBorder?: boolean;\n}\n\nfunction UNSTABLE_CardSection(\n { children, UNSAFE_className, UNSAFE_style, bleed, withBorder, ...props }: UNSTABLE_CardSectionProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { withBorder: contextWithBorder } = useContext(CardContext);\n\n return (\n <div\n {...props}\n className={clsx(\n 'cim-card-section',\n bleed && 'cim-card-section-bleed',\n (withBorder || contextWithBorder) && 'cim-card-section-with-border',\n UNSAFE_className,\n )}\n style={UNSAFE_style}\n ref={ref}\n >\n {children}\n </div>\n );\n}\n\nconst _UNSTABLE_Card = withStyleProps(forwardRef(UNSTABLE_Card), 'Card');\nconst _UNSTABLE_CardSection = withStyleProps(forwardRef(UNSTABLE_CardSection), 'CardSection');\n\nexport { _UNSTABLE_Card as UNSTABLE_Card, _UNSTABLE_CardSection as UNSTABLE_CardSection };\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type CheckboxGroupProps as RACCheckboxGroupProps } from 'react-aria-components';
|
|
3
|
+
import type { Responsive } from '../spacing/types.js';
|
|
4
|
+
import type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';
|
|
5
|
+
export interface CheckboxGroupProps extends CommonProps, WithRequired<FieldProps<string[]>, 'label'>, Pick<RACCheckboxGroupProps, 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'> {
|
|
6
|
+
/** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Determines the direction in which checkboxes will be stacked.
|
|
10
|
+
* @default 'vertical'
|
|
11
|
+
*/
|
|
12
|
+
direction?: Responsive<Direction>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Allows users to select one or more items from a visible list.
|
|
16
|
+
*
|
|
17
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
18
|
+
*/
|
|
19
|
+
declare const _CheckboxGroup: (props: CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
20
|
+
export { _CheckboxGroup as CheckboxGroup };
|
|
21
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,KAAK,kBAAkB,IAAI,qBAAqB,EACjD,MAAM,uBAAuB,CAAC;AAK/B,OAAO,KAAK,EAAc,UAAU,EAAW,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpF,MAAM,WAAW,kBACf,SAAQ,WAAW,EACjB,YAAY,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAC3C,IAAI,CACF,qBAAqB,EACrB,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,CAC1G;IACH,yFAAyF;IACzF,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CACnC;AAgCD;;;;GAIG;AACH,QAAA,MAAM,cAAc,oKAA6D,CAAC;AAElF,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CheckboxGroup = void 0;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
11
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
12
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
13
|
+
const form_field_js_1 = require("../internal/form-field/form-field.js");
|
|
14
|
+
const stack_js_1 = require("../spacing/stack/stack.js");
|
|
15
|
+
function CheckboxGroup({ label, description, error: errorMessage, direction = 'vertical', children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.CheckboxGroup, { ...props, ref: ref, className: (0, clsx_1.default)('cim-checkbox-group', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, children: label }), (0, jsx_runtime_1.jsx)(stack_js_1.Stack, { gap: getGapFromDirection(direction), direction: direction, children: children }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: errorMessage }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description })] }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Allows users to select one or more items from a visible list.
|
|
20
|
+
*
|
|
21
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
22
|
+
*/
|
|
23
|
+
const _CheckboxGroup = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(CheckboxGroup), 'CheckboxGroup');
|
|
24
|
+
exports.CheckboxGroup = _CheckboxGroup;
|
|
25
|
+
// Make sure that checkboxes are spaced by 16px when stacked horizontally, and 8px otherwise.
|
|
26
|
+
function getGapFromDirection(direction) {
|
|
27
|
+
if (typeof direction === 'object') {
|
|
28
|
+
const gap = { xs: direction.xs === 'horizontal' ? 16 : 8 };
|
|
29
|
+
Object.entries(direction).reduce((acc, curr) => {
|
|
30
|
+
gap[curr[0]] = curr[1] === 'horizontal' ? 16 : 8;
|
|
31
|
+
return acc;
|
|
32
|
+
}, gap);
|
|
33
|
+
return gap;
|
|
34
|
+
}
|
|
35
|
+
return direction === 'horizontal' ? 16 : 8;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAGxB,iEAG+B;AAC/B,yDAAkD;AAClD,mEAA2D;AAC3D,wEAA4G;AAC5G,wDAAkD;AAoBlD,SAAS,aAAa,CACpB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,SAAS,GAAG,UAAU,EACtB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACW,EACrB,GAAiC;IAEjC,OAAO,CACL,wBAAC,qCAAgB,OACX,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,oBAAoB,EAAE,gBAAgB,CAAC,EACvD,KAAK,EAAE,YAAY,aAEnB,uBAAC,8BAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,YAAG,KAAK,GAAkB,EACtE,uBAAC,gBAAK,IAAC,GAAG,EAAE,mBAAmB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,YAC7D,QAAQ,GACH,EACR,uBAAC,8BAAc,cAAE,YAAY,GAAkB,EAC/C,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,IACzC,CACpB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,cAAc,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC;AAEvD,uCAAa;AAExC,6FAA6F;AAC7F,SAAS,mBAAmB,CAAC,SAAgC;IAC3D,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,GAAG,GAAwB,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE/E,MAAM,CAAC,OAAO,CAAC,SAAS,CAA+B,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5E,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport type { ForwardedRef } from 'react';\nimport {\n CheckboxGroup as RACCheckboxGroup,\n type CheckboxGroupProps as RACCheckboxGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { Stack } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface CheckboxGroupProps\n extends CommonProps,\n WithRequired<FieldProps<string[]>, 'label'>,\n Pick<\n RACCheckboxGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n > {\n /** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */\n children: ReactNode;\n /**\n * Determines the direction in which checkboxes will be stacked.\n * @default 'vertical'\n */\n direction?: Responsive<Direction>;\n}\n\nfunction CheckboxGroup(\n {\n label,\n description,\n error: errorMessage,\n direction = 'vertical',\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: CheckboxGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACCheckboxGroup\n {...props}\n ref={ref}\n className={clsx('cim-checkbox-group', UNSAFE_className)}\n style={UNSAFE_style}\n >\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromDirection(direction)} direction={direction}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACCheckboxGroup>\n );\n}\n\n/**\n * Allows users to select one or more items from a visible list.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).\n */\nconst _CheckboxGroup = withStyleProps(forwardRef(CheckboxGroup), 'CheckboxGroup');\n\nexport { _CheckboxGroup as CheckboxGroup };\n\n// Make sure that checkboxes are spaced by 16px when stacked horizontally, and 8px otherwise.\nfunction getGapFromDirection(direction: Responsive<Direction>): Responsive<Spacing> {\n if (typeof direction === 'object') {\n const gap: Responsive<Spacing> = { xs: direction.xs === 'horizontal' ? 16 : 8 };\n\n (Object.entries(direction) as [Breakpoint, Direction][]).reduce((acc, curr) => {\n gap[curr[0]] = curr[1] === 'horizontal' ? 16 : 8;\n return acc;\n }, gap);\n\n return gap;\n }\n\n return direction === 'horizontal' ? 16 : 8;\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CheckboxProps as RACCheckboxProps } from 'react-aria-components';
|
|
2
|
+
import type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';
|
|
3
|
+
export interface CheckboxProps extends CommonProps, Omit<LabellableProps, 'label'>, Pick<RACCheckboxProps, 'onChange' | 'isSelected' | 'isIndeterminate' | 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'name' | 'value' | 'defaultSelected' | 'autoFocus'> {
|
|
4
|
+
/** The label rendered next to the checkbox. */
|
|
5
|
+
children?: StringLikeChildren;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.
|
|
9
|
+
*
|
|
10
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
11
|
+
*/
|
|
12
|
+
declare const _Checkbox: (props: CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
13
|
+
export { _Checkbox as Checkbox };
|
|
14
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIxG,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGpF,MAAM,WAAW,aACf,SAAQ,WAAW,EACjB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAC9B,IAAI,CACF,gBAAgB,EACd,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,MAAM,GACN,OAAO,GACP,iBAAiB,GACjB,WAAW,CACd;IACH,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAgCD;;;;GAIG;AACH,QAAA,MAAM,SAAS,iKAAmD,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Checkbox = void 0;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
12
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
13
|
+
const index_js_1 = require("../../icons/index.js");
|
|
14
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
15
|
+
const text_js_1 = require("../typography/text.js");
|
|
16
|
+
function Checkbox({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
17
|
+
const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
if (!children && !ariaLabel && !ariaLabelledBy) {
|
|
20
|
+
console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');
|
|
21
|
+
}
|
|
22
|
+
}, [children, ariaLabel, ariaLabelledBy]);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Checkbox, { ...props, ref: ref, className: (0, clsx_1.default)('cim-checkbox', UNSAFE_className), style: UNSAFE_style, children: ({ isIndeterminate }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "cim-checkbox-toggle-wrapper", children: (0, jsx_runtime_1.jsx)("div", { className: "cim-checkbox-toggle", children: isIndeterminate ? (0, jsx_runtime_1.jsx)(index_js_1.IconMinusSmall, {}) : (0, jsx_runtime_1.jsx)(index_js_1.IconCheckmarkSmall, {}) }) }), children && ((0, jsx_runtime_1.jsx)(text_js_1.Text, { as: "span", variant: "body", children: children }))] })) }));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.
|
|
27
|
+
*
|
|
28
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
29
|
+
*/
|
|
30
|
+
const _Checkbox = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Checkbox), 'Checkbox');
|
|
31
|
+
exports.Checkbox = _Checkbox;
|
|
32
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAAwG;AACxG,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAE3D,mDAA6C;AAuB7C,SAAS,QAAQ,CACf,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiB,EACrE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,uBAAC,gCAAW,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACrG,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACxB,6DACE,gCAAK,SAAS,EAAC,6BAA6B,YAC1C,gCAAK,SAAS,EAAC,qBAAqB,YAAE,eAAe,CAAC,CAAC,CAAC,uBAAC,yBAAc,KAAG,CAAC,CAAC,CAAC,uBAAC,6BAAkB,KAAG,GAAO,GACtG,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,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,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","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"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ListBoxProps as RACListBoxProps, type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
|
|
2
|
+
import type { CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js';
|
|
3
|
+
/** Represents the state of the `ComboBox` component for validation purposes. */
|
|
4
|
+
export interface ComboBoxValidationValue {
|
|
5
|
+
/** The selected key in the ComboBox. */
|
|
6
|
+
selectedKey: Key | null;
|
|
7
|
+
/** The value of the ComboBox input. */
|
|
8
|
+
inputValue: string;
|
|
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' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick<RACListBoxProps<T>, 'onScroll'> {
|
|
11
|
+
}
|
|
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
|
+
*/
|
|
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;
|
|
18
|
+
export { _ComboBox as ComboBox };
|
|
19
|
+
export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
20
|
+
children: StringLikeChildren;
|
|
21
|
+
}
|
|
22
|
+
/** Renders a single list item within `ComboBox`. */
|
|
23
|
+
export declare function ComboBoxItem<T extends CollectionItem>({ children, ...props }: ComboBoxItemProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace ComboBoxItem {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ComboBoxSectionProps<T extends CollectionItem> extends CollectionProps<T> {
|
|
28
|
+
/** The ID of the section. Has to be unique across all sections and items. */
|
|
29
|
+
id?: Key;
|
|
30
|
+
/** The content to display as the section title. */
|
|
31
|
+
title: string;
|
|
32
|
+
}
|
|
33
|
+
/** Groups list items within `ComboBox` into a section. */
|
|
34
|
+
export declare function ComboBoxSection<T extends CollectionItem>({ title, children, items, ...props }: ComboBoxSectionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace ComboBoxSection {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=combo-box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAIA,OAAO,EASL,KAAK,YAAY,IAAI,eAAe,EAIpC,KAAK,aAAa,IAAI,gBAAgB,EACtC,KAAK,gBAAgB,IAAI,mBAAmB,EAC7C,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,GAAG,EACH,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,EAAE,GAAG,GAAG,IAAI,CAAC;IACxB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CACtE,SAAQ,WAAW,EACjB,yBAAyB,CAAC,uBAAuB,CAAC,EAClD,eAAe,CAAC,CAAC,CAAC,EAClB,IAAI,CACF,gBAAgB,CAAC,CAAC,CAAC,EACjB,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,aAAa,GACb,oBAAoB,GACpB,YAAY,GACZ,mBAAmB,GACnB,WAAW,GACX,mBAAmB,GACnB,eAAe,GACf,SAAS,GACT,QAAQ,GACR,cAAc,CACjB,EACD,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;CAAG;AA+D3C;;;;GAIG;AACH,QAAA,MAAM,SAAS,GAlEG,CAAC,SAAS,cAAc,iKAkEwB,CAAC;AAEnE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC;AAsBjC,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,cAAc,CACzD,SAAQ,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IACzF,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ComboBox = void 0;
|
|
8
|
+
exports.ComboBoxItem = ComboBoxItem;
|
|
9
|
+
exports.ComboBoxSection = ComboBoxSection;
|
|
10
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
14
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
15
|
+
const index_js_1 = require("../../icons/index.js");
|
|
16
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
17
|
+
const collapsible_list_js_1 = require("../internal/collapsible-list/collapsible-list.js");
|
|
18
|
+
const form_field_js_1 = require("../internal/form-field/form-field.js");
|
|
19
|
+
const utils_js_1 = require("../typography/utils.js");
|
|
20
|
+
function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, onScroll, ...props }, ref) {
|
|
21
|
+
const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
|
|
22
|
+
(0, react_1.useEffect)(() => {
|
|
23
|
+
if (!label && !ariaLabel && !ariaLabelledBy) {
|
|
24
|
+
console.warn('ComboBox requires one of label / aria-label / aria-labelledby for accessibility');
|
|
25
|
+
}
|
|
26
|
+
}, [label, ariaLabel, ariaLabelledBy]);
|
|
27
|
+
if (items != null && typeof children !== 'function') {
|
|
28
|
+
console.warn('`ComboBox` requires `children` to be a function when using `items` prop');
|
|
29
|
+
}
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.ComboBox, { ...props, ref: ref, className: (0, clsx_1.default)('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Group, { className: "cim-combo-box-input-group", children: [(0, jsx_runtime_1.jsx)(ComboBoxInput, { isReadOnly: isReadOnly, placeholder: placeholder }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { className: "cim-combo-box-button", children: (0, jsx_runtime_1.jsx)(index_js_1.IconChevronDownFill, {}) })] }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: error }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description }), (0, jsx_runtime_1.jsx)(collapsible_list_js_1.CollapsibleList, { offset: 5, maxHeight: 315, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.ListBox, { className: "cim-combo-box-listbox", onScroll: onScroll, items: items, children: children }) })] }));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Allows users to filter a collapsible list and select one item from it.
|
|
34
|
+
*
|
|
35
|
+
* See [combo box usage guidelines](https://ui.cimpress.com/components/combo-box)
|
|
36
|
+
*/
|
|
37
|
+
const _ComboBox = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(ComboBox), 'ComboBox');
|
|
38
|
+
exports.ComboBox = _ComboBox;
|
|
39
|
+
function ComboBoxInput({ isReadOnly, placeholder, }) {
|
|
40
|
+
const comboBoxState = (0, react_1.useContext)(react_aria_components_1.ComboBoxStateContext);
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Input, { className: (0, clsx_1.default)('cim-combo-box-input', (0, utils_js_1.textStyle)({ variant: 'medium' })),
|
|
42
|
+
// Ensure the popover opens when the input is clicked.
|
|
43
|
+
// By default, React Aria only opens the popover when the input is focused.
|
|
44
|
+
onClick: () => !isReadOnly && comboBoxState.open(), placeholder: placeholder }));
|
|
45
|
+
}
|
|
46
|
+
/** Renders a single list item within `ComboBox`. */
|
|
47
|
+
function ComboBoxItem({ children, ...props }) {
|
|
48
|
+
const textValue = typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.ListBoxItem, { ...props, className: "cim-combo-box-item", textValue: textValue, children: ({ isDisabled }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(index_js_1.IconCheckmark, {}), (0, jsx_runtime_1.jsx)(react_aria_components_1.Text, { slot: "label", className: (0, utils_js_1.textStyle)({ variant: 'body', tone: isDisabled ? 'muted' : 'base' }), children: children })] })) }));
|
|
50
|
+
}
|
|
51
|
+
ComboBoxItem.displayName = 'ComboBoxItem';
|
|
52
|
+
/** Groups list items within `ComboBox` into a section. */
|
|
53
|
+
function ComboBoxSection({ title, children, items, ...props }) {
|
|
54
|
+
if (items != null && typeof children !== 'function') {
|
|
55
|
+
console.warn('`ComboBoxSection` requires `children` to be a function when using `items` prop');
|
|
56
|
+
}
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.ListBoxSection, { ...props, className: "cim-combo-box-section", children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.Header, { className: (0, clsx_1.default)('cim-combo-box-section-header', (0, utils_js_1.textStyle)({ variant: 'small-semibold', tone: 'subtle' })), children: title }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Collection, { items: items, children: children })] }));
|
|
58
|
+
}
|
|
59
|
+
ComboBoxSection.displayName = 'ComboBoxSection';
|
|
60
|
+
//# sourceMappingURL=combo-box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combo-box.js","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAmKb,oCAiBC;AAYD,0CAoBC;;AAlND,gDAAwB;AACxB,iCAAiE;AACjE,iEAe+B;AAC/B,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAC3D,0FAAmF;AACnF,wEAA4G;AAS5G,qDAAmD;AAkCnD,SAAS,QAAQ,CACf,EACE,KAAK,EACL,WAAW,EACX,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACS,EACnB,GAAiC;IAEjC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAClG,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEvC,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IAC1F,CAAC;IAED,OAAO,CACL,wBAAC,gCAAW,OACN,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,eAAe,EAAE,gBAAgB,CAAC,EAClD,KAAK,EAAE,YAAY,EACnB,WAAW,EAAC,OAAO,EACnB,UAAU,EAAE,UAAU,mBACP,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,aAE5C,uBAAC,8BAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,YACvE,KAAK,GACS,EACjB,wBAAC,6BAAQ,IAAC,SAAS,EAAC,2BAA2B,aAC7C,uBAAC,aAAa,IAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,GAAI,EACnE,uBAAC,8BAAS,IAAC,SAAS,EAAC,sBAAsB,YACzC,uBAAC,8BAAmB,KAAG,GACb,IACH,EACX,uBAAC,8BAAc,cAAE,KAAK,GAAkB,EACxC,uBAAC,oCAAoB,cAAE,WAAW,GAAwB,EAC1D,uBAAC,qCAAe,IACd,MAAM,EAAE,CAAC,EACT,SAAS,EAAE,GAAG,YAEd,uBAAC,+BAAU,IAAC,SAAS,EAAC,uBAAuB,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,YAC3E,QAAQ,GACE,GACG,IACN,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ;AAE9B,SAAS,aAAa,CAAC,EACrB,UAAU,EACV,WAAW,GAIZ;IACC,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,4CAAuB,CAAC,CAAC;IAE1D,OAAO,CACL,uBAAC,6BAAQ,IACP,SAAS,EAAE,IAAA,cAAI,EAAC,qBAAqB,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACxE,sDAAsD;QACtD,2EAA2E;QAC3E,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,aAAc,CAAC,IAAI,EAAE,EACnD,WAAW,EAAE,WAAW,GACxB,CACH,CAAC;AACJ,CAAC;AAOD,oDAAoD;AACpD,SAAgB,YAAY,CAA2B,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAwB;IACjG,MAAM,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,uBAAC,mCAAc,OAAK,KAAK,EAAE,SAAS,EAAC,oBAAoB,EAAC,SAAS,EAAE,SAAS,YAC3E,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CACnB,6DACE,uBAAC,wBAAa,KAAG,EAEjB,uBAAC,4BAAO,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,IAAA,oBAAS,EAAC,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,SAAgB,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,wBAAC,sCAAiB,OAAK,KAAK,EAAE,SAAS,EAAC,uBAAuB,aAC7D,uBAAC,8BAAS,IACR,SAAS,EAAE,IAAA,cAAI,EAAC,8BAA8B,EAAE,IAAA,oBAAS,EAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,YAExG,KAAK,GACI,EACZ,uBAAC,kCAAa,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,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UNSTABLE_DisclosureGroup = void 0;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
11
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
12
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
13
|
+
function UNSTABLE_DisclosureGroup({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.DisclosureGroup, { ...props, ref: ref, className: (0, clsx_1.default)('cim-disclosure-group', UNSAFE_className), style: UNSAFE_style, children: children }));
|
|
15
|
+
}
|
|
16
|
+
const _DisclosureGroup = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_DisclosureGroup), 'DisclosureGroup');
|
|
17
|
+
exports.UNSTABLE_DisclosureGroup = _DisclosureGroup;
|
|
18
|
+
//# 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,gDAAwB;AAExB,iEAG+B;AAC/B,yDAAkD;AAClD,mEAA2D;AAU3D,SAAS,wBAAwB,CAC/B,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiC,EACrF,GAAiC;IAEjC,OAAO,CACL,uBAAC,uCAAkB,OACb,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,sBAAsB,EAAE,gBAAgB,CAAC,EACzD,KAAK,EAAE,YAAY,YAElB,QAAQ,GACU,CACtB,CAAC;AACJ,CAAC;AAED,MAAM,gBAAgB,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,wBAAwB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAEpE,oDAAwB","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,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UNSTABLE_Disclosure = void 0;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
11
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
12
|
+
const index_js_1 = require("../../icons/index.js");
|
|
13
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
14
|
+
const text_js_1 = require("../typography/text.js");
|
|
15
|
+
function UNSTABLE_Disclosure({ children, title, contentEnd, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Disclosure, { ref: ref, ...props, className: (0, clsx_1.default)('cim-disclosure', UNSAFE_className), style: UNSAFE_style, children: [(0, jsx_runtime_1.jsxs)("div", { className: "cim-disclosure-heading-wrapper", children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.Heading, { className: "cim-disclosure-heading", children: (0, jsx_runtime_1.jsxs)(react_aria_components_1.Button, { className: "cim-disclosure-button", slot: "trigger", children: [(0, jsx_runtime_1.jsx)(index_js_1.IconChevronDownFill, { size: 24, UNSAFE_className: "cim-disclosure-icon" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { as: "span", variant: "body-semibold", children: title })] }) }), contentEnd && (0, jsx_runtime_1.jsx)("div", { className: "cim-disclosure-content-end", children: contentEnd })] }), (0, jsx_runtime_1.jsx)(react_aria_components_1.DisclosurePanel, { className: "cim-disclosure-panel", children: (0, jsx_runtime_1.jsx)("div", { className: "cim-disclosure-panel-content", children: children }) })] }));
|
|
17
|
+
}
|
|
18
|
+
const _Disclosure = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(UNSTABLE_Disclosure), 'Disclosure');
|
|
19
|
+
exports.UNSTABLE_Disclosure = _Disclosure;
|
|
20
|
+
//# 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,gDAAwB;AAExB,iEAM+B;AAC/B,yDAAkD;AAClD,mDAA2D;AAC3D,mEAA2D;AAE3D,mDAA6C;AAa7C,SAAS,mBAAmB,CAC1B,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAA4B,EACnG,GAAiC;IAEjC,OAAO,CACL,wBAAC,kCAAa,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,aAC1G,iCAAK,SAAS,EAAC,gCAAgC,aAC7C,uBAAC,+BAAU,IAAC,SAAS,EAAC,wBAAwB,YAC5C,wBAAC,8BAAS,IAAC,SAAS,EAAC,uBAAuB,EAAC,IAAI,EAAC,SAAS,aACzD,uBAAC,8BAAmB,IAAC,IAAI,EAAE,EAAE,EAAE,gBAAgB,EAAC,qBAAqB,GAAG,EACxE,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,eAAe,YACpC,KAAK,GACD,IACG,GACD,EACZ,UAAU,IAAI,gCAAK,SAAS,EAAC,4BAA4B,YAAE,UAAU,GAAO,IACzE,EACN,uBAAC,uCAAkB,IAAC,SAAS,EAAC,sBAAsB,YAClD,gCAAK,SAAS,EAAC,8BAA8B,YAAE,QAAQ,GAAO,GAC3C,IACP,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,mBAAmB,CAAC,EAAE,YAAY,CAAC,CAAC;AAE1D,0CAAmB","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"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FormProps as RACFormProps } from 'react-aria-components';
|
|
2
|
+
import type { CommonProps, LabellableProps } from '../types.js';
|
|
3
|
+
export interface FormProps extends CommonProps, Omit<LabellableProps, 'label'>, Pick<RACFormProps, 'action' | 'validationErrors' | 'encType' | 'method' | 'target' | 'autoComplete' | 'autoCapitalize' | 'children' | 'onSubmit' | 'onReset' | 'onInvalid'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A group of inputs that allows users to submit data to a server.
|
|
7
|
+
*
|
|
8
|
+
* See [forms guide](https://ui.cimpress.io/dev-guides/forms/).
|
|
9
|
+
*/
|
|
10
|
+
declare const _Form: (props: FormProps & import("react").RefAttributes<HTMLFormElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
11
|
+
export { _Form as Form };
|
|
12
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SACf,SAAQ,WAAW,EACjB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAC9B,IAAI,CACF,YAAY,EACV,QAAQ,GACR,kBAAkB,GAClB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,SAAS,GACT,WAAW,CACd;CAAG;AAUR;;;;GAIG;AACH,QAAA,MAAM,KAAK,4JAA2C,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Form = void 0;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
10
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
11
|
+
const forward_ref_js_1 = require("../../forward-ref.js");
|
|
12
|
+
const with_style_props_js_1 = require("../../with-style-props.js");
|
|
13
|
+
function Form({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Form, { ...props, className: (0, clsx_1.default)('cim-form', UNSAFE_className), style: UNSAFE_style, ref: ref, children: children }));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A group of inputs that allows users to submit data to a server.
|
|
18
|
+
*
|
|
19
|
+
* See [forms guide](https://ui.cimpress.io/dev-guides/forms/).
|
|
20
|
+
*/
|
|
21
|
+
const _Form = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Form), 'Form');
|
|
22
|
+
exports.Form = _Form;
|
|
23
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAqB3D,SAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAa,EAAE,GAAkC;IACjH,OAAO,CACL,uBAAC,4BAAO,OAAK,KAAK,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,UAAU,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,YAC7F,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,KAAK,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAErC,qBAAI","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Form as RACForm, type FormProps as RACFormProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps } from '../types.js';\n\nexport interface FormProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<\n RACFormProps,\n | 'action'\n | 'validationErrors'\n | 'encType'\n | 'method'\n | 'target'\n | 'autoComplete'\n | 'autoCapitalize'\n | 'children'\n | 'onSubmit'\n | 'onReset'\n | 'onInvalid'\n > {}\n\nfunction Form({ children, UNSAFE_className, UNSAFE_style, ...props }: FormProps, ref: ForwardedRef<HTMLFormElement>) {\n return (\n <RACForm {...props} className={clsx('cim-form', UNSAFE_className)} style={UNSAFE_style} ref={ref}>\n {children}\n </RACForm>\n );\n}\n\n/**\n * A group of inputs that allows users to submit data to a server.\n *\n * See [forms guide](https://ui.cimpress.io/dev-guides/forms/).\n */\nconst _Form = withStyleProps(forwardRef(Form), 'Form');\n\nexport { _Form as Form };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible-list.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollapsibleList = CollapsibleList;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_aria_components_1 = require("react-aria-components");
|
|
6
|
+
/**
|
|
7
|
+
* Displays a collapsible list activated via a trigger element.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
function CollapsibleList({ children, ...props }) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_components_1.Popover, { ...props, className: "cim-collapsible-list", containerPadding: 16, "data-cim-style-root": true, children: children }));
|
|
13
|
+
}
|
|
14
|
+
CollapsibleList.displayName = 'CollapsibleList';
|
|
15
|
+
//# sourceMappingURL=collapsible-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible-list.js","sourceRoot":"","sources":["../../../../../src/components/internal/collapsible-list/collapsible-list.tsx"],"names":[],"mappings":";;AAUA,0CAMC;;AAhBD,iEAAoG;AAKpG;;;;GAIG;AACH,SAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAwB;IAC1E,OAAO,CACL,uBAAC,+BAAU,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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/form-field/form-field.tsx"],"names":[],"mappings":""}
|