@xleddyl/443-components-vue 0.3.0 → 0.5.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 (109) hide show
  1. package/README.md +52 -25
  2. package/dist/components/core/FieldBoundary.vue +14 -0
  3. package/dist/components/core/FieldBoundary.vue.d.ts +15 -0
  4. package/dist/components/core/Form.vue +91 -12
  5. package/dist/components/core/Form.vue.d.ts +27 -2
  6. package/dist/components/core/FormAlerts.vue +30 -0
  7. package/dist/{internal/forms → components/core}/FormAlerts.vue.d.ts +4 -4
  8. package/dist/components/core/FormField.vue +18 -3
  9. package/dist/components/core/index.d.ts +2 -0
  10. package/dist/components/core/index.mjs +2 -0
  11. package/dist/components/data/FilterPills.vue +82 -37
  12. package/dist/components/data/FilterPills.vue.d.ts +46 -427
  13. package/dist/components/data/SelectionBar.vue +7 -4
  14. package/dist/components/data/Tree.vue +9 -4
  15. package/dist/components/data/Tree.vue.d.ts +4 -1
  16. package/dist/components/data/types.d.ts +7 -2
  17. package/dist/components/forms/CheckboxGroup.vue +2 -1
  18. package/dist/components/forms/FileInput.vue +98 -26
  19. package/dist/components/forms/FileInput.vue.d.ts +28 -10
  20. package/dist/components/forms/RadioGroup.vue +2 -1
  21. package/dist/components/forms/SegmentedControl.vue +2 -1
  22. package/dist/components/forms/types.d.ts +3 -0
  23. package/dist/components/layout/Accordion.vue.d.ts +4 -4
  24. package/dist/components/layout/AppShell.vue +1 -1
  25. package/dist/components/layout/AppShell.vue.d.ts +2 -2
  26. package/dist/components/layout/Tabs.vue +10 -1
  27. package/dist/components/layout/Tabs.vue.d.ts +4 -0
  28. package/dist/components/layout/types.d.ts +1 -0
  29. package/dist/components/overlays/CommandPalette.vue +10 -4
  30. package/dist/components/overlays/CommandPalette.vue.d.ts +273 -511
  31. package/dist/components/overlays/HoverCard.vue +1 -1
  32. package/dist/components/overlays/HoverCard.vue.d.ts +2 -2
  33. package/dist/components/overlays/Popover.vue +1 -1
  34. package/dist/components/overlays/Popover.vue.d.ts +2 -2
  35. package/dist/components/overlays/Toaster.vue +35 -4
  36. package/dist/components/overlays/Toaster.vue.d.ts +3 -0
  37. package/dist/components/overlays/types.d.ts +8 -4
  38. package/dist/components/templates/DashboardLayout.vue +21 -18
  39. package/dist/components/templates/DashboardLayout.vue.d.ts +332 -565
  40. package/dist/components/templates/ListPage.vue +1 -1
  41. package/dist/components/templates/ListPage.vue.d.ts +3 -3
  42. package/dist/components/templates/types.d.ts +4 -4
  43. package/dist/composables/useField.d.ts +6 -1
  44. package/dist/composables/useField.mjs +40 -12
  45. package/dist/composables/useFieldBoundary.d.ts +1 -0
  46. package/dist/composables/useFieldBoundary.mjs +5 -1
  47. package/dist/composables/useFileDrop.d.ts +14 -1
  48. package/dist/composables/useFileDrop.mjs +21 -20
  49. package/dist/composables/useForm.d.ts +4 -0
  50. package/dist/composables/useForm.mjs +62 -22
  51. package/dist/editor/RichTextEditor.vue +2 -1
  52. package/dist/internal/core/ButtonElement.d.ts +2 -0
  53. package/dist/internal/core/ButtonElement.mjs +8 -0
  54. package/dist/internal/forms/files.d.ts +7 -0
  55. package/dist/internal/forms/files.mjs +24 -0
  56. package/dist/internal/keys.d.ts +2 -1
  57. package/dist/internal/keys.mjs +1 -0
  58. package/dist/internal/layout/route.mjs +1 -1
  59. package/dist/locale/en.mjs +4 -1
  60. package/dist/locale/it.mjs +4 -1
  61. package/dist/locale/types.d.ts +3 -0
  62. package/dist/nuxt/module.mjs +1 -1
  63. package/dist/styles/core/button.css +1 -13
  64. package/dist/styles/core/form-field.css +2 -2
  65. package/dist/styles/data/avatar.css +1 -1
  66. package/dist/styles/data/description-list.css +5 -3
  67. package/dist/styles/data/filter-pills.css +0 -1
  68. package/dist/styles/data/pagination.css +0 -1
  69. package/dist/styles/data/selection-bar.css +4 -0
  70. package/dist/styles/data/stat.css +1 -6
  71. package/dist/styles/data/table.css +1 -2
  72. package/dist/styles/data/tag.css +1 -4
  73. package/dist/styles/data/timeline.css +1 -0
  74. package/dist/styles/data/tree.css +8 -2
  75. package/dist/styles/feedback/alert.css +1 -1
  76. package/dist/styles/feedback/empty-state.css +6 -5
  77. package/dist/styles/forms/color-input.css +1 -1
  78. package/dist/styles/forms/combobox.css +0 -1
  79. package/dist/styles/forms/date-picker.css +1 -1
  80. package/dist/styles/forms/file-input.css +9 -1
  81. package/dist/styles/forms/number-input.css +1 -1
  82. package/dist/styles/forms/password-input.css +1 -5
  83. package/dist/styles/forms/switch.css +0 -1
  84. package/dist/styles/layout/accordion.css +7 -2
  85. package/dist/styles/layout/card.css +13 -7
  86. package/dist/styles/layout/copy-button.css +2 -2
  87. package/dist/styles/layout/nav-link.css +1 -2
  88. package/dist/styles/layout/page-header.css +2 -1
  89. package/dist/styles/layout/sidebar-nav.css +1 -1
  90. package/dist/styles/layout/sidebar.css +1 -1
  91. package/dist/styles/layout/tabs.css +22 -2
  92. package/dist/styles/layout/theme-switch.css +1 -3
  93. package/dist/styles/overlays/command.css +1 -1
  94. package/dist/styles/overlays/confirm.css +0 -1
  95. package/dist/styles/overlays/drawer.css +23 -2
  96. package/dist/styles/overlays/menu.css +2 -4
  97. package/dist/styles/overlays/modal.css +4 -3
  98. package/dist/styles/overlays/toast.css +0 -1
  99. package/dist/styles/templates/auth-layout.css +4 -1
  100. package/dist/styles/templates/empty-page.css +7 -3
  101. package/dist/styles/templates/error-page.css +4 -0
  102. package/dist/styles/templates/form-page.css +1 -1
  103. package/dist/styles/templates/page.css +1 -1
  104. package/dist/styles/templates/settings-modal.css +4 -2
  105. package/dist/styles/tokens.css +1 -1
  106. package/package.json +1 -1
  107. package/dist/internal/forms/FormAlerts.vue +0 -25
  108. package/dist/internal/overlays/FieldBoundary.d.ts +0 -4
  109. package/dist/internal/overlays/FieldBoundary.mjs +0 -9
