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,119 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
import {
|
|
4
|
+
SelectContent,
|
|
5
|
+
SelectGroup,
|
|
6
|
+
SelectItem,
|
|
7
|
+
SelectItemText,
|
|
8
|
+
SelectPortal,
|
|
9
|
+
SelectRoot,
|
|
10
|
+
SelectTrigger,
|
|
11
|
+
SelectValue,
|
|
12
|
+
SelectViewport
|
|
13
|
+
} from "reka-ui";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
class: { type: null, required: false, default: void 0 },
|
|
16
|
+
modelValue: { type: Array, required: false, default: void 0 },
|
|
17
|
+
defaultModelValue: { type: Array, required: false, default: void 0 },
|
|
18
|
+
options: { type: Array, required: true },
|
|
19
|
+
placeholder: { type: String, required: false, default: "Pilih Satu" },
|
|
20
|
+
valueKey: { type: String, required: false, default: "id" },
|
|
21
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
22
|
+
invalid: { type: Boolean, required: false },
|
|
23
|
+
widthContent: { type: String, required: false, default: void 0 },
|
|
24
|
+
icon: { type: String, required: false, default: "material-symbols:keyboard-arrow-down" }
|
|
25
|
+
});
|
|
26
|
+
const emits = defineEmits(["update:modelValue", "select-all"]);
|
|
27
|
+
const modelValue = useVModel(props, "modelValue", emits, {
|
|
28
|
+
defaultValue: props.defaultModelValue
|
|
29
|
+
});
|
|
30
|
+
const onSelectAll = (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
modelValue.value = [];
|
|
33
|
+
emits("select-all");
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<SelectRoot v-model="modelValue" multiple>
|
|
39
|
+
<slot>
|
|
40
|
+
<SelectTrigger
|
|
41
|
+
:class="
|
|
42
|
+
cn(
|
|
43
|
+
'flex justify-between relative text-left items-start pl-2.5 pr-10 py-2 text-sm rounded-lg border border-outline-variant focus-visible:outline-none ring-0 focus-visible:ring-offset-1 focus-visible:ring-offset-flux-primary disabled:cursor-not-allowed disabled:opacity-50 peer focus-visible:text-onSurface focus-visible:bg-surfaceContainerLowest',
|
|
44
|
+
[
|
|
45
|
+
props.invalid ? 'text-flux-error ring-inset-1 ring-inset-flux-error focus:border-flux-error bg-surfaceContainerLow' : 'text-onSurface ring-inset-0 ring-inset-flux-primary focus:border-flux-primary bg-surfaceContainerLowest'
|
|
46
|
+
],
|
|
47
|
+
props.class
|
|
48
|
+
)
|
|
49
|
+
"
|
|
50
|
+
>
|
|
51
|
+
<SelectValue>
|
|
52
|
+
<template #default="{ selectedLabel }">
|
|
53
|
+
<slot
|
|
54
|
+
v-if="selectedLabel.length"
|
|
55
|
+
name="label"
|
|
56
|
+
:count="selectedLabel.length"
|
|
57
|
+
>
|
|
58
|
+
<span>{{ selectedLabel.length + " Terpilih" }}</span>
|
|
59
|
+
</slot>
|
|
60
|
+
<span v-else class="text-flux-outline">{{ placeholder }}</span>
|
|
61
|
+
</template>
|
|
62
|
+
</SelectValue>
|
|
63
|
+
<Icon
|
|
64
|
+
:name="props.icon"
|
|
65
|
+
class="text-flux-primary shrink-0 absolute right-2.5 top-1/2 -translate-y-1/2"
|
|
66
|
+
size="24px"
|
|
67
|
+
/>
|
|
68
|
+
</SelectTrigger>
|
|
69
|
+
</slot>
|
|
70
|
+
|
|
71
|
+
<SelectPortal>
|
|
72
|
+
<SelectContent
|
|
73
|
+
class="bg-background rounded-md shadow-lg z-100 border border-outline-variant p-2"
|
|
74
|
+
:class="{ 'w-[--reka-select-trigger-width]': !widthContent }"
|
|
75
|
+
:style="{ width: widthContent }"
|
|
76
|
+
position="popper"
|
|
77
|
+
:body-lock="false"
|
|
78
|
+
:side-offset="4"
|
|
79
|
+
>
|
|
80
|
+
<UiScrollAreaBase
|
|
81
|
+
class="h-fit max-h-60"
|
|
82
|
+
class-viewport="h-fit max-h-60"
|
|
83
|
+
>
|
|
84
|
+
<SelectViewport class="w-full h-full">
|
|
85
|
+
<SelectGroup>
|
|
86
|
+
<SelectItem
|
|
87
|
+
class="text-sm text-on-surface rounded-xl flex items-center justify-between gap-1 px-4 py-2 data-[highlighted]:outline-none data-[highlighted]:bg-surface-container cursor-default"
|
|
88
|
+
value="all"
|
|
89
|
+
@select="onSelectAll"
|
|
90
|
+
>
|
|
91
|
+
<SelectItemText> Semua </SelectItemText>
|
|
92
|
+
</SelectItem>
|
|
93
|
+
<SelectItem
|
|
94
|
+
v-for="(option, index) in options"
|
|
95
|
+
:key="`option-${option[props.valueKey]}-${index}`"
|
|
96
|
+
class="text-sm text-on-surface rounded-xl flex items-center gap-2 px-4 py-2 data-[highlighted]:outline-none data-[highlighted]:bg-surface-container group cursor-default data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"
|
|
97
|
+
:value="option[props.valueKey] || '-'"
|
|
98
|
+
:disabled="!!option.disabled"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="flex-none w-6 h-6 rounded-md flex justify-center items-center border-2 border-outline-variant bg-transparent group-data-[state=checked]:bg-flux-primary group-data-[state=checked]:border-flux-primary"
|
|
102
|
+
>
|
|
103
|
+
<Icon
|
|
104
|
+
name="material-symbols:check"
|
|
105
|
+
class="text-background hidden group-data-[state=checked]:block"
|
|
106
|
+
size="20px"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<SelectItemText>
|
|
110
|
+
{{ option[labelKey] }}
|
|
111
|
+
</SelectItemText>
|
|
112
|
+
</SelectItem>
|
|
113
|
+
</SelectGroup>
|
|
114
|
+
</SelectViewport>
|
|
115
|
+
</UiScrollAreaBase>
|
|
116
|
+
</SelectContent>
|
|
117
|
+
</SelectPortal>
|
|
118
|
+
</SelectRoot>
|
|
119
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type AcceptableValue } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
modelValue?: AcceptableValue[];
|
|
6
|
+
defaultModelValue?: AcceptableValue[];
|
|
7
|
+
options: Record<string, AcceptableValue>[];
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
valueKey?: string;
|
|
10
|
+
labelKey?: string;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
widthContent?: string;
|
|
13
|
+
icon?: string;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_6: {}, __VLS_16: {
|
|
16
|
+
count: number;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_6) => any;
|
|
20
|
+
} & {
|
|
21
|
+
label?: (props: typeof __VLS_16) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
"update:modelValue": (payload?: AcceptableValue[] | undefined) => any;
|
|
25
|
+
"select-all": () => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((payload?: AcceptableValue[] | undefined) => any) | undefined;
|
|
28
|
+
"onSelect-all"?: (() => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
class: HTMLAttributes["class"];
|
|
31
|
+
modelValue: AcceptableValue[];
|
|
32
|
+
icon: string;
|
|
33
|
+
placeholder: string;
|
|
34
|
+
valueKey: string;
|
|
35
|
+
labelKey: string;
|
|
36
|
+
defaultModelValue: AcceptableValue[];
|
|
37
|
+
widthContent: string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<UiLabelBaseLabel v-if="label" :is-required="required" :text="label" />
|
|
4
|
+
<HeadlessListbox v-model="selectedItem">
|
|
5
|
+
<div class="relative">
|
|
6
|
+
<HeadlessListboxButton
|
|
7
|
+
type="button"
|
|
8
|
+
class="relative w-full cursor-default rounded-xl border border-outlineVariant py-2.5 focus:border-transparent focus:ring-inset transition-all pl-3 pr-10 text-left focus:outline-none focus:ring-2 focus:ring-flux-primary sm:text-sm"
|
|
9
|
+
>
|
|
10
|
+
<span class="block truncate">{{
|
|
11
|
+
selectedItem ? selectedItem[labelKey] : placeholder
|
|
12
|
+
}}</span>
|
|
13
|
+
<span
|
|
14
|
+
class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
|
|
15
|
+
>
|
|
16
|
+
<Icon
|
|
17
|
+
name="material-symbols:keyboard-arrow-down"
|
|
18
|
+
class="h-5 w-5"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
/>
|
|
21
|
+
</span>
|
|
22
|
+
</HeadlessListboxButton>
|
|
23
|
+
|
|
24
|
+
<transition
|
|
25
|
+
leave-active-class="transition duration-100 ease-in"
|
|
26
|
+
leave-from-class="opacity-100"
|
|
27
|
+
leave-to-class="opacity-0"
|
|
28
|
+
>
|
|
29
|
+
<HeadlessListboxOptions
|
|
30
|
+
:class="
|
|
31
|
+
cn(
|
|
32
|
+
'absolute mt-1 max-h-60 w-full overflow-auto z-10 rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm',
|
|
33
|
+
props.optionPopClass
|
|
34
|
+
)
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
<HeadlessListboxOption
|
|
38
|
+
v-for="(item, key) in options"
|
|
39
|
+
v-slot="{ active, selected }"
|
|
40
|
+
:key="`select-${key}`"
|
|
41
|
+
:value="item"
|
|
42
|
+
as="template"
|
|
43
|
+
>
|
|
44
|
+
<li
|
|
45
|
+
:class="[
|
|
46
|
+
active ? 'bg-primaryContainer text-flux-primary' : 'text-gray-900',
|
|
47
|
+
'relative cursor-default select-none py-2 pl-10 pr-4'
|
|
48
|
+
]"
|
|
49
|
+
>
|
|
50
|
+
<span
|
|
51
|
+
:class="[
|
|
52
|
+
selected ? 'font-medium' : 'font-normal',
|
|
53
|
+
'block truncate'
|
|
54
|
+
]"
|
|
55
|
+
>{{ item[labelKey] }}</span
|
|
56
|
+
>
|
|
57
|
+
<span
|
|
58
|
+
v-if="selected"
|
|
59
|
+
class="absolute inset-y-0 left-0 flex items-center pl-3 text-flux-primary"
|
|
60
|
+
>
|
|
61
|
+
<Icon
|
|
62
|
+
name="material-symbols:check"
|
|
63
|
+
class="h-5 w-5"
|
|
64
|
+
aria-hidden="true"
|
|
65
|
+
/>
|
|
66
|
+
</span>
|
|
67
|
+
</li>
|
|
68
|
+
</HeadlessListboxOption>
|
|
69
|
+
</HeadlessListboxOptions>
|
|
70
|
+
</transition>
|
|
71
|
+
</div>
|
|
72
|
+
</HeadlessListbox>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script setup>
|
|
77
|
+
const props = defineProps({
|
|
78
|
+
modelValue: { type: [Number, String], required: false },
|
|
79
|
+
valueKey: { type: String, required: false, default: "id" },
|
|
80
|
+
placeholder: { type: String, required: false, default: "Pilih Satu" },
|
|
81
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
82
|
+
label: { type: String, required: false },
|
|
83
|
+
required: { type: Boolean, required: false, default: false },
|
|
84
|
+
optionPopClass: { type: null, required: false },
|
|
85
|
+
options: { type: Array, required: false }
|
|
86
|
+
});
|
|
87
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
88
|
+
const selectedItem = computed({
|
|
89
|
+
get: () => props.options?.find((item) => item[props.valueKey] === props.modelValue),
|
|
90
|
+
set: (newValue) => {
|
|
91
|
+
if (newValue) {
|
|
92
|
+
emit("update:modelValue", newValue[props.valueKey]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: number | string;
|
|
3
|
+
valueKey?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
labelKey?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
optionPopClass?: HTMLAttributes['inputmode'];
|
|
9
|
+
options?: Record<string, number | string>[];
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: string | number) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
required: boolean;
|
|
17
|
+
placeholder: string;
|
|
18
|
+
valueKey: string;
|
|
19
|
+
labelKey: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useElementSize, useVModel } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: String, required: false },
|
|
5
|
+
modelValueOption: { type: String, required: false },
|
|
6
|
+
class: { type: null, required: false },
|
|
7
|
+
invalid: { type: Boolean, required: false },
|
|
8
|
+
errorMessage: { type: String, required: false },
|
|
9
|
+
placeholder: { type: null, required: false },
|
|
10
|
+
options: { type: Array, required: true }
|
|
11
|
+
});
|
|
12
|
+
const emit = defineEmits(["update:modelValue", "update:modelValueOption"]);
|
|
13
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
14
|
+
const modelValueOption = useVModel(props, "modelValueOption", emit);
|
|
15
|
+
const elementWrapper = useTemplateRef("elementWrapper");
|
|
16
|
+
const { width } = useElementSize(elementWrapper);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div
|
|
21
|
+
ref="elementWrapper"
|
|
22
|
+
:class="
|
|
23
|
+
cn(
|
|
24
|
+
'w-full flex items-center gap-1 rounded-lg border divide-x divide-flux-outline border-outlineVariant ring-0',
|
|
25
|
+
[
|
|
26
|
+
props.invalid ? 'ring-offset-1 ring-offset-flux-error bg-surfaceContainerLow' : 'ring-offset-0 ring-offset-flux-primary bg-background dark:bg-surface-container-high'
|
|
27
|
+
],
|
|
28
|
+
props.class
|
|
29
|
+
)
|
|
30
|
+
"
|
|
31
|
+
>
|
|
32
|
+
<UiSelectBase
|
|
33
|
+
v-model="modelValueOption"
|
|
34
|
+
class="border-none focus-visible:ring-offset-0 text-xs rounded-r-none ring-offset-0"
|
|
35
|
+
:options="props.options"
|
|
36
|
+
:invalid="props.invalid"
|
|
37
|
+
:width-content="Math.round(width) + 'px'"
|
|
38
|
+
/>
|
|
39
|
+
<UiInputField
|
|
40
|
+
v-model="modelValue"
|
|
41
|
+
:placeholder="props.placeholder"
|
|
42
|
+
class="border-none flex-1 pl-0 focus-visible:ring-offset-0 rounded-l-none ring-offset-0"
|
|
43
|
+
:invalid="props.invalid"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
modelValueOption?: string;
|
|
5
|
+
class?: InputHTMLAttributes['class'];
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
placeholder?: InputHTMLAttributes['placeholder'];
|
|
9
|
+
options: {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (value?: string | undefined) => void;
|
|
16
|
+
"update:modelValueOption": (value?: string | undefined) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValueOption"?: ((value?: string | undefined) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
import {
|
|
4
|
+
StepperDescription,
|
|
5
|
+
StepperIndicator,
|
|
6
|
+
StepperItem,
|
|
7
|
+
StepperRoot,
|
|
8
|
+
StepperSeparator,
|
|
9
|
+
StepperTitle,
|
|
10
|
+
StepperTrigger
|
|
11
|
+
} from "reka-ui";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
class: { type: null, required: false },
|
|
14
|
+
itemClass: { type: null, required: false },
|
|
15
|
+
triggerClass: { type: null, required: false },
|
|
16
|
+
separatorClass: { type: null, required: false },
|
|
17
|
+
modelValue: { type: Number, required: false },
|
|
18
|
+
options: { type: Array, required: true }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
21
|
+
const modelValue = useVModel(props, "modelValue", emit, {
|
|
22
|
+
defaultValue: 1
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<StepperRoot
|
|
28
|
+
v-model="modelValue"
|
|
29
|
+
:default-value="2"
|
|
30
|
+
:class="cn('flex gap-2 w-full', props.class)"
|
|
31
|
+
>
|
|
32
|
+
<StepperItem
|
|
33
|
+
v-for="item in options"
|
|
34
|
+
:key="item.step"
|
|
35
|
+
:class="
|
|
36
|
+
cn(
|
|
37
|
+
'w-full flex justify-center gap-2 relative group px-4',
|
|
38
|
+
props.itemClass
|
|
39
|
+
)
|
|
40
|
+
"
|
|
41
|
+
:step="item.step"
|
|
42
|
+
:disabled="item.disabled"
|
|
43
|
+
:completed="item.completed"
|
|
44
|
+
>
|
|
45
|
+
<template #default="{ state }">
|
|
46
|
+
<StepperTrigger
|
|
47
|
+
class="inline-flex border-2 shadow-sm items-center border-outline-variant justify-center rounded-full w-10 h-10 shrink-0"
|
|
48
|
+
:class="
|
|
49
|
+
cn(
|
|
50
|
+
'group-data-[state=inactive]:text-on-surface',
|
|
51
|
+
'group-data-[state=completed]:bg-flux-primary group-data-[state=completed]:text-on-primary group-data-[state=completed]:border-flux-primary',
|
|
52
|
+
'group-data-[state=active]:bg-secondary-container group-data-[state=active]:text-flux-primary group-data-[state=active]:border-flux-primary',
|
|
53
|
+
'group-data-[disabled]:opacity-100 group-data-[disabled]:cursor-default',
|
|
54
|
+
props.triggerClass
|
|
55
|
+
)
|
|
56
|
+
"
|
|
57
|
+
>
|
|
58
|
+
<StepperIndicator v-if="item.icon">
|
|
59
|
+
<Icon
|
|
60
|
+
:name="
|
|
61
|
+
state === 'active' ? 'svg-spinners:3-dots-bounce' : item.icon
|
|
62
|
+
"
|
|
63
|
+
size="24px"
|
|
64
|
+
class="w-5 h-5"
|
|
65
|
+
/>
|
|
66
|
+
</StepperIndicator>
|
|
67
|
+
</StepperTrigger>
|
|
68
|
+
|
|
69
|
+
<StepperSeparator
|
|
70
|
+
v-if="item.step !== options[options.length - 1].step"
|
|
71
|
+
:class="
|
|
72
|
+
cn(
|
|
73
|
+
`absolute block indicator top-1/2 -translate-y-1/2 left-[calc(50%+30px)] right-[calc(-50%+20px)] h-2 rounded-full bg-outline-variant shrink-0`,
|
|
74
|
+
`data-[state=completed]:bg-flux-primary`,
|
|
75
|
+
`data-[state=active]:bg-secondary-container data-[state=active]:text-flux-primary data-[state=active]:border-flux-primary`,
|
|
76
|
+
props.separatorClass
|
|
77
|
+
)
|
|
78
|
+
"
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
<div class="absolute text-center top-full left-0 w-full mt-2">
|
|
82
|
+
<StepperTitle class="font-medium text-sm">
|
|
83
|
+
{{ item.title }}
|
|
84
|
+
</StepperTitle>
|
|
85
|
+
<StepperDescription
|
|
86
|
+
v-if="item.description"
|
|
87
|
+
class="hidden sm:block text-xs"
|
|
88
|
+
>
|
|
89
|
+
{{ item.description }}
|
|
90
|
+
</StepperDescription>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
</StepperItem>
|
|
94
|
+
</StepperRoot>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<style scoped>
|
|
98
|
+
.indicator[data-state=active]{animation:linear-x 10s linear infinite;background-image:repeating-linear-gradient(123deg,transparent,transparent .75rem,currentColor 10px,currentColor 1rem)}@keyframes linear-x{0%{background-position-x:0}to{background-position-x:160px}}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type OptionT = {
|
|
3
|
+
step: number;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
completed?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
itemClass?: HTMLAttributes['class'];
|
|
13
|
+
triggerClass?: HTMLAttributes['class'];
|
|
14
|
+
separatorClass?: HTMLAttributes['class'];
|
|
15
|
+
modelValue?: number;
|
|
16
|
+
options: OptionT[];
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
+
"update:modelValue": (payload?: number | undefined) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((payload?: number | undefined) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
import { SwitchRoot, SwitchThumb } from "reka-ui";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
class: { type: null, required: false, default: "" },
|
|
6
|
+
thumbClass: { type: null, required: false, default: "" },
|
|
7
|
+
modelValue: { type: Boolean, required: false, default: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
10
|
+
const modelValue = useVModel(props, "modelValue", emit, {
|
|
11
|
+
defaultValue: false
|
|
12
|
+
});
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<SwitchRoot
|
|
18
|
+
v-model="modelValue"
|
|
19
|
+
:class="
|
|
20
|
+
cn(
|
|
21
|
+
'w-12 h-7 shrink-0 shadow-sm flex data-[state=unchecked]:bg-surface-container-highest data-[state=checked]:bg-flux-primary border-2 border-flux-outline data-[state=checked]:border-flux-primary rounded-full relative transition-[background] focus-within:outline-flux-primary',
|
|
22
|
+
props.class
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
<SwitchThumb
|
|
27
|
+
:class="
|
|
28
|
+
cn(
|
|
29
|
+
{
|
|
30
|
+
'w-3 h-3 translate-x-1.5': !slots.icon,
|
|
31
|
+
'w-5 h-5 translate-x-0.5': slots.icon
|
|
32
|
+
},
|
|
33
|
+
'my-auto bg-flux-outline data-[state=unchecked]:text-surface-container-highest data-[state=check]:text-flux-primary flex items-center justify-center shadow-xl rounded-full transition-transform will-change-transform',
|
|
34
|
+
'data-[state=checked]:translate-x-[calc(100%+1px)] data-[state=checked]:bg-on-primary data-[state=checked]:w-5 data-[state=checked]:h-5',
|
|
35
|
+
props.thumbClass
|
|
36
|
+
)
|
|
37
|
+
"
|
|
38
|
+
>
|
|
39
|
+
<slot name="icon" :value="modelValue" />
|
|
40
|
+
</SwitchThumb>
|
|
41
|
+
</SwitchRoot>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
thumbClass?: HTMLAttributes['class'];
|
|
5
|
+
modelValue?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_10: {
|
|
8
|
+
value: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
icon?: (props: typeof __VLS_10) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:modelValue": (v: boolean) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
class: HTMLAttributes["class"];
|
|
19
|
+
modelValue: boolean;
|
|
20
|
+
thumbClass: HTMLAttributes["class"];
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
class: { type: null, required: false },
|
|
4
|
+
headerClass: { type: null, required: false },
|
|
5
|
+
headerWrapperClass: { type: null, required: false },
|
|
6
|
+
bodyClass: { type: null, required: false }
|
|
7
|
+
});
|
|
8
|
+
const slots = defineSlots();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<UiCardBaseCard
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
{
|
|
16
|
+
'p-0 divide-y border-0 shadow divide-outline-variant': slots.tabs
|
|
17
|
+
},
|
|
18
|
+
props.class
|
|
19
|
+
)
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
<slot name="tabs" />
|
|
23
|
+
<div
|
|
24
|
+
:class="{
|
|
25
|
+
'p-4': slots.tabs
|
|
26
|
+
}"
|
|
27
|
+
>
|
|
28
|
+
<slot name="filter" />
|
|
29
|
+
<UiCardBaseCard
|
|
30
|
+
:class="
|
|
31
|
+
cn(
|
|
32
|
+
'sticky top-[var(--navbar-height)] z-10 p-0 pt-4 border-0 mt-0.5 rounded-none',
|
|
33
|
+
props.headerWrapperClass
|
|
34
|
+
)
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
:class="
|
|
39
|
+
cn(
|
|
40
|
+
'grid gap-3 text-xs items-center font-semibold py-2 px-3 bg-primary-container uppercase dark:bg-secondary-container border border-outline-variant rounded-t-lg',
|
|
41
|
+
props.headerClass
|
|
42
|
+
)
|
|
43
|
+
"
|
|
44
|
+
>
|
|
45
|
+
<slot name="header" />
|
|
46
|
+
</div>
|
|
47
|
+
</UiCardBaseCard>
|
|
48
|
+
<div
|
|
49
|
+
:class="
|
|
50
|
+
cn(
|
|
51
|
+
'border border-outline-variant rounded-b-lg divide-y divide-outline-variant border-t-0 text-sm',
|
|
52
|
+
props.bodyClass
|
|
53
|
+
)
|
|
54
|
+
"
|
|
55
|
+
>
|
|
56
|
+
<slot />
|
|
57
|
+
</div>
|
|
58
|
+
<slot name="pagination" />
|
|
59
|
+
</div>
|
|
60
|
+
</UiCardBaseCard>
|
|
61
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
headerClass?: HTMLAttributes['class'];
|
|
5
|
+
headerWrapperClass?: HTMLAttributes['class'];
|
|
6
|
+
bodyClass?: HTMLAttributes['class'];
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|