srcdev-nuxt-components 9.3.6 → 9.3.8

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 (126) hide show
  1. package/.claude/hooks/check-component-update.sh +30 -1
  2. package/.claude/skills/components/accordian-core.md +7 -7
  3. package/.claude/skills/components/breadcrumb.md +49 -0
  4. package/.claude/skills/components/content-docs.md +2 -1
  5. package/.claude/skills/components/expanding-panel.md +5 -5
  6. package/.claude/skills/components/navigation-items.md +1 -0
  7. package/.claude/skills/components/responsive-header.md +1 -0
  8. package/.claude/skills/components/service-detail.md +156 -0
  9. package/.claude/skills/components/services-card-grid.md +9 -9
  10. package/.claude/skills/components/services-card.md +82 -30
  11. package/.claude/skills/index.md +3 -1
  12. package/.claude/skills/qa-panel.md +2 -2
  13. package/.vscode/srcdev-component-breadcrumb.code-snippets +14 -0
  14. package/.vscode/srcdev-component-service-detail.code-snippets +49 -0
  15. package/.vscode/srcdev-component-services-card.code-snippets +108 -0
  16. package/app/components/01.atoms/content-wrappers/docs-pages/ContentDocs.vue +22 -16
  17. package/app/components/01.atoms/navigation/breadcrumb/Breadcrumb.vue +94 -0
  18. package/app/components/01.atoms/navigation/breadcrumb/CONSUMER-STYLING.md +32 -0
  19. package/app/components/01.atoms/navigation/breadcrumb/stories/Breadcrumb.stories.ts +87 -0
  20. package/app/components/01.atoms/navigation/breadcrumb/tests/Breadcrumb.spec.ts +87 -0
  21. package/app/components/01.atoms/navigation/breadcrumb/tests/__snapshots__/Breadcrumb.spec.ts.snap +13 -0
  22. package/app/components/02.molecules/expandable/accordian/AccordianCore.vue +5 -1
  23. package/app/components/02.molecules/expandable/accordian/tests/AccordianCore.spec.ts +22 -14
  24. package/app/components/02.molecules/expandable/accordian/tests/__snapshots__/AccordianCore.spec.ts.snap +42 -28
  25. package/app/components/02.molecules/expandable/expanding-panel/CONSUMER-STYLING.md +8 -10
  26. package/app/components/02.molecules/expandable/expanding-panel/ExpandingPanel.vue +15 -47
  27. package/app/components/02.molecules/expandable/expanding-panel/tests/__snapshots__/ExpandingPanel.spec.ts.snap +4 -12
  28. package/app/components/03.organisms/responsive-header/NavigationItems.vue +91 -4
  29. package/app/components/03.organisms/responsive-header/ResponsiveHeader.vue +5 -1
  30. package/app/components/03.organisms/responsive-header/tests/NavigationItems.spec.ts +2 -2
  31. package/app/components/03.organisms/responsive-header/tests/__snapshots__/NavigationItems.spec.ts.snap +13 -13
  32. package/app/components/03.organisms/responsive-header/tests/__snapshots__/ResponsiveHeader.spec.ts.snap +13 -13
  33. package/app/components/03.organisms/services/service-detail/CONSUMER-STYLING.md +181 -0
  34. package/app/components/03.organisms/services/service-detail/ServiceDetail.vue +480 -0
  35. package/app/components/03.organisms/services/service-detail/stories/ServiceDetail.stories.ts +282 -0
  36. package/app/components/03.organisms/services/service-detail/tests/ServiceDetail.spec.ts +270 -0
  37. package/app/components/03.organisms/services/service-detail/tests/__snapshots__/ServiceDetail.spec.ts.snap +99 -0
  38. package/app/components/03.organisms/services/services-card/CONSUMER-STYLING.md +129 -0
  39. package/app/components/03.organisms/services/services-card/ServicesCard.vue +153 -39
  40. package/app/components/03.organisms/services/services-card/stories/ServicesCard.stories.ts +65 -0
  41. package/app/components/03.organisms/services/services-card/tests/ServicesCard.spec.ts +82 -0
  42. package/app/components/03.organisms/services/services-card/tests/__snapshots__/ServicesCard.spec.ts.snap +13 -5
  43. package/app/components/03.organisms/services/services-grids/ServicesCardGrid.vue +3 -7
  44. package/app/components/03.organisms/services/services-grids/stories/ServicesCardGrid.stories.ts +126 -2
  45. package/app/components/03.organisms/services/services-grids/stories/ServicesSectionGrid.stories.ts +6 -0
  46. package/app/components/03.organisms/services/services-grids/tests/__snapshots__/ServicesCardGrid.spec.ts.snap +51 -27
  47. package/app/components/03.organisms/services/services-section/ServicesSection.vue +19 -0
  48. package/app/components/03.organisms/services/services-section/tests/__snapshots__/ServicesSection.spec.ts.snap +8 -8
  49. package/app/types/components/breadcrumb.ts +4 -0
  50. package/app/types/components/index.ts +1 -0
  51. package/package.json +2 -2
  52. package/app/pages/auto-grid.vue +0 -328
  53. package/app/pages/banner-video.vue +0 -238
  54. package/app/pages/forms/examples/buttons/index.vue +0 -259
  55. package/app/pages/forms/examples/material/checkbox-radio-panels.vue +0 -244
  56. package/app/pages/forms/examples/material/cssbattle.vue +0 -60
  57. package/app/pages/forms/examples/material/text-fields.vue +0 -910
  58. package/app/pages/grid-stack.vue +0 -252
  59. package/app/pages/index.vue +0 -127
  60. package/app/pages/page-hero-highlights.vue +0 -204
  61. package/app/pages/samaritan.vue +0 -327
  62. package/app/pages/typography/hero-text.vue +0 -97
  63. package/app/pages/typography/index.vue +0 -39
  64. package/app/pages/typography/page-body.vue +0 -171
  65. package/app/pages/typography/page-heading.vue +0 -76
  66. package/app/pages/typography/page-link.vue +0 -103
  67. package/app/pages/ui/accordian.vue +0 -211
  68. package/app/pages/ui/anchor-scroll-tab-navigation.vue +0 -191
  69. package/app/pages/ui/anchor-scroll.vue +0 -367
  70. package/app/pages/ui/animated-svg-text.vue +0 -85
  71. package/app/pages/ui/block-decorators.vue +0 -142
  72. package/app/pages/ui/card-core.vue +0 -82
  73. package/app/pages/ui/carousel-basic.vue +0 -292
  74. package/app/pages/ui/carousel-flip.vue +0 -449
  75. package/app/pages/ui/carousel-infinite.vue +0 -260
  76. package/app/pages/ui/clipped-panels.vue +0 -101
  77. package/app/pages/ui/contact-section.vue +0 -323
  78. package/app/pages/ui/container-glow.vue +0 -106
  79. package/app/pages/ui/content-width.vue +0 -126
  80. package/app/pages/ui/deep-expanding-menu.vue +0 -138
  81. package/app/pages/ui/display-avatar.vue +0 -253
  82. package/app/pages/ui/display-banner.vue +0 -78
  83. package/app/pages/ui/display-chip.vue +0 -367
  84. package/app/pages/ui/display-details.vue +0 -171
  85. package/app/pages/ui/display-dialog.vue +0 -344
  86. package/app/pages/ui/display-pill.vue +0 -396
  87. package/app/pages/ui/display-prompt.vue +0 -284
  88. package/app/pages/ui/display-toast.vue +0 -311
  89. package/app/pages/ui/expanding-panel.vue +0 -326
  90. package/app/pages/ui/glowing-border.vue +0 -111
  91. package/app/pages/ui/layout-content-docs.vue +0 -72
  92. package/app/pages/ui/layout-grid-a.vue +0 -96
  93. package/app/pages/ui/layout-grid-b.vue +0 -132
  94. package/app/pages/ui/magnetic-navigation.vue +0 -50
  95. package/app/pages/ui/marquee-scroller.vue +0 -99
  96. package/app/pages/ui/mask-element.vue +0 -104
  97. package/app/pages/ui/masonry-columns.vue +0 -55
  98. package/app/pages/ui/masonry-grid-ordered-experiment.vue +0 -79
  99. package/app/pages/ui/masonry-grid-ordered.vue +0 -56
  100. package/app/pages/ui/masonry-grid-sorted.vue +0 -55
  101. package/app/pages/ui/masonry-grid.vue +0 -55
  102. package/app/pages/ui/navigation/navigation-horizontal.vue +0 -484
  103. package/app/pages/ui/navigation/site-navigation/about.vue +0 -36
  104. package/app/pages/ui/navigation/site-navigation/contact.vue +0 -39
  105. package/app/pages/ui/navigation/site-navigation/index.vue +0 -38
  106. package/app/pages/ui/navigation/site-navigation/portfolio.vue +0 -43
  107. package/app/pages/ui/navigation/site-navigation/services.vue +0 -42
  108. package/app/pages/ui/navigation/tab-navigation.vue +0 -493
  109. package/app/pages/ui/page-row.vue +0 -127
  110. package/app/pages/ui/price-list.vue +0 -65
  111. package/app/pages/ui/profile-section.vue +0 -142
  112. package/app/pages/ui/qr-code/[componentName].vue +0 -218
  113. package/app/pages/ui/rotating-carousel.vue +0 -154
  114. package/app/pages/ui/scroll-reveal-image.vue +0 -483
  115. package/app/pages/ui/section-parallax.vue +0 -54
  116. package/app/pages/ui/services/colour-finder.vue +0 -43
  117. package/app/pages/ui/services/services-cards.vue +0 -57
  118. package/app/pages/ui/services/services-section/[slug].vue +0 -61
  119. package/app/pages/ui/services/services-sections-compact.vue +0 -64
  120. package/app/pages/ui/settings.vue +0 -54
  121. package/app/pages/ui/simple-grid.vue +0 -55
  122. package/app/pages/ui/slider-gallery.vue +0 -261
  123. package/app/pages/ui/tabs-y.vue +0 -107
  124. package/app/pages/ui/tabs.vue +0 -189
  125. package/app/pages/ui/tooltips.vue +0 -104
  126. package/app/pages/ui/wipe-away-vertical.vue +0 -129
