@for-the-people-initiative/design-system 1.3.1
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/README.md +80 -0
- package/dist/css/theme-dark.css +7 -0
- package/dist/css/tokens.css +2315 -0
- package/dist/scss/_tokens.scss +2521 -0
- package/dist/ts/tokens.ts +2441 -0
- package/package.json +80 -0
- package/src/components/Accordion/Accordion.scss +118 -0
- package/src/components/Accordion/Accordion.vue +105 -0
- package/src/components/Accordion/AccordionTab.vue +79 -0
- package/src/components/Alert/Alert.scss +109 -0
- package/src/components/Alert/Alert.vue +79 -0
- package/src/components/AppBar/AppBar.scss +73 -0
- package/src/components/AppBar/AppBar.vue +49 -0
- package/src/components/AtmosphericBackground/AtmosphericBackground.vue +198 -0
- package/src/components/AutoComplete/AutoComplete.scss +282 -0
- package/src/components/AutoComplete/AutoComplete.vue +398 -0
- package/src/components/Avatar/Avatar.scss +191 -0
- package/src/components/Avatar/Avatar.vue +44 -0
- package/src/components/Badge/Badge.scss +84 -0
- package/src/components/Badge/Badge.vue +41 -0
- package/src/components/BlockUI/BlockUI.scss +85 -0
- package/src/components/BlockUI/BlockUI.vue +90 -0
- package/src/components/Breadcrumb/Breadcrumb.scss +84 -0
- package/src/components/Breadcrumb/Breadcrumb.vue +141 -0
- package/src/components/Button/Button.scss +254 -0
- package/src/components/Button/Button.vue +68 -0
- package/src/components/CTA/CTA.scss +92 -0
- package/src/components/CTA/CTA.vue +33 -0
- package/src/components/Calendar/Calendar.scss +330 -0
- package/src/components/Calendar/Calendar.vue +455 -0
- package/src/components/Card/Card.scss +66 -0
- package/src/components/Card/Card.vue +48 -0
- package/src/components/Carousel/Carousel.scss +121 -0
- package/src/components/Carousel/Carousel.vue +191 -0
- package/src/components/Chart/Chart.scss +109 -0
- package/src/components/Chart/Chart.vue +209 -0
- package/src/components/Checkbox/Checkbox.scss +148 -0
- package/src/components/Checkbox/Checkbox.vue +75 -0
- package/src/components/Chip/Chip.scss +83 -0
- package/src/components/Chip/Chip.vue +73 -0
- package/src/components/ColorPicker/ColorPicker.scss +244 -0
- package/src/components/ColorPicker/ColorPicker.vue +411 -0
- package/src/components/Column/Column.scss +87 -0
- package/src/components/Column/Column.vue +45 -0
- package/src/components/ColumnGroup/ColumnGroup.scss +41 -0
- package/src/components/ColumnGroup/ColumnGroup.vue +27 -0
- package/src/components/ColumnGroup/ColumnGroupRow.vue +18 -0
- package/src/components/CommandPalette/CommandPalette.scss +143 -0
- package/src/components/CommandPalette/CommandPalette.vue +165 -0
- package/src/components/ConfirmDialog/ConfirmDialog.scss +177 -0
- package/src/components/ConfirmDialog/ConfirmDialog.vue +162 -0
- package/src/components/ConfirmPopup/ConfirmPopup.scss +180 -0
- package/src/components/ConfirmPopup/ConfirmPopup.vue +185 -0
- package/src/components/ContextMenu/ContextMenu.scss +171 -0
- package/src/components/ContextMenu/ContextMenu.vue +383 -0
- package/src/components/DataTable/DataTable.scss +162 -0
- package/src/components/DataTable/DataTable.vue +225 -0
- package/src/components/DataView/DataView.scss +149 -0
- package/src/components/DataView/DataView.vue +172 -0
- package/src/components/DatePicker/DatePicker.scss +71 -0
- package/src/components/DatePicker/DatePicker.vue +121 -0
- package/src/components/Dialog/Dialog.scss +161 -0
- package/src/components/Dialog/Dialog.vue +245 -0
- package/src/components/Divider/Divider.scss +147 -0
- package/src/components/Divider/Divider.vue +49 -0
- package/src/components/Dock/Dock.scss +221 -0
- package/src/components/Dock/Dock.vue +107 -0
- package/src/components/Drawer/Drawer.scss +220 -0
- package/src/components/Drawer/Drawer.vue +137 -0
- package/src/components/Dropdown/Dropdown.scss +218 -0
- package/src/components/Dropdown/Dropdown.vue +313 -0
- package/src/components/Editor/Editor.scss +156 -0
- package/src/components/Editor/Editor.vue +253 -0
- package/src/components/FAQ/FAQ.scss +24 -0
- package/src/components/FAQ/FAQ.vue +28 -0
- package/src/components/FeatureGrid/FeatureGrid.scss +92 -0
- package/src/components/FeatureGrid/FeatureGrid.vue +39 -0
- package/src/components/FieldSet/FieldSet.scss +97 -0
- package/src/components/FieldSet/FieldSet.vue +70 -0
- package/src/components/FileUpload/FileUpload.scss +137 -0
- package/src/components/FileUpload/FileUpload.vue +183 -0
- package/src/components/Footer/Footer.scss +95 -0
- package/src/components/Footer/Footer.vue +59 -0
- package/src/components/Form/Form.scss +72 -0
- package/src/components/Form/Form.vue +30 -0
- package/src/components/Form/FormField.vue +42 -0
- package/src/components/Galleria/Galleria.scss +295 -0
- package/src/components/Galleria/Galleria.vue +274 -0
- package/src/components/Hero/Hero.scss +116 -0
- package/src/components/Hero/Hero.vue +57 -0
- package/src/components/Image/Image.scss +129 -0
- package/src/components/Image/Image.vue +117 -0
- package/src/components/ImageCompare/ImageCompare.scss +97 -0
- package/src/components/ImageCompare/ImageCompare.vue +66 -0
- package/src/components/InPlace/InPlace.scss +97 -0
- package/src/components/InPlace/InPlace.vue +107 -0
- package/src/components/InlineMessage/InlineMessage.scss +69 -0
- package/src/components/InlineMessage/InlineMessage.vue +47 -0
- package/src/components/InputChips/InputChips.scss +165 -0
- package/src/components/InputChips/InputChips.vue +169 -0
- package/src/components/InputGroup/InputGroup.scss +57 -0
- package/src/components/InputGroup/InputGroup.vue +22 -0
- package/src/components/InputGroupAddon/InputGroupAddon.scss +28 -0
- package/src/components/InputGroupAddon/InputGroupAddon.vue +22 -0
- package/src/components/InputIcon/InputIcon.scss +58 -0
- package/src/components/InputIcon/InputIcon.vue +28 -0
- package/src/components/InputMask/InputMask.scss +65 -0
- package/src/components/InputMask/InputMask.vue +268 -0
- package/src/components/InputNumber/InputNumber.scss +122 -0
- package/src/components/InputNumber/InputNumber.vue +150 -0
- package/src/components/InputOtp/InputOtp.scss +88 -0
- package/src/components/InputOtp/InputOtp.vue +230 -0
- package/src/components/InputSwitch/InputSwitch.scss +131 -0
- package/src/components/InputSwitch/InputSwitch.vue +49 -0
- package/src/components/InputText/InputText.scss +61 -0
- package/src/components/InputText/InputText.vue +71 -0
- package/src/components/Knob/Knob.scss +92 -0
- package/src/components/Knob/Knob.vue +252 -0
- package/src/components/ListBox/ListBox.scss +152 -0
- package/src/components/ListBox/ListBox.vue +198 -0
- package/src/components/LogoCloud/LogoCloud.scss +64 -0
- package/src/components/LogoCloud/LogoCloud.vue +35 -0
- package/src/components/MegaMenu/MegaMenu.scss +280 -0
- package/src/components/MegaMenu/MegaMenu.vue +218 -0
- package/src/components/Menu/Menu.scss +102 -0
- package/src/components/Menu/Menu.vue +221 -0
- package/src/components/MenuBar/MenuBar.scss +208 -0
- package/src/components/MenuBar/MenuBar.vue +306 -0
- package/src/components/Message/Message.scss +126 -0
- package/src/components/Message/Message.vue +99 -0
- package/src/components/MeterGroup/MeterGroup.scss +105 -0
- package/src/components/MeterGroup/MeterGroup.vue +73 -0
- package/src/components/MultiSelect/MultiSelect.scss +239 -0
- package/src/components/MultiSelect/MultiSelect.vue +296 -0
- package/src/components/OrderList/OrderList.scss +133 -0
- package/src/components/OrderList/OrderList.vue +267 -0
- package/src/components/OrganizationChart/OrganizationChart.scss +145 -0
- package/src/components/OrganizationChart/OrganizationChart.vue +220 -0
- package/src/components/OverlayPanel/OverlayPanel.scss +69 -0
- package/src/components/OverlayPanel/OverlayPanel.vue +180 -0
- package/src/components/Paginator/Paginator.scss +130 -0
- package/src/components/Paginator/Paginator.vue +212 -0
- package/src/components/Panel/Panel.scss +113 -0
- package/src/components/Panel/Panel.vue +89 -0
- package/src/components/PanelMenu/PanelMenu.scss +211 -0
- package/src/components/PanelMenu/PanelMenu.vue +295 -0
- package/src/components/ParticleBackground/ParticleBackground.vue +310 -0
- package/src/components/PickList/PickList.scss +126 -0
- package/src/components/PickList/PickList.vue +249 -0
- package/src/components/PopOver/PopOver.scss +112 -0
- package/src/components/PopOver/PopOver.vue +254 -0
- package/src/components/PricingTable/PricingCard.vue +33 -0
- package/src/components/PricingTable/PricingTable.scss +133 -0
- package/src/components/PricingTable/PricingTable.vue +21 -0
- package/src/components/ProgressBar/ProgressBar.scss +58 -0
- package/src/components/ProgressBar/ProgressBar.vue +48 -0
- package/src/components/ProgressSpinner/ProgressSpinner.scss +48 -0
- package/src/components/ProgressSpinner/ProgressSpinner.vue +53 -0
- package/src/components/RadioButton/RadioButton.scss +148 -0
- package/src/components/RadioButton/RadioButton.vue +52 -0
- package/src/components/Rating/Rating.scss +109 -0
- package/src/components/Rating/Rating.vue +136 -0
- package/src/components/Row/Row.scss +38 -0
- package/src/components/Row/Row.vue +30 -0
- package/src/components/ScrollPanel/ScrollPanel.scss +90 -0
- package/src/components/ScrollPanel/ScrollPanel.vue +284 -0
- package/src/components/ScrollTop/ScrollTop.scss +59 -0
- package/src/components/ScrollTop/ScrollTop.vue +99 -0
- package/src/components/Section/Section.scss +58 -0
- package/src/components/Section/Section.vue +39 -0
- package/src/components/Select/Select.scss +98 -0
- package/src/components/Select/Select.vue +92 -0
- package/src/components/SelectButton/SelectButton.scss +65 -0
- package/src/components/SelectButton/SelectButton.vue +144 -0
- package/src/components/Sidebar/Sidebar.scss +170 -0
- package/src/components/Sidebar/Sidebar.vue +137 -0
- package/src/components/Skeleton/Skeleton.scss +43 -0
- package/src/components/Skeleton/Skeleton.vue +57 -0
- package/src/components/Slider/Slider.scss +103 -0
- package/src/components/Slider/Slider.vue +65 -0
- package/src/components/SpeedDial/SpeedDial.scss +217 -0
- package/src/components/SpeedDial/SpeedDial.vue +196 -0
- package/src/components/SplitButton/SplitButton.scss +264 -0
- package/src/components/SplitButton/SplitButton.vue +172 -0
- package/src/components/Splitter/Splitter.scss +95 -0
- package/src/components/Splitter/Splitter.vue +191 -0
- package/src/components/Splitter/SplitterPanel.vue +125 -0
- package/src/components/Stats/Stats.scss +54 -0
- package/src/components/Stats/Stats.vue +28 -0
- package/src/components/Steps/Steps.scss +164 -0
- package/src/components/Steps/Steps.vue +100 -0
- package/src/components/TabMenu/TabMenu.scss +106 -0
- package/src/components/TabMenu/TabMenu.vue +174 -0
- package/src/components/Tabs/TabPanel.vue +41 -0
- package/src/components/Tabs/Tabs.scss +82 -0
- package/src/components/Tabs/Tabs.vue +162 -0
- package/src/components/Tag/Tag.scss +73 -0
- package/src/components/Tag/Tag.vue +37 -0
- package/src/components/Terminal/Terminal.scss +80 -0
- package/src/components/Terminal/Terminal.vue +113 -0
- package/src/components/Testimonial/Testimonial.scss +80 -0
- package/src/components/Testimonial/Testimonial.vue +29 -0
- package/src/components/Textarea/Textarea.scss +65 -0
- package/src/components/Textarea/Textarea.vue +101 -0
- package/src/components/TieredMenu/TieredMenu.scss +146 -0
- package/src/components/TieredMenu/TieredMenu.vue +270 -0
- package/src/components/TieredMenu/TieredMenuSub.vue +132 -0
- package/src/components/Timeline/Timeline.scss +190 -0
- package/src/components/Timeline/Timeline.vue +79 -0
- package/src/components/Toast/Toast.scss +284 -0
- package/src/components/Toast/Toast.vue +162 -0
- package/src/components/ToggleButton/ToggleButton.scss +99 -0
- package/src/components/ToggleButton/ToggleButton.vue +65 -0
- package/src/components/ToggleSwitch/ToggleSwitch.scss +68 -0
- package/src/components/ToggleSwitch/ToggleSwitch.vue +44 -0
- package/src/components/Toolbar/Toolbar.scss +37 -0
- package/src/components/Toolbar/Toolbar.vue +23 -0
- package/src/components/Tooltip/Tooltip.scss +114 -0
- package/src/components/Tooltip/Tooltip.vue +169 -0
- package/src/components/Tree/Tree.scss +164 -0
- package/src/components/Tree/Tree.vue +273 -0
- package/src/components/TreeSelect/TreeSelect.scss +238 -0
- package/src/components/TreeSelect/TreeSelect.vue +401 -0
- package/src/components/TreeTable/TreeTable.scss +172 -0
- package/src/components/TreeTable/TreeTable.vue +285 -0
- package/src/components/VirtualScroller/VirtualScroller.scss +107 -0
- package/src/components/VirtualScroller/VirtualScroller.vue +234 -0
- package/src/scss/fonts.scss +63 -0
- package/src/scss/mixins/accent-gradient.scss +43 -0
- package/src/scss/mixins/border.scss +28 -0
- package/src/scss/mixins/breakpoint.scss +80 -0
- package/src/scss/mixins/container.scss +33 -0
- package/src/scss/mixins/elevation.scss +43 -0
- package/src/scss/mixins/grid.scss +23 -0
- package/src/scss/mixins/levitation.scss +15 -0
- package/src/scss/mixins/list.scss +5 -0
- package/src/scss/mixins/surface-atmospheric.scss +93 -0
- package/src/scss/mixins/surface.scss +19 -0
- package/src/scss/mixins/typography.scss +91 -0
- package/src/scss/utility-classes/utility-classes-spacing.scss +34 -0
- package/src/scss/utility-classes/utility-classes-typography.scss +114 -0
- package/tokens/components/accordion.json +127 -0
- package/tokens/components/autocomplete.json +238 -0
- package/tokens/components/avatar.json +220 -0
- package/tokens/components/badge.json +119 -0
- package/tokens/components/block-ui.json +40 -0
- package/tokens/components/breadcrumb.json +57 -0
- package/tokens/components/button.json +395 -0
- package/tokens/components/calendar.json +260 -0
- package/tokens/components/card.json +157 -0
- package/tokens/components/carousel.json +154 -0
- package/tokens/components/chart.json +132 -0
- package/tokens/components/checkbox.json +130 -0
- package/tokens/components/chip.json +100 -0
- package/tokens/components/color-picker.json +196 -0
- package/tokens/components/column-group.json +45 -0
- package/tokens/components/column.json +109 -0
- package/tokens/components/confirm-dialog.json +141 -0
- package/tokens/components/confirm-popup.json +101 -0
- package/tokens/components/context-menu.json +168 -0
- package/tokens/components/data-table.json +157 -0
- package/tokens/components/data-view.json +172 -0
- package/tokens/components/dialog.json +151 -0
- package/tokens/components/divider.json +45 -0
- package/tokens/components/dock.json +173 -0
- package/tokens/components/drawer.json +163 -0
- package/tokens/components/dropdown.json +230 -0
- package/tokens/components/editor.json +170 -0
- package/tokens/components/field-set.json +115 -0
- package/tokens/components/file-upload.json +193 -0
- package/tokens/components/galleria.json +235 -0
- package/tokens/components/image-compare.json +74 -0
- package/tokens/components/image.json +71 -0
- package/tokens/components/in-place.json +100 -0
- package/tokens/components/inline-message.json +107 -0
- package/tokens/components/input-chips.json +187 -0
- package/tokens/components/input-group-addon.json +47 -0
- package/tokens/components/input-group.json +21 -0
- package/tokens/components/input-icon.json +38 -0
- package/tokens/components/input-mask.json +136 -0
- package/tokens/components/input-number.json +144 -0
- package/tokens/components/input-otp.json +138 -0
- package/tokens/components/input-switch.json +108 -0
- package/tokens/components/input-text.json +136 -0
- package/tokens/components/knob.json +119 -0
- package/tokens/components/listbox.json +166 -0
- package/tokens/components/mega-menu.json +283 -0
- package/tokens/components/menu.json +145 -0
- package/tokens/components/menubar.json +152 -0
- package/tokens/components/message.json +151 -0
- package/tokens/components/meter-group.json +108 -0
- package/tokens/components/multi-select.json +244 -0
- package/tokens/components/order-list.json +193 -0
- package/tokens/components/organization-chart.json +188 -0
- package/tokens/components/overlay-panel.json +94 -0
- package/tokens/components/paginator.json +186 -0
- package/tokens/components/panel.json +120 -0
- package/tokens/components/panelmenu.json +190 -0
- package/tokens/components/picklist.json +187 -0
- package/tokens/components/popover.json +65 -0
- package/tokens/components/progress-bar.json +33 -0
- package/tokens/components/progress-spinner.json +38 -0
- package/tokens/components/radio.json +125 -0
- package/tokens/components/rating.json +76 -0
- package/tokens/components/row.json +62 -0
- package/tokens/components/scroll-panel.json +69 -0
- package/tokens/components/scroll-top.json +84 -0
- package/tokens/components/select-button.json +145 -0
- package/tokens/components/select.json +190 -0
- package/tokens/components/sidebar.json +146 -0
- package/tokens/components/skeleton.json +26 -0
- package/tokens/components/slider.json +82 -0
- package/tokens/components/speed-dial.json +144 -0
- package/tokens/components/split-button.json +316 -0
- package/tokens/components/splitter.json +88 -0
- package/tokens/components/steps.json +154 -0
- package/tokens/components/tabmenu.json +103 -0
- package/tokens/components/tabs.json +97 -0
- package/tokens/components/tag.json +122 -0
- package/tokens/components/terminal.json +100 -0
- package/tokens/components/textarea.json +96 -0
- package/tokens/components/tieredmenu.json +142 -0
- package/tokens/components/timeline.json +129 -0
- package/tokens/components/toast.json +281 -0
- package/tokens/components/toggle-button.json +220 -0
- package/tokens/components/toggle-switch.json +95 -0
- package/tokens/components/toolbar.json +41 -0
- package/tokens/components/tooltip.json +60 -0
- package/tokens/components/tree-select.json +224 -0
- package/tokens/components/tree.json +153 -0
- package/tokens/components/treetable.json +155 -0
- package/tokens/components/virtualscroller.json +95 -0
- package/tokens/primitives/color.json +137 -0
- package/tokens/primitives/radius.json +12 -0
- package/tokens/primitives/shadow.json +29 -0
- package/tokens/primitives/spacing.json +15 -0
- package/tokens/semantics/color.json +81 -0
- package/tokens/semantics/radius.json +10 -0
- package/tokens/semantics/shadow.json +9 -0
- package/tokens/semantics/spacing.json +24 -0
- package/tokens/themes/dark.json +7 -0
- package/tokens/themes/light.json +7 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="popover-wrapper"
|
|
4
|
+
@mouseenter="onMouseEnter"
|
|
5
|
+
@mouseleave="onMouseLeave"
|
|
6
|
+
@click="onClick"
|
|
7
|
+
@focus="onFocus"
|
|
8
|
+
@blur="onBlur"
|
|
9
|
+
>
|
|
10
|
+
<slot name="trigger" />
|
|
11
|
+
<Teleport to="body">
|
|
12
|
+
<Transition name="popover-fade">
|
|
13
|
+
<div
|
|
14
|
+
v-if="isVisible"
|
|
15
|
+
ref="popoverRef"
|
|
16
|
+
class="popover"
|
|
17
|
+
:class="positionClass"
|
|
18
|
+
:style="popoverStyle"
|
|
19
|
+
role="tooltip"
|
|
20
|
+
@mouseenter="onPopoverMouseEnter"
|
|
21
|
+
@mouseleave="onPopoverMouseLeave"
|
|
22
|
+
>
|
|
23
|
+
<div class="popover__content">
|
|
24
|
+
<slot />
|
|
25
|
+
</div>
|
|
26
|
+
<span class="popover__arrow" />
|
|
27
|
+
</div>
|
|
28
|
+
</Transition>
|
|
29
|
+
</Teleport>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style src="./PopOver.scss"></style>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import type { PopOverProps, PopOverEmits } from '../../types';
|
|
37
|
+
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from "vue";
|
|
38
|
+
|
|
39
|
+
defineOptions({ name: 'FtpPopOver' });
|
|
40
|
+
|
|
41
|
+
const props = withDefaults(defineProps<PopOverProps>(), {
|
|
42
|
+
trigger: "hover",
|
|
43
|
+
position: "top",
|
|
44
|
+
showDelay: 0,
|
|
45
|
+
hideDelay: 0,
|
|
46
|
+
disabled: false,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const emit = defineEmits(["update:visible", "show", "hide"]);
|
|
50
|
+
|
|
51
|
+
const internalVisible = ref(false);
|
|
52
|
+
const popoverRef = ref<HTMLElement | null>(null);
|
|
53
|
+
const popoverStyle = ref({});
|
|
54
|
+
const isOverPopover = ref(false);
|
|
55
|
+
let showTimeoutId: ReturnType<typeof setTimeout> | null = null;
|
|
56
|
+
let hideTimeoutId: ReturnType<typeof setTimeout> | null = null;
|
|
57
|
+
let triggerElement: HTMLElement | null = null;
|
|
58
|
+
|
|
59
|
+
// Support both controlled (v-model) and uncontrolled modes
|
|
60
|
+
const isVisible = computed(() => {
|
|
61
|
+
return props.visible !== undefined ? props.visible : internalVisible.value;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const positionClass = computed(() => `popover--${props.position}`);
|
|
65
|
+
|
|
66
|
+
function clearTimeouts() {
|
|
67
|
+
if (showTimeoutId) {
|
|
68
|
+
clearTimeout(showTimeoutId);
|
|
69
|
+
showTimeoutId = null;
|
|
70
|
+
}
|
|
71
|
+
if (hideTimeoutId) {
|
|
72
|
+
clearTimeout(hideTimeoutId);
|
|
73
|
+
hideTimeoutId = null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function show(event: Event) {
|
|
78
|
+
if (props.disabled) return;
|
|
79
|
+
|
|
80
|
+
clearTimeouts();
|
|
81
|
+
if (event?.currentTarget) {
|
|
82
|
+
triggerElement = event.currentTarget as HTMLElement;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const doShow = () => {
|
|
86
|
+
if (props.visible !== undefined) {
|
|
87
|
+
emit("update:visible", true);
|
|
88
|
+
} else {
|
|
89
|
+
internalVisible.value = true;
|
|
90
|
+
}
|
|
91
|
+
emit("show");
|
|
92
|
+
nextTick(updatePosition);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (props.showDelay > 0) {
|
|
96
|
+
showTimeoutId = setTimeout(doShow, props.showDelay);
|
|
97
|
+
} else {
|
|
98
|
+
doShow();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function hide() {
|
|
103
|
+
clearTimeouts();
|
|
104
|
+
|
|
105
|
+
const doHide = () => {
|
|
106
|
+
if (isOverPopover.value) return;
|
|
107
|
+
|
|
108
|
+
if (props.visible !== undefined) {
|
|
109
|
+
emit("update:visible", false);
|
|
110
|
+
} else {
|
|
111
|
+
internalVisible.value = false;
|
|
112
|
+
}
|
|
113
|
+
emit("hide");
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
if (props.hideDelay > 0) {
|
|
117
|
+
hideTimeoutId = setTimeout(doHide, props.hideDelay);
|
|
118
|
+
} else {
|
|
119
|
+
doHide();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function toggle(event: Event) {
|
|
124
|
+
if (isVisible.value) {
|
|
125
|
+
hide();
|
|
126
|
+
} else {
|
|
127
|
+
show(event);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function updatePosition() {
|
|
132
|
+
if (!triggerElement || !popoverRef.value) return;
|
|
133
|
+
|
|
134
|
+
const triggerRect = triggerElement.getBoundingClientRect();
|
|
135
|
+
const popoverRect = popoverRef.value.getBoundingClientRect();
|
|
136
|
+
const offset = 10; // Matches popover.offset token
|
|
137
|
+
|
|
138
|
+
let top, left;
|
|
139
|
+
|
|
140
|
+
switch (props.position) {
|
|
141
|
+
case "top":
|
|
142
|
+
top = triggerRect.top - popoverRect.height - offset;
|
|
143
|
+
left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
|
|
144
|
+
break;
|
|
145
|
+
case "bottom":
|
|
146
|
+
top = triggerRect.bottom + offset;
|
|
147
|
+
left = triggerRect.left + (triggerRect.width - popoverRect.width) / 2;
|
|
148
|
+
break;
|
|
149
|
+
case "left":
|
|
150
|
+
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
151
|
+
left = triggerRect.left - popoverRect.width - offset;
|
|
152
|
+
break;
|
|
153
|
+
case "right":
|
|
154
|
+
top = triggerRect.top + (triggerRect.height - popoverRect.height) / 2;
|
|
155
|
+
left = triggerRect.right + offset;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Keep popover within viewport
|
|
160
|
+
const viewportPadding = 8;
|
|
161
|
+
left = Math.max(viewportPadding, Math.min(left, window.innerWidth - popoverRect.width - viewportPadding));
|
|
162
|
+
top = Math.max(viewportPadding, Math.min(top, window.innerHeight - popoverRect.height - viewportPadding));
|
|
163
|
+
|
|
164
|
+
popoverStyle.value = {
|
|
165
|
+
top: `${top}px`,
|
|
166
|
+
left: `${left}px`,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function onMouseEnter(event: MouseEvent) {
|
|
171
|
+
if (props.trigger === "hover") {
|
|
172
|
+
show(event);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function onMouseLeave() {
|
|
177
|
+
if (props.trigger === "hover") {
|
|
178
|
+
hide();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function onPopoverMouseEnter() {
|
|
183
|
+
if (props.trigger === "hover") {
|
|
184
|
+
isOverPopover.value = true;
|
|
185
|
+
clearTimeouts();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function onPopoverMouseLeave() {
|
|
190
|
+
if (props.trigger === "hover") {
|
|
191
|
+
isOverPopover.value = false;
|
|
192
|
+
hide();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function onClick(event: MouseEvent) {
|
|
197
|
+
if (props.trigger === "click") {
|
|
198
|
+
toggle(event);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function onFocus(event: FocusEvent) {
|
|
203
|
+
if (props.trigger === "hover") {
|
|
204
|
+
show(event);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function onBlur() {
|
|
209
|
+
if (props.trigger === "hover") {
|
|
210
|
+
hide();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function handleClickOutside(event: MouseEvent) {
|
|
215
|
+
if (props.trigger === "click" && isVisible.value && popoverRef.value && !popoverRef.value.contains(event.target as Node)) {
|
|
216
|
+
if (triggerElement && triggerElement.contains(event.target as Node)) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
hide();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function handleScroll() {
|
|
224
|
+
if (isVisible.value) {
|
|
225
|
+
updatePosition();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function handleResize() {
|
|
230
|
+
if (isVisible.value) {
|
|
231
|
+
updatePosition();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
onMounted(() => {
|
|
236
|
+
document.addEventListener("click", handleClickOutside, true);
|
|
237
|
+
window.addEventListener("scroll", handleScroll, true);
|
|
238
|
+
window.addEventListener("resize", handleResize);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
onUnmounted(() => {
|
|
242
|
+
clearTimeouts();
|
|
243
|
+
document.removeEventListener("click", handleClickOutside, true);
|
|
244
|
+
window.removeEventListener("scroll", handleScroll, true);
|
|
245
|
+
window.removeEventListener("resize", handleResize);
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
// Expose methods for external control
|
|
249
|
+
defineExpose({
|
|
250
|
+
show,
|
|
251
|
+
hide,
|
|
252
|
+
toggle,
|
|
253
|
+
});
|
|
254
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="pricing-card" :class="{ 'pricing-card--highlighted': highlighted }">
|
|
3
|
+
<div class="pricing-card__header">
|
|
4
|
+
<h3 class="pricing-card__name">{{ name }}</h3>
|
|
5
|
+
<div class="pricing-card__price">
|
|
6
|
+
<span v-if="currency" class="pricing-card__currency">{{ currency }}</span>
|
|
7
|
+
<span class="pricing-card__amount">{{ price }}</span>
|
|
8
|
+
<span v-if="interval" class="pricing-card__interval">/{{ interval }}</span>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<ul class="pricing-card__features">
|
|
12
|
+
<li v-for="(feature, i) in features" :key="i" class="pricing-card__feature">
|
|
13
|
+
<span class="pricing-card__check" aria-hidden="true">✓</span>
|
|
14
|
+
{{ feature }}
|
|
15
|
+
</li>
|
|
16
|
+
</ul>
|
|
17
|
+
<div class="pricing-card__footer">
|
|
18
|
+
<button class="pricing-card__cta" @click="ctaAction?.()">
|
|
19
|
+
{{ ctaLabel || 'Get started' }}
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
</article>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style src="./PricingTable.scss"></style>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import type { PricingCardProps } from '../../types';
|
|
29
|
+
|
|
30
|
+
defineOptions({ name: 'FtpPricingCard' });
|
|
31
|
+
|
|
32
|
+
defineProps<PricingCardProps>();
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
@use "../../scss/mixins/accent-gradient.scss" as *;
|
|
3
|
+
|
|
4
|
+
// PricingTable
|
|
5
|
+
$c: pricing-table;
|
|
6
|
+
|
|
7
|
+
.#{$c} {
|
|
8
|
+
display: grid;
|
|
9
|
+
gap: 2rem;
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$c}--cols-2 { grid-template-columns: repeat(2, 1fr); }
|
|
14
|
+
.#{$c}--cols-3 { grid-template-columns: repeat(3, 1fr); }
|
|
15
|
+
.#{$c}--cols-4 { grid-template-columns: repeat(4, 1fr); }
|
|
16
|
+
|
|
17
|
+
@media (max-width: 768px) {
|
|
18
|
+
.#{$c} { grid-template-columns: 1fr !important; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// PricingCard
|
|
22
|
+
$pc: pricing-card;
|
|
23
|
+
|
|
24
|
+
.#{$pc} {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
background-color: $surface-panel;
|
|
28
|
+
border: 1px solid $border-subtle;
|
|
29
|
+
border-radius: $radius-large;
|
|
30
|
+
padding: 2.5rem 2rem;
|
|
31
|
+
transition: box-shadow 0.2s ease;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
box-shadow: $shadow-s;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.#{$pc}--highlighted {
|
|
39
|
+
position: relative;
|
|
40
|
+
border: none;
|
|
41
|
+
background: linear-gradient($surface-panel, $surface-panel) padding-box,
|
|
42
|
+
linear-gradient(135deg, $accent-gradient-start, $accent-gradient-end) border-box;
|
|
43
|
+
border: 2px solid transparent;
|
|
44
|
+
box-shadow: $shadow-m;
|
|
45
|
+
transform: scale(1.03);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$pc}__header {
|
|
49
|
+
text-align: center;
|
|
50
|
+
margin-bottom: 2rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$pc}__name {
|
|
54
|
+
font-size: 1.125rem;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
color: $text-secondary;
|
|
57
|
+
margin: 0 0 1rem;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
letter-spacing: 0.05em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.#{$pc}__price {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: baseline;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
gap: 0.25rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.#{$pc}__currency {
|
|
70
|
+
font-size: 1.5rem;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
color: $text-heading;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.#{$pc}__amount {
|
|
76
|
+
font-size: 3rem;
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
line-height: 1;
|
|
79
|
+
color: $text-heading;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.#{$pc}__interval {
|
|
83
|
+
font-size: 1rem;
|
|
84
|
+
color: $text-muted;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.#{$pc}__features {
|
|
88
|
+
list-style: none;
|
|
89
|
+
padding: 0;
|
|
90
|
+
margin: 0 0 2rem;
|
|
91
|
+
flex: 1;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
gap: 0.75rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$pc}__feature {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 0.75rem;
|
|
101
|
+
font-size: 0.9375rem;
|
|
102
|
+
color: $text-secondary;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.#{$pc}__check {
|
|
106
|
+
@include accent-gradient-text();
|
|
107
|
+
font-weight: 700;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$pc}__footer {
|
|
111
|
+
margin-top: auto;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.#{$pc}__cta {
|
|
115
|
+
@include accent-gradient();
|
|
116
|
+
width: 100%;
|
|
117
|
+
padding: 0.875rem 1.5rem;
|
|
118
|
+
border: none;
|
|
119
|
+
border-radius: $radius-default;
|
|
120
|
+
color: #fff;
|
|
121
|
+
font-size: 1rem;
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
transition: opacity 0.2s ease;
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
@include accent-gradient("hover");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.#{$pc}--highlighted .#{$pc}__cta {
|
|
132
|
+
box-shadow: $shadow-s;
|
|
133
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pricing-table" :class="`pricing-table--cols-${columns}`">
|
|
3
|
+
<PricingCard
|
|
4
|
+
v-for="(plan, index) in plans"
|
|
5
|
+
:key="index"
|
|
6
|
+
v-bind="plan"
|
|
7
|
+
/>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { PricingTableProps } from '../../types';
|
|
13
|
+
import PricingCard from './PricingCard.vue';
|
|
14
|
+
|
|
15
|
+
defineOptions({ name: 'FtpPricingTable' });
|
|
16
|
+
|
|
17
|
+
withDefaults(defineProps<PricingTableProps>(), {
|
|
18
|
+
columns: 3,
|
|
19
|
+
plans: () => [],
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
@use "../../scss/mixins/accent-gradient.scss" as *;
|
|
3
|
+
|
|
4
|
+
$c: progress-bar;
|
|
5
|
+
|
|
6
|
+
.#{$c} {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{$c}__track {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: var(--progress-bar-track-height, $progress-bar-track-height);
|
|
14
|
+
background-color: var(--progress-bar-track-background, $progress-bar-track-background);
|
|
15
|
+
border-radius: var(--progress-bar-track-radius, $progress-bar-track-radius);
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.#{$c}__fill {
|
|
21
|
+
height: 100%;
|
|
22
|
+
@include accent-gradient($angle: 90deg);
|
|
23
|
+
border-radius: var(--progress-bar-track-radius, $progress-bar-track-radius);
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
transition: width 0.3s ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.#{$c}__fill--indeterminate {
|
|
31
|
+
width: 100%;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
@include accent-gradient($angle: 90deg);
|
|
36
|
+
animation: progress-bar-indeterminate 1.5s infinite ease-in-out;
|
|
37
|
+
transform-origin: left center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$c}__label {
|
|
41
|
+
padding: 0 8px;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
color: var(--progress-bar-label-color, $progress-bar-label-color);
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes progress-bar-indeterminate {
|
|
49
|
+
0% {
|
|
50
|
+
transform: translateX(-100%) scaleX(0.3);
|
|
51
|
+
}
|
|
52
|
+
50% {
|
|
53
|
+
transform: translateX(0%) scaleX(0.5);
|
|
54
|
+
}
|
|
55
|
+
100% {
|
|
56
|
+
transform: translateX(100%) scaleX(0.3);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="progress-bar"
|
|
4
|
+
:class="additionalClasses"
|
|
5
|
+
role="progressbar"
|
|
6
|
+
:aria-valuenow="mode === 'determinate' ? value : undefined"
|
|
7
|
+
:aria-valuemin="mode === 'determinate' ? 0 : undefined"
|
|
8
|
+
:aria-valuemax="mode === 'determinate' ? 100 : undefined"
|
|
9
|
+
>
|
|
10
|
+
<div class="progress-bar__track">
|
|
11
|
+
<div
|
|
12
|
+
v-if="mode === 'determinate'"
|
|
13
|
+
class="progress-bar__fill"
|
|
14
|
+
:style="fillStyle"
|
|
15
|
+
>
|
|
16
|
+
<span v-if="showValue" class="progress-bar__label">
|
|
17
|
+
<slot>{{ value }}%</slot>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-else class="progress-bar__fill progress-bar__fill--indeterminate" />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style src="./ProgressBar.scss"></style>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import type { ProgressBarProps } from '../../types';
|
|
29
|
+
import { computed } from "vue";
|
|
30
|
+
|
|
31
|
+
defineOptions({ name: 'FtpProgressBar' });
|
|
32
|
+
|
|
33
|
+
const props = withDefaults(defineProps<ProgressBarProps>(), {
|
|
34
|
+
value: 0,
|
|
35
|
+
showValue: true,
|
|
36
|
+
mode: "determinate",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const fillStyle = computed(() => ({
|
|
40
|
+
width: `${props.value}%`,
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
const additionalClasses = computed(() =>
|
|
44
|
+
[props.mode === "indeterminate" && "progress-bar--indeterminate"]
|
|
45
|
+
.filter(Boolean)
|
|
46
|
+
.join(" ")
|
|
47
|
+
);
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: progress-spinner;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: var(--progress-spinner-size, $progress-spinner-size);
|
|
10
|
+
height: var(--progress-spinner-size, $progress-spinner-size);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$c}__svg {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
animation: progress-spinner-rotate var(--progress-spinner-animation-duration, $progress-spinner-animation-duration) linear infinite;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.#{$c}__track {
|
|
20
|
+
stroke: var(--progress-spinner-track-color, $progress-spinner-track-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.#{$c}__circle {
|
|
24
|
+
stroke: var(--progress-spinner-color, $progress-spinner-color);
|
|
25
|
+
stroke-linecap: round;
|
|
26
|
+
animation: progress-spinner-dash var(--progress-spinner-animation-duration, $progress-spinner-animation-duration) ease-in-out infinite;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes progress-spinner-rotate {
|
|
30
|
+
100% {
|
|
31
|
+
transform: rotate(360deg);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes progress-spinner-dash {
|
|
36
|
+
0% {
|
|
37
|
+
stroke-dasharray: 1, 150;
|
|
38
|
+
stroke-dashoffset: 0;
|
|
39
|
+
}
|
|
40
|
+
50% {
|
|
41
|
+
stroke-dasharray: 90, 150;
|
|
42
|
+
stroke-dashoffset: -35;
|
|
43
|
+
}
|
|
44
|
+
100% {
|
|
45
|
+
stroke-dasharray: 90, 150;
|
|
46
|
+
stroke-dashoffset: -124;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="progress-spinner"
|
|
4
|
+
:class="additionalClasses"
|
|
5
|
+
role="progressbar"
|
|
6
|
+
aria-label="Loading"
|
|
7
|
+
aria-valuemin="0"
|
|
8
|
+
aria-valuemax="100"
|
|
9
|
+
:style="spinnerStyle"
|
|
10
|
+
>
|
|
11
|
+
<svg class="progress-spinner__svg" viewBox="0 0 50 50">
|
|
12
|
+
<!-- Background track circle -->
|
|
13
|
+
<circle
|
|
14
|
+
class="progress-spinner__track"
|
|
15
|
+
cx="25"
|
|
16
|
+
cy="25"
|
|
17
|
+
r="20"
|
|
18
|
+
fill="none"
|
|
19
|
+
:stroke-width="strokeWidth"
|
|
20
|
+
/>
|
|
21
|
+
<!-- Animated spinner circle -->
|
|
22
|
+
<circle
|
|
23
|
+
class="progress-spinner__circle"
|
|
24
|
+
cx="25"
|
|
25
|
+
cy="25"
|
|
26
|
+
r="20"
|
|
27
|
+
:fill="fill"
|
|
28
|
+
:stroke-width="strokeWidth"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style src="./ProgressSpinner.scss"></style>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { ProgressSpinnerProps } from '../../types';
|
|
38
|
+
import { computed } from "vue";
|
|
39
|
+
|
|
40
|
+
defineOptions({ name: 'FtpProgressSpinner' });
|
|
41
|
+
|
|
42
|
+
const props = withDefaults(defineProps<ProgressSpinnerProps>(), {
|
|
43
|
+
strokeWidth: 4,
|
|
44
|
+
fill: "transparent",
|
|
45
|
+
animationDuration: "2s",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const spinnerStyle = computed(() => ({
|
|
49
|
+
"--progress-spinner-animation-duration": props.animationDuration,
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
const additionalClasses = computed(() => [].filter(Boolean).join(" "));
|
|
53
|
+
</script>
|