srcdev-nuxt-components 9.1.49 → 9.1.50

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 (220) hide show
  1. package/.claude/settings.json +2 -4
  2. package/.claude/settings.local.json +22 -2
  3. package/.claude/skills/components/card-core.md +205 -0
  4. package/.claude/skills/components/display-dialog.md +128 -0
  5. package/.claude/skills/components/page-hero-highlights.md +1 -1
  6. package/.claude/skills/components/page-row.md +157 -0
  7. package/.claude/skills/components/services-card-grid.md +4 -4
  8. package/.claude/skills/components/services-section-grid.md +4 -4
  9. package/.claude/skills/components/tab-navigation.md +222 -0
  10. package/.claude/skills/composable-dialog-controls.md +55 -43
  11. package/.claude/skills/index.md +5 -2
  12. package/app/components/01.atoms/card/CONSUMER-STYLING.md +175 -0
  13. package/app/components/01.atoms/card/CardCore.vue +48 -21
  14. package/app/components/01.atoms/display-dialog/CONSUMER-STYLING.md +163 -0
  15. package/app/components/01.atoms/display-dialog/DisplayDialog.vue +277 -0
  16. package/app/components/01.atoms/display-dialog/stories/DisplayDialog.stories.ts +177 -0
  17. package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +264 -0
  18. package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +18 -0
  19. package/app/components/01.atoms/page-row/CONSUMER-STYLING.md +90 -0
  20. package/app/components/01.atoms/page-row/PageRow.vue +115 -0
  21. package/app/components/01.atoms/page-row/stories/PageRow.stories.ts +311 -0
  22. package/app/components/01.atoms/page-row/tests/PageRow.spec.ts +191 -0
  23. package/app/components/02.molecules/navigation/tab-navigation/CONSUMER-STYLING.md +145 -0
  24. package/app/components/02.molecules/navigation/tab-navigation/TabNavigation.vue +21 -11
  25. package/app/components/02.molecules/navigation/tab-navigation/tests/__snapshots__/TabNavigation.spec.ts.snap +12 -6
  26. package/app/components/{forms/ui → 05.forms/form-field}/FormField.vue +12 -19
  27. package/app/components/{forms/ui → 05.forms/form-wrapper}/FormWrapper.vue +6 -6
  28. package/app/components/{forms → 05.forms}/input-button/InputButtonCore.vue +2 -0
  29. package/app/components/{forms → 05.forms}/input-button/stories/InputButtonCore.stories.ts +1 -1
  30. package/app/components/{forms → 05.forms}/input-text/InputTextCore.vue +73 -73
  31. package/app/components/{forms → 05.forms}/input-text/variants/InputTextAsNumberWithLabel.vue +29 -29
  32. package/app/components/carousels/CarouselBasic.vue +99 -99
  33. package/app/components/carousels/CarouselInfinite.vue +150 -150
  34. package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +111 -111
  35. package/app/components/responsive-header/ResponsiveHeader.vue +250 -282
  36. package/app/components/test-storybook/TestStorybook.vue +16 -16
  37. package/app/composables/tests/useDialogControls.spec.ts +34 -64
  38. package/app/composables/useDialogControls.ts +19 -33
  39. package/app/composables/useFormControl.ts +0 -2
  40. package/app/layouts/default.vue +9 -7
  41. package/app/pages/auto-grid.vue +37 -20
  42. package/app/pages/banner-video.vue +2 -2
  43. package/app/pages/forms/examples/buttons/index.vue +189 -215
  44. package/app/pages/forms/examples/material/text-fields.vue +2 -2
  45. package/app/pages/grid-stack.vue +10 -10
  46. package/app/pages/index.vue +20 -20
  47. package/app/pages/samaritan.vue +4 -4
  48. package/app/pages/typography/hero-text.vue +6 -6
  49. package/app/pages/typography/index.vue +4 -4
  50. package/app/pages/typography/page-body.vue +4 -4
  51. package/app/pages/typography/page-heading.vue +4 -4
  52. package/app/pages/typography/page-link.vue +4 -4
  53. package/app/pages/ui/accordian.vue +4 -4
  54. package/app/pages/ui/anchor-scroll-tab-navigation.vue +77 -66
  55. package/app/pages/ui/anchor-scroll.vue +94 -70
  56. package/app/pages/ui/animated-svg-text.vue +4 -4
  57. package/app/pages/ui/block-decorators.vue +11 -11
  58. package/app/pages/ui/card-core.vue +9 -9
  59. package/app/pages/ui/carousel-basic.vue +4 -4
  60. package/app/pages/ui/carousel-flip.vue +2 -2
  61. package/app/pages/ui/carousel-infinite.vue +4 -4
  62. package/app/pages/ui/clipped-panels.vue +10 -10
  63. package/app/pages/ui/contact-section.vue +4 -4
  64. package/app/pages/ui/container-glow.vue +2 -3
  65. package/app/pages/ui/deep-expanding-menu.vue +138 -0
  66. package/app/pages/ui/display-avatar.vue +2 -2
  67. package/app/pages/ui/display-banner.vue +2 -2
  68. package/app/pages/ui/display-chip.vue +32 -25
  69. package/app/pages/ui/display-details.vue +6 -10
  70. package/app/pages/ui/display-dialog.vue +96 -131
  71. package/app/pages/ui/display-pill.vue +27 -33
  72. package/app/pages/ui/display-prompt.vue +4 -4
  73. package/app/pages/ui/display-toast.vue +2 -2
  74. package/app/pages/ui/expanding-panel.vue +12 -16
  75. package/app/pages/ui/glowing-border.vue +12 -12
  76. package/app/pages/ui/layout-grid-a.vue +6 -6
  77. package/app/pages/ui/layout-grid-b.vue +4 -4
  78. package/app/pages/ui/magnetic-navigation.vue +6 -6
  79. package/app/pages/ui/marquee-scroller.vue +2 -2
  80. package/app/pages/ui/mask-element.vue +2 -2
  81. package/app/pages/ui/masonry-columns.vue +4 -4
  82. package/app/pages/ui/masonry-grid-ordered-experiment.vue +4 -4
  83. package/app/pages/ui/masonry-grid-ordered.vue +4 -4
  84. package/app/pages/ui/masonry-grid-sorted.vue +4 -4
  85. package/app/pages/ui/masonry-grid.vue +4 -4
  86. package/app/pages/ui/navigation/navigation-horizontal.vue +12 -12
  87. package/app/pages/ui/navigation/tab-navigation.vue +493 -0
  88. package/app/pages/ui/page-row.vue +127 -0
  89. package/app/pages/ui/price-list.vue +4 -4
  90. package/app/pages/ui/profile-section.vue +4 -4
  91. package/app/pages/ui/qr-code/[componentName].vue +6 -6
  92. package/app/pages/ui/rotating-carousel.vue +16 -16
  93. package/app/pages/ui/scroll-reveal-image.vue +20 -20
  94. package/app/pages/ui/section-parallax.vue +7 -7
  95. package/app/pages/ui/services/colour-finder.vue +4 -4
  96. package/app/pages/ui/services/services-cards.vue +4 -4
  97. package/app/pages/ui/services/services-section/[slug].vue +4 -4
  98. package/app/pages/ui/services/services-sections-compact.vue +6 -6
  99. package/app/pages/ui/settings.vue +10 -10
  100. package/app/pages/ui/simple-grid.vue +2 -2
  101. package/app/pages/ui/slider-gallery.vue +5 -5
  102. package/app/pages/ui/tabs-y.vue +2 -3
  103. package/app/pages/ui/tabs.vue +6 -9
  104. package/app/pages/ui/tooltips.vue +9 -9
  105. package/app/pages/ui/wipe-away-vertical.vue +14 -14
  106. package/package.json +1 -1
  107. package/.claude/skills/components/layout-row.md +0 -239
  108. package/app/components/display-dialog/DisplayDialogCore.vue +0 -276
  109. package/app/components/display-dialog/variants/DisplayDialogConfirm.vue +0 -47
  110. package/app/components/display-dialog/variants/DisplayDialogScrollableContent.vue +0 -51
  111. package/app/components/forms/c12/utils.ts +0 -14
  112. package/app/components/layout-row/LayoutRow.vue +0 -171
  113. package/app/components/layout-row/stories/LayoutRow.stories.ts +0 -528
  114. package/app/pages/ui/layout-row.vue +0 -139
  115. /package/app/components/{forms → 05.forms}/form-errors/InputError.vue +0 -0
  116. /package/app/components/{forms → 05.forms}/form-errors/tests/InputError.spec.ts +0 -0
  117. /package/app/components/{forms → 05.forms}/form-fieldset/FormFieldset.vue +0 -0
  118. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts +0 -0
  119. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-chromium-darwin.png +0 -0
  120. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-firefox-darwin.png +0 -0
  121. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-webkit-darwin.png +0 -0
  122. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-chromium-darwin.png +0 -0
  123. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-firefox-darwin.png +0 -0
  124. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-webkit-darwin.png +0 -0
  125. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-chromium-darwin.png +0 -0
  126. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-firefox-darwin.png +0 -0
  127. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-webkit-darwin.png +0 -0
  128. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-chromium-darwin.png +0 -0
  129. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-firefox-darwin.png +0 -0
  130. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-webkit-darwin.png +0 -0
  131. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-chromium-darwin.png +0 -0
  132. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-firefox-darwin.png +0 -0
  133. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-webkit-darwin.png +0 -0
  134. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-chromium-darwin.png +0 -0
  135. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-firefox-darwin.png +0 -0
  136. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-chromium-darwin.png +0 -0
  137. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-firefox-darwin.png +0 -0
  138. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-webkit-darwin.png +0 -0
  139. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-chromium-darwin.png +0 -0
  140. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-firefox-darwin.png +0 -0
  141. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-webkit-darwin.png +0 -0
  142. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-chromium-darwin.png +0 -0
  143. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-firefox-darwin.png +0 -0
  144. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-webkit-darwin.png +0 -0
  145. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-chromium-darwin.png +0 -0
  146. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-firefox-darwin.png +0 -0
  147. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-webkit-darwin.png +0 -0
  148. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-chromium-darwin.png +0 -0
  149. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-firefox-darwin.png +0 -0
  150. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-webkit-darwin.png +0 -0
  151. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-chromium-darwin.png +0 -0
  152. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-firefox-darwin.png +0 -0
  153. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-webkit-darwin.png +0 -0
  154. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-chromium-darwin.png +0 -0
  155. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-firefox-darwin.png +0 -0
  156. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-webkit-darwin.png +0 -0
  157. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-webkit-darwin.png +0 -0
  158. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-chromium-darwin.png +0 -0
  159. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-firefox-darwin.png +0 -0
  160. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-webkit-darwin.png +0 -0
  161. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-chromium-darwin.png +0 -0
  162. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-firefox-darwin.png +0 -0
  163. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-webkit-darwin.png +0 -0
  164. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-chromium-darwin.png +0 -0
  165. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-firefox-darwin.png +0 -0
  166. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-webkit-darwin.png +0 -0
  167. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-chromium-darwin.png +0 -0
  168. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-firefox-darwin.png +0 -0
  169. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-webkit-darwin.png +0 -0
  170. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-chromium-darwin.png +0 -0
  171. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-firefox-darwin.png +0 -0
  172. /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-webkit-darwin.png +0 -0
  173. /package/app/components/{forms → 05.forms}/input-button/tests/InputButtonCore.spec.ts +0 -0
  174. /package/app/components/{forms → 05.forms}/input-button/tests/__snapshots__/InputButtonCore.spec.ts.snap +0 -0
  175. /package/app/components/{forms → 05.forms}/input-checkbox/MultipleCheckboxes.vue +0 -0
  176. /package/app/components/{forms → 05.forms}/input-checkbox/SingleCheckbox.vue +0 -0
  177. /package/app/components/{forms → 05.forms}/input-checkbox/tests/MultipleCheckboxes.spec.ts +0 -0
  178. /package/app/components/{forms → 05.forms}/input-checkbox/tests/data/tags.json +0 -0
  179. /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioButton.vue +0 -0
  180. /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioCore.vue +0 -0
  181. /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +0 -0
  182. /package/app/components/{forms → 05.forms}/input-checkbox-radio/tests/InputCheckboxRadioCore.spec.ts +0 -0
  183. /package/app/components/{forms → 05.forms}/input-copy/InputCopyCore.vue +0 -0
  184. /package/app/components/{forms → 05.forms}/input-copy/stories/InputCopyCore.stories.ts +0 -0
  185. /package/app/components/{forms → 05.forms}/input-copy/tests/InputCopyCore.spec.ts +0 -0
  186. /package/app/components/{forms → 05.forms}/input-copy/tests/__snapshots__/InputCopyCore.spec.ts.snap +0 -0
  187. /package/app/components/{forms → 05.forms}/input-description/InputDescription.vue +0 -0
  188. /package/app/components/{forms → 05.forms}/input-description/tests/InputDescription.spec.ts +0 -0
  189. /package/app/components/{forms → 05.forms}/input-label/InputLabel.vue +0 -0
  190. /package/app/components/{forms → 05.forms}/input-label/tests/InputLabel.spec.ts +0 -0
  191. /package/app/components/{forms → 05.forms}/input-number/InputNumberCore.vue +0 -0
  192. /package/app/components/{forms → 05.forms}/input-number/variants/InputNumberDefault.vue +0 -0
  193. /package/app/components/{forms → 05.forms}/input-radio/MultipleRadiobuttons.vue +0 -0
  194. /package/app/components/{forms → 05.forms}/input-radio/tests/MultipleRadioButtons.spec.ts +0 -0
  195. /package/app/components/{forms → 05.forms}/input-radio/tests/data/tags.json +0 -0
  196. /package/app/components/{forms → 05.forms}/input-range/InputRangeCore.vue +0 -0
  197. /package/app/components/{forms → 05.forms}/input-range/variants/InputRangeDefault.vue +0 -0
  198. /package/app/components/{forms → 05.forms}/input-range-fancy/InputRangeFancyCore.vue +0 -0
  199. /package/app/components/{forms → 05.forms}/input-range-fancy/InputRangeFancyWithLabel.vue +0 -0
  200. /package/app/components/{forms → 05.forms}/input-select/InputSelectCore.vue +0 -0
  201. /package/app/components/{forms → 05.forms}/input-select/variants/InputSelectWithLabel.vue +0 -0
  202. /package/app/components/{forms → 05.forms}/input-text/stories/InputPasswordWithLabel.stories.ts +0 -0
  203. /package/app/components/{forms → 05.forms}/input-text/stories/InputTextAsNumberWithLabel.stories.ts +0 -0
  204. /package/app/components/{forms → 05.forms}/input-text/stories/InputTextCore.stories.ts +0 -0
  205. /package/app/components/{forms → 05.forms}/input-text/stories/InputTextWithLabel.stories.ts +0 -0
  206. /package/app/components/{forms → 05.forms}/input-text/variants/InputPasswordWithLabel.vue +0 -0
  207. /package/app/components/{forms → 05.forms}/input-text/variants/InputTextWithLabel.vue +0 -0
  208. /package/app/components/{forms → 05.forms}/input-textarea/InputTextareaCore.vue +0 -0
  209. /package/app/components/{forms → 05.forms}/input-textarea/stories/InputTextareaCore.stories.ts +0 -0
  210. /package/app/components/{forms → 05.forms}/input-textarea/stories/InputTextareaWithLabel.stories.ts +0 -0
  211. /package/app/components/{forms → 05.forms}/input-textarea/variants/InputTextareaWithLabel.vue +0 -0
  212. /package/app/components/{forms → 05.forms}/pending-effect/PendingEffect.vue +0 -0
  213. /package/app/components/{forms → 05.forms}/toggle-switch/ToggleSwitchCore.vue +0 -0
  214. /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchCore.stories.ts +0 -0
  215. /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchWithLabel.stories.ts +0 -0
  216. /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchWithLabelInline.stories.ts +0 -0
  217. /package/app/components/{forms → 05.forms}/toggle-switch/variants/ToggleSwitchWithLabel.vue +0 -0
  218. /package/app/components/{forms → 05.forms}/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +0 -0
  219. /package/app/components/{forms → 05.forms}/triple-toggle-switch/TripleToggleSwitchCore.vue +0 -0
  220. /package/app/{components/forms/c12/prop-validators/index.ts → utils/prop-validators.ts} +0 -0
