paket-ui 0.0.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/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/module.d.mts +10 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +46 -0
- package/dist/runtime/components/ProgressIndicator/ProgressBase.vue +36 -0
- package/dist/runtime/components/ProgressIndicator/ProgressBase.vue.d.ts +8 -0
- package/dist/runtime/components/ProgressIndicator/ProgressIndicator.vue +46 -0
- package/dist/runtime/components/ProgressIndicator/ProgressIndicator.vue.d.ts +9 -0
- package/dist/runtime/components/Recorder/RecorderAudio.vue +136 -0
- package/dist/runtime/components/Recorder/RecorderAudio.vue.d.ts +11 -0
- package/dist/runtime/components/alert/AlertHelperForm.vue +22 -0
- package/dist/runtime/components/alert/AlertHelperForm.vue.d.ts +13 -0
- package/dist/runtime/components/alert/AlertPinLocation.vue +57 -0
- package/dist/runtime/components/alert/AlertPinLocation.vue.d.ts +13 -0
- package/dist/runtime/components/alert/BaseAlert.vue +54 -0
- package/dist/runtime/components/alert/BaseAlert.vue.d.ts +34 -0
- package/dist/runtime/components/alert/index.d.ts +20 -0
- package/dist/runtime/components/alert/index.js +20 -0
- package/dist/runtime/components/attachment/BaseAttachment.vue +52 -0
- package/dist/runtime/components/attachment/BaseAttachment.vue.d.ts +24 -0
- package/dist/runtime/components/attachment/ChipAttachment.vue +57 -0
- package/dist/runtime/components/attachment/ChipAttachment.vue.d.ts +28 -0
- package/dist/runtime/components/attachment/index.d.ts +15 -0
- package/dist/runtime/components/attachment/index.js +15 -0
- package/dist/runtime/components/avatar/BaseAvatar.vue +41 -0
- package/dist/runtime/components/avatar/BaseAvatar.vue.d.ts +31 -0
- package/dist/runtime/components/avatar/IconAvatar.vue +28 -0
- package/dist/runtime/components/avatar/IconAvatar.vue.d.ts +18 -0
- package/dist/runtime/components/avatar/index.d.ts +27 -0
- package/dist/runtime/components/avatar/index.js +27 -0
- package/dist/runtime/components/badge/BaseBadge.vue +26 -0
- package/dist/runtime/components/badge/BaseBadge.vue.d.ts +17 -0
- package/dist/runtime/components/badge/IconBadge.vue +37 -0
- package/dist/runtime/components/badge/IconBadge.vue.d.ts +23 -0
- package/dist/runtime/components/badge/index.d.ts +45 -0
- package/dist/runtime/components/badge/index.js +45 -0
- package/dist/runtime/components/badge/location.vue +18 -0
- package/dist/runtime/components/badge/location.vue.d.ts +5 -0
- package/dist/runtime/components/button/BaseButton.vue +32 -0
- package/dist/runtime/components/button/BaseButton.vue.d.ts +16 -0
- package/dist/runtime/components/button/ButtonApplyVoucher.vue +32 -0
- package/dist/runtime/components/button/ButtonApplyVoucher.vue.d.ts +11 -0
- package/dist/runtime/components/button/IconButton.vue +44 -0
- package/dist/runtime/components/button/IconButton.vue.d.ts +27 -0
- package/dist/runtime/components/button/LinkButton.vue +40 -0
- package/dist/runtime/components/button/LinkButton.vue.d.ts +23 -0
- package/dist/runtime/components/button/box.vue +14 -0
- package/dist/runtime/components/button/box.vue.d.ts +6 -0
- package/dist/runtime/components/button/index.d.ts +28 -0
- package/dist/runtime/components/button/index.js +28 -0
- package/dist/runtime/components/card/BaseCard.vue +26 -0
- package/dist/runtime/components/card/BaseCard.vue.d.ts +18 -0
- package/dist/runtime/components/card/CardBalanceEstimation.vue +29 -0
- package/dist/runtime/components/card/CardBalanceEstimation.vue.d.ts +11 -0
- package/dist/runtime/components/card/CardBalanceSummary.vue +24 -0
- package/dist/runtime/components/card/CardBalanceSummary.vue.d.ts +8 -0
- package/dist/runtime/components/card/CardStatistic.vue +96 -0
- package/dist/runtime/components/card/CardStatistic.vue.d.ts +46 -0
- package/dist/runtime/components/card/CreditCard.vue +106 -0
- package/dist/runtime/components/card/CreditCard.vue.d.ts +16 -0
- package/dist/runtime/components/card/ExpandableCard.vue +51 -0
- package/dist/runtime/components/card/ExpandableCard.vue.d.ts +20 -0
- package/dist/runtime/components/card/NeedPinLocation.vue +27 -0
- package/dist/runtime/components/card/NeedPinLocation.vue.d.ts +8 -0
- package/dist/runtime/components/card/OriginEmpty.vue +13 -0
- package/dist/runtime/components/card/OriginEmpty.vue.d.ts +2 -0
- package/dist/runtime/components/card/OriginItem.vue +76 -0
- package/dist/runtime/components/card/OriginItem.vue.d.ts +25 -0
- package/dist/runtime/components/card/OriginItemDeleted.vue +40 -0
- package/dist/runtime/components/card/OriginItemDeleted.vue.d.ts +15 -0
- package/dist/runtime/components/card/index.vue +17 -0
- package/dist/runtime/components/card/index.vue.d.ts +16 -0
- package/dist/runtime/components/card/origin.vue +42 -0
- package/dist/runtime/components/card/origin.vue.d.ts +39 -0
- package/dist/runtime/components/chart/BarChart.vue +85 -0
- package/dist/runtime/components/chart/BarChart.vue.d.ts +14 -0
- package/dist/runtime/components/chart/ChartHorizontal.vue +123 -0
- package/dist/runtime/components/chart/ChartHorizontal.vue.d.ts +29 -0
- package/dist/runtime/components/chart/GaugeChart.vue +108 -0
- package/dist/runtime/components/chart/GaugeChart.vue.d.ts +28 -0
- package/dist/runtime/components/chart/PieChart.vue +35 -0
- package/dist/runtime/components/chart/PieChart.vue.d.ts +13 -0
- package/dist/runtime/components/chat/Reply.vue +157 -0
- package/dist/runtime/components/chat/Reply.vue.d.ts +60 -0
- package/dist/runtime/components/checkbox/Checkbox.vue +59 -0
- package/dist/runtime/components/checkbox/Checkbox.vue.d.ts +16 -0
- package/dist/runtime/components/checkbox/CheckboxBase.vue +46 -0
- package/dist/runtime/components/checkbox/CheckboxBase.vue.d.ts +15 -0
- package/dist/runtime/components/chip/ChipBase.vue +44 -0
- package/dist/runtime/components/chip/ChipBase.vue.d.ts +26 -0
- package/dist/runtime/components/chip/index.d.ts +4 -0
- package/dist/runtime/components/chip/index.js +4 -0
- package/dist/runtime/components/collapsible/CollapsibleBase.vue +34 -0
- package/dist/runtime/components/collapsible/CollapsibleBase.vue.d.ts +22 -0
- package/dist/runtime/components/combobox/Combobox.vue +171 -0
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +44 -0
- package/dist/runtime/components/combobox/ComboboxInput.vue +13 -0
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +2 -0
- package/dist/runtime/components/combobox/_index.d.ts +1 -0
- package/dist/runtime/components/combobox/_index.js +0 -0
- package/dist/runtime/components/container/ContainerWrapper.vue +11 -0
- package/dist/runtime/components/container/ContainerWrapper.vue.d.ts +16 -0
- package/dist/runtime/components/container/FloatActionWrapper.vue +29 -0
- package/dist/runtime/components/container/FloatActionWrapper.vue.d.ts +20 -0
- package/dist/runtime/components/context-menu/ContextMenuBase.vue +37 -0
- package/dist/runtime/components/context-menu/ContextMenuBase.vue.d.ts +21 -0
- package/dist/runtime/components/cropper/CropperImage.vue +82 -0
- package/dist/runtime/components/cropper/CropperImage.vue.d.ts +18 -0
- package/dist/runtime/components/datepicker/DatepickerBase.vue +55 -0
- package/dist/runtime/components/datepicker/DatepickerBase.vue.d.ts +26 -0
- package/dist/runtime/components/datepicker/DatepickerBody.vue +139 -0
- package/dist/runtime/components/datepicker/DatepickerBody.vue.d.ts +11 -0
- package/dist/runtime/components/dialog/DialogConfirmation.vue +56 -0
- package/dist/runtime/components/dialog/DialogConfirmation.vue.d.ts +44 -0
- package/dist/runtime/components/dialog/DialogConfirmationSingle.vue +108 -0
- package/dist/runtime/components/dialog/DialogConfirmationSingle.vue.d.ts +59 -0
- package/dist/runtime/components/dialog/DialogFloatAction.vue +51 -0
- package/dist/runtime/components/dialog/DialogFloatAction.vue.d.ts +39 -0
- package/dist/runtime/components/dialog/RootDialog.vue +56 -0
- package/dist/runtime/components/dialog/RootDialog.vue.d.ts +19 -0
- package/dist/runtime/components/dialog/aside.vue +80 -0
- package/dist/runtime/components/dialog/aside.vue.d.ts +26 -0
- package/dist/runtime/components/dialog/help.vue +37 -0
- package/dist/runtime/components/dialog/help.vue.d.ts +2 -0
- package/dist/runtime/components/dialog-reka/DialogContent.vue +48 -0
- package/dist/runtime/components/dialog-reka/DialogContent.vue.d.ts +26 -0
- package/dist/runtime/components/dialog-reka/DialogPreviewerImage.vue +177 -0
- package/dist/runtime/components/dialog-reka/DialogPreviewerImage.vue.d.ts +14 -0
- package/dist/runtime/components/dialog-reka/DialogPreviewerVideo.vue +44 -0
- package/dist/runtime/components/dialog-reka/DialogPreviewerVideo.vue.d.ts +13 -0
- package/dist/runtime/components/dialog-reka/DialogRoot.vue +42 -0
- package/dist/runtime/components/dialog-reka/DialogRoot.vue.d.ts +28 -0
- package/dist/runtime/components/divider/DividerBase.vue +35 -0
- package/dist/runtime/components/divider/DividerBase.vue.d.ts +12 -0
- package/dist/runtime/components/divider/DividerDash.vue +43 -0
- package/dist/runtime/components/divider/DividerDash.vue.d.ts +14 -0
- package/dist/runtime/components/dropdown/Dropdown.vue +96 -0
- package/dist/runtime/components/dropdown/Dropdown.vue.d.ts +52 -0
- package/dist/runtime/components/dropdown/DropdownItem.vue +52 -0
- package/dist/runtime/components/dropdown/DropdownItem.vue.d.ts +35 -0
- package/dist/runtime/components/file/AddFile.vue +16 -0
- package/dist/runtime/components/file/AddFile.vue.d.ts +7 -0
- package/dist/runtime/components/file/DropAreaFile.vue +141 -0
- package/dist/runtime/components/file/DropAreaFile.vue.d.ts +28 -0
- package/dist/runtime/components/file/ViewFile.vue +70 -0
- package/dist/runtime/components/file/ViewFile.vue.d.ts +12 -0
- package/dist/runtime/components/filter/FilterChip.vue +39 -0
- package/dist/runtime/components/filter/FilterChip.vue.d.ts +19 -0
- package/dist/runtime/components/filter/FilterStatus.vue +28 -0
- package/dist/runtime/components/filter/FilterStatus.vue.d.ts +16 -0
- package/dist/runtime/components/image/ImageLoader.vue +61 -0
- package/dist/runtime/components/image/ImageLoader.vue.d.ts +11 -0
- package/dist/runtime/components/input/ButtonFileInput.vue +77 -0
- package/dist/runtime/components/input/ButtonFileInput.vue.d.ts +27 -0
- package/dist/runtime/components/input/IconButtonFileInput.vue +80 -0
- package/dist/runtime/components/input/IconButtonFileInput.vue.d.ts +33 -0
- package/dist/runtime/components/input/InputCheckbox.vue +38 -0
- package/dist/runtime/components/input/InputCheckbox.vue.d.ts +16 -0
- package/dist/runtime/components/input/InputControl.vue +11 -0
- package/dist/runtime/components/input/InputControl.vue.d.ts +16 -0
- package/dist/runtime/components/input/InputField.vue +86 -0
- package/dist/runtime/components/input/InputField.vue.d.ts +28 -0
- package/dist/runtime/components/input/InputFieldPassword.vue +47 -0
- package/dist/runtime/components/input/InputFieldPassword.vue.d.ts +18 -0
- package/dist/runtime/components/input/InputFieldPhone.vue +71 -0
- package/dist/runtime/components/input/InputFieldPhone.vue.d.ts +34 -0
- package/dist/runtime/components/input/InputFieldWithOption.vue +69 -0
- package/dist/runtime/components/input/InputFieldWithOption.vue.d.ts +37 -0
- package/dist/runtime/components/input/InputFileDropable.vue +162 -0
- package/dist/runtime/components/input/InputFileDropable.vue.d.ts +33 -0
- package/dist/runtime/components/input/InputGroup.vue +18 -0
- package/dist/runtime/components/input/InputGroup.vue.d.ts +18 -0
- package/dist/runtime/components/input/InputImageDropable.vue +170 -0
- package/dist/runtime/components/input/InputImageDropable.vue.d.ts +24 -0
- package/dist/runtime/components/input/InputNumber.vue +53 -0
- package/dist/runtime/components/input/InputNumber.vue.d.ts +13 -0
- package/dist/runtime/components/input/InputOtp.vue +66 -0
- package/dist/runtime/components/input/InputOtp.vue.d.ts +20 -0
- package/dist/runtime/components/input/InputRadio.vue +49 -0
- package/dist/runtime/components/input/InputRadio.vue.d.ts +22 -0
- package/dist/runtime/components/input/InputText.vue +94 -0
- package/dist/runtime/components/input/InputText.vue.d.ts +50 -0
- package/dist/runtime/components/input/TextArea.vue +75 -0
- package/dist/runtime/components/input/TextArea.vue.d.ts +26 -0
- package/dist/runtime/components/input/index.d.ts +36 -0
- package/dist/runtime/components/input/index.js +60 -0
- package/dist/runtime/components/label/BaseLabel.vue +18 -0
- package/dist/runtime/components/label/BaseLabel.vue.d.ts +9 -0
- package/dist/runtime/components/label/ErrorLabel.vue +13 -0
- package/dist/runtime/components/label/ErrorLabel.vue.d.ts +10 -0
- package/dist/runtime/components/label/Form.vue +16 -0
- package/dist/runtime/components/label/Form.vue.d.ts +7 -0
- package/dist/runtime/components/label/HintLabel.vue +23 -0
- package/dist/runtime/components/label/HintLabel.vue.d.ts +10 -0
- package/dist/runtime/components/label/LabelSection.vue +39 -0
- package/dist/runtime/components/label/LabelSection.vue.d.ts +20 -0
- package/dist/runtime/components/listbox/Listbox.vue +17 -0
- package/dist/runtime/components/listbox/Listbox.vue.d.ts +17 -0
- package/dist/runtime/components/listbox/ListboxItem.vue +34 -0
- package/dist/runtime/components/listbox/ListboxItem.vue.d.ts +20 -0
- package/dist/runtime/components/loading/BounceLoading.vue +19 -0
- package/dist/runtime/components/loading/BounceLoading.vue.d.ts +6 -0
- package/dist/runtime/components/loading/LoadingCircular.vue +46 -0
- package/dist/runtime/components/loading/LoadingCircular.vue.d.ts +10 -0
- package/dist/runtime/components/loading/LoadingIndicator.d.ts +60 -0
- package/dist/runtime/components/loading/LoadingIndicator.js +66 -0
- package/dist/runtime/components/loading/SpinnerLoading.vue +11 -0
- package/dist/runtime/components/loading/SpinnerLoading.vue.d.ts +6 -0
- package/dist/runtime/components/player/Audio.vue +104 -0
- package/dist/runtime/components/player/Audio.vue.d.ts +15 -0
- package/dist/runtime/components/player/Scrubber.vue +48 -0
- package/dist/runtime/components/player/Scrubber.vue.d.ts +44 -0
- package/dist/runtime/components/player/Video.vue +163 -0
- package/dist/runtime/components/player/Video.vue.d.ts +11 -0
- package/dist/runtime/components/popover/Popover.vue +30 -0
- package/dist/runtime/components/popover/Popover.vue.d.ts +18 -0
- package/dist/runtime/components/popover/WhatsAppChecker.vue +61 -0
- package/dist/runtime/components/popover/WhatsAppChecker.vue.d.ts +13 -0
- package/dist/runtime/components/radio/Courier.vue +195 -0
- package/dist/runtime/components/radio/Courier.vue.d.ts +54 -0
- package/dist/runtime/components/radio/Decoration.vue +43 -0
- package/dist/runtime/components/radio/Decoration.vue.d.ts +5 -0
- package/dist/runtime/components/radio/RadioCourierBadge.vue +68 -0
- package/dist/runtime/components/radio/RadioCourierBadge.vue.d.ts +11 -0
- package/dist/runtime/components/radio/ThemeDecoration.vue +40 -0
- package/dist/runtime/components/radio/ThemeDecoration.vue.d.ts +2 -0
- package/dist/runtime/components/radio-group/ButtonRadio.vue +106 -0
- package/dist/runtime/components/radio-group/ButtonRadio.vue.d.ts +47 -0
- package/dist/runtime/components/range-picker/RangePicker.vue +77 -0
- package/dist/runtime/components/range-picker/RangePicker.vue.d.ts +20 -0
- package/dist/runtime/components/range-picker/RangePickerBody.vue +270 -0
- package/dist/runtime/components/range-picker/RangePickerBody.vue.d.ts +24 -0
- package/dist/runtime/components/range-picker/index.d.ts +5 -0
- package/dist/runtime/components/scroll-area/ScrollAreaBase.vue +57 -0
- package/dist/runtime/components/scroll-area/ScrollAreaBase.vue.d.ts +20 -0
- package/dist/runtime/components/select/SelectBase.vue +137 -0
- package/dist/runtime/components/select/SelectBase.vue.d.ts +50 -0
- package/dist/runtime/components/select/SelectMultiple.vue +119 -0
- package/dist/runtime/components/select/SelectMultiple.vue.d.ts +45 -0
- package/dist/runtime/components/select/SelectOption.vue +96 -0
- package/dist/runtime/components/select/SelectOption.vue.d.ts +21 -0
- package/dist/runtime/components/select/SelectWithInput.vue +46 -0
- package/dist/runtime/components/select/SelectWithInput.vue.d.ts +21 -0
- package/dist/runtime/components/stepper/Stepper.vue +99 -0
- package/dist/runtime/components/stepper/Stepper.vue.d.ts +23 -0
- package/dist/runtime/components/switch/Switch.vue +42 -0
- package/dist/runtime/components/switch/Switch.vue.d.ts +28 -0
- package/dist/runtime/components/table/TableWrapper.vue +61 -0
- package/dist/runtime/components/table/TableWrapper.vue.d.ts +15 -0
- package/dist/runtime/components/tabs/TabBase.vue +77 -0
- package/dist/runtime/components/tabs/TabBase.vue.d.ts +32 -0
- package/dist/runtime/components/tags-input/TagsInput.vue +131 -0
- package/dist/runtime/components/tags-input/TagsInput.vue.d.ts +48 -0
- package/dist/runtime/components/tags-input/TagsInputWithOption.vue +95 -0
- package/dist/runtime/components/tags-input/TagsInputWithOption.vue.d.ts +26 -0
- package/dist/runtime/components/time-picker/TimePicker.vue +84 -0
- package/dist/runtime/components/time-picker/TimePicker.vue.d.ts +17 -0
- package/dist/runtime/components/time-picker/TimePickerBody.vue +178 -0
- package/dist/runtime/components/time-picker/TimePickerBody.vue.d.ts +21 -0
- package/dist/runtime/components/toast/ToastCard.vue +36 -0
- package/dist/runtime/components/toast/ToastCard.vue.d.ts +16 -0
- package/dist/runtime/components/toast/ToastContainer.vue +15 -0
- package/dist/runtime/components/toast/ToastContainer.vue.d.ts +2 -0
- package/dist/runtime/components/toast/ToastNetwork.vue +109 -0
- package/dist/runtime/components/toast/ToastNetwork.vue.d.ts +2 -0
- package/dist/runtime/components/toast/index.d.ts +16 -0
- package/dist/runtime/components/toast/index.js +16 -0
- package/dist/runtime/components/toggle-group/MultiSelect.vue +45 -0
- package/dist/runtime/components/toggle-group/MultiSelect.vue.d.ts +38 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue +59 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue.d.ts +41 -0
- package/dist/runtime/components/tooltip/MiniTooltip.vue +58 -0
- package/dist/runtime/components/tooltip/MiniTooltip.vue.d.ts +21 -0
- package/dist/runtime/components/tooltip/Tooltip.vue +50 -0
- package/dist/runtime/components/tooltip/Tooltip.vue.d.ts +21 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/utils/cn.d.ts +5 -0
- package/dist/runtime/utils/cn.js +5 -0
- package/dist/runtime/utils/formatNumber.d.ts +2 -0
- package/dist/runtime/utils/formatNumber.js +12 -0
- package/dist/types.d.mts +3 -0
- package/package.json +63 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ProgressIndicator, ProgressRoot } from "reka-ui";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false, default: void 0 },
|
|
5
|
+
value: { type: Number, required: false, default: 0 }
|
|
6
|
+
});
|
|
7
|
+
const RADIUS = 45;
|
|
8
|
+
const circumference = 2 * Math.PI * RADIUS;
|
|
9
|
+
const dashOffset = computed(() => props.value / 100 * circumference);
|
|
10
|
+
const trackPath = computed(() => {
|
|
11
|
+
const r = RADIUS;
|
|
12
|
+
return `
|
|
13
|
+
M 50 50
|
|
14
|
+
m 0 -${r}
|
|
15
|
+
a ${r} ${r} 0 1 1 0 ${r * 2}
|
|
16
|
+
a ${r} ${r} 0 1 1 0 -${r * 2}
|
|
17
|
+
`;
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div :class="cn('relative w-[52px] h-[52px]', props.class)">
|
|
23
|
+
<ProgressRoot :model-value="props.value" as-child>
|
|
24
|
+
<svg class="w-full h-full" viewBox="0 0 100 100">
|
|
25
|
+
<path
|
|
26
|
+
:d="trackPath"
|
|
27
|
+
class="fill-none stroke-outline-variant stroke-[12px]"
|
|
28
|
+
/>
|
|
29
|
+
<ProgressIndicator as-child>
|
|
30
|
+
<path
|
|
31
|
+
:d="trackPath"
|
|
32
|
+
class="fill-none stroke-flux-primary stroke-[12px] transition-[stroke-dasharray,opacity] duration-700 data-[value='0']:opacity-0"
|
|
33
|
+
:style="{
|
|
34
|
+
'stroke-linecap': 'round',
|
|
35
|
+
'stroke-dasharray': `${dashOffset}px, ${circumference}px`,
|
|
36
|
+
'stroke-dashoffset': '0px'
|
|
37
|
+
}"
|
|
38
|
+
/>
|
|
39
|
+
</ProgressIndicator>
|
|
40
|
+
</svg>
|
|
41
|
+
<div class="absolute inset-0 flex items-center justify-center">
|
|
42
|
+
<span class="text-xs font-bold">{{ props.value }}%</span>
|
|
43
|
+
</div>
|
|
44
|
+
</ProgressRoot>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
value?: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
class: HTMLAttributes["class"];
|
|
8
|
+
value: number;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
throttle: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
duration: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
height: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
color: {
|
|
15
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
errorColor: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
estimatedProgress: {
|
|
23
|
+
type: () => (duration: number, elapsed: number) => number;
|
|
24
|
+
required: false;
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
throttle: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
duration: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
37
|
+
height: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
color: {
|
|
42
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
errorColor: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
estimatedProgress: {
|
|
50
|
+
type: () => (duration: number, elapsed: number) => number;
|
|
51
|
+
required: false;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
|
+
throttle: number;
|
|
55
|
+
duration: number;
|
|
56
|
+
height: number;
|
|
57
|
+
color: string | boolean;
|
|
58
|
+
errorColor: string;
|
|
59
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { useLoadingIndicator } from "#app/composables/loading-indicator";
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: "UiLoadingIndicator",
|
|
5
|
+
props: {
|
|
6
|
+
throttle: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 200
|
|
9
|
+
},
|
|
10
|
+
duration: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 2e3
|
|
13
|
+
},
|
|
14
|
+
height: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 3
|
|
17
|
+
},
|
|
18
|
+
color: {
|
|
19
|
+
type: [String, Boolean],
|
|
20
|
+
default: "bg-gradient-to-r from-primaryContainer to-flux-primary"
|
|
21
|
+
},
|
|
22
|
+
errorColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "bg-gradient-to-r from-errorContainer to-flux-error"
|
|
25
|
+
},
|
|
26
|
+
estimatedProgress: {
|
|
27
|
+
type: Function,
|
|
28
|
+
required: false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(props, { slots, expose }) {
|
|
32
|
+
const { progress, isLoading, error, start, finish, clear } = useLoadingIndicator({
|
|
33
|
+
duration: props.duration,
|
|
34
|
+
throttle: props.throttle,
|
|
35
|
+
estimatedProgress: props.estimatedProgress
|
|
36
|
+
});
|
|
37
|
+
expose({
|
|
38
|
+
progress,
|
|
39
|
+
isLoading,
|
|
40
|
+
error,
|
|
41
|
+
start,
|
|
42
|
+
finish,
|
|
43
|
+
clear
|
|
44
|
+
});
|
|
45
|
+
return () => h("div", {
|
|
46
|
+
class: [
|
|
47
|
+
"absolute bottom-0 left-0 right-0",
|
|
48
|
+
error.value ? props.errorColor : props.color,
|
|
49
|
+
{
|
|
50
|
+
"opacity-100": isLoading.value,
|
|
51
|
+
"opacity-0": !isLoading.value
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
style: {
|
|
55
|
+
pointerEvents: "none",
|
|
56
|
+
width: "auto",
|
|
57
|
+
height: `${props.height}px`,
|
|
58
|
+
backgroundSize: `${100 / progress.value * 100}% auto`,
|
|
59
|
+
transform: `scaleX(${progress.value}%)`,
|
|
60
|
+
transformOrigin: "left",
|
|
61
|
+
transition: "transform 0.1s, height 0.4s, opacity 0.4s",
|
|
62
|
+
zIndex: 999999
|
|
63
|
+
}
|
|
64
|
+
}, slots);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
class: { type: null, required: false }
|
|
4
|
+
});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div :class="['w-full flex justify-center items-center', props.class]">
|
|
9
|
+
<div class="w-10 h-10 animate-spin rounded-full border-4 border-surfaceContainerHigh border-t-transparent"></div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useMediaControls } from "@vueuse/core";
|
|
3
|
+
const audioRef = useTemplateRef("audioRef");
|
|
4
|
+
const { playing, currentTime, muted, duration } = useMediaControls(audioRef);
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
src: { type: String, required: false },
|
|
7
|
+
autoplay: { type: Boolean, required: false },
|
|
8
|
+
loop: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
const convertToMinutesSeconds = (seconds) => {
|
|
11
|
+
const mins = Math.floor(seconds / 60);
|
|
12
|
+
const secs = Math.floor(seconds % 60);
|
|
13
|
+
return `${String(mins).padStart(2, "0")}:${String(secs).padStart(2, "0")}`;
|
|
14
|
+
};
|
|
15
|
+
const getBlobDuration = () => {
|
|
16
|
+
const tempVideoEl = document.createElement("video");
|
|
17
|
+
const durationP = new Promise((resolve, _reject) => {
|
|
18
|
+
tempVideoEl.addEventListener("loadedmetadata", () => {
|
|
19
|
+
if (tempVideoEl.duration === Infinity) {
|
|
20
|
+
tempVideoEl.currentTime = Number.MAX_SAFE_INTEGER;
|
|
21
|
+
tempVideoEl.ontimeupdate = () => {
|
|
22
|
+
tempVideoEl.ontimeupdate = null;
|
|
23
|
+
resolve(tempVideoEl.duration);
|
|
24
|
+
tempVideoEl.currentTime = 0;
|
|
25
|
+
};
|
|
26
|
+
} else resolve(tempVideoEl.duration);
|
|
27
|
+
});
|
|
28
|
+
tempVideoEl.onerror = (_event) => resolve(0);
|
|
29
|
+
});
|
|
30
|
+
tempVideoEl.src = props.src || "";
|
|
31
|
+
return durationP;
|
|
32
|
+
};
|
|
33
|
+
watchEffect(async () => {
|
|
34
|
+
if (props.src && props.src.startsWith("blob:"))
|
|
35
|
+
duration.value = await getBlobDuration();
|
|
36
|
+
else duration.value = duration.value || 0;
|
|
37
|
+
});
|
|
38
|
+
defineExpose({
|
|
39
|
+
audioRef,
|
|
40
|
+
playing,
|
|
41
|
+
currentTime,
|
|
42
|
+
muted,
|
|
43
|
+
duration,
|
|
44
|
+
setAudioMuted: (value) => muted.value = value,
|
|
45
|
+
setAudioPlaying: (value) => playing.value = value
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div class="bg-black/5 dark:bg-white/10 px-2 py-1.5 rounded-lg">
|
|
51
|
+
<audio
|
|
52
|
+
ref="audioRef"
|
|
53
|
+
class="hidden"
|
|
54
|
+
:autoplay="props.autoplay"
|
|
55
|
+
:src="props.src"
|
|
56
|
+
:loop="props.loop"
|
|
57
|
+
:muted="muted"
|
|
58
|
+
controls
|
|
59
|
+
></audio>
|
|
60
|
+
|
|
61
|
+
<div class="flex items-center gap-1.5">
|
|
62
|
+
<UiButtonIconButton
|
|
63
|
+
v-if="props.src"
|
|
64
|
+
class="p-0.5 border-none"
|
|
65
|
+
variant="outline"
|
|
66
|
+
size="sm"
|
|
67
|
+
:icon-name="
|
|
68
|
+
playing ? 'material-symbols:pause' : 'material-symbols:play-arrow'
|
|
69
|
+
"
|
|
70
|
+
@click="playing = !playing"
|
|
71
|
+
/>
|
|
72
|
+
<div class="text-xs shrink-0">
|
|
73
|
+
{{ convertToMinutesSeconds(currentTime) }}
|
|
74
|
+
</div>
|
|
75
|
+
<UiPlayerScrubber
|
|
76
|
+
v-if="props.src"
|
|
77
|
+
v-model="currentTime"
|
|
78
|
+
class="grow block min-w-44"
|
|
79
|
+
type="range"
|
|
80
|
+
:max="duration"
|
|
81
|
+
step="0.1"
|
|
82
|
+
/>
|
|
83
|
+
<template v-if="props.src">
|
|
84
|
+
<UiButtonIconButton
|
|
85
|
+
class="p-0.5 border-none"
|
|
86
|
+
variant="outline"
|
|
87
|
+
size="sm"
|
|
88
|
+
:icon-name="
|
|
89
|
+
muted ? 'material-symbols:volume-off' : 'material-symbols:volume-up'
|
|
90
|
+
"
|
|
91
|
+
@click="muted = !muted"
|
|
92
|
+
/>
|
|
93
|
+
<UiButtonLinkButton
|
|
94
|
+
class="p-0.5 border-none"
|
|
95
|
+
variant="outline"
|
|
96
|
+
size="sm"
|
|
97
|
+
icon="material-symbols:download"
|
|
98
|
+
download
|
|
99
|
+
:to="props.src"
|
|
100
|
+
/>
|
|
101
|
+
</template>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src?: string;
|
|
3
|
+
autoplay?: boolean;
|
|
4
|
+
loop?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
7
|
+
audioRef: any;
|
|
8
|
+
playing: import("vue").ShallowRef<boolean, boolean>;
|
|
9
|
+
currentTime: import("vue").ShallowRef<number, number>;
|
|
10
|
+
muted: import("vue").ShallowRef<boolean, boolean>;
|
|
11
|
+
duration: import("vue").ShallowRef<number, number>;
|
|
12
|
+
setAudioMuted: (value: boolean) => boolean;
|
|
13
|
+
setAudioPlaying: (value: boolean) => boolean;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useEventListener, useMouseInElement, useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
min: { type: Number, default: 0 },
|
|
5
|
+
max: { type: Number, default: 100 },
|
|
6
|
+
secondary: { type: Number, default: 0 },
|
|
7
|
+
modelValue: { type: Number, required: true }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
10
|
+
const scrubber = shallowRef();
|
|
11
|
+
const scrubbing = shallowRef(false);
|
|
12
|
+
const pendingValue = shallowRef(0);
|
|
13
|
+
useEventListener("mouseup", () => scrubbing.value = false, { passive: true });
|
|
14
|
+
const value = useVModel(props, "modelValue", emit);
|
|
15
|
+
const { elementX, elementWidth } = useMouseInElement(scrubber);
|
|
16
|
+
watch([scrubbing, elementX], () => {
|
|
17
|
+
const progress = Math.max(0, Math.min(1, elementX.value / elementWidth.value));
|
|
18
|
+
pendingValue.value = progress * props.max;
|
|
19
|
+
if (scrubbing.value) value.value = pendingValue.value;
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div
|
|
25
|
+
ref="scrubber"
|
|
26
|
+
class="relative rounded-full h-2 transition-all cursor-pointer select-none flex gap-0.5"
|
|
27
|
+
@mousedown="scrubbing = true"
|
|
28
|
+
>
|
|
29
|
+
<div
|
|
30
|
+
class="relative h-full bg-flux-primary rounded-l-full rounded-r-md"
|
|
31
|
+
:style="{ width: `${value / max * 100}%` }"
|
|
32
|
+
/>
|
|
33
|
+
<div
|
|
34
|
+
class="relative h-full"
|
|
35
|
+
:class="{
|
|
36
|
+
'w-1': scrubbing,
|
|
37
|
+
'w-0.5': !scrubbing
|
|
38
|
+
}"
|
|
39
|
+
>
|
|
40
|
+
<span
|
|
41
|
+
class="absolute w-full -top-0.5 -bottom-0.5 left-0 right-0 bg-flux-primary rounded-full"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
<div
|
|
45
|
+
class="relative h-full flex-1 bg-outline-variant rounded-r-full rounded-l-md"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
min: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
max: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
secondary: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (...args: any[]) => void;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
min: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
max: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: number;
|
|
28
|
+
};
|
|
29
|
+
secondary: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
modelValue: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{
|
|
38
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
max: number;
|
|
41
|
+
secondary: number;
|
|
42
|
+
min: number;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFullscreen, useMediaControls } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false },
|
|
5
|
+
src: { type: String, required: true },
|
|
6
|
+
type: { type: String, required: false },
|
|
7
|
+
options: { type: Array, required: false, default: () => ["download"] }
|
|
8
|
+
});
|
|
9
|
+
const video = useTemplateRef("video");
|
|
10
|
+
const loop = ref(false);
|
|
11
|
+
const {
|
|
12
|
+
playing,
|
|
13
|
+
buffered,
|
|
14
|
+
currentTime,
|
|
15
|
+
duration,
|
|
16
|
+
waiting,
|
|
17
|
+
volume,
|
|
18
|
+
muted,
|
|
19
|
+
supportsPictureInPicture,
|
|
20
|
+
togglePictureInPicture
|
|
21
|
+
} = useMediaControls(video, {
|
|
22
|
+
src: {
|
|
23
|
+
src: props.src,
|
|
24
|
+
type: props.type
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const { toggle: toggleFullScreen } = useFullscreen(video);
|
|
28
|
+
const endBuffer = computed(
|
|
29
|
+
() => buffered.value.length > 0 ? buffered.value[buffered.value.length - 1][1] : 0
|
|
30
|
+
);
|
|
31
|
+
const formatDuration = (seconds) => {
|
|
32
|
+
return new Date(1e3 * seconds).toISOString().slice(14, 19);
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div
|
|
38
|
+
:class="cn('outline-none', props.class)"
|
|
39
|
+
:tabindex="0"
|
|
40
|
+
autofocus
|
|
41
|
+
@keydown.prevent.space="playing = !playing"
|
|
42
|
+
@keydown.right="currentTime += 10"
|
|
43
|
+
@keydown.left="currentTime -= 10"
|
|
44
|
+
>
|
|
45
|
+
<div
|
|
46
|
+
class="relative bg-black rounded-md overflow-hidden group/controls w-full h-full grid place-items-center"
|
|
47
|
+
>
|
|
48
|
+
<video
|
|
49
|
+
ref="video"
|
|
50
|
+
class="w-full aspect-video"
|
|
51
|
+
:loop="loop"
|
|
52
|
+
@click="playing = !playing"
|
|
53
|
+
/>
|
|
54
|
+
<div
|
|
55
|
+
v-if="waiting"
|
|
56
|
+
class="absolute inset-0 grid place-items-center pointer-events-none bg-black bg-opacity-20"
|
|
57
|
+
>
|
|
58
|
+
<Icon
|
|
59
|
+
class="text-white"
|
|
60
|
+
name="line-md:loading-twotone-loop"
|
|
61
|
+
size="24px"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div
|
|
65
|
+
class="absolute inset-x-0 bottom-0 p-4 flex flex-col gap-1 bg-gradient-to-b from-transparent to-black/80 opacity-0 transition-all duration-300 group-hover/controls:opacity-100"
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
class="flex justify-between gap-2 items-center text-white text-xxs"
|
|
69
|
+
>
|
|
70
|
+
<span>{{ formatDuration(currentTime) }}</span>
|
|
71
|
+
<span>{{ formatDuration(duration) }}</span>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<UiPlayerScrubber
|
|
75
|
+
v-model="currentTime"
|
|
76
|
+
:max="duration"
|
|
77
|
+
:secondary="endBuffer"
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<div class="grid grid-cols-3 text-white pt-1">
|
|
81
|
+
<div class="flex pl-1">
|
|
82
|
+
<div class="flex gap-1 items-center group/volume">
|
|
83
|
+
<Icon
|
|
84
|
+
class="flex-none"
|
|
85
|
+
:name="
|
|
86
|
+
muted || volume === 0 ? 'material-symbols:volume-off' : 'material-symbols:volume-up'
|
|
87
|
+
"
|
|
88
|
+
size="20px"
|
|
89
|
+
@click="muted = !muted"
|
|
90
|
+
/>
|
|
91
|
+
<UiPlayerScrubber
|
|
92
|
+
v-model="volume"
|
|
93
|
+
:max="1"
|
|
94
|
+
class="w-0 group-hover/volume:w-20 transition-all duration-300 ease-in-out"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="flex gap-2 items-center justify-center">
|
|
100
|
+
<Icon
|
|
101
|
+
name="material-symbols:replay-10"
|
|
102
|
+
size="20px"
|
|
103
|
+
@click="currentTime -= 10"
|
|
104
|
+
/>
|
|
105
|
+
<Icon
|
|
106
|
+
:name="
|
|
107
|
+
playing ? 'material-symbols:pause' : 'material-symbols:play-arrow'
|
|
108
|
+
"
|
|
109
|
+
size="20px"
|
|
110
|
+
@click="playing = !playing"
|
|
111
|
+
/>
|
|
112
|
+
<Icon
|
|
113
|
+
name="material-symbols:forward-10"
|
|
114
|
+
size="20px"
|
|
115
|
+
@click="currentTime += 10"
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div class="flex gap-1 items-center justify-end">
|
|
120
|
+
<Icon
|
|
121
|
+
name="material-symbols:fullscreen"
|
|
122
|
+
size="20px"
|
|
123
|
+
@click="toggleFullScreen"
|
|
124
|
+
/>
|
|
125
|
+
<UiDropdown
|
|
126
|
+
class="p-1 rounded-md border-none"
|
|
127
|
+
content-class="z-[1000]"
|
|
128
|
+
:show-arrow="false"
|
|
129
|
+
:side-offset="2"
|
|
130
|
+
icon-name="material-symbols:more-vert"
|
|
131
|
+
icon-class="text-white"
|
|
132
|
+
variant="outline"
|
|
133
|
+
size="xs"
|
|
134
|
+
>
|
|
135
|
+
<template #content>
|
|
136
|
+
<UiDropdownItem
|
|
137
|
+
v-if="options.includes('download')"
|
|
138
|
+
label="Download"
|
|
139
|
+
icon="material-symbols:download"
|
|
140
|
+
@click="() => createDownloadLink(props.src, { newTab: true })"
|
|
141
|
+
/>
|
|
142
|
+
<UiDropdownItem
|
|
143
|
+
v-if="
|
|
144
|
+
options.includes('picture_in_picture') && supportsPictureInPicture
|
|
145
|
+
"
|
|
146
|
+
label="Picture in Picture"
|
|
147
|
+
icon="material-symbols:picture-in-picture-alt-outline"
|
|
148
|
+
@click="togglePictureInPicture"
|
|
149
|
+
/>
|
|
150
|
+
<UiDropdownItem
|
|
151
|
+
v-if="options.includes('repeat')"
|
|
152
|
+
label="Loop"
|
|
153
|
+
icon="material-symbols:repeat-rounded"
|
|
154
|
+
@click="loop = !loop"
|
|
155
|
+
/>
|
|
156
|
+
</template>
|
|
157
|
+
</UiDropdown>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
src: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
options?: Array<'download' | 'picture_in_picture' | 'repeat'>;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
options: Array<"download" | "picture_in_picture" | "repeat">;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
HoverCardArrow,
|
|
4
|
+
HoverCardContent,
|
|
5
|
+
HoverCardPortal,
|
|
6
|
+
HoverCardRoot,
|
|
7
|
+
HoverCardTrigger
|
|
8
|
+
} from "reka-ui";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
class: { type: null, required: false }
|
|
11
|
+
});
|
|
12
|
+
const open = ref(false);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<HoverCardRoot v-model:open="open">
|
|
17
|
+
<HoverCardTrigger as="div" :class="cn(props.class)">
|
|
18
|
+
<slot />
|
|
19
|
+
</HoverCardTrigger>
|
|
20
|
+
<HoverCardPortal>
|
|
21
|
+
<HoverCardContent
|
|
22
|
+
class="z-90 max-w-72 data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade text-on-inverse-surface select-none rounded-lg bg-inverse-surface p-2.5 text-xs shadow-sm will-change-[transform,opacity]"
|
|
23
|
+
:side-offset="5"
|
|
24
|
+
>
|
|
25
|
+
<slot name="content" />
|
|
26
|
+
<HoverCardArrow class="fill-inverse-surface" :width="12" :height="6" />
|
|
27
|
+
</HoverCardContent>
|
|
28
|
+
</HoverCardPortal>
|
|
29
|
+
</HoverCardRoot>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_10: {}, __VLS_20: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_10) => any;
|
|
8
|
+
} & {
|
|
9
|
+
content?: (props: typeof __VLS_20) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|