@@ -1,396 +0,0 @@
1
- <template>
2
- <div>
3
- <NuxtLayout name="default">
4
- <template #layout-content>
5
- <PageRow tag="div" variant="popout">
6
- <h1 class="page-heading-2">Display Pill</h1>
7
-
8
- <!-- ── QA Panel (dev only) ───────────────────────────────── -->
9
- <div v-if="isDev" class="qa-panel">
10
- <details class="qa-panel__details" open>
11
- <summary class="qa-panel__summary">
12
- <span class="qa-panel__title">QA — DisplayPill</span>
13
- <code class="qa-panel__status">
14
- variant:{{ qaVariant }} · size:{{ qaSize }} · reversed:{{ qaReversed }}
15
- </code>
16
- </summary>
17
- <div class="qa-panel__body">
18
- <div class="qa-panel__group">
19
- <span class="qa-panel__label">Variant</span>
20
- <div class="qa-panel__chips">
21
- <button
22
- v-for="v in variants"
23
- :key="v"
24
- class="qa-panel__chip"
25
- :class="{ 'is-active': qaVariant === v }"
26
- @click="qaVariant = v"
27
- >
28
- {{ v }}
29
- </button>
30
- </div>
31
- </div>
32
-
33
- <div class="qa-panel__group">
34
- <span class="qa-panel__label">Size</span>
35
- <div class="qa-panel__chips">
36
- <button
37
- v-for="s in sizes"
38
- :key="s"
39
- class="qa-panel__chip"
40
- :class="{ 'is-active': qaSize === s }"
41
- @click="qaSize = s"
42
- >
43
- {{ s }}
44
- </button>
45
- </div>
46
- </div>
47
-
48
- <div class="qa-panel__group">
49
- <span class="qa-panel__label">Reversed</span>
50
- <div class="qa-panel__chips">
51
- <button class="qa-panel__chip" :class="{ 'is-active': !qaReversed }" @click="qaReversed = false">
52
- icon → text
53
- </button>
54
- <button class="qa-panel__chip" :class="{ 'is-active': qaReversed }" @click="qaReversed = true">
55
- text → icon
56
- </button>
57
- </div>
58
- </div>
59
-
60
- <div class="qa-panel__group">
61
- <span class="qa-panel__label">Tag</span>
62
- <div class="qa-panel__chips">
63
- <button
64
- v-for="t in tags"
65
- :key="t"
66
- class="qa-panel__chip"
67
- :class="{ 'is-active': qaTag === t }"
68
- @click="qaTag = t"
69
- >
70
- &lt;{{ t }}&gt;
71
- </button>
72
- </div>
73
- </div>
74
- </div>
75
- </details>
76
- </div>
77
-
78
- <!-- ── Demos ─────────────────────────────────────────────── -->
79
- <section>
80
- <h2 class="page-heading-3">Interactive preview</h2>
81
- <div class="demo-row">
82
- <DisplayPill :tag="qaTag" label="Label text" :variant="qaVariant" :size="qaSize" :reversed="qaReversed">
83
- <template #icon>
84
- <Icon name="material-symbols:star-outline-rounded" class="demo-icon" aria-hidden="true" />
85
- </template>
86
- </DisplayPill>
87
- </div>
88
-
89
- <h2 class="page-heading-3">All variants</h2>
90
- <div class="dl">
91
- <template v-for="v in variants" :key="v">
92
- <div class="dt">{{ v }}</div>
93
- <div class="dd">
94
- <DisplayPill :variant="v" label="Status" :size="qaSize" :reversed="qaReversed">
95
- <template #icon>
96
- <Icon name="material-symbols:circle" class="demo-icon" aria-hidden="true" />
97
- </template>
98
- </DisplayPill>
99
- </div>
100
- </template>
101
- </div>
102
-
103
- <h2 class="page-heading-3">All sizes</h2>
104
- <div class="dl">
105
- <template v-for="s in sizes" :key="s">
106
- <div class="dt">{{ s }}</div>
107
- <div class="dd">
108
- <DisplayPill :size="s" :variant="qaVariant" label="Label" :reversed="qaReversed">
109
- <template #icon>
110
- <Icon name="material-symbols:bolt-rounded" class="demo-icon" aria-hidden="true" />
111
- </template>
112
- </DisplayPill>
113
- </div>
114
- </template>
115
- </div>
116
-
117
- <h2 class="page-heading-3">Border &amp; outline</h2>
118
- <div class="dl">
119
- <div class="dt">Solid border</div>
120
- <div class="dd">
121
- <DisplayPill
122
- label="Bordered"
123
- :variant="qaVariant"
124
- :size="qaSize"
125
- style-class-passthrough="demo-bordered"
126
- >
127
- <template #icon>
128
- <Icon name="material-symbols:circle-outline" class="demo-icon" aria-hidden="true" />
129
- </template>
130
- </DisplayPill>
131
- </div>
132
-
133
- <div class="dt">Dashed border</div>
134
- <div class="dd">
135
- <DisplayPill label="Dashed" :variant="qaVariant" :size="qaSize" style-class-passthrough="demo-dashed">
136
- <template #icon>
137
- <Icon name="material-symbols:circle-outline" class="demo-icon" aria-hidden="true" />
138
- </template>
139
- </DisplayPill>
140
- </div>
141
-
142
- <div class="dt">Outline (focus-ring style)</div>
143
- <div class="dd">
144
- <DisplayPill
145
- label="Outlined"
146
- :variant="qaVariant"
147
- :size="qaSize"
148
- style-class-passthrough="demo-outlined"
149
- >
150
- <template #icon>
151
- <Icon name="material-symbols:circle-outline" class="demo-icon" aria-hidden="true" />
152
- </template>
153
- </DisplayPill>
154
- </div>
155
-
156
- <div class="dt">Border + outline</div>
157
- <div class="dd">
158
- <DisplayPill
159
- label="Both"
160
- :variant="qaVariant"
161
- :size="qaSize"
162
- style-class-passthrough="demo-border-and-outline"
163
- >
164
- <template #icon>
165
- <Icon name="material-symbols:circle-outline" class="demo-icon" aria-hidden="true" />
166
- </template>
167
- </DisplayPill>
168
- </div>
169
- </div>
170
-
171
- <h2 class="page-heading-3">Icon only / label only</h2>
172
- <div class="dl">
173
- <div class="dt">Icon + label (default)</div>
174
- <div class="dd">
175
- <DisplayPill :variant="qaVariant" label="With icon" :size="qaSize">
176
- <template #icon>
177
- <Icon name="material-symbols:check-circle-outline-rounded" class="demo-icon" aria-hidden="true" />
178
- </template>
179
- </DisplayPill>
180
- </div>
181
-
182
- <div class="dt">Label only (no icon)</div>
183
- <div class="dd">
184
- <DisplayPill :variant="qaVariant" label="No icon" :size="qaSize" />
185
- </div>
186
-
187
- <div class="dt">Icon only (no label)</div>
188
- <div class="dd">
189
- <DisplayPill :variant="qaVariant" :size="qaSize" aria-label="Status icon">
190
- <template #icon>
191
- <Icon name="material-symbols:check-circle-outline-rounded" class="demo-icon" aria-hidden="true" />
192
- </template>
193
- </DisplayPill>
194
- </div>
195
-
196
- <div class="dt">Default slot (custom content)</div>
197
- <div class="dd">
198
- <DisplayPill :variant="qaVariant" :size="qaSize">
199
- <template #icon>
200
- <Icon name="material-symbols:info-outline-rounded" class="demo-icon" aria-hidden="true" />
201
- </template>
202
- <strong>Custom</strong>
203
- &nbsp;slot
204
- </DisplayPill>
205
- </div>
206
- </div>
207
- </section>
208
- </PageRow>
209
- </template>
210
- </NuxtLayout>
211
- </div>
212
- </template>
213
-
214
- <script setup lang="ts">
215
- definePageMeta({
216
- layout: false,
217
- });
218
-
219
- useHead({
220
- title: "UI Display Pill",
221
- meta: [{ name: "description", content: "Examples of UI Display Pill" }],
222
- bodyAttrs: {
223
- class: "ui-display-pill-page",
224
- },
225
- });
226
-
227
- const isDev = import.meta.dev;
228
-
229
- const variants = ["default", "primary", "success", "warning", "danger", "neutral"] as const;
230
- const sizes = ["sm", "md", "lg"] as const;
231
- const tags = ["span", "div", "button", "a"] as const;
232
-
233
- type Variant = (typeof variants)[number];
234
- type Size = (typeof sizes)[number];
235
- type Tag = (typeof tags)[number];
236
-
237
- const qaVariant = ref<Variant>("default");
238
- const qaSize = ref<Size>("md");
239
- const qaReversed = ref(false);
240
- const qaTag = ref<Tag>("span");
241
- </script>
242
-
243
- <style lang="css">
244
- .ui-display-pill-page {
245
- .qa-panel {
246
- background: oklch(15% 0 0);
247
- color: white;
248
- font-size: 1.3rem;
249
- margin-block: 2rem;
250
- }
251
-
252
- .qa-panel__details {
253
- padding: 1rem 2rem;
254
- }
255
-
256
- .qa-panel__summary {
257
- cursor: pointer;
258
- display: flex;
259
- align-items: center;
260
- gap: 1.6rem;
261
- list-style: none;
262
- user-select: none;
263
-
264
- &::-webkit-details-marker {
265
- display: none;
266
- }
267
- }
268
-
269
- .qa-panel__title {
270
- font-weight: 600;
271
- font-size: 1.1rem;
272
- text-transform: uppercase;
273
- letter-spacing: 0.08em;
274
- }
275
-
276
- .qa-panel__status {
277
- font-family: monospace;
278
- font-size: 1.2rem;
279
- background: oklch(0% 0 0 / 0.3);
280
- padding: 0.2rem 0.8rem;
281
- border-radius: 0.4rem;
282
- user-select: text;
283
- cursor: text;
284
- }
285
-
286
- .qa-panel__body {
287
- display: flex;
288
- flex-wrap: wrap;
289
- gap: 2.4rem;
290
- padding-block: 1.2rem 0.4rem;
291
- }
292
-
293
- .qa-panel__group {
294
- display: flex;
295
- flex-direction: column;
296
- gap: 0.6rem;
297
- }
298
-
299
- .qa-panel__label {
300
- font-size: 1.1rem;
301
- text-transform: uppercase;
302
- letter-spacing: 0.08em;
303
- opacity: 0.55;
304
- }
305
-
306
- .qa-panel__chips {
307
- display: flex;
308
- flex-wrap: wrap;
309
- gap: 0.4rem;
310
- }
311
-
312
- .qa-panel__chip {
313
- font-family: monospace;
314
- font-size: 1.2rem;
315
- color: white;
316
- background: oklch(0% 0 0 / 0.25);
317
- border: 1px solid oklch(100% 0 0 / 0.18);
318
- padding: 0.3rem 1rem;
319
- border-radius: 0.4rem;
320
- cursor: pointer;
321
- transition: background 0.15s;
322
-
323
- &:hover {
324
- background: oklch(0% 0 0 / 0.4);
325
- }
326
-
327
- &.is-active {
328
- background: oklch(55% 0.18 240);
329
- border-color: oklch(55% 0.18 240);
330
- }
331
- }
332
-
333
- /* ── Demo sections ─────────────────────────────────────────────── */
334
-
335
- section {
336
- margin-top: 2rem;
337
-
338
- .demo-row {
339
- display: flex;
340
- align-items: center;
341
- gap: 1.6rem;
342
- flex-wrap: wrap;
343
- padding-block: 2rem;
344
- }
345
-
346
- .dl {
347
- display: grid;
348
- grid-template-columns: auto auto;
349
- gap: 1.6rem;
350
- align-items: center;
351
- justify-content: start;
352
- margin-block: 1.6rem 2.4rem;
353
-
354
- .dt {
355
- font-weight: bold;
356
- font-size: 1.3rem;
357
- }
358
-
359
- .dd {
360
- margin: 0;
361
- }
362
- }
363
-
364
- .demo-icon {
365
- width: 1em;
366
- height: 1em;
367
- font-size: var(--theme-pill-icon-size, 1.4rem);
368
- }
369
-
370
- /* ── Border / outline demo overrides ──────────────────────────── */
371
-
372
- .demo-bordered.display-pill {
373
- --theme-pill-border-color: currentColor;
374
- --theme-pill-border-width: 1.5px;
375
- }
376
-
377
- .demo-dashed.display-pill {
378
- --theme-pill-border-color: currentColor;
379
- --theme-pill-border-width: 1.5px;
380
- --theme-pill-border-style: dashed;
381
- }
382
-
383
- .demo-outlined.display-pill {
384
- --theme-pill-outline: 2px solid currentColor;
385
- --theme-pill-outline-offset: 3px;
386
- }
387
-
388
- .demo-border-and-outline.display-pill {
389
- --theme-pill-border-color: currentColor;
390
- --theme-pill-border-width: 1.5px;
391
- --theme-pill-outline: 2px solid currentColor;
392
- --theme-pill-outline-offset: 3px;
393
- }
394
- }
395
- }
396
- </style>
@@ -1,284 +0,0 @@
1
- <template>
2
- <div>
3
- <NuxtLayout name="default">
4
- <template #layout-content>
5
- <PageRow tag="div" variant="content" :style-class-passthrough="['pb-12']">
6
- <h1 class="page-heading-2">Display Prompts</h1>
7
-
8
- <div v-if="isDev" class="qa-panel">
9
- <details class="qa-panel__details">
10
- <summary class="qa-panel__summary">
11
- <span class="qa-panel__title">QA — DisplayPrompt</span>
12
- <code class="qa-panel__status">
13
- {{ qaTheme }} · {{ qaDismissible ? "dismissible" : "static" }} ·
14
- {{ qaOutlined ? "outlined" : "no-outline" }} · {{ qaHighContrast ? "high-contrast" : "standard" }} ·
15
- {{ qaMasked ? "masked" : "unmasked" }}
16
- </code>
17
- </summary>
18
- <div class="qa-panel__body">
19
- <div class="qa-panel__group">
20
- <span class="qa-panel__label">Theme</span>
21
- <div class="qa-panel__chips">
22
- <button
23
- v-for="opt in themes"
24
- :key="opt"
25
- class="qa-panel__chip"
26
- :class="{ 'is-active': qaTheme === opt }"
27
- @click="qaTheme = opt"
28
- >
29
- {{ opt }}
30
- </button>
31
- </div>
32
- </div>
33
-
34
- <div class="qa-panel__group">
35
- <span class="qa-panel__label">Dismissible</span>
36
- <div class="qa-panel__chips">
37
- <button
38
- v-for="opt in [true, false]"
39
- :key="String(opt)"
40
- class="qa-panel__chip"
41
- :class="{ 'is-active': qaDismissible === opt }"
42
- @click="qaDismissible = opt"
43
- >
44
- {{ opt ? "yes" : "no" }}
45
- </button>
46
- </div>
47
- </div>
48
-
49
- <div class="qa-panel__group">
50
- <span class="qa-panel__label">Outlined</span>
51
- <div class="qa-panel__chips">
52
- <button
53
- v-for="opt in [true, false]"
54
- :key="String(opt)"
55
- class="qa-panel__chip"
56
- :class="{ 'is-active': qaOutlined === opt }"
57
- @click="qaOutlined = opt"
58
- >
59
- {{ opt ? "yes" : "no" }}
60
- </button>
61
- </div>
62
- </div>
63
-
64
- <div class="qa-panel__group">
65
- <span class="qa-panel__label">High Contrast</span>
66
- <div class="qa-panel__chips">
67
- <button
68
- v-for="opt in [true, false]"
69
- :key="String(opt)"
70
- class="qa-panel__chip"
71
- :class="{ 'is-active': qaHighContrast === opt }"
72
- @click="qaHighContrast = opt"
73
- >
74
- {{ opt ? "yes" : "no" }}
75
- </button>
76
- </div>
77
- </div>
78
-
79
- <div class="qa-panel__group">
80
- <span class="qa-panel__label">Auto Focus</span>
81
- <div class="qa-panel__chips">
82
- <button
83
- v-for="opt in [true, false]"
84
- :key="String(opt)"
85
- class="qa-panel__chip"
86
- :class="{ 'is-active': qaAutoFocus === opt }"
87
- @click="qaAutoFocus = opt"
88
- >
89
- {{ opt ? "yes" : "no" }}
90
- </button>
91
- </div>
92
- </div>
93
-
94
- <div class="qa-panel__group">
95
- <span class="qa-panel__label">Masked</span>
96
- <div class="qa-panel__chips">
97
- <button
98
- v-for="opt in [true, false]"
99
- :key="String(opt)"
100
- class="qa-panel__chip"
101
- :class="{ 'is-active': qaMasked === opt }"
102
- @click="qaMasked = opt"
103
- >
104
- {{ opt ? "yes" : "no" }}
105
- </button>
106
- </div>
107
- </div>
108
- </div>
109
- </details>
110
- </div>
111
-
112
- <section class="prompt-examples pb-12">
113
- <div :class="{ 'masked-bg': qaMasked }">
114
- <DisplayPrompt
115
- :key="promptKey"
116
- :theme="qaTheme"
117
- :dismissible="qaDismissible"
118
- :use-auto-focus="qaAutoFocus"
119
- :masked="qaMasked"
120
- :style-class-passthrough="styleClasses"
121
- >
122
- <template #customDecoratorIcon>
123
- <Icon :name="themeIcons[qaTheme]" class="icon" />
124
- </template>
125
- <template #title>{{ themeLabels[qaTheme] }} Prompt Title</template>
126
- <template #content>This is prompt content, it can contain html or plain text.</template>
127
- </DisplayPrompt>
128
- </div>
129
- </section>
130
- </PageRow>
131
- </template>
132
- </NuxtLayout>
133
- </div>
134
- </template>
135
-
136
- <script setup lang="ts">
137
- import type { DisplayPromptTheme } from "~/types/components";
138
-
139
- definePageMeta({ layout: false });
140
-
141
- useHead({
142
- title: "UI Display Prompts",
143
- meta: [{ name: "description", content: "Examples of UI Display Prompts" }],
144
- bodyAttrs: { class: "displayPrompt-page" },
145
- });
146
-
147
- const isDev = import.meta.dev;
148
-
149
- const themes = ["info", "success", "warning", "error"] as const;
150
-
151
- const qaTheme = ref<DisplayPromptTheme>("info");
152
- const qaDismissible = ref(true);
153
- const qaOutlined = ref(false);
154
- const qaHighContrast = ref(false);
155
- const qaAutoFocus = ref(false);
156
- const qaMasked = ref(false);
157
-
158
- const themeIcons: Record<DisplayPromptTheme, string> = {
159
- info: "akar-icons:info",
160
- success: "akar-icons:check",
161
- warning: "akar-icons:circle-alert",
162
- error: "akar-icons:circle-alert",
163
- };
164
-
165
- const themeLabels: Record<DisplayPromptTheme, string> = {
166
- info: "Info",
167
- success: "Success",
168
- warning: "Warning",
169
- error: "Error",
170
- };
171
-
172
- const styleClasses = computed(() => {
173
- const classes: string[] = [];
174
- if (qaOutlined.value) classes.push("outlined");
175
- if (qaHighContrast.value) classes.push("high-contrast");
176
- return classes;
177
- });
178
-
179
- const promptKey = computed(() => `${qaTheme.value}-${qaDismissible.value}-${qaMasked.value}`);
180
- </script>
181
-
182
- <style lang="css">
183
- .prompt-examples {
184
- display: flex;
185
- flex-direction: column;
186
- gap: 1rem;
187
-
188
- .masked-bg {
189
- padding: 2rem;
190
- border-radius: 0.8rem;
191
- background: linear-gradient(135deg, oklch(40% 0.15 250), oklch(25% 0.1 300));
192
- }
193
- }
194
-
195
- .displayPrompt-page {
196
- .qa-panel {
197
- background: oklch(15% 0 0);
198
- color: white;
199
- font-size: 1.3rem;
200
- margin-block: 1.2rem;
201
- }
202
-
203
- .qa-panel__details {
204
- padding: 1rem 2rem;
205
- }
206
-
207
- .qa-panel__summary {
208
- cursor: pointer;
209
- display: flex;
210
- align-items: center;
211
- gap: 1.6rem;
212
- list-style: none;
213
- user-select: none;
214
-
215
- &::-webkit-details-marker {
216
- display: none;
217
- }
218
- }
219
-
220
- .qa-panel__title {
221
- font-weight: 600;
222
- font-size: 1.1rem;
223
- text-transform: uppercase;
224
- letter-spacing: 0.08em;
225
- }
226
-
227
- .qa-panel__status {
228
- font-family: monospace;
229
- font-size: 1.2rem;
230
- background: oklch(0% 0 0 / 0.3);
231
- padding: 0.2rem 0.8rem;
232
- border-radius: 0.4rem;
233
- user-select: text;
234
- cursor: text;
235
- }
236
-
237
- .qa-panel__body {
238
- display: flex;
239
- flex-wrap: wrap;
240
- gap: 2.4rem;
241
- padding-block: 1.2rem 0.4rem;
242
- }
243
-
244
- .qa-panel__group {
245
- display: flex;
246
- flex-direction: column;
247
- gap: 0.6rem;
248
- }
249
-
250
- .qa-panel__label {
251
- font-size: 1.1rem;
252
- text-transform: uppercase;
253
- letter-spacing: 0.08em;
254
- opacity: 0.55;
255
- }
256
-
257
- .qa-panel__chips {
258
- display: flex;
259
- flex-wrap: wrap;
260
- gap: 0.4rem;
261
- }
262
-
263
- .qa-panel__chip {
264
- font-family: monospace;
265
- font-size: 1.2rem;
266
- color: white;
267
- background: oklch(0% 0 0 / 0.25);
268
- border: 1px solid oklch(100% 0 0 / 0.18);
269
- padding: 0.3rem 1rem;
270
- border-radius: 0.4rem;
271
- cursor: pointer;
272
- transition: background 0.15s;
273
-
274
- &:hover {
275
- background: oklch(0% 0 0 / 0.4);
276
- }
277
-
278
- &.is-active {
279
- background: oklch(55% 0.18 240);
280
- border-color: oklch(55% 0.18 240);
281
- }
282
- }
283
- }
284
- </style>