@scalar/components 0.13.35 → 0.13.37

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 (60) hide show
  1. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
  2. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +15 -11
  3. package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.d.ts +23 -0
  4. package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.d.ts.map +1 -0
  5. package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.js +28 -0
  6. package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue2.js +4 -0
  7. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  8. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +88 -75
  9. package/dist/components/ScalarForm/ScalarForm.stories.d.ts +8 -0
  10. package/dist/components/ScalarForm/ScalarForm.stories.d.ts.map +1 -0
  11. package/dist/components/ScalarForm/ScalarForm.test.d.ts +2 -0
  12. package/dist/components/ScalarForm/ScalarForm.test.d.ts.map +1 -0
  13. package/dist/components/ScalarForm/ScalarForm.vue.d.ts +26 -0
  14. package/dist/components/ScalarForm/ScalarForm.vue.d.ts.map +1 -0
  15. package/dist/components/ScalarForm/ScalarForm.vue.js +19 -0
  16. package/dist/components/ScalarForm/ScalarForm.vue2.js +4 -0
  17. package/dist/components/ScalarForm/ScalarFormField.vue.d.ts +26 -0
  18. package/dist/components/ScalarForm/ScalarFormField.vue.d.ts.map +1 -0
  19. package/dist/components/ScalarForm/ScalarFormSection.vue.d.ts +14 -0
  20. package/dist/components/ScalarForm/ScalarFormSection.vue.d.ts.map +1 -0
  21. package/dist/components/ScalarForm/index.d.ts +2 -0
  22. package/dist/components/ScalarForm/index.d.ts.map +1 -0
  23. package/dist/components/ScalarTextArea/ScalarTextArea.stories.d.ts +7 -0
  24. package/dist/components/ScalarTextArea/ScalarTextArea.stories.d.ts.map +1 -0
  25. package/dist/components/ScalarTextArea/ScalarTextArea.test.d.ts +2 -0
  26. package/dist/components/ScalarTextArea/ScalarTextArea.test.d.ts.map +1 -0
  27. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts +19 -0
  28. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -0
  29. package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +44 -0
  30. package/dist/components/ScalarTextArea/ScalarTextArea.vue2.js +4 -0
  31. package/dist/components/ScalarTextArea/index.d.ts +2 -0
  32. package/dist/components/ScalarTextArea/index.d.ts.map +1 -0
  33. package/dist/components/ScalarTextInput/ScalarTextInput.stories.d.ts +9 -0
  34. package/dist/components/ScalarTextInput/ScalarTextInput.stories.d.ts.map +1 -0
  35. package/dist/components/ScalarTextInput/ScalarTextInput.test.d.ts +2 -0
  36. package/dist/components/ScalarTextInput/ScalarTextInput.test.d.ts.map +1 -0
  37. package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts +29 -0
  38. package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -0
  39. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +72 -0
  40. package/dist/components/ScalarTextInput/ScalarTextInput.vue2.js +4 -0
  41. package/dist/components/ScalarTextInput/index.d.ts +2 -0
  42. package/dist/components/ScalarTextInput/index.d.ts.map +1 -0
  43. package/dist/hooks/useBindCx.d.ts +13 -0
  44. package/dist/hooks/useBindCx.d.ts.map +1 -1
  45. package/dist/hooks/useBindCx.js +21 -10
  46. package/dist/index.d.ts +3 -1
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +107 -103
  49. package/dist/style.css +1 -1
  50. package/package.json +5 -5
  51. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts +0 -345
  52. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts.map +0 -1
  53. package/dist/components/ScalarTextField/ScalarTextField.test.d.ts +0 -2
  54. package/dist/components/ScalarTextField/ScalarTextField.test.d.ts.map +0 -1
  55. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts +0 -45
  56. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts.map +0 -1
  57. package/dist/components/ScalarTextField/ScalarTextField.vue.js +0 -7
  58. package/dist/components/ScalarTextField/ScalarTextField.vue2.js +0 -110
  59. package/dist/components/ScalarTextField/index.d.ts +0 -2
  60. package/dist/components/ScalarTextField/index.d.ts.map +0 -1