@@ -2,107 +2,77 @@ import { describe, it, expect, vi } from "vitest";
2
2
  import { useDialogControls } from "../useDialogControls";
3
3
 
4
4
  describe("useDialogControls", () => {
5
- // ─── initialiseDialogs ────────────────────────────────────────────────────
5
+ // ─── initialisation ───────────────────────────────────────────────────────
6
6
 
7
- describe("initialiseDialogs", () => {
7
+ describe("initialisation", () => {
8
8
  it("registers each dialog id as false", () => {
9
- const { dialogsConfig, initialiseDialogs } = useDialogControls();
10
- initialiseDialogs(["confirm", "delete"]);
9
+ const { dialogsConfig } = useDialogControls({ confirm: {}, delete: {} });
11
10
  expect(dialogsConfig.confirm).toBe(false);
12
11
  expect(dialogsConfig.delete).toBe(false);
13
12
  });
14
13
 
15
- it("does not affect pre-existing dialog state", () => {
16
- const { dialogsConfig, initialiseDialogs, controlDialogs } = useDialogControls();
17
- initialiseDialogs(["a"]);
18
- controlDialogs("a", true);
19
- initialiseDialogs(["b"]);
20
- expect(dialogsConfig.a).toBe(true); // unchanged
21
- expect(dialogsConfig.b).toBe(false);
14
+ it("defaults to empty config when called with no arguments", () => {
15
+ const { dialogsConfig } = useDialogControls();
16
+ expect(Object.keys(dialogsConfig)).toHaveLength(0);
22
17
  });
23
18
  });
24
19
 
25
- // ─── controlDialogs ───────────────────────────────────────────────────────
20
+ // ─── openDialog ───────────────────────────────────────────────────────────
26
21
 
27
- describe("controlDialogs", () => {
28
- it("sets dialog state to true (open)", () => {
29
- const { dialogsConfig, initialiseDialogs, controlDialogs } = useDialogControls();
30
- initialiseDialogs(["modal"]);
31
- controlDialogs("modal", true);
22
+ describe("openDialog", () => {
23
+ it("sets dialog state to true", () => {
24
+ const { dialogsConfig, openDialog } = useDialogControls({ modal: {} });
25
+ openDialog("modal");
32
26
  expect(dialogsConfig.modal).toBe(true);
33
27
  });
34
28
 
35
- it("sets dialog state to false (close)", () => {
36
- const { dialogsConfig, initialiseDialogs, controlDialogs } = useDialogControls();
37
- initialiseDialogs(["modal"]);
38
- controlDialogs("modal", true);
39
- controlDialogs("modal", false);
40
- expect(dialogsConfig.modal).toBe(false);
41
- });
42
-
43
29
  it("multiple dialogs are independent", () => {
44
- const { dialogsConfig, initialiseDialogs, controlDialogs } = useDialogControls();
45
- initialiseDialogs(["a", "b"]);
46
- controlDialogs("a", true);
30
+ const { dialogsConfig, openDialog } = useDialogControls({ a: {}, b: {} });
31
+ openDialog("a");
47
32
  expect(dialogsConfig.a).toBe(true);
48
33
  expect(dialogsConfig.b).toBe(false);
49
34
  });
50
35
  });
51
36
 
52
- // ─── registerDialogCallbacks + controlDialogs actions ────────────────────
37
+ // ─── closeDialog ──────────────────────────────────────────────────────────
38
+
39
+ describe("closeDialog", () => {
40
+ it("sets dialog state to false", () => {
41
+ const { dialogsConfig, openDialog, closeDialog } = useDialogControls({ modal: {} });
42
+ openDialog("modal");
43
+ closeDialog("modal");
44
+ expect(dialogsConfig.modal).toBe(false);
45
+ });
53
46
 
54
- describe("callbacks", () => {
55
47
  it("fires onConfirm when closing with action='confirm'", () => {
56
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
57
- initialiseDialogs(["modal"]);
58
48
  const onConfirm = vi.fn();
59
- registerDialogCallbacks("modal", { onConfirm });
60
- controlDialogs("modal", false, "confirm");
49
+ const { openDialog, closeDialog } = useDialogControls({ modal: { onConfirm } });
50
+ openDialog("modal");
51
+ closeDialog("modal", "confirm");
61
52
  expect(onConfirm).toHaveBeenCalledOnce();
62
53
  });
63
54
 
64
55
  it("fires onCancel when closing with action='cancel'", () => {
65
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
66
- initialiseDialogs(["modal"]);
67
56
  const onCancel = vi.fn();
68
- registerDialogCallbacks("modal", { onCancel });
69
- controlDialogs("modal", false, "cancel");
57
+ const { openDialog, closeDialog } = useDialogControls({ modal: { onCancel } });
58
+ openDialog("modal");
59
+ closeDialog("modal", "cancel");
70
60
  expect(onCancel).toHaveBeenCalledOnce();
71
61
  });
72
62
 
73
- it("does not fire onConfirm when opening (state=true)", () => {
74
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
75
- initialiseDialogs(["modal"]);
76
- const onConfirm = vi.fn();
77
- registerDialogCallbacks("modal", { onConfirm });
78
- controlDialogs("modal", true, "confirm");
79
- expect(onConfirm).not.toHaveBeenCalled();
80
- });
81
-
82
- it("does not fire onCancel when opening (state=true)", () => {
83
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
84
- initialiseDialogs(["modal"]);
85
- const onCancel = vi.fn();
86
- registerDialogCallbacks("modal", { onCancel });
87
- controlDialogs("modal", true, "cancel");
88
- expect(onCancel).not.toHaveBeenCalled();
89
- });
90
-
91
63
  it("does not fire onConfirm when closing without an action", () => {
92
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
93
- initialiseDialogs(["modal"]);
94
64
  const onConfirm = vi.fn();
95
- registerDialogCallbacks("modal", { onConfirm });
96
- controlDialogs("modal", false);
65
+ const { openDialog, closeDialog } = useDialogControls({ modal: { onConfirm } });
66
+ openDialog("modal");
67
+ closeDialog("modal");
97
68
  expect(onConfirm).not.toHaveBeenCalled();
98
69
  });
99
70
 
100
71
  it("does not fire confirm callback for a different dialog", () => {
101
- const { initialiseDialogs, controlDialogs, registerDialogCallbacks } = useDialogControls();
102
- initialiseDialogs(["a", "b"]);
103
72
  const onConfirm = vi.fn();
104
- registerDialogCallbacks("a", { onConfirm });
105
- controlDialogs("b", false, "confirm");
73
+ const { openDialog, closeDialog } = useDialogControls({ a: { onConfirm }, b: {} });
74
+ openDialog("b");
75
+ closeDialog("b", "confirm");
106
76
  expect(onConfirm).not.toHaveBeenCalled();
107
77
  });
108
78
  });
@@ -1,44 +1,30 @@
1
- export const useDialogControls = () => {
2
- interface DialogConfig {
3
- [key: string]: boolean;
4
- }
5
-
6
- interface DialogCallbacks {
7
- [key: string]: {
8
- onConfirm?: () => void;
9
- onCancel?: () => void;
10
- };
11
- }
1
+ type DialogCallbacks = {
2
+ onConfirm?: () => void;
3
+ onCancel?: () => void;
4
+ };
12
5
 
13
- const dialogsConfig = reactive<DialogConfig>({});
14
- const dialogCallbacks = reactive<DialogCallbacks>({});
6
+ type DialogsSetupConfig = Record<string, DialogCallbacks>;
15
7
 
16
- function initialiseDialogs(dialogIds: string[]) {
17
- dialogIds.forEach((id) => {
18
- dialogsConfig[id] = false;
19
- });
20
- }
8
+ export const useDialogControls = (config: DialogsSetupConfig = {}) => {
9
+ const dialogsConfig = reactive<Record<string, boolean>>(
10
+ Object.fromEntries(Object.keys(config).map((id) => [id, false]))
11
+ );
21
12
 
22
- function registerDialogCallbacks(dialogId: string, callbacks: { onConfirm?: () => void; onCancel?: () => void }) {
23
- dialogCallbacks[dialogId] = callbacks;
24
- }
13
+ const openDialog = (name: string) => {
14
+ dialogsConfig[name] = true;
15
+ };
25
16
 
26
- const controlDialogs = (name: string, state: boolean, action?: 'confirm' | 'cancel') => {
27
- if (!state && action && dialogCallbacks[name]) {
28
- // Execute callback before closing dialog
29
- if (action === 'confirm' && dialogCallbacks[name].onConfirm) {
30
- dialogCallbacks[name].onConfirm!();
31
- } else if (action === 'cancel' && dialogCallbacks[name].onCancel) {
32
- dialogCallbacks[name].onCancel!();
33
- }
17
+ const closeDialog = (name: string, action?: "confirm" | "cancel") => {
18
+ if (action && config[name]) {
19
+ if (action === "confirm") config[name].onConfirm?.();
20
+ else if (action === "cancel") config[name].onCancel?.();
34
21
  }
35
- dialogsConfig[name] = state;
22
+ dialogsConfig[name] = false;
36
23
  };
37
24
 
38
25
  return {
39
26
  dialogsConfig,
40
- controlDialogs,
41
- initialiseDialogs,
42
- registerDialogCallbacks,
27
+ openDialog,
28
+ closeDialog,
43
29
  };
44
30
  };
@@ -6,8 +6,6 @@ import type {
6
6
  ICustomErrorMessage,
7
7
  IErrorMessagesArr,
8
8
  } from "../types/forms/types.forms"
9
- // import { formFieldC12 } from '@/components/forms/c12/utils';
10
-
11
9
  // export function useFormControl(name: string = '') {
12
10
  export function useFormControl(name: string = "") {
13
11
  let savedInitialState = {}
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="page-layout">
3
- <LayoutRow tag="div" variant="full" :style-class-passthrough="['header']">
3
+ <PageRow tag="div" variant="full" :style-class-passthrough="['header']">
4
4
  <template #default>
5
5
  <header class="responsive-header">
6
6
  <nav class="home-navigation" aria-label="Home Navigation">
@@ -37,17 +37,17 @@
37
37
  </ResponsiveHeader>
38
38
  </header>
39
39
  </template>
40
- </LayoutRow>
41
- <LayoutRow id="main-content" class="main-content" tag="main" variant="full" :is-landmark="true">
40
+ </PageRow>
41
+ <PageRow id="main-content" class="main-content" tag="main" variant="full" :is-landmark="true">
42
42
  <template #default>
43
43
  <slot name="layout-content">Page content goes here</slot>
44
44
  </template>
45
- </LayoutRow>
46
- <LayoutRow id="footer-content" tag="footer" variant="full" :is-landmark="true">
45
+ </PageRow>
46
+ <PageRow id="footer-content" tag="footer" variant="full" :is-landmark="true">
47
47
  <template #default>
48
48
  <p>Footer content here</p>
49
49
  </template>
50
- </LayoutRow>
50
+ </PageRow>
51
51
  </div>
52
52
  </template>
53
53
 
@@ -103,8 +103,10 @@ const responsiveNavLinks = {
103
103
  { name: "Block Decorators", path: "/ui/block-decorators" },
104
104
  { name: "Navigation Horizontal", path: "/ui/navigation/navigation-horizontal" },
105
105
  { name: "Site Navigation", path: "/ui/navigation/site-navigation" },
106
+ { name: "Tab Navigation", path: "/ui/navigation/tab-navigation" },
107
+ { name: "Deep Expanding Menu", path: "/ui/deep-expanding-menu" },
106
108
  { name: "Magnetic Navigation", path: "/ui/magnetic-navigation" },
107
- { name: "Layout Row", path: "/ui/layout-row" },
109
+ { name: "Page Row", path: "/ui/page-row" },
108
110
  { name: "Layout Grid A", path: "/ui/layout-grid-a" },
109
111
  { name: "Layout Grid B", path: "/ui/layout-grid-b" },
110
112
  { name: "Simple Grid", path: "/ui/simple-grid" },
@@ -2,26 +2,27 @@
2
2
  <div>
3
3
  <NuxtLayout name="default">
4
4
  <template #layout-content>
5
-
6
- <LayoutRow tag="div" variant="full-width" :style-class-passthrough="['mbe-32']">
5
+ <PageRow tag="div" variant="full" :style-class-passthrough="['mbe-32']">
7
6
  <h1 class="page-heading-1">AutoGrid</h1>
8
7
  <p class="page-body-normal">
9
8
  Responsive auto-fit CSS grid wrapper. Columns auto-fit to a minimum width; when
10
- <code>is-responsive</code> is enabled, the minimum shifts at container breakpoints via
11
- <code>@container</code> queries.
9
+ <code>is-responsive</code>
10
+ is enabled, the minimum shifts at container breakpoints via
11
+ <code>@container</code>
12
+ queries.
12
13
  </p>
13
- </LayoutRow>
14
+ </PageRow>
14
15
 
15
16
  <div v-if="isDev" class="qa-panel">
16
17
  <details class="qa-panel__details">
17
18
  <summary class="qa-panel__summary">
18
19
  <span class="qa-panel__title">QA — AutoGrid</span>
19
20
  <code class="qa-panel__status">
20
- tag:{{ qaTag }} · responsive:{{ qaIsResponsive ? "on" : "off" }} · small:{{ qaMinColSizeSmall }} · default:{{ qaMinColSizeDefault }} · large:{{ qaMinColSizeLarge }} · gap:{{ qaGap }}
21
+ tag:{{ qaTag }} · responsive:{{ qaIsResponsive ? "on" : "off" }} · small:{{ qaMinColSizeSmall }} ·
22
+ default:{{ qaMinColSizeDefault }} · large:{{ qaMinColSizeLarge }} · gap:{{ qaGap }}
21
23
  </code>
22
24
  </summary>
23
25
  <div class="qa-panel__body">
24
-
25
26
  <div class="qa-panel__group">
26
27
  <span class="qa-panel__label">tag</span>
27
28
  <div class="qa-panel__chips">
@@ -31,7 +32,9 @@
31
32
  class="qa-panel__chip"
32
33
  :class="{ 'is-active': qaTag === opt }"
33
34
  @click="qaTag = opt"
34
- >{{ opt }}</button>
35
+ >
36
+ {{ opt }}
37
+ </button>
35
38
  </div>
36
39
  </div>
37
40
 
@@ -44,7 +47,9 @@
44
47
  class="qa-panel__chip"
45
48
  :class="{ 'is-active': qaIsResponsive === opt }"
46
49
  @click="qaIsResponsive = opt"
47
- >{{ opt ? "on" : "off" }}</button>
50
+ >
51
+ {{ opt ? "on" : "off" }}
52
+ </button>
48
53
  </div>
49
54
  </div>
50
55
 
@@ -57,7 +62,9 @@
57
62
  class="qa-panel__chip"
58
63
  :class="{ 'is-active': qaMinColSizeSmall === preset }"
59
64
  @click="qaMinColSizeSmall = preset"
60
- >{{ preset }}</button>
65
+ >
66
+ {{ preset }}
67
+ </button>
61
68
  </div>
62
69
  <input v-model="qaMinColSizeSmall" placeholder="e.g. 200px" class="qa-panel__input" />
63
70
  </div>
@@ -71,7 +78,9 @@
71
78
  class="qa-panel__chip"
72
79
  :class="{ 'is-active': qaMinColSizeDefault === preset }"
73
80
  @click="qaMinColSizeDefault = preset"
74
- >{{ preset }}</button>
81
+ >
82
+ {{ preset }}
83
+ </button>
75
84
  </div>
76
85
  <input v-model="qaMinColSizeDefault" placeholder="e.g. 300px" class="qa-panel__input" />
77
86
  </div>
@@ -85,7 +94,9 @@
85
94
  class="qa-panel__chip"
86
95
  :class="{ 'is-active': qaMinColSizeLarge === preset }"
87
96
  @click="qaMinColSizeLarge = preset"
88
- >{{ preset }}</button>
97
+ >
98
+ {{ preset }}
99
+ </button>
89
100
  </div>
90
101
  <input v-model="qaMinColSizeLarge" placeholder="e.g. 350px" class="qa-panel__input" />
91
102
  </div>
@@ -99,16 +110,17 @@
99
110
  class="qa-panel__chip"
100
111
  :class="{ 'is-active': qaGap === preset }"
101
112
  @click="qaGap = preset"
102
- >{{ preset }}</button>
113
+ >
114
+ {{ preset }}
115
+ </button>
103
116
  </div>
104
117
  <input v-model="qaGap" placeholder="e.g. 2rem" class="qa-panel__input" />
105
118
  </div>
106
-
107
119
  </div>
108
120
  </details>
109
121
  </div>
110
122
 
111
- <LayoutRow tag="div" variant="full-width" :style-class-passthrough="['mbe-32']">
123
+ <PageRow tag="div" variant="full" :style-class-passthrough="['mbe-32']">
112
124
  <div class="auto-grid-demo-container">
113
125
  <AutoGrid
114
126
  :tag="qaTag"
@@ -126,8 +138,7 @@
126
138
  </template>
127
139
  </AutoGrid>
128
140
  </div>
129
- </LayoutRow>
130
-
141
+ </PageRow>
131
142
  </template>
132
143
  </NuxtLayout>
133
144
  </div>
@@ -230,7 +241,9 @@ const statCards = [
230
241
  list-style: none;
231
242
  user-select: none;
232
243
 
233
- &::-webkit-details-marker { display: none; }
244
+ &::-webkit-details-marker {
245
+ display: none;
246
+ }
234
247
  }
235
248
 
236
249
  .qa-panel__title {
@@ -287,7 +300,9 @@ const statCards = [
287
300
  cursor: pointer;
288
301
  transition: background 0.15s;
289
302
 
290
- &:hover { background: oklch(0% 0 0 / 0.4); }
303
+ &:hover {
304
+ background: oklch(0% 0 0 / 0.4);
305
+ }
291
306
 
292
307
  &.is-active {
293
308
  background: oklch(55% 0.18 240);
@@ -305,7 +320,9 @@ const statCards = [
305
320
  border-radius: 0.4rem;
306
321
  width: 18rem;
307
322
 
308
- &::placeholder { opacity: 0.45; }
323
+ &::placeholder {
324
+ opacity: 0.45;
325
+ }
309
326
  }
310
327
  }
311
328
  </style>
@@ -15,7 +15,7 @@
15
15
  :style-class-passthrough="['mbe-32']"
16
16
  />
17
17
 
18
- <LayoutRow tag="div" variant="full-width">
18
+ <PageRow tag="div" variant="full">
19
19
  <div class="banner-video-demo-controls">
20
20
  <p class="demo-controls__heading">Props</p>
21
21
 
@@ -109,7 +109,7 @@
109
109
  />
110
110
  </div>
111
111
  </div>
112
- </LayoutRow>
112
+ </PageRow>
113
113
  </template>
114
114
  </NuxtLayout>
115
115
  </div>