@sfxcode/formkit-openvue 0.0.0-stage → 0.9.0

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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +227 -2
  3. package/components.d.ts +1 -0
  4. package/dist/components/FormAutoComplete.vue +100 -0
  5. package/dist/components/FormCascadeSelect.vue +41 -0
  6. package/dist/components/FormCheckbox.vue +49 -0
  7. package/dist/components/FormColorPicker.vue +31 -0
  8. package/dist/components/FormDatePicker.vue +93 -0
  9. package/dist/components/FormInputMask.vue +67 -0
  10. package/dist/components/FormInputNumber.vue +72 -0
  11. package/dist/components/FormInputOtp.vue +40 -0
  12. package/dist/components/FormInputText.vue +63 -0
  13. package/dist/components/FormKitDataDebug.vue +25 -0
  14. package/dist/components/FormKitDataEdit.vue +123 -0
  15. package/dist/components/FormKitDataView.vue +56 -0
  16. package/dist/components/FormKitIcon.vue +23 -0
  17. package/dist/components/FormKitPrefix.vue +9 -0
  18. package/dist/components/FormKitSuffix.vue +9 -0
  19. package/dist/components/FormKnob.vue +48 -0
  20. package/dist/components/FormListbox.vue +482 -0
  21. package/dist/components/FormMultiSelect.vue +68 -0
  22. package/dist/components/FormOutputBoolean.vue +30 -0
  23. package/dist/components/FormOutputDate.vue +40 -0
  24. package/dist/components/FormOutputDuration.vue +24 -0
  25. package/dist/components/FormOutputLink.vue +39 -0
  26. package/dist/components/FormOutputList.vue +105 -0
  27. package/dist/components/FormOutputNumber.vue +47 -0
  28. package/dist/components/FormOutputReference.vue +52 -0
  29. package/dist/components/FormOutputText.vue +52 -0
  30. package/dist/components/FormPassword.vue +47 -0
  31. package/dist/components/FormRadioButton.vue +39 -0
  32. package/dist/components/FormRating.vue +38 -0
  33. package/dist/components/FormSelect.vue +69 -0
  34. package/dist/components/FormSelectButton.vue +42 -0
  35. package/dist/components/FormSlider.vue +40 -0
  36. package/dist/components/FormTextarea.vue +35 -0
  37. package/dist/components/FormToggleButton.vue +40 -0
  38. package/dist/components/FormToggleSwitch.vue +40 -0
  39. package/dist/components/FormTreeSelect.vue +46 -0
  40. package/dist/components/index.d.ts +24 -0
  41. package/dist/components/index.js +167 -0
  42. package/dist/components/index.mjs +48 -0
  43. package/dist/composables/index.d.ts +9 -0
  44. package/dist/composables/index.js +61 -0
  45. package/dist/composables/index.mjs +18 -0
  46. package/dist/composables/useFormInputs.d.ts +3 -0
  47. package/dist/composables/useFormInputs.js +62 -0
  48. package/dist/composables/useFormInputs.mjs +53 -0
  49. package/dist/composables/useFormKitInput.d.ts +11 -0
  50. package/dist/composables/useFormKitInput.js +58 -0
  51. package/dist/composables/useFormKitInput.mjs +45 -0
  52. package/dist/composables/useFormKitRepeater.d.ts +18 -0
  53. package/dist/composables/useFormKitRepeater.js +74 -0
  54. package/dist/composables/useFormKitRepeater.mjs +54 -0
  55. package/dist/composables/useFormKitSchema.d.ts +36 -0
  56. package/dist/composables/useFormKitSchema.js +83 -0
  57. package/dist/composables/useFormKitSchema.mjs +58 -0
  58. package/dist/composables/useFormKitSection.d.ts +7 -0
  59. package/dist/composables/useFormKitSection.js +31 -0
  60. package/dist/composables/useFormKitSection.mjs +19 -0
  61. package/dist/composables/useInputEditor.d.ts +8 -0
  62. package/dist/composables/useInputEditor.js +148 -0
  63. package/dist/composables/useInputEditor.mjs +143 -0
  64. package/dist/composables/useInputEditorSchema.d.ts +163 -0
  65. package/dist/composables/useInputEditorSchema.js +313 -0
  66. package/dist/composables/useInputEditorSchema.mjs +315 -0
  67. package/dist/composables/useOutputDuration.d.ts +4 -0
  68. package/dist/composables/useOutputDuration.js +40 -0
  69. package/dist/composables/useOutputDuration.mjs +35 -0
  70. package/dist/definitions/index.d.ts +35 -0
  71. package/dist/definitions/index.js +44 -0
  72. package/dist/definitions/index.mjs +70 -0
  73. package/dist/definitions/input.d.ts +23 -0
  74. package/dist/definitions/input.js +118 -0
  75. package/dist/definitions/input.mjs +111 -0
  76. package/dist/definitions/output.d.ts +9 -0
  77. package/dist/definitions/output.js +46 -0
  78. package/dist/definitions/output.mjs +136 -0
  79. package/dist/definitions/repeater.d.ts +2 -0
  80. package/dist/definitions/repeater.js +234 -0
  81. package/dist/definitions/repeater.mjs +215 -0
  82. package/dist/index.d.ts +148 -0
  83. package/dist/index.js +62 -0
  84. package/dist/index.mjs +14 -0
  85. package/dist/plugins/autoAnimate.d.ts +9 -0
  86. package/dist/plugins/autoAnimate.js +93 -0
  87. package/dist/plugins/autoAnimate.mjs +87 -0
  88. package/dist/plugins/index.d.ts +5 -0
  89. package/dist/plugins/index.js +67 -0
  90. package/dist/plugins/index.mjs +56 -0
  91. package/dist/sass/formkit-openvue.scss +491 -0
  92. package/dist/style.css +1 -0
  93. package/dist/utils/clonePlain.d.ts +10 -0
  94. package/dist/utils/clonePlain.js +25 -0
  95. package/dist/utils/clonePlain.mjs +24 -0
  96. package/package.json +136 -4
