srcdev-nuxt-components 9.6.11 → 9.6.13
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.
- package/.claude/rules/consumer/ids-from-useid.md +2 -1
- package/.claude/rules/consumer/vfor-keys-from-data.md +14 -0
- package/.claude/skills/component-compliance-checklist.md +24 -1
- package/.claude/skills/component-naming.md +1 -0
- package/.claude/skills/components/banner-video.md +24 -30
- package/.claude/skills/components/content-docs.md +18 -5
- package/.claude/skills/components/display-dialog.md +16 -6
- package/.claude/skills/components/{display-tooltip-defined.md → display-tooltip-rich.md} +40 -42
- package/.claude/skills/components/display-tooltip.md +17 -6
- package/.claude/skills/components/form-field.md +15 -0
- package/.claude/skills/components/form-fieldset.md +18 -2
- package/.claude/skills/components/marquee-scroller.md +51 -14
- package/.claude/skills/components/skip-links.md +16 -0
- package/.claude/skills/composable-tooltips-guide.md +4 -4
- package/.claude/skills/index.md +6 -6
- package/.claude/skills/testing-add-unit-test.md +8 -0
- package/.vscode/srcdev-component-banner-video.code-snippets +38 -25
- package/.vscode/srcdev-component-content-docs.code-snippets +69 -60
- package/.vscode/srcdev-component-display-dialog.code-snippets +7 -5
- package/.vscode/srcdev-component-display-tooltip-rich.code-snippets +50 -0
- package/.vscode/srcdev-component-display-tooltip.code-snippets +31 -0
- package/.vscode/srcdev-component-form-field.code-snippets +7 -6
- package/.vscode/srcdev-component-form-fieldset.code-snippets +12 -12
- package/.vscode/srcdev-component-marquee-scroller.code-snippets +31 -28
- package/.vscode/srcdev-component-skip-links.code-snippets +1 -1
- package/app/components/01.atoms/animations/marquee-scroller/CONSUMER-STYLING.md +77 -54
- package/app/components/01.atoms/animations/marquee-scroller/MarqueeScroller.vue +103 -91
- package/app/components/01.atoms/animations/marquee-scroller/stories/MarqueeScroller.stories.ts +132 -3
- package/app/components/01.atoms/animations/marquee-scroller/tests/MarqueeScroller.spec.ts +190 -102
- package/app/components/01.atoms/animations/marquee-scroller/tests/__snapshots__/MarqueeScroller.spec.ts.snap +17 -13
- package/app/components/01.atoms/banner-video/BannerVideo.vue +51 -19
- package/app/components/01.atoms/banner-video/CONSUMER-STYLING.md +59 -40
- package/app/components/01.atoms/banner-video/stories/BannerVideo.stories.ts +88 -1
- package/app/components/01.atoms/banner-video/tests/BannerVideo.spec.ts +127 -78
- package/app/components/01.atoms/banner-video/tests/__snapshots__/BannerVideo.spec.ts.snap +12 -4
- package/app/components/01.atoms/content-wrappers/docs-pages/CONSUMER-STYLING.md +42 -14
- package/app/components/01.atoms/content-wrappers/docs-pages/ContentDocs.vue +86 -112
- package/app/components/01.atoms/content-wrappers/docs-pages/stories/ContentDocs.stories.ts +134 -8
- package/app/components/01.atoms/content-wrappers/docs-pages/tests/ContentDocs.spec.ts +131 -65
- package/app/components/01.atoms/display-dialog/CONSUMER-STYLING.md +28 -3
- package/app/components/01.atoms/display-dialog/DisplayDialog.vue +39 -31
- package/app/components/01.atoms/display-dialog/stories/DisplayDialog.stories.ts +92 -1
- package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +87 -41
- package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +5 -1
- package/app/components/01.atoms/display-tooltip/CONSUMER-STYLING.md +70 -24
- package/app/components/01.atoms/display-tooltip/DisplayTooltip.vue +24 -12
- package/app/components/01.atoms/display-tooltip/stories/DisplayTooltip.stories.ts +89 -2
- package/app/components/01.atoms/display-tooltip/tests/DisplayTooltip.spec.ts +65 -18
- package/app/components/01.atoms/display-tooltip/tests/__snapshots__/DisplayTooltip.spec.ts.snap +3 -3
- package/app/components/01.atoms/navigation/skip-links/CONSUMER-STYLING.md +65 -19
- package/app/components/01.atoms/navigation/skip-links/SkipLinks.vue +20 -14
- package/app/components/01.atoms/navigation/skip-links/stories/SkipLinks.stories.ts +89 -20
- package/app/components/01.atoms/navigation/skip-links/tests/SkipLinks.spec.ts +70 -10
- package/app/components/02.molecules/display-tooltip-rich/CONSUMER-STYLING.md +110 -0
- package/app/components/02.molecules/display-tooltip-rich/DisplayTooltipRich.vue +148 -0
- package/app/components/02.molecules/display-tooltip-rich/stories/DisplayTooltipRich.stories.ts +254 -0
- package/app/components/02.molecules/display-tooltip-rich/tests/DisplayTooltipRich.spec.ts +156 -0
- package/app/components/02.molecules/display-tooltip-rich/tests/__snapshots__/DisplayTooltipRich.spec.ts.snap +22 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/DeepExpandingMenu.vue +1 -0
- package/app/components/02.molecules/navigation/deep-expanding-menu/tests/__snapshots__/DeepExpandingMenu.spec.ts.snap +1 -1
- package/app/components/03.organisms/image-galleries/carousel-flip/CarouselFlip.vue +1 -0
- package/app/components/05.forms/form-field/CONSUMER-STYLING.md +7 -0
- package/app/components/05.forms/form-field/stories/FormField.stories.ts +116 -2
- package/app/components/05.forms/form-fieldset/CONSUMER-STYLING.md +11 -1
- package/app/components/05.forms/form-fieldset/FormFieldset.vue +4 -2
- package/app/components/05.forms/form-fieldset/stories/FormFieldset.stories.ts +68 -4
- package/app/components/05.forms/form-fieldset/tests/FormFieldset.spec.ts +10 -0
- package/app/composables/tests/useTooltips.spec.ts +3 -3
- package/app/types/components/index.ts +1 -1
- package/package.json +1 -1
- package/.vscode/srcdev-component-display-tooltip-defined.code-snippets +0 -29
- package/app/components/02.molecules/display-tooltip-defined/CONSUMER-STYLING.md +0 -53
- package/app/components/02.molecules/display-tooltip-defined/DisplayTooltipDefined.vue +0 -117
- package/app/components/02.molecules/display-tooltip-defined/stories/DisplayTooltipDefined.stories.ts +0 -129
- package/app/components/02.molecules/display-tooltip-defined/tests/DisplayTooltipDefined.spec.ts +0 -85
- package/app/components/02.molecules/display-tooltip-defined/tests/__snapshots__/DisplayTooltipDefined.spec.ts.snap +0 -17
- /package/app/types/components/{display-tooltip-defined.d.ts → display-tooltip-rich.d.ts} +0 -0
|
@@ -34,5 +34,36 @@
|
|
|
34
34
|
" </template>",
|
|
35
35
|
"</DisplayTooltip>"
|
|
36
36
|
]
|
|
37
|
+
},
|
|
38
|
+
"SRCDEV DisplayTooltip Custom Icon": {
|
|
39
|
+
"description": "DisplayTooltip with a custom trigger icon and localised label",
|
|
40
|
+
"scope": "vue,html",
|
|
41
|
+
"body": [
|
|
42
|
+
"<DisplayTooltip trigger-icon=\"${1:lucide:info}\" trigger-aria-label=\"${2:More information}\">",
|
|
43
|
+
" <template #triggerContent>",
|
|
44
|
+
" <span>$3</span>",
|
|
45
|
+
" </template>",
|
|
46
|
+
" <template #tooltipContent>",
|
|
47
|
+
" <p>$0</p>",
|
|
48
|
+
" </template>",
|
|
49
|
+
"</DisplayTooltip>"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"SRCDEV DisplayTooltip CSS Override": {
|
|
53
|
+
"description": "CSS override scaffold for DisplayTooltip, scoped to a page or section class",
|
|
54
|
+
"scope": "css",
|
|
55
|
+
"body": [
|
|
56
|
+
".${1:my-page} {",
|
|
57
|
+
" .display-tooltip {",
|
|
58
|
+
" --display-tooltip-trigger-icon-box-size: ;",
|
|
59
|
+
" --display-tooltip-trigger-icon-colour: ;",
|
|
60
|
+
" --display-tooltip-popover-width: ;",
|
|
61
|
+
" --display-tooltip-popover-background-colour: ;",
|
|
62
|
+
" --display-tooltip-popover-text-colour: ;",
|
|
63
|
+
" --display-tooltip-popover-outline-colour: ;",
|
|
64
|
+
" --display-tooltip-popover-border-radius: ;",
|
|
65
|
+
" }",
|
|
66
|
+
"}"
|
|
67
|
+
]
|
|
37
68
|
}
|
|
38
69
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "FormField layout wrapper around a single form control",
|
|
4
4
|
"scope": "vue,html",
|
|
5
5
|
"body": [
|
|
6
|
-
"<FormField width=\"${1|wide,medium,narrow|}\" :has-gutter=\"${2|false,true|}\" :field-has-error=\"!!$
|
|
6
|
+
"<FormField width=\"${1|wide,medium,narrow|}\" :has-gutter=\"${2|false,true|}\" :field-has-error=\"!!${3:errors.fieldName}\">",
|
|
7
7
|
" $0",
|
|
8
8
|
"</FormField>"
|
|
9
9
|
]
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
"description": "CSS override scaffold for FormField tokens",
|
|
13
13
|
"scope": "css",
|
|
14
14
|
"body": [
|
|
15
|
-
".$
|
|
15
|
+
".${1:my-page} {",
|
|
16
16
|
" .form-field {",
|
|
17
|
-
" --form-field-max-width-narrow: $2;",
|
|
18
|
-
" --form-field-gutter-width: $3;",
|
|
19
|
-
" --form-field-margin-block: $4;",
|
|
20
|
-
" --form-field-background-color: $5;",
|
|
17
|
+
" --form-field-max-width-narrow: ${2:400px};",
|
|
18
|
+
" --form-field-gutter-width: ${3:1.6rem};",
|
|
19
|
+
" --form-field-margin-block: ${4:0 1.6rem};",
|
|
20
|
+
" --form-field-background-color: ${5:transparent};",
|
|
21
|
+
" --form-field-border-radius: ${6:0.4rem};",
|
|
21
22
|
" }",
|
|
22
23
|
"}"
|
|
23
24
|
]
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"scope": "vue,html",
|
|
5
5
|
"body": [
|
|
6
6
|
"<FormFieldset",
|
|
7
|
-
" id=\"$
|
|
8
|
-
" name=\"$
|
|
9
|
-
" legend=\"$
|
|
7
|
+
" id=\"${1:fieldId}\"",
|
|
8
|
+
" name=\"${2:fieldName}\"",
|
|
9
|
+
" legend=\"${3:Legend}\"",
|
|
10
10
|
" group-role=\"${4|group,radiogroup|}\"",
|
|
11
|
-
" :field-has-error=\"!!$
|
|
11
|
+
" :field-has-error=\"!!${5:errors.fieldName}\"",
|
|
12
12
|
">",
|
|
13
13
|
" <template #content>",
|
|
14
14
|
" $0",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"description": "CSS override scaffold for FormFieldset tokens",
|
|
21
21
|
"scope": "css",
|
|
22
22
|
"body": [
|
|
23
|
-
".$
|
|
23
|
+
".${1:my-page} {",
|
|
24
24
|
" .form-fieldset {",
|
|
25
|
-
" --form-fieldset-padding-block: $
|
|
26
|
-
" --form-fieldset-padding-inline: $
|
|
27
|
-
" --form-fieldset-border: $
|
|
28
|
-
" --form-fieldset-legend-color: $
|
|
29
|
-
" --form-fieldset-legend-font-size: $
|
|
30
|
-
" --form-fieldset-legend-font-weight: $
|
|
31
|
-
" --form-fieldset-legend-margin-block: $
|
|
25
|
+
" --form-fieldset-padding-block: ${2:0};",
|
|
26
|
+
" --form-fieldset-padding-inline: ${3:0};",
|
|
27
|
+
" --form-fieldset-border: ${4:0};",
|
|
28
|
+
" --form-fieldset-legend-color: ${5:inherit};",
|
|
29
|
+
" --form-fieldset-legend-font-size: ${6:var(--step-5)};",
|
|
30
|
+
" --form-fieldset-legend-font-weight: ${7:normal};",
|
|
31
|
+
" --form-fieldset-legend-margin-block: ${8:0.8rem};",
|
|
32
32
|
" }",
|
|
33
33
|
"}"
|
|
34
34
|
]
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
"body": [
|
|
6
6
|
"<MarqueeScroller",
|
|
7
7
|
" :marquee-data=\"[",
|
|
8
|
-
" { id: 1, content: '$
|
|
9
|
-
" { id: 2, content: '$
|
|
8
|
+
" { id: 1, content: '${1:logo-a}' },",
|
|
9
|
+
" { id: 2, content: '${2:logo-b}' },",
|
|
10
10
|
" ]\"",
|
|
11
11
|
" :item-config=\"{ width: '${3:120px}', height: '${4:60px}', gap: '${5:24px}' }\"",
|
|
12
|
+
" :style-class-passthrough=\"[${6:}]\"",
|
|
12
13
|
">",
|
|
13
14
|
" <template #1>",
|
|
14
|
-
" $
|
|
15
|
+
" $7",
|
|
15
16
|
" </template>",
|
|
16
17
|
" <template #2>",
|
|
17
|
-
" $
|
|
18
|
+
" $8",
|
|
18
19
|
" </template>",
|
|
19
20
|
"</MarqueeScroller>"
|
|
20
21
|
]
|
|
@@ -24,11 +25,11 @@
|
|
|
24
25
|
"scope": "vue,html",
|
|
25
26
|
"body": [
|
|
26
27
|
"<MarqueeScroller",
|
|
27
|
-
" :marquee-data=\"$
|
|
28
|
+
" :marquee-data=\"${1:items}\"",
|
|
28
29
|
" show-controls",
|
|
29
|
-
" aria-label=\"$
|
|
30
|
+
" aria-label=\"${2:Scrolling client logos}\"",
|
|
30
31
|
">",
|
|
31
|
-
" <template v-for=\"item in $
|
|
32
|
+
" <template v-for=\"item in ${1:items}\" #[item.id] :key=\"item.id\">",
|
|
32
33
|
" $3",
|
|
33
34
|
" </template>",
|
|
34
35
|
"</MarqueeScroller>"
|
|
@@ -39,14 +40,14 @@
|
|
|
39
40
|
"scope": "vue,html",
|
|
40
41
|
"body": [
|
|
41
42
|
"<MarqueeScroller",
|
|
42
|
-
" :marquee-data=\"$
|
|
43
|
+
" :marquee-data=\"${1:items}\"",
|
|
43
44
|
" show-controls",
|
|
44
45
|
" play-icon=\"${2:mdi:play-circle}\"",
|
|
45
46
|
" pause-icon=\"${3:mdi:pause-circle}\"",
|
|
46
47
|
" play-label=\"${4:Play}\"",
|
|
47
48
|
" pause-label=\"${5:Pause}\"",
|
|
48
49
|
">",
|
|
49
|
-
" <template v-for=\"item in $
|
|
50
|
+
" <template v-for=\"item in ${1:items}\" #[item.id] :key=\"item.id\">",
|
|
50
51
|
" $6",
|
|
51
52
|
" </template>",
|
|
52
53
|
"</MarqueeScroller>"
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"description": "MarqueeScroller with the toggle-icon slot fully replacing the control button's icon",
|
|
57
58
|
"scope": "vue,html",
|
|
58
59
|
"body": [
|
|
59
|
-
"<MarqueeScroller :marquee-data=\"$
|
|
60
|
+
"<MarqueeScroller :marquee-data=\"${1:items}\" show-controls>",
|
|
60
61
|
" <template #toggle-icon=\"{ isPaused }\">",
|
|
61
62
|
" $2",
|
|
62
63
|
" </template>",
|
|
@@ -67,25 +68,27 @@
|
|
|
67
68
|
"description": "CSS override scaffold for MarqueeScroller — scope to a page or section class",
|
|
68
69
|
"scope": "css",
|
|
69
70
|
"body": [
|
|
70
|
-
".$
|
|
71
|
+
".${1:my-page} {",
|
|
71
72
|
" .marquee-scroller {",
|
|
72
|
-
" --marquee-scroller-fade-width: ;",
|
|
73
|
-
" --marquee-scroller-focus-outline-width: ;",
|
|
74
|
-
" --marquee-scroller-focus-outline-
|
|
75
|
-
" --marquee-scroller-
|
|
76
|
-
" --marquee-scroller-item-border-
|
|
77
|
-
" --marquee-scroller-item-border-
|
|
78
|
-
" --marquee-scroller-item-
|
|
79
|
-
" --marquee-scroller-
|
|
80
|
-
" --marquee-scroller-
|
|
81
|
-
" --marquee-scroller-
|
|
82
|
-
" --marquee-scroller-control-
|
|
83
|
-
" --marquee-scroller-control-background-colour
|
|
84
|
-
" --marquee-scroller-control-
|
|
85
|
-
" --marquee-scroller-control-
|
|
86
|
-
" --marquee-scroller-control-border-
|
|
87
|
-
" --marquee-scroller-control-
|
|
88
|
-
" --marquee-scroller-control-
|
|
73
|
+
" --marquee-scroller-fade-width: ${2:10%};",
|
|
74
|
+
" --marquee-scroller-focus-outline-width: ${3:2px};",
|
|
75
|
+
" --marquee-scroller-focus-outline-colour: ${4:var(--theme-ring)};",
|
|
76
|
+
" --marquee-scroller-focus-outline-offset: ${5:2px};",
|
|
77
|
+
" --marquee-scroller-item-border-colour: ${6:var(--slate-10)};",
|
|
78
|
+
" --marquee-scroller-item-border-width: ${7:1px};",
|
|
79
|
+
" --marquee-scroller-item-border-radius: ${8:4px};",
|
|
80
|
+
" --marquee-scroller-item-transition-duration: ${9:0.5s};",
|
|
81
|
+
" --marquee-scroller-group-hover-filter: ${10:grayscale(1)};",
|
|
82
|
+
" --marquee-scroller-item-hover-filter: ${11:grayscale(0)};",
|
|
83
|
+
" --marquee-scroller-control-offset: ${12:8px};",
|
|
84
|
+
" --marquee-scroller-control-background-colour: ${13:rgba(0, 0, 0, 0.7)};",
|
|
85
|
+
" --marquee-scroller-control-background-colour-hover: ${14:rgba(0, 0, 0, 0.9)};",
|
|
86
|
+
" --marquee-scroller-control-text-colour: ${15:white};",
|
|
87
|
+
" --marquee-scroller-control-border-radius: ${16:4px};",
|
|
88
|
+
" --marquee-scroller-control-border-width: ${17:1px};",
|
|
89
|
+
" --marquee-scroller-control-padding: ${18:8px};",
|
|
90
|
+
" --marquee-scroller-control-font-size: ${19:14px};",
|
|
91
|
+
" --marquee-scroller-control-transition-duration: ${20:0.2s};",
|
|
89
92
|
" }",
|
|
90
93
|
"}"
|
|
91
94
|
]
|
|
@@ -2,17 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## Public token API
|
|
4
4
|
|
|
5
|
+
### Region
|
|
6
|
+
|
|
5
7
|
| Token | Default | Controls |
|
|
6
8
|
|---|---|---|
|
|
7
9
|
| `--marquee-scroller-fade-width` | `10%` | Width of the transparent fade at each edge of the track (`mask-image`) |
|
|
8
|
-
| `--marquee-scroller-focus-outline-width` | `2px` | Outline width on the root region and the control button when keyboard-focused
|
|
10
|
+
| `--marquee-scroller-focus-outline-width` | `2px` | Outline width on the root region and the control button when keyboard-focused |
|
|
11
|
+
| `--marquee-scroller-focus-outline-colour` | `var(--theme-ring)` | Outline colour on the same two focus states |
|
|
9
12
|
| `--marquee-scroller-focus-outline-offset` | `2px` | Outline offset on the same two focus states |
|
|
13
|
+
|
|
14
|
+
### Items
|
|
15
|
+
|
|
16
|
+
| Token | Default | Controls |
|
|
17
|
+
|---|---|---|
|
|
10
18
|
| `--marquee-scroller-group-hover-filter` | `grayscale(1)` | Filter applied to every item when the pointer hovers anywhere over the scroller |
|
|
11
19
|
| `--marquee-scroller-item-hover-filter` | `grayscale(0)` | Filter applied to a single item when it is individually hovered (overrides the group filter for that item) |
|
|
12
20
|
| `--marquee-scroller-item-transition-duration` | `0.5s` | Transition duration for the item hover filter change |
|
|
13
21
|
| `--marquee-scroller-item-border-width` | `1px` | Item border width |
|
|
14
22
|
| `--marquee-scroller-item-border-colour` | `var(--slate-10)` | Item border colour |
|
|
15
23
|
| `--marquee-scroller-item-border-radius` | `4px` | Item border radius |
|
|
24
|
+
|
|
25
|
+
### Control button
|
|
26
|
+
|
|
27
|
+
| Token | Default | Controls |
|
|
28
|
+
|---|---|---|
|
|
16
29
|
| `--marquee-scroller-control-offset` | `8px` | Distance of the pause/play button from the top and end edges |
|
|
17
30
|
| `--marquee-scroller-control-background-colour` | `rgba(0, 0, 0, 0.7)` | Pause/play button background |
|
|
18
31
|
| `--marquee-scroller-control-background-colour-hover` | `rgba(0, 0, 0, 0.9)` | Pause/play button background on hover |
|
|
@@ -21,15 +34,35 @@
|
|
|
21
34
|
| `--marquee-scroller-control-padding` | `8px` | Pause/play button padding |
|
|
22
35
|
| `--marquee-scroller-control-font-size` | `14px` | Pause/play button icon font size |
|
|
23
36
|
| `--marquee-scroller-control-transition-duration` | `0.2s` | Pause/play button background-colour transition duration |
|
|
24
|
-
| `--marquee-scroller-control-border-width` | `1px` | Pause/play button border width
|
|
37
|
+
| `--marquee-scroller-control-border-width` | `1px` | Pause/play button border width under `prefers-contrast: high`. The border colour itself stays the system `ButtonText` keyword, see below. |
|
|
25
38
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
Private tokens (not public API): `--_fade-width`, `--_focus-outline` (width + colour, shared by
|
|
40
|
+
both focus states) and `--_track-shift` (the loop distance, computed from `itemConfig`).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## State hooks
|
|
45
|
+
|
|
46
|
+
The root `.marquee-scroller` carries:
|
|
47
|
+
|
|
48
|
+
| Attribute | When |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `data-paused` | The track is paused (control button, spacebar, focus inside, or reduced motion) |
|
|
51
|
+
| `data-reverse` | `reverse` is `true` |
|
|
52
|
+
| `data-reduced-motion` | The user prefers reduced motion and `respect-reduced-motion` is on |
|
|
53
|
+
|
|
54
|
+
Inner elements: `.marquee-scroller-track` (the animated row), `.marquee-scroller-group` (one copy
|
|
55
|
+
of the items; the second is `aria-hidden` and `inert`), `.marquee-scroller-item` (one fixed-size
|
|
56
|
+
item box), `.marquee-scroller-control` (the pause/play `InputButton`) and
|
|
57
|
+
`.marquee-scroller-description` (the visually hidden instructions).
|
|
58
|
+
|
|
59
|
+
> **Changed 2026-10-17**: the generic class names were renamed so they can't collide with consumer
|
|
60
|
+
> CSS. `.item` → `.marquee-scroller-item`, `.control-btn` → `.marquee-scroller-control` (now an
|
|
61
|
+
> `InputButton`, so it also has `.input-button`), `.marquee-track` → `.marquee-scroller-track`,
|
|
62
|
+
> `.marquee-group` → `.marquee-scroller-group`, `.sr-only` → `.marquee-scroller-description`. The
|
|
63
|
+
> bare state classes became attributes: `.reverse` → `[data-reverse]`, `.paused` →
|
|
64
|
+
> `[data-paused]`, `.reduced-motion` → `[data-reduced-motion]`. The keyframes are now
|
|
65
|
+
> `marquee-scroller-move` (was `marqueeMove`).
|
|
33
66
|
|
|
34
67
|
---
|
|
35
68
|
|
|
@@ -37,10 +70,9 @@
|
|
|
37
70
|
|
|
38
71
|
Under `prefers-contrast: high`, the control button switches to the system colour keywords
|
|
39
72
|
`ButtonFace`/`ButtonText` rather than the component's own background/text tokens. These aren't
|
|
40
|
-
exposed as overridable tokens on purpose
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
constraint.
|
|
73
|
+
exposed as overridable tokens on purpose: they track the user's OS-level high-contrast theme, which
|
|
74
|
+
a component-level override would defeat. Only the border *width* in that mode is a token
|
|
75
|
+
(`--marquee-scroller-control-border-width`), since it's a plain dimension with no such constraint.
|
|
44
76
|
|
|
45
77
|
---
|
|
46
78
|
|
|
@@ -48,7 +80,7 @@ constraint.
|
|
|
48
80
|
|
|
49
81
|
Item `width`/`height`/`gap` and the animation duration are set via the `itemConfig` and
|
|
50
82
|
`animationRuntime` props (not CSS custom properties), since they also drive the component's own
|
|
51
|
-
|
|
83
|
+
loop math (`--_track-shift`) and the repeat measurement. Override those through props:
|
|
52
84
|
|
|
53
85
|
```vue
|
|
54
86
|
<MarqueeScroller
|
|
@@ -57,58 +89,49 @@ layout math (`aspect-ratio`, track width). Override those through props:
|
|
|
57
89
|
/>
|
|
58
90
|
```
|
|
59
91
|
|
|
60
|
-
|
|
92
|
+
Item boxes are a fixed size. Text in an item wraps (`overflow-wrap: anywhere`), but content taller
|
|
93
|
+
than `itemConfig.height` overflows, so size slot content to the box.
|
|
61
94
|
|
|
62
|
-
|
|
95
|
+
---
|
|
63
96
|
|
|
64
|
-
|
|
65
|
-
markup for each item via that dynamically-named slot:
|
|
97
|
+
## Global theming
|
|
66
98
|
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<template #2>
|
|
73
|
-
<img src="/logos/b.svg" alt="Logo B" />
|
|
74
|
-
</template>
|
|
75
|
-
</MarqueeScroller>
|
|
99
|
+
```css
|
|
100
|
+
:where(html) {
|
|
101
|
+
--marquee-scroller-fade-width: 15%;
|
|
102
|
+
--marquee-scroller-item-border-colour: var(--slate-04);
|
|
103
|
+
}
|
|
76
104
|
```
|
|
77
105
|
|
|
78
106
|
---
|
|
79
107
|
|
|
80
|
-
##
|
|
81
|
-
|
|
82
|
-
The pause/play button's icon and its `aria-label` copy are all overridable — see `playIcon`/
|
|
83
|
-
`pauseIcon`/`playLabel`/`pauseLabel` props, or the `toggle-icon` slot for a fully custom icon
|
|
84
|
-
(scoped with `isPaused`):
|
|
108
|
+
## Local overrides
|
|
85
109
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
play-label="Reproduire"
|
|
92
|
-
pause-label="Suspendre"
|
|
93
|
-
/>
|
|
94
|
-
```
|
|
110
|
+
Set the tokens above on an element you own (a page or section class, or a class added with
|
|
111
|
+
`:style-class-passthrough`): they inherit down into the component. Keep the block **unlayered** (no
|
|
112
|
+
`@layer` wrapper) so it beats the library's `@layer components`. If your own file uses
|
|
113
|
+
`<style scoped>`, tokens set on your element still work, but selectors that reach inside the
|
|
114
|
+
component need `:deep()`. Patterns and examples: `.claude/skills/component-local-style-override.md`.
|
|
95
115
|
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
116
|
+
```css
|
|
117
|
+
.partners-section {
|
|
118
|
+
--marquee-scroller-item-border-colour: #b5651d;
|
|
119
|
+
--marquee-scroller-control-background-colour: #1a1a1a;
|
|
120
|
+
--marquee-scroller-fade-width: 20%;
|
|
121
|
+
}
|
|
102
122
|
```
|
|
103
123
|
|
|
104
124
|
---
|
|
105
125
|
|
|
106
|
-
##
|
|
126
|
+
## Class passthrough
|
|
127
|
+
|
|
128
|
+
`:style-class-passthrough` (string or string array) adds classes to the root `.marquee-scroller`
|
|
129
|
+
region.
|
|
130
|
+
|
|
131
|
+
---
|
|
107
132
|
|
|
108
|
-
|
|
109
|
-
component (it falls through to the root element)): they inherit down into the component. Keep the
|
|
110
|
-
block **unlayered** (no `@layer` wrapper) so it beats the library's `@layer components`. If your own
|
|
111
|
-
file uses `<style scoped>`, tokens set on your element still work, but selectors that reach inside
|
|
112
|
-
the component need `:deep()`. Patterns and examples:
|
|
113
|
-
`.claude/skills/component-local-style-override.md`.
|
|
133
|
+
## Notes
|
|
114
134
|
|
|
135
|
+
- Item content and the control button's icon and copy are covered in the skill doc
|
|
136
|
+
(`marquee-scroller.md`): one slot per `marqueeData` id, `toggle-icon` slot, and the
|
|
137
|
+
`playIcon`/`pauseIcon`/`playLabel`/`pauseLabel` props.
|