@@ -48,7 +48,7 @@
48
48
 
49
49
  .k-menu-item-icon {
50
50
  color: var(--k-text-muted);
51
- transition: transform var(--k-duration-lg) var(--k-ease-spring);
51
+ transition: transform var(--k-duration-lg) var(--k-ease-out);
52
52
  }
53
53
 
54
54
  .k-menu-item:focus .k-menu-item-icon {
@@ -84,7 +84,7 @@
84
84
  --k-icon-size: 0.875rem;
85
85
  margin-left: auto;
86
86
  color: var(--k-text-dimmed);
87
- transition: transform var(--k-duration-lg) var(--k-ease-spring);
87
+ transition: transform var(--k-duration-lg) var(--k-ease-out);
88
88
  }
89
89
 
90
90
  .k-menu-item.is-expanded .k-menu-item-chevron,
@@ -103,7 +103,6 @@
103
103
  }
104
104
 
105
105
  .k-menu-item-indicator > .k-icon {
106
- animation: k-icon-pop 300ms var(--k-ease-spring);
107
106
  }
108
107
 
109
108
  .k-menu-item-dot {
@@ -111,7 +110,6 @@
111
110
  height: 0.375rem;
112
111
  border-radius: var(--k-radius-full);
113
112
  background: currentColor;
114
- animation: k-icon-pop 300ms var(--k-ease-spring);
115
113
  }
