@lmvz-ds/components 0.38.0 → 0.39.0
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/CHANGELOG.md +11 -0
- package/README.md +12 -20
- package/cjs/{directional-focus-controller-8Xd_7MHT.js → directional-focus-controller-DDnhfX5w.js} +15 -5
- package/cjs/index.cjs.js +3 -195
- package/cjs/lmvz-action-list.cjs.entry.js +2 -2
- package/cjs/lmvz-button-group.cjs.entry.js +4 -0
- package/cjs/lmvz-button_2.cjs.entry.js +1 -1
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +3 -3
- package/cjs/lmvz-message.cjs.entry.js +2 -0
- package/cjs/lmvz-popover.cjs.entry.js +1 -1
- package/cjs/lmvz-select.cjs.entry.js +2 -3
- package/cjs/lmvz-tabs.cjs.entry.js +8 -2
- package/cjs/loader.cjs.js +1 -1
- package/cjs/public-DTgpEs1_.js +206 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.css +119 -116
- package/collection/components/lmvz-button/lmvz-button.css +109 -106
- package/collection/components/lmvz-card/lmvz-card.css +106 -103
- package/collection/components/lmvz-header/lmvz-header.js +2 -2
- package/collection/components/lmvz-select/lmvz-select.css +58 -43
- package/collection/components/lmvz-select/lmvz-select.js +1 -25
- package/collection/components/lmvz-snackbar/public.js +3 -0
- package/collection/components/lmvz-tabs/lmvz-tabs.js +7 -1
- package/collection/utils/aria/directional-focus-controller.js +16 -7
- package/collection/utils/icons/public.js +3 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-datepicker.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/{p-CcP_sfo8.js → p--mU29mrX.js} +1 -1
- package/components/p-BPa0FHVO.js +1 -0
- package/components/{p-SnHLBAbf.js → p-Bc5MM0zh.js} +1 -1
- package/components/p-CyDgnpOB.js +1 -0
- package/components/{p-C-pRMuMh.js → p-DIyiticz.js} +1 -1
- package/components/{p-BhALzK62.js → p-DJLdOjL4.js} +1 -1
- package/components/{p-B6bUOPCG.js → p-DSDBThqb.js} +1 -1
- package/components/p-DXhP6UeF.js +1 -0
- package/components/p-DsTgD0_a.js +1 -0
- package/components/p-DyQ1GbaN.js +1 -0
- package/components/p-niXjuPxe.js +1 -0
- package/esm/{directional-focus-controller-QukTTWBE.js → directional-focus-controller-CJ0yNC00.js} +15 -5
- package/esm/index.js +1 -197
- package/esm/lmvz-action-list.entry.js +2 -2
- package/esm/lmvz-button-group.entry.js +4 -0
- package/esm/lmvz-button_2.entry.js +1 -1
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +3 -3
- package/esm/lmvz-message.entry.js +2 -0
- package/esm/lmvz-popover.entry.js +1 -1
- package/esm/lmvz-select.entry.js +2 -3
- package/esm/lmvz-tabs.entry.js +8 -2
- package/esm/loader.js +1 -1
- package/esm/public-m6pRVUeP.js +204 -0
- package/hydrate/index.js +238 -16
- package/hydrate/index.mjs +238 -16
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-1ba1af8d.entry.js +1 -0
- package/lmvz-components/p-304c7554.entry.js +1 -0
- package/lmvz-components/p-316dd61a.entry.js +1 -0
- package/lmvz-components/{p-1e1dea53.entry.js → p-41286514.entry.js} +1 -1
- package/lmvz-components/p-93b781ca.entry.js +1 -0
- package/lmvz-components/p-BPa0FHVO.js +1 -0
- package/lmvz-components/p-BlkpdeQI.js +1 -0
- package/lmvz-components/p-c884c76e.entry.js +1 -0
- package/lmvz-components/p-ebad823c.entry.js +1 -0
- package/lmvz-components/p-edec4d09.entry.js +1 -0
- package/lmvz-components/p-f911691c.entry.js +1 -0
- package/manifest.json +2 -31
- package/package.json +2 -1
- package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
- package/types/components/lmvz-snackbar/public.d.ts +6 -0
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +1 -0
- package/types/components.d.ts +0 -11
- package/types/index.d.ts +5 -0
- package/types/utils/aria/directional-focus-controller.d.ts +9 -7
- package/types/utils/icons/public.d.ts +6 -0
- package/components/p-CgGqXTxQ.js +0 -1
- package/components/p-D3wobLRi.js +0 -1
- package/components/p-DfFdoFeH.js +0 -1
- package/components/p-GJaYKpHS.js +0 -1
- package/lmvz-components/p-3fc6c3f6.entry.js +0 -1
- package/lmvz-components/p-9813a7d2.entry.js +0 -1
- package/lmvz-components/p-CHxiS3ja.js +0 -1
- package/lmvz-components/p-b5a5eb9a.entry.js +0 -1
- package/lmvz-components/p-cadd88e5.entry.js +0 -1
- package/lmvz-components/p-cebaddb0.entry.js +0 -1
- package/lmvz-components/p-d53e69de.entry.js +0 -1
- package/lmvz-components/p-db75e362.entry.js +0 -1
- package/lmvz-components/p-eb741e1f.entry.js +0 -1
|
@@ -78,12 +78,23 @@ legend {
|
|
|
78
78
|
/** component dependencies */
|
|
79
79
|
/* * the (invalid nested) import will be handled by postcss */
|
|
80
80
|
/* stylelint-disable no-invalid-position-at-import-rule */
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
/* stylelint-disable nesting-selector-no-missing-scoping-root */
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* This fragment is meant to be reusable in multiple component types.
|
|
85
|
+
* CAUTION: always wrap the import in a tag selector (ususally button)!
|
|
86
|
+
*/
|
|
87
|
+
& {
|
|
88
|
+
/* the (invalid nested) import will be handled by postcss */
|
|
89
|
+
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
90
|
+
/* stylelint-disable nesting-selector-no-missing-scoping-root */
|
|
91
|
+
& {
|
|
92
|
+
/* variables are declared on :host
|
|
84
93
|
so that outer ::slotted(lmvz-button) overrides are inherited correctly via shadow inheritance.
|
|
85
|
-
They are also declared here so that non-shadow consumers
|
|
86
|
-
|
|
94
|
+
They are also declared here so that non-shadow consumers have the default values in scope. */
|
|
95
|
+
|
|
96
|
+
/* secondary styling is default, primary is explicit */
|
|
97
|
+
|
|
87
98
|
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0));
|
|
88
99
|
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000));
|
|
89
100
|
--lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px));
|
|
@@ -98,19 +109,20 @@ legend {
|
|
|
98
109
|
|
|
99
110
|
display: inline-flex;
|
|
100
111
|
align-items: center;
|
|
101
|
-
justify-content: var(--lmvz-button-content-justification
|
|
102
|
-
gap: var(--lmvz-button-gap);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color);
|
|
112
|
+
justify-content: var(--lmvz-button-content-justification, center);
|
|
113
|
+
gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)));
|
|
114
|
+
|
|
115
|
+
box-sizing: border-box; /* to inlclude paddings & border in min-height */
|
|
116
|
+
padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
117
|
+
padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
118
|
+
min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)));
|
|
119
|
+
border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent);
|
|
120
|
+
border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px));
|
|
121
|
+
|
|
109
122
|
background-color: var(--lmvz-button-background);
|
|
110
123
|
color: var(--lmvz-button-color);
|
|
111
124
|
cursor: pointer;
|
|
112
125
|
font: var(--lmvz-button-font);
|
|
113
|
-
/* text-align: center; */
|
|
114
126
|
text-decoration: none;
|
|
115
127
|
white-space: nowrap;
|
|
116
128
|
transition:
|
|
@@ -120,100 +132,91 @@ legend {
|
|
|
120
132
|
box-shadow 0.15s ease;
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
button > * {
|
|
124
|
-
font: inherit;
|
|
125
|
-
color: inherit;
|
|
126
|
-
}
|
|
127
135
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
& > * {
|
|
137
|
+
font: inherit;
|
|
138
|
+
color: inherit;
|
|
139
|
+
}
|
|
140
|
+
&:focus-visible {
|
|
141
|
+
outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
|
|
142
|
+
outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
|
|
143
|
+
position: relative;
|
|
144
|
+
z-index: 1;
|
|
145
|
+
}
|
|
146
|
+
&:is([disabled], .disabled) {
|
|
147
|
+
cursor: not-allowed;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
/* } */
|
|
150
|
+
|
|
151
|
+
/* button:is(:is([disabled], .disabled):not(.secondary):not(.tertiary), .primary:is([disabled], .disabled)) { */
|
|
152
|
+
/* button:is([disabled], .disabled) { */
|
|
153
|
+
/* --lmvz-button-background: var(--lmvz-global-color-neutral-500); */
|
|
154
|
+
/* --lmvz-button-color: var(--lmvz-global-color-neutral-white); */
|
|
155
|
+
opacity: var(--lmvz-component-input-disabled-opacity, 40%);
|
|
156
|
+
}
|
|
157
|
+
&:not([disabled]):hover {
|
|
158
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0));
|
|
159
|
+
}
|
|
160
|
+
&:not([disabled]):active {
|
|
161
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4));
|
|
162
|
+
}
|
|
134
163
|
|
|
135
|
-
|
|
136
|
-
cursor: not-allowed;
|
|
137
|
-
pointer-events: none;
|
|
138
|
-
/* } */
|
|
139
|
-
|
|
140
|
-
/* button:is(:is([disabled], .disabled):not(.secondary):not(.tertiary), .primary:is([disabled], .disabled)) { */
|
|
141
|
-
/* button:is([disabled], .disabled) { */
|
|
142
|
-
/* --lmvz-button-background: var(--lmvz-global-color-neutral-500); */
|
|
143
|
-
/* --lmvz-button-color: var(--lmvz-global-color-neutral-white); */
|
|
144
|
-
opacity: var(--lmvz-component-input-disabled-opacity, 40%);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
button:not([disabled]):hover {
|
|
148
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
button:not([disabled]):active {
|
|
152
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
button.primary {
|
|
156
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000));
|
|
157
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff));
|
|
158
|
-
--lmvz-button-border-width: var(--lmvz-button-border-width-override, 0);
|
|
159
|
-
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
button.primary:not([disabled], .disabled):hover {
|
|
163
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
button.primary:not([disabled], .disabled):active {
|
|
167
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
button.danger {
|
|
171
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
172
|
-
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
173
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
button.danger:not([disabled], .disabled):hover {
|
|
177
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0));
|
|
178
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
button.danger:not([disabled], .disabled):active {
|
|
182
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b));
|
|
183
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
button.tertiary {
|
|
187
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
188
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000));
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
button.tertiary:not([disabled], .disabled):hover {
|
|
192
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0));
|
|
193
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
button.tertiary:not([disabled], .disabled):active {
|
|
197
|
-
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0));
|
|
198
|
-
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000));
|
|
199
|
-
}
|
|
164
|
+
/* secondary styling is default, primary is explicit */
|
|
200
165
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
166
|
+
&.primary {
|
|
167
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000));
|
|
168
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff));
|
|
169
|
+
--lmvz-button-border-width: var(--lmvz-button-border-width-override, 0);
|
|
170
|
+
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
171
|
+
}
|
|
172
|
+
&.primary:not([disabled], .disabled):hover {
|
|
173
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e));
|
|
174
|
+
}
|
|
175
|
+
&.primary:not([disabled], .disabled):active {
|
|
176
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454));
|
|
177
|
+
}
|
|
178
|
+
&.danger {
|
|
179
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
180
|
+
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
181
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
182
|
+
}
|
|
183
|
+
&.danger:not([disabled], .disabled):hover {
|
|
184
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0));
|
|
185
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
186
|
+
}
|
|
187
|
+
&.danger:not([disabled], .disabled):active {
|
|
188
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b));
|
|
189
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419));
|
|
190
|
+
}
|
|
191
|
+
&.tertiary {
|
|
192
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff));
|
|
193
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000));
|
|
194
|
+
}
|
|
195
|
+
&.tertiary:not([disabled], .disabled):hover {
|
|
196
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0));
|
|
197
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000));
|
|
198
|
+
}
|
|
199
|
+
&.tertiary:not([disabled], .disabled):active {
|
|
200
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0));
|
|
201
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&.small {
|
|
205
|
+
--lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)));
|
|
206
|
+
--lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)));
|
|
207
|
+
--lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)));
|
|
208
|
+
--lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)));
|
|
209
|
+
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5
|
|
207
210
|
Router));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
button.
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5
|
|
211
|
+
}
|
|
212
|
+
&.large {
|
|
213
|
+
--lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));
|
|
214
|
+
--lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));
|
|
215
|
+
--lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)));
|
|
216
|
+
--lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)));
|
|
217
|
+
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5
|
|
216
218
|
Router));
|
|
219
|
+
}
|
|
217
220
|
}
|
|
218
221
|
|
|
219
222
|
|
|
@@ -11,7 +11,7 @@ export class LmvzHeader extends ReactiveControllerHost {
|
|
|
11
11
|
primarySlot;
|
|
12
12
|
secondarySlot;
|
|
13
13
|
secondaryNav;
|
|
14
|
-
keyboardNavigationController = new DirectionalFocusController(this, { orientation: 'both' });
|
|
14
|
+
keyboardNavigationController = new DirectionalFocusController(this, { orientation: 'both', manageTabIndex: false, enableHomeAndEnd: false });
|
|
15
15
|
get primaryMenuitems() {
|
|
16
16
|
return this.primarySlot?.assignedElements({ flatten: false }) || [];
|
|
17
17
|
}
|
|
@@ -87,7 +87,7 @@ export class LmvzHeader extends ReactiveControllerHost {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
90
|
+
return (h(Host, { key: 'a72c860d7f67c9631c462c0abcc798bb142dfc55', onFocus: this.delegateFocus.bind(this) }, h("div", { key: '4ed87264d201c513bce284536793692424ed864b', class: "brand" }, h("slot", { key: '9291d81d7f8a630007b8ad827a16ebea7222b9d2', name: "brand" }, h("img", { key: '77da99409f40d93e4a2d190cbb2a8857f1e81c36', id: "fallback-logo-lmvz", src: logo, alt: "Lehrmittelverlag Z\u00FCrich" }))), h("nav", { key: '3c40c04bb23524ae58e391a54b044e225a25ad07', "aria-label": "Hauptnavigation" }, h("div", { key: '207b8032d3d11b4bfacb6e7fcffb683ad5da8ccc', role: "menubar", class: "primary-menubar" }, h("slot", { key: '8ae67a57ac7b6bb6083c469a857542e31b0c2294', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), h("div", { key: '86b9696c95e9ae0e3843fa1607f268dcae8cb279', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, h("slot", { key: '67966de33555dc26ac2dc51fc8a85d456a2e8e85', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), h("div", { key: 'bfb2831144cee723c3182d96d64f44be1cc5a78b', class: "actions" }, h("slot", { key: '6956b81fa8ed6c446edc5f7d9708462b39bc8cbb', name: "actions" }))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "lmvz-header"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -126,24 +126,12 @@ label > span[aria-hidden='true'],
|
|
|
126
126
|
z-index: 1;
|
|
127
127
|
transition: border-color 0.15s ease;
|
|
128
128
|
}
|
|
129
|
-
:host(:not([disabled], [
|
|
129
|
+
:host(:not([disabled], [error])) .select-wrapper:hover .select-trigger {
|
|
130
130
|
border-color: var(--lmvz-select-border-color-hover);
|
|
131
131
|
}
|
|
132
132
|
:host([error]) .select-trigger {
|
|
133
133
|
border-color: var(--lmvz-select-error-color);
|
|
134
134
|
}
|
|
135
|
-
:host([highlighted]) .select-trigger {
|
|
136
|
-
background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc);
|
|
137
|
-
border-color: var(--lmvz-semantic-color-border-active, #0f8acc);
|
|
138
|
-
color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff);
|
|
139
|
-
}
|
|
140
|
-
:host([highlighted]) .select-trigger > span:first-child {
|
|
141
|
-
color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff);
|
|
142
|
-
}
|
|
143
|
-
:host([highlighted]) label.floating-label {
|
|
144
|
-
background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc);
|
|
145
|
-
color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff);
|
|
146
|
-
}
|
|
147
135
|
:host:has(:focus-visible) .select-trigger {
|
|
148
136
|
outline: var(--lmvz-ds-outline, 1px solid #0e7ab4);
|
|
149
137
|
outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem));
|
|
@@ -158,8 +146,7 @@ label > span[aria-hidden='true'],
|
|
|
158
146
|
white-space: nowrap;
|
|
159
147
|
text-align: left;
|
|
160
148
|
}
|
|
161
|
-
|
|
162
|
-
:host(:not([highlighted])) .select-wrapper.has-value .select-trigger > span:first-child {
|
|
149
|
+
.select-wrapper.has-value .select-trigger > span:first-child {
|
|
163
150
|
color: var(--lmvz-semantic-color-int-on-secondary-active, #000000);
|
|
164
151
|
}
|
|
165
152
|
/* Trailing chevron child span, shared by single- and multiselect modes. Scoped with the
|
|
@@ -177,8 +164,7 @@ label > span[aria-hidden='true'],
|
|
|
177
164
|
flex-shrink: 0;
|
|
178
165
|
}
|
|
179
166
|
/* Chip row — rendered inline inside the trigger's leading text span (.select-trigger >
|
|
180
|
-
span:first-child)
|
|
181
|
-
duplicating it. Single-line: overflowing chips are truncated with an ellipsis, never wrapped. */
|
|
167
|
+
span:first-child). Overflowing chips are truncated with an ellipsis to enforce single line. */
|
|
182
168
|
.select-trigger > span:first-child lmvz-chip {
|
|
183
169
|
vertical-align: middle;
|
|
184
170
|
}
|
|
@@ -228,40 +214,69 @@ label > span[aria-hidden='true'],
|
|
|
228
214
|
:host([size='large']) .select-trigger > span:first-child {
|
|
229
215
|
font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem));
|
|
230
216
|
}
|
|
231
|
-
/*
|
|
232
|
-
* Option-list item styling for the `role="option"` elements rendered inside the
|
|
233
|
-
* `lmvz-popover` (containerRole="listbox") popup. The token set mirrors the states
|
|
234
|
-
* `lmvz-action-list` applies to its `<lmvz-button>`/`<button>` items (tertiary variant),
|
|
235
|
-
* so the listbox looks visually identical to an action-list item:
|
|
236
|
-
* - default: --lmvz-semantic-color-int-tertiary / --lmvz-semantic-color-int-on-tertiary
|
|
237
|
-
* - hover: --lmvz-semantic-color-int-tertiary-hover / --lmvz-semantic-color-int-on-tertiary-hover
|
|
238
|
-
* - active: --lmvz-semantic-color-int-tertiary-active / --lmvz-semantic-color-int-on-tertiary-active
|
|
239
|
-
* - disabled: --lmvz-component-input-disabled-opacity (opacity, same token as lib-styles buttons fragment)
|
|
240
|
-
* - focus: --lmvz-ds-outline / --lmvz-ds-outline-offset (same as lib-styles buttons fragment focus-visible)
|
|
241
|
-
* "selected" has no action-list equivalent (action-list is a menu, not a listbox), so it
|
|
242
|
-
* reuses this component's own highlighted-state tokens for consistency with the trigger.
|
|
243
|
-
* "active" (`data-active="true"`) is this component's own addition: since the combobox uses
|
|
244
|
-
* the activedescendant model, the highlighted option never receives real DOM focus, so
|
|
245
|
-
* `:hover`/`:focus-visible` cannot indicate it to sighted keyboard users — `data-active` is
|
|
246
|
-
* set by the host from `ListboxController`'s active id and styled the same as hover/focus.
|
|
247
|
-
*/
|
|
248
217
|
.lmvz-select-option {
|
|
249
218
|
--lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary, #ffffff);
|
|
250
219
|
--lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary, #000000);
|
|
251
220
|
|
|
252
|
-
|
|
221
|
+
/* The configuration here will match lmvz-action-list's items, though semantic states might differ intentionally */
|
|
222
|
+
--lmvz-button-background-override: var(--lmvz-select-option-background);
|
|
223
|
+
--lmvz-button-color-override: var(--lmvz-select-option-color);
|
|
224
|
+
--lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px);
|
|
225
|
+
--lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));
|
|
226
|
+
--lmvz-button-padding-block-override: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));
|
|
227
|
+
--lmvz-button-content-justification: normal;
|
|
228
|
+
--lmvz-button-font-override: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5
|
|
229
|
+
Router);
|
|
230
|
+
|
|
231
|
+
/* the (invalid nested) import will be handled by postcss */
|
|
232
|
+
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
233
|
+
/* stylelint-disable nesting-selector-no-missing-scoping-root */
|
|
234
|
+
& {
|
|
235
|
+
/* variables are declared on :host
|
|
236
|
+
so that outer ::slotted(lmvz-button) overrides are inherited correctly via shadow inheritance.
|
|
237
|
+
They are also declared here so that non-shadow consumers have the default values in scope. */
|
|
238
|
+
|
|
239
|
+
/* secondary styling is default, primary is explicit */
|
|
240
|
+
|
|
241
|
+
--lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0));
|
|
242
|
+
--lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000));
|
|
243
|
+
--lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px));
|
|
244
|
+
--lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))));
|
|
245
|
+
--lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))));
|
|
246
|
+
--lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)));
|
|
247
|
+
--lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)));
|
|
248
|
+
--lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5
|
|
249
|
+
Router));
|
|
250
|
+
--lmvz-button-border-width: var(--lmvz-button-border-width-override, 0);
|
|
251
|
+
--lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent);
|
|
252
|
+
|
|
253
|
+
display: inline-flex;
|
|
253
254
|
align-items: center;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
justify-content: var(--lmvz-button-content-justification, center);
|
|
256
|
+
gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)));
|
|
257
|
+
|
|
258
|
+
box-sizing: border-box; /* to inlclude paddings & border in min-height */
|
|
259
|
+
padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
260
|
+
padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)));
|
|
261
|
+
min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)));
|
|
262
|
+
border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent);
|
|
263
|
+
border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px));
|
|
264
|
+
|
|
265
|
+
background-color: var(--lmvz-button-background);
|
|
266
|
+
color: var(--lmvz-button-color);
|
|
259
267
|
cursor: pointer;
|
|
260
|
-
font: var(--lmvz-
|
|
261
|
-
|
|
268
|
+
font: var(--lmvz-button-font);
|
|
269
|
+
text-decoration: none;
|
|
270
|
+
white-space: nowrap;
|
|
262
271
|
transition:
|
|
263
272
|
background-color 0.15s ease,
|
|
264
|
-
color 0.15s ease
|
|
273
|
+
color 0.15s ease,
|
|
274
|
+
border-color 0.15s ease,
|
|
275
|
+
box-shadow 0.15s ease;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
display: flex;
|
|
265
280
|
}
|
|
266
281
|
.lmvz-select-option:not([aria-disabled='true']):hover {
|
|
267
282
|
--lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0);
|
|
@@ -72,7 +72,6 @@ export class LmvzSelect extends ReactiveControllerHost {
|
|
|
72
72
|
required = false;
|
|
73
73
|
name;
|
|
74
74
|
size = 'default';
|
|
75
|
-
highlighted = false;
|
|
76
75
|
selectedLabel = '';
|
|
77
76
|
selectedId;
|
|
78
77
|
activeId;
|
|
@@ -346,7 +345,7 @@ export class LmvzSelect extends ReactiveControllerHost {
|
|
|
346
345
|
const hasValue = this.hasValue;
|
|
347
346
|
const shouldShowLabel = hasValue;
|
|
348
347
|
const showChips = this.multiple && hasValue;
|
|
349
|
-
return (h(Host, { key: '
|
|
348
|
+
return (h(Host, { key: '77cb72cdce635eae0f9a29cb9121dd7d16955219' }, h("div", { key: 'cc6c04090457df17c6a9e74354fc21875d378642', class: hasValue ? 'select-wrapper has-value' : 'select-wrapper' }, h("label", { key: '8dc52469a7b3333578494b2f7bdb4e870044ac6c', htmlFor: this.triggerId, class: shouldShowLabel ? 'floating-label' : 'assistive-label', onMouseDown: (event) => event.preventDefault(), onClick: this.handleLabelClick }, this.label, this.required && shouldShowLabel && h("span", { key: 'c198fb4944e46c5219a42e16ae24dc3c414b1b00', "aria-hidden": "true" }, " *")), h("div", { key: '034cc67405aac73a6557036dea90e4644c1578ed', id: this.triggerId, ref: (el) => (this.triggerEl = el), class: "select-trigger", role: "combobox", tabIndex: this.disabled ? -1 : 0, "aria-haspopup": "listbox", "aria-expanded": String(this.isOpen), "aria-controls": this.popoverId, "aria-activedescendant": this.isOpen ? this.activeId : undefined, "aria-label": this.triggerAriaLabel, "aria-disabled": this.disabled ? 'true' : undefined, "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error ? 'true' : 'false', "aria-errormessage": this.showErrorMessage ? this.errorId : undefined, "aria-describedby": this.describedBy, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeydown, onBlur: this.handleTriggerBlur }, h("span", { key: 'c61c136bfaab211572a988d3b16c2746f80b1ac6' }, showChips ? this.renderChips() : hasValue ? this.selectedLabel : this.label, this.required && !hasValue && h("span", { key: '24201baae63a4f6fdaef2441d304cd8f69430fb5', "aria-hidden": "true" }, " *")), h("span", { key: '547c61dfdc83f89cf7cd0582c785b9552190e533', "aria-hidden": "true" }, h("svg", { key: 'f6a0cb7c77682aec03cd146e84712c17df5ff910', width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '35a8a50e27f18e54003974ae5b5ed578602664d3', d: "M20.3334 8.66663L12.0001 17L3.66675 8.66663", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("lmvz-popover", { key: '0d5b94659c23763d59638046a397963d79a5e588', id: this.popoverId, anchor: this.triggerId, open: this.isOpen, containerRole: "listbox", autoFocus: false, label: this.label, "aria-multiselectable": this.multiple ? 'true' : undefined, onLmvzClose: this.handlePopoverClose, size: "sm" }, this.renderOptionGroups()), h("div", { key: 'c4a313fe4b6c53678a4f3dafced210f00e3c93d5', class: "lmvz-select-native-options", hidden: true, "aria-hidden": "true", ref: (el) => (this.optionsSourceEl = el) }, h("slot", { key: '1fb311e6938812e68ae5155184af2e2ba7c19861', onSlotchange: this.handleSlotChange }))), this.helperText && (h("div", { key: 'accade9aae4cb2e23fa1d8f62dd9b6efdf3ddfb5', id: this.helperId, role: "status" }, this.helperText)), this.showErrorMessage && (h("div", { key: 'faa5eba225adda67b44b8a63ae98a678fddf49ad', id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
350
349
|
}
|
|
351
350
|
static get is() { return "lmvz-select"; }
|
|
352
351
|
static get encapsulation() { return "scoped"; }
|
|
@@ -592,29 +591,6 @@ export class LmvzSelect extends ReactiveControllerHost {
|
|
|
592
591
|
"reflect": true,
|
|
593
592
|
"attribute": "size",
|
|
594
593
|
"defaultValue": "'default'"
|
|
595
|
-
},
|
|
596
|
-
"highlighted": {
|
|
597
|
-
"type": "boolean",
|
|
598
|
-
"mutable": false,
|
|
599
|
-
"complexType": {
|
|
600
|
-
"original": "boolean",
|
|
601
|
-
"resolved": "boolean",
|
|
602
|
-
"references": {}
|
|
603
|
-
},
|
|
604
|
-
"required": false,
|
|
605
|
-
"optional": false,
|
|
606
|
-
"docs": {
|
|
607
|
-
"tags": [{
|
|
608
|
-
"name": "default",
|
|
609
|
-
"text": "false"
|
|
610
|
-
}],
|
|
611
|
-
"text": "Whether the select has an active filter or selection that should be visually\ndistinguished (e.g. a filter chip is applied).\n\nWhen `true`:\n- The host attribute `highlighted` is present (CSS: `:host([highlighted])`).\n- The host attribute `data-highlighted=\"true\"` is set for assistive-technology\n consumers that observe data attributes. When `false`, `data-highlighted` is\n set to `\"false\"`.\n\nNote: `aria-pressed` is intentionally not used here; it is reserved for toggle-button\nroles. `aria-selected` is reserved for this component's own `role=\"option\"` elements.\nThe `data-highlighted` attribute provides the accessible contract for this state."
|
|
612
|
-
},
|
|
613
|
-
"getter": false,
|
|
614
|
-
"setter": false,
|
|
615
|
-
"reflect": true,
|
|
616
|
-
"attribute": "highlighted",
|
|
617
|
-
"defaultValue": "false"
|
|
618
594
|
}
|
|
619
595
|
};
|
|
620
596
|
}
|
|
@@ -7,10 +7,12 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
7
7
|
instanceId = ++tabsIdCounter;
|
|
8
8
|
tabSlotEl;
|
|
9
9
|
panelSlotEl;
|
|
10
|
+
tablistEl;
|
|
10
11
|
focusController = new DirectionalFocusController(this, {
|
|
11
12
|
orientation: 'horizontal',
|
|
12
13
|
manageTabIndex: true,
|
|
13
14
|
enableHomeAndEnd: true,
|
|
15
|
+
listenerTarget: this.tablistEl,
|
|
14
16
|
});
|
|
15
17
|
value;
|
|
16
18
|
orientation = 'horizontal';
|
|
@@ -29,6 +31,9 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
29
31
|
this.panelSlotEl?.addEventListener('slotchange', this.handlePanelSlotChange);
|
|
30
32
|
this.el.addEventListener('lmvzTabReady', this.handleTabReady);
|
|
31
33
|
this.handleTabSlotChange();
|
|
34
|
+
if (this.tablistEl) {
|
|
35
|
+
this.focusController.updateListenerTarget(this.tablistEl);
|
|
36
|
+
}
|
|
32
37
|
super.componentDidLoad();
|
|
33
38
|
}
|
|
34
39
|
disconnectedCallback() {
|
|
@@ -113,6 +118,7 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
113
118
|
orientation: this.orientation,
|
|
114
119
|
manageTabIndex: true,
|
|
115
120
|
enableHomeAndEnd: true,
|
|
121
|
+
listenerTarget: this.tablistEl,
|
|
116
122
|
});
|
|
117
123
|
this.addController(this.focusController);
|
|
118
124
|
if (this.el.isConnected) {
|
|
@@ -235,7 +241,7 @@ export class LmvzTabs extends ReactiveControllerHost {
|
|
|
235
241
|
this.selectTab(value);
|
|
236
242
|
};
|
|
237
243
|
render() {
|
|
238
|
-
return (h(Host, { key: '
|
|
244
|
+
return (h(Host, { key: 'be4fe04b1374a2793d3b1e9a658a449474efdd03', onClick: this.handleTabClick, onKeydown: this.handleKeydown }, h("div", { key: 'd91015eddf16dfad5d49e942eb86e9f568978f34', role: "tablist", "aria-orientation": this.orientation, class: "tablist", ref: (el) => (this.tablistEl = el) }, h("slot", { key: 'be0990a7c668bc96a67c01561e3142ec028dabd0', ref: (el) => (this.tabSlotEl = el) })), h("div", { key: '338323738dfdbb436d86cdb4f6041a67c1af433d', part: "panels-container", class: "panels-container" }, h("slot", { key: 'd225be099c8cb902776ce0a7dbf7dcb2aef2d03b', name: "panels", ref: (el) => (this.panelSlotEl = el) }))));
|
|
239
245
|
}
|
|
240
246
|
static get is() { return "lmvz-tabs"; }
|
|
241
247
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { getDeepActiveElement, isInputElement } from "../element/element.util";
|
|
2
2
|
import { getLmvzComponentMetaInfo, registerLmvzComponentMetaInfo } from "../stencil/reactive-controller-host";
|
|
3
|
-
export function isFocusControllerHost(el) {
|
|
4
|
-
return Boolean(getLmvzComponentMetaInfo(el, 'isFocusControllerHost'));
|
|
5
|
-
}
|
|
6
3
|
const defaultConfig = {
|
|
7
4
|
orientation: 'both',
|
|
8
5
|
enableHomeAndEnd: false,
|
|
@@ -22,11 +19,21 @@ export class DirectionalFocusController {
|
|
|
22
19
|
}
|
|
23
20
|
hostConnected() {
|
|
24
21
|
registerLmvzComponentMetaInfo(this.host.el, 'isFocusControllerHost', true);
|
|
25
|
-
this.
|
|
22
|
+
this.getListenerTarget().addEventListener('keydown', this.handleKeydown);
|
|
26
23
|
this.syncManagedFocusTarget();
|
|
27
24
|
}
|
|
28
25
|
hostDisconnected() {
|
|
29
|
-
this.
|
|
26
|
+
this.getListenerTarget().removeEventListener('keydown', this.handleKeydown);
|
|
27
|
+
}
|
|
28
|
+
updateListenerTarget(listenerTarget) {
|
|
29
|
+
if (listenerTarget === this.config.listenerTarget)
|
|
30
|
+
return;
|
|
31
|
+
this.getListenerTarget().removeEventListener('keydown', this.handleKeydown);
|
|
32
|
+
this.config.listenerTarget = listenerTarget;
|
|
33
|
+
this.getListenerTarget().addEventListener('keydown', this.handleKeydown);
|
|
34
|
+
}
|
|
35
|
+
getListenerTarget() {
|
|
36
|
+
return this.config.listenerTarget ?? this.host.el;
|
|
30
37
|
}
|
|
31
38
|
updateElements(elements) {
|
|
32
39
|
const previousElement = this.currentElement ?? this.getManagedActiveElement() ?? undefined;
|
|
@@ -178,10 +185,12 @@ export class DirectionalFocusController {
|
|
|
178
185
|
return isTabOrderable && element.getAttribute('aria-hidden') !== 'true' && (element.checkVisibility?.() ?? true) && element.offsetParent !== null;
|
|
179
186
|
}
|
|
180
187
|
}
|
|
181
|
-
function
|
|
188
|
+
export function isFocusControllerHost(el) {
|
|
189
|
+
return Boolean(getLmvzComponentMetaInfo(el, 'isFocusControllerHost'));
|
|
190
|
+
}
|
|
191
|
+
export function isDirectionalFocusReceiver(el) {
|
|
182
192
|
return typeof el.resolveFocusableElement === 'function';
|
|
183
193
|
}
|
|
184
194
|
function resolveElement(el) {
|
|
185
195
|
return isDirectionalFocusReceiver(el) ? (el.resolveFocusableElement() ?? el) : el;
|
|
186
196
|
}
|
|
187
|
-
export { DirectionalFocusController as ListKeyboardNavigationController };
|
package/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DbBJxuBm.js";export{A as ARIA_VALIDATION_RUNTIME_CHANGED_EVENT,d as disableAriaValidation,e as enableAriaValidation,i as isAriaValidationEnabled,q as queueValidation,u as useVerboseLogging}from"./p-BDonpCG8.js";export{g as chipSizes,f as chipTypes,d as iconSizes,e as iconWeights,b as inputSizes,i as inputTypes,l as linkTypes,m as messageTypes,p as popoverPlacements,n as popoverSizes,s as scaleValues,c as selectSizes,a as sizes,k as snackbarDismissReasons,j as snackbarPriorities,h as snackbarStatuses,t as textSizes,v as variants}from"./p-0ctLESas.js";export{
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DbBJxuBm.js";export{A as ARIA_VALIDATION_RUNTIME_CHANGED_EVENT,d as disableAriaValidation,e as enableAriaValidation,i as isAriaValidationEnabled,q as queueValidation,u as useVerboseLogging}from"./p-BDonpCG8.js";export{g as chipSizes,f as chipTypes,d as iconSizes,e as iconWeights,b as inputSizes,i as inputTypes,l as linkTypes,m as messageTypes,p as popoverPlacements,n as popoverSizes,s as scaleValues,c as selectSizes,a as sizes,k as snackbarDismissReasons,j as snackbarPriorities,h as snackbarStatuses,t as textSizes,v as variants}from"./p-0ctLESas.js";export{S as SnackbarController}from"./p-BPa0FHVO.js";export{LmvzAction,defineCustomElement as defineCustomElementLmvzAction}from"./lmvz-action.js";export{LmvzActionList,defineCustomElement as defineCustomElementLmvzActionList}from"./lmvz-action-list.js";export{LmvzButton,defineCustomElement as defineCustomElementLmvzButton}from"./lmvz-button.js";export{LmvzButtonGroup,defineCustomElement as defineCustomElementLmvzButtonGroup}from"./lmvz-button-group.js";export{LmvzCard,defineCustomElement as defineCustomElementLmvzCard}from"./lmvz-card.js";export{LmvzCheckbox,defineCustomElement as defineCustomElementLmvzCheckbox}from"./lmvz-checkbox.js";export{LmvzChip,defineCustomElement as defineCustomElementLmvzChip}from"./lmvz-chip.js";export{LmvzDatepicker,defineCustomElement as defineCustomElementLmvzDatepicker}from"./lmvz-datepicker.js";export{LmvzHeader,defineCustomElement as defineCustomElementLmvzHeader}from"./lmvz-header.js";export{LmvzIcon,defineCustomElement as defineCustomElementLmvzIcon}from"./lmvz-icon.js";export{LmvzInput,defineCustomElement as defineCustomElementLmvzInput}from"./lmvz-input.js";export{LmvzLink,defineCustomElement as defineCustomElementLmvzLink}from"./lmvz-link.js";export{LmvzMenuitem,defineCustomElement as defineCustomElementLmvzMenuitem}from"./lmvz-menuitem.js";export{LmvzMessage,defineCustomElement as defineCustomElementLmvzMessage}from"./lmvz-message.js";export{LmvzModal,defineCustomElement as defineCustomElementLmvzModal}from"./lmvz-modal.js";export{LmvzPopover,defineCustomElement as defineCustomElementLmvzPopover}from"./lmvz-popover.js";export{LmvzRadio,defineCustomElement as defineCustomElementLmvzRadio}from"./lmvz-radio.js";export{LmvzSelect,defineCustomElement as defineCustomElementLmvzSelect}from"./lmvz-select.js";export{LmvzSnackbar,defineCustomElement as defineCustomElementLmvzSnackbar}from"./lmvz-snackbar.js";export{LmvzSpinner,defineCustomElement as defineCustomElementLmvzSpinner}from"./lmvz-spinner.js";export{LmvzTab,defineCustomElement as defineCustomElementLmvzTab}from"./lmvz-tab.js";export{LmvzTabs,defineCustomElement as defineCustomElementLmvzTabs}from"./lmvz-tabs.js";export{LmvzToggle,defineCustomElement as defineCustomElementLmvzToggle}from"./lmvz-toggle.js";export{g as getRegisteredIconProvider,r as registerIconProvider,t as typedIconFromSet}from"./p-CyDgnpOB.js";
|