srcdev-nuxt-components 9.4.10 → 9.4.12

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 (94) hide show
  1. package/.claude/commands/migrate-component.md +18 -0
  2. package/.claude/component-ledger/audit.json +1 -1
  3. package/.claude/component-ledger/output.html +1 -1
  4. package/.claude/skills/components/input-number-core.md +214 -0
  5. package/.claude/skills/components/input-select-core.md +151 -0
  6. package/.claude/skills/components/input-text-core.md +16 -0
  7. package/.claude/skills/components/input-textarea-core.md +154 -0
  8. package/.claude/skills/components/select-menu.md +195 -0
  9. package/.claude/skills/components/toggle-switch-core.md +150 -0
  10. package/.claude/skills/index.md +5 -0
  11. package/.vscode/srcdev-component-input-number.code-snippets +65 -0
  12. package/.vscode/srcdev-component-input-select.code-snippets +42 -0
  13. package/.vscode/srcdev-component-input-textarea.code-snippets +40 -0
  14. package/.vscode/srcdev-component-select-menu.code-snippets +65 -0
  15. package/.vscode/srcdev-component-toggle-switch.code-snippets +49 -0
  16. package/app/components/01.atoms/animations/container-glow/CONSUMER-STYLING.md +1 -1
  17. package/app/components/01.atoms/animations/container-glow/ContainerGlow.vue +1 -1
  18. package/app/components/01.atoms/animations/marquee-scroller/CONSUMER-STYLING.md +1 -1
  19. package/app/components/01.atoms/animations/marquee-scroller/MarqueeScroller.vue +1 -1
  20. package/app/components/01.atoms/animations/marquee-scroller/stories/MarqueeScroller.stories.ts +1 -1
  21. package/app/components/01.atoms/animations/section-parallax/CONSUMER-STYLING.md +1 -1
  22. package/app/components/01.atoms/animations/section-parallax/SectionParallax.vue +1 -1
  23. package/app/components/01.atoms/canvas-switcher/CONSUMER-STYLING.md +2 -2
  24. package/app/components/01.atoms/canvas-switcher/CanvasSwitcher.vue +2 -2
  25. package/app/components/01.atoms/card/CardCore.vue +4 -4
  26. package/app/components/01.atoms/clipped-panel/CONSUMER-STYLING.md +2 -2
  27. package/app/components/01.atoms/clipped-panel/ClippedPanel.vue +2 -2
  28. package/app/components/01.atoms/content-wrappers/layout-grid/dashboard-quad-grid/CONSUMER-STYLING.md +2 -2
  29. package/app/components/01.atoms/content-wrappers/layout-grid/dashboard-quad-grid/DashboardQuadGrid.vue +2 -2
  30. package/app/components/01.atoms/content-wrappers/layout-grid/dashboard-quad-grid/stories/DashboardQuadGrid.stories.ts +1 -1
  31. package/app/components/01.atoms/content-wrappers/layout-grid/dashboard-stats-grid/CONSUMER-STYLING.md +1 -1
  32. package/app/components/01.atoms/content-wrappers/layout-grid/dashboard-stats-grid/DashboardStatsGrid.vue +1 -1
  33. package/app/components/01.atoms/display-tooltip/CONSUMER-STYLING.md +8 -8
  34. package/app/components/01.atoms/display-tooltip/DisplayTooltip.vue +8 -8
  35. package/app/components/01.atoms/pop-over/CONSUMER-STYLING.md +6 -6
  36. package/app/components/01.atoms/pop-over/PopOver.vue +6 -6
  37. package/app/components/02.molecules/navigation/deep-expanding-menu/CONSUMER-STYLING.md +1 -1
  38. package/app/components/02.molecules/navigation/deep-expanding-menu/DeepExpandingMenu.vue +1 -1
  39. package/app/components/02.molecules/navigation/deep-expanding-menu-classic/CONSUMER-STYLING.md +1 -1
  40. package/app/components/02.molecules/navigation/deep-expanding-menu-classic/DeepExpandingMenuClassic.vue +1 -1
  41. package/app/components/02.molecules/pricing-card/CONSUMER-STYLING.md +11 -0
  42. package/app/components/02.molecules/pricing-card/PricingCard.vue +3 -1
  43. package/app/components/02.molecules/pricing-card/stories/PricingCard.stories.ts +2 -0
  44. package/app/components/02.molecules/pricing-card/tests/PricingCard.spec.ts +13 -0
  45. package/app/components/02.molecules/select-menu/CONSUMER-STYLING.md +168 -0
  46. package/app/components/02.molecules/select-menu/SelectMenu.vue +384 -0
  47. package/app/components/02.molecules/select-menu/stories/SelectMenu.stories.ts +359 -0
  48. package/app/components/02.molecules/select-menu/tests/SelectMenu.spec.ts +476 -0
  49. package/app/components/02.molecules/select-menu/tests/__snapshots__/SelectMenu.spec.ts.snap +42 -0
  50. package/app/components/03.organisms/image-galleries/carousel-flip/CONSUMER-STYLING.md +3 -3
  51. package/app/components/03.organisms/image-galleries/carousel-flip/CarouselFlip.vue +3 -3
  52. package/app/components/03.organisms/image-galleries/carousel-flip/stories/CarouselFlip.stories.ts +18 -18
  53. package/app/components/05.forms/input-button/CONSUMER-STYLING.md +2 -7
  54. package/app/components/05.forms/input-button/InputButtonCore.vue +1 -5
  55. package/app/components/05.forms/input-number/CONSUMER-STYLING.md +26 -6
  56. package/app/components/05.forms/input-number/InputNumberCore.vue +125 -85
  57. package/app/components/05.forms/input-number/stories/InputNumberCore.stories.ts +92 -0
  58. package/app/components/05.forms/input-number/tests/InputNumberCore.spec.ts +119 -0
  59. package/app/components/05.forms/input-number/variants/InputNumberDefault.vue +30 -22
  60. package/app/components/05.forms/input-number/variants/stories/InputNumberDefault.stories.ts +123 -0
  61. package/app/components/05.forms/input-number/variants/tests/InputNumberDefault.spec.ts +143 -0
  62. package/app/components/05.forms/input-range/CONSUMER-STYLING.md +2 -2
  63. package/app/components/05.forms/input-range/InputRangeCore.vue +2 -2
  64. package/app/components/05.forms/input-select/InputSelectCore.vue +23 -30
  65. package/app/components/05.forms/input-select/stories/InputSelectCore.stories.ts +2 -2
  66. package/app/components/05.forms/input-select/stories/InputSelectWithLabel.stories.ts +115 -0
  67. package/app/components/05.forms/input-select/tests/InputSelectCore.spec.ts +129 -0
  68. package/app/components/05.forms/input-select/variants/InputSelectWithLabel.vue +1 -1
  69. package/app/components/05.forms/input-select/variants/tests/InputSelectWithLabel.spec.ts +87 -0
  70. package/app/components/05.forms/input-text/tests/InputTextAsNumberWithLabel.spec.ts +14 -0
  71. package/app/components/05.forms/input-text/variants/InputTextAsNumberWithLabel.vue +1 -1
  72. package/app/components/05.forms/input-textarea/CONSUMER-STYLING.md +55 -0
  73. package/app/components/05.forms/input-textarea/InputTextareaCore.vue +24 -16
  74. package/app/components/05.forms/input-textarea/stories/InputTextareaWithLabel.stories.ts +1 -1
  75. package/app/components/05.forms/input-textarea/tests/InputTextareaCore.spec.ts +119 -0
  76. package/app/components/05.forms/input-textarea/variants/InputTextareaWithLabel.vue +3 -13
  77. package/app/components/05.forms/input-textarea/variants/tests/InputTextareaWithLabel.spec.ts +93 -0
  78. package/app/components/05.forms/patterns/stories/MigratedFieldsForm.stories.ts +95 -10
  79. package/app/components/05.forms/toggle-switch/CONSUMER-STYLING.md +29 -0
  80. package/app/components/05.forms/toggle-switch/ToggleSwitchCore.vue +120 -119
  81. package/app/components/05.forms/toggle-switch/stories/ToggleSwitchCore.stories.ts +1 -1
  82. package/app/components/05.forms/toggle-switch/stories/ToggleSwitchWithLabel.stories.ts +1 -1
  83. package/app/components/05.forms/toggle-switch/stories/ToggleSwitchWithLabelInline.stories.ts +2 -2
  84. package/app/components/05.forms/toggle-switch/tests/ToggleSwitchCore.spec.ts +101 -0
  85. package/app/components/05.forms/toggle-switch/variants/ToggleSwitchWithLabel.vue +3 -5
  86. package/app/components/05.forms/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +1 -2
  87. package/app/components/05.forms/toggle-switch/variants/tests/ToggleSwitchWithLabel.spec.ts +77 -0
  88. package/app/components/05.forms/toggle-switch/variants/tests/ToggleSwitchWithLabelInline.spec.ts +66 -0
  89. package/app/components/05.forms/triple-toggle-switch/CONSUMER-STYLING.md +4 -4
  90. package/app/components/05.forms/triple-toggle-switch/TripleToggleSwitchCore.vue +6 -6
  91. package/app/types/components/index.ts +1 -0
  92. package/app/types/components/select-menu.d.ts +5 -0
  93. package/package.json +1 -1
  94. package/.vscode/srcdev-component-toggle-switch-core.code-snippets +0 -13
