@igne-agency/react-web-ui 0.0.0-stage → 0.3.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 +239 -2
- package/dist/assets/spinner.js +28 -0
- package/dist/base.css +171 -0
- package/dist/components/accordion/accordion.css +93 -0
- package/dist/components/accordion/accordion.d.ts +46 -0
- package/dist/components/accordion/accordion.js +184 -0
- package/dist/components/accordion/accordion.module.js +16 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/active-filters/active-filter-describers.d.ts +62 -0
- package/dist/components/active-filters/active-filter-describers.js +48 -0
- package/dist/components/active-filters/active-filters.d.ts +27 -0
- package/dist/components/active-filters/active-filters.js +96 -0
- package/dist/components/active-filters/index.d.ts +2 -0
- package/dist/components/active-filters/index.js +3 -0
- package/dist/components/attachment-tile/attachment-preview.d.ts +33 -0
- package/dist/components/attachment-tile/attachment-preview.js +181 -0
- package/dist/components/attachment-tile/attachment-tile.css +92 -0
- package/dist/components/attachment-tile/attachment-tile.d.ts +51 -0
- package/dist/components/attachment-tile/attachment-tile.js +126 -0
- package/dist/components/attachment-tile/attachment-tile.module.js +20 -0
- package/dist/components/attachment-tile/index.d.ts +2 -0
- package/dist/components/attachment-tile/index.js +3 -0
- package/dist/components/avatar/avatar.css +48 -0
- package/dist/components/avatar/avatar.d.ts +19 -0
- package/dist/components/avatar/avatar.js +98 -0
- package/dist/components/avatar/avatar.module.js +10 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/avatar-group/avatar-group-context.d.ts +15 -0
- package/dist/components/avatar-group/avatar-group-context.js +14 -0
- package/dist/components/avatar-group/avatar-group.css +62 -0
- package/dist/components/avatar-group/avatar-group.d.ts +96 -0
- package/dist/components/avatar-group/avatar-group.js +519 -0
- package/dist/components/avatar-group/avatar-group.module.js +20 -0
- package/dist/components/avatar-group/index.d.ts +1 -0
- package/dist/components/avatar-group/index.js +1 -0
- package/dist/components/badge/badge.css +101 -0
- package/dist/components/badge/badge.d.ts +17 -0
- package/dist/components/badge/badge.js +61 -0
- package/dist/components/badge/badge.module.js +4 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.css +57 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +105 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +710 -0
- package/dist/components/breadcrumbs/breadcrumbs.module.js +20 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.js +3 -0
- package/dist/components/breadcrumbs/use-fold.d.ts +34 -0
- package/dist/components/breadcrumbs/use-fold.js +73 -0
- package/dist/components/button/button-attributes.d.ts +23 -0
- package/dist/components/button/button-attributes.js +17 -0
- package/dist/components/button/button.css +111 -0
- package/dist/components/button/button.d.ts +47 -0
- package/dist/components/button/button.js +210 -0
- package/dist/components/button/button.module.js +4 -0
- package/dist/components/button/close-button.d.ts +14 -0
- package/dist/components/button/close-button.js +30 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +1 -0
- package/dist/components/checkbox-field/checkbox-field.d.ts +21 -0
- package/dist/components/checkbox-field/checkbox-field.js +181 -0
- package/dist/components/checkbox-field/checkbox-glyph.d.ts +12 -0
- package/dist/components/checkbox-field/checkbox-glyph.js +38 -0
- package/dist/components/checkbox-field/checkbox.css +128 -0
- package/dist/components/checkbox-field/checkbox.d.ts +14 -0
- package/dist/components/checkbox-field/checkbox.js +91 -0
- package/dist/components/checkbox-field/checkbox.module.js +14 -0
- package/dist/components/checkbox-field/index.d.ts +4 -0
- package/dist/components/checkbox-field/index.js +5 -0
- package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +14 -0
- package/dist/components/checkbox-field/tsf-checkbox-field.js +40 -0
- package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +33 -0
- package/dist/components/checkbox-group-field/checkbox-group-field.js +128 -0
- package/dist/components/checkbox-group-field/checkbox-group.css +31 -0
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +38 -0
- package/dist/components/checkbox-group-field/checkbox-group.js +102 -0
- package/dist/components/checkbox-group-field/checkbox-group.module.js +8 -0
- package/dist/components/checkbox-group-field/index.d.ts +3 -0
- package/dist/components/checkbox-group-field/index.js +4 -0
- package/dist/components/checkbox-group-field/tsf-checkbox-group-field.d.ts +15 -0
- package/dist/components/checkbox-group-field/tsf-checkbox-group-field.js +41 -0
- package/dist/components/collapsible/collapsible.css +88 -0
- package/dist/components/collapsible/collapsible.d.ts +33 -0
- package/dist/components/collapsible/collapsible.js +146 -0
- package/dist/components/collapsible/collapsible.module.js +14 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/combobox-field/combobox-field.d.ts +66 -0
- package/dist/components/combobox-field/combobox-field.js +527 -0
- package/dist/components/combobox-field/combobox-items.d.ts +80 -0
- package/dist/components/combobox-field/combobox-items.js +27 -0
- package/dist/components/combobox-field/combobox-popup-body.d.ts +34 -0
- package/dist/components/combobox-field/combobox-popup-body.js +142 -0
- package/dist/components/combobox-field/combobox.css +535 -0
- package/dist/components/combobox-field/combobox.d.ts +105 -0
- package/dist/components/combobox-field/combobox.js +642 -0
- package/dist/components/combobox-field/combobox.module.js +46 -0
- package/dist/components/combobox-field/index.d.ts +7 -0
- package/dist/components/combobox-field/index.js +4 -0
- package/dist/components/combobox-field/item-lookups.d.ts +18 -0
- package/dist/components/combobox-field/item-lookups.js +8 -0
- package/dist/components/combobox-field/react-query.d.ts +15 -0
- package/dist/components/combobox-field/react-query.js +78 -0
- package/dist/components/combobox-field/selection.d.ts +50 -0
- package/dist/components/combobox-field/selection.js +38 -0
- package/dist/components/combobox-field/tsf-combobox-field.d.ts +33 -0
- package/dist/components/combobox-field/tsf-combobox-field.js +88 -0
- package/dist/components/combobox-field/value-state-view.css +21 -0
- package/dist/components/combobox-field/value-state-view.d.ts +35 -0
- package/dist/components/combobox-field/value-state-view.js +107 -0
- package/dist/components/combobox-field/value-state-view.module.js +10 -0
- package/dist/components/combobox-field/value-state.d.ts +49 -0
- package/dist/components/combobox-field/value-state.js +38 -0
- package/dist/components/composer/composer-attachments.d.ts +31 -0
- package/dist/components/composer/composer-attachments.js +158 -0
- package/dist/components/composer/composer-editor.css +104 -0
- package/dist/components/composer/composer-editor.d.ts +15 -0
- package/dist/components/composer/composer-editor.js +165 -0
- package/dist/components/composer/composer-editor.module.js +14 -0
- package/dist/components/composer/composer-mentions.d.ts +10 -0
- package/dist/components/composer/composer-mentions.js +294 -0
- package/dist/components/composer/composer.context.d.ts +56 -0
- package/dist/components/composer/composer.context.js +14 -0
- package/dist/components/composer/composer.css +81 -0
- package/dist/components/composer/composer.d.ts +77 -0
- package/dist/components/composer/composer.handle.d.ts +31 -0
- package/dist/components/composer/composer.handle.js +41 -0
- package/dist/components/composer/composer.js +428 -0
- package/dist/components/composer/composer.module.js +14 -0
- package/dist/components/composer/editor-behavior.d.ts +2 -0
- package/dist/components/composer/editor-behavior.js +99 -0
- package/dist/components/composer/index.d.ts +8 -0
- package/dist/components/composer/index.js +3 -0
- package/dist/components/composer/mention-node.d.ts +44 -0
- package/dist/components/composer/mention-node.js +71 -0
- package/dist/components/composer/mention-sources.d.ts +14 -0
- package/dist/components/composer/mention-text.css +14 -0
- package/dist/components/composer/mention-text.d.ts +66 -0
- package/dist/components/composer/mention-text.js +95 -0
- package/dist/components/composer/mention-text.module.js +4 -0
- package/dist/components/confirm-dialog/confirm-dialog.css +68 -0
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +75 -0
- package/dist/components/confirm-dialog/confirm-dialog.js +399 -0
- package/dist/components/confirm-dialog/confirm-dialog.module.js +14 -0
- package/dist/components/confirm-dialog/index.d.ts +1 -0
- package/dist/components/confirm-dialog/index.js +1 -0
- package/dist/components/conversation/conversation.context.d.ts +9 -0
- package/dist/components/conversation/conversation.context.js +4 -0
- package/dist/components/conversation/conversation.css +143 -0
- package/dist/components/conversation/conversation.d.ts +126 -0
- package/dist/components/conversation/conversation.js +761 -0
- package/dist/components/conversation/conversation.module.js +34 -0
- package/dist/components/conversation/group-messages.d.ts +34 -0
- package/dist/components/conversation/group-messages.js +64 -0
- package/dist/components/conversation/index.d.ts +4 -0
- package/dist/components/conversation/index.js +3 -0
- package/dist/components/conversation/moment.d.ts +11 -0
- package/dist/components/conversation/moment.js +15 -0
- package/dist/components/date-field/date-field.d.ts +45 -0
- package/dist/components/date-field/date-field.js +162 -0
- package/dist/components/date-field/date-input.d.ts +46 -0
- package/dist/components/date-field/date-input.js +109 -0
- package/dist/components/date-field/index.d.ts +4 -0
- package/dist/components/date-field/index.js +4 -0
- package/dist/components/date-field/tsf-date-field.d.ts +14 -0
- package/dist/components/date-field/tsf-date-field.js +40 -0
- package/dist/components/date-range-field/date-range-field.d.ts +53 -0
- package/dist/components/date-range-field/date-range-field.js +167 -0
- package/dist/components/date-range-field/date-range-input.d.ts +51 -0
- package/dist/components/date-range-field/date-range-input.js +109 -0
- package/dist/components/date-range-field/index.d.ts +4 -0
- package/dist/components/date-range-field/index.js +5 -0
- package/dist/components/date-range-field/tsf-date-range-field.d.ts +15 -0
- package/dist/components/date-range-field/tsf-date-range-field.js +58 -0
- package/dist/components/detail-list/detail-list.css +32 -0
- package/dist/components/detail-list/detail-list.d.ts +41 -0
- package/dist/components/detail-list/detail-list.js +163 -0
- package/dist/components/detail-list/detail-list.module.js +14 -0
- package/dist/components/detail-list/index.d.ts +1 -0
- package/dist/components/detail-list/index.js +1 -0
- package/dist/components/dialog/dialog.css +78 -0
- package/dist/components/dialog/dialog.d.ts +59 -0
- package/dist/components/dialog/dialog.js +245 -0
- package/dist/components/dialog/dialog.module.js +16 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/divider/divider.css +16 -0
- package/dist/components/divider/divider.d.ts +13 -0
- package/dist/components/divider/divider.js +47 -0
- package/dist/components/divider/divider.module.js +10 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider/index.js +1 -0
- package/dist/components/drawer/drawer.css +168 -0
- package/dist/components/drawer/drawer.d.ts +65 -0
- package/dist/components/drawer/drawer.js +219 -0
- package/dist/components/drawer/drawer.module.js +16 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/email-field/email-field.d.ts +11 -0
- package/dist/components/email-field/email-field.js +45 -0
- package/dist/components/email-field/index.d.ts +2 -0
- package/dist/components/email-field/index.js +3 -0
- package/dist/components/email-field/tsf-email-field.d.ts +13 -0
- package/dist/components/email-field/tsf-email-field.js +14 -0
- package/dist/components/empty-message/empty-message.d.ts +16 -0
- package/dist/components/empty-message/empty-message.js +31 -0
- package/dist/components/empty-message/index.d.ts +1 -0
- package/dist/components/empty-message/index.js +1 -0
- package/dist/components/error-boundary/error-boundary.d.ts +43 -0
- package/dist/components/error-boundary/error-boundary.js +60 -0
- package/dist/components/error-boundary/index.d.ts +1 -0
- package/dist/components/error-boundary/index.js +1 -0
- package/dist/components/error-message/error-message.d.ts +15 -0
- package/dist/components/error-message/error-message.js +30 -0
- package/dist/components/error-message/index.d.ts +1 -0
- package/dist/components/error-message/index.js +1 -0
- package/dist/components/error-text/error-cascade.d.ts +32 -0
- package/dist/components/error-text/error-cascade.js +49 -0
- package/dist/components/error-text/error-text.css +27 -0
- package/dist/components/error-text/error-text.d.ts +22 -0
- package/dist/components/error-text/error-text.js +139 -0
- package/dist/components/error-text/error-text.module.js +11 -0
- package/dist/components/error-text/index.d.ts +1 -0
- package/dist/components/error-text/index.js +1 -0
- package/dist/components/field/choice-option.d.ts +11 -0
- package/dist/components/field/field-group-context.d.ts +21 -0
- package/dist/components/field/field-group-context.js +38 -0
- package/dist/components/field/field-state.d.ts +51 -0
- package/dist/components/field/field-state.js +28 -0
- package/dist/components/field/field.css +69 -0
- package/dist/components/field/field.d.ts +186 -0
- package/dist/components/field/field.js +477 -0
- package/dist/components/field/field.module.js +22 -0
- package/dist/components/field/hidden-input.d.ts +8 -0
- package/dist/components/field/hidden-input.js +12 -0
- package/dist/components/field/index.d.ts +6 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/input-parts.d.ts +49 -0
- package/dist/components/field/input-parts.js +94 -0
- package/dist/components/field/options-load.d.ts +54 -0
- package/dist/components/field/options-load.js +38 -0
- package/dist/components/field/rim-focus.d.ts +10 -0
- package/dist/components/field/rim-focus.js +23 -0
- package/dist/components/field/use-field-focus.d.ts +37 -0
- package/dist/components/field/use-field-focus.js +71 -0
- package/dist/components/field/use-field-state.d.ts +32 -0
- package/dist/components/field/use-field-state.js +77 -0
- package/dist/components/field-placeholder/field-placeholder.css +22 -0
- package/dist/components/field-placeholder/field-placeholder.d.ts +10 -0
- package/dist/components/field-placeholder/field-placeholder.js +54 -0
- package/dist/components/field-placeholder/field-placeholder.module.js +12 -0
- package/dist/components/field-placeholder/index.d.ts +1 -0
- package/dist/components/field-placeholder/index.js +1 -0
- package/dist/components/fieldset/field-group.d.ts +31 -0
- package/dist/components/fieldset/field-group.js +102 -0
- package/dist/components/fieldset/fieldset-root.d.ts +60 -0
- package/dist/components/fieldset/fieldset-root.js +285 -0
- package/dist/components/fieldset/fieldset.css +21 -0
- package/dist/components/fieldset/fieldset.d.ts +37 -0
- package/dist/components/fieldset/fieldset.js +127 -0
- package/dist/components/fieldset/fieldset.module.js +8 -0
- package/dist/components/fieldset/index.d.ts +4 -0
- package/dist/components/fieldset/index.js +4 -0
- package/dist/components/fieldset/tsf-field-group.d.ts +21 -0
- package/dist/components/fieldset/tsf-field-group.js +58 -0
- package/dist/components/file-field/file-field.css +101 -0
- package/dist/components/file-field/file-field.d.ts +59 -0
- package/dist/components/file-field/file-field.js +296 -0
- package/dist/components/file-field/file-field.module.js +10 -0
- package/dist/components/file-field/file-input.d.ts +85 -0
- package/dist/components/file-field/file-input.js +334 -0
- package/dist/components/file-field/file-size.d.ts +21 -0
- package/dist/components/file-field/file-size.js +18 -0
- package/dist/components/file-field/file-type.d.ts +21 -0
- package/dist/components/file-field/file-type.js +28 -0
- package/dist/components/file-field/index.d.ts +3 -0
- package/dist/components/file-field/index.js +4 -0
- package/dist/components/file-field/tsf-file-field.d.ts +14 -0
- package/dist/components/file-field/tsf-file-field.js +48 -0
- package/dist/components/filter-bar/filter-bar.css +34 -0
- package/dist/components/filter-bar/filter-bar.d.ts +87 -0
- package/dist/components/filter-bar/filter-bar.js +311 -0
- package/dist/components/filter-bar/filter-bar.module.js +14 -0
- package/dist/components/filter-bar/index.d.ts +2 -0
- package/dist/components/filter-bar/index.js +3 -0
- package/dist/components/filter-bar/use-filter-view.d.ts +86 -0
- package/dist/components/filter-bar/use-filter-view.js +219 -0
- package/dist/components/form/first-invalid.d.ts +10 -0
- package/dist/components/form/first-invalid.js +31 -0
- package/dist/components/form/form-context.d.ts +23 -0
- package/dist/components/form/form-context.js +28 -0
- package/dist/components/form/form.css +14 -0
- package/dist/components/form/form.d.ts +68 -0
- package/dist/components/form/form.js +317 -0
- package/dist/components/form/form.module.js +8 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/icon/icon.css +9 -0
- package/dist/components/icon/icon.d.ts +31 -0
- package/dist/components/icon/icon.js +61 -0
- package/dist/components/icon/icon.module.js +4 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/link.css +18 -0
- package/dist/components/link/link.d.ts +11 -0
- package/dist/components/link/link.js +45 -0
- package/dist/components/link/link.module.js +4 -0
- package/dist/components/link-button/index.d.ts +1 -0
- package/dist/components/link-button/index.js +1 -0
- package/dist/components/link-button/link-button.d.ts +23 -0
- package/dist/components/link-button/link-button.js +80 -0
- package/dist/components/loading-message/index.d.ts +1 -0
- package/dist/components/loading-message/index.js +1 -0
- package/dist/components/loading-message/loading-message.d.ts +22 -0
- package/dist/components/loading-message/loading-message.js +55 -0
- package/dist/components/locale-provider/index.d.ts +1 -0
- package/dist/components/locale-provider/index.js +1 -0
- package/dist/components/locale-provider/locale-provider.d.ts +22 -0
- package/dist/components/locale-provider/locale-provider.js +50 -0
- package/dist/components/menu/index.d.ts +1 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/menu/menu.css +122 -0
- package/dist/components/menu/menu.d.ts +78 -0
- package/dist/components/menu/menu.js +382 -0
- package/dist/components/menu/menu.module.js +20 -0
- package/dist/components/nav/index.d.ts +3 -0
- package/dist/components/nav/index.js +3 -0
- package/dist/components/nav/nav-context.d.ts +17 -0
- package/dist/components/nav/nav-context.js +5 -0
- package/dist/components/nav/nav-item-view.d.ts +63 -0
- package/dist/components/nav/nav-item-view.js +243 -0
- package/dist/components/nav/nav.css +310 -0
- package/dist/components/nav/nav.d.ts +87 -0
- package/dist/components/nav/nav.js +481 -0
- package/dist/components/nav/nav.module.js +32 -0
- package/dist/components/number-field/index.d.ts +4 -0
- package/dist/components/number-field/index.js +5 -0
- package/dist/components/number-field/number-field-formats.d.ts +24 -0
- package/dist/components/number-field/number-field-formats.js +43 -0
- package/dist/components/number-field/number-field.css +116 -0
- package/dist/components/number-field/number-field.d.ts +34 -0
- package/dist/components/number-field/number-field.js +168 -0
- package/dist/components/number-field/number-field.module.js +16 -0
- package/dist/components/number-field/number-input.d.ts +76 -0
- package/dist/components/number-field/number-input.js +383 -0
- package/dist/components/number-field/tsf-number-field.d.ts +14 -0
- package/dist/components/number-field/tsf-number-field.js +34 -0
- package/dist/components/otp-field/index.d.ts +3 -0
- package/dist/components/otp-field/index.js +4 -0
- package/dist/components/otp-field/otp-field.css +97 -0
- package/dist/components/otp-field/otp-field.d.ts +22 -0
- package/dist/components/otp-field/otp-field.js +91 -0
- package/dist/components/otp-field/otp-field.module.js +12 -0
- package/dist/components/otp-field/otp-input-context.d.ts +27 -0
- package/dist/components/otp-field/otp-input-context.js +15 -0
- package/dist/components/otp-field/otp-input.d.ts +76 -0
- package/dist/components/otp-field/otp-input.js +341 -0
- package/dist/components/otp-field/tsf-otp-field.d.ts +14 -0
- package/dist/components/otp-field/tsf-otp-field.js +34 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination-context.d.ts +23 -0
- package/dist/components/pagination/pagination-context.js +14 -0
- package/dist/components/pagination/pagination.css +24 -0
- package/dist/components/pagination/pagination.d.ts +60 -0
- package/dist/components/pagination/pagination.js +341 -0
- package/dist/components/pagination/pagination.module.js +12 -0
- package/dist/components/password-field/index.d.ts +4 -0
- package/dist/components/password-field/index.js +4 -0
- package/dist/components/password-field/password-field.css +66 -0
- package/dist/components/password-field/password-field.d.ts +44 -0
- package/dist/components/password-field/password-field.js +227 -0
- package/dist/components/password-field/password-field.module.js +20 -0
- package/dist/components/password-field/password-strength.d.ts +27 -0
- package/dist/components/password-field/password-strength.js +124 -0
- package/dist/components/password-field/tsf-password-field.d.ts +14 -0
- package/dist/components/password-field/tsf-password-field.js +34 -0
- package/dist/components/phone-field/index.d.ts +2 -0
- package/dist/components/phone-field/index.js +3 -0
- package/dist/components/phone-field/phone-field.d.ts +14 -0
- package/dist/components/phone-field/phone-field.js +29 -0
- package/dist/components/phone-field/tsf-phone-field.d.ts +14 -0
- package/dist/components/phone-field/tsf-phone-field.js +14 -0
- package/dist/components/photo-field/index.d.ts +3 -0
- package/dist/components/photo-field/index.js +4 -0
- package/dist/components/photo-field/photo-field.d.ts +29 -0
- package/dist/components/photo-field/photo-field.js +183 -0
- package/dist/components/photo-field/photo-input.css +113 -0
- package/dist/components/photo-field/photo-input.d.ts +63 -0
- package/dist/components/photo-field/photo-input.js +327 -0
- package/dist/components/photo-field/photo-input.module.js +18 -0
- package/dist/components/photo-field/tsf-photo-field.d.ts +19 -0
- package/dist/components/photo-field/tsf-photo-field.js +56 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.css +120 -0
- package/dist/components/popover/popover.d.ts +72 -0
- package/dist/components/popover/popover.js +434 -0
- package/dist/components/popover/popover.module.js +34 -0
- package/dist/components/radio-group-field/index.d.ts +3 -0
- package/dist/components/radio-group-field/index.js +4 -0
- package/dist/components/radio-group-field/radio-group-field.d.ts +26 -0
- package/dist/components/radio-group-field/radio-group-field.js +128 -0
- package/dist/components/radio-group-field/radio-group.css +116 -0
- package/dist/components/radio-group-field/radio-group.d.ts +38 -0
- package/dist/components/radio-group-field/radio-group.js +158 -0
- package/dist/components/radio-group-field/radio-group.module.js +12 -0
- package/dist/components/radio-group-field/tsf-radio-group-field.d.ts +15 -0
- package/dist/components/radio-group-field/tsf-radio-group-field.js +41 -0
- package/dist/components/search-field/index.d.ts +2 -0
- package/dist/components/search-field/index.js +3 -0
- package/dist/components/search-field/search-field.d.ts +17 -0
- package/dist/components/search-field/search-field.js +45 -0
- package/dist/components/search-field/tsf-search-field.d.ts +14 -0
- package/dist/components/search-field/tsf-search-field.js +14 -0
- package/dist/components/segmented-control-field/index.d.ts +3 -0
- package/dist/components/segmented-control-field/index.js +4 -0
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +32 -0
- package/dist/components/segmented-control-field/segmented-control-field.js +166 -0
- package/dist/components/segmented-control-field/segmented-control.css +203 -0
- package/dist/components/segmented-control-field/segmented-control.d.ts +58 -0
- package/dist/components/segmented-control-field/segmented-control.js +209 -0
- package/dist/components/segmented-control-field/segmented-control.module.js +12 -0
- package/dist/components/segmented-control-field/tsf-segmented-control-field.d.ts +15 -0
- package/dist/components/segmented-control-field/tsf-segmented-control-field.js +41 -0
- package/dist/components/select-field/index.d.ts +3 -0
- package/dist/components/select-field/index.js +4 -0
- package/dist/components/select-field/select-context.d.ts +20 -0
- package/dist/components/select-field/select-context.js +15 -0
- package/dist/components/select-field/select-field.d.ts +32 -0
- package/dist/components/select-field/select-field.js +312 -0
- package/dist/components/select-field/select.css +233 -0
- package/dist/components/select-field/select.d.ts +78 -0
- package/dist/components/select-field/select.js +529 -0
- package/dist/components/select-field/select.module.js +30 -0
- package/dist/components/select-field/tsf-select-field.d.ts +15 -0
- package/dist/components/select-field/tsf-select-field.js +41 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.css +16 -0
- package/dist/components/skeleton/skeleton.d.ts +13 -0
- package/dist/components/skeleton/skeleton.js +34 -0
- package/dist/components/skeleton/skeleton.module.js +9 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.css +7 -0
- package/dist/components/spinner/spinner.d.ts +15 -0
- package/dist/components/spinner/spinner.js +50 -0
- package/dist/components/spinner/spinner.module.js +4 -0
- package/dist/components/stale/index.d.ts +1 -0
- package/dist/components/stale/index.js +1 -0
- package/dist/components/stale/stale.css +60 -0
- package/dist/components/stale/stale.d.ts +68 -0
- package/dist/components/stale/stale.js +231 -0
- package/dist/components/stale/stale.module.js +16 -0
- package/dist/components/status-message/index.d.ts +1 -0
- package/dist/components/status-message/index.js +1 -0
- package/dist/components/status-message/status-message.css +122 -0
- package/dist/components/status-message/status-message.d.ts +72 -0
- package/dist/components/status-message/status-message.js +182 -0
- package/dist/components/status-message/status-message.module.js +16 -0
- package/dist/components/status-message/status-preset.d.ts +26 -0
- package/dist/components/status-message/status-preset.js +64 -0
- package/dist/components/switch-field/index.d.ts +3 -0
- package/dist/components/switch-field/index.js +4 -0
- package/dist/components/switch-field/switch-field.d.ts +23 -0
- package/dist/components/switch-field/switch-field.js +142 -0
- package/dist/components/switch-field/switch.css +145 -0
- package/dist/components/switch-field/switch.d.ts +35 -0
- package/dist/components/switch-field/switch.js +207 -0
- package/dist/components/switch-field/switch.module.js +12 -0
- package/dist/components/switch-field/tsf-switch-field.d.ts +14 -0
- package/dist/components/switch-field/tsf-switch-field.js +40 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/tabs.css +122 -0
- package/dist/components/tabs/tabs.d.ts +57 -0
- package/dist/components/tabs/tabs.js +194 -0
- package/dist/components/tabs/tabs.module.js +18 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +1 -0
- package/dist/components/tag/tag.css +120 -0
- package/dist/components/tag/tag.d.ts +36 -0
- package/dist/components/tag/tag.js +124 -0
- package/dist/components/tag/tag.module.js +10 -0
- package/dist/components/tag-group/index.d.ts +1 -0
- package/dist/components/tag-group/index.js +1 -0
- package/dist/components/tag-group/tag-group.css +155 -0
- package/dist/components/tag-group/tag-group.d.ts +53 -0
- package/dist/components/tag-group/tag-group.js +182 -0
- package/dist/components/tag-group/tag-group.module.js +12 -0
- package/dist/components/text-field/connect-text-preset.d.ts +13 -0
- package/dist/components/text-field/connect-text-preset.js +34 -0
- package/dist/components/text-field/index.d.ts +5 -0
- package/dist/components/text-field/index.js +5 -0
- package/dist/components/text-field/text-field.css +171 -0
- package/dist/components/text-field/text-field.d.ts +57 -0
- package/dist/components/text-field/text-field.js +247 -0
- package/dist/components/text-field/text-field.module.js +22 -0
- package/dist/components/text-field/text-input-context.d.ts +28 -0
- package/dist/components/text-field/text-input-context.js +16 -0
- package/dist/components/text-field/text-input.d.ts +79 -0
- package/dist/components/text-field/text-input.js +588 -0
- package/dist/components/text-field/text-preset.d.ts +7 -0
- package/dist/components/text-field/tsf-text-field.d.ts +14 -0
- package/dist/components/text-field/tsf-text-field.js +34 -0
- package/dist/components/textarea-field/index.d.ts +3 -0
- package/dist/components/textarea-field/index.js +4 -0
- package/dist/components/textarea-field/textarea-field.css +12 -0
- package/dist/components/textarea-field/textarea-field.d.ts +19 -0
- package/dist/components/textarea-field/textarea-field.js +168 -0
- package/dist/components/textarea-field/textarea-field.module.js +8 -0
- package/dist/components/textarea-field/textarea.d.ts +19 -0
- package/dist/components/textarea-field/textarea.js +108 -0
- package/dist/components/textarea-field/tsf-textarea-field.d.ts +14 -0
- package/dist/components/textarea-field/tsf-textarea-field.js +34 -0
- package/dist/components/textarea-field/use-autosize.d.ts +11 -0
- package/dist/components/textarea-field/use-autosize.js +65 -0
- package/dist/components/time-field/index.d.ts +3 -0
- package/dist/components/time-field/index.js +4 -0
- package/dist/components/time-field/time-field.d.ts +25 -0
- package/dist/components/time-field/time-field.js +115 -0
- package/dist/components/time-field/time-input.d.ts +30 -0
- package/dist/components/time-field/time-input.js +66 -0
- package/dist/components/time-field/tsf-time-field.d.ts +14 -0
- package/dist/components/time-field/tsf-time-field.js +40 -0
- package/dist/components/time-zone-provider/index.d.ts +1 -0
- package/dist/components/time-zone-provider/index.js +1 -0
- package/dist/components/time-zone-provider/time-zone-provider.d.ts +22 -0
- package/dist/components/time-zone-provider/time-zone-provider.js +39 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/index.js +3 -0
- package/dist/components/toast/toast-provider.css +99 -0
- package/dist/components/toast/toast-provider.d.ts +18 -0
- package/dist/components/toast/toast-provider.js +203 -0
- package/dist/components/toast/toast-provider.module.js +24 -0
- package/dist/components/toast/toast.d.ts +79 -0
- package/dist/components/toast/toast.js +68 -0
- package/dist/components/toggle-group-field/index.d.ts +3 -0
- package/dist/components/toggle-group-field/index.js +4 -0
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +32 -0
- package/dist/components/toggle-group-field/toggle-group-field.js +158 -0
- package/dist/components/toggle-group-field/toggle-group.css +148 -0
- package/dist/components/toggle-group-field/toggle-group.d.ts +44 -0
- package/dist/components/toggle-group-field/toggle-group.js +156 -0
- package/dist/components/toggle-group-field/toggle-group.module.js +8 -0
- package/dist/components/toggle-group-field/tsf-toggle-group-field.d.ts +15 -0
- package/dist/components/toggle-group-field/tsf-toggle-group-field.js +41 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.css +22 -0
- package/dist/components/tooltip/tooltip.d.ts +46 -0
- package/dist/components/tooltip/tooltip.js +175 -0
- package/dist/components/tooltip/tooltip.module.js +4 -0
- package/dist/data-table/data-table-content.d.ts +27 -0
- package/dist/data-table/data-table-content.js +311 -0
- package/dist/data-table/data-table-context.d.ts +33 -0
- package/dist/data-table/data-table-context.js +31 -0
- package/dist/data-table/data-table-selection.d.ts +42 -0
- package/dist/data-table/data-table-selection.js +299 -0
- package/dist/data-table/data-table.css +515 -0
- package/dist/data-table/data-table.d.ts +93 -0
- package/dist/data-table/data-table.js +215 -0
- package/dist/data-table/data-table.module.js +68 -0
- package/dist/data-table/index.d.ts +6 -0
- package/dist/data-table/index.js +5 -0
- package/dist/data-table/resolve-view.d.ts +31 -0
- package/dist/data-table/resolve-view.js +37 -0
- package/dist/data-table/table-features.d.ts +69 -0
- package/dist/data-table/table-features.js +41 -0
- package/dist/data-table/use-sticky-offsets.d.ts +21 -0
- package/dist/data-table/use-sticky-offsets.js +86 -0
- package/dist/data-view/index.d.ts +1 -0
- package/dist/data-view/index.js +1 -0
- package/dist/data-view/use-data-view.d.ts +83 -0
- package/dist/data-view/use-data-view.js +135 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +136 -0
- package/dist/lib/calendar/calendar-navigation.d.ts +19 -0
- package/dist/lib/calendar/calendar-navigation.js +216 -0
- package/dist/lib/calendar/calendar-state.d.ts +19 -0
- package/dist/lib/calendar/calendar-state.js +33 -0
- package/dist/lib/calendar/calendar-year.d.ts +20 -0
- package/dist/lib/calendar/calendar-year.js +342 -0
- package/dist/lib/calendar/temporal-value.d.ts +84 -0
- package/dist/lib/calendar/temporal-value.js +105 -0
- package/dist/lib/calendar/temporal.css +596 -0
- package/dist/lib/calendar/temporal.d.ts +134 -0
- package/dist/lib/calendar/temporal.js +783 -0
- package/dist/lib/calendar/temporal.module.js +80 -0
- package/dist/lib/format-bytes.d.ts +10 -0
- package/dist/lib/format-bytes.js +22 -0
- package/dist/lib/forms/context.d.ts +32 -0
- package/dist/lib/forms/context.js +33 -0
- package/dist/lib/forms/create-app-form.d.ts +33 -0
- package/dist/lib/forms/create-app-form.js +45 -0
- package/dist/lib/forms/errors.d.ts +23 -0
- package/dist/lib/forms/errors.js +25 -0
- package/dist/lib/forms/failed-submit.d.ts +16 -0
- package/dist/lib/forms/failed-submit.js +44 -0
- package/dist/lib/forms/index.d.ts +4 -0
- package/dist/lib/forms/index.js +5 -0
- package/dist/lib/forms/use-connected-field.d.ts +30 -0
- package/dist/lib/forms/use-connected-field.js +74 -0
- package/dist/lib/hooks/index.d.ts +5 -0
- package/dist/lib/hooks/index.js +6 -0
- package/dist/lib/hooks/use-busy-phase.d.ts +31 -0
- package/dist/lib/hooks/use-busy-phase.js +75 -0
- package/dist/lib/hooks/use-media-query.d.ts +8 -0
- package/dist/lib/hooks/use-media-query.js +34 -0
- package/dist/lib/hooks/use-presence.d.ts +25 -0
- package/dist/lib/hooks/use-presence.js +155 -0
- package/dist/lib/hooks/use-row-selection.d.ts +65 -0
- package/dist/lib/hooks/use-row-selection.js +136 -0
- package/dist/lib/hooks/use-theme.d.ts +28 -0
- package/dist/lib/hooks/use-theme.js +88 -0
- package/dist/lib/iso-zoned.d.ts +9 -0
- package/dist/lib/iso-zoned.js +19 -0
- package/dist/lib/password-strength/password-strength.d.ts +38 -0
- package/dist/lib/password-strength/password-strength.js +72 -0
- package/dist/lib/popup-edge-padding.d.ts +20 -0
- package/dist/lib/popup-edge-padding.js +41 -0
- package/dist/lib/sliding-indicator/index.d.ts +1 -0
- package/dist/lib/sliding-indicator/use-sliding-indicator.d.ts +27 -0
- package/dist/lib/sliding-indicator/use-sliding-indicator.js +84 -0
- package/dist/lib/storage.d.ts +21 -0
- package/dist/lib/storage.js +0 -0
- package/dist/lib/table-storage.d.ts +43 -0
- package/dist/lib/table-storage.js +62 -0
- package/dist/lib/text-length.d.ts +10 -0
- package/dist/lib/text-length.js +15 -0
- package/dist/lib/tone.d.ts +14 -0
- package/dist/lib/tone.js +0 -0
- package/dist/lib/unsaved-changes/before-unload.d.ts +8 -0
- package/dist/lib/unsaved-changes/before-unload.js +37 -0
- package/dist/lib/unsaved-changes/index.d.ts +4 -0
- package/dist/lib/unsaved-changes/index.js +5 -0
- package/dist/lib/unsaved-changes/leave-guard.d.ts +80 -0
- package/dist/lib/unsaved-changes/leave-guard.js +170 -0
- package/dist/lib/unsaved-changes/policy.d.ts +24 -0
- package/dist/lib/unsaved-changes/policy.js +17 -0
- package/dist/lib/unsaved-changes/registry.d.ts +36 -0
- package/dist/lib/unsaved-changes/registry.js +78 -0
- package/dist/lib/unsaved-changes/tanstack-router.d.ts +12 -0
- package/dist/lib/unsaved-changes/tanstack-router.js +50 -0
- package/dist/lib/use-infinite-scroll.d.ts +31 -0
- package/dist/lib/use-infinite-scroll.js +78 -0
- package/dist/lib/use-intent.d.ts +17 -0
- package/dist/lib/use-intent.js +77 -0
- package/dist/lib/use-required-context.d.ts +9 -0
- package/dist/lib/use-required-context.js +15 -0
- package/dist/terrazzo/index.d.ts +39 -0
- package/dist/terrazzo/index.js +93 -0
- package/dist/tokens.css +1102 -0
- package/dist/vendor/@material-design-icons/svg/outlined/add.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/block.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/check.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/close.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/description.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/download.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/error.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/info.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/mail.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/remove.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/restore.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/search.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +12 -0
- package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +12 -0
- package/package.json +456 -5
- package/tokens/dark.tokens.json +329 -0
- package/tokens/kit.resolver.json +38 -0
- package/tokens/ref.tokens.json +1436 -0
- package/tokens/sys.tokens.json +1267 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
// src/components/error-text/error-cascade.ts
|
|
3
|
+
/**
|
|
4
|
+
* A cascade whose waves end at the next `schedule` callback, by default the
|
|
5
|
+
* next animation frame, so blocks that appear together drop in one after
|
|
6
|
+
* another.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const cascade = createErrorCascade();
|
|
10
|
+
* cascade.claim(firstBlock, 2); // 0
|
|
11
|
+
* cascade.claim(secondBlock, 1); // 2
|
|
12
|
+
*/
|
|
13
|
+
var createErrorCascade = (schedule = (endWave) => {
|
|
14
|
+
requestAnimationFrame(endWave);
|
|
15
|
+
}) => {
|
|
16
|
+
const claimed = /* @__PURE__ */ new WeakMap();
|
|
17
|
+
const wave = {
|
|
18
|
+
ahead: 0,
|
|
19
|
+
open: false
|
|
20
|
+
};
|
|
21
|
+
return { claim: (block, count) => {
|
|
22
|
+
const known = claimed.get(block);
|
|
23
|
+
if (known !== void 0) return known;
|
|
24
|
+
if (!wave.open) {
|
|
25
|
+
wave.open = true;
|
|
26
|
+
schedule(() => {
|
|
27
|
+
wave.ahead = 0;
|
|
28
|
+
wave.open = false;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const index = wave.ahead;
|
|
32
|
+
wave.ahead += count;
|
|
33
|
+
claimed.set(block, index);
|
|
34
|
+
return index;
|
|
35
|
+
} };
|
|
36
|
+
};
|
|
37
|
+
var ErrorCascadeContext = createContext(void 0);
|
|
38
|
+
/** Provides the cascade the error texts inside it share. */
|
|
39
|
+
var ErrorCascadeProvider = ErrorCascadeContext.Provider;
|
|
40
|
+
/**
|
|
41
|
+
* The cascade of the enclosing `Form.Root`, if any.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const cascade = useErrorCascade();
|
|
45
|
+
*/
|
|
46
|
+
var useErrorCascade = () => {
|
|
47
|
+
return useContext(ErrorCascadeContext);
|
|
48
|
+
};
|
|
49
|
+
export { ErrorCascadeProvider, createErrorCascade, useErrorCascade };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@layer kit.reset, kit.base, kit.components;
|
|
2
|
+
@layer kit.components {
|
|
3
|
+
@keyframes _error-pop-in_1lbz2_1 {
|
|
4
|
+
from {
|
|
5
|
+
translate: 0 calc(-1 * var(--sys-unit-4));
|
|
6
|
+
opacity: 0;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
._text_1lbz2_9 {
|
|
10
|
+
color: var(--error-text-fg, var(--sys-color-error-fg));
|
|
11
|
+
font: var(--error-text-font, var(--sys-font-body-medium));
|
|
12
|
+
}
|
|
13
|
+
._message_1lbz2_13 {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
@media not (prefers-reduced-motion) {
|
|
17
|
+
._message_1lbz2_13 {
|
|
18
|
+
animation: _error-pop-in_1lbz2_1 var(--sys-motion-short) var(--sys-motion-emphasized) both;
|
|
19
|
+
animation-delay: calc(var(--error-index, 0) * 20ms);
|
|
20
|
+
}
|
|
21
|
+
@supports (animation-delay: calc(sibling-index() * 1ms)) {
|
|
22
|
+
._message_1lbz2_13 {
|
|
23
|
+
animation-delay: calc((var(--error-index, 0) + sibling-index() - 1) * 20ms);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
+
export type ErrorTextProps = Readonly<Omit<HTMLAttributes<HTMLElement>, "children"> & Readonly<{
|
|
3
|
+
ref?: Ref<HTMLElement>;
|
|
4
|
+
/** One message, or a list of them; empty entries are skipped. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}> & (Readonly<{
|
|
7
|
+
el?: "p" | "span";
|
|
8
|
+
htmlFor?: never;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
el: "label";
|
|
11
|
+
htmlFor: string;
|
|
12
|
+
}>)>;
|
|
13
|
+
/**
|
|
14
|
+
* Renders one or more error messages, one per line, or nothing at all when there
|
|
15
|
+
* are none. The text is there from the first frame; each message drops in after
|
|
16
|
+
* the ones that arrived with it in the same `Form.Root`, unless the reader
|
|
17
|
+
* prefers reduced motion. Every other prop is forwarded to the element.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <ErrorText role="alert">{["Enter a name.", "Use letters only."]}</ErrorText>
|
|
21
|
+
*/
|
|
22
|
+
export declare const ErrorText: ({ el, className, children, ref, ...rest }: ErrorTextProps) => ReactNode;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { useErrorCascade } from "./error-cascade.js";
|
|
2
|
+
import error_text_module_default from "./error-text.module.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { Children } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
// src/components/error-text/error-text.tsx
|
|
9
|
+
var messagesOf = (children) => (Array.isArray(children) ? children : [children]).filter((message) => message !== null && message !== void 0 && message !== false && message !== "");
|
|
10
|
+
/**
|
|
11
|
+
* Renders one or more error messages, one per line, or nothing at all when there
|
|
12
|
+
* are none. The text is there from the first frame; each message drops in after
|
|
13
|
+
* the ones that arrived with it in the same `Form.Root`, unless the reader
|
|
14
|
+
* prefers reduced motion. Every other prop is forwarded to the element.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <ErrorText role="alert">{["Enter a name.", "Use letters only."]}</ErrorText>
|
|
18
|
+
*/
|
|
19
|
+
var ErrorText = (t0) => {
|
|
20
|
+
const $ = c(37);
|
|
21
|
+
let children;
|
|
22
|
+
let className;
|
|
23
|
+
let ref;
|
|
24
|
+
let rest;
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[0] !== t0) {
|
|
27
|
+
({el: t1, className, children, ref, ...rest} = t0);
|
|
28
|
+
$[0] = t0;
|
|
29
|
+
$[1] = children;
|
|
30
|
+
$[2] = className;
|
|
31
|
+
$[3] = ref;
|
|
32
|
+
$[4] = rest;
|
|
33
|
+
$[5] = t1;
|
|
34
|
+
} else {
|
|
35
|
+
children = $[1];
|
|
36
|
+
className = $[2];
|
|
37
|
+
ref = $[3];
|
|
38
|
+
rest = $[4];
|
|
39
|
+
t1 = $[5];
|
|
40
|
+
}
|
|
41
|
+
const el = t1 === void 0 ? "p" : t1;
|
|
42
|
+
const cascade = useErrorCascade();
|
|
43
|
+
let t2;
|
|
44
|
+
let t3;
|
|
45
|
+
let t4;
|
|
46
|
+
let t5;
|
|
47
|
+
let t6;
|
|
48
|
+
let t7;
|
|
49
|
+
let t8;
|
|
50
|
+
let t9;
|
|
51
|
+
if ($[6] !== cascade || $[7] !== children || $[8] !== className || $[9] !== el || $[10] !== ref || $[11] !== rest) {
|
|
52
|
+
const messages = messagesOf(children);
|
|
53
|
+
t9 = useRender;
|
|
54
|
+
t6 = messages.length > 0;
|
|
55
|
+
t7 = el;
|
|
56
|
+
const t10 = ref ?? null;
|
|
57
|
+
let t11;
|
|
58
|
+
if ($[20] !== cascade) {
|
|
59
|
+
t11 = (node) => {
|
|
60
|
+
if (node !== null) node.style.setProperty("--error-index", String(cascade?.claim(node, node.childElementCount) ?? 0));
|
|
61
|
+
};
|
|
62
|
+
$[20] = cascade;
|
|
63
|
+
$[21] = t11;
|
|
64
|
+
} else t11 = $[21];
|
|
65
|
+
if ($[22] !== t10 || $[23] !== t11) {
|
|
66
|
+
t8 = [t10, t11];
|
|
67
|
+
$[22] = t10;
|
|
68
|
+
$[23] = t11;
|
|
69
|
+
$[24] = t8;
|
|
70
|
+
} else t8 = $[24];
|
|
71
|
+
t2 = rest;
|
|
72
|
+
t3 = "";
|
|
73
|
+
if ($[25] !== className) {
|
|
74
|
+
t4 = clsx(error_text_module_default.text, className);
|
|
75
|
+
$[25] = className;
|
|
76
|
+
$[26] = t4;
|
|
77
|
+
} else t4 = $[26];
|
|
78
|
+
t5 = Children.map(messages, _temp);
|
|
79
|
+
$[6] = cascade;
|
|
80
|
+
$[7] = children;
|
|
81
|
+
$[8] = className;
|
|
82
|
+
$[9] = el;
|
|
83
|
+
$[10] = ref;
|
|
84
|
+
$[11] = rest;
|
|
85
|
+
$[12] = t2;
|
|
86
|
+
$[13] = t3;
|
|
87
|
+
$[14] = t4;
|
|
88
|
+
$[15] = t5;
|
|
89
|
+
$[16] = t6;
|
|
90
|
+
$[17] = t7;
|
|
91
|
+
$[18] = t8;
|
|
92
|
+
$[19] = t9;
|
|
93
|
+
} else {
|
|
94
|
+
t2 = $[12];
|
|
95
|
+
t3 = $[13];
|
|
96
|
+
t4 = $[14];
|
|
97
|
+
t5 = $[15];
|
|
98
|
+
t6 = $[16];
|
|
99
|
+
t7 = $[17];
|
|
100
|
+
t8 = $[18];
|
|
101
|
+
t9 = $[19];
|
|
102
|
+
}
|
|
103
|
+
let t10;
|
|
104
|
+
if ($[27] !== t2 || $[28] !== t3 || $[29] !== t4 || $[30] !== t5) {
|
|
105
|
+
t10 = {
|
|
106
|
+
...t2,
|
|
107
|
+
"data-error-text": t3,
|
|
108
|
+
className: t4,
|
|
109
|
+
children: t5
|
|
110
|
+
};
|
|
111
|
+
$[27] = t2;
|
|
112
|
+
$[28] = t3;
|
|
113
|
+
$[29] = t4;
|
|
114
|
+
$[30] = t5;
|
|
115
|
+
$[31] = t10;
|
|
116
|
+
} else t10 = $[31];
|
|
117
|
+
let t11;
|
|
118
|
+
if ($[32] !== t10 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
|
|
119
|
+
t11 = {
|
|
120
|
+
enabled: t6,
|
|
121
|
+
defaultTagName: t7,
|
|
122
|
+
ref: t8,
|
|
123
|
+
props: t10
|
|
124
|
+
};
|
|
125
|
+
$[32] = t10;
|
|
126
|
+
$[33] = t6;
|
|
127
|
+
$[34] = t7;
|
|
128
|
+
$[35] = t8;
|
|
129
|
+
$[36] = t11;
|
|
130
|
+
} else t11 = $[36];
|
|
131
|
+
return t9(t11);
|
|
132
|
+
};
|
|
133
|
+
function _temp(message) {
|
|
134
|
+
return /* @__PURE__ */ jsx("span", {
|
|
135
|
+
className: error_text_module_default.message,
|
|
136
|
+
children: message
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
export { ErrorText };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './error-text.css';// src/components/error-text/error-text.module.scss
|
|
2
|
+
var text = "_text_1lbz2_9";
|
|
3
|
+
var message = "_message_1lbz2_13";
|
|
4
|
+
var errorPopIn = "_error-pop-in_1lbz2_1";
|
|
5
|
+
var error_text_module_default = {
|
|
6
|
+
text,
|
|
7
|
+
message,
|
|
8
|
+
"error-pop-in": "_error-pop-in_1lbz2_1",
|
|
9
|
+
errorPopIn
|
|
10
|
+
};
|
|
11
|
+
export { error_text_module_default as default, errorPopIn, message, text };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./error-text.tsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorText } from "./error-text.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One choice of a radio group, toggle group or segmented control.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const views: readonly ChoiceOption[] = [{ value: "list", label: "List" }];
|
|
6
|
+
*/
|
|
7
|
+
export type ChoiceOption = Readonly<{
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Context } from "react";
|
|
2
|
+
/** What a field group tells the fields it collects the errors of. */
|
|
3
|
+
export type FieldGroupContextValue = Readonly<{
|
|
4
|
+
/** The ids of the lines a field's errors show as in the group's error, or `undefined` for a field the group does not collect. */
|
|
5
|
+
lineIds: (name: string) => readonly string[] | undefined;
|
|
6
|
+
/** Tells the group a field's label, until the returned function takes it back. */
|
|
7
|
+
registerLabel: (name: string, label: string) => () => void;
|
|
8
|
+
}>;
|
|
9
|
+
/** The field group the fields inside it report to. */
|
|
10
|
+
export declare const FieldGroupContext: Context<FieldGroupContextValue | null>;
|
|
11
|
+
/** Whether a field root sits directly in a field group's row of fields. */
|
|
12
|
+
export declare const FieldRowContext: Context<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* The ids of the lines the enclosing field group shows this field's errors as,
|
|
15
|
+
* or `undefined` when no group collects it. A field is matched by the name of
|
|
16
|
+
* the TanStack Form field it renders in.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const lineIds = useFieldGroupLineIds(); // ["«r3»line0"]
|
|
20
|
+
*/
|
|
21
|
+
export declare const useFieldGroupLineIds: () => readonly string[] | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { fieldContext } from "../../lib/forms/context.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
// src/components/field/field-group-context.ts
|
|
5
|
+
/** The field group the fields inside it report to. */
|
|
6
|
+
var FieldGroupContext = createContext(null);
|
|
7
|
+
/** Whether a field root sits directly in a field group's row of fields. */
|
|
8
|
+
var FieldRowContext = createContext(false);
|
|
9
|
+
/**
|
|
10
|
+
* The ids of the lines `group` shows the errors of `field` as, where there are
|
|
11
|
+
* both.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* groupLineIds(group, field); // ["«r3»line0"]
|
|
15
|
+
*/
|
|
16
|
+
var groupLineIds = (group, field) => group === null || field === null ? void 0 : group.lineIds(field.name);
|
|
17
|
+
/**
|
|
18
|
+
* The ids of the lines the enclosing field group shows this field's errors as,
|
|
19
|
+
* or `undefined` when no group collects it. A field is matched by the name of
|
|
20
|
+
* the TanStack Form field it renders in.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const lineIds = useFieldGroupLineIds(); // ["«r3»line0"]
|
|
24
|
+
*/
|
|
25
|
+
var useFieldGroupLineIds = () => {
|
|
26
|
+
const $ = c(3);
|
|
27
|
+
const t0 = useContext(FieldGroupContext);
|
|
28
|
+
const t1 = useContext(fieldContext);
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[0] !== t0 || $[1] !== t1) {
|
|
31
|
+
t2 = groupLineIds(t0, t1);
|
|
32
|
+
$[0] = t0;
|
|
33
|
+
$[1] = t1;
|
|
34
|
+
$[2] = t2;
|
|
35
|
+
} else t2 = $[2];
|
|
36
|
+
return t2;
|
|
37
|
+
};
|
|
38
|
+
export { FieldGroupContext, FieldRowContext, useFieldGroupLineIds };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a field asserts anything about being required. Absent means it makes no
|
|
3
|
+
* assertion, which is the case for anything outside a form.
|
|
4
|
+
*/
|
|
5
|
+
export type Requiredness = "required" | "optional";
|
|
6
|
+
/** What the validator says of a field's value. */
|
|
7
|
+
export type FieldValidity = "valid" | "invalid";
|
|
8
|
+
/** The states a form control projects onto its markup. */
|
|
9
|
+
export type FieldState = Readonly<{
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
requiredness?: Requiredness;
|
|
13
|
+
/** Absent while the validator has said nothing. */
|
|
14
|
+
validity?: FieldValidity;
|
|
15
|
+
dirty?: boolean;
|
|
16
|
+
touched?: boolean;
|
|
17
|
+
filled?: boolean;
|
|
18
|
+
/** Focus is here, however it got here: warms the field's border. */
|
|
19
|
+
focused?: boolean;
|
|
20
|
+
/** That focus is the keyboard's: shows the ring. */
|
|
21
|
+
focusVisible?: boolean;
|
|
22
|
+
pending?: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Presence-style `data-*` props, matching Base UI's own convention, plus the one
|
|
26
|
+
* state a screen reader reads as a property rather than a treatment.
|
|
27
|
+
*/
|
|
28
|
+
export type FieldStateAttributes = Readonly<{
|
|
29
|
+
"aria-busy"?: true;
|
|
30
|
+
"data-disabled"?: "";
|
|
31
|
+
"data-readonly"?: "";
|
|
32
|
+
"data-required"?: "";
|
|
33
|
+
"data-optional"?: "";
|
|
34
|
+
"data-invalid"?: "";
|
|
35
|
+
"data-valid"?: "";
|
|
36
|
+
"data-dirty"?: "";
|
|
37
|
+
"data-touched"?: "";
|
|
38
|
+
"data-filled"?: "";
|
|
39
|
+
"data-focused"?: "";
|
|
40
|
+
"data-focus-visible"?: "";
|
|
41
|
+
"data-pending"?: "";
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Turns field state into `data-*` props: a true flag emits an empty attribute,
|
|
45
|
+
* anything else is left out.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <div {...fieldStateAttributes({ validity: "invalid", disabled: false })} />
|
|
49
|
+
* // <div data-invalid="" />
|
|
50
|
+
*/
|
|
51
|
+
export declare const fieldStateAttributes: (state: FieldState) => FieldStateAttributes;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/components/field/field-state.ts
|
|
2
|
+
var flagged = "";
|
|
3
|
+
/**
|
|
4
|
+
* Turns field state into `data-*` props: a true flag emits an empty attribute,
|
|
5
|
+
* anything else is left out.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <div {...fieldStateAttributes({ validity: "invalid", disabled: false })} />
|
|
9
|
+
* // <div data-invalid="" />
|
|
10
|
+
*/
|
|
11
|
+
var fieldStateAttributes = (state) => ({
|
|
12
|
+
...state.disabled === true && { "data-disabled": flagged },
|
|
13
|
+
...state.readonly === true && { "data-readonly": flagged },
|
|
14
|
+
...state.requiredness === "required" && { "data-required": flagged },
|
|
15
|
+
...state.requiredness === "optional" && { "data-optional": flagged },
|
|
16
|
+
...state.validity === "invalid" && { "data-invalid": flagged },
|
|
17
|
+
...state.validity === "valid" && { "data-valid": flagged },
|
|
18
|
+
...state.dirty === true && { "data-dirty": flagged },
|
|
19
|
+
...state.touched === true && { "data-touched": flagged },
|
|
20
|
+
...state.filled === true && { "data-filled": flagged },
|
|
21
|
+
...state.focused === true && { "data-focused": flagged },
|
|
22
|
+
...state.focusVisible === true && { "data-focus-visible": flagged },
|
|
23
|
+
...state.pending === true && {
|
|
24
|
+
"data-pending": flagged,
|
|
25
|
+
"aria-busy": true
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export { fieldStateAttributes };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@layer kit.reset, kit.base, kit.components;
|
|
2
|
+
@layer kit.components {
|
|
3
|
+
._field_dzutr_3 {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--field-gap, var(--sys-unit-4));
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
}
|
|
9
|
+
._field_dzutr_3[data-field-group-member] > * {
|
|
10
|
+
grid-row: extra;
|
|
11
|
+
margin-block-start: var(--field-gap, var(--sys-unit-4));
|
|
12
|
+
}
|
|
13
|
+
._field_dzutr_3[data-field-group-member] > ._label_dzutr_13 {
|
|
14
|
+
grid-row: label;
|
|
15
|
+
margin-block: 0 var(--field-gap, var(--sys-unit-4));
|
|
16
|
+
}
|
|
17
|
+
._field_dzutr_3[data-field-group-member] > :first-child:not(._label_dzutr_13),
|
|
18
|
+
._field_dzutr_3[data-field-group-member] > ._label_dzutr_13 + * {
|
|
19
|
+
grid-row: control;
|
|
20
|
+
margin-block-start: 0;
|
|
21
|
+
}
|
|
22
|
+
._field_dzutr_3[data-field-group-member] > ._description_dzutr_22 {
|
|
23
|
+
grid-row: description;
|
|
24
|
+
}
|
|
25
|
+
._field_dzutr_3[data-field-group-member] > ._error_dzutr_25 {
|
|
26
|
+
grid-row: error;
|
|
27
|
+
}
|
|
28
|
+
._label_dzutr_13 {
|
|
29
|
+
color: var(--sys-color-text);
|
|
30
|
+
font: var(--sys-font-label-medium);
|
|
31
|
+
cursor: default;
|
|
32
|
+
}
|
|
33
|
+
._optional_dzutr_33 {
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
color: var(--sys-color-text-muted);
|
|
36
|
+
font: var(--sys-font-body-small);
|
|
37
|
+
font-size: 0.75rem;
|
|
38
|
+
}
|
|
39
|
+
._inlineText_dzutr_39 {
|
|
40
|
+
grid-area: text;
|
|
41
|
+
}
|
|
42
|
+
._inlineOptional_dzutr_42 {
|
|
43
|
+
grid-area: optional;
|
|
44
|
+
}
|
|
45
|
+
._required_dzutr_45 {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
vertical-align: middle;
|
|
48
|
+
translate: 0 -1px;
|
|
49
|
+
inline-size: 0.625rem;
|
|
50
|
+
block-size: 0.625rem;
|
|
51
|
+
background-color: var(--field-required-fg, var(--sys-color-primary));
|
|
52
|
+
mask: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='16%2016%2032%2032'%20fill='currentColor'%3e%3cpath%20d='M45.475%2036.291c.377.162.549.477.523.943-.027.469-.35%201.223-.967%202.264-.617%201.072-1.121%201.725-1.51%201.967-.389.24-.744.24-1.066%200l-8.574-6.215%201.129%2010.508c.078.398-.096.707-.525.92-.428.215-1.262.322-2.495.322-1.236%200-2.066-.107-2.496-.322-.43-.213-.604-.521-.523-.92l1.127-10.508-8.533%206.215c-.322.24-.686.24-1.088%200-.402-.242-.912-.895-1.529-1.967-.617-1.041-.934-1.795-.945-2.264-.016-.467.168-.781.543-.943l9.701-4.29-9.701-4.252c-.375-.188-.559-.516-.543-.984.012-.467.328-1.223.945-2.264.617-1.045%201.127-1.686%201.529-1.926s.766-.24%201.088%200l8.533%206.176-1.127-10.467c-.08-.428.094-.748.523-.963s1.26-.321%202.496-.321c1.232%200%202.066.107%202.494.322.43.215.604.535.525.963l-1.129%2010.467%208.574-6.176c.322-.24.678-.24%201.066%200s.893.896%201.51%201.965c.617%201.018.939%201.758.967%202.225.025.469-.146.797-.523.984l-9.701%204.252%209.702%204.289'/%3e%3c/svg%3e") center/contain no-repeat;
|
|
53
|
+
}
|
|
54
|
+
._description_dzutr_22 {
|
|
55
|
+
color: var(--field-description-fg, var(--sys-color-text-muted));
|
|
56
|
+
font: var(--field-description-font, var(--sys-font-body-medium));
|
|
57
|
+
}
|
|
58
|
+
._pending_dzutr_58 {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
flex: none;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: var(--sys-unit-2);
|
|
63
|
+
color: var(--field-muted-fg);
|
|
64
|
+
font: var(--sys-font-body-medium);
|
|
65
|
+
cursor: default;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
line-height: normal;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Field as BaseField } from "@base-ui/react/field";
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
import type { Requiredness } from "./field-state.ts";
|
|
4
|
+
/**
|
|
5
|
+
* The props every field takes, on every tier: the raw compound's root, the
|
|
6
|
+
* `<Control>Field` shorthand and the `TSF<Control>Field` bridge.
|
|
7
|
+
*/
|
|
8
|
+
export type FieldProps = Readonly<{
|
|
9
|
+
/** The visible label; never only a placeholder. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Help shown under the control, before any error. */
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
/** Errors in any shape `normalizeFieldErrors` accepts. Any line makes the field invalid. */
|
|
14
|
+
errors?: unknown;
|
|
15
|
+
/** What the label asserts. Left out, it shows neither mark. */
|
|
16
|
+
requiredness?: Requiredness;
|
|
17
|
+
/** The word an optional field's label trails, such as "optional". */
|
|
18
|
+
optionalLabel: string;
|
|
19
|
+
/** The value differs from the one the form started with. */
|
|
20
|
+
dirty?: boolean;
|
|
21
|
+
/** The user has left the control at least once. */
|
|
22
|
+
touched?: boolean;
|
|
23
|
+
/** Background work, such as an async validator, is in flight. */
|
|
24
|
+
pending?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* What a field calls once focus has left it, such as a form library's blur
|
|
28
|
+
* handler. Every `<Control>Field` and its bridge take this one type.
|
|
29
|
+
*/
|
|
30
|
+
export type FieldBlurHandler = () => void;
|
|
31
|
+
/** The copy and assertion a label carries about requiredness. */
|
|
32
|
+
export type RequirednessProps = Readonly<{
|
|
33
|
+
requiredness?: Requiredness;
|
|
34
|
+
/** The word an optional field's label trails, such as "optional". */
|
|
35
|
+
optionalLabel: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* The mark a label carries when its field is required. Decoration only: the
|
|
39
|
+
* control's own `required` tells assistive tech.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <Field.RequiredMark requiredness="required" />
|
|
43
|
+
*/
|
|
44
|
+
declare const RequiredMark: ({ requiredness, }: Readonly<{
|
|
45
|
+
requiredness?: Requiredness;
|
|
46
|
+
}>) => ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* The suffix a label trails: the required mark, or the optional word.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* <Field.Requiredness requiredness="optional" optionalLabel="optional" />
|
|
52
|
+
*/
|
|
53
|
+
declare const FieldRequiredness: ({ requiredness, optionalLabel, }: RequirednessProps) => ReactNode;
|
|
54
|
+
export type InlineLabelTextProps = RequirednessProps & Readonly<{
|
|
55
|
+
label: string;
|
|
56
|
+
/** The label of the field the row sits in, which carries the suffix instead. */
|
|
57
|
+
fieldLabel?: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* The text beside a control that shares its label, carrying the suffix a
|
|
61
|
+
* `fieldLabel` above the row would otherwise carry.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* <BaseField.Label>
|
|
65
|
+
* <Checkbox />
|
|
66
|
+
* <Field.InlineLabelText label={label} requiredness="optional" optionalLabel="optional" />
|
|
67
|
+
* </BaseField.Label>
|
|
68
|
+
*/
|
|
69
|
+
declare const InlineLabelText: ({ label, fieldLabel, requiredness, optionalLabel, }: InlineLabelTextProps) => ReactNode;
|
|
70
|
+
export type FieldRootProps = BaseField.Root.Props & Readonly<{
|
|
71
|
+
className?: string;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* The field frame: label, control, description and error stacked full width.
|
|
75
|
+
* In a field group's row its parts share the row's tracks with its neighbours.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* <Field.Root name="email" invalid={invalid}>…</Field.Root>
|
|
79
|
+
*/
|
|
80
|
+
declare const FieldRoot: ({ className, children, ...props }: FieldRootProps) => ReactNode;
|
|
81
|
+
export type FieldLabelProps = Omit<BaseField.Label.Props, "className"> & RequirednessProps & Readonly<{
|
|
82
|
+
className?: string;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* The label above a control, trailing its requiredness. Renders nothing without
|
|
86
|
+
* children.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* <Field.Label requiredness="optional" optionalLabel="optional">Notes</Field.Label>
|
|
90
|
+
*/
|
|
91
|
+
declare const FieldLabel: ({ children, requiredness, optionalLabel, className, ...props }: FieldLabelProps) => ReactNode;
|
|
92
|
+
export type FieldCaptionProps = ComponentProps<"p"> & RequirednessProps;
|
|
93
|
+
/**
|
|
94
|
+
* A caption styled like a field label, which names nothing: a paragraph, with
|
|
95
|
+
* no `for` and no `aria-labelledby` of its own. Use it for standing text above
|
|
96
|
+
* a control that already carries its own name. To name something, use `Label`.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* <Field.Caption optionalLabel="optional">Theme</Field.Caption>
|
|
100
|
+
*/
|
|
101
|
+
declare const FieldCaption: ({ children, requiredness, optionalLabel, className, ...props }: FieldCaptionProps) => ReactNode;
|
|
102
|
+
/**
|
|
103
|
+
* The help under a control. Renders nothing without children.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* <Field.Description>We only use it to send the receipt.</Field.Description>
|
|
107
|
+
*/
|
|
108
|
+
declare const FieldDescription: ({ children, className, ...props }: BaseField.Description.Props) => ReactNode;
|
|
109
|
+
export type FieldErrorProps = Omit<BaseField.Error.Props, "match" | "render" | "children"> & Readonly<{
|
|
110
|
+
/** Errors in any shape `normalizeFieldErrors` accepts. */
|
|
111
|
+
children?: unknown;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* The one error part every control renders, after the description. Normalises
|
|
115
|
+
* its errors to lines with `normalizeFieldErrors` and renders nothing when
|
|
116
|
+
* there are none. It is the field's only live region, so a control must not
|
|
117
|
+
* announce the same message a second time. In a field group that collects
|
|
118
|
+
* the field, the group's error shows the lines instead, and the control is
|
|
119
|
+
* described by them.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* <Field.Error>{errors}</Field.Error>
|
|
123
|
+
*/
|
|
124
|
+
declare const FieldError: ({ children: errors, ...props }: FieldErrorProps) => ReactNode;
|
|
125
|
+
export type FieldPendingProps = Readonly<{
|
|
126
|
+
className?: string;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* The spinner a field shows while background work is in flight, sized to sit
|
|
130
|
+
* in the box beside the control. The control decides when it is mounted, once
|
|
131
|
+
* the wait is worth showing. It is decoration: the wait reaches assistive tech
|
|
132
|
+
* as the `aria-busy` that `fieldStateAttributes` projects.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* {phase !== "fresh" && <Field.Pending />}
|
|
136
|
+
*/
|
|
137
|
+
declare const FieldPending: ({ className, }: FieldPendingProps) => ReactNode;
|
|
138
|
+
/** Stable ids for the parts of one field. */
|
|
139
|
+
export type FieldIds = Readonly<{
|
|
140
|
+
labelId: string;
|
|
141
|
+
descriptionId: string;
|
|
142
|
+
errorId: string;
|
|
143
|
+
/** A stable id and name for the control. */
|
|
144
|
+
controlId: string;
|
|
145
|
+
/** The control's `aria-describedby`: the description and the error that are shown, or the field's lines in a field group that collects it. */
|
|
146
|
+
describedBy: (hasDescription: boolean, invalid: boolean) => string | undefined;
|
|
147
|
+
}>;
|
|
148
|
+
/**
|
|
149
|
+
* Stable ids for a field's label, description and error, for controls that
|
|
150
|
+
* wire `aria-labelledby` and `aria-describedby` themselves.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* const { labelId, errorId } = useFieldIds();
|
|
154
|
+
*/
|
|
155
|
+
export declare const useFieldIds: () => FieldIds;
|
|
156
|
+
/** The parts of a field. */
|
|
157
|
+
export type FieldParts = Readonly<{
|
|
158
|
+
Root: typeof FieldRoot;
|
|
159
|
+
Label: typeof FieldLabel;
|
|
160
|
+
Caption: typeof FieldCaption;
|
|
161
|
+
Control: typeof BaseField.Control;
|
|
162
|
+
Description: typeof FieldDescription;
|
|
163
|
+
Error: typeof FieldError;
|
|
164
|
+
Pending: typeof FieldPending;
|
|
165
|
+
Item: typeof BaseField.Item;
|
|
166
|
+
Validity: typeof BaseField.Validity;
|
|
167
|
+
Requiredness: typeof FieldRequiredness;
|
|
168
|
+
RequiredMark: typeof RequiredMark;
|
|
169
|
+
InlineLabelText: typeof InlineLabelText;
|
|
170
|
+
useIds: typeof useFieldIds;
|
|
171
|
+
}>;
|
|
172
|
+
/**
|
|
173
|
+
* The field frame and its parts, over base-ui's `Field`. A control's raw tier
|
|
174
|
+
* renders inside `Root` and names itself through `Label`; `Description` comes
|
|
175
|
+
* before `Error`, the field's only live region.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* <Field.Root name="email" invalid={invalid}>
|
|
179
|
+
* <Field.Label requiredness="required" optionalLabel="optional">Email</Field.Label>
|
|
180
|
+
* <Field.Control />
|
|
181
|
+
* <Field.Description>We send the receipt here.</Field.Description>
|
|
182
|
+
* <Field.Error>{errors}</Field.Error>
|
|
183
|
+
* </Field.Root>
|
|
184
|
+
*/
|
|
185
|
+
export declare const Field: FieldParts;
|
|
186
|
+
export {};
|