@entifix/react-controls 0.1.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/i18n/catalog/en.d.ts +10 -0
- package/dist/i18n/catalog/en.d.ts.map +1 -0
- package/dist/i18n/catalog/en.js +211 -0
- package/dist/i18n/catalog/en.js.map +1 -0
- package/dist/i18n/catalog/es.d.ts +275 -0
- package/dist/i18n/catalog/es.d.ts.map +1 -0
- package/dist/i18n/catalog/es.js +261 -0
- package/dist/i18n/catalog/es.js.map +1 -0
- package/dist/i18n/catalog/index.d.ts +403 -0
- package/dist/i18n/catalog/index.d.ts.map +1 -0
- package/dist/i18n/catalog/index.js +23 -0
- package/dist/i18n/catalog/index.js.map +1 -0
- package/dist/i18n/entity-labels.d.ts +29 -0
- package/dist/i18n/entity-labels.d.ts.map +1 -0
- package/dist/i18n/entity-labels.js +49 -0
- package/dist/i18n/entity-labels.js.map +1 -0
- package/dist/i18n/fallback-catalogs.d.ts +5 -0
- package/dist/i18n/fallback-catalogs.d.ts.map +1 -0
- package/dist/i18n/fallback-catalogs.js +34 -0
- package/dist/i18n/fallback-catalogs.js.map +1 -0
- package/dist/i18n/i18n-context.d.ts +62 -0
- package/dist/i18n/i18n-context.d.ts.map +1 -0
- package/dist/i18n/i18n-context.js +128 -0
- package/dist/i18n/i18n-context.js.map +1 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +6 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/spec-support/catalogs.d.ts +2 -0
- package/dist/i18n/spec-support/catalogs.d.ts.map +1 -0
- package/dist/i18n/spec-support/catalogs.js +142 -0
- package/dist/i18n/spec-support/catalogs.js.map +1 -0
- package/dist/i18next/index.d.ts +20 -0
- package/dist/i18next/index.d.ts.map +1 -0
- package/dist/i18next/index.js +60 -0
- package/dist/i18next/index.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/preferences/index.d.ts +7 -0
- package/dist/preferences/index.d.ts.map +1 -0
- package/dist/preferences/index.js +8 -0
- package/dist/preferences/index.js.map +1 -0
- package/dist/preferences/indexeddb-ui-preferences-state.d.ts +16 -0
- package/dist/preferences/indexeddb-ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/indexeddb-ui-preferences-state.js +50 -0
- package/dist/preferences/indexeddb-ui-preferences-state.js.map +1 -0
- package/dist/preferences/local-storage-ui-preferences-state.d.ts +16 -0
- package/dist/preferences/local-storage-ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/local-storage-ui-preferences-state.js +51 -0
- package/dist/preferences/local-storage-ui-preferences-state.js.map +1 -0
- package/dist/preferences/ui-preferences-context.d.ts +16 -0
- package/dist/preferences/ui-preferences-context.d.ts.map +1 -0
- package/dist/preferences/ui-preferences-context.js +31 -0
- package/dist/preferences/ui-preferences-context.js.map +1 -0
- package/dist/preferences/ui-preferences-state.d.ts +23 -0
- package/dist/preferences/ui-preferences-state.d.ts.map +1 -0
- package/dist/preferences/ui-preferences-state.js +5 -0
- package/dist/preferences/ui-preferences-state.js.map +1 -0
- package/dist/preferences/use-ui-preference.d.ts +20 -0
- package/dist/preferences/use-ui-preference.d.ts.map +1 -0
- package/dist/preferences/use-ui-preference.js +72 -0
- package/dist/preferences/use-ui-preference.js.map +1 -0
- package/dist/preferences/use-viewport-mode.d.ts +33 -0
- package/dist/preferences/use-viewport-mode.d.ts.map +1 -0
- package/dist/preferences/use-viewport-mode.js +53 -0
- package/dist/preferences/use-viewport-mode.js.map +1 -0
- package/dist/primitives.d.ts +25 -0
- package/dist/primitives.d.ts.map +1 -0
- package/dist/primitives.js +54 -0
- package/dist/primitives.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme-context.d.ts +26 -0
- package/dist/theme/theme-context.d.ts.map +1 -0
- package/dist/theme/theme-context.js +79 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/theme/types.d.ts +22 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +6 -0
- package/dist/theme/types.js.map +1 -0
- package/dist/ui/actions/action-surfaces.d.ts +59 -0
- package/dist/ui/actions/action-surfaces.d.ts.map +1 -0
- package/dist/ui/actions/action-surfaces.js +109 -0
- package/dist/ui/actions/action-surfaces.js.map +1 -0
- package/dist/ui/actions/index.d.ts +2 -0
- package/dist/ui/actions/index.d.ts.map +1 -0
- package/dist/ui/actions/index.js +3 -0
- package/dist/ui/actions/index.js.map +1 -0
- package/dist/ui/atoms/button/button-link.d.ts +27 -0
- package/dist/ui/atoms/button/button-link.d.ts.map +1 -0
- package/dist/ui/atoms/button/button-link.js +23 -0
- package/dist/ui/atoms/button/button-link.js.map +1 -0
- package/dist/ui/atoms/button/button-recipe.d.ts +19 -0
- package/dist/ui/atoms/button/button-recipe.d.ts.map +1 -0
- package/dist/ui/atoms/button/button-recipe.js +42 -0
- package/dist/ui/atoms/button/button-recipe.js.map +1 -0
- package/dist/ui/atoms/button/button.d.ts +7 -0
- package/dist/ui/atoms/button/button.d.ts.map +1 -0
- package/dist/ui/atoms/button/button.js +22 -0
- package/dist/ui/atoms/button/button.js.map +1 -0
- package/dist/ui/atoms/button/index.d.ts +4 -0
- package/dist/ui/atoms/button/index.d.ts.map +1 -0
- package/dist/ui/atoms/button/index.js +5 -0
- package/dist/ui/atoms/button/index.js.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts +12 -0
- package/dist/ui/atoms/cell-value/cell-value.d.ts.map +1 -0
- package/dist/ui/atoms/cell-value/cell-value.js +101 -0
- package/dist/ui/atoms/cell-value/cell-value.js.map +1 -0
- package/dist/ui/atoms/cell-value/index.d.ts +2 -0
- package/dist/ui/atoms/cell-value/index.d.ts.map +1 -0
- package/dist/ui/atoms/cell-value/index.js +3 -0
- package/dist/ui/atoms/cell-value/index.js.map +1 -0
- package/dist/ui/atoms/field/checkbox.d.ts +35 -0
- package/dist/ui/atoms/field/checkbox.d.ts.map +1 -0
- package/dist/ui/atoms/field/checkbox.js +46 -0
- package/dist/ui/atoms/field/checkbox.js.map +1 -0
- package/dist/ui/atoms/field/field.d.ts +4 -0
- package/dist/ui/atoms/field/field.d.ts.map +1 -0
- package/dist/ui/atoms/field/field.js +29 -0
- package/dist/ui/atoms/field/field.js.map +1 -0
- package/dist/ui/atoms/field/index.d.ts +3 -0
- package/dist/ui/atoms/field/index.d.ts.map +1 -0
- package/dist/ui/atoms/field/index.js +4 -0
- package/dist/ui/atoms/field/index.js.map +1 -0
- package/dist/ui/atoms/field-control/field-control.d.ts +50 -0
- package/dist/ui/atoms/field-control/field-control.d.ts.map +1 -0
- package/dist/ui/atoms/field-control/field-control.js +82 -0
- package/dist/ui/atoms/field-control/field-control.js.map +1 -0
- package/dist/ui/atoms/field-control/index.d.ts +2 -0
- package/dist/ui/atoms/field-control/index.d.ts.map +1 -0
- package/dist/ui/atoms/field-control/index.js +3 -0
- package/dist/ui/atoms/field-control/index.js.map +1 -0
- package/dist/ui/atoms/skeleton/index.d.ts +2 -0
- package/dist/ui/atoms/skeleton/index.d.ts.map +1 -0
- package/dist/ui/atoms/skeleton/index.js +3 -0
- package/dist/ui/atoms/skeleton/index.js.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.d.ts +21 -0
- package/dist/ui/atoms/skeleton/skeleton.d.ts.map +1 -0
- package/dist/ui/atoms/skeleton/skeleton.js +33 -0
- package/dist/ui/atoms/skeleton/skeleton.js.map +1 -0
- package/dist/ui/atoms/table/index.d.ts +2 -0
- package/dist/ui/atoms/table/index.d.ts.map +1 -0
- package/dist/ui/atoms/table/index.js +3 -0
- package/dist/ui/atoms/table/index.js.map +1 -0
- package/dist/ui/atoms/table/table.d.ts +30 -0
- package/dist/ui/atoms/table/table.d.ts.map +1 -0
- package/dist/ui/atoms/table/table.js +84 -0
- package/dist/ui/atoms/table/table.js.map +1 -0
- package/dist/ui/atoms/text/index.d.ts +2 -0
- package/dist/ui/atoms/text/index.d.ts.map +1 -0
- package/dist/ui/atoms/text/index.js +3 -0
- package/dist/ui/atoms/text/index.js.map +1 -0
- package/dist/ui/atoms/text/text.d.ts +86 -0
- package/dist/ui/atoms/text/text.d.ts.map +1 -0
- package/dist/ui/atoms/text/text.js +221 -0
- package/dist/ui/atoms/text/text.js.map +1 -0
- package/dist/ui/layout/_demo.d.ts +6 -0
- package/dist/ui/layout/_demo.d.ts.map +1 -0
- package/dist/ui/layout/_demo.js +11 -0
- package/dist/ui/layout/_demo.js.map +1 -0
- package/dist/ui/layout/_shared.d.ts +9 -0
- package/dist/ui/layout/_shared.d.ts.map +1 -0
- package/dist/ui/layout/_shared.js +30 -0
- package/dist/ui/layout/_shared.js.map +1 -0
- package/dist/ui/layout/box/box.d.ts +10 -0
- package/dist/ui/layout/box/box.d.ts.map +1 -0
- package/dist/ui/layout/box/box.js +28 -0
- package/dist/ui/layout/box/box.js.map +1 -0
- package/dist/ui/layout/box/index.d.ts +2 -0
- package/dist/ui/layout/box/index.d.ts.map +1 -0
- package/dist/ui/layout/box/index.js +3 -0
- package/dist/ui/layout/box/index.js.map +1 -0
- package/dist/ui/layout/center/center.d.ts +13 -0
- package/dist/ui/layout/center/center.d.ts.map +1 -0
- package/dist/ui/layout/center/center.js +22 -0
- package/dist/ui/layout/center/center.js.map +1 -0
- package/dist/ui/layout/center/index.d.ts +2 -0
- package/dist/ui/layout/center/index.d.ts.map +1 -0
- package/dist/ui/layout/center/index.js +3 -0
- package/dist/ui/layout/center/index.js.map +1 -0
- package/dist/ui/layout/cluster/cluster.d.ts +11 -0
- package/dist/ui/layout/cluster/cluster.d.ts.map +1 -0
- package/dist/ui/layout/cluster/cluster.js +19 -0
- package/dist/ui/layout/cluster/cluster.js.map +1 -0
- package/dist/ui/layout/cluster/index.d.ts +2 -0
- package/dist/ui/layout/cluster/index.d.ts.map +1 -0
- package/dist/ui/layout/cluster/index.js +3 -0
- package/dist/ui/layout/cluster/index.js.map +1 -0
- package/dist/ui/layout/cover/cover.d.ts +26 -0
- package/dist/ui/layout/cover/cover.d.ts.map +1 -0
- package/dist/ui/layout/cover/cover.js +57 -0
- package/dist/ui/layout/cover/cover.js.map +1 -0
- package/dist/ui/layout/cover/index.d.ts +2 -0
- package/dist/ui/layout/cover/index.d.ts.map +1 -0
- package/dist/ui/layout/cover/index.js +3 -0
- package/dist/ui/layout/cover/index.js.map +1 -0
- package/dist/ui/layout/grid/grid.d.ts +14 -0
- package/dist/ui/layout/grid/grid.d.ts.map +1 -0
- package/dist/ui/layout/grid/grid.js +25 -0
- package/dist/ui/layout/grid/grid.js.map +1 -0
- package/dist/ui/layout/grid/index.d.ts +2 -0
- package/dist/ui/layout/grid/index.d.ts.map +1 -0
- package/dist/ui/layout/grid/index.js +3 -0
- package/dist/ui/layout/grid/index.js.map +1 -0
- package/dist/ui/layout/sidebar/index.d.ts +2 -0
- package/dist/ui/layout/sidebar/index.d.ts.map +1 -0
- package/dist/ui/layout/sidebar/index.js +3 -0
- package/dist/ui/layout/sidebar/index.js.map +1 -0
- package/dist/ui/layout/sidebar/sidebar.d.ts +33 -0
- package/dist/ui/layout/sidebar/sidebar.d.ts.map +1 -0
- package/dist/ui/layout/sidebar/sidebar.js +54 -0
- package/dist/ui/layout/sidebar/sidebar.js.map +1 -0
- package/dist/ui/layout/switcher/index.d.ts +2 -0
- package/dist/ui/layout/switcher/index.d.ts.map +1 -0
- package/dist/ui/layout/switcher/index.js +3 -0
- package/dist/ui/layout/switcher/index.js.map +1 -0
- package/dist/ui/layout/switcher/switcher.d.ts +15 -0
- package/dist/ui/layout/switcher/switcher.d.ts.map +1 -0
- package/dist/ui/layout/switcher/switcher.js +26 -0
- package/dist/ui/layout/switcher/switcher.js.map +1 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts +27 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js +50 -0
- package/dist/ui/molecules/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/ui/molecules/breadcrumbs/index.d.ts +2 -0
- package/dist/ui/molecules/breadcrumbs/index.d.ts.map +1 -0
- package/dist/ui/molecules/breadcrumbs/index.js +3 -0
- package/dist/ui/molecules/breadcrumbs/index.js.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts +47 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js +63 -0
- package/dist/ui/molecules/bulk-action-bar/bulk-action-bar.js.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/index.d.ts +2 -0
- package/dist/ui/molecules/bulk-action-bar/index.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-action-bar/index.js +3 -0
- package/dist/ui/molecules/bulk-action-bar/index.js.map +1 -0
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts +31 -0
- package/dist/ui/molecules/bulk-result/bulk-result.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-result/bulk-result.js +86 -0
- package/dist/ui/molecules/bulk-result/bulk-result.js.map +1 -0
- package/dist/ui/molecules/bulk-result/index.d.ts +2 -0
- package/dist/ui/molecules/bulk-result/index.d.ts.map +1 -0
- package/dist/ui/molecules/bulk-result/index.js +3 -0
- package/dist/ui/molecules/bulk-result/index.js.map +1 -0
- package/dist/ui/molecules/card/card.d.ts +5 -0
- package/dist/ui/molecules/card/card.d.ts.map +1 -0
- package/dist/ui/molecules/card/card.js +14 -0
- package/dist/ui/molecules/card/card.js.map +1 -0
- package/dist/ui/molecules/card/index.d.ts +2 -0
- package/dist/ui/molecules/card/index.d.ts.map +1 -0
- package/dist/ui/molecules/card/index.js +3 -0
- package/dist/ui/molecules/card/index.js.map +1 -0
- package/dist/ui/molecules/column-settings/column-settings.d.ts +29 -0
- package/dist/ui/molecules/column-settings/column-settings.d.ts.map +1 -0
- package/dist/ui/molecules/column-settings/column-settings.js +117 -0
- package/dist/ui/molecules/column-settings/column-settings.js.map +1 -0
- package/dist/ui/molecules/column-settings/index.d.ts +2 -0
- package/dist/ui/molecules/column-settings/index.d.ts.map +1 -0
- package/dist/ui/molecules/column-settings/index.js +3 -0
- package/dist/ui/molecules/column-settings/index.js.map +1 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts +31 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js +68 -0
- package/dist/ui/molecules/confirm-dialog/confirm-dialog.js.map +1 -0
- package/dist/ui/molecules/confirm-dialog/index.d.ts +2 -0
- package/dist/ui/molecules/confirm-dialog/index.d.ts.map +1 -0
- package/dist/ui/molecules/confirm-dialog/index.js +3 -0
- package/dist/ui/molecules/confirm-dialog/index.js.map +1 -0
- package/dist/ui/molecules/drawer/drawer.d.ts +25 -0
- package/dist/ui/molecules/drawer/drawer.d.ts.map +1 -0
- package/dist/ui/molecules/drawer/drawer.js +60 -0
- package/dist/ui/molecules/drawer/drawer.js.map +1 -0
- package/dist/ui/molecules/drawer/index.d.ts +2 -0
- package/dist/ui/molecules/drawer/index.d.ts.map +1 -0
- package/dist/ui/molecules/drawer/index.js +3 -0
- package/dist/ui/molecules/drawer/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts +36 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.js +191 -0
- package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -0
- package/dist/ui/molecules/entity-link-input/index.d.ts +2 -0
- package/dist/ui/molecules/entity-link-input/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-input/index.js +3 -0
- package/dist/ui/molecules/entity-link-input/index.js.map +1 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts +19 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +78 -0
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js.map +1 -0
- package/dist/ui/molecules/entity-link-picker/index.d.ts +2 -0
- package/dist/ui/molecules/entity-link-picker/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-link-picker/index.js +3 -0
- package/dist/ui/molecules/entity-link-picker/index.js.map +1 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts +30 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.d.ts.map +1 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.js +39 -0
- package/dist/ui/molecules/entity-record-card/entity-record-card.js.map +1 -0
- package/dist/ui/molecules/entity-record-card/index.d.ts +2 -0
- package/dist/ui/molecules/entity-record-card/index.d.ts.map +1 -0
- package/dist/ui/molecules/entity-record-card/index.js +3 -0
- package/dist/ui/molecules/entity-record-card/index.js.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts +19 -0
- package/dist/ui/molecules/filter-builder/filter-builder.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-builder.js +333 -0
- package/dist/ui/molecules/filter-builder/filter-builder.js.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-operators.d.ts +20 -0
- package/dist/ui/molecules/filter-builder/filter-operators.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/filter-operators.js +56 -0
- package/dist/ui/molecules/filter-builder/filter-operators.js.map +1 -0
- package/dist/ui/molecules/filter-builder/index.d.ts +3 -0
- package/dist/ui/molecules/filter-builder/index.d.ts.map +1 -0
- package/dist/ui/molecules/filter-builder/index.js +4 -0
- package/dist/ui/molecules/filter-builder/index.js.map +1 -0
- package/dist/ui/molecules/loading-boundary/index.d.ts +2 -0
- package/dist/ui/molecules/loading-boundary/index.d.ts.map +1 -0
- package/dist/ui/molecules/loading-boundary/index.js +3 -0
- package/dist/ui/molecules/loading-boundary/index.js.map +1 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts +27 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.d.ts.map +1 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.js +42 -0
- package/dist/ui/molecules/loading-boundary/loading-boundary.js.map +1 -0
- package/dist/ui/molecules/menu/index.d.ts +2 -0
- package/dist/ui/molecules/menu/index.d.ts.map +1 -0
- package/dist/ui/molecules/menu/index.js +3 -0
- package/dist/ui/molecules/menu/index.js.map +1 -0
- package/dist/ui/molecules/menu/menu.d.ts +37 -0
- package/dist/ui/molecules/menu/menu.d.ts.map +1 -0
- package/dist/ui/molecules/menu/menu.js +71 -0
- package/dist/ui/molecules/menu/menu.js.map +1 -0
- package/dist/ui/molecules/pagination/index.d.ts +2 -0
- package/dist/ui/molecules/pagination/index.d.ts.map +1 -0
- package/dist/ui/molecules/pagination/index.js +3 -0
- package/dist/ui/molecules/pagination/index.js.map +1 -0
- package/dist/ui/molecules/pagination/pagination.d.ts +13 -0
- package/dist/ui/molecules/pagination/pagination.d.ts.map +1 -0
- package/dist/ui/molecules/pagination/pagination.js +68 -0
- package/dist/ui/molecules/pagination/pagination.js.map +1 -0
- package/dist/ui/molecules/sort-builder/index.d.ts +2 -0
- package/dist/ui/molecules/sort-builder/index.d.ts.map +1 -0
- package/dist/ui/molecules/sort-builder/index.js +3 -0
- package/dist/ui/molecules/sort-builder/index.js.map +1 -0
- package/dist/ui/molecules/sort-builder/sort-builder.d.ts +18 -0
- package/dist/ui/molecules/sort-builder/sort-builder.d.ts.map +1 -0
- package/dist/ui/molecules/sort-builder/sort-builder.js +185 -0
- package/dist/ui/molecules/sort-builder/sort-builder.js.map +1 -0
- package/dist/ui/molecules/stack/index.d.ts +2 -0
- package/dist/ui/molecules/stack/index.d.ts.map +1 -0
- package/dist/ui/molecules/stack/index.js +3 -0
- package/dist/ui/molecules/stack/index.js.map +1 -0
- package/dist/ui/molecules/stack/stack.d.ts +12 -0
- package/dist/ui/molecules/stack/stack.d.ts.map +1 -0
- package/dist/ui/molecules/stack/stack.js +36 -0
- package/dist/ui/molecules/stack/stack.js.map +1 -0
- package/dist/ui/molecules/tab-strip/index.d.ts +2 -0
- package/dist/ui/molecules/tab-strip/index.d.ts.map +1 -0
- package/dist/ui/molecules/tab-strip/index.js +3 -0
- package/dist/ui/molecules/tab-strip/index.js.map +1 -0
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts +29 -0
- package/dist/ui/molecules/tab-strip/tab-strip.d.ts.map +1 -0
- package/dist/ui/molecules/tab-strip/tab-strip.js +82 -0
- package/dist/ui/molecules/tab-strip/tab-strip.js.map +1 -0
- package/dist/ui/molecules/table-toolbar/index.d.ts +2 -0
- package/dist/ui/molecules/table-toolbar/index.d.ts.map +1 -0
- package/dist/ui/molecules/table-toolbar/index.js +3 -0
- package/dist/ui/molecules/table-toolbar/index.js.map +1 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts +13 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.d.ts.map +1 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.js +28 -0
- package/dist/ui/molecules/table-toolbar/table-toolbar.js.map +1 -0
- package/dist/ui/molecules/theme-switcher/index.d.ts +2 -0
- package/dist/ui/molecules/theme-switcher/index.d.ts.map +1 -0
- package/dist/ui/molecules/theme-switcher/index.js +3 -0
- package/dist/ui/molecules/theme-switcher/index.js.map +1 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts +6 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.d.ts.map +1 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.js +24 -0
- package/dist/ui/molecules/theme-switcher/theme-switcher.js.map +1 -0
- package/dist/ui/organisms/command-palette/command-palette.d.ts +67 -0
- package/dist/ui/organisms/command-palette/command-palette.d.ts.map +1 -0
- package/dist/ui/organisms/command-palette/command-palette.js +226 -0
- package/dist/ui/organisms/command-palette/command-palette.js.map +1 -0
- package/dist/ui/organisms/command-palette/index.d.ts +2 -0
- package/dist/ui/organisms/command-palette/index.d.ts.map +1 -0
- package/dist/ui/organisms/command-palette/index.js +3 -0
- package/dist/ui/organisms/command-palette/index.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts +43 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js +281 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts +49 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js +3 -0
- package/dist/ui/organisms/entity-detail-grid/entity-detail-grid.types.js.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/index.d.ts +3 -0
- package/dist/ui/organisms/entity-detail-grid/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-detail-grid/index.js +4 -0
- package/dist/ui/organisms/entity-detail-grid/index.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.d.ts +53 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.js +44 -0
- package/dist/ui/organisms/entity-form/entity-form-slots.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.d.ts +4 -0
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.js +494 -0
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts +151 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.types.js +3 -0
- package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -0
- package/dist/ui/organisms/entity-form/index.d.ts +5 -0
- package/dist/ui/organisms/entity-form/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/index.js +6 -0
- package/dist/ui/organisms/entity-form/index.js.map +1 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts +13 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.d.ts.map +1 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.js +50 -0
- package/dist/ui/organisms/entity-form/use-entity-form-fields.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.d.ts +55 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.js +50 -0
- package/dist/ui/organisms/entity-table/entity-table-slots.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.d.ts +4 -0
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.js +529 -0
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +126 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/entity-table.types.js +3 -0
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -0
- package/dist/ui/organisms/entity-table/index.d.ts +5 -0
- package/dist/ui/organisms/entity-table/index.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/index.js +6 -0
- package/dist/ui/organisms/entity-table/index.js.map +1 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts +29 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.d.ts.map +1 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.js +103 -0
- package/dist/ui/organisms/entity-table/use-entity-table-columns.js.map +1 -0
- package/dist/ui/organisms/top-bar/index.d.ts +2 -0
- package/dist/ui/organisms/top-bar/index.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/index.js +3 -0
- package/dist/ui/organisms/top-bar/index.js.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts +20 -0
- package/dist/ui/organisms/top-bar/top-bar.d.ts.map +1 -0
- package/dist/ui/organisms/top-bar/top-bar.js +43 -0
- package/dist/ui/organisms/top-bar/top-bar.js.map +1 -0
- package/dist/ui/organisms/wizard/index.d.ts +3 -0
- package/dist/ui/organisms/wizard/index.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/index.js +4 -0
- package/dist/ui/organisms/wizard/index.js.map +1 -0
- package/dist/ui/organisms/wizard/wizard.d.ts +21 -0
- package/dist/ui/organisms/wizard/wizard.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/wizard.js +260 -0
- package/dist/ui/organisms/wizard/wizard.js.map +1 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts +83 -0
- package/dist/ui/organisms/wizard/wizard.types.d.ts.map +1 -0
- package/dist/ui/organisms/wizard/wizard.types.js +3 -0
- package/dist/ui/organisms/wizard/wizard.types.js.map +1 -0
- package/dist/ui/utils/cn.d.ts +4 -0
- package/dist/ui/utils/cn.d.ts.map +1 -0
- package/dist/ui/utils/cn.js +5 -0
- package/dist/ui/utils/cn.js.map +1 -0
- package/dist/ui/utils/use-hotkey.d.ts +31 -0
- package/dist/ui/utils/use-hotkey.d.ts.map +1 -0
- package/dist/ui/utils/use-hotkey.js +69 -0
- package/dist/ui/utils/use-hotkey.js.map +1 -0
- package/package.json +118 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-link.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,kBAAkB;IAC1E;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,+BAMjB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { button } from './button-recipe.js';
|
|
6
|
+
export function ButtonLink(_0) {
|
|
7
|
+
let { variant, size, className, children } = _0, props = _object_without_properties_loose(_0, [
|
|
8
|
+
"variant",
|
|
9
|
+
"size",
|
|
10
|
+
"className",
|
|
11
|
+
"children"
|
|
12
|
+
]);
|
|
13
|
+
return /*#__PURE__*/ _jsx("a", _extends({
|
|
14
|
+
className: cn(button({
|
|
15
|
+
variant,
|
|
16
|
+
size
|
|
17
|
+
}), className)
|
|
18
|
+
}, props, {
|
|
19
|
+
children: children
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=button-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/button-link.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\nimport { cn } from '../../utils/cn.js';\nimport { button, type ButtonVariantProps } from './button-recipe.js';\n\n/**\n * An anchor wearing {@link Button}'s clothes — and, unlike `Button`, a\n * **server** component.\n *\n * Most call-to-action buttons are not buttons: \"View product\", \"Browse\n * category\" and \"Keep shopping\" navigate, and a `<button>` that navigates is\n * both worse for the visitor (no middle-click, no open-in-new-tab, no status\n * bar) and more expensive for the page, because `Button` carries a\n * `'use client'` and would turn every card in a grid into its own client\n * boundary.\n *\n * Reach for `Button` when something actually happens on click; reach for this\n * when the click is a link. It takes no event handlers on purpose — accepting\n * one would quietly demand a client parent to pass it.\n */\nexport interface ButtonLinkProps\n extends Omit<ComponentPropsWithoutRef<'a'>, 'onClick'>, ButtonVariantProps {\n /**\n * Required: a link with no content is invisible to a screen reader and\n * unclickable to everyone else. `jsx-a11y/anchor-has-content` cannot see\n * through the prop spread below, so the type is what enforces it.\n */\n children: ReactNode;\n}\n\nexport function ButtonLink({\n variant,\n size,\n className,\n children,\n ...props\n}: ButtonLinkProps) {\n return (\n <a className={cn(button({ variant, size }), className)} {...props}>\n {children}\n </a>\n );\n}\n"],"names":["cn","button","ButtonLink","variant","size","className","children","props","a"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AACvC,SAASC,MAAM,QAAiC,qBAAqB;AA2BrE,OAAO,SAASC,WAAW,EAMT;QANS,EACzBC,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,QAAQ,EAEQ,OADbC;;;;;;IAEH,qBACE,KAACC;QAAEH,WAAWL,GAAGC,OAAO;YAAEE;YAASC;QAAK,IAAIC;OAAgBE;kBACzDD;;AAGP"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* The button's visual recipe, kept in its own module so it can be shared with
|
|
4
|
+
* components that must **not** be client ones.
|
|
5
|
+
*
|
|
6
|
+
* `Button` is `'use client'` for a single reason — it renders HeadlessUI's
|
|
7
|
+
* `Button` — and a server page that puts one inside every card in a grid pays a
|
|
8
|
+
* client boundary per card. `cva` and the token classes have no such
|
|
9
|
+
* constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes
|
|
10
|
+
* and still render entirely on the server.
|
|
11
|
+
*/
|
|
12
|
+
export declare const button: (props?: ({
|
|
13
|
+
variant?: "destructive" | "primary" | "secondary" | "ghost" | null | undefined;
|
|
14
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;
|
|
17
|
+
export type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;
|
|
18
|
+
export type ButtonVariantProps = VariantProps<typeof button>;
|
|
19
|
+
//# sourceMappingURL=button-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-recipe.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;8EAmClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAChF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* The button's visual recipe, kept in its own module so it can be shared with
|
|
4
|
+
* components that must **not** be client ones.
|
|
5
|
+
*
|
|
6
|
+
* `Button` is `'use client'` for a single reason — it renders HeadlessUI's
|
|
7
|
+
* `Button` — and a server page that puts one inside every card in a grid pays a
|
|
8
|
+
* client boundary per card. `cva` and the token classes have no such
|
|
9
|
+
* constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes
|
|
10
|
+
* and still render entirely on the server.
|
|
11
|
+
*/ export const button = cva([
|
|
12
|
+
'inline-flex items-center justify-center rounded-lg font-medium',
|
|
13
|
+
'transition duration-200 ease-smooth active:scale-[0.97]',
|
|
14
|
+
'focus-ring',
|
|
15
|
+
'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100'
|
|
16
|
+
], {
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
primary: 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',
|
|
20
|
+
secondary: 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',
|
|
21
|
+
ghost: 'bg-transparent text-content hover:bg-surface-elevated',
|
|
22
|
+
// For an act that destroys something — ending every session a user
|
|
23
|
+
// holds, deleting a record. The `--color-danger*` tokens already
|
|
24
|
+
// existed and were being reached for as raw classes at call sites; this
|
|
25
|
+
// only gives them a name, so a destructive action looks the same
|
|
26
|
+
// wherever it appears rather than depending on who wrote the screen.
|
|
27
|
+
destructive: 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card'
|
|
28
|
+
},
|
|
29
|
+
// Padding uses the fluid spacing tokens so buttons scale with the viewport.
|
|
30
|
+
size: {
|
|
31
|
+
sm: 'px-xs py-3xs text-step-0',
|
|
32
|
+
md: 'px-s py-2xs text-step-0',
|
|
33
|
+
lg: 'px-m py-xs text-step-1'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: 'primary',
|
|
38
|
+
size: 'md'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=button-recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/button-recipe.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * The button's visual recipe, kept in its own module so it can be shared with\n * components that must **not** be client ones.\n *\n * `Button` is `'use client'` for a single reason — it renders HeadlessUI's\n * `Button` — and a server page that puts one inside every card in a grid pays a\n * client boundary per card. `cva` and the token classes have no such\n * constraint, so a link-shaped variant (`ButtonLink`) can wear the same clothes\n * and still render entirely on the server.\n */\nexport const button = cva(\n [\n 'inline-flex items-center justify-center rounded-lg font-medium',\n 'transition duration-200 ease-smooth active:scale-[0.97]',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:scale-100',\n ],\n {\n variants: {\n variant: {\n primary:\n 'bg-primary text-primary-content shadow-raised hover:opacity-90 hover:shadow-card',\n secondary:\n 'border border-border bg-surface-elevated text-content shadow-edge hover:border-primary hover:shadow-raised',\n ghost: 'bg-transparent text-content hover:bg-surface-elevated',\n // For an act that destroys something — ending every session a user\n // holds, deleting a record. The `--color-danger*` tokens already\n // existed and were being reached for as raw classes at call sites; this\n // only gives them a name, so a destructive action looks the same\n // wherever it appears rather than depending on who wrote the screen.\n destructive:\n 'bg-danger text-danger-content shadow-raised hover:opacity-90 hover:shadow-card',\n },\n // Padding uses the fluid spacing tokens so buttons scale with the viewport.\n size: {\n sm: 'px-xs py-3xs text-step-0',\n md: 'px-s py-2xs text-step-0',\n lg: 'px-m py-xs text-step-1',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof button>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof button>['size']>;\nexport type ButtonVariantProps = VariantProps<typeof button>;\n"],"names":["cva","button","variants","variant","primary","secondary","ghost","destructive","size","sm","md","lg","defaultVariants"],"mappings":"AAAA,SAASA,GAAG,QAA2B,2BAA2B;AAElE;;;;;;;;;CASC,GACD,OAAO,MAAMC,SAASD,IACpB;IACE;IACA;IACA;IACA;CACD,EACD;IACEE,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WACE;YACFC,OAAO;YACP,mEAAmE;YACnE,iEAAiE;YACjE,wEAAwE;YACxE,iEAAiE;YACjE,qEAAqE;YACrEC,aACE;QACJ;QACA,4EAA4E;QAC5EC,MAAM;YACJC,IAAI;YACJC,IAAI;YACJC,IAAI;QACN;IACF;IACAC,iBAAiB;QACfT,SAAS;QACTK,MAAM;IACR;AACF,GACA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type ButtonVariantProps } from './button-recipe.js';
|
|
3
|
+
export type { ButtonSize, ButtonVariant } from './button-recipe.js';
|
|
4
|
+
export interface ButtonProps extends ComponentPropsWithoutRef<'button'>, ButtonVariantProps {
|
|
5
|
+
}
|
|
6
|
+
export declare function Button({ variant, size, className, ...props }: ButtonProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/button.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAErE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,WAAW,WACf,SAAQ,wBAAwB,CAAC,QAAQ,CAAC,EAAE,kBAAkB;CAAG;AAEnE,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,+BAOzE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
3
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Button as HeadlessButton } from '@headlessui/react';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
import { button } from './button-recipe.js';
|
|
8
|
+
export function Button(_0) {
|
|
9
|
+
let { variant, size, className } = _0, props = _object_without_properties_loose(_0, [
|
|
10
|
+
"variant",
|
|
11
|
+
"size",
|
|
12
|
+
"className"
|
|
13
|
+
]);
|
|
14
|
+
return /*#__PURE__*/ _jsx(HeadlessButton, _extends({
|
|
15
|
+
className: cn(button({
|
|
16
|
+
variant,
|
|
17
|
+
size
|
|
18
|
+
}), className)
|
|
19
|
+
}, props));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/button.tsx"],"sourcesContent":["'use client';\n\nimport { Button as HeadlessButton } from '@headlessui/react';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\nimport { button, type ButtonVariantProps } from './button-recipe.js';\n\nexport type { ButtonSize, ButtonVariant } from './button-recipe.js';\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, ButtonVariantProps {}\n\nexport function Button({ variant, size, className, ...props }: ButtonProps) {\n return (\n <HeadlessButton\n className={cn(button({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"names":["Button","HeadlessButton","cn","button","variant","size","className","props"],"mappings":"AAAA;;;;AAEA,SAASA,UAAUC,cAAc,QAAQ,oBAAoB;AAG7D,SAASC,EAAE,QAAQ,oBAAoB;AACvC,SAASC,MAAM,QAAiC,qBAAqB;AAOrE,OAAO,SAASH,OAAO,EAAmD;QAAnD,EAAEI,OAAO,EAAEC,IAAI,EAAEC,SAAS,EAAyB,OAApBC;;;;;IACpD,qBACE,KAACN;QACCK,WAAWJ,GAAGC,OAAO;YAAEC;YAASC;QAAK,IAAIC;OACrCC;AAGV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/button/index.ts"],"sourcesContent":["export * from './button.js';\nexport * from './button-link.js';\nexport * from './button-recipe.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type EntityFieldDescriptor } from '@entifix/core';
|
|
2
|
+
export interface CellValueProps {
|
|
3
|
+
value: unknown;
|
|
4
|
+
descriptor: EntityFieldDescriptor;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders one entity member according to its metadata type. Centralizing this
|
|
8
|
+
* is what lets a table stay generic: a link, a date and a number all arrive as
|
|
9
|
+
* "the value of an accessor", and only the descriptor decides how they read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CellValue({ value, descriptor }: CellValueProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=cell-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-value.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/cell-value/cell-value.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,qBAAqB,EAG3B,MAAM,eAAe,CAAC;AAqHvB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,cAAc,+BA6B9D"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { EntityCollectionLink, EntityLink } from '@entifix/core';
|
|
4
|
+
import { useEnumLabel, useFormatters, useT } from '../../../i18n/index.js';
|
|
5
|
+
/** Stand-in for an absent value, so an empty cell still reads as intentional. */ const EMPTY = '—';
|
|
6
|
+
/**
|
|
7
|
+
* A link reads as its target's label when the target is loaded (embedded or
|
|
8
|
+
* resolved), and as the bare foreign key when it is not — the same cell markup
|
|
9
|
+
* covers both shapes a relation can arrive in.
|
|
10
|
+
*/ function entityLabel(target, linkLabelProperty) {
|
|
11
|
+
const label = target == null ? void 0 : target[linkLabelProperty];
|
|
12
|
+
return label == null ? undefined : String(label);
|
|
13
|
+
}
|
|
14
|
+
function formatLink(link, linkLabelProperty) {
|
|
15
|
+
var _entityLabel;
|
|
16
|
+
return (_entityLabel = entityLabel(link.value, linkLabelProperty)) != null ? _entityLabel : link.id == null ? EMPTY : String(link.id);
|
|
17
|
+
}
|
|
18
|
+
function formatCollectionLink(link, linkLabelProperty) {
|
|
19
|
+
const loaded = link.values;
|
|
20
|
+
if (loaded !== undefined) {
|
|
21
|
+
return loaded.map((target, index)=>{
|
|
22
|
+
var _entityLabel, _ref, _target_id;
|
|
23
|
+
return (_entityLabel = entityLabel(target, linkLabelProperty)) != null ? _entityLabel : String((_ref = (_target_id = target.id) != null ? _target_id : link.ids[index]) != null ? _ref : '');
|
|
24
|
+
}).join(', ');
|
|
25
|
+
}
|
|
26
|
+
return link.ids.map(String).join(', ');
|
|
27
|
+
}
|
|
28
|
+
function formatByType(value, type, linkLabelProperty, formatting) {
|
|
29
|
+
switch(type){
|
|
30
|
+
case 'date':
|
|
31
|
+
return formatting.formatters.date(value instanceof Date ? value : String(value));
|
|
32
|
+
case 'number':
|
|
33
|
+
return typeof value === 'number' ? formatting.formatters.number(value) : String(value);
|
|
34
|
+
case 'boolean':
|
|
35
|
+
return value ? formatting.yes : formatting.no;
|
|
36
|
+
case 'enum':
|
|
37
|
+
return formatting.enumLabel(String(value));
|
|
38
|
+
case 'link':
|
|
39
|
+
return value instanceof EntityLink ? formatLink(value, linkLabelProperty) : String(value);
|
|
40
|
+
case 'linkCollection':
|
|
41
|
+
return value instanceof EntityCollectionLink ? formatCollectionLink(value, linkLabelProperty) : String(value);
|
|
42
|
+
case 'scalarCollection':
|
|
43
|
+
// The same comma list the draft holds, spaced for reading. Not `String`:
|
|
44
|
+
// an array's own `toString` joins on a bare comma, which reads as one
|
|
45
|
+
// run-on token in a narrow column.
|
|
46
|
+
return Array.isArray(value) ? value.join(', ') : String(value);
|
|
47
|
+
case 'composition':
|
|
48
|
+
// Owned rows have no useful one-line form — a receipt's lines are not a
|
|
49
|
+
// sentence — and the master's own screen is where they are read and
|
|
50
|
+
// edited. So the cell reports the count and stops.
|
|
51
|
+
return Array.isArray(value) ? formatting.rowCount(value.length) : String(value);
|
|
52
|
+
default:
|
|
53
|
+
return String(value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Tabular figures, applied once, here — not on `--font-sans` and not per call
|
|
58
|
+
* site. A column of numbers or dates must align on the digit; a paragraph must
|
|
59
|
+
* not, because proportional figures are what prose is set in. The descriptor
|
|
60
|
+
* already knows which is which, so the cell is the only place that has to.
|
|
61
|
+
*/ const NUMERIC_CLASS = {
|
|
62
|
+
number: 'tabular-nums',
|
|
63
|
+
date: 'tabular-nums'
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Renders one entity member according to its metadata type. Centralizing this
|
|
67
|
+
* is what lets a table stay generic: a link, a date and a number all arrive as
|
|
68
|
+
* "the value of an accessor", and only the descriptor decides how they read.
|
|
69
|
+
*/ export function CellValue({ value, descriptor }) {
|
|
70
|
+
var _NUMERIC_CLASS_descriptor_type;
|
|
71
|
+
const t = useT();
|
|
72
|
+
const formatters = useFormatters();
|
|
73
|
+
const enumLabel = useEnumLabel();
|
|
74
|
+
if (value === undefined || value === null) {
|
|
75
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
76
|
+
className: "text-content-muted",
|
|
77
|
+
children: EMPTY
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const text = formatByType(value, descriptor.type, descriptor.linkLabelProperty, {
|
|
81
|
+
formatters,
|
|
82
|
+
yes: t('value.yes'),
|
|
83
|
+
no: t('value.no'),
|
|
84
|
+
enumLabel: (raw)=>enumLabel(descriptor, raw),
|
|
85
|
+
rowCount: (count)=>t('value.rowCount', {
|
|
86
|
+
count
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
if (text === '') {
|
|
90
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
91
|
+
className: "text-content-muted",
|
|
92
|
+
children: EMPTY
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
96
|
+
className: (_NUMERIC_CLASS_descriptor_type = NUMERIC_CLASS[descriptor.type]) != null ? _NUMERIC_CLASS_descriptor_type : undefined,
|
|
97
|
+
children: text
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=cell-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/cell-value/cell-value.tsx"],"sourcesContent":["'use client';\n\nimport type { Formatters } from '@entifix/core';\nimport {\n type Entity,\n EntityCollectionLink,\n type EntityFieldDescriptor,\n EntityLink,\n type MetaAccessorType,\n} from '@entifix/core';\n\nimport { useEnumLabel, useFormatters, useT } from '../../../i18n/index.js';\n\n/** Stand-in for an absent value, so an empty cell still reads as intentional. */\nconst EMPTY = '—';\n\n/**\n * A link reads as its target's label when the target is loaded (embedded or\n * resolved), and as the bare foreign key when it is not — the same cell markup\n * covers both shapes a relation can arrive in.\n */\nfunction entityLabel(\n target: Entity | undefined,\n linkLabelProperty: string,\n): string | undefined {\n const label = (target as Record<string, unknown> | undefined)?.[\n linkLabelProperty\n ];\n return label == null ? undefined : String(label);\n}\n\nfunction formatLink(\n link: EntityLink<Entity>,\n linkLabelProperty: string,\n): string {\n return (\n entityLabel(link.value, linkLabelProperty) ??\n (link.id == null ? EMPTY : String(link.id))\n );\n}\n\nfunction formatCollectionLink(\n link: EntityCollectionLink<Entity>,\n linkLabelProperty: string,\n): string {\n const loaded = link.values;\n if (loaded !== undefined) {\n return loaded\n .map(\n (target, index) =>\n entityLabel(target, linkLabelProperty) ??\n String(target.id ?? link.ids[index] ?? ''),\n )\n .join(', ');\n }\n return link.ids.map(String).join(', ');\n}\n\n/**\n * Everything locale-dependent, resolved once by the component and handed down.\n * The formatters carry an explicit locale, which is what keeps a date rendered\n * on the server byte-identical to the same date rendered in the browser.\n */\ninterface CellFormatting {\n readonly formatters: Formatters;\n readonly yes: string;\n readonly no: string;\n readonly enumLabel: (value: string) => string;\n readonly rowCount: (count: number) => string;\n}\n\nfunction formatByType(\n value: unknown,\n type: MetaAccessorType,\n linkLabelProperty: string,\n formatting: CellFormatting,\n): string {\n switch (type) {\n case 'date':\n return formatting.formatters.date(\n value instanceof Date ? value : String(value),\n );\n case 'number':\n return typeof value === 'number'\n ? formatting.formatters.number(value)\n : String(value);\n case 'boolean':\n return value ? formatting.yes : formatting.no;\n case 'enum':\n return formatting.enumLabel(String(value));\n case 'link':\n return value instanceof EntityLink\n ? formatLink(value, linkLabelProperty)\n : String(value);\n case 'linkCollection':\n return value instanceof EntityCollectionLink\n ? formatCollectionLink(value, linkLabelProperty)\n : String(value);\n case 'scalarCollection':\n // The same comma list the draft holds, spaced for reading. Not `String`:\n // an array's own `toString` joins on a bare comma, which reads as one\n // run-on token in a narrow column.\n return Array.isArray(value) ? value.join(', ') : String(value);\n case 'composition':\n // Owned rows have no useful one-line form — a receipt's lines are not a\n // sentence — and the master's own screen is where they are read and\n // edited. So the cell reports the count and stops.\n return Array.isArray(value)\n ? formatting.rowCount(value.length)\n : String(value);\n default:\n return String(value);\n }\n}\n\n/**\n * Tabular figures, applied once, here — not on `--font-sans` and not per call\n * site. A column of numbers or dates must align on the digit; a paragraph must\n * not, because proportional figures are what prose is set in. The descriptor\n * already knows which is which, so the cell is the only place that has to.\n */\nconst NUMERIC_CLASS: Partial<Record<MetaAccessorType, string>> = {\n number: 'tabular-nums',\n date: 'tabular-nums',\n};\n\nexport interface CellValueProps {\n value: unknown;\n descriptor: EntityFieldDescriptor;\n}\n\n/**\n * Renders one entity member according to its metadata type. Centralizing this\n * is what lets a table stay generic: a link, a date and a number all arrive as\n * \"the value of an accessor\", and only the descriptor decides how they read.\n */\nexport function CellValue({ value, descriptor }: CellValueProps) {\n const t = useT();\n const formatters = useFormatters();\n const enumLabel = useEnumLabel();\n\n if (value === undefined || value === null) {\n return <span className=\"text-content-muted\">{EMPTY}</span>;\n }\n\n const text = formatByType(\n value,\n descriptor.type,\n descriptor.linkLabelProperty,\n {\n formatters,\n yes: t('value.yes'),\n no: t('value.no'),\n enumLabel: raw => enumLabel(descriptor, raw),\n rowCount: count => t('value.rowCount', { count }),\n },\n );\n\n if (text === '') {\n return <span className=\"text-content-muted\">{EMPTY}</span>;\n }\n\n return (\n <span className={NUMERIC_CLASS[descriptor.type] ?? undefined}>{text}</span>\n );\n}\n"],"names":["EntityCollectionLink","EntityLink","useEnumLabel","useFormatters","useT","EMPTY","entityLabel","target","linkLabelProperty","label","undefined","String","formatLink","link","value","id","formatCollectionLink","loaded","values","map","index","ids","join","formatByType","type","formatting","formatters","date","Date","number","yes","no","enumLabel","Array","isArray","rowCount","length","NUMERIC_CLASS","CellValue","descriptor","t","span","className","text","raw","count"],"mappings":"AAAA;;AAGA,SAEEA,oBAAoB,EAEpBC,UAAU,QAEL,gBAAgB;AAEvB,SAASC,YAAY,EAAEC,aAAa,EAAEC,IAAI,QAAQ,yBAAyB;AAE3E,+EAA+E,GAC/E,MAAMC,QAAQ;AAEd;;;;CAIC,GACD,SAASC,YACPC,MAA0B,EAC1BC,iBAAyB;IAEzB,MAAMC,QAASF,0BAAD,AAACA,MAAgD,CAC7DC,kBACD;IACD,OAAOC,SAAS,OAAOC,YAAYC,OAAOF;AAC5C;AAEA,SAASG,WACPC,IAAwB,EACxBL,iBAAyB;QAGvBF;IADF,QACEA,eAAAA,YAAYO,KAAKC,KAAK,EAAEN,8BAAxBF,eACCO,KAAKE,EAAE,IAAI,OAAOV,QAAQM,OAAOE,KAAKE,EAAE;AAE7C;AAEA,SAASC,qBACPH,IAAkC,EAClCL,iBAAyB;IAEzB,MAAMS,SAASJ,KAAKK,MAAM;IAC1B,IAAID,WAAWP,WAAW;QACxB,OAAOO,OACJE,GAAG,CACF,CAACZ,QAAQa;gBACPd,cACOC,MAAAA;oBADPD,eAAAA,YAAYC,QAAQC,8BAApBF,eACAK,QAAOJ,QAAAA,aAAAA,OAAOQ,EAAE,YAATR,aAAaM,KAAKQ,GAAG,CAACD,MAAM,YAA5Bb,OAAgC;WAE1Ce,IAAI,CAAC;IACV;IACA,OAAOT,KAAKQ,GAAG,CAACF,GAAG,CAACR,QAAQW,IAAI,CAAC;AACnC;AAeA,SAASC,aACPT,KAAc,EACdU,IAAsB,EACtBhB,iBAAyB,EACzBiB,UAA0B;IAE1B,OAAQD;QACN,KAAK;YACH,OAAOC,WAAWC,UAAU,CAACC,IAAI,CAC/Bb,iBAAiBc,OAAOd,QAAQH,OAAOG;QAE3C,KAAK;YACH,OAAO,OAAOA,UAAU,WACpBW,WAAWC,UAAU,CAACG,MAAM,CAACf,SAC7BH,OAAOG;QACb,KAAK;YACH,OAAOA,QAAQW,WAAWK,GAAG,GAAGL,WAAWM,EAAE;QAC/C,KAAK;YACH,OAAON,WAAWO,SAAS,CAACrB,OAAOG;QACrC,KAAK;YACH,OAAOA,iBAAiBb,aACpBW,WAAWE,OAAON,qBAClBG,OAAOG;QACb,KAAK;YACH,OAAOA,iBAAiBd,uBACpBgB,qBAAqBF,OAAON,qBAC5BG,OAAOG;QACb,KAAK;YACH,yEAAyE;YACzE,sEAAsE;YACtE,mCAAmC;YACnC,OAAOmB,MAAMC,OAAO,CAACpB,SAASA,MAAMQ,IAAI,CAAC,QAAQX,OAAOG;QAC1D,KAAK;YACH,wEAAwE;YACxE,oEAAoE;YACpE,mDAAmD;YACnD,OAAOmB,MAAMC,OAAO,CAACpB,SACjBW,WAAWU,QAAQ,CAACrB,MAAMsB,MAAM,IAChCzB,OAAOG;QACb;YACE,OAAOH,OAAOG;IAClB;AACF;AAEA;;;;;CAKC,GACD,MAAMuB,gBAA2D;IAC/DR,QAAQ;IACRF,MAAM;AACR;AAOA;;;;CAIC,GACD,OAAO,SAASW,UAAU,EAAExB,KAAK,EAAEyB,UAAU,EAAkB;QA2B1CF;IA1BnB,MAAMG,IAAIpC;IACV,MAAMsB,aAAavB;IACnB,MAAM6B,YAAY9B;IAElB,IAAIY,UAAUJ,aAAaI,UAAU,MAAM;QACzC,qBAAO,KAAC2B;YAAKC,WAAU;sBAAsBrC;;IAC/C;IAEA,MAAMsC,OAAOpB,aACXT,OACAyB,WAAWf,IAAI,EACfe,WAAW/B,iBAAiB,EAC5B;QACEkB;QACAI,KAAKU,EAAE;QACPT,IAAIS,EAAE;QACNR,WAAWY,CAAAA,MAAOZ,UAAUO,YAAYK;QACxCT,UAAUU,CAAAA,QAASL,EAAE,kBAAkB;gBAAEK;YAAM;IACjD;IAGF,IAAIF,SAAS,IAAI;QACf,qBAAO,KAACF;YAAKC,WAAU;sBAAsBrC;;IAC/C;IAEA,qBACE,KAACoC;QAAKC,SAAS,GAAEL,iCAAAA,aAAa,CAACE,WAAWf,IAAI,CAAC,YAA9Ba,iCAAkC3B;kBAAYiC;;AAEnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/cell-value/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/cell-value/index.ts"],"sourcesContent":["export * from './cell-value.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface CheckboxProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type'> {
|
|
3
|
+
/**
|
|
4
|
+
* The visible caption. Omit it for a box whose meaning comes from where it
|
|
5
|
+
* sits — a row's selection box, where the column header is the caption and
|
|
6
|
+
* the row itself is the subject — and pass `aria-label` instead, so the
|
|
7
|
+
* control still announces itself to a screen reader. A box with neither is
|
|
8
|
+
* unlabelled.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The third state: some of the rows below are selected, but not all.
|
|
13
|
+
*
|
|
14
|
+
* It is a DOM **property**, not an attribute, so React cannot set it from
|
|
15
|
+
* JSX — `<input indeterminate>` is silently dropped — and it has to be
|
|
16
|
+
* written through a ref after render. That is the whole reason this component
|
|
17
|
+
* is separate from its siblings in `field.tsx`, and the reason it carries
|
|
18
|
+
* `'use client'`: those two are hook-free and stay server-renderable, because
|
|
19
|
+
* the storefront's search page is a Server Component that imports `TextInput`
|
|
20
|
+
* and must not pull a client boundary into a prerendered route.
|
|
21
|
+
*/
|
|
22
|
+
indeterminate?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A checkbox, with its caption when it has one.
|
|
26
|
+
*
|
|
27
|
+
* Two shapes, and the difference is not cosmetic. With `label` it renders the
|
|
28
|
+
* caption inside a `<label>` and the whole pair is the click target — the form
|
|
29
|
+
* control every other field is. Without one it renders a bare box that takes
|
|
30
|
+
* its meaning from its position, which is what a selection column needs: a
|
|
31
|
+
* caption per row would repeat the column header on every line, and the row's
|
|
32
|
+
* own cells are already the subject.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Checkbox({ label, className, indeterminate, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
35
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,OAAO,CAAC;AAIzE,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,wBAAwB,CAAC,OAAO,CAAC,EACjC,MAAM,CACP;IACC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,aAAqB,EACrB,GAAG,KAAK,EACT,EAAE,aAAa,+BAiCf"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
3
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useEffect, useRef } from 'react';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
/**
|
|
8
|
+
* A checkbox, with its caption when it has one.
|
|
9
|
+
*
|
|
10
|
+
* Two shapes, and the difference is not cosmetic. With `label` it renders the
|
|
11
|
+
* caption inside a `<label>` and the whole pair is the click target — the form
|
|
12
|
+
* control every other field is. Without one it renders a bare box that takes
|
|
13
|
+
* its meaning from its position, which is what a selection column needs: a
|
|
14
|
+
* caption per row would repeat the column header on every line, and the row's
|
|
15
|
+
* own cells are already the subject.
|
|
16
|
+
*/ export function Checkbox(_0) {
|
|
17
|
+
let { label, className, indeterminate = false } = _0, props = _object_without_properties_loose(_0, [
|
|
18
|
+
"label",
|
|
19
|
+
"className",
|
|
20
|
+
"indeterminate"
|
|
21
|
+
]);
|
|
22
|
+
const ref = useRef(null);
|
|
23
|
+
useEffect(()=>{
|
|
24
|
+
// The effect only runs once the input is mounted, so the ref is always
|
|
25
|
+
// filled here; the guard is what keeps a future refactor that renders the
|
|
26
|
+
// box conditionally from throwing rather than no-op'ing.
|
|
27
|
+
/* v8 ignore next */ if (ref.current) ref.current.indeterminate = indeterminate;
|
|
28
|
+
}, [
|
|
29
|
+
indeterminate
|
|
30
|
+
]);
|
|
31
|
+
const box = /*#__PURE__*/ _jsx("input", _extends({
|
|
32
|
+
ref: ref,
|
|
33
|
+
type: "checkbox",
|
|
34
|
+
className: cn('size-4 accent-primary', label ? undefined : className)
|
|
35
|
+
}, props));
|
|
36
|
+
if (label === undefined) return box;
|
|
37
|
+
return /*#__PURE__*/ _jsxs("label", {
|
|
38
|
+
className: cn('flex cursor-pointer items-center gap-2xs text-step-sm text-content', className),
|
|
39
|
+
children: [
|
|
40
|
+
box,
|
|
41
|
+
label
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/field/checkbox.tsx"],"sourcesContent":["'use client';\n\nimport { type ComponentPropsWithoutRef, useEffect, useRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\nexport interface CheckboxProps extends Omit<\n ComponentPropsWithoutRef<'input'>,\n 'type'\n> {\n /**\n * The visible caption. Omit it for a box whose meaning comes from where it\n * sits — a row's selection box, where the column header is the caption and\n * the row itself is the subject — and pass `aria-label` instead, so the\n * control still announces itself to a screen reader. A box with neither is\n * unlabelled.\n */\n label?: string;\n /**\n * The third state: some of the rows below are selected, but not all.\n *\n * It is a DOM **property**, not an attribute, so React cannot set it from\n * JSX — `<input indeterminate>` is silently dropped — and it has to be\n * written through a ref after render. That is the whole reason this component\n * is separate from its siblings in `field.tsx`, and the reason it carries\n * `'use client'`: those two are hook-free and stay server-renderable, because\n * the storefront's search page is a Server Component that imports `TextInput`\n * and must not pull a client boundary into a prerendered route.\n */\n indeterminate?: boolean;\n}\n\n/**\n * A checkbox, with its caption when it has one.\n *\n * Two shapes, and the difference is not cosmetic. With `label` it renders the\n * caption inside a `<label>` and the whole pair is the click target — the form\n * control every other field is. Without one it renders a bare box that takes\n * its meaning from its position, which is what a selection column needs: a\n * caption per row would repeat the column header on every line, and the row's\n * own cells are already the subject.\n */\nexport function Checkbox({\n label,\n className,\n indeterminate = false,\n ...props\n}: CheckboxProps) {\n const ref = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n // The effect only runs once the input is mounted, so the ref is always\n // filled here; the guard is what keeps a future refactor that renders the\n // box conditionally from throwing rather than no-op'ing.\n /* v8 ignore next */\n if (ref.current) ref.current.indeterminate = indeterminate;\n }, [indeterminate]);\n\n const box = (\n <input\n ref={ref}\n type=\"checkbox\"\n className={cn('size-4 accent-primary', label ? undefined : className)}\n {...props}\n />\n );\n\n if (label === undefined) return box;\n\n return (\n <label\n className={cn(\n 'flex cursor-pointer items-center gap-2xs text-step-sm text-content',\n className,\n )}\n >\n {box}\n {label}\n </label>\n );\n}\n"],"names":["useEffect","useRef","cn","Checkbox","label","className","indeterminate","props","ref","current","box","input","type","undefined"],"mappings":"AAAA;;;;AAEA,SAAwCA,SAAS,EAAEC,MAAM,QAAQ,QAAQ;AAEzE,SAASC,EAAE,QAAQ,oBAAoB;AA4BvC;;;;;;;;;CASC,GACD,OAAO,SAASC,SAAS,EAKT;QALS,EACvBC,KAAK,EACLC,SAAS,EACTC,gBAAgB,KAAK,EAEP,OADXC;;;;;IAEH,MAAMC,MAAMP,OAAyB;IAErCD,UAAU;QACR,uEAAuE;QACvE,0EAA0E;QAC1E,yDAAyD;QACzD,kBAAkB,GAClB,IAAIQ,IAAIC,OAAO,EAAED,IAAIC,OAAO,CAACH,aAAa,GAAGA;IAC/C,GAAG;QAACA;KAAc;IAElB,MAAMI,oBACJ,KAACC;QACCH,KAAKA;QACLI,MAAK;QACLP,WAAWH,GAAG,yBAAyBE,QAAQS,YAAYR;OACvDE;IAIR,IAAIH,UAAUS,WAAW,OAAOH;IAEhC,qBACE,MAACN;QACCC,WAAWH,GACT,sEACAG;;YAGDK;YACAN;;;AAGP"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export declare function TextInput({ className, ...props }: ComponentPropsWithoutRef<'input'>): import("react").JSX.Element;
|
|
3
|
+
export declare function Select({ className, ...props }: ComponentPropsWithoutRef<'select'>): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAatD,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,OAAO,CAAC,+BAEnC;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,QAAQ,CAAC,+BAEpC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
/** Shared shell for the interactive form controls below. */ const CONTROL_CLASS = [
|
|
6
|
+
'rounded-lg border border-border bg-surface-elevated px-2xs py-3xs',
|
|
7
|
+
'text-step-sm text-content',
|
|
8
|
+
'transition-colors duration-200 ease-smooth',
|
|
9
|
+
'focus-ring',
|
|
10
|
+
'disabled:cursor-not-allowed disabled:opacity-50'
|
|
11
|
+
].join(' ');
|
|
12
|
+
export function TextInput(_0) {
|
|
13
|
+
let { className } = _0, props = _object_without_properties_loose(_0, [
|
|
14
|
+
"className"
|
|
15
|
+
]);
|
|
16
|
+
return /*#__PURE__*/ _jsx("input", _extends({
|
|
17
|
+
className: cn(CONTROL_CLASS, className)
|
|
18
|
+
}, props));
|
|
19
|
+
}
|
|
20
|
+
export function Select(_0) {
|
|
21
|
+
let { className } = _0, props = _object_without_properties_loose(_0, [
|
|
22
|
+
"className"
|
|
23
|
+
]);
|
|
24
|
+
return /*#__PURE__*/ _jsx("select", _extends({
|
|
25
|
+
className: cn(CONTROL_CLASS, className)
|
|
26
|
+
}, props));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/field/field.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\n/** Shared shell for the interactive form controls below. */\nconst CONTROL_CLASS = [\n 'rounded-lg border border-border bg-surface-elevated px-2xs py-3xs',\n 'text-step-sm text-content',\n 'transition-colors duration-200 ease-smooth',\n 'focus-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n].join(' ');\n\nexport function TextInput({\n className,\n ...props\n}: ComponentPropsWithoutRef<'input'>) {\n return <input className={cn(CONTROL_CLASS, className)} {...props} />;\n}\n\nexport function Select({\n className,\n ...props\n}: ComponentPropsWithoutRef<'select'>) {\n return <select className={cn(CONTROL_CLASS, className)} {...props} />;\n}\n"],"names":["cn","CONTROL_CLASS","join","TextInput","className","props","input","Select","select"],"mappings":";;;AAEA,SAASA,EAAE,QAAQ,oBAAoB;AAEvC,0DAA0D,GAC1D,MAAMC,gBAAgB;IACpB;IACA;IACA;IACA;IACA;CACD,CAACC,IAAI,CAAC;AAEP,OAAO,SAASC,UAAU,EAGU;QAHV,EACxBC,SAAS,EAEyB,OAD/BC;;;IAEH,qBAAO,KAACC;QAAMF,WAAWJ,GAAGC,eAAeG;OAAgBC;AAC7D;AAEA,OAAO,SAASE,OAAO,EAGc;QAHd,EACrBH,SAAS,EAE0B,OADhCC;;;IAEH,qBAAO,KAACG;QAAOJ,WAAWJ,GAAGC,eAAeG;OAAgBC;AAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/atoms/field/index.ts"],"sourcesContent":["export * from './checkbox.js';\nexport * from './field.js';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,aAAa"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { EntityFieldDescriptor } from '@entifix/core';
|
|
2
|
+
export interface FieldControlProps {
|
|
3
|
+
descriptor: EntityFieldDescriptor;
|
|
4
|
+
/**
|
|
5
|
+
* ARIA wiring the caller owns, because only the caller knows the shape it is
|
|
6
|
+
* rendered into.
|
|
7
|
+
*
|
|
8
|
+
* A form labels its control with a `<label for>` and needs none of this; a
|
|
9
|
+
* detail grid's cell has no label of its own — the column header is the
|
|
10
|
+
* label, and the cell's message is the description — so it points at both by
|
|
11
|
+
* id. Passing them through here rather than duplicating the type→input map
|
|
12
|
+
* in the grid is what keeps one control deciding what a `date` member looks
|
|
13
|
+
* like.
|
|
14
|
+
*/
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
'aria-describedby'?: string;
|
|
17
|
+
'aria-invalid'?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The draft value as a string — the shape a native input round-trips. A form
|
|
20
|
+
* holds its whole draft as `Record<string, string>` and reconstructs typed
|
|
21
|
+
* values only at submit, so the control never sees a domain value.
|
|
22
|
+
*/
|
|
23
|
+
value: string;
|
|
24
|
+
onChange: (value: string) => void;
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The edit-mode inverse of {@link CellValue}: it turns one metadata descriptor
|
|
29
|
+
* into the input that edits it. Centralizing the type→control choice is what
|
|
30
|
+
* lets a form stay generic, the same way `CellValue` keeps a table generic.
|
|
31
|
+
*
|
|
32
|
+
* A relation (`link`/`linkCollection`) is rendered read-only here, deliberately:
|
|
33
|
+
* editing one needs a picker that can search and page the target, which is a
|
|
34
|
+
* different control with different dependencies. So this atom stays a pure
|
|
35
|
+
* type→input map and a relation never falls back to a broken text box.
|
|
36
|
+
*
|
|
37
|
+
* For a to-one `link` that is only half the story — `EntityForm` wires the
|
|
38
|
+
* picker in one level up from its `linkSources`, so the member does get an
|
|
39
|
+
* editor, just not from here. A `linkCollection` has no editor anywhere yet
|
|
40
|
+
* (#26), and read-only is all it gets. A `composition` is the same: its rows
|
|
41
|
+
* need a detail grid (#122), and a text box holding `[object Object]` would be
|
|
42
|
+
* strictly worse than an honest disabled field.
|
|
43
|
+
*
|
|
44
|
+
* A `scalarCollection` is the exception among the collections and falls through
|
|
45
|
+
* to the plain text input on purpose: a `string[]` has a lossless comma form,
|
|
46
|
+
* so the draft it round-trips through *is* editable text. Splitting on the
|
|
47
|
+
* comma is `reconstructEntity`'s half of that same contract.
|
|
48
|
+
*/
|
|
49
|
+
export declare function FieldControl({ descriptor, value, onChange, id, ...aria }: FieldControlProps): import("react").JSX.Element;
|
|
50
|
+
//# sourceMappingURL=field-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-control.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/field-control/field-control.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,eAAe,CAAC;AAK7E,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,qBAAqB,CAAC;IAClC;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAQD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,KAAK,EACL,QAAQ,EACR,EAAE,EACF,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAkDnB"}
|