@finema/core 2.18.3 â 2.20.0
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/README.md +79 -79
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/DevToolsWindow/index.vue +98 -95
- package/dist/runtime/components/Dialog/index.vue +20 -19
- package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
- package/dist/runtime/components/Form/Fields.vue +5 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
- package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
- package/dist/runtime/components/Form/InputSearch/index.vue +79 -0
- package/dist/runtime/components/Form/InputSearch/index.vue.d.ts +13 -0
- package/dist/runtime/components/Form/InputSearch/types.d.ts +16 -0
- package/dist/runtime/components/Form/InputSearch/types.js +0 -0
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +43 -43
- package/dist/runtime/components/Form/InputText/index.vue +216 -79
- package/dist/runtime/components/Form/InputText/types.d.ts +1 -0
- package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
- package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/EmptyState.vue +4 -4
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/FailedState.vue +7 -7
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/LoadingState.vue +5 -5
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/SuccessState.vue +7 -7
- package/dist/runtime/components/Form/index.vue +5 -5
- package/dist/runtime/components/Form/types.d.ts +3 -1
- package/dist/runtime/components/Form/types.js +1 -0
- package/dist/runtime/components/Image.vue +28 -28
- package/dist/runtime/components/Log/index.vue +17 -17
- package/dist/runtime/components/Table/Base.vue +1 -1
- package/dist/runtime/components/Table/ColumnDate.vue +1 -1
- package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
- package/dist/runtime/components/Table/ColumnImage.vue +4 -4
- package/dist/runtime/components/Table/ColumnNumber.vue +1 -1
- package/dist/runtime/components/Table/ColumnText.vue +1 -1
- package/dist/runtime/components/Table/index.vue +3 -1
- package/dist/runtime/composables/useConfig.d.ts +2 -2
- package/dist/runtime/composables/useConfig.js +4 -4
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/styles/main.css +1 -1
- package/dist/runtime/theme/dialog.d.ts +6 -4
- package/dist/runtime/theme/dialog.js +7 -5
- package/dist/runtime/theme/input.d.ts +3 -0
- package/dist/runtime/theme/input.js +4 -1
- package/dist/runtime/theme/uploadFileDropzone.d.ts +11 -9
- package/dist/runtime/theme/uploadFileDropzone.js +11 -9
- package/package.json +3 -7
package/README.md
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Get your module up and running quickly.
|
|
3
|
-
|
|
4
|
-
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
-
- Name: Finema UI Kit (Note: package.json has name: @finema/core, consider aligning these)
|
|
6
|
-
- Package name: @finema/core
|
|
7
|
-
- Description: A comprehensive UI kit for Finema projects.
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
|
-
# Finema UI Kit
|
|
11
|
-
|
|
12
|
-
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
-
[![License][license-src]][license-href]
|
|
15
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
-
|
|
17
|
-
A comprehensive UI kit for building consistent and beautiful user interfaces for Finema projects, designed to integrate seamlessly with Nuxt. This package is named `@finema/core` on npm.
|
|
18
|
-
|
|
19
|
-
- [⨠Release Notes](/CHANGELOG.md)
|
|
20
|
-
- [đ Storybook](https://your-storybook-url.com) <!-- Add a link to your Storybook -->
|
|
21
|
-
- [đšī¸ Playground](#playground)
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
<!-- Highlight some of the features your UI kit provides here -->
|
|
26
|
-
- đ¨ Wide range of customizable components, built for Vue and Nuxt
|
|
27
|
-
- đą Responsive design out-of-the-box
|
|
28
|
-
- âŋ Accessibility focused
|
|
29
|
-
- đ ī¸ Easy to integrate and use with Nuxt auto-import capabilities
|
|
30
|
-
|
|
31
|
-
## đ Installation
|
|
32
|
-
|
|
33
|
-
Install the UI kit in your project using npm or yarn:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm install @finema/core
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
or
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
yarn add @finema/core
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## đ ī¸ Available Scripts
|
|
46
|
-
|
|
47
|
-
In the project directory, you can run the following scripts:
|
|
48
|
-
|
|
49
|
-
- `npm run dev` or `yarn dev`: Runs the playground app in development mode.
|
|
50
|
-
- `npm run dev:build` or `yarn dev:build`: Builds the playground app.
|
|
51
|
-
- `npm run dev:prepare` or `yarn dev:prepare`: Prepares the development environment.
|
|
52
|
-
- `npm run lint` or `yarn lint`: Lints the codebase.
|
|
53
|
-
- `npm run test` or `yarn test`: Runs tests.
|
|
54
|
-
- `npm run release` or `yarn release`: Creates a new release (lints, tests, builds, publishes).
|
|
55
|
-
|
|
56
|
-
## đšī¸ Playground
|
|
57
|
-
|
|
58
|
-
This project includes a `playground` directory that you can use to test and experiment with the UI components.
|
|
59
|
-
|
|
60
|
-
To run the playground:
|
|
61
|
-
1. Navigate to the `playground` directory.
|
|
62
|
-
2. Install dependencies if you haven't already (`npm install` or `yarn install`).
|
|
63
|
-
3. Run `npm run dev` or `yarn dev`.
|
|
64
|
-
|
|
65
|
-
## đ¤ Contributing
|
|
66
|
-
|
|
67
|
-
Contributions are welcome! Please refer to the `CONTRIBUTING.md` file for guidelines. (You'll need to create this file).
|
|
68
|
-
|
|
69
|
-
<!--
|
|
70
|
-
Badge URLs - Keep these at the bottom of the file for better readability
|
|
71
|
-
-->
|
|
72
|
-
[npm-version-src]: https://img.shields.io/npm/v/@finema/core.svg
|
|
73
|
-
[npm-version-href]: https://npmjs.com/package/@finema/core
|
|
74
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/@finema/core.svg
|
|
75
|
-
[npm-downloads-href]: https://npmjs.com/package/@finema/core
|
|
76
|
-
[license-src]: https://img.shields.io/npm/l/@finema/core.svg
|
|
77
|
-
[license-href]: https://npmjs.com/package/@finema/core
|
|
78
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-00DC82?logo=nuxt.js
|
|
79
|
-
[nuxt-href]: https://nuxt.com
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: Finema UI Kit (Note: package.json has name: @finema/core, consider aligning these)
|
|
6
|
+
- Package name: @finema/core
|
|
7
|
+
- Description: A comprehensive UI kit for Finema projects.
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Finema UI Kit
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
A comprehensive UI kit for building consistent and beautiful user interfaces for Finema projects, designed to integrate seamlessly with Nuxt. This package is named `@finema/core` on npm.
|
|
18
|
+
|
|
19
|
+
- [⨠Release Notes](/CHANGELOG.md)
|
|
20
|
+
- [đ Storybook](https://your-storybook-url.com) <!-- Add a link to your Storybook -->
|
|
21
|
+
- [đšī¸ Playground](#playground)
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your UI kit provides here -->
|
|
26
|
+
- đ¨ Wide range of customizable components, built for Vue and Nuxt
|
|
27
|
+
- đą Responsive design out-of-the-box
|
|
28
|
+
- âŋ Accessibility focused
|
|
29
|
+
- đ ī¸ Easy to integrate and use with Nuxt auto-import capabilities
|
|
30
|
+
|
|
31
|
+
## đ Installation
|
|
32
|
+
|
|
33
|
+
Install the UI kit in your project using npm or yarn:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @finema/core
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
or
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
yarn add @finema/core
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## đ ī¸ Available Scripts
|
|
46
|
+
|
|
47
|
+
In the project directory, you can run the following scripts:
|
|
48
|
+
|
|
49
|
+
- `npm run dev` or `yarn dev`: Runs the playground app in development mode.
|
|
50
|
+
- `npm run dev:build` or `yarn dev:build`: Builds the playground app.
|
|
51
|
+
- `npm run dev:prepare` or `yarn dev:prepare`: Prepares the development environment.
|
|
52
|
+
- `npm run lint` or `yarn lint`: Lints the codebase.
|
|
53
|
+
- `npm run test` or `yarn test`: Runs tests.
|
|
54
|
+
- `npm run release` or `yarn release`: Creates a new release (lints, tests, builds, publishes).
|
|
55
|
+
|
|
56
|
+
## đšī¸ Playground
|
|
57
|
+
|
|
58
|
+
This project includes a `playground` directory that you can use to test and experiment with the UI components.
|
|
59
|
+
|
|
60
|
+
To run the playground:
|
|
61
|
+
1. Navigate to the `playground` directory.
|
|
62
|
+
2. Install dependencies if you haven't already (`npm install` or `yarn install`).
|
|
63
|
+
3. Run `npm run dev` or `yarn dev`.
|
|
64
|
+
|
|
65
|
+
## đ¤ Contributing
|
|
66
|
+
|
|
67
|
+
Contributions are welcome! Please refer to the `CONTRIBUTING.md` file for guidelines. (You'll need to create this file).
|
|
68
|
+
|
|
69
|
+
<!--
|
|
70
|
+
Badge URLs - Keep these at the bottom of the file for better readability
|
|
71
|
+
-->
|
|
72
|
+
[npm-version-src]: https://img.shields.io/npm/v/@finema/core.svg
|
|
73
|
+
[npm-version-href]: https://npmjs.com/package/@finema/core
|
|
74
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/@finema/core.svg
|
|
75
|
+
[npm-downloads-href]: https://npmjs.com/package/@finema/core
|
|
76
|
+
[license-src]: https://img.shields.io/npm/l/@finema/core.svg
|
|
77
|
+
[license-href]: https://npmjs.com/package/@finema/core
|
|
78
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-00DC82?logo=nuxt.js
|
|
79
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,99 +1,102 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-show="isShowDevTools"
|
|
4
|
-
ref="devToolsRef"
|
|
5
|
-
class="
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
2
|
+
<div
|
|
3
|
+
v-show="isShowDevTools"
|
|
4
|
+
ref="devToolsRef"
|
|
5
|
+
class="
|
|
6
|
+
fixed z-50 overflow-hidden rounded-lg border border-neutral-300 bg-white
|
|
7
|
+
opacity-80 shadow-2xl
|
|
8
|
+
"
|
|
9
|
+
:style="devToolsDynamicStyles"
|
|
10
|
+
>
|
|
11
|
+
<!-- Draggable Title Bar -->
|
|
12
|
+
<div class="flex items-center justify-between px-2 py-1 select-none">
|
|
13
|
+
<p
|
|
14
|
+
class="flex-grow cursor-move text-sm font-semibold"
|
|
15
|
+
@mousedown.prevent="handleDragStart"
|
|
16
|
+
>
|
|
17
|
+
Debug Tools
|
|
18
|
+
</p>
|
|
19
|
+
<div class="flex items-center">
|
|
20
|
+
<Button
|
|
21
|
+
icon="i-heroicons-arrow-path"
|
|
22
|
+
size="xs"
|
|
23
|
+
color="neutral"
|
|
24
|
+
variant="ghost"
|
|
25
|
+
class="mr-1"
|
|
26
|
+
title="Reset Position & Size"
|
|
27
|
+
@click.stop="resetDevToolsState"
|
|
28
|
+
/>
|
|
29
|
+
<Button
|
|
30
|
+
icon="i-heroicons-x-mark"
|
|
31
|
+
size="xs"
|
|
32
|
+
color="neutral"
|
|
33
|
+
variant="ghost"
|
|
34
|
+
title="Close DevTools"
|
|
35
|
+
@click.stop="closeDevTools"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<hr class="text-neutral-300" />
|
|
40
|
+
<!-- Content Area Target for Logs -->
|
|
41
|
+
<div
|
|
42
|
+
id="dev-logs"
|
|
43
|
+
class="flex flex-1 flex-col space-y-1 overflow-auto p-2"
|
|
44
|
+
:style="{ height: `calc(${devToolsHeight} - 40px)` }"
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
<!-- Resize Handles -->
|
|
48
|
+
<div
|
|
49
|
+
v-if="!isDragging"
|
|
50
|
+
class="resize-handles"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
class="resize-handle top-left"
|
|
54
|
+
@mousedown.prevent="handleResizeStart('top-left', $event)"
|
|
55
|
+
/>
|
|
56
|
+
<div
|
|
57
|
+
class="resize-handle top-center"
|
|
58
|
+
@mousedown.prevent="handleResizeStart('top', $event)"
|
|
59
|
+
/>
|
|
60
|
+
<div
|
|
61
|
+
class="resize-handle top-right"
|
|
62
|
+
@mousedown.prevent="handleResizeStart('top-right', $event)"
|
|
63
|
+
/>
|
|
64
|
+
<div
|
|
65
|
+
class="resize-handle middle-left"
|
|
66
|
+
@mousedown.prevent="handleResizeStart('left', $event)"
|
|
67
|
+
/>
|
|
68
|
+
<div
|
|
69
|
+
class="resize-handle middle-right"
|
|
70
|
+
@mousedown.prevent="handleResizeStart('right', $event)"
|
|
71
|
+
/>
|
|
72
|
+
<div
|
|
73
|
+
class="resize-handle bottom-left"
|
|
74
|
+
@mousedown.prevent="handleResizeStart('bottom-left', $event)"
|
|
75
|
+
/>
|
|
76
|
+
<div
|
|
77
|
+
class="resize-handle bottom-center"
|
|
78
|
+
@mousedown.prevent="handleResizeStart('bottom', $event)"
|
|
79
|
+
/>
|
|
80
|
+
<div
|
|
81
|
+
class="resize-handle bottom-right"
|
|
82
|
+
@mousedown.prevent="handleResizeStart('bottom-right', $event)"
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<!-- Toggle button for this DevToolsWindow -->
|
|
88
|
+
<div
|
|
89
|
+
class="fixed right-1 bottom-1 z-[99999]"
|
|
90
|
+
>
|
|
91
|
+
<Button
|
|
92
|
+
:icon="isShowDevTools ? 'heroicons:x-mark' : 'heroicons:information-circle'"
|
|
93
|
+
color="info"
|
|
94
|
+
square
|
|
95
|
+
size="sm"
|
|
96
|
+
:ui="{ base: 'rounded-full' }"
|
|
97
|
+
@click="toggleDevTools"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
97
100
|
</template>
|
|
98
101
|
|
|
99
102
|
<script setup>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<AlertDialogRoot :open="true">
|
|
3
3
|
<AlertDialogPortal>
|
|
4
|
-
<AlertDialogOverlay :class="
|
|
4
|
+
<AlertDialogOverlay :class="theme.overlay()" />
|
|
5
5
|
<AlertDialogContent
|
|
6
|
-
:class="
|
|
6
|
+
:class="theme.base()"
|
|
7
7
|
>
|
|
8
8
|
<Icon
|
|
9
9
|
v-if="!propsSafe.isHideIcon"
|
|
10
10
|
:name="getIcon"
|
|
11
|
-
:class="
|
|
11
|
+
:class="theme.icon()"
|
|
12
12
|
/>
|
|
13
|
-
<div :class="
|
|
14
|
-
<AlertDialogTitle :class="
|
|
13
|
+
<div :class="theme.wrapper()">
|
|
14
|
+
<AlertDialogTitle :class="theme.title()">
|
|
15
15
|
{{ propsSafe.title }}
|
|
16
16
|
</AlertDialogTitle>
|
|
17
17
|
<AlertDialogDescription
|
|
18
18
|
v-if="propsSafe.description"
|
|
19
|
-
:class="
|
|
19
|
+
:class="theme.description()"
|
|
20
20
|
>
|
|
21
21
|
{{ propsSafe.description }}
|
|
22
22
|
</AlertDialogDescription>
|
|
23
23
|
|
|
24
|
-
<div :class="
|
|
24
|
+
<div :class="theme.buttonGroup()">
|
|
25
25
|
<Button
|
|
26
26
|
v-if="propsSafe.isShowCancelBtn"
|
|
27
27
|
type="button"
|
|
28
28
|
color="neutral"
|
|
29
29
|
variant="outline"
|
|
30
|
-
:class="
|
|
30
|
+
:class="theme.cancelButton()"
|
|
31
31
|
@click="emits('close', false)"
|
|
32
32
|
>
|
|
33
33
|
{{ propsSafe.cancelText }}
|
|
34
34
|
</Button>
|
|
35
35
|
<Button
|
|
36
36
|
type="button"
|
|
37
|
-
:color="propsSafe.isConfirm ?
|
|
38
|
-
:class="
|
|
37
|
+
:color="propsSafe.isConfirm ? staticTheme.confirmColor : propsSafe.type"
|
|
38
|
+
:class="theme.confirmButton()"
|
|
39
39
|
@click="emits('close', true)"
|
|
40
40
|
>
|
|
41
41
|
{{ propsSafe.confirmText }}
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
AlertDialogTitle
|
|
58
58
|
} from "reka-ui";
|
|
59
59
|
import { computed, useAttrs } from "vue";
|
|
60
|
-
import {
|
|
60
|
+
import { useUiIconConfig, useUiConfig, useUiStaticConfig } from "../../composables/useConfig";
|
|
61
61
|
import { dialogTheme } from "#core/theme/dialog";
|
|
62
62
|
import { DialogType } from "#core/composables/useDialog";
|
|
63
63
|
const emits = defineEmits();
|
|
@@ -66,7 +66,8 @@ const props = withDefaults(defineProps(), {
|
|
|
66
66
|
cancelText: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01"
|
|
67
67
|
});
|
|
68
68
|
const attrs = useAttrs();
|
|
69
|
-
const
|
|
69
|
+
const icons = useUiIconConfig("dialog");
|
|
70
|
+
const staticTheme = useUiStaticConfig("dialog");
|
|
70
71
|
const propsSafe = computed(() => {
|
|
71
72
|
if (props.title) {
|
|
72
73
|
return props;
|
|
@@ -82,22 +83,22 @@ const getIcon = computed(() => {
|
|
|
82
83
|
return propsSafe.value.icon;
|
|
83
84
|
}
|
|
84
85
|
if (propsSafe.value.isConfirm) {
|
|
85
|
-
return
|
|
86
|
+
return icons.iconConfirm;
|
|
86
87
|
}
|
|
87
88
|
switch (propsSafe.value.type) {
|
|
88
89
|
case DialogType.SUCCESS:
|
|
89
|
-
return
|
|
90
|
+
return icons.iconSuccess;
|
|
90
91
|
case DialogType.ERROR:
|
|
91
|
-
return
|
|
92
|
+
return icons.iconError;
|
|
92
93
|
case DialogType.INFO:
|
|
93
|
-
return
|
|
94
|
+
return icons.iconInfo;
|
|
94
95
|
case DialogType.WARNING:
|
|
95
|
-
return
|
|
96
|
+
return icons.iconWarning;
|
|
96
97
|
default:
|
|
97
|
-
return
|
|
98
|
+
return icons.iconInfo;
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
|
-
const
|
|
101
|
+
const theme = computed(() => useUiConfig(dialogTheme, "dialog")({
|
|
101
102
|
color: propsSafe.value.isConfirm ? void 0 : propsSafe.value.type,
|
|
102
103
|
confirm: propsSafe.value.isConfirm
|
|
103
104
|
}));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FormField
|
|
3
|
-
:label="label"
|
|
4
|
-
:name="name"
|
|
5
|
-
:description="description"
|
|
6
|
-
:hint="hint"
|
|
7
|
-
:data-testid="name"
|
|
8
|
-
:help="help"
|
|
9
|
-
:error="errorMessage"
|
|
10
|
-
:required="!!required"
|
|
11
|
-
:ui="containerUi"
|
|
12
|
-
>
|
|
13
|
-
<slot />
|
|
14
|
-
</FormField>
|
|
2
|
+
<FormField
|
|
3
|
+
:label="label"
|
|
4
|
+
:name="name"
|
|
5
|
+
:description="description"
|
|
6
|
+
:hint="hint"
|
|
7
|
+
:data-testid="name"
|
|
8
|
+
:help="help"
|
|
9
|
+
:error="errorMessage"
|
|
10
|
+
:required="!!required"
|
|
11
|
+
:ui="containerUi"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</FormField>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script setup>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import { computed } from "vue";
|
|
21
21
|
import FormInputTextarea from "./InputTextarea/index.vue";
|
|
22
22
|
import FormInputText from "./InputText/index.vue";
|
|
23
|
+
import FormInputSearch from "./InputSearch/index.vue";
|
|
23
24
|
import FormInputNumber from "./InputNumber/index.vue";
|
|
24
25
|
import FormInputToggle from "./InputToggle/index.vue";
|
|
25
26
|
import FormInputCheckbox from "./InputCheckbox/index.vue";
|
|
@@ -45,6 +46,10 @@ const componentMap = {
|
|
|
45
46
|
component: FormInputText,
|
|
46
47
|
props: {}
|
|
47
48
|
},
|
|
49
|
+
[INPUT_TYPES.SEARCH]: {
|
|
50
|
+
component: FormInputSearch,
|
|
51
|
+
props: {}
|
|
52
|
+
},
|
|
48
53
|
[INPUT_TYPES.TEXTAREA]: {
|
|
49
54
|
component: FormInputTextarea,
|
|
50
55
|
props: {}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FieldWrapper
|
|
3
|
-
v-bind="wrapperProps"
|
|
4
|
-
label=""
|
|
5
|
-
description=""
|
|
6
|
-
>
|
|
7
|
-
<Checkbox
|
|
8
|
-
:model-value="value"
|
|
9
|
-
:disabled="wrapperProps.disabled"
|
|
10
|
-
:name="name"
|
|
11
|
-
:label="label"
|
|
12
|
-
:description="description"
|
|
13
|
-
:required="required"
|
|
14
|
-
:variant="variant"
|
|
15
|
-
:indicator="indicator"
|
|
16
|
-
:ui="ui"
|
|
17
|
-
@update:modelValue="onChange"
|
|
18
|
-
/>
|
|
19
|
-
</FieldWrapper>
|
|
2
|
+
<FieldWrapper
|
|
3
|
+
v-bind="wrapperProps"
|
|
4
|
+
label=""
|
|
5
|
+
description=""
|
|
6
|
+
>
|
|
7
|
+
<Checkbox
|
|
8
|
+
:model-value="value"
|
|
9
|
+
:disabled="wrapperProps.disabled"
|
|
10
|
+
:name="name"
|
|
11
|
+
:label="label"
|
|
12
|
+
:description="description"
|
|
13
|
+
:required="required"
|
|
14
|
+
:variant="variant"
|
|
15
|
+
:indicator="indicator"
|
|
16
|
+
:ui="ui"
|
|
17
|
+
@update:modelValue="onChange"
|
|
18
|
+
/>
|
|
19
|
+
</FieldWrapper>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
-
<InputNumber
|
|
4
|
-
:model-value="value"
|
|
5
|
-
:disabled="wrapperProps.disabled"
|
|
6
|
-
:name="name"
|
|
7
|
-
:placeholder="wrapperProps.placeholder"
|
|
8
|
-
:autofocus="!!autoFocus"
|
|
9
|
-
:readonly="readonly"
|
|
10
|
-
:orientation="orientation"
|
|
11
|
-
:increment-disabled="incrementDisabled"
|
|
12
|
-
:decrement-disabled="decrementDisabled"
|
|
13
|
-
:min="min"
|
|
14
|
-
:max="max"
|
|
15
|
-
:step="step"
|
|
16
|
-
:disable-wheel-change="disableWheelChange"
|
|
17
|
-
:format-options="formatOptions"
|
|
18
|
-
:ui="ui"
|
|
19
|
-
@update:model-value="onChange"
|
|
20
|
-
/>
|
|
21
|
-
</FieldWrapper>
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
+
<InputNumber
|
|
4
|
+
:model-value="value"
|
|
5
|
+
:disabled="wrapperProps.disabled"
|
|
6
|
+
:name="name"
|
|
7
|
+
:placeholder="wrapperProps.placeholder"
|
|
8
|
+
:autofocus="!!autoFocus"
|
|
9
|
+
:readonly="readonly"
|
|
10
|
+
:orientation="orientation"
|
|
11
|
+
:increment-disabled="incrementDisabled"
|
|
12
|
+
:decrement-disabled="decrementDisabled"
|
|
13
|
+
:min="min"
|
|
14
|
+
:max="max"
|
|
15
|
+
:step="step"
|
|
16
|
+
:disable-wheel-change="disableWheelChange"
|
|
17
|
+
:format-options="formatOptions"
|
|
18
|
+
:ui="ui"
|
|
19
|
+
@update:model-value="onChange"
|
|
20
|
+
/>
|
|
21
|
+
</FieldWrapper>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script setup>
|