116
114
 
117
115
  .k-menu-label {
@@ -8,7 +8,7 @@
8
8
  max-height: none;
9
9
  margin: 0;
10
10
  padding: 1rem;
11
- overflow: hidden;
11
+ overflow: clip;
12
12
  color: var(--k-text-toned);
13
13
  background: transparent;
14
14
  border: 0;
@@ -152,7 +152,7 @@
152
152
  .k-drawer-heading {
153
153
  display: flex;
154
154
  flex-direction: column;
155
- gap: 0.25rem;
155
+ gap: 0.125rem;
156
156
  min-width: 0;
157
157
  padding-top: 0.125rem;
158
158
  }
@@ -176,7 +176,7 @@
176
176
  .k-drawer-title {
177
177
  font-size: 0.9375rem;
178
178
  font-weight: 600;
179
- line-height: 1.35;
179
+ line-height: 1.3;
180
180
  color: var(--k-text);
181
181
  letter-spacing: -0.015em;
182
182
  }
@@ -184,6 +184,7 @@
184
184
  .k-modal-description,
185
185
  .k-drawer-description {
186
186
  font-size: 0.8125rem;
187
+ line-height: 1.4;
187
188
  color: var(--k-text-muted);
188
189
  }
189
190
 
@@ -220,7 +220,6 @@
220
220
  color: var(--k-toast-tone);
221
221
  background: color-mix(in oklab, var(--k-toast-tone) 14%, transparent);
222
222
  border-radius: var(--k-radius-full);
223
- animation: k-icon-pop var(--k-duration-xl) var(--k-ease-spring) 120ms;
224
223
  }
225
224
 
226
225
  .k-toast-content {
@@ -70,6 +70,10 @@
70
70
  color: var(--k-text);
71
71
  }
72
72
 
73
+ .k-auth-title + .k-auth-description {
74
+ margin-top: -0.25rem;
75
+ }
76
+
73
77
  .k-auth-description {
74
78
  max-width: 20rem;
75
79
  font-size: 0.8125rem;
@@ -166,7 +170,6 @@
166
170
  border-radius: var(--k-radius-full);
167
171
  background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / 0.5), transparent 65%);
168
172
  filter: blur(2px);
169
- animation: k-float 9s ease-in-out infinite;
170
173
  }
171
174
 
172
175
  .k-auth-aside-content {
@@ -38,13 +38,13 @@
38
38
  .k-empty-page-card.is-back {
39
39
  transform: translateX(-1.5rem) rotate(-10deg) scale(0.86);
40
40
  background: var(--k-subtle);
41
- animation: k-empty-fan 600ms var(--k-ease-spring) 120ms backwards;
41
+ animation: k-empty-fan 600ms var(--k-ease-out) 120ms backwards;
42
42
  }
43
43
 
44
44
  .k-empty-page-card.is-middle {
45
45
  transform: translateX(1.5rem) rotate(10deg) scale(0.86);
46
46
  background: var(--k-subtle);
47
- animation: k-empty-fan 600ms var(--k-ease-spring) 120ms backwards;
47
+ animation: k-empty-fan 600ms var(--k-ease-out) 120ms backwards;
48
48
  }
49
49
 
50
50
  .k-empty-page-card.is-front {
@@ -52,7 +52,7 @@
52
52
  display: grid;
53
53
  place-items: center;
54
54
  color: var(--k-accent-text);
55
- animation: k-pop var(--k-duration-xl) var(--k-ease-spring) backwards;
55
+ animation: k-pop var(--k-duration-xl) var(--k-ease-out) backwards;
56
56
  }
57
57
 
58
58
  .k-empty-page-title {
@@ -63,6 +63,10 @@
63
63
  color: var(--k-text);
64
64
  }
65
65
 
66
+ .k-empty-page-title + .k-empty-page-description {
67
+ margin-top: -0.375rem;
68
+ }
69
+
66
70
  .k-empty-page-description {
67
71
  max-width: 26rem;
68
72
  font-size: 0.875rem;
@@ -61,6 +61,10 @@
61
61
  color: var(--k-text);
62
62
  }
63
63
 
64
+ .k-error-title + .k-error-message {
65
+ margin-top: -0.375rem;
66
+ }
67
+
64
68
  .k-error-message {
65
69
  font-size: 0.875rem;
66
70
  color: var(--k-text-muted);
@@ -63,7 +63,7 @@
63
63
  border-radius: var(--k-radius-full);
64
64
  background: var(--k-warning);
65
65
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--k-warning) 22%, transparent);
66
- animation: k-pop 260ms var(--k-ease-spring);
66
+ animation: k-pop 260ms var(--k-ease-out);
67
67
  }
