paket-ui 0.0.4 → 0.0.6
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/dist/module.d.mts +4 -1
- package/dist/module.json +2 -6
- package/dist/module.mjs +25 -36
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/components/Button.d.vue.ts +33 -0
- package/dist/runtime/components/Button.vue +82 -0
- package/dist/runtime/components/Button.vue.d.ts +33 -0
- package/dist/runtime/plugin.js +1 -1
- package/dist/runtime/utils/cn.d.ts +1 -4
- package/dist/runtime/utils/cn.js +2 -2
- package/package.json +17 -20
- package/LICENSE +0 -21
- package/dist/runtime/components/ProgressIndicator/ProgressBase.vue +0 -36
- package/dist/runtime/components/ProgressIndicator/ProgressBase.vue.d.ts +0 -8
- package/dist/runtime/components/ProgressIndicator/ProgressIndicator.vue +0 -46
- package/dist/runtime/components/ProgressIndicator/ProgressIndicator.vue.d.ts +0 -9
- package/dist/runtime/components/Recorder/RecorderAudio.vue +0 -136
- package/dist/runtime/components/Recorder/RecorderAudio.vue.d.ts +0 -11
- package/dist/runtime/components/alert/AlertHelperForm.vue +0 -22
- package/dist/runtime/components/alert/AlertHelperForm.vue.d.ts +0 -13
- package/dist/runtime/components/alert/AlertPinLocation.vue +0 -57
- package/dist/runtime/components/alert/AlertPinLocation.vue.d.ts +0 -13
- package/dist/runtime/components/alert/BaseAlert.vue +0 -54
- package/dist/runtime/components/alert/BaseAlert.vue.d.ts +0 -34
- package/dist/runtime/components/alert/index.d.ts +0 -20
- package/dist/runtime/components/alert/index.js +0 -20
- package/dist/runtime/components/attachment/BaseAttachment.vue +0 -52
- package/dist/runtime/components/attachment/BaseAttachment.vue.d.ts +0 -24
- package/dist/runtime/components/attachment/ChipAttachment.vue +0 -57
- package/dist/runtime/components/attachment/ChipAttachment.vue.d.ts +0 -28
- package/dist/runtime/components/attachment/index.d.ts +0 -15
- package/dist/runtime/components/attachment/index.js +0 -15
- package/dist/runtime/components/avatar/BaseAvatar.vue +0 -41
- package/dist/runtime/components/avatar/BaseAvatar.vue.d.ts +0 -31
- package/dist/runtime/components/avatar/IconAvatar.vue +0 -28
- package/dist/runtime/components/avatar/IconAvatar.vue.d.ts +0 -18
- package/dist/runtime/components/avatar/index.d.ts +0 -27
- package/dist/runtime/components/avatar/index.js +0 -27
- package/dist/runtime/components/badge/BaseBadge.vue +0 -26
- package/dist/runtime/components/badge/BaseBadge.vue.d.ts +0 -17
- package/dist/runtime/components/badge/IconBadge.vue +0 -37
- package/dist/runtime/components/badge/IconBadge.vue.d.ts +0 -23
- package/dist/runtime/components/badge/index.d.ts +0 -45
- package/dist/runtime/components/badge/index.js +0 -45
- package/dist/runtime/components/badge/location.vue +0 -18
- package/dist/runtime/components/badge/location.vue.d.ts +0 -5
- package/dist/runtime/components/button/BaseButton.vue +0 -32
- package/dist/runtime/components/button/BaseButton.vue.d.ts +0 -16
- package/dist/runtime/components/button/ButtonApplyVoucher.vue +0 -32
- package/dist/runtime/components/button/ButtonApplyVoucher.vue.d.ts +0 -11
- package/dist/runtime/components/button/IconButton.vue +0 -44
- package/dist/runtime/components/button/IconButton.vue.d.ts +0 -27
- package/dist/runtime/components/button/LinkButton.vue +0 -40
- package/dist/runtime/components/button/LinkButton.vue.d.ts +0 -23
- package/dist/runtime/components/button/box.vue +0 -14
- package/dist/runtime/components/button/box.vue.d.ts +0 -6
- package/dist/runtime/components/button/index.d.ts +0 -28
- package/dist/runtime/components/button/index.js +0 -28
- package/dist/runtime/components/card/BaseCard.vue +0 -26
- package/dist/runtime/components/card/BaseCard.vue.d.ts +0 -18
- package/dist/runtime/components/card/CardBalanceEstimation.vue +0 -29
- package/dist/runtime/components/card/CardBalanceEstimation.vue.d.ts +0 -11
- package/dist/runtime/components/card/CardBalanceSummary.vue +0 -24
- package/dist/runtime/components/card/CardBalanceSummary.vue.d.ts +0 -8
- package/dist/runtime/components/card/CardStatistic.vue +0 -96
- package/dist/runtime/components/card/CardStatistic.vue.d.ts +0 -46
- package/dist/runtime/components/card/CreditCard.vue +0 -106
- package/dist/runtime/components/card/CreditCard.vue.d.ts +0 -16
- package/dist/runtime/components/card/ExpandableCard.vue +0 -51
- package/dist/runtime/components/card/ExpandableCard.vue.d.ts +0 -20
- package/dist/runtime/components/card/NeedPinLocation.vue +0 -27
- package/dist/runtime/components/card/NeedPinLocation.vue.d.ts +0 -8
- package/dist/runtime/components/card/OriginEmpty.vue +0 -13
- package/dist/runtime/components/card/OriginEmpty.vue.d.ts +0 -2
- package/dist/runtime/components/card/OriginItem.vue +0 -76
- package/dist/runtime/components/card/OriginItem.vue.d.ts +0 -25
- package/dist/runtime/components/card/OriginItemDeleted.vue +0 -40
- package/dist/runtime/components/card/OriginItemDeleted.vue.d.ts +0 -15
- package/dist/runtime/components/card/index.vue +0 -17
- package/dist/runtime/components/card/index.vue.d.ts +0 -16
- package/dist/runtime/components/card/origin.vue +0 -42
- package/dist/runtime/components/card/origin.vue.d.ts +0 -39
- package/dist/runtime/components/chart/BarChart.vue +0 -85
- package/dist/runtime/components/chart/BarChart.vue.d.ts +0 -14
- package/dist/runtime/components/chart/ChartHorizontal.vue +0 -123
- package/dist/runtime/components/chart/ChartHorizontal.vue.d.ts +0 -29
- package/dist/runtime/components/chart/GaugeChart.vue +0 -108
- package/dist/runtime/components/chart/GaugeChart.vue.d.ts +0 -28
- package/dist/runtime/components/chart/PieChart.vue +0 -35
- package/dist/runtime/components/chart/PieChart.vue.d.ts +0 -13
- package/dist/runtime/components/chat/Reply.vue +0 -157
- package/dist/runtime/components/chat/Reply.vue.d.ts +0 -60
- package/dist/runtime/components/checkbox/Checkbox.vue +0 -59
- package/dist/runtime/components/checkbox/Checkbox.vue.d.ts +0 -16
- package/dist/runtime/components/checkbox/CheckboxBase.vue +0 -46
- package/dist/runtime/components/checkbox/CheckboxBase.vue.d.ts +0 -15
- package/dist/runtime/components/chip/ChipBase.vue +0 -44
- package/dist/runtime/components/chip/ChipBase.vue.d.ts +0 -26
- package/dist/runtime/components/chip/index.d.ts +0 -4
- package/dist/runtime/components/chip/index.js +0 -4
- package/dist/runtime/components/collapsible/CollapsibleBase.vue +0 -34
- package/dist/runtime/components/collapsible/CollapsibleBase.vue.d.ts +0 -22
- package/dist/runtime/components/combobox/Combobox.vue +0 -171
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +0 -44
- package/dist/runtime/components/combobox/ComboboxInput.vue +0 -13
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +0 -2
- package/dist/runtime/components/combobox/_index.d.ts +0 -1
- package/dist/runtime/components/combobox/_index.js +0 -0
- package/dist/runtime/components/container/ContainerWrapper.vue +0 -11
- package/dist/runtime/components/container/ContainerWrapper.vue.d.ts +0 -16
- package/dist/runtime/components/container/FloatActionWrapper.vue +0 -29
- package/dist/runtime/components/container/FloatActionWrapper.vue.d.ts +0 -20
- package/dist/runtime/components/context-menu/ContextMenuBase.vue +0 -37
- package/dist/runtime/components/context-menu/ContextMenuBase.vue.d.ts +0 -21
- package/dist/runtime/components/cropper/CropperImage.vue +0 -82
- package/dist/runtime/components/cropper/CropperImage.vue.d.ts +0 -18
- package/dist/runtime/components/datepicker/DatepickerBase.vue +0 -55
- package/dist/runtime/components/datepicker/DatepickerBase.vue.d.ts +0 -26
- package/dist/runtime/components/datepicker/DatepickerBody.vue +0 -139
- package/dist/runtime/components/datepicker/DatepickerBody.vue.d.ts +0 -11
- package/dist/runtime/components/dialog/DialogConfirmation.vue +0 -56
- package/dist/runtime/components/dialog/DialogConfirmation.vue.d.ts +0 -44
- package/dist/runtime/components/dialog/DialogConfirmationSingle.vue +0 -108
- package/dist/runtime/components/dialog/DialogConfirmationSingle.vue.d.ts +0 -59
- package/dist/runtime/components/dialog/DialogFloatAction.vue +0 -51
- package/dist/runtime/components/dialog/DialogFloatAction.vue.d.ts +0 -39
- package/dist/runtime/components/dialog/RootDialog.vue +0 -56
- package/dist/runtime/components/dialog/RootDialog.vue.d.ts +0 -19
- package/dist/runtime/components/dialog/aside.vue +0 -80
- package/dist/runtime/components/dialog/aside.vue.d.ts +0 -26
- package/dist/runtime/components/dialog/help.vue +0 -37
- package/dist/runtime/components/dialog/help.vue.d.ts +0 -2
- package/dist/runtime/components/dialog-reka/DialogContent.vue +0 -48
- package/dist/runtime/components/dialog-reka/DialogContent.vue.d.ts +0 -26
- package/dist/runtime/components/dialog-reka/DialogPreviewerImage.vue +0 -177
- package/dist/runtime/components/dialog-reka/DialogPreviewerImage.vue.d.ts +0 -14
- package/dist/runtime/components/dialog-reka/DialogPreviewerVideo.vue +0 -44
- package/dist/runtime/components/dialog-reka/DialogPreviewerVideo.vue.d.ts +0 -13
- package/dist/runtime/components/dialog-reka/DialogRoot.vue +0 -42
- package/dist/runtime/components/dialog-reka/DialogRoot.vue.d.ts +0 -28
- package/dist/runtime/components/divider/DividerBase.vue +0 -35
- package/dist/runtime/components/divider/DividerBase.vue.d.ts +0 -12
- package/dist/runtime/components/divider/DividerDash.vue +0 -43
- package/dist/runtime/components/divider/DividerDash.vue.d.ts +0 -14
- package/dist/runtime/components/dropdown/Dropdown.vue +0 -96
- package/dist/runtime/components/dropdown/Dropdown.vue.d.ts +0 -52
- package/dist/runtime/components/dropdown/DropdownItem.vue +0 -52
- package/dist/runtime/components/dropdown/DropdownItem.vue.d.ts +0 -35
- package/dist/runtime/components/file/AddFile.vue +0 -16
- package/dist/runtime/components/file/AddFile.vue.d.ts +0 -7
- package/dist/runtime/components/file/DropAreaFile.vue +0 -141
- package/dist/runtime/components/file/DropAreaFile.vue.d.ts +0 -28
- package/dist/runtime/components/file/ViewFile.vue +0 -70
- package/dist/runtime/components/file/ViewFile.vue.d.ts +0 -12
- package/dist/runtime/components/filter/FilterChip.vue +0 -39
- package/dist/runtime/components/filter/FilterChip.vue.d.ts +0 -19
- package/dist/runtime/components/filter/FilterStatus.vue +0 -28
- package/dist/runtime/components/filter/FilterStatus.vue.d.ts +0 -16
- package/dist/runtime/components/image/ImageLoader.vue +0 -61
- package/dist/runtime/components/image/ImageLoader.vue.d.ts +0 -11
- package/dist/runtime/components/input/ButtonFileInput.vue +0 -77
- package/dist/runtime/components/input/ButtonFileInput.vue.d.ts +0 -27
- package/dist/runtime/components/input/IconButtonFileInput.vue +0 -80
- package/dist/runtime/components/input/IconButtonFileInput.vue.d.ts +0 -33
- package/dist/runtime/components/input/InputCheckbox.vue +0 -38
- package/dist/runtime/components/input/InputCheckbox.vue.d.ts +0 -16
- package/dist/runtime/components/input/InputControl.vue +0 -11
- package/dist/runtime/components/input/InputControl.vue.d.ts +0 -16
- package/dist/runtime/components/input/InputField.vue +0 -86
- package/dist/runtime/components/input/InputField.vue.d.ts +0 -28
- package/dist/runtime/components/input/InputFieldPassword.vue +0 -47
- package/dist/runtime/components/input/InputFieldPassword.vue.d.ts +0 -18
- package/dist/runtime/components/input/InputFieldPhone.vue +0 -71
- package/dist/runtime/components/input/InputFieldPhone.vue.d.ts +0 -34
- package/dist/runtime/components/input/InputFieldWithOption.vue +0 -69
- package/dist/runtime/components/input/InputFieldWithOption.vue.d.ts +0 -37
- package/dist/runtime/components/input/InputFileDropable.vue +0 -162
- package/dist/runtime/components/input/InputFileDropable.vue.d.ts +0 -33
- package/dist/runtime/components/input/InputGroup.vue +0 -18
- package/dist/runtime/components/input/InputGroup.vue.d.ts +0 -18
- package/dist/runtime/components/input/InputImageDropable.vue +0 -170
- package/dist/runtime/components/input/InputImageDropable.vue.d.ts +0 -24
- package/dist/runtime/components/input/InputNumber.vue +0 -53
- package/dist/runtime/components/input/InputNumber.vue.d.ts +0 -13
- package/dist/runtime/components/input/InputOtp.vue +0 -66
- package/dist/runtime/components/input/InputOtp.vue.d.ts +0 -20
- package/dist/runtime/components/input/InputRadio.vue +0 -49
- package/dist/runtime/components/input/InputRadio.vue.d.ts +0 -22
- package/dist/runtime/components/input/InputText.vue +0 -94
- package/dist/runtime/components/input/InputText.vue.d.ts +0 -50
- package/dist/runtime/components/input/TextArea.vue +0 -75
- package/dist/runtime/components/input/TextArea.vue.d.ts +0 -26
- package/dist/runtime/components/input/index.d.ts +0 -36
- package/dist/runtime/components/input/index.js +0 -60
- package/dist/runtime/components/label/BaseLabel.vue +0 -18
- package/dist/runtime/components/label/BaseLabel.vue.d.ts +0 -9
- package/dist/runtime/components/label/ErrorLabel.vue +0 -13
- package/dist/runtime/components/label/ErrorLabel.vue.d.ts +0 -10
- package/dist/runtime/components/label/Form.vue +0 -16
- package/dist/runtime/components/label/Form.vue.d.ts +0 -7
- package/dist/runtime/components/label/HintLabel.vue +0 -23
- package/dist/runtime/components/label/HintLabel.vue.d.ts +0 -10
- package/dist/runtime/components/label/LabelSection.vue +0 -39
- package/dist/runtime/components/label/LabelSection.vue.d.ts +0 -20
- package/dist/runtime/components/listbox/Listbox.vue +0 -17
- package/dist/runtime/components/listbox/Listbox.vue.d.ts +0 -17
- package/dist/runtime/components/listbox/ListboxItem.vue +0 -34
- package/dist/runtime/components/listbox/ListboxItem.vue.d.ts +0 -20
- package/dist/runtime/components/loading/BounceLoading.vue +0 -19
- package/dist/runtime/components/loading/BounceLoading.vue.d.ts +0 -6
- package/dist/runtime/components/loading/LoadingCircular.vue +0 -46
- package/dist/runtime/components/loading/LoadingCircular.vue.d.ts +0 -10
- package/dist/runtime/components/loading/LoadingIndicator.d.ts +0 -60
- package/dist/runtime/components/loading/LoadingIndicator.js +0 -66
- package/dist/runtime/components/loading/SpinnerLoading.vue +0 -11
- package/dist/runtime/components/loading/SpinnerLoading.vue.d.ts +0 -6
- package/dist/runtime/components/player/Audio.vue +0 -104
- package/dist/runtime/components/player/Audio.vue.d.ts +0 -15
- package/dist/runtime/components/player/Scrubber.vue +0 -48
- package/dist/runtime/components/player/Scrubber.vue.d.ts +0 -44
- package/dist/runtime/components/player/Video.vue +0 -163
- package/dist/runtime/components/player/Video.vue.d.ts +0 -11
- package/dist/runtime/components/popover/Popover.vue +0 -30
- package/dist/runtime/components/popover/Popover.vue.d.ts +0 -18
- package/dist/runtime/components/popover/WhatsAppChecker.vue +0 -61
- package/dist/runtime/components/popover/WhatsAppChecker.vue.d.ts +0 -13
- package/dist/runtime/components/radio/Courier.vue +0 -195
- package/dist/runtime/components/radio/Courier.vue.d.ts +0 -54
- package/dist/runtime/components/radio/Decoration.vue +0 -43
- package/dist/runtime/components/radio/Decoration.vue.d.ts +0 -5
- package/dist/runtime/components/radio/RadioCourierBadge.vue +0 -68
- package/dist/runtime/components/radio/RadioCourierBadge.vue.d.ts +0 -11
- package/dist/runtime/components/radio/ThemeDecoration.vue +0 -40
- package/dist/runtime/components/radio/ThemeDecoration.vue.d.ts +0 -2
- package/dist/runtime/components/radio-group/ButtonRadio.vue +0 -106
- package/dist/runtime/components/radio-group/ButtonRadio.vue.d.ts +0 -47
- package/dist/runtime/components/range-picker/RangePicker.vue +0 -77
- package/dist/runtime/components/range-picker/RangePicker.vue.d.ts +0 -20
- package/dist/runtime/components/range-picker/RangePickerBody.vue +0 -270
- package/dist/runtime/components/range-picker/RangePickerBody.vue.d.ts +0 -24
- package/dist/runtime/components/range-picker/index.d.ts +0 -5
- package/dist/runtime/components/scroll-area/ScrollAreaBase.vue +0 -57
- package/dist/runtime/components/scroll-area/ScrollAreaBase.vue.d.ts +0 -20
- package/dist/runtime/components/select/SelectBase.vue +0 -137
- package/dist/runtime/components/select/SelectBase.vue.d.ts +0 -50
- package/dist/runtime/components/select/SelectMultiple.vue +0 -119
- package/dist/runtime/components/select/SelectMultiple.vue.d.ts +0 -45
- package/dist/runtime/components/select/SelectOption.vue +0 -96
- package/dist/runtime/components/select/SelectOption.vue.d.ts +0 -21
- package/dist/runtime/components/select/SelectWithInput.vue +0 -46
- package/dist/runtime/components/select/SelectWithInput.vue.d.ts +0 -21
- package/dist/runtime/components/stepper/Stepper.vue +0 -99
- package/dist/runtime/components/stepper/Stepper.vue.d.ts +0 -23
- package/dist/runtime/components/switch/Switch.vue +0 -42
- package/dist/runtime/components/switch/Switch.vue.d.ts +0 -28
- package/dist/runtime/components/table/TableWrapper.vue +0 -61
- package/dist/runtime/components/table/TableWrapper.vue.d.ts +0 -15
- package/dist/runtime/components/tabs/TabBase.vue +0 -77
- package/dist/runtime/components/tabs/TabBase.vue.d.ts +0 -32
- package/dist/runtime/components/tags-input/TagsInput.vue +0 -131
- package/dist/runtime/components/tags-input/TagsInput.vue.d.ts +0 -48
- package/dist/runtime/components/tags-input/TagsInputWithOption.vue +0 -95
- package/dist/runtime/components/tags-input/TagsInputWithOption.vue.d.ts +0 -26
- package/dist/runtime/components/time-picker/TimePicker.vue +0 -84
- package/dist/runtime/components/time-picker/TimePicker.vue.d.ts +0 -17
- package/dist/runtime/components/time-picker/TimePickerBody.vue +0 -178
- package/dist/runtime/components/time-picker/TimePickerBody.vue.d.ts +0 -21
- package/dist/runtime/components/toast/ToastCard.vue +0 -36
- package/dist/runtime/components/toast/ToastCard.vue.d.ts +0 -16
- package/dist/runtime/components/toast/ToastContainer.vue +0 -15
- package/dist/runtime/components/toast/ToastContainer.vue.d.ts +0 -2
- package/dist/runtime/components/toast/ToastNetwork.vue +0 -109
- package/dist/runtime/components/toast/ToastNetwork.vue.d.ts +0 -2
- package/dist/runtime/components/toast/index.d.ts +0 -16
- package/dist/runtime/components/toast/index.js +0 -16
- package/dist/runtime/components/toggle-group/MultiSelect.vue +0 -45
- package/dist/runtime/components/toggle-group/MultiSelect.vue.d.ts +0 -38
- package/dist/runtime/components/toggle-group/ToggleGroup.vue +0 -59
- package/dist/runtime/components/toggle-group/ToggleGroup.vue.d.ts +0 -41
- package/dist/runtime/components/tooltip/MiniTooltip.vue +0 -58
- package/dist/runtime/components/tooltip/MiniTooltip.vue.d.ts +0 -21
- package/dist/runtime/components/tooltip/Tooltip.vue +0 -50
- package/dist/runtime/components/tooltip/Tooltip.vue.d.ts +0 -21
- package/dist/runtime/utils/formatNumber.d.ts +0 -2
- package/dist/runtime/utils/formatNumber.js +0 -12
package/dist/module.d.mts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Prefix for components
|
|
6
|
+
* @default 'Pi'
|
|
7
|
+
*/
|
|
4
8
|
prefix?: string;
|
|
5
|
-
coloMode?: boolean;
|
|
6
9
|
}
|
|
7
10
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
11
|
|
package/dist/module.json
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paket-ui",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"configKey": "nakama",
|
|
6
|
-
"compatibility": {
|
|
7
|
-
"nuxt": ">=3.16.0"
|
|
8
|
-
},
|
|
3
|
+
"configKey": "paketUi",
|
|
4
|
+
"version": "v0.0.6",
|
|
9
5
|
"builder": {
|
|
10
6
|
"@nuxt/module-builder": "1.0.2",
|
|
11
7
|
"unbuild": "3.6.1"
|
package/dist/module.mjs
CHANGED
|
@@ -1,46 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { defineNuxtModule, createResolver, addImports, addPlugin } from '@nuxt/kit';
|
|
2
|
+
import twVite from '@tailwindcss/vite';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
const version = "v0.0.4";
|
|
6
|
-
|
|
7
|
-
const defaultOptions = {
|
|
8
|
-
prefix: "Nx"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const module = defineNuxtModule({
|
|
4
|
+
const module$1 = defineNuxtModule({
|
|
12
5
|
meta: {
|
|
13
|
-
name,
|
|
14
|
-
|
|
15
|
-
docs: "https://github.com/kiriminaja/nakama-ui",
|
|
16
|
-
configKey: "nakama",
|
|
17
|
-
compatibility: {
|
|
18
|
-
nuxt: ">=3.16.0"
|
|
19
|
-
}
|
|
6
|
+
name: "paket-ui",
|
|
7
|
+
configKey: "paketUi"
|
|
20
8
|
},
|
|
21
9
|
// Default configuration options of the Nuxt module
|
|
22
|
-
defaults:
|
|
10
|
+
defaults: {
|
|
11
|
+
prefix: "Pi"
|
|
12
|
+
},
|
|
23
13
|
async setup(options, nuxt) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
await registerModule("@nuxt/icon", "icon", {
|
|
33
|
-
cssLayer: "components"
|
|
14
|
+
const resolver = createResolver(import.meta.url);
|
|
15
|
+
nuxt.options.css.push(resolver.resolve("./runtime/assets/main.css"));
|
|
16
|
+
nuxt.options.vite = nuxt.options.vite || {};
|
|
17
|
+
nuxt.options.vite.plugins = nuxt.options.vite.plugins || [];
|
|
18
|
+
nuxt.options.vite.plugins.push(twVite());
|
|
19
|
+
addImports({
|
|
20
|
+
name: "cn",
|
|
21
|
+
from: resolver.resolve("./runtime/utils/cn")
|
|
34
22
|
});
|
|
35
|
-
addPlugin(resolve("./runtime/plugin"));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
24
|
+
const componentsDir = resolver.resolve("./runtime/components");
|
|
25
|
+
nuxt.hook("components:dirs", (dirs) => {
|
|
26
|
+
dirs.push({
|
|
27
|
+
path: componentsDir,
|
|
28
|
+
prefix: options.prefix,
|
|
29
|
+
pathPrefix: false
|
|
30
|
+
});
|
|
41
31
|
});
|
|
42
|
-
addImportsDir(resolve("./runtime/composables"));
|
|
43
32
|
}
|
|
44
33
|
});
|
|
45
34
|
|
|
46
|
-
export { module as default };
|
|
35
|
+
export { module$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";@source "../components/**/*.vue";@source "../../playground/**/*.vue";@custom-variant dark (&:where(.dark, .dark *));@theme{--navbar-height:60px;--default-font-family:--apple-system,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--spacing-navbar:var(--navbar-height);--spacing-navbar-screen:calc(100vh - var(--navbar-height));--color-primary:#7d3eb9;--color-onPrimary:#fff;--color-on-primary:var(--color-onPrimary);--color-primaryContainer:#f0dbff;--color-primary-container:var(--color-primaryContainer);--color-onPrimaryContainer:#2c0051;--color-on-primary-container:var(--color-onPrimaryContainer);--color-secondary:#665a6f;--color-onSecondary:#fff;--color-on-secondary:var(--color-onSecondary);--color-secondaryContainer:#edddf6;--color-secondary-container:var(--color-secondaryContainer);--color-onSecondaryContainer:#211829;--color-on-secondary-container:var(--color-onSecondaryContainer);--color-tertiary:#805157;--color-onTertiary:#fff;--color-on-tertiary:var(--color-onTertiary);--color-tertiaryContainer:#ffd9dc;--color-tertiary-container:var(--color-tertiaryContainer);--color-onTertiaryContainer:#321016;--color-on-tertiary-container:var(--color-onTertiaryContainer);--color-error:#ba1a1a;--color-onError:#fff;--color-on-error:var(--color-onError);--color-errorContainer:#ffdad6;--color-error-container:var(--color-errorContainer);--color-onErrorContainer:#410002;--color-on-error-container:var(--color-onErrorContainer);--color-info:#2b5ea7;--color-onInfo:#fff;--color-on-info:var(--color-onInfo);--color-infoContainer:#d7e3ff;--color-info-container:var(--color-infoContainer);--color-onInfoContainer:#001b3e;--color-on-info-container:var(--color-onInfoContainer);--color-success:#006d38;--color-onSuccess:#fff;--color-on-success:var(--color-onSuccess);--color-successContainer:#74fda2;--color-success-container:var(--color-successContainer);--color-onSuccessContainer:#00210d;--color-on-success-container:var(--color-onSuccessContainer);--color-warning:#9d4300;--color-onWarning:#fff;--color-on-warning:var(--color-onWarning);--color-warningContainer:#ffdbca;--color-warning-container:var(--color-warningContainer);--color-onWarningContainer:#341100;--color-on-warning-container:var(--color-onWarningContainer);--color-warningYellow:#d19600;--color-onWarningYellow:#fff;--color-on-warningYellow:var(--color-onWarningYellow);--color-warningYellowContainer:#fff5be;--color-warningYellow-container:var(--color-warningYellowContainer);--color-onWarningYellowContainer:#9d7204;--color-on-warningYellow-container:var(--color-onWarningYellowContainer);--color-background:#fff;--color-background:var(--color-background);--color-onBackground:#1d1b1e;--color-on-background:var(--color-onBackground);--color-outline:#7c757e;--color-outlineVariant:#ccc4ce;--color-outline-variant:var(--color-outlineVariant);--color-surface:#fef7fc;--color-onSurface:#1d1b1e;--color-on-surface:var(--color-onSurface);--color-surfaceVariant:#e9dfeb;--color-surface-variant:var(--color-surfaceVariant);--color-onSurfaceVariant:#4a454e;--color-on-surface-variant:var(--color-onSurfaceVariant);--color-inverseSurface:#322f33;--color-inverse-surface:var(--color-inverseSurface);--color-onInverseSurface:#f6eff4;--color-on-inverse-surface:var(--color-onInverseSurface);--color-surfaceBright:#fef7fc;--color-surface-bright:var(--color-surfaceBright);--color-surfaceDim:#ded8dd;--color-surface-dim:var(--color-surfaceDim);--color-surfaceContainerLowest:#fff;--color-surface-container-lowest:var(--color-surfaceContainerLowest);--color-surfaceContainerLow:#f8f2f6;--color-surface-container-low:var(--color-surfaceContainerLow);--color-surfaceContainer:#f3ecf1;--color-surface-container:var(--color-surfaceContainer);--color-surfaceContainerHigh:#ede6eb;--color-surface-container-high:var(--color-surfaceContainerHigh);--color-surfaceContainerHighest:#e7e1e5;--color-surface-container-highest:var(--color-surfaceContainerHighest);--color-purple:#c88fff;--color-onPurple:#fff;--color-on-purple:var(--color-onPurple);--color-primaryPurple:#e4c8ff;--color-primary-purple:var(--color-primaryPurple);--color-onPrimaryPurple:#8d31e5;--color-on-primary-purple:var(--color-onPrimaryPurple);--text-xxs:0.625rem}.dark{--color-primary:#ddb7ff;--color-onPrimary:#490080;--color-primaryContainer:#63209f;--color-onPrimaryContainer:#f0dbff;--color-secondary:#d0c1d9;--color-onSecondary:#362c3f;--color-secondaryContainer:#4d4356;--color-onSecondaryContainer:#edddf6;--color-tertiary:#f3b7bd;--color-onTertiary:#4b252a;--color-tertiaryContainer:#653a40;--color-onTertiaryContainer:#ffd9dc;--color-error:#ffb4ab;--color-onError:#690005;--color-errorContainer:#93000a;--color-onErrorContainer:#ffdad6;--color-background:#0f0d11;--color-onBackground:#e7e1e5;--color-info:#aac7ff;--color-onInfo:#002f65;--color-infoContainer:#01458e;--color-onInfoContainer:#d7e3ff;--color-success:#55df88;--color-onSuccess:#00391a;--color-successContainer:#005229;--color-onSuccessContainer:#95f8a7;--color-warning:#ffb690;--color-onWarning:#552100;--color-warningContainer:#783200;--color-onWarningContainer:#ffdbca;--color-outline:#968e98;--color-outlineVariant:#4a454e;--color-surface:#151316;--color-onSurface:#cbc5c9;--color-surfaceVariant:#4a454e;--color-onSurfaceVariant:#ccc4ce;--color-inverseSurface:#e7e1e5;--color-onInverseSurface:#1d1b1e;--color-surfaceBright:#3b383c;--color-surfaceDim:#151316;--color-surfaceContainerLowest:#0f0d11;--color-surfaceContainerLow:#1d1b1e;--color-surfaceContainer:#211f22;--color-surfaceContainerHigh:#2c292d;--color-surfaceContainerHighest:#373437;--color-warningYellow:#fff5be;--color-onWarningYellow:#9d7204;--color-warningYellowContainer:#d19600;--color-onWarningYellowContainer:#fff4d7;--color-purple:#efdfff;--color-onPurple:#7b0ce5;--color-primaryPurple:#5e2793;--color-onPrimaryPurple:#d9b2ff}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { HTMLAttributes, AnchorHTMLAttributes } from 'vue';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "primaryContainer" | "primaryOutline" | "primaryOutlineContainer" | "info" | "infoOutline" | "success" | "successOutline" | "warning" | "warningOutline" | "error" | "errorOutline" | "errorContainer" | "outline" | "container" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
8
|
+
type ButtonProps = {
|
|
9
|
+
class?: HTMLAttributes['class'];
|
|
10
|
+
variant?: ButtonVariants['variant'];
|
|
11
|
+
size?: ButtonVariants['size'];
|
|
12
|
+
label?: string;
|
|
13
|
+
labelClass?: HTMLAttributes['class'];
|
|
14
|
+
iconName?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
to?: string;
|
|
18
|
+
target?: AnchorHTMLAttributes['target'];
|
|
19
|
+
ariaLabel?: AnchorHTMLAttributes['aria-label'];
|
|
20
|
+
};
|
|
21
|
+
declare var __VLS_14: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_14) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../utils/cn";
|
|
4
|
+
import { NuxtLink } from "#components";
|
|
5
|
+
const buttonVariants = cva(
|
|
6
|
+
"rounded-full flex justify-center cursor-pointer items-center gap-2 text-sm font-semibold disabled:opacity-40 disabled:cursor-not-allowed hover:saturate-150",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
primary: "bg-primary text-on-primary border border-primary",
|
|
11
|
+
primaryContainer: "bg-primary-container text-on-primary-container border border-primary-container",
|
|
12
|
+
primaryOutline: "text-primary border border-primary",
|
|
13
|
+
primaryOutlineContainer: "text-secondary-container border border-primary-container",
|
|
14
|
+
info: "bg-info text-on-info border border-info",
|
|
15
|
+
infoOutline: "text-info border border-info",
|
|
16
|
+
success: "bg-success text-on-success border border-success",
|
|
17
|
+
successOutline: "text-success border border-success",
|
|
18
|
+
warning: "bg-warning text-on-warning border border-warning",
|
|
19
|
+
warningOutline: "text-warning border border-warning",
|
|
20
|
+
error: "bg-error text-on-error border border-error",
|
|
21
|
+
errorOutline: "text-error border border-error",
|
|
22
|
+
errorContainer: "bg-error-container text-error border-error-container",
|
|
23
|
+
outline: "text-on-surface border border-outline-variant hover:border-outline",
|
|
24
|
+
container: "bg-surface-container text-onSurface"
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
default: "py-2.5 px-4",
|
|
28
|
+
xs: "py-1 px-2",
|
|
29
|
+
sm: "py-2 px-4",
|
|
30
|
+
lg: "py-3 px-6"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "primary",
|
|
35
|
+
size: "default"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
const iconSizeConfig = {
|
|
40
|
+
default: "20px",
|
|
41
|
+
xs: "12px",
|
|
42
|
+
sm: "16px",
|
|
43
|
+
lg: "24px"
|
|
44
|
+
};
|
|
45
|
+
const props = defineProps({
|
|
46
|
+
class: { type: null, required: false },
|
|
47
|
+
variant: { type: null, required: false, default: "primary" },
|
|
48
|
+
size: { type: null, required: false, default: "default" },
|
|
49
|
+
label: { type: String, required: false },
|
|
50
|
+
labelClass: { type: null, required: false },
|
|
51
|
+
iconName: { type: String, required: false },
|
|
52
|
+
disabled: { type: Boolean, required: false },
|
|
53
|
+
loading: { type: Boolean, required: false },
|
|
54
|
+
to: { type: String, required: false },
|
|
55
|
+
target: { type: null, required: false },
|
|
56
|
+
ariaLabel: { type: null, required: false }
|
|
57
|
+
});
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<component
|
|
62
|
+
:is="props.to ? NuxtLink : 'button'"
|
|
63
|
+
:class="cn(buttonVariants({ variant, size }), props.class)"
|
|
64
|
+
:to="props.to"
|
|
65
|
+
:target="props.target"
|
|
66
|
+
:aria-label="props.ariaLabel"
|
|
67
|
+
:disabled="props.disabled || props.loading"
|
|
68
|
+
>
|
|
69
|
+
<Icon
|
|
70
|
+
v-if="loading || iconName"
|
|
71
|
+
:name="loading ? 'svg-spinners:ring-resize' : iconName"
|
|
72
|
+
:size="iconSizeConfig[props.size ?? 'default']"
|
|
73
|
+
/>
|
|
74
|
+
<slot>
|
|
75
|
+
<span
|
|
76
|
+
v-if="label && label != ''"
|
|
77
|
+
:class="cn(props.labelClass)"
|
|
78
|
+
v-text="label"
|
|
79
|
+
/>
|
|
80
|
+
</slot>
|
|
81
|
+
</component>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { HTMLAttributes, AnchorHTMLAttributes } from 'vue';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "primaryContainer" | "primaryOutline" | "primaryOutlineContainer" | "info" | "infoOutline" | "success" | "successOutline" | "warning" | "warningOutline" | "error" | "errorOutline" | "errorContainer" | "outline" | "container" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
8
|
+
type ButtonProps = {
|
|
9
|
+
class?: HTMLAttributes['class'];
|
|
10
|
+
variant?: ButtonVariants['variant'];
|
|
11
|
+
size?: ButtonVariants['size'];
|
|
12
|
+
label?: string;
|
|
13
|
+
labelClass?: HTMLAttributes['class'];
|
|
14
|
+
iconName?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
to?: string;
|
|
18
|
+
target?: AnchorHTMLAttributes['target'];
|
|
19
|
+
ariaLabel?: AnchorHTMLAttributes['aria-label'];
|
|
20
|
+
};
|
|
21
|
+
declare var __VLS_14: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_14) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
package/dist/runtime/plugin.js
CHANGED
package/dist/runtime/utils/cn.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paket-ui",
|
|
3
|
-
"version": "v0.0.
|
|
3
|
+
"version": "v0.0.6",
|
|
4
4
|
"description": "KiriminAja Paket UI, a UI component library for Nuxt 3 applications.",
|
|
5
5
|
"repository": "kiriminaja/paket-ui",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,40 +24,37 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"prepack": "nuxt-module-build build",
|
|
27
|
-
"dev": "nuxi dev playground",
|
|
27
|
+
"dev": "bun run dev:prepare && nuxi dev playground",
|
|
28
28
|
"dev:build": "nuxi build playground",
|
|
29
29
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
30
|
-
"release": "
|
|
30
|
+
"release": "bun run lint && bun run test && bun run prepack && changelogen --release && bun run publish && git push --follow-tags",
|
|
31
31
|
"lint": "eslint .",
|
|
32
32
|
"test": "vitest run",
|
|
33
33
|
"test:watch": "vitest watch",
|
|
34
34
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nuxt/
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
37
|
+
"@nuxt/kit": "^4.2.1",
|
|
38
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
39
|
+
"class-variance-authority": "^0.7.1",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"pathe": "^2.0.3",
|
|
42
|
+
"reka-ui": "^2.6.0",
|
|
43
|
+
"tailwind-merge": "^3.4.0",
|
|
44
|
+
"tailwindcss": "^4.1.17"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@nuxt/devtools": "^
|
|
46
|
-
"@nuxt/eslint-config": "^1.
|
|
47
|
+
"@nuxt/devtools": "^3.1.1",
|
|
48
|
+
"@nuxt/eslint-config": "^1.11.0",
|
|
47
49
|
"@nuxt/module-builder": "^1.0.2",
|
|
48
|
-
"@nuxt/schema": "^
|
|
50
|
+
"@nuxt/schema": "^4.2.1",
|
|
49
51
|
"@nuxt/test-utils": "^3.20.1",
|
|
50
|
-
"@types/node": "^24.10.
|
|
52
|
+
"@types/node": "^24.10.1",
|
|
51
53
|
"changelogen": "^0.6.2",
|
|
52
54
|
"eslint": "^9.39.1",
|
|
53
|
-
"nuxt": "^4.
|
|
55
|
+
"nuxt": "^4.2.1",
|
|
54
56
|
"typescript": "~5.9.3",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"@tailwindcss/vite": "^4.1.16",
|
|
58
|
-
"tailwindcss": "^4.1.16",
|
|
59
|
-
"tailwind-variants": "^3.1.1",
|
|
60
|
-
"vitest": "^3.2.4",
|
|
61
|
-
"vue-tsc": "^2.2.12"
|
|
57
|
+
"vitest": "^4.0.14",
|
|
58
|
+
"vue-tsc": "^3.1.5"
|
|
62
59
|
}
|
|
63
60
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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.
|
|
@@ -1,36 +0,0 @@
|
|
|
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>
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1,46 +0,0 @@
|
|
|
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>
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,136 +0,0 @@
|
|
|
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>
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|