@@ -1,345 +0,0 @@
1
- import type { StoryObj } from '@storybook/vue3';
2
- declare const meta: {
3
- component: {
4
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
5
- modelValue: string;
6
- placeholder?: string;
7
- label?: string;
8
- labelShadowColor?: string;
9
- error?: boolean;
10
- isMultiline?: boolean;
11
- helperText?: string;
12
- emitOnBlur?: boolean;
13
- handleFieldSubmit?: (e: string) => void;
14
- handleFieldChange?: (e: string) => void;
15
- disableTrim?: boolean;
16
- }> & Readonly<{
17
- onSubmit?: ((v: string) => any) | undefined;
18
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
19
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
- submit: (v: string) => any;
21
- "update:modelValue": (v: string) => any;
22
- }, import("vue").PublicProps, {
23
- labelShadowColor: string;
24
- emitOnBlur: boolean;
25
- disableTrim: boolean;
26
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
27
- P: {};
28
- B: {};
29
- D: {};
30
- C: {};
31
- M: {};
32
- Defaults: {};
33
- }, Readonly<{
34
- modelValue: string;
35
- placeholder?: string;
36
- label?: string;
37
- labelShadowColor?: string;
38
- error?: boolean;
39
- isMultiline?: boolean;
40
- helperText?: string;
41
- emitOnBlur?: boolean;
42
- handleFieldSubmit?: (e: string) => void;
43
- handleFieldChange?: (e: string) => void;
44
- disableTrim?: boolean;
45
- }> & Readonly<{
46
- onSubmit?: ((v: string) => any) | undefined;
47
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
48
- }>, {}, {}, {}, {}, {
49
- labelShadowColor: string;
50
- emitOnBlur: boolean;
51
- disableTrim: boolean;
52
- }>;
53
- __isFragment?: never;
54
- __isTeleport?: never;
55
- __isSuspense?: never;
56
- } & import("vue").ComponentOptionsBase<Readonly<{
57
- modelValue: string;
58
- placeholder?: string;
59
- label?: string;
60
- labelShadowColor?: string;
61
- error?: boolean;
62
- isMultiline?: boolean;
63
- helperText?: string;
64
- emitOnBlur?: boolean;
65
- handleFieldSubmit?: (e: string) => void;
66
- handleFieldChange?: (e: string) => void;
67
- disableTrim?: boolean;
68
- }> & Readonly<{
69
- onSubmit?: ((v: string) => any) | undefined;
70
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
71
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
72
- submit: (v: string) => any;
73
- "update:modelValue": (v: string) => any;
74
- }, string, {
75
- labelShadowColor: string;
76
- emitOnBlur: boolean;
77
- disableTrim: boolean;
78
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
79
- $slots: {
80
- default?(_: {}): any;
81
- };
82
- });
83
- tags: string[];
84
- argTypes: {
85
- label: {
86
- control: "text";
87
- defaultValue: string;
88
- };
89
- };
90
- render: (args: import("@storybook/vue3").ComponentPropsAndSlots<{
91
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
92
- modelValue: string;
93
- placeholder?: string;
94
- label?: string;
95
- labelShadowColor?: string;
96
- error?: boolean;
97
- isMultiline?: boolean;
98
- helperText?: string;
99
- emitOnBlur?: boolean;
100
- handleFieldSubmit?: (e: string) => void;
101
- handleFieldChange?: (e: string) => void;
102
- disableTrim?: boolean;
103
- }> & Readonly<{
104
- onSubmit?: ((v: string) => any) | undefined;
105
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
106
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
107
- submit: (v: string) => any;
108
- "update:modelValue": (v: string) => any;
109
- }, import("vue").PublicProps, {
110
- labelShadowColor: string;
111
- emitOnBlur: boolean;
112
- disableTrim: boolean;
113
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
114
- P: {};
115
- B: {};
116
- D: {};
117
- C: {};
118
- M: {};
119
- Defaults: {};
120
- }, Readonly<{
121
- modelValue: string;
122
- placeholder?: string;
123
- label?: string;
124
- labelShadowColor?: string;
125
- error?: boolean;
126
- isMultiline?: boolean;
127
- helperText?: string;
128
- emitOnBlur?: boolean;
129
- handleFieldSubmit?: (e: string) => void;
130
- handleFieldChange?: (e: string) => void;
131
- disableTrim?: boolean;
132
- }> & Readonly<{
133
- onSubmit?: ((v: string) => any) | undefined;
134
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
135
- }>, {}, {}, {}, {}, {
136
- labelShadowColor: string;
137
- emitOnBlur: boolean;
138
- disableTrim: boolean;
139
- }>;
140
- __isFragment?: never;
141
- __isTeleport?: never;
142
- __isSuspense?: never;
143
- } & import("vue").ComponentOptionsBase<Readonly<{
144
- modelValue: string;
145
- placeholder?: string;
146
- label?: string;
147
- labelShadowColor?: string;
148
- error?: boolean;
149
- isMultiline?: boolean;
150
- helperText?: string;
151
- emitOnBlur?: boolean;
152
- handleFieldSubmit?: (e: string) => void;
153
- handleFieldChange?: (e: string) => void;
154
- disableTrim?: boolean;
155
- }> & Readonly<{
156
- onSubmit?: ((v: string) => any) | undefined;
157
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
158
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
159
- submit: (v: string) => any;
160
- "update:modelValue": (v: string) => any;
161
- }, string, {
162
- labelShadowColor: string;
163
- emitOnBlur: boolean;
164
- disableTrim: boolean;
165
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
166
- $slots: {
167
- default?(_: {}): any;
168
- };
169
- })>) => {
170
- components: {
171
- ScalarTextField: {
172
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
173
- modelValue: string;
174
- placeholder?: string;
175
- label?: string;
176
- labelShadowColor?: string;
177
- error?: boolean;
178
- isMultiline?: boolean;
179
- helperText?: string;
180
- emitOnBlur?: boolean;
181
- handleFieldSubmit?: (e: string) => void;
182
- handleFieldChange?: (e: string) => void;
183
- disableTrim?: boolean;
184
- }> & Readonly<{
185
- onSubmit?: ((v: string) => any) | undefined;
186
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
187
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
188
- submit: (v: string) => any;
189
- "update:modelValue": (v: string) => any;
190
- }, import("vue").PublicProps, {
191
- labelShadowColor: string;
192
- emitOnBlur: boolean;
193
- disableTrim: boolean;
194
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
195
- P: {};
196
- B: {};
197
- D: {};
198
- C: {};
199
- M: {};
200
- Defaults: {};
201
- }, Readonly<{
202
- modelValue: string;
203
- placeholder?: string;
204
- label?: string;
205
- labelShadowColor?: string;
206
- error?: boolean;
207
- isMultiline?: boolean;
208
- helperText?: string;
209
- emitOnBlur?: boolean;
210
- handleFieldSubmit?: (e: string) => void;
211
- handleFieldChange?: (e: string) => void;
212
- disableTrim?: boolean;
213
- }> & Readonly<{
214
- onSubmit?: ((v: string) => any) | undefined;
215
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
216
- }>, {}, {}, {}, {}, {
217
- labelShadowColor: string;
218
- emitOnBlur: boolean;
219
- disableTrim: boolean;
220
- }>;
221
- __isFragment?: never;
222
- __isTeleport?: never;
223
- __isSuspense?: never;
224
- } & import("vue").ComponentOptionsBase<Readonly<{
225
- modelValue: string;
226
- placeholder?: string;
227
- label?: string;
228
- labelShadowColor?: string;
229
- error?: boolean;
230
- isMultiline?: boolean;
231
- helperText?: string;
232
- emitOnBlur?: boolean;
233
- handleFieldSubmit?: (e: string) => void;
234
- handleFieldChange?: (e: string) => void;
235
- disableTrim?: boolean;
236
- }> & Readonly<{
237
- onSubmit?: ((v: string) => any) | undefined;
238
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
239
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
240
- submit: (v: string) => any;
241
- "update:modelValue": (v: string) => any;
242
- }, string, {
243
- labelShadowColor: string;
244
- emitOnBlur: boolean;
245
- disableTrim: boolean;
246
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
247
- $slots: {
248
- default?(_: {}): any;
249
- };
250
- });
251
- };
252
- setup(this: void): {
253
- args: import("@storybook/vue3").ComponentPropsAndSlots<{
254
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
255
- modelValue: string;
256
- placeholder?: string;
257
- label?: string;
258
- labelShadowColor?: string;
259
- error?: boolean;
260
- isMultiline?: boolean;
261
- helperText?: string;
262
- emitOnBlur?: boolean;
263
- handleFieldSubmit?: (e: string) => void;
264
- handleFieldChange?: (e: string) => void;
265
- disableTrim?: boolean;
266
- }> & Readonly<{
267
- onSubmit?: ((v: string) => any) | undefined;
268
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
269
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
270
- submit: (v: string) => any;
271
- "update:modelValue": (v: string) => any;
272
- }, import("vue").PublicProps, {
273
- labelShadowColor: string;
274
- emitOnBlur: boolean;
275
- disableTrim: boolean;
276
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
277
- P: {};
278
- B: {};
279
- D: {};
280
- C: {};
281
- M: {};
282
- Defaults: {};
283
- }, Readonly<{
284
- modelValue: string;
285
- placeholder?: string;
286
- label?: string;
287
- labelShadowColor?: string;
288
- error?: boolean;
289
- isMultiline?: boolean;
290
- helperText?: string;
291
- emitOnBlur?: boolean;
292
- handleFieldSubmit?: (e: string) => void;
293
- handleFieldChange?: (e: string) => void;
294
- disableTrim?: boolean;
295
- }> & Readonly<{
296
- onSubmit?: ((v: string) => any) | undefined;
297
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
298
- }>, {}, {}, {}, {}, {
299
- labelShadowColor: string;
300
- emitOnBlur: boolean;
301
- disableTrim: boolean;
302
- }>;
303
- __isFragment?: never;
304
- __isTeleport?: never;
305
- __isSuspense?: never;
306
- } & import("vue").ComponentOptionsBase<Readonly<{
307
- modelValue: string;
308
- placeholder?: string;
309
- label?: string;
310
- labelShadowColor?: string;
311
- error?: boolean;
312
- isMultiline?: boolean;
313
- helperText?: string;
314
- emitOnBlur?: boolean;
315
- handleFieldSubmit?: (e: string) => void;
316
- handleFieldChange?: (e: string) => void;
317
- disableTrim?: boolean;
318
- }> & Readonly<{
319
- onSubmit?: ((v: string) => any) | undefined;
320
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
321
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
322
- submit: (v: string) => any;
323
- "update:modelValue": (v: string) => any;
324
- }, string, {
325
- labelShadowColor: string;
326
- emitOnBlur: boolean;
327
- disableTrim: boolean;
328
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
329
- $slots: {
330
- default?(_: {}): any;
331
- };
332
- })>;
333
- model: import("vue").Ref<string, string>;
334
- };
335
- template: string;
336
- };
337
- };
338
- export default meta;
339
- type Story = StoryObj<typeof meta>;
340
- export declare const Base: Story;
341
- export declare const HelperText: Story;
342
- export declare const Error: Story;
343
- export declare const MultiLine: Story;
344
- export declare const NoLabel: Story;
345
- //# sourceMappingURL=ScalarTextField.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScalarTextField.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextField/ScalarTextField.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc8B,CAAA;AAExC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ScalarTextField.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScalarTextField.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextField/ScalarTextField.test.ts"],"names":[],"mappings":""}
@@ -1,45 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: string;
3
- placeholder?: string;
4
- label?: string;
5
- /** This color creates a mask over the input outline and should be set to the background color behind the textField */
6
- labelShadowColor?: string;
7
- error?: boolean;
8
- isMultiline?: boolean;
9
- helperText?: string;
10
- emitOnBlur?: boolean;
11
- handleFieldSubmit?: (e: string) => void;
12
- handleFieldChange?: (e: string) => void;
13
- /** Option to disable trimming for input fields */
14
- disableTrim?: boolean;
15
- };
16
- declare function __VLS_template(): {
17
- attrs: Partial<{}>;
18
- slots: {
19
- default?(_: {}): any;
20
- };
21
- refs: {
22
- input: unknown;
23
- };
24
- rootEl: HTMLDivElement;
25
- };
26
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
27
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
28
- submit: (v: string) => any;
29
- "update:modelValue": (v: string) => any;
30
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
- onSubmit?: ((v: string) => any) | undefined;
32
- "onUpdate:modelValue"?: ((v: string) => any) | undefined;
33
- }>, {
34
- labelShadowColor: string;
35
- emitOnBlur: boolean;
36
- disableTrim: boolean;
37
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
38
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
- export default _default;
40
- type __VLS_WithTemplateSlots<T, S> = T & {
41
- new (): {
42
- $slots: S;
43
- };
44
- };
45
- //# sourceMappingURL=ScalarTextField.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScalarTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextField/ScalarTextField.vue"],"names":[],"mappings":"AA2NA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sHAAsH;IACtH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AA8FJ,iBAAS,cAAc;WAoLT,OAAO,IAA6B;;yBATpB,GAAG;;;;;;EAchC;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;sBApTE,MAAM;gBAIZ,OAAO;iBAIN,OAAO;wFAqTvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +0,0 @@
1
- import o from "./ScalarTextField.vue2.js";
2
- /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4de7a24e"]]);
5
- export {
6
- m as default
7
- };
@@ -1,110 +0,0 @@
1
- import { defineComponent as k, useAttrs as z, ref as h, onMounted as V, openBlock as l, createElementBlock as s, createElementVNode as v, normalizeClass as u, unref as o, createBlock as y, resolveDynamicComponent as T, mergeProps as M, withKeys as $, normalizeStyle as O, toDisplayString as g, createCommentVNode as d, renderSlot as E, createTextVNode as N } from "vue";
2
- import { useTextareaAutosize as A } from "@vueuse/core";
3
- import { nanoid as D } from "nanoid";
4
- import { cva as I, cx as x } from "../../cva.js";
5
- import K from "../ScalarIcon/ScalarIcon.vue.js";
6
- const P = { class: "scalar-input-container relative" }, R = ["for"], j = { class: "icon-slot cursor-pointer text-c-ghost hover:text-c-1 !empty:flex !empty:w-7 !empty:items-center !empty:pr-3" }, Q = /* @__PURE__ */ k({
7
- __name: "ScalarTextField",
8
- props: {
9
- modelValue: {},
10
- placeholder: {},
11
- label: {},
12
- labelShadowColor: { default: "var(--scalar-background-1)" },
13
- error: { type: Boolean },
14
- isMultiline: { type: Boolean },
15
- helperText: {},
16
- emitOnBlur: { type: Boolean, default: !0 },
17
- handleFieldSubmit: {},
18
- handleFieldChange: {},
19
- disableTrim: { type: Boolean, default: !1 }
20
- },
21
- emits: ["submit", "update:modelValue"],
22
- setup(w, { emit: S }) {
23
- const t = w, p = S, B = I({
24
- base: "scalar-input-wrapper relative flex items-center rounded border border-solid border-border",
25
- variants: {
26
- focus: {
27
- true: "scalar-input-wrapper-focus border-c-3 has-actv-btn:border has-actv-btn:border-border"
28
- },
29
- error: { true: "scalar-input-wrapper-error border-red" }
30
- }
31
- }), c = z(), m = c.id || `id-${D()}`, a = h(), n = h(!1);
32
- let f;
33
- if (t.isMultiline) {
34
- const { triggerResize: e } = A({
35
- element: a,
36
- input: t.modelValue
37
- });
38
- f = e;
39
- }
40
- function C(e) {
41
- const r = e.target.value;
42
- t.isMultiline && f(), t.handleFieldChange ? t.handleFieldChange(r) : p("update:modelValue", r);
43
- }
44
- function b(e) {
45
- const r = e.target, i = t.disableTrim || t.isMultiline ? r.value : r.value.trim();
46
- t.handleFieldSubmit ? t.handleFieldSubmit(i) : p("submit", i);
47
- }
48
- function F(e) {
49
- n.value = !1, t.emitOnBlur && t.modelValue && b(e);
50
- }
51
- return V(() => {
52
- var e;
53
- Object.prototype.hasOwnProperty.call(c, "autofocus") && ((e = a.value) == null || e.focus());
54
- }), (e, r) => (l(), s("div", P, [
55
- v("div", {
56
- class: u(o(B)({ error: e.error, focus: n.value }))
57
- }, [
58
- (l(), y(T(e.isMultiline ? "textarea" : "input"), M({ id: o(m) }, e.$attrs, {
59
- ref_key: "input",
60
- ref: a,
61
- class: [
62
- "scalar-input",
63
- o(x)(
64
- { "min-h-[77px]": e.isMultiline },
65
- "z-10 w-full resize-none appearance-none border-0 bg-transparent p-3 text-sm text-c-1",
66
- "outline-none transition-opacity"
67
- )
68
- ],
69
- placeholder: e.placeholder,
70
- value: e.modelValue,
71
- onBlur: F,
72
- onFocus: r[0] || (r[0] = (i) => n.value = !0),
73
- onInput: C,
74
- onKeydown: $(b, ["enter"])
75
- }), null, 16, ["id", "class", "placeholder", "value"])),
76
- e.label ? (l(), s("label", {
77
- key: 0,
78
- class: u(
79
- o(x)(
80
- "scalar-input-label pointer-events-none absolute left-0 top-0 mx-2 my-3 px-1 text-sm",
81
- "z-10 origin-top-left rounded text-c-3 shadow-current transition-transform"
82
- )
83
- ),
84
- for: o(m),
85
- style: O({
86
- "box-shadow": `0 0 4px 4px ${e.labelShadowColor}`,
87
- "background-color": e.labelShadowColor
88
- })
89
- }, g(e.label), 15, R)) : d("", !0),
90
- v("div", j, [
91
- E(e.$slots, "default", {}, void 0, !0)
92
- ])
93
- ], 2),
94
- e.helperText ? (l(), s("span", {
95
- key: 0,
96
- class: u(["helper-text mt-1.5 flex items-center gap-1 text-sm", e.error ? "font-medium text-red" : "text-c-2"])
97
- }, [
98
- e.error ? (l(), y(o(K), {
99
- key: 0,
100
- icon: "Error",
101
- size: "sm"
102
- })) : d("", !0),
103
- N(" " + g(e.helperText), 1)
104
- ], 2)) : d("", !0)
105
- ]));
106
- }
107
- });
108
- export {
109
- Q as default
110
- };
@@ -1,2 +0,0 @@
1
- export { default as ScalarTextField } from './ScalarTextField.vue.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA"}