@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 @@
|
|
|
1
|
+
export { default as BTextViewer } from "./TextViewer.vue";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Placement } from "@floating-ui/dom";
|
|
3
|
+
import type { TPopperTrigger } from "../types";
|
|
4
|
+
import { BPopper } from "../popper";
|
|
5
|
+
|
|
6
|
+
withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
bgColorClass?: string;
|
|
9
|
+
delay?: number;
|
|
10
|
+
forceShow?: boolean;
|
|
11
|
+
offsetMain?: number;
|
|
12
|
+
offsetCross?: number;
|
|
13
|
+
placement?: Placement;
|
|
14
|
+
text?: string;
|
|
15
|
+
textColorClass?: string;
|
|
16
|
+
trigger?: TPopperTrigger;
|
|
17
|
+
triggerFullWidth?: boolean;
|
|
18
|
+
}>(),
|
|
19
|
+
{
|
|
20
|
+
bgColorClass: "bg-black",
|
|
21
|
+
delay: 10,
|
|
22
|
+
forceShow: false,
|
|
23
|
+
offsetMain: 2,
|
|
24
|
+
offsetCross: 0,
|
|
25
|
+
placement: "top",
|
|
26
|
+
textColorClass: "text-light",
|
|
27
|
+
trigger: "hover",
|
|
28
|
+
triggerFullWidth: false,
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<BPopper
|
|
35
|
+
:trigger="trigger"
|
|
36
|
+
:open-delay="delay"
|
|
37
|
+
disable-click-outside
|
|
38
|
+
:offset-main="offsetMain"
|
|
39
|
+
:offset-cross="offsetCross"
|
|
40
|
+
:root-class="triggerFullWidth ? 'w-full flex' : 'inline-flex'"
|
|
41
|
+
:trigger-class="triggerFullWidth ? 'w-full flex' : 'inline-flex'"
|
|
42
|
+
:placement="placement"
|
|
43
|
+
>
|
|
44
|
+
<slot />
|
|
45
|
+
<template #content>
|
|
46
|
+
<div class="z-50 min-w-0 px-2 py-1 rounded-md text-sm shadow-sm-md" :class="[bgColorClass, textColorClass]">
|
|
47
|
+
<span v-if="text">
|
|
48
|
+
{{ text }}
|
|
49
|
+
</span>
|
|
50
|
+
<slot name="content" />
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
</BPopper>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BTooltip } from "./Tooltip.vue";
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
export const buttonVariants = ["fill", "outline", "outlineSubtle", "text", "textSubtle", "destructive"] as const;
|
|
2
|
+
export type ButtonVariant = (typeof buttonVariants)[number];
|
|
3
|
+
|
|
4
|
+
export const ButtonType = ["default", "primary", "error"] as const;
|
|
5
|
+
export type TButtonType = (typeof ButtonType)[number];
|
|
6
|
+
|
|
7
|
+
export const Orientation = ["horizontal", "vertical"] as const;
|
|
8
|
+
export type TButtonGroupOrientation = (typeof Orientation)[number];
|
|
9
|
+
|
|
10
|
+
export const Alignments = ["start", "center", "end", "stretch"] as const;
|
|
11
|
+
export type TAlignment = (typeof Alignments)[number];
|
|
12
|
+
|
|
13
|
+
export const Justifications = [...Alignments, "between", "around", "evenly"] as const;
|
|
14
|
+
export type TJustification = (typeof Justifications)[number];
|
|
15
|
+
|
|
16
|
+
export type TColumnNavigationOptionBase = {
|
|
17
|
+
id?: string;
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
icon?: string;
|
|
21
|
+
textClass?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type TColumnNavigationOptionWithChildren = TColumnNavigationOptionBase & {
|
|
26
|
+
type?: "withChildren";
|
|
27
|
+
children?: TColumnNavigationOption[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type TColumnNavigationOptionWithDescription = TColumnNavigationOptionBase & {
|
|
31
|
+
type?: "withDescription";
|
|
32
|
+
description?: string;
|
|
33
|
+
component?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type TColumnNavigationOption = TColumnNavigationOptionWithChildren | TColumnNavigationOptionWithDescription;
|
|
37
|
+
|
|
38
|
+
export type TColumnNavigationSelection = {
|
|
39
|
+
path: TColumnNavigationOption[];
|
|
40
|
+
isLeaf: boolean;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const OverlayType = ["default", "blurred"] as const;
|
|
44
|
+
export type TOverlayType = (typeof OverlayType)[number];
|
|
45
|
+
|
|
46
|
+
export const PopperTrigger = ["click", "hover", "focus", "manual"] as const;
|
|
47
|
+
export type TPopperTrigger = (typeof PopperTrigger)[number];
|
|
48
|
+
|
|
49
|
+
export type TPopSelectOption = {
|
|
50
|
+
id?: string | number;
|
|
51
|
+
icon?: TIcon;
|
|
52
|
+
label: string;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
meta?: unknown;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type TPopSelectResultFilter<T> = {
|
|
58
|
+
name: string;
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
execute: (record: T) => boolean;
|
|
61
|
+
count?: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const directions = ["up", "down", "left", "right"] as const;
|
|
65
|
+
export type TScrollDirection = (typeof directions)[number];
|
|
66
|
+
|
|
67
|
+
export type TScrollTrigger = {
|
|
68
|
+
px: number;
|
|
69
|
+
callback: (trigger: TScrollTrigger, direction: TScrollDirection) => void;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const statuses = ["Ok", "Not Ok", "Not Applicable"] as const;
|
|
73
|
+
export type TStatusSelectStatus = (typeof statuses)[number];
|
|
74
|
+
|
|
75
|
+
export type TTreeListNode = {
|
|
76
|
+
key: string;
|
|
77
|
+
value: unknown;
|
|
78
|
+
open: boolean;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const icons = [
|
|
82
|
+
"admin",
|
|
83
|
+
"arrow-deviate",
|
|
84
|
+
"arrow-down-plus",
|
|
85
|
+
"arrow-down",
|
|
86
|
+
"arrow-from",
|
|
87
|
+
"arrow-left",
|
|
88
|
+
"arrow-move",
|
|
89
|
+
"arrow-right",
|
|
90
|
+
"arrow-sub",
|
|
91
|
+
"arrow-trend",
|
|
92
|
+
"arrow-up-plus",
|
|
93
|
+
"arrow-up",
|
|
94
|
+
"authority",
|
|
95
|
+
"beams",
|
|
96
|
+
"bell",
|
|
97
|
+
"bold",
|
|
98
|
+
"box",
|
|
99
|
+
"building",
|
|
100
|
+
"bullet-list",
|
|
101
|
+
"calendar",
|
|
102
|
+
"camera",
|
|
103
|
+
"categories",
|
|
104
|
+
"check-circled",
|
|
105
|
+
"check-outline",
|
|
106
|
+
"check",
|
|
107
|
+
"chevron-down",
|
|
108
|
+
"chevron-left-double",
|
|
109
|
+
"chevron-left",
|
|
110
|
+
"chevron-right-double",
|
|
111
|
+
"chevron-right",
|
|
112
|
+
"chevron-up",
|
|
113
|
+
"clock",
|
|
114
|
+
"close-outline",
|
|
115
|
+
"close",
|
|
116
|
+
"columns",
|
|
117
|
+
"conclusion",
|
|
118
|
+
"copy",
|
|
119
|
+
"crosshair",
|
|
120
|
+
"dash",
|
|
121
|
+
"dashboard",
|
|
122
|
+
"delete",
|
|
123
|
+
"delta",
|
|
124
|
+
"download",
|
|
125
|
+
"drag",
|
|
126
|
+
"drilldown",
|
|
127
|
+
"edit",
|
|
128
|
+
"envelope",
|
|
129
|
+
"error",
|
|
130
|
+
"export-document",
|
|
131
|
+
"filter",
|
|
132
|
+
"filters",
|
|
133
|
+
"flag",
|
|
134
|
+
"folder",
|
|
135
|
+
"frequency",
|
|
136
|
+
"fullscreen-off",
|
|
137
|
+
"fullscreen-on",
|
|
138
|
+
"graduate",
|
|
139
|
+
"hamburger",
|
|
140
|
+
"handshake",
|
|
141
|
+
"heading-1",
|
|
142
|
+
"heading-2",
|
|
143
|
+
"heading",
|
|
144
|
+
"home",
|
|
145
|
+
"id-card",
|
|
146
|
+
"id",
|
|
147
|
+
"indent-left",
|
|
148
|
+
"indent-right",
|
|
149
|
+
"information",
|
|
150
|
+
"italics",
|
|
151
|
+
"itenary",
|
|
152
|
+
"keyboard",
|
|
153
|
+
"lightning",
|
|
154
|
+
"link",
|
|
155
|
+
"list-collapse",
|
|
156
|
+
"list-expand",
|
|
157
|
+
"location",
|
|
158
|
+
"lock-locked",
|
|
159
|
+
"lock-unlocked",
|
|
160
|
+
"magnifying-glass",
|
|
161
|
+
"map",
|
|
162
|
+
"megaphone",
|
|
163
|
+
"message",
|
|
164
|
+
"microscope",
|
|
165
|
+
"moon",
|
|
166
|
+
"new-document",
|
|
167
|
+
"news",
|
|
168
|
+
"numbered-list",
|
|
169
|
+
"open-link",
|
|
170
|
+
"options",
|
|
171
|
+
"page",
|
|
172
|
+
"paper-plane",
|
|
173
|
+
"paper",
|
|
174
|
+
"pen-and-paper",
|
|
175
|
+
"phase",
|
|
176
|
+
"photo",
|
|
177
|
+
"pie-chart",
|
|
178
|
+
"plus",
|
|
179
|
+
"point-left",
|
|
180
|
+
"point-up",
|
|
181
|
+
"popup",
|
|
182
|
+
"question",
|
|
183
|
+
"radio-tower",
|
|
184
|
+
"recycle",
|
|
185
|
+
"redo",
|
|
186
|
+
"refresh",
|
|
187
|
+
"route",
|
|
188
|
+
"rows",
|
|
189
|
+
"scope",
|
|
190
|
+
"settings",
|
|
191
|
+
"share",
|
|
192
|
+
"sign-in",
|
|
193
|
+
"sign-up",
|
|
194
|
+
"sort-down",
|
|
195
|
+
"sort-up",
|
|
196
|
+
"sort",
|
|
197
|
+
"square-solid",
|
|
198
|
+
"star-solid",
|
|
199
|
+
"star",
|
|
200
|
+
"stop-watch",
|
|
201
|
+
"structure",
|
|
202
|
+
"sun",
|
|
203
|
+
"table",
|
|
204
|
+
"tag",
|
|
205
|
+
"team",
|
|
206
|
+
"telescope",
|
|
207
|
+
"trash",
|
|
208
|
+
"triangle-angle",
|
|
209
|
+
"triangle-side",
|
|
210
|
+
"underline",
|
|
211
|
+
"undo",
|
|
212
|
+
"user",
|
|
213
|
+
"venn",
|
|
214
|
+
"video",
|
|
215
|
+
"visibility-off-alt",
|
|
216
|
+
"visibility-off",
|
|
217
|
+
"visibility-on",
|
|
218
|
+
"warning",
|
|
219
|
+
] as const;
|
|
220
|
+
|
|
221
|
+
export type TIcon = (typeof icons)[number];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TSectionType } from "./types";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
border?: boolean;
|
|
8
|
+
heightClass?: string;
|
|
9
|
+
type?: TSectionType;
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
border: false,
|
|
13
|
+
heightClass: "h-12",
|
|
14
|
+
type: "header",
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const containerRef = ref<HTMLElement>();
|
|
19
|
+
const borderPosition = props.type === "header" ? "border-b" : "border-t";
|
|
20
|
+
|
|
21
|
+
const classes = computed(() => {
|
|
22
|
+
return [props.heightClass, props.border ? "border-default" : "border-transparent", props.border ? borderPosition : ""];
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const heightStyle = computed(() => {
|
|
26
|
+
let height;
|
|
27
|
+
|
|
28
|
+
// if height is auto we have to use js to calculate and actual height in pixels
|
|
29
|
+
// otherwise the height can't be animated
|
|
30
|
+
if (props.heightClass === "h-auto") {
|
|
31
|
+
if (containerRef.value) {
|
|
32
|
+
height = 0;
|
|
33
|
+
for (const child of containerRef.value.children) {
|
|
34
|
+
height += (child as HTMLElement).offsetHeight;
|
|
35
|
+
}
|
|
36
|
+
height = `${height}px`;
|
|
37
|
+
}
|
|
38
|
+
return { height };
|
|
39
|
+
}
|
|
40
|
+
return {};
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<component
|
|
46
|
+
:is="type"
|
|
47
|
+
ref="containerRef"
|
|
48
|
+
class="flex-none w-full overflow-hidden transition-height duration-500 ease-in-out"
|
|
49
|
+
:class="classes"
|
|
50
|
+
:style="heightStyle"
|
|
51
|
+
>
|
|
52
|
+
<slot />
|
|
53
|
+
</component>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { BFlexbox, BScrollbar } from "../";
|
|
3
|
+
import RunningSection from "./RunningSection.vue";
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
borders?: boolean;
|
|
8
|
+
footerHeightClass?: string;
|
|
9
|
+
headerHeightClass?: string;
|
|
10
|
+
widthClass?: string;
|
|
11
|
+
windowFrame?: boolean;
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
borders: false,
|
|
15
|
+
footerHeightClass: "h-content",
|
|
16
|
+
headerHeightClass: "h-content",
|
|
17
|
+
widthClass: "w-full",
|
|
18
|
+
windowFrame: false,
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const classes = [props.widthClass, props.windowFrame ? "px-8 py-6 bg-light shadow-sm-xl rounded-lg" : ""];
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<BFlexbox col align="stretch" justify="start" class="relative h-full overflow-x-hidden" :class="classes">
|
|
27
|
+
<RunningSection v-if="$slots.header" type="header" :border="borders" :height-class="headerHeightClass">
|
|
28
|
+
<slot name="header" />
|
|
29
|
+
</RunningSection>
|
|
30
|
+
<BScrollbar window-resize wrap-class="h-full">
|
|
31
|
+
<slot name="main" />
|
|
32
|
+
</BScrollbar>
|
|
33
|
+
<RunningSection v-if="$slots.footer" type="footer" :border="borders" :height-class="footerHeightClass">
|
|
34
|
+
<slot name="footer" />
|
|
35
|
+
</RunningSection>
|
|
36
|
+
</BFlexbox>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
// import { useTrapFocus } from "@/bui/composables";
|
|
4
|
+
|
|
5
|
+
const windowRef = ref<HTMLDivElement>();
|
|
6
|
+
// const { trapFocus } = useTrapFocus(windowRef);
|
|
7
|
+
|
|
8
|
+
// defineExpose({
|
|
9
|
+
// trapFocus: () => {
|
|
10
|
+
// Boolean(windowRef.value) && windowRef.value!.focus();
|
|
11
|
+
// trapFocus();
|
|
12
|
+
// }
|
|
13
|
+
// });
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div ref="windowRef" tabindex="0" class="w-full flex flex-col bg-primary shadow-xl rounded-xl focus:outline-hidden">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BWindowFrame } from "./WindowFrame.vue";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { onBeforeUnmount, unref } from "vue";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line ts/no-unsafe-function-type
|
|
4
|
+
export function useClickOutside(handler: Function) {
|
|
5
|
+
const event = "pointerdown";
|
|
6
|
+
let listener: EventListenerOrEventListenerObject;
|
|
7
|
+
|
|
8
|
+
const enableClickOutside = (targets: HTMLElement[]): void => {
|
|
9
|
+
listener = (event: Event) => {
|
|
10
|
+
let elements: HTMLElement | HTMLElement[] = unref(targets);
|
|
11
|
+
if (!elements)
|
|
12
|
+
return;
|
|
13
|
+
|
|
14
|
+
if (!("length" in elements))
|
|
15
|
+
elements = [elements];
|
|
16
|
+
|
|
17
|
+
const hit = elements.some((el: HTMLElement) => {
|
|
18
|
+
return el === (event.target as HTMLElement) || event.composedPath().includes(el);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (hit)
|
|
22
|
+
return;
|
|
23
|
+
|
|
24
|
+
handler(event);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
window.addEventListener(event, listener);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const disableClickOutside = (): void => {
|
|
31
|
+
if (!listener)
|
|
32
|
+
return;
|
|
33
|
+
window.removeEventListener(event, listener);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const updateClickOutside = (targets: HTMLElement[]): void => {
|
|
37
|
+
disableClickOutside();
|
|
38
|
+
enableClickOutside(targets);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
onBeforeUnmount(() => disableClickOutside());
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
enableClickOutside,
|
|
45
|
+
disableClickOutside,
|
|
46
|
+
updateClickOutside,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { onMounted, onUnmounted } from "vue";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line ts/no-unsafe-function-type
|
|
4
|
+
export function useEscapeKey(callback: Function) {
|
|
5
|
+
const onKeydown = (e: KeyboardEvent) => {
|
|
6
|
+
if (e.key === "Escape")
|
|
7
|
+
callback();
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
onMounted(() => window.addEventListener("keydown", onKeydown));
|
|
11
|
+
onUnmounted(() => window.removeEventListener("keydown", onKeydown));
|
|
12
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { onUnmounted } from "vue";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TrapFocus keeps (loops) the focus inside an element (fx Modal or Dialog), so the user cannot focus on elements outside of it - using the tab key
|
|
5
|
+
*
|
|
6
|
+
* 'trapElement' is the vue ref to the HTML element that we want to trap focus (tabindex) inside
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const useTrapFocus = (trapElement: any, focusFirstElement: boolean = false) => {
|
|
10
|
+
// add all the elements inside modal which you want to make focusable
|
|
11
|
+
const focusableElements = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])";
|
|
12
|
+
|
|
13
|
+
let firstFocusableElement: HTMLElement;
|
|
14
|
+
let focusableContent: Element[];
|
|
15
|
+
let lastFocusableElement: HTMLElement;
|
|
16
|
+
|
|
17
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
18
|
+
const isTabPressed = e.key === "Tab";
|
|
19
|
+
|
|
20
|
+
if (!isTabPressed)
|
|
21
|
+
return;
|
|
22
|
+
|
|
23
|
+
if (e.shiftKey) {
|
|
24
|
+
if (firstFocusableElement && lastFocusableElement) {
|
|
25
|
+
if (document.activeElement === firstFocusableElement) {
|
|
26
|
+
lastFocusableElement!.focus();
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (firstFocusableElement && lastFocusableElement) {
|
|
33
|
+
if (document.activeElement === lastFocusableElement) {
|
|
34
|
+
firstFocusableElement!.focus();
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const trapFocus = () => {
|
|
42
|
+
if (!trapElement.value) {
|
|
43
|
+
console.warn("[useTrapFocus] trapElement is not present");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
firstFocusableElement = trapElement.value.querySelectorAll(focusableElements)[0] as HTMLElement;
|
|
48
|
+
focusableContent = Array.from(trapElement.value.querySelectorAll(focusableElements));
|
|
49
|
+
lastFocusableElement = focusableContent[focusableElements.length - 1] as HTMLElement;
|
|
50
|
+
|
|
51
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
52
|
+
|
|
53
|
+
if (firstFocusableElement && focusFirstElement) {
|
|
54
|
+
firstFocusableElement.focus();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
onUnmounted(() => document.removeEventListener("keydown", handleKeyDown));
|
|
59
|
+
|
|
60
|
+
return { trapFocus };
|
|
61
|
+
};
|
package/src/index.ts
ADDED
package/src/main.css
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
7
|
+
line-height: 1.5;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: flex;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@layer base {
|
|
22
|
+
h1 {
|
|
23
|
+
@apply text-2xl font-bold;
|
|
24
|
+
}
|
|
25
|
+
h2 {
|
|
26
|
+
@apply text-xl font-bold;
|
|
27
|
+
}
|
|
28
|
+
h3 {
|
|
29
|
+
@apply text-lg font-bold;
|
|
30
|
+
}
|
|
31
|
+
h4 {
|
|
32
|
+
@apply text-base font-bold;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Shared in both themes */
|
|
36
|
+
:root {
|
|
37
|
+
--color-action: var(--color-blue-500);
|
|
38
|
+
--color-action-hover: var(--color-blue-600);
|
|
39
|
+
--color-action-active: var(--color-blue-700);
|
|
40
|
+
--color-destructive: var(--color-red-500);
|
|
41
|
+
--color-destructive-hover: var(--color-red-600);
|
|
42
|
+
--color-destructive-active: var(--color-red-700);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[data-theme="light"] {
|
|
46
|
+
--color-bg-primary: var(--color-white);
|
|
47
|
+
--color-bg-secondary: var(--color-stone-100);
|
|
48
|
+
--color-bg-tertiary: var(--color-stone-200);
|
|
49
|
+
|
|
50
|
+
--color-border-weak: var(--color-stone-200);
|
|
51
|
+
--color-border-default: var(--color-stone-300);
|
|
52
|
+
--color-border-strong: var(--color-stone-400);
|
|
53
|
+
|
|
54
|
+
--color-text-primary: var(--color-slate-900);
|
|
55
|
+
--color-text-secondary: var(--color-slate-700);
|
|
56
|
+
--color-text-tertiary: var(--color-slate-500);
|
|
57
|
+
--color-text-muted: var(--color-slate-300);
|
|
58
|
+
}
|
|
59
|
+
[data-theme="dark"] {
|
|
60
|
+
--color-bg-primary: #212121;
|
|
61
|
+
--color-bg-secondary: var(--color-neutral-800);
|
|
62
|
+
--color-bg-tertiary: #333333;
|
|
63
|
+
|
|
64
|
+
--color-border-weak: var(--color-neutral-800);
|
|
65
|
+
--color-border-default: var(--color-neutral-700);
|
|
66
|
+
--color-border-strong: var(--color-neutral-600);
|
|
67
|
+
|
|
68
|
+
--color-text-primary: var(--color-stone-100);
|
|
69
|
+
--color-text-secondary: var(--color-stone-300);
|
|
70
|
+
--color-text-tertiary: var(--color-stone-400);
|
|
71
|
+
--color-text-muted: var(--color-stone-500);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* @utility content-auto {
|
|
76
|
+
content-visibility: auto;
|
|
77
|
+
} */
|
|
78
|
+
|
|
79
|
+
@utility bg-primary {
|
|
80
|
+
background-color: var(--color-bg-primary);
|
|
81
|
+
}
|
|
82
|
+
@utility bg-secondary {
|
|
83
|
+
background-color: var(--color-bg-secondary);
|
|
84
|
+
}
|
|
85
|
+
@utility bg-tertiary {
|
|
86
|
+
background-color: var(--color-bg-tertiary);
|
|
87
|
+
}
|
|
88
|
+
@utility bg-action {
|
|
89
|
+
background-color: var(--color-action);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@utility border-weak {
|
|
93
|
+
border-color: var(--color-border-weak);
|
|
94
|
+
}
|
|
95
|
+
@utility border-default {
|
|
96
|
+
border-color: var(--color-border-default);
|
|
97
|
+
}
|
|
98
|
+
@utility border-strong {
|
|
99
|
+
border-color: var(--color-border-strong);
|
|
100
|
+
}
|
|
101
|
+
@utility border-action {
|
|
102
|
+
border-color: var(--color-action);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility text-primary {
|
|
106
|
+
color: var(--color-text-primary);
|
|
107
|
+
}
|
|
108
|
+
@utility text-secondary {
|
|
109
|
+
color: var(--color-text-secondary);
|
|
110
|
+
}
|
|
111
|
+
@utility text-tertiary {
|
|
112
|
+
color: var(--color-text-tertiary);
|
|
113
|
+
}
|
|
114
|
+
@utility text-muted {
|
|
115
|
+
color: var(--color-text-muted);
|
|
116
|
+
}
|