srcdev-nuxt-components 9.1.54 → 9.1.56

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 (101) hide show
  1. package/.claude/settings.json +29 -2
  2. package/.claude/skills/components/alert-content-inner.md +60 -0
  3. package/.claude/skills/components/display-dialog.md +80 -0
  4. package/.claude/skills/components/display-prompt.md +163 -0
  5. package/.claude/skills/components/display-toast.md +235 -0
  6. package/.claude/skills/index.md +7 -3
  7. package/.claude/skills/theming-colour-ramps.md +328 -0
  8. package/.claude/skills/theming-override-default.md +115 -186
  9. package/.claude/skills/theming-partial-override.md +88 -75
  10. package/README.md +166 -0
  11. package/app/app.config.ts +44 -0
  12. package/app/assets/styles/setup/01.config/_head.css +3 -3
  13. package/app/assets/styles/setup/02.colours/_amber.css +12 -10
  14. package/app/assets/styles/setup/02.colours/_blue.css +10 -9
  15. package/app/assets/styles/setup/02.colours/_green.css +12 -11
  16. package/app/assets/styles/setup/02.colours/_orange.css +12 -10
  17. package/app/assets/styles/setup/02.colours/_red.css +10 -9
  18. package/app/assets/styles/setup/02.colours/_slate.css +12 -11
  19. package/app/assets/styles/setup/02.colours/_sunset.css +12 -10
  20. package/app/assets/styles/setup/02.colours/_theme-params.css +18 -0
  21. package/app/assets/styles/setup/02.colours/index.css +1 -0
  22. package/app/assets/styles/setup/03.theming/_default.css +87 -0
  23. package/app/assets/styles/setup/03.theming/_error.css +14 -0
  24. package/app/assets/styles/setup/03.theming/_success.css +4 -0
  25. package/app/assets/styles/setup/03.theming/_theme-slots.css +16 -0
  26. package/app/assets/styles/setup/03.theming/_warning.css +13 -0
  27. package/app/assets/styles/setup/03.theming/index.css +6 -4
  28. package/app/assets/styles/setup/03.theming/theme-ramp.css +19 -0
  29. package/app/assets/styles/setup/04.elements/forms/00.element-defaults.css +0 -7
  30. package/app/assets/styles/setup/04.elements/forms/06.button-geometry.css +1 -1
  31. package/app/assets/styles/setup/index.css +1 -1
  32. package/app/components/01.atoms/display-dialog/DisplayDialog.vue +74 -24
  33. package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +148 -14
  34. package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +3 -3
  35. package/app/components/01.atoms/page-row/PageRow.vue +5 -0
  36. package/app/components/01.atoms/prompt/DisplayPrompt.vue +113 -0
  37. package/app/components/01.atoms/prompt/stories/DisplayPrompt.stories.ts +112 -0
  38. package/app/components/01.atoms/prompt/tests/DisplayPrompt.spec.ts +205 -0
  39. package/app/components/01.atoms/toast/DisplayToast.vue +327 -0
  40. package/app/components/01.atoms/toast/DisplayToastProvider.vue +362 -0
  41. package/app/components/01.atoms/toast/stories/DisplayToast.stories.ts +195 -0
  42. package/app/components/01.atoms/toast/stories/DisplayToastProvider.stories.ts +142 -0
  43. package/app/components/01.atoms/toast/tests/DisplayToast.spec.ts +266 -0
  44. package/app/components/01.atoms/toast/tests/DisplayToastProvider.spec.ts +256 -0
  45. package/app/components/02.molecules/action-menu/ActionMenu.vue +8 -1
  46. package/app/components/02.molecules/action-menu/ActionMenuItemCore.vue +11 -3
  47. package/app/components/02.molecules/alert-content/AlertContent.vue +67 -0
  48. package/app/components/02.molecules/alert-content/AlertContentInner.vue +153 -0
  49. package/app/components/02.molecules/alert-content/stories/AlertContent.stories.ts +131 -0
  50. package/app/components/02.molecules/alert-content/tests/AlertContent.spec.ts +135 -0
  51. package/app/components/02.molecules/alert-content/tests/AlertContentInner.spec.ts +135 -0
  52. package/app/components/02.molecules/alert-masked-content/AlertMaskedContent.vue +78 -0
  53. package/app/components/02.molecules/alert-masked-content/stories/AlertMaskedContent.stories.ts +132 -0
  54. package/app/components/02.molecules/alert-masked-content/tests/AlertMaskedContent.spec.ts +149 -0
  55. package/app/components/05.forms/input-button/InputButtonCore.vue +35 -39
  56. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioButton.vue +8 -8
  57. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioCore.vue +5 -5
  58. package/app/components/05.forms/input-copy/InputCopyCore.vue +7 -7
  59. package/app/components/05.forms/input-number/InputNumberCore.vue +5 -5
  60. package/app/components/05.forms/input-select/InputSelectCore.vue +6 -6
  61. package/app/components/05.forms/input-text/InputTextCore.vue +6 -6
  62. package/app/components/05.forms/input-text/variants/InputTextAsNumberWithLabel.vue +2 -2
  63. package/app/components/05.forms/input-textarea/InputTextareaCore.vue +5 -5
  64. package/app/components/05.forms/pending-effect/PendingEffect.vue +60 -60
  65. package/app/components/05.forms/toggle-switch/ToggleSwitchCore.vue +10 -10
  66. package/app/components/05.forms/triple-toggle-switch/TripleToggleSwitchCore.vue +4 -4
  67. package/app/components/display-theme-switch/DisplayThemeSwitch.vue +4 -4
  68. package/app/components/display-tooltip/DisplayTooltip.vue +4 -4
  69. package/app/composables/useBodyLock.ts +21 -0
  70. package/app/composables/useDialogControls.ts +11 -11
  71. package/app/composables/useToastQueue.ts +39 -0
  72. package/app/layouts/default.vue +1 -1
  73. package/app/pages/ui/display-dialog.vue +275 -127
  74. package/app/pages/ui/display-prompt.vue +255 -52
  75. package/app/pages/ui/display-toast.vue +278 -299
  76. package/app/pages/ui/mask-element.vue +25 -3
  77. package/app/pages/ui/settings.vue +9 -35
  78. package/app/types/app-config.d.ts +41 -0
  79. package/app/types/components/display-prompt.d.ts +11 -0
  80. package/app/types/components/display-toast.d.ts +11 -9
  81. package/app/types/components/index.ts +2 -0
  82. package/app/types/components/semantic-theme.d.ts +1 -0
  83. package/nuxt.config.ts +16 -0
  84. package/package.json +6 -4
  85. package/app/assets/styles/setup/03.theming/default/_dark.css +0 -156
  86. package/app/assets/styles/setup/03.theming/default/_light.css +0 -166
  87. package/app/assets/styles/setup/03.theming/default/index.css +0 -2
  88. package/app/assets/styles/setup/03.theming/error/_dark.css +0 -56
  89. package/app/assets/styles/setup/03.theming/error/_light.css +0 -74
  90. package/app/assets/styles/setup/03.theming/error/index.css +0 -2
  91. package/app/assets/styles/setup/03.theming/success/_dark.css +0 -50
  92. package/app/assets/styles/setup/03.theming/success/_light.css +0 -65
  93. package/app/assets/styles/setup/03.theming/success/index.css +0 -2
  94. package/app/assets/styles/setup/03.theming/warning/_dark.css +0 -50
  95. package/app/assets/styles/setup/03.theming/warning/_light.css +0 -64
  96. package/app/assets/styles/setup/03.theming/warning/index.css +0 -2
  97. package/app/components/display-prompt/DisplayPromptCore.vue +0 -228
  98. package/app/components/display-prompt/variants/DisplayPromptError.vue +0 -53
  99. package/app/components/display-toast/DisplayToast.vue +0 -447
  100. package/app/components/display-toast/molecules/DefaultToastContent.vue +0 -163
  101. package/app/components/display-toast/stories/DisplayToast.stories.ts +0 -380
