yuyeon 0.3.4-rc.4 → 0.3.5
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 +4170 -3976
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.js.map +1 -1
- package/lib/components/alert/YAlert.js +3 -4
- 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 +3 -2
- 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/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 +42 -37
- 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 +24 -27
- 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 +1 -0
- package/lib/components/panel/index.js.map +1 -1
- package/lib/components/plate/YPlate.js +3 -4
- 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/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 +18 -19
- 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 +1 -2
- package/lib/components/tree-view/YTreeView.js.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.js +1 -2
- 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.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 +81 -52
- 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 +2 -2
- package/lib/directives/plate-wave/index.js.map +1 -1
- package/lib/directives/plate-wave/plate-wave.scss +17 -6
- 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 +23 -23
- package/lib/styles/theme/dark.scss +3 -3
- package/lib/styles/theme/index.scss +0 -1
- 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 +1 -0
- 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.map +1 -1
- package/lib/util/color/hct/hct-solver.js +6 -6
- package/lib/util/color/hct/hct-solver.js.map +1 -1
- 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 +13 -13
- 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 +132 -123
- 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 +7 -7
- package/types/components/tree-view/YTreeViewNode.d.ts +5 -5
- package/types/components/tree-view/tree-view.d.ts +2 -2
- 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 +19 -20
- package/types/shims.d.ts +9 -3
- 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":"YDatePickerControl.js","names":["computed","useRender","defineComponent","propsFactory","YButton","YIcon","pressYDatePickerControlPropsOptions","disabled","type","Boolean","String","Array","default","nextIcon","Object","prevIcon","dropdownIcon","mode","yearText","monthText","YDatePickerControl","name","props","emits","click:year","click:month","click:prev","click:next","setup","_ref","emit","disableYear","isArray","includes","disableMonth","disablePrev","disableNext","onClickPrev","onClickNext","onClickYear","onClickMonth","
|
|
1
|
+
{"version":3,"file":"YDatePickerControl.js","names":["computed","createVNode","_createVNode","useRender","defineComponent","propsFactory","YButton","YIcon","pressYDatePickerControlPropsOptions","disabled","type","Boolean","String","Array","default","nextIcon","Object","prevIcon","dropdownIcon","mode","yearText","monthText","YDatePickerControl","name","props","emits","click:year","click:month","click:prev","click:next","setup","_ref","emit","disableYear","isArray","includes","disableMonth","disablePrev","disableNext","onClickPrev","onClickNext","onClickYear","onClickMonth","value"],"sources":["../../../src/components/date-picker/YDatePickerControl.tsx"],"sourcesContent":["import type { PropType } from \"vue\";\nimport { computed } from \"vue\";\n\nimport { useRender } from \"@/composables/component\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\n\nimport { YButton } from \"../button\";\nimport { YIcon } from \"../icon\";\n\nimport \"./YDatePickerControl.scss\";\n\nexport const pressYDatePickerControlPropsOptions = propsFactory(\n\t{\n\t\tdisabled: {\n\t\t\ttype: [Boolean, String, Array] as PropType<boolean | string | string[]>,\n\t\t\tdefault: false,\n\t\t},\n\t\tnextIcon: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: \"$next\",\n\t\t},\n\t\tprevIcon: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: \"$prev\",\n\t\t},\n\t\tdropdownIcon: {\n\t\t\ttype: [String, Object],\n\t\t},\n\t\tmode: {\n\t\t\ttype: String as PropType<\"date\" | \"month\" | \"year\">,\n\t\t\tdefault: \"date\",\n\t\t},\n\t\tyearText: String,\n\t\tmonthText: String,\n\t},\n\t\"YDataPickerControl\",\n);\n\nexport const YDatePickerControl = defineComponent({\n\tname: \"YDatePickerControl\",\n\tprops: pressYDatePickerControlPropsOptions(),\n\temits: {\n\t\t\"click:year\": () => true,\n\t\t\"click:month\": () => true,\n\t\t\"click:prev\": () => true,\n\t\t\"click:next\": () => true,\n\t},\n\tsetup(props, { emit }) {\n\t\tconst disableYear = computed(() => {\n\t\t\treturn Array.isArray(props.disabled)\n\t\t\t\t? props.disabled.includes(\"year\")\n\t\t\t\t: !!props.disabled;\n\t\t});\n\t\tconst disableMonth = computed(() => {\n\t\t\treturn Array.isArray(props.disabled)\n\t\t\t\t? props.disabled.includes(\"month\")\n\t\t\t\t: !!props.disabled;\n\t\t});\n\n\t\tconst disablePrev = computed(() => {\n\t\t\treturn Array.isArray(props.disabled)\n\t\t\t\t? props.disabled.includes(\"prev\")\n\t\t\t\t: !!props.disabled;\n\t\t});\n\t\tconst disableNext = computed(() => {\n\t\t\treturn Array.isArray(props.disabled)\n\t\t\t\t? props.disabled.includes(\"next\")\n\t\t\t\t: !!props.disabled;\n\t\t});\n\n\t\tfunction onClickPrev() {\n\t\t\temit(\"click:prev\");\n\t\t}\n\n\t\tfunction onClickNext() {\n\t\t\temit(\"click:next\");\n\t\t}\n\n\t\tfunction onClickYear() {\n\t\t\temit(\"click:year\");\n\t\t}\n\n\t\tfunction onClickMonth() {\n\t\t\temit(\"click:month\");\n\t\t}\n\n\t\tuseRender(() => (\n\t\t\t<div class={[\"y-date-picker-control\"]}>\n\t\t\t\t<YButton\n\t\t\t\t\tvariation=\"text\"\n\t\t\t\t\tclass=\"y-date-picker-control__display\"\n\t\t\t\t\tdisabled={disableYear.value}\n\t\t\t\t\tonClick={onClickYear}\n\t\t\t\t>\n\t\t\t\t\t{props.yearText}\n\t\t\t\t</YButton>\n\t\t\t\t<YButton\n\t\t\t\t\tvariation=\"text\"\n\t\t\t\t\tclass=\"y-date-picker-control__display\"\n\t\t\t\t\tdisabled={disableMonth.value}\n\t\t\t\t\tonClick={onClickMonth}\n\t\t\t\t>\n\t\t\t\t\t{props.monthText}\n\t\t\t\t</YButton>\n\t\t\t\t<div class=\"flex-spacer\"></div>\n\t\t\t\t<YButton\n\t\t\t\t\tclass=\"y-date-picker-control__page-button\"\n\t\t\t\t\tvariation=\"text\"\n\t\t\t\t\tdisabled={disablePrev.value}\n\t\t\t\t\tonClick={onClickPrev}\n\t\t\t\t>\n\t\t\t\t\t<YIcon icon={props.prevIcon as string} />\n\t\t\t\t</YButton>\n\t\t\t\t<YButton\n\t\t\t\t\tclass=\"y-date-picker-control__page-button\"\n\t\t\t\t\tvariation=\"text\"\n\t\t\t\t\tdisabled={disableNext.value}\n\t\t\t\t\tonClick={onClickNext}\n\t\t\t\t>\n\t\t\t\t\t<YIcon icon={props.nextIcon as string} />\n\t\t\t\t</YButton>\n\t\t\t</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OAAA;MAAA;MAAA;MAAA,YAIzB2B,WAAW,CAACU,KAAK;MAAA,WAClBF;IAAW;MAAA3B,OAAA,EAAAA,CAAA,MAEnBU,KAAK,CAACJ,QAAQ;IAAA,IAAAlB,YAAA,CAAAI,OAAA;MAAA;MAAA;MAAA,YAKL8B,YAAY,CAACO,KAAK;MAAA,WACnBD;IAAY;MAAA5B,OAAA,EAAAA,CAAA,MAEpBU,KAAK,CAACH,SAAS;IAAA,IAAAnB,YAAA;MAAA;IAAA,UAAAA,YAAA,CAAAI,OAAA;MAAA;MAAA;MAAA,YAMN+B,WAAW,CAACM,KAAK;MAAA,WAClBJ;IAAW;MAAAzB,OAAA,EAAAA,CAAA,MAAAZ,YAAA,CAAAK,KAAA;QAAA,QAEPiB,KAAK,CAACP;MAAQ;IAAA,IAAAf,YAAA,CAAAI,OAAA;MAAA;MAAA;MAAA,YAKjBgC,WAAW,CAACK,KAAK;MAAA,WAClBH;IAAW;MAAA1B,OAAA,EAAAA,CAAA,MAAAZ,YAAA,CAAAK,KAAA;QAAA,QAEPiB,KAAK,CAACT;MAAQ;IAAA,IAG7B,CAAC;EACH;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { computed } from 'vue';
|
|
1
|
+
import { computed, createVNode as _createVNode } from "vue";
|
|
3
2
|
import { useModelDuplex } from "../../composables/communication.js";
|
|
4
3
|
import { useRender } from "../../composables/component.js";
|
|
5
4
|
import { useDate } from "../../composables/date/index.js";
|
|
@@ -11,21 +10,21 @@ export const pressYMonthPickerPropsOptions = propsFactory({
|
|
|
11
10
|
modelValue: Number,
|
|
12
11
|
color: String,
|
|
13
12
|
height: [String, Number]
|
|
14
|
-
},
|
|
13
|
+
}, "YMonthPicker");
|
|
15
14
|
export const YMonthPicker = defineComponent({
|
|
16
|
-
name:
|
|
15
|
+
name: "YMonthPicker",
|
|
17
16
|
props: pressYMonthPickerPropsOptions(),
|
|
18
|
-
emits: [
|
|
17
|
+
emits: ["mode"],
|
|
19
18
|
setup(props, _ref) {
|
|
20
19
|
let {
|
|
21
20
|
emit
|
|
22
21
|
} = _ref;
|
|
23
22
|
const dateUtil = useDate();
|
|
24
|
-
const model = useModelDuplex(props,
|
|
23
|
+
const model = useModelDuplex(props, "modelValue");
|
|
25
24
|
const months = computed(() => {
|
|
26
25
|
let date = dateUtil.startOfYear(dateUtil.date());
|
|
27
26
|
return getRangeArr(12).map(i => {
|
|
28
|
-
const text = dateUtil.format(date,
|
|
27
|
+
const text = dateUtil.format(date, "monthShort");
|
|
29
28
|
date = dateUtil.getNextMonth(date);
|
|
30
29
|
return {
|
|
31
30
|
text,
|
|
@@ -35,21 +34,21 @@ export const YMonthPicker = defineComponent({
|
|
|
35
34
|
});
|
|
36
35
|
function onClick(index) {
|
|
37
36
|
if (model.value === index) {
|
|
38
|
-
emit(
|
|
37
|
+
emit("mode");
|
|
39
38
|
}
|
|
40
39
|
model.value = index;
|
|
41
40
|
}
|
|
42
41
|
useRender(() => {
|
|
43
42
|
return _createVNode("div", {
|
|
44
|
-
"class": [
|
|
43
|
+
"class": ["y-month-picker"]
|
|
45
44
|
}, [months.value.map((month, index) => {
|
|
46
45
|
const item = {
|
|
47
46
|
active: index === model.value
|
|
48
47
|
};
|
|
49
48
|
return _createVNode("div", {
|
|
50
|
-
"class": [
|
|
49
|
+
"class": ["y-month-picker__cell", "y-month-picker__month"]
|
|
51
50
|
}, [_createVNode(YButton, {
|
|
52
|
-
"variation": [
|
|
51
|
+
"variation": ["rounded", "text"].join(","),
|
|
53
52
|
"active": item.active,
|
|
54
53
|
"color": props.color,
|
|
55
54
|
"onClick": () => onClick(index)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YMonthPicker.js","names":["computed","useModelDuplex","useRender","useDate","getRangeArr","defineComponent","propsFactory","YButton","pressYMonthPickerPropsOptions","modelValue","Number","color","String","height","YMonthPicker","name","props","emits","setup","_ref","emit","dateUtil","model","months","date","startOfYear","map","i","text","format","getNextMonth","value","onClick","index","
|
|
1
|
+
{"version":3,"file":"YMonthPicker.js","names":["computed","createVNode","_createVNode","useModelDuplex","useRender","useDate","getRangeArr","defineComponent","propsFactory","YButton","pressYMonthPickerPropsOptions","modelValue","Number","color","String","height","YMonthPicker","name","props","emits","setup","_ref","emit","dateUtil","model","months","date","startOfYear","map","i","text","format","getNextMonth","value","onClick","index","month","item","active","join","default"],"sources":["../../../src/components/date-picker/YMonthPicker.tsx"],"sourcesContent":["import { computed } from \"vue\";\n\nimport { useModelDuplex } from \"@/composables/communication\";\nimport { useRender } from \"@/composables/component\";\nimport { useDate } from \"@/composables/date\";\nimport { getRangeArr } from \"@/util/common\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\n\nimport { YButton } from \"../button\";\n\nimport \"./YMonthPicker.scss\";\n\nexport const pressYMonthPickerPropsOptions = propsFactory(\n\t{\n\t\tmodelValue: Number,\n\t\tcolor: String,\n\t\theight: [String, Number],\n\t},\n\t\"YMonthPicker\",\n);\n\nexport const YMonthPicker = defineComponent({\n\tname: \"YMonthPicker\",\n\tprops: pressYMonthPickerPropsOptions(),\n\temits: [\"mode\"],\n\tsetup(props, { emit }) {\n\t\tconst dateUtil = useDate();\n\t\tconst model = useModelDuplex(props, \"modelValue\");\n\n\t\tconst months = computed(() => {\n\t\t\tlet date = dateUtil.startOfYear(dateUtil.date());\n\n\t\t\treturn getRangeArr(12).map((i) => {\n\t\t\t\tconst text = dateUtil.format(date, \"monthShort\");\n\t\t\t\tdate = dateUtil.getNextMonth(date);\n\n\t\t\t\treturn {\n\t\t\t\t\ttext,\n\t\t\t\t\tvalue: i,\n\t\t\t\t};\n\t\t\t});\n\t\t});\n\n\t\tfunction onClick(index: number) {\n\t\t\tif (model.value === index) {\n\t\t\t\temit(\"mode\");\n\t\t\t}\n\t\t\tmodel.value = index;\n\t\t}\n\n\t\tuseRender(() => {\n\t\t\treturn (\n\t\t\t\t<div class={[\"y-month-picker\"]}>\n\t\t\t\t\t{months.value.map((month, index) => {\n\t\t\t\t\t\tconst item = {\n\t\t\t\t\t\t\tactive: index === model.value,\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div class={[\"y-month-picker__cell\", \"y-month-picker__month\"]}>\n\t\t\t\t\t\t\t\t<YButton\n\t\t\t\t\t\t\t\t\tvariation={[\"rounded\", \"text\"].join(\",\")}\n\t\t\t\t\t\t\t\t\tactive={item.active}\n\t\t\t\t\t\t\t\t\tcolor={props.color}\n\t\t\t\t\t\t\t\t\tonClick={() => onClick(index)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{month.text}\n\t\t\t\t\t\t\t\t</YButton>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\n\t\treturn {};\n\t},\n});\n\nexport type YMonthPicker = InstanceType<typeof YMonthPicker>;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAAC,WAAA,IAAAC,YAAA,QAAQ,KAAK;AAAC,SAEtBC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,eAAe,EAAEC,YAAY;AAAA,SAE7BC,OAAO;AAEhB;AAEA,OAAO,MAAMC,6BAA6B,GAAGF,YAAY,CACxD;EACCG,UAAU,EAAEC,MAAM;EAClBC,KAAK,EAAEC,MAAM;EACbC,MAAM,EAAE,CAACD,MAAM,EAAEF,MAAM;AACxB,CAAC,EACD,cACD,CAAC;AAED,OAAO,MAAMI,YAAY,GAAGT,eAAe,CAAC;EAC3CU,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAER,6BAA6B,CAAC,CAAC;EACtCS,KAAK,EAAE,CAAC,MAAM,CAAC;EACfC,KAAKA,CAACF,KAAK,EAAAG,IAAA,EAAY;IAAA,IAAV;MAAEC;IAAK,CAAC,GAAAD,IAAA;I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;UAAAK,OAAA,EAAAA,CAAA,MAE5BJ,KAAK,CAACN,IAAI;QAAA;MAIf,CAAC,CAAC;IAGL,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACV;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { computed, ref } from 'vue';
|
|
1
|
+
import { computed, ref, createVNode as _createVNode } from "vue";
|
|
3
2
|
import { useModelDuplex } from "../../composables/communication.js";
|
|
4
3
|
import { useRender } from "../../composables/component.js";
|
|
5
4
|
import { useDate } from "../../composables/date/index.js";
|
|
6
5
|
import { getRangeArr } from "../../util/common.js";
|
|
7
|
-
import { defineComponent } from "../../util/component/index.js";
|
|
8
|
-
import { propsFactory } from "../../util/component/index.js";
|
|
6
|
+
import { defineComponent, propsFactory } from "../../util/component/index.js";
|
|
9
7
|
import { YButton } from "../button/index.js";
|
|
10
8
|
import "./YYearPicker.scss";
|
|
11
9
|
export const pressYYearPickerPropsOptions = propsFactory({
|
|
@@ -14,19 +12,19 @@ export const pressYYearPickerPropsOptions = propsFactory({
|
|
|
14
12
|
height: [String, Number],
|
|
15
13
|
min: null,
|
|
16
14
|
max: null
|
|
17
|
-
},
|
|
15
|
+
}, "YYearPicker");
|
|
18
16
|
const interval = 20;
|
|
19
17
|
export const YYearPicker = defineComponent({
|
|
20
|
-
name:
|
|
18
|
+
name: "YYearPicker",
|
|
21
19
|
props: pressYYearPickerPropsOptions(),
|
|
22
|
-
emits: [
|
|
20
|
+
emits: ["mode"],
|
|
23
21
|
setup(props, _ref) {
|
|
24
22
|
let {
|
|
25
23
|
emit,
|
|
26
24
|
expose
|
|
27
25
|
} = _ref;
|
|
28
26
|
const dateUtil = useDate();
|
|
29
|
-
const model = useModelDuplex(props,
|
|
27
|
+
const model = useModelDuplex(props, "modelValue");
|
|
30
28
|
const tempYear = model.value;
|
|
31
29
|
const startYear = ref(tempYear - tempYear % interval - (tempYear < 0 ? interval : 0));
|
|
32
30
|
const years = computed(() => {
|
|
@@ -34,7 +32,7 @@ export const YYearPicker = defineComponent({
|
|
|
34
32
|
return getRangeArr(interval + 1, startYear.value).map(value => {
|
|
35
33
|
date = dateUtil.setYear(date, value);
|
|
36
34
|
return {
|
|
37
|
-
text: dateUtil.format(date,
|
|
35
|
+
text: dateUtil.format(date, "year"),
|
|
38
36
|
value,
|
|
39
37
|
active: model.value === value
|
|
40
38
|
};
|
|
@@ -42,7 +40,7 @@ export const YYearPicker = defineComponent({
|
|
|
42
40
|
});
|
|
43
41
|
function onClick(value) {
|
|
44
42
|
if (model.value === value) {
|
|
45
|
-
emit(
|
|
43
|
+
emit("mode");
|
|
46
44
|
}
|
|
47
45
|
model.value = value;
|
|
48
46
|
}
|
|
@@ -59,7 +57,7 @@ export const YYearPicker = defineComponent({
|
|
|
59
57
|
});
|
|
60
58
|
useRender(() => {
|
|
61
59
|
return _createVNode("div", {
|
|
62
|
-
"class": [
|
|
60
|
+
"class": ["y-year-picker"]
|
|
63
61
|
}, [years.value.map(year => {
|
|
64
62
|
const scopedProps = {
|
|
65
63
|
item: year,
|
|
@@ -70,9 +68,9 @@ export const YYearPicker = defineComponent({
|
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
70
|
return _createVNode("div", {
|
|
73
|
-
"class": [
|
|
71
|
+
"class": ["y-year-picker__cell"]
|
|
74
72
|
}, [_createVNode(YButton, {
|
|
75
|
-
"variation": [
|
|
73
|
+
"variation": ["rounded", "text"].join(","),
|
|
76
74
|
"active": year.active,
|
|
77
75
|
"color": props.color,
|
|
78
76
|
"onClick": () => onClick(year.value)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YYearPicker.js","names":["computed","ref","useModelDuplex","useRender","useDate","getRangeArr","defineComponent","propsFactory","YButton","pressYYearPickerPropsOptions","modelValue","Number","color","String","height","min","max","interval","YYearPicker","name","props","emits","setup","_ref","emit","expose","dateUtil","model","tempYear","value","startYear","years","date","startOfYear","map","setYear","text","format","active","onClick","changePage","dir","arguments","length","undefined","change","
|
|
1
|
+
{"version":3,"file":"YYearPicker.js","names":["computed","ref","createVNode","_createVNode","useModelDuplex","useRender","useDate","getRangeArr","defineComponent","propsFactory","YButton","pressYYearPickerPropsOptions","modelValue","Number","color","String","height","min","max","interval","YYearPicker","name","props","emits","setup","_ref","emit","expose","dateUtil","model","tempYear","value","startYear","years","date","startOfYear","map","setYear","text","format","active","onClick","changePage","dir","arguments","length","undefined","change","year","scopedProps","item","join","default"],"sources":["../../../src/components/date-picker/YYearPicker.tsx"],"sourcesContent":["import { computed, type PropType, ref } from \"vue\";\n\nimport { useModelDuplex } from \"@/composables/communication\";\nimport { useRender } from \"@/composables/component\";\nimport { useDate } from \"@/composables/date\";\nimport { getRangeArr } from \"@/util/common\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\n\nimport { YButton } from \"../button\";\n\nimport \"./YYearPicker.scss\";\n\nexport const pressYYearPickerPropsOptions = propsFactory(\n\t{\n\t\tmodelValue: Number,\n\t\tcolor: String,\n\t\theight: [String, Number],\n\t\tmin: null as any as PropType<unknown>,\n\t\tmax: null as any as PropType<unknown>,\n\t},\n\t\"YYearPicker\",\n);\n\nconst interval = 20;\n\nexport const YYearPicker = defineComponent({\n\tname: \"YYearPicker\",\n\tprops: pressYYearPickerPropsOptions(),\n\temits: [\"mode\"],\n\tsetup(props, { emit, expose }) {\n\t\tconst dateUtil = useDate();\n\t\tconst model = useModelDuplex(props, \"modelValue\");\n\t\tconst tempYear = model.value;\n\t\tconst startYear = ref(\n\t\t\ttempYear - (tempYear % interval) - (tempYear < 0 ? interval : 0),\n\t\t);\n\t\tconst years = computed(() => {\n\t\t\tlet date = dateUtil.startOfYear(dateUtil.date());\n\n\t\t\treturn getRangeArr(interval + 1, startYear.value).map((value) => {\n\t\t\t\tdate = dateUtil.setYear(date, value);\n\t\t\t\treturn {\n\t\t\t\t\ttext: dateUtil.format(date, \"year\"),\n\t\t\t\t\tvalue,\n\t\t\t\t\tactive: model.value === value,\n\t\t\t\t};\n\t\t\t});\n\t\t});\n\n\t\tfunction onClick(value: number) {\n\t\t\tif (model.value === value) {\n\t\t\t\temit(\"mode\");\n\t\t\t}\n\t\t\tmodel.value = value;\n\t\t}\n\n\t\tfunction changePage(dir = 1) {\n\t\t\tlet change = startYear.value + interval * dir;\n\t\t\tif (change < 0) {\n\t\t\t\tchange = 0;\n\t\t\t}\n\t\t\tstartYear.value = change;\n\t\t}\n\n\t\texpose({\n\t\t\tchangePage,\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\treturn (\n\t\t\t\t<div class={[\"y-year-picker\"]}>\n\t\t\t\t\t{years.value.map((year) => {\n\t\t\t\t\t\tconst scopedProps = {\n\t\t\t\t\t\t\titem: year,\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\tonClick(year.value);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div class={[\"y-year-picker__cell\"]}>\n\t\t\t\t\t\t\t\t<YButton\n\t\t\t\t\t\t\t\t\tvariation={[\"rounded\", \"text\"].join(\",\")}\n\t\t\t\t\t\t\t\t\tactive={year.active}\n\t\t\t\t\t\t\t\t\tcolor={props.color}\n\t\t\t\t\t\t\t\t\tonClick={() => onClick(year.value)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{year.text}\n\t\t\t\t\t\t\t\t</YButton>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\n\t\treturn {};\n\t},\n});\n\nexport type YYearPicker = InstanceType<typeof YYearPicker>;\n"],"mappings":"AAAA,SAASA,QAAQ,EAAiBC,GAAG,EAAAC,WAAA,IAAAC,YAAA,QAAQ,KAAK;AAAC,SAE1CC,cAAc;AAAA,SAC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AAA,WACT2B,CAAA,KAAMA,OAAO,CAACO,IAAI,CAACjB,KAAK;QAAC;UAAAqB,OAAA,EAAAA,CAAA,MAEjCJ,IAAI,CAACV,IAAI;QAAA;MAId,CAAC,CAAC;IAGL,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACV;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/date-picker/index.ts"],"sourcesContent":["export * from './YDateCalendar';\nexport * from './YMonthPicker';\nexport * from './YDatePicker';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/date-picker/index.ts"],"sourcesContent":["export * from './YDateCalendar';\nexport * from './YMonthPicker';\nexport * from './YDatePicker';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDefaultProvider.js","names":[],"sources":["../../../src/components/default-provider/YDefaultProvider.tsx"],"sourcesContent":[""],"mappings":""}
|
|
1
|
+
{"version":3,"file":"YDefaultProvider.js","names":[],"sources":["../../../src/components/default-provider/YDefaultProvider.tsx"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/default-provider/index.ts"],"sourcesContent":[""],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/default-provider/index.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computed, getCurrentInstance, onMounted, onScopeDispose, ref, shallowRef, watch } from 'vue';
|
|
1
|
+
import { computed, getCurrentInstance, onMounted, onScopeDispose, ref, shallowRef, watch, Fragment as _Fragment, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
3
2
|
import { useModelDuplex } from "../../composables/communication.js";
|
|
4
3
|
import { useRender } from "../../composables/component.js";
|
|
5
4
|
import { omit } from "../../util/common.js";
|
|
6
5
|
import { bindClasses, chooseProps, defineComponent, propsFactory } from "../../util/component/index.js";
|
|
7
6
|
import { toStyleSizeValue } from "../../util/ui.js";
|
|
8
7
|
import { YCard } from "../card/index.js";
|
|
9
|
-
import {
|
|
8
|
+
import { pressYLayerProps, YLayer } from "../layer/index.js";
|
|
10
9
|
import { useActiveStack } from "../layer/active-stack.js";
|
|
11
10
|
import "./YDialog.scss";
|
|
12
11
|
export const pressYDialogPropsOptions = propsFactory({
|
|
@@ -27,16 +26,16 @@ export const pressYDialogPropsOptions = propsFactory({
|
|
|
27
26
|
...omit(pressYLayerProps({
|
|
28
27
|
scrim: true,
|
|
29
28
|
scrollStrategy: null
|
|
30
|
-
}), [
|
|
31
|
-
},
|
|
29
|
+
}), ["offset", "classes"])
|
|
30
|
+
}, "YDialog");
|
|
32
31
|
export const YDialog = defineComponent({
|
|
33
|
-
name:
|
|
32
|
+
name: "YDialog",
|
|
34
33
|
components: {
|
|
35
34
|
YLayer,
|
|
36
35
|
YCard
|
|
37
36
|
},
|
|
38
37
|
props: pressYDialogPropsOptions(),
|
|
39
|
-
emits: [
|
|
38
|
+
emits: ["update:modelValue"],
|
|
40
39
|
setup(props, _ref) {
|
|
41
40
|
let {
|
|
42
41
|
emit,
|
|
@@ -49,8 +48,8 @@ export const YDialog = defineComponent({
|
|
|
49
48
|
const boundClasses = bindClasses(props.dialogClasses);
|
|
50
49
|
return {
|
|
51
50
|
...boundClasses,
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
"y-dialog": true,
|
|
52
|
+
"y-dialog--maximized": props.maximized
|
|
54
53
|
};
|
|
55
54
|
});
|
|
56
55
|
const styles = computed(() => {
|
|
@@ -70,23 +69,24 @@ export const YDialog = defineComponent({
|
|
|
70
69
|
const prevTarget = e.relatedTarget;
|
|
71
70
|
const target = e.target;
|
|
72
71
|
const excludeTarget = props.focusTrap;
|
|
73
|
-
if (typeof excludeTarget ===
|
|
72
|
+
if (typeof excludeTarget === "string" && document.querySelector(excludeTarget)?.isSameNode(target)) {
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
|
-
if (typeof excludeTarget ===
|
|
75
|
+
if (typeof excludeTarget === "object") {
|
|
77
76
|
if (Array.isArray(excludeTarget)) {
|
|
78
77
|
const excluded = excludeTarget.some(exclude => {
|
|
79
|
-
if (typeof exclude ===
|
|
80
|
-
return document.querySelector(exclude)
|
|
78
|
+
if (typeof exclude === "string") {
|
|
79
|
+
return document.querySelector(exclude)?.isSameNode(target);
|
|
81
80
|
}
|
|
82
|
-
if (typeof exclude ===
|
|
83
|
-
return exclude
|
|
81
|
+
if (typeof exclude === "object") {
|
|
82
|
+
return exclude?.isSameNode(target);
|
|
84
83
|
}
|
|
84
|
+
return false;
|
|
85
85
|
});
|
|
86
86
|
if (excluded) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
} else if (excludeTarget
|
|
89
|
+
} else if (excludeTarget?.isSameNode(target)) {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -97,7 +97,7 @@ export const YDialog = defineComponent({
|
|
|
97
97
|
}
|
|
98
98
|
if (prevTarget !== target && layer$.value?.content$ && ![document, layer$.value?.content$].includes(target) && !layer$.value?.content$.contains(target) && !testChildrenContains(children.value)) {
|
|
99
99
|
const focusableSelector = 'button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
100
|
-
const focusables = [...layer$.value.content$.querySelectorAll(focusableSelector)].filter(el => !el.hasAttribute(
|
|
100
|
+
const focusables = [...layer$.value.content$.querySelectorAll(focusableSelector)].filter(el => !el.hasAttribute("disabled") && !el.matches('[tabindex="-1"]'));
|
|
101
101
|
if (!focusables.length) return;
|
|
102
102
|
const firstChild = focusables[0];
|
|
103
103
|
const lastChild = focusables[focusables.length - 1];
|
|
@@ -112,10 +112,10 @@ export const YDialog = defineComponent({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function installFocusTrap() {
|
|
115
|
-
document.addEventListener(
|
|
115
|
+
document.addEventListener("focusin", onFocusin);
|
|
116
116
|
}
|
|
117
117
|
function dismantleFocusTrap() {
|
|
118
|
-
document.removeEventListener(
|
|
118
|
+
document.removeEventListener("focusin", onFocusin);
|
|
119
119
|
}
|
|
120
120
|
const tempScrollTop = ref(0);
|
|
121
121
|
const tempScrollLeft = ref(0);
|
|
@@ -124,35 +124,35 @@ export const YDialog = defineComponent({
|
|
|
124
124
|
const activeLayers = layer$.value?.getActiveLayers();
|
|
125
125
|
if (toggle) {
|
|
126
126
|
if (props.maximized) {
|
|
127
|
-
document.documentElement.classList.add(
|
|
127
|
+
document.documentElement.classList.add("y-dialog--prevent-scroll");
|
|
128
128
|
}
|
|
129
129
|
const filtered = activeLayers?.filter(layer => {
|
|
130
130
|
return layer.ctx.modal;
|
|
131
131
|
});
|
|
132
|
-
if (filtered && !filtered.length || !root$.classList.contains(
|
|
132
|
+
if (filtered && !filtered.length || !root$.classList.contains("y-dialog--virtual-scroll")) {
|
|
133
133
|
const scrollTop = document.documentElement.scrollTop;
|
|
134
134
|
const scrollLeft = document.documentElement.scrollLeft;
|
|
135
135
|
tempScrollTop.value = scrollTop;
|
|
136
136
|
tempScrollLeft.value = scrollLeft;
|
|
137
|
-
root$.classList.add(
|
|
138
|
-
root$.style.top = toStyleSizeValue(-1 * scrollTop) ||
|
|
139
|
-
root$.style.left = toStyleSizeValue(-1 * scrollLeft) ||
|
|
137
|
+
root$.classList.add("y-dialog--virtual-scroll");
|
|
138
|
+
root$.style.top = toStyleSizeValue(-1 * scrollTop) || "";
|
|
139
|
+
root$.style.left = toStyleSizeValue(-1 * scrollLeft) || "";
|
|
140
140
|
}
|
|
141
141
|
} else {
|
|
142
142
|
const filtered = activeLayers?.filter(layer => {
|
|
143
143
|
return !layer$.value?.isMe(layer) && layer.ctx.modal;
|
|
144
144
|
});
|
|
145
145
|
if (!filtered?.length && root$) {
|
|
146
|
-
document.documentElement.classList.remove(
|
|
147
|
-
root$.classList.remove(
|
|
148
|
-
root$.style.top =
|
|
149
|
-
root$.style.left =
|
|
146
|
+
document.documentElement.classList.remove("y-dialog--prevent-scroll");
|
|
147
|
+
root$.classList.remove("y-dialog--virtual-scroll");
|
|
148
|
+
root$.style.top = "";
|
|
149
|
+
root$.style.left = "";
|
|
150
150
|
requestAnimationFrame(() => {
|
|
151
151
|
document.documentElement.scrollTop = tempScrollTop.value;
|
|
152
152
|
document.documentElement.scrollLeft = tempScrollLeft.value;
|
|
153
153
|
});
|
|
154
154
|
} else if (filtered.every(layer => !layer.ctx?.maximized)) {
|
|
155
|
-
document.documentElement.classList.remove(
|
|
155
|
+
document.documentElement.classList.remove("y-dialog--prevent-scroll");
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -167,9 +167,9 @@ export const YDialog = defineComponent({
|
|
|
167
167
|
}
|
|
168
168
|
watch(() => layer$.value?.baseEl, (neo, old) => {
|
|
169
169
|
if (neo) {
|
|
170
|
-
neo.addEventListener(
|
|
170
|
+
neo.addEventListener("click", onClick);
|
|
171
171
|
} else if (old) {
|
|
172
|
-
old.removeEventListener(
|
|
172
|
+
old.removeEventListener("click", onClick);
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
if (active.value) {
|
|
@@ -197,7 +197,7 @@ export const YDialog = defineComponent({
|
|
|
197
197
|
"content-styles": styles.value,
|
|
198
198
|
"modal": true,
|
|
199
199
|
"ref": layer$
|
|
200
|
-
}, omit(chooseProps(props, YLayer.props), [
|
|
200
|
+
}, omit(chooseProps(props, YLayer.props), ["contentStyles"])), {
|
|
201
201
|
default: function () {
|
|
202
202
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
203
203
|
args[_key] = arguments[_key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDialog.js","names":["computed","getCurrentInstance","onMounted","onScopeDispose","ref","shallowRef","watch","useModelDuplex","useRender","omit","bindClasses","chooseProps","defineComponent","propsFactory","toStyleSizeValue","YCard","YLayer","pressYLayerProps","useActiveStack","pressYDialogPropsOptions","persistent","type","Boolean","default","dialogClasses","Array","String","Object","focusTrap","offset","scrim","scrollStrategy","YDialog","name","components","props","emits","setup","_ref","emit","slots","vm","$yuyeon","appContext","config","globalProperties","active","classes","boundClasses","maximized","styles","contentStyles","paddingTop","layer$","children","onFocusin","e","prevTarget","relatedTarget","target","excludeTarget","document","querySelector","isArray","excluded","some","exclude","testChildrenContains","layers","layer","content$","contains","value","includes","focusableSelector","focusables","querySelectorAll","filter","el","hasAttribute","matches","length","firstChild","lastChild","isSameNode","focus","installFocusTrap","addEventListener","dismantleFocusTrap","removeEventListener","tempScrollTop","tempScrollLeft","preventInteractionBackground","toggle","root$","root","activeLayers","getActiveLayers","documentElement","classList","add","filtered","ctx","modal","scrollTop","scrollLeft","style","top","left","isMe","remove","requestAnimationFrame","every","onUpdate","v","onClick","currentActive","disabled","baseEl","neo","old","_createVNode","_Fragment","_mergeProps","$event","_len","arguments","args","_key","base"],"sources":["../../../src/components/dialog/YDialog.tsx"],"sourcesContent":["import {\n type PropType,\n computed,\n getCurrentInstance,\n onMounted,\n onScopeDispose,\n ref,\n shallowRef,\n watch,\n} from 'vue';\n\nimport { useModelDuplex } from '@/composables/communication';\nimport { useRender } from '@/composables/component';\nimport { omit } from '@/util/common';\nimport {\n bindClasses,\n chooseProps,\n defineComponent,\n propsFactory,\n} from '@/util/component';\nimport { toStyleSizeValue } from '@/util/ui';\n\nimport { YCard } from '../card';\nimport { YLayer, pressYLayerProps } from '../layer';\nimport { useActiveStack } from '../layer/active-stack';\n\nimport './YDialog.scss';\n\nexport const pressYDialogPropsOptions = propsFactory(\n {\n persistent: {\n type: Boolean as PropType<boolean>,\n default: true,\n },\n dialogClasses: {\n type: [Array, String, Object] as PropType<\n string[] | string | Record<string, any>\n >,\n },\n focusTrap: {\n type: [Boolean, String, Object, Array] as PropType<\n false | string | string[] | HTMLElement\n >,\n default: true,\n },\n offset: {\n type: String as PropType<string>,\n },\n ...omit(\n pressYLayerProps({\n scrim: true,\n scrollStrategy: null,\n }),\n ['offset', 'classes'],\n ),\n },\n 'YDialog',\n);\n\nexport const YDialog = defineComponent({\n name: 'YDialog',\n components: {\n YLayer,\n YCard,\n },\n props: pressYDialogPropsOptions(),\n emits: ['update:modelValue'],\n setup(props, { emit, slots }) {\n const vm = getCurrentInstance();\n const $yuyeon = vm?.appContext.config.globalProperties.$yuyeon;\n const active = useModelDuplex(props);\n\n const classes = computed(() => {\n const boundClasses = bindClasses(props.dialogClasses);\n return {\n ...boundClasses,\n 'y-dialog': true,\n 'y-dialog--maximized': props.maximized,\n };\n });\n\n const styles = computed(() => {\n return {\n ...(props.contentStyles ?? {}),\n paddingTop: toStyleSizeValue(props.offset),\n };\n });\n\n const layer$ = ref<typeof YLayer>();\n const { children } = useActiveStack(layer$, active, shallowRef(true));\n\n function onFocusin(e: FocusEvent) {\n if (props.focusTrap === false) {\n return;\n }\n\n const prevTarget = e.relatedTarget as HTMLElement | null;\n const target = e.target as HTMLElement | null;\n\n const excludeTarget = props.focusTrap;\n\n if (\n typeof excludeTarget === 'string' &&\n document.querySelector(excludeTarget) == target\n ) {\n return;\n }\n\n if (typeof excludeTarget === 'object') {\n if (Array.isArray(excludeTarget)) {\n const excluded = excludeTarget.some((exclude) => {\n if (typeof exclude === 'string') {\n return document.querySelector(exclude) == target;\n }\n if (typeof exclude === 'object') {\n return exclude == target;\n }\n });\n if (excluded) {\n return;\n }\n } else if (excludeTarget == target) {\n return;\n }\n }\n\n function testChildrenContains(layers: YLayer[]) {\n return layers.some((layer) => {\n return !layer.content$?.contains(target);\n });\n }\n\n if (\n prevTarget !== target &&\n layer$.value?.content$ &&\n ![document, layer$.value?.content$].includes(target) &&\n !layer$.value?.content$.contains(target) &&\n !testChildrenContains(children.value)\n ) {\n const focusableSelector =\n 'button, [href], input:not([type=\"hidden\"]), select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n const focusables = [\n ...layer$.value.content$.querySelectorAll(focusableSelector),\n ].filter(\n (el) =>\n !el.hasAttribute('disabled') && !el.matches('[tabindex=\"-1\"]'),\n ) as HTMLElement[];\n if (!focusables.length) return;\n const firstChild = focusables[0];\n const lastChild = focusables[focusables.length - 1];\n if (target?.isSameNode(firstChild) || target?.isSameNode(lastChild)) {\n return;\n }\n if (firstChild === lastChild) {\n lastChild.focus();\n } else {\n firstChild.focus();\n }\n }\n }\n\n function installFocusTrap() {\n document.addEventListener('focusin', onFocusin);\n }\n\n function dismantleFocusTrap() {\n document.removeEventListener('focusin', onFocusin);\n }\n\n const tempScrollTop = ref(0);\n const tempScrollLeft = ref(0);\n\n function preventInteractionBackground(toggle: boolean) {\n const root$ = $yuyeon.root as HTMLElement;\n const activeLayers = layer$.value?.getActiveLayers();\n if (toggle) {\n if (props.maximized) {\n document.documentElement.classList.add('y-dialog--prevent-scroll');\n }\n const filtered = activeLayers?.filter((layer: any) => {\n return layer.ctx.modal;\n });\n if (\n (filtered && !filtered.length) ||\n !root$.classList.contains('y-dialog--virtual-scroll')\n ) {\n const scrollTop = document.documentElement.scrollTop;\n const scrollLeft = document.documentElement.scrollLeft;\n tempScrollTop.value = scrollTop;\n tempScrollLeft.value = scrollLeft;\n\n root$.classList.add('y-dialog--virtual-scroll');\n root$.style.top = toStyleSizeValue(-1 * scrollTop) || '';\n root$.style.left = toStyleSizeValue(-1 * scrollLeft) || '';\n }\n } else {\n const filtered = activeLayers?.filter((layer: any) => {\n return !layer$.value?.isMe(layer) && layer.ctx.modal;\n });\n\n if (!filtered?.length && root$) {\n document.documentElement.classList.remove('y-dialog--prevent-scroll');\n root$.classList.remove('y-dialog--virtual-scroll');\n root$.style.top = '';\n root$.style.left = '';\n requestAnimationFrame(() => {\n document.documentElement.scrollTop = tempScrollTop.value;\n document.documentElement.scrollLeft = tempScrollLeft.value;\n });\n } else if (filtered.every((layer: any) => !layer.ctx?.maximized)) {\n document.documentElement.classList.remove('y-dialog--prevent-scroll');\n }\n }\n }\n\n function onUpdate(v: boolean) {\n active.value = v;\n }\n\n function onClick(e: MouseEvent) {\n const currentActive = active.value;\n if (!props.disabled) {\n active.value = !currentActive;\n }\n }\n\n watch(\n () => layer$.value?.baseEl,\n (neo, old) => {\n if (neo) {\n neo.addEventListener('click', onClick);\n } else if (old) {\n old.removeEventListener('click', onClick);\n }\n },\n );\n\n if (active.value) {\n installFocusTrap();\n preventInteractionBackground(true);\n }\n\n watch(active, (neo) => {\n neo ? installFocusTrap() : dismantleFocusTrap();\n preventInteractionBackground(neo);\n });\n\n onMounted(() => {\n if (active.value) {\n preventInteractionBackground(true);\n }\n });\n\n onScopeDispose(() => {\n dismantleFocusTrap();\n preventInteractionBackground(false);\n });\n\n useRender(() => {\n return (\n <>\n <YLayer\n v-model={active.value}\n classes={classes.value}\n content-styles={styles.value}\n modal\n ref={layer$}\n {...omit(chooseProps(props, YLayer.props), ['contentStyles'])}\n >\n {{\n default: (...args: any[]) => slots.default?.(...args),\n base: slots.base,\n }}\n </YLayer>\n </>\n );\n });\n\n return {\n active,\n layer: layer$,\n classes,\n children,\n };\n },\n});\n"],"mappings":";AAAA,SAEEA,QAAQ,EACRC,kBAAkB,EAClBC,SAAS,EACTC,cAAc,EACdC,GAAG,EACHC,UAAU,EACVC,KAAK,QACA,KAAK;AAAC,SAEJC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,IAAI;AAAA,SAEXC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,YAAY;AAAA,SAELC,gBAAgB;AAAA,SAEhBC,KAAK;AAAA,SACLC,MAAM,EAAEC,gBAAgB;AAAA,SACxBC,cAAc;AAEvB;AAEA,OAAO,MAAMC,wBAAwB,GAAGN,YAAY,CAClD;EACEO,UAAU,EAAE;IACVC,IAAI,EAAEC,OAA4B;IAClCC,OAAO,EAAE;EACX,CAAC;EACDC,aAAa,EAAE;IACbH,IAAI,EAAE,CAACI,KAAK,EAAEC,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IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;YAAJD,IAAI,CAAAC,IAAA,IAAAF,SAAA,CAAAE,IAAA;UAAA;UAAA,OAAYxF,KAAK,CAACjB,OAAO,GAAG,GAAGwG,IAAI,CAAC;QAAA;QACrDE,IAAI,EAAEzF,KAAK,CAACyF;MAAI;IAK1B,CAAC,CAAC;IAEF,OAAO;MACLnF,MAAM;MACNuB,KAAK,EAAEhB,MAAM;MACbN,OAAO;MACPO;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YDialog.js","names":["computed","getCurrentInstance","onMounted","onScopeDispose","ref","shallowRef","watch","Fragment","_Fragment","mergeProps","_mergeProps","createVNode","_createVNode","useModelDuplex","useRender","omit","bindClasses","chooseProps","defineComponent","propsFactory","toStyleSizeValue","YCard","pressYLayerProps","YLayer","useActiveStack","pressYDialogPropsOptions","persistent","type","Boolean","default","dialogClasses","Array","String","Object","focusTrap","offset","scrim","scrollStrategy","YDialog","name","components","props","emits","setup","_ref","emit","slots","vm","$yuyeon","appContext","config","globalProperties","active","classes","boundClasses","maximized","styles","contentStyles","paddingTop","layer$","children","onFocusin","e","prevTarget","relatedTarget","target","excludeTarget","document","querySelector","isSameNode","isArray","excluded","some","exclude","testChildrenContains","layers","layer","content$","contains","value","includes","focusableSelector","focusables","querySelectorAll","filter","el","hasAttribute","matches","length","firstChild","lastChild","focus","installFocusTrap","addEventListener","dismantleFocusTrap","removeEventListener","tempScrollTop","tempScrollLeft","preventInteractionBackground","toggle","root$","root","activeLayers","getActiveLayers","documentElement","classList","add","filtered","ctx","modal","scrollTop","scrollLeft","style","top","left","isMe","remove","requestAnimationFrame","every","onUpdate","v","onClick","currentActive","disabled","baseEl","neo","old","$event","_len","arguments","args","_key","base"],"sources":["../../../src/components/dialog/YDialog.tsx"],"sourcesContent":["import {\n\tcomputed,\n\tgetCurrentInstance,\n\tonMounted,\n\tonScopeDispose,\n\ttype PropType,\n\tref,\n\tshallowRef,\n\twatch,\n} from \"vue\";\n\nimport { useModelDuplex } from \"@/composables/communication\";\nimport { useRender } from \"@/composables/component\";\nimport { omit } from \"@/util/common\";\nimport {\n\tbindClasses,\n\tchooseProps,\n\tdefineComponent,\n\tpropsFactory,\n} from \"@/util/component\";\nimport { toStyleSizeValue } from \"@/util/ui\";\n\nimport { YCard } from \"../card\";\nimport { pressYLayerProps, YLayer } from \"../layer\";\nimport { useActiveStack } from \"../layer/active-stack\";\n\nimport \"./YDialog.scss\";\n\nexport const pressYDialogPropsOptions = propsFactory(\n\t{\n\t\tpersistent: {\n\t\t\ttype: Boolean as PropType<boolean>,\n\t\t\tdefault: true,\n\t\t},\n\t\tdialogClasses: {\n\t\t\ttype: [Array, String, Object] as PropType<\n\t\t\t\tstring[] | string | Record<string, any>\n\t\t\t>,\n\t\t},\n\t\tfocusTrap: {\n\t\t\ttype: [Boolean, String, Object, Array] as PropType<\n\t\t\t\tfalse | string | string[] | HTMLElement | HTMLElement[]\n\t\t\t>,\n\t\t\tdefault: true,\n\t\t},\n\t\toffset: {\n\t\t\ttype: String as PropType<string>,\n\t\t},\n\t\t...omit(\n\t\t\tpressYLayerProps({\n\t\t\t\tscrim: true,\n\t\t\t\tscrollStrategy: null,\n\t\t\t}),\n\t\t\t[\"offset\", \"classes\"],\n\t\t),\n\t},\n\t\"YDialog\",\n);\n\nexport const YDialog = defineComponent({\n\tname: \"YDialog\",\n\tcomponents: {\n\t\tYLayer,\n\t\tYCard,\n\t},\n\tprops: pressYDialogPropsOptions(),\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst vm = getCurrentInstance();\n\t\tconst $yuyeon = vm?.appContext.config.globalProperties.$yuyeon;\n\t\tconst active = useModelDuplex(props);\n\n\t\tconst classes = computed(() => {\n\t\t\tconst boundClasses = bindClasses(props.dialogClasses);\n\t\t\treturn {\n\t\t\t\t...boundClasses,\n\t\t\t\t\"y-dialog\": true,\n\t\t\t\t\"y-dialog--maximized\": props.maximized,\n\t\t\t};\n\t\t});\n\n\t\tconst styles = computed(() => {\n\t\t\treturn {\n\t\t\t\t...(props.contentStyles ?? {}),\n\t\t\t\tpaddingTop: toStyleSizeValue(props.offset),\n\t\t\t};\n\t\t});\n\n\t\tconst layer$ = ref<typeof YLayer>();\n\t\tconst { children } = useActiveStack(layer$, active, shallowRef(true));\n\n\t\tfunction onFocusin(e: FocusEvent) {\n\t\t\tif (props.focusTrap === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst prevTarget = e.relatedTarget as HTMLElement | null;\n\t\t\tconst target = e.target as HTMLElement | null;\n\n\t\t\tconst excludeTarget = props.focusTrap;\n\n\t\t\tif (\n\t\t\t\ttypeof excludeTarget === \"string\" &&\n\t\t\t\tdocument.querySelector(excludeTarget)?.isSameNode(target)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof excludeTarget === \"object\") {\n\t\t\t\tif (Array.isArray(excludeTarget)) {\n\t\t\t\t\tconst excluded = excludeTarget.some((exclude) => {\n\t\t\t\t\t\tif (typeof exclude === \"string\") {\n\t\t\t\t\t\t\treturn document.querySelector(exclude)?.isSameNode(target)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof exclude === \"object\") {\n\t\t\t\t\t\t\treturn exclude?.isSameNode(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\t\t\t\t\tif (excluded) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else if (excludeTarget?.isSameNode(target)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction testChildrenContains(layers: YLayer[]) {\n\t\t\t\treturn layers.some((layer) => {\n\t\t\t\t\treturn !layer.content$?.contains(target);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tprevTarget !== target &&\n\t\t\t\tlayer$.value?.content$ &&\n\t\t\t\t![document, layer$.value?.content$].includes(target) &&\n\t\t\t\t!layer$.value?.content$.contains(target) &&\n\t\t\t\t!testChildrenContains(children.value)\n\t\t\t) {\n\t\t\t\tconst focusableSelector =\n\t\t\t\t\t'button, [href], input:not([type=\"hidden\"]), select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\t\t\t\tconst focusables = [\n\t\t\t\t\t...layer$.value.content$.querySelectorAll(focusableSelector),\n\t\t\t\t].filter(\n\t\t\t\t\t(el) =>\n\t\t\t\t\t\t!el.hasAttribute(\"disabled\") && !el.matches('[tabindex=\"-1\"]'),\n\t\t\t\t) as HTMLElement[];\n\t\t\t\tif (!focusables.length) return;\n\t\t\t\tconst firstChild = focusables[0];\n\t\t\t\tconst lastChild = focusables[focusables.length - 1];\n\t\t\t\tif (target?.isSameNode(firstChild) || target?.isSameNode(lastChild)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (firstChild === lastChild) {\n\t\t\t\t\tlastChild.focus();\n\t\t\t\t} else {\n\t\t\t\t\tfirstChild.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction installFocusTrap() {\n\t\t\tdocument.addEventListener(\"focusin\", onFocusin);\n\t\t}\n\n\t\tfunction dismantleFocusTrap() {\n\t\t\tdocument.removeEventListener(\"focusin\", onFocusin);\n\t\t}\n\n\t\tconst tempScrollTop = ref(0);\n\t\tconst tempScrollLeft = ref(0);\n\n\t\tfunction preventInteractionBackground(toggle: boolean) {\n\t\t\tconst root$ = $yuyeon.root as HTMLElement;\n\t\t\tconst activeLayers = layer$.value?.getActiveLayers();\n\t\t\tif (toggle) {\n\t\t\t\tif (props.maximized) {\n\t\t\t\t\tdocument.documentElement.classList.add(\"y-dialog--prevent-scroll\");\n\t\t\t\t}\n\t\t\t\tconst filtered = activeLayers?.filter((layer: any) => {\n\t\t\t\t\treturn layer.ctx.modal;\n\t\t\t\t});\n\t\t\t\tif (\n\t\t\t\t\t(filtered && !filtered.length) ||\n\t\t\t\t\t!root$.classList.contains(\"y-dialog--virtual-scroll\")\n\t\t\t\t) {\n\t\t\t\t\tconst scrollTop = document.documentElement.scrollTop;\n\t\t\t\t\tconst scrollLeft = document.documentElement.scrollLeft;\n\t\t\t\t\ttempScrollTop.value = scrollTop;\n\t\t\t\t\ttempScrollLeft.value = scrollLeft;\n\n\t\t\t\t\troot$.classList.add(\"y-dialog--virtual-scroll\");\n\t\t\t\t\troot$.style.top = toStyleSizeValue(-1 * scrollTop) || \"\";\n\t\t\t\t\troot$.style.left = toStyleSizeValue(-1 * scrollLeft) || \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst filtered = activeLayers?.filter((layer: any) => {\n\t\t\t\t\treturn !layer$.value?.isMe(layer) && layer.ctx.modal;\n\t\t\t\t});\n\n\t\t\t\tif (!filtered?.length && root$) {\n\t\t\t\t\tdocument.documentElement.classList.remove(\"y-dialog--prevent-scroll\");\n\t\t\t\t\troot$.classList.remove(\"y-dialog--virtual-scroll\");\n\t\t\t\t\troot$.style.top = \"\";\n\t\t\t\t\troot$.style.left = \"\";\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tdocument.documentElement.scrollTop = tempScrollTop.value;\n\t\t\t\t\t\tdocument.documentElement.scrollLeft = tempScrollLeft.value;\n\t\t\t\t\t});\n\t\t\t\t} else if (filtered.every((layer: any) => !layer.ctx?.maximized)) {\n\t\t\t\t\tdocument.documentElement.classList.remove(\"y-dialog--prevent-scroll\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction onUpdate(v: boolean) {\n\t\t\tactive.value = v;\n\t\t}\n\n\t\tfunction onClick(e: MouseEvent) {\n\t\t\tconst currentActive = active.value;\n\t\t\tif (!props.disabled) {\n\t\t\t\tactive.value = !currentActive;\n\t\t\t}\n\t\t}\n\n\t\twatch(\n\t\t\t() => layer$.value?.baseEl,\n\t\t\t(neo, old) => {\n\t\t\t\tif (neo) {\n\t\t\t\t\tneo.addEventListener(\"click\", onClick);\n\t\t\t\t} else if (old) {\n\t\t\t\t\told.removeEventListener(\"click\", onClick);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\n\t\tif (active.value) {\n\t\t\tinstallFocusTrap();\n\t\t\tpreventInteractionBackground(true);\n\t\t}\n\n\t\twatch(active, (neo) => {\n\t\t\tneo ? installFocusTrap() : dismantleFocusTrap();\n\t\t\tpreventInteractionBackground(neo);\n\t\t});\n\n\t\tonMounted(() => {\n\t\t\tif (active.value) {\n\t\t\t\tpreventInteractionBackground(true);\n\t\t\t}\n\t\t});\n\n\t\tonScopeDispose(() => {\n\t\t\tdismantleFocusTrap();\n\t\t\tpreventInteractionBackground(false);\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<YLayer\n\t\t\t\t\t\tv-model={active.value}\n\t\t\t\t\t\tclasses={classes.value}\n\t\t\t\t\t\tcontent-styles={styles.value}\n\t\t\t\t\t\tmodal\n\t\t\t\t\t\tref={layer$}\n\t\t\t\t\t\t{...omit(chooseProps(props, YLayer.props), [\"contentStyles\"])}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: (...args: any[]) => slots.default?.(...args),\n\t\t\t\t\t\t\tbase: slots.base,\n\t\t\t\t\t\t}}\n\t\t\t\t\t</YLayer>\n\t\t\t\t</>\n\t\t\t);\n\t\t});\n\n\t\treturn {\n\t\t\tactive,\n\t\t\tlayer: layer$,\n\t\t\tclasses,\n\t\t\tchildren,\n\t\t};\n\t},\n});\n"],"mappings":"AAAA,SACCA,QAAQ,EACRC,kBAAkB,EAClBC,SAAS,EACTC,cAAc,EAEdC,GAAG,EACHC,UAAU,EACVC,KAAK,EAAAC,QAAA,IAAAC,SAAA,EAAAC,UAAA,IAAAC,WAAA,EAAAC,WAAA,IAAAC,YAAA,QACC,KAAK;AAAC,SAEJC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,IAAI;AAAA,SAEZC,WAAW,EACXC,WAAW,EACX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AgD,MAAA,IAAZ3E,MAAM,CAAC2B,KAAK,GAAAgD,MAAA;QAAA,WACZ1E,OAAO,CAAC0B,KAAK;QAAA,kBACNvB,MAAM,CAACuB,KAAK;QAAA;QAAA,OAEvBpB;MAAM,GACP5C,IAAI,CAACE,WAAW,CAACwB,KAAK,EAAElB,MAAM,CAACkB,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;QAG5DZ,OAAO,EAAE,SAAAA,CAAA;UAAA,SAAAmG,IAAA,GAAAC,SAAA,CAAAzC,MAAA,EAAI0C,IAAI,OAAAnG,KAAA,CAAAiG,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;YAAJD,IAAI,CAAAC,IAAA,IAAAF,SAAA,CAAAE,IAAA;UAAA;UAAA,OAAYrF,KAAK,CAACjB,OAAO,GAAG,GAAGqG,IAAI,CAAC;QAAA;QACrDE,IAAI,EAAEtF,KAAK,CAACsF;MAAI;IAKrB,CAAC,CAAC;IAEF,OAAO;MACNhF,MAAM;MACNwB,KAAK,EAAEjB,MAAM;MACbN,OAAO;MACPO;IACD,CAAC;EACF;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -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\";\n\nimport { useRender } from \"@/composables/component\";\nimport { defineComponent, propsFactory } from \"@/util/component\";\n\nexport const pressYDividerPropsOptions = propsFactory(\n\t{\n\t\tvertical: Boolean as PropType<boolean>,\n\t},\n\t\"YDivider\",\n);\n\nexport const YDivider = defineComponent({\n\tname: \"YDivider\",\n\tprops: pressYDividerPropsOptions(),\n\tsetup(props) {\n\t\tuseRender(() => {\n\t\t\treturn (\n\t\t\t\t<hr\n\t\t\t\t\tclass={[\"y-divider\", { \"y-divider--vertical\": props.vertical }]}\n\t\t\t\t\tv-theme\n\t\t\t\t/>\n\t\t\t);\n\t\t});\n\t},\n});\n\nexport type YDivider = InstanceType<typeof YDivider>;\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":[]}
|