vueless 0.0.181 → 0.0.183
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/package.json +1 -1
- package/ui.button/configs/default.config.js +1 -2
- package/ui.button-link/configs/default.config.js +2 -4
- package/ui.container-accordion/configs/default.config.js +1 -1
- package/ui.data-list/configs/default.config.js +1 -0
- package/ui.data-list/index.vue +18 -10
- package/ui.data-table/configs/default.config.js +1 -1
- package/ui.dropdown-badge/configs/default.config.js +2 -0
- package/ui.dropdown-badge/index.vue +2 -2
- package/ui.dropdown-button/configs/default.config.js +2 -0
- package/ui.dropdown-button/index.vue +2 -2
- package/ui.dropdown-link/configs/default.config.js +2 -0
- package/ui.dropdown-link/index.vue +3 -2
- package/ui.dropdown-list/configs/default.config.js +3 -4
- package/ui.dropdown-list/index.vue +2 -2
- package/ui.form-checkbox/configs/default.config.js +1 -3
- package/ui.form-input/configs/default.config.js +2 -3
- package/ui.form-select/configs/default.config.js +2 -5
- package/ui.form-select/index.vue +5 -5
- package/ui.form-switch/configs/default.config.js +3 -3
- package/ui.form-textarea/configs/default.config.js +1 -1
- package/web-types.json +18 -9
package/package.json
CHANGED
|
@@ -3,8 +3,7 @@ export default /*tw*/ {
|
|
|
3
3
|
base: `
|
|
4
4
|
flex items-center justify-center
|
|
5
5
|
text-base font-medium outline-none
|
|
6
|
-
border border-solid
|
|
7
|
-
transition duration-100 ease-in-out
|
|
6
|
+
border border-solid transition-all
|
|
8
7
|
focus:ring-opacity-20 focus:ring-4 focus:ring-{color}-700
|
|
9
8
|
focus-within:ring-opacity-20 focus-within:ring-4 focus-within:ring-{color}-700
|
|
10
9
|
disabled:ring-0 disabled:cursor-no-drop
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: {
|
|
3
3
|
base: `
|
|
4
|
-
w-fit inline-flex rounded
|
|
5
|
-
transition duration-100 ease-in-out
|
|
4
|
+
w-fit inline-flex rounded transition-all
|
|
6
5
|
focus-within:ring-4 focus-within:ring-{color}-500 focus-within:ring-opacity-15 focus-visible:outline-none
|
|
7
6
|
`,
|
|
8
7
|
variants: {
|
|
@@ -29,9 +28,8 @@ export default /*tw*/ {
|
|
|
29
28
|
},
|
|
30
29
|
link: {
|
|
31
30
|
base: `
|
|
32
|
-
w-full inline-block !leading-none
|
|
31
|
+
w-full inline-block !leading-none transition-all
|
|
33
32
|
text-{color}-500 decoration-{color}-500 underline-offset-4
|
|
34
|
-
transition duration-100 ease-in-out
|
|
35
33
|
hover:text-opacity-80
|
|
36
34
|
active:text-opacity-70
|
|
37
35
|
focus:ring-offset-0 focus:ring-0
|
package/ui.data-list/index.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<draggable
|
|
13
13
|
v-else
|
|
14
14
|
:list="list"
|
|
15
|
-
item-key="
|
|
15
|
+
:item-key="valueKey"
|
|
16
16
|
:group="{ name: group }"
|
|
17
17
|
handle=".icon-drag"
|
|
18
18
|
:ghost-class="config.draggableGhost"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
@end="onDragEnd"
|
|
24
24
|
>
|
|
25
25
|
<template #item="{ element }">
|
|
26
|
-
<div :id="element
|
|
27
|
-
<div :data-cy="`${dataCy}-item-${element
|
|
26
|
+
<div :id="element[valueKey]" :data-cy="`${dataCy}-item`" v-bind="itemWrapperAttrs">
|
|
27
|
+
<div :data-cy="`${dataCy}-item-${element[valueKey]}`" v-bind="itemAttrs">
|
|
28
28
|
<UIcon internal :name="config.dragIconName" color="gray" v-bind="dragIconAttrs" />
|
|
29
29
|
|
|
30
30
|
<div v-bind="labelAttrs(element.isActive)">
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
:data-cy="`${dataCy}-delete`"
|
|
53
53
|
:tooltip="currentLocale.delete"
|
|
54
54
|
v-bind="deleteIconAttrs"
|
|
55
|
-
@click="onClickDelete(element
|
|
55
|
+
@click="onClickDelete(element[valueKey], element[labelKey])"
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
58
|
<UIcon
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
:data-cy="`${dataCy}-edit`"
|
|
65
65
|
:tooltip="currentLocale.edit"
|
|
66
66
|
v-bind="editIconAttrs"
|
|
67
|
-
@click="onClickEdit(element
|
|
67
|
+
@click="onClickEdit(element[valueKey], element[labelKey])"
|
|
68
68
|
/>
|
|
69
69
|
</template>
|
|
70
70
|
</div>
|
|
@@ -141,6 +141,14 @@ const props = defineProps({
|
|
|
141
141
|
default: UIService.get(defaultConfig, UDataListName).default.labelKey,
|
|
142
142
|
},
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Value key in the item object of options.
|
|
146
|
+
*/
|
|
147
|
+
valueKey: {
|
|
148
|
+
type: String,
|
|
149
|
+
default: UIService.get(defaultConfig, UDataListName).default.valueKey,
|
|
150
|
+
},
|
|
151
|
+
|
|
144
152
|
/**
|
|
145
153
|
* Empty state title.
|
|
146
154
|
*/
|
|
@@ -245,12 +253,12 @@ function onDragEnd() {
|
|
|
245
253
|
emit("dragSort", sortData);
|
|
246
254
|
}
|
|
247
255
|
|
|
248
|
-
function onClickEdit(
|
|
249
|
-
emit("clickEdit",
|
|
256
|
+
function onClickEdit(value, label) {
|
|
257
|
+
emit("clickEdit", value, label);
|
|
250
258
|
}
|
|
251
259
|
|
|
252
|
-
function onClickDelete(
|
|
253
|
-
emit("clickDelete",
|
|
260
|
+
function onClickDelete(value, label) {
|
|
261
|
+
emit("clickDelete", value, label);
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
function prepareSortData(list, parentId) {
|
|
@@ -260,7 +268,7 @@ function prepareSortData(list, parentId) {
|
|
|
260
268
|
let hasItemChildren = item?.children?.length;
|
|
261
269
|
|
|
262
270
|
if (hasItemChildren) {
|
|
263
|
-
let childrenItem = prepareSortData(item.children, item.
|
|
271
|
+
let childrenItem = prepareSortData(item.children, item[props.valueKey]);
|
|
264
272
|
|
|
265
273
|
childrenItem.forEach((item) => {
|
|
266
274
|
sortData.push(item);
|
|
@@ -43,7 +43,7 @@ export default /*tw*/ {
|
|
|
43
43
|
headerLoader: "absolute !top-auto",
|
|
44
44
|
body: "group/body divide-none",
|
|
45
45
|
bodyRow: "hover:bg-gray-50",
|
|
46
|
-
bodyRowChecked: "bg-gray-100 transition
|
|
46
|
+
bodyRowChecked: "bg-gray-100 transition-all",
|
|
47
47
|
bodyRowBefore: "!p-0",
|
|
48
48
|
bodyRowBeforeCell: "py-1",
|
|
49
49
|
bodyRowAfter: "!p-0",
|
|
@@ -132,7 +132,7 @@ const props = defineProps({
|
|
|
132
132
|
*/
|
|
133
133
|
labelKey: {
|
|
134
134
|
type: String,
|
|
135
|
-
default:
|
|
135
|
+
default: UIService.get(defaultConfig, UDropdownBadge).default.labelKey,
|
|
136
136
|
},
|
|
137
137
|
|
|
138
138
|
/**
|
|
@@ -140,7 +140,7 @@ const props = defineProps({
|
|
|
140
140
|
*/
|
|
141
141
|
valueKey: {
|
|
142
142
|
type: String,
|
|
143
|
-
default:
|
|
143
|
+
default: UIService.get(defaultConfig, UDropdownBadge).default.valueKey,
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -167,7 +167,7 @@ const props = defineProps({
|
|
|
167
167
|
*/
|
|
168
168
|
labelKey: {
|
|
169
169
|
type: String,
|
|
170
|
-
default:
|
|
170
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.labelKey,
|
|
171
171
|
},
|
|
172
172
|
|
|
173
173
|
/**
|
|
@@ -175,7 +175,7 @@ const props = defineProps({
|
|
|
175
175
|
*/
|
|
176
176
|
valueKey: {
|
|
177
177
|
type: String,
|
|
178
|
-
default:
|
|
178
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.valueKey,
|
|
179
179
|
},
|
|
180
180
|
|
|
181
181
|
/**
|
|
@@ -68,6 +68,7 @@ import vClickOutside from "../directive.clickOutside";
|
|
|
68
68
|
import { UDropdownLink } from "./constants";
|
|
69
69
|
import defaultConfig from "./configs/default.config";
|
|
70
70
|
import { useAttrs } from "./composables/attrs.composable";
|
|
71
|
+
import { UDropdownButton } from "../ui.dropdown-button/constants/index.js";
|
|
71
72
|
|
|
72
73
|
/* Should be a string for correct web-types gen */
|
|
73
74
|
defineOptions({ name: "UDropdownLink", inheritAttrs: false });
|
|
@@ -152,7 +153,7 @@ const props = defineProps({
|
|
|
152
153
|
*/
|
|
153
154
|
labelKey: {
|
|
154
155
|
type: String,
|
|
155
|
-
default:
|
|
156
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.labelKey,
|
|
156
157
|
},
|
|
157
158
|
|
|
158
159
|
/**
|
|
@@ -160,7 +161,7 @@ const props = defineProps({
|
|
|
160
161
|
*/
|
|
161
162
|
valueKey: {
|
|
162
163
|
type: String,
|
|
163
|
-
default:
|
|
164
|
+
default: UIService.get(defaultConfig, UDropdownButton).default.valueKey,
|
|
164
165
|
},
|
|
165
166
|
|
|
166
167
|
/**
|
|
@@ -5,10 +5,7 @@ export default /*tw*/ {
|
|
|
5
5
|
overflow-auto [-webkit-overflow-scrolling:touch]
|
|
6
6
|
focus:outline-none
|
|
7
7
|
`,
|
|
8
|
-
list:
|
|
9
|
-
inline-block list-none align-top m-0 min-w-full p-0
|
|
10
|
-
hover:transition hover:duration-100 hover:ease-in-out bg-white opacity-1
|
|
11
|
-
`,
|
|
8
|
+
list: "inline-block list-none align-top m-0 min-w-full p-0 bg-white opacity-1 hover:transition-all",
|
|
12
9
|
subGroupLabel: {
|
|
13
10
|
base: "pointer-events-none bg-transparent !font-medium !leading-none !uppercase !text-gray-500/[85] pt-1",
|
|
14
11
|
variants: {
|
|
@@ -66,6 +63,8 @@ export default /*tw*/ {
|
|
|
66
63
|
},
|
|
67
64
|
defaultVariants: {
|
|
68
65
|
size: "md",
|
|
66
|
+
labelKey: "label",
|
|
67
|
+
valueKey: "id",
|
|
69
68
|
optionHeight: 40,
|
|
70
69
|
maxHeight: undefined,
|
|
71
70
|
disabled: false,
|
|
@@ -127,7 +127,7 @@ const props = defineProps({
|
|
|
127
127
|
*/
|
|
128
128
|
labelKey: {
|
|
129
129
|
type: String,
|
|
130
|
-
default:
|
|
130
|
+
default: UIService.get(defaultConfig, UDropdownList).default.valueKey,
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
/**
|
|
@@ -135,7 +135,7 @@ const props = defineProps({
|
|
|
135
135
|
*/
|
|
136
136
|
valueKey: {
|
|
137
137
|
type: String,
|
|
138
|
-
default:
|
|
138
|
+
default: UIService.get(defaultConfig, UDropdownList).default.valueKey,
|
|
139
139
|
},
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -20,9 +20,7 @@ export default /*tw*/ {
|
|
|
20
20
|
icon: "",
|
|
21
21
|
checkbox: {
|
|
22
22
|
base: `
|
|
23
|
-
|
|
24
|
-
border border-solid rounded
|
|
25
|
-
border-gray-300 bg-white
|
|
23
|
+
border border-solid rounded border-gray-300 bg-white hover:transition-all
|
|
26
24
|
hover:border-gray-400
|
|
27
25
|
focus:border-{color}-500 focus:ring-4 focus:ring-opacity-20 focus:ring-offset-0 focus:ring-{color}-500
|
|
28
26
|
active:border-{color}-500 active:bg-{color}-500
|
|
@@ -8,8 +8,7 @@ export default /*tw*/ {
|
|
|
8
8
|
passwordHiddenIconName: "visibility_off-fill",
|
|
9
9
|
block: {
|
|
10
10
|
base: `
|
|
11
|
-
rounded-lg border border-solid border-gray-300 bg-white !opacity-100 relative flex
|
|
12
|
-
transition duration-100 ease-in-out
|
|
11
|
+
rounded-lg border border-solid border-gray-300 bg-white !opacity-100 relative flex transition-all
|
|
13
12
|
hover:border-gray-400 hover:focus-within:border-brand-500
|
|
14
13
|
focus-within:border-brand-500 focus-within:ring-4 focus-within:ring-brand-600/[.15]
|
|
15
14
|
`,
|
|
@@ -32,7 +31,7 @@ export default /*tw*/ {
|
|
|
32
31
|
input: {
|
|
33
32
|
base: `
|
|
34
33
|
block w-full pb-2 px-4 font-normal leading-none text-gray-900 placeholder:font-normal placeholder-gray-400
|
|
35
|
-
transition
|
|
34
|
+
transition-all bg-white border-none border-gray-300 rounded-lg shadow-none
|
|
36
35
|
focus:outline-none focus:ring-0 disabled:opacity-50
|
|
37
36
|
disabled:cursor-not-allowed disabled:text-gray-900 disabled:border-gray-100
|
|
38
37
|
read-only:border-gray-300 read-only:ring-0
|
|
@@ -4,7 +4,7 @@ export default /*tw*/ {
|
|
|
4
4
|
base: `
|
|
5
5
|
pb-2 pt-2 flex flex-row-reverse justify-between w-full min-h-full box-border relative
|
|
6
6
|
rounded-lg border border-gray-300 bg-white
|
|
7
|
-
hover:border-gray-400 hover:transition
|
|
7
|
+
hover:border-gray-400 hover:transition-all hover:focus-within:border-brand-500
|
|
8
8
|
focus-within:border-brand-500 focus-within:ring-4 focus-within:ring-brand-600/[.15] focus-within:outline-none
|
|
9
9
|
`,
|
|
10
10
|
variants: {
|
|
@@ -63,10 +63,7 @@ export default /*tw*/ {
|
|
|
63
63
|
removeItemIconName: "close_small",
|
|
64
64
|
caretRemoveItem: "flex items-center",
|
|
65
65
|
caretClearText: {
|
|
66
|
-
base:
|
|
67
|
-
cursor-pointer flex items-center text-sm font-normal text-gray-400 hover:text-gray-500
|
|
68
|
-
transition-all duration-100 ease-in-out
|
|
69
|
-
`,
|
|
66
|
+
base: "cursor-pointer flex items-center text-sm font-normal text-gray-400 hover:text-gray-500 transition-all",
|
|
70
67
|
compoundVariants: [
|
|
71
68
|
{ size: "sm", class: "text-sm" },
|
|
72
69
|
{ size: "md", class: "text-base" },
|
package/ui.form-select/index.vue
CHANGED
|
@@ -163,13 +163,13 @@
|
|
|
163
163
|
ref="dropdownListRef"
|
|
164
164
|
v-model="dropdownValue"
|
|
165
165
|
:options="filteredOptions"
|
|
166
|
-
:disabled
|
|
167
|
-
:size
|
|
166
|
+
:disabled="disabled"
|
|
167
|
+
:size="size"
|
|
168
168
|
:max-height="optimizedHeight"
|
|
169
169
|
:option-height="optionHeight"
|
|
170
|
-
:value-key
|
|
171
|
-
:label-key
|
|
172
|
-
:add-option
|
|
170
|
+
:value-key="valueKey"
|
|
171
|
+
:label-key="labelKey"
|
|
172
|
+
:add-option="addOption"
|
|
173
173
|
tabindex="-1"
|
|
174
174
|
v-bind="dropdownListAttrs"
|
|
175
175
|
@focus="activate"
|
|
@@ -2,7 +2,7 @@ export default /*tw*/ {
|
|
|
2
2
|
label: "flex items-start",
|
|
3
3
|
wrapper: {
|
|
4
4
|
base: `
|
|
5
|
-
transition-all duration-300
|
|
5
|
+
transition-all duration-300
|
|
6
6
|
flex items-center p-0.5 relative rounded-3xl cursor-pointer
|
|
7
7
|
ring-opacity-10 focus-within:ring-4
|
|
8
8
|
`,
|
|
@@ -28,7 +28,7 @@ export default /*tw*/ {
|
|
|
28
28
|
},
|
|
29
29
|
input: "absolute size-0 opacity-0",
|
|
30
30
|
circle: {
|
|
31
|
-
base: "transition-all duration-300
|
|
31
|
+
base: "transition-all duration-300 rounded-full bg-white flex items-center justify-center",
|
|
32
32
|
variants: {
|
|
33
33
|
size: {
|
|
34
34
|
sm: "size-4",
|
|
@@ -46,7 +46,7 @@ export default /*tw*/ {
|
|
|
46
46
|
selectedIconName: "check",
|
|
47
47
|
unselectedIconName: "close",
|
|
48
48
|
toggleLabel: {
|
|
49
|
-
base: "absolute text-center text-2xs font-medium uppercase text-white transition-all duration-300
|
|
49
|
+
base: "absolute text-center text-2xs font-medium uppercase text-white transition-all duration-300",
|
|
50
50
|
compoundVariants: [
|
|
51
51
|
{ toggleLabel: true, checked: true, class: "w-1/2 left-1" },
|
|
52
52
|
{ toggleLabel: true, checked: false, class: "w-1/2 right-1" },
|
|
@@ -4,7 +4,7 @@ export default /*tw*/ {
|
|
|
4
4
|
rightSlot: "flex items-center justify-center h-full w-11 absolute right-0",
|
|
5
5
|
textareaWrapper: {
|
|
6
6
|
base: `
|
|
7
|
-
transition
|
|
7
|
+
transition-all focus-within:outline-none
|
|
8
8
|
rounded-lg border border-solid border-gray-300 ring-0 cursor-text bg-white pr-4
|
|
9
9
|
hover:border-gray-400 pl-4 hover:focus-within:border-gray-500
|
|
10
10
|
focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-600/[.15]
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.183",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1590,6 +1590,15 @@
|
|
|
1590
1590
|
},
|
|
1591
1591
|
"default": "label"
|
|
1592
1592
|
},
|
|
1593
|
+
{
|
|
1594
|
+
"name": "valueKey",
|
|
1595
|
+
"description": "Value key in the item object of options.",
|
|
1596
|
+
"value": {
|
|
1597
|
+
"kind": "expression",
|
|
1598
|
+
"type": "string"
|
|
1599
|
+
},
|
|
1600
|
+
"default": "id"
|
|
1601
|
+
},
|
|
1593
1602
|
{
|
|
1594
1603
|
"name": "emptyTitle",
|
|
1595
1604
|
"description": "Empty state title.",
|
|
@@ -2300,7 +2309,7 @@
|
|
|
2300
2309
|
"kind": "expression",
|
|
2301
2310
|
"type": "string"
|
|
2302
2311
|
},
|
|
2303
|
-
"default": "
|
|
2312
|
+
"default": "label"
|
|
2304
2313
|
},
|
|
2305
2314
|
{
|
|
2306
2315
|
"name": "valueKey",
|
|
@@ -2309,7 +2318,7 @@
|
|
|
2309
2318
|
"kind": "expression",
|
|
2310
2319
|
"type": "string"
|
|
2311
2320
|
},
|
|
2312
|
-
"default": "
|
|
2321
|
+
"default": "id"
|
|
2313
2322
|
},
|
|
2314
2323
|
{
|
|
2315
2324
|
"name": "listYPosition",
|
|
@@ -2483,7 +2492,7 @@
|
|
|
2483
2492
|
"kind": "expression",
|
|
2484
2493
|
"type": "string"
|
|
2485
2494
|
},
|
|
2486
|
-
"default": "
|
|
2495
|
+
"default": "label"
|
|
2487
2496
|
},
|
|
2488
2497
|
{
|
|
2489
2498
|
"name": "valueKey",
|
|
@@ -2492,7 +2501,7 @@
|
|
|
2492
2501
|
"kind": "expression",
|
|
2493
2502
|
"type": "string"
|
|
2494
2503
|
},
|
|
2495
|
-
"default": "
|
|
2504
|
+
"default": "id"
|
|
2496
2505
|
},
|
|
2497
2506
|
{
|
|
2498
2507
|
"name": "listYPosition",
|
|
@@ -2694,7 +2703,7 @@
|
|
|
2694
2703
|
"kind": "expression",
|
|
2695
2704
|
"type": "string"
|
|
2696
2705
|
},
|
|
2697
|
-
"default": "
|
|
2706
|
+
"default": "label"
|
|
2698
2707
|
},
|
|
2699
2708
|
{
|
|
2700
2709
|
"name": "valueKey",
|
|
@@ -2703,7 +2712,7 @@
|
|
|
2703
2712
|
"kind": "expression",
|
|
2704
2713
|
"type": "string"
|
|
2705
2714
|
},
|
|
2706
|
-
"default": "
|
|
2715
|
+
"default": "id"
|
|
2707
2716
|
},
|
|
2708
2717
|
{
|
|
2709
2718
|
"name": "listYPosition",
|
|
@@ -2787,7 +2796,7 @@
|
|
|
2787
2796
|
"kind": "expression",
|
|
2788
2797
|
"type": "string"
|
|
2789
2798
|
},
|
|
2790
|
-
"default": "
|
|
2799
|
+
"default": "label"
|
|
2791
2800
|
},
|
|
2792
2801
|
{
|
|
2793
2802
|
"name": "valueKey",
|
|
@@ -2796,7 +2805,7 @@
|
|
|
2796
2805
|
"kind": "expression",
|
|
2797
2806
|
"type": "string"
|
|
2798
2807
|
},
|
|
2799
|
-
"default": "
|
|
2808
|
+
"default": "id"
|
|
2800
2809
|
},
|
|
2801
2810
|
{
|
|
2802
2811
|
"name": "groupLabel",
|