@nmorph/nmorph-ui-kit 2.2.38 → 2.2.40
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.css +1 -1
- package/dist/components/basic/nmorph-button/NmorphButton.vue.js +13 -10
- 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 +6 -6
- 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.css +1 -1
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +121 -73
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +105 -78
- 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/NmorphTagList.vue.js +7 -7
- package/dist/components/data/nmorph-tag-list/NmorphTagList.vue2.js +22 -16
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -1
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js +9 -9
- 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 +8 -8
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +4 -4
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue.js +18 -22
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +42 -33
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +32 -32
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +77 -106
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.css +1 -1
- 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-number-input/NmorphNumberInput.vue2.js +7 -7
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +6 -6
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +51 -49
- 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 +28 -24
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +30 -30
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +34 -32
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +16 -16
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +12 -12
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +34 -32
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +16 -16
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +64 -57
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.js +27 -22
- package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue2.js +75 -46
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +25 -23
- package/dist/hooks/use-field-validation.js +50 -66
- package/dist/hooks/use-focusable-input.js +27 -0
- package/dist/hooks/use-nmorph-translation.js +4 -4
- package/dist/hooks/use-placement.js +65 -61
- 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 +3 -14
- 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 +5 -20
- package/dist/src/components/data/nmorph-avatar/types.d.ts +21 -0
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +5 -40
- 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 +3 -12
- 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 +9 -18
- package/dist/src/components/data/nmorph-image-preview/types.d.ts +23 -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 +3 -15
- 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 +4 -18
- 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 +9 -9
- 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 +8 -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 +4 -16
- 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 +4 -10
- 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 +4 -20
- 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 +5 -13
- package/dist/src/components/form/nmorph-file-upload/types.d.ts +17 -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 +6 -1
- 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 +3 -11
- 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 +14 -33
- package/dist/src/components/navigation/nmorph-context-menu/types.d.ts +48 -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-focusable-input.d.ts +16 -0
- package/dist/src/hooks/use-form-validation.d.ts +1 -2
- 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 -6
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './NmorphProgress.css';
|
|
2
2
|
import { defineComponent as v, computed as r, ref as u, onMounted as y } from "vue";
|
|
3
3
|
import { useModifiers as S } from "../../../utils/create-modifiers.js";
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
4
|
+
import { createCssSizeVariables as q, createCssVariables as _ } from "../../../utils/common.js";
|
|
5
|
+
const C = /* @__PURE__ */ v({
|
|
6
6
|
__name: "NmorphProgress",
|
|
7
7
|
props: {
|
|
8
8
|
type: { type: String, required: !1, default: "linear" },
|
|
@@ -22,22 +22,26 @@ const z = /* @__PURE__ */ v({
|
|
|
22
22
|
() => S({
|
|
23
23
|
"nmorph-progress": []
|
|
24
24
|
})
|
|
25
|
-
), n = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), o = r(() => e.indeterminate ? "var(--animation)" : "none"),
|
|
25
|
+
), n = r(() => Array.isArray(e.color) ? e.color.find((h) => h.percentage <= e.percentage)?.color : typeof e.color == "function" ? e.color(e.percentage) : e.color), o = r(() => e.indeterminate ? "var(--animation)" : "none"), a = u(null), t = u(1), f = r(() => `${t.value} ${t.value}`), m = r(() => t.value - e.percentage / 100 * t.value);
|
|
26
26
|
y(() => {
|
|
27
|
-
|
|
27
|
+
a.value && (t.value = 2 * Math.PI * a.value.r.baseVal.value);
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
const i = r(() => `${e.circleSize}px`), s = r(() => `${e.percentage}%`), g = r(() => ({
|
|
30
|
+
..._({
|
|
31
|
+
"--nmorph-progress-percentage": s.value,
|
|
32
|
+
"--nmorph-progress-color": n.value,
|
|
33
|
+
"--nmorph-progress-animation": o.value,
|
|
34
|
+
"--nmorph-progress-circle-size": i.value,
|
|
35
|
+
"--width-transition": e.widthTransition,
|
|
36
|
+
"--animation": e.indeterminateAnimation
|
|
37
|
+
}),
|
|
38
|
+
...q({
|
|
39
|
+
"--height": e.height
|
|
40
|
+
})
|
|
41
|
+
})), l = { props: e, modifiers: d, color: n, animation: o, circle: a, circumference: t, strokeDasharray: f, strokeDashoffset: m, circleContainerSize: i, displayPercentage: s, styles: g };
|
|
38
42
|
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
export {
|
|
42
|
-
|
|
46
|
+
C as default
|
|
43
47
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './NmorphQRCode.css';
|
|
2
2
|
import { defineComponent as g, computed as r } from "vue";
|
|
3
3
|
import { useModifiers as q } from "../../../utils/create-modifiers.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createCssVariables as b, createCssSizeVariables as h } from "../../../utils/common.js";
|
|
5
5
|
import { createNmorphQRCode as a } from "./qr-code.js";
|
|
6
|
-
const
|
|
6
|
+
const x = /* @__PURE__ */ g({
|
|
7
7
|
__name: "NmorphQRCode",
|
|
8
8
|
props: {
|
|
9
9
|
value: { type: [String, Number], required: !1, default: "" },
|
|
@@ -16,9 +16,9 @@ const _ = /* @__PURE__ */ g({
|
|
|
16
16
|
maxVersion: { type: Number, required: !1, default: 40 },
|
|
17
17
|
title: { type: String, required: !1, default: "" }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
19
|
+
setup(s, { expose: l }) {
|
|
20
20
|
l();
|
|
21
|
-
const e =
|
|
21
|
+
const e = s, n = r(() => {
|
|
22
22
|
try {
|
|
23
23
|
return a(String(e.value), {
|
|
24
24
|
errorCorrectionLevel: e.level,
|
|
@@ -32,20 +32,24 @@ const _ = /* @__PURE__ */ g({
|
|
|
32
32
|
errorCorrectionLevel: e.level,
|
|
33
33
|
minVersion: e.minVersion,
|
|
34
34
|
maxVersion: e.maxVersion
|
|
35
|
-
})),
|
|
36
|
-
(t,
|
|
35
|
+
})), u = r(() => o.value ? o.value.size + e.margin * 2 : 1), m = r(() => o.value ? o.value.modules.flatMap(
|
|
36
|
+
(t, c) => t.map((f, v) => f ? `M${v + e.margin} ${c + e.margin}h1v1h-1z` : "").filter(Boolean)
|
|
37
37
|
).join("") : ""), d = r(() => ({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
...h({
|
|
39
|
+
"--nmorph-qr-code-size": e.size
|
|
40
|
+
}),
|
|
41
|
+
...b({
|
|
42
|
+
"--nmorph-qr-code-color": e.color,
|
|
43
|
+
"--nmorph-qr-code-background": e.background
|
|
44
|
+
})
|
|
41
45
|
})), p = r(
|
|
42
46
|
() => q({
|
|
43
47
|
"nmorph-qr-code": [n.value && "error"]
|
|
44
48
|
})
|
|
45
|
-
), i = { props: e, errorMessage: n, qrCode: o, viewBoxSize:
|
|
49
|
+
), i = { props: e, errorMessage: n, qrCode: o, viewBoxSize: u, path: m, styles: d, modifiers: p };
|
|
46
50
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
export {
|
|
50
|
-
|
|
54
|
+
x as default
|
|
51
55
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import './NmorphSkeleton.css';
|
|
2
|
-
import { defineComponent as d, computed as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import
|
|
5
|
-
|
|
2
|
+
import { defineComponent as d, computed as r } from "vue";
|
|
3
|
+
import { useModifiers as s } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssVariables as l } from "../../../utils/common.js";
|
|
5
|
+
import p from "./components/NmorphSkeletonItem.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ d({
|
|
6
7
|
__name: "NmorphSkeleton",
|
|
7
8
|
props: {
|
|
8
9
|
animated: { type: Boolean, required: !1, default: !0 },
|
|
@@ -10,20 +11,22 @@ const f = /* @__PURE__ */ d({
|
|
|
10
11
|
rows: { type: Number, required: !1, default: 0 },
|
|
11
12
|
loadingGradient: { type: String, required: !1, default: void 0 }
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
+
setup(o, { expose: n }) {
|
|
14
15
|
n();
|
|
15
|
-
const e =
|
|
16
|
-
() =>
|
|
16
|
+
const e = o, a = r(
|
|
17
|
+
() => s({
|
|
17
18
|
"nmorph-skeleton": [e.animated && e.loading && "loading"]
|
|
18
19
|
})
|
|
19
|
-
), i =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
), i = r(
|
|
21
|
+
() => l({
|
|
22
|
+
"--loading-gradient": e.loadingGradient
|
|
23
|
+
})
|
|
24
|
+
), t = { props: e, modifiers: a, styles: i, get NmorphSkeletonItem() {
|
|
25
|
+
return p;
|
|
23
26
|
} };
|
|
24
27
|
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
25
28
|
}
|
|
26
29
|
});
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
_ as default
|
|
29
32
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './NmorphTable.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { generateUUID as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
2
|
+
import { defineComponent as j, computed as l, ref as n, provide as M, watch as P, nextTick as z } from "vue";
|
|
3
|
+
import { useModifiers as K } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { generateUUID as Q, toCssSize as Y, createCssSizeVariables as $, createCssVariables as F, resolveDomElement as G } from "../../../utils/common.js";
|
|
5
|
+
import { useVirtualList as J } from "../../../hooks/use-virtual-list.js";
|
|
6
|
+
import X from "./inner-components/nmorph-sort-button/NmorphSortButton.vue.js";
|
|
7
|
+
const oe = /* @__PURE__ */ j({
|
|
8
8
|
__name: "NmorphTable",
|
|
9
9
|
props: {
|
|
10
10
|
data: { type: Array, required: !1, default: () => [] },
|
|
@@ -21,37 +21,37 @@ const le = /* @__PURE__ */ K({
|
|
|
21
21
|
cellHeight: { type: [Number, String], required: !1, default: void 0 },
|
|
22
22
|
rowHoverBackground: { type: String, required: !1, default: void 0 }
|
|
23
23
|
},
|
|
24
|
-
setup(_, { expose:
|
|
25
|
-
|
|
26
|
-
const t = _,
|
|
27
|
-
() =>
|
|
24
|
+
setup(_, { expose: B }) {
|
|
25
|
+
B();
|
|
26
|
+
const t = _, T = l(
|
|
27
|
+
() => K({
|
|
28
28
|
"nmorph-table": [t.design]
|
|
29
29
|
})
|
|
30
|
-
), o = n([...t.data]), u =
|
|
30
|
+
), o = n([...t.data]), u = l(() => t.virtual), w = l(() => t.virtualRowHeight), H = l(() => t.virtualOverscan), S = l(() => t.virtualDynamicHeight), r = J(o, {
|
|
31
31
|
enabled: u,
|
|
32
|
-
itemHeight:
|
|
32
|
+
itemHeight: w,
|
|
33
33
|
overscan: H,
|
|
34
34
|
dynamic: S
|
|
35
|
-
}),
|
|
36
|
-
() => u.value ? r.virtualItems.value : o.value.map((e,
|
|
37
|
-
),
|
|
38
|
-
d.value && (d.value[
|
|
39
|
-
const
|
|
35
|
+
}), C = l(
|
|
36
|
+
() => u.value ? r.virtualItems.value : o.value.map((e, a) => ({ item: e, index: a }))
|
|
37
|
+
), x = l(() => C.value.map((e) => e.item)), s = n(-1), h = n(0), d = n(t.sort), I = (e, a) => {
|
|
38
|
+
d.value && (d.value[a] = e, o.value.sort((g, y) => {
|
|
39
|
+
const b = String(g[a]).toLowerCase(), i = String(y[a]).toLowerCase();
|
|
40
40
|
if (!d.value)
|
|
41
41
|
return 0;
|
|
42
|
-
const f = d.value[
|
|
43
|
-
return f === "ascending" ?
|
|
42
|
+
const f = d.value[a];
|
|
43
|
+
return f === "ascending" ? b.localeCompare(i) : f === "descending" ? i.localeCompare(b) : 0;
|
|
44
44
|
}));
|
|
45
45
|
}, m = n(null), c = n([]);
|
|
46
|
-
|
|
47
|
-
const D =
|
|
48
|
-
const e = c.value.map((i) => i.width).filter((i) => !!i),
|
|
46
|
+
M("table-data", { rows: x, columns: c });
|
|
47
|
+
const D = l(() => {
|
|
48
|
+
const e = c.value.map((i) => i.width).filter((i) => !!i), a = e.length, g = e.reduce((i, f) => (i += Number(f), i), 0), y = c.value.length - a;
|
|
49
49
|
return m.value?.clientWidth ? (m.value?.clientWidth - g) / y : 0;
|
|
50
|
-
}),
|
|
51
|
-
|
|
50
|
+
}), W = (e) => e !== "" ? e : D.value, p = n(0);
|
|
51
|
+
P(
|
|
52
52
|
() => t.data,
|
|
53
53
|
async () => {
|
|
54
|
-
p.value = p.value + 1, o.value = [...t.data], c.value = [], await
|
|
54
|
+
p.value = p.value + 1, o.value = [...t.data], c.value = [], await z();
|
|
55
55
|
const e = r.containerRef.value;
|
|
56
56
|
e && (e.scrollTop = Math.min(
|
|
57
57
|
h.value,
|
|
@@ -62,34 +62,38 @@ const le = /* @__PURE__ */ K({
|
|
|
62
62
|
immediate: !0
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const q =
|
|
68
|
-
...
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
const N = (e) => typeof e == "object" ? "" : e, R = Q();
|
|
66
|
+
M("table-identifier", R);
|
|
67
|
+
const q = l(() => Y(t.virtualHeight)), O = l(() => ({
|
|
68
|
+
...F({
|
|
69
|
+
"--border-color": t.borderColor,
|
|
70
|
+
"--table-background-row-hover": t.rowHoverBackground
|
|
71
|
+
}),
|
|
72
|
+
...$({
|
|
73
|
+
"--table-cell-height": t.cellHeight
|
|
74
|
+
})
|
|
75
|
+
})), A = l(() => ({
|
|
72
76
|
"--table-virtual-row-height": `${t.virtualRowHeight}px`,
|
|
73
77
|
height: u.value ? q.value : void 0,
|
|
74
78
|
overflowY: u.value ? "auto" : void 0
|
|
75
|
-
})),
|
|
76
|
-
r.measureElement(
|
|
77
|
-
},
|
|
79
|
+
})), E = r.spacerStyle, L = r.contentStyle, U = (e, a) => {
|
|
80
|
+
r.measureElement(a, G(e));
|
|
81
|
+
}, V = () => {
|
|
78
82
|
r.scrollHandler(), h.value = r.containerRef.value?.scrollTop || 0;
|
|
79
83
|
}, v = (e) => {
|
|
80
84
|
if (!o.value.length) return;
|
|
81
|
-
const
|
|
82
|
-
s.value =
|
|
83
|
-
}, k = { props: t, modifiers:
|
|
85
|
+
const a = s.value < 0 ? 0 : Math.min(Math.max(s.value + e, 0), o.value.length - 1);
|
|
86
|
+
s.value = a, r.scrollToIndex(a);
|
|
87
|
+
}, k = { props: t, modifiers: T, rows: o, virtualEnabled: u, virtualRowHeight: w, virtualOverscan: H, virtualDynamicHeight: S, virtualList: r, renderedRows: C, tableRows: x, activeRowIndex: s, lastScrollTop: h, sortData: d, onSort: I, nmorphDOMTable: m, columns: c, defaultColWidth: D, getWidth: W, key: p, tableData: N, tableIdentifier: R, virtualHeight: q, tableStyle: O, tableBodyStyle: A, virtualSpacerStyle: E, virtualContentStyle: L, setVirtualRowRef: U, scrollHandler: V, moveActiveRow: v, tableKeydownHandler: (e) => {
|
|
84
88
|
u.value && (e.key === "ArrowDown" ? (e.preventDefault(), v(1)) : e.key === "ArrowUp" ? (e.preventDefault(), v(-1)) : e.key === "Home" ? (e.preventDefault(), s.value = 0, r.scrollToIndex(0)) : e.key === "End" ? (e.preventDefault(), s.value = o.value.length - 1, r.scrollToIndex(o.value.length - 1)) : e.key === "PageDown" ? (e.preventDefault(), v(
|
|
85
89
|
Math.max(Math.floor((r.viewportHeight.value || t.virtualRowHeight) / t.virtualRowHeight), 1)
|
|
86
90
|
)) : e.key === "PageUp" && (e.preventDefault(), v(
|
|
87
91
|
-Math.max(Math.floor((r.viewportHeight.value || t.virtualRowHeight) / t.virtualRowHeight), 1)
|
|
88
92
|
)));
|
|
89
|
-
}, NmorphSortButton:
|
|
93
|
+
}, NmorphSortButton: X };
|
|
90
94
|
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
91
95
|
}
|
|
92
96
|
});
|
|
93
97
|
export {
|
|
94
|
-
|
|
98
|
+
oe as default
|
|
95
99
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import n from "./NmorphTagList.vue2.js";
|
|
2
|
-
import { openBlock as e, createElementBlock as t, normalizeClass as
|
|
2
|
+
import { openBlock as e, createElementBlock as t, normalizeClass as l, Fragment as s, renderList as a, createBlock as m, mergeProps as i } from "vue";
|
|
3
3
|
import c from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
function p(f,
|
|
4
|
+
function p(f, d, _, r, u, g) {
|
|
5
5
|
return e(), t(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
|
-
class:
|
|
8
|
+
class: l(r.modifiers)
|
|
9
9
|
},
|
|
10
10
|
[
|
|
11
11
|
(e(!0), t(
|
|
12
|
-
|
|
12
|
+
s,
|
|
13
13
|
null,
|
|
14
|
-
|
|
14
|
+
a(r.resolvedTagList, (o) => (e(), m(
|
|
15
15
|
r.NmorphTagItem,
|
|
16
16
|
i({
|
|
17
17
|
key: o.value
|
|
@@ -28,7 +28,7 @@ function p(f, _, d, r, u, g) {
|
|
|
28
28
|
/* CLASS */
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const v = /* @__PURE__ */ c(n, [["render", p], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-tag-list/NmorphTagList.vue"]]);
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
v as default
|
|
34
34
|
};
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModifiers as
|
|
1
|
+
import { defineComponent as d, computed as a, ref as c } from "vue";
|
|
2
|
+
import { useModifiers as g } from "../../../utils/create-modifiers.js";
|
|
3
3
|
import f from "./components/nmorph-tag-item/NmorphTagItem.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const L = /* @__PURE__ */ d({
|
|
5
5
|
__name: "NmorphTagList",
|
|
6
6
|
props: {
|
|
7
|
-
modelValue: { type: Array, required: !0 }
|
|
7
|
+
modelValue: { type: Array, required: !0 },
|
|
8
|
+
design: { type: String, required: !1, default: "nmorph" }
|
|
8
9
|
},
|
|
9
10
|
emits: ["close", "update:model-value"],
|
|
10
|
-
setup(
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
() =>
|
|
11
|
+
setup(i, { expose: l, emit: m }) {
|
|
12
|
+
l();
|
|
13
|
+
const r = i, o = m, n = a(
|
|
14
|
+
() => g({
|
|
14
15
|
"nmorph-list": []
|
|
15
16
|
})
|
|
16
17
|
);
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
let t = c(r.modelValue);
|
|
19
|
+
const u = a(
|
|
20
|
+
() => t.value.map((e) => ({
|
|
21
|
+
...e,
|
|
22
|
+
design: e.design ?? r.design
|
|
23
|
+
}))
|
|
24
|
+
), s = { props: r, emit: o, modifiers: n, get tagList() {
|
|
25
|
+
return t;
|
|
26
|
+
}, set tagList(e) {
|
|
27
|
+
t = e;
|
|
28
|
+
}, resolvedTagList: u, closeTagHandler: (e) => {
|
|
29
|
+
t.value = t.value.filter((p) => p.value !== e), o("close", e), o("update:model-value", t.value);
|
|
24
30
|
}, get NmorphTagItem() {
|
|
25
31
|
return f;
|
|
26
32
|
} };
|
|
@@ -28,5 +34,5 @@ const h = /* @__PURE__ */ p({
|
|
|
28
34
|
}
|
|
29
35
|
});
|
|
30
36
|
export {
|
|
31
|
-
|
|
37
|
+
L as default
|
|
32
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nmorph-tag-item{display:inline-flex;margin-right:var(--indentation-02);padding:var(--indentation-00) var(--indentation-03);
|
|
1
|
+
.nmorph-tag-item{display:inline-flex;margin-right:var(--indentation-02);padding:var(--indentation-00) var(--indentation-03);color:var(--nmorph-tag-item-content-color, var(--nmorph-tag-item-color, var(--nmorph-text-color)));border-radius:var(--default-border-radius);cursor:default}.nmorph-tag-item .nmorph-tag-item__content{display:flex;align-items:center;height:100%}.nmorph-tag-item span{color:inherit}.nmorph-tag-item .nmorph-tag-item__close-icon{margin-left:4px;cursor:pointer;--color: var(--nmorph-tag-item-content-color, var(--nmorph-tag-item-color, var(--nmorph-text-color)))}.nmorph-tag-item.nmorph-tag-item--nmorph{background:var(--nmorph-main-color);border:none;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-tag-item.nmorph-tag-item--common{--nmorph-tag-item-content-color: var(--nmorph-tag-item-color, var(--nmorph-contrast-text-color));background:var(--nmorph-tag-item-background, var(--nmorph-gray-color));border:none;box-shadow:none}.nmorph-tag-item.nmorph-tag-item--thin{--height: var(--thin-component)}.nmorph-tag-item.nmorph-tag-item--thin span{font-weight:400;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-tag-item.nmorph-tag-item--thick{--height: var(--thick-component)}
|
package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './NmorphTagItem.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as p, 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
|
-
import
|
|
7
|
-
const N = /* @__PURE__ */
|
|
6
|
+
import c from "../../../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
7
|
+
const N = /* @__PURE__ */ p({
|
|
8
8
|
__name: "NmorphTagItem",
|
|
9
9
|
props: {
|
|
10
10
|
value: { type: String, required: !0 },
|
|
@@ -14,17 +14,17 @@ const N = /* @__PURE__ */ i({
|
|
|
14
14
|
design: { type: String, required: !1, default: "nmorph" }
|
|
15
15
|
},
|
|
16
16
|
emits: ["close"],
|
|
17
|
-
setup(o, { expose: n, emit:
|
|
17
|
+
setup(o, { expose: n, emit: i }) {
|
|
18
18
|
n();
|
|
19
|
-
const e = o,
|
|
19
|
+
const e = o, m = s(
|
|
20
20
|
() => u({
|
|
21
21
|
nmorph: [a[e.height]],
|
|
22
|
-
"nmorph-tag-item": [
|
|
22
|
+
"nmorph-tag-item": [e.design]
|
|
23
23
|
})
|
|
24
|
-
), r =
|
|
24
|
+
), r = i, t = { props: e, modifiers: m, emit: r, closeHandler: () => {
|
|
25
25
|
r("close", e.value);
|
|
26
26
|
}, get NmorphIcon() {
|
|
27
|
-
return
|
|
27
|
+
return c;
|
|
28
28
|
}, get NmorphIconError() {
|
|
29
29
|
return l;
|
|
30
30
|
} };
|
|
@@ -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
|
};
|