@iyulab/components 0.4.0 → 1.0.1
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/CHANGELOG.md +59 -0
- package/README.md +42 -236
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js +6 -0
- package/dist/_virtual/_glob-assets_raw/bell-fill.svg.d37c41d9.js +4 -0
- package/dist/_virtual/_glob-assets_raw/check-circle-fill.svg.51c33a2a.js +4 -0
- package/dist/_virtual/_glob-assets_raw/check-lg.svg.371c5e78.js +4 -0
- package/dist/_virtual/_glob-assets_raw/chevron-down.svg.0ccd06ea.js +4 -0
- package/dist/_virtual/_glob-assets_raw/chevron-left.svg.b4601050.js +4 -0
- package/dist/_virtual/_glob-assets_raw/chevron-right.svg.0711bb67.js +4 -0
- package/dist/_virtual/_glob-assets_raw/chevron-up.svg.ed917211.js +4 -0
- package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/dash-lg.svg.b40b8b3a.js +4 -0
- package/dist/_virtual/_glob-assets_raw/exclamation-circle-fill.svg.dc8c523e.js +4 -0
- package/dist/_virtual/_glob-assets_raw/exclamation-triangle-fill.svg.7949d2c7.js +4 -0
- package/dist/_virtual/_glob-assets_raw/eye-slash.svg.240afafa.js +4 -0
- package/dist/_virtual/_glob-assets_raw/eye.svg.2e5e9c4c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/info-circle-fill.svg.6580071d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +4 -0
- package/dist/_virtual/_glob-assets_raw/plus-lg.svg.294e9073.js +4 -0
- package/dist/_virtual/_glob-assets_raw/search.svg.0ba2012d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/star-fill.svg.f24b5a2d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/star.svg.4af61468.js +4 -0
- package/dist/_virtual/_glob-assets_raw/three-dots-vertical.svg.9fee78c5.js +4 -0
- package/dist/_virtual/_glob-assets_raw/three-dots.svg.6a7a5b23.js +4 -0
- package/dist/_virtual/_glob-assets_raw/x-lg.svg.f34b882c.js +4 -0
- package/dist/components/{UJsonElement.d.ts → UDataElement.d.ts} +3 -5
- package/dist/components/UDataElement.js +101 -0
- package/dist/components/{UJsonElement.styles.js → UDataElement.styles.js} +4 -4
- package/dist/components/UElement.d.ts +18 -23
- package/dist/components/UElement.js +82 -95
- package/dist/components/UElement.styles.js +43 -4
- package/dist/components/UFloatingElement.d.ts +69 -48
- package/dist/components/UFloatingElement.js +236 -193
- package/dist/components/UFloatingElement.styles.d.ts +8 -0
- package/dist/components/UFloatingElement.styles.js +28 -5
- package/dist/components/UFormControlElement.d.ts +57 -0
- package/dist/components/UFormControlElement.js +68 -0
- package/dist/components/UFormControlElement.styles.js +14 -0
- package/dist/components/UOverlayElement.d.ts +66 -0
- package/dist/components/UOverlayElement.js +123 -0
- package/dist/components/UOverlayElement.styles.d.ts +1 -0
- package/dist/components/UOverlayElement.styles.js +35 -0
- package/dist/components/alert/UAlert.d.ts +58 -3
- package/dist/components/alert/UAlert.js +115 -4
- package/dist/components/alert/UAlert.styles.js +73 -48
- package/dist/components/avatar/UAvatar.d.ts +27 -0
- package/dist/components/avatar/UAvatar.js +42 -0
- package/dist/components/avatar/UAvatar.styles.d.ts +1 -0
- package/dist/components/avatar/UAvatar.styles.js +45 -0
- package/dist/components/badge/UBadge.d.ts +28 -0
- package/dist/components/badge/UBadge.js +40 -0
- package/dist/components/badge/UBadge.styles.d.ts +1 -0
- package/dist/components/badge/UBadge.styles.js +113 -0
- package/dist/components/breadcrumb/UBreadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/UBreadcrumb.js +65 -0
- package/dist/components/breadcrumb/UBreadcrumb.styles.d.ts +1 -0
- package/dist/components/breadcrumb/UBreadcrumb.styles.js +37 -0
- package/dist/components/breadcrumb-item/UBreadcrumbItem.d.ts +30 -0
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +52 -0
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.d.ts +1 -0
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +41 -0
- package/dist/components/button/UButton.d.ts +46 -3
- package/dist/components/button/UButton.js +104 -4
- package/dist/components/button/UButton.styles.js +121 -48
- package/dist/components/button-group/UButtonGroup.d.ts +28 -0
- package/dist/components/button-group/UButtonGroup.js +93 -0
- package/dist/components/button-group/UButtonGroup.styles.d.ts +1 -0
- package/dist/components/button-group/UButtonGroup.styles.js +34 -0
- package/dist/components/card/UCard.d.ts +30 -3
- package/dist/components/card/UCard.js +61 -4
- package/dist/components/card/UCard.styles.js +13 -12
- package/dist/components/carousel/UCarousel.d.ts +65 -3
- package/dist/components/carousel/UCarousel.js +219 -2
- package/dist/components/carousel/UCarousel.styles.js +17 -17
- package/dist/components/checkbox/UCheckbox.d.ts +39 -0
- package/dist/components/checkbox/UCheckbox.js +88 -0
- package/dist/components/checkbox/UCheckbox.styles.d.ts +1 -0
- package/dist/components/checkbox/UCheckbox.styles.js +211 -0
- package/dist/components/chip/UChip.d.ts +43 -0
- package/dist/components/chip/UChip.js +103 -0
- package/dist/components/chip/UChip.styles.d.ts +1 -0
- package/dist/components/chip/UChip.styles.js +31 -0
- package/dist/components/dialog/UDialog.d.ts +29 -2
- package/dist/components/dialog/UDialog.js +66 -4
- package/dist/components/dialog/UDialog.styles.js +90 -39
- package/dist/components/divider/UDivider.d.ts +27 -2
- package/dist/components/divider/UDivider.js +45 -4
- package/dist/components/divider/UDivider.styles.js +80 -10
- package/dist/components/drawer/UDrawer.d.ts +25 -3
- package/dist/components/drawer/UDrawer.js +54 -4
- package/dist/components/drawer/UDrawer.styles.js +67 -60
- package/dist/components/field/UField.d.ts +31 -0
- package/dist/components/field/UField.js +64 -0
- package/dist/components/field/UField.styles.d.ts +1 -0
- package/dist/components/field/UField.styles.js +47 -0
- package/dist/components/form/UForm.d.ts +38 -2
- package/dist/components/form/UForm.js +105 -4
- package/dist/components/form/UForm.styles.js +5 -5
- package/dist/components/icon/UIcon.d.ts +23 -4
- package/dist/components/icon/UIcon.js +56 -4
- package/dist/components/icon/UIcon.styles.js +5 -6
- package/dist/components/icon-button/UIconButton.d.ts +48 -0
- package/dist/components/icon-button/UIconButton.js +88 -0
- package/dist/components/icon-button/UIconButton.styles.d.ts +1 -0
- package/dist/components/icon-button/UIconButton.styles.js +24 -0
- package/dist/components/input/UInput.d.ts +95 -3
- package/dist/components/input/UInput.js +258 -2
- package/dist/components/input/UInput.styles.js +120 -86
- package/dist/components/menu/UMenu.d.ts +41 -3
- package/dist/components/menu/UMenu.js +178 -4
- package/dist/components/menu/UMenu.styles.js +16 -30
- package/dist/components/menu-item/UMenuItem.d.ts +48 -2
- package/dist/components/menu-item/UMenuItem.js +159 -2
- package/dist/components/menu-item/UMenuItem.styles.js +120 -34
- package/dist/components/option/UOption.d.ts +42 -0
- package/dist/components/option/UOption.js +64 -0
- package/dist/components/option/UOption.styles.d.ts +1 -0
- package/dist/components/option/UOption.styles.js +132 -0
- package/dist/components/panel/UPanel.d.ts +22 -0
- package/dist/components/panel/UPanel.js +36 -0
- package/dist/components/panel/UPanel.styles.d.ts +1 -0
- package/dist/components/panel/UPanel.styles.js +14 -0
- package/dist/components/popover/UPopover.d.ts +69 -0
- package/dist/components/popover/UPopover.js +235 -0
- package/dist/components/popover/UPopover.styles.d.ts +1 -0
- package/dist/components/popover/UPopover.styles.js +9 -0
- package/dist/components/progress-bar/UProgressBar.d.ts +46 -2
- package/dist/components/progress-bar/UProgressBar.js +94 -2
- package/dist/components/progress-bar/UProgressBar.styles.js +110 -36
- package/dist/components/progress-ring/UProgressRing.d.ts +46 -3
- package/dist/components/progress-ring/UProgressRing.js +152 -2
- package/dist/components/progress-ring/UProgressRing.styles.js +88 -25
- package/dist/components/radio/URadio.d.ts +41 -0
- package/dist/components/radio/URadio.js +152 -0
- package/dist/components/radio/URadio.styles.d.ts +1 -0
- package/dist/components/radio/URadio.styles.js +111 -0
- package/dist/components/rating/URating.d.ts +48 -0
- package/dist/components/rating/URating.js +196 -0
- package/dist/components/rating/URating.styles.d.ts +1 -0
- package/dist/components/rating/URating.styles.js +55 -0
- package/dist/components/select/USelect.d.ts +70 -0
- package/dist/components/select/USelect.js +316 -0
- package/dist/components/select/USelect.styles.d.ts +1 -0
- package/dist/components/select/USelect.styles.js +200 -0
- package/dist/components/skeleton/USkeleton.d.ts +27 -3
- package/dist/components/skeleton/USkeleton.js +37 -4
- package/dist/components/skeleton/USkeleton.styles.js +15 -18
- package/dist/components/slider/USlider.d.ts +88 -0
- package/dist/components/slider/USlider.js +286 -0
- package/dist/components/slider/USlider.styles.d.ts +1 -0
- package/dist/components/slider/USlider.styles.js +125 -0
- package/dist/components/spinner/USpinner.d.ts +23 -2
- package/dist/components/spinner/USpinner.js +37 -3
- package/dist/components/spinner/USpinner.styles.js +34 -13
- package/dist/components/split-panel/USplitPanel.d.ts +49 -2
- package/dist/components/split-panel/USplitPanel.js +239 -3
- package/dist/components/split-panel/USplitPanel.styles.js +47 -15
- package/dist/components/switch/USwitch.d.ts +43 -0
- package/dist/components/switch/USwitch.js +80 -0
- package/dist/components/switch/USwitch.styles.d.ts +1 -0
- package/dist/components/switch/USwitch.styles.js +191 -0
- package/dist/components/tab/UTab.d.ts +31 -0
- package/dist/components/tab/UTab.js +68 -0
- package/dist/components/tab/UTab.styles.d.ts +1 -0
- package/dist/components/tab/UTab.styles.js +46 -0
- package/dist/components/tab-panel/UTabPanel.d.ts +45 -0
- package/dist/components/tab-panel/UTabPanel.js +150 -0
- package/dist/components/tab-panel/UTabPanel.styles.d.ts +1 -0
- package/dist/components/tab-panel/UTabPanel.styles.js +201 -0
- package/dist/components/tag/UTag.d.ts +26 -3
- package/dist/components/tag/UTag.js +41 -4
- package/dist/components/tag/UTag.styles.js +206 -60
- package/dist/components/textarea/UTextarea.d.ts +65 -0
- package/dist/components/textarea/UTextarea.js +148 -0
- package/dist/components/textarea/UTextarea.styles.d.ts +1 -0
- package/dist/components/textarea/UTextarea.styles.js +164 -0
- package/dist/components/tooltip/UTooltip.d.ts +28 -2
- package/dist/components/tooltip/UTooltip.js +104 -4
- package/dist/components/tooltip/UTooltip.styles.js +10 -12
- package/dist/components/tree/UTree.d.ts +62 -2
- package/dist/components/tree/UTree.js +308 -3
- package/dist/components/tree/UTree.styles.js +13 -19
- package/dist/components/tree-item/UTreeItem.d.ts +61 -2
- package/dist/components/tree-item/UTreeItem.js +191 -2
- package/dist/components/tree-item/UTreeItem.styles.js +96 -37
- package/dist/events/CheckEvent.d.ts +7 -0
- package/dist/events/CollapseEvent.d.ts +7 -0
- package/dist/events/ExpandEvent.d.ts +7 -0
- package/dist/events/HideEvent.d.ts +7 -0
- package/dist/events/NavigateEvent.d.ts +7 -0
- package/dist/events/PickEvent.d.ts +18 -0
- package/dist/events/RemoveEvent.d.ts +7 -0
- package/dist/events/ShiftEvent.d.ts +16 -0
- package/dist/events/ShowEvent.d.ts +7 -0
- package/dist/index.d.ts +37 -10
- package/dist/index.js +56 -52
- package/dist/react/UAlert.d.ts +13 -0
- package/dist/{react-components → react}/UAlert.js +5 -2
- package/dist/react/UAvatar.d.ts +9 -0
- package/dist/react/UAvatar.js +10 -0
- package/dist/react/UBadge.d.ts +9 -0
- package/dist/react/UBadge.js +10 -0
- package/dist/react/UBreadcrumb.d.ts +9 -0
- package/dist/react/UBreadcrumb.js +10 -0
- package/dist/react/UBreadcrumbItem.d.ts +11 -0
- package/dist/react/UBreadcrumbItem.js +12 -0
- package/dist/{react-components → react}/UButton.d.ts +3 -2
- package/dist/{react-components → react}/UButton.js +2 -2
- package/dist/react/UButtonGroup.d.ts +9 -0
- package/dist/react/UButtonGroup.js +10 -0
- package/dist/{react-components → react}/UCard.d.ts +3 -2
- package/dist/{react-components → react}/UCard.js +2 -2
- package/dist/{react-components → react}/UCarousel.d.ts +3 -2
- package/dist/{react-components → react}/UCarousel.js +2 -2
- package/dist/react/UCheckbox.d.ts +9 -0
- package/dist/react/UCheckbox.js +10 -0
- package/dist/react/UChip.d.ts +13 -0
- package/dist/react/UChip.js +13 -0
- package/dist/{react-components → react}/UDialog.d.ts +3 -2
- package/dist/{react-components → react}/UDialog.js +2 -2
- package/dist/{react-components → react}/UDivider.d.ts +3 -2
- package/dist/{react-components → react}/UDivider.js +2 -2
- package/dist/{react-components → react}/UDrawer.d.ts +3 -2
- package/dist/{react-components → react}/UDrawer.js +2 -2
- package/dist/react/UField.d.ts +9 -0
- package/dist/react/UField.js +10 -0
- package/dist/react/UForm.d.ts +10 -0
- package/dist/{react-components → react}/UForm.js +4 -2
- package/dist/{react-components → react}/UIcon.d.ts +3 -2
- package/dist/{react-components → react}/UIcon.js +2 -2
- package/dist/react/UIconButton.d.ts +9 -0
- package/dist/react/UIconButton.js +10 -0
- package/dist/react/UInput.d.ts +11 -0
- package/dist/{react-components → react}/UInput.js +5 -2
- package/dist/react/UMenu.d.ts +10 -0
- package/dist/{react-components → react}/UMenu.js +4 -2
- package/dist/react/UMenuItem.d.ts +11 -0
- package/dist/{react-components → react}/UMenuItem.js +4 -2
- package/dist/react/UOption.d.ts +9 -0
- package/dist/react/UOption.js +10 -0
- package/dist/react/UPanel.d.ts +9 -0
- package/dist/react/UPanel.js +10 -0
- package/dist/react/UPopover.d.ts +11 -0
- package/dist/react/UPopover.js +13 -0
- package/dist/react/UProgressBar.d.ts +9 -0
- package/dist/{react-components → react}/UProgressBar.js +2 -2
- package/dist/react/UProgressRing.d.ts +9 -0
- package/dist/{react-components → react}/UProgressRing.js +2 -2
- package/dist/react/URadio.d.ts +10 -0
- package/dist/react/URadio.js +12 -0
- package/dist/react/URating.d.ts +10 -0
- package/dist/react/URating.js +12 -0
- package/dist/react/USelect.d.ts +10 -0
- package/dist/react/USelect.js +12 -0
- package/dist/{react-components → react}/USkeleton.d.ts +3 -2
- package/dist/{react-components → react}/USkeleton.js +2 -2
- package/dist/react/USlider.d.ts +10 -0
- package/dist/react/USlider.js +12 -0
- package/dist/{react-components → react}/USpinner.d.ts +3 -2
- package/dist/{react-components → react}/USpinner.js +2 -2
- package/dist/react/USplitPanel.d.ts +13 -0
- package/dist/{react-components → react}/USplitPanel.js +6 -2
- package/dist/react/USwitch.d.ts +10 -0
- package/dist/react/USwitch.js +12 -0
- package/dist/react/UTab.d.ts +11 -0
- package/dist/react/UTab.js +12 -0
- package/dist/react/UTabPanel.d.ts +9 -0
- package/dist/react/UTabPanel.js +10 -0
- package/dist/{react-components → react}/UTag.d.ts +3 -2
- package/dist/{react-components → react}/UTag.js +2 -2
- package/dist/react/UTextarea.d.ts +11 -0
- package/dist/react/UTextarea.js +13 -0
- package/dist/react/UTooltip.d.ts +11 -0
- package/dist/{react-components → react}/UTooltip.js +5 -2
- package/dist/react/UTree.d.ts +10 -0
- package/dist/{react-components → react}/UTree.js +4 -2
- package/dist/react/UTreeItem.d.ts +17 -0
- package/dist/{react-components → react}/UTreeItem.js +7 -2
- package/dist/{react-components → react}/index.d.ts +40 -27
- package/dist/{react-components → react}/index.js +40 -20
- package/dist/{assets/styles → styles}/dark.css +68 -3
- package/dist/{assets/styles → styles}/light.css +68 -3
- package/dist/utilities/BrowserStorage.d.ts +2 -1
- package/dist/utilities/BrowserStorage.js +69 -86
- package/dist/utilities/Dialog.d.ts +83 -0
- package/dist/utilities/Dialog.js +141 -0
- package/dist/utilities/OverlayManager.d.ts +37 -0
- package/dist/utilities/OverlayManager.js +68 -0
- package/dist/utilities/Theme.js +134 -141
- package/dist/utilities/Toast.d.ts +45 -0
- package/dist/utilities/Toast.js +114 -0
- package/dist/utilities/converters.d.ts +44 -1
- package/dist/utilities/converters.js +112 -14
- package/dist/utilities/elements.js +62 -33
- package/dist/utilities/icons.d.ts +67 -0
- package/dist/utilities/icons.js +200 -0
- package/dist/utilities/sanitizers.js +64 -32
- package/package.json +26 -19
- package/plugins/vite-plugin-glob-resolve.d.ts +12 -0
- package/plugins/vite-plugin-glob-resolve.js +66 -0
- package/plugins/vite-plugin-react-wrapper.d.ts +12 -0
- package/plugins/vite-plugin-react-wrapper.js +206 -0
- package/skills/iyulab-components/SKILL.md +138 -0
- package/skills/iyulab-components/references/components/alert.md +74 -0
- package/skills/iyulab-components/references/components/avatar.md +41 -0
- package/skills/iyulab-components/references/components/badge.md +38 -0
- package/skills/iyulab-components/references/components/breadcrumb.md +75 -0
- package/skills/iyulab-components/references/components/button-group.md +38 -0
- package/skills/iyulab-components/references/components/button.md +56 -0
- package/skills/iyulab-components/references/components/card.md +53 -0
- package/skills/iyulab-components/references/components/carousel.md +63 -0
- package/skills/iyulab-components/references/components/checkbox.md +70 -0
- package/skills/iyulab-components/references/components/chip.md +64 -0
- package/skills/iyulab-components/references/components/dialog.md +71 -0
- package/skills/iyulab-components/references/components/divider.md +56 -0
- package/skills/iyulab-components/references/components/drawer.md +63 -0
- package/skills/iyulab-components/references/components/field.md +42 -0
- package/skills/iyulab-components/references/components/form.md +68 -0
- package/skills/iyulab-components/references/components/icon-button.md +56 -0
- package/skills/iyulab-components/references/components/icon.md +49 -0
- package/skills/iyulab-components/references/components/input.md +95 -0
- package/skills/iyulab-components/references/components/menu.md +106 -0
- package/skills/iyulab-components/references/components/option.md +70 -0
- package/skills/iyulab-components/references/components/panel.md +38 -0
- package/skills/iyulab-components/references/components/popover.md +62 -0
- package/skills/iyulab-components/references/components/progress-bar.md +61 -0
- package/skills/iyulab-components/references/components/progress-ring.md +58 -0
- package/skills/iyulab-components/references/components/radio.md +67 -0
- package/skills/iyulab-components/references/components/rating.md +74 -0
- package/skills/iyulab-components/references/components/select.md +86 -0
- package/skills/iyulab-components/references/components/skeleton.md +46 -0
- package/skills/iyulab-components/references/components/slider.md +89 -0
- package/skills/iyulab-components/references/components/spinner.md +47 -0
- package/skills/iyulab-components/references/components/split-panel.md +65 -0
- package/skills/iyulab-components/references/components/switch.md +81 -0
- package/skills/iyulab-components/references/components/tab-panel.md +93 -0
- package/skills/iyulab-components/references/components/tag.md +55 -0
- package/skills/iyulab-components/references/components/textarea.md +67 -0
- package/skills/iyulab-components/references/components/tooltip.md +58 -0
- package/skills/iyulab-components/references/components/tree.md +128 -0
- package/skills/iyulab-components/references/extensions/data.md +60 -0
- package/skills/iyulab-components/references/extensions/element.md +57 -0
- package/skills/iyulab-components/references/extensions/floating.md +60 -0
- package/skills/iyulab-components/references/extensions/form-control.md +79 -0
- package/skills/iyulab-components/references/extensions/overlay.md +76 -0
- package/skills/iyulab-components/references/usage.md +216 -0
- package/skills/iyulab-components/references/utilities/browser-storage.md +54 -0
- package/skills/iyulab-components/references/utilities/converters.md +42 -0
- package/skills/iyulab-components/references/utilities/dialog.md +75 -0
- package/skills/iyulab-components/references/utilities/elements.md +55 -0
- package/skills/iyulab-components/references/utilities/icons.md +53 -0
- package/skills/iyulab-components/references/utilities/overlay-manager.md +34 -0
- package/skills/iyulab-components/references/utilities/sanitizers.md +32 -0
- package/skills/iyulab-components/references/utilities/theme.md +45 -0
- package/skills/iyulab-components/references/utilities/toast.md +58 -0
- package/dist/assets/icons/arrow-down-up.svg.js +0 -3
- package/dist/assets/icons/arrow-down.svg.js +0 -3
- package/dist/assets/icons/arrow-repeat.svg.js +0 -3
- package/dist/assets/icons/arrow-up.svg.js +0 -3
- package/dist/assets/icons/ban.svg.js +0 -3
- package/dist/assets/icons/bell-fill.svg.js +0 -3
- package/dist/assets/icons/box-arrow-up-right.svg.js +0 -3
- package/dist/assets/icons/check-circle-fill.svg.js +0 -3
- package/dist/assets/icons/check-lg.svg.js +0 -3
- package/dist/assets/icons/chevron-down.svg.js +0 -3
- package/dist/assets/icons/chevron-left.svg.js +0 -3
- package/dist/assets/icons/chevron-right.svg.js +0 -3
- package/dist/assets/icons/chevron-up.svg.js +0 -3
- package/dist/assets/icons/code-slash.svg.js +0 -3
- package/dist/assets/icons/copy.svg.js +0 -3
- package/dist/assets/icons/dash-lg.svg.js +0 -3
- package/dist/assets/icons/download.svg.js +0 -3
- package/dist/assets/icons/exclamation-circle-fill.svg.js +0 -3
- package/dist/assets/icons/exclamation-triangle-fill.svg.js +0 -3
- package/dist/assets/icons/eye-slash.svg.js +0 -3
- package/dist/assets/icons/eye.svg.js +0 -3
- package/dist/assets/icons/file-earmark.svg.js +0 -3
- package/dist/assets/icons/flag.svg.js +0 -3
- package/dist/assets/icons/globe.svg.js +0 -3
- package/dist/assets/icons/hand-thumbs-down-fill.svg.js +0 -3
- package/dist/assets/icons/hand-thumbs-down.svg.js +0 -3
- package/dist/assets/icons/hand-thumbs-up-fill.svg.js +0 -3
- package/dist/assets/icons/hand-thumbs-up.svg.js +0 -3
- package/dist/assets/icons/info-circle-fill.svg.js +0 -3
- package/dist/assets/icons/lightbulb-fill.svg.js +0 -3
- package/dist/assets/icons/lightbulb-off.svg.js +0 -3
- package/dist/assets/icons/lightbulb.svg.js +0 -3
- package/dist/assets/icons/mic-fill.svg.js +0 -3
- package/dist/assets/icons/mic-mute-fill.svg.js +0 -3
- package/dist/assets/icons/paperclip.svg.js +0 -3
- package/dist/assets/icons/pencil-square.svg.js +0 -3
- package/dist/assets/icons/plus-lg.svg.js +0 -3
- package/dist/assets/icons/search.svg.js +0 -3
- package/dist/assets/icons/share.svg.js +0 -3
- package/dist/assets/icons/sort-alpha-down.svg.js +0 -3
- package/dist/assets/icons/sort-alpha-up.svg.js +0 -3
- package/dist/assets/icons/stop-circle.svg.js +0 -3
- package/dist/assets/icons/tools.svg.js +0 -3
- package/dist/assets/icons/x-lg.svg.js +0 -3
- package/dist/assets/styles/dark.css.js +0 -3
- package/dist/assets/styles/light.css.js +0 -3
- package/dist/components/UJsonElement.js +0 -93
- package/dist/components/UModalElement.d.ts +0 -70
- package/dist/components/UModalElement.js +0 -144
- package/dist/components/UModalElement.styles.js +0 -29
- package/dist/components/alert/UAlert.component.d.ts +0 -40
- package/dist/components/alert/UAlert.component.js +0 -146
- package/dist/components/button/UButton.component.d.ts +0 -23
- package/dist/components/button/UButton.component.js +0 -72
- package/dist/components/card/UCard.component.d.ts +0 -21
- package/dist/components/card/UCard.component.js +0 -66
- package/dist/components/carousel/UCarousel.component.d.ts +0 -78
- package/dist/components/carousel/UCarousel.component.js +0 -264
- package/dist/components/dialog/UDialog.component.d.ts +0 -17
- package/dist/components/dialog/UDialog.component.js +0 -70
- package/dist/components/divider/UDivider.component.d.ts +0 -10
- package/dist/components/divider/UDivider.component.js +0 -30
- package/dist/components/drawer/UDrawer.component.d.ts +0 -18
- package/dist/components/drawer/UDrawer.component.js +0 -64
- package/dist/components/form/UForm.component.d.ts +0 -24
- package/dist/components/form/UForm.component.js +0 -76
- package/dist/components/icon/UIcon.component.d.ts +0 -29
- package/dist/components/icon/UIcon.component.js +0 -57
- package/dist/components/input/UInput.component.d.ts +0 -92
- package/dist/components/input/UInput.component.js +0 -267
- package/dist/components/menu/UMenu.component.d.ts +0 -67
- package/dist/components/menu/UMenu.component.js +0 -338
- package/dist/components/menu-item/UMenuItem.component.d.ts +0 -25
- package/dist/components/menu-item/UMenuItem.component.js +0 -111
- package/dist/components/progress-bar/UProgressBar.component.d.ts +0 -27
- package/dist/components/progress-bar/UProgressBar.component.js +0 -99
- package/dist/components/progress-ring/UProgressRing.component.d.ts +0 -33
- package/dist/components/progress-ring/UProgressRing.component.js +0 -114
- package/dist/components/skeleton/USkeleton.component.d.ts +0 -22
- package/dist/components/skeleton/USkeleton.component.js +0 -58
- package/dist/components/spinner/USpinner.component.d.ts +0 -9
- package/dist/components/spinner/USpinner.component.js +0 -22
- package/dist/components/split-panel/USplitPanel.component.d.ts +0 -44
- package/dist/components/split-panel/USplitPanel.component.js +0 -185
- package/dist/components/tag/UTag.component.d.ts +0 -23
- package/dist/components/tag/UTag.component.js +0 -72
- package/dist/components/tooltip/UTooltip.component.d.ts +0 -27
- package/dist/components/tooltip/UTooltip.component.js +0 -88
- package/dist/components/tree/UTree.component.d.ts +0 -37
- package/dist/components/tree/UTree.component.js +0 -120
- package/dist/components/tree-item/UTreeItem.component.d.ts +0 -41
- package/dist/components/tree-item/UTreeItem.component.js +0 -161
- package/dist/events/UChangeEvent.d.ts +0 -6
- package/dist/events/UHideEvent.d.ts +0 -6
- package/dist/events/UInputEvent.d.ts +0 -6
- package/dist/events/UResizeEvent.d.ts +0 -6
- package/dist/events/USelectEvent.d.ts +0 -6
- package/dist/events/UShowEvent.d.ts +0 -6
- package/dist/react-components/UAlert.d.ts +0 -8
- package/dist/react-components/UForm.d.ts +0 -8
- package/dist/react-components/UInput.d.ts +0 -8
- package/dist/react-components/UMenu.d.ts +0 -8
- package/dist/react-components/UMenuItem.d.ts +0 -8
- package/dist/react-components/UProgressBar.d.ts +0 -8
- package/dist/react-components/UProgressRing.d.ts +0 -8
- package/dist/react-components/USplitPanel.d.ts +0 -8
- package/dist/react-components/UTooltip.d.ts +0 -8
- package/dist/react-components/UTree.d.ts +0 -8
- package/dist/react-components/UTreeItem.d.ts +0 -8
- package/dist/utilities/IconRegistry.d.ts +0 -40
- package/dist/utilities/IconRegistry.js +0 -134
- package/dist/utilities/Notifier.d.ts +0 -31
- package/dist/utilities/Notifier.js +0 -79
- package/dist/utilities/decorators.d.ts +0 -28
- /package/dist/components/{UJsonElement.styles.d.ts → UDataElement.styles.d.ts} +0 -0
- /package/dist/components/{UModalElement.styles.d.ts → UFormControlElement.styles.d.ts} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# u-switch
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/switch/USwitch.js';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
**Tag:** `u-switch`
|
|
8
|
+
|
|
9
|
+
Toggle switch (on/off). Supports custom track and thumb content via slots. Form-associated.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-switch name="notifications" checked>Enable notifications</u-switch>
|
|
13
|
+
|
|
14
|
+
<!-- Custom track labels -->
|
|
15
|
+
<u-switch name="mode">
|
|
16
|
+
<span slot="track-checked">ON</span>
|
|
17
|
+
<span slot="track-unchecked">OFF</span>
|
|
18
|
+
Dark mode
|
|
19
|
+
</u-switch>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Slots
|
|
25
|
+
|
|
26
|
+
| Name | Description |
|
|
27
|
+
|------|-------------|
|
|
28
|
+
| *(default)* | Label text |
|
|
29
|
+
| `track-checked` | Content inside the track when checked |
|
|
30
|
+
| `track-unchecked` | Content inside the track when unchecked |
|
|
31
|
+
| `thumb-checked` | Thumb content when checked |
|
|
32
|
+
| `thumb-unchecked` | Thumb content when unchecked |
|
|
33
|
+
|
|
34
|
+
## Properties
|
|
35
|
+
|
|
36
|
+
| Property | Type | Default | Reflect | Description |
|
|
37
|
+
|----------|------|---------|---------|-------------|
|
|
38
|
+
| `checked` | `boolean` | `false` | ✓ | On/off state |
|
|
39
|
+
| `disabled` | `boolean` | `false` | ✓ | Disable |
|
|
40
|
+
| `readonly` | `boolean` | `false` | ✓ | Read-only |
|
|
41
|
+
| `required` | `boolean` | `false` | ✓ | Required |
|
|
42
|
+
| `invalid` | `boolean` | `false` | ✓ | Validation failed |
|
|
43
|
+
| `name` | `string` | — | — | Form field name |
|
|
44
|
+
| `value` | `string` | — | — | Submitted value |
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
| Event | Description |
|
|
49
|
+
|-------|-------------|
|
|
50
|
+
| `change` | Fires when checked state changes |
|
|
51
|
+
|
|
52
|
+
## Methods
|
|
53
|
+
|
|
54
|
+
| Method | Description |
|
|
55
|
+
|--------|-------------|
|
|
56
|
+
| `validate()` | Validate; sets `invalid` |
|
|
57
|
+
| `reset()` | Reset state |
|
|
58
|
+
|
|
59
|
+
## CSS Parts
|
|
60
|
+
|
|
61
|
+
| Part | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `wrapper` | Outer layout wrapper |
|
|
64
|
+
| `track` | Track element |
|
|
65
|
+
| `thumb` | Thumb element |
|
|
66
|
+
| `label` | Label text wrapper |
|
|
67
|
+
|
|
68
|
+
## CSS Custom Properties
|
|
69
|
+
|
|
70
|
+
| Property | Description |
|
|
71
|
+
|----------|-------------|
|
|
72
|
+
| `--switch-track-width` | Track width |
|
|
73
|
+
| `--switch-track-height` | Track height |
|
|
74
|
+
| `--switch-track-color` | Track color (unchecked) |
|
|
75
|
+
| `--switch-track-color-checked` | Track color (checked) |
|
|
76
|
+
| `--switch-thumb-size` | Thumb diameter |
|
|
77
|
+
| `--switch-thumb-offset` | Thumb padding from track edge |
|
|
78
|
+
| `--switch-thumb-color` | Thumb color (unchecked) |
|
|
79
|
+
| `--switch-thumb-color-checked` | Thumb color (checked) |
|
|
80
|
+
| `--switch-radius` | Track border radius |
|
|
81
|
+
| `--switch-duration` | Transition animation duration |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# u-tab-panel / u-tab
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/tab-panel/UTabPanel.js';
|
|
5
|
+
import '@iyulab/components/dist/components/tab/UTab.js';
|
|
6
|
+
import '@iyulab/components/dist/components/panel/UPanel.js';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
**Tags:** `u-tab-panel`, `u-tab`
|
|
10
|
+
|
|
11
|
+
Tab-based content switcher. Pair each `u-tab` with a `u-panel` of the same `value`.
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<u-tab-panel value="home">
|
|
15
|
+
<u-tab value="home">Home</u-tab>
|
|
16
|
+
<u-tab value="profile">Profile</u-tab>
|
|
17
|
+
<u-tab value="settings">Settings</u-tab>
|
|
18
|
+
|
|
19
|
+
<u-panel value="home">Home content</u-panel>
|
|
20
|
+
<u-panel value="profile">Profile content</u-panel>
|
|
21
|
+
<u-panel value="settings">Settings content</u-panel>
|
|
22
|
+
</u-tab-panel>
|
|
23
|
+
|
|
24
|
+
<!-- Card variant, right placement, editable -->
|
|
25
|
+
<u-tab-panel variant="card" placement="left" editable draggable>
|
|
26
|
+
<u-tab value="a" removable>Tab A</u-tab>
|
|
27
|
+
<u-panel value="a">Panel A</u-panel>
|
|
28
|
+
</u-tab-panel>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## u-tab-panel
|
|
34
|
+
|
|
35
|
+
### Slots
|
|
36
|
+
|
|
37
|
+
| Name | Description |
|
|
38
|
+
|------|-------------|
|
|
39
|
+
| *(default)* | `u-tab` and `u-panel` elements |
|
|
40
|
+
| `toolbar` | Toolbar area at the end of the tab bar |
|
|
41
|
+
|
|
42
|
+
### Properties
|
|
43
|
+
|
|
44
|
+
| Property | Type | Default | Reflect | Description |
|
|
45
|
+
|----------|------|---------|---------|-------------|
|
|
46
|
+
| `value` | `string` | `''` | ✓ | Currently active tab value |
|
|
47
|
+
| `variant` | `'line'\|'card'\|'pill'\|'plain'` | `'line'` | ✓ | Tab bar style |
|
|
48
|
+
| `placement` | `'top'\|'bottom'\|'left'\|'right'` | `'top'` | ✓ | Tab bar position |
|
|
49
|
+
| `editable` | `boolean` | `false` | ✓ | Allow adding/removing tabs |
|
|
50
|
+
| `draggable` | `boolean` | `false` | ✓ | Allow reordering tabs by drag |
|
|
51
|
+
| `disabled` | `boolean` | `false` | ✓ | Disable all tabs |
|
|
52
|
+
|
|
53
|
+
### CSS Parts
|
|
54
|
+
|
|
55
|
+
| Part | Description |
|
|
56
|
+
|------|-------------|
|
|
57
|
+
| `header` | Tab bar row |
|
|
58
|
+
| `nav` | Tab navigation container |
|
|
59
|
+
| `toolbar` | Toolbar slot area |
|
|
60
|
+
| `content` | Panel content area |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## u-tab
|
|
65
|
+
|
|
66
|
+
### Slots
|
|
67
|
+
|
|
68
|
+
| Name | Description |
|
|
69
|
+
|------|-------------|
|
|
70
|
+
| `prefix` | Leading content |
|
|
71
|
+
| *(default)* | Tab label |
|
|
72
|
+
| `suffix` | Trailing content |
|
|
73
|
+
|
|
74
|
+
### Properties
|
|
75
|
+
|
|
76
|
+
| Property | Type | Default | Reflect | Description |
|
|
77
|
+
|----------|------|---------|---------|-------------|
|
|
78
|
+
| `value` | `string` | `''` | ✓ | Matches a `u-panel` with the same `value` |
|
|
79
|
+
| `disabled` | `boolean` | `false` | ✓ | Disable the tab |
|
|
80
|
+
| `removable` | `boolean` | `false` | ✓ | Show close/remove button |
|
|
81
|
+
| `draggable` | `boolean` | `false` | ✓ | Allow dragging to reorder |
|
|
82
|
+
|
|
83
|
+
### Events
|
|
84
|
+
|
|
85
|
+
| Event | Cancelable | Description |
|
|
86
|
+
|-------|------------|-------------|
|
|
87
|
+
| `remove` | ✓ | Fires when the remove button is clicked |
|
|
88
|
+
|
|
89
|
+
### CSS Parts
|
|
90
|
+
|
|
91
|
+
| Part | Description |
|
|
92
|
+
|------|-------------|
|
|
93
|
+
| `remove-btn` | Remove button |
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# u-tag
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/tag/UTag.js';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
**Tag:** `u-tag`
|
|
8
|
+
|
|
9
|
+
Non-interactive label tag for categories, status, or metadata display.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-tag>Default</u-tag>
|
|
13
|
+
<u-tag color="blue" variant="outlined">TypeScript</u-tag>
|
|
14
|
+
<u-tag color="green" rounded>Active</u-tag>
|
|
15
|
+
|
|
16
|
+
<!-- With icon prefix -->
|
|
17
|
+
<u-tag color="red">
|
|
18
|
+
<u-icon slot="prefix" lib="tabler" name="alert-circle"></u-icon>
|
|
19
|
+
Error
|
|
20
|
+
</u-tag>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For interactive chips (selectable/removable), use [`u-chip`](./chip.md) instead.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Name | Description |
|
|
30
|
+
|------|-------------|
|
|
31
|
+
| `prefix` | Leading content |
|
|
32
|
+
| *(default)* | Tag label |
|
|
33
|
+
| `suffix` | Trailing content |
|
|
34
|
+
|
|
35
|
+
## Properties
|
|
36
|
+
|
|
37
|
+
| Property | Type | Default | Reflect | Description |
|
|
38
|
+
|----------|------|---------|---------|-------------|
|
|
39
|
+
| `variant` | `'solid'\|'surface'\|'filled'\|'outlined'` | `'filled'` | ✓ | Visual style |
|
|
40
|
+
| `color` | `'neutral'\|'blue'\|'green'\|'yellow'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Color |
|
|
41
|
+
| `rounded` | `boolean` | `false` | ✓ | Pill shape |
|
|
42
|
+
|
|
43
|
+
## CSS Parts
|
|
44
|
+
|
|
45
|
+
| Part | Description |
|
|
46
|
+
|------|-------------|
|
|
47
|
+
| `content` | Inner content wrapper |
|
|
48
|
+
|
|
49
|
+
## CSS Custom Properties
|
|
50
|
+
|
|
51
|
+
| Property | Description |
|
|
52
|
+
|----------|-------------|
|
|
53
|
+
| `--tag-color` | Text color |
|
|
54
|
+
| `--tag-bg-color` | Background color |
|
|
55
|
+
| `--tag-border-color` | Border color |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# u-textarea
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/textarea/UTextarea.js';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
**Tag:** `u-textarea`
|
|
8
|
+
|
|
9
|
+
Multi-line text input with auto-resize and optional character counter. Form-associated.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-textarea name="bio" placeholder="Tell us about yourself" auto-resize></u-textarea>
|
|
13
|
+
|
|
14
|
+
<!-- With counter and max length -->
|
|
15
|
+
<u-textarea name="comment" maxlength="500" counter min-rows="3" max-rows="8">
|
|
16
|
+
</u-textarea>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
| Property | Type | Default | Reflect | Description |
|
|
24
|
+
|----------|------|---------|---------|-------------|
|
|
25
|
+
| `value` | `string` | — | — | Current text value |
|
|
26
|
+
| `variant` | `'outlined'\|'filled'\|'underlined'\|'borderless'` | `'outlined'` | ✓ | Visual style |
|
|
27
|
+
| `resize` | `'none'\|'vertical'\|'horizontal'\|'both'\|'auto'` | `'auto'` | ✓ | Resize behavior |
|
|
28
|
+
| `minRows` | `number` | — | — | Minimum visible rows |
|
|
29
|
+
| `maxRows` | `number` | — | — | Maximum rows (auto-resize cap) |
|
|
30
|
+
| `counter` | `boolean` | `false` | ✓ | Show character counter |
|
|
31
|
+
| `minlength` | `number` | — | — | Minimum character count |
|
|
32
|
+
| `maxlength` | `number` | — | — | Maximum character count |
|
|
33
|
+
| `placeholder` | `string` | — | — | Placeholder text |
|
|
34
|
+
| `autofocus` | `boolean` | `false` | — | Auto-focus on render |
|
|
35
|
+
| `autocomplete` | `AutoFill` | — | — | Browser autocomplete |
|
|
36
|
+
| `spellcheck` | `boolean` | `false` | — | Spellcheck |
|
|
37
|
+
| `disabled` | `boolean` | `false` | ✓ | Disable |
|
|
38
|
+
| `readonly` | `boolean` | `false` | ✓ | Read-only |
|
|
39
|
+
| `required` | `boolean` | `false` | ✓ | Required |
|
|
40
|
+
| `invalid` | `boolean` | `false` | ✓ | Validation failed |
|
|
41
|
+
| `name` | `string` | — | — | Form field name |
|
|
42
|
+
| `label` | `string` | — | — | Field label |
|
|
43
|
+
| `description` | `string` | — | — | Helper text |
|
|
44
|
+
| `validationMessage` | `string` | — | — | Custom validation message |
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
| Event | Description |
|
|
49
|
+
|-------|-------------|
|
|
50
|
+
| `input` | Fires on every keystroke |
|
|
51
|
+
| `change` | Fires when value is committed |
|
|
52
|
+
|
|
53
|
+
## Methods
|
|
54
|
+
|
|
55
|
+
| Method | Description |
|
|
56
|
+
|--------|-------------|
|
|
57
|
+
| `validate()` | Validate; sets `invalid` |
|
|
58
|
+
| `reset()` | Reset value |
|
|
59
|
+
|
|
60
|
+
## CSS Parts
|
|
61
|
+
|
|
62
|
+
| Part | Description |
|
|
63
|
+
|------|-------------|
|
|
64
|
+
| `field` | Outer wrapper |
|
|
65
|
+
| `container` | Textarea area wrapper |
|
|
66
|
+
| `textarea` | Native `<textarea>` element |
|
|
67
|
+
| `counter` | Character counter display |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# u-tooltip
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/tooltip/UTooltip.js';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
**Tag:** `u-tooltip`
|
|
8
|
+
|
|
9
|
+
Hover/focus tooltip anchored to a `for` target. Opens and closes automatically.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-button id="save-btn">Save</u-button>
|
|
13
|
+
<u-tooltip for="#save-btn" placement="top">
|
|
14
|
+
Save your changes (Ctrl+S)
|
|
15
|
+
</u-tooltip>
|
|
16
|
+
|
|
17
|
+
<!-- Interactive tooltip (stays open when hovered) -->
|
|
18
|
+
<u-tooltip for="#info" interactive placement="bottom" offset="8">
|
|
19
|
+
<a href="/docs">Learn more</a>
|
|
20
|
+
</u-tooltip>
|
|
21
|
+
|
|
22
|
+
<!-- Tracking cursor position -->
|
|
23
|
+
<u-tooltip for="#chart" tracking>
|
|
24
|
+
Data point detail
|
|
25
|
+
</u-tooltip>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Slots
|
|
31
|
+
|
|
32
|
+
| Name | Description |
|
|
33
|
+
|------|-------------|
|
|
34
|
+
| *(default)* | Tooltip content |
|
|
35
|
+
|
|
36
|
+
## Properties
|
|
37
|
+
|
|
38
|
+
Inherits all `UFloatingElement` properties (see [floating.md](../extensions/floating.md)), plus:
|
|
39
|
+
|
|
40
|
+
| Property | Type | Default | Reflect | Description |
|
|
41
|
+
|----------|------|---------|---------|-------------|
|
|
42
|
+
| `for` | `string` | — | ✓ | CSS selector of the target element |
|
|
43
|
+
| `open` | `boolean` | `false` | ✓ | Visibility state |
|
|
44
|
+
| `placement` | `Placement` | — | — | Preferred placement |
|
|
45
|
+
| `offset` | `OffsetOptions` | `0` | — | Gap from target |
|
|
46
|
+
| `shift` | `boolean` | `false` | — | Auto-shift to stay in viewport |
|
|
47
|
+
| `arrow` | `boolean` | `false` | — | Show pointing arrow |
|
|
48
|
+
| `showDelay` | `number` | `0` | — | Open delay in ms |
|
|
49
|
+
| `hideDelay` | `number` | `0` | — | Close delay in ms |
|
|
50
|
+
| `interactive` | `boolean` | `false` | ✓ | Keep open when mouse is over tooltip |
|
|
51
|
+
| `tracking` | `boolean` | `false` | ✓ | Follow mouse cursor position |
|
|
52
|
+
|
|
53
|
+
## Events
|
|
54
|
+
|
|
55
|
+
| Event | Cancelable | Description |
|
|
56
|
+
|-------|------------|-------------|
|
|
57
|
+
| `show` | ✓ | Before tooltip opens |
|
|
58
|
+
| `hide` | ✓ | Before tooltip closes |
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# u-tree / u-tree-item
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import '@iyulab/components/dist/components/tree/UTree.js';
|
|
5
|
+
import '@iyulab/components/dist/components/tree-item/UTreeItem.js';
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
**Tags:** `u-tree`, `u-tree-item`
|
|
9
|
+
|
|
10
|
+
Hierarchical tree with support for selection, checkboxes, cascade check, and drag-and-drop.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<u-tree selectable checkable check-cascade>
|
|
14
|
+
<u-tree-item value="root" expanded>
|
|
15
|
+
Root
|
|
16
|
+
<u-tree-item value="child1">Child 1</u-tree-item>
|
|
17
|
+
<u-tree-item value="child2">
|
|
18
|
+
Child 2
|
|
19
|
+
<u-tree-item value="leaf1">Leaf</u-tree-item>
|
|
20
|
+
</u-tree-item>
|
|
21
|
+
</u-tree-item>
|
|
22
|
+
</u-tree>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## u-tree
|
|
28
|
+
|
|
29
|
+
### Slots
|
|
30
|
+
|
|
31
|
+
| Name | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| *(default)* | `u-tree-item` elements |
|
|
34
|
+
| `expand-icon` | Custom expand icon |
|
|
35
|
+
| `collapse-icon` | Custom collapse icon |
|
|
36
|
+
|
|
37
|
+
### Properties
|
|
38
|
+
|
|
39
|
+
| Property | Type | Default | Reflect | Description |
|
|
40
|
+
|----------|------|---------|---------|-------------|
|
|
41
|
+
| `selectable` | `boolean` | `false` | ✓ | Enable item selection |
|
|
42
|
+
| `selectMultiple` | `boolean` | `false` | ✓ | Allow multiple items selected |
|
|
43
|
+
| `selectLeaf` | `boolean` | `false` | ✓ | Only leaf nodes are selectable |
|
|
44
|
+
| `checkable` | `boolean` | `false` | ✓ | Show checkboxes |
|
|
45
|
+
| `checkCascade` | `boolean` | `false` | ✓ | Parent/child checkbox cascade |
|
|
46
|
+
| `draggable` | `boolean` | `false` | ✓ | Enable drag |
|
|
47
|
+
| `droppable` | `boolean` | `false` | ✓ | Enable drop |
|
|
48
|
+
| `trigger` | `'item'\|'icon'` | `'item'` | — | Click target to expand/collapse |
|
|
49
|
+
|
|
50
|
+
### Events
|
|
51
|
+
|
|
52
|
+
| Event | Description |
|
|
53
|
+
|-------|-------------|
|
|
54
|
+
| `change` | Fires when selection or check state changes |
|
|
55
|
+
|
|
56
|
+
### Methods
|
|
57
|
+
|
|
58
|
+
| Method | Description |
|
|
59
|
+
|--------|-------------|
|
|
60
|
+
| `expandAll()` | Expand all items |
|
|
61
|
+
| `collapseAll()` | Collapse all items |
|
|
62
|
+
| `expand(value)` | Expand item by value |
|
|
63
|
+
| `collapse(value)` | Collapse item by value |
|
|
64
|
+
| `toggle(value)` | Toggle item by value |
|
|
65
|
+
| `getItem(value)` | Get `UTreeItem` by value |
|
|
66
|
+
| `getItems(fn)` | Get items matching a filter function |
|
|
67
|
+
| `mapItems(fn)` | Apply a function to all items |
|
|
68
|
+
|
|
69
|
+
### CSS Custom Properties
|
|
70
|
+
|
|
71
|
+
| Property | Description |
|
|
72
|
+
|----------|-------------|
|
|
73
|
+
| `--tree-indent-size` | Indentation per depth level |
|
|
74
|
+
| `--tree-indent-guide-offset` | Guide line offset |
|
|
75
|
+
| `--tree-indent-guide-width` | Guide line width |
|
|
76
|
+
| `--tree-indent-guide-style` | Guide line CSS border-style |
|
|
77
|
+
| `--tree-indent-guide-color` | Guide line color |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## u-tree-item
|
|
82
|
+
|
|
83
|
+
### Slots
|
|
84
|
+
|
|
85
|
+
| Name | Description |
|
|
86
|
+
|------|-------------|
|
|
87
|
+
| `prefix` | Leading content |
|
|
88
|
+
| *(default)* | Item label |
|
|
89
|
+
| `suffix` | Trailing content |
|
|
90
|
+
|
|
91
|
+
### Properties
|
|
92
|
+
|
|
93
|
+
| Property | Type | Default | Reflect | Description |
|
|
94
|
+
|----------|------|---------|---------|-------------|
|
|
95
|
+
| `value` | `string` | `''` | — | Unique identifier |
|
|
96
|
+
| `disabled` | `boolean` | `false` | ✓ | Disable the item |
|
|
97
|
+
| `expanded` | `boolean` | `false` | ✓ | Show children |
|
|
98
|
+
| `selectable` | `boolean` | `false` | ✓ | This item can be selected |
|
|
99
|
+
| `checkable` | `boolean` | `false` | ✓ | Show checkbox |
|
|
100
|
+
| `loading` | `boolean` | `false` | ✓ | Loading state (async children) |
|
|
101
|
+
| `draggable` | `boolean` | `false` | ✓ | Draggable |
|
|
102
|
+
| `droppable` | `boolean` | `false` | ✓ | Accepts drops |
|
|
103
|
+
| `trigger` | `'item'\|'icon'` | `'item'` | — | Expand trigger target |
|
|
104
|
+
|
|
105
|
+
### Events
|
|
106
|
+
|
|
107
|
+
| Event | Description |
|
|
108
|
+
|-------|-------------|
|
|
109
|
+
| `expand` | Item is expanded |
|
|
110
|
+
| `collapse` | Item is collapsed |
|
|
111
|
+
| `pick` | Item is selected |
|
|
112
|
+
| `check` | Item checkbox toggled |
|
|
113
|
+
|
|
114
|
+
### Methods
|
|
115
|
+
|
|
116
|
+
| Method | Returns | Description |
|
|
117
|
+
|--------|---------|-------------|
|
|
118
|
+
| `expand()` | `boolean` | Expand this item |
|
|
119
|
+
| `collapse()` | `boolean` | Collapse this item |
|
|
120
|
+
| `toggle()` | `boolean` | Toggle expand/collapse |
|
|
121
|
+
|
|
122
|
+
### CSS Parts
|
|
123
|
+
|
|
124
|
+
| Part | Description |
|
|
125
|
+
|------|-------------|
|
|
126
|
+
| `header` | Item header row (icon + label + suffix) |
|
|
127
|
+
| `content` | Label content area |
|
|
128
|
+
| `subtree` | Children container |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# UDataElement
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { UDataElement } from '@iyulab/components';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Base class for data-driven components that load their initial data from an inline `<script type="application/json">` tag in the light DOM.
|
|
8
|
+
|
|
9
|
+
## When to extend
|
|
10
|
+
|
|
11
|
+
Use when you want to declare component data directly in HTML without JavaScript, or when server-rendering initial state into the page.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { UDataElement } from '@iyulab/components';
|
|
15
|
+
import { customElement } from 'lit/decorators.js';
|
|
16
|
+
import { html } from 'lit';
|
|
17
|
+
|
|
18
|
+
@customElement('my-list')
|
|
19
|
+
export class MyList extends UDataElement {
|
|
20
|
+
private items: string[] = [];
|
|
21
|
+
|
|
22
|
+
protected override async load(data?: unknown) {
|
|
23
|
+
if (Array.isArray(data)) {
|
|
24
|
+
this.items = data as string[];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
render() {
|
|
29
|
+
return html`
|
|
30
|
+
<ul>${this.items.map(i => html`<li>${i}</li>`)}</ul>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<my-list>
|
|
38
|
+
<script type="application/json">
|
|
39
|
+
["Item A", "Item B", "Item C"]
|
|
40
|
+
</script>
|
|
41
|
+
</my-list>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Static Methods
|
|
45
|
+
|
|
46
|
+
| Method | Returns | Description |
|
|
47
|
+
|--------|---------|-------------|
|
|
48
|
+
| `buildHTML(json, attrs?)` | `string` | Build a safe inline HTML string with JSON data embedded in a `<script type="application/json">` child |
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const html = MyList.buildHTML(['Item A', 'Item B'], { class: 'my-list' });
|
|
52
|
+
// → '<my-list class="my-list"><script type="application/json">["Item A","Item B"]</script></my-list>'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Protected Methods
|
|
56
|
+
|
|
57
|
+
| Method | Returns | Description |
|
|
58
|
+
|--------|---------|-------------|
|
|
59
|
+
| `load(data?)` | `Promise<void>` | Called with the parsed JSON data after the element connects; override to handle data |
|
|
60
|
+
| `error(error)` | `Promise<void>` | Called when JSON parsing fails; override to handle errors |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# UElement
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { UElement } from '@iyulab/components';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Root base class for all `@iyulab/components` components. Extends `LitElement` with event helpers and render utilities.
|
|
8
|
+
|
|
9
|
+
## When to extend
|
|
10
|
+
|
|
11
|
+
Extend `UElement` for any custom component that doesn't need form association or overlay/floating behavior.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { UElement } from '@iyulab/components';
|
|
15
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
16
|
+
import { html } from 'lit';
|
|
17
|
+
|
|
18
|
+
@customElement('my-badge')
|
|
19
|
+
export class MyBadge extends UElement {
|
|
20
|
+
@property() label = '';
|
|
21
|
+
|
|
22
|
+
render() {
|
|
23
|
+
return html`<span>${this.label}</span>`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Protected API
|
|
29
|
+
|
|
30
|
+
| Method | Signature | Description |
|
|
31
|
+
|--------|-----------|-------------|
|
|
32
|
+
| `fire` | `fire<T>(name, options?): boolean` | Dispatch a `CustomEvent` on the host. `bubbles`, `composed`, `cancelable` are `true` by default. Returns `false` if the event was cancelled. |
|
|
33
|
+
| `relay` | `relay(event, options?): void` | Re-dispatch a native DOM event from the host (stops original event, re-fires as new). Useful for surfacing inner element events to light DOM. |
|
|
34
|
+
| `replace` | `replace(value, options?): void` | Replace the entire shadow DOM render output with a new Lit `TemplateResult`. Preserves `<style>` tags. |
|
|
35
|
+
|
|
36
|
+
## Static members
|
|
37
|
+
|
|
38
|
+
| Member | Description |
|
|
39
|
+
|--------|-------------|
|
|
40
|
+
| `styles` | Base styles (`CSSResult`); combine with `[super.styles, myStyles]` |
|
|
41
|
+
| `define(name)` | Register this class as a custom element under a given tag name |
|
|
42
|
+
| `dependencies` | `Record<string, typeof UElement>` — declare sub-components to auto-define |
|
|
43
|
+
|
|
44
|
+
## Example: custom event
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
@customElement('my-input')
|
|
48
|
+
class MyInput extends UElement {
|
|
49
|
+
private handleChange(e: Event) {
|
|
50
|
+
// relay native input event from shadow DOM to host
|
|
51
|
+
this.relay(e);
|
|
52
|
+
|
|
53
|
+
// or fire a custom event
|
|
54
|
+
this.fire('my-change', { detail: { value: (e.target as HTMLInputElement).value } });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# UFloatingElement
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import { UFloatingElement } from '@iyulab/components';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Abstract base class for anchored floating elements (tooltips, popovers, dropdowns). Wraps [`@floating-ui/dom`](https://floating-ui.com/) for automatic positioning.
|
|
8
|
+
|
|
9
|
+
## When to extend
|
|
10
|
+
|
|
11
|
+
Use when building a component that floats relative to a `for` target element with auto-placement, shift, and arrow support.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { UFloatingElement } from '@iyulab/components';
|
|
15
|
+
import { customElement } from 'lit/decorators.js';
|
|
16
|
+
import { html } from 'lit';
|
|
17
|
+
|
|
18
|
+
@customElement('my-dropdown')
|
|
19
|
+
export class MyDropdown extends UFloatingElement {
|
|
20
|
+
render() {
|
|
21
|
+
return html`<slot></slot>`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<button id="btn">Open</button>
|
|
28
|
+
<my-dropdown for="#btn" placement="bottom" trigger="click" shift>
|
|
29
|
+
Dropdown content
|
|
30
|
+
</my-dropdown>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Inherited Properties
|
|
34
|
+
|
|
35
|
+
| Property | Type | Default | Reflect | Description |
|
|
36
|
+
|----------|------|---------|---------|-------------|
|
|
37
|
+
| `open` | `boolean` | `false` | ✓ | Visibility state |
|
|
38
|
+
| `disabled` | `boolean` | `false` | ✓ | Prevent opening |
|
|
39
|
+
| `for` | `string` | — | ✓ | CSS selector for the anchor element |
|
|
40
|
+
| `strategy` | `'absolute'\|'fixed'` | `'absolute'` | — | CSS positioning strategy |
|
|
41
|
+
| `placement` | `Placement` | — | — | Preferred placement from `@floating-ui/dom` |
|
|
42
|
+
| `offset` | `OffsetOptions` | `0` | — | Distance from anchor |
|
|
43
|
+
| `shift` | `boolean` | `false` | — | Shift to stay within viewport |
|
|
44
|
+
| `arrow` | `boolean` | `false` | — | Show pointing arrow |
|
|
45
|
+
| `showDelay` | `number` | `0` | — | Open delay (ms) |
|
|
46
|
+
| `hideDelay` | `number` | `0` | — | Close delay (ms) |
|
|
47
|
+
|
|
48
|
+
## Methods
|
|
49
|
+
|
|
50
|
+
| Method | Returns | Description |
|
|
51
|
+
|--------|---------|-------------|
|
|
52
|
+
| `show(target?)` | `Promise<boolean>` | Open and position the floating element; returns `false` if cancelled |
|
|
53
|
+
| `hide()` | `void` | Close the floating element |
|
|
54
|
+
|
|
55
|
+
## Events
|
|
56
|
+
|
|
57
|
+
| Event | Cancelable | Description |
|
|
58
|
+
|-------|------------|-------------|
|
|
59
|
+
| `show` | ✓ | Before opening |
|
|
60
|
+
| `hide` | ✓ | Before closing |
|