@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,13 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import { type ConnectedFieldProps } from "../../lib/forms/use-connected-field.ts";
|
|
3
|
+
import type { TextPresetProps } from "./text-preset.ts";
|
|
4
|
+
/** The props a text preset's bridge takes: the preset's own, less what the form supplies. */
|
|
5
|
+
export type TSFTextPresetProps<TExtra extends object> = Omit<TextPresetProps, keyof ConnectedFieldProps | "value" | "onValueChange"> & TExtra;
|
|
6
|
+
/**
|
|
7
|
+
* Wraps a text preset as a TanStack Form bridge. The format is the preset's;
|
|
8
|
+
* the rule behind it belongs to the form's schema.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* export const TSFEmailField = connectTextPreset(EmailField);
|
|
12
|
+
*/
|
|
13
|
+
export declare const connectTextPreset: <TExtra extends object>(Preset: ComponentType<TextPresetProps & TExtra>) => ((props: TSFTextPresetProps<TExtra>) => ReactNode);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useConnectedField } from "../../lib/forms/use-connected-field.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/text-field/connect-text-preset.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Wraps a text preset as a TanStack Form bridge. The format is the preset's;
|
|
7
|
+
* the rule behind it belongs to the form's schema.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* export const TSFEmailField = connectTextPreset(EmailField);
|
|
11
|
+
*/
|
|
12
|
+
var connectTextPreset = (Preset) => {
|
|
13
|
+
const Connected = (props) => {
|
|
14
|
+
const $ = c(5);
|
|
15
|
+
const { field, props: connected } = useConnectedField(props.label);
|
|
16
|
+
let t0;
|
|
17
|
+
if ($[0] !== connected || $[1] !== field.handleChange || $[2] !== field.state.value || $[3] !== props) {
|
|
18
|
+
t0 = /* @__PURE__ */ jsx(Preset, {
|
|
19
|
+
...props,
|
|
20
|
+
...connected,
|
|
21
|
+
value: field.state.value,
|
|
22
|
+
onValueChange: field.handleChange
|
|
23
|
+
});
|
|
24
|
+
$[0] = connected;
|
|
25
|
+
$[1] = field.handleChange;
|
|
26
|
+
$[2] = field.state.value;
|
|
27
|
+
$[3] = props;
|
|
28
|
+
$[4] = t0;
|
|
29
|
+
} else t0 = $[4];
|
|
30
|
+
return t0;
|
|
31
|
+
};
|
|
32
|
+
return Connected;
|
|
33
|
+
};
|
|
34
|
+
export { connectTextPreset };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { connectTextPreset } from "./connect-text-preset.js";
|
|
2
|
+
import { TextField } from "./text-field.js";
|
|
3
|
+
import { TextInput } from "./text-input.js";
|
|
4
|
+
import { TSFTextField } from "./tsf-text-field.js";
|
|
5
|
+
export { TSFTextField, TextField, TextInput, connectTextPreset };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
@layer kit.reset, kit.base, kit.components;
|
|
2
|
+
@layer kit.components {
|
|
3
|
+
._root_1kpis_3 {
|
|
4
|
+
min-inline-size: 0;
|
|
5
|
+
}
|
|
6
|
+
._group_1kpis_6 {
|
|
7
|
+
--field-fg: var(--sys-color-text);
|
|
8
|
+
--field-muted-fg: var(--sys-color-text-muted);
|
|
9
|
+
--field-placeholder-fg: var(--sys-color-text-placeholder);
|
|
10
|
+
align-items: center;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
min-block-size: calc(1lh + 2 * var(--sys-unit-6) + 2 * 1px);
|
|
13
|
+
border: 1px solid var(--sys-color-border);
|
|
14
|
+
border-radius: var(--sys-radius-sm);
|
|
15
|
+
background: var(--sys-color-surface);
|
|
16
|
+
padding: var(--sys-unit-6);
|
|
17
|
+
color: var(--field-fg);
|
|
18
|
+
font: var(--sys-font-body-medium);
|
|
19
|
+
}
|
|
20
|
+
._group_1kpis_6 {
|
|
21
|
+
outline: 0 solid var(--sys-color-focus-ring);
|
|
22
|
+
outline-offset: var(--sys-focus-ring-offset);
|
|
23
|
+
}
|
|
24
|
+
._group_1kpis_6[data-focus-visible] {
|
|
25
|
+
outline-width: var(--sys-focus-ring-width);
|
|
26
|
+
}
|
|
27
|
+
@media not (prefers-reduced-motion) {
|
|
28
|
+
._group_1kpis_6 {
|
|
29
|
+
transition: border-color var(--sys-motion-instant) var(--sys-motion-standard), background var(--sys-motion-instant) var(--sys-motion-standard);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
._group_1kpis_6:hover:not([data-disabled], [data-readonly]), ._group_1kpis_6[data-focused], ._group_1kpis_6[data-popup-open] {
|
|
33
|
+
border-color: var(--sys-color-primary);
|
|
34
|
+
}
|
|
35
|
+
._group_1kpis_6[data-readonly] {
|
|
36
|
+
--field-fg: var(--sys-color-text);
|
|
37
|
+
border-style: dashed;
|
|
38
|
+
border-color: var(--sys-color-outline);
|
|
39
|
+
background: var(--sys-color-surface-high);
|
|
40
|
+
color: var(--field-fg);
|
|
41
|
+
}
|
|
42
|
+
._group_1kpis_6[data-pending] {
|
|
43
|
+
cursor: progress;
|
|
44
|
+
caret-color: var(--sys-color-text-muted);
|
|
45
|
+
}
|
|
46
|
+
._group_1kpis_6[data-invalid] {
|
|
47
|
+
--field-fg: var(--sys-color-error-fg);
|
|
48
|
+
--field-muted-fg: var(--sys-color-error-fg);
|
|
49
|
+
--field-placeholder-fg: var(--sys-color-error-fg);
|
|
50
|
+
border-color: var(--sys-color-error-fg);
|
|
51
|
+
background-color: var(--sys-color-error-bg);
|
|
52
|
+
color: var(--field-fg);
|
|
53
|
+
}
|
|
54
|
+
._group_1kpis_6[data-disabled] {
|
|
55
|
+
--field-fg: var(--sys-color-disabled-fg);
|
|
56
|
+
--field-muted-fg: var(--sys-color-disabled-fg);
|
|
57
|
+
--field-placeholder-fg: var(--sys-color-disabled-fg);
|
|
58
|
+
color: var(--sys-color-disabled-fg);
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
background: var(--sys-color-disabled-bg);
|
|
61
|
+
}
|
|
62
|
+
._group_1kpis_6 {
|
|
63
|
+
position: relative;
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: var(--sys-unit-4);
|
|
66
|
+
}
|
|
67
|
+
._group_1kpis_6 {
|
|
68
|
+
inline-size: 100%;
|
|
69
|
+
cursor: text;
|
|
70
|
+
}
|
|
71
|
+
._control_1kpis_71 {
|
|
72
|
+
flex: 1;
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
border: none;
|
|
75
|
+
background: none;
|
|
76
|
+
padding: 0;
|
|
77
|
+
color: inherit;
|
|
78
|
+
font: inherit;
|
|
79
|
+
}
|
|
80
|
+
._control_1kpis_71::-webkit-search-cancel-button {
|
|
81
|
+
display: none;
|
|
82
|
+
appearance: none;
|
|
83
|
+
}
|
|
84
|
+
._control_1kpis_71::-webkit-search-decoration {
|
|
85
|
+
display: none;
|
|
86
|
+
appearance: none;
|
|
87
|
+
}
|
|
88
|
+
._control_1kpis_71 {
|
|
89
|
+
line-height: normal;
|
|
90
|
+
}
|
|
91
|
+
._control_1kpis_71::placeholder {
|
|
92
|
+
color: var(--field-placeholder-fg);
|
|
93
|
+
}
|
|
94
|
+
._bar_1kpis_94 {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: flex-end;
|
|
98
|
+
gap: var(--sys-unit-4);
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
}
|
|
101
|
+
._bar_1kpis_94:empty {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
._inlay_1kpis_104 {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
flex: none;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: var(--sys-unit-2);
|
|
109
|
+
color: var(--field-muted-fg);
|
|
110
|
+
font: var(--sys-font-body-medium);
|
|
111
|
+
cursor: default;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
line-height: normal;
|
|
114
|
+
}
|
|
115
|
+
._action_1kpis_115 {
|
|
116
|
+
position: relative;
|
|
117
|
+
flex: none;
|
|
118
|
+
margin-block: calc(-1 * var(--sys-unit-6));
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
}
|
|
121
|
+
@media (any-pointer: coarse) {
|
|
122
|
+
._action_1kpis_115::before {
|
|
123
|
+
content: "";
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 50%;
|
|
126
|
+
translate: -50% -50%;
|
|
127
|
+
inline-size: max(100%, var(--sys-unit-22));
|
|
128
|
+
block-size: var(--sys-unit-22);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
._copyStatus_1kpis_131 {
|
|
132
|
+
position: absolute;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
clip-path: inset(50%);
|
|
135
|
+
inline-size: 1px;
|
|
136
|
+
block-size: 1px;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
._counter_1kpis_139 {
|
|
140
|
+
--counter-fg: var(
|
|
141
|
+
--text-field-counter-fg,
|
|
142
|
+
var(--sys-color-text-muted)
|
|
143
|
+
);
|
|
144
|
+
align-self: flex-end;
|
|
145
|
+
justify-self: end;
|
|
146
|
+
color: var(--counter-fg);
|
|
147
|
+
font: var(--text-field-counter-font, var(--sys-font-body-small));
|
|
148
|
+
font-variant-numeric: tabular-nums;
|
|
149
|
+
cursor: default;
|
|
150
|
+
}
|
|
151
|
+
._counter_1kpis_139[data-tone=warning] {
|
|
152
|
+
--counter-fg: var(
|
|
153
|
+
--text-field-counter-warning-fg,
|
|
154
|
+
var(--sys-color-warning-fg)
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
._counter_1kpis_139[data-tone=error] {
|
|
158
|
+
--counter-fg: var(
|
|
159
|
+
--text-field-counter-error-fg,
|
|
160
|
+
var(--sys-color-error-fg)
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
._visuallyHidden_1kpis_163 {
|
|
164
|
+
position: absolute;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
clip-path: inset(50%);
|
|
167
|
+
inline-size: 1px;
|
|
168
|
+
block-size: 1px;
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { FieldBlurHandler, FieldProps } from "../field/index.ts";
|
|
3
|
+
import { type SvgComponent } from "../icon/index.ts";
|
|
4
|
+
import { type TextInputInputProps, type TextInputRootProps } from "./text-input.tsx";
|
|
5
|
+
/** The clear button: off, or on with its accessible name. */
|
|
6
|
+
export type TextFieldClearProps = Readonly<{
|
|
7
|
+
clearable?: false;
|
|
8
|
+
clearLabel?: undefined;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
/** Adds the clear button once the field holds a value. */
|
|
11
|
+
clearable: true;
|
|
12
|
+
/** The clear button's accessible name and tooltip, such as "Clear". */
|
|
13
|
+
clearLabel: string;
|
|
14
|
+
}>;
|
|
15
|
+
/** The copy-to-clipboard button: off, or on with the copy it shows. */
|
|
16
|
+
export type TextFieldCopyProps = Readonly<{
|
|
17
|
+
copyable?: false;
|
|
18
|
+
copyLabel?: undefined;
|
|
19
|
+
copiedLabel?: undefined;
|
|
20
|
+
copyFailedLabel?: undefined;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
/** Adds a copy-to-clipboard button once the field holds a value. */
|
|
23
|
+
copyable: true;
|
|
24
|
+
/** The copy button's accessible name and tooltip, such as "Copy". */
|
|
25
|
+
copyLabel: string;
|
|
26
|
+
/** Announced once the value is on the clipboard, such as "Copied". */
|
|
27
|
+
copiedLabel: string;
|
|
28
|
+
/** Announced when copying failed and the text is selected instead. */
|
|
29
|
+
copyFailedLabel: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** Every `TextField` prop but the optional clear and copy buttons. */
|
|
32
|
+
export type TextFieldBaseProps = FieldProps & Omit<TextInputRootProps, keyof FieldProps | "children"> & Pick<TextInputInputProps, "type" | "placeholder" | "name" | "id" | "autoComplete" | "autoCapitalize" | "inputMode" | "enterKeyHint" | "spellCheck" | "onFocus"> & Readonly<{
|
|
33
|
+
onBlur?: FieldBlurHandler;
|
|
34
|
+
/** Keeps the label in the accessibility tree but out of view. */
|
|
35
|
+
labelHidden?: boolean;
|
|
36
|
+
/** Decorative leading icon inside the group. */
|
|
37
|
+
icon?: SvgComponent;
|
|
38
|
+
/** Static leading text, such as a currency sign. */
|
|
39
|
+
prefix?: ReactNode;
|
|
40
|
+
/** Static trailing text, such as a unit. */
|
|
41
|
+
suffix?: ReactNode;
|
|
42
|
+
}>;
|
|
43
|
+
export type TextFieldProps = TextFieldBaseProps & TextFieldClearProps & TextFieldCopyProps;
|
|
44
|
+
/**
|
|
45
|
+
* A labelled text field: label, a bordered group holding the control with its
|
|
46
|
+
* optional icon, affixes, pending spinner, clear and copy buttons, then the
|
|
47
|
+
* counter, description and error. Assembled from `TextInput`'s parts.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* <TextField
|
|
51
|
+
* label="Name"
|
|
52
|
+
* optionalLabel="optional"
|
|
53
|
+
* value={name}
|
|
54
|
+
* onValueChange={setName}
|
|
55
|
+
* />
|
|
56
|
+
*/
|
|
57
|
+
export declare const TextField: ({ label, labelHidden, description, errors, requiredness, optionalLabel, icon, prefix, suffix, clearable, clearLabel, copyable, copyLabel, copiedLabel, copyFailedLabel, value, onValueChange, disabled, readOnly, dirty, touched, pending, maxLength, state, className, ...inputProps }: TextFieldProps) => ReactNode;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { Icon } from "../icon/icon.js";
|
|
2
|
+
import { TextInput } from "./text-input.js";
|
|
3
|
+
import text_field_module_default from "./text-field.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/components/text-field/text-field.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A labelled text field: label, a bordered group holding the control with its
|
|
9
|
+
* optional icon, affixes, pending spinner, clear and copy buttons, then the
|
|
10
|
+
* counter, description and error. Assembled from `TextInput`'s parts.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <TextField
|
|
14
|
+
* label="Name"
|
|
15
|
+
* optionalLabel="optional"
|
|
16
|
+
* value={name}
|
|
17
|
+
* onValueChange={setName}
|
|
18
|
+
* />
|
|
19
|
+
*/
|
|
20
|
+
var TextField = (t0) => {
|
|
21
|
+
const $ = c(75);
|
|
22
|
+
let className;
|
|
23
|
+
let clearLabel;
|
|
24
|
+
let clearable;
|
|
25
|
+
let copiedLabel;
|
|
26
|
+
let copyFailedLabel;
|
|
27
|
+
let copyLabel;
|
|
28
|
+
let copyable;
|
|
29
|
+
let description;
|
|
30
|
+
let dirty;
|
|
31
|
+
let disabled;
|
|
32
|
+
let errors;
|
|
33
|
+
let icon;
|
|
34
|
+
let inputProps;
|
|
35
|
+
let label;
|
|
36
|
+
let maxLength;
|
|
37
|
+
let onValueChange;
|
|
38
|
+
let optionalLabel;
|
|
39
|
+
let pending;
|
|
40
|
+
let prefix;
|
|
41
|
+
let readOnly;
|
|
42
|
+
let requiredness;
|
|
43
|
+
let state;
|
|
44
|
+
let suffix;
|
|
45
|
+
let t1;
|
|
46
|
+
let touched;
|
|
47
|
+
let value;
|
|
48
|
+
if ($[0] !== t0) {
|
|
49
|
+
({label, labelHidden: t1, description, errors, requiredness, optionalLabel, icon, prefix, suffix, clearable, clearLabel, copyable, copyLabel, copiedLabel, copyFailedLabel, value, onValueChange, disabled, readOnly, dirty, touched, pending, maxLength, state, className, ...inputProps} = t0);
|
|
50
|
+
$[0] = t0;
|
|
51
|
+
$[1] = className;
|
|
52
|
+
$[2] = clearLabel;
|
|
53
|
+
$[3] = clearable;
|
|
54
|
+
$[4] = copiedLabel;
|
|
55
|
+
$[5] = copyFailedLabel;
|
|
56
|
+
$[6] = copyLabel;
|
|
57
|
+
$[7] = copyable;
|
|
58
|
+
$[8] = description;
|
|
59
|
+
$[9] = dirty;
|
|
60
|
+
$[10] = disabled;
|
|
61
|
+
$[11] = errors;
|
|
62
|
+
$[12] = icon;
|
|
63
|
+
$[13] = inputProps;
|
|
64
|
+
$[14] = label;
|
|
65
|
+
$[15] = maxLength;
|
|
66
|
+
$[16] = onValueChange;
|
|
67
|
+
$[17] = optionalLabel;
|
|
68
|
+
$[18] = pending;
|
|
69
|
+
$[19] = prefix;
|
|
70
|
+
$[20] = readOnly;
|
|
71
|
+
$[21] = requiredness;
|
|
72
|
+
$[22] = state;
|
|
73
|
+
$[23] = suffix;
|
|
74
|
+
$[24] = t1;
|
|
75
|
+
$[25] = touched;
|
|
76
|
+
$[26] = value;
|
|
77
|
+
} else {
|
|
78
|
+
className = $[1];
|
|
79
|
+
clearLabel = $[2];
|
|
80
|
+
clearable = $[3];
|
|
81
|
+
copiedLabel = $[4];
|
|
82
|
+
copyFailedLabel = $[5];
|
|
83
|
+
copyLabel = $[6];
|
|
84
|
+
copyable = $[7];
|
|
85
|
+
description = $[8];
|
|
86
|
+
dirty = $[9];
|
|
87
|
+
disabled = $[10];
|
|
88
|
+
errors = $[11];
|
|
89
|
+
icon = $[12];
|
|
90
|
+
inputProps = $[13];
|
|
91
|
+
label = $[14];
|
|
92
|
+
maxLength = $[15];
|
|
93
|
+
onValueChange = $[16];
|
|
94
|
+
optionalLabel = $[17];
|
|
95
|
+
pending = $[18];
|
|
96
|
+
prefix = $[19];
|
|
97
|
+
readOnly = $[20];
|
|
98
|
+
requiredness = $[21];
|
|
99
|
+
state = $[22];
|
|
100
|
+
suffix = $[23];
|
|
101
|
+
t1 = $[24];
|
|
102
|
+
touched = $[25];
|
|
103
|
+
value = $[26];
|
|
104
|
+
}
|
|
105
|
+
const t2 = (t1 === void 0 ? false : t1) ? text_field_module_default.visuallyHidden : void 0;
|
|
106
|
+
let t3;
|
|
107
|
+
if ($[27] !== label || $[28] !== t2) {
|
|
108
|
+
t3 = /* @__PURE__ */ jsx(TextInput.Label, {
|
|
109
|
+
className: t2,
|
|
110
|
+
children: label
|
|
111
|
+
});
|
|
112
|
+
$[27] = label;
|
|
113
|
+
$[28] = t2;
|
|
114
|
+
$[29] = t3;
|
|
115
|
+
} else t3 = $[29];
|
|
116
|
+
let t4;
|
|
117
|
+
if ($[30] !== icon) {
|
|
118
|
+
t4 = icon !== void 0 && /* @__PURE__ */ jsx(TextInput.Inlay, { children: /* @__PURE__ */ jsx(Icon, {
|
|
119
|
+
svg: icon,
|
|
120
|
+
label: ""
|
|
121
|
+
}) });
|
|
122
|
+
$[30] = icon;
|
|
123
|
+
$[31] = t4;
|
|
124
|
+
} else t4 = $[31];
|
|
125
|
+
let t5;
|
|
126
|
+
if ($[32] !== prefix) {
|
|
127
|
+
t5 = prefix !== void 0 && /* @__PURE__ */ jsx(TextInput.Affix, { children: prefix });
|
|
128
|
+
$[32] = prefix;
|
|
129
|
+
$[33] = t5;
|
|
130
|
+
} else t5 = $[33];
|
|
131
|
+
let t6;
|
|
132
|
+
if ($[34] !== inputProps) {
|
|
133
|
+
t6 = /* @__PURE__ */ jsx(TextInput.Input, { ...inputProps });
|
|
134
|
+
$[34] = inputProps;
|
|
135
|
+
$[35] = t6;
|
|
136
|
+
} else t6 = $[35];
|
|
137
|
+
let t7;
|
|
138
|
+
if ($[36] !== suffix) {
|
|
139
|
+
t7 = suffix !== void 0 && /* @__PURE__ */ jsx(TextInput.Affix, { children: suffix });
|
|
140
|
+
$[36] = suffix;
|
|
141
|
+
$[37] = t7;
|
|
142
|
+
} else t7 = $[37];
|
|
143
|
+
let t8;
|
|
144
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
145
|
+
t8 = /* @__PURE__ */ jsx(TextInput.Pending, {});
|
|
146
|
+
$[38] = t8;
|
|
147
|
+
} else t8 = $[38];
|
|
148
|
+
let t9;
|
|
149
|
+
if ($[39] !== clearLabel || $[40] !== clearable) {
|
|
150
|
+
t9 = clearable === true && /* @__PURE__ */ jsx(TextInput.Clear, { label: clearLabel });
|
|
151
|
+
$[39] = clearLabel;
|
|
152
|
+
$[40] = clearable;
|
|
153
|
+
$[41] = t9;
|
|
154
|
+
} else t9 = $[41];
|
|
155
|
+
let t10;
|
|
156
|
+
if ($[42] !== copiedLabel || $[43] !== copyFailedLabel || $[44] !== copyLabel || $[45] !== copyable) {
|
|
157
|
+
t10 = copyable === true && /* @__PURE__ */ jsx(TextInput.Copy, {
|
|
158
|
+
label: copyLabel,
|
|
159
|
+
copiedLabel,
|
|
160
|
+
failedLabel: copyFailedLabel
|
|
161
|
+
});
|
|
162
|
+
$[42] = copiedLabel;
|
|
163
|
+
$[43] = copyFailedLabel;
|
|
164
|
+
$[44] = copyLabel;
|
|
165
|
+
$[45] = copyable;
|
|
166
|
+
$[46] = t10;
|
|
167
|
+
} else t10 = $[46];
|
|
168
|
+
let t11;
|
|
169
|
+
if ($[47] !== t10 || $[48] !== t4 || $[49] !== t5 || $[50] !== t6 || $[51] !== t7 || $[52] !== t9) {
|
|
170
|
+
t11 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
|
|
171
|
+
t4,
|
|
172
|
+
t5,
|
|
173
|
+
t6,
|
|
174
|
+
t7,
|
|
175
|
+
t8,
|
|
176
|
+
t9,
|
|
177
|
+
t10
|
|
178
|
+
] });
|
|
179
|
+
$[47] = t10;
|
|
180
|
+
$[48] = t4;
|
|
181
|
+
$[49] = t5;
|
|
182
|
+
$[50] = t6;
|
|
183
|
+
$[51] = t7;
|
|
184
|
+
$[52] = t9;
|
|
185
|
+
$[53] = t11;
|
|
186
|
+
} else t11 = $[53];
|
|
187
|
+
let t12;
|
|
188
|
+
if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
|
|
189
|
+
t12 = /* @__PURE__ */ jsx(TextInput.Counter, {});
|
|
190
|
+
$[54] = t12;
|
|
191
|
+
} else t12 = $[54];
|
|
192
|
+
let t13;
|
|
193
|
+
if ($[55] !== description) {
|
|
194
|
+
t13 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
|
|
195
|
+
$[55] = description;
|
|
196
|
+
$[56] = t13;
|
|
197
|
+
} else t13 = $[56];
|
|
198
|
+
let t14;
|
|
199
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
200
|
+
t14 = /* @__PURE__ */ jsx(TextInput.Error, {});
|
|
201
|
+
$[57] = t14;
|
|
202
|
+
} else t14 = $[57];
|
|
203
|
+
let t15;
|
|
204
|
+
if ($[58] !== className || $[59] !== dirty || $[60] !== disabled || $[61] !== errors || $[62] !== maxLength || $[63] !== onValueChange || $[64] !== optionalLabel || $[65] !== pending || $[66] !== readOnly || $[67] !== requiredness || $[68] !== state || $[69] !== t11 || $[70] !== t13 || $[71] !== t3 || $[72] !== touched || $[73] !== value) {
|
|
205
|
+
t15 = /* @__PURE__ */ jsxs(TextInput.Root, {
|
|
206
|
+
value,
|
|
207
|
+
onValueChange,
|
|
208
|
+
disabled,
|
|
209
|
+
readOnly,
|
|
210
|
+
requiredness,
|
|
211
|
+
optionalLabel,
|
|
212
|
+
errors,
|
|
213
|
+
dirty,
|
|
214
|
+
touched,
|
|
215
|
+
pending,
|
|
216
|
+
maxLength,
|
|
217
|
+
state,
|
|
218
|
+
className,
|
|
219
|
+
children: [
|
|
220
|
+
t3,
|
|
221
|
+
t11,
|
|
222
|
+
t12,
|
|
223
|
+
t13,
|
|
224
|
+
t14
|
|
225
|
+
]
|
|
226
|
+
});
|
|
227
|
+
$[58] = className;
|
|
228
|
+
$[59] = dirty;
|
|
229
|
+
$[60] = disabled;
|
|
230
|
+
$[61] = errors;
|
|
231
|
+
$[62] = maxLength;
|
|
232
|
+
$[63] = onValueChange;
|
|
233
|
+
$[64] = optionalLabel;
|
|
234
|
+
$[65] = pending;
|
|
235
|
+
$[66] = readOnly;
|
|
236
|
+
$[67] = requiredness;
|
|
237
|
+
$[68] = state;
|
|
238
|
+
$[69] = t11;
|
|
239
|
+
$[70] = t13;
|
|
240
|
+
$[71] = t3;
|
|
241
|
+
$[72] = touched;
|
|
242
|
+
$[73] = value;
|
|
243
|
+
$[74] = t15;
|
|
244
|
+
} else t15 = $[74];
|
|
245
|
+
return t15;
|
|
246
|
+
};
|
|
247
|
+
export { TextField };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './text-field.css';// src/components/text-field/text-field.module.scss
|
|
2
|
+
var root = "_root_1kpis_3";
|
|
3
|
+
var group = "_group_1kpis_6";
|
|
4
|
+
var control = "_control_1kpis_71";
|
|
5
|
+
var bar = "_bar_1kpis_94";
|
|
6
|
+
var inlay = "_inlay_1kpis_104";
|
|
7
|
+
var action = "_action_1kpis_115";
|
|
8
|
+
var copyStatus = "_copyStatus_1kpis_131";
|
|
9
|
+
var counter = "_counter_1kpis_139";
|
|
10
|
+
var visuallyHidden = "_visuallyHidden_1kpis_163";
|
|
11
|
+
var text_field_module_default = {
|
|
12
|
+
root,
|
|
13
|
+
group,
|
|
14
|
+
control,
|
|
15
|
+
bar,
|
|
16
|
+
inlay,
|
|
17
|
+
action,
|
|
18
|
+
copyStatus,
|
|
19
|
+
counter,
|
|
20
|
+
visuallyHidden
|
|
21
|
+
};
|
|
22
|
+
export { action, bar, control, copyStatus, counter, text_field_module_default as default, group, inlay, root, visuallyHidden };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Context } from "react";
|
|
2
|
+
import type { FieldState } from "../field/index.ts";
|
|
3
|
+
/** The element a text input's parts read from and return focus to. */
|
|
4
|
+
export type TextInputControl = HTMLInputElement | HTMLTextAreaElement;
|
|
5
|
+
/** What a text input's `Root` hands its parts. */
|
|
6
|
+
export type TextInputContextValue = Readonly<{
|
|
7
|
+
/** Projected by `Root`; every part reads it, none of them own it. */
|
|
8
|
+
state: FieldState;
|
|
9
|
+
value: string;
|
|
10
|
+
setValue: (value: string) => void;
|
|
11
|
+
/** Ref callback the control part hands its element to. */
|
|
12
|
+
setControl: (control: TextInputControl | null) => void;
|
|
13
|
+
/** Returns focus to the control, after a part such as `Clear` acts. */
|
|
14
|
+
focusControl: () => void;
|
|
15
|
+
/** Focuses the control and selects its text, for the user to copy by hand. */
|
|
16
|
+
selectControl: () => void;
|
|
17
|
+
maxLength: number | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
/** The context a text input's `Root` provides. */
|
|
20
|
+
export declare const TextInputContext: Context<TextInputContextValue | null>;
|
|
21
|
+
/**
|
|
22
|
+
* The surrounding text input's projected state and value, for a part of its own
|
|
23
|
+
* such as `Textarea`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const { value, setValue } = useTextInputContext();
|
|
27
|
+
*/
|
|
28
|
+
export declare const useTextInputContext: () => TextInputContextValue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRequiredContext } from "../../lib/use-required-context.js";
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
// src/components/text-field/text-input-context.ts
|
|
4
|
+
/** The context a text input's `Root` provides. */
|
|
5
|
+
var TextInputContext = createContext(null);
|
|
6
|
+
/**
|
|
7
|
+
* The surrounding text input's projected state and value, for a part of its own
|
|
8
|
+
* such as `Textarea`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const { value, setValue } = useTextInputContext();
|
|
12
|
+
*/
|
|
13
|
+
var useTextInputContext = () => {
|
|
14
|
+
return useRequiredContext(TextInputContext, "Text input parts must be rendered within <TextInput.Root>.");
|
|
15
|
+
};
|
|
16
|
+
export { TextInputContext, useTextInputContext };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type InputProps as BaseInputProps } from "@base-ui/react/input";
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
import { Field, type FieldProps, type FieldState } from "../field/index.ts";
|
|
4
|
+
import { InputError, type InputErrorProps, InputLabel, type InputLabelProps, InputPending, type InputPendingProps } from "../field/input-parts.tsx";
|
|
5
|
+
export type TextInputRootProps = Omit<FieldProps, "label" | "description"> & Readonly<{
|
|
6
|
+
value: string;
|
|
7
|
+
onValueChange: (value: string) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
/** Advisory maximum, shown by `Counter`. The control does not truncate. */
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
/** States no prop here owns, projected over the ones that do. */
|
|
13
|
+
state?: FieldState;
|
|
14
|
+
className?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}>;
|
|
17
|
+
declare const TextInputRoot: ({ value, onValueChange, disabled, readOnly, requiredness, optionalLabel, errors, dirty, touched, pending, maxLength, state, className, children, }: TextInputRootProps) => ReactNode;
|
|
18
|
+
export type TextInputLabelProps = InputLabelProps;
|
|
19
|
+
declare const TextInputGroup: ({ className, children, ...props }: ComponentProps<"div">) => ReactNode;
|
|
20
|
+
declare const TextInputBar: ({ className, ...props }: ComponentProps<"div">) => ReactNode;
|
|
21
|
+
declare const TextInputInlay: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
22
|
+
declare const TextInputAffix: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
23
|
+
export type TextInputInputProps = Omit<BaseInputProps, "value" | "defaultValue" | "onValueChange">;
|
|
24
|
+
declare const TextInputInput: ({ type, className, ...props }: TextInputInputProps) => ReactNode;
|
|
25
|
+
export type TextInputClearProps = Readonly<{
|
|
26
|
+
/** Accessible name and tooltip hint, such as "Clear". */
|
|
27
|
+
label: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}>;
|
|
30
|
+
declare const TextInputClear: ({ label, className, }: TextInputClearProps) => ReactNode;
|
|
31
|
+
export type TextInputCopyProps = Readonly<{
|
|
32
|
+
/** Accessible name and tooltip hint, such as "Copy". */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Accessible name and announcement while the confirmation shows, such as "Copied". */
|
|
35
|
+
copiedLabel: string;
|
|
36
|
+
/** Accessible name and announcement once copying failed and the text is selected instead. */
|
|
37
|
+
failedLabel: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}>;
|
|
40
|
+
declare const TextInputCopy: ({ label, copiedLabel, failedLabel, className, }: TextInputCopyProps) => ReactNode;
|
|
41
|
+
declare const TextInputCounter: ({ className, ...props }: ComponentProps<"span">) => ReactNode;
|
|
42
|
+
export type TextInputPendingProps = InputPendingProps;
|
|
43
|
+
export type TextInputErrorProps = InputErrorProps;
|
|
44
|
+
/** The parts of a text input. */
|
|
45
|
+
export type TextInputParts = Readonly<{
|
|
46
|
+
Root: typeof TextInputRoot;
|
|
47
|
+
Label: typeof InputLabel;
|
|
48
|
+
Group: typeof TextInputGroup;
|
|
49
|
+
Bar: typeof TextInputBar;
|
|
50
|
+
Inlay: typeof TextInputInlay;
|
|
51
|
+
Affix: typeof TextInputAffix;
|
|
52
|
+
Input: typeof TextInputInput;
|
|
53
|
+
Clear: typeof TextInputClear;
|
|
54
|
+
Copy: typeof TextInputCopy;
|
|
55
|
+
Counter: typeof TextInputCounter;
|
|
56
|
+
Pending: typeof InputPending;
|
|
57
|
+
Description: typeof Field.Description;
|
|
58
|
+
Error: typeof InputError;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* The parts of a text input: the field frame, a group carrying the border and
|
|
62
|
+
* its inlays, and the bare control inside it. A `Bar` is a strip of inlays along
|
|
63
|
+
* the bottom edge of the group, for a control the inlays cannot sit beside. For
|
|
64
|
+
* the ordinary case, use the `TextField` shorthand, which is assembled from
|
|
65
|
+
* exactly these parts. An `Affix` is decoration, so its meaning belongs in the
|
|
66
|
+
* label or description too. `Error` renders the errors `Root` was given.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* <TextInput.Root value={value} onValueChange={setValue} errors={errors} optionalLabel="optional">
|
|
70
|
+
* <TextInput.Label>Email</TextInput.Label>
|
|
71
|
+
* <TextInput.Group>
|
|
72
|
+
* <TextInput.Input type="email" />
|
|
73
|
+
* <TextInput.Clear label="Clear" />
|
|
74
|
+
* </TextInput.Group>
|
|
75
|
+
* <TextInput.Error />
|
|
76
|
+
* </TextInput.Root>
|
|
77
|
+
*/
|
|
78
|
+
export declare const TextInput: TextInputParts;
|
|
79
|
+
export {};
|