@@ -0,0 +1,491 @@
1
+ @use 'sass:math';
2
+ @use 'sass:map';
3
+
4
+ $gutter-width: 0.5rem;
5
+
6
+ // Breakpoints e.g. https://tailwindcss.com/docs/responsive-design
7
+ $grid-breakpoints: (
8
+ sm: 640px,
9
+ md: 768px,
10
+ lg: 1024px,
11
+ xl: 1280px,
12
+ xxl: 1536px
13
+ ) !default;
14
+
15
+ @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
16
+ $min: map.get($breakpoints, $name);
17
+ @if $min != 0 {
18
+ @return $min;
19
+ } @else {
20
+ @return null;
21
+ }
22
+ }
23
+
24
+ @mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
25
+ $min: breakpoint-min($name, $breakpoints);
26
+ @if $min {
27
+ @media (min-width: $min) {
28
+ @content;
29
+ }
30
+ } @else {
31
+ @content;
32
+ }
33
+ }
34
+
35
+ :root {
36
+ --formkit-error-color: #ef9a9a;
37
+ }
38
+
39
+ .formkit-form {
40
+ // General message item styling
41
+ .formkit-messages {
42
+ margin: 0.125rem 0;
43
+ padding-top: 0.5rem;
44
+ padding-left: 0.5rem;
45
+ }
46
+
47
+ .formkit-message {
48
+ list-style: none;
49
+ padding: 0;
50
+ margin: 0;
51
+ color: var(--formkit-error-color);
52
+ font-size: 0.8rem;
53
+ }
54
+
55
+ // Single form element
56
+ .formkit-outer {
57
+ padding-bottom: 0.8rem;
58
+
59
+ .formkit-messages {
60
+ margin: 0.125rem 0;
61
+ padding-top: 0.25rem;
62
+ padding-left: 0;
63
+ }
64
+
65
+ .formkit-inner {
66
+ .p-formkit {
67
+ .p-formkit-icon {
68
+ box-sizing: border-box;
69
+ width: 100%;
70
+ }
71
+
72
+ .p-inputtext, .p-textarea, .p-password, .p-multiselect, .p-select, .p-editor {
73
+ box-sizing: border-box;
74
+ width: 100%;
75
+
76
+ &.p-colorpicker-preview {
77
+ width: 2rem;
78
+ }
79
+ }
80
+
81
+ }
82
+ }
83
+
84
+ .formkit-help {
85
+ margin: 0.25rem 0 0 0;
86
+ font-size: 0.8rem;
87
+ color: var(--text-color-secondary);
88
+ }
89
+
90
+ }
91
+
92
+ // Label for single form element
93
+ .formkit-label {
94
+ display: block;
95
+ margin: 0;
96
+ padding-bottom: 0.5rem;
97
+ font-weight: bold;
98
+ font-size: 0.8rem;
99
+ }
100
+
101
+ // Wrapper for input element plus prefix, suffix and icons
102
+ .p-formkit {
103
+ > * {
104
+ margin-right: 0.5rem;
105
+
106
+ &:last-child, &:only-child {
107
+ margin-right: 0;
108
+ }
109
+ }
110
+ }
111
+
112
+ // Used in FormRadioButton
113
+ .p-formkit-options {
114
+ display: flex;
115
+ flex-wrap: wrap;
116
+ gap: 0.5rem;
117
+
118
+ .p-formkit-option {
119
+ display: flex;
120
+ align-items: center;
121
+ label {
122
+ margin-left: 0.5rem;
123
+ }
124
+ }
125
+ }
126
+
127
+ // Do we need this?
128
+ .formkit-fieldset {
129
+ margin: 0;
130
+ padding: 0;
131
+ border-radius: 0;
132
+ border: 0;
133
+
134
+ &:focus-within {
135
+ border: 0;
136
+ }
137
+
138
+ & > .formkit-help {
139
+ margin-top: 0;
140
+ margin-bottom: 0;
141
+ }
142
+ }
143
+
144
+ // Actually not needed
145
+ .formkit-legend {
146
+ display: block;
147
+ margin: 0;
148
+ padding: 0;
149
+ }
150
+
151
+ // Submit button etc.
152
+ .formkit-actions {
153
+ padding-top: 0.5rem;
154
+ display: flex;
155
+ button {
156
+ margin-right: 0.5rem;
157
+ }
158
+
159
+ }
160
+
161
+ .p-action-buttons {
162
+ margin-top: 0.25rem;
163
+ .p-button {
164
+ margin-right: 0.5rem;
165
+ }
166
+ span {
167
+ .p-space {
168
+ margin-right: 3rem;
169
+ }
170
+ }
171
+ }
172
+
173
+ .p-chip-item {
174
+ align-items: center;
175
+ background: var(--p-surface-500);
176
+ color: var(--p-surface-0);
177
+ border-radius: 1rem;
178
+ padding: 0.2rem 0.5rem;
179
+ }
180
+
181
+ .formkit-repeater-drag-handle {
182
+ display: inline-flex;
183
+ align-items: center;
184
+ cursor: grab;
185
+ user-select: none;
186
+ }
187
+
188
+ .formkit-item[draggable="true"] {
189
+ cursor: grab;
190
+
191
+ &:active {
192
+ cursor: grabbing;
193
+ }
194
+
195
+ &.formkit-repeater-drop-target {
196
+ outline: 1px dashed var(--p-primary-color, #3b82f6);
197
+ outline-offset: 2px;
198
+ background: color-mix(in srgb, var(--p-primary-color, #3b82f6) 12%, transparent);
199
+ }
200
+ }
201
+ }
202
+
203
+ // data view only
204
+ .p-formkit-data-view {
205
+ .formkit-outer {
206
+ padding-bottom: 0.5rem;
207
+ }
208
+
209
+ &.form-horizontal {
210
+ padding-bottom: 0.8rem;
211
+ }
212
+
213
+ .formkit-help {
214
+ padding-top: 0.25rem;
215
+ margin: 0;
216
+ }
217
+
218
+ ul, ol {
219
+ padding-inline-start: 1rem;
220
+ margin-block-start: 0;
221
+ margin-block-end: 0;
222
+ }
223
+ }
224
+
225
+ // data edit only
226
+ .p-formkit-data-edit {
227
+ .formkit-label {
228
+ //font-weight: normal;
229
+ }
230
+
231
+ // specific checkbox stylings
232
+ .formkit-outer[data-type="formCheckbox"] {
233
+ //padding-left: 0;
234
+
235
+ .formkit-wrapper {
236
+ display: flex;
237
+ flex-wrap: wrap;
238
+
239
+ .formkit-inner {
240
+ width: auto !important;
241
+ }
242
+
243
+ label {
244
+ width: auto;
245
+ order: 2;
246
+ padding: 0.125rem 0;
247
+
248
+ &:after {
249
+ content: "";
250
+ }
251
+
252
+ // styling of output when label is used in schema
253
+ + .formkit-inner {
254
+ margin-left: 0 !important;
255
+ order: 1;
256
+ flex-basis: 2rem;
257
+ flex-grow: 0;
258
+ flex-shrink: 0;
259
+ overflow: hidden;
260
+ // styling of suffix when suffix is used in addition to label
261
+ &:has( label) {
262
+ flex-grow: 1;
263
+ flex-basis: 100%;
264
+ }
265
+ }
266
+ }
267
+
268
+ // styling when both prefix and suffix are used in schema
269
+ label:first-child:nth-last-child(3), label:first-child:nth-last-child(3) ~ label {
270
+ width: auto;
271
+ }
272
+
273
+ label:first-child:nth-last-child(3) {
274
+ order: 1;
275
+
276
+ + div.p-checkbox {
277
+ order: 2;
278
+ width: auto;
279
+ }
280
+ }
281
+
282
+ label:first-child:nth-last-child(3) ~ label {
283
+ order: 3
284
+ }
285
+
286
+ // end styling when both prefix and suffix are used in schema
287
+
288
+
289
+ // styling of output when only suffix is used in schema
290
+ .formkit-inner:first-child {
291
+ margin-left: 0 !important;
292
+
293
+ .p-formkit {
294
+ display: flex;
295
+ }
296
+ }
297
+
298
+ .p-checkbox:not(:only-child) {
299
+ width: 2rem;
300
+ overflow: hidden;
301
+ }
302
+ }
303
+
304
+ .formkit-help {
305
+ width: auto !important;
306
+ //padding-left: 2rem;
307
+ }
308
+ }
309
+ }
310
+
311
+ // Listbox Transfer
312
+ .p-formkit-transfer {
313
+ display: flex;
314
+ align-items: stretch;
315
+ gap: 1rem;
316
+ width: 100%;
317
+ // never wider than the container it is in
318
+ min-width: min(600px, 100%);
319
+ }
320
+
321
+ .p-formkit-transfer-list-container {
322
+ display: flex;
323
+ flex-direction: column;
324
+ flex: 1;
325
+ gap: 0.5rem;
326
+ min-width: 0;
327
+ }
328
+
329
+ .p-formkit-transfer-buttons {
330
+ display: flex;
331
+ flex-direction: column;
332
+ align-items: center;
333
+ justify-content: center;
334
+ gap: 0.5rem;
335
+ }
336
+
337
+ // Repeater: the bar that offers to put back a deleted row
338
+ .formkit-repeater-undo {
339
+ display: flex;
340
+ align-items: center;
341
+ gap: 0.5rem;
342
+ padding: 0.25rem 0.5rem;
343
+ margin-top: 0.5rem;
344
+ border: 1px solid var(--p-content-border-color);
345
+ border-radius: var(--p-content-border-radius);
346
+ background: var(--p-content-hover-background);
347
+ font-size: 0.875rem;
348
+ }
349
+
350
+ // Narrow screens: the lists are stacked, the buttons sit between them in a row and their arrows point down and up.
351
+ @media (max-width: 640px) {
352
+ .p-formkit-transfer {
353
+ flex-direction: column;
354
+ min-width: 0;
355
+ }
356
+
357
+ .p-formkit-transfer-buttons {
358
+ flex-direction: row;
359
+ flex-wrap: wrap;
360
+
361
+ .oi {
362
+ transform: rotate(90deg);
363
+ }
364
+ }
365
+ }
366
+
367
+ .p-formkit-transfer-option {
368
+ width: 100%;
369
+ }
370
+
371
+ .p-formkit-transfer-option-draggable {
372
+ cursor: grab;
373
+ }
374
+
375
+ .p-formkit-transfer-option-draggable:active {
376
+ cursor: grabbing;
377
+ }
378
+
379
+
380
+
381
+
382
+ // Debug
383
+ .p-formkit-data-debug {
384
+ pre, span {
385
+ font-size: 0.75rem;
386
+ line-height: 1rem;
387
+ }
388
+ }
389
+
390
+ // Change column behaviour in larger views
391
+ @include media-breakpoint-up(lg) {
392
+ .formkit-form {
393
+ display: flex;
394
+ flex-wrap: wrap;
395
+ margin-left: -$gutter-width;
396
+ margin-right: -$gutter-width;
397
+
398
+ & > * {
399
+ flex-shrink: 0;
400
+ width: 100%;
401
+ max-width: 100%;
402
+ padding-left: $gutter-width;
403
+ padding-right: $gutter-width;
404
+ }
405
+ }
406
+ @for $i from 1 through 12 {
407
+ .col-#{$i} {
408
+ width: math.percentage(math.div($i, 12));
409
+ }
410
+ }
411
+ }
412
+
413
+ @include media-breakpoint-up(md) {
414
+ .formkit-form {
415
+
416
+ &.form-horizontal {
417
+
418
+ .formkit-wrapper {
419
+ display: flex;
420
+
421
+ label {
422
+ display: inline-block;
423
+ padding: 0 0.25rem 0 0;
424
+ font-size: inherit;
425
+
426
+ &:after {
427
+ content: ":";
428
+ }
429
+ }
430
+ }
431
+
432
+ &.form-horizontal-checkbox-indent {
433
+ .formkit-outer[data-type="formCheckbox"] {
434
+ @include media-breakpoint-up(md) {
435
+ padding-left: calc((4 / 12) * 100%);
436
+ }
437
+ }
438
+ }
439
+
440
+ }
441
+
442
+ .p-formkit-data-view & {
443
+ &.form-horizontal {
444
+ label {
445
+ white-space: nowrap;
446
+ }
447
+ }
448
+ }
449
+
450
+ .p-formkit-data-edit & {
451
+
452
+ &.form-horizontal {
453
+
454
+ .formkit-outer {
455
+ width: 100%;
456
+
457
+ label {
458
+ width: calc((4 / 12) * 100%);
459
+ padding-top: 0.25rem;
460
+ line-height: normal;
461
+ }
462
+
463
+ .formkit-inner {
464
+ width: calc((8 / 12) * 100%);
465
+ }
466
+ }
467
+
468
+ div[data-type="formCheckbox"] {
469
+ .formkit-inner {
470
+ margin-left: auto;
471
+
472
+ .p-formkit {
473
+ display: flex
474
+ }
475
+
476
+ label {
477
+ width: auto;
478
+ padding: 0;
479
+ }
480
+ }
481
+ }
482
+
483
+ .formkit-help, .formkit-messages {
484
+ width: calc((8 / 12) * 100%);
485
+ margin-left: auto;
486
+ }
487
+ }
488
+ }
489
+ }
490
+ }
491
+
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ :root{--formkit-error-color: #ef9a9a}.formkit-form .formkit-messages{margin:.125rem 0;padding-top:.5rem;padding-left:.5rem}.formkit-form .formkit-message{list-style:none;padding:0;margin:0;color:var(--formkit-error-color);font-size:.8rem}.formkit-form .formkit-outer{padding-bottom:.8rem}.formkit-form .formkit-outer .formkit-messages{margin:.125rem 0;padding-top:.25rem;padding-left:0}.formkit-form .formkit-outer .formkit-inner .p-formkit .p-formkit-icon{box-sizing:border-box;width:100%}.formkit-form .formkit-outer .formkit-inner .p-formkit .p-inputtext,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-textarea,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-password,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-multiselect,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-select,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-editor{box-sizing:border-box;width:100%}.formkit-form .formkit-outer .formkit-inner .p-formkit .p-inputtext.p-colorpicker-preview,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-textarea.p-colorpicker-preview,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-password.p-colorpicker-preview,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-multiselect.p-colorpicker-preview,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-select.p-colorpicker-preview,.formkit-form .formkit-outer .formkit-inner .p-formkit .p-editor.p-colorpicker-preview{width:2rem}.formkit-form .formkit-outer .formkit-help{margin:.25rem 0 0 0;font-size:.8rem;color:var(--text-color-secondary)}.formkit-form .formkit-label{display:block;margin:0;padding-bottom:.5rem;font-weight:bold;font-size:.8rem}.formkit-form .p-formkit>*{margin-right:.5rem}.formkit-form .p-formkit>*:last-child,.formkit-form .p-formkit>*:only-child{margin-right:0}.formkit-form .p-formkit-options{display:flex;flex-wrap:wrap;gap:.5rem}.formkit-form .p-formkit-options .p-formkit-option{display:flex;align-items:center}.formkit-form .p-formkit-options .p-formkit-option label{margin-left:.5rem}.formkit-form .formkit-fieldset{margin:0;padding:0;border-radius:0;border:0}.formkit-form .formkit-fieldset:focus-within{border:0}.formkit-form .formkit-fieldset>.formkit-help{margin-top:0;margin-bottom:0}.formkit-form .formkit-legend{display:block;margin:0;padding:0}.formkit-form .formkit-actions{padding-top:.5rem;display:flex}.formkit-form .formkit-actions button{margin-right:.5rem}.formkit-form .p-action-buttons{margin-top:.25rem}.formkit-form .p-action-buttons .p-button{margin-right:.5rem}.formkit-form .p-action-buttons span .p-space{margin-right:3rem}.formkit-form .p-chip-item{align-items:center;background:var(--p-surface-500);color:var(--p-surface-0);border-radius:1rem;padding:.2rem .5rem}.formkit-form .formkit-repeater-drag-handle{display:inline-flex;align-items:center;cursor:grab;user-select:none}.formkit-form .formkit-item[draggable=true]{cursor:grab}.formkit-form .formkit-item[draggable=true]:active{cursor:grabbing}.formkit-form .formkit-item[draggable=true].formkit-repeater-drop-target{outline:1px dashed var(--p-primary-color, #3b82f6);outline-offset:2px;background:color-mix(in srgb, var(--p-primary-color, #3b82f6) 12%, transparent)}.p-formkit-data-view .formkit-outer{padding-bottom:.5rem}.p-formkit-data-view.form-horizontal{padding-bottom:.8rem}.p-formkit-data-view .formkit-help{padding-top:.25rem;margin:0}.p-formkit-data-view ul,.p-formkit-data-view ol{padding-inline-start:1rem;margin-block-start:0;margin-block-end:0}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper{display:flex;flex-wrap:wrap}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper .formkit-inner{width:auto !important}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label{width:auto;order:2;padding:.125rem 0}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:after{content:""}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label+.formkit-inner{margin-left:0 !important;order:1;flex-basis:2rem;flex-grow:0;flex-shrink:0;overflow:hidden}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label+.formkit-inner:has(label){flex-grow:1;flex-basis:100%}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:first-child:nth-last-child(3),.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:first-child:nth-last-child(3)~label{width:auto}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:first-child:nth-last-child(3){order:1}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:first-child:nth-last-child(3)+div.p-checkbox{order:2;width:auto}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper label:first-child:nth-last-child(3)~label{order:3}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper .formkit-inner:first-child{margin-left:0 !important}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper .formkit-inner:first-child .p-formkit{display:flex}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-wrapper .p-checkbox:not(:only-child){width:2rem;overflow:hidden}.p-formkit-data-edit .formkit-outer[data-type=formCheckbox] .formkit-help{width:auto !important}.p-formkit-transfer{display:flex;align-items:stretch;gap:1rem;width:100%;min-width:min(600px,100%)}.p-formkit-transfer-list-container{display:flex;flex-direction:column;flex:1;gap:.5rem;min-width:0}.p-formkit-transfer-buttons{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem}.formkit-repeater-undo{display:flex;align-items:center;gap:.5rem;padding:.25rem .5rem;margin-top:.5rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius);background:var(--p-content-hover-background);font-size:.875rem}@media(max-width: 640px){.p-formkit-transfer{flex-direction:column;min-width:0}.p-formkit-transfer-buttons{flex-direction:row;flex-wrap:wrap}.p-formkit-transfer-buttons .oi{transform:rotate(90deg)}}.p-formkit-transfer-option{width:100%}.p-formkit-transfer-option-draggable{cursor:grab}.p-formkit-transfer-option-draggable:active{cursor:grabbing}.p-formkit-data-debug pre,.p-formkit-data-debug span{font-size:.75rem;line-height:1rem}@media(min-width: 1024px){.formkit-form{display:flex;flex-wrap:wrap;margin-left:-0.5rem;margin-right:-0.5rem}.formkit-form>*{flex-shrink:0;width:100%;max-width:100%;padding-left:.5rem;padding-right:.5rem}.col-1{width:8.3333333333%}.col-2{width:16.6666666667%}.col-3{width:25%}.col-4{width:33.3333333333%}.col-5{width:41.6666666667%}.col-6{width:50%}.col-7{width:58.3333333333%}.col-8{width:66.6666666667%}.col-9{width:75%}.col-10{width:83.3333333333%}.col-11{width:91.6666666667%}.col-12{width:100%}}@media(min-width: 768px){.formkit-form.form-horizontal .formkit-wrapper{display:flex}.formkit-form.form-horizontal .formkit-wrapper label{display:inline-block;padding:0 .25rem 0 0;font-size:inherit}.formkit-form.form-horizontal .formkit-wrapper label:after{content:":"}}@media(min-width: 768px)and (min-width: 768px){.formkit-form.form-horizontal.form-horizontal-checkbox-indent .formkit-outer[data-type=formCheckbox]{padding-left:33.3333333333%}}@media(min-width: 768px){.p-formkit-data-view .formkit-form.form-horizontal label{white-space:nowrap}.p-formkit-data-edit .formkit-form.form-horizontal .formkit-outer{width:100%}.p-formkit-data-edit .formkit-form.form-horizontal .formkit-outer label{width:33.3333333333%;padding-top:.25rem;line-height:normal}.p-formkit-data-edit .formkit-form.form-horizontal .formkit-outer .formkit-inner{width:66.6666666667%}.p-formkit-data-edit .formkit-form.form-horizontal div[data-type=formCheckbox] .formkit-inner{margin-left:auto}.p-formkit-data-edit .formkit-form.form-horizontal div[data-type=formCheckbox] .formkit-inner .p-formkit{display:flex}.p-formkit-data-edit .formkit-form.form-horizontal div[data-type=formCheckbox] .formkit-inner label{width:auto;padding:0}.p-formkit-data-edit .formkit-form.form-horizontal .formkit-help,.p-formkit-data-edit .formkit-form.form-horizontal .formkit-messages{width:66.6666666667%;margin-left:auto}}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Deep-copies arrays and plain objects and leaves every other value - class
3
+ * instances such as `@internationalized/date`'s `CalendarDate`/`Time`/
4
+ * `ZonedDateTime`, `Date`, `File`, `Map` - as the same reference.
5
+ *
6
+ * Not `@formkit/utils`' `cloneAny`: it shares a `Date`/`File`/`Map` but rebuilds a
7
+ * `CalendarDate` as a plain object without its prototype, so the date inputs lose
8
+ * the value without any error. A cycle is copied as a cycle.
9
+ */
10
+ export declare function clonePlain<T>(value: T, seen?: WeakMap<object, unknown>): T;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.clonePlain = clonePlain;
7
+ function isPlainObject(value) {
8
+ const prototype = Object.getPrototypeOf(value);
9
+ return prototype === Object.prototype || prototype === null;
10
+ }
11
+ function clonePlain(value, seen = /* @__PURE__ */new WeakMap()) {
12
+ if (value === null || typeof value !== "object") return value;
13
+ if (seen.has(value)) return seen.get(value);
14
+ if (Array.isArray(value)) {
15
+ const copy2 = [];
16
+ seen.set(value, copy2);
17
+ for (const item of value) copy2.push(clonePlain(item, seen));
18
+ return copy2;
19
+ }
20
+ if (!isPlainObject(value)) return value;
21
+ const copy = Object.getPrototypeOf(value) === null ? /* @__PURE__ */Object.create(null) : {};
22
+ seen.set(value, copy);
23
+ for (const key of Object.keys(value)) copy[key] = clonePlain(value[key], seen);
24
+ return copy;
25
+ }
@@ -0,0 +1,24 @@
1
+ function isPlainObject(value) {
2
+ const prototype = Object.getPrototypeOf(value);
3
+ return prototype === Object.prototype || prototype === null;
4
+ }
5
+ export function clonePlain(value, seen = /* @__PURE__ */ new WeakMap()) {
6
+ if (value === null || typeof value !== "object")
7
+ return value;
8
+ if (seen.has(value))
9
+ return seen.get(value);
10
+ if (Array.isArray(value)) {
11
+ const copy2 = [];
12
+ seen.set(value, copy2);
13
+ for (const item of value)
14
+ copy2.push(clonePlain(item, seen));
15
+ return copy2;
16
+ }
17
+ if (!isPlainObject(value))
18
+ return value;
19
+ const copy = Object.getPrototypeOf(value) === null ? /* @__PURE__ */ Object.create(null) : {};
20
+ seen.set(value, copy);
21
+ for (const key of Object.keys(value))
22
+ copy[key] = clonePlain(value[key], seen);
23
+ return copy;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,138 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-openvue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "type": "module",
4
+ "version": "0.9.0",
5
+ "packageManager": "pnpm@11.0.9+sha512.34ce82e6780233cf9cad8685029a8f81d2e06196c5a9bad98879f7424940c6817c4e4524fb7d38b8553ceed48b9758b8ebaf1abd3600c232c4c8cf7366086f38",
6
+ "author": {
7
+ "name": "Tom",
8
+ "email": "tom@sfxcode.com"
9
+ },
10
+ "contributors": [
11
+ "sfxcode <tom@sfxcode.com>"
12
+ ],
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/sfxcode/formkit-openvue",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/sfxcode/formkit-openvue.git"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.mjs",
23
+ "require": "./dist/index.js"
24
+ },
25
+ "./components": {
26
+ "types": "./dist/components/index.d.ts",
27
+ "import": "./dist/components/index.mjs",
28
+ "require": "./dist/components/index.js"
29
+ },
30
+ "./composables": {
31
+ "types": "./dist/composables/index.d.ts",
32
+ "import": "./dist/composables/index.mjs",
33
+ "require": "./dist/composables/index.js"
34
+ },
35
+ "./definitions": {
36
+ "types": "./dist/definitions/index.d.ts",
37
+ "import": "./dist/definitions/index.mjs",
38
+ "require": "./dist/definitions/index.js"
39
+ },
40
+ "./plugins": {
41
+ "types": "./dist/plugins/index.d.ts",
42
+ "import": "./dist/plugins/index.mjs",
43
+ "require": "./dist/plugins/index.js"
44
+ },
45
+ "./dist/sass/formkit-openvue.scss": {
46
+ "import": "./dist/sass/formkit-openvue.scss",
47
+ "require": "./dist/sass/formkit-openvue.scss"
48
+ },
49
+ "./dist/style.css": {
50
+ "import": "./dist/style.css",
51
+ "require": "./dist/style.css"
52
+ }
53
+ },
54
+ "main": "./dist/index.js",
55
+ "module": "./dist/index.mjs",
56
+ "types": "./dist/index.d.ts",
57
+ "typesVersions": {
58
+ "*": {
59
+ "*": [
60
+ "*",
61
+ "dist/*",
62
+ "dist/*.d.ts",
63
+ "dist/*/index.d.ts"
64
+ ]
65
+ }
66
+ },
67
+ "files": [
68
+ "*.css",
69
+ "*.scss",
70
+ "components.d.ts",
71
+ "dist"
72
+ ],
73
+ "engines": {
74
+ "node": ">=24.0.0",
75
+ "pnpm": ">=11.0.0"
76
+ },
77
+ "scripts": {
78
+ "build": "vue-tsc --build --force && unbuild",
79
+ "dev": "vite serve dev",
80
+ "dev:build": "vite build dev",
81
+ "dev:preview": "vite preview dev",
82
+ "release": "npm run lint && npm run build && changelogen --major --release && npm publish --access public && git push --follow-tags",
83
+ "lint": "eslint .",
84
+ "lint:fix": "eslint . --fix",
85
+ "prepublishOnly": "pnpm build",
86
+ "docs:dev": "vitepress dev docs",
87
+ "docs:build": "vitepress build docs",
88
+ "docs:serve": "vitepress serve docs",
89
+ "test": "vitest",
90
+ "test:ui": "vitest --ui",
91
+ "coverage": "vitest run --coverage"
92
+ },
93
+ "peerDependencies": {
94
+ "vue": "^3.4.0"
95
+ },
96
+ "dependencies": {
97
+ "@formkit/addons": "^2.1.2",
98
+ "@formkit/auto-animate": "^0.10.0",
99
+ "@formkit/core": "^2.1.2",
100
+ "@formkit/i18n": "^2.1.2",
101
+ "@formkit/inputs": "^2.1.2",
102
+ "@formkit/vue": "^2.1.2",
103
+ "@intlify/core": "^11.4.14",
104
+ "@openvue/openicons": "^1.0.0",
105
+ "@openvue/openicons-vue": "^1.0.0",
106
+ "openvue": "1.0.0",
107
+ "vue-i18n": "^11.4.14"
108
+ },
109
+ "devDependencies": {
110
+ "@antfu/eslint-config": "^9.5.1",
111
+ "@openvue/themes": "1.0.0",
112
+ "@types/node": "latest",
113
+ "@vitejs/plugin-vue": "^6.0.10",
114
+ "@vitest/coverage-v8": "^5.0.5",
115
+ "@vitest/ui": "^5.0.5",
116
+ "@vue/tsconfig": "^0.9.1",
117
+ "@vueuse/core": "^15.0.0",
118
+ "changelogen": "^0.6.2",
119
+ "eslint": "^10.13.0",
120
+ "happy-dom": "^21.0.3",
121
+ "json-editor-vue": "^0.19.2",
122
+ "mkdist": "^2.4.1",
123
+ "sass": "^1.105.2",
124
+ "typescript": "^6.0.3",
125
+ "unbuild": "^3.6.1",
126
+ "unocss": "^66.11.0",
127
+ "unplugin-auto-import": "^21.1.0",
128
+ "unplugin-vue-components": "^32.1.0",
129
+ "vite": "^8.3.4",
130
+ "vite-plugin-pages": "^0.33.3",
131
+ "vitepress": "2.0.0-alpha.20",
132
+ "vitest": "^5.0.5",
133
+ "vue": "^3.5.44",
134
+ "vue-router": "^5.4.0",
135
+ "vue-sfc-transformer": "^0.3.0",
136
+ "vue-tsc": "^3.3.13"
137
+ }
138
+ }