@nmorph/nmorph-ui-kit 2.2.37 → 2.2.39
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/components/basic/nmorph-button/NmorphButton.vue2.js +4 -4
- package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +12 -10
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +19 -16
- package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -1
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +30 -26
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +42 -40
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +16 -13
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +24 -21
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +23 -21
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +43 -42
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +47 -45
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +18 -14
- package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +15 -11
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +15 -12
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +44 -40
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js +1 -1
- package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +21 -19
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +27 -24
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +19 -15
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +10 -8
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +25 -23
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +66 -64
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +28 -26
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue.js +18 -22
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +52 -42
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +52 -40
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +96 -98
- package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.css +1 -1
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +4 -4
- package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +41 -35
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +65 -61
- package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
- package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +90 -78
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +21 -18
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +31 -25
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +50 -49
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -32
- package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -1
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +17 -17
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +41 -35
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +13 -13
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +38 -32
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +17 -17
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +79 -71
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +25 -23
- package/dist/hooks/use-field-validation.js +56 -43
- package/dist/hooks/use-focusable-input.js +27 -0
- package/dist/hooks/use-form-validation.js +62 -24
- package/dist/hooks/use-nmorph-translation.js +4 -4
- package/dist/index.es.js +842 -837
- package/dist/index.umd.js +36 -36
- package/dist/package.json.js +1 -1
- package/dist/plugin.js +47 -42
- package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +4 -17
- package/dist/src/components/basic/nmorph-button/types.d.ts +13 -0
- package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +3 -9
- package/dist/src/components/basic/nmorph-icon/types.d.ts +6 -0
- package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +2 -9
- package/dist/src/components/basic/nmorph-layout/types.d.ts +8 -0
- package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +2 -13
- package/dist/src/components/basic/nmorph-link/types.d.ts +11 -0
- package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +2 -2
- package/dist/src/components/basic/nmorph-scroll/types.d.ts +5 -0
- package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +2 -15
- package/dist/src/components/basic/nmorph-space/types.d.ts +14 -0
- package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +6 -21
- package/dist/src/components/data/nmorph-avatar/types.d.ts +21 -0
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +4 -39
- package/dist/src/components/data/nmorph-badge/types.d.ts +34 -0
- package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +4 -12
- package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.d.ts +3 -9
- package/dist/src/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/types.d.ts +12 -0
- package/dist/src/components/data/nmorph-calendar/types.d.ts +13 -0
- package/dist/src/components/data/nmorph-card/NmorphCard.vue.d.ts +2 -10
- package/dist/src/components/data/nmorph-card/types.d.ts +9 -0
- package/dist/src/components/data/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -5
- package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.d.ts +2 -4
- package/dist/src/components/data/nmorph-carousel/components/nmorph-carousel-item/types.d.ts +3 -0
- package/dist/src/components/data/nmorph-carousel/types.d.ts +6 -0
- package/dist/src/components/data/nmorph-collapse/NmorphCollapse.vue.d.ts +3 -7
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +4 -10
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/types.d.ts +13 -0
- package/dist/src/components/data/nmorph-collapse/types.d.ts +7 -0
- package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +4 -13
- package/dist/src/components/data/nmorph-empty/types.d.ts +11 -0
- package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -8
- package/dist/src/components/data/nmorph-image/types.d.ts +10 -0
- package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +3 -18
- package/dist/src/components/data/nmorph-image-preview/types.d.ts +19 -0
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -13
- package/dist/src/components/data/nmorph-pagination/types.d.ts +14 -0
- package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +2 -14
- package/dist/src/components/data/nmorph-progress/types.d.ts +12 -0
- package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +5 -15
- package/dist/src/components/data/nmorph-qr-code/types.d.ts +12 -0
- package/dist/src/components/data/nmorph-skeleton/NmorphSkeleton.vue.d.ts +2 -7
- package/dist/src/components/data/nmorph-skeleton/components/NmorphSkeletonItem.vue.d.ts +3 -9
- package/dist/src/components/data/nmorph-skeleton/components/types.d.ts +8 -0
- package/dist/src/components/data/nmorph-skeleton/types.d.ts +6 -0
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +3 -17
- package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.d.ts +2 -4
- package/dist/src/components/data/nmorph-table/components/nmorph-table-cell/types.d.ts +3 -0
- package/dist/src/components/data/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.d.ts +4 -5
- package/dist/src/components/data/nmorph-table/components/nmorph-table-column/types.d.ts +3 -0
- package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.vue.d.ts +4 -6
- package/dist/src/components/data/nmorph-table/inner-components/nmorph-sort-button/types.d.ts +7 -0
- package/dist/src/components/data/nmorph-table/types.d.ts +15 -0
- package/dist/src/components/data/nmorph-tag-list/NmorphTagList.vue.d.ts +5 -8
- package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +3 -5
- package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/types.d.ts +6 -0
- package/dist/src/components/data/nmorph-tag-list/types.d.ts +7 -0
- package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +3 -14
- package/dist/src/components/data/nmorph-virtual-list/types.d.ts +15 -0
- package/dist/src/components/feedback/nmorph-alert/NmorphAlert.vue.d.ts +5 -7
- package/dist/src/components/feedback/nmorph-alert/types.d.ts +5 -0
- package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +3 -15
- package/dist/src/components/feedback/nmorph-callout/types.d.ts +12 -0
- package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -19
- package/dist/src/components/feedback/nmorph-dialog/types.d.ts +20 -0
- package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +4 -17
- package/dist/src/components/feedback/nmorph-drawer/types.d.ts +18 -0
- package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +5 -14
- package/dist/src/components/feedback/nmorph-tooltip/types.d.ts +11 -0
- package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +6 -19
- package/dist/src/components/form/nmorph-autocomplete/types.d.ts +18 -0
- package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-checkbox/types.d.ts +3 -0
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +5 -11
- package/dist/src/components/form/nmorph-checkbox-group/types.d.ts +11 -0
- package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +6 -11
- package/dist/src/components/form/nmorph-color-picker/types.d.ts +11 -0
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +5 -21
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-clear-button/types.d.ts +3 -0
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +3 -8
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/types.d.ts +10 -0
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.vue.d.ts +3 -6
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/types.d.ts +12 -0
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +3 -6
- package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/types.d.ts +9 -0
- package/dist/src/components/form/nmorph-date-picker/types.d.ts +21 -0
- package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +7 -12
- package/dist/src/components/form/nmorph-file-upload/types.d.ts +21 -0
- package/dist/src/components/form/nmorph-form/NmorphForm.vue.d.ts +4 -8
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +3 -12
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +3 -8
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/types.d.ts +7 -0
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.vue.d.ts +3 -6
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/types.d.ts +5 -0
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/types.d.ts +10 -0
- package/dist/src/components/form/nmorph-form/types.d.ts +21 -6
- package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
- package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +3 -10
- package/dist/src/components/form/nmorph-number-input/types.d.ts +11 -0
- package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +5 -13
- package/dist/src/components/form/nmorph-otp-input/types.d.ts +21 -0
- package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +4 -9
- package/dist/src/components/form/nmorph-radio/types.d.ts +6 -0
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -12
- package/dist/src/components/form/nmorph-radio-group/types.d.ts +12 -0
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +3 -21
- package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-select/components/nmorph-select-option/types.d.ts +3 -0
- package/dist/src/components/form/nmorph-select/types.d.ts +21 -0
- package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +4 -12
- package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue.d.ts +3 -6
- package/dist/src/components/form/nmorph-select-button/components/nmorph-select-button-item/types.d.ts +4 -0
- package/dist/src/components/form/nmorph-select-button/types.d.ts +12 -0
- package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +111 -0
- package/dist/src/components/form/nmorph-slider/types.d.ts +3 -0
- package/dist/src/components/form/nmorph-switch/NmorphSwitch.vue.d.ts +3 -14
- package/dist/src/components/form/nmorph-switch/types.d.ts +15 -0
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +6 -14
- package/dist/src/components/form/nmorph-text-input/types.d.ts +16 -0
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +6 -18
- package/dist/src/components/form/nmorph-textarea/types.d.ts +20 -0
- package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +6 -20
- package/dist/src/components/form/nmorph-time-picker/types.d.ts +24 -0
- package/dist/src/components/navigation/index.d.ts +1 -1
- package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +4 -12
- package/dist/src/components/navigation/nmorph-backtop/types.d.ts +14 -0
- package/dist/src/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.vue.d.ts +2 -4
- package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue.d.ts +2 -4
- package/dist/src/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/types.d.ts +3 -0
- package/dist/src/components/navigation/nmorph-breadcrumb/types.d.ts +3 -0
- package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +10 -31
- package/dist/src/components/navigation/nmorph-context-menu/types.d.ts +42 -0
- package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +6 -24
- package/dist/src/components/navigation/nmorph-dropdown/types.d.ts +24 -0
- package/dist/src/components/navigation/nmorph-tabs/NmorphTabs.vue.d.ts +4 -8
- package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.d.ts +4 -5
- package/dist/src/components/navigation/nmorph-tabs/components/nmorph-tab-pane/types.d.ts +3 -0
- package/dist/src/components/navigation/nmorph-tabs/{type.d.ts → types.d.ts} +9 -0
- package/dist/src/components/navigation/nmorph-tabs/utils.d.ts +1 -1
- package/dist/src/components/others/nmorph-divider/NmorphDivider.vue.d.ts +2 -5
- package/dist/src/components/others/nmorph-divider/types.d.ts +3 -0
- package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +3 -12
- package/dist/src/components/others/nmorph-overlay/types.d.ts +14 -0
- package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +2 -8
- package/dist/src/components/providers/nmorph-notification-provider/types.d.ts +9 -0
- package/dist/src/hooks/use-field-validation.d.ts +15 -0
- package/dist/src/hooks/use-focusable-input.d.ts +16 -0
- package/dist/src/hooks/use-form-validation.d.ts +4 -0
- package/dist/src/plugin.d.ts +4 -1
- package/dist/src/types/app.types.d.ts +21 -0
- package/dist/src/types/common.types.d.ts +62 -0
- package/dist/src/types/date.types.d.ts +7 -0
- package/dist/src/types/image.types.d.ts +17 -0
- package/dist/src/types/index.d.ts +8 -206
- package/dist/src/types/selection.types.d.ts +26 -0
- package/dist/src/types/table.types.d.ts +5 -0
- package/dist/src/types/theme.types.d.ts +55 -0
- package/dist/src/types/translation.types.d.ts +20 -0
- package/dist/src/utils/common.d.ts +3 -0
- package/dist/src/utils/file-types.d.ts +8 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/common.types.js +14 -0
- package/dist/types/date.types.js +4 -0
- package/dist/types/image.types.js +5 -0
- package/dist/types/selection.types.js +4 -0
- package/dist/types/table.types.js +4 -0
- package/dist/types/translation.types.js +4 -0
- package/dist/utils/common.js +16 -7
- package/dist/utils/file-types.js +41 -0
- package/package.json +1 -1
- package/dist/src/components/data/nmorph-calendar/hooks/index.d.ts +0 -2
- package/dist/src/hooks/index.d.ts +0 -9
- package/dist/src/outside-hooks/index.d.ts +0 -5
- package/dist/types/index.js +0 -20
package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './NmorphTagItem.css';
|
|
2
2
|
import { defineComponent as i, computed as s } from "vue";
|
|
3
3
|
import { useModifiers as u } from "../../../../../utils/create-modifiers.js";
|
|
4
|
-
import { NmorphComponentHeight as a } from "../../../../../types/
|
|
4
|
+
import { NmorphComponentHeight as a } from "../../../../../types/common.types.js";
|
|
5
5
|
import l from "../../../../../assets/icons/error.svg.js";
|
|
6
6
|
import d from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
7
|
const N = /* @__PURE__ */ i({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './NmorphVirtualList.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as I, computed as t } from "vue";
|
|
3
|
+
import { useVirtualList as K } from "../../../hooks/use-virtual-list.js";
|
|
3
4
|
import { useModifiers as N } from "../../../utils/create-modifiers.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const B = /* @__PURE__ */ K({
|
|
5
|
+
import { createCssSizeVariables as T } from "../../../utils/common.js";
|
|
6
|
+
const j = /* @__PURE__ */ I({
|
|
7
7
|
__name: "NmorphVirtualList",
|
|
8
8
|
props: {
|
|
9
9
|
items: { type: Array, required: !1, default: () => [] },
|
|
@@ -17,45 +17,47 @@ const B = /* @__PURE__ */ K({
|
|
|
17
17
|
itemTag: { type: String, required: !1, default: "div" }
|
|
18
18
|
},
|
|
19
19
|
emits: ["on-scroll"],
|
|
20
|
-
setup(
|
|
21
|
-
const e =
|
|
20
|
+
setup(p, { expose: y, emit: h }) {
|
|
21
|
+
const e = p, a = h, n = t(() => e.items), o = t(() => !e.disabled), l = t(() => e.itemHeight), u = t(() => e.overscan), m = t(() => e.dynamic), r = K(n, {
|
|
22
22
|
enabled: o,
|
|
23
23
|
itemHeight: l,
|
|
24
24
|
overscan: u,
|
|
25
25
|
dynamic: m
|
|
26
|
-
}), d = r.containerRef,
|
|
26
|
+
}), d = r.containerRef, g = t(
|
|
27
27
|
() => N({
|
|
28
28
|
"nmorph-virtual-list": [e.disabled && "disabled", e.dynamic && "dynamic"]
|
|
29
29
|
})
|
|
30
|
-
),
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
), v = t(() => ({
|
|
31
|
+
...T({
|
|
32
|
+
"--nmorph-virtual-list-height": e.height,
|
|
33
|
+
"--nmorph-virtual-list-max-height": e.maxHeight
|
|
34
|
+
}),
|
|
33
35
|
"--nmorph-virtual-list-item-height": `${e.itemHeight}px`
|
|
34
|
-
})),
|
|
36
|
+
})), b = t(() => ({
|
|
35
37
|
transform: o.value ? `translateY(${r.offsetTop.value}px)` : void 0
|
|
36
|
-
})),
|
|
38
|
+
})), S = t(() => ({
|
|
37
39
|
height: o.value ? `${r.totalHeight.value}px` : void 0
|
|
38
|
-
})),
|
|
40
|
+
})), _ = t(() => r.virtualItems.value), q = (i, s) => {
|
|
39
41
|
if (typeof e.itemKey == "function") return e.itemKey(i, s);
|
|
40
42
|
if (typeof e.itemKey == "string" && i && typeof i == "object") {
|
|
41
43
|
const f = i[e.itemKey];
|
|
42
44
|
return f === void 0 ? s : String(f);
|
|
43
45
|
}
|
|
44
46
|
return s;
|
|
45
|
-
},
|
|
46
|
-
r.scrollHandler(),
|
|
47
|
-
},
|
|
47
|
+
}, x = (i) => {
|
|
48
|
+
r.scrollHandler(), a("on-scroll", i);
|
|
49
|
+
}, H = (i, s) => {
|
|
48
50
|
r.measureElement(s, i);
|
|
49
51
|
};
|
|
50
|
-
|
|
52
|
+
y({
|
|
51
53
|
containerRef: d,
|
|
52
54
|
refresh: r.refresh,
|
|
53
55
|
scrollToIndex: r.scrollToIndex
|
|
54
56
|
});
|
|
55
|
-
const c = { props: e, emit:
|
|
57
|
+
const c = { props: e, emit: a, items: n, enabled: o, itemHeight: l, overscan: u, dynamic: m, virtualList: r, containerRef: d, modifiers: g, styles: v, contentStyle: b, spacerStyle: S, renderedItems: _, getItemKey: q, scrollHandler: x, setItemRef: H };
|
|
56
58
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
57
59
|
}
|
|
58
60
|
});
|
|
59
61
|
export {
|
|
60
|
-
|
|
62
|
+
j as default
|
|
61
63
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import './NmorphAlert.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as m, computed as l, useSlots as u } from "vue";
|
|
3
3
|
import { useModifiers as y } from "../../../utils/create-modifiers.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import h from "../../../assets/icons/
|
|
7
|
-
import I from "../../../assets/icons/
|
|
8
|
-
import q from "../../../assets/icons/
|
|
9
|
-
import N from "../../../assets/icons/
|
|
10
|
-
import b from "
|
|
11
|
-
|
|
4
|
+
import { createCssVariables as g } from "../../../utils/common.js";
|
|
5
|
+
import { NmorphAlertType as r } from "./types.js";
|
|
6
|
+
import h from "../../../assets/icons/circle-close-filled.svg.js";
|
|
7
|
+
import I from "../../../assets/icons/info-filled.svg.js";
|
|
8
|
+
import q from "../../../assets/icons/warn-triangle-filled.svg.js";
|
|
9
|
+
import N from "../../../assets/icons/success-filled.svg.js";
|
|
10
|
+
import b from "../../../assets/icons/cross.svg.js";
|
|
11
|
+
import S from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
12
|
+
const M = /* @__PURE__ */ m({
|
|
12
13
|
__name: "NmorphAlert",
|
|
13
14
|
props: {
|
|
14
15
|
id: { type: String, required: !1, default: void 0 },
|
|
@@ -24,30 +25,32 @@ const x = /* @__PURE__ */ u({
|
|
|
24
25
|
backgroundColor: { type: String, required: !1, default: void 0 }
|
|
25
26
|
},
|
|
26
27
|
emits: ["close"],
|
|
27
|
-
setup(
|
|
28
|
+
setup(s, { expose: i, emit: n }) {
|
|
28
29
|
i();
|
|
29
|
-
const e =
|
|
30
|
+
const e = s, o = n, a = l(
|
|
30
31
|
() => y({
|
|
31
32
|
"nmorph-alert": [e.type, e.bordered && "bordered", e.fill && "fill"]
|
|
32
33
|
})
|
|
33
|
-
),
|
|
34
|
+
), p = l(() => ({
|
|
34
35
|
"--nmorph-alert-close-align": e.closeIconPosition,
|
|
35
|
-
...
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, f = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
...g({
|
|
37
|
+
"--background-color": e.backgroundColor
|
|
38
|
+
})
|
|
39
|
+
})), f = () => {
|
|
40
|
+
o("close");
|
|
41
|
+
}, d = {
|
|
42
|
+
[r.success]: N,
|
|
43
|
+
[r.warning]: q,
|
|
44
|
+
[r.info]: I,
|
|
45
|
+
[r.error]: h
|
|
46
|
+
}, c = u(), t = { props: e, emit: o, modifiers: a, styles: p, closeHandler: f, iconNameMap: d, slots: c, get NmorphIcon() {
|
|
47
|
+
return S;
|
|
45
48
|
}, get NmorphIconCross() {
|
|
46
|
-
return
|
|
49
|
+
return b;
|
|
47
50
|
} };
|
|
48
51
|
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
49
52
|
}
|
|
50
53
|
});
|
|
51
54
|
export {
|
|
52
|
-
|
|
55
|
+
M as default
|
|
53
56
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './NmorphCallout.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as n, computed as l } from "vue";
|
|
3
|
+
import { createCssVariables as o, createCssSizeVariables as u } from "../../../utils/common.js";
|
|
4
|
+
const p = /* @__PURE__ */ n({
|
|
5
5
|
__name: "NmorphCallout",
|
|
6
6
|
props: {
|
|
7
7
|
type: { type: String, required: !1, default: "info" },
|
|
@@ -15,20 +15,24 @@ const s = /* @__PURE__ */ o({
|
|
|
15
15
|
titleFontSize: { type: [Number, String], required: !1, default: "var(--font-size-medium)" },
|
|
16
16
|
contentFontSize: { type: [Number, String], required: !1, default: "var(--font-size-extra-small)" }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
18
|
+
setup(r, { expose: a }) {
|
|
19
19
|
a();
|
|
20
|
-
const e =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
const e = r, i = l(() => ({
|
|
21
|
+
...u({
|
|
22
|
+
"--callout-padding": e.padding,
|
|
23
|
+
"--callout-border-radius": e.borderRadius,
|
|
24
|
+
"--callout-accent-width": e.accentWidth,
|
|
25
|
+
"--callout-title-gap": e.titleGap,
|
|
26
|
+
"--callout-title-font-size": e.titleFontSize,
|
|
27
|
+
"--callout-content-font-size": e.contentFontSize
|
|
28
|
+
}),
|
|
29
|
+
...o({
|
|
30
|
+
"--callout-color": e.color
|
|
31
|
+
})
|
|
32
|
+
})), t = { props: e, styles: i };
|
|
33
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
30
34
|
}
|
|
31
35
|
});
|
|
32
36
|
export {
|
|
33
|
-
|
|
37
|
+
p as default
|
|
34
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './NmorphDrawer.css';
|
|
2
2
|
import { defineComponent as m, useSlots as c, computed as o } from "vue";
|
|
3
3
|
import { useModifiers as y } from "../../../utils/create-modifiers.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createCssSizeVariables as h } from "../../../utils/common.js";
|
|
5
5
|
import q from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
|
|
6
6
|
import _ from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
7
|
import v from "../../../assets/icons/cross.svg.js";
|
|
@@ -21,26 +21,28 @@ const w = /* @__PURE__ */ m({
|
|
|
21
21
|
contentClass: { type: String, required: !1, default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["on-close", "update:model-value"],
|
|
24
|
-
setup(
|
|
24
|
+
setup(s, { expose: n, emit: u }) {
|
|
25
25
|
n();
|
|
26
|
-
const e =
|
|
26
|
+
const e = s, r = u, t = c(), d = o(
|
|
27
27
|
() => y({
|
|
28
28
|
"nmorph-drawer": [e.placement, e.modelValue && "open"]
|
|
29
29
|
})
|
|
30
|
-
), p = o(
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
), p = o(
|
|
31
|
+
() => h({
|
|
32
|
+
"--nmorph-drawer-size": e.size
|
|
33
|
+
})
|
|
34
|
+
), l = () => {
|
|
33
35
|
r("on-close"), r("update:model-value", !1);
|
|
34
36
|
}, i = () => {
|
|
35
37
|
e.closeOnOverlay && l();
|
|
36
|
-
}, f = o(() => !!(t.header || e.title || e.showClose)),
|
|
38
|
+
}, f = o(() => !!(t.header || e.title || e.showClose)), a = { props: e, emit: r, slots: t, modifiers: d, drawerStyle: p, closeHandler: l, overlayClickHandler: i, hasHeader: f, get NmorphIcon() {
|
|
37
39
|
return _;
|
|
38
40
|
}, get NmorphIconCross() {
|
|
39
41
|
return v;
|
|
40
42
|
}, get NmorphOverlay() {
|
|
41
43
|
return q;
|
|
42
44
|
} };
|
|
43
|
-
return Object.defineProperty(
|
|
45
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './NmorphTooltip.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const z = /* @__PURE__ */
|
|
2
|
+
import { defineComponent as x, ref as o, computed as r } from "vue";
|
|
3
|
+
import { usePlacement as y } from "../../../hooks/use-placement.js";
|
|
4
|
+
import { useZIndex as S } from "../../../hooks/use-z-index.js";
|
|
5
|
+
import { useModifiers as _ } from "../../../utils/create-modifiers.js";
|
|
6
|
+
import { createCssSizeVariables as w } from "../../../utils/common.js";
|
|
7
|
+
const z = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NmorphTooltip",
|
|
9
9
|
props: {
|
|
10
10
|
text: { type: String, required: !1, default: "" },
|
|
@@ -16,35 +16,37 @@ const z = /* @__PURE__ */ y({
|
|
|
16
16
|
maxWidth: { type: [Number, String], required: !1, default: void 0 },
|
|
17
17
|
height: { type: [Number, String], required: !1, default: void 0 }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const e =
|
|
19
|
+
setup(f, { expose: p }) {
|
|
20
|
+
const e = f, t = o(e.forceShow), i = o(null), l = o(null), { placement: n } = y({
|
|
21
21
|
initialPlacement: e.position,
|
|
22
|
-
contentDOMElement:
|
|
22
|
+
contentDOMElement: i,
|
|
23
23
|
relativeElement: l
|
|
24
24
|
}), c = r(
|
|
25
|
-
() =>
|
|
25
|
+
() => _({
|
|
26
26
|
"nmorph-tooltip": [
|
|
27
|
-
|
|
27
|
+
n.value,
|
|
28
28
|
!!e.forceCoordinate?.x && !!e.forceCoordinate?.y && "force-coords"
|
|
29
29
|
]
|
|
30
30
|
})
|
|
31
|
-
),
|
|
31
|
+
), m = () => {
|
|
32
32
|
t.value = !0;
|
|
33
|
-
},
|
|
33
|
+
}, h = () => {
|
|
34
34
|
e.forceShow || (t.value = !1);
|
|
35
|
-
}, a = r(() => e.forceCoordinate ? "100%" : "auto"),
|
|
35
|
+
}, a = r(() => e.forceCoordinate ? "100%" : "auto"), s = S(
|
|
36
36
|
() => t.value,
|
|
37
37
|
() => e.zIndex
|
|
38
|
-
),
|
|
38
|
+
), v = r(() => ({
|
|
39
39
|
"--nmorph-tooltip-width": a.value,
|
|
40
|
-
"--nmorph-tooltip-z-index":
|
|
41
|
-
...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
"--nmorph-tooltip-z-index": s.value,
|
|
41
|
+
...w({
|
|
42
|
+
"--width": e.width,
|
|
43
|
+
"--max-width": e.maxWidth,
|
|
44
|
+
"--height": e.height
|
|
45
|
+
})
|
|
46
|
+
})), u = o(null);
|
|
47
|
+
p({ tooltipBody: u });
|
|
48
|
+
const d = { props: e, showTooltip: t, tooltipDOMRef: i, slotDOMRef: l, placement: n, modifiers: c, handleMouseEnter: m, handleMouseLeave: h, rootWidth: a, zIndex: s, styles: v, tooltipBody: u };
|
|
49
|
+
return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
export {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import './NmorphAutocomplete.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { getNmorphOptionHeight as
|
|
5
|
-
import { NmorphComponentHeight as X } from "../../../types/index.js";
|
|
6
|
-
import { useVirtualList as Y } from "../../../hooks/use-virtual-list.js";
|
|
2
|
+
import { defineComponent as K, ref as s, computed as l, watch as c, nextTick as Q } from "vue";
|
|
3
|
+
import { useModifiers as M } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { getNmorphOptionHeight as W, toCssSize as X, resolveDomElement as Y } from "../../../utils/common.js";
|
|
7
5
|
import { useZIndex as ee } from "../../../hooks/use-z-index.js";
|
|
8
|
-
import te from "
|
|
9
|
-
import ae from "
|
|
10
|
-
import le from "
|
|
11
|
-
import re from "
|
|
12
|
-
|
|
6
|
+
import { useVirtualList as te } from "../../../hooks/use-virtual-list.js";
|
|
7
|
+
import { useFormItemModel as ae } from "../nmorph-form/use-form-item-input.js";
|
|
8
|
+
import { NmorphComponentHeight as le } from "../../../types/common.types.js";
|
|
9
|
+
import re from "../nmorph-text-input/NmorphTextInput.vue.js";
|
|
10
|
+
import oe from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
|
|
11
|
+
import ue from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
12
|
+
import ne from "../../../assets/icons/loader.svg.js";
|
|
13
|
+
const Ie = /* @__PURE__ */ K({
|
|
13
14
|
__name: "NmorphAutocomplete",
|
|
14
15
|
props: {
|
|
15
16
|
modelValue: { type: String, required: !1, default: "" },
|
|
@@ -31,83 +32,84 @@ const fe = /* @__PURE__ */ G({
|
|
|
31
32
|
tabindex: { type: Number, required: !1 }
|
|
32
33
|
},
|
|
33
34
|
emits: ["update:model-value", "select"],
|
|
34
|
-
setup(
|
|
35
|
-
|
|
36
|
-
const t =
|
|
37
|
-
|
|
35
|
+
setup(O, { expose: L, emit: V }) {
|
|
36
|
+
L();
|
|
37
|
+
const t = O, p = V, { modelValue: m, updateModelValue: v } = ae(
|
|
38
|
+
t,
|
|
39
|
+
(e) => p("update:model-value", e),
|
|
40
|
+
""
|
|
41
|
+
), o = s(m.value), A = l(
|
|
42
|
+
() => M({
|
|
38
43
|
"nmorph-autocomplete": [a.value && "open"]
|
|
39
44
|
})
|
|
40
|
-
), i = s(!1),
|
|
41
|
-
i.value = e === "", o.value = e, a.value = !i.value && r.value.length > 0, u.value = 0,
|
|
42
|
-
},
|
|
45
|
+
), i = s(!1), b = (e) => {
|
|
46
|
+
i.value = e === "", o.value = e, a.value = !i.value && r.value.length > 0, u.value = 0, v(o.value);
|
|
47
|
+
}, T = l({
|
|
43
48
|
get: () => o.value,
|
|
44
|
-
set:
|
|
45
|
-
}), a = s(!1),
|
|
49
|
+
set: b
|
|
50
|
+
}), a = s(!1), z = s(null), x = () => {
|
|
46
51
|
i.value = !0, a.value = !1;
|
|
47
|
-
}, r = l(() => t.list.filter((e) => Object.keys(e).some((
|
|
48
|
-
enabled:
|
|
49
|
-
itemHeight:
|
|
50
|
-
overscan:
|
|
51
|
-
dynamic:
|
|
52
|
-
}),
|
|
53
|
-
c(
|
|
54
|
-
(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
), c(r, async (e) => {
|
|
59
|
-
a.value = !i.value && o.value !== "" && e.length > 0, u.value = 0, await J(), n.scrollToIndex(0), n.refresh();
|
|
52
|
+
}, r = l(() => t.list.filter((e) => Object.keys(e).some((I) => String(e[I]).toLowerCase().includes(o.value.toLowerCase())))), f = l(() => t.virtual && r.value.length > 0), H = l(() => t.virtualItemHeight || W(t.height)), q = l(() => t.virtualOverscan), N = l(() => t.virtualDynamicHeight), n = te(r, {
|
|
53
|
+
enabled: f,
|
|
54
|
+
itemHeight: H,
|
|
55
|
+
overscan: q,
|
|
56
|
+
dynamic: N
|
|
57
|
+
}), B = l(() => n.virtualItems.value), E = n.spacerStyle, $ = n.contentStyle, j = l(() => X(t.virtualMaxHeight)), u = s(0), h = l(() => r.value[u.value]), g = l(() => `${t.id || t.name || "nmorph-autocomplete"}-listbox`), D = (e) => `${g.value}-option-${e}`;
|
|
58
|
+
c(m, (e) => {
|
|
59
|
+
e !== o.value && (o.value = e);
|
|
60
|
+
}), c(r, async (e) => {
|
|
61
|
+
a.value = !i.value && o.value !== "" && e.length > 0, u.value = 0, await Q(), n.scrollToIndex(0), n.refresh();
|
|
60
62
|
});
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
+
const y = (e) => {
|
|
64
|
+
p("select", e), o.value = e.value, v(o.value), setTimeout(() => {
|
|
63
65
|
i.value = !0, a.value = !1;
|
|
64
66
|
});
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
67
|
+
}, F = (e) => {
|
|
68
|
+
y(e);
|
|
69
|
+
}, R = () => {
|
|
68
70
|
i.value = !1, a.value = r.value.length > 0;
|
|
69
|
-
},
|
|
71
|
+
}, d = s(!1);
|
|
70
72
|
c(o, async (e) => {
|
|
71
|
-
e !== "" && t.actionCallback && (
|
|
72
|
-
}), c(
|
|
73
|
+
e !== "" && t.actionCallback && (d.value = !0, await t.actionCallback(), d.value = !1);
|
|
74
|
+
}), c(d, (e) => {
|
|
73
75
|
e && (a.value = !0);
|
|
74
76
|
}), c(u, (e) => {
|
|
75
|
-
|
|
77
|
+
f.value && n.scrollToIndex(e);
|
|
76
78
|
});
|
|
77
|
-
const
|
|
79
|
+
const S = () => {
|
|
78
80
|
r.value.length && (a.value = !0, u.value = (u.value + 1) % r.value.length);
|
|
79
|
-
},
|
|
81
|
+
}, w = () => {
|
|
80
82
|
r.value.length && (a.value = !0, u.value = (u.value - 1 + r.value.length) % r.value.length);
|
|
81
|
-
},
|
|
82
|
-
!a.value || !
|
|
83
|
-
},
|
|
84
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
85
|
-
},
|
|
83
|
+
}, k = () => {
|
|
84
|
+
!a.value || !h.value || y(h.value);
|
|
85
|
+
}, U = (e) => {
|
|
86
|
+
e.key === "ArrowDown" ? (e.preventDefault(), S()) : e.key === "ArrowUp" ? (e.preventDefault(), w()) : e.key === "Enter" ? (e.preventDefault(), k()) : e.key === "Escape" && (e.preventDefault(), x());
|
|
87
|
+
}, Z = l(() => ({
|
|
86
88
|
role: "combobox",
|
|
87
89
|
"aria-autocomplete": "list",
|
|
88
90
|
"aria-expanded": a.value,
|
|
89
|
-
"aria-controls":
|
|
90
|
-
"aria-activedescendant": a.value ?
|
|
91
|
-
})),
|
|
92
|
-
n.measureElement(
|
|
93
|
-
},
|
|
94
|
-
"--nmorph-autocomplete-input-z-index":
|
|
95
|
-
})),
|
|
96
|
-
() =>
|
|
97
|
-
nmorph: [
|
|
91
|
+
"aria-controls": g.value,
|
|
92
|
+
"aria-activedescendant": a.value ? D(u.value) : void 0
|
|
93
|
+
})), P = (e, I) => {
|
|
94
|
+
n.measureElement(I, Y(e));
|
|
95
|
+
}, C = ee(a, () => t.zIndex), G = l(() => ({
|
|
96
|
+
"--nmorph-autocomplete-input-z-index": C.value + 1
|
|
97
|
+
})), J = l(
|
|
98
|
+
() => M({
|
|
99
|
+
nmorph: [le[t.height]]
|
|
98
100
|
})
|
|
99
|
-
),
|
|
100
|
-
return
|
|
101
|
+
), _ = { props: t, emit: p, modelValue: m, updateModelValue: v, initialValue: o, modifiers: A, userClosed: i, updateValueHandler: b, inputValue: T, open: a, nmorphAutocompleteDOMRef: z, closeHandler: x, filteredList: r, virtualEnabled: f, virtualItemHeight: H, virtualOverscan: q, virtualDynamicHeight: N, virtualList: n, virtualItems: B, virtualSpacerStyle: E, virtualContentStyle: $, virtualMaxHeight: j, currentIndex: u, activeItem: h, listboxId: g, getOptionId: D, selectItem: y, clickHandler: F, focusHandler: R, loader: d, arrowDownHandler: S, arrowUpHandler: w, enterHandler: k, keydownHandler: U, inputAttrs: Z, setVirtualItemRef: P, dropdownZIndex: C, styles: G, optionHeightModifiers: J, get NmorphIcon() {
|
|
102
|
+
return ue;
|
|
101
103
|
}, get NmorphDropdown() {
|
|
102
|
-
return
|
|
104
|
+
return oe;
|
|
103
105
|
}, get NmorphTextInput() {
|
|
104
|
-
return te;
|
|
105
|
-
}, get NmorphIconLoaderDots() {
|
|
106
106
|
return re;
|
|
107
|
+
}, get NmorphIconLoaderDots() {
|
|
108
|
+
return ne;
|
|
107
109
|
} };
|
|
108
|
-
return Object.defineProperty(
|
|
110
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
113
|
export {
|
|
112
|
-
|
|
114
|
+
Ie as default
|
|
113
115
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-checkbox{--size: var(--height);display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer}.nmorph-checkbox .nmorph-checkbox__content{position:relative;display:flex;justify-content:center;align-items:center}.nmorph-checkbox .nmorph-checkbox__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-checkbox input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.nmorph-checkbox input:focus-visible{outline:2px solid var(--nmorph-accent-color);opacity:1;scale:.95}.nmorph-checkbox .nmorph-checkbox__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox .nmorph-checkbox__label,.nmorph-checkbox .nmorph-checkbox__fake span{font-weight:400;font-size:var(--font-size
|
|
1
|
+
.nmorph-checkbox{--size: var(--height);--nmorph-selection-control-font-size: var(--font-size-small);--nmorph-selection-control-line-height: var(--line-height-regular);--nmorph-selection-control-inline-padding: var(--indentation-03);display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer}.nmorph-checkbox.nmorph{height:auto;min-height:var(--size)}.nmorph-checkbox .nmorph-checkbox__content{position:relative;display:flex;justify-content:center;align-items:center;min-height:var(--size)}.nmorph-checkbox .nmorph-checkbox__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-checkbox input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.nmorph-checkbox input:focus-visible{outline:2px solid var(--nmorph-accent-color);opacity:1;scale:.95}.nmorph-checkbox .nmorph-checkbox__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox .nmorph-checkbox__label,.nmorph-checkbox .nmorph-checkbox__fake span{font-weight:400;font-size:var(--nmorph-selection-control-font-size);line-height:var(--nmorph-selection-control-line-height)}.nmorph-checkbox .nmorph-checkbox__fake-checked{position:absolute;top:50%;left:50%;width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-20);transform:translate(-50%,-50%)}.nmorph-checkbox .nmorph-checkbox__label{margin-left:var(--indentation-02);line-height:1}.nmorph-checkbox .nmorph-checkbox__fake span{line-height:.8}.nmorph-checkbox.nmorph-checkbox--button .nmorph-checkbox__fake{position:relative;display:flex;justify-content:center;align-items:center;width:auto;min-width:var(--size);height:var(--size);padding:var(--nmorph-selection-control-inline-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph--extra-thin-component{--nmorph-selection-control-font-size: var(--font-size-tiny);--nmorph-selection-control-line-height: var(--line-height-line);--nmorph-selection-control-inline-padding: var(--indentation-02)}.nmorph-checkbox.nmorph--thin-component{--nmorph-selection-control-font-size: var(--font-size-extra-small)}.nmorph-checkbox.nmorph--basic-component{--nmorph-selection-control-font-size: var(--font-size-small)}.nmorph-checkbox.nmorph--thick-component{--nmorph-selection-control-font-size: var(--font-size-base)}.nmorph-checkbox.nmorph-checkbox--checked .nmorph-checkbox__fake{background:var(--nmorph-main-color);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph-checkbox--disabled{cursor:not-allowed;opacity:.6}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import './NmorphCheckbox.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { defineComponent as x, inject as i, watch as S, ref as n, computed as d } from "vue";
|
|
3
|
+
import { useModifiers as q } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { useFormItemModel as V } from "../nmorph-form/use-form-item-input.js";
|
|
5
|
+
import { NmorphSelectionControlHeight as C } from "../../../types/common.types.js";
|
|
6
|
+
const H = /* @__PURE__ */ x({
|
|
6
7
|
__name: "NmorphCheckbox",
|
|
7
8
|
props: {
|
|
8
9
|
id: { type: String, required: !1, default: "" },
|
|
@@ -13,43 +14,44 @@ const j = /* @__PURE__ */ y({
|
|
|
13
14
|
height: { type: null, required: !1 }
|
|
14
15
|
},
|
|
15
16
|
emits: ["update:model-value"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
17
|
+
setup(g, { expose: b, emit: _ }) {
|
|
18
|
+
const o = i(
|
|
18
19
|
"checkbox-group-selected-value",
|
|
19
20
|
void 0
|
|
20
|
-
),
|
|
21
|
+
), u = i(
|
|
21
22
|
"change-checkbox-value-handler",
|
|
22
23
|
void 0
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
() =>
|
|
26
|
-
|
|
27
|
-
t.value = _;
|
|
28
|
-
}
|
|
24
|
+
), s = i("checkbox-group-height", void 0), e = g, c = _, { modelValue: l, updateModelValue: p } = V(
|
|
25
|
+
e,
|
|
26
|
+
(r) => c("update:model-value", r),
|
|
27
|
+
!1
|
|
29
28
|
);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
S(l, (r) => {
|
|
30
|
+
t.value = r;
|
|
31
|
+
});
|
|
32
|
+
const f = n(null);
|
|
33
|
+
b({ inputDOMRef: f });
|
|
34
|
+
const a = o !== void 0, t = a ? n(o.value) : n(l.value), h = d(() => a ? o.value.includes(e.id) : l.value), m = d(() => e.height || s?.value || "thin"), y = () => {
|
|
33
35
|
if (!e.disabled) {
|
|
34
|
-
if (!
|
|
35
|
-
t.value = !t.value, p(
|
|
36
|
+
if (!a) {
|
|
37
|
+
t.value = !t.value, p(t.value);
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
|
-
|
|
40
|
+
u && Array.isArray(t.value) && u(e.id, t.value);
|
|
39
41
|
}
|
|
40
|
-
},
|
|
41
|
-
() =>
|
|
42
|
-
nmorph: [
|
|
42
|
+
}, k = d(
|
|
43
|
+
() => q({
|
|
44
|
+
nmorph: [C[m.value]],
|
|
43
45
|
"nmorph-checkbox": [
|
|
44
|
-
|
|
46
|
+
h.value && "checked",
|
|
45
47
|
e.disabled && "disabled",
|
|
46
48
|
e.design === "button" && "button"
|
|
47
49
|
]
|
|
48
50
|
})
|
|
49
|
-
),
|
|
50
|
-
return Object.defineProperty(
|
|
51
|
+
), v = { groupSelectedValue: o, changeValue: u, groupHeight: s, props: e, emit: c, modelValue: l, updateModelValue: p, inputDOMRef: f, hasGroup: a, initialValue: t, checked: h, height: m, handleChange: y, modifiers: k };
|
|
52
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
51
53
|
}
|
|
52
54
|
});
|
|
53
55
|
export {
|
|
54
|
-
|
|
56
|
+
H as default
|
|
55
57
|
};
|