68
68
 
69
69
  .k-form-page-actions {
@@ -13,7 +13,7 @@
13
13
  }
14
14
 
15
15
  .k-page-back .k-icon {
16
- transition: transform var(--k-duration-lg) var(--k-ease-spring);
16
+ transition: transform var(--k-duration-lg) var(--k-ease-out);
17
17
  }
18
18
 
19
19
  .k-page-back .k-btn:hover .k-icon {
@@ -170,13 +170,14 @@
170
170
  .k-settings-modal-title {
171
171
  font-size: 0.9375rem;
172
172
  font-weight: 600;
173
- line-height: 1.4;
173
+ line-height: 1.3;
174
174
  letter-spacing: -0.015em;
175
175
  color: var(--k-text);
176
176
  }
177
177
 
178
178
  .k-settings-modal-description {
179
179
  font-size: 0.8125rem;
180
+ line-height: 1.4;
180
181
  color: var(--k-text-muted);
181
182
  }
182
183
 
@@ -258,6 +259,7 @@
258
259
  .k-settings-group-label {
259
260
  font-family: var(--k-font-sans);
260
261
  font-size: 0.875rem;
262
+ line-height: 1.3;
261
263
  font-weight: 500;
262
264
  letter-spacing: normal;
263
265
  color: var(--k-text);
@@ -265,6 +267,7 @@
265
267
 
266
268
  .k-settings-group-description {
267
269
  font-size: 0.8125rem;
270
+ line-height: 1.4;
268
271
  color: var(--k-text-muted);
269
272
  }
270
273
 
@@ -430,7 +433,6 @@
430
433
  .k-appearance-card-check {
431
434
  margin-inline-start: auto;
432
435
  color: var(--k-accent-text);
433
- animation: k-icon-pop 300ms var(--k-ease-spring);
434
436
  }
435
437
 
436
438
  @media (max-width: 639px) {
@@ -81,7 +81,7 @@
81
81
  --k-ease: cubic-bezier(0.2, 0, 0, 1);
82
82
  --k-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
83
83
  --k-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
84
- --k-ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
84
+ --k-ease-spring: cubic-bezier(0.34, 1.22, 0.64, 1);
85
85
  }
86
86
 
87
87
  :where(.k-root:not(.k-root .k-root)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",
@@ -1,25 +0,0 @@
1
- <template>
2
- <div v-if="errors.length || warnings.length" class="k-form-alerts" tabindex="-1">
3
- <Alert
4
- v-for="message in errors"
5
- :key="`error:${message}`"
6
- tone="danger"
7
- :description="message"
8
- />
9
- <Alert
10
- v-for="message in warnings"
11
- :key="`warning:${message}`"
12
- tone="warning"
13
- role="status"
14
- :description="message"
15
- />
16
- </div>
17
- </template>
18
-
19
- <script setup>
20
- import Alert from "../../components/feedback/Alert.vue";
21
- defineProps({
22
- errors: { type: Array, required: true },
23
- warnings: { type: Array, required: true }
24
- });
25
- </script>
@@ -1,4 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
2
- [key: string]: any;
3
- }>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
- export default _default;
@@ -1,9 +0,0 @@
1
- import { defineComponent } from "vue";
2
- import { provideFieldBoundary } from "../../composables/useFieldBoundary.mjs";
3
- export default defineComponent({
4
- name: "KFieldBoundary",
5
- setup(_, { slots }) {
6
- provideFieldBoundary();
7
- return () => slots.default?.();
8
- }
9
- });