@iyulab/components 0.3.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 +67 -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/UDataElement.d.ts +44 -0
- package/dist/components/UDataElement.js +101 -0
- package/dist/components/UDataElement.styles.js +95 -0
- package/dist/components/UElement.d.ts +54 -0
- package/dist/components/UElement.js +83 -0
- package/dist/components/UElement.styles.js +67 -0
- package/dist/components/UFloatingElement.d.ts +125 -0
- package/dist/components/UFloatingElement.js +238 -0
- package/dist/components/UFloatingElement.styles.d.ts +9 -0
- package/dist/components/UFloatingElement.styles.js +46 -0
- 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 +32 -33
- 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 +41 -8
- package/dist/index.js +56 -46
- 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.d.ts +23 -0
- package/dist/utilities/elements.js +67 -16
- package/dist/utilities/icons.d.ts +67 -0
- package/dist/utilities/icons.js +200 -0
- package/dist/utilities/sanitizers.d.ts +35 -0
- package/dist/utilities/sanitizers.js +75 -0
- package/package.json +24 -21
- 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.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/copy.svg.js +0 -3
- package/dist/assets/icons/dash-lg.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/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/BaseElement.d.ts +0 -33
- package/dist/components/BaseElement.js +0 -59
- package/dist/components/BaseElement.styles.js +0 -28
- package/dist/components/FloatingElement.d.ts +0 -104
- package/dist/components/FloatingElement.js +0 -195
- package/dist/components/FloatingElement.styles.js +0 -23
- package/dist/components/ModalElement.d.ts +0 -70
- package/dist/components/ModalElement.js +0 -144
- package/dist/components/ModalElement.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 -67
- package/dist/components/carousel/UCarousel.component.js +0 -243
- 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 -119
- 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/{BaseElement.styles.d.ts → UDataElement.styles.d.ts} +0 -0
- /package/dist/components/{FloatingElement.styles.d.ts → UElement.styles.d.ts} +0 -0
- /package/dist/components/{ModalElement.styles.d.ts → UFormControlElement.styles.d.ts} +0 -0
|
@@ -1,7 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { UElement } from '../UElement.js';
|
|
3
|
+
/**
|
|
4
|
+
* 두 패널을 분할하고 크기를 조절할 수 있는 레이아웃 컴포넌트입니다.
|
|
5
|
+
*
|
|
6
|
+
* @slot - 분할된 패널 요소들
|
|
7
|
+
* @slot splitter - 핸들(스플리터) UI
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --splitter-size - 스플리터 크기 (default: 4px)
|
|
10
|
+
* @cssprop --splitter-color - 스플리터 색상
|
|
11
|
+
* @cssprop --splitter-color-hover - 스플리터 호버 색상
|
|
12
|
+
* @cssprop --splitter-color-active - 스플리터 활성 색상
|
|
13
|
+
*
|
|
14
|
+
* @event shift-start - 구분선 이동 시작 시 발생
|
|
15
|
+
* @event shift - 구분선 이동 중 발생
|
|
16
|
+
* @event shift-end - 구분선 이동 완료 시 발생
|
|
17
|
+
*/
|
|
18
|
+
export declare class USplitPanel extends UElement {
|
|
19
|
+
static styles: import('lit').CSSResultGroup[];
|
|
20
|
+
/** 리사이즈 비활성화 여부 */
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/** 분할 방향 */
|
|
23
|
+
orientation: 'horizontal' | 'vertical';
|
|
24
|
+
/** 가상 스플리터를 보여주면서 마우스 놓을 지점에 업데이트 */
|
|
25
|
+
lazy: boolean;
|
|
26
|
+
/** 기본(초기) 패널 비율 */
|
|
27
|
+
defaultRatio: number[];
|
|
28
|
+
/** 현재 패널 크기 비율 상태 */
|
|
29
|
+
ratio: number[];
|
|
30
|
+
private ghost?;
|
|
31
|
+
private panels;
|
|
32
|
+
private splitter?;
|
|
33
|
+
private dragState;
|
|
34
|
+
private get percentages();
|
|
35
|
+
private get splitterSize();
|
|
36
|
+
private get splitterCount();
|
|
37
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
38
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
39
|
+
private handleSlotChange;
|
|
40
|
+
private handleSplitterSlotChange;
|
|
41
|
+
private appendSplitters;
|
|
42
|
+
private createSplitter;
|
|
43
|
+
private updatePanelLayout;
|
|
44
|
+
private handleDblClick;
|
|
45
|
+
private handlePointerDown;
|
|
46
|
+
private handlePointerMove;
|
|
47
|
+
private handlePointerUp;
|
|
48
|
+
private clampPair;
|
|
49
|
+
}
|
|
2
50
|
declare global {
|
|
3
51
|
interface HTMLElementTagNameMap {
|
|
4
52
|
'u-split-panel': USplitPanel;
|
|
5
53
|
}
|
|
6
54
|
}
|
|
7
|
-
export { USplitPanel };
|
|
@@ -1,5 +1,241 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
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 { arrayAttrConverter } from "../../utilities/converters.js";
|
|
5
|
+
import { styles } from "./USplitPanel.styles.js";
|
|
6
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
7
|
+
import { html } from "lit";
|
|
8
|
+
//#region src/components/split-panel/USplitPanel.ts
|
|
9
|
+
var _ref;
|
|
10
|
+
var USplitPanel = class USplitPanel extends UElement {
|
|
11
|
+
constructor(..._args) {
|
|
12
|
+
super(..._args);
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
this.orientation = "horizontal";
|
|
15
|
+
this.lazy = false;
|
|
16
|
+
this.defaultRatio = [];
|
|
17
|
+
this.ratio = [];
|
|
18
|
+
this.panels = [];
|
|
19
|
+
this.dragState = {
|
|
20
|
+
index: -1,
|
|
21
|
+
startPoint: 0,
|
|
22
|
+
availableSize: 0,
|
|
23
|
+
percentages: [],
|
|
24
|
+
ghostDelta: 0
|
|
25
|
+
};
|
|
26
|
+
this.handleSlotChange = (e) => {
|
|
27
|
+
this.panels = e.target.assignedElements({ flatten: true }).filter((el) => el instanceof HTMLElement);
|
|
28
|
+
this.appendSplitters();
|
|
29
|
+
this.updatePanelLayout();
|
|
30
|
+
};
|
|
31
|
+
this.handleSplitterSlotChange = (e) => {
|
|
32
|
+
this.splitter = e.target.assignedNodes({ flatten: true }).at(0);
|
|
33
|
+
this.appendSplitters();
|
|
34
|
+
};
|
|
35
|
+
this.handleDblClick = () => {
|
|
36
|
+
if (this.disabled) return;
|
|
37
|
+
this.ratio = this.defaultRatio.length === this.panels.length ? [...this.defaultRatio] : [];
|
|
38
|
+
this.updatePanelLayout();
|
|
39
|
+
};
|
|
40
|
+
this.handlePointerDown = (e) => {
|
|
41
|
+
if (e.button !== 0 || this.disabled) return;
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
const target = e.currentTarget;
|
|
44
|
+
target.setPointerCapture(e.pointerId);
|
|
45
|
+
target.addEventListener("pointermove", this.handlePointerMove);
|
|
46
|
+
target.addEventListener("pointerup", this.handlePointerUp);
|
|
47
|
+
target.addEventListener("pointercancel", this.handlePointerUp);
|
|
48
|
+
const hostRect = this.getBoundingClientRect();
|
|
49
|
+
const containerSize = this.orientation === "horizontal" ? hostRect.width : hostRect.height;
|
|
50
|
+
const splitterRect = target.getBoundingClientRect();
|
|
51
|
+
const splitterPos = this.orientation === "horizontal" ? splitterRect.left - hostRect.left : splitterRect.top - hostRect.top;
|
|
52
|
+
this.dragState = {
|
|
53
|
+
index: parseInt(target.dataset.index || "-1"),
|
|
54
|
+
startPoint: this.orientation === "horizontal" ? e.clientX : e.clientY,
|
|
55
|
+
availableSize: containerSize - this.splitterSize * this.splitterCount,
|
|
56
|
+
percentages: this.percentages,
|
|
57
|
+
ghostDelta: 0
|
|
58
|
+
};
|
|
59
|
+
if (this.lazy && this.ghost) {
|
|
60
|
+
this.ghost.style.left = "";
|
|
61
|
+
this.ghost.style.top = "";
|
|
62
|
+
this.ghost.style.transform = "";
|
|
63
|
+
const prop = this.orientation === "horizontal" ? "left" : "top";
|
|
64
|
+
this.ghost.style[prop] = `${splitterPos}px`;
|
|
65
|
+
this.ghost.setAttribute("active", "");
|
|
66
|
+
}
|
|
67
|
+
document.body.style.userSelect = "none";
|
|
68
|
+
document.body.style.cursor = this.orientation === "horizontal" ? "col-resize" : "row-resize";
|
|
69
|
+
this.fire("shift-start", { detail: {
|
|
70
|
+
index: this.dragState.index,
|
|
71
|
+
ratio: [...this.percentages]
|
|
72
|
+
} });
|
|
73
|
+
};
|
|
74
|
+
this.handlePointerMove = (e) => {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
const deltaPixel = (this.orientation === "horizontal" ? e.clientX : e.clientY) - this.dragState.startPoint;
|
|
77
|
+
const deltaPercent = deltaPixel / this.dragState.availableSize * 100;
|
|
78
|
+
const aIdx = this.dragState.index;
|
|
79
|
+
const bIdx = aIdx + 1;
|
|
80
|
+
if (this.lazy && this.ghost) {
|
|
81
|
+
const maxDelta = this.dragState.percentages[bIdx] / 100 * this.dragState.availableSize;
|
|
82
|
+
const minDelta = -(this.dragState.percentages[aIdx] / 100) * this.dragState.availableSize;
|
|
83
|
+
this.dragState.ghostDelta = Math.max(minDelta, Math.min(maxDelta, deltaPixel));
|
|
84
|
+
const axis = this.orientation === "horizontal" ? "X" : "Y";
|
|
85
|
+
this.ghost.style.transform = `translate${axis}(${this.dragState.ghostDelta}px)`;
|
|
86
|
+
} else {
|
|
87
|
+
const [aPercent, bPercent] = this.clampPair(this.dragState.percentages[aIdx] + deltaPercent, this.dragState.percentages[bIdx] - deltaPercent);
|
|
88
|
+
const dim = this.orientation === "horizontal" ? "width" : "height";
|
|
89
|
+
const offset = this.splitterSize * (this.splitterCount / this.panels.length);
|
|
90
|
+
this.panels[aIdx].style[dim] = `calc(${aPercent}% - ${offset}px)`;
|
|
91
|
+
this.panels[bIdx].style[dim] = `calc(${bPercent}% - ${offset}px)`;
|
|
92
|
+
const newRatio = [...this.dragState.percentages];
|
|
93
|
+
newRatio[aIdx] = aPercent;
|
|
94
|
+
newRatio[bIdx] = bPercent;
|
|
95
|
+
this.ratio = newRatio;
|
|
96
|
+
}
|
|
97
|
+
this.fire("shift", { detail: {
|
|
98
|
+
index: this.dragState.index,
|
|
99
|
+
ratio: this.lazy ? this.percentages : [...this.ratio]
|
|
100
|
+
} });
|
|
101
|
+
};
|
|
102
|
+
this.handlePointerUp = (e) => {
|
|
103
|
+
const target = e.currentTarget;
|
|
104
|
+
target.releasePointerCapture(e.pointerId);
|
|
105
|
+
target.removeEventListener("pointermove", this.handlePointerMove);
|
|
106
|
+
target.removeEventListener("pointerup", this.handlePointerUp);
|
|
107
|
+
target.removeEventListener("pointercancel", this.handlePointerUp);
|
|
108
|
+
if (this.lazy && this.ghost) {
|
|
109
|
+
this.ghost.removeAttribute("active");
|
|
110
|
+
this.ghost.style.transform = "";
|
|
111
|
+
const deltaPercent = this.dragState.ghostDelta / this.dragState.availableSize * 100;
|
|
112
|
+
const aIdx = this.dragState.index;
|
|
113
|
+
const bIdx = aIdx + 1;
|
|
114
|
+
const newRatio = [...this.dragState.percentages];
|
|
115
|
+
const [a, b] = this.clampPair(newRatio[aIdx] + deltaPercent, newRatio[bIdx] - deltaPercent);
|
|
116
|
+
newRatio[aIdx] = a;
|
|
117
|
+
newRatio[bIdx] = b;
|
|
118
|
+
this.ratio = newRatio;
|
|
119
|
+
this.updatePanelLayout();
|
|
120
|
+
}
|
|
121
|
+
document.body.style.userSelect = "";
|
|
122
|
+
document.body.style.cursor = "";
|
|
123
|
+
this.fire("shift-end", { detail: {
|
|
124
|
+
index: this.dragState.index,
|
|
125
|
+
ratio: [...this.percentages]
|
|
126
|
+
} });
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
this.styles = [super.styles, styles];
|
|
131
|
+
}
|
|
132
|
+
get percentages() {
|
|
133
|
+
const source = this.ratio.length === this.panels.length ? this.ratio : this.defaultRatio.length === this.panels.length ? this.defaultRatio : [];
|
|
134
|
+
if (source.length === this.panels.length) {
|
|
135
|
+
const total = source.reduce((sum, s) => sum + s, 0);
|
|
136
|
+
return source.map((s) => s / total * 100);
|
|
137
|
+
}
|
|
138
|
+
const equals = 100 / this.panels.length;
|
|
139
|
+
return this.panels.map(() => equals);
|
|
140
|
+
}
|
|
141
|
+
get splitterSize() {
|
|
142
|
+
const sizeStr = getComputedStyle(this).getPropertyValue("--splitter-size").trim();
|
|
143
|
+
return parseFloat(sizeStr) || 4;
|
|
144
|
+
}
|
|
145
|
+
get splitterCount() {
|
|
146
|
+
return Math.max(0, this.panels.length - 1);
|
|
147
|
+
}
|
|
148
|
+
willUpdate(changedProperties) {
|
|
149
|
+
super.willUpdate(changedProperties);
|
|
150
|
+
if ([
|
|
151
|
+
"orientation",
|
|
152
|
+
"defaultRatio",
|
|
153
|
+
"ratio"
|
|
154
|
+
].some((k) => changedProperties.has(k))) this.updatePanelLayout();
|
|
155
|
+
}
|
|
156
|
+
render() {
|
|
157
|
+
return html`
|
|
158
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4
159
|
|
|
160
|
+
<div class="splitter-ghost"></div>
|
|
161
|
+
<div hidden aria-hidden="true">
|
|
162
|
+
<slot name="splitter" @slotchange=${this.handleSplitterSlotChange}></slot>
|
|
163
|
+
</div>
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
166
|
+
appendSplitters() {
|
|
167
|
+
const root = this.renderRoot;
|
|
168
|
+
if (!root) return;
|
|
169
|
+
root.querySelectorAll(".splitter").forEach((el) => el.remove());
|
|
170
|
+
const ref = this.ghost ?? null;
|
|
171
|
+
for (let i = 0; i < this.splitterCount; i++) {
|
|
172
|
+
const splitter = this.createSplitter(i);
|
|
173
|
+
root.insertBefore(splitter, ref);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
createSplitter(index) {
|
|
177
|
+
const el = document.createElement("div");
|
|
178
|
+
el.setAttribute("class", "splitter");
|
|
179
|
+
el.setAttribute("part", "splitter");
|
|
180
|
+
el.style.order = String(index * 2 + 1);
|
|
181
|
+
el.dataset.index = String(index);
|
|
182
|
+
if (this.splitter) el.appendChild(this.splitter.cloneNode(true));
|
|
183
|
+
el.addEventListener("pointerdown", this.handlePointerDown);
|
|
184
|
+
el.addEventListener("dblclick", this.handleDblClick);
|
|
185
|
+
return el;
|
|
186
|
+
}
|
|
187
|
+
updatePanelLayout() {
|
|
188
|
+
if (this.panels.length === 0) return;
|
|
189
|
+
const dim = this.orientation === "horizontal" ? "width" : "height";
|
|
190
|
+
const otherDim = this.orientation === "horizontal" ? "height" : "width";
|
|
191
|
+
const percentages = this.percentages;
|
|
192
|
+
const splitterOffset = this.splitterSize * (this.splitterCount / this.panels.length);
|
|
193
|
+
this.panels.forEach((panel, index) => {
|
|
194
|
+
panel.style[dim] = `calc(${percentages[index]}% - ${splitterOffset}px)`;
|
|
195
|
+
panel.style[otherDim] = "";
|
|
196
|
+
panel.style.order = String(index * 2);
|
|
197
|
+
panel.style.boxSizing = "border-box";
|
|
198
|
+
panel.style.flexShrink = "0";
|
|
199
|
+
panel.style.overflow = "auto";
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
clampPair(aRaw, bRaw) {
|
|
203
|
+
const sum = aRaw + bRaw;
|
|
204
|
+
let a = aRaw, b = bRaw;
|
|
205
|
+
if (a < 0) {
|
|
206
|
+
a = 0;
|
|
207
|
+
b = sum;
|
|
208
|
+
} else if (b < 0) {
|
|
209
|
+
b = 0;
|
|
210
|
+
a = sum;
|
|
211
|
+
}
|
|
212
|
+
return [a, b];
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
__decorate([property({
|
|
216
|
+
type: Boolean,
|
|
217
|
+
reflect: true
|
|
218
|
+
}), __decorateMetadata("design:type", Object)], USplitPanel.prototype, "disabled", void 0);
|
|
219
|
+
__decorate([property({
|
|
220
|
+
type: String,
|
|
221
|
+
reflect: true
|
|
222
|
+
}), __decorateMetadata("design:type", String)], USplitPanel.prototype, "orientation", void 0);
|
|
223
|
+
__decorate([property({
|
|
224
|
+
type: Boolean,
|
|
225
|
+
reflect: true
|
|
226
|
+
}), __decorateMetadata("design:type", Object)], USplitPanel.prototype, "lazy", void 0);
|
|
227
|
+
__decorate([property({
|
|
228
|
+
type: Array,
|
|
229
|
+
reflect: true,
|
|
230
|
+
attribute: "default-ratio",
|
|
231
|
+
converter: arrayAttrConverter(parseFloat)
|
|
232
|
+
}), __decorateMetadata("design:type", Array)], USplitPanel.prototype, "defaultRatio", void 0);
|
|
233
|
+
__decorate([property({
|
|
234
|
+
type: Array,
|
|
235
|
+
reflect: true,
|
|
236
|
+
converter: arrayAttrConverter(parseFloat)
|
|
237
|
+
}), __decorateMetadata("design:type", Array)], USplitPanel.prototype, "ratio", void 0);
|
|
238
|
+
__decorate([query(".splitter-ghost"), __decorateMetadata("design:type", typeof (_ref = typeof HTMLElement !== "undefined" && HTMLElement) === "function" ? _ref : Object)], USplitPanel.prototype, "ghost", void 0);
|
|
239
|
+
USplitPanel = __decorate([customElement("u-split-panel")], USplitPanel);
|
|
240
|
+
//#endregion
|
|
5
241
|
export { USplitPanel };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { css } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/split-panel/USplitPanel.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--splitter-size: 4px;
|
|
6
|
-
--splitter-color: var(--u-neutral-200
|
|
7
|
-
--splitter-
|
|
6
|
+
--splitter-color: var(--u-neutral-200);
|
|
7
|
+
--splitter-color-hover: var(--u-blue-300);
|
|
8
|
+
--splitter-color-active: var(--u-blue-500);
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
:host {
|
|
@@ -21,29 +22,60 @@ const styles = css`
|
|
|
21
22
|
flex-direction: column;
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
:host([disabled]) .splitter {
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
opacity: 0.4;
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
/* Splitter */
|
|
25
31
|
.splitter {
|
|
32
|
+
position: relative;
|
|
33
|
+
z-index: 1;
|
|
26
34
|
flex-shrink: 0;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
27
38
|
background-color: var(--splitter-color);
|
|
28
39
|
transition: background-color 0.15s ease;
|
|
40
|
+
touch-action: none;
|
|
41
|
+
}
|
|
42
|
+
.splitter:hover {
|
|
43
|
+
background-color: var(--splitter-color-hover);
|
|
29
44
|
}
|
|
30
|
-
.splitter
|
|
45
|
+
.splitter:active {
|
|
46
|
+
background-color: var(--splitter-color-active);
|
|
47
|
+
}
|
|
48
|
+
:host([orientation="horizontal"]) .splitter {
|
|
31
49
|
width: var(--splitter-size);
|
|
32
50
|
cursor: col-resize;
|
|
33
51
|
}
|
|
34
|
-
|
|
52
|
+
:host([orientation="vertical"]) .splitter {
|
|
35
53
|
height: var(--splitter-size);
|
|
36
54
|
cursor: row-resize;
|
|
37
55
|
}
|
|
38
|
-
.splitter:hover,
|
|
39
|
-
.splitter.active {
|
|
40
|
-
background-color: var(--splitter-active-color);
|
|
41
|
-
}
|
|
42
56
|
|
|
43
|
-
/*
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
/* Ghost Splitter (lazy) */
|
|
58
|
+
.splitter-ghost {
|
|
59
|
+
display: none;
|
|
60
|
+
position: absolute;
|
|
61
|
+
z-index: 10;
|
|
62
|
+
background-color: var(--splitter-color-active);
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
.splitter-ghost[active] {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
:host([orientation="horizontal"]) .splitter-ghost {
|
|
70
|
+
top: 0;
|
|
71
|
+
width: var(--splitter-size);
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
:host([orientation="vertical"]) .splitter-ghost {
|
|
75
|
+
left: 0;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: var(--splitter-size);
|
|
46
78
|
}
|
|
47
79
|
`;
|
|
48
|
-
|
|
80
|
+
//#endregion
|
|
49
81
|
export { styles };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { UFormControlElement } from '../UFormControlElement.js';
|
|
2
|
+
/**
|
|
3
|
+
* 온/오프 상태를 전환하는 스위치 컴포넌트입니다.
|
|
4
|
+
* font-size로 전체 크기를 지정하고, CSS 변수로 다양한 스타일을 적용할 수 있습니다.
|
|
5
|
+
*
|
|
6
|
+
* @slot - 스위치 옆에 표시될 레이블 텍스트
|
|
7
|
+
* @slot track-checked - 체크 상태에서 트랙에 표시될 콘텐츠
|
|
8
|
+
* @slot track-unchecked - 체크 해제 상태에서 트랙에 표시될 콘텐츠
|
|
9
|
+
* @slot thumb-checked - 체크 상태에서 thumb에 표시될 콘텐츠
|
|
10
|
+
* @slot thumb-unchecked - 체크 해제 상태에서 thumb에 표시될 콘텐츠
|
|
11
|
+
*
|
|
12
|
+
* @csspart wrapper - 스위치 전체 래퍼
|
|
13
|
+
* @csspart track - 트랙 요소
|
|
14
|
+
* @csspart thumb - thumb 요소
|
|
15
|
+
* @csspart label - 레이블 영역
|
|
16
|
+
*
|
|
17
|
+
* @cssprop --switch-track-width - 트랙 너비 (2.4em)
|
|
18
|
+
* @cssprop --switch-track-height - 트랙 높이 (1.4em)
|
|
19
|
+
* @cssprop --switch-track-color - 비활성 트랙 배경색
|
|
20
|
+
* @cssprop --switch-track-color-checked - 활성 트랙 배경색
|
|
21
|
+
* @cssprop --switch-thumb-size - thumb 크기 (1.1em)
|
|
22
|
+
* @cssprop --switch-thumb-offset - thumb 간격 (0.15em)
|
|
23
|
+
* @cssprop --switch-thumb-color - thumb 색상 (#fff)
|
|
24
|
+
* @cssprop --switch-thumb-color-checked - 활성 thumb 색상 (#fff)
|
|
25
|
+
* @cssprop --switch-radius - border-radius (9999px, pill 형태)
|
|
26
|
+
* @cssprop --switch-duration - 전환 애니메이션 시간 (0.25s)
|
|
27
|
+
*
|
|
28
|
+
* @event change - 스위치 상태 변경 시 발생
|
|
29
|
+
*/
|
|
30
|
+
export declare class USwitch extends UFormControlElement<string> {
|
|
31
|
+
static styles: import('lit').CSSResultGroup[];
|
|
32
|
+
/** 체크 여부 */
|
|
33
|
+
checked: boolean;
|
|
34
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
35
|
+
validate(): boolean;
|
|
36
|
+
reset(): void;
|
|
37
|
+
private handleInputChange;
|
|
38
|
+
}
|
|
39
|
+
declare global {
|
|
40
|
+
interface HTMLElementTagNameMap {
|
|
41
|
+
'u-switch': USwitch;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { UFormControlElement } from "../UFormControlElement.js";
|
|
4
|
+
import { styles } from "./USwitch.styles.js";
|
|
5
|
+
import { customElement, property } from "lit/decorators.js";
|
|
6
|
+
import { html } from "lit";
|
|
7
|
+
import { live } from "lit/directives/live.js";
|
|
8
|
+
//#region src/components/switch/USwitch.ts
|
|
9
|
+
var USwitch = class USwitch extends UFormControlElement {
|
|
10
|
+
constructor(..._args) {
|
|
11
|
+
super(..._args);
|
|
12
|
+
this.checked = false;
|
|
13
|
+
this.handleInputChange = (e) => {
|
|
14
|
+
e.stopImmediatePropagation();
|
|
15
|
+
if (this.readonly || this.disabled) return;
|
|
16
|
+
const input = e.target;
|
|
17
|
+
this.checked = input.checked;
|
|
18
|
+
this.internals?.setFormValue(this.checked ? this.value || String(this.checked) : String(this.checked));
|
|
19
|
+
this.internals?.setValidity(input.validity, this.validationMessage || input.validationMessage, this.shadowRoot?.querySelector(".track") || void 0);
|
|
20
|
+
if (!this.novalidate) this.validate();
|
|
21
|
+
this.relay(e);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.styles = [super.styles, styles];
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return html`
|
|
29
|
+
<label class="wrapper" part="wrapper">
|
|
30
|
+
<input
|
|
31
|
+
type="checkbox"
|
|
32
|
+
?disabled=${this.disabled || this.readonly}
|
|
33
|
+
?required=${this.required}
|
|
34
|
+
.checked=${live(this.checked)}
|
|
35
|
+
@change=${this.handleInputChange}
|
|
36
|
+
/>
|
|
37
|
+
<span class="track" part="track">
|
|
38
|
+
<span class="track-checked">
|
|
39
|
+
<slot name="track-checked"></slot>
|
|
40
|
+
</span>
|
|
41
|
+
<span class="track-unchecked">
|
|
42
|
+
<slot name="track-unchecked"></slot>
|
|
43
|
+
</span>
|
|
44
|
+
<span class="thumb" part="thumb">
|
|
45
|
+
<span class="thumb-checked">
|
|
46
|
+
<slot name="thumb-checked"></slot>
|
|
47
|
+
</span>
|
|
48
|
+
<span class="thumb-unchecked">
|
|
49
|
+
<slot name="thumb-unchecked"></slot>
|
|
50
|
+
</span>
|
|
51
|
+
</span>
|
|
52
|
+
</span>
|
|
53
|
+
<span class="label" part="label">
|
|
54
|
+
<slot></slot>
|
|
55
|
+
<span class="required" ?hidden=${!this.required}>*</span>
|
|
56
|
+
</span>
|
|
57
|
+
</label>
|
|
58
|
+
|
|
59
|
+
<div class="description" ?hidden=${!this.description}>
|
|
60
|
+
${this.description}
|
|
61
|
+
</div>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
validate() {
|
|
65
|
+
if (this.internals) this.invalid = !this.internals.reportValidity();
|
|
66
|
+
else this.invalid = this.required && !this.checked;
|
|
67
|
+
return !this.invalid;
|
|
68
|
+
}
|
|
69
|
+
reset() {
|
|
70
|
+
this.checked = false;
|
|
71
|
+
this.invalid = false;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
__decorate([property({
|
|
75
|
+
type: Boolean,
|
|
76
|
+
reflect: true
|
|
77
|
+
}), __decorateMetadata("design:type", Boolean)], USwitch.prototype, "checked", void 0);
|
|
78
|
+
USwitch = __decorate([customElement("u-switch")], USwitch);
|
|
79
|
+
//#endregion
|
|
80
|
+
export { USwitch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|