@@ -83,7 +83,7 @@ export default {
83
83
  // Styling
84
84
  theme: {
85
85
  control: { type: "select" },
86
- options: ["primary", "secondary", "tertiary", "ghost", "error", "success", "warning"],
86
+ options: ["default", "success", "error", "warning"],
87
87
  description: "Toggle switch theme",
88
88
  table: {
89
89
  category: "Styling",
@@ -64,7 +64,7 @@ export default {
64
64
  // Styling
65
65
  theme: {
66
66
  control: { type: "select" },
67
- options: ["primary", "secondary", "tertiary", "ghost", "error", "success", "warning"],
67
+ options: ["default", "success", "error", "warning"],
68
68
  description: "Toggle switch theme",
69
69
  table: {
70
70
  category: "Styling",
@@ -243,7 +243,7 @@ export const InlineFormExample: StoryFn = () => ({
243
243
  name="darkMode"
244
244
  label="Dark mode"
245
245
  label-weight="normal"
246
- theme="secondary"
246
+ theme="default"
247
247
  />
248
248
 
249
249
  <StorybookComponent
@@ -0,0 +1,101 @@
1
+ // https://nuxt.com/docs/getting-started/testing#unit-testing
2
+ import type { VueWrapper } from "@vue/test-utils";
3
+ import { mountSuspended } from "@nuxt/test-utils/runtime";
4
+ import ComponentUnderTest from "../ToggleSwitchCore.vue";
5
+
6
+ const initialPropsData = {
7
+ id: "test-toggle",
8
+ name: "testName",
9
+ modelValue: false,
10
+ };
11
+
12
+ let wrapper: VueWrapper<InstanceType<typeof ComponentUnderTest>>;
13
+ const wrapperFactory = (propsData = {}) => {
14
+ const mockPropsData = { ...initialPropsData, ...propsData };
15
+
16
+ return mountSuspended(ComponentUnderTest, {
17
+ attachTo: document.body,
18
+ props: mockPropsData,
19
+ });
20
+ };
21
+
22
+ describe("ToggleSwitchCore", () => {
23
+ it("mounts without error", async () => {
24
+ wrapper = await wrapperFactory();
25
+ expect(wrapper.vm).toBeTruthy();
26
+ });
27
+
28
+ it("binds v-model to the checkbox checked state", async () => {
29
+ wrapper = await wrapperFactory({ modelValue: true });
30
+ const input = wrapper.find<HTMLInputElement>("input[type='checkbox']");
31
+ expect(input.element.checked).toBe(true);
32
+ });
33
+
34
+ it("toggles modelValue when the wrapper is clicked", async () => {
35
+ wrapper = await wrapperFactory({ modelValue: false });
36
+ await wrapper.find(".toggle-switch-wrapper").trigger("click");
37
+ expect(wrapper.emitted("update:modelValue")?.at(-1)).toEqual([true]);
38
+ });
39
+
40
+ it("toggles between custom trueValue/falseValue", async () => {
41
+ wrapper = await wrapperFactory({ modelValue: "off", trueValue: "on", falseValue: "off" });
42
+ await wrapper.find(".toggle-switch-wrapper").trigger("click");
43
+ expect(wrapper.emitted("update:modelValue")?.at(-1)).toEqual(["on"]);
44
+ });
45
+
46
+ it("sets required attribute when required is true", async () => {
47
+ wrapper = await wrapperFactory({ required: true });
48
+ expect(wrapper.find("input").attributes("required")).toBeDefined();
49
+ });
50
+
51
+ it("does not set required attribute by default", async () => {
52
+ wrapper = await wrapperFactory();
53
+ expect(wrapper.find("input").attributes("required")).toBeUndefined();
54
+ });
55
+
56
+ it("sets data-theme from the theme prop", async () => {
57
+ wrapper = await wrapperFactory({ theme: "success" });
58
+ expect(wrapper.find(".toggle-switch-core").attributes("data-theme")).toBe("success");
59
+ });
60
+
61
+ it("sets data-theme to error and aria-invalid when fieldHasError is true, overriding theme", async () => {
62
+ wrapper = await wrapperFactory({ fieldHasError: true, theme: "success" });
63
+ expect(wrapper.find(".toggle-switch-core").attributes("data-theme")).toBe("error");
64
+ expect(wrapper.find("input").attributes("aria-invalid")).toBe("true");
65
+ });
66
+
67
+ it("applies styleClassPassthrough to the root element", async () => {
68
+ wrapper = await wrapperFactory({ styleClassPassthrough: ["custom-toggle-class"] });
69
+ expect(wrapper.find(".toggle-switch-core").classes()).toContain("custom-toggle-class");
70
+ });
71
+
72
+ it("renders default icons when no icon slots are provided", async () => {
73
+ wrapper = await wrapperFactory();
74
+ expect(wrapper.find(".toggle-switch-wrapper").classes()).toContain("use-default-icons");
75
+ });
76
+
77
+ it("renders custom icon slot content instead of the default icon", async () => {
78
+ wrapper = await mountSuspended(ComponentUnderTest, {
79
+ attachTo: document.body,
80
+ props: initialPropsData,
81
+ slots: {
82
+ iconOn: () => "ON",
83
+ iconOff: () => "OFF",
84
+ },
85
+ });
86
+ expect(wrapper.find(".toggle-switch-wrapper").classes()).not.toContain("use-default-icons");
87
+ expect(wrapper.find(".icon-on").text()).toBe("ON");
88
+ expect(wrapper.find(".icon-off").text()).toBe("OFF");
89
+ });
90
+
91
+ it("consumes round as a declared prop instead of leaking it as a DOM attribute", async () => {
92
+ wrapper = await wrapperFactory({ round: false });
93
+ expect(wrapper.props("round")).toBe(false);
94
+ expect(wrapper.attributes("round")).toBeUndefined();
95
+ });
96
+
97
+ it("defaults round to true", async () => {
98
+ wrapper = await wrapperFactory();
99
+ expect(wrapper.props("round")).toBe(true);
100
+ });
101
+ });
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="toggle-switch-with-label" :class="[elementClasses]" :data-theme="theme">
2
+ <div class="toggle-switch-with-label" :class="[elementClasses]" :data-theme="formUiTheme">
3
3
  <InputLabel
4
4
  :id
5
5
  :for="toggleSwitchId"
@@ -68,7 +68,7 @@ const props = withDefaults(defineProps<Props>(), {
68
68
 
69
69
  const slots = useSlots();
70
70
 
71
- const FormUiTheme = computed(() => {
71
+ const formUiTheme = computed(() => {
72
72
  return props.fieldHasError ? "error" : props.theme;
73
73
  });
74
74
 
@@ -84,15 +84,13 @@ const ariaDescribedby = computed(() => {
84
84
  return props.fieldHasError ? errorId.value : ariaDescribedbyId;
85
85
  });
86
86
 
87
- const modelValue = defineModel<string | number | boolean>();
87
+ const modelValue = defineModel<string | number | boolean>({ required: true });
88
88
  const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
89
89
  </script>
90
90
 
91
91
  <style lang="css">
92
92
  @layer components {
93
93
  .toggle-switch-with-label {
94
- --_transition-duration: 0.4s;
95
-
96
94
  .toggle-switch-label {
97
95
  display: block;
98
96
  }
@@ -63,14 +63,13 @@ const labelWeightClass = computed(() => {
63
63
  return labelWeightClassMap[props.labelWeight] || "body-normal-semibold";
64
64
  });
65
65
 
66
- const modelValue = defineModel<string | number | boolean>();
66
+ const modelValue = defineModel<string | number | boolean>({ required: true });
67
67
  const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
68
68
  </script>
69
69
 
70
70
  <style lang="css">
71
71
  @layer components {
72
72
  .toggle-switch-with-label-inline {
73
- --_transition-duration: 0.4s;
74
73
  display: flex;
75
74
  align-items: center;
76
75
  gap: 12px;
@@ -0,0 +1,77 @@
1
+ // https://nuxt.com/docs/getting-started/testing#unit-testing
2
+ import type { VueWrapper } from "@vue/test-utils";
3
+ import { mountSuspended } from "@nuxt/test-utils/runtime";
4
+ import ComponentUnderTest from "../ToggleSwitchWithLabel.vue";
5
+
6
+ const initialPropsData = {
7
+ name: "notifications",
8
+ label: "Enable notifications",
9
+ errorMessage: "",
10
+ modelValue: false,
11
+ };
12
+
13
+ let wrapper: VueWrapper<InstanceType<typeof ComponentUnderTest>>;
14
+ const wrapperFactory = (propsData = {}, slots = {}) => {
15
+ const mockPropsData = { ...initialPropsData, ...propsData };
16
+
17
+ return mountSuspended(ComponentUnderTest, {
18
+ attachTo: document.body,
19
+ props: mockPropsData,
20
+ slots,
21
+ });
22
+ };
23
+
24
+ describe("ToggleSwitchWithLabel", () => {
25
+ it("mounts without error", async () => {
26
+ wrapper = await wrapperFactory();
27
+ expect(wrapper.vm).toBeTruthy();
28
+ });
29
+
30
+ it("renders the label text", async () => {
31
+ wrapper = await wrapperFactory({ label: "Enable dark mode" });
32
+ expect(wrapper.text()).toContain("Enable dark mode");
33
+ });
34
+
35
+ it("renders a checkbox input", async () => {
36
+ wrapper = await wrapperFactory();
37
+ expect(wrapper.find("input[type='checkbox']").exists()).toBe(true);
38
+ });
39
+
40
+ it("associates the label with the checkbox via matching for/id", async () => {
41
+ wrapper = await wrapperFactory();
42
+ const inputId = wrapper.find("input[type='checkbox']").attributes("id");
43
+ expect(wrapper.find("label").attributes("for")).toBe(inputId);
44
+ });
45
+
46
+ it("renders the error message when fieldHasError is true", async () => {
47
+ wrapper = await wrapperFactory({ fieldHasError: true, errorMessage: "You must accept" });
48
+ expect(wrapper.text()).toContain("You must accept");
49
+ });
50
+
51
+ it("renders the description slot", async () => {
52
+ wrapper = await wrapperFactory({}, { description: () => "Turn this on to receive notifications" });
53
+ expect(wrapper.text()).toContain("Turn this on to receive notifications");
54
+ });
55
+
56
+ it("forwards required to the underlying input", async () => {
57
+ wrapper = await wrapperFactory({ required: true });
58
+ expect(wrapper.find("input").attributes("required")).toBeDefined();
59
+ });
60
+
61
+ it("applies the error theme to ToggleSwitchCore when fieldHasError is true", async () => {
62
+ wrapper = await wrapperFactory({ fieldHasError: true, theme: "default" });
63
+ expect(wrapper.find(".toggle-switch-core").attributes("data-theme")).toBe("error");
64
+ });
65
+
66
+ it("applies styleClassPassthrough to the root element", async () => {
67
+ wrapper = await wrapperFactory({ styleClassPassthrough: ["custom-toggle"] });
68
+ expect(wrapper.find(".toggle-switch-with-label").classes()).toContain("custom-toggle");
69
+ });
70
+
71
+ it("forwards round to ToggleSwitchCore without leaking it as a DOM attribute", async () => {
72
+ wrapper = await wrapperFactory({ round: false });
73
+ const core = wrapper.findComponent({ name: "ToggleSwitchCore" });
74
+ expect(core.props("round")).toBe(false);
75
+ expect(wrapper.find(".toggle-switch-core").attributes("round")).toBeUndefined();
76
+ });
77
+ });
@@ -0,0 +1,66 @@
1
+ // https://nuxt.com/docs/getting-started/testing#unit-testing
2
+ import type { VueWrapper } from "@vue/test-utils";
3
+ import { mountSuspended } from "@nuxt/test-utils/runtime";
4
+ import ComponentUnderTest from "../ToggleSwitchWithLabelInline.vue";
5
+
6
+ const initialPropsData = {
7
+ name: "notifications",
8
+ label: "Enable notifications",
9
+ modelValue: false,
10
+ };
11
+
12
+ let wrapper: VueWrapper<InstanceType<typeof ComponentUnderTest>>;
13
+ const wrapperFactory = (propsData = {}, slots = {}) => {
14
+ const mockPropsData = { ...initialPropsData, ...propsData };
15
+
16
+ return mountSuspended(ComponentUnderTest, {
17
+ attachTo: document.body,
18
+ props: mockPropsData,
19
+ slots,
20
+ });
21
+ };
22
+
23
+ describe("ToggleSwitchWithLabelInline", () => {
24
+ it("mounts without error", async () => {
25
+ wrapper = await wrapperFactory();
26
+ expect(wrapper.vm).toBeTruthy();
27
+ });
28
+
29
+ it("renders the label text", async () => {
30
+ wrapper = await wrapperFactory({ label: "Dark mode" });
31
+ expect(wrapper.text()).toContain("Dark mode");
32
+ });
33
+
34
+ it("renders a checkbox input", async () => {
35
+ wrapper = await wrapperFactory();
36
+ expect(wrapper.find("input[type='checkbox']").exists()).toBe(true);
37
+ });
38
+
39
+ it("associates the label with the checkbox via matching for/id", async () => {
40
+ wrapper = await wrapperFactory();
41
+ const inputId = wrapper.find("input[type='checkbox']").attributes("id");
42
+ expect(wrapper.find("label").attributes("for")).toBe(inputId);
43
+ });
44
+
45
+ it("defaults labelWeight to normal", async () => {
46
+ wrapper = await wrapperFactory();
47
+ expect(wrapper.find(".input-switch-label").classes()).toContain("body-normal");
48
+ });
49
+
50
+ it("maps labelWeight to the matching body-* class", async () => {
51
+ wrapper = await wrapperFactory({ labelWeight: "bold" });
52
+ expect(wrapper.find(".input-switch-label").classes()).toContain("body-normal-bold");
53
+ });
54
+
55
+ it("applies styleClassPassthrough to the root element", async () => {
56
+ wrapper = await wrapperFactory({ styleClassPassthrough: ["custom-toggle-inline"] });
57
+ expect(wrapper.find(".toggle-switch-with-label-inline").classes()).toContain("custom-toggle-inline");
58
+ });
59
+
60
+ it("forwards round to ToggleSwitchCore without leaking it as a DOM attribute", async () => {
61
+ wrapper = await wrapperFactory({ round: false });
62
+ const core = wrapper.findComponent({ name: "ToggleSwitchCore" });
63
+ expect(core.props("round")).toBe(false);
64
+ expect(wrapper.find(".toggle-switch-core").attributes("round")).toBeUndefined();
65
+ });
66
+ });
@@ -13,11 +13,11 @@ the shared `--theme-*` token every other themed component also falls back to. Se
13
13
  | `--triple-toggle-switch-border` | `var(--theme-border)` | Wrapper border colour |
14
14
  | `--triple-toggle-switch-ring-focus` | `var(--theme-ring)` | Wrapper outline colour on `:focus-visible` |
15
15
  | `--triple-toggle-switch-marker-surface` | `var(--theme-input-surface)` | Selected-option marker background, when none of the `system`/`light`/`dark` `:has()` overrides below match |
16
- | `--triple-toggle-switch-marker-border` | `light-dark(var(--slate-10), var(--slate-00))` | Selected-option marker border colour |
17
- | `--triple-toggle-switch-option-border` | `light-dark(#00000025, #ffffff50)` | Each option's resting border colour |
18
- | `--triple-toggle-switch-option-border-hover` | `light-dark(var(--slate-10), var(--slate-00))` | Each option's outline colour on hover |
16
+ | `--triple-toggle-switch-marker-border` | `var(--slate-10)` | Selected-option marker border colour |
17
+ | `--triple-toggle-switch-option-border` | `#00000025` | Each option's resting border colour |
18
+ | `--triple-toggle-switch-option-border-hover` | `var(--slate-10)` | Each option's outline colour on hover |
19
19
  | `--triple-toggle-switch-option-ring-focus` | `var(--theme-ring)` | Each option's outline colour on `:focus-visible` |
20
- | `--triple-toggle-switch-option-icon-color` | `light-dark(var(--slate-10), var(--slate-03))` | Option icon colour, resting (shared by the `.system`/`.light`/`.dark` selectors — see note) |
20
+ | `--triple-toggle-switch-option-icon-color` | `var(--slate-10)` | Option icon colour, resting (shared by the `.system`/`.light`/`.dark` selectors — see note) |
21
21
  | `--triple-toggle-switch-option-icon-color-active` | `var(--slate-00)` | Option icon colour, selected |
22
22
 
23
23
  > **Two bugs fixed in this migration**:
@@ -193,7 +193,7 @@ onMounted(() => {
193
193
  background-color: var(--_select-scheme-group-background-color);
194
194
  background-image: var(--_select-scheme-group-background-image);
195
195
  border: var(--form-element-border-width) solid
196
- var(--triple-toggle-switch-marker-border, light-dark(var(--slate-10), var(--slate-00)));
196
+ var(--triple-toggle-switch-marker-border, var(--slate-10));
197
197
 
198
198
  border-radius: 50%;
199
199
 
@@ -227,7 +227,7 @@ onMounted(() => {
227
227
  place-content: center;
228
228
  background: transparent;
229
229
  border: var(--form-element-border-width) solid
230
- var(--triple-toggle-switch-option-border, light-dark(#00000025, #ffffff50));
230
+ var(--triple-toggle-switch-option-border, #00000025);
231
231
  outline: var(--form-element-outline-width) solid transparent;
232
232
  border-radius: 50%;
233
233
  padding: var(--_select-scheme-group-padding);
@@ -237,7 +237,7 @@ onMounted(() => {
237
237
 
238
238
  &:has(.option-icon:hover) {
239
239
  outline: var(--form-element-outline-width) solid
240
- var(--triple-toggle-switch-option-border-hover, light-dark(var(--slate-10), var(--slate-00)));
240
+ var(--triple-toggle-switch-option-border-hover, var(--slate-10));
241
241
  }
242
242
  &:has(input:focus-visible) {
243
243
  outline: var(--form-element-outline-width) solid var(--triple-toggle-switch-option-ring-focus, var(--theme-ring));
@@ -257,7 +257,7 @@ onMounted(() => {
257
257
  font-size: var(--_scheme-icon-font-size);
258
258
 
259
259
  &.system {
260
- color: var(--triple-toggle-switch-option-icon-color, light-dark(var(--slate-10), var(--slate-03)));
260
+ color: var(--triple-toggle-switch-option-icon-color, var(--slate-10));
261
261
 
262
262
  &.active {
263
263
  color: var(--triple-toggle-switch-option-icon-color-active, var(--slate-00));
@@ -265,7 +265,7 @@ onMounted(() => {
265
265
  }
266
266
 
267
267
  &.light {
268
- color: var(--triple-toggle-switch-option-icon-color, light-dark(var(--slate-10), var(--slate-03)));
268
+ color: var(--triple-toggle-switch-option-icon-color, var(--slate-10));
269
269
 
270
270
  &.active {
271
271
  color: var(--triple-toggle-switch-option-icon-color-active, var(--slate-00));
@@ -273,7 +273,7 @@ onMounted(() => {
273
273
  }
274
274
 
275
275
  &.dark {
276
- color: var(--triple-toggle-switch-option-icon-color, light-dark(var(--slate-10), var(--slate-03)));
276
+ color: var(--triple-toggle-switch-option-icon-color, var(--slate-10));
277
277
 
278
278
  &.active {
279
279
  color: var(--triple-toggle-switch-option-icon-color-active, var(--slate-00));
@@ -20,3 +20,4 @@ export * from "./display-tooltip-defined.d"
20
20
  export * from "./marquee-scroller.d"
21
21
  export * from "./rotating-carousel-image.d"
22
22
  export * from "./skip-links.d"
23
+ export * from "./select-menu.d"
@@ -0,0 +1,5 @@
1
+ export interface SelectMenuOption {
2
+ value: string | number
3
+ label: string
4
+ icon?: string
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "9.4.10",
4
+ "version": "9.4.12",
5
5
  "main": "nuxt.config.ts",
6
6
  "types": "types.d.ts",
7
7
  "license": "MIT",
@@ -1,13 +0,0 @@
1
- {
2
- "SRCDEV ToggleSwitchCore": {
3
- "description": "ToggleSwitchCore — bare toggle switch (no label, use ToggleSwitchWithLabel for that)",
4
- "scope": "vue,html",
5
- "body": [
6
- "<ToggleSwitchCore",
7
- " v-model=\"$1modelValue\"",
8
- " id=\"$2toggle-id\"",
9
- " name=\"$3toggleName\"",
10
- "/>"
11
- ]
12
- }
13
- }