@antify/ui 2.4.4 → 2.4.10
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/components/AntDropdown.vue +1 -2
- package/dist/components/buttons/AntButton.vue +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.mjs +3 -1
- package/dist/components/inputs/AntColorInput/AntColorInput.stories.d.ts +7 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.stories.js +173 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.stories.mjs +192 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.types.d.ts +9 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.types.js +16 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.types.mjs +10 -0
- package/dist/components/inputs/AntColorInput/AntColorInput.vue +231 -0
- package/dist/components/inputs/AntColorInput/Color.vue +81 -0
- package/dist/components/inputs/AntColorInput/ColorSelection.vue +60 -0
- package/dist/components/inputs/AntImageInput.vue +91 -22
- package/dist/components/inputs/AntSelect.vue +4 -3
- package/dist/components/inputs/AntTagInput.vue +6 -2
- package/dist/components/inputs/Elements/AntSelectMenu.vue +15 -7
- package/dist/components/inputs/__stories/AntSelect.stories.d.ts +1 -0
- package/dist/components/inputs/__stories/AntSelect.stories.js +47 -3
- package/dist/components/inputs/__stories/AntSelect.stories.mjs +48 -2
- package/dist/components/inputs/__types/index.d.ts +1 -0
- package/dist/components/inputs/__types/index.js +11 -0
- package/dist/components/inputs/__types/index.mjs +1 -0
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ onKeyStroke('Escape', (e: KeyboardEvent) => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
const onClickOutside = [
|
|
65
|
-
(
|
|
65
|
+
() => {
|
|
66
66
|
emit('update:showDropdown', false);
|
|
67
67
|
},
|
|
68
68
|
{
|
|
@@ -81,7 +81,6 @@ const onClickOutside = [
|
|
|
81
81
|
<div
|
|
82
82
|
ref="reference"
|
|
83
83
|
v-on-click-outside="onClickOutside"
|
|
84
|
-
class="h-full w-full"
|
|
85
84
|
>
|
|
86
85
|
<slot />
|
|
87
86
|
</div>
|
|
@@ -128,7 +128,7 @@ const classes = computed(() => {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
return {
|
|
131
|
-
'transition-all inline-flex items-center justify-center relative font-medium': true,
|
|
131
|
+
'transition-all inline-flex items-center justify-center relative font-medium cursor-pointer select-none': true,
|
|
132
132
|
'active:shadow-[inset_0_4px_4px_rgba(0,0,0,0.25)]': !hasInputState.value,
|
|
133
133
|
'p-1 text-xs gap-1': props.size === Size.xs2,
|
|
134
134
|
'p-1.5 text-xs gap-1.5': props.size === Size.xs,
|
|
@@ -39,6 +39,7 @@ import AntTextarea from './inputs/AntTextarea.vue';
|
|
|
39
39
|
import AntTextInput from './inputs/AntTextInput.vue';
|
|
40
40
|
import AntUnitInput from './inputs/AntUnitInput.vue';
|
|
41
41
|
import AntImageInput from './inputs/AntImageInput.vue';
|
|
42
|
+
import AntColorInput from './inputs/AntColorInput/AntColorInput.vue';
|
|
42
43
|
import AntNavLeftLayout from './layouts/AntNavLeftLayout.vue';
|
|
43
44
|
import AntNavbar from './navbar/AntNavbar.vue';
|
|
44
45
|
import AntNavbarItem from './navbar/AntNavbarItem.vue';
|
|
@@ -64,4 +65,4 @@ import AntTag from './AntTag.vue';
|
|
|
64
65
|
import AntToast from './AntToast.vue';
|
|
65
66
|
import AntToaster from './AntToaster.vue';
|
|
66
67
|
import AntTooltip from './AntTooltip.vue';
|
|
67
|
-
export { AntActionButton, AntButton, AntCreateButton, AntDeleteButton, AntDuplicateButton, AntEditButton, AntSaveAndNewButton, AntSaveButton, AntCrud, AntCrudDetail, AntCrudDetailActions, AntCrudDetailNav, AntCrudTableFilter, AntCrudTableNav, AntDeleteDialog, AntDialog, AntField, AntFormGroup, AntFormGroupLabel, AntBaseInput, AntSelectMenu, AntInputDescription, AntInputLabel, AntInputLimiter, AntCheckbox, AntCheckboxGroup, AntDateInput, AntNumberInput, AntPasswordInput, AntRadio, AntRadioGroup, AntRangeSlider, AntSearch, AntSelect, AntSwitch, AntSwitcher, AntTagInput, AntTextarea, AntTextInput, AntUnitInput, AntImageInput, AntNavLeftLayout, AntNavbar, AntNavbarItem, AntTable, AntTabs, AntTransitionCollapseHeight, AntAccordion, AntAccordionItem, AntAlert, AntCard, AntContent, AntDropdown, AntIcon, AntKeycap, AntListGroup, AntListGroupItem, AntModal, AntPagination, AntPopover, AntSkeleton, AntSpinner, AntTag, AntToast, AntToaster, AntTooltip, };
|
|
68
|
+
export { AntActionButton, AntButton, AntCreateButton, AntDeleteButton, AntDuplicateButton, AntEditButton, AntSaveAndNewButton, AntSaveButton, AntCrud, AntCrudDetail, AntCrudDetailActions, AntCrudDetailNav, AntCrudTableFilter, AntCrudTableNav, AntDeleteDialog, AntDialog, AntField, AntFormGroup, AntFormGroupLabel, AntBaseInput, AntSelectMenu, AntInputDescription, AntInputLabel, AntInputLimiter, AntCheckbox, AntCheckboxGroup, AntDateInput, AntNumberInput, AntPasswordInput, AntRadio, AntRadioGroup, AntRangeSlider, AntSearch, AntSelect, AntSwitch, AntSwitcher, AntTagInput, AntTextarea, AntTextInput, AntUnitInput, AntImageInput, AntNavLeftLayout, AntNavbar, AntNavbarItem, AntTable, AntTabs, AntTransitionCollapseHeight, AntAccordion, AntAccordionItem, AntAlert, AntCard, AntContent, AntDropdown, AntIcon, AntKeycap, AntListGroup, AntListGroupItem, AntModal, AntPagination, AntPopover, AntSkeleton, AntSpinner, AntTag, AntToast, AntToaster, AntTooltip, AntColorInput, };
|
package/dist/components/index.js
CHANGED
|
@@ -57,6 +57,12 @@ Object.defineProperty(exports, "AntCheckboxGroup", {
|
|
|
57
57
|
return _AntCheckboxGroup.default;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "AntColorInput", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _AntColorInput.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
60
66
|
Object.defineProperty(exports, "AntContent", {
|
|
61
67
|
enumerable: true,
|
|
62
68
|
get: function () {
|
|
@@ -440,6 +446,7 @@ var _AntTextarea = _interopRequireDefault(require("./inputs/AntTextarea.vue"));
|
|
|
440
446
|
var _AntTextInput = _interopRequireDefault(require("./inputs/AntTextInput.vue"));
|
|
441
447
|
var _AntUnitInput = _interopRequireDefault(require("./inputs/AntUnitInput.vue"));
|
|
442
448
|
var _AntImageInput = _interopRequireDefault(require("./inputs/AntImageInput.vue"));
|
|
449
|
+
var _AntColorInput = _interopRequireDefault(require("./inputs/AntColorInput/AntColorInput.vue"));
|
|
443
450
|
var _AntNavLeftLayout = _interopRequireDefault(require("./layouts/AntNavLeftLayout.vue"));
|
|
444
451
|
var _AntNavbar = _interopRequireDefault(require("./navbar/AntNavbar.vue"));
|
|
445
452
|
var _AntNavbarItem = _interopRequireDefault(require("./navbar/AntNavbarItem.vue"));
|
|
@@ -39,6 +39,7 @@ import AntTextarea from "./inputs/AntTextarea.vue";
|
|
|
39
39
|
import AntTextInput from "./inputs/AntTextInput.vue";
|
|
40
40
|
import AntUnitInput from "./inputs/AntUnitInput.vue";
|
|
41
41
|
import AntImageInput from "./inputs/AntImageInput.vue";
|
|
42
|
+
import AntColorInput from "./inputs/AntColorInput/AntColorInput.vue";
|
|
42
43
|
import AntNavLeftLayout from "./layouts/AntNavLeftLayout.vue";
|
|
43
44
|
import AntNavbar from "./navbar/AntNavbar.vue";
|
|
44
45
|
import AntNavbarItem from "./navbar/AntNavbarItem.vue";
|
|
@@ -130,5 +131,6 @@ export {
|
|
|
130
131
|
AntTag,
|
|
131
132
|
AntToast,
|
|
132
133
|
AntToaster,
|
|
133
|
-
AntTooltip
|
|
134
|
+
AntTooltip,
|
|
135
|
+
AntColorInput
|
|
134
136
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntColorInput from './AntColorInput.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntColorInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntColorInput>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const Summary: Story;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
module.exports = exports.Summary = exports.Docs = void 0;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _enums = require("../../../enums");
|
|
9
|
+
var _AntColorInput = _interopRequireDefault(require("./AntColorInput.vue"));
|
|
10
|
+
var _AntFormGroup = _interopRequireDefault(require("../../forms/AntFormGroup.vue"));
|
|
11
|
+
var _AntFormGroupLabel = _interopRequireDefault(require("../../forms/AntFormGroupLabel.vue"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const meta = {
|
|
14
|
+
title: "Inputs/ColorInput",
|
|
15
|
+
component: _AntColorInput.default,
|
|
16
|
+
argTypes: {
|
|
17
|
+
modelValue: {
|
|
18
|
+
control: "text"
|
|
19
|
+
},
|
|
20
|
+
state: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select"
|
|
23
|
+
},
|
|
24
|
+
options: Object.values(_enums.InputState)
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "select"
|
|
29
|
+
},
|
|
30
|
+
options: Object.values(_enums.Size)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
module.exports = meta;
|
|
35
|
+
const defaultOptions = ["primary-500", "red-500", "green-500", "blue-500", "yellow-500", "purple-500", "pink-500", "orange-500"];
|
|
36
|
+
const lightColorOptions = ["primary-300", "red-300", "green-300", "blue-300", "yellow-300", "purple-300", "pink-300", "orange-300"];
|
|
37
|
+
const Docs = exports.Docs = {
|
|
38
|
+
render: args => ({
|
|
39
|
+
components: {
|
|
40
|
+
AntColorInput: _AntColorInput.default
|
|
41
|
+
},
|
|
42
|
+
setup() {
|
|
43
|
+
const modelValue = (0, _vue.computed)({
|
|
44
|
+
get: () => args.modelValue,
|
|
45
|
+
// @ts-expect-error expect read only
|
|
46
|
+
set: val => args.modelValue = val
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
modelValue,
|
|
50
|
+
args
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
template: `
|
|
54
|
+
<AntColorInput v-bind="args" v-model="modelValue" />
|
|
55
|
+
`
|
|
56
|
+
}),
|
|
57
|
+
args: {
|
|
58
|
+
label: "Label",
|
|
59
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod",
|
|
60
|
+
options: defaultOptions,
|
|
61
|
+
modelValue: "entry-1"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const Summary = exports.Summary = {
|
|
65
|
+
parameters: {
|
|
66
|
+
chromatic: {
|
|
67
|
+
disableSnapshot: false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
render: args => ({
|
|
71
|
+
components: {
|
|
72
|
+
AntColorInput: _AntColorInput.default,
|
|
73
|
+
AntFormGroup: _AntFormGroup.default,
|
|
74
|
+
AntFormGroupLabel: _AntFormGroupLabel.default
|
|
75
|
+
},
|
|
76
|
+
setup() {
|
|
77
|
+
const modelValue = (0, _vue.computed)({
|
|
78
|
+
get: () => args.modelValue,
|
|
79
|
+
// @ts-expect-error expect read only
|
|
80
|
+
set: val => args.modelValue = val
|
|
81
|
+
});
|
|
82
|
+
const skeleton = (0, _vue.ref)(true);
|
|
83
|
+
const lightModelValue = (0, _vue.ref)("primary-300");
|
|
84
|
+
return {
|
|
85
|
+
args,
|
|
86
|
+
modelValue,
|
|
87
|
+
lightModelValue,
|
|
88
|
+
lightColorOptions,
|
|
89
|
+
InputState: _enums.InputState,
|
|
90
|
+
skeleton,
|
|
91
|
+
Size: _enums.Size
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
template: `
|
|
95
|
+
<AntFormGroup>
|
|
96
|
+
<AntFormGroupLabel>States</AntFormGroupLabel>
|
|
97
|
+
<AntFormGroup direction="row">
|
|
98
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
99
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
100
|
+
:state="InputState.base"/>
|
|
101
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
102
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
103
|
+
:state="InputState.info"/>
|
|
104
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
105
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
106
|
+
:state="InputState.success"/>
|
|
107
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
108
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
109
|
+
:state="InputState.warning"/>
|
|
110
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
111
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
112
|
+
:state="InputState.danger"/>
|
|
113
|
+
</AntFormGroup>
|
|
114
|
+
<AntFormGroupLabel>Sizes</AntFormGroupLabel>
|
|
115
|
+
<AntFormGroup direction="row">
|
|
116
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.lg"
|
|
117
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
118
|
+
/>
|
|
119
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.md"
|
|
120
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
121
|
+
/>
|
|
122
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.sm"
|
|
123
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
124
|
+
/>
|
|
125
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.xs"
|
|
126
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
127
|
+
/>
|
|
128
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.xs2"
|
|
129
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
130
|
+
/>
|
|
131
|
+
</AntFormGroup>
|
|
132
|
+
<AntFormGroup direction="row">
|
|
133
|
+
<AntFormGroup>
|
|
134
|
+
<AntFormGroupLabel>Disabled</AntFormGroupLabel>
|
|
135
|
+
<AntColorInput v-bind="args" v-model="modelValue" :disabled="true" label="Label"
|
|
136
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
137
|
+
/>
|
|
138
|
+
</AntFormGroup>
|
|
139
|
+
<AntFormGroup>
|
|
140
|
+
<AntFormGroupLabel>Readonly</AntFormGroupLabel>
|
|
141
|
+
<AntColorInput v-bind="args" v-model="modelValue" :readonly="true" label="Label"
|
|
142
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
143
|
+
/>
|
|
144
|
+
</AntFormGroup>
|
|
145
|
+
<AntFormGroup>
|
|
146
|
+
<AntFormGroupLabel>Skeleton</AntFormGroupLabel>
|
|
147
|
+
<AntColorInput v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
148
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
149
|
+
/>
|
|
150
|
+
</AntFormGroup>
|
|
151
|
+
</AntFormGroup>
|
|
152
|
+
<AntFormGroupLabel>Plain</AntFormGroupLabel>
|
|
153
|
+
<AntColorInput v-bind="args" v-model="modelValue"/>
|
|
154
|
+
<AntFormGroupLabel>Light Color Options</AntFormGroupLabel>
|
|
155
|
+
<AntColorInput v-model="lightModelValue" :options="lightColorOptions" />
|
|
156
|
+
<AntFormGroupLabel>Nullable</AntFormGroupLabel>
|
|
157
|
+
<AntColorInput v-bind="args" v-model="modelValue" nullable/>
|
|
158
|
+
<AntFormGroupLabel>With label</AntFormGroupLabel>
|
|
159
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"/>
|
|
160
|
+
<AntFormGroupLabel>With description</AntFormGroupLabel>
|
|
161
|
+
<AntColorInput v-bind="args" v-model="modelValue"
|
|
162
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"/>
|
|
163
|
+
<AntFormGroupLabel>With label + description</AntFormGroupLabel>
|
|
164
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
165
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"/>
|
|
166
|
+
</AntFormGroup>
|
|
167
|
+
`
|
|
168
|
+
}),
|
|
169
|
+
args: {
|
|
170
|
+
options: defaultOptions,
|
|
171
|
+
modelValue: "primary-500"
|
|
172
|
+
}
|
|
173
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
computed
|
|
4
|
+
} from "vue";
|
|
5
|
+
import {
|
|
6
|
+
Size
|
|
7
|
+
} from "../../../enums/index.mjs";
|
|
8
|
+
import {
|
|
9
|
+
InputState
|
|
10
|
+
} from "../../../enums/index.mjs";
|
|
11
|
+
import AntColorInput from "./AntColorInput.vue";
|
|
12
|
+
import AntFormGroup from "../../forms/AntFormGroup.vue";
|
|
13
|
+
import AntFormGroupLabel from "../../forms/AntFormGroupLabel.vue";
|
|
14
|
+
const meta = {
|
|
15
|
+
title: "Inputs/ColorInput",
|
|
16
|
+
component: AntColorInput,
|
|
17
|
+
argTypes: {
|
|
18
|
+
modelValue: {
|
|
19
|
+
control: "text"
|
|
20
|
+
},
|
|
21
|
+
state: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "select"
|
|
24
|
+
},
|
|
25
|
+
options: Object.values(InputState)
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
control: {
|
|
29
|
+
type: "select"
|
|
30
|
+
},
|
|
31
|
+
options: Object.values(Size)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
const defaultOptions = [
|
|
37
|
+
"primary-500",
|
|
38
|
+
"red-500",
|
|
39
|
+
"green-500",
|
|
40
|
+
"blue-500",
|
|
41
|
+
"yellow-500",
|
|
42
|
+
"purple-500",
|
|
43
|
+
"pink-500",
|
|
44
|
+
"orange-500"
|
|
45
|
+
];
|
|
46
|
+
const lightColorOptions = [
|
|
47
|
+
"primary-300",
|
|
48
|
+
"red-300",
|
|
49
|
+
"green-300",
|
|
50
|
+
"blue-300",
|
|
51
|
+
"yellow-300",
|
|
52
|
+
"purple-300",
|
|
53
|
+
"pink-300",
|
|
54
|
+
"orange-300"
|
|
55
|
+
];
|
|
56
|
+
export const Docs = {
|
|
57
|
+
render: (args) => ({
|
|
58
|
+
components: {
|
|
59
|
+
AntColorInput
|
|
60
|
+
},
|
|
61
|
+
setup() {
|
|
62
|
+
const modelValue = computed({
|
|
63
|
+
get: () => args.modelValue,
|
|
64
|
+
// @ts-expect-error expect read only
|
|
65
|
+
set: (val) => args.modelValue = val
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
modelValue,
|
|
69
|
+
args
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
template: `
|
|
73
|
+
<AntColorInput v-bind="args" v-model="modelValue" />
|
|
74
|
+
`
|
|
75
|
+
}),
|
|
76
|
+
args: {
|
|
77
|
+
label: "Label",
|
|
78
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod",
|
|
79
|
+
options: defaultOptions,
|
|
80
|
+
modelValue: "entry-1"
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
export const Summary = {
|
|
84
|
+
parameters: {
|
|
85
|
+
chromatic: {
|
|
86
|
+
disableSnapshot: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
render: (args) => ({
|
|
90
|
+
components: {
|
|
91
|
+
AntColorInput,
|
|
92
|
+
AntFormGroup,
|
|
93
|
+
AntFormGroupLabel
|
|
94
|
+
},
|
|
95
|
+
setup() {
|
|
96
|
+
const modelValue = computed({
|
|
97
|
+
get: () => args.modelValue,
|
|
98
|
+
// @ts-expect-error expect read only
|
|
99
|
+
set: (val) => args.modelValue = val
|
|
100
|
+
});
|
|
101
|
+
const skeleton = ref(true);
|
|
102
|
+
const lightModelValue = ref("primary-300");
|
|
103
|
+
return {
|
|
104
|
+
args,
|
|
105
|
+
modelValue,
|
|
106
|
+
lightModelValue,
|
|
107
|
+
lightColorOptions,
|
|
108
|
+
InputState,
|
|
109
|
+
skeleton,
|
|
110
|
+
Size
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
template: `
|
|
114
|
+
<AntFormGroup>
|
|
115
|
+
<AntFormGroupLabel>States</AntFormGroupLabel>
|
|
116
|
+
<AntFormGroup direction="row">
|
|
117
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
118
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
119
|
+
:state="InputState.base"/>
|
|
120
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
121
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
122
|
+
:state="InputState.info"/>
|
|
123
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
124
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
125
|
+
:state="InputState.success"/>
|
|
126
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
127
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
128
|
+
:state="InputState.warning"/>
|
|
129
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
130
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
131
|
+
:state="InputState.danger"/>
|
|
132
|
+
</AntFormGroup>
|
|
133
|
+
<AntFormGroupLabel>Sizes</AntFormGroupLabel>
|
|
134
|
+
<AntFormGroup direction="row">
|
|
135
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.lg"
|
|
136
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
137
|
+
/>
|
|
138
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.md"
|
|
139
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
140
|
+
/>
|
|
141
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.sm"
|
|
142
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
143
|
+
/>
|
|
144
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.xs"
|
|
145
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
146
|
+
/>
|
|
147
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label" :size="Size.xs2"
|
|
148
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
149
|
+
/>
|
|
150
|
+
</AntFormGroup>
|
|
151
|
+
<AntFormGroup direction="row">
|
|
152
|
+
<AntFormGroup>
|
|
153
|
+
<AntFormGroupLabel>Disabled</AntFormGroupLabel>
|
|
154
|
+
<AntColorInput v-bind="args" v-model="modelValue" :disabled="true" label="Label"
|
|
155
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
156
|
+
/>
|
|
157
|
+
</AntFormGroup>
|
|
158
|
+
<AntFormGroup>
|
|
159
|
+
<AntFormGroupLabel>Readonly</AntFormGroupLabel>
|
|
160
|
+
<AntColorInput v-bind="args" v-model="modelValue" :readonly="true" label="Label"
|
|
161
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
162
|
+
/>
|
|
163
|
+
</AntFormGroup>
|
|
164
|
+
<AntFormGroup>
|
|
165
|
+
<AntFormGroupLabel>Skeleton</AntFormGroupLabel>
|
|
166
|
+
<AntColorInput v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
167
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
168
|
+
/>
|
|
169
|
+
</AntFormGroup>
|
|
170
|
+
</AntFormGroup>
|
|
171
|
+
<AntFormGroupLabel>Plain</AntFormGroupLabel>
|
|
172
|
+
<AntColorInput v-bind="args" v-model="modelValue"/>
|
|
173
|
+
<AntFormGroupLabel>Light Color Options</AntFormGroupLabel>
|
|
174
|
+
<AntColorInput v-model="lightModelValue" :options="lightColorOptions" />
|
|
175
|
+
<AntFormGroupLabel>Nullable</AntFormGroupLabel>
|
|
176
|
+
<AntColorInput v-bind="args" v-model="modelValue" nullable/>
|
|
177
|
+
<AntFormGroupLabel>With label</AntFormGroupLabel>
|
|
178
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"/>
|
|
179
|
+
<AntFormGroupLabel>With description</AntFormGroupLabel>
|
|
180
|
+
<AntColorInput v-bind="args" v-model="modelValue"
|
|
181
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"/>
|
|
182
|
+
<AntFormGroupLabel>With label + description</AntFormGroupLabel>
|
|
183
|
+
<AntColorInput v-bind="args" v-model="modelValue" label="Label"
|
|
184
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"/>
|
|
185
|
+
</AntFormGroup>
|
|
186
|
+
`
|
|
187
|
+
}),
|
|
188
|
+
args: {
|
|
189
|
+
options: defaultOptions,
|
|
190
|
+
modelValue: "primary-500"
|
|
191
|
+
}
|
|
192
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ColorInputSize = void 0;
|
|
7
|
+
var ColorInputSize = exports.ColorInputSize = /* @__PURE__ */(ColorInputSize2 => {
|
|
8
|
+
ColorInputSize2["xl2"] = "2xl";
|
|
9
|
+
ColorInputSize2["xl"] = "xl";
|
|
10
|
+
ColorInputSize2["lg"] = "lg";
|
|
11
|
+
ColorInputSize2["md"] = "md";
|
|
12
|
+
ColorInputSize2["sm"] = "sm";
|
|
13
|
+
ColorInputSize2["xs"] = "xs";
|
|
14
|
+
ColorInputSize2["xs2"] = "2xs";
|
|
15
|
+
return ColorInputSize2;
|
|
16
|
+
})(ColorInputSize || {});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var ColorInputSize = /* @__PURE__ */ ((ColorInputSize2) => {
|
|
2
|
+
ColorInputSize2["xl2"] = "2xl";
|
|
3
|
+
ColorInputSize2["xl"] = "xl";
|
|
4
|
+
ColorInputSize2["lg"] = "lg";
|
|
5
|
+
ColorInputSize2["md"] = "md";
|
|
6
|
+
ColorInputSize2["sm"] = "sm";
|
|
7
|
+
ColorInputSize2["xs"] = "xs";
|
|
8
|
+
ColorInputSize2["xs2"] = "2xs";
|
|
9
|
+
return ColorInputSize2;
|
|
10
|
+
})(ColorInputSize || {});
|