@shwfed/nuxt 0.9.2 → 0.10.1

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.9.2",
4
+ "version": "0.10.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,7 +1,7 @@
1
1
  import { Effect } from 'effect';
2
2
  import type { FieldsConfig } from './ui/fields/Fields.vue.js';
3
- export { CalendarFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
- export type { Field, FieldsConfig } from './ui/fields/Fields.vue.js';
3
+ export { CalendarFieldC, EmptyFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, SlotFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
+ export type { EmptyField, Field, FieldsConfig, SlotField } from './ui/fields/Fields.vue.js';
5
5
  declare const _default: typeof __VLS_export;
6
6
  export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -12,12 +12,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
12
12
  "update:modelValue": (value: Record<string, unknown>) => any;
13
13
  "update:config": (args_0: Readonly<{
14
14
  fields: readonly ({
15
+ id: string;
15
16
  type: "string";
16
17
  path: string;
17
18
  title: readonly {
18
19
  locale: "zh" | "ja" | "en" | "ko";
19
20
  message: string;
20
21
  }[];
22
+ required?: boolean | undefined;
21
23
  icon?: string | undefined;
22
24
  style?: string | undefined;
23
25
  discardEmptyString?: boolean | undefined;
@@ -29,12 +31,33 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
29
31
  message: string;
30
32
  }>[] | undefined;
31
33
  } | {
34
+ id: string;
35
+ type: "textarea";
36
+ path: string;
37
+ title: readonly {
38
+ locale: "zh" | "ja" | "en" | "ko";
39
+ message: string;
40
+ }[];
41
+ required?: boolean | undefined;
42
+ icon?: string | undefined;
43
+ style?: string | undefined;
44
+ discardEmptyString?: boolean | undefined;
45
+ maxLength?: string | undefined;
46
+ hidden?: string | undefined;
47
+ disabled?: string | undefined;
48
+ validation?: readonly Readonly<{
49
+ expression: string;
50
+ message: string;
51
+ }>[] | undefined;
52
+ } | {
53
+ id: string;
32
54
  type: "number";
33
55
  path: string;
34
56
  title: readonly {
35
57
  locale: "zh" | "ja" | "en" | "ko";
36
58
  message: string;
37
59
  }[];
60
+ required?: boolean | undefined;
38
61
  icon?: string | undefined;
39
62
  style?: string | undefined;
40
63
  min?: string | undefined;
@@ -47,6 +70,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
47
70
  message: string;
48
71
  }>[] | undefined;
49
72
  } | {
73
+ id: string;
50
74
  type: "select";
51
75
  path: string;
52
76
  title: readonly {
@@ -57,6 +81,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
57
81
  label: string;
58
82
  value: string;
59
83
  key: string;
84
+ required?: boolean | undefined;
60
85
  icon?: string | undefined;
61
86
  style?: string | undefined;
62
87
  hidden?: string | undefined;
@@ -66,6 +91,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
66
91
  message: string;
67
92
  }>[] | undefined;
68
93
  } | {
94
+ id: string;
69
95
  type: "calendar";
70
96
  path: string;
71
97
  title: readonly {
@@ -74,6 +100,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
74
100
  }[];
75
101
  mode: "date" | "month" | "year";
76
102
  value: string;
103
+ required?: boolean | undefined;
77
104
  icon?: string | undefined;
78
105
  style?: string | undefined;
79
106
  display?: string | undefined;
@@ -84,6 +111,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
84
111
  expression: string;
85
112
  message: string;
86
113
  }>[] | undefined;
114
+ } | {
115
+ id: string;
116
+ type: "slot";
117
+ style?: string | undefined;
118
+ } | {
119
+ id: string;
120
+ type: "empty";
121
+ style?: string | undefined;
87
122
  })[];
88
123
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
89
124
  style?: string | undefined;
@@ -96,12 +131,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
96
131
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
97
132
  "onUpdate:config"?: ((args_0: Readonly<{
98
133
  fields: readonly ({
134
+ id: string;
99
135
  type: "string";
100
136
  path: string;
101
137
  title: readonly {
102
138
  locale: "zh" | "ja" | "en" | "ko";
103
139
  message: string;
104
140
  }[];
141
+ required?: boolean | undefined;
105
142
  icon?: string | undefined;
106
143
  style?: string | undefined;
107
144
  discardEmptyString?: boolean | undefined;
@@ -113,12 +150,33 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
113
150
  message: string;
114
151
  }>[] | undefined;
115
152
  } | {
153
+ id: string;
154
+ type: "textarea";
155
+ path: string;
156
+ title: readonly {
157
+ locale: "zh" | "ja" | "en" | "ko";
158
+ message: string;
159
+ }[];
160
+ required?: boolean | undefined;
161
+ icon?: string | undefined;
162
+ style?: string | undefined;
163
+ discardEmptyString?: boolean | undefined;
164
+ maxLength?: string | undefined;
165
+ hidden?: string | undefined;
166
+ disabled?: string | undefined;
167
+ validation?: readonly Readonly<{
168
+ expression: string;
169
+ message: string;
170
+ }>[] | undefined;
171
+ } | {
172
+ id: string;
116
173
  type: "number";
117
174
  path: string;
118
175
  title: readonly {
119
176
  locale: "zh" | "ja" | "en" | "ko";
120
177
  message: string;
121
178
  }[];
179
+ required?: boolean | undefined;
122
180
  icon?: string | undefined;
123
181
  style?: string | undefined;
124
182
  min?: string | undefined;
@@ -131,6 +189,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
131
189
  message: string;
132
190
  }>[] | undefined;
133
191
  } | {
192
+ id: string;
134
193
  type: "select";
135
194
  path: string;
136
195
  title: readonly {
@@ -141,6 +200,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
141
200
  label: string;
142
201
  value: string;
143
202
  key: string;
203
+ required?: boolean | undefined;
144
204
  icon?: string | undefined;
145
205
  style?: string | undefined;
146
206
  hidden?: string | undefined;
@@ -150,6 +210,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
150
210
  message: string;
151
211
  }>[] | undefined;
152
212
  } | {
213
+ id: string;
153
214
  type: "calendar";
154
215
  path: string;
155
216
  title: readonly {
@@ -158,6 +219,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
158
219
  }[];
159
220
  mode: "date" | "month" | "year";
160
221
  value: string;
222
+ required?: boolean | undefined;
161
223
  icon?: string | undefined;
162
224
  style?: string | undefined;
163
225
  display?: string | undefined;
@@ -168,12 +230,22 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
168
230
  expression: string;
169
231
  message: string;
170
232
  }>[] | undefined;
233
+ } | {
234
+ id: string;
235
+ type: "slot";
236
+ style?: string | undefined;
237
+ } | {
238
+ id: string;
239
+ type: "empty";
240
+ style?: string | undefined;
171
241
  })[];
172
242
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
173
243
  style?: string | undefined;
174
244
  }>) => any) | undefined;
