@und-ui/react 0.1.0 → 0.2.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/dist/generated/index.d.ts +77 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +77 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/jsx.d.ts +394 -2
- package/dist/generated/jsx.d.ts.map +1 -1
- package/dist/generated/und-app-shell.d.ts +24 -0
- package/dist/generated/und-app-shell.d.ts.map +1 -0
- package/dist/generated/und-app-shell.js +16 -0
- package/dist/generated/und-app-shell.js.map +1 -0
- package/dist/generated/und-aspect-ratio.d.ts +13 -0
- package/dist/generated/und-aspect-ratio.d.ts.map +1 -0
- package/dist/generated/und-aspect-ratio.js +11 -0
- package/dist/generated/und-aspect-ratio.js.map +1 -0
- package/dist/generated/und-banner.d.ts +24 -0
- package/dist/generated/und-banner.d.ts.map +1 -0
- package/dist/generated/und-banner.js +16 -0
- package/dist/generated/und-banner.js.map +1 -0
- package/dist/generated/und-blockquote.d.ts +11 -0
- package/dist/generated/und-blockquote.d.ts.map +1 -0
- package/dist/generated/und-blockquote.js +11 -0
- package/dist/generated/und-blockquote.js.map +1 -0
- package/dist/generated/und-bottom-sheet.d.ts +52 -0
- package/dist/generated/und-bottom-sheet.d.ts.map +1 -0
- package/dist/generated/und-bottom-sheet.js +19 -0
- package/dist/generated/und-bottom-sheet.js.map +1 -0
- package/dist/generated/und-button-group.d.ts +15 -0
- package/dist/generated/und-button-group.d.ts.map +1 -0
- package/dist/generated/und-button-group.js +11 -0
- package/dist/generated/und-button-group.js.map +1 -0
- package/dist/generated/und-calendar.d.ts +41 -0
- package/dist/generated/und-calendar.d.ts.map +1 -0
- package/dist/generated/und-calendar.js +17 -0
- package/dist/generated/und-calendar.js.map +1 -0
- package/dist/generated/und-carousel.d.ts +36 -0
- package/dist/generated/und-carousel.d.ts.map +1 -0
- package/dist/generated/und-carousel.js +16 -0
- package/dist/generated/und-carousel.js.map +1 -0
- package/dist/generated/und-center.d.ts +15 -0
- package/dist/generated/und-center.d.ts.map +1 -0
- package/dist/generated/und-center.js +11 -0
- package/dist/generated/und-center.js.map +1 -0
- package/dist/generated/und-chat-composer.d.ts +38 -0
- package/dist/generated/und-chat-composer.d.ts.map +1 -0
- package/dist/generated/und-chat-composer.js +17 -0
- package/dist/generated/und-chat-composer.js.map +1 -0
- package/dist/generated/und-chat-layout.d.ts +22 -0
- package/dist/generated/und-chat-layout.d.ts.map +1 -0
- package/dist/generated/und-chat-layout.js +16 -0
- package/dist/generated/und-chat-layout.js.map +1 -0
- package/dist/generated/und-chat-message.d.ts +39 -0
- package/dist/generated/und-chat-message.d.ts.map +1 -0
- package/dist/generated/und-chat-message.js +17 -0
- package/dist/generated/und-chat-message.js.map +1 -0
- package/dist/generated/und-checkbox-list.d.ts +26 -0
- package/dist/generated/und-checkbox-list.d.ts.map +1 -0
- package/dist/generated/und-checkbox-list.js +22 -0
- package/dist/generated/und-checkbox-list.js.map +1 -0
- package/dist/generated/und-citation.d.ts +19 -0
- package/dist/generated/und-citation.d.ts.map +1 -0
- package/dist/generated/und-citation.js +11 -0
- package/dist/generated/und-citation.js.map +1 -0
- package/dist/generated/und-clickable-card.d.ts +21 -0
- package/dist/generated/und-clickable-card.d.ts.map +1 -0
- package/dist/generated/und-clickable-card.js +11 -0
- package/dist/generated/und-clickable-card.js.map +1 -0
- package/dist/generated/und-code-block.d.ts +38 -0
- package/dist/generated/und-code-block.d.ts.map +1 -0
- package/dist/generated/und-code-block.js +17 -0
- package/dist/generated/und-code-block.js.map +1 -0
- package/dist/generated/und-code.d.ts +9 -0
- package/dist/generated/und-code.d.ts.map +1 -0
- package/dist/generated/und-code.js +11 -0
- package/dist/generated/und-code.js.map +1 -0
- package/dist/generated/und-collapsible.d.ts +16 -0
- package/dist/generated/und-collapsible.d.ts.map +1 -0
- package/dist/generated/und-collapsible.js +16 -0
- package/dist/generated/und-collapsible.js.map +1 -0
- package/dist/generated/und-command-palette.d.ts +66 -0
- package/dist/generated/und-command-palette.d.ts.map +1 -0
- package/dist/generated/und-command-palette.js +20 -0
- package/dist/generated/und-command-palette.js.map +1 -0
- package/dist/generated/und-context-menu.d.ts +29 -0
- package/dist/generated/und-context-menu.d.ts.map +1 -0
- package/dist/generated/und-context-menu.js +17 -0
- package/dist/generated/und-context-menu.js.map +1 -0
- package/dist/generated/und-date-input.d.ts +58 -0
- package/dist/generated/und-date-input.d.ts.map +1 -0
- package/dist/generated/und-date-input.js +24 -0
- package/dist/generated/und-date-input.js.map +1 -0
- package/dist/generated/und-date-range-input.d.ts +59 -0
- package/dist/generated/und-date-range-input.d.ts.map +1 -0
- package/dist/generated/und-date-range-input.js +18 -0
- package/dist/generated/und-date-range-input.js.map +1 -0
- package/dist/generated/und-date-time-input.d.ts +46 -0
- package/dist/generated/und-date-time-input.d.ts.map +1 -0
- package/dist/generated/und-date-time-input.js +16 -0
- package/dist/generated/und-date-time-input.js.map +1 -0
- package/dist/generated/und-empty-state.d.ts +13 -0
- package/dist/generated/und-empty-state.d.ts.map +1 -0
- package/dist/generated/und-empty-state.js +11 -0
- package/dist/generated/und-empty-state.js.map +1 -0
- package/dist/generated/und-file-input.d.ts +36 -0
- package/dist/generated/und-file-input.d.ts.map +1 -0
- package/dist/generated/und-file-input.js +17 -0
- package/dist/generated/und-file-input.js.map +1 -0
- package/dist/generated/und-form-layout.d.ts +11 -0
- package/dist/generated/und-form-layout.d.ts.map +1 -0
- package/dist/generated/und-form-layout.js +11 -0
- package/dist/generated/und-form-layout.js.map +1 -0
- package/dist/generated/und-grid-item.d.ts +13 -0
- package/dist/generated/und-grid-item.d.ts.map +1 -0
- package/dist/generated/und-grid-item.js +11 -0
- package/dist/generated/und-grid-item.js.map +1 -0
- package/dist/generated/und-grid.d.ts +19 -0
- package/dist/generated/und-grid.d.ts.map +1 -0
- package/dist/generated/und-grid.js +11 -0
- package/dist/generated/und-grid.js.map +1 -0
- package/dist/generated/und-heading.d.ts +15 -0
- package/dist/generated/und-heading.d.ts.map +1 -0
- package/dist/generated/und-heading.js +11 -0
- package/dist/generated/und-heading.js.map +1 -0
- package/dist/generated/und-hover-card.d.ts +31 -0
- package/dist/generated/und-hover-card.d.ts.map +1 -0
- package/dist/generated/und-hover-card.js +16 -0
- package/dist/generated/und-hover-card.js.map +1 -0
- package/dist/generated/und-icon.d.ts +19 -0
- package/dist/generated/und-icon.d.ts.map +1 -0
- package/dist/generated/und-icon.js +11 -0
- package/dist/generated/und-icon.js.map +1 -0
- package/dist/generated/und-info-tip.d.ts +21 -0
- package/dist/generated/und-info-tip.d.ts.map +1 -0
- package/dist/generated/und-info-tip.js +16 -0
- package/dist/generated/und-info-tip.js.map +1 -0
- package/dist/generated/und-input-group.d.ts +58 -0
- package/dist/generated/und-input-group.d.ts.map +1 -0
- package/dist/generated/und-input-group.js +23 -0
- package/dist/generated/und-input-group.js.map +1 -0
- package/dist/generated/und-kbd.d.ts +9 -0
- package/dist/generated/und-kbd.d.ts.map +1 -0
- package/dist/generated/und-kbd.js +11 -0
- package/dist/generated/und-kbd.js.map +1 -0
- package/dist/generated/und-lightbox.d.ts +61 -0
- package/dist/generated/und-lightbox.d.ts.map +1 -0
- package/dist/generated/und-lightbox.js +19 -0
- package/dist/generated/und-lightbox.js.map +1 -0
- package/dist/generated/und-list-item.d.ts +10 -0
- package/dist/generated/und-list-item.d.ts.map +1 -0
- package/dist/generated/und-list-item.js +11 -0
- package/dist/generated/und-list-item.js.map +1 -0
- package/dist/generated/und-list.d.ts +13 -0
- package/dist/generated/und-list.d.ts.map +1 -0
- package/dist/generated/und-list.js +11 -0
- package/dist/generated/und-list.js.map +1 -0
- package/dist/generated/und-markdown.d.ts +23 -0
- package/dist/generated/und-markdown.d.ts.map +1 -0
- package/dist/generated/und-markdown.js +11 -0
- package/dist/generated/und-markdown.js.map +1 -0
- package/dist/generated/und-metadata-item.d.ts +11 -0
- package/dist/generated/und-metadata-item.d.ts.map +1 -0
- package/dist/generated/und-metadata-item.js +11 -0
- package/dist/generated/und-metadata-item.js.map +1 -0
- package/dist/generated/und-metadata-list.d.ts +13 -0
- package/dist/generated/und-metadata-list.d.ts.map +1 -0
- package/dist/generated/und-metadata-list.js +11 -0
- package/dist/generated/und-metadata-list.js.map +1 -0
- package/dist/generated/und-mobile-nav.d.ts +22 -0
- package/dist/generated/und-mobile-nav.d.ts.map +1 -0
- package/dist/generated/und-mobile-nav.js +16 -0
- package/dist/generated/und-mobile-nav.js.map +1 -0
- package/dist/generated/und-more-menu.d.ts +27 -0
- package/dist/generated/und-more-menu.d.ts.map +1 -0
- package/dist/generated/und-more-menu.js +17 -0
- package/dist/generated/und-more-menu.js.map +1 -0
- package/dist/generated/und-multi-select.d.ts +46 -0
- package/dist/generated/und-multi-select.d.ts.map +1 -0
- package/dist/generated/und-multi-select.js +24 -0
- package/dist/generated/und-multi-select.js.map +1 -0
- package/dist/generated/und-number-input.d.ts +60 -0
- package/dist/generated/und-number-input.d.ts.map +1 -0
- package/dist/generated/und-number-input.js +24 -0
- package/dist/generated/und-number-input.js.map +1 -0
- package/dist/generated/und-outline.d.ts +28 -0
- package/dist/generated/und-outline.d.ts.map +1 -0
- package/dist/generated/und-outline.js +16 -0
- package/dist/generated/und-outline.js.map +1 -0
- package/dist/generated/und-overflow-list.d.ts +16 -0
- package/dist/generated/und-overflow-list.d.ts.map +1 -0
- package/dist/generated/und-overflow-list.js +16 -0
- package/dist/generated/und-overflow-list.js.map +1 -0
- package/dist/generated/und-radio-list.d.ts +32 -0
- package/dist/generated/und-radio-list.d.ts.map +1 -0
- package/dist/generated/und-radio-list.js +23 -0
- package/dist/generated/und-radio-list.js.map +1 -0
- package/dist/generated/und-resize-handle.d.ts +30 -0
- package/dist/generated/und-resize-handle.d.ts.map +1 -0
- package/dist/generated/und-resize-handle.js +16 -0
- package/dist/generated/und-resize-handle.js.map +1 -0
- package/dist/generated/und-scroll-area.d.ts +13 -0
- package/dist/generated/und-scroll-area.d.ts.map +1 -0
- package/dist/generated/und-scroll-area.js +11 -0
- package/dist/generated/und-scroll-area.js.map +1 -0
- package/dist/generated/und-section.d.ts +15 -0
- package/dist/generated/und-section.d.ts.map +1 -0
- package/dist/generated/und-section.js +11 -0
- package/dist/generated/und-section.js.map +1 -0
- package/dist/generated/und-segmented-control-item.d.ts +19 -0
- package/dist/generated/und-segmented-control-item.d.ts.map +1 -0
- package/dist/generated/und-segmented-control-item.js +11 -0
- package/dist/generated/und-segmented-control-item.js.map +1 -0
- package/dist/generated/und-segmented-control.d.ts +32 -0
- package/dist/generated/und-segmented-control.d.ts.map +1 -0
- package/dist/generated/und-segmented-control.js +23 -0
- package/dist/generated/und-segmented-control.js.map +1 -0
- package/dist/generated/und-selectable-card.d.ts +36 -0
- package/dist/generated/und-selectable-card.d.ts.map +1 -0
- package/dist/generated/und-selectable-card.js +23 -0
- package/dist/generated/und-selectable-card.js.map +1 -0
- package/dist/generated/und-side-nav-heading.d.ts +11 -0
- package/dist/generated/und-side-nav-heading.d.ts.map +1 -0
- package/dist/generated/und-side-nav-heading.js +11 -0
- package/dist/generated/und-side-nav-heading.js.map +1 -0
- package/dist/generated/und-side-nav-item.d.ts +21 -0
- package/dist/generated/und-side-nav-item.d.ts.map +1 -0
- package/dist/generated/und-side-nav-item.js +11 -0
- package/dist/generated/und-side-nav-item.js.map +1 -0
- package/dist/generated/und-side-nav-section.d.ts +18 -0
- package/dist/generated/und-side-nav-section.d.ts.map +1 -0
- package/dist/generated/und-side-nav-section.js +16 -0
- package/dist/generated/und-side-nav-section.js.map +1 -0
- package/dist/generated/und-side-nav.d.ts +22 -0
- package/dist/generated/und-side-nav.d.ts.map +1 -0
- package/dist/generated/und-side-nav.js +16 -0
- package/dist/generated/und-side-nav.js.map +1 -0
- package/dist/generated/und-stack.d.ts +21 -0
- package/dist/generated/und-stack.d.ts.map +1 -0
- package/dist/generated/und-stack.js +11 -0
- package/dist/generated/und-stack.js.map +1 -0
- package/dist/generated/und-status-dot.d.ts +13 -0
- package/dist/generated/und-status-dot.d.ts.map +1 -0
- package/dist/generated/und-status-dot.js +11 -0
- package/dist/generated/und-status-dot.js.map +1 -0
- package/dist/generated/und-step.d.ts +22 -0
- package/dist/generated/und-step.d.ts.map +1 -0
- package/dist/generated/und-step.js +11 -0
- package/dist/generated/und-step.js.map +1 -0
- package/dist/generated/und-stepper.d.ts +22 -0
- package/dist/generated/und-stepper.d.ts.map +1 -0
- package/dist/generated/und-stepper.js +16 -0
- package/dist/generated/und-stepper.js.map +1 -0
- package/dist/generated/und-tab-menu.d.ts +13 -0
- package/dist/generated/und-tab-menu.d.ts.map +1 -0
- package/dist/generated/und-tab-menu.js +11 -0
- package/dist/generated/und-tab-menu.js.map +1 -0
- package/dist/generated/und-table.d.ts +16 -2
- package/dist/generated/und-table.d.ts.map +1 -1
- package/dist/generated/und-table.js +5 -2
- package/dist/generated/und-table.js.map +1 -1
- package/dist/generated/und-text.d.ts +19 -0
- package/dist/generated/und-text.d.ts.map +1 -0
- package/dist/generated/und-text.js +11 -0
- package/dist/generated/und-text.js.map +1 -0
- package/dist/generated/und-thumbnail.d.ts +24 -0
- package/dist/generated/und-thumbnail.d.ts.map +1 -0
- package/dist/generated/und-thumbnail.js +17 -0
- package/dist/generated/und-thumbnail.js.map +1 -0
- package/dist/generated/und-time-input.d.ts +54 -0
- package/dist/generated/und-time-input.d.ts.map +1 -0
- package/dist/generated/und-time-input.js +24 -0
- package/dist/generated/und-time-input.js.map +1 -0
- package/dist/generated/und-timer.d.ts +26 -0
- package/dist/generated/und-timer.d.ts.map +1 -0
- package/dist/generated/und-timer.js +17 -0
- package/dist/generated/und-timer.js.map +1 -0
- package/dist/generated/und-timestamp.d.ts +27 -0
- package/dist/generated/und-timestamp.d.ts.map +1 -0
- package/dist/generated/und-timestamp.js +11 -0
- package/dist/generated/und-timestamp.js.map +1 -0
- package/dist/generated/und-toggle-button-group.d.ts +28 -0
- package/dist/generated/und-toggle-button-group.d.ts.map +1 -0
- package/dist/generated/und-toggle-button-group.js +16 -0
- package/dist/generated/und-toggle-button-group.js.map +1 -0
- package/dist/generated/und-token.d.ts +20 -0
- package/dist/generated/und-token.d.ts.map +1 -0
- package/dist/generated/und-token.js +16 -0
- package/dist/generated/und-token.js.map +1 -0
- package/dist/generated/und-tokenizer.d.ts +62 -0
- package/dist/generated/und-tokenizer.d.ts.map +1 -0
- package/dist/generated/und-tokenizer.js +25 -0
- package/dist/generated/und-tokenizer.js.map +1 -0
- package/dist/generated/und-toolbar.d.ts +13 -0
- package/dist/generated/und-toolbar.d.ts.map +1 -0
- package/dist/generated/und-toolbar.js +11 -0
- package/dist/generated/und-toolbar.js.map +1 -0
- package/dist/generated/und-top-nav-item.d.ts +13 -0
- package/dist/generated/und-top-nav-item.d.ts.map +1 -0
- package/dist/generated/und-top-nav-item.js +11 -0
- package/dist/generated/und-top-nav-item.js.map +1 -0
- package/dist/generated/und-top-nav-menu.d.ts +20 -0
- package/dist/generated/und-top-nav-menu.d.ts.map +1 -0
- package/dist/generated/und-top-nav-menu.js +16 -0
- package/dist/generated/und-top-nav-menu.js.map +1 -0
- package/dist/generated/und-top-nav.d.ts +11 -0
- package/dist/generated/und-top-nav.d.ts.map +1 -0
- package/dist/generated/und-top-nav.js +11 -0
- package/dist/generated/und-top-nav.js.map +1 -0
- package/dist/generated/und-tree-item.d.ts +32 -0
- package/dist/generated/und-tree-item.d.ts.map +1 -0
- package/dist/generated/und-tree-item.js +18 -0
- package/dist/generated/und-tree-item.js.map +1 -0
- package/dist/generated/und-tree-list.d.ts +18 -0
- package/dist/generated/und-tree-list.d.ts.map +1 -0
- package/dist/generated/und-tree-list.js +16 -0
- package/dist/generated/und-tree-list.js.map +1 -0
- package/dist/generated/und-typeahead.d.ts +58 -0
- package/dist/generated/und-typeahead.d.ts.map +1 -0
- package/dist/generated/und-typeahead.js +25 -0
- package/dist/generated/und-typeahead.js.map +1 -0
- package/package.json +6 -2
- package/src/generated/index.ts +77 -0
- package/src/generated/jsx.ts +336 -2
- package/src/generated/und-app-shell.ts +34 -0
- package/src/generated/und-aspect-ratio.ts +21 -0
- package/src/generated/und-banner.ts +36 -0
- package/src/generated/und-blockquote.ts +19 -0
- package/src/generated/und-bottom-sheet.ts +61 -0
- package/src/generated/und-button-group.ts +23 -0
- package/src/generated/und-calendar.ts +51 -0
- package/src/generated/und-carousel.ts +45 -0
- package/src/generated/und-center.ts +23 -0
- package/src/generated/und-chat-composer.ts +49 -0
- package/src/generated/und-chat-layout.ts +32 -0
- package/src/generated/und-chat-message.ts +47 -0
- package/src/generated/und-checkbox-list.ts +44 -0
- package/src/generated/und-citation.ts +27 -0
- package/src/generated/und-clickable-card.ts +29 -0
- package/src/generated/und-code-block.ts +51 -0
- package/src/generated/und-code.ts +17 -0
- package/src/generated/und-collapsible.ts +26 -0
- package/src/generated/und-command-palette.ts +74 -0
- package/src/generated/und-context-menu.ts +37 -0
- package/src/generated/und-date-input.ts +76 -0
- package/src/generated/und-date-range-input.ts +70 -0
- package/src/generated/und-date-time-input.ts +56 -0
- package/src/generated/und-empty-state.ts +21 -0
- package/src/generated/und-file-input.ts +49 -0
- package/src/generated/und-form-layout.ts +19 -0
- package/src/generated/und-grid-item.ts +21 -0
- package/src/generated/und-grid.ts +27 -0
- package/src/generated/und-heading.ts +23 -0
- package/src/generated/und-hover-card.ts +40 -0
- package/src/generated/und-icon.ts +27 -0
- package/src/generated/und-info-tip.ts +30 -0
- package/src/generated/und-input-group.ts +77 -0
- package/src/generated/und-kbd.ts +17 -0
- package/src/generated/und-lightbox.ts +71 -0
- package/src/generated/und-list-item.ts +18 -0
- package/src/generated/und-list.ts +21 -0
- package/src/generated/und-markdown.ts +31 -0
- package/src/generated/und-metadata-item.ts +19 -0
- package/src/generated/und-metadata-list.ts +21 -0
- package/src/generated/und-mobile-nav.ts +34 -0
- package/src/generated/und-more-menu.ts +35 -0
- package/src/generated/und-multi-select.ts +66 -0
- package/src/generated/und-number-input.ts +80 -0
- package/src/generated/und-outline.ts +40 -0
- package/src/generated/und-overflow-list.ts +28 -0
- package/src/generated/und-radio-list.ts +51 -0
- package/src/generated/und-resize-handle.ts +42 -0
- package/src/generated/und-scroll-area.ts +21 -0
- package/src/generated/und-section.ts +23 -0
- package/src/generated/und-segmented-control-item.ts +27 -0
- package/src/generated/und-segmented-control.ts +51 -0
- package/src/generated/und-selectable-card.ts +55 -0
- package/src/generated/und-side-nav-heading.ts +19 -0
- package/src/generated/und-side-nav-item.ts +29 -0
- package/src/generated/und-side-nav-section.ts +30 -0
- package/src/generated/und-side-nav.ts +34 -0
- package/src/generated/und-stack.ts +29 -0
- package/src/generated/und-status-dot.ts +21 -0
- package/src/generated/und-step.ts +30 -0
- package/src/generated/und-stepper.ts +34 -0
- package/src/generated/und-tab-menu.ts +21 -0
- package/src/generated/und-table.ts +20 -3
- package/src/generated/und-text.ts +27 -0
- package/src/generated/und-thumbnail.ts +37 -0
- package/src/generated/und-time-input.ts +72 -0
- package/src/generated/und-timer.ts +39 -0
- package/src/generated/und-timestamp.ts +35 -0
- package/src/generated/und-toggle-button-group.ts +40 -0
- package/src/generated/und-token.ts +32 -0
- package/src/generated/und-tokenizer.ts +81 -0
- package/src/generated/und-toolbar.ts +21 -0
- package/src/generated/und-top-nav-item.ts +21 -0
- package/src/generated/und-top-nav-menu.ts +30 -0
- package/src/generated/und-top-nav.ts +19 -0
- package/src/generated/und-tree-item.ts +42 -0
- package/src/generated/und-tree-list.ts +30 -0
- package/src/generated/und-typeahead.ts +79 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/context-menu.js';
|
|
7
|
+
import type { UndContextMenu as UndContextMenuElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndContextMenuProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndContextMenuElement>, 'htmlFor' | 'disabled' | 'label' | 'open' | 'placement' | 'onUndOpenChange' | 'onUndSelect'> {
|
|
12
|
+
/** Id of the element that opens the menu, in the same tree. Defaults to the parent element. */
|
|
13
|
+
htmlFor?: UndContextMenuElement['htmlFor'];
|
|
14
|
+
/** Leaves the browser's own context menu alone. */
|
|
15
|
+
disabled?: UndContextMenuElement['disabled'];
|
|
16
|
+
/** Accessible name of the menu. Defaults to the trigger's name. */
|
|
17
|
+
label?: UndContextMenuElement['label'];
|
|
18
|
+
/** Whether the menu is open. */
|
|
19
|
+
open?: UndContextMenuElement['open'];
|
|
20
|
+
/** Preferred position relative to the trigger; flips when there is no room. Submenus always open beside their item. */
|
|
21
|
+
placement?: UndContextMenuElement['placement'];
|
|
22
|
+
/** The menu opened or closed. */
|
|
23
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{ open: boolean }>, UndContextMenuElement>) => void;
|
|
24
|
+
/** An item was chosen (dispatched on the item, bubbles). Cancelable. */
|
|
25
|
+
onUndSelect?: (event: UndEvent<CustomEvent<{ value: string; checked: boolean }>, UndContextMenuElement>) => void;
|
|
26
|
+
ref?: Ref<UndContextMenuElement>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** A menu opened at the pointer by right-click or Shift+F10. */
|
|
30
|
+
export function UndContextMenu(props: UndContextMenuProps): ReactElement {
|
|
31
|
+
const { onUndOpenChange, onUndSelect, ...rest } = props;
|
|
32
|
+
return createElement('und-context-menu', {
|
|
33
|
+
...rest,
|
|
34
|
+
'onund-open-change': onUndOpenChange,
|
|
35
|
+
'onund-select': onUndSelect,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/date-input.js';
|
|
7
|
+
import type { UndDateInput as UndDateInputElement } from '@und-ui/core';
|
|
8
|
+
import { useControlledProp, type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndDateInputProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndDateInputElement>, 'value' | 'defaultValue' | 'min' | 'max' | 'locale' | 'format' | 'size' | 'readOnly' | 'placeholder' | 'autocomplete' | 'weekStart' | 'months' | 'isDateDisabled' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onUndChange' | 'onInput' | 'onChange'> {
|
|
12
|
+
/** The date, `YYYY-MM-DD`, or empty. */
|
|
13
|
+
value?: UndDateInputElement['value'];
|
|
14
|
+
/** Value restored on form reset (defaults to the initial `value`). */
|
|
15
|
+
defaultValue?: UndDateInputElement['defaultValue'];
|
|
16
|
+
/** Earliest allowed date, `YYYY-MM-DD`. */
|
|
17
|
+
min?: UndDateInputElement['min'];
|
|
18
|
+
/** Latest allowed date, `YYYY-MM-DD`. */
|
|
19
|
+
max?: UndDateInputElement['max'];
|
|
20
|
+
/** BCP 47 tag for the text format and the calendar. Defaults to the page language. */
|
|
21
|
+
locale?: UndDateInputElement['locale'];
|
|
22
|
+
/** `locale` shows and parses the locale order (`en-IN`: `dd/mm/yyyy`); `iso` shows `yyyy-mm-dd`. */
|
|
23
|
+
format?: UndDateInputElement['format'];
|
|
24
|
+
/** Size of the field. */
|
|
25
|
+
size?: UndDateInputElement['size'];
|
|
26
|
+
/** Makes the value read-only (the calendar button is disabled). */
|
|
27
|
+
readOnly?: UndDateInputElement['readOnly'];
|
|
28
|
+
/** Placeholder. Defaults to the format pattern, such as `dd/mm/yyyy`. */
|
|
29
|
+
placeholder?: UndDateInputElement['placeholder'];
|
|
30
|
+
/** Autofill hint, for example `bday`. Off by default. */
|
|
31
|
+
autocomplete?: UndDateInputElement['autocomplete'];
|
|
32
|
+
/** First day of the week in the calendar, 0 (Sunday) to 6. */
|
|
33
|
+
weekStart?: UndDateInputElement['weekStart'];
|
|
34
|
+
/** Months shown side by side in the calendar (1 to 3). */
|
|
35
|
+
months?: UndDateInputElement['months'];
|
|
36
|
+
/** Return `true` for a date that cannot be chosen. Receives `YYYY-MM-DD`. */
|
|
37
|
+
isDateDisabled?: UndDateInputElement['isDateDisabled'];
|
|
38
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
39
|
+
label?: UndDateInputElement['label'];
|
|
40
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
41
|
+
description?: UndDateInputElement['description'];
|
|
42
|
+
/** Error message. Setting it marks the control invalid (`aria-invalid`, `setCustomValidity`) and shows the message, prefixed with a visually hidden "Error:". Native validation messages are shown automatically after a failed submit and cleared once the value is valid. */
|
|
43
|
+
error?: UndDateInputElement['error'];
|
|
44
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
45
|
+
required?: UndDateInputElement['required'];
|
|
46
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
47
|
+
optional?: UndDateInputElement['optional'];
|
|
48
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
49
|
+
disabled?: UndDateInputElement['disabled'];
|
|
50
|
+
/** Name submitted with the form data. */
|
|
51
|
+
name?: UndDateInputElement['name'];
|
|
52
|
+
/** The date was committed (blur, Enter, or a calendar choice). `value` is `YYYY-MM-DD`, or empty. */
|
|
53
|
+
onUndChange?: (event: UndEvent<CustomEvent<{ value: string }>, UndDateInputElement>) => void;
|
|
54
|
+
/** Native input event of the text input. */
|
|
55
|
+
onInput?: (event: UndEvent<Event, UndDateInputElement>) => void;
|
|
56
|
+
/** Native change event of the text input. */
|
|
57
|
+
onChange?: (event: UndEvent<Event, UndDateInputElement>) => void;
|
|
58
|
+
ref?: Ref<UndDateInputElement>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** A text date field with a calendar popover. */
|
|
62
|
+
export function UndDateInput(props: UndDateInputProps): ReactElement {
|
|
63
|
+
const { onUndChange, onInput, onChange, ref, ...rest } = props;
|
|
64
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
65
|
+
const controlled = useControlledProp<UndDateInputElement, 'value'>('value', props.value, ref);
|
|
66
|
+
return createElement('und-date-input', {
|
|
67
|
+
...rest,
|
|
68
|
+
ref: controlled.ref,
|
|
69
|
+
'onund-change': onUndChange,
|
|
70
|
+
'oninput': (event: UndEvent<Event, UndDateInputElement>) => {
|
|
71
|
+
onInput?.(event);
|
|
72
|
+
controlled.settle();
|
|
73
|
+
},
|
|
74
|
+
'onchange': onChange,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/date-range-input.js';
|
|
7
|
+
import type { UndDateRangeInput as UndDateRangeInputElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndDateRangeInputProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndDateRangeInputElement>, 'start' | 'end' | 'defaultStart' | 'defaultEnd' | 'min' | 'max' | 'locale' | 'format' | 'size' | 'readOnly' | 'weekStart' | 'months' | 'isDateDisabled' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onUndChange' | 'onInput' | 'onChange'> {
|
|
12
|
+
/** Range start, `YYYY-MM-DD`, or empty. */
|
|
13
|
+
start?: UndDateRangeInputElement['start'];
|
|
14
|
+
/** Range end, `YYYY-MM-DD`, or empty. */
|
|
15
|
+
end?: UndDateRangeInputElement['end'];
|
|
16
|
+
/** Start restored on form reset (defaults to the initial `start`). */
|
|
17
|
+
defaultStart?: UndDateRangeInputElement['defaultStart'];
|
|
18
|
+
/** End restored on form reset (defaults to the initial `end`). */
|
|
19
|
+
defaultEnd?: UndDateRangeInputElement['defaultEnd'];
|
|
20
|
+
/** Earliest allowed date, `YYYY-MM-DD`. */
|
|
21
|
+
min?: UndDateRangeInputElement['min'];
|
|
22
|
+
/** Latest allowed date, `YYYY-MM-DD`. */
|
|
23
|
+
max?: UndDateRangeInputElement['max'];
|
|
24
|
+
/** BCP 47 tag for the text format and the calendar. Defaults to the page language. */
|
|
25
|
+
locale?: UndDateRangeInputElement['locale'];
|
|
26
|
+
/** `locale` shows and parses the locale order; `iso` shows `yyyy-mm-dd`. */
|
|
27
|
+
format?: UndDateRangeInputElement['format'];
|
|
28
|
+
/** Size of the field. */
|
|
29
|
+
size?: UndDateRangeInputElement['size'];
|
|
30
|
+
/** Makes the values read-only. */
|
|
31
|
+
readOnly?: UndDateRangeInputElement['readOnly'];
|
|
32
|
+
/** First day of the week in the calendar, 0 (Sunday) to 6. */
|
|
33
|
+
weekStart?: UndDateRangeInputElement['weekStart'];
|
|
34
|
+
/** Months shown side by side in the calendar (1 to 3). Two is the default. */
|
|
35
|
+
months?: UndDateRangeInputElement['months'];
|
|
36
|
+
/** Return `true` for a date that cannot be chosen. Receives `YYYY-MM-DD`. */
|
|
37
|
+
isDateDisabled?: UndDateRangeInputElement['isDateDisabled'];
|
|
38
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
39
|
+
label?: UndDateRangeInputElement['label'];
|
|
40
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
41
|
+
description?: UndDateRangeInputElement['description'];
|
|
42
|
+
/** Error message. Setting it marks the control invalid (`aria-invalid`, `setCustomValidity`) and shows the message, prefixed with a visually hidden "Error:". Native validation messages are shown automatically after a failed submit and cleared once the value is valid. */
|
|
43
|
+
error?: UndDateRangeInputElement['error'];
|
|
44
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
45
|
+
required?: UndDateRangeInputElement['required'];
|
|
46
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
47
|
+
optional?: UndDateRangeInputElement['optional'];
|
|
48
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
49
|
+
disabled?: UndDateRangeInputElement['disabled'];
|
|
50
|
+
/** Name submitted with the form data. */
|
|
51
|
+
name?: UndDateRangeInputElement['name'];
|
|
52
|
+
/** The range was committed: both dates are set or both are empty. */
|
|
53
|
+
onUndChange?: (event: UndEvent<CustomEvent<{ start: string; end: string }>, UndDateRangeInputElement>) => void;
|
|
54
|
+
/** Native input event of either text input. */
|
|
55
|
+
onInput?: (event: UndEvent<Event, UndDateRangeInputElement>) => void;
|
|
56
|
+
/** Native change event of either text input. */
|
|
57
|
+
onChange?: (event: UndEvent<Event, UndDateRangeInputElement>) => void;
|
|
58
|
+
ref?: Ref<UndDateRangeInputElement>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** A start and end date field with a range calendar. */
|
|
62
|
+
export function UndDateRangeInput(props: UndDateRangeInputProps): ReactElement {
|
|
63
|
+
const { onUndChange, onInput, onChange, ...rest } = props;
|
|
64
|
+
return createElement('und-date-range-input', {
|
|
65
|
+
...rest,
|
|
66
|
+
'onund-change': onUndChange,
|
|
67
|
+
'oninput': onInput,
|
|
68
|
+
'onchange': onChange,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/date-time-input.js';
|
|
7
|
+
import type { UndDateTimeInput as UndDateTimeInputElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndDateTimeInputProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndDateTimeInputElement>, 'value' | 'defaultValue' | 'label' | 'description' | 'error' | 'required' | 'disabled' | 'readOnly' | 'name' | 'min' | 'max' | 'locale' | 'hourCycle' | 'size' | 'weekStart' | 'isDateDisabled' | 'onUndChange'> {
|
|
12
|
+
/** The local date and time, `YYYY-MM-DDTHH:MM`, or empty. */
|
|
13
|
+
value?: UndDateTimeInputElement['value'];
|
|
14
|
+
/** Value restored on form reset (defaults to the initial `value`). */
|
|
15
|
+
defaultValue?: UndDateTimeInputElement['defaultValue'];
|
|
16
|
+
/** Visible label of the group. */
|
|
17
|
+
label?: UndDateTimeInputElement['label'];
|
|
18
|
+
/** Help text, referenced by `aria-describedby`. */
|
|
19
|
+
description?: UndDateTimeInputElement['description'];
|
|
20
|
+
/** Error message shown under the group, after a visually hidden "Error:". */
|
|
21
|
+
error?: UndDateTimeInputElement['error'];
|
|
22
|
+
/** Requires both parts. */
|
|
23
|
+
required?: UndDateTimeInputElement['required'];
|
|
24
|
+
/** Disables both parts. */
|
|
25
|
+
disabled?: UndDateTimeInputElement['disabled'];
|
|
26
|
+
/** Makes both parts read-only. */
|
|
27
|
+
readOnly?: UndDateTimeInputElement['readOnly'];
|
|
28
|
+
/** Name submitted with the form data (`YYYY-MM-DDTHH:MM`). */
|
|
29
|
+
name?: UndDateTimeInputElement['name'];
|
|
30
|
+
/** Earliest allowed date-time, `YYYY-MM-DDTHH:MM`. */
|
|
31
|
+
min?: UndDateTimeInputElement['min'];
|
|
32
|
+
/** Latest allowed date-time, `YYYY-MM-DDTHH:MM`. */
|
|
33
|
+
max?: UndDateTimeInputElement['max'];
|
|
34
|
+
/** BCP 47 tag for both parts. Defaults to the page language. */
|
|
35
|
+
locale?: UndDateTimeInputElement['locale'];
|
|
36
|
+
/** `auto`, `12` or `24` for the time part. */
|
|
37
|
+
hourCycle?: UndDateTimeInputElement['hourCycle'];
|
|
38
|
+
/** Size of both parts. */
|
|
39
|
+
size?: UndDateTimeInputElement['size'];
|
|
40
|
+
/** First day of the week in the calendar. */
|
|
41
|
+
weekStart?: UndDateTimeInputElement['weekStart'];
|
|
42
|
+
/** Return `true` for a date that cannot be chosen. Receives `YYYY-MM-DD`. */
|
|
43
|
+
isDateDisabled?: UndDateTimeInputElement['isDateDisabled'];
|
|
44
|
+
/** A part was committed and the combined value changed. `value` is `YYYY-MM-DDTHH:MM`, or empty. */
|
|
45
|
+
onUndChange?: (event: UndEvent<CustomEvent<{ value: string }>, UndDateTimeInputElement>) => void;
|
|
46
|
+
ref?: Ref<UndDateTimeInputElement>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** A date and a time field in one group, with a local date-time value. */
|
|
50
|
+
export function UndDateTimeInput(props: UndDateTimeInputProps): ReactElement {
|
|
51
|
+
const { onUndChange, ...rest } = props;
|
|
52
|
+
return createElement('und-date-time-input', {
|
|
53
|
+
...rest,
|
|
54
|
+
'onund-change': onUndChange,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/empty-state.js';
|
|
7
|
+
import type { UndEmptyState as UndEmptyStateElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndEmptyStateProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndEmptyStateElement>, 'heading' | 'headingLevel'> {
|
|
11
|
+
/** Heading text (use the `heading` slot for rich content). */
|
|
12
|
+
heading?: UndEmptyStateElement['heading'];
|
|
13
|
+
/** Outline level of the heading, 1 to 6. */
|
|
14
|
+
headingLevel?: UndEmptyStateElement['headingLevel'];
|
|
15
|
+
ref?: Ref<UndEmptyStateElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** An empty or zero-data placeholder with an icon, text and actions. */
|
|
19
|
+
export function UndEmptyState(props: UndEmptyStateProps): ReactElement {
|
|
20
|
+
return createElement('und-empty-state', props);
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/file-input.js';
|
|
7
|
+
import type { UndFileInput as UndFileInputElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndFileInputProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndFileInputElement>, 'accept' | 'multiple' | 'maxSize' | 'maxFiles' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onChange' | 'onUndReject'> {
|
|
12
|
+
/** Accepted file types, as on a native file input: extensions (`.pdf`), MIME types (`image/png`) or wildcards (`image/*`), comma-separated. */
|
|
13
|
+
accept?: UndFileInputElement['accept'];
|
|
14
|
+
/** Allows choosing and dropping several files. */
|
|
15
|
+
multiple?: UndFileInputElement['multiple'];
|
|
16
|
+
/** Largest accepted size of one file, in bytes. */
|
|
17
|
+
maxSize?: UndFileInputElement['maxSize'];
|
|
18
|
+
/** Largest number of files (with `multiple`). */
|
|
19
|
+
maxFiles?: UndFileInputElement['maxFiles'];
|
|
20
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
21
|
+
label?: UndFileInputElement['label'];
|
|
22
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
23
|
+
description?: UndFileInputElement['description'];
|
|
24
|
+
/** Error message. Setting it marks the control invalid (`aria-invalid`, `setCustomValidity`) and shows the message, prefixed with a visually hidden "Error:". Native validation messages are shown automatically after a failed submit and cleared once the value is valid. */
|
|
25
|
+
error?: UndFileInputElement['error'];
|
|
26
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
27
|
+
required?: UndFileInputElement['required'];
|
|
28
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
29
|
+
optional?: UndFileInputElement['optional'];
|
|
30
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
31
|
+
disabled?: UndFileInputElement['disabled'];
|
|
32
|
+
/** Name submitted with the form data. */
|
|
33
|
+
name?: UndFileInputElement['name'];
|
|
34
|
+
/** The selection changed (pick, drop or remove). Read `files` for the accepted files. */
|
|
35
|
+
onChange?: (event: UndEvent<Event, UndFileInputElement>) => void;
|
|
36
|
+
/** Some files were left out; the detail names them and why. */
|
|
37
|
+
onUndReject?: (event: UndEvent<CustomEvent<unknown>, UndFileInputElement>) => void;
|
|
38
|
+
ref?: Ref<UndFileInputElement>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A labelled file input with drop zone, file list and validation messages. */
|
|
42
|
+
export function UndFileInput(props: UndFileInputProps): ReactElement {
|
|
43
|
+
const { onChange, onUndReject, ...rest } = props;
|
|
44
|
+
return createElement('und-file-input', {
|
|
45
|
+
...rest,
|
|
46
|
+
'onchange': onChange,
|
|
47
|
+
'onund-reject': onUndReject,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/form-layout.js';
|
|
7
|
+
import type { UndFormLayout as UndFormLayoutElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndFormLayoutProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndFormLayoutElement>, 'labels'> {
|
|
11
|
+
/** Label position: `side` (default, a label column) or `top` (always stacked). */
|
|
12
|
+
labels?: UndFormLayoutElement['labels'];
|
|
13
|
+
ref?: Ref<UndFormLayoutElement>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Aligns form fields in label and field columns, stacked on narrow screens. */
|
|
17
|
+
export function UndFormLayout(props: UndFormLayoutProps): ReactElement {
|
|
18
|
+
return createElement('und-form-layout', props);
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/grid-item.js';
|
|
7
|
+
import type { UndGridItem as UndGridItemElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndGridItemProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndGridItemElement>, 'span' | 'rowSpan'> {
|
|
11
|
+
/** Columns to span (1 to 12), or `full` for the whole row. */
|
|
12
|
+
span?: UndGridItemElement['span'];
|
|
13
|
+
/** Rows to span (1 to 6). */
|
|
14
|
+
rowSpan?: UndGridItemElement['rowSpan'];
|
|
15
|
+
ref?: Ref<UndGridItemElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** A grid cell with column and row span control. */
|
|
19
|
+
export function UndGridItem(props: UndGridItemProps): ReactElement {
|
|
20
|
+
return createElement('und-grid-item', props);
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/grid.js';
|
|
7
|
+
import type { UndGrid as UndGridElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndGridProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndGridElement>, 'columns' | 'min' | 'gap' | 'alignItems' | 'dense'> {
|
|
11
|
+
/** A fixed number of equal columns (1 to 12). Unset: columns adapt to `min`. */
|
|
12
|
+
columns?: UndGridElement['columns'];
|
|
13
|
+
/** Minimum column width of the responsive grid: `xs`, `sm`, `md` (default), `lg`, `xl`. */
|
|
14
|
+
min?: UndGridElement['min'];
|
|
15
|
+
/** Gap between cells, a space token step (`0` to `32`). */
|
|
16
|
+
gap?: UndGridElement['gap'];
|
|
17
|
+
/** Cross-axis alignment of the items. */
|
|
18
|
+
alignItems?: UndGridElement['alignItems'];
|
|
19
|
+
/** Back-fills holes left by wide items (visual order may differ from DOM order). */
|
|
20
|
+
dense?: UndGridElement['dense'];
|
|
21
|
+
ref?: Ref<UndGridElement>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A responsive grid with a minimum column width or a fixed column count. */
|
|
25
|
+
export function UndGrid(props: UndGridProps): ReactElement {
|
|
26
|
+
return createElement('und-grid', props);
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/heading.js';
|
|
7
|
+
import type { UndHeading as UndHeadingElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndHeadingProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndHeadingElement>, 'level' | 'size' | 'tone'> {
|
|
11
|
+
/** Outline level, 1 to 6. It becomes the element (`h1` to `h6`); anything else falls back to 2. */
|
|
12
|
+
level?: UndHeadingElement['level'];
|
|
13
|
+
/** Visual size. Defaults by level (1 `xl`, 2 `lg`, 3 `md`, 4 to 6 `sm`). */
|
|
14
|
+
size?: UndHeadingElement['size'];
|
|
15
|
+
/** Color intent. */
|
|
16
|
+
tone?: UndHeadingElement['tone'];
|
|
17
|
+
ref?: Ref<UndHeadingElement>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** A heading with level semantics and an independent visual size. */
|
|
21
|
+
export function UndHeading(props: UndHeadingProps): ReactElement {
|
|
22
|
+
return createElement('und-heading', props);
|
|
23
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/hover-card.js';
|
|
7
|
+
import type { UndHoverCard as UndHoverCardElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndHoverCardProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndHoverCardElement>, 'open' | 'htmlFor' | 'placement' | 'offset' | 'openDelay' | 'closeDelay' | 'disabled' | 'label' | 'onUndOpenChange'> {
|
|
12
|
+
/** Whether the card is visible. Set it to show or hide the card from code. */
|
|
13
|
+
open?: UndHoverCardElement['open'];
|
|
14
|
+
/** Id of the trigger element, in the same tree. Defaults to the previous sibling element. */
|
|
15
|
+
htmlFor?: UndHoverCardElement['htmlFor'];
|
|
16
|
+
/** Preferred side; flips when there is not enough room. */
|
|
17
|
+
placement?: UndHoverCardElement['placement'];
|
|
18
|
+
/** Gap between the trigger and the card, in pixels. */
|
|
19
|
+
offset?: UndHoverCardElement['offset'];
|
|
20
|
+
/** Hover delay before showing, in ms. Keyboard focus shows it after the same delay. */
|
|
21
|
+
openDelay?: UndHoverCardElement['openDelay'];
|
|
22
|
+
/** Delay before hiding after the pointer or focus leaves, in ms. */
|
|
23
|
+
closeDelay?: UndHoverCardElement['closeDelay'];
|
|
24
|
+
/** Stops the card from showing. */
|
|
25
|
+
disabled?: UndHoverCardElement['disabled'];
|
|
26
|
+
/** Accessible name of the card (for example "Asha Rao, profile preview"). */
|
|
27
|
+
label?: UndHoverCardElement['label'];
|
|
28
|
+
/** The card was shown or hidden. */
|
|
29
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndHoverCardElement>) => void;
|
|
30
|
+
ref?: Ref<UndHoverCardElement>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A preview card shown on hover and keyboard focus. */
|
|
34
|
+
export function UndHoverCard(props: UndHoverCardProps): ReactElement {
|
|
35
|
+
const { onUndOpenChange, ...rest } = props;
|
|
36
|
+
return createElement('und-hover-card', {
|
|
37
|
+
...rest,
|
|
38
|
+
'onund-open-change': onUndOpenChange,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/icon.js';
|
|
7
|
+
import type { UndIcon as UndIconElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndIconProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndIconElement>, 'name' | 'definition' | 'label' | 'size' | 'flipRtl'> {
|
|
11
|
+
/** Name of a registered icon. */
|
|
12
|
+
name?: UndIconElement['name'];
|
|
13
|
+
/** An icon given directly (property only): path data, an array of `[tag, attributes]` nodes or `{ viewBox, nodes }`. Wins over `name`. */
|
|
14
|
+
definition?: UndIconElement['definition'];
|
|
15
|
+
/** Accessible name. Without it the icon is decorative and hidden from assistive technology. */
|
|
16
|
+
label?: UndIconElement['label'];
|
|
17
|
+
/** Fixed size; without it the icon is `1em` (or `--und-icon-size`). */
|
|
18
|
+
size?: UndIconElement['size'];
|
|
19
|
+
/** Mirrors the icon in right-to-left text (arrows, chevrons, "back"). */
|
|
20
|
+
flipRtl?: UndIconElement['flipRtl'];
|
|
21
|
+
ref?: Ref<UndIconElement>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** An SVG icon drawn from registered path data. */
|
|
25
|
+
export function UndIcon(props: UndIconProps): ReactElement {
|
|
26
|
+
return createElement('und-icon', props);
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/info-tip.js';
|
|
7
|
+
import type { UndInfoTip as UndInfoTipElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndInfoTipProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndInfoTipElement>, 'label' | 'placement' | 'open' | 'onUndOpenChange'> {
|
|
12
|
+
/** Accessible name of the button and the popover (localise it). */
|
|
13
|
+
label?: UndInfoTipElement['label'];
|
|
14
|
+
/** Preferred side of the popover relative to the button. */
|
|
15
|
+
placement?: UndInfoTipElement['placement'];
|
|
16
|
+
/** Whether the popover is open. */
|
|
17
|
+
open?: UndInfoTipElement['open'];
|
|
18
|
+
/** The popover is about to open or close (from `und-popover`). */
|
|
19
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndInfoTipElement>) => void;
|
|
20
|
+
ref?: Ref<UndInfoTipElement>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** An "i" button that opens a help popover. */
|
|
24
|
+
export function UndInfoTip(props: UndInfoTipProps): ReactElement {
|
|
25
|
+
const { onUndOpenChange, ...rest } = props;
|
|
26
|
+
return createElement('und-info-tip', {
|
|
27
|
+
...rest,
|
|
28
|
+
'onund-open-change': onUndOpenChange,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/input-group.js';
|
|
7
|
+
import type { UndInputGroup as UndInputGroupElement } from '@und-ui/core';
|
|
8
|
+
import { useControlledProp, type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndInputGroupProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndInputGroupElement>, 'type' | 'value' | 'defaultValue' | 'size' | 'readOnly' | 'placeholder' | 'autocomplete' | 'inputMode' | 'enterKeyHint' | 'minLength' | 'maxLength' | 'pattern' | 'min' | 'max' | 'step' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onInput' | 'onChange'> {
|
|
12
|
+
/** Input type. */
|
|
13
|
+
type?: UndInputGroupElement['type'];
|
|
14
|
+
/** Current value. The `value` attribute also sets the default value that a form reset restores, as on a native input. */
|
|
15
|
+
value?: UndInputGroupElement['value'];
|
|
16
|
+
/** Value restored on form reset (defaults to the initial `value`). */
|
|
17
|
+
defaultValue?: UndInputGroupElement['defaultValue'];
|
|
18
|
+
/** Size of the field. */
|
|
19
|
+
size?: UndInputGroupElement['size'];
|
|
20
|
+
/** Makes the value read-only (still focusable and submitted). */
|
|
21
|
+
readOnly?: UndInputGroupElement['readOnly'];
|
|
22
|
+
/** Placeholder hint. Never a substitute for a label. */
|
|
23
|
+
placeholder?: UndInputGroupElement['placeholder'];
|
|
24
|
+
/** Autofill hint, passed through (WCAG 1.3.5), for example `email` or `name`. */
|
|
25
|
+
autocomplete?: UndInputGroupElement['autocomplete'];
|
|
26
|
+
/** Virtual keyboard hint (`numeric`, `decimal`, `tel`, `email`, ...). */
|
|
27
|
+
inputMode?: UndInputGroupElement['inputMode'];
|
|
28
|
+
/** Label of the virtual keyboard's Enter key (`search`, `next`, `send`, ...). */
|
|
29
|
+
enterKeyHint?: UndInputGroupElement['enterKeyHint'];
|
|
30
|
+
/** Minimum length (native validation). */
|
|
31
|
+
minLength?: UndInputGroupElement['minLength'];
|
|
32
|
+
/** Maximum length (native, counted in UTF-16 code units). */
|
|
33
|
+
maxLength?: UndInputGroupElement['maxLength'];
|
|
34
|
+
/** Pattern the value must match (native validation). */
|
|
35
|
+
pattern?: UndInputGroupElement['pattern'];
|
|
36
|
+
/** Minimum for `type="number"`. */
|
|
37
|
+
min?: UndInputGroupElement['min'];
|
|
38
|
+
/** Maximum for `type="number"`. */
|
|
39
|
+
max?: UndInputGroupElement['max'];
|
|
40
|
+
/** Step for `type="number"`. */
|
|
41
|
+
step?: UndInputGroupElement['step'];
|
|
42
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
43
|
+
label?: UndInputGroupElement['label'];
|
|
44
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
45
|
+
description?: UndInputGroupElement['description'];
|
|
46
|
+
/** Error message. Setting it marks the control invalid (`aria-invalid`, `setCustomValidity`) and shows the message, prefixed with a visually hidden "Error:". Native validation messages are shown automatically after a failed submit and cleared once the value is valid. */
|
|
47
|
+
error?: UndInputGroupElement['error'];
|
|
48
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
49
|
+
required?: UndInputGroupElement['required'];
|
|
50
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
51
|
+
optional?: UndInputGroupElement['optional'];
|
|
52
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
53
|
+
disabled?: UndInputGroupElement['disabled'];
|
|
54
|
+
/** Name submitted with the form data. */
|
|
55
|
+
name?: UndInputGroupElement['name'];
|
|
56
|
+
/** Native `input` from the inner `<input>`. */
|
|
57
|
+
onInput?: (event: UndEvent<InputEvent, UndInputGroupElement>) => void;
|
|
58
|
+
/** Native `change` when the value is committed. */
|
|
59
|
+
onChange?: (event: UndEvent<Event, UndInputGroupElement>) => void;
|
|
60
|
+
ref?: Ref<UndInputGroupElement>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** A text field with prefix and suffix text or buttons. */
|
|
64
|
+
export function UndInputGroup(props: UndInputGroupProps): ReactElement {
|
|
65
|
+
const { onInput, onChange, ref, ...rest } = props;
|
|
66
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
67
|
+
const controlled = useControlledProp<UndInputGroupElement, 'value'>('value', props.value, ref);
|
|
68
|
+
return createElement('und-input-group', {
|
|
69
|
+
...rest,
|
|
70
|
+
ref: controlled.ref,
|
|
71
|
+
'oninput': (event: UndEvent<InputEvent, UndInputGroupElement>) => {
|
|
72
|
+
onInput?.(event);
|
|
73
|
+
controlled.settle();
|
|
74
|
+
},
|
|
75
|
+
'onchange': onChange,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement, type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
6
|
+
import '@und-ui/core/kbd.js';
|
|
7
|
+
import type { UndKbd as UndKbdElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndKbdProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndKbdElement>, never> {
|
|
11
|
+
ref?: Ref<UndKbdElement>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** A keyboard key. */
|
|
15
|
+
export function UndKbd(props: UndKbdProps): ReactElement {
|
|
16
|
+
return createElement('und-kbd', props);
|
|
17
|
+
}
|