@@ -1,380 +0,0 @@
1
- import type { Meta, StoryFn } from "@nuxtjs/storybook";
2
- import { ref, onMounted } from "vue";
3
- import StorybookComponent from "../DisplayToast.vue";
4
-
5
- // Custom interface for story args
6
- interface ToastStoryArgs {
7
- theme: "primary" | "secondary" | "success" | "warning" | "error" | "info";
8
- position: "top" | "bottom";
9
- alignment: "left" | "center" | "right";
10
- fullWidth: boolean;
11
- autoDismiss: boolean;
12
- duration: number;
13
- revealDuration: number;
14
- text: string;
15
- customIcon: string;
16
- // DisplayPromptCore specific props
17
- usePrompt: boolean;
18
- promptTheme: "primary" | "secondary" | "success" | "warning" | "error" | "info";
19
- dismissible: boolean;
20
- promptTitle: string;
21
- promptContent: string;
22
- useAutoFocus: boolean;
23
- styleClassPassthrough: string[];
24
- }
25
-
26
- export default {
27
- title: "Components/UI/DisplayToast",
28
- component: StorybookComponent,
29
- argTypes: {
30
- // Appearance Config
31
- theme: {
32
- control: { type: "select" },
33
- options: ["primary", "secondary", "success", "warning", "error", "info"],
34
- description: "Toast theme/variant",
35
- table: {
36
- category: "Appearance",
37
- },
38
- },
39
- position: {
40
- control: { type: "select" },
41
- options: ["top", "bottom"],
42
- description: "Vertical position of toast",
43
- table: {
44
- category: "Appearance",
45
- },
46
- },
47
- alignment: {
48
- control: { type: "select" },
49
- options: ["left", "center", "right"],
50
- description: "Horizontal alignment of toast",
51
- table: {
52
- category: "Appearance",
53
- },
54
- },
55
- fullWidth: {
56
- control: { type: "boolean" },
57
- description: "Whether toast spans full width",
58
- table: {
59
- category: "Appearance",
60
- },
61
- },
62
- // Behavior Config
63
- autoDismiss: {
64
- control: { type: "boolean" },
65
- description: "Auto dismiss toast after duration",
66
- table: {
67
- category: "Behavior",
68
- },
69
- },
70
- duration: {
71
- control: { type: "range", min: 1000, max: 10000, step: 500 },
72
- description: "Auto dismiss duration in milliseconds",
73
- table: {
74
- category: "Behavior",
75
- },
76
- },
77
- revealDuration: {
78
- control: { type: "range", min: 100, max: 1000, step: 50 },
79
- description: "Animation duration for reveal/hide",
80
- table: {
81
- category: "Behavior",
82
- },
83
- },
84
- // Content Config
85
- text: {
86
- control: { type: "text" },
87
- description: "Toast message text",
88
- table: {
89
- category: "Content",
90
- },
91
- },
92
- customIcon: {
93
- control: { type: "text" },
94
- description: "Custom icon name (e.g., 'akar-icons:check-box')",
95
- table: {
96
- category: "Content",
97
- },
98
- },
99
- // DisplayPromptCore Config
100
- usePrompt: {
101
- control: { type: "boolean" },
102
- description: "Use DisplayPromptCore instead of simple text",
103
- table: {
104
- category: "Prompt",
105
- },
106
- },
107
- promptTheme: {
108
- control: { type: "select" },
109
- options: ["primary", "secondary", "success", "warning", "error", "info"],
110
- description: "Theme for DisplayPromptCore",
111
- table: {
112
- category: "Prompt",
113
- },
114
- },
115
- dismissible: {
116
- control: { type: "boolean" },
117
- description: "Whether DisplayPromptCore is dismissible",
118
- table: {
119
- category: "Prompt",
120
- },
121
- },
122
- promptTitle: {
123
- control: { type: "text" },
124
- description: "Title for DisplayPromptCore",
125
- table: {
126
- category: "Prompt",
127
- },
128
- },
129
- promptContent: {
130
- control: { type: "text" },
131
- description: "Content for DisplayPromptCore",
132
- table: {
133
- category: "Prompt",
134
- },
135
- },
136
- useAutoFocus: {
137
- control: { type: "boolean" },
138
- description: "Auto focus DisplayPromptCore",
139
- table: {
140
- category: "Prompt",
141
- },
142
- },
143
- styleClassPassthrough: {
144
- control: { type: "object" },
145
- description: "Style classes for DisplayPromptCore (e.g., ['dark', 'outlined'])",
146
- table: {
147
- category: "Prompt",
148
- },
149
- },
150
- // Hide complex internal props
151
- config: {
152
- table: {
153
- disable: true,
154
- },
155
- },
156
- modelValue: {
157
- table: {
158
- disable: true,
159
- },
160
- },
161
- },
162
- args: {
163
- theme: "primary",
164
- position: "top",
165
- alignment: "right",
166
- fullWidth: false,
167
- autoDismiss: false,
168
- duration: 3000,
169
- revealDuration: 300,
170
- text: "This is a toast notification message",
171
- customIcon: "",
172
- usePrompt: false,
173
- promptTheme: "primary",
174
- dismissible: true,
175
- promptTitle: "Prompt Title",
176
- promptContent: "This is prompt content, it can contain html or plain text.",
177
- useAutoFocus: false,
178
- styleClassPassthrough: ["dark", "outlined"],
179
- },
180
- } as Meta<ToastStoryArgs>;
181
-
182
- const Template: StoryFn<ToastStoryArgs> = (args) => ({
183
- components: {
184
- StorybookComponent,
185
- },
186
- setup() {
187
- const isActive = ref(false);
188
-
189
- // Auto-trigger toast for demo
190
- onMounted(() => {
191
- setTimeout(() => {
192
- isActive.value = true;
193
- }, 500);
194
- });
195
-
196
- return { args, isActive };
197
- },
198
- template: `
199
- <div style="position: relative; height: 200px; padding: 20px;">
200
- <p style="margin-bottom: 20px;">Toast will appear and demonstrate the configured behavior:</p>
201
- <p v-if="args.usePrompt" style="margin-bottom: 10px; font-style: italic; color: #666;">
202
- Note: DisplayPromptCore examples require component to be properly loaded in the environment.
203
- </p>
204
- <button
205
- @click="isActive = true"
206
- style="padding: 8px 16px; background: #0066cc; color: white; border: none; border-radius: 4px; cursor: pointer;"
207
- >
208
- Trigger Toast
209
- </button>
210
-
211
- <StorybookComponent
212
- v-model="isActive"
213
- :config="{
214
- appearance: {
215
- theme: args.theme,
216
- position: args.position,
217
- alignment: args.alignment,
218
- fullWidth: args.fullWidth
219
- },
220
- behavior: {
221
- autoDismiss: args.autoDismiss,
222
- duration: args.duration,
223
- revealDuration: args.revealDuration
224
- },
225
- content: args.usePrompt ? {
226
- text: args.promptTitle + ': ' + args.promptContent
227
- } : {
228
- text: args.text,
229
- ...(args.customIcon && { customIcon: args.customIcon })
230
- },
231
- }"
232
- />
233
- </div>
234
- `,
235
- });
236
-
237
- export const Default = Template.bind({});
238
-
239
- export const SuccessToast = Template.bind({});
240
- SuccessToast.args = {
241
- theme: "success",
242
- text: "Success! Your action was completed.",
243
- customIcon: "akar-icons:check-box",
244
- autoDismiss: false,
245
- duration: 4000,
246
- position: "top",
247
- alignment: "right",
248
- fullWidth: false,
249
- revealDuration: 300,
250
- };
251
-
252
- export const ErrorToast = Template.bind({});
253
- ErrorToast.args = {
254
- theme: "error",
255
- text: "Error! Something went wrong.",
256
- autoDismiss: false,
257
- position: "top",
258
- alignment: "center",
259
- fullWidth: false,
260
- duration: 3000,
261
- revealDuration: 300,
262
- customIcon: "",
263
- };
264
-
265
- export const BottomCenterToast = Template.bind({});
266
- BottomCenterToast.args = {
267
- theme: "info",
268
- text: "Info message at bottom center",
269
- position: "bottom",
270
- alignment: "center",
271
- autoDismiss: false,
272
- duration: 5000,
273
- fullWidth: false,
274
- revealDuration: 300,
275
- customIcon: "",
276
- };
277
-
278
- export const FullWidthToast = Template.bind({});
279
- FullWidthToast.args = {
280
- theme: "warning",
281
- text: "Full width warning message",
282
- fullWidth: true,
283
- position: "top",
284
- alignment: "left",
285
- autoDismiss: false,
286
- duration: 6000,
287
- revealDuration: 300,
288
- customIcon: "",
289
- };
290
-
291
- // DisplayPromptCore Examples - Based on Playground
292
- export const ErrorPromptToast = Template.bind({});
293
- ErrorPromptToast.args = {
294
- theme: "error",
295
- position: "top",
296
- alignment: "right",
297
- fullWidth: false,
298
- autoDismiss: false,
299
- duration: 5000,
300
- revealDuration: 300,
301
- usePrompt: true,
302
- promptTheme: "error",
303
- dismissible: false,
304
- promptTitle: "Error Prompt Title with content",
305
- promptContent: "This is an error prompt content, it can contain html or plain text.",
306
- useAutoFocus: false,
307
- styleClassPassthrough: ["dark", "outlined"],
308
- };
309
-
310
- export const SuccessPromptToast = Template.bind({});
311
- SuccessPromptToast.args = {
312
- theme: "success",
313
- position: "top",
314
- alignment: "right",
315
- fullWidth: false,
316
- autoDismiss: false,
317
- duration: 3000,
318
- revealDuration: 300,
319
- usePrompt: true,
320
- promptTheme: "success",
321
- dismissible: true,
322
- promptTitle: "Success Prompt Title with content (Dismissible)",
323
- promptContent: "This is success prompt content, it can contain html or plain text.",
324
- useAutoFocus: true,
325
- styleClassPassthrough: ["dark", "outlined"],
326
- };
327
-
328
- export const InfoPromptFullWidth = Template.bind({});
329
- InfoPromptFullWidth.args = {
330
- theme: "info",
331
- position: "top",
332
- alignment: "center",
333
- fullWidth: true,
334
- autoDismiss: false,
335
- duration: 4000,
336
- revealDuration: 300,
337
- usePrompt: true,
338
- promptTheme: "info",
339
- dismissible: false,
340
- promptTitle: "Info Prompt Title with content (Auto Dismiss)",
341
- promptContent: "This is info prompt content displayed full width.",
342
- useAutoFocus: false,
343
- styleClassPassthrough: ["dark", "outlined"],
344
- };
345
-
346
- export const WarningPromptBottomCenter = Template.bind({});
347
- WarningPromptBottomCenter.args = {
348
- theme: "warning",
349
- position: "bottom",
350
- alignment: "center",
351
- fullWidth: false,
352
- autoDismiss: false,
353
- duration: 6000,
354
- revealDuration: 300,
355
- usePrompt: true,
356
- promptTheme: "warning",
357
- dismissible: true,
358
- promptTitle: "Warning Prompt at Bottom Center",
359
- promptContent: "This warning prompt appears at the bottom center with auto dismiss.",
360
- useAutoFocus: false,
361
- styleClassPassthrough: ["outlined"],
362
- };
363
-
364
- export const PrimaryPromptCustomStyles = Template.bind({});
365
- PrimaryPromptCustomStyles.args = {
366
- theme: "primary",
367
- position: "top",
368
- alignment: "left",
369
- fullWidth: false,
370
- autoDismiss: false,
371
- duration: 3000,
372
- revealDuration: 500,
373
- usePrompt: true,
374
- promptTheme: "primary",
375
- dismissible: true,
376
- promptTitle: "Primary Prompt with Custom Styles",
377
- promptContent: "This prompt uses custom style configurations and slower reveal animation.",
378
- useAutoFocus: false,
379
- styleClassPassthrough: ["dark"],
380
- };