vueless 0.0.658 → 0.0.660
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-toggle/UToggle.vue +1 -0
- package/ui.button-toggle/storybook/stories.ts +63 -29
- package/ui.button-toggle/types.ts +5 -0
- package/ui.button-toggle-item/storybook/stories.ts +28 -21
- package/ui.dropdown-button/UDropdownButton.vue +1 -1
- package/ui.dropdown-button/storybook/stories.ts +30 -13
- package/ui.form-input/UInput.vue +4 -2
- package/ui.form-select/USelect.vue +15 -11
- package/ui.form-select/config.ts +6 -6
- package/ui.form-select/storybook/stories.ts +6 -6
- package/ui.form-textarea/UTextarea.vue +4 -2
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
2
|
import {
|
|
3
3
|
getArgTypes,
|
|
4
4
|
getSlotNames,
|
|
@@ -10,6 +10,7 @@ import UToggle from "../../ui.button-toggle/UToggle.vue";
|
|
|
10
10
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
11
11
|
import UToggleItem from "../../ui.button-toggle-item/UToggleItem.vue";
|
|
12
12
|
import URow from "../../ui.container-row/URow.vue";
|
|
13
|
+
import UBadge from "../../ui.text-badge/UBadge.vue";
|
|
13
14
|
|
|
14
15
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
15
16
|
import type { Props } from "../types.ts";
|
|
@@ -24,12 +25,13 @@ export default {
|
|
|
24
25
|
title: "Buttons & Links / Toggle",
|
|
25
26
|
component: UToggle,
|
|
26
27
|
args: {
|
|
28
|
+
label: "Please choose an option",
|
|
27
29
|
modelValue: "11",
|
|
28
30
|
options: [
|
|
29
|
-
{ value: "11", label: "
|
|
30
|
-
{ value: "12", label: "
|
|
31
|
-
{ value: "13", label: "
|
|
32
|
-
{ value: "14", label: "
|
|
31
|
+
{ value: "11", label: "Admin" },
|
|
32
|
+
{ value: "12", label: "Editor" },
|
|
33
|
+
{ value: "13", label: "Viewer" },
|
|
34
|
+
{ value: "14", label: "Guest" },
|
|
33
35
|
],
|
|
34
36
|
},
|
|
35
37
|
argTypes: {
|
|
@@ -44,14 +46,26 @@ export default {
|
|
|
44
46
|
} as Meta;
|
|
45
47
|
|
|
46
48
|
const DefaultTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs) => ({
|
|
47
|
-
components: { UToggle, UIcon, UToggleItem },
|
|
49
|
+
components: { UToggle, UIcon, UToggleItem, UBadge },
|
|
48
50
|
setup() {
|
|
49
51
|
const slots = getSlotNames(UToggle.__name);
|
|
52
|
+
const modelValueRef = ref(args.modelValue);
|
|
53
|
+
const error = computed(() => {
|
|
54
|
+
if (args.name === "error" && Array.isArray(modelValueRef.value)) {
|
|
55
|
+
return modelValueRef.value?.length === 0 ? "Please select at least one option" : "";
|
|
56
|
+
}
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
return "";
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return { args, slots, modelValueRef, error };
|
|
52
62
|
},
|
|
53
63
|
template: `
|
|
54
|
-
<UToggle
|
|
64
|
+
<UToggle
|
|
65
|
+
v-bind="args"
|
|
66
|
+
v-model="modelValueRef"
|
|
67
|
+
:error="error"
|
|
68
|
+
>
|
|
55
69
|
${args.slotTemplate || getSlotsFragment("")}
|
|
56
70
|
</UToggle>
|
|
57
71
|
`,
|
|
@@ -60,11 +74,11 @@ const DefaultTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs) => ({
|
|
|
60
74
|
const EnumVariantTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs, { argTypes }) => ({
|
|
61
75
|
components: { UToggle, URow },
|
|
62
76
|
setup() {
|
|
63
|
-
const
|
|
77
|
+
const values = ref(["2xs", "xs", "sm", "md", "lg", "xl"]);
|
|
64
78
|
|
|
65
79
|
return {
|
|
66
80
|
args,
|
|
67
|
-
|
|
81
|
+
values,
|
|
68
82
|
options: argTypes?.[args.enum]?.options,
|
|
69
83
|
};
|
|
70
84
|
},
|
|
@@ -74,13 +88,14 @@ const EnumVariantTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs, { argTypes
|
|
|
74
88
|
v-for="(option, index) in options"
|
|
75
89
|
:key="index"
|
|
76
90
|
v-bind="args"
|
|
77
|
-
v-model="
|
|
91
|
+
v-model="values[option]"
|
|
78
92
|
:[args.enum]="option"
|
|
79
93
|
:label="option"
|
|
80
94
|
:options="[
|
|
81
95
|
{ value: option + 1, label: option },
|
|
82
96
|
{ value: option + 2, label: option },
|
|
83
97
|
]"
|
|
98
|
+
class="w-auto"
|
|
84
99
|
/>
|
|
85
100
|
</URow>
|
|
86
101
|
`,
|
|
@@ -94,24 +109,35 @@ Default.args = {
|
|
|
94
109
|
export const Disabled = DefaultTemplate.bind({});
|
|
95
110
|
Disabled.args = {
|
|
96
111
|
name: "Disabled",
|
|
97
|
-
|
|
112
|
+
label: "You can disable the whole toggle or specific items",
|
|
113
|
+
options: [
|
|
114
|
+
{ value: "11", label: "Admin" },
|
|
115
|
+
{ value: "12", label: "Editor", disabled: true },
|
|
116
|
+
{ value: "13", label: "Viewer" },
|
|
117
|
+
{ value: "14", label: "Guest", disabled: true },
|
|
118
|
+
],
|
|
98
119
|
};
|
|
99
120
|
|
|
100
|
-
export const
|
|
101
|
-
|
|
102
|
-
name: "Label",
|
|
103
|
-
label: "Label",
|
|
104
|
-
description: "description",
|
|
105
|
-
};
|
|
121
|
+
export const Description = DefaultTemplate.bind({});
|
|
122
|
+
Description.args = { name: "Description", description: "You can also add description" };
|
|
106
123
|
|
|
107
124
|
export const Sizes = EnumVariantTemplate.bind({});
|
|
108
|
-
Sizes.args = {
|
|
109
|
-
name: "sizeTemplate",
|
|
110
|
-
enum: "size",
|
|
111
|
-
};
|
|
125
|
+
Sizes.args = { name: "sizeTemplate", enum: "size" };
|
|
112
126
|
|
|
113
127
|
export const Multiple = DefaultTemplate.bind({});
|
|
114
|
-
Multiple.args = {
|
|
128
|
+
Multiple.args = {
|
|
129
|
+
name: "multiple",
|
|
130
|
+
multiple: true,
|
|
131
|
+
label: "You can choose more than one option",
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const Error = DefaultTemplate.bind({});
|
|
135
|
+
Error.args = {
|
|
136
|
+
name: "error",
|
|
137
|
+
multiple: true,
|
|
138
|
+
modelValue: [],
|
|
139
|
+
label: "If no option is selected, error message is displayed",
|
|
140
|
+
};
|
|
115
141
|
|
|
116
142
|
export const Block = DefaultTemplate.bind({});
|
|
117
143
|
Block.args = { name: "block", block: true };
|
|
@@ -126,6 +152,7 @@ export const Square = DefaultTemplate.bind({});
|
|
|
126
152
|
Square.args = {
|
|
127
153
|
name: "square",
|
|
128
154
|
square: true,
|
|
155
|
+
label: "Square prop is useful when icons are present",
|
|
129
156
|
slotTemplate: `
|
|
130
157
|
<template #default>
|
|
131
158
|
<UToggleItem value="1">
|
|
@@ -143,14 +170,21 @@ Square.args = {
|
|
|
143
170
|
`,
|
|
144
171
|
};
|
|
145
172
|
|
|
146
|
-
export const
|
|
147
|
-
|
|
148
|
-
name: "
|
|
173
|
+
export const DefaultSlot = DefaultTemplate.bind({});
|
|
174
|
+
DefaultSlot.args = {
|
|
175
|
+
name: "defaultSlot",
|
|
176
|
+
label: "Please select an operation to proceed",
|
|
149
177
|
slotTemplate: `
|
|
150
178
|
<template #default>
|
|
151
|
-
<UToggleItem
|
|
152
|
-
|
|
153
|
-
|
|
179
|
+
<UToggleItem value="1">
|
|
180
|
+
<UBadge label="Download" color="green" right-icon="download" />
|
|
181
|
+
</UToggleItem>
|
|
182
|
+
<UToggleItem value="2">
|
|
183
|
+
<UBadge label="Edit" color="amber" right-icon="edit" />
|
|
184
|
+
</UToggleItem>
|
|
185
|
+
<UToggleItem value="3">
|
|
186
|
+
<UBadge label="Delete" color="red" right-icon="delete" />
|
|
187
|
+
</UToggleItem>
|
|
154
188
|
</template>
|
|
155
189
|
`,
|
|
156
190
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import UToggleItem from "../../ui.button-toggle-item/UToggleItem.vue";
|
|
9
9
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
10
|
+
import URow from "../../ui.container-row/URow.vue";
|
|
10
11
|
|
|
11
12
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
12
13
|
import type { Props } from "../types.ts";
|
|
@@ -58,26 +59,32 @@ Default.args = {};
|
|
|
58
59
|
export const Disabled = DefaultTemplate.bind({});
|
|
59
60
|
Disabled.args = { disabled: true };
|
|
60
61
|
|
|
61
|
-
export const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
export const Slots: StoryFn<UToggleItemArgs> = (args) => ({
|
|
63
|
+
components: { UToggleItem, UIcon, URow },
|
|
64
|
+
setup() {
|
|
65
|
+
return { args };
|
|
66
|
+
},
|
|
67
|
+
template: `
|
|
68
|
+
<URow>
|
|
69
|
+
<UToggleItem label="Download">
|
|
70
|
+
<template #left>
|
|
71
|
+
<UIcon
|
|
72
|
+
name="download"
|
|
73
|
+
color="green"
|
|
74
|
+
size="sm"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
|
+
</UToggleItem>
|
|
72
78
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</
|
|
79
|
+
<UToggleItem label="Edit">
|
|
80
|
+
<template #right>
|
|
81
|
+
<UIcon
|
|
82
|
+
name="edit"
|
|
83
|
+
color="orange"
|
|
84
|
+
size="sm"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
</UToggleItem>
|
|
88
|
+
</URow>
|
|
82
89
|
`,
|
|
83
|
-
};
|
|
90
|
+
});
|
|
@@ -110,7 +110,7 @@ const { config, dropdownButtonAttrs, dropdownListAttrs, dropdownIconAttrs, wrapp
|
|
|
110
110
|
@slot Use it to add something after the label.
|
|
111
111
|
@binding {boolean} opened
|
|
112
112
|
-->
|
|
113
|
-
<slot name="
|
|
113
|
+
<slot name="toggle" :opened="isShownOptions">
|
|
114
114
|
<UIcon
|
|
115
115
|
v-if="!noIcon"
|
|
116
116
|
internal
|
|
@@ -9,6 +9,7 @@ import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
|
|
|
9
9
|
import URow from "../../ui.container-row/URow.vue";
|
|
10
10
|
import UCol from "../../ui.container-col/UCol.vue";
|
|
11
11
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
12
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
12
13
|
|
|
13
14
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
14
15
|
import type { Props } from "../types.ts";
|
|
@@ -18,7 +19,7 @@ interface DefaultUDropdownButtonArgs extends Props {
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface EnumUDropdownButtonArgs extends DefaultUDropdownButtonArgs {
|
|
21
|
-
enum: keyof Pick<Props, "size" | "variant">;
|
|
22
|
+
enum: keyof Pick<Props, "size" | "variant" | "xPosition" | "yPosition">;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export default {
|
|
@@ -36,7 +37,7 @@ export default {
|
|
|
36
37
|
docs: {
|
|
37
38
|
...getDocsDescription(UDropdownButton.__name),
|
|
38
39
|
story: {
|
|
39
|
-
height: "
|
|
40
|
+
height: "250px",
|
|
40
41
|
},
|
|
41
42
|
},
|
|
42
43
|
},
|
|
@@ -45,7 +46,7 @@ export default {
|
|
|
45
46
|
const DefaultTemplate: StoryFn<DefaultUDropdownButtonArgs> = (
|
|
46
47
|
args: DefaultUDropdownButtonArgs,
|
|
47
48
|
) => ({
|
|
48
|
-
components: { UDropdownButton, UIcon },
|
|
49
|
+
components: { UDropdownButton, UIcon, ULink },
|
|
49
50
|
setup() {
|
|
50
51
|
const slots = getSlotNames(UDropdownButton.__name);
|
|
51
52
|
|
|
@@ -122,19 +123,35 @@ Variants.args = { enum: "variant" };
|
|
|
122
123
|
export const Sizes = EnumVariantTemplate.bind({});
|
|
123
124
|
Sizes.args = { enum: "size" };
|
|
124
125
|
|
|
126
|
+
export const DropdownListXPosition = EnumVariantTemplate.bind({});
|
|
127
|
+
DropdownListXPosition.args = { enum: "xPosition" };
|
|
128
|
+
|
|
129
|
+
export const DropdownListYPosition = EnumVariantTemplate.bind({});
|
|
130
|
+
DropdownListYPosition.args = { enum: "yPosition" };
|
|
131
|
+
|
|
125
132
|
export const VariantColors = VariantColorsTemplate.bind({});
|
|
126
133
|
VariantColors.args = {};
|
|
127
134
|
|
|
128
135
|
export const WithoutDropdownIcon = EnumVariantTemplate.bind({});
|
|
129
136
|
WithoutDropdownIcon.args = { enum: "variant", noIcon: true };
|
|
130
137
|
|
|
138
|
+
export const CustomDropdownIcon = DefaultTemplate.bind({});
|
|
139
|
+
CustomDropdownIcon.args = {
|
|
140
|
+
config: {
|
|
141
|
+
defaults: {
|
|
142
|
+
dropdownIcon: "expand_circle_down",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
131
147
|
export const DefaultSlot = DefaultTemplate.bind({});
|
|
132
148
|
DefaultSlot.args = {
|
|
133
149
|
slotTemplate: `
|
|
134
150
|
<template #default>
|
|
135
|
-
|
|
151
|
+
<UIcon name="unfold_more" color="white" />
|
|
136
152
|
</template>
|
|
137
153
|
`,
|
|
154
|
+
noIcon: true,
|
|
138
155
|
};
|
|
139
156
|
|
|
140
157
|
export const LeftSlot = DefaultTemplate.bind({});
|
|
@@ -142,22 +159,22 @@ LeftSlot.args = {
|
|
|
142
159
|
slotTemplate: `
|
|
143
160
|
<template #left>
|
|
144
161
|
<UIcon
|
|
145
|
-
name="
|
|
146
|
-
color="red"
|
|
162
|
+
name="heart_plus"
|
|
147
163
|
size="sm"
|
|
164
|
+
color="green"
|
|
148
165
|
/>
|
|
149
166
|
</template>
|
|
150
167
|
`,
|
|
151
168
|
};
|
|
152
169
|
|
|
153
|
-
export const
|
|
154
|
-
|
|
170
|
+
export const SlotToggle = DefaultTemplate.bind({});
|
|
171
|
+
SlotToggle.args = {
|
|
155
172
|
slotTemplate: `
|
|
156
|
-
<template #
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
color="
|
|
160
|
-
|
|
173
|
+
<template #toggle="{ opened }">
|
|
174
|
+
<ULink
|
|
175
|
+
:label="opened ? 'collapse' : 'expand'"
|
|
176
|
+
color="green"
|
|
177
|
+
:ring=false
|
|
161
178
|
/>
|
|
162
179
|
</template>
|
|
163
180
|
`,
|
package/ui.form-input/UInput.vue
CHANGED
|
@@ -198,8 +198,10 @@ function transformValue(value: string | number, exp: string | RegExp) {
|
|
|
198
198
|
return matches ? matches.join("") : "";
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
useMutationObserver(leftSlotWrapperRef, (mutations) => {
|
|
202
|
-
|
|
201
|
+
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
|
|
202
|
+
childList: true,
|
|
203
|
+
characterData: true,
|
|
204
|
+
subtree: true,
|
|
203
205
|
});
|
|
204
206
|
|
|
205
207
|
function setLabelPosition() {
|
|
@@ -423,9 +423,9 @@ const {
|
|
|
423
423
|
rightSlotAttrs,
|
|
424
424
|
leftIconAttrs,
|
|
425
425
|
rightIconAttrs,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
426
|
+
beforeToggleAttrs,
|
|
427
|
+
afterToggleAttrs,
|
|
428
|
+
toggleWrapperAttrs,
|
|
429
429
|
clearAttrs,
|
|
430
430
|
clearMultipleTextAttrs,
|
|
431
431
|
clearMultipleAttrs,
|
|
@@ -487,17 +487,21 @@ const {
|
|
|
487
487
|
</slot>
|
|
488
488
|
</div>
|
|
489
489
|
|
|
490
|
-
<div
|
|
490
|
+
<div
|
|
491
|
+
v-if="hasSlotContent($slots['after-toggle']) && !(multiple && localValue?.length)"
|
|
492
|
+
v-bind="afterToggleAttrs"
|
|
493
|
+
:tabindex="-1"
|
|
494
|
+
>
|
|
491
495
|
<!--
|
|
492
|
-
@slot Use it to add something after
|
|
496
|
+
@slot Use it to add something after toggle.
|
|
493
497
|
@binding {object} option
|
|
494
498
|
-->
|
|
495
|
-
<slot :option="localValue" name="after-
|
|
499
|
+
<slot :option="localValue" name="after-toggle" />
|
|
496
500
|
</div>
|
|
497
501
|
|
|
498
502
|
<div
|
|
499
503
|
v-show="!multiple || (!isLocalValue && multiple)"
|
|
500
|
-
v-bind="
|
|
504
|
+
v-bind="toggleWrapperAttrs"
|
|
501
505
|
:tabindex="-1"
|
|
502
506
|
@mousedown.prevent.stop="toggle"
|
|
503
507
|
>
|
|
@@ -539,14 +543,14 @@ const {
|
|
|
539
543
|
</div>
|
|
540
544
|
|
|
541
545
|
<div
|
|
542
|
-
v-if="hasSlotContent($slots['before-
|
|
543
|
-
v-bind="
|
|
546
|
+
v-if="hasSlotContent($slots['before-toggle']) && !(multiple && localValue?.length)"
|
|
547
|
+
v-bind="beforeToggleAttrs"
|
|
544
548
|
>
|
|
545
549
|
<!--
|
|
546
|
-
@slot Use it to add something before
|
|
550
|
+
@slot Use it to add something before toggle.
|
|
547
551
|
@binding {object} option
|
|
548
552
|
-->
|
|
549
|
-
<slot :option="localValue" name="before-
|
|
553
|
+
<slot :option="localValue" name="before-toggle" />
|
|
550
554
|
</div>
|
|
551
555
|
|
|
552
556
|
<div ref="innerWrapperRef" v-bind="innerWrapperAttrs">
|
package/ui.form-select/config.ts
CHANGED
|
@@ -78,10 +78,10 @@ export default /*tw*/ {
|
|
|
78
78
|
leftIcon: "{UIcon} {>selectIcon}",
|
|
79
79
|
rightIcon: "{UIcon} {>selectIcon}",
|
|
80
80
|
leftSlot: "pr-1.5",
|
|
81
|
-
rightSlot: "{>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
rightSlot: "{>toggle} pr-3",
|
|
82
|
+
beforeToggle: "{>toggle}",
|
|
83
|
+
afterToggle: "{>toggle} mr-3 items-start pt-3",
|
|
84
|
+
toggle: {
|
|
85
85
|
base: "flex items-center",
|
|
86
86
|
compoundVariants: [
|
|
87
87
|
{ labelAlign: "topInside", size: "sm", label: true, class: "-mt-5" },
|
|
@@ -89,9 +89,9 @@ export default /*tw*/ {
|
|
|
89
89
|
{ labelAlign: "topInside", size: "lg", label: true, class: "-mt-7" },
|
|
90
90
|
],
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
toggleWrapper: "{>toggle} mr-3",
|
|
93
93
|
toggleIcon: "{UIcon} {>selectIcon} transition duration-300 group-[]/active:rotate-180",
|
|
94
|
-
clear: "{>
|
|
94
|
+
clear: "{>toggle}",
|
|
95
95
|
clearIcon: "{UIcon} {>selectIcon}",
|
|
96
96
|
clearMultiple: "flex items-center",
|
|
97
97
|
clearMultipleIcon: "{UIcon} {>selectIcon}",
|
|
@@ -250,19 +250,19 @@ SlotOption.args = {
|
|
|
250
250
|
`,
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
export const
|
|
254
|
-
|
|
253
|
+
export const SlotAfterToggle = DefaultTemplate.bind({});
|
|
254
|
+
SlotAfterToggle.args = {
|
|
255
255
|
slotTemplate: `
|
|
256
|
-
<template #after-
|
|
256
|
+
<template #after-toggle>
|
|
257
257
|
🤘
|
|
258
258
|
</template>
|
|
259
259
|
`,
|
|
260
260
|
};
|
|
261
261
|
|
|
262
|
-
export const
|
|
263
|
-
|
|
262
|
+
export const SlotBeforeToggle = DefaultTemplate.bind({});
|
|
263
|
+
SlotBeforeToggle.args = {
|
|
264
264
|
slotTemplate: `
|
|
265
|
-
<template #before-
|
|
265
|
+
<template #before-toggle>
|
|
266
266
|
🤘
|
|
267
267
|
</template>
|
|
268
268
|
`,
|
|
@@ -154,8 +154,10 @@ function toggleReadonly(hasReadonly: boolean) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
useMutationObserver(leftSlotWrapperRef, (mutations) => {
|
|
158
|
-
|
|
157
|
+
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
|
|
158
|
+
childList: true,
|
|
159
|
+
characterData: true,
|
|
160
|
+
subtree: true,
|
|
159
161
|
});
|
|
160
162
|
|
|
161
163
|
function setLabelPosition() {
|