@getcortexlabs/mavis-core 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
Files changed (242) hide show
  1. package/README.md +2 -2
  2. package/dist/accordion.d.ts +17 -0
  3. package/dist/accordion.d.ts.map +1 -0
  4. package/dist/accordion.js +42 -0
  5. package/dist/accordion.js.map +1 -0
  6. package/dist/alert.d.ts +21 -0
  7. package/dist/alert.d.ts.map +1 -0
  8. package/dist/alert.js +13 -0
  9. package/dist/alert.js.map +1 -0
  10. package/dist/avatar.d.ts +10 -0
  11. package/dist/avatar.d.ts.map +1 -0
  12. package/dist/avatar.js +11 -0
  13. package/dist/avatar.js.map +1 -0
  14. package/dist/badge.d.ts +7 -0
  15. package/dist/badge.d.ts.map +1 -0
  16. package/dist/badge.js +11 -0
  17. package/dist/badge.js.map +1 -0
  18. package/dist/capabilities.d.ts +119 -0
  19. package/dist/capabilities.d.ts.map +1 -0
  20. package/dist/capabilities.js +142 -0
  21. package/dist/capabilities.js.map +1 -0
  22. package/dist/chip.d.ts +9 -0
  23. package/dist/chip.d.ts.map +1 -0
  24. package/dist/chip.js +16 -0
  25. package/dist/chip.js.map +1 -0
  26. package/dist/choice.d.ts +15 -0
  27. package/dist/choice.d.ts.map +1 -0
  28. package/dist/choice.js +27 -0
  29. package/dist/choice.js.map +1 -0
  30. package/dist/combobox.d.ts +42 -0
  31. package/dist/combobox.d.ts.map +1 -0
  32. package/dist/combobox.js +159 -0
  33. package/dist/combobox.js.map +1 -0
  34. package/dist/contracts.d.ts +1201 -0
  35. package/dist/contracts.d.ts.map +1 -0
  36. package/dist/contracts.js +242 -0
  37. package/dist/contracts.js.map +1 -0
  38. package/dist/date.d.ts +96 -0
  39. package/dist/date.d.ts.map +1 -0
  40. package/dist/date.js +235 -0
  41. package/dist/date.js.map +1 -0
  42. package/dist/dialog.d.ts +4 -0
  43. package/dist/dialog.d.ts.map +1 -0
  44. package/dist/dialog.js +20 -0
  45. package/dist/dialog.js.map +1 -0
  46. package/dist/empty-state.d.ts +2 -0
  47. package/dist/empty-state.d.ts.map +1 -0
  48. package/dist/empty-state.js +5 -0
  49. package/dist/empty-state.js.map +1 -0
  50. package/dist/experimental-regions.d.ts +142 -0
  51. package/dist/experimental-regions.d.ts.map +1 -0
  52. package/dist/experimental-regions.js +315 -0
  53. package/dist/experimental-regions.js.map +1 -0
  54. package/dist/experimental.d.ts +134 -0
  55. package/dist/experimental.d.ts.map +1 -0
  56. package/dist/experimental.js +502 -0
  57. package/dist/experimental.js.map +1 -0
  58. package/dist/files.d.ts +87 -0
  59. package/dist/files.d.ts.map +1 -0
  60. package/dist/files.js +328 -0
  61. package/dist/files.js.map +1 -0
  62. package/dist/form.d.ts +39 -0
  63. package/dist/form.d.ts.map +1 -0
  64. package/dist/form.js +170 -0
  65. package/dist/form.js.map +1 -0
  66. package/dist/index.d.ts +38 -4
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +23 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/input.d.ts +10 -0
  71. package/dist/input.d.ts.map +1 -1
  72. package/dist/input.js +12 -0
  73. package/dist/input.js.map +1 -1
  74. package/dist/list-item.d.ts +3 -0
  75. package/dist/list-item.d.ts.map +1 -0
  76. package/dist/list-item.js +7 -0
  77. package/dist/list-item.js.map +1 -0
  78. package/dist/motion.d.ts +33 -0
  79. package/dist/motion.d.ts.map +1 -0
  80. package/dist/motion.js +21 -0
  81. package/dist/motion.js.map +1 -0
  82. package/dist/navigation.d.ts +22 -0
  83. package/dist/navigation.d.ts.map +1 -0
  84. package/dist/navigation.js +54 -0
  85. package/dist/navigation.js.map +1 -0
  86. package/dist/progress.d.ts +19 -0
  87. package/dist/progress.d.ts.map +1 -0
  88. package/dist/progress.js +19 -0
  89. package/dist/progress.js.map +1 -0
  90. package/dist/segmented.d.ts +11 -0
  91. package/dist/segmented.d.ts.map +1 -0
  92. package/dist/segmented.js +30 -0
  93. package/dist/segmented.js.map +1 -0
  94. package/dist/sheet.d.ts +8 -1
  95. package/dist/sheet.d.ts.map +1 -1
  96. package/dist/sheet.js +4 -3
  97. package/dist/sheet.js.map +1 -1
  98. package/dist/tabs.d.ts +11 -0
  99. package/dist/tabs.d.ts.map +1 -0
  100. package/dist/tabs.js +28 -0
  101. package/dist/tabs.js.map +1 -0
  102. package/dist/theme/themes.d.ts.map +1 -1
  103. package/dist/theme/themes.js +84 -11
  104. package/dist/theme/themes.js.map +1 -1
  105. package/dist/theme/types.d.ts +52 -1
  106. package/dist/theme/types.d.ts.map +1 -1
  107. package/dist/theme/typography.d.ts +10 -0
  108. package/dist/theme/typography.d.ts.map +1 -0
  109. package/dist/theme/typography.js +90 -0
  110. package/dist/theme/typography.js.map +1 -0
  111. package/dist/toast.d.ts +43 -0
  112. package/dist/toast.d.ts.map +1 -0
  113. package/dist/toast.js +228 -0
  114. package/dist/toast.js.map +1 -0
  115. package/dist/vue/button-content.d.ts +10 -0
  116. package/dist/vue/button-content.d.ts.map +1 -0
  117. package/dist/vue/button-content.js +54 -0
  118. package/dist/vue/button-content.js.map +1 -0
  119. package/dist/vue/cached-activity.d.ts +3 -0
  120. package/dist/vue/cached-activity.d.ts.map +1 -0
  121. package/dist/vue/cached-activity.js +13 -0
  122. package/dist/vue/cached-activity.js.map +1 -0
  123. package/dist/vue/combobox.d.ts +155 -0
  124. package/dist/vue/combobox.d.ts.map +1 -0
  125. package/dist/vue/combobox.js +195 -0
  126. package/dist/vue/combobox.js.map +1 -0
  127. package/dist/vue/component-props.d.ts +1989 -0
  128. package/dist/vue/component-props.d.ts.map +1 -0
  129. package/dist/vue/component-props.js +18 -0
  130. package/dist/vue/component-props.js.map +1 -0
  131. package/dist/vue/contracts.d.ts +18 -0
  132. package/dist/vue/contracts.d.ts.map +1 -0
  133. package/dist/vue/contracts.js +18 -0
  134. package/dist/vue/contracts.js.map +1 -0
  135. package/dist/vue/date-calendar.d.ts +64 -0
  136. package/dist/vue/date-calendar.d.ts.map +1 -0
  137. package/dist/vue/date-calendar.js +65 -0
  138. package/dist/vue/date-calendar.js.map +1 -0
  139. package/dist/vue/date-picker.d.ts +927 -0
  140. package/dist/vue/date-picker.d.ts.map +1 -0
  141. package/dist/vue/date-picker.js +319 -0
  142. package/dist/vue/date-picker.js.map +1 -0
  143. package/dist/vue/date-props.d.ts +254 -0
  144. package/dist/vue/date-props.d.ts.map +1 -0
  145. package/dist/vue/date-props.js +74 -0
  146. package/dist/vue/date-props.js.map +1 -0
  147. package/dist/vue/dialog.d.ts +21 -0
  148. package/dist/vue/dialog.d.ts.map +1 -0
  149. package/dist/vue/dialog.js +58 -0
  150. package/dist/vue/dialog.js.map +1 -0
  151. package/dist/vue/files.d.ts +53 -0
  152. package/dist/vue/files.d.ts.map +1 -0
  153. package/dist/vue/files.js +40 -0
  154. package/dist/vue/files.js.map +1 -0
  155. package/dist/vue/forms.d.ts +4 -0
  156. package/dist/vue/forms.d.ts.map +1 -0
  157. package/dist/vue/forms.js +15 -0
  158. package/dist/vue/forms.js.map +1 -0
  159. package/dist/vue/global-components.d.ts +129 -3
  160. package/dist/vue/global-components.d.ts.map +1 -1
  161. package/dist/vue/index.d.ts +28 -2
  162. package/dist/vue/index.d.ts.map +1 -1
  163. package/dist/vue/index.js +24 -1
  164. package/dist/vue/index.js.map +1 -1
  165. package/dist/vue/inline-content.d.ts +54 -0
  166. package/dist/vue/inline-content.d.ts.map +1 -0
  167. package/dist/vue/inline-content.js +64 -0
  168. package/dist/vue/inline-content.js.map +1 -0
  169. package/dist/vue/props.d.ts +2654 -637
  170. package/dist/vue/props.d.ts.map +1 -1
  171. package/dist/vue/props.js +228 -86
  172. package/dist/vue/props.js.map +1 -1
  173. package/dist/vue/theme-provider.d.ts +58 -0
  174. package/dist/vue/theme-provider.d.ts.map +1 -0
  175. package/dist/vue/theme-provider.js +69 -0
  176. package/dist/vue/theme-provider.js.map +1 -0
  177. package/dist/vue/theme.d.ts +962 -12
  178. package/dist/vue/theme.d.ts.map +1 -1
  179. package/dist/vue/theme.js +17 -7
  180. package/dist/vue/theme.js.map +1 -1
  181. package/dist/vue/toast.d.ts +29 -0
  182. package/dist/vue/toast.d.ts.map +1 -0
  183. package/dist/vue/toast.js +79 -0
  184. package/dist/vue/toast.js.map +1 -0
  185. package/dist/vue/workflow-props.d.ts +110 -0
  186. package/dist/vue/workflow-props.d.ts.map +1 -0
  187. package/dist/vue/workflow-props.js +37 -0
  188. package/dist/vue/workflow-props.js.map +1 -0
  189. package/dist/vue/workflows.d.ts +267 -0
  190. package/dist/vue/workflows.d.ts.map +1 -0
  191. package/dist/vue/workflows.js +200 -0
  192. package/dist/vue/workflows.js.map +1 -0
  193. package/package.json +5 -1
  194. package/src/accordion.ts +66 -0
  195. package/src/alert.ts +16 -0
  196. package/src/avatar.ts +11 -0
  197. package/src/badge.ts +11 -0
  198. package/src/capabilities.ts +145 -0
  199. package/src/chip.ts +20 -0
  200. package/src/choice.ts +41 -0
  201. package/src/combobox.ts +198 -0
  202. package/src/contracts.ts +295 -0
  203. package/src/date.ts +280 -0
  204. package/src/dialog.ts +20 -0
  205. package/src/empty-state.ts +4 -0
  206. package/src/experimental-regions.ts +463 -0
  207. package/src/experimental.ts +643 -0
  208. package/src/files.ts +408 -0
  209. package/src/form.ts +190 -0
  210. package/src/index.ts +64 -3
  211. package/src/input.ts +22 -0
  212. package/src/list-item.ts +5 -0
  213. package/src/motion.ts +22 -0
  214. package/src/navigation.ts +61 -0
  215. package/src/progress.ts +22 -0
  216. package/src/segmented.ts +39 -0
  217. package/src/sheet.ts +6 -3
  218. package/src/tabs.ts +35 -0
  219. package/src/theme/themes.ts +88 -11
  220. package/src/theme/types.ts +42 -1
  221. package/src/theme/typography.ts +84 -0
  222. package/src/toast.ts +249 -0
  223. package/src/vue/button-content.ts +60 -0
  224. package/src/vue/cached-activity.ts +13 -0
  225. package/src/vue/combobox.ts +238 -0
  226. package/src/vue/component-props.ts +24 -0
  227. package/src/vue/contracts.ts +33 -0
  228. package/src/vue/date-calendar.ts +76 -0
  229. package/src/vue/date-picker.ts +387 -0
  230. package/src/vue/date-props.ts +81 -0
  231. package/src/vue/dialog.ts +63 -0
  232. package/src/vue/files.ts +53 -0
  233. package/src/vue/forms.ts +20 -0
  234. package/src/vue/global-components.ts +120 -3
  235. package/src/vue/index.ts +46 -2
  236. package/src/vue/inline-content.ts +71 -0
  237. package/src/vue/props.ts +258 -95
  238. package/src/vue/theme-provider.ts +74 -0
  239. package/src/vue/theme.ts +17 -6
  240. package/src/vue/toast.ts +99 -0
  241. package/src/vue/workflow-props.ts +41 -0
  242. package/src/vue/workflows.ts +257 -0
