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,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
hour: number;
|
|
3
|
+
minute: number;
|
|
4
|
+
minHour?: number;
|
|
5
|
+
maxHour?: number;
|
|
6
|
+
minMinute?: number;
|
|
7
|
+
maxMinute?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:hour": (value: number) => void;
|
|
11
|
+
"update:minute": (value: number) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:hour"?: ((value: number) => any) | undefined;
|
|
14
|
+
"onUpdate:minute"?: ((value: number) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
minHour: number;
|
|
17
|
+
minMinute: number;
|
|
18
|
+
maxHour: number;
|
|
19
|
+
maxMinute: number;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="
|
|
4
|
+
cn(
|
|
5
|
+
'flex items-start gap-3 p-4 py-3.5 transition-all bg-background border border-outlineVariant rounded-lg shadow-lg w-80',
|
|
6
|
+
variantConfig[toast.type],
|
|
7
|
+
variantConfigBg[toast.type]
|
|
8
|
+
)
|
|
9
|
+
"
|
|
10
|
+
>
|
|
11
|
+
<slot name="icon">
|
|
12
|
+
<img
|
|
13
|
+
v-if="toast.imageSrc"
|
|
14
|
+
:src="toast.imageSrc"
|
|
15
|
+
class="w-10 h-10 shrink-0 rounded"
|
|
16
|
+
/>
|
|
17
|
+
<Icon
|
|
18
|
+
v-else
|
|
19
|
+
:name="toast.icon ?? 'material-symbols:info-outline'"
|
|
20
|
+
class="shrink-0"
|
|
21
|
+
size="24px"
|
|
22
|
+
/>
|
|
23
|
+
</slot>
|
|
24
|
+
<div class="pt-0.5 text-sm">
|
|
25
|
+
<div v-if="toast.title" class="font-semibold" v-text="toast.title" />
|
|
26
|
+
<div v-html="toast.render" />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { variantConfig, variantConfigBg } from ".";
|
|
33
|
+
defineProps({
|
|
34
|
+
toast: { type: Object, required: true }
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Toast } from '~~/plugins/toast.client';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
toast: Pick<Toast, 'imageSrc' | 'icon' | 'title' | 'render' | 'type'>;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
icon?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="fixed top-6 right-4 z-100 flex flex-col gap-2">
|
|
3
|
+
<TransitionGroup enter-active-class="transition duration-100 ease-out"
|
|
4
|
+
enter-from-class="transform translate-x-full scale-95 opacity-0" enter-to-class="transform translate-x-0 scale-100 opacity-100"
|
|
5
|
+
leave-active-class="transition duration-75 ease-in" leave-from-class="transform translate-x-0 scale-100 opacity-100"
|
|
6
|
+
leave-to-class="transform translate-x-full scale-95 opacity-0">
|
|
7
|
+
<UiToastCard v-for="toast in toasts" :key="toast.id" :toast="toast" />
|
|
8
|
+
</TransitionGroup>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
const { $toasts } = useNuxtApp();
|
|
14
|
+
const toasts = $toasts;
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useOnline, useScrollLock } from "@vueuse/core";
|
|
3
|
+
const online = useOnline();
|
|
4
|
+
watch(online, (isOnline) => {
|
|
5
|
+
const lock = useScrollLock(document.body);
|
|
6
|
+
lock.value = !isOnline;
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
v-if="!online"
|
|
13
|
+
class="fixed z-[100] bg-black/30 pt-6 pr-9 justify-end flex items-start backdrop-blur-sm top-0 right-0 bottom-0 left-0"
|
|
14
|
+
>
|
|
15
|
+
<Transition
|
|
16
|
+
enter-active-class="transition duration-100 ease-out"
|
|
17
|
+
enter-from-class="transform translate-x-full scale-95 opacity-0"
|
|
18
|
+
enter-to-class="transform translate-x-0 scale-100 opacity-100"
|
|
19
|
+
leave-active-class="transition duration-75 ease-in"
|
|
20
|
+
leave-from-class="transform translate-x-0 scale-100 opacity-100"
|
|
21
|
+
leave-to-class="transform translate-x-full scale-95 opacity-0"
|
|
22
|
+
>
|
|
23
|
+
<UiToastCard
|
|
24
|
+
id-alert-box="alert-box"
|
|
25
|
+
class=""
|
|
26
|
+
:toast="{
|
|
27
|
+
title: 'Koneksi Internet Terputus',
|
|
28
|
+
render: 'Silakan cek koneksi internet kamu dan coba lagi.',
|
|
29
|
+
type: 'error'
|
|
30
|
+
}"
|
|
31
|
+
>
|
|
32
|
+
<template #icon>
|
|
33
|
+
<svg
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
width="24"
|
|
36
|
+
height="24"
|
|
37
|
+
class="shrink-0"
|
|
38
|
+
viewBox="0 0 24 24"
|
|
39
|
+
>
|
|
40
|
+
<path
|
|
41
|
+
fill="currentColor"
|
|
42
|
+
d="M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21"
|
|
43
|
+
opacity="0"
|
|
44
|
+
>
|
|
45
|
+
<animate
|
|
46
|
+
id="svgSpinnersWifiFade0"
|
|
47
|
+
fill="freeze"
|
|
48
|
+
attributeName="opacity"
|
|
49
|
+
begin="0;svgSpinnersWifiFade1.end+0.2s"
|
|
50
|
+
dur="0.25s"
|
|
51
|
+
values="0;1"
|
|
52
|
+
/>
|
|
53
|
+
<animate
|
|
54
|
+
id="svgSpinnersWifiFade1"
|
|
55
|
+
fill="freeze"
|
|
56
|
+
attributeName="opacity"
|
|
57
|
+
begin="svgSpinnersWifiFade3.end+0.5s"
|
|
58
|
+
dur="0.1s"
|
|
59
|
+
values="1;0"
|
|
60
|
+
/>
|
|
61
|
+
</path>
|
|
62
|
+
<path
|
|
63
|
+
fill="currentColor"
|
|
64
|
+
d="M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z"
|
|
65
|
+
opacity="0"
|
|
66
|
+
>
|
|
67
|
+
<animate
|
|
68
|
+
id="svgSpinnersWifiFade2"
|
|
69
|
+
fill="freeze"
|
|
70
|
+
attributeName="opacity"
|
|
71
|
+
begin="svgSpinnersWifiFade0.end"
|
|
72
|
+
dur="0.25s"
|
|
73
|
+
values="0;1"
|
|
74
|
+
/>
|
|
75
|
+
<animate
|
|
76
|
+
fill="freeze"
|
|
77
|
+
attributeName="opacity"
|
|
78
|
+
begin="svgSpinnersWifiFade3.end+0.5s"
|
|
79
|
+
dur="0.1s"
|
|
80
|
+
values="1;0"
|
|
81
|
+
/>
|
|
82
|
+
</path>
|
|
83
|
+
<path
|
|
84
|
+
fill="currentColor"
|
|
85
|
+
d="M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3"
|
|
86
|
+
opacity="0"
|
|
87
|
+
>
|
|
88
|
+
<animate
|
|
89
|
+
id="svgSpinnersWifiFade3"
|
|
90
|
+
fill="freeze"
|
|
91
|
+
attributeName="opacity"
|
|
92
|
+
begin="svgSpinnersWifiFade2.end"
|
|
93
|
+
dur="0.25s"
|
|
94
|
+
values="0;1"
|
|
95
|
+
/>
|
|
96
|
+
<animate
|
|
97
|
+
fill="freeze"
|
|
98
|
+
attributeName="opacity"
|
|
99
|
+
begin="svgSpinnersWifiFade3.end+0.5s"
|
|
100
|
+
dur="0.1s"
|
|
101
|
+
values="1;0"
|
|
102
|
+
/>
|
|
103
|
+
</path>
|
|
104
|
+
</svg>
|
|
105
|
+
</template>
|
|
106
|
+
</UiToastCard>
|
|
107
|
+
</Transition>
|
|
108
|
+
</div>
|
|
109
|
+
</template>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const variantConfig: {
|
|
2
|
+
light: string;
|
|
3
|
+
primary: string;
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const variantConfigBg: {
|
|
10
|
+
light: string;
|
|
11
|
+
primary: string;
|
|
12
|
+
info: string;
|
|
13
|
+
success: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const variantConfig = {
|
|
2
|
+
light: "text-onSurface",
|
|
3
|
+
primary: "text-flux-primary",
|
|
4
|
+
info: "text-flux-info",
|
|
5
|
+
success: "text-flux-success",
|
|
6
|
+
warning: "text-flux-warning",
|
|
7
|
+
error: "text-flux-error"
|
|
8
|
+
};
|
|
9
|
+
export const variantConfigBg = {
|
|
10
|
+
light: "bg-background",
|
|
11
|
+
primary: "bg-primaryContainer border-flux-primary",
|
|
12
|
+
info: "bg-infoContainer border-flux-info",
|
|
13
|
+
success: "bg-successContainer border-flux-success",
|
|
14
|
+
warning: "bg-warningContainer border-flux-warning",
|
|
15
|
+
error: "bg-errorContainer border-flux-error"
|
|
16
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ToggleGroupItem, ToggleGroupRoot } from "reka-ui";
|
|
3
|
+
import { useVModel } from "@vueuse/core";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
class: { type: null, required: false, default: "" },
|
|
6
|
+
valueKey: { type: String, required: false, default: "id" },
|
|
7
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
8
|
+
options: { type: Array, required: false, default: [] },
|
|
9
|
+
id: { type: String, required: false, default: "toggle-group-multi" },
|
|
10
|
+
modelValue: { type: Array, required: false, default: [] }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
13
|
+
const content = useVModel(props, "modelValue", emit);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ToggleGroupRoot
|
|
18
|
+
v-model="content"
|
|
19
|
+
type="multiple"
|
|
20
|
+
class="flex flex-wrap gap-2"
|
|
21
|
+
>
|
|
22
|
+
<ToggleGroupItem
|
|
23
|
+
v-for="(item, nIndex) in options"
|
|
24
|
+
:key="id + '-' + nIndex"
|
|
25
|
+
:value="item[valueKey]"
|
|
26
|
+
:class="
|
|
27
|
+
cn(
|
|
28
|
+
'flex placeholder:text-flux-outline focus-visible:outline-none ring-0 focus-visible:ring-offset-1 focus-visible:ring-offset-flux-primary disabled:cursor-not-allowed disabled:opacity-50 focus-visible:text-onSurface focus-visible:bg-surfaceContainerLowest focus:border-flux-primary ',
|
|
29
|
+
props.class
|
|
30
|
+
)
|
|
31
|
+
"
|
|
32
|
+
>
|
|
33
|
+
<slot name="item" :data="item">
|
|
34
|
+
<UiBadgeBaseBadge
|
|
35
|
+
class="text-base"
|
|
36
|
+
:label="String(item[labelKey])"
|
|
37
|
+
:variant="
|
|
38
|
+
void 0 == content || !content.includes(item?.id) ? 'outline' : 'primaryOutlineActive'
|
|
39
|
+
"
|
|
40
|
+
size="xl"
|
|
41
|
+
></UiBadgeBaseBadge>
|
|
42
|
+
</slot>
|
|
43
|
+
</ToggleGroupItem>
|
|
44
|
+
</ToggleGroupRoot>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
valueKey?: string;
|
|
5
|
+
labelKey?: string;
|
|
6
|
+
options?: option[];
|
|
7
|
+
id?: string;
|
|
8
|
+
modelValue?: number[];
|
|
9
|
+
};
|
|
10
|
+
interface option {
|
|
11
|
+
id: number;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
declare var __VLS_10: {
|
|
15
|
+
data: option;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
item?: (props: typeof __VLS_10) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
"update:modelValue": (value?: number[] | undefined) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value?: number[] | undefined) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
class: HTMLAttributes["class"];
|
|
26
|
+
modelValue: number[];
|
|
27
|
+
options: option[];
|
|
28
|
+
id: string;
|
|
29
|
+
valueKey: string;
|
|
30
|
+
labelKey: string;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ToggleGroupItem, ToggleGroupRoot } from "reka-ui";
|
|
3
|
+
import { useVModel } from "@vueuse/core";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
class: { type: null, required: false, default: void 0 },
|
|
6
|
+
itemClass: { type: null, required: false, default: void 0 },
|
|
7
|
+
valueKey: { type: String, required: false, default: "id" },
|
|
8
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
9
|
+
options: { type: Array, required: false, default: void 0 },
|
|
10
|
+
multiple: { type: Boolean, required: false, default: false },
|
|
11
|
+
modelValue: { type: [String, Number, Object, null, Array], required: false, default: [] },
|
|
12
|
+
allowEmptyValue: { type: Boolean, required: false, default: true }
|
|
13
|
+
});
|
|
14
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
15
|
+
const content = useVModel(props, "modelValue", emit);
|
|
16
|
+
const tempValue = ref();
|
|
17
|
+
watch(content, (value) => tempValue.value = value, { immediate: true });
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<ToggleGroupRoot
|
|
22
|
+
v-model="tempValue"
|
|
23
|
+
:type="props.multiple ? 'multiple' : 'single'"
|
|
24
|
+
:class="cn('flex flex-wrap gap-2', props.class)"
|
|
25
|
+
@update:model-value="
|
|
26
|
+
(value) => {
|
|
27
|
+
if (allowEmptyValue) return content = value;
|
|
28
|
+
if (value) content = value;
|
|
29
|
+
tempValue = content;
|
|
30
|
+
}
|
|
31
|
+
"
|
|
32
|
+
>
|
|
33
|
+
<ToggleGroupItem
|
|
34
|
+
v-for="(item, nIndex) in options"
|
|
35
|
+
:key="item[valueKey] + '-' + nIndex"
|
|
36
|
+
:value="item[valueKey]"
|
|
37
|
+
:disabled="!!item.disabled"
|
|
38
|
+
:class="
|
|
39
|
+
cn('flex rounded-full focus:outline-flux-primary', props.itemClass)
|
|
40
|
+
"
|
|
41
|
+
>
|
|
42
|
+
<template #default="{ state }">
|
|
43
|
+
<slot
|
|
44
|
+
name="item"
|
|
45
|
+
:data="item"
|
|
46
|
+
:active="state === 'on'"
|
|
47
|
+
:label="item[labelKey]?.toString()"
|
|
48
|
+
>
|
|
49
|
+
<UiBadgeBaseBadge
|
|
50
|
+
:label="item[labelKey]?.toString()"
|
|
51
|
+
:class="state === 'on' ? 'bg-surface-container-low' : void 0"
|
|
52
|
+
:variant="state === 'on' ? 'primaryOutline' : 'outline'"
|
|
53
|
+
size="xl"
|
|
54
|
+
></UiBadgeBaseBadge>
|
|
55
|
+
</slot>
|
|
56
|
+
</template>
|
|
57
|
+
</ToggleGroupItem>
|
|
58
|
+
</ToggleGroupRoot>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type AcceptableValue } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
itemClass?: HTMLAttributes['class'];
|
|
6
|
+
valueKey?: string;
|
|
7
|
+
labelKey?: string;
|
|
8
|
+
options?: Record<string, AcceptableValue>[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
modelValue?: AcceptableValue | AcceptableValue[];
|
|
11
|
+
allowEmptyValue?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_14: {
|
|
14
|
+
data: Record<string, AcceptableValue>;
|
|
15
|
+
active: boolean;
|
|
16
|
+
label: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
item?: (props: typeof __VLS_14) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
+
"update:modelValue": (value?: AcceptableValue | AcceptableValue[] | undefined) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
"onUpdate:modelValue"?: ((value?: AcceptableValue | AcceptableValue[] | undefined) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
class: HTMLAttributes["class"];
|
|
27
|
+
modelValue: AcceptableValue | AcceptableValue[];
|
|
28
|
+
options: Record<string, AcceptableValue>[];
|
|
29
|
+
valueKey: string;
|
|
30
|
+
labelKey: string;
|
|
31
|
+
multiple: boolean;
|
|
32
|
+
itemClass: HTMLAttributes["class"];
|
|
33
|
+
allowEmptyValue: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition>
|
|
3
|
+
<div :class="cn('inline-flex relative', props.class)" @mousemove="showTooltip = true" @mouseleave="showTooltip = false">
|
|
4
|
+
<Icon :name="icon" :size="iconSize + 'px'" class="text-flux-primary cursor-pointer" />
|
|
5
|
+
<template v-if="showTooltip">
|
|
6
|
+
<div class="absolute z-10 flex justify-center" :style="arrowStyle">
|
|
7
|
+
<div class="border-l-[6px] border-r-[6px] border-l-transparent border-r-transparent border-t-[6px] border-onSurfaceVariant" :class="[tooltipCenter ? 'rotate-180' : 'rotate-90']"></div>
|
|
8
|
+
</div>
|
|
9
|
+
<div ref="el" class="absolute text-surfaceVariant bg-onSurfaceVariant z-20 px-2 py-1 rounded-[4px] w-max" :style="contentWrapperStyle">
|
|
10
|
+
<slot/>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
</div>
|
|
14
|
+
</Transition>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
class: { type: null, required: false },
|
|
21
|
+
icon: { type: String, required: false, default: "material-symbols:info-outline" },
|
|
22
|
+
iconSize: { type: Number, required: false, default: 16 }
|
|
23
|
+
});
|
|
24
|
+
const showTooltip = ref(false);
|
|
25
|
+
const el = ref(null);
|
|
26
|
+
const { width } = useElementBounding(el);
|
|
27
|
+
const { width: windowWidth } = useWindowSize();
|
|
28
|
+
const tooltipCenter = computed(() => {
|
|
29
|
+
if (width.value < windowWidth.value / 2) return false;
|
|
30
|
+
return true;
|
|
31
|
+
});
|
|
32
|
+
const arrowStyle = computed(() => {
|
|
33
|
+
if (tooltipCenter.value) return {
|
|
34
|
+
left: 0,
|
|
35
|
+
right: 0,
|
|
36
|
+
flexDirection: "row",
|
|
37
|
+
top: props.iconSize + 2 + "px"
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
top: 0,
|
|
41
|
+
bottom: 0,
|
|
42
|
+
flexDirection: "column",
|
|
43
|
+
left: props.iconSize + "px"
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
const contentWrapperStyle = computed(() => {
|
|
47
|
+
if (tooltipCenter.value) return {
|
|
48
|
+
left: "50%",
|
|
49
|
+
top: props.iconSize + 8 + "px",
|
|
50
|
+
transform: "translateX(-50%)"
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
top: "50%",
|
|
54
|
+
left: props.iconSize + 8 + "px",
|
|
55
|
+
transform: "translateY(-50%)"
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconSize?: number;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_9: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_9) => 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<{}>, {
|
|
12
|
+
icon: string;
|
|
13
|
+
iconSize: number;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition>
|
|
3
|
+
<div class="relative" @mousemove="showTooltip = true" @mouseleave="showTooltip = false">
|
|
4
|
+
<Icon :name="icon" :size="iconSize" class="text-flux-primary cursor-pointer" />
|
|
5
|
+
<template v-if="showTooltip">
|
|
6
|
+
<div class="absolute inset-x-0 bg-transparent z-10 flex justify-center top-8">
|
|
7
|
+
<div class="w-4 h-4 bg-background rotate-45 pointer-tooltip rounded-sm default-tooltip-shadow"></div>
|
|
8
|
+
</div>
|
|
9
|
+
<div ref="el" class="absolute top-10 text-onSurface bg-background default-tooltip-shadow z-20 p-[18px] rounded-xl w-max" :style="{ left: tooltipPosition.left, transform: tooltipPosition.transform }">
|
|
10
|
+
<slot/>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
</div>
|
|
14
|
+
</Transition>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import { useElementBounding, useWindowSize } from "@vueuse/core";
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
icon: { type: String, required: false, default: "material-symbols:info-outline" },
|
|
21
|
+
iconSize: { type: String, required: false, default: "24px" },
|
|
22
|
+
offsetDirection: { type: String, required: false, default: "left" }
|
|
23
|
+
});
|
|
24
|
+
const showTooltip = ref(false);
|
|
25
|
+
const el = ref(null);
|
|
26
|
+
const { width } = useElementBounding(el);
|
|
27
|
+
const { width: windowWidth } = useWindowSize();
|
|
28
|
+
const tooltipPosition = computed(() => {
|
|
29
|
+
if (width.value < windowWidth.value / 2) {
|
|
30
|
+
return {
|
|
31
|
+
left: "50%",
|
|
32
|
+
transform: "translateX(-50%)"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (props.offsetDirection === "center") {
|
|
36
|
+
return {
|
|
37
|
+
left: "50%",
|
|
38
|
+
transform: "translateX(-50%)"
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
left: "0",
|
|
43
|
+
transform: `translateX(${props.offsetDirection === "left" ? "-80%" : "-20%"})`
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.pointer-tooltip:before{box-shadow:-4px -3px 10px rgba(0,0,0,.05);z-index:-1}.pointer-tooltip:after,.pointer-tooltip:before{content:"";height:100%;left:0;position:absolute;top:0;width:100%}
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
icon?: string;
|
|
3
|
+
iconSize?: string;
|
|
4
|
+
offsetDirection?: 'left' | 'right' | 'center';
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_9: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_9) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
icon: string;
|
|
12
|
+
iconSize: string;
|
|
13
|
+
offsetDirection: "left" | "right" | "center";
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const formatNumber = (num, currency = false) => {
|
|
2
|
+
if (!num && num !== 0) return 0;
|
|
3
|
+
return new Intl.NumberFormat("id-ID", {
|
|
4
|
+
style: currency ? "currency" : "decimal",
|
|
5
|
+
currency: currency ? "IDR" : void 0,
|
|
6
|
+
minimumFractionDigits: 0,
|
|
7
|
+
maximumFractionDigits: 2,
|
|
8
|
+
currencyDisplay: "narrowSymbol"
|
|
9
|
+
// Use narrowSymbol to remove spacing
|
|
10
|
+
}).format(num).replace(/\s+/g, "");
|
|
11
|
+
};
|
|
12
|
+
export const numberToFixedExceptRoundNumber = (num, fractionDigits = 1) => num ? Number.parseFloat(num.toFixed(fractionDigits)) : 0;
|
package/dist/types.d.mts
ADDED