@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,71 @@
|
|
|
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/lightbox.js';
|
|
7
|
+
import type { UndLightbox as UndLightboxElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndLightboxProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndLightboxElement>, 'images' | 'index' | 'zoomable' | 'zoomed' | 'previousLabel' | 'nextLabel' | 'zoomLabel' | 'errorLabel' | 'counterLabel' | 'size' | 'label' | 'noCloseButton' | 'open' | 'modal' | 'variant' | 'closedBy' | 'initialFocus' | 'closeLabel' | 'returnValue' | 'onUndIndexChange' | 'onUndOpenChange' | 'onUndAfterOpen' | 'onUndAfterClose'> {
|
|
12
|
+
/** The images, instead of `<img>` children. */
|
|
13
|
+
images?: UndLightboxElement['images'];
|
|
14
|
+
/** Index of the shown image. */
|
|
15
|
+
index?: UndLightboxElement['index'];
|
|
16
|
+
/** Adds the zoom button and click-to-zoom. */
|
|
17
|
+
zoomable?: UndLightboxElement['zoomable'];
|
|
18
|
+
/** Whether the image is shown at 200%. */
|
|
19
|
+
zoomed?: UndLightboxElement['zoomed'];
|
|
20
|
+
/** Accessible name of the Previous button. */
|
|
21
|
+
previousLabel?: UndLightboxElement['previousLabel'];
|
|
22
|
+
/** Accessible name of the Next button. */
|
|
23
|
+
nextLabel?: UndLightboxElement['nextLabel'];
|
|
24
|
+
/** Accessible name of the zoom button. */
|
|
25
|
+
zoomLabel?: UndLightboxElement['zoomLabel'];
|
|
26
|
+
/** Text shown when an image cannot be loaded. */
|
|
27
|
+
errorLabel?: UndLightboxElement['errorLabel'];
|
|
28
|
+
/** Builds the position text ("2 of 5"), shown and announced on every change. */
|
|
29
|
+
counterLabel?: UndLightboxElement['counterLabel'];
|
|
30
|
+
/** Preferred width. */
|
|
31
|
+
size?: UndLightboxElement['size'];
|
|
32
|
+
/** The title, rendered as the heading that names the dialog. Use the `label` slot for rich content. */
|
|
33
|
+
label?: UndLightboxElement['label'];
|
|
34
|
+
/** Hides the close button. Make sure another way to close remains. */
|
|
35
|
+
noCloseButton?: UndLightboxElement['noCloseButton'];
|
|
36
|
+
/** Whether the dialog is open. Setting it opens or closes the dialog without firing `und-open-change`. */
|
|
37
|
+
open?: UndLightboxElement['open'];
|
|
38
|
+
/** Modal (default): the page behind is inert and scrolling is locked. Set `modal="false"` for a non-modal dialog that leaves the page usable. */
|
|
39
|
+
modal?: UndLightboxElement['modal'];
|
|
40
|
+
/** `alert` renders an alert dialog (`role="alertdialog"`) for confirmations: no close button, and the backdrop does not dismiss it. */
|
|
41
|
+
variant?: UndLightboxElement['variant'];
|
|
42
|
+
/** Which user actions close the dialog, as on the native attribute: `any` (Escape, backdrop click or outside click), `closerequest` (Escape only) or `none`. Defaults to `any`, or `closerequest` for `variant="alert"`. */
|
|
43
|
+
closedBy?: UndLightboxElement['closedBy'];
|
|
44
|
+
/** CSS selector (inside the dialog content) of the element to focus on open. Defaults to an `[autofocus]` element, then the first focusable element. */
|
|
45
|
+
initialFocus?: UndLightboxElement['initialFocus'];
|
|
46
|
+
/** Accessible name of the close button. */
|
|
47
|
+
closeLabel?: UndLightboxElement['closeLabel'];
|
|
48
|
+
/** The value passed to `close(value)` or submitted by a `method="dialog"` form. */
|
|
49
|
+
returnValue?: UndLightboxElement['returnValue'];
|
|
50
|
+
/** The shown image changed. */
|
|
51
|
+
onUndIndexChange?: (event: UndEvent<CustomEvent<{ index: number }>, UndLightboxElement>) => void;
|
|
52
|
+
/** The user asked to open or close the lightbox. Cancelable. */
|
|
53
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndLightboxElement>) => void;
|
|
54
|
+
/** The lightbox opened and its entry animation finished. */
|
|
55
|
+
onUndAfterOpen?: (event: UndEvent<CustomEvent<undefined>, UndLightboxElement>) => void;
|
|
56
|
+
/** The lightbox closed and its exit animation finished. */
|
|
57
|
+
onUndAfterClose?: (event: UndEvent<CustomEvent<undefined>, UndLightboxElement>) => void;
|
|
58
|
+
ref?: Ref<UndLightboxElement>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** A full-screen viewer for one or more images. */
|
|
62
|
+
export function UndLightbox(props: UndLightboxProps): ReactElement {
|
|
63
|
+
const { onUndIndexChange, onUndOpenChange, onUndAfterOpen, onUndAfterClose, ...rest } = props;
|
|
64
|
+
return createElement('und-lightbox', {
|
|
65
|
+
...rest,
|
|
66
|
+
'onund-index-change': onUndIndexChange,
|
|
67
|
+
'onund-open-change': onUndOpenChange,
|
|
68
|
+
'onund-after-open': onUndAfterOpen,
|
|
69
|
+
'onund-after-close': onUndAfterClose,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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/list-item.js';
|
|
7
|
+
import type { UndListItem as UndListItemElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndListItemProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndListItemElement>, 'context'> {
|
|
11
|
+
context?: UndListItemElement['context'];
|
|
12
|
+
ref?: Ref<UndListItemElement>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** An entry of an und-list. */
|
|
16
|
+
export function UndListItem(props: UndListItemProps): ReactElement {
|
|
17
|
+
return createElement('und-list-item', props);
|
|
18
|
+
}
|
|
@@ -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/list.js';
|
|
7
|
+
import type { UndList as UndListElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndListProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndListElement>, 'type' | 'start'> {
|
|
11
|
+
/** Marker kind: bullets, numbers or none. */
|
|
12
|
+
type?: UndListElement['type'];
|
|
13
|
+
/** Number of the first item when `type` is `ordered`. */
|
|
14
|
+
start?: UndListElement['start'];
|
|
15
|
+
ref?: Ref<UndListElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** An ordered, unordered or plain list. */
|
|
19
|
+
export function UndList(props: UndListProps): ReactElement {
|
|
20
|
+
return createElement('und-list', props);
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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/markdown.js';
|
|
7
|
+
import type { UndMarkdown as UndMarkdownElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndMarkdownProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndMarkdownElement>, 'value' | 'linkTarget' | 'headingOffset' | 'maxLength' | 'streaming' | 'codeLabel' | 'tableLabel'> {
|
|
11
|
+
/** The Markdown source. */
|
|
12
|
+
value?: UndMarkdownElement['value'];
|
|
13
|
+
/** `target` for links. `_blank` (default) also adds `noopener noreferrer`. */
|
|
14
|
+
linkTarget?: UndMarkdownElement['linkTarget'];
|
|
15
|
+
/** Added to heading levels so a `#` does not compete with the page's own `h1` (default 2: `#` renders as `h3`; the result is capped at `h6`). */
|
|
16
|
+
headingOffset?: UndMarkdownElement['headingOffset'];
|
|
17
|
+
/** Longest input rendered, in UTF-16 code units. The rest is dropped. */
|
|
18
|
+
maxLength?: UndMarkdownElement['maxLength'];
|
|
19
|
+
/** Shows a typing cursor and batches re-renders to one per frame. */
|
|
20
|
+
streaming?: UndMarkdownElement['streaming'];
|
|
21
|
+
/** Accessible name of scrollable code blocks. */
|
|
22
|
+
codeLabel?: UndMarkdownElement['codeLabel'];
|
|
23
|
+
/** Accessible name of scrollable tables. */
|
|
24
|
+
tableLabel?: UndMarkdownElement['tableLabel'];
|
|
25
|
+
ref?: Ref<UndMarkdownElement>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Safe Markdown to DOM, built for streaming chat output. */
|
|
29
|
+
export function UndMarkdown(props: UndMarkdownProps): ReactElement {
|
|
30
|
+
return createElement('und-markdown', props);
|
|
31
|
+
}
|
|
@@ -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/metadata-item.js';
|
|
7
|
+
import type { UndMetadataItem as UndMetadataItemElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndMetadataItemProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndMetadataItemElement>, 'label'> {
|
|
11
|
+
/** The term (plain text). */
|
|
12
|
+
label?: UndMetadataItemElement['label'];
|
|
13
|
+
ref?: Ref<UndMetadataItemElement>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** A label and value pair of an und-metadata-list. */
|
|
17
|
+
export function UndMetadataItem(props: UndMetadataItemProps): ReactElement {
|
|
18
|
+
return createElement('und-metadata-item', 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/metadata-list.js';
|
|
7
|
+
import type { UndMetadataList as UndMetadataListElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndMetadataListProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndMetadataListElement>, 'layout' | 'divided'> {
|
|
11
|
+
/** Label column placement: `stacked` puts the label above the value, `inline` puts it beside the value. */
|
|
12
|
+
layout?: UndMetadataListElement['layout'];
|
|
13
|
+
/** Draws a rule between rows. */
|
|
14
|
+
divided?: UndMetadataListElement['divided'];
|
|
15
|
+
ref?: Ref<UndMetadataListElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Label and value pairs as a description list. */
|
|
19
|
+
export function UndMetadataList(props: UndMetadataListProps): ReactElement {
|
|
20
|
+
return createElement('und-metadata-list', props);
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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/mobile-nav.js';
|
|
7
|
+
import type { UndMobileNav as UndMobileNavElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndMobileNavProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndMobileNavElement>, 'open' | 'label' | 'toggleLabel' | 'closeLabel' | 'placement' | 'onUndOpenChange'> {
|
|
12
|
+
/** Whether the panel is open. */
|
|
13
|
+
open?: UndMobileNavElement['open'];
|
|
14
|
+
/** The panel title. */
|
|
15
|
+
label?: UndMobileNavElement['label'];
|
|
16
|
+
/** Accessible name of the toggle button (localise it). */
|
|
17
|
+
toggleLabel?: UndMobileNavElement['toggleLabel'];
|
|
18
|
+
/** Accessible name of the panel's close button. */
|
|
19
|
+
closeLabel?: UndMobileNavElement['closeLabel'];
|
|
20
|
+
/** The edge the panel slides from; follows the text direction. */
|
|
21
|
+
placement?: UndMobileNavElement['placement'];
|
|
22
|
+
/** The panel opened or closed. The toggle and navigation fire it from this element (cancelable); Escape and the close button fire it from the inner drawer. */
|
|
23
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<unknown>, UndMobileNavElement>) => void;
|
|
24
|
+
ref?: Ref<UndMobileNavElement>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** A menu button with an off-canvas navigation panel. */
|
|
28
|
+
export function UndMobileNav(props: UndMobileNavProps): ReactElement {
|
|
29
|
+
const { onUndOpenChange, ...rest } = props;
|
|
30
|
+
return createElement('und-mobile-nav', {
|
|
31
|
+
...rest,
|
|
32
|
+
'onund-open-change': onUndOpenChange,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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/more-menu.js';
|
|
7
|
+
import type { UndMoreMenu as UndMoreMenuElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndMoreMenuProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndMoreMenuElement>, 'triggerLabel' | 'placement' | 'open' | 'label' | 'onUndOpenChange' | 'onUndSelect'> {
|
|
12
|
+
/** Accessible name of the icon button. */
|
|
13
|
+
triggerLabel?: UndMoreMenuElement['triggerLabel'];
|
|
14
|
+
/** Preferred position relative to the trigger; flips when there is no room. Submenus always open beside their item. */
|
|
15
|
+
placement?: UndMoreMenuElement['placement'];
|
|
16
|
+
/** Whether the menu is open. */
|
|
17
|
+
open?: UndMoreMenuElement['open'];
|
|
18
|
+
/** Accessible name of the menu. Defaults to the trigger's name. */
|
|
19
|
+
label?: UndMoreMenuElement['label'];
|
|
20
|
+
/** The menu opened or closed. */
|
|
21
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{ open: boolean }>, UndMoreMenuElement>) => void;
|
|
22
|
+
/** An item was chosen (dispatched on the item, bubbles). Cancelable. */
|
|
23
|
+
onUndSelect?: (event: UndEvent<CustomEvent<{ value: string; checked: boolean }>, UndMoreMenuElement>) => void;
|
|
24
|
+
ref?: Ref<UndMoreMenuElement>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** An icon button that opens a menu of extra actions. */
|
|
28
|
+
export function UndMoreMenu(props: UndMoreMenuProps): ReactElement {
|
|
29
|
+
const { onUndOpenChange, onUndSelect, ...rest } = props;
|
|
30
|
+
return createElement('und-more-menu', {
|
|
31
|
+
...rest,
|
|
32
|
+
'onund-open-change': onUndOpenChange,
|
|
33
|
+
'onund-select': onUndSelect,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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/multi-select.js';
|
|
7
|
+
import type { UndMultiSelect as UndMultiSelectElement } from '@und-ui/core';
|
|
8
|
+
import { useControlledProp, type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndMultiSelectProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndMultiSelectElement>, 'value' | 'options' | 'label' | 'description' | 'error' | 'placeholder' | 'name' | 'size' | 'disabled' | 'required' | 'open' | 'tokens' | 'summaryMax' | 'selectedMessage' | 'removeLabel' | 'onInput' | 'onChange' | 'onUndOpenChange'> {
|
|
12
|
+
/** The chosen values. Until it is set, options marked `selected` are the chosen ones. */
|
|
13
|
+
value?: UndMultiSelectElement['value'];
|
|
14
|
+
/** Options as data. When set, light-DOM options are ignored. */
|
|
15
|
+
options?: UndMultiSelectElement['options'];
|
|
16
|
+
/** Visible label text, shown above the trigger and used as its accessible name. */
|
|
17
|
+
label?: UndMultiSelectElement['label'];
|
|
18
|
+
/** Help text under the label, announced as the trigger's description. */
|
|
19
|
+
description?: UndMultiSelectElement['description'];
|
|
20
|
+
/** Error message. Marks the control invalid and shows the message with a visually hidden "Error:" prefix. */
|
|
21
|
+
error?: UndMultiSelectElement['error'];
|
|
22
|
+
/** Text shown in the trigger while nothing is chosen. */
|
|
23
|
+
placeholder?: UndMultiSelectElement['placeholder'];
|
|
24
|
+
/** Form field name; each chosen value is submitted as its own entry. */
|
|
25
|
+
name?: UndMultiSelectElement['name'];
|
|
26
|
+
/** Size of the control. */
|
|
27
|
+
size?: UndMultiSelectElement['size'];
|
|
28
|
+
/** Disables the control. */
|
|
29
|
+
disabled?: UndMultiSelectElement['disabled'];
|
|
30
|
+
/** Requires at least one choice. */
|
|
31
|
+
required?: UndMultiSelectElement['required'];
|
|
32
|
+
/** Whether the listbox is open. */
|
|
33
|
+
open?: UndMultiSelectElement['open'];
|
|
34
|
+
/** Shows the choices as removable tokens below the trigger; the trigger then only shows the count. */
|
|
35
|
+
tokens?: UndMultiSelectElement['tokens'];
|
|
36
|
+
/** Most labels listed in the trigger before it switches to "N selected". */
|
|
37
|
+
summaryMax?: UndMultiSelectElement['summaryMax'];
|
|
38
|
+
/** Trigger text for a count; `{count}` is replaced. */
|
|
39
|
+
selectedMessage?: UndMultiSelectElement['selectedMessage'];
|
|
40
|
+
/** Accessible name of each token's remove button; `{label}` is replaced. */
|
|
41
|
+
removeLabel?: UndMultiSelectElement['removeLabel'];
|
|
42
|
+
/** The user changed the selection. */
|
|
43
|
+
onInput?: (event: UndEvent<Event, UndMultiSelectElement>) => void;
|
|
44
|
+
/** The user changed the selection. */
|
|
45
|
+
onChange?: (event: UndEvent<Event, UndMultiSelectElement>) => void;
|
|
46
|
+
/** The listbox opened or closed. */
|
|
47
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<unknown>, UndMultiSelectElement>) => void;
|
|
48
|
+
ref?: Ref<UndMultiSelectElement>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Chooses several options from a list. */
|
|
52
|
+
export function UndMultiSelect(props: UndMultiSelectProps): ReactElement {
|
|
53
|
+
const { onInput, onChange, onUndOpenChange, ref, ...rest } = props;
|
|
54
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
55
|
+
const controlled = useControlledProp<UndMultiSelectElement, 'value'>('value', props.value, ref);
|
|
56
|
+
return createElement('und-multi-select', {
|
|
57
|
+
...rest,
|
|
58
|
+
ref: controlled.ref,
|
|
59
|
+
'oninput': (event: UndEvent<Event, UndMultiSelectElement>) => {
|
|
60
|
+
onInput?.(event);
|
|
61
|
+
controlled.settle();
|
|
62
|
+
},
|
|
63
|
+
'onchange': onChange,
|
|
64
|
+
'onund-open-change': onUndOpenChange,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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/number-input.js';
|
|
7
|
+
import type { UndNumberInput as UndNumberInputElement } from '@und-ui/core';
|
|
8
|
+
import { useControlledProp, type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndNumberInputProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndNumberInputElement>, 'value' | 'defaultValue' | 'min' | 'max' | 'step' | 'largeStep' | 'locale' | 'currency' | 'minimumFractionDigits' | 'maximumFractionDigits' | 'noGrouping' | 'noSteppers' | 'size' | 'readOnly' | 'placeholder' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onInput' | 'onChange' | 'onUndValueChange'> {
|
|
12
|
+
/** The numeric value, or `null` when empty. The `value` attribute also sets the default that a form reset restores. */
|
|
13
|
+
value?: UndNumberInputElement['value'];
|
|
14
|
+
/** Value restored on form reset (defaults to the initial `value`). */
|
|
15
|
+
defaultValue?: UndNumberInputElement['defaultValue'];
|
|
16
|
+
/** Smallest allowed value. Typed values are clamped to it on commit. */
|
|
17
|
+
min?: UndNumberInputElement['min'];
|
|
18
|
+
/** Largest allowed value. Typed values are clamped to it on commit. */
|
|
19
|
+
max?: UndNumberInputElement['max'];
|
|
20
|
+
/** Amount of Up, Down and the stepper buttons. */
|
|
21
|
+
step?: UndNumberInputElement['step'];
|
|
22
|
+
/** Amount of Page Up and Page Down (default: ten steps). */
|
|
23
|
+
largeStep?: UndNumberInputElement['largeStep'];
|
|
24
|
+
/** BCP 47 locale used to format and parse (for example `en-IN`, `de-DE`, `hi-IN-u-nu-deva`). Defaults to the page language. */
|
|
25
|
+
locale?: UndNumberInputElement['locale'];
|
|
26
|
+
/** ISO 4217 currency code (`INR`): formats as money. */
|
|
27
|
+
currency?: UndNumberInputElement['currency'];
|
|
28
|
+
/** Fewest fraction digits shown. */
|
|
29
|
+
minimumFractionDigits?: UndNumberInputElement['minimumFractionDigits'];
|
|
30
|
+
/** Most fraction digits shown (default 3, or the digits of `step`). */
|
|
31
|
+
maximumFractionDigits?: UndNumberInputElement['maximumFractionDigits'];
|
|
32
|
+
/** Turns thousands grouping off. */
|
|
33
|
+
noGrouping?: UndNumberInputElement['noGrouping'];
|
|
34
|
+
/** Hides the stepper buttons (keyboard and wheel-free stepping still work). */
|
|
35
|
+
noSteppers?: UndNumberInputElement['noSteppers'];
|
|
36
|
+
/** Size of the field. */
|
|
37
|
+
size?: UndNumberInputElement['size'];
|
|
38
|
+
/** Makes the value read-only (still focusable and submitted). */
|
|
39
|
+
readOnly?: UndNumberInputElement['readOnly'];
|
|
40
|
+
/** Placeholder hint. Never a substitute for a label. */
|
|
41
|
+
placeholder?: UndNumberInputElement['placeholder'];
|
|
42
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
43
|
+
label?: UndNumberInputElement['label'];
|
|
44
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
45
|
+
description?: UndNumberInputElement['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?: UndNumberInputElement['error'];
|
|
48
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
49
|
+
required?: UndNumberInputElement['required'];
|
|
50
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
51
|
+
optional?: UndNumberInputElement['optional'];
|
|
52
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
53
|
+
disabled?: UndNumberInputElement['disabled'];
|
|
54
|
+
/** Name submitted with the form data. */
|
|
55
|
+
name?: UndNumberInputElement['name'];
|
|
56
|
+
/** Native `input` from the inner `<input>` (typing, and each step). */
|
|
57
|
+
onInput?: (event: UndEvent<InputEvent, UndNumberInputElement>) => void;
|
|
58
|
+
/** Native `change` when a value is committed (typed text, or a step). */
|
|
59
|
+
onChange?: (event: UndEvent<Event, UndNumberInputElement>) => void;
|
|
60
|
+
/** The numeric value changed by user input. */
|
|
61
|
+
onUndValueChange?: (event: UndEvent<CustomEvent<unknown>, UndNumberInputElement>) => void;
|
|
62
|
+
ref?: Ref<UndNumberInputElement>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** A labelled number input with steppers and locale-aware formatting. */
|
|
66
|
+
export function UndNumberInput(props: UndNumberInputProps): ReactElement {
|
|
67
|
+
const { onInput, onChange, onUndValueChange, ref, ...rest } = props;
|
|
68
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
69
|
+
const controlled = useControlledProp<UndNumberInputElement, 'value'>('value', props.value, ref);
|
|
70
|
+
return createElement('und-number-input', {
|
|
71
|
+
...rest,
|
|
72
|
+
ref: controlled.ref,
|
|
73
|
+
'oninput': (event: UndEvent<InputEvent, UndNumberInputElement>) => {
|
|
74
|
+
onInput?.(event);
|
|
75
|
+
controlled.settle();
|
|
76
|
+
},
|
|
77
|
+
'onchange': onChange,
|
|
78
|
+
'onund-value-change': onUndValueChange,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -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/outline.js';
|
|
7
|
+
import type { UndOutline as UndOutlineElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndOutlineProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndOutlineElement>, 'label' | 'heading' | 'target' | 'minLevel' | 'maxLevel' | 'current' | 'items' | 'targetElement' | 'onUndCurrentChange'> {
|
|
12
|
+
/** Accessible name of the navigation landmark (localise it). */
|
|
13
|
+
label?: UndOutlineElement['label'];
|
|
14
|
+
/** Visible title above the list. Empty hides it (the landmark keeps `label`). */
|
|
15
|
+
heading?: UndOutlineElement['heading'];
|
|
16
|
+
/** CSS selector of the container whose headings are listed, resolved in the tree that holds this element. Ignored when `items` or `targetElement` is set. */
|
|
17
|
+
target?: UndOutlineElement['target'];
|
|
18
|
+
/** Shallowest heading level to list (default 2, so `h1` page titles are skipped). */
|
|
19
|
+
minLevel?: UndOutlineElement['minLevel'];
|
|
20
|
+
/** Deepest heading level to list. */
|
|
21
|
+
maxLevel?: UndOutlineElement['maxLevel'];
|
|
22
|
+
/** `id` of the current section. Updated while reading; set it to override. */
|
|
23
|
+
current?: UndOutlineElement['current'];
|
|
24
|
+
/** Entries to show instead of scanning headings. Property only. */
|
|
25
|
+
items?: UndOutlineElement['items'];
|
|
26
|
+
/** The container to scan, as an element. Property only; wins over `target`. */
|
|
27
|
+
targetElement?: UndOutlineElement['targetElement'];
|
|
28
|
+
/** The current section changed while reading or after choosing an entry. */
|
|
29
|
+
onUndCurrentChange?: (event: UndEvent<CustomEvent<unknown>, UndOutlineElement>) => void;
|
|
30
|
+
ref?: Ref<UndOutlineElement>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** A table of contents that tracks the section being read. */
|
|
34
|
+
export function UndOutline(props: UndOutlineProps): ReactElement {
|
|
35
|
+
const { onUndCurrentChange, ...rest } = props;
|
|
36
|
+
return createElement('und-outline', {
|
|
37
|
+
...rest,
|
|
38
|
+
'onund-current-change': onUndCurrentChange,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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/overflow-list.js';
|
|
7
|
+
import type { UndOverflowList as UndOverflowListElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndOverflowListProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndOverflowListElement>, 'moreLabel' | 'open' | 'onUndOverflowChange'> {
|
|
12
|
+
/** The word after the count on the button ("+3 more"). Localise it; the number is formatted for the page language. */
|
|
13
|
+
moreLabel?: UndOverflowListElement['moreLabel'];
|
|
14
|
+
/** Whether the panel of collapsed items is open. */
|
|
15
|
+
open?: UndOverflowListElement['open'];
|
|
16
|
+
/** The number of collapsed items changed. */
|
|
17
|
+
onUndOverflowChange?: (event: UndEvent<CustomEvent<unknown>, UndOverflowListElement>) => void;
|
|
18
|
+
ref?: Ref<UndOverflowListElement>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** A row of items with a "+N more" panel for what does not fit. */
|
|
22
|
+
export function UndOverflowList(props: UndOverflowListProps): ReactElement {
|
|
23
|
+
const { onUndOverflowChange, ...rest } = props;
|
|
24
|
+
return createElement('und-overflow-list', {
|
|
25
|
+
...rest,
|
|
26
|
+
'onund-overflow-change': onUndOverflowChange,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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/radio-list.js';
|
|
7
|
+
import type { UndRadioList as UndRadioListElement } from '@und-ui/core';
|
|
8
|
+
import { useControlledProp, type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndRadioListProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndRadioListElement>, 'label' | 'description' | 'error' | 'value' | 'defaultValue' | 'name' | 'required' | 'disabled' | 'orientation' | 'onInput' | 'onChange'> {
|
|
12
|
+
/** Visible group label (referenced by `aria-labelledby`). */
|
|
13
|
+
label?: UndRadioListElement['label'];
|
|
14
|
+
/** Help text for the group, referenced by `aria-describedby`. */
|
|
15
|
+
description?: UndRadioListElement['description'];
|
|
16
|
+
/** Error message for the group. Setting it marks the group invalid. */
|
|
17
|
+
error?: UndRadioListElement['error'];
|
|
18
|
+
/** Value of the checked option (`''` when none is checked). */
|
|
19
|
+
value?: UndRadioListElement['value'];
|
|
20
|
+
/** Value checked after a form reset (defaults to the initial value). */
|
|
21
|
+
defaultValue?: UndRadioListElement['defaultValue'];
|
|
22
|
+
/** Name shared by the options and submitted with the form data. */
|
|
23
|
+
name?: UndRadioListElement['name'];
|
|
24
|
+
/** Requires a choice before the form submits. */
|
|
25
|
+
required?: UndRadioListElement['required'];
|
|
26
|
+
/** Disables every option. */
|
|
27
|
+
disabled?: UndRadioListElement['disabled'];
|
|
28
|
+
/** Layout of the options. Arrow keys work in both directions either way. */
|
|
29
|
+
orientation?: UndRadioListElement['orientation'];
|
|
30
|
+
/** Native `input` from the option that became checked. */
|
|
31
|
+
onInput?: (event: UndEvent<InputEvent, UndRadioListElement>) => void;
|
|
32
|
+
/** Native `change` from the option that became checked. */
|
|
33
|
+
onChange?: (event: UndEvent<Event, UndRadioListElement>) => void;
|
|
34
|
+
ref?: Ref<UndRadioListElement>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A labelled list of radio options as card-like rows with descriptions. */
|
|
38
|
+
export function UndRadioList(props: UndRadioListProps): ReactElement {
|
|
39
|
+
const { onInput, onChange, ref, ...rest } = props;
|
|
40
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
41
|
+
const controlled = useControlledProp<UndRadioListElement, 'value'>('value', props.value, ref);
|
|
42
|
+
return createElement('und-radio-list', {
|
|
43
|
+
...rest,
|
|
44
|
+
ref: controlled.ref,
|
|
45
|
+
'oninput': (event: UndEvent<InputEvent, UndRadioListElement>) => {
|
|
46
|
+
onInput?.(event);
|
|
47
|
+
controlled.settle();
|
|
48
|
+
},
|
|
49
|
+
'onchange': onChange,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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/resize-handle.js';
|
|
7
|
+
import type { UndResizeHandle as UndResizeHandleElement } from '@und-ui/core';
|
|
8
|
+
import { type UndEvent } from './shared.js';
|
|
9
|
+
|
|
10
|
+
export interface UndResizeHandleProps
|
|
11
|
+
extends Omit<HTMLAttributes<UndResizeHandleElement>, 'orientation' | 'value' | 'min' | 'max' | 'step' | 'collapsible' | 'collapsed' | 'for' | 'label' | 'onUndResize'> {
|
|
12
|
+
/** `vertical` (default): a vertical bar that resizes width. `horizontal`: a horizontal bar that resizes height. */
|
|
13
|
+
orientation?: UndResizeHandleElement['orientation'];
|
|
14
|
+
/** Size of the resized element as a percentage of its container. Unset: measured from the layout. */
|
|
15
|
+
value?: UndResizeHandleElement['value'];
|
|
16
|
+
/** Smallest size, in percent. */
|
|
17
|
+
min?: UndResizeHandleElement['min'];
|
|
18
|
+
/** Largest size, in percent. */
|
|
19
|
+
max?: UndResizeHandleElement['max'];
|
|
20
|
+
/** Percent moved by one arrow key press. */
|
|
21
|
+
step?: UndResizeHandleElement['step'];
|
|
22
|
+
/** Lets Enter collapse the element to nothing and restore it. */
|
|
23
|
+
collapsible?: UndResizeHandleElement['collapsible'];
|
|
24
|
+
/** The element is collapsed (size zero). */
|
|
25
|
+
collapsed?: UndResizeHandleElement['collapsed'];
|
|
26
|
+
/** Id of the element to resize. Default: the previous sibling. */
|
|
27
|
+
for?: UndResizeHandleElement['for'];
|
|
28
|
+
/** Accessible name (English default; override per locale). An `aria-label` or `aria-labelledby` attribute wins. */
|
|
29
|
+
label?: UndResizeHandleElement['label'];
|
|
30
|
+
/** The user changed the size, by keys or by dragging. */
|
|
31
|
+
onUndResize?: (event: UndEvent<CustomEvent<unknown>, UndResizeHandleElement>) => void;
|
|
32
|
+
ref?: Ref<UndResizeHandleElement>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A keyboard and pointer splitter that resizes the adjacent pane. */
|
|
36
|
+
export function UndResizeHandle(props: UndResizeHandleProps): ReactElement {
|
|
37
|
+
const { onUndResize, ...rest } = props;
|
|
38
|
+
return createElement('und-resize-handle', {
|
|
39
|
+
...rest,
|
|
40
|
+
'onund-resize': onUndResize,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -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/scroll-area.js';
|
|
7
|
+
import type { UndScrollArea as UndScrollAreaElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndScrollAreaProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndScrollAreaElement>, 'orientation' | 'label'> {
|
|
11
|
+
/** Scroll direction: `vertical` (default), `horizontal`, or `both`. Edge fades follow the main axis (the block axis for `both`). */
|
|
12
|
+
orientation?: UndScrollAreaElement['orientation'];
|
|
13
|
+
/** Accessible name. With it, an overflowing area is exposed as a region landmark. */
|
|
14
|
+
label?: UndScrollAreaElement['label'];
|
|
15
|
+
ref?: Ref<UndScrollAreaElement>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** A scroll container that is focusable when it overflows, with edge fades. */
|
|
19
|
+
export function UndScrollArea(props: UndScrollAreaProps): ReactElement {
|
|
20
|
+
return createElement('und-scroll-area', props);
|
|
21
|
+
}
|
|
@@ -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/section.js';
|
|
7
|
+
import type { UndSection as UndSectionElement } from '@und-ui/core';
|
|
8
|
+
|
|
9
|
+
export interface UndSectionProps
|
|
10
|
+
extends Omit<HTMLAttributes<UndSectionElement>, 'label' | 'padding' | 'tone'> {
|
|
11
|
+
/** Accessible name of the region. Takes precedence over the heading text. */
|
|
12
|
+
label?: UndSectionElement['label'];
|
|
13
|
+
/** Inner padding, a space token step (`0` to `32`). */
|
|
14
|
+
padding?: UndSectionElement['padding'];
|
|
15
|
+
/** Background: `default` (none) or `subtle`. */
|
|
16
|
+
tone?: UndSectionElement['tone'];
|
|
17
|
+
ref?: Ref<UndSectionElement>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** A page section that becomes a named region landmark when labelled. */
|
|
21
|
+
export function UndSection(props: UndSectionProps): ReactElement {
|
|
22
|
+
return createElement('und-section', props);
|
|
23
|
+
}
|