@@ -0,0 +1,41 @@
1
+ import type { PropType } from '@vue/runtime-core'
2
+ import type { FormController } from '../form.js'
3
+ import type { StepOption } from '../navigation.js'
4
+ import type { ChoiceValue } from '../choice.js'
5
+
6
+ export const formGroupProps = {
7
+ label: { type: String, required: true as const },
8
+ description: { type: String, default: '' },
9
+ id: { type: String, default: undefined },
10
+ }
11
+ export const formErrorsProps = {
12
+ form: { type: Object as PropType<FormController>, required: true as const },
13
+ title: { type: String, default: 'Review these fields' },
14
+ announce: Boolean,
15
+ }
16
+ export const stepsProps = {
17
+ steps: { type: Array as PropType<readonly StepOption[]>, required: true as const },
18
+ modelValue: { type: [String, Number] as PropType<ChoiceValue | null>, default: null },
19
+ label: { type: String, required: true as const },
20
+ disabled: Boolean,
21
+ loading: Boolean,
22
+ currentLabel: { type: String, default: 'Current' },
23
+ completeLabel: { type: String, default: 'Complete' },
24
+ errorLabel: { type: String, default: 'Needs attention' },
25
+ }
26
+ export const paginationProps = {
27
+ modelValue: { type: Number, default: 1 },
28
+ total: { type: Number, required: true as const },
29
+ pageSize: { type: Number, default: 20 },
30
+ siblingCount: { type: Number, default: 1 },
31
+ label: { type: String, default: 'Result pages' },
32
+ previousLabel: { type: String, default: 'Previous' },
33
+ nextLabel: { type: String, default: 'Next' },
34
+ pageLabel: { type: String, default: 'Page' },
35
+ currentLabel: { type: String, default: 'Current' },
36
+ statusText: { type: String, default: '' },
37
+ emptyLabel: { type: String, default: 'No results' },
38
+ invalidPageLabel: { type: String, default: 'This page is no longer available.' },
39
+ loading: Boolean,
40
+ disabled: Boolean,
41
+ }
@@ -0,0 +1,257 @@
1
+ import {
2
+ defineComponent,
3
+ h,
4
+ mergeProps,
5
+ shallowRef,
6
+ watch,
7
+ onScopeDispose,
8
+ onBeforeUpdate,
9
+ onUpdated,
10
+ nextTick,
11
+ useId,
12
+ type Component,
13
+ } from '@vue/runtime-core'
14
+ import { choiceKey, type ChoiceValue } from '../choice.js'
15
+ import { pagination, validateSteps } from '../navigation.js'
16
+ import { formErrorsProps, formGroupProps, stepsProps, paginationProps } from './workflow-props.js'
17
+ import { useMavisTheme } from './theme.js'
18
+
19
+ interface Primitives {
20
+ Column: Component
21
+ Row: Component
22
+ Text: Component
23
+ Button: Component
24
+ preserveFocus?: (root: unknown, currentId: string) => () => void
25
+ }
26
+
27
+ /** Composed controls share behavior; each supplied primitive owns its platform rendering. */
28
+ export function createWorkflows(ui: Primitives, platform: 'web' | 'native') {
29
+ const MFormGroup = defineComponent({
30
+ name: 'MFormGroup',
31
+ inheritAttrs: false,
32
+ props: formGroupProps,
33
+ setup(props, { attrs, slots }) {
34
+ const generatedId = `m-form-group-${useId()}`
35
+ return () => {
36
+ if (!props.label.trim()) throw new TypeError('Form groups require a visible label.')
37
+ const id = props.id ?? generatedId
38
+ return h(
39
+ ui.Column,
40
+ mergeProps(
41
+ { gap: 'md', id },
42
+ attrs,
43
+ platform === 'web'
44
+ ? {
45
+ role: 'group',
46
+ 'aria-labelledby': `${id}-label`,
47
+ 'aria-describedby': props.description ? `${id}-description` : undefined,
48
+ }
49
+ : {},
50
+ ),
51
+ () => [
52
+ h(ui.Text, { id: `${id}-label`, as: 'h2', variant: 'heading', text: props.label }),
53
+ props.description
54
+ ? h(ui.Text, { id: `${id}-description`, tone: 'muted', text: props.description })
55
+ : null,
56
+ slots.default?.(),
57
+ ],
58
+ )
59
+ }
60
+ },
61
+ })
62
+ const MFormErrors = defineComponent({
63
+ name: 'MFormErrors',
64
+ inheritAttrs: false,
65
+ props: formErrorsProps,
66
+ emits: { focus: (_field: string, _focused: boolean) => true },
67
+ setup(props, { attrs, emit }) {
68
+ const { theme } = useMavisTheme()
69
+ const id = `m-form-errors-${useId()}`
70
+ const revision = shallowRef(0)
71
+ let release: (() => void) | undefined
72
+ watch(
73
+ () => props.form,
74
+ (form) => {
75
+ release?.()
76
+ release = form.subscribe(() => {
77
+ revision.value++
78
+ })
79
+ revision.value++
80
+ },
81
+ { immediate: true },
82
+ )
83
+ onScopeDispose(() => release?.())
84
+ return () => {
85
+ void revision.value
86
+ const { errors } = props.form.state
87
+ if (!errors.length) return null
88
+ return h(
89
+ ui.Column,
90
+ mergeProps(
91
+ { gap: 'sm', padding: 'md', radius: 'md', backgroundColor: theme.value.colors.surface },
92
+ attrs,
93
+ platform === 'web'
94
+ ? { role: props.announce ? 'alert' : 'region', 'aria-labelledby': id }
95
+ : {},
96
+ ),
97
+ () => [
98
+ h(ui.Text, { id, as: 'h2', variant: 'heading', tone: 'danger', text: props.title }),
99
+ ...errors.map((error, index) =>
100
+ h(ui.Button, {
101
+ key: `${error.field}:${index}`,
102
+ variant: 'ghost',
103
+ disabled: !props.form.has(error.field),
104
+ text: props.form.label(error.field)
105
+ ? `${props.form.label(error.field)}: ${error.message}`
106
+ : error.message,
107
+ onClick: async () => {
108
+ emit('focus', error.field, await props.form.focusError(error.field))
109
+ },
110
+ }),
111
+ ),
112
+ ],
113
+ )
114
+ }
115
+ },
116
+ })
117
+ const MSteps = defineComponent({
118
+ name: 'MSteps',
119
+ inheritAttrs: false,
120
+ props: stepsProps,
121
+ emits: { 'update:modelValue': (_value: ChoiceValue) => true },
122
+ setup(props, { attrs, emit }) {
123
+ return () => {
124
+ if (!props.label.trim()) throw new TypeError('Steps require a navigation label.')
125
+ validateSteps(props.steps, props.modelValue)
126
+ return h(
127
+ ui.Row,
128
+ mergeProps(
129
+ { gap: 'sm', wrap: true },
130
+ attrs,
131
+ platform === 'web' ? { role: 'navigation', 'aria-label': props.label } : {},
132
+ ),
133
+ () =>
134
+ props.steps.map((step, index) => {
135
+ const current = step.value === props.modelValue
136
+ const status = [
137
+ current ? props.currentLabel : '',
138
+ step.status === 'error'
139
+ ? props.errorLabel
140
+ : step.status === 'complete'
141
+ ? props.completeLabel
142
+ : '',
143
+ ]
144
+ .filter(Boolean)
145
+ .join(' · ')
146
+ return h(ui.Column, { key: choiceKey(step.value), gap: 'xs', grow: 1 }, () => [
147
+ h(ui.Button, {
148
+ text: `${index + 1}. ${step.label}`,
149
+ variant: current ? 'primary' : 'secondary',
150
+ disabled: props.disabled || step.disabled || (props.loading && !current),
151
+ loading: props.loading && current,
152
+ accessibilityLabel: `${index + 1}. ${step.label}${status ? `. ${status}` : ''}`,
153
+ ...(platform === 'web' ? { 'aria-current': current ? 'step' : undefined } : {}),
154
+ onClick: () => {
155
+ if (!props.disabled && !props.loading && !step.disabled && !current)
156
+ emit('update:modelValue', step.value)
157
+ },
158
+ }),
159
+ status
160
+ ? h(ui.Text, {
161
+ variant: 'caption',
162
+ tone: step.status === 'error' ? 'danger' : 'muted',
163
+ text: status,
164
+ })
165
+ : null,
166
+ ])
167
+ }),
168
+ )
169
+ }
170
+ },
171
+ })
172
+ const MPagination = defineComponent({
173
+ name: 'MPagination',
174
+ inheritAttrs: false,
175
+ props: paginationProps,
176
+ emits: { 'update:modelValue': (_page: number) => true },
177
+ setup(props, { attrs, emit }) {
178
+ const root = shallowRef<unknown>()
179
+ const id = `m-pagination-${useId()}`
180
+ let restore = () => {}
181
+ onBeforeUpdate(() => {
182
+ restore = ui.preserveFocus?.(root.value, `${id}-page-${props.modelValue}`) ?? (() => {})
183
+ })
184
+ onUpdated(() => {
185
+ const apply = restore
186
+ void nextTick(apply)
187
+ })
188
+ const request = (page: number | null) => {
189
+ if (page !== null && page !== props.modelValue && !props.disabled && !props.loading)
190
+ emit('update:modelValue', page)
191
+ }
192
+ return () => {
193
+ if (!props.label.trim()) throw new TypeError('Pagination requires a navigation label.')
194
+ const state = pagination(props.total, props.pageSize, props.modelValue, props.siblingCount)
195
+ return h(
196
+ ui.Column,
197
+ mergeProps(
198
+ { gap: 'sm', ref: root },
199
+ attrs,
200
+ platform === 'web' ? { role: 'navigation', 'aria-label': props.label } : {},
201
+ ),
202
+ () => [
203
+ props.statusText
204
+ ? h(ui.Text, {
205
+ text: props.statusText,
206
+ variant: 'caption',
207
+ tone: 'muted',
208
+ ...(platform === 'web'
209
+ ? { role: 'status', 'aria-live': 'polite', 'aria-atomic': 'true' }
210
+ : { accessibilityLiveRegion: 'polite' }),
211
+ })
212
+ : null,
213
+ state.count === 0 ? h(ui.Text, { tone: 'muted', text: props.emptyLabel }) : null,
214
+ state.outOfRange ? h(ui.Text, { tone: 'danger', text: props.invalidPageLabel }) : null,
215
+ h(ui.Row, { gap: 'sm', wrap: true }, () => [
216
+ h(ui.Button, {
217
+ variant: 'secondary',
218
+ text: props.previousLabel,
219
+ disabled: props.disabled || state.previous === null,
220
+ loading: props.loading,
221
+ loadingText: props.previousLabel,
222
+ onClick: () => request(state.previous),
223
+ }),
224
+ ...state.items.map((item) =>
225
+ item.kind === 'gap'
226
+ ? h(ui.Text, { key: item.key, text: '…', accessibilityHidden: true })
227
+ : h(ui.Button, {
228
+ key: item.page,
229
+ text: String(item.page),
230
+ accessibilityLabel: `${props.pageLabel} ${item.page}${platform === 'native' && item.page === props.modelValue ? `. ${props.currentLabel}` : ''}`,
231
+ variant: item.page === props.modelValue ? 'primary' : 'ghost',
232
+ id: `${id}-page-${item.page}`,
233
+ disabled: props.disabled,
234
+ loading: props.loading,
235
+ loadingText: String(item.page),
236
+ ...(platform === 'web'
237
+ ? { 'aria-current': item.page === props.modelValue ? 'page' : undefined }
238
+ : {}),
239
+ onClick: () => request(item.page),
240
+ }),
241
+ ),
242
+ h(ui.Button, {
243
+ variant: 'secondary',
244
+ text: props.nextLabel,
245
+ disabled: props.disabled || state.next === null,
246
+ loading: props.loading,
247
+ loadingText: props.nextLabel,
248
+ onClick: () => request(state.next),
249
+ }),
250
+ ]),
251
+ ],
252
+ )
253
+ }
254
+ },
255
+ })
256
+ return { MFormGroup, MFormErrors, MSteps, MPagination }
257
+ }