@imaginario27/air-ui-ds 1.0.13 → 1.0.15
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/components/forms/fields/SearchField.vue +5 -1
- package/components/forms/fields/SelectField.vue +4 -4
- package/components/forms/fields/SwitchField.vue +5 -4
- package/components/forms/fields/TextareaField.vue +1 -1
- package/components/forms/fields/ToggleButtonsGroupField.vue +4 -4
- package/components/forms/fields/radio/RadioButtonField.vue +3 -3
- package/components/forms/fields/radio/RadioGroupField.vue +0 -2
- package/composables/useTableOfContents.ts +23 -8
- package/package.json +2 -2
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<!-- Icon -->
|
|
41
41
|
<span class="text-icon-neutral-subtler">
|
|
42
42
|
<MdiIcon
|
|
43
|
-
icon
|
|
43
|
+
:icon
|
|
44
44
|
size="20"
|
|
45
45
|
preserveAspectRatio="xMidYMid meet"
|
|
46
46
|
/>
|
|
@@ -100,6 +100,10 @@ const props = defineProps({
|
|
|
100
100
|
default: 'Search',
|
|
101
101
|
},
|
|
102
102
|
helpText: String as PropType<string>,
|
|
103
|
+
icon: {
|
|
104
|
+
type: String as PropType<any>,
|
|
105
|
+
default: 'mdiMagnify',
|
|
106
|
+
},
|
|
103
107
|
size: {
|
|
104
108
|
type: String as PropType<InputSize>,
|
|
105
109
|
default: InputSize.MD,
|
|
@@ -142,6 +142,10 @@ const props = defineProps({
|
|
|
142
142
|
type: Boolean as PropType<boolean>,
|
|
143
143
|
default: false,
|
|
144
144
|
},
|
|
145
|
+
showLoadingState: {
|
|
146
|
+
type: Boolean as PropType<boolean>,
|
|
147
|
+
default: true,
|
|
148
|
+
},
|
|
145
149
|
isLoading: {
|
|
146
150
|
type: Boolean as PropType<boolean>,
|
|
147
151
|
default: true,
|
|
@@ -154,10 +158,6 @@ const props = defineProps({
|
|
|
154
158
|
type: String as PropType<string>,
|
|
155
159
|
default: 'Options are being loaded',
|
|
156
160
|
},
|
|
157
|
-
showLoadingState: {
|
|
158
|
-
type: Boolean as PropType<boolean>,
|
|
159
|
-
default: true,
|
|
160
|
-
},
|
|
161
161
|
})
|
|
162
162
|
|
|
163
163
|
// Emits
|
|
@@ -125,10 +125,7 @@ const props = defineProps({
|
|
|
125
125
|
label: String as PropType<string>,
|
|
126
126
|
legend: String as PropType<string>,
|
|
127
127
|
helpText: String as PropType<string>,
|
|
128
|
-
|
|
129
|
-
type: Boolean as PropType<boolean>,
|
|
130
|
-
default: false,
|
|
131
|
-
},
|
|
128
|
+
|
|
132
129
|
modelValue: {
|
|
133
130
|
type: Boolean as PropType<boolean>,
|
|
134
131
|
default: false,
|
|
@@ -141,6 +138,10 @@ const props = defineProps({
|
|
|
141
138
|
type: String as PropType<string>,
|
|
142
139
|
default: '',
|
|
143
140
|
},
|
|
141
|
+
required: {
|
|
142
|
+
type: Boolean as PropType<boolean>,
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
144
145
|
disabled: {
|
|
145
146
|
type: Boolean as PropType<boolean>,
|
|
146
147
|
default: false,
|
|
@@ -49,15 +49,15 @@ defineProps({
|
|
|
49
49
|
label: String as PropType<string>,
|
|
50
50
|
helpText: String as PropType<string>,
|
|
51
51
|
buttons: Array as PropType<ToggleButton[]>,
|
|
52
|
-
disabled: {
|
|
53
|
-
type: Boolean as PropType<boolean>,
|
|
54
|
-
default: false,
|
|
55
|
-
},
|
|
56
52
|
modelValue: {
|
|
57
53
|
type: String as PropType<string>,
|
|
58
54
|
required: true,
|
|
59
55
|
},
|
|
60
56
|
groupStyle: String as PropType<ToggleButtonGroupStyle>,
|
|
57
|
+
disabled: {
|
|
58
|
+
type: Boolean as PropType<boolean>,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
61
|
})
|
|
62
62
|
|
|
63
63
|
// Emits
|
|
@@ -119,19 +119,19 @@ const props = defineProps({
|
|
|
119
119
|
type: String as PropType<string>,
|
|
120
120
|
required: true,
|
|
121
121
|
},
|
|
122
|
+
label: String as PropType<string>,
|
|
123
|
+
helpText: String as PropType<string>,
|
|
122
124
|
value: { // Value of the radio button
|
|
123
125
|
type: [String, Number, Boolean] as PropType<string | number | boolean>,
|
|
124
126
|
required: true,
|
|
125
127
|
},
|
|
126
|
-
label: String as PropType<string>,
|
|
127
|
-
helpText: String as PropType<string>,
|
|
128
128
|
icon: {
|
|
129
129
|
type: String as PropType<any>,
|
|
130
130
|
default: 'mdiHelp',
|
|
131
131
|
},
|
|
132
132
|
type: {
|
|
133
133
|
type: String as PropType<
|
|
134
|
-
ColorAccent.INFO | ColorAccent.SUCCESS | ColorAccent.DANGER | ColorAccent.PRIMARY_BRAND | ColorAccent.SECONDARY_BRAND
|
|
134
|
+
ColorAccent.INFO | ColorAccent.WARNING| ColorAccent.SUCCESS | ColorAccent.DANGER | ColorAccent.PRIMARY_BRAND | ColorAccent.SECONDARY_BRAND
|
|
135
135
|
>,
|
|
136
136
|
default: ColorAccent.PRIMARY_BRAND,
|
|
137
137
|
validator: (value: ColorAccent) => [
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
</template>
|
|
73
73
|
|
|
74
74
|
<script setup lang="ts">
|
|
75
|
-
|
|
76
75
|
// Props
|
|
77
76
|
const props = defineProps({
|
|
78
77
|
label: String,
|
|
@@ -144,7 +143,6 @@ const runValidation = () => {
|
|
|
144
143
|
emit('update:error', result ?? '')
|
|
145
144
|
}
|
|
146
145
|
|
|
147
|
-
|
|
148
146
|
// Watchers
|
|
149
147
|
// Watch for changes in local selectedOption and emit upward
|
|
150
148
|
watch(
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const useTableOfContents = () => {
|
|
2
|
-
// Tracks the currently active heading
|
|
3
2
|
const activeId = ref<string | null>(null)
|
|
4
3
|
const route = useRoute()
|
|
5
4
|
|
|
@@ -26,21 +25,37 @@ export const useTableOfContents = () => {
|
|
|
26
25
|
const headings = document.querySelectorAll('h2, h3')
|
|
27
26
|
headings.forEach((heading) => observer!.observe(heading))
|
|
28
27
|
|
|
29
|
-
// First heading is active by default when the page loads
|
|
30
28
|
if (headings.length > 0) {
|
|
31
29
|
const firstHeading = headings[0] as HTMLElement
|
|
32
30
|
activeId.value = firstHeading.id ?? null
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
|
|
34
|
+
const scrollToHash = () => {
|
|
35
|
+
if (route.hash) {
|
|
36
|
+
const target = document.getElementById(route.hash.slice(1))
|
|
37
|
+
if (target) {
|
|
38
|
+
target.scrollIntoView({ behavior: 'smooth' })
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const setupObserver = () => {
|
|
44
|
+
nextTick(() => {
|
|
45
|
+
initObserver()
|
|
46
|
+
scrollToHash()
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
setupObserver()
|
|
52
|
+
})
|
|
53
|
+
|
|
36
54
|
watch(
|
|
37
55
|
() => route.path,
|
|
38
56
|
() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
},
|
|
43
|
-
{ immediate: true }
|
|
57
|
+
setupObserver()
|
|
58
|
+
}
|
|
44
59
|
)
|
|
45
60
|
|
|
46
61
|
onBeforeUnmount(() => {
|
|
@@ -48,4 +63,4 @@ export const useTableOfContents = () => {
|
|
|
48
63
|
})
|
|
49
64
|
|
|
50
65
|
return { activeId }
|
|
51
|
-
}
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imaginario27/air-ui-ds",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"author": "imaginario27",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://air-ui.netlify.app/",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"postinstall": "nuxt prepare",
|
|
20
20
|
"test": "vitest",
|
|
21
21
|
"generate-theme": "ts-node scripts/generate-theme.ts",
|
|
22
|
-
"update-theme-colors": "ts-node
|
|
22
|
+
"update-theme-colors": "ts-node scripts/update-ui-theme-colors.ts",
|
|
23
23
|
"typecheck": "vue-tsc --noEmit -p tsconfig.typecheck.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|