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,52 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { findFallbackIcon, iconFallbackSizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
type: { type: String, required: false, default: "image" },
|
|
5
|
+
src: { type: String, required: false },
|
|
6
|
+
alt: { type: String, required: false, default: "none" },
|
|
7
|
+
openable: { type: Boolean, required: false, default: true },
|
|
8
|
+
dismissable: { type: Boolean, required: false },
|
|
9
|
+
width: { type: String, required: false, default: "72px" },
|
|
10
|
+
height: { type: String, required: false, default: "72px" },
|
|
11
|
+
iconFallbackSize: { type: null, required: false, default: "default" }
|
|
12
|
+
});
|
|
13
|
+
const emits = defineEmits(["onDismiss"]);
|
|
14
|
+
const handleOpen = () => {
|
|
15
|
+
if (!props.openable) return;
|
|
16
|
+
return window.open(props.src, "_blank");
|
|
17
|
+
};
|
|
18
|
+
const handleDismiss = (e) => {
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
emits("onDismiss");
|
|
21
|
+
};
|
|
22
|
+
const makeIcon = computed(() => findFallbackIcon(props.type));
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div
|
|
27
|
+
class="relative rounded-xl overflow-hidden"
|
|
28
|
+
:class="{ 'cursor-pointer': openable }"
|
|
29
|
+
:style="{ width, height }"
|
|
30
|
+
@click="handleOpen"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
v-if="props.dismissable"
|
|
34
|
+
class="absolute top-1 right-1 bg-surfaceContainerLow text-flux-primary rounded-full w-4 h-4 flex items-center justify-center cursor-pointer"
|
|
35
|
+
@click="handleDismiss"
|
|
36
|
+
>
|
|
37
|
+
<Icon name="mdi:close" size="12px" />
|
|
38
|
+
</div>
|
|
39
|
+
<img
|
|
40
|
+
v-if="props.type === 'image' && props.src"
|
|
41
|
+
:src="props.src"
|
|
42
|
+
:alt="alt"
|
|
43
|
+
class="w-full h-full object-cover"
|
|
44
|
+
/>
|
|
45
|
+
<div
|
|
46
|
+
v-else
|
|
47
|
+
class="w-full h-full bg-secondaryContainer text-flux-secondary flex justify-center items-center"
|
|
48
|
+
>
|
|
49
|
+
<Icon :name="makeIcon" :size="iconFallbackSizeConfig[iconFallbackSize]" />
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { iconFallbackSizeConfig } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type?: 'image' | 'file' | 'video';
|
|
4
|
+
src?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
openable?: boolean;
|
|
7
|
+
dismissable?: boolean;
|
|
8
|
+
width?: string;
|
|
9
|
+
height?: string;
|
|
10
|
+
iconFallbackSize?: keyof typeof iconFallbackSizeConfig;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
onDismiss: () => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onOnDismiss?: (() => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
type: "image" | "file" | "video";
|
|
18
|
+
width: string;
|
|
19
|
+
alt: string;
|
|
20
|
+
height: string;
|
|
21
|
+
openable: boolean;
|
|
22
|
+
iconFallbackSize: keyof typeof iconFallbackSizeConfig;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { findFallbackIcon, iconFallbackSizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false, default: void 0 },
|
|
5
|
+
type: { type: String, required: false, default: "image" },
|
|
6
|
+
src: { type: String, required: false, default: void 0 },
|
|
7
|
+
label: { type: String, required: false, default: void 0 },
|
|
8
|
+
dismissable: { type: Boolean, required: false, default: true },
|
|
9
|
+
iconFallbackSize: { type: null, required: false, default: "xs" },
|
|
10
|
+
invalid: { type: Boolean, required: false },
|
|
11
|
+
invalidMessage: { type: [String, null], required: false, default: void 0 }
|
|
12
|
+
});
|
|
13
|
+
const emits = defineEmits(["onDismiss", "onClick"]);
|
|
14
|
+
const handleClick = () => emits("onClick");
|
|
15
|
+
const handleDismiss = (e) => {
|
|
16
|
+
e.stopPropagation();
|
|
17
|
+
emits("onDismiss");
|
|
18
|
+
};
|
|
19
|
+
const makeIcon = computed(() => findFallbackIcon(props.type));
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'bg-surface-container-high p-1.5 rounded-md flex flex-col gap-2',
|
|
27
|
+
props.class
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
@click="handleClick"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex items-center justify-between gap-2">
|
|
33
|
+
<div class="flex items-center gap-2 justify-start overflow-hidden">
|
|
34
|
+
<Icon
|
|
35
|
+
:name="makeIcon"
|
|
36
|
+
class="text-outline flex-none"
|
|
37
|
+
:size="iconFallbackSizeConfig[iconFallbackSize]"
|
|
38
|
+
/>
|
|
39
|
+
<span
|
|
40
|
+
class="text-xs font-semibold line-clamp-1"
|
|
41
|
+
:class="{ 'text-flux-error': props.invalid }"
|
|
42
|
+
>{{ props.label }}</span
|
|
43
|
+
>
|
|
44
|
+
</div>
|
|
45
|
+
<Icon
|
|
46
|
+
v-if="props.dismissable"
|
|
47
|
+
name="mdi:close"
|
|
48
|
+
class="text-flux-primary cursor-pointer flex-none"
|
|
49
|
+
:size="iconFallbackSizeConfig[iconFallbackSize]"
|
|
50
|
+
@click="handleDismiss"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<p v-if="props.invalid" class="text-[8px] font-medium text-flux-error">
|
|
54
|
+
{{ props.invalidMessage }}
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { iconFallbackSizeConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
type?: 'image' | 'file' | 'video' | 'audio' | 'contact' | 'location';
|
|
6
|
+
src?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
dismissable?: boolean;
|
|
9
|
+
iconFallbackSize?: keyof typeof iconFallbackSizeConfig;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
invalidMessage?: string | null;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
onDismiss: () => void;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onOnClick?: (() => any) | undefined;
|
|
18
|
+
onOnDismiss?: (() => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
type: "image" | "file" | "video" | "audio" | "contact" | "location";
|
|
21
|
+
label: string;
|
|
22
|
+
class: HTMLAttributes["class"];
|
|
23
|
+
src: string;
|
|
24
|
+
dismissable: boolean;
|
|
25
|
+
iconFallbackSize: keyof typeof iconFallbackSizeConfig;
|
|
26
|
+
invalidMessage: string | null;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const iconFallbackConfig: {
|
|
2
|
+
image: string;
|
|
3
|
+
file: string;
|
|
4
|
+
video: string;
|
|
5
|
+
contact: string;
|
|
6
|
+
audio: string;
|
|
7
|
+
location: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const iconFallbackSizeConfig: {
|
|
10
|
+
default: string;
|
|
11
|
+
xs: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
lg: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const findFallbackIcon: (type: keyof typeof iconFallbackConfig) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const iconFallbackConfig = {
|
|
2
|
+
image: "material-symbols:image-outline",
|
|
3
|
+
file: "material-symbols:description-outline",
|
|
4
|
+
video: "mdi:videocam-outline",
|
|
5
|
+
contact: "material-symbols:person-outline",
|
|
6
|
+
audio: "material-symbols:audio-file-outline",
|
|
7
|
+
location: "material-symbols:location-on-outline"
|
|
8
|
+
};
|
|
9
|
+
export const iconFallbackSizeConfig = {
|
|
10
|
+
default: "36px",
|
|
11
|
+
xs: "20px",
|
|
12
|
+
sm: "28px",
|
|
13
|
+
lg: "44px"
|
|
14
|
+
};
|
|
15
|
+
export const findFallbackIcon = (type) => iconFallbackConfig[type];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { sizeConfig, variantConfig, textSizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
size: { type: null, required: false, default: "default" },
|
|
5
|
+
class: { type: null, required: false, default: void 0 },
|
|
6
|
+
src: { type: String, required: false, default: void 0 },
|
|
7
|
+
variant: { type: null, required: false, default: "primary" },
|
|
8
|
+
shape: { type: String, required: false, default: "circle" },
|
|
9
|
+
alt: { type: String, required: false, default: "profile" },
|
|
10
|
+
text: { type: String, required: false, default: void 0 }
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div
|
|
16
|
+
:class="
|
|
17
|
+
cn(
|
|
18
|
+
'overflow-hidden',
|
|
19
|
+
shape === 'circle' ? 'rounded-full' : 'rounded-none',
|
|
20
|
+
variantConfig[props.variant],
|
|
21
|
+
sizeConfig[size],
|
|
22
|
+
{
|
|
23
|
+
'flex-none flex items-center justify-center': props.text
|
|
24
|
+
},
|
|
25
|
+
props.class
|
|
26
|
+
)
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
<span v-if="props.text" :class="[textSizeConfig[size], 'font-bold']">
|
|
30
|
+
{{ InitialName(props.text) }}
|
|
31
|
+
</span>
|
|
32
|
+
<slot>
|
|
33
|
+
<img
|
|
34
|
+
v-if="!props.text"
|
|
35
|
+
:src="src || '/svg/avatar/avatar-ang-2.svg'"
|
|
36
|
+
:alt="alt"
|
|
37
|
+
class="w-full h-full object-fill"
|
|
38
|
+
/>
|
|
39
|
+
</slot>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { sizeConfig, variantConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
size?: keyof typeof sizeConfig;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
src?: string;
|
|
7
|
+
variant?: keyof typeof variantConfig;
|
|
8
|
+
shape?: 'circle' | 'square';
|
|
9
|
+
alt?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
text: string;
|
|
18
|
+
class: HTMLAttributes["class"];
|
|
19
|
+
size: keyof typeof sizeConfig;
|
|
20
|
+
src: string;
|
|
21
|
+
variant: keyof typeof variantConfig;
|
|
22
|
+
alt: string;
|
|
23
|
+
shape: "circle" | "square";
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { iconSizeConfig, sizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
size: { type: null, required: false, default: "default" },
|
|
5
|
+
class: { type: null, required: false },
|
|
6
|
+
iconName: { type: String, required: false, default: "mdi:account" },
|
|
7
|
+
iconColor: { type: String, required: false, default: "text-flux-info" },
|
|
8
|
+
backgroundColor: { type: String, required: false, default: "bg-infoContainer" },
|
|
9
|
+
shape: { type: String, required: false, default: "circle" }
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div
|
|
15
|
+
:class="
|
|
16
|
+
cn(
|
|
17
|
+
'flex items-center justify-center',
|
|
18
|
+
shape === 'circle' ? 'rounded-full' : 'rounded-none',
|
|
19
|
+
backgroundColor,
|
|
20
|
+
iconColor,
|
|
21
|
+
sizeConfig[size],
|
|
22
|
+
props.class
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
<Icon :name="iconName" :size="iconSizeConfig[size]" />
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { sizeConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
size?: keyof typeof sizeConfig;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
iconName?: string;
|
|
7
|
+
iconColor?: string;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
shape?: 'circle' | 'square';
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
size: keyof typeof sizeConfig;
|
|
13
|
+
iconName: string;
|
|
14
|
+
shape: "circle" | "square";
|
|
15
|
+
iconColor: string;
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const variantConfig: {
|
|
2
|
+
primary: string;
|
|
3
|
+
info: string;
|
|
4
|
+
infoContainer: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
tertiary: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const sizeConfig: {
|
|
11
|
+
default: string;
|
|
12
|
+
xs: string;
|
|
13
|
+
sm: string;
|
|
14
|
+
lg: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const iconSizeConfig: {
|
|
17
|
+
default: string;
|
|
18
|
+
xs: string;
|
|
19
|
+
sm: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const textSizeConfig: {
|
|
23
|
+
default: string;
|
|
24
|
+
xs: string;
|
|
25
|
+
sm: string;
|
|
26
|
+
lg: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const variantConfig = {
|
|
2
|
+
primary: "bg-flux-primary text-on-primary",
|
|
3
|
+
info: "bg-flux-info text-on-info",
|
|
4
|
+
infoContainer: "bg-info-container text-flux-info",
|
|
5
|
+
success: "bg-flux-success text-on-success",
|
|
6
|
+
warning: "bg-flux-warning text-on-warning",
|
|
7
|
+
secondary: "bg-flux-secondary text-on-secondary",
|
|
8
|
+
tertiary: "bg-flux-tertiary text-on-tertiary"
|
|
9
|
+
};
|
|
10
|
+
export const sizeConfig = {
|
|
11
|
+
default: "h-8 w-8",
|
|
12
|
+
xs: "h-4 w-4",
|
|
13
|
+
sm: "h-6 w-6",
|
|
14
|
+
lg: "h-10 w-10"
|
|
15
|
+
};
|
|
16
|
+
export const iconSizeConfig = {
|
|
17
|
+
default: "20px",
|
|
18
|
+
xs: "12px",
|
|
19
|
+
sm: "16px",
|
|
20
|
+
lg: "24px"
|
|
21
|
+
};
|
|
22
|
+
export const textSizeConfig = {
|
|
23
|
+
default: "text-xs",
|
|
24
|
+
xs: "text-xxs",
|
|
25
|
+
sm: "text-xs",
|
|
26
|
+
lg: "text-sm"
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { sizeConfig, variantConfig, textSizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false, default: void 0 },
|
|
5
|
+
variant: { type: null, required: false, default: "primary" },
|
|
6
|
+
size: { type: null, required: false, default: "default" },
|
|
7
|
+
label: { type: String, required: false, default: "" },
|
|
8
|
+
bgColor: { type: String, required: false, default: void 0 }
|
|
9
|
+
});
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div
|
|
14
|
+
:class="
|
|
15
|
+
cn(
|
|
16
|
+
'py-1 px-2 rounded-full inline-flex font-semibold text-center',
|
|
17
|
+
variantConfig[variant],
|
|
18
|
+
sizeConfig[size],
|
|
19
|
+
props.class
|
|
20
|
+
)
|
|
21
|
+
"
|
|
22
|
+
:style="{ backgroundColor: bgColor }"
|
|
23
|
+
>
|
|
24
|
+
<span :class="cn('text-xs', textSizeConfig[size])" v-html="label"></span>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { sizeConfig, variantConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
variant?: keyof typeof variantConfig;
|
|
6
|
+
size?: keyof typeof sizeConfig;
|
|
7
|
+
label?: string;
|
|
8
|
+
bgColor?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
label: string;
|
|
12
|
+
class: HTMLAttributes["class"];
|
|
13
|
+
size: keyof typeof sizeConfig;
|
|
14
|
+
variant: keyof typeof variantConfig;
|
|
15
|
+
bgColor: string;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { iconSizeConfig, sizeConfig, variantConfig, textSizeConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false, default: void 0 },
|
|
5
|
+
variant: { type: null, required: false, default: "primary" },
|
|
6
|
+
size: { type: null, required: false, default: "default" },
|
|
7
|
+
label: { type: String, required: false, default: "" },
|
|
8
|
+
iconName: { type: String, required: false, default: "mdi:circle" },
|
|
9
|
+
bgColor: { type: String, required: false, default: void 0 },
|
|
10
|
+
iconSize: { type: null, required: false, default: void 0 },
|
|
11
|
+
textClass: { type: null, required: false, default: void 0 }
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
:class="
|
|
18
|
+
cn(
|
|
19
|
+
'rounded-full flex items-center gap-1',
|
|
20
|
+
variantConfig[variant],
|
|
21
|
+
sizeConfig[size],
|
|
22
|
+
props.class
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
:style="{ backgroundColor: bgColor }"
|
|
26
|
+
>
|
|
27
|
+
<Icon
|
|
28
|
+
class="flex-none"
|
|
29
|
+
:name="iconName"
|
|
30
|
+
:size="iconSizeConfig[iconSize ?? size]"
|
|
31
|
+
/>
|
|
32
|
+
<span
|
|
33
|
+
:class="cn('text-xs font-medium', textSizeConfig[size], props.textClass)"
|
|
34
|
+
>{{ label }}</span
|
|
35
|
+
>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { iconSizeConfig, sizeConfig, variantConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
variant?: keyof typeof variantConfig;
|
|
6
|
+
size?: keyof typeof sizeConfig;
|
|
7
|
+
label?: string;
|
|
8
|
+
iconName?: string;
|
|
9
|
+
bgColor?: string;
|
|
10
|
+
iconSize?: keyof typeof iconSizeConfig;
|
|
11
|
+
textClass?: HTMLAttributes['class'];
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
label: string;
|
|
15
|
+
class: HTMLAttributes["class"];
|
|
16
|
+
size: keyof typeof sizeConfig;
|
|
17
|
+
iconName: string;
|
|
18
|
+
variant: keyof typeof variantConfig;
|
|
19
|
+
iconSize: keyof typeof iconSizeConfig;
|
|
20
|
+
bgColor: string;
|
|
21
|
+
textClass: HTMLAttributes["class"];
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const variantConfig: {
|
|
2
|
+
primary: string;
|
|
3
|
+
primaryOutline: string;
|
|
4
|
+
primaryOutlineActive: string;
|
|
5
|
+
primaryTransparent: string;
|
|
6
|
+
info: string;
|
|
7
|
+
infoContainer: string;
|
|
8
|
+
infoTransparent: string;
|
|
9
|
+
infoOutline: string;
|
|
10
|
+
success: string;
|
|
11
|
+
successContainer: string;
|
|
12
|
+
successTransparent: string;
|
|
13
|
+
successOutline: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
warningContainer: string;
|
|
16
|
+
warningTransparent: string;
|
|
17
|
+
warningOutline: string;
|
|
18
|
+
warningYellow: string;
|
|
19
|
+
warningYellowTransparent: string;
|
|
20
|
+
warningYellowOutline: string;
|
|
21
|
+
error: string;
|
|
22
|
+
errorContainer: string;
|
|
23
|
+
errorTransparent: string;
|
|
24
|
+
errorOutline: string;
|
|
25
|
+
black: string;
|
|
26
|
+
blackContainer: string;
|
|
27
|
+
outline: string;
|
|
28
|
+
secondaryContainer: string;
|
|
29
|
+
container: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const sizeConfig: {
|
|
32
|
+
default: string;
|
|
33
|
+
xs: string;
|
|
34
|
+
xl: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const iconSizeConfig: {
|
|
37
|
+
default: string;
|
|
38
|
+
xs: string;
|
|
39
|
+
xl: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const textSizeConfig: {
|
|
42
|
+
default: string;
|
|
43
|
+
xs: string;
|
|
44
|
+
xl: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export const variantConfig = {
|
|
2
|
+
primary: "bg-primaryContainer text-flux-primary",
|
|
3
|
+
primaryOutline: "border border-flux-primary text-flux-primary",
|
|
4
|
+
primaryOutlineActive: "text-flux-primary border border-flux-primary bg-surfaceContainer",
|
|
5
|
+
primaryTransparent: "text-flux-primary",
|
|
6
|
+
info: "bg-flux-info text-onInfo",
|
|
7
|
+
infoContainer: "bg-info-container text-flux-info",
|
|
8
|
+
infoTransparent: "text-flux-info",
|
|
9
|
+
infoOutline: "border border-flux-info text-flux-info",
|
|
10
|
+
success: "bg-flux-success text-onSuccess",
|
|
11
|
+
successContainer: "bg-successContainer text-flux-success",
|
|
12
|
+
successTransparent: "text-flux-success",
|
|
13
|
+
successOutline: "border border-flux-success text-flux-success",
|
|
14
|
+
warning: "bg-flux-warning text-onWarning",
|
|
15
|
+
warningContainer: "bg-warningContainer text-flux-warning",
|
|
16
|
+
warningTransparent: "text-flux-warning",
|
|
17
|
+
warningOutline: "border border-flux-warning text-flux-warning",
|
|
18
|
+
warningYellow: "bg-flux-warningYellow text-onWarningYellow",
|
|
19
|
+
warningYellowTransparent: "text-flux-warningYellow",
|
|
20
|
+
warningYellowOutline: "border border-flux-warningYellow text-flux-warningYellow",
|
|
21
|
+
error: "bg-flux-error text-onError",
|
|
22
|
+
errorContainer: "bg-errorContainer text-flux-error",
|
|
23
|
+
errorTransparent: "text-flux-error",
|
|
24
|
+
errorOutline: "border border-flux-error text-flux-error",
|
|
25
|
+
black: "bg-onSurfaceVariant text-surface",
|
|
26
|
+
blackContainer: "bg-surfaceContainerHigh text-onSurface",
|
|
27
|
+
outline: "text-flux-outline border border-outlineVariant",
|
|
28
|
+
secondaryContainer: "bg-secondary-container text-flux-secondary",
|
|
29
|
+
container: "bg-surface-container text-on-surface"
|
|
30
|
+
};
|
|
31
|
+
export const sizeConfig = {
|
|
32
|
+
default: "py-1 px-2",
|
|
33
|
+
xs: "px-1.5 py-0.5",
|
|
34
|
+
xl: "py-2 px-3.5"
|
|
35
|
+
};
|
|
36
|
+
export const iconSizeConfig = {
|
|
37
|
+
default: "14px",
|
|
38
|
+
xs: "12px",
|
|
39
|
+
xl: "16px"
|
|
40
|
+
};
|
|
41
|
+
export const textSizeConfig = {
|
|
42
|
+
default: "text-xs",
|
|
43
|
+
xs: "text-xxs",
|
|
44
|
+
xl: "text-sm"
|
|
45
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="[
|
|
3
|
+
'flex items-center font-medium gap-1.5',
|
|
4
|
+
{
|
|
5
|
+
'text-flux-error': !valid,
|
|
6
|
+
'text-flux-success': valid
|
|
7
|
+
}
|
|
8
|
+
]">
|
|
9
|
+
<Icon size="22px" :name="valid ? 'material-symbols:location-on-outline' : 'material-symbols:location-off-outline'"/>
|
|
10
|
+
<span v-text="valid ? 'Sudah Pin Lokasi' : 'Belum Pin Lokasi'"></span>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
defineProps({
|
|
16
|
+
valid: { type: Boolean, required: true }
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
};
|
|
4
|
+
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>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { iconSizeConfig, sizeConfig, variantConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false },
|
|
5
|
+
variant: { type: null, required: false, default: "primary" },
|
|
6
|
+
size: { type: null, required: false, default: "default" },
|
|
7
|
+
label: { type: String, required: false, default: "" },
|
|
8
|
+
disabled: { type: Boolean, required: false },
|
|
9
|
+
loading: { type: Boolean, required: false }
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<button
|
|
15
|
+
:class="
|
|
16
|
+
cn(
|
|
17
|
+
'rounded-full flex justify-center items-center gap-2 text-sm font-semibold disabled:opacity-40 disabled:cursor-not-allowed hover:saturate-150',
|
|
18
|
+
variantConfig[variant],
|
|
19
|
+
sizeConfig[size],
|
|
20
|
+
props.class
|
|
21
|
+
)
|
|
22
|
+
"
|
|
23
|
+
:disabled="disabled || loading"
|
|
24
|
+
>
|
|
25
|
+
<Icon
|
|
26
|
+
v-if="loading"
|
|
27
|
+
name="svg-spinners:ring-resize"
|
|
28
|
+
:size="iconSizeConfig[size]"
|
|
29
|
+
/>
|
|
30
|
+
{{ label }}
|
|
31
|
+
</button>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { sizeConfig, variantConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
variant?: keyof typeof variantConfig;
|
|
6
|
+
size?: keyof typeof sizeConfig;
|
|
7
|
+
label?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
label: string;
|
|
13
|
+
size: keyof typeof sizeConfig;
|
|
14
|
+
variant: keyof typeof variantConfig;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|