@iyulab/components 0.4.0 → 1.0.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/CHANGELOG.md +44 -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 +55 -4
- package/dist/components/icon/UIcon.styles.js +5 -5
- 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 +151 -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 +315 -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 +145 -0
- package/dist/components/textarea/UTextarea.styles.d.ts +1 -0
- package/dist/components/textarea/UTextarea.styles.js +157 -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 +24 -20
- 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
|
@@ -1,5 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js";
|
|
2
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
3
|
+
import "../icon/UIcon.js";
|
|
4
|
+
import { UOverlayElement } from "../UOverlayElement.js";
|
|
5
|
+
import "../button/UButton.js";
|
|
6
|
+
import { styles } from "./UDrawer.styles.js";
|
|
7
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
8
|
+
import { html } from "lit";
|
|
9
|
+
//#region src/components/drawer/UDrawer.ts
|
|
10
|
+
var UDrawer = class UDrawer extends UOverlayElement {
|
|
11
|
+
constructor(..._args) {
|
|
12
|
+
super(..._args);
|
|
13
|
+
this.closable = false;
|
|
14
|
+
this.placement = "left";
|
|
15
|
+
this.hasHeader = false;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.styles = [super.styles, styles];
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html`
|
|
22
|
+
<div class="panel" part="panel">
|
|
23
|
+
<div class="header" part="header"
|
|
24
|
+
?hidden=${!this.hasHeader && !this.closable}>
|
|
25
|
+
<slot name="header" @slotchange=${this.handleHeaderSlotChange}></slot>
|
|
26
|
+
<u-button class="close-btn" part="close-btn"
|
|
27
|
+
variant="ghost"
|
|
28
|
+
?hidden=${!this.closable}
|
|
29
|
+
@click=${() => this.requestClose("button")}>
|
|
30
|
+
<u-icon lib="internal" name="x-lg"></u-icon>
|
|
31
|
+
</u-button>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="body" part="body">
|
|
34
|
+
<slot></slot>
|
|
35
|
+
</div>
|
|
36
|
+
<slot name="footer"></slot>
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
handleHeaderSlotChange(e) {
|
|
41
|
+
this.hasHeader = e.target.assignedNodes({ flatten: true }).length > 0;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
__decorate([property({
|
|
45
|
+
type: Boolean,
|
|
46
|
+
reflect: true
|
|
47
|
+
}), __decorateMetadata("design:type", Object)], UDrawer.prototype, "closable", void 0);
|
|
48
|
+
__decorate([property({
|
|
49
|
+
type: String,
|
|
50
|
+
reflect: true
|
|
51
|
+
}), __decorateMetadata("design:type", Object)], UDrawer.prototype, "placement", void 0);
|
|
52
|
+
__decorate([state(), __decorateMetadata("design:type", Object)], UDrawer.prototype, "hasHeader", void 0);
|
|
53
|
+
UDrawer = __decorate([customElement("u-drawer")], UDrawer);
|
|
54
|
+
//#endregion
|
|
5
55
|
export { UDrawer };
|
|
@@ -1,82 +1,89 @@
|
|
|
1
|
-
import { css } from
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/drawer/UDrawer.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
|
+
/* ── Placement에 따른 정렬 ──────────────── */
|
|
5
|
+
:host([placement="left"]) { justify-content: flex-start; }
|
|
6
|
+
:host([placement="right"]) { justify-content: flex-end; }
|
|
7
|
+
:host([placement="top"]) { flex-direction: column; justify-content: flex-start; }
|
|
8
|
+
:host([placement="bottom"]) { flex-direction: column; justify-content: flex-end; }
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
:host
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:host([placement="left"]) {
|
|
9
|
-
flex-direction: row;
|
|
10
|
-
justify-content: flex-start;
|
|
11
|
-
}
|
|
12
|
-
:host([placement="right"]) {
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
justify-content: flex-end;
|
|
10
|
+
/* 좌우: 높이 100% */
|
|
11
|
+
:host([placement="left"]) .panel,
|
|
12
|
+
:host([placement="right"]) .panel {
|
|
13
|
+
height: 100%;
|
|
14
|
+
max-width: 100%;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
justify-content: flex-end;
|
|
16
|
+
/* 상하: 너비 100% */
|
|
17
|
+
:host([placement="top"]) .panel,
|
|
18
|
+
:host([placement="bottom"]) .panel {
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-height: 100%;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/* placement별 border */
|
|
24
|
+
:host([placement="left"]) .panel { border-right: 1px solid var(--u-border-color); }
|
|
25
|
+
:host([placement="right"]) .panel { border-left: 1px solid var(--u-border-color); }
|
|
26
|
+
:host([placement="top"]) .panel { border-bottom: 1px solid var(--u-border-color); }
|
|
27
|
+
:host([placement="bottom"]) .panel { border-top: 1px solid var(--u-border-color); }
|
|
28
|
+
|
|
29
|
+
/* 닫힌 상태 */
|
|
30
|
+
:host([placement="left"]) .panel { transform: translateX(-100%); }
|
|
31
|
+
:host([placement="right"]) .panel { transform: translateX(100%); }
|
|
32
|
+
:host([placement="top"]) .panel { transform: translateY(-100%); }
|
|
33
|
+
:host([placement="bottom"]) .panel { transform: translateY(100%); }
|
|
34
|
+
|
|
35
|
+
/* 열린 상태 */
|
|
36
|
+
:host([open][placement="left"]) .panel,
|
|
37
|
+
:host([open][placement="right"]) .panel { transform: translateX(0); }
|
|
38
|
+
:host([open][placement="top"]) .panel,
|
|
39
|
+
:host([open][placement="bottom"]) .panel { transform: translateY(0); }
|
|
40
|
+
|
|
41
|
+
.panel {
|
|
27
42
|
display: flex;
|
|
28
43
|
flex-direction: column;
|
|
29
|
-
max-width: 100vw;
|
|
30
|
-
max-height: 100vh;
|
|
31
|
-
padding: 20px;
|
|
32
44
|
background: var(--u-panel-bg-color);
|
|
33
|
-
box-shadow: 0 4px
|
|
45
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
46
|
+
pointer-events: auto;
|
|
34
47
|
transition: transform 0.3s ease;
|
|
35
48
|
}
|
|
36
|
-
.drawer[placement="left"] {
|
|
37
|
-
border-right: 1px solid var(--u-border-color);
|
|
38
|
-
transform: translateX(-100%);
|
|
39
|
-
}
|
|
40
|
-
.drawer[placement="right"] {
|
|
41
|
-
border-left: 1px solid var(--u-border-color);
|
|
42
|
-
transform: translateX(100%);
|
|
43
|
-
}
|
|
44
|
-
.drawer[placement="top"] {
|
|
45
|
-
border-bottom: 1px solid var(--u-border-color);
|
|
46
|
-
transform: translateY(-100%);
|
|
47
|
-
}
|
|
48
|
-
.drawer[placement="bottom"] {
|
|
49
|
-
border-top: 1px solid var(--u-border-color);
|
|
50
|
-
transform: translateY(100%);
|
|
51
|
-
}
|
|
52
|
-
.drawer[open][placement="left"],
|
|
53
|
-
.drawer[open][placement="right"] {
|
|
54
|
-
transform: translateX(0);
|
|
55
|
-
}
|
|
56
|
-
.drawer[open][placement="top"],
|
|
57
|
-
.drawer[open][placement="bottom"] {
|
|
58
|
-
transform: translateY(0);
|
|
59
|
-
}
|
|
60
49
|
|
|
61
50
|
.header {
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
position: relative;
|
|
62
53
|
display: flex;
|
|
63
|
-
flex-direction: row;
|
|
64
54
|
align-items: center;
|
|
65
55
|
justify-content: space-between;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.header .title {
|
|
70
|
-
line-height: 1.2;
|
|
56
|
+
gap: 8px;
|
|
57
|
+
padding: 12px 16px;
|
|
58
|
+
font-size: 18px;
|
|
71
59
|
font-weight: 600;
|
|
60
|
+
line-height: 1.3;
|
|
61
|
+
border-bottom: 1px solid var(--u-border-color);
|
|
62
|
+
}
|
|
63
|
+
.header .close-btn {
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
padding: 4px;
|
|
66
|
+
font-size: inherit;
|
|
67
|
+
border-radius: 4px;
|
|
72
68
|
}
|
|
73
69
|
|
|
74
|
-
.
|
|
70
|
+
.body {
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
min-height: 0;
|
|
75
73
|
display: block;
|
|
76
|
-
|
|
77
|
-
max-height: calc(100vh - 100px);
|
|
74
|
+
padding: 16px;
|
|
78
75
|
overflow: auto;
|
|
79
76
|
}
|
|
80
|
-
`;
|
|
81
77
|
|
|
78
|
+
::slotted([slot="footer"]) {
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: flex-end;
|
|
83
|
+
gap: 8px;
|
|
84
|
+
padding: 12px 16px;
|
|
85
|
+
border-top: 1px solid var(--u-border-color);
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
//#endregion
|
|
82
89
|
export { styles };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UElement } from '../UElement.js';
|
|
2
|
+
/**
|
|
3
|
+
* 폼 컨트롤의 공통 레이아웃을 제공하는 필드 컴포넌트입니다.
|
|
4
|
+
* 라벨, 필수 표시, 설명 텍스트, 유효성 검사 메시지를 포함합니다.
|
|
5
|
+
*
|
|
6
|
+
* @slot - 폼 컨트롤 (input, select, textarea 등)
|
|
7
|
+
* @slot label-aside - 라벨 오른쪽 슬롯 영역 (숫자 표시, 알림 등)
|
|
8
|
+
*/
|
|
9
|
+
export declare class UField extends UElement {
|
|
10
|
+
static styles: import('lit').CSSResultGroup[];
|
|
11
|
+
/** 비활성화 여부 */
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
/** 필수 입력 여부 */
|
|
14
|
+
required: boolean;
|
|
15
|
+
/** 유효성 검사 실패 상태 */
|
|
16
|
+
invalid: boolean;
|
|
17
|
+
/** 라벨 텍스트 */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** 하단 설명 텍스트 */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** 유효성 검사 실패 시 표시할 메시지 */
|
|
22
|
+
validationMessage?: string;
|
|
23
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
24
|
+
private renderFooter;
|
|
25
|
+
private handleLabelClick;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'u-field': UField;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { UElement } from "../UElement.js";
|
|
2
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
4
|
+
import { styles } from "./UField.styles.js";
|
|
5
|
+
import { customElement, property } from "lit/decorators.js";
|
|
6
|
+
import { html, nothing } from "lit";
|
|
7
|
+
import { isFocusable } from "tabbable";
|
|
8
|
+
//#region src/components/field/UField.ts
|
|
9
|
+
var UField = class UField extends UElement {
|
|
10
|
+
constructor(..._args) {
|
|
11
|
+
super(..._args);
|
|
12
|
+
this.disabled = false;
|
|
13
|
+
this.required = false;
|
|
14
|
+
this.invalid = false;
|
|
15
|
+
this.handleLabelClick = () => {
|
|
16
|
+
const nodes = (this.shadowRoot?.querySelector("slot:not([name])"))?.assignedElements({ flatten: true }) || [];
|
|
17
|
+
for (const node of nodes) if (isFocusable(node)) {
|
|
18
|
+
node.focus();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.styles = [super.styles, styles];
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return html`
|
|
28
|
+
<div class="header" ?hidden=${!this.label}>
|
|
29
|
+
<label class="label" @click=${this.handleLabelClick}>
|
|
30
|
+
<span class="required" ?hidden=${!this.required}>*</span>
|
|
31
|
+
${this.label}
|
|
32
|
+
</label>
|
|
33
|
+
<slot name="label-aside"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<slot></slot>
|
|
37
|
+
|
|
38
|
+
${this.renderFooter()}
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
renderFooter() {
|
|
42
|
+
const message = this.invalid && this.validationMessage ? this.validationMessage : this.description;
|
|
43
|
+
if (!message) return nothing;
|
|
44
|
+
return html`<div class="footer">${message}</div>`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
__decorate([property({
|
|
48
|
+
type: Boolean,
|
|
49
|
+
reflect: true
|
|
50
|
+
}), __decorateMetadata("design:type", Boolean)], UField.prototype, "disabled", void 0);
|
|
51
|
+
__decorate([property({
|
|
52
|
+
type: Boolean,
|
|
53
|
+
reflect: true
|
|
54
|
+
}), __decorateMetadata("design:type", Boolean)], UField.prototype, "required", void 0);
|
|
55
|
+
__decorate([property({
|
|
56
|
+
type: Boolean,
|
|
57
|
+
reflect: true
|
|
58
|
+
}), __decorateMetadata("design:type", Boolean)], UField.prototype, "invalid", void 0);
|
|
59
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UField.prototype, "label", void 0);
|
|
60
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UField.prototype, "description", void 0);
|
|
61
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UField.prototype, "validationMessage", void 0);
|
|
62
|
+
UField = __decorate([customElement("u-field")], UField);
|
|
63
|
+
//#endregion
|
|
64
|
+
export { UField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/field/UField.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
color: var(--u-txt-color);
|
|
7
|
+
font-size: inherit;
|
|
8
|
+
font-family: var(--u-font-base);
|
|
9
|
+
}
|
|
10
|
+
:host([disabled]) {
|
|
11
|
+
opacity: 0.6;
|
|
12
|
+
cursor: not-allowed;
|
|
13
|
+
}
|
|
14
|
+
:host([invalid]) .footer {
|
|
15
|
+
color: var(--u-red-600);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.header {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
font-size: 0.8em;
|
|
24
|
+
margin-bottom: 0.5em;
|
|
25
|
+
user-select: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.label {
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
line-height: 1.25;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.required {
|
|
35
|
+
color: var(--u-red-600);
|
|
36
|
+
margin-right: 0.2em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.footer {
|
|
40
|
+
color: var(--u-txt-color-weak);
|
|
41
|
+
font-size: 0.75em;
|
|
42
|
+
line-height: 1.2;
|
|
43
|
+
margin-top: 0.5em;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { styles };
|
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { UElement } from '../UElement.js';
|
|
3
|
+
/**
|
|
4
|
+
* 여러 입력 요소를 그룹화하고 관리하는 폼 컨테이너 컴포넌트입니다.
|
|
5
|
+
* 폼 내의 UFormControlElement 기반 입력 요소의 값 변경을 감지하고,
|
|
6
|
+
* 포함/제외 규칙에 따라 모델 데이터를 자동으로 업데이트합니다.
|
|
7
|
+
*
|
|
8
|
+
* @event change - 폼 컨트롤 값 변경 시 발생
|
|
9
|
+
*/
|
|
10
|
+
export declare class UForm extends UElement {
|
|
11
|
+
static styles: import('lit').CSSResultGroup[];
|
|
12
|
+
/** 포함할 입력 요소의 name 속성 목록. 비어있으면 모두 포함됩니다. */
|
|
13
|
+
includes: string[];
|
|
14
|
+
/** 제외할 입력 요소의 name 속성 목록. */
|
|
15
|
+
excludes: string[];
|
|
16
|
+
/** 폼의 양방향 바인딩 데이터 모델. */
|
|
17
|
+
model?: Record<string, unknown>;
|
|
18
|
+
/** model의 초기값 스냅샷. reset 시 이 값으로 복원됩니다. */
|
|
19
|
+
private snapshot;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
23
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
24
|
+
/**
|
|
25
|
+
* 폼 내의 모든 포함된 컨트롤을 검증합니다.
|
|
26
|
+
* @returns 모든 컨트롤이 유효하면 true, 아니면 false
|
|
27
|
+
*/
|
|
28
|
+
validate(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 폼 내의 모든 포함된 컨트롤을 스냅샷 값으로 리셋합니다.
|
|
31
|
+
*/
|
|
32
|
+
reset(): void;
|
|
33
|
+
private sync;
|
|
34
|
+
private getControls;
|
|
35
|
+
private isIncluded;
|
|
36
|
+
private handleSlotChange;
|
|
37
|
+
private handleChange;
|
|
38
|
+
}
|
|
2
39
|
declare global {
|
|
3
40
|
interface HTMLElementTagNameMap {
|
|
4
41
|
'u-form': UForm;
|
|
5
42
|
}
|
|
6
43
|
}
|
|
7
|
-
export { UForm };
|
|
@@ -1,5 +1,106 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { UElement } from "../UElement.js";
|
|
2
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
4
|
+
import { UFormControlElement } from "../UFormControlElement.js";
|
|
5
|
+
import { arrayAttrConverter } from "../../utilities/converters.js";
|
|
6
|
+
import { styles } from "./UForm.styles.js";
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { html } from "lit";
|
|
9
|
+
//#region src/components/form/UForm.ts
|
|
10
|
+
var _ref;
|
|
11
|
+
var UForm = class UForm extends UElement {
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.includes = [];
|
|
15
|
+
this.excludes = [];
|
|
16
|
+
this.snapshot = {};
|
|
17
|
+
this.handleSlotChange = (_) => {
|
|
18
|
+
this.sync();
|
|
19
|
+
};
|
|
20
|
+
this.handleChange = (e) => {
|
|
21
|
+
const target = e.target;
|
|
22
|
+
if (!(target instanceof UFormControlElement)) return;
|
|
23
|
+
const name = target.name;
|
|
24
|
+
const value = target.value;
|
|
25
|
+
if (!name) return;
|
|
26
|
+
if (!this.isIncluded(target)) return;
|
|
27
|
+
if (this.model && typeof this.model === "object") this.model[name] = value;
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
this.dispatchEvent(new Event("change", {
|
|
30
|
+
bubbles: true,
|
|
31
|
+
composed: true
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.styles = [super.styles, styles];
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
super.connectedCallback();
|
|
40
|
+
this.addEventListener("change", this.handleChange);
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.removeEventListener("change", this.handleChange);
|
|
44
|
+
super.disconnectedCallback();
|
|
45
|
+
}
|
|
46
|
+
updated(changedProperties) {
|
|
47
|
+
super.updated(changedProperties);
|
|
48
|
+
if (changedProperties.has("model")) {
|
|
49
|
+
this.snapshot = { ...this.model };
|
|
50
|
+
this.sync();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return html`<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 폼 내의 모든 포함된 컨트롤을 검증합니다.
|
|
58
|
+
* @returns 모든 컨트롤이 유효하면 true, 아니면 false
|
|
59
|
+
*/
|
|
60
|
+
validate() {
|
|
61
|
+
return this.getControls().every((control) => control.validate());
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* 폼 내의 모든 포함된 컨트롤을 스냅샷 값으로 리셋합니다.
|
|
65
|
+
*/
|
|
66
|
+
reset() {
|
|
67
|
+
if (this.snapshot) {
|
|
68
|
+
this.model = {};
|
|
69
|
+
Object.keys(this.snapshot).forEach((key) => {
|
|
70
|
+
this.model[key] = this.snapshot[key];
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
this.sync();
|
|
74
|
+
}
|
|
75
|
+
sync() {
|
|
76
|
+
if (!this.model) return;
|
|
77
|
+
for (const control of this.getControls()) if (control.name && control.name in this.model) control.value = this.model[control.name];
|
|
78
|
+
}
|
|
79
|
+
getControls() {
|
|
80
|
+
const slot = this.renderRoot.querySelector("slot");
|
|
81
|
+
if (!slot) return [];
|
|
82
|
+
return slot.assignedElements({ flatten: true }).filter((el) => el instanceof UFormControlElement).filter((el) => this.isIncluded(el));
|
|
83
|
+
}
|
|
84
|
+
isIncluded(el) {
|
|
85
|
+
const name = el.name;
|
|
86
|
+
if (!name) return false;
|
|
87
|
+
if (this.excludes.includes(name)) return false;
|
|
88
|
+
if (this.includes.length > 0 && !this.includes.includes(name)) return false;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
__decorate([property({
|
|
93
|
+
type: Array,
|
|
94
|
+
converter: arrayAttrConverter()
|
|
95
|
+
}), __decorateMetadata("design:type", Array)], UForm.prototype, "includes", void 0);
|
|
96
|
+
__decorate([property({
|
|
97
|
+
type: Array,
|
|
98
|
+
converter: arrayAttrConverter()
|
|
99
|
+
}), __decorateMetadata("design:type", Array)], UForm.prototype, "excludes", void 0);
|
|
100
|
+
__decorate([property({
|
|
101
|
+
type: Object,
|
|
102
|
+
attribute: false
|
|
103
|
+
}), __decorateMetadata("design:type", typeof (_ref = typeof Record !== "undefined" && Record) === "function" ? _ref : Object)], UForm.prototype, "model", void 0);
|
|
104
|
+
UForm = __decorate([customElement("u-form")], UForm);
|
|
105
|
+
//#endregion
|
|
5
106
|
export { UForm };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { css } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/form/UForm.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
width: 100%;
|
|
6
6
|
display: flex;
|
|
@@ -10,10 +10,10 @@ const styles = css`
|
|
|
10
10
|
font-size: 14px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
:host * {
|
|
13
|
+
:host > * {
|
|
14
14
|
width: 100%;
|
|
15
15
|
font-size: inherit;
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
|
-
|
|
18
|
+
//#endregion
|
|
19
19
|
export { styles };
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
import { UElement } from '../UElement.js';
|
|
3
|
+
export type IconLibrary = (string & {}) | "internal" | "tabler" | "heroicons" | "lucide" | "bootstrap";
|
|
4
|
+
/**
|
|
5
|
+
* SVG 아이콘을 이름으로 불러와 표시하는 아이콘 컴포넌트입니다.
|
|
6
|
+
*
|
|
7
|
+
* @csspart svg - 아이콘의 SVG 요소에 적용됩니다.
|
|
8
|
+
*/
|
|
9
|
+
export declare class UIcon extends UElement {
|
|
10
|
+
static styles: import('lit').CSSResultGroup[];
|
|
11
|
+
/** SVG 콘텐츠를 직접 지정합니다. `name` 속성보다 우선 사용됩니다. */
|
|
12
|
+
src?: string;
|
|
13
|
+
/** 사용할 아이콘 라이브러리 이름을 지정합니다. */
|
|
14
|
+
lib?: IconLibrary;
|
|
15
|
+
/** 사용할 아이콘 이름을 지정합니다. */
|
|
16
|
+
name?: string;
|
|
17
|
+
render(): import('lit-html/directive.js').DirectiveResult<{
|
|
18
|
+
new (_partInfo: import('lit-html/directive.js').PartInfo): import('lit-html/directives/until.js').UntilDirective<typeof nothing | Promise<import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/unsafe-html.js').UnsafeHTMLDirective>>>;
|
|
19
|
+
}>;
|
|
20
|
+
private resolve;
|
|
21
|
+
private sanitize;
|
|
22
|
+
}
|
|
2
23
|
declare global {
|
|
3
24
|
interface HTMLElementTagNameMap {
|
|
4
|
-
|
|
25
|
+
'u-icon': UIcon;
|
|
5
26
|
}
|
|
6
27
|
}
|
|
7
|
-
export { UIcon };
|
|
8
|
-
export type { IconLibrary } from './UIcon.component.js';
|
|
@@ -1,5 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { UElement } from "../UElement.js";
|
|
2
|
+
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js";
|
|
3
|
+
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
4
|
+
import { IconRegistry, getDefaultBaseUrl } from "../../utilities/icons.js";
|
|
5
|
+
import { styles } from "./UIcon.styles.js";
|
|
6
|
+
import { customElement, property } from "lit/decorators.js";
|
|
7
|
+
import { nothing } from "lit";
|
|
8
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
9
|
+
import { until } from "lit/directives/until.js";
|
|
10
|
+
//#region src/components/icon/UIcon.ts
|
|
11
|
+
var UIcon = class UIcon extends UElement {
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [super.styles, styles];
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
if (this.src) return until(fetch(this.src).then((r) => r.text()).then((html) => {
|
|
17
|
+
return html ? unsafeHTML(this.sanitize(html)) : nothing;
|
|
18
|
+
}), nothing);
|
|
19
|
+
if (this.name) return until(this.resolve(this.name).then((html) => {
|
|
20
|
+
return html ? unsafeHTML(html) : nothing;
|
|
21
|
+
}), nothing);
|
|
22
|
+
return nothing;
|
|
23
|
+
}
|
|
24
|
+
async resolve(name) {
|
|
25
|
+
let html = void 0;
|
|
26
|
+
if (this.lib) html = await IconRegistry.resolve(this.lib, name);
|
|
27
|
+
else try {
|
|
28
|
+
const url = `${getDefaultBaseUrl().replace(/\/$/, "")}/${name}.svg`;
|
|
29
|
+
const response = await fetch(url);
|
|
30
|
+
if (response.ok) html = await response.text();
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error(error);
|
|
33
|
+
}
|
|
34
|
+
return this.sanitize(html);
|
|
35
|
+
}
|
|
36
|
+
sanitize(html) {
|
|
37
|
+
if (!html) return void 0;
|
|
38
|
+
const trimmed = html.trim();
|
|
39
|
+
try {
|
|
40
|
+
const doc = new DOMParser().parseFromString(trimmed, "image/svg+xml");
|
|
41
|
+
if (doc.querySelector("parsererror")) return void 0;
|
|
42
|
+
const svg = doc.documentElement;
|
|
43
|
+
if (svg?.tagName.toLowerCase() !== "svg") return void 0;
|
|
44
|
+
svg.setAttribute("part", "svg");
|
|
45
|
+
return svg.outerHTML;
|
|
46
|
+
} catch {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UIcon.prototype, "src", void 0);
|
|
52
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", Object)], UIcon.prototype, "lib", void 0);
|
|
53
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UIcon.prototype, "name", void 0);
|
|
54
|
+
UIcon = __decorate([customElement("u-icon")], UIcon);
|
|
55
|
+
//#endregion
|
|
5
56
|
export { UIcon };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { css } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/icon/UIcon.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-flex;
|
|
6
|
-
color:
|
|
6
|
+
color: inherit;
|
|
7
7
|
font-size: inherit;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -13,5 +13,5 @@ const styles = css`
|
|
|
13
13
|
fill: currentColor;
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
16
|
-
|
|
16
|
+
//#endregion
|
|
17
17
|
export { styles };
|