175
245
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
176
- [x: string]: ((props: any) => any) | undefined;
246
+ [x: string]: ((props: {
247
+ style: import("vue").CSSProperties;
248
+ }) => any) | undefined;
177
249
  }>;
178
250
  type __VLS_WithSlots<T, S> = T & {
179
251
  new (): {
@@ -23,10 +23,12 @@ function handleConfigUpdate(config2) {
23
23
  <script>
24
24
  export {
25
25
  CalendarFieldC,
26
+ EmptyFieldC,
26
27
  FieldC,
27
28
  FieldsConfigC,
28
29
  NumberFieldC,
29
30
  SelectFieldC,
31
+ SlotFieldC,
30
32
  StringFieldC
31
33
  } from "./ui/fields/Fields.vue";
32
34
  </script>
@@ -1,7 +1,7 @@
1
1
  import { Effect } from 'effect';
2
2
  import type { FieldsConfig } from './ui/fields/Fields.vue.js';
3
- export { CalendarFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
- export type { Field, FieldsConfig } from './ui/fields/Fields.vue.js';
3
+ export { CalendarFieldC, EmptyFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, SlotFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
+ export type { EmptyField, Field, FieldsConfig, SlotField } from './ui/fields/Fields.vue.js';
5
5
  declare const _default: typeof __VLS_export;
6
6
  export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -12,12 +12,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
12
12
  "update:modelValue": (value: Record<string, unknown>) => any;
13
13
  "update:config": (args_0: Readonly<{
14
14
  fields: readonly ({
15
+ id: string;
15
16
  type: "string";
16
17
  path: string;
17
18
  title: readonly {
18
19
  locale: "zh" | "ja" | "en" | "ko";
19
20
  message: string;
20
21
  }[];
22
+ required?: boolean | undefined;
21
23
  icon?: string | undefined;
22
24
  style?: string | undefined;
23
25
  discardEmptyString?: boolean | undefined;
@@ -29,12 +31,33 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
29
31
  message: string;
30
32
  }>[] | undefined;
31
33
  } | {
34
+ id: string;
35
+ type: "textarea";
36
+ path: string;
37
+ title: readonly {
38
+ locale: "zh" | "ja" | "en" | "ko";
39
+ message: string;
40
+ }[];
41
+ required?: boolean | undefined;
42
+ icon?: string | undefined;
43
+ style?: string | undefined;
44
+ discardEmptyString?: boolean | undefined;
45
+ maxLength?: string | undefined;
46
+ hidden?: string | undefined;
47
+ disabled?: string | undefined;
48
+ validation?: readonly Readonly<{
49
+ expression: string;
50
+ message: string;
51
+ }>[] | undefined;
52
+ } | {
53
+ id: string;
32
54
  type: "number";
33
55
  path: string;
34
56
  title: readonly {
35
57
  locale: "zh" | "ja" | "en" | "ko";
36
58
  message: string;
37
59
  }[];
60
+ required?: boolean | undefined;
38
61
  icon?: string | undefined;
39
62
  style?: string | undefined;
40
63
  min?: string | undefined;
@@ -47,6 +70,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
47
70
  message: string;
48
71
  }>[] | undefined;
49
72
  } | {
73
+ id: string;
50
74
  type: "select";
51
75
  path: string;
52
76
  title: readonly {
@@ -57,6 +81,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
57
81
  label: string;
58
82
  value: string;
59
83
  key: string;
84
+ required?: boolean | undefined;
60
85
  icon?: string | undefined;
61
86
  style?: string | undefined;
62
87
  hidden?: string | undefined;
@@ -66,6 +91,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
66
91
  message: string;
67
92
  }>[] | undefined;
68
93
  } | {
94
+ id: string;
69
95
  type: "calendar";
70
96
  path: string;
71
97
  title: readonly {
@@ -74,6 +100,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
74
100
  }[];
75
101
  mode: "date" | "month" | "year";
76
102
  value: string;
103
+ required?: boolean | undefined;
77
104
  icon?: string | undefined;
78
105
  style?: string | undefined;
79
106
  display?: string | undefined;
@@ -84,6 +111,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
84
111
  expression: string;
85
112
  message: string;
86
113
  }>[] | undefined;
114
+ } | {
115
+ id: string;
116
+ type: "slot";
117
+ style?: string | undefined;
118
+ } | {
119
+ id: string;
120
+ type: "empty";
121
+ style?: string | undefined;
87
122
  })[];
88
123
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
89
124
  style?: string | undefined;
@@ -96,12 +131,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
96
131
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
97
132
  "onUpdate:config"?: ((args_0: Readonly<{
98
133
  fields: readonly ({
134
+ id: string;
99
135
  type: "string";
100
136
  path: string;
101
137
  title: readonly {
102
138
  locale: "zh" | "ja" | "en" | "ko";
103
139
  message: string;
104
140
  }[];
141
+ required?: boolean | undefined;
105
142
  icon?: string | undefined;
106
143
  style?: string | undefined;
107
144
  discardEmptyString?: boolean | undefined;
@@ -113,12 +150,33 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
113
150
  message: string;
114
151
  }>[] | undefined;
115
152
  } | {
153
+ id: string;
154
+ type: "textarea";
155
+ path: string;
156
+ title: readonly {
157
+ locale: "zh" | "ja" | "en" | "ko";
158
+ message: string;
159
+ }[];
160
+ required?: boolean | undefined;
161
+ icon?: string | undefined;
162
+ style?: string | undefined;
163
+ discardEmptyString?: boolean | undefined;
164
+ maxLength?: string | undefined;
165
+ hidden?: string | undefined;
166
+ disabled?: string | undefined;
167
+ validation?: readonly Readonly<{
168
+ expression: string;
169
+ message: string;
170
+ }>[] | undefined;
171
+ } | {
172
+ id: string;
116
173
  type: "number";
117
174
  path: string;
118
175
  title: readonly {
119
176
  locale: "zh" | "ja" | "en" | "ko";
120
177
  message: string;
121
178
  }[];
179
+ required?: boolean | undefined;
122
180
  icon?: string | undefined;
123
181
  style?: string | undefined;
124
182
  min?: string | undefined;
@@ -131,6 +189,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
131
189
  message: string;
132
190
  }>[] | undefined;
133
191
  } | {
192
+ id: string;
134
193
  type: "select";
135
194
  path: string;
136
195
  title: readonly {
@@ -141,6 +200,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
141
200
  label: string;
142
201
  value: string;
143
202
  key: string;
203
+ required?: boolean | undefined;
144
204
  icon?: string | undefined;
145
205
  style?: string | undefined;
146
206
  hidden?: string | undefined;
@@ -150,6 +210,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
150
210
  message: string;
151
211
  }>[] | undefined;
152
212
  } | {
213
+ id: string;
153
214
  type: "calendar";
154
215
  path: string;
155
216
  title: readonly {
@@ -158,6 +219,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
158
219
  }[];
159
220
  mode: "date" | "month" | "year";
160
221
  value: string;
222
+ required?: boolean | undefined;
161
223
  icon?: string | undefined;
162
224
  style?: string | undefined;
163
225
  display?: string | undefined;
@@ -168,12 +230,22 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
168
230
  expression: string;
169
231
  message: string;
170
232
  }>[] | undefined;
233
+ } | {
234
+ id: string;
235
+ type: "slot";
236
+ style?: string | undefined;
237
+ } | {
238
+ id: string;
239
+ type: "empty";
240
+ style?: string | undefined;
171
241
  })[];
172
242
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
173
243
  style?: string | undefined;
174
244
  }>) => any) | undefined;
175
245
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
176
- [x: string]: ((props: any) => any) | undefined;
246
+ [x: string]: ((props: {
247
+ style: import("vue").CSSProperties;
248
+ }) => any) | undefined;
177
249
  }>;
178
250
  type __VLS_WithSlots<T, S> = T & {
179
251
  new (): {
@@ -28,7 +28,7 @@ const content = computed(() => {
28
28
  v-if="$slots.default || content"
29
29
  role="alert"
30
30
  data-slot="field-error"
31
- :class="cn('absolute left-0 top-full z-10 max-w-full pt-1 text-red-600 text-xs leading-tight font-normal', props.class)"
31
+ :class="cn('absolute left-0 top-full z-10 max-w-full pt-0.25 text-red-600 text-xs leading-tight font-normal', props.class)"
32
32
  >
33
33
  <slot v-if="$slots.default" />
34
34
 
@@ -8,7 +8,7 @@ export const fieldVariants = cva(
8
8
  horizontal: [
9
9
  "flex-row items-center",
10
10
  "*:data-[slot=field-label]:shrink-0 *:data-[slot=field-label]:whitespace-nowrap",
11
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
11
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
12
12
  ],
13
13
  responsive: [
14
14
  "flex-col *:w-full.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto",