yuyeon 0.3.4-rc.4 → 0.3.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/yuyeon.js +3963 -3707
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.js.map +1 -1
- package/lib/components/alert/YAlert.js +1 -2
- package/lib/components/alert/YAlert.js.map +1 -1
- package/lib/components/alert/index.js.map +1 -1
- package/lib/components/app/YApp.js +2 -2
- package/lib/components/app/YApp.js.map +1 -1
- package/lib/components/app/index.js.map +1 -1
- package/lib/components/badge/YBadge.js +7 -5
- package/lib/components/badge/YBadge.js.map +1 -1
- package/lib/components/badge/YBadge.scss +87 -86
- package/lib/components/badge/index.js.map +1 -1
- package/lib/components/bench/YBench.js +3 -4
- package/lib/components/bench/YBench.js.map +1 -1
- package/lib/components/bench/index.js.map +1 -1
- package/lib/components/button/YButton.js +1 -2
- package/lib/components/button/YButton.js.map +1 -1
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/card/YCard.js.map +1 -1
- package/lib/components/card/YCard.scss +2 -2
- package/lib/components/card/YCardBody.js.map +1 -1
- package/lib/components/card/YCardFooter.js.map +1 -1
- package/lib/components/card/YCardHeader.js.map +1 -1
- package/lib/components/card/index.js.map +1 -1
- package/lib/components/checkbox/YCheckbox.js +1 -2
- package/lib/components/checkbox/YCheckbox.js.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.js +1 -2
- package/lib/components/checkbox/YInputCheckbox.js.map +1 -1
- package/lib/components/checkbox/index.js.map +1 -1
- package/lib/components/chip/YChip.js +1 -2
- package/lib/components/chip/YChip.js.map +1 -1
- package/lib/components/chip/index.js.map +1 -1
- package/lib/components/date-picker/YDateCalendar.js +59 -54
- package/lib/components/date-picker/YDateCalendar.js.map +1 -1
- package/lib/components/date-picker/YDatePicker.js +24 -25
- package/lib/components/date-picker/YDatePicker.js.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.js +19 -20
- package/lib/components/date-picker/YDatePickerControl.js.map +1 -1
- package/lib/components/date-picker/YMonthPicker.js +10 -11
- package/lib/components/date-picker/YMonthPicker.js.map +1 -1
- package/lib/components/date-picker/YYearPicker.js +11 -13
- package/lib/components/date-picker/YYearPicker.js.map +1 -1
- package/lib/components/date-picker/index.js.map +1 -1
- package/lib/components/default-provider/YDefaultProvider.js.map +1 -1
- package/lib/components/default-provider/index.js.map +1 -1
- package/lib/components/dialog/YDialog.js +32 -32
- package/lib/components/dialog/YDialog.js.map +1 -1
- package/lib/components/dialog/index.js.map +1 -1
- package/lib/components/divider/YDivider.js +5 -5
- package/lib/components/divider/YDivider.js.map +1 -1
- package/lib/components/divider/index.js.map +1 -1
- package/lib/components/draggable/YDraggable.js +10 -11
- package/lib/components/draggable/YDraggable.js.map +1 -1
- package/lib/components/draggable/index.js.map +1 -1
- package/lib/components/dropdown/YDropdown.js +16 -17
- package/lib/components/dropdown/YDropdown.js.map +1 -1
- package/lib/components/dropdown/index.js.map +1 -1
- package/lib/components/field-input/YFieldInput.js +39 -39
- package/lib/components/field-input/YFieldInput.js.map +1 -1
- package/lib/components/field-input/index.js.map +1 -1
- package/lib/components/form/YForm.js +12 -14
- package/lib/components/form/YForm.js.map +1 -1
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/hover/YHover.js +9 -8
- package/lib/components/hover/YHover.js.map +1 -1
- package/lib/components/hover/index.js.map +1 -1
- package/lib/components/icon/YIcon.js +2 -4
- package/lib/components/icon/YIcon.js.map +1 -1
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.js +7 -6
- package/lib/components/icons/YIconCheckbox.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.scss +4 -5
- package/lib/components/icons/YIconClear.js +2 -1
- package/lib/components/icons/YIconClear.js.map +1 -1
- package/lib/components/icons/YIconDropdown.js +2 -1
- package/lib/components/icons/YIconDropdown.js.map +1 -1
- package/lib/components/icons/YIconExpand.js +1 -0
- package/lib/components/icons/YIconExpand.js.map +1 -1
- package/lib/components/icons/YIconPageControl.js +7 -6
- package/lib/components/icons/YIconPageControl.js.map +1 -1
- package/lib/components/icons/YIconSort.js +6 -5
- package/lib/components/icons/YIconSort.js.map +1 -1
- package/lib/components/icons/YIconSort.scss +2 -0
- package/lib/components/icons/index.js.map +1 -1
- package/lib/components/img/YImg.js +38 -33
- package/lib/components/img/YImg.js.map +1 -1
- package/lib/components/img/index.js +1 -1
- package/lib/components/img/index.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/YInput.js +1 -2
- package/lib/components/input/YInput.js.map +1 -1
- package/lib/components/input/YInput.scss +9 -8
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/ip-field/YIpv4Field.js +1 -2
- package/lib/components/ip-field/YIpv4Field.js.map +1 -1
- package/lib/components/ip-field/index.js.map +1 -1
- package/lib/components/layer/YLayer.js +38 -25
- package/lib/components/layer/YLayer.js.map +1 -1
- package/lib/components/layer/active-delay.js.map +1 -1
- package/lib/components/layer/active-stack.js.map +1 -1
- package/lib/components/layer/base.js +11 -1
- package/lib/components/layer/base.js.map +1 -1
- package/lib/components/layer/content.js.map +1 -1
- package/lib/components/layer/index.js.map +1 -1
- package/lib/components/layer/scroll-strategies.js.map +1 -1
- package/lib/components/list/YList.js +1 -2
- package/lib/components/list/YList.js.map +1 -1
- package/lib/components/list/YListItem.js +1 -2
- package/lib/components/list/YListItem.js.map +1 -1
- package/lib/components/list/index.js.map +1 -1
- package/lib/components/loading/YSpinnerRing.js.map +1 -1
- package/lib/components/loading/index.js.map +1 -1
- package/lib/components/menu/YMenu.js +22 -25
- package/lib/components/menu/YMenu.js.map +1 -1
- package/lib/components/menu/YMenu.scss +3 -4
- package/lib/components/menu/index.js.map +1 -1
- package/lib/components/navigation/YNavigation.js +1 -2
- package/lib/components/navigation/YNavigation.js.map +1 -1
- package/lib/components/navigation/index.js.map +1 -1
- package/lib/components/pagination/YPagination.js +1 -2
- package/lib/components/pagination/YPagination.js.map +1 -1
- package/lib/components/pagination/index.js.map +1 -1
- package/lib/components/panel/YDividePanel.js +1 -2
- package/lib/components/panel/YDividePanel.js.map +1 -1
- package/lib/components/panel/YDividePanel.scss +44 -43
- package/lib/components/panel/index.js.map +1 -1
- package/lib/components/plate/YPlate.js +1 -2
- package/lib/components/plate/YPlate.js.map +1 -1
- package/lib/components/plate/index.js.map +1 -1
- package/lib/components/progress-bar/YProgressBar.js +1 -2
- package/lib/components/progress-bar/YProgressBar.js.map +1 -1
- package/lib/components/progress-bar/index.js.map +1 -1
- package/lib/components/progress-ring/YProgressRing.js +3 -4
- package/lib/components/progress-ring/YProgressRing.js.map +1 -1
- package/lib/components/progress-ring/index.js.map +1 -1
- package/lib/components/radio/YRadio.js +1 -1
- package/lib/components/radio/YRadio.js.map +1 -1
- package/lib/components/radio/YRadioIcon.js.map +1 -1
- package/lib/components/radio/YRadioIcon.scss +2 -3
- package/lib/components/radio/index.js.map +1 -1
- package/lib/components/select/YSelect.js +41 -42
- package/lib/components/select/YSelect.js.map +1 -1
- package/lib/components/select/index.js.map +1 -1
- package/lib/components/slider/YSlider.js.map +1 -1
- package/lib/components/slider/index.js.map +1 -1
- package/lib/components/slider/slider.js.map +1 -1
- package/lib/components/snackbar/YSnackbar.js +6 -6
- package/lib/components/snackbar/YSnackbar.js.map +1 -1
- package/lib/components/snackbar/index.js.map +1 -1
- package/lib/components/switch/YSwitch.js +1 -2
- package/lib/components/switch/YSwitch.js.map +1 -1
- package/lib/components/switch/index.js.map +1 -1
- package/lib/components/tab/YTab.js +2 -3
- package/lib/components/tab/YTab.js.map +1 -1
- package/lib/components/tab/YTab.scss +1 -1
- package/lib/components/tab/YTabs.js +1 -2
- package/lib/components/tab/YTabs.js.map +1 -1
- package/lib/components/tab/index.js.map +1 -1
- package/lib/components/tab/shared.js.map +1 -1
- package/lib/components/tab/types.js.map +1 -1
- package/lib/components/table/YDataTable.js +1 -2
- package/lib/components/table/YDataTable.js.map +1 -1
- package/lib/components/table/YDataTableBody.js +2 -3
- package/lib/components/table/YDataTableBody.js.map +1 -1
- package/lib/components/table/YDataTableCell.js +1 -2
- package/lib/components/table/YDataTableCell.js.map +1 -1
- package/lib/components/table/YDataTableControl.js +1 -1
- package/lib/components/table/YDataTableControl.js.map +1 -1
- package/lib/components/table/YDataTableControl.scss +17 -17
- package/lib/components/table/YDataTableHead.js +1 -1
- package/lib/components/table/YDataTableHead.js.map +1 -1
- package/lib/components/table/YDataTableLayer.js +1 -2
- package/lib/components/table/YDataTableLayer.js.map +1 -1
- package/lib/components/table/YDataTableLayerRow.js +1 -2
- package/lib/components/table/YDataTableLayerRow.js.map +1 -1
- package/lib/components/table/YDataTableLayerRows.js +3 -4
- package/lib/components/table/YDataTableLayerRows.js.map +1 -1
- package/lib/components/table/YDataTableRow.js +1 -2
- package/lib/components/table/YDataTableRow.js.map +1 -1
- package/lib/components/table/YDataTableServer.js +1 -2
- package/lib/components/table/YDataTableServer.js.map +1 -1
- package/lib/components/table/YTable.js +1 -2
- package/lib/components/table/YTable.js.map +1 -1
- package/lib/components/table/composables/expand.js.map +1 -1
- package/lib/components/table/composables/header.js.map +1 -1
- package/lib/components/table/composables/items.js.map +1 -1
- package/lib/components/table/composables/measure.js +1 -1
- package/lib/components/table/composables/measure.js.map +1 -1
- package/lib/components/table/composables/options.js.map +1 -1
- package/lib/components/table/composables/pagination.js.map +1 -1
- package/lib/components/table/composables/provides.js.map +1 -1
- package/lib/components/table/composables/selection.js.map +1 -1
- package/lib/components/table/composables/sorted-items.js.map +1 -1
- package/lib/components/table/composables/sorting.js.map +1 -1
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/types/common.js.map +1 -1
- package/lib/components/table/types/header.js.map +1 -1
- package/lib/components/table/types/index.js.map +1 -1
- package/lib/components/table/types/item.js.map +1 -1
- package/lib/components/table/types/row.js.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.js +1 -2
- package/lib/components/text-ellipsis/YTextEllipsis.js.map +1 -1
- package/lib/components/text-ellipsis/index.js.map +1 -1
- package/lib/components/text-highlighter/YTextHighlighter.js.map +1 -1
- package/lib/components/text-highlighter/index.js.map +1 -1
- package/lib/components/text-interpolation/YTi.js +2 -2
- package/lib/components/text-interpolation/YTi.js.map +1 -1
- package/lib/components/text-interpolation/index.js.map +1 -1
- package/lib/components/textarea/YTextarea.js +1 -2
- package/lib/components/textarea/YTextarea.js.map +1 -1
- package/lib/components/textarea/index.js.map +1 -1
- package/lib/components/toggle-button/YToggleButton.js.map +1 -1
- package/lib/components/toggle-button/index.js.map +1 -1
- package/lib/components/tooltip/YTooltip.js +20 -21
- package/lib/components/tooltip/YTooltip.js.map +1 -1
- package/lib/components/tooltip/index.js.map +1 -1
- package/lib/components/transitions/expand-transition.js.map +1 -1
- package/lib/components/transitions/index.js.map +1 -1
- package/lib/components/tree-view/YTreeView.js +23 -29
- package/lib/components/tree-view/YTreeView.js.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.js +58 -21
- package/lib/components/tree-view/YTreeViewNode.js.map +1 -1
- package/lib/components/tree-view/index.js.map +1 -1
- package/lib/components/tree-view/tree-view.js +61 -8
- package/lib/components/tree-view/tree-view.js.map +1 -1
- package/lib/components/tree-view/types.js.map +1 -1
- package/lib/components/tree-view/util.js.map +1 -1
- package/lib/composables/choice-link.js.map +1 -1
- package/lib/composables/choice.js.map +1 -1
- package/lib/composables/communication.js.map +1 -1
- package/lib/composables/component.js.map +1 -1
- package/lib/composables/coordinate/arrangement.js.map +1 -1
- package/lib/composables/coordinate/index.js +23 -13
- package/lib/composables/coordinate/index.js.map +1 -1
- package/lib/composables/coordinate/levitation.js +79 -50
- package/lib/composables/coordinate/levitation.js.map +1 -1
- package/lib/composables/coordinate/types.js.map +1 -1
- package/lib/composables/coordinate/utils/point.js.map +1 -1
- package/lib/composables/date/factory.js.map +1 -1
- package/lib/composables/date/index.js.map +1 -1
- package/lib/composables/date/setting.js.map +1 -1
- package/lib/composables/date/types.js.map +1 -1
- package/lib/composables/defaults/index.js.map +1 -1
- package/lib/composables/defaults/share.js.map +1 -1
- package/lib/composables/defaults/types.js.map +1 -1
- package/lib/composables/dimension.js.map +1 -1
- package/lib/composables/focus.js.map +1 -1
- package/lib/composables/form.js +5 -5
- package/lib/composables/form.js.map +1 -1
- package/lib/composables/i18n/index.js.map +1 -1
- package/lib/composables/i18n/locale.js.map +1 -1
- package/lib/composables/i18n/rtl.js.map +1 -1
- package/lib/composables/i18n/share.js.map +1 -1
- package/lib/composables/icon.js +1 -2
- package/lib/composables/icon.js.map +1 -1
- package/lib/composables/index.js.map +1 -1
- package/lib/composables/layer-group.js.map +1 -1
- package/lib/composables/layout.js.map +1 -1
- package/lib/composables/list-items.js.map +1 -1
- package/lib/composables/progress.js.map +1 -1
- package/lib/composables/ref.js.map +1 -1
- package/lib/composables/resize-observer.js.map +1 -1
- package/lib/composables/scope.js.map +1 -1
- package/lib/composables/style-color.js +6 -5
- package/lib/composables/style-color.js.map +1 -1
- package/lib/composables/theme/factory.js.map +1 -1
- package/lib/composables/theme/helper.js.map +1 -1
- package/lib/composables/theme/index.js +8 -1
- package/lib/composables/theme/index.js.map +1 -1
- package/lib/composables/theme/setting.js.map +1 -1
- package/lib/composables/theme/types.js.map +1 -1
- package/lib/composables/timing.js +13 -5
- package/lib/composables/timing.js.map +1 -1
- package/lib/composables/transition.js.map +1 -1
- package/lib/composables/validation.js.map +1 -1
- package/lib/composables/vue-router.js.map +1 -1
- package/lib/directives/complement-click/index.js.map +1 -1
- package/lib/directives/index.js +3 -0
- package/lib/directives/index.js.map +1 -0
- package/lib/directives/plate-wave/index.js.map +1 -1
- package/lib/directives/plate-wave/plate-wave.scss +44 -33
- package/lib/directives/theme-class/index.js +24 -0
- package/lib/directives/theme-class/index.js.map +1 -0
- package/lib/etc/index.js.map +1 -1
- package/lib/i18n/built-in.js.map +1 -1
- package/lib/i18n/config.js.map +1 -1
- package/lib/i18n/types.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/locales/en.js.map +1 -1
- package/lib/locales/index.js.map +1 -1
- package/lib/locales/ko.js.map +1 -1
- package/lib/mixins/di.js.map +1 -1
- package/lib/mixins/rebind-attrs.js +0 -2
- package/lib/mixins/rebind-attrs.js.map +1 -1
- package/lib/styles/_elevation.scss +0 -1
- package/lib/styles/base.scss +3 -1
- package/lib/styles/settings/_elevation.scss +12 -12
- package/lib/styles/settings/_provided.scss +33 -33
- package/lib/styles/theme/dark.scss +3 -3
- package/lib/styles/theme/index.scss +4 -5
- package/lib/styles/theme/light.scss +3 -3
- package/lib/styles/util/_mixin.scss +16 -16
- package/lib/types/index.js.map +1 -1
- package/lib/util/anchor.js.map +1 -1
- package/lib/util/array.js.map +1 -1
- package/lib/util/collection.js.map +1 -1
- package/lib/util/color/apca.js +31 -30
- package/lib/util/color/apca.js.map +1 -1
- package/lib/util/color/const.js.map +1 -1
- package/lib/util/color/contrast/contrast.js.map +1 -1
- package/lib/util/color/conversion.js.map +1 -1
- package/lib/util/color/hct/cam16.js +95 -95
- package/lib/util/color/hct/cam16.js.map +1 -1
- package/lib/util/color/hct/hct-solver.js +113 -113
- package/lib/util/color/hct/hct-solver.js.map +1 -1
- package/lib/util/color/hct/hct.js +71 -71
- package/lib/util/color/hct/hct.js.map +1 -1
- package/lib/util/color/hct/viewing-conditions.js +6 -4
- package/lib/util/color/hct/viewing-conditions.js.map +1 -1
- package/lib/util/color/index.js +12 -12
- package/lib/util/color/index.js.map +1 -1
- package/lib/util/color/palettes/core-palette.js.map +1 -1
- package/lib/util/color/palettes/tonal-palette.js +3 -3
- package/lib/util/color/palettes/tonal-palette.js.map +1 -1
- package/lib/util/color/types.js.map +1 -1
- package/lib/util/color/utils/math-utils.js +62 -62
- package/lib/util/color/utils/math-utils.js.map +1 -1
- package/lib/util/common.js +28 -13
- package/lib/util/common.js.map +1 -1
- package/lib/util/component/component.js.map +1 -1
- package/lib/util/component/index.js.map +1 -1
- package/lib/util/component/inject-self.js.map +1 -1
- package/lib/util/component/props.js.map +1 -1
- package/lib/util/component/types.js.map +1 -1
- package/lib/util/date/adapters/yuyeon-date-adapter.js +3 -3
- package/lib/util/date/adapters/yuyeon-date-adapter.js.map +1 -1
- package/lib/util/date/built-in.js +2 -0
- package/lib/util/date/built-in.js.map +1 -1
- package/lib/util/date/index.js +1 -1
- package/lib/util/date/index.js.map +1 -1
- package/lib/util/date/types.js.map +1 -1
- package/lib/util/debounce.js +1 -1
- package/lib/util/debounce.js.map +1 -1
- package/lib/util/dom.js +10 -1
- package/lib/util/dom.js.map +1 -1
- package/lib/util/environments.js.map +1 -1
- package/lib/util/frame-scheduler.js +3 -3
- package/lib/util/frame-scheduler.js.map +1 -1
- package/lib/util/index.js +11 -11
- package/lib/util/index.js.map +1 -1
- package/lib/util/reactivity.js +3 -3
- package/lib/util/reactivity.js.map +1 -1
- package/lib/util/rect.js.map +1 -1
- package/lib/util/scroll.js.map +1 -1
- package/lib/util/string.js +3 -1
- package/lib/util/string.js.map +1 -1
- package/lib/util/ui.js +8 -7
- package/lib/util/ui.js.map +1 -1
- package/lib/util/validation.js.map +1 -1
- package/package.json +11 -2
- package/types/abstract/items.d.ts +4 -4
- package/types/components/alert/YAlert.d.ts +2 -2
- package/types/components/badge/YBadge.d.ts +9 -3
- package/types/components/button/YButton.d.ts +3 -3
- package/types/components/checkbox/YCheckbox.d.ts +4 -4
- package/types/components/chip/YChip.d.ts +0 -3
- package/types/components/date-picker/YDateCalendar.d.ts +4 -3
- package/types/components/date-picker/YDatePickerControl.d.ts +7 -7
- package/types/components/dialog/YDialog.d.ts +116 -6484
- package/types/components/draggable/YDraggable.d.ts +6 -6
- package/types/components/dropdown/YDropdown.d.ts +87 -87
- package/types/components/field-input/YFieldInput.d.ts +14 -14
- package/types/components/form/YForm.d.ts +3 -3
- package/types/components/icon/YIcon.d.ts +4 -4
- package/types/components/icons/YIconPageControl.d.ts +1 -1
- package/types/components/icons/YIconSort.d.ts +1 -1
- package/types/components/icons/index.d.ts +4 -4
- package/types/components/img/YImg.d.ts +30 -27
- package/types/components/img/index.d.ts +1 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/input/YInput.d.ts +13 -13
- package/types/components/ip-field/YIpv4Field.d.ts +5 -5
- package/types/components/layer/YLayer.d.ts +59 -3242
- package/types/components/layer/base.d.ts +4 -0
- package/types/components/layer/scroll-strategies.d.ts +4 -4
- package/types/components/menu/YMenu.d.ts +83 -6451
- package/types/components/pagination/YPagination.d.ts +3 -3
- package/types/components/select/YSelect.d.ts +172 -496
- package/types/components/slider/YSlider.d.ts +1 -1
- package/types/components/snackbar/YSnackbar.d.ts +55 -55
- package/types/components/tab/YTab.d.ts +3 -3
- package/types/components/tab/YTabs.d.ts +1 -1
- package/types/components/table/YDataTable.d.ts +30 -87
- package/types/components/table/YDataTableBody.d.ts +3 -3
- package/types/components/table/YDataTableCell.d.ts +2 -2
- package/types/components/table/YDataTableControl.d.ts +6 -6
- package/types/components/table/YDataTableLayer.d.ts +2 -2
- package/types/components/table/YDataTableRow.d.ts +1 -1
- package/types/components/table/YDataTableServer.d.ts +37 -94
- package/types/components/table/YTable.d.ts +3 -3
- package/types/components/table/composables/expand.d.ts +4 -4
- package/types/components/table/composables/header.d.ts +16 -48
- package/types/components/table/composables/items.d.ts +2 -2
- package/types/components/table/composables/pagination.d.ts +10 -10
- package/types/components/table/composables/selection.d.ts +6 -6
- package/types/components/table/composables/sorting.d.ts +8 -14
- package/types/components/table/types/item.d.ts +1 -1
- package/types/components/textarea/YTextarea.d.ts +30 -30
- package/types/components/tooltip/YTooltip.d.ts +67 -67
- package/types/components/tree-view/YTreeView.d.ts +21 -29
- package/types/components/tree-view/YTreeViewNode.d.ts +76 -6
- package/types/components/tree-view/tree-view.d.ts +19 -3
- package/types/composables/choice.d.ts +2 -2
- package/types/composables/coordinate/index.d.ts +28 -3207
- package/types/composables/coordinate/levitation.d.ts +4 -2
- package/types/composables/coordinate/types.d.ts +1 -0
- package/types/composables/dimension.d.ts +6 -6
- package/types/composables/form.d.ts +17 -27
- package/types/composables/list-items.d.ts +3 -3
- package/types/composables/style-color.d.ts +22 -1
- package/types/composables/theme/index.d.ts +1 -0
- package/types/composables/transition.d.ts +10 -10
- package/types/composables/validation.d.ts +6 -6
- package/types/composables/vue-router.d.ts +3 -3
- package/types/declares.d.ts +1 -0
- package/types/directives/index.d.ts +2 -0
- package/types/directives/plate-wave/index.d.ts +7 -1
- package/types/globals.d.ts +4 -5
- package/types/shims.d.ts +65 -59
- package/types/types/index.d.ts +3 -0
- package/types/util/anchor.d.ts +1 -1
- package/types/util/common.d.ts +3 -0
- package/types/util/component/component.d.ts +1 -2
- package/types/util/component/props.d.ts +1 -1
- package/types/util/component/types.d.ts +1 -1
- package/types/util/date/index.d.ts +1 -1
- package/types/util/dom.d.ts +2 -0
- package/types/util/index.d.ts +11 -11
- package/types/components/table/composibles/header.d.ts +0 -207
- package/types/components/table/composibles/items.d.ts +0 -55
- package/types/components/table/composibles/measure.d.ts +0 -8
- package/types/components/table/composibles/options.d.ts +0 -11
- package/types/components/table/composibles/pagination.d.ts +0 -81
- package/types/components/table/composibles/selection.d.ts +0 -82
- package/types/components/table/composibles/sorted-items.d.ts +0 -7
- package/types/components/table/composibles/sorting.d.ts +0 -62
- /package/types/directives/{theme-class.d.ts → theme-class/index.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/dialog/index.ts"],"sourcesContent":["export * from './YDialog';\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/dialog/index.ts"],"sourcesContent":["export * from './YDialog';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveDirective as _resolveDirective, createVNode as _createVNode, withDirectives as _withDirectives } from "vue";
|
|
2
2
|
import { useRender } from "../../composables/component.js";
|
|
3
3
|
import { defineComponent, propsFactory } from "../../util/component/index.js";
|
|
4
4
|
export const pressYDividerPropsOptions = propsFactory({
|
|
5
5
|
vertical: Boolean
|
|
6
|
-
},
|
|
6
|
+
}, "YDivider");
|
|
7
7
|
export const YDivider = defineComponent({
|
|
8
|
-
name:
|
|
8
|
+
name: "YDivider",
|
|
9
9
|
props: pressYDividerPropsOptions(),
|
|
10
10
|
setup(props) {
|
|
11
11
|
useRender(() => {
|
|
12
12
|
return _withDirectives(_createVNode("hr", {
|
|
13
|
-
"class": [
|
|
14
|
-
|
|
13
|
+
"class": ["y-divider", {
|
|
14
|
+
"y-divider--vertical": props.vertical
|
|
15
15
|
}]
|
|
16
16
|
}, null), [[_resolveDirective("theme")]]);
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDivider.js","names":["useRender","defineComponent","propsFactory","pressYDividerPropsOptions","vertical","Boolean","YDivider","name","props","setup","_withDirectives","_createVNode","_resolveDirective"],"sources":["../../../src/components/divider/YDivider.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"YDivider.js","names":["useRender","defineComponent","propsFactory","pressYDividerPropsOptions","vertical","Boolean","YDivider","name","props","setup","_withDirectives","_createVNode","_resolveDirective"],"sources":["../../../src/components/divider/YDivider.tsx"],"sourcesContent":["import type { PropType } from \"vue\";\r\n\r\nimport { useRender } from \"@/composables/component\";\r\nimport { defineComponent, propsFactory } from \"@/util/component\";\r\n\r\nexport const pressYDividerPropsOptions = propsFactory(\r\n\t{\r\n\t\tvertical: Boolean as PropType<boolean>,\r\n\t},\r\n\t\"YDivider\",\r\n);\r\n\r\nexport const YDivider = defineComponent({\r\n\tname: \"YDivider\",\r\n\tprops: pressYDividerPropsOptions(),\r\n\tsetup(props) {\r\n\t\tuseRender(() => {\r\n\t\t\treturn (\r\n\t\t\t\t<hr\r\n\t\t\t\t\tclass={[\"y-divider\", { \"y-divider--vertical\": props.vertical }]}\r\n\t\t\t\t\tv-theme\r\n\t\t\t\t/>\r\n\t\t\t);\r\n\t\t});\r\n\t},\r\n});\r\n\r\nexport type YDivider = InstanceType<typeof YDivider>;\r\n"],"mappings":";SAESA,SAAS;AAAA,SACTC,eAAe,EAAEC,YAAY;AAEtC,OAAO,MAAMC,yBAAyB,GAAGD,YAAY,CACpD;EACCE,QAAQ,EAAEC;AACX,CAAC,EACD,UACD,CAAC;AAED,OAAO,MAAMC,QAAQ,GAAGL,eAAe,CAAC;EACvCM,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAEL,yBAAyB,CAAC,CAAC;EAClCM,KAAKA,CAACD,KAAK,EAAE;IACZR,SAAS,CAAC,MAAM;MACf,OAAAU,eAAA,CAAAC,YAAA;QAAA,SAES,CAAC,WAAW,EAAE;UAAE,qBAAqB,EAAEH,KAAK,CAACJ;QAAS,CAAC;MAAC,YAAAQ,iBAAA;IAIlE,CAAC,CAAC;EACH;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/divider/index.ts"],"sourcesContent":["export * from './YDivider';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/divider/index.ts"],"sourcesContent":["export * from './YDivider';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed, defineComponent, h, ref, unref } from
|
|
1
|
+
import { computed, defineComponent, h, ref, unref } from "vue";
|
|
2
2
|
import { useRender } from "../../composables/component.js";
|
|
3
3
|
import { getHtmlElement } from "../../util/index.js";
|
|
4
4
|
export const YDraggable = defineComponent({
|
|
5
|
-
name:
|
|
5
|
+
name: "YDraggable",
|
|
6
6
|
props: {
|
|
7
7
|
as: [Object, String],
|
|
8
8
|
handle: [Object, String],
|
|
@@ -12,7 +12,7 @@ export const YDraggable = defineComponent({
|
|
|
12
12
|
container: [Object, String],
|
|
13
13
|
onDragStart: Function
|
|
14
14
|
},
|
|
15
|
-
emits: [
|
|
15
|
+
emits: ["start"],
|
|
16
16
|
setup(props, _ref) {
|
|
17
17
|
let {
|
|
18
18
|
slots,
|
|
@@ -27,7 +27,7 @@ export const YDraggable = defineComponent({
|
|
|
27
27
|
});
|
|
28
28
|
const handleEl = computed(() => {
|
|
29
29
|
let el = targetEl.value;
|
|
30
|
-
if (typeof props.handle ===
|
|
30
|
+
if (typeof props.handle === "string") {
|
|
31
31
|
const hEl = targetEl.value?.querySelector(props.handle);
|
|
32
32
|
if (hEl?.nodeType === 1) el = hEl;
|
|
33
33
|
}
|
|
@@ -35,7 +35,7 @@ export const YDraggable = defineComponent({
|
|
|
35
35
|
});
|
|
36
36
|
const containerEl = computed(() => {
|
|
37
37
|
const container = unref(props.container);
|
|
38
|
-
if (typeof container ===
|
|
38
|
+
if (typeof container === "string") {
|
|
39
39
|
return document.querySelector(container);
|
|
40
40
|
} else if (container) {
|
|
41
41
|
return getHtmlElement(container);
|
|
@@ -48,7 +48,7 @@ export const YDraggable = defineComponent({
|
|
|
48
48
|
};
|
|
49
49
|
});
|
|
50
50
|
const start = e => {
|
|
51
|
-
console.log(
|
|
51
|
+
console.log("start", e);
|
|
52
52
|
if (props.disabled) return;
|
|
53
53
|
if (props.exact && e.target !== targetEl.value) return;
|
|
54
54
|
const container = containerEl.value;
|
|
@@ -62,18 +62,18 @@ export const YDraggable = defineComponent({
|
|
|
62
62
|
originPosition.value = pos;
|
|
63
63
|
};
|
|
64
64
|
const move = e => {
|
|
65
|
-
console.log(
|
|
65
|
+
console.log("move", e);
|
|
66
66
|
};
|
|
67
67
|
const end = e => {
|
|
68
|
-
console.log(
|
|
68
|
+
console.log("end", e);
|
|
69
69
|
};
|
|
70
70
|
useRender(() => {
|
|
71
71
|
if (slots.default) {
|
|
72
|
-
return h(props.as ||
|
|
72
|
+
return h(props.as || "div", {
|
|
73
73
|
ref: targetRef
|
|
74
74
|
}, slots.default(slotProps.value));
|
|
75
75
|
}
|
|
76
|
-
return h(
|
|
76
|
+
return h("div");
|
|
77
77
|
});
|
|
78
78
|
if (window) {
|
|
79
79
|
const config = {
|
|
@@ -83,7 +83,6 @@ export const YDraggable = defineComponent({
|
|
|
83
83
|
// useEventListener(window, 'pointermove', move, config);
|
|
84
84
|
// useEventListener(window, 'pointerup', end, config);
|
|
85
85
|
}
|
|
86
|
-
|
|
87
86
|
return {
|
|
88
87
|
targetEl,
|
|
89
88
|
handleEl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDraggable.js","names":["computed","defineComponent","h","ref","unref","useRender","getHtmlElement","YDraggable","name","props","as","Object","String","handle","disabled","Boolean","capture","exact","container","onDragStart","Function","emits","setup","_ref","slots","emit","targetRef","dragging","originPosition","position","targetEl","value","handleEl","el","hEl","querySelector","nodeType","containerEl","document","undefined","slotProps","start","e","console","log","target","containerRect","getBoundingClientRect","targetRect","pos","x","clientX","left","scrollLeft","y","clientY","top","scrollTop","move","end","default","window","config"],"sources":["../../../src/components/draggable/YDraggable.tsx"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"YDraggable.js","names":["computed","defineComponent","h","ref","unref","useRender","getHtmlElement","YDraggable","name","props","as","Object","String","handle","disabled","Boolean","capture","exact","container","onDragStart","Function","emits","setup","_ref","slots","emit","targetRef","dragging","originPosition","position","targetEl","value","handleEl","el","hEl","querySelector","nodeType","containerEl","document","undefined","slotProps","start","e","console","log","target","containerRect","getBoundingClientRect","targetRect","pos","x","clientX","left","scrollLeft","y","clientY","top","scrollTop","move","end","default","window","config"],"sources":["../../../src/components/draggable/YDraggable.tsx"],"sourcesContent":["import {\r\n\tcomputed,\r\n\tdefineComponent,\r\n\th,\r\n\ttype MaybeRef,\r\n\ttype PropType,\r\n\tref,\r\n\tunref,\r\n} from \"vue\";\r\n\r\nimport { useRender } from \"@/composables/component\";\r\nimport { getHtmlElement } from \"@/util/index\";\r\n\r\ntype Coord = { x: number; y: number };\r\n\r\nexport const YDraggable = defineComponent({\r\n\tname: \"YDraggable\",\r\n\tprops: {\r\n\t\tas: [Object, String] as PropType<object | string>,\r\n\t\thandle: [Object, String] as PropType<MaybeRef<HTMLElement | string>>,\r\n\t\tdisabled: Boolean,\r\n\t\tcapture: Boolean,\r\n\t\texact: Boolean,\r\n\t\tcontainer: [Object, String] as PropType<\r\n\t\t\tMaybeRef<HTMLElement | SVGElement | null> | string\r\n\t\t>,\r\n\t\tonDragStart: Function as PropType<\r\n\t\t\t(pos: Coord, e: PointerEvent) => boolean | undefined\r\n\t\t>,\r\n\t},\r\n\temits: [\"start\"],\r\n\tsetup(props, { slots, emit }) {\r\n\t\tconst targetRef = ref();\r\n\t\tconst dragging = ref(false);\r\n\t\tconst originPosition = ref();\r\n\t\tconst position = ref();\r\n\r\n\t\tconst targetEl = computed(() => {\r\n\t\t\treturn getHtmlElement(targetRef.value);\r\n\t\t});\r\n\r\n\t\tconst handleEl = computed(() => {\r\n\t\t\tlet el = targetEl.value;\r\n\t\t\tif (typeof props.handle === \"string\") {\r\n\t\t\t\tconst hEl = targetEl.value?.querySelector(props.handle);\r\n\t\t\t\tif (hEl?.nodeType === 1) el = hEl;\r\n\t\t\t}\r\n\t\t\treturn el;\r\n\t\t});\r\n\r\n\t\tconst containerEl = computed(() => {\r\n\t\t\tconst container = unref(props.container);\r\n\t\t\tif (typeof container === \"string\") {\r\n\t\t\t\treturn document.querySelector(container);\r\n\t\t\t} else if (container) {\r\n\t\t\t\treturn getHtmlElement(container);\r\n\t\t\t}\r\n\t\t\treturn undefined;\r\n\t\t});\r\n\r\n\t\tconst slotProps = computed(() => {\r\n\t\t\treturn {\r\n\t\t\t\thandle: handleEl.value,\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\tconst start = (e: PointerEvent) => {\r\n\t\t\tconsole.log(\"start\", e);\r\n\t\t\tif (props.disabled) return;\r\n\t\t\tif (props.exact && e.target !== targetEl.value) return;\r\n\r\n\t\t\tconst container = containerEl.value;\r\n\t\t\tconst containerRect = container?.getBoundingClientRect?.();\r\n\t\t\tconst targetRect = targetEl.value?.getBoundingClientRect();\r\n\t\t\tconst pos = {\r\n\t\t\t\tx:\r\n\t\t\t\t\te.clientX -\r\n\t\t\t\t\t(container\r\n\t\t\t\t\t\t? targetRect.left - containerRect!.left + container.scrollLeft\r\n\t\t\t\t\t\t: targetRect.left),\r\n\t\t\t\ty:\r\n\t\t\t\t\te.clientY -\r\n\t\t\t\t\t(container\r\n\t\t\t\t\t\t? targetRect.top - containerRect!.top + container.scrollTop\r\n\t\t\t\t\t\t: targetRect.top),\r\n\t\t\t};\r\n\t\t\tif (props.onDragStart?.(pos, e) === false) return;\r\n\t\t\toriginPosition.value = pos;\r\n\t\t};\r\n\r\n\t\tconst move = (e: PointerEvent) => {\r\n\t\t\tconsole.log(\"move\", e);\r\n\t\t};\r\n\r\n\t\tconst end = (e: PointerEvent) => {\r\n\t\t\tconsole.log(\"end\", e);\r\n\t\t};\r\n\r\n\t\tuseRender(() => {\r\n\t\t\tif (slots.default) {\r\n\t\t\t\treturn h(\r\n\t\t\t\t\tprops.as || \"div\",\r\n\t\t\t\t\t{ ref: targetRef },\r\n\t\t\t\t\tslots.default(slotProps.value),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\treturn h(\"div\");\r\n\t\t});\r\n\r\n\t\tif (window) {\r\n\t\t\tconst config = { capture: props.capture ?? true };\r\n\t\t\t// useEventListener(handleEl, 'pointerdown', start, config);\r\n\t\t\t// useEventListener(window, 'pointermove', move, config);\r\n\t\t\t// useEventListener(window, 'pointerup', end, config);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttargetEl,\r\n\t\t\thandleEl,\r\n\t\t\tdragging,\r\n\t\t\tposition,\r\n\t\t};\r\n\t},\r\n});\r\n\r\nexport type YDraggable = InstanceType<typeof YDraggable>;\r\n"],"mappings":"AAAA,SACCA,QAAQ,EACRC,eAAe,EACfC,CAAC,EAGDC,GAAG,EACHC,KAAK,QACC,KAAK;AAAC,SAEJC,SAAS;AAAA,SACTC,cAAc;AAIvB,OAAO,MAAMC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Cd,cAAc,CAACG,KAAK,GAAGkB,GAAG;IAC3B,CAAC;IAED,MAAMS,IAAI,GAAIhB,CAAe,IAAK;MACjCC,OAAO,CAACC,GAAG,CAAC,MAAM,EAAEF,CAAC,CAAC;IACvB,CAAC;IAED,MAAMiB,GAAG,GAAIjB,CAAe,IAAK;MAChCC,OAAO,CAACC,GAAG,CAAC,KAAK,EAAEF,CAAC,CAAC;IACtB,CAAC;IAEDrC,SAAS,CAAC,MAAM;MACf,IAAImB,KAAK,CAACoC,OAAO,EAAE;QAClB,OAAO1D,CAAC,CACPO,KAAK,CAACC,EAAE,IAAI,KAAK,EACjB;UAAEP,GAAG,EAAEuB;QAAU,CAAC,EAClBF,KAAK,CAACoC,OAAO,CAACpB,SAAS,CAACT,KAAK,CAC9B,CAAC;MACF;MACA,OAAO7B,CAAC,CAAC,KAAK,CAAC;IAChB,CAAC,CAAC;IAEF,IAAI2D,MAAM,EAAE;MACX,MAAMC,MAAM,GAAG;QAAE9C,OAAO,EAAEP,KAAK,CAACO,OAAO,IAAI;MAAK,CAAC;MACjD;MACA;MACA;IACD;IAEA,OAAO;MACNc,QAAQ;MACRE,QAAQ;MACRL,QAAQ;MACRE;IACD,CAAC;EACF;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/draggable/index.ts"],"sourcesContent":["export * from './YDraggable';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/draggable/index.ts"],"sourcesContent":["export * from './YDraggable';\r\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mergeProps } from 'vue';
|
|
1
|
+
import { mergeProps, Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps, createTextVNode as _createTextVNode } from "vue";
|
|
3
2
|
import { pressItemsPropsOptions } from "../../abstract/items.js";
|
|
4
3
|
import { useModelDuplex } from "../../composables/communication.js";
|
|
5
4
|
import { useRender } from "../../composables/component.js";
|
|
@@ -14,25 +13,25 @@ import { YList, YListItem } from "../list/index.js";
|
|
|
14
13
|
import { YMenu, YMenuPropOptions } from "../menu/index.js";
|
|
15
14
|
import "./YDropdown.scss";
|
|
16
15
|
export const pressYDropdownPropsOptions = propsFactory({
|
|
17
|
-
...omit(YMenuPropOptions, [
|
|
16
|
+
...omit(YMenuPropOptions, ["modelValue", "coordinateStrategy"]),
|
|
18
17
|
modelValue: Boolean,
|
|
19
18
|
variation: String,
|
|
20
19
|
color: String,
|
|
21
20
|
...omit(pressCoordinateProps({
|
|
22
|
-
position:
|
|
23
|
-
}), [
|
|
21
|
+
position: "bottom"
|
|
22
|
+
}), ["coordinateStrategy"]),
|
|
24
23
|
dropdownIcon: {
|
|
25
24
|
type: [String, Array, Object],
|
|
26
|
-
default:
|
|
25
|
+
default: "$dropdown"
|
|
27
26
|
},
|
|
28
27
|
...pressItemsPropsOptions(),
|
|
29
28
|
...pressPolyTransitionPropsOptions({
|
|
30
|
-
transition:
|
|
29
|
+
transition: "fade"
|
|
31
30
|
}),
|
|
32
31
|
...pressYButtonProps
|
|
33
|
-
},
|
|
32
|
+
}, "YDropdown");
|
|
34
33
|
export const YDropdown = defineComponent({
|
|
35
|
-
name:
|
|
34
|
+
name: "YDropdown",
|
|
36
35
|
inheritAttrs: false,
|
|
37
36
|
components: {
|
|
38
37
|
YMenu
|
|
@@ -41,7 +40,7 @@ export const YDropdown = defineComponent({
|
|
|
41
40
|
...pressYDropdownPropsOptions()
|
|
42
41
|
},
|
|
43
42
|
slots: Object,
|
|
44
|
-
emits: [
|
|
43
|
+
emits: ["update:modelValue", "click"],
|
|
45
44
|
setup(props, _ref) {
|
|
46
45
|
let {
|
|
47
46
|
slots,
|
|
@@ -51,15 +50,15 @@ export const YDropdown = defineComponent({
|
|
|
51
50
|
const opened = useModelDuplex(props);
|
|
52
51
|
function onClickItem(item) {
|
|
53
52
|
opened.value = false;
|
|
54
|
-
emit(
|
|
53
|
+
emit("click", item);
|
|
55
54
|
}
|
|
56
55
|
useRender(() => {
|
|
57
56
|
const menuProps = chooseProps(props, YMenu.props);
|
|
58
|
-
const dropdownIconProps = chooseProps(typeof props.dropdownIcon ===
|
|
57
|
+
const dropdownIconProps = chooseProps(typeof props.dropdownIcon === "object" ? props.dropdownIcon : {}, YIcon.props);
|
|
59
58
|
return _createVNode(_Fragment, null, [_createVNode(YMenu, _mergeProps(menuProps, {
|
|
60
59
|
"modelValue": opened.value,
|
|
61
60
|
"onUpdate:modelValue": $event => opened.value = $event,
|
|
62
|
-
"content-classes": bindClasses([
|
|
61
|
+
"content-classes": bindClasses(["y-dropdown__content", props.contentClasses])
|
|
63
62
|
}), {
|
|
64
63
|
base: function () {
|
|
65
64
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -68,16 +67,16 @@ export const YDropdown = defineComponent({
|
|
|
68
67
|
return slots.base ? slots.base?.(...args) : _createVNode(YButton, _mergeProps({
|
|
69
68
|
"variation": props.variation,
|
|
70
69
|
"color": props.color,
|
|
71
|
-
"class": [
|
|
72
|
-
|
|
70
|
+
"class": ["y-dropdown", {
|
|
71
|
+
"y-dropdown--opened": opened.value
|
|
73
72
|
}],
|
|
74
73
|
"disabled": props.disabled
|
|
75
74
|
}, attrs), {
|
|
76
75
|
default: () => [_createVNode("span", {
|
|
77
76
|
"class": "y-dropdown__default"
|
|
78
|
-
}, [slots.default?.()]), slots[
|
|
77
|
+
}, [slots.default?.()]), slots["dropdown-icon"] ? slots["dropdown-icon"]() : _createVNode(YIcon, _mergeProps(mergeProps(dropdownIconProps), {
|
|
79
78
|
"icon": props.dropdownIcon,
|
|
80
|
-
"class": [
|
|
79
|
+
"class": ["y-dropdown__icon"]
|
|
81
80
|
}), null)]
|
|
82
81
|
});
|
|
83
82
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDropdown.js","names":["mergeProps","pressItemsPropsOptions","useModelDuplex","useRender","pressCoordinateProps","pressPolyTransitionPropsOptions","getObjectValueByPath","omit","bindClasses","chooseProps","defineComponent","propsFactory","pressYButtonProps","YButton","YCard","YIcon","YList","YListItem","YMenu","YMenuPropOptions","pressYDropdownPropsOptions","modelValue","Boolean","variation","String","color","position","dropdownIcon","type","Array","Object","default","transition","YDropdown","name","inheritAttrs","components","props","slots","emits","setup","_ref","attrs","emit","opened","onClickItem","item","value","menuProps","dropdownIconProps","_createVNode","_Fragment","_mergeProps","$event","contentClasses","base","_len","arguments","length","args","_key","disabled","menu","isArray","items","map","text","itemText","slotName","key","e","_createTextVNode"],"sources":["../../../src/components/dropdown/YDropdown.tsx"],"sourcesContent":["import { type PropType, type SlotsType, mergeProps } from 'vue';\r\n\r\nimport { pressItemsPropsOptions } from '@/abstract/items';\r\nimport { useModelDuplex } from '@/composables/communication';\r\nimport { useRender } from '@/composables/component';\r\nimport { pressCoordinateProps } from '@/composables/coordinate';\r\nimport { pressPolyTransitionPropsOptions } from '@/composables/transition';\r\nimport { getObjectValueByPath, omit } from '@/util/common';\r\nimport {\r\n bindClasses,\r\n chooseProps,\r\n defineComponent,\r\n propsFactory,\r\n} from '@/util/component';\r\n\r\nimport { pressYButtonProps, YButton } from '../button';\r\nimport { YCard } from '../card';\r\nimport { YIcon, YIconIconProp } from '../icon';\r\nimport { YList, YListItem } from '../list';\r\nimport { YMenu, YMenuPropOptions } from '../menu';\r\n\r\nimport './YDropdown.scss';\r\n\r\nexport const pressYDropdownPropsOptions = propsFactory(\r\n {\r\n ...omit(YMenuPropOptions, ['modelValue', 'coordinateStrategy']),\r\n modelValue: Boolean as PropType<boolean>,\r\n variation: String as PropType<string>,\r\n color: String as PropType<string>,\r\n ...omit(pressCoordinateProps({ position: 'bottom' as 'bottom' }), [\r\n 'coordinateStrategy',\r\n ]),\r\n dropdownIcon: {\r\n type: [String, Array, Object] as PropType<YIconIconProp>,\r\n default: '$dropdown',\r\n },\r\n ...pressItemsPropsOptions(),\r\n ...pressPolyTransitionPropsOptions({\r\n transition: 'fade',\r\n }),\r\n ...pressYButtonProps\r\n },\r\n 'YDropdown',\r\n);\r\n\r\ntype ItemScopedProps = {\r\n text: string;\r\n item: any;\r\n};\r\n\r\ntype ItemSlotPrefix = `item.${string}`;\r\n\r\nexport const YDropdown = defineComponent({\r\n name: 'YDropdown',\r\n inheritAttrs: false,\r\n components: {\r\n YMenu,\r\n },\r\n props: {\r\n ...pressYDropdownPropsOptions(),\r\n },\r\n slots: Object as SlotsType<{\r\n base: any;\r\n default: any;\r\n 'dropdown-icon': any;\r\n menu: any;\r\n item: ItemScopedProps;\r\n [k: ItemSlotPrefix]: ItemScopedProps;\r\n }>,\r\n emits: ['update:modelValue', 'click'],\r\n setup(props, { slots, attrs, emit }) {\r\n const opened = useModelDuplex(props);\r\n\r\n function onClickItem(item: any) {\r\n opened.value = false;\r\n emit('click', item);\r\n }\r\n\r\n useRender(() => {\r\n const menuProps = chooseProps(props, YMenu.props);\r\n const dropdownIconProps = chooseProps(\r\n typeof props.dropdownIcon === 'object' ? props.dropdownIcon : {},\r\n YIcon.props,\r\n );\r\n return (\r\n <>\r\n <YMenu\r\n {...menuProps}\r\n v-model={opened.value}\r\n content-classes={bindClasses([\r\n 'y-dropdown__content',\r\n props.contentClasses,\r\n ])}\r\n >\r\n {{\r\n base: (...args: any[]) =>\r\n slots.base ? (\r\n slots.base?.(...args)\r\n ) : (\r\n <YButton\r\n variation={props.variation}\r\n color={props.color}\r\n class={[\r\n 'y-dropdown',\r\n { 'y-dropdown--opened': opened.value },\r\n ]}\r\n disabled={props.disabled}\r\n {...attrs}\r\n >\r\n {\r\n <span class=\"y-dropdown__default\">\r\n {slots.default?.()}\r\n </span>\r\n }\r\n {slots['dropdown-icon'] ? (\r\n slots['dropdown-icon']()\r\n ) : (\r\n <YIcon\r\n {...mergeProps(dropdownIconProps)}\r\n icon={props.dropdownIcon}\r\n class={['y-dropdown__icon']}\r\n ></YIcon>\r\n )}\r\n </YButton>\r\n ),\r\n default: () =>\r\n slots.menu ? (\r\n slots.menu()\r\n ) : (\r\n <YCard>\r\n {Array.isArray(props.items) && props.items.length > 0 ? (\r\n <YList>\r\n {props.items.map((item) => {\r\n const text = getObjectValueByPath(\r\n item,\r\n props.itemText,\r\n );\r\n const slotName = `item.${item.key}` as const;\r\n return (\r\n <YListItem onClick={(e) => onClickItem(item)}>\r\n {slots.item\r\n ? slots.item({ text, item })\r\n : slots?.[slotName]\r\n ? slots[slotName]({ text, item })\r\n : text}\r\n </YListItem>\r\n );\r\n })}\r\n </YList>\r\n ) : (\r\n <div class=\"y-dropdown__no-options\">항목이 없습니다.</div>\r\n )}\r\n </YCard>\r\n ),\r\n }}\r\n </YMenu>\r\n </>\r\n );\r\n });\r\n },\r\n});\r\n"],"mappings":";AAAA,SAAwCA,UAAU,QAAQ,KAAK;AAAC,SAEvDC,sBAAsB;AAAA,SACtBC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,oBAAoB;AAAA,SACpBC,+BAA+B;AAAA,SAC/BC,oBAAoB,EAAEC,IAAI;AAAA,SAEjCC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,YAAY;AAAA,SAGLC,iBAAiB,EAAEC,OAAO;AAAA,SAC1BC,KAAK;AAAA,SACLC,KAAK;AAAA,SACLC,KAAK,EAAEC,SAAS;AAAA,SAChBC,KAAK,EAAEC,gBAAgB;AAEhC;AAEA,OAAO,MAAMC,0BAA0B,GAAGT,YAAY,CACpD;EACE,GAAGJ,IAAI,CAACY,gBAAgB,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;EAC/DE,UAAU,EAAEC,OAA4B;EACxCC,SAAS,EAAEC,MAA0B;EACrCC,KAAK,EAAED,MAA0B;EACjC,GAAGjB,IAAI,CAACH,oBAAoB,CAAC;IAAEsB,QAAQ,EAAE;EAAqB,CAAC,CAAC,EAAE,CAChE,oBAAoB,CACrB,CAAC;EACFC,YAAY,EAAE;IACZC,IA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G,CAAC,GAAAR,YAAA,CAAAlC,KAAA;YAAAe,OAAA,EAAAA,CAAA,MAEhDM,KAAK,CAAC2B,KAAK,CAACC,GAAG,CAAEnB,IAAI,IAAK;cACzB,MAAMoB,IAAI,GAAG5D,oBAAoB,CAC/BwC,IAAI,EACJT,KAAK,CAAC8B,QACR,CAAC;cACD,MAAMC,QAAQ,GAAI,QAAOtB,IAAI,CAACuB,GAAI,EAAU;cAC5C,OAAAnB,YAAA,CAAAjC,SAAA;gBAAA,WACuBqD,CAAC,IAAKzB,WAAW,CAACC,IAAI;cAAC;gBAAAf,OAAA,EAAAA,CAAA,MACzCO,KAAK,CAACQ,IAAI,GACPR,KAAK,CAACQ,IAAI,CAAC;kBAAEoB,IAAI;kBAAEpB;gBAAK,CAAC,CAAC,GAC1BR,KAAK,GAAG8B,QAAQ,CAAC,GACf9B,KAAK,CAAC8B,QAAQ,CAAC,CAAC;kBAAEF,IAAI;kBAAEpB;gBAAK,CAAC,CAAC,GAC/BoB,IAAI;cAAA;YAGhB,CAAC,CAAC;UAAA,KAAAhB,YAAA;YAAA;UAAA,IAAAqB,gBAAA,kDAIL;QAAA;MAEJ;IAKb,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YDropdown.js","names":["mergeProps","Fragment","_Fragment","createVNode","_createVNode","_mergeProps","createTextVNode","_createTextVNode","pressItemsPropsOptions","useModelDuplex","useRender","pressCoordinateProps","pressPolyTransitionPropsOptions","getObjectValueByPath","omit","bindClasses","chooseProps","defineComponent","propsFactory","pressYButtonProps","YButton","YCard","YIcon","YList","YListItem","YMenu","YMenuPropOptions","pressYDropdownPropsOptions","modelValue","Boolean","variation","String","color","position","dropdownIcon","type","Array","Object","default","transition","YDropdown","name","inheritAttrs","components","props","slots","emits","setup","_ref","attrs","emit","opened","onClickItem","item","value","menuProps","dropdownIconProps","$event","contentClasses","base","_len","arguments","length","args","_key","disabled","menu","isArray","items","map","text","itemText","slotName","key","e"],"sources":["../../../src/components/dropdown/YDropdown.tsx"],"sourcesContent":["import { mergeProps, type PropType, type SlotsType } from \"vue\";\r\n\r\nimport { pressItemsPropsOptions } from \"@/abstract/items\";\r\nimport { useModelDuplex } from \"@/composables/communication\";\r\nimport { useRender } from \"@/composables/component\";\r\nimport { pressCoordinateProps } from \"@/composables/coordinate\";\r\nimport { pressPolyTransitionPropsOptions } from \"@/composables/transition\";\r\nimport { getObjectValueByPath, omit } from \"@/util/common\";\r\nimport {\r\n\tbindClasses,\r\n\tchooseProps,\r\n\tdefineComponent,\r\n\tpropsFactory,\r\n} from \"@/util/component\";\r\n\r\nimport { pressYButtonProps, YButton } from \"../button\";\r\nimport { YCard } from \"../card\";\r\nimport { YIcon, type YIconIconProp } from \"../icon\";\r\nimport { YList, YListItem } from \"../list\";\r\nimport { YMenu, YMenuPropOptions } from \"../menu\";\r\n\r\nimport \"./YDropdown.scss\";\r\n\r\nexport const pressYDropdownPropsOptions = propsFactory(\r\n\t{\r\n\t\t...omit(YMenuPropOptions, [\"modelValue\", \"coordinateStrategy\"]),\r\n\t\tmodelValue: Boolean as PropType<boolean>,\r\n\t\tvariation: String as PropType<string>,\r\n\t\tcolor: String as PropType<string>,\r\n\t\t...omit(pressCoordinateProps({ position: \"bottom\" as \"bottom\" }), [\r\n\t\t\t\"coordinateStrategy\",\r\n\t\t]),\r\n\t\tdropdownIcon: {\r\n\t\t\ttype: [String, Array, Object] as PropType<YIconIconProp>,\r\n\t\t\tdefault: \"$dropdown\",\r\n\t\t},\r\n\t\t...pressItemsPropsOptions(),\r\n\t\t...pressPolyTransitionPropsOptions({\r\n\t\t\ttransition: \"fade\",\r\n\t\t}),\r\n\t\t...pressYButtonProps,\r\n\t},\r\n\t\"YDropdown\",\r\n);\r\n\r\ntype ItemScopedProps = {\r\n\ttext: string;\r\n\titem: any;\r\n};\r\n\r\ntype ItemSlotPrefix = `item.${string}`;\r\n\r\nexport const YDropdown = defineComponent({\r\n\tname: \"YDropdown\",\r\n\tinheritAttrs: false,\r\n\tcomponents: {\r\n\t\tYMenu,\r\n\t},\r\n\tprops: {\r\n\t\t...pressYDropdownPropsOptions(),\r\n\t},\r\n\tslots: Object as SlotsType<{\r\n\t\tbase: any;\r\n\t\tdefault: any;\r\n\t\t\"dropdown-icon\": any;\r\n\t\tmenu: any;\r\n\t\titem: ItemScopedProps;\r\n\t\t[k: ItemSlotPrefix]: ItemScopedProps;\r\n\t}>,\r\n\temits: [\"update:modelValue\", \"click\"],\r\n\tsetup(props, { slots, attrs, emit }) {\r\n\t\tconst opened = useModelDuplex(props);\r\n\r\n\t\tfunction onClickItem(item: any) {\r\n\t\t\topened.value = false;\r\n\t\t\temit(\"click\", item);\r\n\t\t}\r\n\r\n\t\tuseRender(() => {\r\n\t\t\tconst menuProps = chooseProps(props, YMenu.props);\r\n\t\t\tconst dropdownIconProps = chooseProps(\r\n\t\t\t\ttypeof props.dropdownIcon === \"object\" ? props.dropdownIcon : {},\r\n\t\t\t\tYIcon.props,\r\n\t\t\t);\r\n\t\t\treturn (\r\n\t\t\t\t<>\r\n\t\t\t\t\t<YMenu\r\n\t\t\t\t\t\t{...menuProps}\r\n\t\t\t\t\t\tv-model={opened.value}\r\n\t\t\t\t\t\tcontent-classes={bindClasses([\r\n\t\t\t\t\t\t\t\"y-dropdown__content\",\r\n\t\t\t\t\t\t\tprops.contentClasses,\r\n\t\t\t\t\t\t])}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\tbase: (...args: any[]) =>\r\n\t\t\t\t\t\t\t\tslots.base ? (\r\n\t\t\t\t\t\t\t\t\tslots.base?.(...args)\r\n\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t<YButton\r\n\t\t\t\t\t\t\t\t\t\tvariation={props.variation}\r\n\t\t\t\t\t\t\t\t\t\tcolor={props.color}\r\n\t\t\t\t\t\t\t\t\t\tclass={[\r\n\t\t\t\t\t\t\t\t\t\t\t\"y-dropdown\",\r\n\t\t\t\t\t\t\t\t\t\t\t{ \"y-dropdown--opened\": opened.value },\r\n\t\t\t\t\t\t\t\t\t\t]}\r\n\t\t\t\t\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\t\t\t\t\t{...attrs}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"y-dropdown__default\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{slots.default?.()}\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t{slots[\"dropdown-icon\"] ? (\r\n\t\t\t\t\t\t\t\t\t\t\tslots[\"dropdown-icon\"]()\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<YIcon\r\n\t\t\t\t\t\t\t\t\t\t\t\t{...mergeProps(dropdownIconProps)}\r\n\t\t\t\t\t\t\t\t\t\t\t\ticon={props.dropdownIcon}\r\n\t\t\t\t\t\t\t\t\t\t\t\tclass={[\"y-dropdown__icon\"]}\r\n\t\t\t\t\t\t\t\t\t\t\t></YIcon>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</YButton>\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\tdefault: () =>\r\n\t\t\t\t\t\t\t\tslots.menu ? (\r\n\t\t\t\t\t\t\t\t\tslots.menu()\r\n\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t<YCard>\r\n\t\t\t\t\t\t\t\t\t\t{Array.isArray(props.items) && props.items.length > 0 ? (\r\n\t\t\t\t\t\t\t\t\t\t\t<YList>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{props.items.map((item) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst text = getObjectValueByPath(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\titem,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprops.itemText,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst slotName = `item.${item.key}` as const;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<YListItem onClick={(e) => onClickItem(item)}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{slots.item\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? slots.item({ text, item })\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: slots?.[slotName]\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? slots[slotName]({ text, item })\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: text}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</YListItem>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t\t\t\t\t</YList>\r\n\t\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"y-dropdown__no-options\">항목이 없습니다.</div>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</YCard>\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t</YMenu>\r\n\t\t\t\t</>\r\n\t\t\t);\r\n\t\t});\r\n\t},\r\n});\r\n"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,IAAAC,SAAA,EAAAC,WAAA,IAAAC,YAAA,EAAAJ,UAAA,IAAAK,WAAA,EAAAC,eAAA,IAAAC,gBAAA,QAAuC,KAAK;AAAC,SAEvDC,sBAAsB;AAAA,SACtBC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,oBAAoB;AAAA,SACpBC,+BAA+B;AAAA,SAC/BC,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AAA;YAAA;UAAA,IAAAG,gBAAA,kDAIH;QAAA;MAEF;IAKP,CAAC,CAAC;EACH;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/dropdown/index.ts"],"sourcesContent":["export * from './YDropdown';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/dropdown/index.ts"],"sourcesContent":["export * from './YDropdown';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computed, getCurrentInstance, nextTick, ref, toRef, watch } from 'vue';
|
|
1
|
+
import { computed, getCurrentInstance, nextTick, ref, toRef, watch, createVNode as _createVNode, Fragment as _Fragment, mergeProps as _mergeProps } from "vue";
|
|
3
2
|
import { useRender } from "../../composables/component.js";
|
|
4
3
|
import { useFocus } from "../../composables/focus.js";
|
|
5
4
|
import { chooseProps, defineComponent, propsFactory } from "../../util/component/index.js";
|
|
6
5
|
import { YIconClear } from "../icons/YIconClear.js";
|
|
7
|
-
import {
|
|
6
|
+
import { pressYInputPropsOptions, YInput } from "../input/index.js";
|
|
8
7
|
import "./YFieldInput.scss";
|
|
9
|
-
const NAME =
|
|
8
|
+
const NAME = "y-field-input";
|
|
10
9
|
export const pressYFieldInputPropsOptions = propsFactory({
|
|
11
10
|
enableClear: Boolean,
|
|
12
11
|
inputAlign: String,
|
|
@@ -15,23 +14,23 @@ export const pressYFieldInputPropsOptions = propsFactory({
|
|
|
15
14
|
whenInputValid: [Boolean, Number],
|
|
16
15
|
tabindex: {
|
|
17
16
|
type: String,
|
|
18
|
-
default:
|
|
17
|
+
default: "0"
|
|
19
18
|
},
|
|
20
19
|
type: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: "text"
|
|
23
22
|
},
|
|
24
23
|
inputStyle: Object,
|
|
25
24
|
...pressYInputPropsOptions({
|
|
26
|
-
variation:
|
|
25
|
+
variation: "filled"
|
|
27
26
|
})
|
|
28
|
-
},
|
|
27
|
+
}, "YFieldInput");
|
|
29
28
|
export const YFieldInput = defineComponent({
|
|
30
|
-
name:
|
|
29
|
+
name: "YFieldInput",
|
|
31
30
|
props: {
|
|
32
31
|
...pressYFieldInputPropsOptions()
|
|
33
32
|
},
|
|
34
|
-
emits: [
|
|
33
|
+
emits: ["update:modelValue", "update:focused", "input", "change", "click", "mousedown", "mouseup", "keydown", "keyup", "focus", "blur", "mousedown:display", "keydown:display", "click:clear"],
|
|
35
34
|
slots: Object,
|
|
36
35
|
setup(props, _ref) {
|
|
37
36
|
let {
|
|
@@ -46,10 +45,10 @@ export const YFieldInput = defineComponent({
|
|
|
46
45
|
focused,
|
|
47
46
|
whenFocus,
|
|
48
47
|
whenBlur
|
|
49
|
-
} = useFocus(props,
|
|
50
|
-
const inValue = ref(
|
|
51
|
-
const displayValue = ref(
|
|
52
|
-
const inputType = toRef(props,
|
|
48
|
+
} = useFocus(props, "y-field-input");
|
|
49
|
+
const inValue = ref("");
|
|
50
|
+
const displayValue = ref("");
|
|
51
|
+
const inputType = toRef(props, "type");
|
|
53
52
|
const classes = computed(() => {
|
|
54
53
|
return {
|
|
55
54
|
[NAME]: true,
|
|
@@ -57,39 +56,39 @@ export const YFieldInput = defineComponent({
|
|
|
57
56
|
};
|
|
58
57
|
});
|
|
59
58
|
function onClick(event) {
|
|
60
|
-
emit(
|
|
59
|
+
emit("click", event);
|
|
61
60
|
}
|
|
62
61
|
function onFocus(event) {
|
|
63
62
|
whenFocus();
|
|
64
63
|
displayValue.value = inValue.value;
|
|
65
|
-
emit(
|
|
64
|
+
emit("focus", event);
|
|
66
65
|
}
|
|
67
66
|
function onBlur(event) {
|
|
68
67
|
whenBlur();
|
|
69
|
-
emit(
|
|
68
|
+
emit("blur", event);
|
|
70
69
|
changeDisplay();
|
|
71
70
|
}
|
|
72
71
|
function onInput(event) {
|
|
73
|
-
emit(
|
|
72
|
+
emit("input", event);
|
|
74
73
|
const target = event.target;
|
|
75
74
|
inValue.value = target?.value;
|
|
76
75
|
displayValue.value = target?.value;
|
|
77
76
|
}
|
|
78
77
|
function onChange(event) {
|
|
79
|
-
emit(
|
|
78
|
+
emit("change", inValue.value);
|
|
80
79
|
}
|
|
81
80
|
function onKeydown(event) {
|
|
82
|
-
emit(
|
|
81
|
+
emit("keydown", event);
|
|
83
82
|
}
|
|
84
83
|
function onKeyup(event) {
|
|
85
|
-
emit(
|
|
84
|
+
emit("keyup", event);
|
|
86
85
|
}
|
|
87
86
|
function onClickClear(event) {
|
|
88
|
-
emit(
|
|
87
|
+
emit("click:clear", event);
|
|
89
88
|
clear();
|
|
90
89
|
}
|
|
91
90
|
function onKeydownClear(event) {
|
|
92
|
-
if (event.code ===
|
|
91
|
+
if (event.code === "Space" || event.code === "Enter") {
|
|
93
92
|
clear();
|
|
94
93
|
}
|
|
95
94
|
}
|
|
@@ -100,10 +99,10 @@ export const YFieldInput = defineComponent({
|
|
|
100
99
|
input$.value?.select();
|
|
101
100
|
}
|
|
102
101
|
function clear() {
|
|
103
|
-
inValue.value =
|
|
104
|
-
displayValue.value =
|
|
105
|
-
emit(
|
|
106
|
-
emit(
|
|
102
|
+
inValue.value = "";
|
|
103
|
+
displayValue.value = "";
|
|
104
|
+
emit("update:modelValue", inValue.value);
|
|
105
|
+
emit("change", inValue.value);
|
|
107
106
|
}
|
|
108
107
|
function changeDisplay() {
|
|
109
108
|
const vm = getCurrentInstance();
|
|
@@ -112,10 +111,10 @@ export const YFieldInput = defineComponent({
|
|
|
112
111
|
} = props;
|
|
113
112
|
if (displayText !== undefined) {
|
|
114
113
|
let text = inValue.value;
|
|
115
|
-
if (typeof displayText ===
|
|
114
|
+
if (typeof displayText === "string") {
|
|
116
115
|
text = displayText;
|
|
117
116
|
}
|
|
118
|
-
if (displayText && typeof displayText ===
|
|
117
|
+
if (displayText && typeof displayText === "function") {
|
|
119
118
|
text = displayText.call(vm, text);
|
|
120
119
|
}
|
|
121
120
|
nextTick(() => {
|
|
@@ -150,7 +149,7 @@ export const YFieldInput = defineComponent({
|
|
|
150
149
|
resetError: () => yInput$.value?.resetError()
|
|
151
150
|
});
|
|
152
151
|
function onUpdateModel(value) {
|
|
153
|
-
emit(
|
|
152
|
+
emit("update:modelValue", value);
|
|
154
153
|
}
|
|
155
154
|
useRender(() => _createVNode(YInput, _mergeProps({
|
|
156
155
|
"class": classes.value,
|
|
@@ -161,8 +160,8 @@ export const YFieldInput = defineComponent({
|
|
|
161
160
|
"extended": extended,
|
|
162
161
|
"onUpdate:modelValue": onUpdateModel,
|
|
163
162
|
"onClick": onClick,
|
|
164
|
-
"onMousedown:display": $event => emit(
|
|
165
|
-
"onKeydown:display": $event => emit(
|
|
163
|
+
"onMousedown:display": $event => emit("mousedown:display", $event),
|
|
164
|
+
"onKeydown:display": $event => emit("keydown:display", $event),
|
|
166
165
|
"style": [attrs.style]
|
|
167
166
|
}), {
|
|
168
167
|
leading: slots.leading ? args => {
|
|
@@ -178,7 +177,7 @@ export const YFieldInput = defineComponent({
|
|
|
178
177
|
default: defaultProps => _createVNode("div", {
|
|
179
178
|
"class": [`${NAME}__field`],
|
|
180
179
|
"data-id": defaultProps.attrId,
|
|
181
|
-
"ref":
|
|
180
|
+
"ref": "field"
|
|
182
181
|
}, [props.floating ? yInput$.value?.createLabel?.() : undefined, slots.default?.({
|
|
183
182
|
...defaultProps,
|
|
184
183
|
focused: focused.value
|
|
@@ -191,7 +190,7 @@ export const YFieldInput = defineComponent({
|
|
|
191
190
|
"readonly": props.readonly || props.loading || defaultProps.loading,
|
|
192
191
|
"placeholder": props.placeholder,
|
|
193
192
|
"disabled": props.disabled,
|
|
194
|
-
"tabindex": props.tabindex ||
|
|
193
|
+
"tabindex": props.tabindex || "0",
|
|
195
194
|
"autocomplete": attrs.autocomplete,
|
|
196
195
|
"maxlength": attrs.maxlength,
|
|
197
196
|
"min": attrs.min,
|
|
@@ -208,22 +207,23 @@ export const YFieldInput = defineComponent({
|
|
|
208
207
|
"onKeyup": onKeyup
|
|
209
208
|
}, null)]),
|
|
210
209
|
trailing: slots.trailing || props.enableClear && inValue.value ? () => _createVNode(_Fragment, null, [props.enableClear && inValue.value && _createVNode("div", {
|
|
211
|
-
"class": [
|
|
210
|
+
"class": ["y-input__trailing", "y-input__trailing--clear"]
|
|
212
211
|
}, [_createVNode("button", {
|
|
212
|
+
"type": "button",
|
|
213
213
|
"class": [`${NAME}__clear`],
|
|
214
214
|
"disabled": props.disabled,
|
|
215
215
|
"onClick": onClickClear,
|
|
216
216
|
"onKeydown": onKeydownClear,
|
|
217
217
|
"tabindex": 2
|
|
218
218
|
}, [_createVNode(YIconClear, null, null)])]), slots.trailing && _createVNode("div", {
|
|
219
|
-
"class": [
|
|
219
|
+
"class": ["y-input__trailing"]
|
|
220
220
|
}, [slots.trailing()])]) : undefined,
|
|
221
221
|
label: slots.label ? () => slots.label?.() : undefined,
|
|
222
222
|
prepend: slots.prepend ? () => slots.prepend?.() : undefined,
|
|
223
223
|
append: slots.append ? () => slots.append?.() : undefined,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
"leading-out": slots["leading-out"] ? () => slots["leading-out"]?.() : undefined,
|
|
225
|
+
"trailing-out": slots["trailing-out"] ? () => slots["trailing-out"]?.() : undefined,
|
|
226
|
+
"helper-text": slots["helper-text"] ? slotProps => slots["helper-text"]?.(slotProps) : undefined
|
|
227
227
|
}));
|
|
228
228
|
return {
|
|
229
229
|
focused,
|