@firstnoodle-ui/bui 0.0.13
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/LICENSE +21 -0
- package/dist/bui.css +1 -0
- package/dist/components/application-wrapper/ApplicationWrapper.vue.d.ts +17 -0
- package/dist/components/application-wrapper/index.d.ts +1 -0
- package/dist/components/aside-section-label/AsideSectionLabel.vue.d.ts +5 -0
- package/dist/components/aside-section-label/index.d.ts +1 -0
- package/dist/components/button/Button.vue.d.ts +52 -0
- package/dist/components/button/NotificationBadge.vue.d.ts +5 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button-group/ButtonGroup.vue.d.ts +29 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.vue.d.ts +18 -0
- package/dist/components/checkbox/CircleIndicator.vue.d.ts +6 -0
- package/dist/components/checkbox/DefaultIndicator.vue.d.ts +6 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/collapse/Collapse.vue.d.ts +50 -0
- package/dist/components/collapse/index.d.ts +1 -0
- package/dist/components/confirm-cancel/ConfirmCancel.vue.d.ts +36 -0
- package/dist/components/confirm-cancel/index.d.ts +1 -0
- package/dist/components/data-point/DataPoint.vue.d.ts +2 -0
- package/dist/components/data-point/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.vue.d.ts +128 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/fade-in-up/FadeInUp.vue.d.ts +21 -0
- package/dist/components/fade-in-up/index.d.ts +1 -0
- package/dist/components/first-paint/FirstPaint.vue.d.ts +20 -0
- package/dist/components/first-paint/index.d.ts +1 -0
- package/dist/components/flexbox/Flexbox.vue.d.ts +31 -0
- package/dist/components/flexbox/index.d.ts +1 -0
- package/dist/components/horizontal-layout/Aside.vue.d.ts +48 -0
- package/dist/components/horizontal-layout/HorizontalLayout.vue.d.ts +48 -0
- package/dist/components/horizontal-layout/index.d.ts +2 -0
- package/dist/components/icon/Icon.vue.d.ts +6 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/index.d.ts +38 -0
- package/dist/components/input/Input.vue.d.ts +26 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/load-spinner/LoadSpinner.vue.d.ts +2 -0
- package/dist/components/load-spinner/index.d.ts +1 -0
- package/dist/components/modal/Modal.vue.d.ts +135 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/nav-item/NavItem.vue.d.ts +43 -0
- package/dist/components/nav-item/index.d.ts +1 -0
- package/dist/components/notification/Notification.vue.d.ts +14 -0
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/components/pagination/Pagination.vue.d.ts +13 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pill/Pill.vue.d.ts +32 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/pill-types.d.ts +2 -0
- package/dist/components/pop-confirm/PopConfirm.vue.d.ts +357 -0
- package/dist/components/pop-confirm/index.d.ts +1 -0
- package/dist/components/pop-select/FooterButton.vue.d.ts +2 -0
- package/dist/components/pop-select/PopSelect.vue.d.ts +51 -0
- package/dist/components/pop-select/ResultFilters.vue.d.ts +20 -0
- package/dist/components/pop-select/enums.d.ts +7 -0
- package/dist/components/pop-select/index.d.ts +2 -0
- package/dist/components/pop-select/option.vue.d.ts +39 -0
- package/dist/components/popper/Popper.vue.d.ts +79 -0
- package/dist/components/popper/PopperContent.vue.d.ts +17 -0
- package/dist/components/popper/index.d.ts +2 -0
- package/dist/components/popper/middleware.d.ts +10 -0
- package/dist/components/screen-overlay/ScreenOverlay.vue.d.ts +31 -0
- package/dist/components/screen-overlay/index.d.ts +1 -0
- package/dist/components/scrollbar/Bar.vue.d.ts +19 -0
- package/dist/components/scrollbar/ScrollBottomLoader.vue.d.ts +25 -0
- package/dist/components/scrollbar/Scrollbar.vue.d.ts +62 -0
- package/dist/components/scrollbar/enums.d.ts +3 -0
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/scrollbarWidth.d.ts +1 -0
- package/dist/components/scrollbar/types.d.ts +27 -0
- package/dist/components/side-over/SideOver.vue.d.ts +43 -0
- package/dist/components/side-over/index.d.ts +1 -0
- package/dist/components/status-select/StatusSelect.vue.d.ts +2 -0
- package/dist/components/status-select/index.d.ts +1 -0
- package/dist/components/switch/Switch.vue.d.ts +17 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/tab/Tab.vue.d.ts +22 -0
- package/dist/components/tab/index.d.ts +1 -0
- package/dist/components/tag/Tag.vue.d.ts +29 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/text-editor/TextEditor.vue.d.ts +79 -0
- package/dist/components/text-editor/components/Dialog.vue.d.ts +17 -0
- package/dist/components/text-editor/components/FormattingButton.vue.d.ts +19 -0
- package/dist/components/text-editor/components/InsertLinkDialog.vue.d.ts +57 -0
- package/dist/components/text-editor/components/InsertTextDialog.vue.d.ts +54 -0
- package/dist/components/text-editor/components/index.d.ts +3 -0
- package/dist/components/text-editor/index.d.ts +1 -0
- package/dist/components/text-highlight/TextHighlight.vue.d.ts +16 -0
- package/dist/components/text-highlight/index.d.ts +1 -0
- package/dist/components/text-viewer/TextViewer.vue.d.ts +17 -0
- package/dist/components/text-viewer/index.d.ts +1 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +42 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/types.d.ts +64 -0
- package/dist/components/vertical-layout/RunningSection.vue.d.ts +31 -0
- package/dist/components/vertical-layout/VerticalLayout.vue.d.ts +32 -0
- package/dist/components/vertical-layout/index.d.ts +3 -0
- package/dist/components/vertical-layout/types.d.ts +2 -0
- package/dist/components/window-frame/WindowFrame.vue.d.ts +21 -0
- package/dist/components/window-frame/index.d.ts +1 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/useClickOutside.d.ts +5 -0
- package/dist/composables/useEscapeKey.d.ts +1 -0
- package/dist/composables/useMounted.d.ts +3 -0
- package/dist/composables/useNextFrame.d.ts +3 -0
- package/dist/composables/useTrapFocus.d.ts +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +20754 -0
- package/dist/utils/array.d.ts +5 -0
- package/dist/utils/clamp.d.ts +1 -0
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/scrollIntoView.d.ts +1 -0
- package/dist/utils/scrollbarWidth.d.ts +1 -0
- package/package.json +65 -0
- package/src/components/application-wrapper/ApplicationWrapper.vue +8 -0
- package/src/components/application-wrapper/index.ts +1 -0
- package/src/components/aside-section-label/AsideSectionLabel.vue +16 -0
- package/src/components/aside-section-label/index.ts +1 -0
- package/src/components/button/Button.vue +245 -0
- package/src/components/button/NotificationBadge.vue +15 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/ButtonGroup.vue +97 -0
- package/src/components/button-group/index.ts +1 -0
- package/src/components/checkbox/Checkbox.vue +52 -0
- package/src/components/checkbox/CircleIndicator.vue +27 -0
- package/src/components/checkbox/DefaultIndicator.vue +22 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/collapse/Collapse.vue +120 -0
- package/src/components/collapse/index.ts +1 -0
- package/src/components/confirm-cancel/ConfirmCancel.vue +79 -0
- package/src/components/confirm-cancel/index.ts +1 -0
- package/src/components/data-point/DataPoint.vue +5 -0
- package/src/components/data-point/index.ts +1 -0
- package/src/components/dialog/Dialog.vue +70 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/fade-in-up/FadeInUp.vue +17 -0
- package/src/components/fade-in-up/index.ts +1 -0
- package/src/components/first-paint/FirstPaint.vue +21 -0
- package/src/components/first-paint/index.ts +1 -0
- package/src/components/first-paint/style.scss +23 -0
- package/src/components/flexbox/Flexbox.vue +50 -0
- package/src/components/flexbox/index.ts +1 -0
- package/src/components/horizontal-layout/Aside.vue +113 -0
- package/src/components/horizontal-layout/HorizontalLayout.vue +118 -0
- package/src/components/horizontal-layout/index.ts +2 -0
- package/src/components/icon/Icon.vue +1159 -0
- package/src/components/icon/index.ts +1 -0
- package/src/components/icon/utils/combine-svgs.cjs +55 -0
- package/src/components/icon/utils/combined-svgs.txt +1150 -0
- package/src/components/icon/utils/svgs/admin.svg +16 -0
- package/src/components/icon/utils/svgs/arrow-deviate.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-down-plus.svg +4 -0
- package/src/components/icon/utils/svgs/arrow-down.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-from.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-left.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-move.svg +15 -0
- package/src/components/icon/utils/svgs/arrow-right.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-sub.svg +3 -0
- package/src/components/icon/utils/svgs/arrow-trend.svg +15 -0
- package/src/components/icon/utils/svgs/arrow-up-plus.svg +4 -0
- package/src/components/icon/utils/svgs/arrow-up.svg +3 -0
- package/src/components/icon/utils/svgs/authority.svg +5 -0
- package/src/components/icon/utils/svgs/beams.svg +5 -0
- package/src/components/icon/utils/svgs/bell.svg +15 -0
- package/src/components/icon/utils/svgs/bold.svg +3 -0
- package/src/components/icon/utils/svgs/box.svg +5 -0
- package/src/components/icon/utils/svgs/building.svg +15 -0
- package/src/components/icon/utils/svgs/bullet-list.svg +8 -0
- package/src/components/icon/utils/svgs/calendar.svg +21 -0
- package/src/components/icon/utils/svgs/camera.svg +5 -0
- package/src/components/icon/utils/svgs/categories.svg +3 -0
- package/src/components/icon/utils/svgs/check-circled.svg +16 -0
- package/src/components/icon/utils/svgs/check-outline.svg +15 -0
- package/src/components/icon/utils/svgs/check.svg +3 -0
- package/src/components/icon/utils/svgs/chevron-down.svg +3 -0
- package/src/components/icon/utils/svgs/chevron-left-double.svg +4 -0
- package/src/components/icon/utils/svgs/chevron-left.svg +3 -0
- package/src/components/icon/utils/svgs/chevron-right-double.svg +4 -0
- package/src/components/icon/utils/svgs/chevron-right.svg +3 -0
- package/src/components/icon/utils/svgs/chevron-up.svg +3 -0
- package/src/components/icon/utils/svgs/clock.svg +4 -0
- package/src/components/icon/utils/svgs/close-outline.svg +3 -0
- package/src/components/icon/utils/svgs/close.svg +3 -0
- package/src/components/icon/utils/svgs/columns.svg +3 -0
- package/src/components/icon/utils/svgs/conclusion.svg +17 -0
- package/src/components/icon/utils/svgs/copy.svg +16 -0
- package/src/components/icon/utils/svgs/crosshair.svg +15 -0
- package/src/components/icon/utils/svgs/dash.svg +3 -0
- package/src/components/icon/utils/svgs/dashboard.svg +3 -0
- package/src/components/icon/utils/svgs/delete.svg +4 -0
- package/src/components/icon/utils/svgs/delta.svg +3 -0
- package/src/components/icon/utils/svgs/download.svg +3 -0
- package/src/components/icon/utils/svgs/drag.svg +8 -0
- package/src/components/icon/utils/svgs/drilldown.svg +8 -0
- package/src/components/icon/utils/svgs/edit.svg +16 -0
- package/src/components/icon/utils/svgs/envelope.svg +3 -0
- package/src/components/icon/utils/svgs/error.svg +3 -0
- package/src/components/icon/utils/svgs/export-document.svg +16 -0
- package/src/components/icon/utils/svgs/filter.svg +6 -0
- package/src/components/icon/utils/svgs/filters.svg +4 -0
- package/src/components/icon/utils/svgs/flag.svg +3 -0
- package/src/components/icon/utils/svgs/folder.svg +15 -0
- package/src/components/icon/utils/svgs/frequency.svg +3 -0
- package/src/components/icon/utils/svgs/fullscreen-off.svg +3 -0
- package/src/components/icon/utils/svgs/fullscreen-on.svg +3 -0
- package/src/components/icon/utils/svgs/graduate.svg +3 -0
- package/src/components/icon/utils/svgs/hamburger.svg +5 -0
- package/src/components/icon/utils/svgs/handshake.svg +15 -0
- package/src/components/icon/utils/svgs/heading-1.svg +4 -0
- package/src/components/icon/utils/svgs/heading-2.svg +4 -0
- package/src/components/icon/utils/svgs/heading.svg +3 -0
- package/src/components/icon/utils/svgs/home.svg +3 -0
- package/src/components/icon/utils/svgs/id-card.svg +6 -0
- package/src/components/icon/utils/svgs/id.svg +4 -0
- package/src/components/icon/utils/svgs/indent-left.svg +7 -0
- package/src/components/icon/utils/svgs/indent-right.svg +7 -0
- package/src/components/icon/utils/svgs/information.svg +17 -0
- package/src/components/icon/utils/svgs/italics.svg +3 -0
- package/src/components/icon/utils/svgs/itenary.svg +11 -0
- package/src/components/icon/utils/svgs/keyboard.svg +11 -0
- package/src/components/icon/utils/svgs/lightning.svg +15 -0
- package/src/components/icon/utils/svgs/link.svg +4 -0
- package/src/components/icon/utils/svgs/list-collapse.svg +6 -0
- package/src/components/icon/utils/svgs/list-expand.svg +6 -0
- package/src/components/icon/utils/svgs/location.svg +4 -0
- package/src/components/icon/utils/svgs/lock-locked.svg +4 -0
- package/src/components/icon/utils/svgs/lock-unlocked.svg +4 -0
- package/src/components/icon/utils/svgs/magnifying-glass.svg +15 -0
- package/src/components/icon/utils/svgs/map.svg +3 -0
- package/src/components/icon/utils/svgs/megaphone.svg +3 -0
- package/src/components/icon/utils/svgs/message.svg +15 -0
- package/src/components/icon/utils/svgs/microscope.svg +3 -0
- package/src/components/icon/utils/svgs/moon.svg +3 -0
- package/src/components/icon/utils/svgs/new-document.svg +4 -0
- package/src/components/icon/utils/svgs/news.svg +15 -0
- package/src/components/icon/utils/svgs/numbered-list.svg +7 -0
- package/src/components/icon/utils/svgs/open-link.svg +16 -0
- package/src/components/icon/utils/svgs/options.svg +5 -0
- package/src/components/icon/utils/svgs/page.svg +7 -0
- package/src/components/icon/utils/svgs/paper-plane.svg +15 -0
- package/src/components/icon/utils/svgs/paper.svg +3 -0
- package/src/components/icon/utils/svgs/pen-and-paper.svg +4 -0
- package/src/components/icon/utils/svgs/phase.svg +15 -0
- package/src/components/icon/utils/svgs/photo.svg +4 -0
- package/src/components/icon/utils/svgs/pie-chart.svg +3 -0
- package/src/components/icon/utils/svgs/plus.svg +3 -0
- package/src/components/icon/utils/svgs/point-left.svg +3 -0
- package/src/components/icon/utils/svgs/point-up.svg +3 -0
- package/src/components/icon/utils/svgs/popup.svg +16 -0
- package/src/components/icon/utils/svgs/question.svg +17 -0
- package/src/components/icon/utils/svgs/radio-tower.svg +3 -0
- package/src/components/icon/utils/svgs/recycle.svg +3 -0
- package/src/components/icon/utils/svgs/redo.svg +3 -0
- package/src/components/icon/utils/svgs/refresh.svg +3 -0
- package/src/components/icon/utils/svgs/route.svg +3 -0
- package/src/components/icon/utils/svgs/rows.svg +3 -0
- package/src/components/icon/utils/svgs/scope.svg +7 -0
- package/src/components/icon/utils/svgs/settings.svg +16 -0
- package/src/components/icon/utils/svgs/share.svg +11 -0
- package/src/components/icon/utils/svgs/sign-in.svg +4 -0
- package/src/components/icon/utils/svgs/sign-up.svg +3 -0
- package/src/components/icon/utils/svgs/sort-down.svg +20 -0
- package/src/components/icon/utils/svgs/sort-up.svg +20 -0
- package/src/components/icon/utils/svgs/sort.svg +7 -0
- package/src/components/icon/utils/svgs/square-solid.svg +3 -0
- package/src/components/icon/utils/svgs/star-solid.svg +15 -0
- package/src/components/icon/utils/svgs/star.svg +15 -0
- package/src/components/icon/utils/svgs/stop-watch.svg +5 -0
- package/src/components/icon/utils/svgs/structure.svg +3 -0
- package/src/components/icon/utils/svgs/sun.svg +23 -0
- package/src/components/icon/utils/svgs/table.svg +3 -0
- package/src/components/icon/utils/svgs/tag.svg +15 -0
- package/src/components/icon/utils/svgs/team.svg +15 -0
- package/src/components/icon/utils/svgs/telescope.svg +15 -0
- package/src/components/icon/utils/svgs/trash.svg +6 -0
- package/src/components/icon/utils/svgs/triangle-angle.svg +3 -0
- package/src/components/icon/utils/svgs/triangle-side.svg +3 -0
- package/src/components/icon/utils/svgs/underline.svg +4 -0
- package/src/components/icon/utils/svgs/undo.svg +3 -0
- package/src/components/icon/utils/svgs/user.svg +16 -0
- package/src/components/icon/utils/svgs/venn.svg +3 -0
- package/src/components/icon/utils/svgs/video.svg +3 -0
- package/src/components/icon/utils/svgs/visibility-off-alt.svg +19 -0
- package/src/components/icon/utils/svgs/visibility-off.svg +3 -0
- package/src/components/icon/utils/svgs/visibility-on.svg +16 -0
- package/src/components/icon/utils/svgs/warning.svg +5 -0
- package/src/components/index.ts +38 -0
- package/src/components/input/Input.vue +87 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/load-spinner/LoadSpinner.vue +13 -0
- package/src/components/load-spinner/index.ts +1 -0
- package/src/components/modal/Modal.vue +111 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/nav-item/NavItem.vue +62 -0
- package/src/components/nav-item/index.ts +1 -0
- package/src/components/notification/Notification.vue +34 -0
- package/src/components/notification/index.ts +1 -0
- package/src/components/pagination/Pagination.vue +72 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pill/Pill.vue +52 -0
- package/src/components/pill/index.ts +2 -0
- package/src/components/pill/pill-types.ts +2 -0
- package/src/components/pop-confirm/PopConfirm.vue +69 -0
- package/src/components/pop-confirm/index.ts +1 -0
- package/src/components/pop-select/FooterButton.vue +5 -0
- package/src/components/pop-select/PopSelect.vue +346 -0
- package/src/components/pop-select/ResultFilters.vue +31 -0
- package/src/components/pop-select/enums.ts +7 -0
- package/src/components/pop-select/index.ts +2 -0
- package/src/components/pop-select/option.vue +51 -0
- package/src/components/popper/Popper.vue +239 -0
- package/src/components/popper/PopperContent.vue +5 -0
- package/src/components/popper/index.ts +2 -0
- package/src/components/popper/middleware.ts +19 -0
- package/src/components/screen-overlay/ScreenOverlay.vue +53 -0
- package/src/components/screen-overlay/index.ts +1 -0
- package/src/components/scrollbar/Bar.vue +106 -0
- package/src/components/scrollbar/ScrollBottomLoader.vue +25 -0
- package/src/components/scrollbar/Scrollbar.vue +220 -0
- package/src/components/scrollbar/enums.ts +23 -0
- package/src/components/scrollbar/index.ts +2 -0
- package/src/components/scrollbar/scrollbarWidth.ts +26 -0
- package/src/components/scrollbar/style.scss +75 -0
- package/src/components/scrollbar/types.ts +32 -0
- package/src/components/side-over/SideOver.vue +87 -0
- package/src/components/side-over/index.ts +1 -0
- package/src/components/status-select/StatusIndicator.vue +78 -0
- package/src/components/status-select/StatusSelect.vue +62 -0
- package/src/components/status-select/index.ts +1 -0
- package/src/components/switch/Switch.vue +52 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/tab/Tab.vue +59 -0
- package/src/components/tab/index.ts +1 -0
- package/src/components/tag/Tag.vue +34 -0
- package/src/components/tag/index.ts +1 -0
- package/src/components/text-editor/TextEditor.vue +399 -0
- package/src/components/text-editor/components/Dialog.vue +11 -0
- package/src/components/text-editor/components/FormattingButton.vue +46 -0
- package/src/components/text-editor/components/InsertLinkDialog.vue +81 -0
- package/src/components/text-editor/components/InsertTextDialog.vue +36 -0
- package/src/components/text-editor/components/index.ts +3 -0
- package/src/components/text-editor/index.ts +1 -0
- package/src/components/text-highlight/TextHighlight.vue +113 -0
- package/src/components/text-highlight/index.ts +1 -0
- package/src/components/text-viewer/TextViewer.vue +5 -0
- package/src/components/text-viewer/index.ts +1 -0
- package/src/components/tooltip/Tooltip.vue +54 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/types.ts +221 -0
- package/src/components/vertical-layout/RunningSection.vue +54 -0
- package/src/components/vertical-layout/VerticalLayout.vue +37 -0
- package/src/components/vertical-layout/index.ts +3 -0
- package/src/components/vertical-layout/types.ts +2 -0
- package/src/components/window-frame/WindowFrame.vue +20 -0
- package/src/components/window-frame/index.ts +1 -0
- package/src/composables/index.ts +5 -0
- package/src/composables/useClickOutside.ts +48 -0
- package/src/composables/useEscapeKey.ts +12 -0
- package/src/composables/useMounted.ts +7 -0
- package/src/composables/useNextFrame.ts +10 -0
- package/src/composables/useTrapFocus.ts +61 -0
- package/src/index.ts +5 -0
- package/src/main.css +116 -0
- package/src/utils/array.ts +11 -0
- package/src/utils/clamp.ts +1 -0
- package/src/utils/debounce.ts +8 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/scrollIntoView.ts +25 -0
- package/src/utils/scrollbarWidth.ts +27 -0
- package/tsconfig.app.json +4 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +21 -0
- package/vite.config.ts +27 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BarProperties } from "./types";
|
|
2
|
+
|
|
3
|
+
export const horizontalProperties: BarProperties = {
|
|
4
|
+
offset: "offsetWidth",
|
|
5
|
+
scroll: "scrollLeft",
|
|
6
|
+
scrollSize: "scrollWidth",
|
|
7
|
+
size: "width",
|
|
8
|
+
key: "horizontal",
|
|
9
|
+
axis: "X",
|
|
10
|
+
client: "clientX",
|
|
11
|
+
direction: "left",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const verticalProperties: BarProperties = {
|
|
15
|
+
offset: "offsetHeight",
|
|
16
|
+
scroll: "scrollTop",
|
|
17
|
+
scrollSize: "scrollHeight",
|
|
18
|
+
size: "height",
|
|
19
|
+
key: "vertical",
|
|
20
|
+
axis: "Y",
|
|
21
|
+
client: "clientY",
|
|
22
|
+
direction: "top",
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
let scrollBarWidth: number | undefined;
|
|
2
|
+
|
|
3
|
+
export const scrollbarWidth = (): number => {
|
|
4
|
+
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
5
|
+
|
|
6
|
+
const outer = document.createElement("div");
|
|
7
|
+
outer.className = "el-scrollbar__wrap";
|
|
8
|
+
outer.style.visibility = "hidden";
|
|
9
|
+
outer.style.width = "100px";
|
|
10
|
+
outer.style.position = "absolute";
|
|
11
|
+
outer.style.top = "-9999px";
|
|
12
|
+
document.body.appendChild(outer);
|
|
13
|
+
|
|
14
|
+
const widthNoScroll = outer.offsetWidth;
|
|
15
|
+
outer.style.overflow = "scroll";
|
|
16
|
+
|
|
17
|
+
const inner = document.createElement("div");
|
|
18
|
+
inner.style.width = "100%";
|
|
19
|
+
outer.appendChild(inner);
|
|
20
|
+
|
|
21
|
+
const widthWithScroll = inner.offsetWidth;
|
|
22
|
+
outer.parentNode?.removeChild(outer);
|
|
23
|
+
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
24
|
+
|
|
25
|
+
return scrollBarWidth;
|
|
26
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// reference https://github.com/ElemeFE/element/blob/dev/packages/theme-chalk/src/scrollbar.scss
|
|
2
|
+
|
|
3
|
+
.scrollbar {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
&:hover,
|
|
8
|
+
&:active,
|
|
9
|
+
&:focus {
|
|
10
|
+
> .scrollbar__bar {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
transition: opacity 340ms ease-out;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__wrap {
|
|
17
|
+
overflow: auto;
|
|
18
|
+
height: 100%;
|
|
19
|
+
|
|
20
|
+
&.hidden-default {
|
|
21
|
+
scrollbar-width: none;
|
|
22
|
+
&::-webkit-scrollbar {
|
|
23
|
+
width: 0;
|
|
24
|
+
height: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__view {
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__thumb {
|
|
34
|
+
position: relative;
|
|
35
|
+
display: block;
|
|
36
|
+
width: 0;
|
|
37
|
+
height: 0;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
border-radius: inherit;
|
|
40
|
+
background-color: #909399; // opacity 0.3
|
|
41
|
+
transition: .3s background-color;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background-color: #909399; // opacity 0.5
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__bar {
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: 2px;
|
|
51
|
+
bottom: 2px;
|
|
52
|
+
z-index: 1;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
transition: opacity 120ms ease-out;
|
|
56
|
+
|
|
57
|
+
&.is-vertical {
|
|
58
|
+
width: 6px;
|
|
59
|
+
top: 2px;
|
|
60
|
+
|
|
61
|
+
> div {
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.is-horizontal {
|
|
67
|
+
height: 6px;
|
|
68
|
+
left: 2px;
|
|
69
|
+
|
|
70
|
+
> div {
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type BarProperties = {
|
|
2
|
+
offset: string;
|
|
3
|
+
scroll: string;
|
|
4
|
+
scrollSize: string;
|
|
5
|
+
size: string;
|
|
6
|
+
key: string;
|
|
7
|
+
axis: string;
|
|
8
|
+
client: string;
|
|
9
|
+
direction: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ThumbDragEvent = {
|
|
13
|
+
scrollReference: string;
|
|
14
|
+
positionPercentage: number;
|
|
15
|
+
scrollSize: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const egdes = ["top", "bottom", "left", "right"] as const;
|
|
19
|
+
export type ScrollEdge = (typeof egdes)[number];
|
|
20
|
+
|
|
21
|
+
export type ScrollIntersectionEvent = {
|
|
22
|
+
edge: ScrollEdge;
|
|
23
|
+
hit: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const directions = ["up", "down", "left", "right"] as const;
|
|
27
|
+
export type ScrollDirection = (typeof directions)[number];
|
|
28
|
+
|
|
29
|
+
export type ScrollTrigger = {
|
|
30
|
+
px: number;
|
|
31
|
+
callback: (trigger: ScrollTrigger, direction: ScrollDirection) => void;
|
|
32
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Slots } from "vue";
|
|
3
|
+
import type { TOverlayType } from "../types";
|
|
4
|
+
import { onMounted, ref, useSlots } from "vue";
|
|
5
|
+
import { BButton, BScreenOverlay, BVerticalLayout } from "../";
|
|
6
|
+
import { useEscapeKey, useTrapFocus } from "../../";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(
|
|
9
|
+
defineProps<{
|
|
10
|
+
closeable?: boolean;
|
|
11
|
+
overlayType?: TOverlayType;
|
|
12
|
+
noScrollbar?: boolean;
|
|
13
|
+
target?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
}>(),
|
|
16
|
+
{
|
|
17
|
+
closeable: true,
|
|
18
|
+
overlayType: "default",
|
|
19
|
+
noScrollbar: false,
|
|
20
|
+
target: "#modals",
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
const emit = defineEmits(["close"]);
|
|
24
|
+
const slots: Slots = useSlots();
|
|
25
|
+
const show = ref(false);
|
|
26
|
+
const panelRef = ref<HTMLDivElement>();
|
|
27
|
+
const { trapFocus } = useTrapFocus(panelRef);
|
|
28
|
+
|
|
29
|
+
// when component is mounted start the transition
|
|
30
|
+
onMounted(() => (show.value = true));
|
|
31
|
+
|
|
32
|
+
const close = () => (show.value = false);
|
|
33
|
+
const onClose = () => props.closeable && close();
|
|
34
|
+
props.closeable && useEscapeKey(onClose);
|
|
35
|
+
|
|
36
|
+
// afterTransition -> start trapFocus
|
|
37
|
+
const onTransitionAfterEnter = () => {
|
|
38
|
+
// focus the dialog after transition
|
|
39
|
+
panelRef.value?.focus();
|
|
40
|
+
// trap focus inside the dialog (without focusing the first focusable element)
|
|
41
|
+
trapFocus();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
defineExpose({ close });
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<Teleport to="#modals">
|
|
49
|
+
<BScreenOverlay :show="show" :type="overlayType" class="p-4" @click="onClose" @close="emit('close')">
|
|
50
|
+
<transition
|
|
51
|
+
enter-active-class="transform transition ease-in-out duration-500"
|
|
52
|
+
enter-from-class="translate-x-full"
|
|
53
|
+
enter-to-class=""
|
|
54
|
+
leave-active-class="transform transition ease-in-out duration-300"
|
|
55
|
+
leave-class="translate-x-0"
|
|
56
|
+
leave-to-class="translate-x-full"
|
|
57
|
+
@after-enter="onTransitionAfterEnter"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
v-show="show"
|
|
61
|
+
ref="panelRef"
|
|
62
|
+
tabindex="0"
|
|
63
|
+
class="ml-auto flex flex-col bg-primary shadow-sm-xl rounded-xl overflow-hidden max-w-lg w-full h-full focus:outline-hidden"
|
|
64
|
+
:class="{ 'px-6 py-4': !slots.default }"
|
|
65
|
+
style="pointer-events: auto"
|
|
66
|
+
>
|
|
67
|
+
<slot v-if="$slots.default" />
|
|
68
|
+
<BVerticalLayout v-else>
|
|
69
|
+
<template v-if="props.title || $slots.header" #header>
|
|
70
|
+
<header v-if="props.title" class="flex items-center justify-between w-full h-12">
|
|
71
|
+
<h4>{{ props.title }}</h4>
|
|
72
|
+
<BButton v-if="props.closeable" small icon="close" variant="textSubtle" @click="onClose" />
|
|
73
|
+
</header>
|
|
74
|
+
<slot v-else name="header" />
|
|
75
|
+
</template>
|
|
76
|
+
<template #main>
|
|
77
|
+
<slot name="main" />
|
|
78
|
+
</template>
|
|
79
|
+
<template #footer>
|
|
80
|
+
<slot name="footer" />
|
|
81
|
+
</template>
|
|
82
|
+
</BVerticalLayout>
|
|
83
|
+
</div>
|
|
84
|
+
</transition>
|
|
85
|
+
</BScreenOverlay>
|
|
86
|
+
</Teleport>
|
|
87
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BSideOver } from "./SideOver.vue";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!-- eslint-disable vue/no-deprecated-slot-attribute -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import type { TStatusSelectStatus } from "../types";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { BIcon, BLoadSpinner } from "../";
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
button?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
softFocus?: boolean;
|
|
12
|
+
status?: TStatusSelectStatus | null;
|
|
13
|
+
}>(),
|
|
14
|
+
{
|
|
15
|
+
button: true,
|
|
16
|
+
loading: false,
|
|
17
|
+
softFocus: false,
|
|
18
|
+
status: null,
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
// should be a 'disabled' prop instead of 'button'
|
|
23
|
+
const tag = computed(() => (props.button ? "button" : "div"));
|
|
24
|
+
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
const result = [];
|
|
27
|
+
|
|
28
|
+
const loadingClasses = "border-default bg-granite-grey-15";
|
|
29
|
+
|
|
30
|
+
switch (props.status) {
|
|
31
|
+
case null:
|
|
32
|
+
if (props.loading) {
|
|
33
|
+
result.push(loadingClasses);
|
|
34
|
+
}
|
|
35
|
+
else if (props.button) {
|
|
36
|
+
result.push("border-default");
|
|
37
|
+
props.softFocus ? result.push("bg-sand-grey-15") : result.push("bg-white");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
break;
|
|
41
|
+
case "Ok":
|
|
42
|
+
props.loading ? result.push(loadingClasses) : result.push("border-forest-green-darker bg-forest-green");
|
|
43
|
+
break;
|
|
44
|
+
case "Not Ok":
|
|
45
|
+
props.loading ? result.push(loadingClasses) : result.push("border-lava-red-darker bg-lava-red");
|
|
46
|
+
break;
|
|
47
|
+
case "Not Applicable":
|
|
48
|
+
props.loading ? result.push(loadingClasses) : result.push("border-granite-grey-darker bg-granite-grey");
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (props.button) result.push("focus:outline-hidden focus-visible:ring-3 active:scale-[0.98]");
|
|
54
|
+
|
|
55
|
+
return result;
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const icon = computed(() => {
|
|
59
|
+
switch (props.status) {
|
|
60
|
+
case null:
|
|
61
|
+
return null;
|
|
62
|
+
case "Ok":
|
|
63
|
+
return "check";
|
|
64
|
+
case "Not Ok":
|
|
65
|
+
return "close";
|
|
66
|
+
case "Not Applicable":
|
|
67
|
+
return "dash";
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<component :is="tag" class="inline-flex items-center justify-center w-6 h-6 rounded-full border" :class="classes">
|
|
75
|
+
<BLoadSpinner v-if="loading" class="w-4 h-4 text-white" />
|
|
76
|
+
<BIcon v-else-if="icon" :name="icon" class="text-white" />
|
|
77
|
+
</component>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// import { ref } from "vue";
|
|
3
|
+
// import StatusIndicator from "./StatusIndicator.vue";
|
|
4
|
+
// import { BPopper, BPopperContent, BPopperOption } from "@firstnoodle-ui/bui";
|
|
5
|
+
// import { useNextFrame } from "@/bui/composables";
|
|
6
|
+
// import { TStatusSelectStatus } from "../types.ts";
|
|
7
|
+
|
|
8
|
+
// const emit = defineEmits<{ change: [TStatusSelectStatus | null] }>();
|
|
9
|
+
|
|
10
|
+
// withDefaults(
|
|
11
|
+
// defineProps<{
|
|
12
|
+
// clearable?: boolean;
|
|
13
|
+
// disabled?: boolean;
|
|
14
|
+
// loading?: boolean;
|
|
15
|
+
// status: TStatusSelectStatus | null;
|
|
16
|
+
// }>(),
|
|
17
|
+
// {
|
|
18
|
+
// clearable: false,
|
|
19
|
+
// disabled: false,
|
|
20
|
+
// loading: false,
|
|
21
|
+
// status: null
|
|
22
|
+
// }
|
|
23
|
+
// );
|
|
24
|
+
|
|
25
|
+
// const { nextFrame } = useNextFrame();
|
|
26
|
+
|
|
27
|
+
// const popoverRef = ref<typeof BPopper>();
|
|
28
|
+
// const contentRef = ref<typeof BPopperContent>();
|
|
29
|
+
|
|
30
|
+
// const onShow = () => {
|
|
31
|
+
// nextFrame(() => contentRef.value!.focus());
|
|
32
|
+
// };
|
|
33
|
+
|
|
34
|
+
// const onStatusChange = (status: TStatusSelectStatus | null) => {
|
|
35
|
+
// emit("change", status);
|
|
36
|
+
// popoverRef.value && popoverRef.value.close();
|
|
37
|
+
// };
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
TODO
|
|
42
|
+
<!-- <status-indicator v-if="disabled" :status="status" />
|
|
43
|
+
<b-popper v-else ref="popoverRef" trigger="click" trigger-class="flex" placement="bottom" :disabled="loading" :offset-main="4" @show="onShow">
|
|
44
|
+
<template #default="slotProps">
|
|
45
|
+
<status-indicator button :soft-focus="slotProps && slotProps.visible" :status="status" :loading="loading" />
|
|
46
|
+
</template>
|
|
47
|
+
<template #content>
|
|
48
|
+
<b-popper-content ref="contentRef">
|
|
49
|
+
<b-popper-option @click="onStatusChange('Ok')">
|
|
50
|
+
<status-indicator :button="false" status="Ok" />
|
|
51
|
+
</b-popper-option>
|
|
52
|
+
<b-popper-option @click="onStatusChange('Not Ok')">
|
|
53
|
+
<status-indicator :button="false" status="Not Ok" />
|
|
54
|
+
</b-popper-option>
|
|
55
|
+
<b-popper-option @click="onStatusChange('Not Applicable')">
|
|
56
|
+
<status-indicator :button="false" status="Not Applicable" />
|
|
57
|
+
</b-popper-option>
|
|
58
|
+
<b-popper-option v-if="clearable" icon="trash" @click="onStatusChange(null)" class="justify-center py-3" />
|
|
59
|
+
</b-popper-content>
|
|
60
|
+
</template>
|
|
61
|
+
</b-popper> -->
|
|
62
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BStatusSelect } from "./StatusSelect.vue";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
value?: boolean;
|
|
7
|
+
offColorClass?: string;
|
|
8
|
+
onColorClass?: string;
|
|
9
|
+
small?: boolean;
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
value: false,
|
|
13
|
+
offColorClass: "bg-secondary",
|
|
14
|
+
onColorClass: "bg-tertiary",
|
|
15
|
+
small: false,
|
|
16
|
+
},
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits<{
|
|
20
|
+
(e: "toggle", event: Event): void;
|
|
21
|
+
}>();
|
|
22
|
+
|
|
23
|
+
const knobClass = computed(() => {
|
|
24
|
+
return [props.small ? "h-3 w-3" : "h-5 w-5", props.value ? (props.small ? "translate-x-3" : "translate-x-5") : "translate-x-0"];
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const backgroundClass = computed(() => {
|
|
28
|
+
return [props.small ? "h-4" : "h-6", props.value ? props.onColorClass : props.offColorClass];
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const backgroundStyle = computed(() => {
|
|
32
|
+
return {
|
|
33
|
+
width: props.small ? "1.75rem" : "2.75rem",
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<button
|
|
40
|
+
role="checkbox"
|
|
41
|
+
tabindex="0"
|
|
42
|
+
aria-checked="false"
|
|
43
|
+
:class="backgroundClass"
|
|
44
|
+
class="group relative inline-flex flex-shrink-0 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white"
|
|
45
|
+
:style="backgroundStyle"
|
|
46
|
+
@click.stop.prevent="emit('toggle', $event)"
|
|
47
|
+
@keydown.space.prevent="emit('toggle', $event)"
|
|
48
|
+
@keydown.enter.prevent="emit('toggle', $event)"
|
|
49
|
+
>
|
|
50
|
+
<span aria-hidden="true" :class="knobClass" class="inline-block rounded-full bg-primary shadow-sm transform transition ease-in-out duration-200" />
|
|
51
|
+
</button>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BSwitch } from "./Switch.vue";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TIcon } from "../types";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
import { BIcon } from "../../";
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
icon?: TIcon;
|
|
9
|
+
grow?: boolean;
|
|
10
|
+
name: string;
|
|
11
|
+
notification?: boolean;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
type?: "default" | "pill";
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}>(),
|
|
16
|
+
{
|
|
17
|
+
grow: false,
|
|
18
|
+
notification: false,
|
|
19
|
+
type: "default",
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(["select"]);
|
|
24
|
+
|
|
25
|
+
const tabRef = ref<HTMLButtonElement>();
|
|
26
|
+
|
|
27
|
+
const onSelect = () => {
|
|
28
|
+
tabRef.value!.blur();
|
|
29
|
+
emit("select", props.name);
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<button
|
|
35
|
+
ref="tabRef"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
class=""
|
|
38
|
+
:class="{
|
|
39
|
+
'relative flex items-center justify-center space-x-1 px-3 h-8 border-b focus:outline-hidden focus:border-action': type === 'default',
|
|
40
|
+
'border-action text-action': selected && type === 'default',
|
|
41
|
+
'border-subtle text-tertiary hover:text-secondary': !selected && type === 'default',
|
|
42
|
+
'relative flex items-center justify-center px-3 h-8 border border-transparent rounded-lg focus:outline-hidden': type === 'pill',
|
|
43
|
+
'bg-actionLightActive text-action': selected && type === 'pill',
|
|
44
|
+
'text-primary bg-sand-grey-40 hover:text-secondary hover:bg-actionLightHover focus:bg-actionLightActive focus:text-action':
|
|
45
|
+
!disabled && !selected && type === 'pill',
|
|
46
|
+
'text-disabled': disabled,
|
|
47
|
+
'flex-grow': grow,
|
|
48
|
+
}"
|
|
49
|
+
@click.stop.prevent="onSelect"
|
|
50
|
+
>
|
|
51
|
+
<BIcon v-if="icon" :name="icon" />
|
|
52
|
+
<span class="relative text-sm">
|
|
53
|
+
{{ name }}
|
|
54
|
+
<div v-if="notification" class="absolute" style="top: 0.124em; right: -0.65em">
|
|
55
|
+
<div class="w-3 h-3 bg-orange-500 rounded-full border border-white" />
|
|
56
|
+
</div>
|
|
57
|
+
</span>
|
|
58
|
+
</button>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BTab } from "./Tab.vue";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TIcon } from "../types";
|
|
3
|
+
import { BButton, BFlexbox, BIcon } from "../";
|
|
4
|
+
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: TIcon;
|
|
9
|
+
deletable?: boolean;
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
deletable: false,
|
|
13
|
+
},
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits(["delete"]);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<BFlexbox
|
|
21
|
+
inline
|
|
22
|
+
align="center"
|
|
23
|
+
class="h-8 leading-tight truncate text-sm border rounded-lg border-sand-grey-15 text-secondary bg-sand-grey-40"
|
|
24
|
+
:class="{
|
|
25
|
+
'px-2': !deletable,
|
|
26
|
+
'pl-2 pr-1': deletable,
|
|
27
|
+
}"
|
|
28
|
+
>
|
|
29
|
+
<BIcon v-if="icon" :name="icon" class="mr-1" />
|
|
30
|
+
<slot v-if="$slots.default" />
|
|
31
|
+
<span v-else class="truncate">{{ label }}</span>
|
|
32
|
+
<BButton v-if="deletable" small icon="close" class="ml-1" stop-propagation @click="emit('delete')" />
|
|
33
|
+
</BFlexbox>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BTag } from "./Tag.vue";
|