@nmorph/nmorph-ui-kit 2.2.9 → 2.2.12
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/icons/add-location.svg.js +35 -0
- package/dist/assets/icons/aim.svg.js +28 -0
- package/dist/assets/icons/alarm-clock.svg.js +28 -0
- package/dist/assets/icons/apple.svg.js +21 -0
- package/dist/assets/icons/archive.svg.js +28 -0
- package/dist/assets/icons/arrow-down.svg.js +21 -0
- package/dist/assets/icons/arrow-left.svg.js +21 -0
- package/dist/assets/icons/arrow-right.svg.js +21 -0
- package/dist/assets/icons/arrow-up.svg.js +21 -0
- package/dist/assets/icons/audio.svg.js +21 -0
- package/dist/assets/icons/avatar.svg.js +21 -0
- package/dist/assets/icons/back.svg.js +28 -0
- package/dist/assets/icons/bell-filled.svg.js +21 -0
- package/dist/assets/icons/bell.svg.js +35 -0
- package/dist/assets/icons/bicycle.svg.js +15 -0
- package/dist/assets/icons/bottom-left.svg.js +28 -0
- package/dist/assets/icons/bottom-right.svg.js +28 -0
- package/dist/assets/icons/bottom.svg.js +21 -0
- package/dist/assets/icons/burger.svg.js +21 -0
- package/dist/assets/icons/calendar.svg.js +21 -0
- package/dist/assets/icons/camera.svg.js +21 -0
- package/dist/assets/icons/caret-bottom.svg.js +21 -0
- package/dist/assets/icons/caret-left.svg.js +21 -0
- package/dist/assets/icons/caret-right.svg.js +21 -0
- package/dist/assets/icons/caret-top.svg.js +21 -0
- package/dist/assets/icons/cellphone.svg.js +21 -0
- package/dist/assets/icons/chat-dot-round.svg.js +28 -0
- package/dist/assets/icons/chat-dot-square.svg.js +28 -0
- package/dist/assets/icons/chat-line-round.svg.js +28 -0
- package/dist/assets/icons/chat-line-square.svg.js +28 -0
- package/dist/assets/icons/chat-round.svg.js +21 -0
- package/dist/assets/icons/chat-square.svg.js +21 -0
- package/dist/assets/icons/check.svg.js +21 -0
- package/dist/assets/icons/checked.svg.js +21 -0
- package/dist/assets/icons/cherry.svg.js +21 -0
- package/dist/assets/icons/chevron-double-down.svg.js +21 -0
- package/dist/assets/icons/chevron-down.svg.js +21 -0
- package/dist/assets/icons/chrome-filled.svg.js +36 -0
- package/dist/assets/icons/circle-check-filled.svg.js +21 -0
- package/dist/assets/icons/circle-check.svg.js +28 -0
- package/dist/assets/icons/circle-close-filled.svg.js +21 -0
- package/dist/assets/icons/circle-close.svg.js +28 -0
- package/dist/assets/icons/circle-plus-filled.svg.js +21 -0
- package/dist/assets/icons/circle-plus.svg.js +35 -0
- package/dist/assets/icons/clock.svg.js +35 -0
- package/dist/assets/icons/close.svg.js +21 -0
- package/dist/assets/icons/cloudy.svg.js +21 -0
- package/dist/assets/icons/code.svg.js +21 -0
- package/dist/assets/icons/coffee-cup.svg.js +21 -0
- package/dist/assets/icons/coffee.svg.js +21 -0
- package/dist/assets/icons/coin.svg.js +35 -0
- package/dist/assets/icons/collection-tag.svg.js +21 -0
- package/dist/assets/icons/collection.svg.js +28 -0
- package/dist/assets/icons/compass.svg.js +28 -0
- package/dist/assets/icons/connection.svg.js +28 -0
- package/dist/assets/icons/coordinate.svg.js +28 -0
- package/dist/assets/icons/copy-document.svg.js +28 -0
- package/dist/assets/icons/copy.svg.js +21 -0
- package/dist/assets/icons/cpu.svg.js +28 -0
- package/dist/assets/icons/credit-card.svg.js +28 -0
- package/dist/assets/icons/crop.svg.js +28 -0
- package/dist/assets/icons/cross.svg.js +21 -0
- package/dist/assets/icons/delete-filled.svg.js +21 -0
- package/dist/assets/icons/delete.svg.js +21 -0
- package/dist/assets/icons/dessert.svg.js +21 -0
- package/dist/assets/icons/discount.svg.js +28 -0
- package/dist/assets/icons/doc.svg.js +21 -0
- package/dist/assets/icons/document-add.svg.js +21 -0
- package/dist/assets/icons/document-checked.svg.js +21 -0
- package/dist/assets/icons/document-copy.svg.js +21 -0
- package/dist/assets/icons/document-delete.svg.js +21 -0
- package/dist/assets/icons/document-remove.svg.js +21 -0
- package/dist/assets/icons/document.svg.js +21 -0
- package/dist/assets/icons/download.svg.js +21 -0
- package/dist/assets/icons/edit-pen.svg.js +21 -0
- package/dist/assets/icons/edit.svg.js +28 -0
- package/dist/assets/icons/enlarge.svg.js +18 -0
- package/dist/assets/icons/error.svg.js +28 -0
- package/dist/assets/icons/exit-square.svg.js +31 -0
- package/dist/assets/icons/exit.svg.js +28 -0
- package/dist/assets/icons/expand.svg.js +21 -0
- package/dist/assets/icons/eye-blocked.svg.js +28 -0
- package/dist/assets/icons/eye.svg.js +21 -0
- package/dist/assets/icons/failed.svg.js +21 -0
- package/dist/assets/icons/files.svg.js +21 -0
- package/dist/assets/icons/film.svg.js +28 -0
- package/dist/assets/icons/filter.svg.js +21 -0
- package/dist/assets/icons/finished.svg.js +21 -0
- package/dist/assets/icons/flag.svg.js +21 -0
- package/dist/assets/icons/fold.svg.js +21 -0
- package/dist/assets/icons/folder-add.svg.js +21 -0
- package/dist/assets/icons/folder-checked.svg.js +21 -0
- package/dist/assets/icons/folder-delete.svg.js +21 -0
- package/dist/assets/icons/folder-opened.svg.js +21 -0
- package/dist/assets/icons/folder.svg.js +21 -0
- package/dist/assets/icons/food.svg.js +21 -0
- package/dist/assets/icons/fork-spoon.svg.js +21 -0
- package/dist/assets/icons/full-screen.svg.js +21 -0
- package/dist/assets/icons/goblet-full.svg.js +21 -0
- package/dist/assets/icons/gold-medal.svg.js +29 -0
- package/dist/assets/icons/goods-filled.svg.js +21 -0
- package/dist/assets/icons/goods.svg.js +21 -0
- package/dist/assets/icons/google.svg.js +42 -0
- package/dist/assets/icons/grape.svg.js +21 -0
- package/dist/assets/icons/grid.svg.js +21 -0
- package/dist/assets/icons/guide.svg.js +28 -0
- package/dist/assets/icons/handbag.svg.js +22 -0
- package/dist/assets/icons/headset.svg.js +21 -0
- package/dist/assets/icons/histogram.svg.js +21 -0
- package/dist/assets/icons/hot-water.svg.js +21 -0
- package/dist/assets/icons/house.svg.js +21 -0
- package/dist/assets/icons/ice-cream-round.svg.js +21 -0
- package/dist/assets/icons/ice-drink.svg.js +21 -0
- package/dist/assets/icons/image.svg.js +33 -0
- package/dist/assets/icons/info-filled.svg.js +21 -0
- package/dist/assets/icons/info.svg.js +28 -0
- package/dist/assets/icons/key.svg.js +21 -0
- package/dist/assets/icons/knife-fork.svg.js +21 -0
- package/dist/assets/icons/lightning.svg.js +28 -0
- package/dist/assets/icons/link.svg.js +21 -0
- package/dist/assets/icons/list.svg.js +21 -0
- package/dist/assets/icons/loader.svg.js +16 -0
- package/dist/assets/icons/loading.svg.js +32 -0
- package/dist/assets/icons/location-filled.svg.js +21 -0
- package/dist/assets/icons/location-information.svg.js +35 -0
- package/dist/assets/icons/location.svg.js +28 -0
- package/dist/assets/icons/lock.svg.js +28 -0
- package/dist/assets/icons/logo.svg.js +49 -0
- package/dist/assets/icons/lollipop.svg.js +21 -0
- package/dist/assets/icons/magic-stick.svg.js +21 -0
- package/dist/assets/icons/magnet.svg.js +21 -0
- package/dist/assets/icons/male.svg.js +35 -0
- package/dist/assets/icons/management.svg.js +21 -0
- package/dist/assets/icons/map-location.svg.js +28 -0
- package/dist/assets/icons/medal.svg.js +28 -0
- package/dist/assets/icons/memo.svg.js +36 -0
- package/dist/assets/icons/menu.svg.js +21 -0
- package/dist/assets/icons/message-box.svg.js +21 -0
- package/dist/assets/icons/message.svg.js +28 -0
- package/dist/assets/icons/mic.svg.js +21 -0
- package/dist/assets/icons/microphone.svg.js +21 -0
- package/dist/assets/icons/minus-thin.svg.js +25 -0
- package/dist/assets/icons/minus.svg.js +21 -0
- package/dist/assets/icons/money.svg.js +35 -0
- package/dist/assets/icons/monitor.svg.js +21 -0
- package/dist/assets/icons/moon.svg.js +21 -0
- package/dist/assets/icons/more-filled.svg.js +21 -0
- package/dist/assets/icons/more.svg.js +21 -0
- package/dist/assets/icons/mostly-cloudy.svg.js +21 -0
- package/dist/assets/icons/mouse.svg.js +28 -0
- package/dist/assets/icons/mug.svg.js +21 -0
- package/dist/assets/icons/mute-notification.svg.js +28 -0
- package/dist/assets/icons/mute.svg.js +28 -0
- package/dist/assets/icons/no-smoking.svg.js +21 -0
- package/dist/assets/icons/notebook.svg.js +28 -0
- package/dist/assets/icons/notification.svg.js +28 -0
- package/dist/assets/icons/office-building.svg.js +35 -0
- package/dist/assets/icons/operation.svg.js +21 -0
- package/dist/assets/icons/opportunity.svg.js +21 -0
- package/dist/assets/icons/orange.svg.js +21 -0
- package/dist/assets/icons/paperclip.svg.js +21 -0
- package/dist/assets/icons/partly-cloudy.svg.js +28 -0
- package/dist/assets/icons/pause.svg.js +21 -0
- package/dist/assets/icons/pear.svg.js +21 -0
- package/dist/assets/icons/phone-filled.svg.js +21 -0
- package/dist/assets/icons/phone.svg.js +21 -0
- package/dist/assets/icons/picture.svg.js +28 -0
- package/dist/assets/icons/pie-chart.svg.js +28 -0
- package/dist/assets/icons/place.svg.js +35 -0
- package/dist/assets/icons/platform.svg.js +21 -0
- package/dist/assets/icons/play.svg.js +21 -0
- package/dist/assets/icons/plus-thin.svg.js +25 -0
- package/dist/assets/icons/plus.svg.js +21 -0
- package/dist/assets/icons/pointer.svg.js +21 -0
- package/dist/assets/icons/position.svg.js +21 -0
- package/dist/assets/icons/postcard.svg.js +28 -0
- package/dist/assets/icons/pouring.svg.js +21 -0
- package/dist/assets/icons/present.svg.js +42 -0
- package/dist/assets/icons/price-tag.svg.js +28 -0
- package/dist/assets/icons/printer.svg.js +21 -0
- package/dist/assets/icons/promotion.svg.js +21 -0
- package/dist/assets/icons/quartz-watch.svg.js +36 -0
- package/dist/assets/icons/question-filled.svg.js +21 -0
- package/dist/assets/icons/rank.svg.js +21 -0
- package/dist/assets/icons/reading-lamp.svg.js +28 -0
- package/dist/assets/icons/reading.svg.js +28 -0
- package/dist/assets/icons/record.svg.js +21 -0
- package/dist/assets/icons/refresh-left.svg.js +21 -0
- package/dist/assets/icons/refresh-right.svg.js +21 -0
- package/dist/assets/icons/refresh.svg.js +21 -0
- package/dist/assets/icons/refrigerator.svg.js +21 -0
- package/dist/assets/icons/remove-filled.svg.js +21 -0
- package/dist/assets/icons/remove.svg.js +28 -0
- package/dist/assets/icons/right.svg.js +21 -0
- package/dist/assets/icons/rotate-left.svg.js +18 -0
- package/dist/assets/icons/rotate-right.svg.js +18 -0
- package/dist/assets/icons/scale-to-original.svg.js +21 -0
- package/dist/assets/icons/school.svg.js +35 -0
- package/dist/assets/icons/scissor.svg.js +21 -0
- package/dist/assets/icons/search.svg.js +21 -0
- package/dist/assets/icons/select.svg.js +21 -0
- package/dist/assets/icons/sell.svg.js +21 -0
- package/dist/assets/icons/semi-select.svg.js +21 -0
- package/dist/assets/icons/service.svg.js +21 -0
- package/dist/assets/icons/setting.svg.js +21 -0
- package/dist/assets/icons/share.svg.js +21 -0
- package/dist/assets/icons/ship.svg.js +21 -0
- package/dist/assets/icons/shop.svg.js +21 -0
- package/dist/assets/icons/shopping-bag.svg.js +28 -0
- package/dist/assets/icons/shopping-cart-full.svg.js +28 -0
- package/dist/assets/icons/shopping-cart.svg.js +21 -0
- package/dist/assets/icons/shrink.svg.js +18 -0
- package/dist/assets/icons/smoking.svg.js +28 -0
- package/dist/assets/icons/soccer.svg.js +21 -0
- package/dist/assets/icons/sold-out.svg.js +21 -0
- package/dist/assets/icons/sort-down.svg.js +21 -0
- package/dist/assets/icons/sort-up.svg.js +21 -0
- package/dist/assets/icons/sort.svg.js +21 -0
- package/dist/assets/icons/stamp.svg.js +21 -0
- package/dist/assets/icons/star-filled.svg.js +21 -0
- package/dist/assets/icons/star.svg.js +21 -0
- package/dist/assets/icons/stop.svg.js +21 -0
- package/dist/assets/icons/success-filled.svg.js +21 -0
- package/dist/assets/icons/success.svg.js +21 -0
- package/dist/assets/icons/sugar.svg.js +21 -0
- package/dist/assets/icons/sunny.svg.js +21 -0
- package/dist/assets/icons/sunrise.svg.js +21 -0
- package/dist/assets/icons/sunset.svg.js +21 -0
- package/dist/assets/icons/switch-button.svg.js +28 -0
- package/dist/assets/icons/switch-filled.svg.js +29 -0
- package/dist/assets/icons/switch.svg.js +21 -0
- package/dist/assets/icons/takeaway-box.svg.js +21 -0
- package/dist/assets/icons/ticket.svg.js +21 -0
- package/dist/assets/icons/tickets.svg.js +21 -0
- package/dist/assets/icons/time.svg.js +18 -0
- package/dist/assets/icons/timer.svg.js +35 -0
- package/dist/assets/icons/toilet-paper.svg.js +28 -0
- package/dist/assets/icons/tools.svg.js +21 -0
- package/dist/assets/icons/top-left.svg.js +28 -0
- package/dist/assets/icons/top-right.svg.js +28 -0
- package/dist/assets/icons/top.svg.js +21 -0
- package/dist/assets/icons/trend-charts.svg.js +21 -0
- package/dist/assets/icons/triangle-down.svg.js +21 -0
- package/dist/assets/icons/trophy-base.svg.js +22 -0
- package/dist/assets/icons/trophy.svg.js +21 -0
- package/dist/assets/icons/turn-off.svg.js +28 -0
- package/dist/assets/icons/umbrella.svg.js +21 -0
- package/dist/assets/icons/unlock.svg.js +28 -0
- package/dist/assets/icons/upload-filled.svg.js +21 -0
- package/dist/assets/icons/upload.svg.js +21 -0
- package/dist/assets/icons/user-filled.svg.js +21 -0
- package/dist/assets/icons/user.svg.js +21 -0
- package/dist/assets/icons/users.svg.js +28 -0
- package/dist/assets/icons/van.svg.js +21 -0
- package/dist/assets/icons/video-pause.svg.js +21 -0
- package/dist/assets/icons/video-play.svg.js +21 -0
- package/dist/assets/icons/video.svg.js +28 -0
- package/dist/assets/icons/view.svg.js +21 -0
- package/dist/assets/icons/wallet-filled.svg.js +21 -0
- package/dist/assets/icons/wallet.svg.js +35 -0
- package/dist/assets/icons/warn-triangle-filled.svg.js +22 -0
- package/dist/assets/icons/warning.svg.js +28 -0
- package/dist/assets/icons/watch.svg.js +35 -0
- package/dist/assets/icons/wind-power.svg.js +21 -0
- package/dist/assets/icons/zoom-in.svg.js +18 -0
- package/dist/assets/icons/zoom-out.svg.js +18 -0
- package/dist/components/basic/nmorph-button/NmorphButton.css +1 -0
- package/dist/components/basic/nmorph-button/NmorphButton.vue.js +71 -0
- package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +57 -0
- package/dist/components/basic/nmorph-button/types.js +6 -0
- package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -0
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue.js +26 -0
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +31 -0
- package/dist/components/basic/nmorph-icon/types.js +4 -0
- package/dist/components/basic/nmorph-link/NmorphLink.css +1 -0
- package/dist/components/basic/nmorph-link/NmorphLink.vue.js +46 -0
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +30 -0
- package/dist/components/basic/nmorph-link/types.js +4 -0
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +38 -0
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +95 -0
- package/dist/components/basic/nmorph-scroll/types.js +5 -0
- package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -0
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +120 -0
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +74 -0
- package/dist/components/data/nmorph-badge/NmorphBadge.css +1 -0
- package/dist/components/data/nmorph-badge/NmorphBadge.vue.js +69 -0
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +51 -0
- package/dist/components/data/nmorph-calendar/NmorphCalendar.css +1 -0
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +105 -0
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +133 -0
- package/dist/components/data/nmorph-calendar/hooks/use-calendar-texts.js +11 -0
- package/dist/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.css +1 -0
- package/dist/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue.js +73 -0
- package/dist/components/data/nmorph-calendar/inner-components/nmorph-calendar-header/NmorphCalendarHeader.vue2.js +41 -0
- package/dist/components/data/nmorph-calendar/utils.js +83 -0
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -0
- package/dist/components/data/nmorph-card/NmorphCard.vue.js +35 -0
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +24 -0
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue.js +93 -0
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +52 -0
- package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.js +25 -0
- package/dist/components/data/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue2.js +24 -0
- package/dist/components/data/nmorph-collapse/NmorphCollapse.vue.js +20 -0
- package/dist/components/data/nmorph-collapse/NmorphCollapse.vue2.js +40 -0
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.css +1 -0
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.js +63 -0
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +45 -0
- package/dist/components/data/nmorph-image/NmorphImage.vue.js +52 -0
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +36 -0
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.css +1 -0
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +197 -0
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +104 -0
- package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -0
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +96 -0
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +73 -0
- package/dist/components/data/nmorph-progress/NmorphProgress.css +1 -0
- package/dist/components/data/nmorph-progress/NmorphProgress.vue.js +89 -0
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +31 -0
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.css +1 -0
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue.js +61 -0
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +26 -0
- package/dist/components/data/nmorph-skeleton/components/NmorphSkeletonItem.css +1 -0
- package/dist/components/data/nmorph-skeleton/components/NmorphSkeletonItem.vue.js +36 -0
- package/dist/components/data/nmorph-skeleton/components/NmorphSkeletonItem.vue2.js +30 -0
- package/dist/components/data/nmorph-skeleton/types.js +4 -0
- package/dist/components/data/nmorph-table/NmorphTable.css +1 -0
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +176 -0
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +52 -0
- package/dist/components/data/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue.js +23 -0
- package/dist/components/data/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue2.js +26 -0
- package/dist/components/data/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue.js +19 -0
- package/dist/components/data/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue2.js +31 -0
- package/dist/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.css +1 -0
- package/dist/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.vue.js +53 -0
- package/dist/components/data/nmorph-table/inner-components/nmorph-sort-button/NmorphSortButton.vue2.js +34 -0
- package/dist/components/data/nmorph-tag-list/NmorphTagList.vue.js +35 -0
- package/dist/components/data/nmorph-tag-list/NmorphTagList.vue2.js +32 -0
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.css +1 -0
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js +42 -0
- package/dist/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue2.js +36 -0
- package/dist/components/feedback/nmorph-alert/NmorphAlert.css +1 -0
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue.js +85 -0
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +49 -0
- package/dist/components/feedback/nmorph-alert/types.js +4 -0
- package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -0
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +36 -0
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +18 -0
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -0
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +60 -0
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +66 -0
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.css +1 -0
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue.js +111 -0
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +37 -0
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -0
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +97 -0
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +65 -0
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -0
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue.js +96 -0
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +55 -0
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.css +1 -0
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.js +42 -0
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +46 -0
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.css +1 -0
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue.js +61 -0
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +66 -0
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.css +1 -0
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue.js +88 -0
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +70 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-clear-button/NmorphClearButton.vue.js +28 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-clear-button/NmorphClearButton.vue2.js +24 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +56 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +52 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.css +1 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.vue.js +114 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-header/NmorphDatePickerHeader.vue2.js +38 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.css +1 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +74 -0
- package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +74 -0
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -0
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +104 -0
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +78 -0
- package/dist/components/form/nmorph-file-upload/types.js +16 -0
- package/dist/components/form/nmorph-form/NmorphForm.vue.js +23 -0
- package/dist/components/form/nmorph-form/NmorphForm.vue2.js +23 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.css +1 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.js +39 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +45 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.css +1 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.js +46 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +28 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.css +1 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.vue.js +34 -0
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-validation-icon/NmorphValidationIcon.vue2.js +27 -0
- package/dist/components/form/nmorph-form/use-form-item-input.js +15 -0
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.css +1 -0
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue.js +140 -0
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +79 -0
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.css +1 -0
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +71 -0
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +139 -0
- package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -0
- package/dist/components/form/nmorph-radio/NmorphRadio.vue.js +94 -0
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +38 -0
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.css +1 -0
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue.js +42 -0
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +41 -0
- package/dist/components/form/nmorph-select/NmorphSelect.css +1 -0
- package/dist/components/form/nmorph-select/NmorphSelect.vue.js +157 -0
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +128 -0
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.css +1 -0
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.js +38 -0
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +43 -0
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.css +1 -0
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue.js +43 -0
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +44 -0
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.css +1 -0
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js +32 -0
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +35 -0
- package/dist/components/form/nmorph-slider/NmorphSlider.css +1 -0
- package/dist/components/form/nmorph-slider/NmorphSlider.vue.js +73 -0
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +83 -0
- package/dist/components/form/nmorph-switch/NmorphSwitch.css +1 -0
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +63 -0
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +57 -0
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +67 -0
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +63 -0
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.css +1 -0
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +56 -0
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +50 -0
- package/dist/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.css +1 -0
- package/dist/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.vue.js +48 -0
- package/dist/components/navigation/nmorph-breadcrumb/NmorphBreadcrumb.vue2.js +24 -0
- package/dist/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue.js +36 -0
- package/dist/components/navigation/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue2.js +26 -0
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.css +1 -0
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +49 -0
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +42 -0
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.css +1 -0
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue.js +73 -0
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +39 -0
- package/dist/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.js +30 -0
- package/dist/components/navigation/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue2.js +32 -0
- package/dist/components/navigation/nmorph-tabs/utils.js +11 -0
- package/dist/components/others/nmorph-divider/NmorphDivider.css +1 -0
- package/dist/components/others/nmorph-divider/NmorphDivider.vue.js +20 -0
- package/dist/components/others/nmorph-divider/NmorphDivider.vue2.js +21 -0
- package/dist/components/others/nmorph-overlay/NmorphOverlay.css +1 -0
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +30 -0
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +30 -0
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.css +1 -0
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +56 -0
- package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue2.js +55 -0
- package/dist/components/providers/nmorph-notification-provider/types.js +4 -0
- package/dist/hooks/use-common-styles.js +538 -0
- package/dist/hooks/use-field-validation.js +74 -0
- package/dist/hooks/use-form-validation.js +30 -0
- package/dist/hooks/use-nmorph-translation.js +15 -0
- package/dist/hooks/use-placement.js +57 -0
- package/dist/hooks/use-z-index.js +14 -0
- package/dist/index.es.js +710 -12297
- package/dist/index.umd.js +27 -28
- package/dist/locales/en.js +29 -0
- package/dist/locales/ru.js +29 -0
- package/dist/locales/zh.js +29 -0
- package/dist/nuxt.mjs +40 -8
- package/dist/outside-hooks/use-nmorph-browser.js +21 -0
- package/dist/outside-hooks/use-nmorph-notification.js +29 -0
- package/dist/outside-hooks/use-nmorph-theme.js +147 -0
- package/dist/outside-hooks/use-nmorph-z-index.js +8 -0
- package/dist/outside-hooks/use-nmorph.js +9 -0
- package/dist/outside-utils/index.js +23 -0
- package/dist/package.json.js +7 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +48 -0
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -3
- package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +14 -2
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
- package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -0
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +4 -3
- package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +1 -0
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -3
- package/dist/src/main.d.ts +1 -8
- package/dist/src/nuxt/module.d.ts +3 -1
- package/dist/src/plugin.d.ts +8 -0
- package/dist/src/types/index.d.ts +9 -2
- package/dist/style.css +1 -1
- package/dist/types/index.js +20 -0
- package/dist/utils/case-transformers.js +4 -0
- package/dist/utils/common.js +8 -0
- package/dist/utils/create-modifiers.js +8 -0
- package/dist/utils/theme-style.js +71 -0
- package/package.json +11 -3
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import './NmorphOTPInput.css';
|
|
2
|
+
import { defineComponent as Y, ref as b, computed as i, watch as z, nextTick as D } from "vue";
|
|
3
|
+
import { useModifiers as ee } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { NmorphComponentHeight as te } from "../../../types/index.js";
|
|
5
|
+
import { useFormItemInput as ae } from "../nmorph-form/use-form-item-input.js";
|
|
6
|
+
import le from "../nmorph-text-input/NmorphTextInput.vue.js";
|
|
7
|
+
const ce = /* @__PURE__ */ Y({
|
|
8
|
+
__name: "NmorphOTPInput",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: String, required: !1, default: "" },
|
|
11
|
+
length: { type: Number, required: !1, default: 6 },
|
|
12
|
+
mode: { type: String, required: !1, default: "numeric" },
|
|
13
|
+
autofocus: { type: Boolean, required: !1, default: !1 },
|
|
14
|
+
autocapitalize: { type: String, required: !1, default: "none" },
|
|
15
|
+
id: { type: String, required: !1 },
|
|
16
|
+
name: { type: String, required: !1 },
|
|
17
|
+
autocomplete: { type: String, required: !1 },
|
|
18
|
+
height: { type: null, required: !1, default: "basic" },
|
|
19
|
+
disabled: { type: Boolean, required: !1, default: !1 },
|
|
20
|
+
tabindex: { type: Number, required: !1 }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:model-value", "focus", "blur", "complete"],
|
|
23
|
+
setup(F, { expose: O, emit: I }) {
|
|
24
|
+
const a = F, d = I, { id: V, name: R, autocomplete: q, tabindex: p } = ae(a), s = b([]), n = b([]), c = b(!1), r = b([]), u = i(() => Math.max(1, a.length)), v = (e = "") => {
|
|
25
|
+
const t = `${e ?? ""}`;
|
|
26
|
+
return a.mode === "numeric" ? Array.from(t.replace(/\D/g, "")) : a.mode === "alphanumeric" ? Array.from(t.replace(/[^a-zA-Z0-9]/g, "")) : Array.from(t);
|
|
27
|
+
}, A = (e = a.modelValue) => {
|
|
28
|
+
const t = v(e).slice(0, u.value);
|
|
29
|
+
return Array.from({ length: u.value }, (l, m) => t[m] || "");
|
|
30
|
+
}, h = (e, t = !1) => {
|
|
31
|
+
if (r.value = Array.from({ length: u.value }, (m, y) => e[y] || ""), !t) return;
|
|
32
|
+
const l = r.value.join("");
|
|
33
|
+
d("update:model-value", l), r.value.includes("") || d("complete", l);
|
|
34
|
+
};
|
|
35
|
+
z(
|
|
36
|
+
[() => a.modelValue, () => a.mode, u],
|
|
37
|
+
() => {
|
|
38
|
+
const e = A(a.modelValue);
|
|
39
|
+
(e.join("") !== r.value.join("") || e.length !== r.value.length) && h(e);
|
|
40
|
+
},
|
|
41
|
+
{ immediate: !0 }
|
|
42
|
+
);
|
|
43
|
+
const j = i(
|
|
44
|
+
() => ee({
|
|
45
|
+
nmorph: [te[a.height], `${c.value && "focused"}`],
|
|
46
|
+
"nmorph-otp-input": [`${a.disabled && "disabled"}`]
|
|
47
|
+
})
|
|
48
|
+
), N = i(
|
|
49
|
+
() => Array.from({ length: u.value }, (e, t) => t === 0 ? V.value : `${V.value}-${t + 1}`)
|
|
50
|
+
), T = i(() => a.mode === "numeric" ? "numeric" : "text"), $ = i(() => q.value || "one-time-code"), w = i(() => {
|
|
51
|
+
if (a.mode === "numeric") return "[0-9]*";
|
|
52
|
+
if (a.mode === "alphanumeric") return "[A-Za-z0-9]*";
|
|
53
|
+
}), g = (e) => {
|
|
54
|
+
n.value[e] = s.value[e]?.inputDOMRef ?? null;
|
|
55
|
+
}, x = (e, t) => {
|
|
56
|
+
s.value[t] = e, D(() => {
|
|
57
|
+
g(t);
|
|
58
|
+
});
|
|
59
|
+
}, _ = (e) => {
|
|
60
|
+
g(e), s.value[e]?.select?.(), n.value[e]?.select();
|
|
61
|
+
}, o = (e = 0) => {
|
|
62
|
+
D(() => {
|
|
63
|
+
const t = Math.min(Math.max(e, 0), u.value - 1);
|
|
64
|
+
g(t), s.value[t]?.focus?.(), n.value[t]?.focus(), _(t);
|
|
65
|
+
});
|
|
66
|
+
}, M = () => {
|
|
67
|
+
s.value.forEach((e, t) => {
|
|
68
|
+
e?.blur?.(), n.value[t]?.blur();
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
O({
|
|
72
|
+
inputDOMRefs: n,
|
|
73
|
+
focus: o,
|
|
74
|
+
blur: M
|
|
75
|
+
});
|
|
76
|
+
const f = (e, t = "") => {
|
|
77
|
+
const l = [...r.value];
|
|
78
|
+
l[e] = t, h(l, !0);
|
|
79
|
+
}, H = (e, t) => {
|
|
80
|
+
const l = v(e).slice(0, u.value - t);
|
|
81
|
+
if (!l.length) {
|
|
82
|
+
f(t, "");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const m = [...r.value];
|
|
86
|
+
l.forEach((W, X) => {
|
|
87
|
+
m[t + X] = W;
|
|
88
|
+
}), h(m, !0);
|
|
89
|
+
const y = t + l.length;
|
|
90
|
+
y < u.value ? o(y) : o(u.value - 1);
|
|
91
|
+
}, E = (e, t) => {
|
|
92
|
+
H(e, t);
|
|
93
|
+
}, S = (e) => {
|
|
94
|
+
if (r.value[e]) {
|
|
95
|
+
f(e);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
e > 0 && (f(e - 1), o(e - 1));
|
|
99
|
+
}, B = (e, t) => {
|
|
100
|
+
if (e.key === "Backspace") {
|
|
101
|
+
S(t);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
f(t);
|
|
105
|
+
}, C = (e) => {
|
|
106
|
+
o(e - 1);
|
|
107
|
+
}, P = (e) => {
|
|
108
|
+
o(e + 1);
|
|
109
|
+
}, L = () => {
|
|
110
|
+
o(0);
|
|
111
|
+
}, Z = () => {
|
|
112
|
+
o(u.value - 1);
|
|
113
|
+
}, K = (e) => {
|
|
114
|
+
e.key.length === 1 && !v(e.key).length && e.preventDefault();
|
|
115
|
+
}, G = (e, t) => {
|
|
116
|
+
const l = e.clipboardData?.getData("text") || "";
|
|
117
|
+
H(l, t);
|
|
118
|
+
}, J = (e) => {
|
|
119
|
+
c.value || (c.value = !0, d("focus")), _(e);
|
|
120
|
+
}, Q = () => {
|
|
121
|
+
setTimeout(() => {
|
|
122
|
+
const e = document.activeElement;
|
|
123
|
+
!n.value.some((l) => l === e) && c.value && (c.value = !1, d("blur"));
|
|
124
|
+
});
|
|
125
|
+
}, U = (e) => p.value > 0 ? p.value + e : p.value;
|
|
126
|
+
z(
|
|
127
|
+
() => a.autofocus,
|
|
128
|
+
(e) => {
|
|
129
|
+
e && !a.disabled && o(0);
|
|
130
|
+
},
|
|
131
|
+
{ immediate: !0 }
|
|
132
|
+
);
|
|
133
|
+
const k = { props: a, emit: d, id: V, name: R, autocomplete: q, tabindex: p, inputRefs: s, inputDOMRefs: n, focused: c, otpValue: r, normalizedLength: u, sanitizeValue: v, normalizeOtpValue: A, syncOtpValue: h, modifiers: j, fieldIds: N, inputMode: T, resolvedAutocomplete: $, inputPattern: w, syncInputDOMRef: g, setInputRef: x, selectField: _, focusField: o, blurFields: M, updateCharAt: f, insertValue: H, inputHandler: E, backspaceHandler: S, deleteKeyHandler: B, arrowLeftHandler: C, arrowRightHandler: P, homeHandler: L, endHandler: Z, keydownHandler: K, pasteHandler: G, focusHandler: J, blurHandler: Q, getFieldTabindex: U, NmorphTextInput: le };
|
|
134
|
+
return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
export {
|
|
138
|
+
ce as default
|
|
139
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-radio{--size: var(--height);display:inline-flex;align-items:center;cursor:pointer}.nmorph-radio .nmorph-radio__content{position:relative;display:flex;align-items:center;justify-content:center}.nmorph-radio span{margin-top:2px}.nmorph-radio .nmorph-radio__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-radio input{position:absolute;top:0;left:0;width:100%;height:100%}.nmorph-radio input:focus-visible{background:var(--nmorph-main-color);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-radio .nmorph-radio__fake{border-radius:var(--border-radius-circular);width:100%;height:100%;position:absolute;top:0;left:0;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-radio .nmorph-radio__fake span,.nmorph-radio .nmorph-radio__label{font-weight:400;font-size:var(--font-size-small);line-height:var(--line-height-regular)}.nmorph-radio .nmorph-radio__fake-checked{width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-circular);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.nmorph-radio .nmorph-radio__label{margin-left:var(--indentation-02)}.nmorph-radio.nmorph-radio--button .nmorph-radio__fake{position:relative;display:flex;align-items:center;justify-content:center;height:var(--size);padding:var(--indentation-03);white-space:nowrap;border-radius:var(--default-border-radius);background:var(--nmorph-main-color);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-radio.nmorph--extra-thin-component .nmorph-radio__fake span,.nmorph-radio.nmorph--extra-thin-component .nmorph-radio__label{font-size:var(--font-size-extra-small);line-height:var(--line-height-line)}.nmorph-radio.nmorph--extra-thin-component.nmorph-radio--button .nmorph-radio__fake{padding:var(--indentation-02)}.nmorph-radio.nmorph-radio--checked .nmorph-radio__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-radio.nmorph-radio--disabled{cursor:not-allowed;opacity:.6}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import './NmorphRadio.css';
|
|
2
|
+
import t from "./NmorphRadio.vue2.js";
|
|
3
|
+
import { openBlock as o, createElementBlock as a, withModifiers as p, normalizeClass as c, createElementVNode as r, createCommentVNode as i, toDisplayString as d, renderSlot as l } from "vue";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const m = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "nmorph-radio__content"
|
|
9
|
+
}, h = { class: "nmorph-radio__input-wrapper" }, f = ["name", "value", "checked", "tabindex"], k = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "nmorph-radio__fake-checked"
|
|
12
|
+
}, b = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "nmorph-radio__label"
|
|
15
|
+
}, v = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "nmorph-radio__content"
|
|
18
|
+
}, y = ["disabled", "name", "value", "checked", "tabindex"], u = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "nmorph-radio__fake"
|
|
21
|
+
}, x = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "nmorph-radio__fake"
|
|
24
|
+
};
|
|
25
|
+
function N(n, s, R, e, C, D) {
|
|
26
|
+
return o(), a(
|
|
27
|
+
"label",
|
|
28
|
+
{
|
|
29
|
+
class: c(e.modifiers),
|
|
30
|
+
onClick: p(e.changeHandler, ["prevent"])
|
|
31
|
+
},
|
|
32
|
+
[
|
|
33
|
+
e.props.styleType === "radio-style" ? (o(), a("div", m, [
|
|
34
|
+
r("div", h, [
|
|
35
|
+
r("input", {
|
|
36
|
+
ref: "inputDOMRef",
|
|
37
|
+
type: "radio",
|
|
38
|
+
name: e.props.label,
|
|
39
|
+
value: e.props.value,
|
|
40
|
+
checked: e.checked,
|
|
41
|
+
tabindex: e.props.tabindex,
|
|
42
|
+
class: "nmorph-native-input"
|
|
43
|
+
}, null, 8, f),
|
|
44
|
+
s[0] || (s[0] = r(
|
|
45
|
+
"div",
|
|
46
|
+
{ class: "nmorph-radio__fake" },
|
|
47
|
+
null,
|
|
48
|
+
-1
|
|
49
|
+
/* HOISTED */
|
|
50
|
+
)),
|
|
51
|
+
e.checked ? (o(), a("div", k)) : i("v-if", !0)
|
|
52
|
+
]),
|
|
53
|
+
e.props.label ? (o(), a(
|
|
54
|
+
"span",
|
|
55
|
+
b,
|
|
56
|
+
d(e.props.label),
|
|
57
|
+
1
|
|
58
|
+
/* TEXT */
|
|
59
|
+
)) : l(n.$slots, "label", { key: 1 })
|
|
60
|
+
])) : i("v-if", !0),
|
|
61
|
+
e.props.styleType === "button" ? (o(), a("div", v, [
|
|
62
|
+
r("input", {
|
|
63
|
+
ref: "inputDOMRef",
|
|
64
|
+
type: "radio",
|
|
65
|
+
disabled: e.props.disabled,
|
|
66
|
+
name: e.props.label,
|
|
67
|
+
value: e.props.value,
|
|
68
|
+
checked: e.checked,
|
|
69
|
+
tabindex: e.props.tabindex,
|
|
70
|
+
class: "nmorph-native-input"
|
|
71
|
+
}, null, 8, y),
|
|
72
|
+
e.props.label ? (o(), a("div", u, [
|
|
73
|
+
r(
|
|
74
|
+
"span",
|
|
75
|
+
null,
|
|
76
|
+
d(e.props.label),
|
|
77
|
+
1
|
|
78
|
+
/* TEXT */
|
|
79
|
+
)
|
|
80
|
+
])) : (o(), a("div", x, [
|
|
81
|
+
l(n.$slots, "label", {}, () => [
|
|
82
|
+
l(n.$slots, "default")
|
|
83
|
+
])
|
|
84
|
+
]))
|
|
85
|
+
])) : i("v-if", !0)
|
|
86
|
+
],
|
|
87
|
+
2
|
|
88
|
+
/* CLASS */
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const E = /* @__PURE__ */ _(t, [["render", N], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-radio/NmorphRadio.vue"]]);
|
|
92
|
+
export {
|
|
93
|
+
E as default
|
|
94
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import './NmorphRadio.css';
|
|
2
|
+
import { defineComponent as h, inject as r, computed as l, ref as m } from "vue";
|
|
3
|
+
import { useModifiers as g } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { NmorphSelectionControlHeight as v } from "../../../types/index.js";
|
|
5
|
+
const q = /* @__PURE__ */ h({
|
|
6
|
+
__name: "NmorphRadio",
|
|
7
|
+
props: {
|
|
8
|
+
value: { type: String, required: !1, default: "" },
|
|
9
|
+
styleType: { type: null, required: !1, default: "button" },
|
|
10
|
+
checked: { type: Boolean, required: !1, default: !1 },
|
|
11
|
+
disabled: { type: Boolean, required: !1, default: !1 },
|
|
12
|
+
label: { type: String, required: !1, default: "" },
|
|
13
|
+
tabindex: { type: Number, required: !1, default: 0 },
|
|
14
|
+
height: { type: null, required: !1 }
|
|
15
|
+
},
|
|
16
|
+
setup(s, { expose: p }) {
|
|
17
|
+
const o = r(
|
|
18
|
+
"radio-group-selected-value",
|
|
19
|
+
void 0
|
|
20
|
+
), t = r(
|
|
21
|
+
"change-radio-button-value-handler",
|
|
22
|
+
void 0
|
|
23
|
+
), a = r("radio-group-height", void 0), e = s, c = () => {
|
|
24
|
+
t && !e.disabled && t(e.value);
|
|
25
|
+
}, d = l(() => o?.value === e.value || e.checked), i = l(() => e.height || a?.value || "thin"), f = l(
|
|
26
|
+
() => g({
|
|
27
|
+
nmorph: [v[i.value]],
|
|
28
|
+
"nmorph-radio": [`${e.disabled && "disabled"}`, `${d.value && "checked"}`, e.styleType]
|
|
29
|
+
})
|
|
30
|
+
), u = m(null);
|
|
31
|
+
p({ inputDOMRef: u });
|
|
32
|
+
const n = { groupSelectedValue: o, changeValue: t, groupHeight: a, props: e, changeHandler: c, checked: d, height: i, modifiers: f, inputDOMRef: u };
|
|
33
|
+
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
q as default
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-radio-group{display:inline-block}.nmorph-radio-group .nmorph-radio-group__wrapper{display:flex;align-items:center}.nmorph-radio-group .nmorph-radio-group__content{display:flex;flex-flow:row wrap;width:100%}.nmorph-radio-group .nmorph-radio:not(:last-child){margin-right:var(--indentation-03)}.nmorph-radio-group.nmorph-radio-group--column .nmorph-radio-group__content{flex-direction:column;align-items:flex-start}.nmorph-radio-group.nmorph-radio-group--column .nmorph-radio:not(:last-child){margin-right:var(--indentation-00);margin-bottom:var(--indentation-03)}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import './NmorphRadioGroup.css';
|
|
2
|
+
import i from "./NmorphRadioGroup.vue2.js";
|
|
3
|
+
import { openBlock as o, createElementBlock as a, normalizeClass as s, createElementVNode as l, Fragment as n, renderList as p, createBlock as m, renderSlot as c } from "vue";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import h from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const _ = { class: "nmorph-radio-group__wrapper" }, u = { class: "nmorph-radio-group__content" };
|
|
7
|
+
function b(t, f, d, r, g, v) {
|
|
8
|
+
return o(), a(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
class: s(r.modifiers)
|
|
12
|
+
},
|
|
13
|
+
[
|
|
14
|
+
l("div", _, [
|
|
15
|
+
l("div", u, [
|
|
16
|
+
(o(!0), a(
|
|
17
|
+
n,
|
|
18
|
+
null,
|
|
19
|
+
p(d.options, (e) => (o(), m(r.NmorphRadio, {
|
|
20
|
+
key: e.value,
|
|
21
|
+
label: e.label,
|
|
22
|
+
value: e.value,
|
|
23
|
+
disabled: e.disabled || r.props.disabled,
|
|
24
|
+
"style-type": r.props.styleType,
|
|
25
|
+
tabindex: e.tabindex,
|
|
26
|
+
height: e.height || r.props.height
|
|
27
|
+
}, null, 8, ["label", "value", "disabled", "style-type", "tabindex", "height"]))),
|
|
28
|
+
128
|
|
29
|
+
/* KEYED_FRAGMENT */
|
|
30
|
+
)),
|
|
31
|
+
c(t.$slots, "default")
|
|
32
|
+
])
|
|
33
|
+
])
|
|
34
|
+
],
|
|
35
|
+
2
|
|
36
|
+
/* CLASS */
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
const B = /* @__PURE__ */ h(i, [["render", b], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue"]]);
|
|
40
|
+
export {
|
|
41
|
+
B as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import './NmorphRadioGroup.css';
|
|
2
|
+
import { defineComponent as m, ref as c, watch as h, computed as d, provide as o } from "vue";
|
|
3
|
+
import { useModifiers as y } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import g from "../nmorph-radio/NmorphRadio.vue.js";
|
|
5
|
+
const b = /* @__PURE__ */ m({
|
|
6
|
+
__name: "NmorphRadioGroup",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { type: String, required: !0, default: "" },
|
|
9
|
+
options: { type: Array, required: !1, default: () => [] },
|
|
10
|
+
styleType: { type: null, required: !1, default: "button" },
|
|
11
|
+
direction: { type: null, required: !1, default: "row" },
|
|
12
|
+
height: { type: null, required: !1, default: "thin" },
|
|
13
|
+
id: { type: String, required: !1 },
|
|
14
|
+
name: { type: String, required: !1 },
|
|
15
|
+
autocomplete: { type: String, required: !1 },
|
|
16
|
+
disabled: { type: Boolean, required: !1, default: !1 },
|
|
17
|
+
tabindex: { type: Number, required: !1 }
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:model-value"],
|
|
20
|
+
setup(n, { expose: p, emit: s }) {
|
|
21
|
+
p();
|
|
22
|
+
const e = n, t = c(e.modelValue);
|
|
23
|
+
h(
|
|
24
|
+
() => e.modelValue,
|
|
25
|
+
(r) => {
|
|
26
|
+
t.value = r;
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const a = s, i = (r) => {
|
|
30
|
+
t.value = r, a("update:model-value", t.value);
|
|
31
|
+
}, f = d(() => y({ "nmorph-radio-group": [e.styleType, e.direction] })), u = d(() => e.height);
|
|
32
|
+
o("radio-group-selected-value", t), o("change-radio-button-value-handler", i), o("radio-group-height", u);
|
|
33
|
+
const l = { props: e, initialValue: t, emit: a, changeHandler: i, modifiers: f, height: u, get NmorphRadio() {
|
|
34
|
+
return g;
|
|
35
|
+
} };
|
|
36
|
+
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
b as default
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-select{--base-width: 200px;width:var(--base-width);height:var(--height);cursor:pointer}.nmorph-select .nmorph-select__content{position:relative;height:100%;background:var(--nmorph-main-color);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-select .nmorph-select__selected-values-line{display:flex;align-items:center;justify-content:space-between;height:100%;padding:var(--indentation-00) var(--default-indentation-input);border-radius:var(--default-border-radius)}.nmorph-select .nmorph-select__selected-value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-select select,.nmorph-select option{opacity:0;width:0;height:0;border:none;padding:0;position:absolute}.nmorph-select.nmorph-select--loading .nmorph-select__options{display:flex;justify-content:center;padding:16px}.nmorph-select.nmorph-select--disabled{cursor:not-allowed;opacity:.6}.nmorph-select.nmorph-select--fill{width:100%}.nmorph-select.nmorph-select--options-auto-width .nmorph-select__options{width:max-content;max-width:calc(100vw - var(--indentation-02) * 2)}.nmorph-select.nmorph-select--open .nmorph-select__chevron{transform:rotate(180deg)}.nmorph-select.nmorph-select--open .nmorph-select__content{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-select.nmorph-select--selected-line-outset .nmorph-select__content{background:var(--nmorph-main-color);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-select.nmorph-select--focus{outline:2px solid var(--nmorph-accent-color)}.nmorph-select.nmorph-select--focus .nmorph-select__content{box-shadow:none}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import './NmorphSelect.css';
|
|
2
|
+
import p from "./NmorphSelect.vue2.js";
|
|
3
|
+
import { openBlock as o, createElementBlock as r, normalizeClass as v, createElementVNode as i, withKeys as t, Fragment as a, renderList as d, withModifiers as w, toDisplayString as h, createBlock as l, mergeProps as m, createVNode as s, withCtx as c, renderSlot as k, createCommentVNode as g } from "vue";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import y from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const N = { class: "nmorph-select__content" }, b = ["id", "name", "autocomplete", "tabindex", "disabled"], x = ["value"], O = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "nmorph-select__selected-value"
|
|
9
|
+
}, D = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "nmorph-select__selected-value"
|
|
12
|
+
}, H = {
|
|
13
|
+
key: 2,
|
|
14
|
+
class: "nmorph-select__selected-value"
|
|
15
|
+
}, u = {
|
|
16
|
+
ref: "optionsDOMRef",
|
|
17
|
+
class: "nmorph-select__options"
|
|
18
|
+
};
|
|
19
|
+
function C(_, I, f, e, S, M) {
|
|
20
|
+
return o(), r(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
class: v(e.modifiers)
|
|
24
|
+
},
|
|
25
|
+
[
|
|
26
|
+
i("div", N, [
|
|
27
|
+
i("select", {
|
|
28
|
+
id: e.id,
|
|
29
|
+
name: e.name,
|
|
30
|
+
autocomplete: e.autocomplete,
|
|
31
|
+
tabindex: e.tabindex,
|
|
32
|
+
disabled: e.disabledInput,
|
|
33
|
+
onFocus: e.focusHandler,
|
|
34
|
+
onBlur: e.blurHandler,
|
|
35
|
+
onKeydown: [
|
|
36
|
+
t(e.spaceHandler, ["space"]),
|
|
37
|
+
t(e.arrowDownHandler, ["arrow-down"]),
|
|
38
|
+
t(e.arrowUpHandler, ["arrow-up"]),
|
|
39
|
+
t(e.enterHandler, ["enter"])
|
|
40
|
+
]
|
|
41
|
+
}, [
|
|
42
|
+
(o(!0), r(
|
|
43
|
+
a,
|
|
44
|
+
null,
|
|
45
|
+
d(e.domOptions, (n) => (o(), r("option", {
|
|
46
|
+
key: n,
|
|
47
|
+
value: n
|
|
48
|
+
}, null, 8, x))),
|
|
49
|
+
128
|
|
50
|
+
/* KEYED_FRAGMENT */
|
|
51
|
+
))
|
|
52
|
+
], 40, b),
|
|
53
|
+
i(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
ref: "nmorphSelectDOMRef",
|
|
57
|
+
class: "nmorph-select__selected-values-line",
|
|
58
|
+
onClick: w(e.clickHandler, ["stop"])
|
|
59
|
+
},
|
|
60
|
+
[
|
|
61
|
+
typeof e.initialValue == "string" ? (o(), r(
|
|
62
|
+
"div",
|
|
63
|
+
O,
|
|
64
|
+
h(e.selectedValueTitle),
|
|
65
|
+
1
|
|
66
|
+
/* TEXT */
|
|
67
|
+
)) : e.initialValue.length === 0 ? (o(), r(
|
|
68
|
+
"div",
|
|
69
|
+
D,
|
|
70
|
+
h(e.computedNoElementPlaceholder),
|
|
71
|
+
1
|
|
72
|
+
/* TEXT */
|
|
73
|
+
)) : (o(), r("div", H, [
|
|
74
|
+
(o(!0), r(
|
|
75
|
+
a,
|
|
76
|
+
null,
|
|
77
|
+
d(e.tags, (n) => (o(), l(e.NmorphTagItem, m({
|
|
78
|
+
key: n.value,
|
|
79
|
+
ref_for: !0
|
|
80
|
+
}, n, {
|
|
81
|
+
transparent: "",
|
|
82
|
+
removable: e.tags.length > 1 || !e.props.valueRequired,
|
|
83
|
+
height: "thin",
|
|
84
|
+
onClose: e.changeHandler
|
|
85
|
+
}), null, 16, ["removable"]))),
|
|
86
|
+
128
|
|
87
|
+
/* KEYED_FRAGMENT */
|
|
88
|
+
))
|
|
89
|
+
])),
|
|
90
|
+
s(e.NmorphIcon, { class: "nmorph-select__chevron" }, {
|
|
91
|
+
default: c(() => [
|
|
92
|
+
e.props.loading ? (o(), l(e.NmorphIconLoader, { key: 0 })) : (o(), l(e.NmorphIconChevronDown, { key: 1 }))
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
/* STABLE */
|
|
96
|
+
})
|
|
97
|
+
],
|
|
98
|
+
512
|
|
99
|
+
/* NEED_PATCH */
|
|
100
|
+
)
|
|
101
|
+
]),
|
|
102
|
+
e.nmorphSelectDOMRef && !e.props.disabled ? (o(), l(e.NmorphDropdown, {
|
|
103
|
+
key: 0,
|
|
104
|
+
open: e.open && !e.props.loading,
|
|
105
|
+
"relative-element": e.nmorphSelectDOMRef,
|
|
106
|
+
"fill-width": !e.autoOptionsWidth,
|
|
107
|
+
width: e.autoOptionsWidth ? "max-content" : void 0,
|
|
108
|
+
"min-width": e.optionsMinWidth,
|
|
109
|
+
"max-width": "calc(100vw - 16px)",
|
|
110
|
+
"z-index": e.props.zIndex,
|
|
111
|
+
onOnOutsideClick: e.closeHandler
|
|
112
|
+
}, {
|
|
113
|
+
default: c(() => [
|
|
114
|
+
i(
|
|
115
|
+
"div",
|
|
116
|
+
u,
|
|
117
|
+
[
|
|
118
|
+
e.props.loading ? (o(), l(e.NmorphIcon, {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "nmorph-select__chevron",
|
|
121
|
+
size: "medium"
|
|
122
|
+
}, {
|
|
123
|
+
default: c(() => [
|
|
124
|
+
s(e.NmorphIconChevronDown)
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
/* STABLE */
|
|
128
|
+
})) : (o(!0), r(
|
|
129
|
+
a,
|
|
130
|
+
{ key: 1 },
|
|
131
|
+
d(f.options, (n) => (o(), l(e.NmorphSelectOption, m({
|
|
132
|
+
key: n.value,
|
|
133
|
+
ref_for: !0
|
|
134
|
+
}, n, {
|
|
135
|
+
height: e.props.height
|
|
136
|
+
}), null, 16, ["height"]))),
|
|
137
|
+
128
|
|
138
|
+
/* KEYED_FRAGMENT */
|
|
139
|
+
)),
|
|
140
|
+
k(_.$slots, "default")
|
|
141
|
+
],
|
|
142
|
+
512
|
|
143
|
+
/* NEED_PATCH */
|
|
144
|
+
)
|
|
145
|
+
]),
|
|
146
|
+
_: 3
|
|
147
|
+
/* FORWARDED */
|
|
148
|
+
}, 8, ["open", "relative-element", "fill-width", "width", "min-width", "z-index"])) : g("v-if", !0)
|
|
149
|
+
],
|
|
150
|
+
2
|
|
151
|
+
/* CLASS */
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
const E = /* @__PURE__ */ y(p, [["render", C], ["__file", "/builds/ketjo/nmorph/library/src/components/form/nmorph-select/NmorphSelect.vue"]]);
|
|
155
|
+
export {
|
|
156
|
+
E as default
|
|
157
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import './NmorphSelect.css';
|
|
2
|
+
import { defineComponent as U, computed as n, ref as o, watch as N, onMounted as F, nextTick as j, onUnmounted as z, provide as E } from "vue";
|
|
3
|
+
import { NmorphComponentHeight as G } from "../../../types/index.js";
|
|
4
|
+
import { useModifiers as J } from "../../../utils/create-modifiers.js";
|
|
5
|
+
import { useI18n as K } from "vue-i18n";
|
|
6
|
+
import { useFormItemInput as Q } from "../nmorph-form/use-form-item-input.js";
|
|
7
|
+
import X from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
|
|
8
|
+
import Y from "./components/nmorph-select-option/NmorphSelectOption.vue.js";
|
|
9
|
+
import Z from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
10
|
+
import ee from "../../data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.js";
|
|
11
|
+
import te from "../../../assets/icons/chevron-down.svg.js";
|
|
12
|
+
import le from "../../../assets/icons/loader.svg.js";
|
|
13
|
+
const ye = /* @__PURE__ */ U({
|
|
14
|
+
__name: "NmorphSelect",
|
|
15
|
+
props: {
|
|
16
|
+
noElementPlaceholder: { type: String, required: !1, default: "" },
|
|
17
|
+
valueRequired: { type: Boolean, required: !1, default: !1 },
|
|
18
|
+
options: { type: Array, required: !1, default: () => [] },
|
|
19
|
+
optionsMap: { type: Array, required: !1, default: () => [] },
|
|
20
|
+
modelValue: { type: [String, Array], required: !1, default: "" },
|
|
21
|
+
loading: { type: Boolean, required: !1, default: !1 },
|
|
22
|
+
open: { type: Boolean, required: !1, default: !1 },
|
|
23
|
+
fill: { type: Boolean, required: !1, default: !1 },
|
|
24
|
+
optionsWidth: { type: String, required: !1, default: "truncate" },
|
|
25
|
+
zIndex: { type: Number, required: !1 },
|
|
26
|
+
id: { type: String, required: !1 },
|
|
27
|
+
name: { type: String, required: !1 },
|
|
28
|
+
autocomplete: { type: String, required: !1 },
|
|
29
|
+
height: { type: null, required: !1, default: "basic" },
|
|
30
|
+
disabled: { type: Boolean, required: !1, default: !1 },
|
|
31
|
+
tabindex: { type: Number, required: !1 }
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:model-value"],
|
|
34
|
+
setup(M, { expose: _, emit: $ }) {
|
|
35
|
+
_();
|
|
36
|
+
const { t: H } = K(), t = M, I = n(
|
|
37
|
+
() => t.noElementPlaceholder ? t.noElementPlaceholder : H("noElementPlaceholder")
|
|
38
|
+
), v = $, e = o(t.modelValue), r = o(t.open), u = n(() => t.disabled || t.loading), m = n(() => t.optionsWidth === "auto"), c = o(null), w = o(null), h = o(!0), { id: V, name: D, autocomplete: O, tabindex: L } = Q(t), g = (l) => {
|
|
39
|
+
if (!u.value) {
|
|
40
|
+
if (r.value = !1, typeof e.value == "string" && (!t.valueRequired && e.value === l ? e.value = "" : e.value = l, v("update:model-value", e.value)), Array.isArray(e.value)) {
|
|
41
|
+
const a = e.value.includes(l), A = e.value.length === 1 && a;
|
|
42
|
+
if (t.valueRequired && A) return;
|
|
43
|
+
a ? e.value = e.value.filter((b) => b !== l) : e.value = [...e.value, l];
|
|
44
|
+
}
|
|
45
|
+
v("update:model-value", e.value);
|
|
46
|
+
}
|
|
47
|
+
}, p = o(!1), P = () => {
|
|
48
|
+
p.value = !0;
|
|
49
|
+
}, B = () => {
|
|
50
|
+
p.value = !1;
|
|
51
|
+
}, R = n(
|
|
52
|
+
() => J({
|
|
53
|
+
nmorph: [G[t.height]],
|
|
54
|
+
"nmorph-select": [
|
|
55
|
+
`${t.disabled && "disabled"}`,
|
|
56
|
+
`${t.modelValue ? "on" : "off"}`,
|
|
57
|
+
`${t.loading && "loading"}`,
|
|
58
|
+
`${r.value && !u.value && "open"}`,
|
|
59
|
+
`${t.fill && "fill"}`,
|
|
60
|
+
`${m.value && "options-auto-width"}`,
|
|
61
|
+
`${h.value ? "selected-line-outset" : "selected-line-inset"}`,
|
|
62
|
+
`${p.value && "focus"}`
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
), W = () => {
|
|
66
|
+
u.value || (r.value = !r.value);
|
|
67
|
+
};
|
|
68
|
+
N(
|
|
69
|
+
r,
|
|
70
|
+
(l) => {
|
|
71
|
+
l && (h.value = !1);
|
|
72
|
+
},
|
|
73
|
+
{ immediate: !0 }
|
|
74
|
+
);
|
|
75
|
+
const y = () => {
|
|
76
|
+
r.value = !1;
|
|
77
|
+
};
|
|
78
|
+
N(
|
|
79
|
+
() => t.loading,
|
|
80
|
+
(l) => {
|
|
81
|
+
l && (r.value = !1);
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
const f = o(), i = o([]), s = o(0), d = o("");
|
|
85
|
+
N(s, (l) => {
|
|
86
|
+
d.value = i.value[l], f.value.forEach((a) => {
|
|
87
|
+
const b = a.getAttribute("value") === d.value ? "add" : "remove";
|
|
88
|
+
a.classList[b]("nmorph-select-option--focused");
|
|
89
|
+
});
|
|
90
|
+
}), F(async () => {
|
|
91
|
+
await j(), c.value && (f.value = c.value.querySelectorAll(".nmorph-select-option"), f.value.forEach((l) => {
|
|
92
|
+
const a = l.getAttribute("value");
|
|
93
|
+
a && i.value.push(a);
|
|
94
|
+
}), d.value = i.value[s.value], w.value = `${c.value.clientHeight}px`, document.addEventListener("click", y));
|
|
95
|
+
}), z(() => {
|
|
96
|
+
document.removeEventListener("click", y);
|
|
97
|
+
});
|
|
98
|
+
const k = n(() => typeof e.value == "string" ? e.value === "" ? I.value : t.options.find((l) => l.value === e.value)?.label : t.options.find((l) => l.value === e.value)?.label), q = n(() => t.options.length > 0 ? t.options : t.optionsMap), C = n(() => q.value.length > 0 ? q.value.filter((a) => e.value.includes(a.value)).map((a) => ({ text: a.label, value: a.value })) : Array.isArray(e.value) ? e.value.map((a) => ({ text: a, value: a })) : [{ text: e.value, value: e.value }]);
|
|
99
|
+
E("select-selected-value", e), E("select-change-selected-value", g);
|
|
100
|
+
const S = o(null), T = n(
|
|
101
|
+
() => m.value ? `${S.value?.clientWidth || 0}px` : void 0
|
|
102
|
+
), x = { t: H, props: t, computedNoElementPlaceholder: I, emit: v, initialValue: e, open: r, disabledInput: u, autoOptionsWidth: m, optionsDOMRef: c, optionsHeight: w, selectedLineOutset: h, id: V, name: D, autocomplete: O, tabindex: L, changeHandler: g, focus: p, focusHandler: P, blurHandler: B, modifiers: R, clickHandler: W, closeHandler: y, nodeOptions: f, domOptions: i, currentIndex: s, currentFocusedEl: d, selectedValueTitle: k, optionsMap: q, tags: C, nmorphSelectDOMRef: S, optionsMinWidth: T, spaceHandler: () => {
|
|
103
|
+
u.value || (r.value = !r.value);
|
|
104
|
+
}, arrowDownHandler: () => {
|
|
105
|
+
u.value || (s.value = (s.value + 1) % i.value.length);
|
|
106
|
+
}, arrowUpHandler: () => {
|
|
107
|
+
u.value || (s.value = (s.value - 1 + i.value.length) % i.value.length);
|
|
108
|
+
}, enterHandler: () => {
|
|
109
|
+
r.value && g(d.value);
|
|
110
|
+
}, get NmorphTagItem() {
|
|
111
|
+
return ee;
|
|
112
|
+
}, get NmorphIcon() {
|
|
113
|
+
return Z;
|
|
114
|
+
}, get NmorphSelectOption() {
|
|
115
|
+
return Y;
|
|
116
|
+
}, get NmorphDropdown() {
|
|
117
|
+
return X;
|
|
118
|
+
}, get NmorphIconLoader() {
|
|
119
|
+
return le;
|
|
120
|
+
}, get NmorphIconChevronDown() {
|
|
121
|
+
return te;
|
|
122
|
+
} };
|
|
123
|
+
return Object.defineProperty(x, "__isScriptSetup", { enumerable: !1, value: !0 }), x;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
export {
|
|
127
|
+
ye as default
|
|
128
|
+
};
|
package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.nmorph-select-option{--hover-bg: var(--nmorph-accent-color);--hover-color: var(--nmorph-white-color);display:flex;align-items:center;justify-content:space-between;gap:var(--indentation-01);box-sizing:border-box;min-width:0;padding:var(--indentation-00) var(--default-indentation-input);cursor:pointer}.nmorph-select-option .nmorph-select-option__content{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nmorph-select-option .nmorph-select-option__content span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nmorph-select-option .nmorph-select-option__checked{flex:0 0 auto}.nmorph-select-option:not(.nmorph-select-option--disabled):hover{background:var(--hover-bg)}.nmorph-select-option:not(.nmorph-select-option--disabled):hover span{color:var(--hover-color)}.nmorph-select-option:not(.nmorph-select-option--disabled):hover .nmorph-select-option__checked{--color: var(--hover-color)}.nmorph-select-option.nmorph-select-option--focused:not(.nmorph-select-option--disabled){background:var(--hover-bg)}.nmorph-select-option.nmorph-select-option--focused:not(.nmorph-select-option--disabled) span{color:var(--hover-color)}.nmorph-select-option.nmorph-select-option--focused:not(.nmorph-select-option--disabled) .nmorph-select-option__checked{--color: var(--hover-color)}.nmorph-select-option.nmorph-select-option--disabled{cursor:not-allowed;opacity:.6;pointer-events:none}
|