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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 KiriminAja
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Nakama UI (KiriminAja Design System)
|
|
2
|
+
|
|
3
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
+
[![License][license-src]][license-href]
|
|
6
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
7
|
+
|
|
8
|
+
My new Nuxt module for doing amazing things.
|
|
9
|
+
|
|
10
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
11
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
12
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
<!-- Highlight some of the features your module provide here -->
|
|
17
|
+
|
|
18
|
+
- ⛰ Foo
|
|
19
|
+
- 🚠 Bar
|
|
20
|
+
- 🌲 Baz
|
|
21
|
+
|
|
22
|
+
## Quick Setup
|
|
23
|
+
|
|
24
|
+
Install the module to your Nuxt application with one command:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx nuxi module add @nakama/ui
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
That's it! You can now use My Module in your Nuxt app ✨
|
|
31
|
+
|
|
32
|
+
## Contribution
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary>Local development</summary>
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Install dependencies
|
|
39
|
+
npm install
|
|
40
|
+
|
|
41
|
+
# Generate type stubs
|
|
42
|
+
npm run dev:prepare
|
|
43
|
+
|
|
44
|
+
# Develop with the playground
|
|
45
|
+
npm run dev
|
|
46
|
+
|
|
47
|
+
# Build the playground
|
|
48
|
+
npm run dev:build
|
|
49
|
+
|
|
50
|
+
# Run ESLint
|
|
51
|
+
npm run lint
|
|
52
|
+
|
|
53
|
+
# Run Vitest
|
|
54
|
+
npm run test
|
|
55
|
+
npm run test:watch
|
|
56
|
+
|
|
57
|
+
# Release new version
|
|
58
|
+
npm run release
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
</details>
|
|
62
|
+
|
|
63
|
+
<!-- Badges -->
|
|
64
|
+
|
|
65
|
+
[npm-version-src]: https://img.shields.io/npm/v/@nakama/ui/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
66
|
+
[npm-version-href]: https://npmjs.com/package/@nakama/ui
|
|
67
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/@nakama/ui.svg?style=flat&colorA=020420&colorB=00DC82
|
|
68
|
+
[npm-downloads-href]: https://npm.chart.dev/@nakama/ui
|
|
69
|
+
[license-src]: https://img.shields.io/npm/l/@nakama/ui.svg?style=flat&colorA=020420&colorB=00DC82
|
|
70
|
+
[license-href]: https://npmjs.com/package/@nakama/ui
|
|
71
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
72
|
+
[nuxt-href]: https://nuxt.com
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface ModuleOptions {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
coloMode?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
|
+
|
|
9
|
+
export { _default as default };
|
|
10
|
+
export type { ModuleOptions };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defu } from 'defu';
|
|
2
|
+
import { defineNuxtModule, createResolver, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
|
|
3
|
+
|
|
4
|
+
const name = "paket-ui";
|
|
5
|
+
const version = "v0.0.1";
|
|
6
|
+
|
|
7
|
+
const defaultOptions = {
|
|
8
|
+
prefix: "Nx"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const module = defineNuxtModule({
|
|
12
|
+
meta: {
|
|
13
|
+
name,
|
|
14
|
+
version,
|
|
15
|
+
docs: "https://github.com/kiriminaja/nakama-ui",
|
|
16
|
+
configKey: "nakama",
|
|
17
|
+
compatibility: {
|
|
18
|
+
nuxt: ">=3.16.0"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
// Default configuration options of the Nuxt module
|
|
22
|
+
defaults: defaultOptions,
|
|
23
|
+
async setup(options, nuxt) {
|
|
24
|
+
const { resolve } = createResolver(import.meta.url);
|
|
25
|
+
async function registerModule(name2, key, options2) {
|
|
26
|
+
if (!hasNuxtModule(name2)) {
|
|
27
|
+
await installModule(name2, options2);
|
|
28
|
+
} else {
|
|
29
|
+
nuxt.options[key] = defu(nuxt.options[key], options2);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
await registerModule("@nuxt/icon", "icon", {
|
|
33
|
+
cssLayer: "components"
|
|
34
|
+
});
|
|
35
|
+
addPlugin(resolve("./runtime/plugin"));
|
|
36
|
+
addPlugin(resolve("./runtime/utils/cn"));
|
|
37
|
+
addComponentsDir({
|
|
38
|
+
path: resolve("./runtime/components"),
|
|
39
|
+
prefix: options.prefix,
|
|
40
|
+
pathPrefix: false
|
|
41
|
+
});
|
|
42
|
+
addImportsDir(resolve("./runtime/composables"));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { module as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ProgressIndicator, ProgressRoot } from "reka-ui";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
progressValue: { type: Number, required: false },
|
|
5
|
+
class: { type: null, required: false },
|
|
6
|
+
classIndicator: { type: null, required: false }
|
|
7
|
+
});
|
|
8
|
+
const percentage = computed(() => {
|
|
9
|
+
if (props.progressValue === void 0) return 0;
|
|
10
|
+
if (props.progressValue < 0) return 0;
|
|
11
|
+
if (props.progressValue > 100) return 100;
|
|
12
|
+
return props.progressValue;
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ProgressRoot
|
|
18
|
+
v-model="percentage"
|
|
19
|
+
:class="
|
|
20
|
+
cn(
|
|
21
|
+
'rounded-full relative h-4 w-full overflow-hidden bg-surface-container-low',
|
|
22
|
+
props.class
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
<ProgressIndicator
|
|
27
|
+
:class="
|
|
28
|
+
cn(
|
|
29
|
+
'rounded-full block relative w-full h-full bg-flux-primary transition-transform overflow-hidden duration-500 ease-in-out',
|
|
30
|
+
props.classIndicator
|
|
31
|
+
)
|
|
32
|
+
"
|
|
33
|
+
:style="`transform: translateX(-${100 - percentage}%)`"
|
|
34
|
+
/>
|
|
35
|
+
</ProgressRoot>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
progressValue?: number;
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
classIndicator?: HTMLAttributes['class'];
|
|
6
|
+
};
|
|
7
|
+
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>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
class: { type: null, required: false },
|
|
4
|
+
inactiveClass: { type: null, required: false },
|
|
5
|
+
value: { type: Number, required: false },
|
|
6
|
+
max: { type: Number, required: false }
|
|
7
|
+
});
|
|
8
|
+
const percentage = computed(() => {
|
|
9
|
+
if (props.max && props.value) {
|
|
10
|
+
return Math.round(props.value / props.max * 100);
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
'w-full flex text-flux-primary rounded-full h-3 gap-1 items-center',
|
|
21
|
+
props.class
|
|
22
|
+
)
|
|
23
|
+
"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
v-if="percentage >= 1"
|
|
27
|
+
class="shrink-0 h-full bg-current rounded-full transition-all"
|
|
28
|
+
:style="{
|
|
29
|
+
width: percentage + '%'
|
|
30
|
+
}"
|
|
31
|
+
></div>
|
|
32
|
+
<div
|
|
33
|
+
v-if="percentage < 100"
|
|
34
|
+
:class="
|
|
35
|
+
cn(
|
|
36
|
+
'bg-secondary-container h-full rounded-full grow relative transition-all',
|
|
37
|
+
props.inactiveClass
|
|
38
|
+
)
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
class="bg-current rounded-full w-1.5 h-1.5 absolute top-1/2 right-0.5 -translate-y-1/2"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
class?: HTMLAttributes['class'];
|
|
4
|
+
inactiveClass?: HTMLAttributes['class'];
|
|
5
|
+
value?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useDevicesList, useUserMedia } from "@vueuse/core";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
maxDuration: { type: Number, required: false, default: 0 }
|
|
5
|
+
});
|
|
6
|
+
const emits = defineEmits(["recorded"]);
|
|
7
|
+
const currentAudio = shallowRef();
|
|
8
|
+
const { audioInputs: microphones } = useDevicesList({
|
|
9
|
+
requestPermissions: true,
|
|
10
|
+
onUpdated() {
|
|
11
|
+
if (!microphones.value.find((i) => i.deviceId === currentAudio.value))
|
|
12
|
+
currentAudio.value = microphones.value[0]?.deviceId;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const audio = useTemplateRef("audio");
|
|
16
|
+
const { stream, enabled } = useUserMedia({
|
|
17
|
+
constraints: reactive({ audio: { deviceId: currentAudio, video: false } })
|
|
18
|
+
});
|
|
19
|
+
const recordedChunks = shallowRef([]);
|
|
20
|
+
const mediaRecorder = shallowRef(null);
|
|
21
|
+
const audioFileSrc = shallowRef("");
|
|
22
|
+
const durationTimer = shallowRef(null);
|
|
23
|
+
const stopRecording = () => {
|
|
24
|
+
if (mediaRecorder.value && mediaRecorder.value.state === "recording") {
|
|
25
|
+
mediaRecorder.value.stop();
|
|
26
|
+
}
|
|
27
|
+
if (durationTimer.value) {
|
|
28
|
+
clearTimeout(durationTimer.value);
|
|
29
|
+
durationTimer.value = null;
|
|
30
|
+
}
|
|
31
|
+
enabled.value = false;
|
|
32
|
+
};
|
|
33
|
+
const toggleRecording = () => {
|
|
34
|
+
if (enabled.value) {
|
|
35
|
+
stopRecording();
|
|
36
|
+
} else {
|
|
37
|
+
enabled.value = true;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
watchEffect(() => {
|
|
41
|
+
if (stream.value) {
|
|
42
|
+
recordedChunks.value = [];
|
|
43
|
+
if (mediaRecorder.value) {
|
|
44
|
+
mediaRecorder.value.stop();
|
|
45
|
+
}
|
|
46
|
+
if (durationTimer.value) {
|
|
47
|
+
clearTimeout(durationTimer.value);
|
|
48
|
+
durationTimer.value = null;
|
|
49
|
+
}
|
|
50
|
+
mediaRecorder.value = new MediaRecorder(stream.value);
|
|
51
|
+
if (props.maxDuration > 0) {
|
|
52
|
+
durationTimer.value = setTimeout(() => {
|
|
53
|
+
stopRecording();
|
|
54
|
+
}, props.maxDuration * 1e3);
|
|
55
|
+
}
|
|
56
|
+
mediaRecorder.value.ondataavailable = (event) => {
|
|
57
|
+
if (event.data.size > 0) {
|
|
58
|
+
recordedChunks.value.push(event.data);
|
|
59
|
+
const blob = new Blob(recordedChunks.value, { type: "audio/mp3" });
|
|
60
|
+
const newFile = new File(
|
|
61
|
+
[blob],
|
|
62
|
+
`recording-${(/* @__PURE__ */ new Date()).toISOString()}.mp3`,
|
|
63
|
+
{
|
|
64
|
+
type: "audio/mp3"
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
const dataTransfer = new DataTransfer();
|
|
68
|
+
dataTransfer.items.add(newFile);
|
|
69
|
+
emits("recorded", dataTransfer.files);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
mediaRecorder.value.onstop = () => {
|
|
73
|
+
const blob = new Blob(recordedChunks.value, { type: "audio/mp3" });
|
|
74
|
+
audioFileSrc.value = URL.createObjectURL(blob);
|
|
75
|
+
if (durationTimer.value) {
|
|
76
|
+
clearTimeout(durationTimer.value);
|
|
77
|
+
durationTimer.value = null;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
mediaRecorder.value.start();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
watchEffect(() => {
|
|
84
|
+
if (audio.value?.audioRef) {
|
|
85
|
+
audio.value.audioRef.srcObject = stream.value;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
watch(enabled, (value) => {
|
|
89
|
+
if (!audio.value) return;
|
|
90
|
+
audio.value.setAudioMuted(value);
|
|
91
|
+
if (!value && durationTimer.value) {
|
|
92
|
+
clearTimeout(durationTimer.value);
|
|
93
|
+
durationTimer.value = null;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
if (!enabled.value) {
|
|
98
|
+
enabled.value = true;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
onBeforeUnmount(() => {
|
|
102
|
+
enabled.value = false;
|
|
103
|
+
if (durationTimer.value) {
|
|
104
|
+
clearTimeout(durationTimer.value);
|
|
105
|
+
durationTimer.value = null;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<template>
|
|
111
|
+
<div
|
|
112
|
+
class="flex gap-2 text-center items-center bg-background rounded-full border border-outline-variant px-2.5 py-2"
|
|
113
|
+
>
|
|
114
|
+
<Icon
|
|
115
|
+
v-if="enabled"
|
|
116
|
+
name="material-symbols:fiber-manual-record"
|
|
117
|
+
class="animate-pulse text-flux-error"
|
|
118
|
+
size="20px"
|
|
119
|
+
/>
|
|
120
|
+
<UiPlayerAudio
|
|
121
|
+
ref="audio"
|
|
122
|
+
class="!bg-transparent !p-0 grow"
|
|
123
|
+
:src="enabled ? void 0 : audioFileSrc"
|
|
124
|
+
autoplay
|
|
125
|
+
/>
|
|
126
|
+
<UiButtonIconButton
|
|
127
|
+
class="p-0.5 border-none"
|
|
128
|
+
:icon-name="
|
|
129
|
+
enabled ? 'material-symbols:stop' : 'material-symbols:keyboard-voice'
|
|
130
|
+
"
|
|
131
|
+
size="sm"
|
|
132
|
+
variant="outline"
|
|
133
|
+
@click="toggleRecording"
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
maxDuration?: number;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
recorded: (value: FileList) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onRecorded?: ((value: FileList) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
maxDuration: number;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
'flex items-center gap-2 text-sm',
|
|
5
|
+
variantConfigHelper[props.variant],
|
|
6
|
+
props.class
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<Icon :name="icon" size="20px" class="shrink-0" />
|
|
10
|
+
<span class="font-semibold" v-text="description"></span>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { variantConfigHelper } from ".";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
class: { type: null, required: false },
|
|
18
|
+
icon: { type: String, required: false, default: "material-symbols:info" },
|
|
19
|
+
description: { type: String, required: true },
|
|
20
|
+
variant: { type: null, required: false, default: "info" }
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
import { variantConfigHelper } from ".";
|
|
3
|
+
interface IInfoField {
|
|
4
|
+
class?: HTMLAttributes["class"];
|
|
5
|
+
icon?: string;
|
|
6
|
+
description: string;
|
|
7
|
+
variant?: keyof typeof variantConfigHelper;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("vue").DefineComponent<IInfoField, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IInfoField> & Readonly<{}>, {
|
|
10
|
+
variant: keyof typeof variantConfigHelper;
|
|
11
|
+
icon: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
'px-3.5 py-3 rounded-lg text-sm grid lg:flex gap-2 relative hover:ring-2 transition-all',
|
|
5
|
+
{
|
|
6
|
+
'bg-errorContainer text-onErrorContainer hover:ring-flux-error': isError,
|
|
7
|
+
'bg-secondary-container hover:ring-flux-primary': !isError
|
|
8
|
+
}
|
|
9
|
+
]"
|
|
10
|
+
>
|
|
11
|
+
<NuxtImg
|
|
12
|
+
provider="provider"
|
|
13
|
+
width="44px"
|
|
14
|
+
class="shrink-0"
|
|
15
|
+
:src="
|
|
16
|
+
!isError ? '/svg/global/pin-icon.svg' : `/svg/global/location-not-pointed.svg`
|
|
17
|
+
"
|
|
18
|
+
alt="not pointed"
|
|
19
|
+
/>
|
|
20
|
+
<div class="grow">
|
|
21
|
+
<h4 class="font-semibold">
|
|
22
|
+
{{ isError ? "Belum Atur Pin Lokasi" : "Sudah Atur Pin Lokasi" }}
|
|
23
|
+
</h4>
|
|
24
|
+
<p
|
|
25
|
+
class="line-clamp-2 text-xs break-all"
|
|
26
|
+
v-text="
|
|
27
|
+
!isError && address ? address : 'Wajib tentukan pin lokasi untuk memudahkan kurir menemukan lokasimu.'
|
|
28
|
+
"
|
|
29
|
+
></p>
|
|
30
|
+
</div>
|
|
31
|
+
<Icon
|
|
32
|
+
v-if="withAction"
|
|
33
|
+
name="material-symbols:edit-outline"
|
|
34
|
+
size="24px"
|
|
35
|
+
class="shrink-0"
|
|
36
|
+
/>
|
|
37
|
+
<button
|
|
38
|
+
v-if="withAction"
|
|
39
|
+
class="absolute inset-0"
|
|
40
|
+
type="button"
|
|
41
|
+
@click="emit('click')"
|
|
42
|
+
></button>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup>
|
|
47
|
+
const props = defineProps({
|
|
48
|
+
latitude: { type: null, required: false },
|
|
49
|
+
longitude: { type: null, required: false },
|
|
50
|
+
address: { type: null, required: false },
|
|
51
|
+
withAction: { type: Boolean, required: false }
|
|
52
|
+
});
|
|
53
|
+
const emit = defineEmits(["click"]);
|
|
54
|
+
const isError = computed(
|
|
55
|
+
() => props.latitude === void 0 || props.latitude === null
|
|
56
|
+
);
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IFAddresses } from '~~/services/settings/pickup-address/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
latitude?: IFAddresses['latitude'];
|
|
4
|
+
longitude?: IFAddresses['longitude'];
|
|
5
|
+
address?: IFAddresses['address'];
|
|
6
|
+
withAction?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
click: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClick?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { iconSizeConfig, variantConfig } from ".";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
class: { type: null, required: false, default: void 0 },
|
|
5
|
+
variant: { type: null, required: false, default: "info" },
|
|
6
|
+
iconSize: { type: null, required: false, default: "default" },
|
|
7
|
+
title: { type: String, required: false, default: void 0 },
|
|
8
|
+
description: { type: String, required: false, default: void 0 },
|
|
9
|
+
descriptionAsHtml: { type: Boolean, required: false },
|
|
10
|
+
iconName: { type: String, required: false, default: "mdi:information" },
|
|
11
|
+
descriptionClass: { type: null, required: false, default: void 0 }
|
|
12
|
+
});
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
'flex gap-2 px-3 py-2 rounded-lg',
|
|
21
|
+
variantConfig[props.variant],
|
|
22
|
+
props.description ? 'items-start' : 'items-center',
|
|
23
|
+
props.class
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<Icon
|
|
28
|
+
:name="props.iconName"
|
|
29
|
+
:size="iconSizeConfig[props.iconSize]"
|
|
30
|
+
class="flex-none"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<div class="grow flex flex-col gap-1">
|
|
34
|
+
<p v-if="props.title" class="font-semibold text-xs">
|
|
35
|
+
{{ props.title }}
|
|
36
|
+
</p>
|
|
37
|
+
<div v-if="props.description || slots.default" class="text-xs">
|
|
38
|
+
<slot>
|
|
39
|
+
<div
|
|
40
|
+
v-if="props.description && props.descriptionAsHtml"
|
|
41
|
+
v-html="props.description"
|
|
42
|
+
></div>
|
|
43
|
+
<p
|
|
44
|
+
v-if="props.description && !props.descriptionAsHtml"
|
|
45
|
+
:class="cn(props.descriptionClass)"
|
|
46
|
+
>
|
|
47
|
+
{{ props.description }}
|
|
48
|
+
</p>
|
|
49
|
+
</slot>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<slot name="trailing" />
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { iconSizeConfig, variantConfig } from '.';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
variant?: keyof typeof variantConfig;
|
|
6
|
+
iconSize?: keyof typeof iconSizeConfig;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
descriptionAsHtml?: boolean;
|
|
10
|
+
iconName?: string;
|
|
11
|
+
descriptionClass?: HTMLAttributes['class'];
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_5: {}, __VLS_7: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_5) => any;
|
|
16
|
+
} & {
|
|
17
|
+
trailing?: (props: typeof __VLS_7) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
title: string;
|
|
21
|
+
class: HTMLAttributes["class"];
|
|
22
|
+
iconName: string;
|
|
23
|
+
variant: keyof typeof variantConfig;
|
|
24
|
+
description: string;
|
|
25
|
+
iconSize: keyof typeof iconSizeConfig;
|
|
26
|
+
descriptionClass: HTMLAttributes["class"];
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const variantConfig: {
|
|
2
|
+
primary: string;
|
|
3
|
+
info: string;
|
|
4
|
+
success: string;
|
|
5
|
+
warning: string;
|
|
6
|
+
error: string;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const variantConfigHelper: {
|
|
10
|
+
primary: string;
|
|
11
|
+
info: string;
|
|
12
|
+
success: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const iconSizeConfig: {
|
|
17
|
+
default: string;
|
|
18
|
+
xs: string;
|
|
19
|
+
sm: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const variantConfig = {
|
|
2
|
+
primary: "text-flux-primary bg-primaryContainer",
|
|
3
|
+
info: "text-flux-info bg-infoContainer",
|
|
4
|
+
success: "text-flux-success bg-successContainer",
|
|
5
|
+
warning: "text-flux-warning bg-warningContainer",
|
|
6
|
+
error: "text-flux-error bg-errorContainer",
|
|
7
|
+
default: "text-on-surface bg-surface-container"
|
|
8
|
+
};
|
|
9
|
+
export const variantConfigHelper = {
|
|
10
|
+
primary: "text-flux-primary",
|
|
11
|
+
info: "text-flux-info",
|
|
12
|
+
success: "text-flux-success",
|
|
13
|
+
warning: "text-flux-warningYellow",
|
|
14
|
+
error: "text-flux-error"
|
|
15
|
+
};
|
|
16
|
+
export const iconSizeConfig = {
|
|
17
|
+
default: "20px",
|
|
18
|
+
xs: "12px",
|
|
19
|
+
sm: "16px"
|
|
20
|
+
};
|