@firstnoodle-ui/bui 0.0.28 → 0.0.29
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/bui.css +1 -1
- package/dist/components/horizontal-layout/Aside.vue.d.ts +2 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modal/Modal.vue.d.ts +9 -3
- package/dist/components/tree-list/InputNode.vue.d.ts +90 -0
- package/dist/components/tree-list/TreeList.vue.d.ts +27 -0
- package/dist/components/tree-list/index.d.ts +2 -0
- package/dist/components/tree-list/types.d.ts +14 -0
- package/dist/index.mjs +6595 -6371
- package/package.json +22 -11
- package/src/components/application-wrapper/ApplicationWrapper.vue +0 -8
- package/src/components/application-wrapper/index.ts +0 -1
- package/src/components/aside-section-label/AsideSectionLabel.vue +0 -16
- package/src/components/aside-section-label/index.ts +0 -1
- package/src/components/button/Button.vue +0 -246
- package/src/components/button/NotificationBadge.vue +0 -15
- package/src/components/button/components/button-label/ButtonLabel.vue +0 -9
- package/src/components/button/components/button-label/index.ts +0 -1
- package/src/components/button/components/index.ts +0 -3
- package/src/components/button/components/left-group/LeftGroup.vue +0 -5
- package/src/components/button/components/left-group/index.ts +0 -1
- package/src/components/button/components/notification-badge/NotificationBadge.vue +0 -17
- package/src/components/button/components/notification-badge/index.ts +0 -1
- package/src/components/button/index.ts +0 -1
- package/src/components/button-group/ButtonGroup.vue +0 -97
- package/src/components/button-group/index.ts +0 -1
- package/src/components/calendar-view/CalendarView.vue +0 -106
- package/src/components/calendar-view/components/DateButton.vue +0 -23
- package/src/components/calendar-view/components/DecadeView.vue +0 -50
- package/src/components/calendar-view/components/MonthView.vue +0 -72
- package/src/components/calendar-view/components/NavButton.vue +0 -16
- package/src/components/calendar-view/components/YearView.vue +0 -52
- package/src/components/calendar-view/composables/useCalendar.ts +0 -138
- package/src/components/calendar-view/index.ts +0 -1
- package/src/components/calendar-view/utils/enums.ts +0 -31
- package/src/components/calendar-view/utils/index.ts +0 -240
- package/src/components/calendar-view/utils/types.ts +0 -13
- package/src/components/calendar-view/utils/utils/calendar.ts +0 -70
- package/src/components/calendar-view/utils/utils/date.ts +0 -130
- package/src/components/calendar-view/utils/utils/format.ts +0 -61
- package/src/components/calendar-view/utils/utils/time.ts +0 -70
- package/src/components/checkbox/Checkbox.vue +0 -51
- package/src/components/checkbox/CircleIndicator.vue +0 -26
- package/src/components/checkbox/DefaultIndicator.vue +0 -19
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/collapse/Collapse.vue +0 -114
- package/src/components/collapse/index.ts +0 -1
- package/src/components/confirm-cancel/ConfirmCancel.vue +0 -66
- package/src/components/confirm-cancel/index.ts +0 -1
- package/src/components/confirm-cancel/types.ts +0 -18
- package/src/components/content-slider/ContentSlider.vue +0 -79
- package/src/components/content-slider/index.ts +0 -1
- package/src/components/data-point/DataPoint.vue +0 -5
- package/src/components/data-point/index.ts +0 -1
- package/src/components/delete-button/DeleteButton.vue +0 -19
- package/src/components/delete-button/index.ts +0 -1
- package/src/components/dialog/Dialog.vue +0 -70
- package/src/components/dialog/index.ts +0 -1
- package/src/components/fade-in-up/FadeInUp.vue +0 -17
- package/src/components/fade-in-up/index.ts +0 -1
- package/src/components/filter-chip/FilterChip.vue +0 -28
- package/src/components/filter-chip/index.ts +0 -1
- package/src/components/first-paint/FirstPaint.vue +0 -21
- package/src/components/first-paint/index.ts +0 -1
- package/src/components/first-paint/style.scss +0 -23
- package/src/components/flexbox/Flexbox.vue +0 -51
- package/src/components/flexbox/index.ts +0 -1
- package/src/components/horizontal-layout/Aside.vue +0 -114
- package/src/components/horizontal-layout/HorizontalLayout.vue +0 -118
- package/src/components/horizontal-layout/index.ts +0 -2
- package/src/components/icon/Icon.vue +0 -1263
- package/src/components/icon/index.ts +0 -1
- package/src/components/icon/utils/combine-svgs.cjs +0 -55
- package/src/components/icon/utils/combined-svgs.txt +0 -1150
- package/src/components/icon/utils/svgs/admin.svg +0 -16
- package/src/components/icon/utils/svgs/arrow-deviate.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-down-plus.svg +0 -4
- package/src/components/icon/utils/svgs/arrow-down.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-from.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-left.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-move.svg +0 -15
- package/src/components/icon/utils/svgs/arrow-right.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-sub.svg +0 -3
- package/src/components/icon/utils/svgs/arrow-trend.svg +0 -15
- package/src/components/icon/utils/svgs/arrow-up-plus.svg +0 -4
- package/src/components/icon/utils/svgs/arrow-up.svg +0 -3
- package/src/components/icon/utils/svgs/authority.svg +0 -5
- package/src/components/icon/utils/svgs/beams.svg +0 -5
- package/src/components/icon/utils/svgs/bell.svg +0 -15
- package/src/components/icon/utils/svgs/bold.svg +0 -3
- package/src/components/icon/utils/svgs/box.svg +0 -5
- package/src/components/icon/utils/svgs/building.svg +0 -15
- package/src/components/icon/utils/svgs/bullet-list.svg +0 -8
- package/src/components/icon/utils/svgs/calendar.svg +0 -21
- package/src/components/icon/utils/svgs/camera.svg +0 -5
- package/src/components/icon/utils/svgs/categories.svg +0 -3
- package/src/components/icon/utils/svgs/check-circled.svg +0 -16
- package/src/components/icon/utils/svgs/check-outline.svg +0 -15
- package/src/components/icon/utils/svgs/check.svg +0 -3
- package/src/components/icon/utils/svgs/chevron-down.svg +0 -3
- package/src/components/icon/utils/svgs/chevron-left-double.svg +0 -4
- package/src/components/icon/utils/svgs/chevron-left.svg +0 -3
- package/src/components/icon/utils/svgs/chevron-right-double.svg +0 -4
- package/src/components/icon/utils/svgs/chevron-right.svg +0 -3
- package/src/components/icon/utils/svgs/chevron-up.svg +0 -3
- package/src/components/icon/utils/svgs/clock.svg +0 -4
- package/src/components/icon/utils/svgs/close-outline.svg +0 -3
- package/src/components/icon/utils/svgs/close.svg +0 -3
- package/src/components/icon/utils/svgs/columns.svg +0 -3
- package/src/components/icon/utils/svgs/conclusion.svg +0 -17
- package/src/components/icon/utils/svgs/copy.svg +0 -16
- package/src/components/icon/utils/svgs/crosshair.svg +0 -15
- package/src/components/icon/utils/svgs/dash.svg +0 -3
- package/src/components/icon/utils/svgs/dashboard.svg +0 -3
- package/src/components/icon/utils/svgs/delete.svg +0 -4
- package/src/components/icon/utils/svgs/delta.svg +0 -3
- package/src/components/icon/utils/svgs/download.svg +0 -3
- package/src/components/icon/utils/svgs/drag.svg +0 -8
- package/src/components/icon/utils/svgs/drilldown.svg +0 -8
- package/src/components/icon/utils/svgs/edit.svg +0 -16
- package/src/components/icon/utils/svgs/envelope.svg +0 -3
- package/src/components/icon/utils/svgs/error.svg +0 -3
- package/src/components/icon/utils/svgs/export-document.svg +0 -16
- package/src/components/icon/utils/svgs/filter.svg +0 -6
- package/src/components/icon/utils/svgs/filters.svg +0 -4
- package/src/components/icon/utils/svgs/flag.svg +0 -3
- package/src/components/icon/utils/svgs/folder.svg +0 -15
- package/src/components/icon/utils/svgs/frequency.svg +0 -3
- package/src/components/icon/utils/svgs/fullscreen-off.svg +0 -3
- package/src/components/icon/utils/svgs/fullscreen-on.svg +0 -3
- package/src/components/icon/utils/svgs/graduate.svg +0 -3
- package/src/components/icon/utils/svgs/hamburger.svg +0 -5
- package/src/components/icon/utils/svgs/handshake.svg +0 -15
- package/src/components/icon/utils/svgs/heading-1.svg +0 -4
- package/src/components/icon/utils/svgs/heading-2.svg +0 -4
- package/src/components/icon/utils/svgs/heading.svg +0 -3
- package/src/components/icon/utils/svgs/home.svg +0 -3
- package/src/components/icon/utils/svgs/id-card.svg +0 -6
- package/src/components/icon/utils/svgs/id.svg +0 -4
- package/src/components/icon/utils/svgs/indent-left.svg +0 -7
- package/src/components/icon/utils/svgs/indent-right.svg +0 -7
- package/src/components/icon/utils/svgs/information.svg +0 -17
- package/src/components/icon/utils/svgs/italics.svg +0 -3
- package/src/components/icon/utils/svgs/itenary.svg +0 -11
- package/src/components/icon/utils/svgs/keyboard.svg +0 -11
- package/src/components/icon/utils/svgs/lightning.svg +0 -15
- package/src/components/icon/utils/svgs/link.svg +0 -4
- package/src/components/icon/utils/svgs/list-collapse.svg +0 -6
- package/src/components/icon/utils/svgs/list-expand.svg +0 -6
- package/src/components/icon/utils/svgs/location.svg +0 -4
- package/src/components/icon/utils/svgs/lock-locked.svg +0 -4
- package/src/components/icon/utils/svgs/lock-unlocked.svg +0 -4
- package/src/components/icon/utils/svgs/magnifying-glass.svg +0 -15
- package/src/components/icon/utils/svgs/map.svg +0 -3
- package/src/components/icon/utils/svgs/megaphone.svg +0 -3
- package/src/components/icon/utils/svgs/message.svg +0 -15
- package/src/components/icon/utils/svgs/microscope.svg +0 -3
- package/src/components/icon/utils/svgs/moon.svg +0 -3
- package/src/components/icon/utils/svgs/new-document.svg +0 -4
- package/src/components/icon/utils/svgs/news.svg +0 -15
- package/src/components/icon/utils/svgs/numbered-list.svg +0 -7
- package/src/components/icon/utils/svgs/open-link.svg +0 -16
- package/src/components/icon/utils/svgs/options.svg +0 -5
- package/src/components/icon/utils/svgs/page.svg +0 -7
- package/src/components/icon/utils/svgs/paper-plane.svg +0 -15
- package/src/components/icon/utils/svgs/paper.svg +0 -3
- package/src/components/icon/utils/svgs/pen-and-paper.svg +0 -4
- package/src/components/icon/utils/svgs/phase.svg +0 -15
- package/src/components/icon/utils/svgs/photo.svg +0 -4
- package/src/components/icon/utils/svgs/pie-chart.svg +0 -3
- package/src/components/icon/utils/svgs/plus.svg +0 -3
- package/src/components/icon/utils/svgs/point-left.svg +0 -3
- package/src/components/icon/utils/svgs/point-up.svg +0 -3
- package/src/components/icon/utils/svgs/popup.svg +0 -16
- package/src/components/icon/utils/svgs/question.svg +0 -17
- package/src/components/icon/utils/svgs/radio-tower.svg +0 -3
- package/src/components/icon/utils/svgs/recycle.svg +0 -3
- package/src/components/icon/utils/svgs/redo.svg +0 -3
- package/src/components/icon/utils/svgs/refresh.svg +0 -3
- package/src/components/icon/utils/svgs/route.svg +0 -3
- package/src/components/icon/utils/svgs/rows.svg +0 -3
- package/src/components/icon/utils/svgs/scope.svg +0 -7
- package/src/components/icon/utils/svgs/settings.svg +0 -16
- package/src/components/icon/utils/svgs/share.svg +0 -11
- package/src/components/icon/utils/svgs/sign-in.svg +0 -4
- package/src/components/icon/utils/svgs/sign-up.svg +0 -3
- package/src/components/icon/utils/svgs/sort-down.svg +0 -20
- package/src/components/icon/utils/svgs/sort-up.svg +0 -20
- package/src/components/icon/utils/svgs/sort.svg +0 -7
- package/src/components/icon/utils/svgs/square-solid.svg +0 -3
- package/src/components/icon/utils/svgs/star-solid.svg +0 -15
- package/src/components/icon/utils/svgs/star.svg +0 -15
- package/src/components/icon/utils/svgs/stop-watch.svg +0 -5
- package/src/components/icon/utils/svgs/structure.svg +0 -3
- package/src/components/icon/utils/svgs/sun.svg +0 -23
- package/src/components/icon/utils/svgs/table.svg +0 -3
- package/src/components/icon/utils/svgs/tag.svg +0 -15
- package/src/components/icon/utils/svgs/team.svg +0 -15
- package/src/components/icon/utils/svgs/telescope.svg +0 -15
- package/src/components/icon/utils/svgs/trash.svg +0 -6
- package/src/components/icon/utils/svgs/triangle-angle.svg +0 -3
- package/src/components/icon/utils/svgs/triangle-side.svg +0 -3
- package/src/components/icon/utils/svgs/underline.svg +0 -4
- package/src/components/icon/utils/svgs/undo.svg +0 -3
- package/src/components/icon/utils/svgs/user.svg +0 -16
- package/src/components/icon/utils/svgs/venn.svg +0 -3
- package/src/components/icon/utils/svgs/video.svg +0 -3
- package/src/components/icon/utils/svgs/visibility-off-alt.svg +0 -19
- package/src/components/icon/utils/svgs/visibility-off.svg +0 -3
- package/src/components/icon/utils/svgs/visibility-on.svg +0 -16
- package/src/components/icon/utils/svgs/warning.svg +0 -5
- package/src/components/index.ts +0 -45
- package/src/components/input/Input.vue +0 -118
- package/src/components/input/index.ts +0 -1
- package/src/components/input-number/InputNumber.vue +0 -112
- package/src/components/input-number/StepButton.vue +0 -23
- package/src/components/input-number/index.ts +0 -1
- package/src/components/load-spinner/LoadSpinner.vue +0 -13
- package/src/components/load-spinner/index.ts +0 -1
- package/src/components/modal/Modal.vue +0 -111
- package/src/components/modal/index.ts +0 -1
- package/src/components/nav-item/NavItem.vue +0 -62
- package/src/components/nav-item/index.ts +0 -1
- package/src/components/notification/Notification.vue +0 -53
- package/src/components/notification/index.ts +0 -1
- package/src/components/notification-badge/NotificationBadge.vue +0 -7
- package/src/components/notification-badge/index.ts +0 -1
- package/src/components/pagination/Pagination.vue +0 -65
- package/src/components/pagination/index.ts +0 -1
- package/src/components/pop-confirm/PopConfirm.vue +0 -90
- package/src/components/pop-confirm/index.ts +0 -1
- package/src/components/pop-select/FooterButton.vue +0 -5
- package/src/components/pop-select/PopSelect.vue +0 -346
- package/src/components/pop-select/ResultFilters.vue +0 -28
- package/src/components/pop-select/enums.ts +0 -7
- package/src/components/pop-select/index.ts +0 -2
- package/src/components/pop-select/option.vue +0 -51
- package/src/components/popper/Popper.vue +0 -239
- package/src/components/popper/PopperContent.vue +0 -5
- package/src/components/popper/index.ts +0 -2
- package/src/components/popper/middleware.ts +0 -19
- package/src/components/screen-overlay/ScreenOverlay.vue +0 -53
- package/src/components/screen-overlay/index.ts +0 -1
- package/src/components/scrollbar/Bar.vue +0 -106
- package/src/components/scrollbar/ScrollBottomLoader.vue +0 -25
- package/src/components/scrollbar/Scrollbar.vue +0 -219
- package/src/components/scrollbar/enums.ts +0 -23
- package/src/components/scrollbar/index.ts +0 -3
- package/src/components/scrollbar/style.scss +0 -77
- package/src/components/scrollbar/types.ts +0 -32
- package/src/components/select-list/SelectList.vue +0 -476
- package/src/components/select-list/components/SelectListFilterChip.vue +0 -34
- package/src/components/select-list/components/index.ts +0 -3
- package/src/components/select-list/components/option-group/OptionGroup.vue +0 -20
- package/src/components/select-list/components/option-group/index.ts +0 -1
- package/src/components/select-list/components/select-list-option/SelectListOption.vue +0 -83
- package/src/components/select-list/components/select-list-option/index.ts +0 -1
- package/src/components/select-list/components/status-cards/error-card/ErrorCard.vue +0 -17
- package/src/components/select-list/components/status-cards/error-card/index.ts +0 -1
- package/src/components/select-list/components/status-cards/idle-card/IdleCard.vue +0 -11
- package/src/components/select-list/components/status-cards/idle-card/index.ts +0 -1
- package/src/components/select-list/components/status-cards/index.ts +0 -4
- package/src/components/select-list/components/status-cards/loading-card/LoadingCard.vue +0 -10
- package/src/components/select-list/components/status-cards/loading-card/index.ts +0 -1
- package/src/components/select-list/components/status-cards/no-match-card/NoMatchCard.vue +0 -15
- package/src/components/select-list/components/status-cards/no-match-card/index.ts +0 -1
- package/src/components/select-list/components/status-cards/status-card/StatusCard.vue +0 -25
- package/src/components/select-list/components/status-cards/status-card/index.ts +0 -1
- package/src/components/select-list/index.ts +0 -5
- package/src/components/select-list/types.ts +0 -49
- package/src/components/side-over/SideOver.vue +0 -87
- package/src/components/side-over/index.ts +0 -1
- package/src/components/status-select/StatusIndicator.vue +0 -78
- package/src/components/status-select/StatusSelect.vue +0 -62
- package/src/components/status-select/index.ts +0 -1
- package/src/components/switch/Switch.vue +0 -52
- package/src/components/switch/index.ts +0 -1
- package/src/components/tab/Tab.vue +0 -65
- package/src/components/tab/index.ts +0 -1
- package/src/components/tag/Tag.vue +0 -34
- package/src/components/tag/index.ts +0 -1
- package/src/components/text-editor/TextEditor.vue +0 -399
- package/src/components/text-editor/components/Dialog.vue +0 -11
- package/src/components/text-editor/components/FormattingButton.vue +0 -46
- package/src/components/text-editor/components/InsertLinkDialog.vue +0 -81
- package/src/components/text-editor/components/InsertTextDialog.vue +0 -36
- package/src/components/text-editor/components/index.ts +0 -3
- package/src/components/text-editor/index.ts +0 -1
- package/src/components/text-highlight/TextHighlight.vue +0 -113
- package/src/components/text-highlight/index.ts +0 -1
- package/src/components/text-viewer/TextViewer.vue +0 -5
- package/src/components/text-viewer/index.ts +0 -1
- package/src/components/toggle-button/ToggleButton.vue +0 -105
- package/src/components/toggle-button/index.ts +0 -1
- package/src/components/tooltip/Tooltip.vue +0 -54
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/types.ts +0 -232
- package/src/components/vertical-layout/RunningSection.vue +0 -54
- package/src/components/vertical-layout/VerticalLayout.vue +0 -37
- package/src/components/vertical-layout/index.ts +0 -3
- package/src/components/vertical-layout/types.ts +0 -2
- package/src/components/window-frame/WindowFrame.vue +0 -20
- package/src/components/window-frame/index.ts +0 -1
- package/src/composables/index.ts +0 -5
- package/src/composables/useClickOutside.ts +0 -48
- package/src/composables/useEscapeKey.ts +0 -12
- package/src/composables/useMounted.ts +0 -7
- package/src/composables/useNextFrame.ts +0 -10
- package/src/composables/useTrapFocus.ts +0 -61
- package/src/index.ts +0 -5
- package/src/main.css +0 -140
- package/src/utils/array.ts +0 -11
- package/src/utils/capitalizeFirstLetter.ts +0 -4
- package/src/utils/clamp.ts +0 -9
- package/src/utils/debounce.ts +0 -8
- package/src/utils/index.ts +0 -5
- package/src/utils/scrollIntoView.ts +0 -25
- package/src/utils/scrollbarWidth.ts +0 -27
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BDeleteButton } from "./DeleteButton.vue";
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { TOverlayType } from "../types";
|
|
3
|
-
import { onMounted, ref } from "vue";
|
|
4
|
-
import { BButton, BFadeInUp, BScreenOverlay, BVerticalLayout, BWindowFrame } from "../";
|
|
5
|
-
import { useEscapeKey } from "../../composables";
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(
|
|
8
|
-
defineProps<{
|
|
9
|
-
closeable?: boolean;
|
|
10
|
-
overlayType?: TOverlayType;
|
|
11
|
-
target?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
}>(),
|
|
14
|
-
{
|
|
15
|
-
closeable: true,
|
|
16
|
-
overlayType: "default",
|
|
17
|
-
target: "#modals",
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const emit = defineEmits(["close"]);
|
|
22
|
-
|
|
23
|
-
const show = ref(false);
|
|
24
|
-
const windowRef = ref<typeof BWindowFrame>();
|
|
25
|
-
|
|
26
|
-
// when component is mounted start the transition
|
|
27
|
-
onMounted(() => (show.value = true));
|
|
28
|
-
|
|
29
|
-
const close = () => (show.value = false);
|
|
30
|
-
const onClose = () => props.closeable && close();
|
|
31
|
-
props.closeable && useEscapeKey(onClose);
|
|
32
|
-
|
|
33
|
-
const onTransitionAfterEnter = () => {
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
defineExpose({ close });
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<Teleport :to="props.target">
|
|
42
|
-
<BScreenOverlay :show="show" :type="overlayType" class="p-2 md:pt-32" @click="onClose" @close="emit('close')">
|
|
43
|
-
<BFadeInUp @transition-after-enter="onTransitionAfterEnter">
|
|
44
|
-
<BWindowFrame v-show="show" ref="windowRef" class="h-64 max-w-2xl md:w-1/2 md:max-w-lg p-4 md:px-8">
|
|
45
|
-
<BVerticalLayout>
|
|
46
|
-
<template #header>
|
|
47
|
-
<header class="flex items-center justify-between w-full h-12">
|
|
48
|
-
<h4 v-if="props.title">
|
|
49
|
-
{{ props.title }}
|
|
50
|
-
</h4>
|
|
51
|
-
<h4 v-else>
|
|
52
|
-
<slot name="title" />
|
|
53
|
-
</h4>
|
|
54
|
-
<BButton v-if="props.closeable" small icon="close" variant="textSubtle" @click="onClose" />
|
|
55
|
-
</header>
|
|
56
|
-
</template>
|
|
57
|
-
<template #main>
|
|
58
|
-
<slot name="main" />
|
|
59
|
-
</template>
|
|
60
|
-
<template #footer>
|
|
61
|
-
<footer class="flex items-center h-12">
|
|
62
|
-
<slot name="footer" />
|
|
63
|
-
</footer>
|
|
64
|
-
</template>
|
|
65
|
-
</BVerticalLayout>
|
|
66
|
-
</BWindowFrame>
|
|
67
|
-
</BFadeInUp>
|
|
68
|
-
</BScreenOverlay>
|
|
69
|
-
</Teleport>
|
|
70
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BDialog } from "./Dialog.vue";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const emit = defineEmits(["transition-after-enter"]);
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<template>
|
|
6
|
-
<transition
|
|
7
|
-
enter-active-class="transform transition ease-in-out duration-300 delay-100"
|
|
8
|
-
enter-from-class="translate-y-2 opacity-0"
|
|
9
|
-
enter-to-class=""
|
|
10
|
-
leave-active-class="transform transition ease-in-out duration-100"
|
|
11
|
-
leave-class="translate-y-0 opacity-100"
|
|
12
|
-
leave-to-class="translate-y-2 opacity-0"
|
|
13
|
-
@after-enter="emit('transition-after-enter')"
|
|
14
|
-
>
|
|
15
|
-
<slot />
|
|
16
|
-
</transition>
|
|
17
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BFadeInUp } from "./FadeInUp.vue";
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { BDeleteButton } from "../delete-button";
|
|
3
|
-
|
|
4
|
-
const { count = 0, deletable = false } = defineProps<{
|
|
5
|
-
label: string;
|
|
6
|
-
active: boolean;
|
|
7
|
-
deletable?: boolean;
|
|
8
|
-
count?: number;
|
|
9
|
-
}>();
|
|
10
|
-
defineEmits(["click", "delete"]);
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<button
|
|
15
|
-
class="h-6 py-2 rounded-md flex items-center gap-1 cursor-pointer"
|
|
16
|
-
:class="{
|
|
17
|
-
'px-2 border border-default text-tertiary hover:bg-secondary hover:text-secondary hover:border-strong active:bg-tertiary active:text-primary active:border-strong': !active,
|
|
18
|
-
'border border-transparent text-white bg-cyan-600 hover:bg-cyan-700 active:bg-cyan-800': active,
|
|
19
|
-
'pl-2 pr-1': active && deletable,
|
|
20
|
-
'px-2': active && !deletable,
|
|
21
|
-
}"
|
|
22
|
-
@click="$emit('click')"
|
|
23
|
-
>
|
|
24
|
-
<span class="text-sm">{{ label }}</span>
|
|
25
|
-
<span v-if="active && count" class="h-4 px-1 min-w-4 flex items-center justify-center rounded-full text-xs font-medium bg-black/15 ">{{ count }}</span>
|
|
26
|
-
<BDeleteButton v-if="deletable && active" data-theme="dark" @click="$emit('delete')" />
|
|
27
|
-
</button>
|
|
28
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BFilterChip } from "./FilterChip.vue";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted } from "vue";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{ delayIndex: number }>();
|
|
6
|
-
|
|
7
|
-
onMounted(() => {
|
|
8
|
-
if (props.delayIndex < 1 || props.delayIndex > 20) {
|
|
9
|
-
throw new Error("delayIndex has to be between 1 and 20");
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div class="first-paint rounded" :class="`delay-${delayIndex}`">
|
|
16
|
-
<div class="opacity-0">
|
|
17
|
-
<slot v-if="$slots.default" />
|
|
18
|
-
<span v-else>Some random text</span>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BFirstPaint } from "./FirstPaint.vue";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
$color1: #eee;
|
|
2
|
-
$color2: #bbb;
|
|
3
|
-
|
|
4
|
-
.first-paint {
|
|
5
|
-
background-color: var(--color-bg-tertiary);
|
|
6
|
-
animation-name: fade;
|
|
7
|
-
animation-duration: 3s;
|
|
8
|
-
animation-iteration-count: infinite;
|
|
9
|
-
|
|
10
|
-
@for $i from 1 through 20 {
|
|
11
|
-
&.delay-#{$i} {
|
|
12
|
-
animation-delay: $i * 0.1s;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@keyframes fade {
|
|
18
|
-
0% { background-color: var(--color-bg-tertiary); }
|
|
19
|
-
5% { background-color: var(--color-bg-tertiary); }
|
|
20
|
-
25% { background-color: var(--color-bg-secondary); }
|
|
21
|
-
45% { background-color: var(--color-bg-tertiary); }
|
|
22
|
-
100% { background-color: var(--color-bg-tertiary); }
|
|
23
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { TAlignment, TJustification } from "../types";
|
|
3
|
-
import { computed } from "vue";
|
|
4
|
-
|
|
5
|
-
const props = withDefaults(
|
|
6
|
-
defineProps<{
|
|
7
|
-
align?: TAlignment;
|
|
8
|
-
col?: boolean;
|
|
9
|
-
inline?: boolean;
|
|
10
|
-
justify?: TJustification;
|
|
11
|
-
tag?: string;
|
|
12
|
-
}>(),
|
|
13
|
-
{
|
|
14
|
-
align: "center",
|
|
15
|
-
col: false,
|
|
16
|
-
inline: false,
|
|
17
|
-
justify: "start",
|
|
18
|
-
tag: "div",
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const alignmentClasses: Record<TAlignment, string> = {
|
|
23
|
-
start: "items-start",
|
|
24
|
-
end: "items-end",
|
|
25
|
-
center: "items-center",
|
|
26
|
-
stretch: "items-stretch",
|
|
27
|
-
} as const;
|
|
28
|
-
|
|
29
|
-
const justificationClasses: Record<TJustification, string> = {
|
|
30
|
-
around: "justify-around",
|
|
31
|
-
between: "justify-between",
|
|
32
|
-
center: "justify-center",
|
|
33
|
-
end: "justify-end",
|
|
34
|
-
evenly: "justify-evenly",
|
|
35
|
-
start: "justify-start",
|
|
36
|
-
stretch: "justify-stretch",
|
|
37
|
-
} as const;
|
|
38
|
-
|
|
39
|
-
const classes = computed(() => ([
|
|
40
|
-
props.inline ? "inline-flex" : "flex",
|
|
41
|
-
props.col ? "flex-col items-stretch" : "",
|
|
42
|
-
props.align ? alignmentClasses[props.align] : "",
|
|
43
|
-
props.justify ? justificationClasses[props.justify] : "",
|
|
44
|
-
]));
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<template>
|
|
48
|
-
<component :is="tag" :class="classes">
|
|
49
|
-
<slot />
|
|
50
|
-
</component>
|
|
51
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BFlexbox } from "./Flexbox.vue";
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from "vue";
|
|
3
|
-
import { clamp } from "../../utils";
|
|
4
|
-
|
|
5
|
-
const props = withDefaults(
|
|
6
|
-
defineProps<{
|
|
7
|
-
width?: number;
|
|
8
|
-
border?: boolean;
|
|
9
|
-
draggable?: boolean;
|
|
10
|
-
visible?: boolean;
|
|
11
|
-
side?: "left" | "right";
|
|
12
|
-
maxWidth?: number;
|
|
13
|
-
minWidth?: number;
|
|
14
|
-
}>(),
|
|
15
|
-
{
|
|
16
|
-
border: false,
|
|
17
|
-
draggable: false,
|
|
18
|
-
visible: true,
|
|
19
|
-
side: "left",
|
|
20
|
-
maxWidth: 1000,
|
|
21
|
-
minWidth: 160,
|
|
22
|
-
width: 256,
|
|
23
|
-
},
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const emit = defineEmits(["resize-start", "resize", "resize-end", "transitioning"]);
|
|
27
|
-
|
|
28
|
-
const aside = ref<HTMLElement>();
|
|
29
|
-
const classes = computed(() => [
|
|
30
|
-
props.side === "left" ? "left-0" : "right-0",
|
|
31
|
-
props.border ? (props.side === "left" ? "border-r border-default" : "border-l border-default") : "",
|
|
32
|
-
]);
|
|
33
|
-
const enterClass = props.side === "left" ? "-translate-x-full" : "translate-x-full";
|
|
34
|
-
const leaveToClass = props.side === "left" ? "-translate-x-full" : "translate-x-full";
|
|
35
|
-
|
|
36
|
-
let startX: number;
|
|
37
|
-
let startWidth: number;
|
|
38
|
-
const dragging = ref(false);
|
|
39
|
-
const transitioning = ref(false);
|
|
40
|
-
|
|
41
|
-
function startDrag(event: MouseEvent) {
|
|
42
|
-
startX = event.pageX;
|
|
43
|
-
startWidth = props.width;
|
|
44
|
-
dragging.value = true;
|
|
45
|
-
window.addEventListener("mouseup", endDrag);
|
|
46
|
-
window.addEventListener("mousemove", onDrag);
|
|
47
|
-
emit("resize-start");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function onDrag(event: MouseEvent) {
|
|
51
|
-
const deltaX = props.side === "left" ? event.pageX - startX : startX - event.pageX;
|
|
52
|
-
|
|
53
|
-
const dragTo = startWidth + deltaX;
|
|
54
|
-
const result = clamp(dragTo, props.minWidth, props.maxWidth);
|
|
55
|
-
|
|
56
|
-
if (result !== props.width) {
|
|
57
|
-
emit("resize", result);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function endDrag() {
|
|
62
|
-
dragging.value = false;
|
|
63
|
-
window.removeEventListener("mouseup", endDrag);
|
|
64
|
-
window.removeEventListener("mousemove", onDrag);
|
|
65
|
-
emit("resize-end");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function onTransition(transitionActive: boolean, focusAside: boolean) {
|
|
69
|
-
if (focusAside && aside.value) {
|
|
70
|
-
aside.value.focus();
|
|
71
|
-
}
|
|
72
|
-
transitioning.value = transitionActive;
|
|
73
|
-
emit("transitioning", transitioning.value);
|
|
74
|
-
}
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<transition
|
|
79
|
-
key="aside"
|
|
80
|
-
enter-active-class="transform"
|
|
81
|
-
:enter-from-class="enterClass"
|
|
82
|
-
enter-to-class=""
|
|
83
|
-
leave-active-class="transform"
|
|
84
|
-
leave-class="translate-x-0"
|
|
85
|
-
:leave-to-class="leaveToClass"
|
|
86
|
-
@before-leave="onTransition(true, false)"
|
|
87
|
-
@after-leave="onTransition(false, false)"
|
|
88
|
-
@before-enter="onTransition(true, false)"
|
|
89
|
-
@after-enter="onTransition(false, true)"
|
|
90
|
-
>
|
|
91
|
-
<aside
|
|
92
|
-
v-show="visible"
|
|
93
|
-
ref="aside"
|
|
94
|
-
tabindex="0"
|
|
95
|
-
:style="{
|
|
96
|
-
width: `${width}px`,
|
|
97
|
-
transitionProperty: dragging ? 'none' : 'transform, width',
|
|
98
|
-
}"
|
|
99
|
-
class="absolute top-0 z-10 h-full overflow-x-hidden duration-500 ease-in-out bg-primary"
|
|
100
|
-
:class="classes"
|
|
101
|
-
>
|
|
102
|
-
<slot />
|
|
103
|
-
<button
|
|
104
|
-
v-if="props.draggable"
|
|
105
|
-
class="absolute top-0 h-full w-1 hover:border-action hover:bg-tertiary cursor-ew-resize"
|
|
106
|
-
:class="[
|
|
107
|
-
props.side === 'left' ? 'right-0 border-r' : 'left-0 border-l',
|
|
108
|
-
dragging ? 'border-action bg-tertiary' : 'border-transparent bg-transparent',
|
|
109
|
-
]"
|
|
110
|
-
@mousedown="startDrag"
|
|
111
|
-
/>
|
|
112
|
-
</aside>
|
|
113
|
-
</transition>
|
|
114
|
-
</template>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, onMounted, ref, useSlots, watch } from "vue";
|
|
3
|
-
import AsideComponent from "./Aside.vue";
|
|
4
|
-
|
|
5
|
-
const props = withDefaults(
|
|
6
|
-
defineProps<{
|
|
7
|
-
asideLeftBgColorClass?: string;
|
|
8
|
-
asideLeftDraggable?: boolean;
|
|
9
|
-
asideLeftVisible?: boolean;
|
|
10
|
-
asideLeftWidth?: number;
|
|
11
|
-
asideRightBgColorClass?: string;
|
|
12
|
-
asideRightDraggable?: boolean;
|
|
13
|
-
asideRightVisible?: boolean;
|
|
14
|
-
asideRightWidth?: number;
|
|
15
|
-
borders?: boolean;
|
|
16
|
-
mainBgColorClass?: string;
|
|
17
|
-
}>(),
|
|
18
|
-
{
|
|
19
|
-
asideLeftBgColorClass: "",
|
|
20
|
-
asideLeftDraggable: false,
|
|
21
|
-
asideLeftVisible: false,
|
|
22
|
-
asideLeftWidth: 256,
|
|
23
|
-
asideRightBgColorClass: "",
|
|
24
|
-
asideRightDraggable: false,
|
|
25
|
-
asideRightVisible: false,
|
|
26
|
-
asideRightWidth: 256,
|
|
27
|
-
borders: false,
|
|
28
|
-
mainBgColorClass: "",
|
|
29
|
-
},
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const emit = defineEmits(["aside-left-transition-end", "aside-right-transition-end"]);
|
|
33
|
-
|
|
34
|
-
// Resizing is when one of the asides is resized by dragging - then we remove transition classes
|
|
35
|
-
const resizing = ref(false);
|
|
36
|
-
|
|
37
|
-
// we cannot mutate props, so we create a local copy - TODO... should we not just emit the new value
|
|
38
|
-
const localAsideLeftWidth = ref(props.asideLeftWidth);
|
|
39
|
-
const localAsideRightWidth = ref(props.asideRightWidth);
|
|
40
|
-
const paddingLeft = ref(props.asideLeftWidth);
|
|
41
|
-
const paddingRight = ref(props.asideRightWidth);
|
|
42
|
-
const mainStyle = computed(() => ({
|
|
43
|
-
paddingLeft: `${paddingLeft.value}px`,
|
|
44
|
-
paddingRight: `${paddingRight.value}px`,
|
|
45
|
-
}));
|
|
46
|
-
const onAsideLeftResize = (size: number) => (localAsideLeftWidth.value = paddingLeft.value = size);
|
|
47
|
-
const onAsideLeftTransition = (transitioning: boolean) => !transitioning && emit("aside-left-transition-end");
|
|
48
|
-
const onAsideRightResize = (size: number) => (localAsideRightWidth.value = paddingRight.value = size);
|
|
49
|
-
const onAsideRightTransition = (transitioning: boolean) => !transitioning && emit("aside-right-transition-end");
|
|
50
|
-
|
|
51
|
-
// For transitioning the padding on <main>
|
|
52
|
-
watch(
|
|
53
|
-
() => props.asideLeftVisible,
|
|
54
|
-
newValue => (paddingLeft.value = newValue ? localAsideLeftWidth.value : 0),
|
|
55
|
-
);
|
|
56
|
-
watch(
|
|
57
|
-
() => props.asideRightVisible,
|
|
58
|
-
newValue => (paddingRight.value = newValue ? localAsideRightWidth.value : 0),
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
// For triggering transition to a specific width
|
|
62
|
-
watch(
|
|
63
|
-
() => props.asideLeftWidth,
|
|
64
|
-
newValue => (localAsideLeftWidth.value = paddingLeft.value = newValue),
|
|
65
|
-
);
|
|
66
|
-
watch(
|
|
67
|
-
() => props.asideRightWidth,
|
|
68
|
-
newValue => (localAsideRightWidth.value = paddingRight.value = newValue),
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const slots = useSlots();
|
|
72
|
-
|
|
73
|
-
onMounted(() => {
|
|
74
|
-
paddingLeft.value = props.asideLeftVisible && slots["aside-left"] ? localAsideLeftWidth.value : 0;
|
|
75
|
-
paddingRight.value = props.asideRightVisible && slots["aside-right"] ? localAsideRightWidth.value : 0;
|
|
76
|
-
});
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
<template>
|
|
80
|
-
<div class="relative w-full h-full overflow-hidden bg-primary">
|
|
81
|
-
<AsideComponent
|
|
82
|
-
v-if="slots['aside-left']"
|
|
83
|
-
side="left"
|
|
84
|
-
:border="props.borders"
|
|
85
|
-
:draggable="asideLeftDraggable"
|
|
86
|
-
:visible="asideLeftVisible"
|
|
87
|
-
:width="localAsideLeftWidth"
|
|
88
|
-
@resize-start="resizing = true"
|
|
89
|
-
@resize="onAsideLeftResize"
|
|
90
|
-
@resize-end="resizing = false"
|
|
91
|
-
@transitioning="onAsideLeftTransition"
|
|
92
|
-
>
|
|
93
|
-
<slot name="aside-left" />
|
|
94
|
-
</AsideComponent>
|
|
95
|
-
<!-- responsiveness: md and above -->
|
|
96
|
-
<main
|
|
97
|
-
class="relative z-0 h-full overflow-x-hidden overflow-y-auto"
|
|
98
|
-
:class="[props.mainBgColorClass, resizing ? null : 'transition-padding duration-500 ease-in-out']"
|
|
99
|
-
:style="mainStyle"
|
|
100
|
-
>
|
|
101
|
-
<slot name="main" />
|
|
102
|
-
</main>
|
|
103
|
-
<AsideComponent
|
|
104
|
-
v-if="slots['aside-right']"
|
|
105
|
-
side="right"
|
|
106
|
-
:border="props.borders"
|
|
107
|
-
:draggable="asideRightDraggable"
|
|
108
|
-
:visible="asideRightVisible"
|
|
109
|
-
:width="localAsideRightWidth"
|
|
110
|
-
@resize-start="resizing = true"
|
|
111
|
-
@resize="onAsideRightResize"
|
|
112
|
-
@resize-end="resizing = false"
|
|
113
|
-
@transitioning="onAsideRightTransition"
|
|
114
|
-
>
|
|
115
|
-
<slot name="aside-right" />
|
|
116
|
-
</AsideComponent>
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|