@redseed/redseed-ui-vue3 11.0.2 → 11.1.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/package.json
CHANGED
|
@@ -125,9 +125,9 @@ const defaultSize = computed(() =>
|
|
|
125
125
|
)
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* Whether the consumer named a tone at all.
|
|
129
129
|
*/
|
|
130
|
-
const
|
|
130
|
+
const hasNoTone = computed(() =>
|
|
131
131
|
!props.primary
|
|
132
132
|
&& !props.secondary
|
|
133
133
|
&& !props.brand
|
|
@@ -158,7 +158,29 @@ const iconClass = computed(() => [
|
|
|
158
158
|
/**
|
|
159
159
|
* Colors
|
|
160
160
|
*/
|
|
161
|
-
|
|
161
|
+
/**
|
|
162
|
+
* No tone means INHERIT, not primary.
|
|
163
|
+
*
|
|
164
|
+
* The tone rules paint the svg (`*:text-…`), and a colour on the svg wins over
|
|
165
|
+
* anything around it — so defaulting to `primary` made an icon inside a coloured
|
|
166
|
+
* control render near-black while the control beside it was green. A colour on the
|
|
167
|
+
* wrapper would have been inherited and therefore overridable, which is the
|
|
168
|
+
* property that was missing. With no class at all the svg's own `currentColor`
|
|
169
|
+
* resolves against whatever encloses it. See #428.
|
|
170
|
+
*
|
|
171
|
+
* Anywhere the surroundings are already primary ink — body text, headings, most of
|
|
172
|
+
* a page — that is the same colour it was. Only icons in a coloured control move.
|
|
173
|
+
*
|
|
174
|
+
* `background` is the exception, and it is not a leftover. It paints a CONTRAST
|
|
175
|
+
* SURFACE behind the glyph, and which surface is a question only a tone can answer:
|
|
176
|
+
* `.rsui-icon--primary.rsui-icon--background` is `bg-background-primary-contrast`.
|
|
177
|
+
* Without a fallback `IconCircleBackground` and `IconRoundedBackground` — neither
|
|
178
|
+
* of which passes a tone — would render with no background at all.
|
|
179
|
+
*
|
|
180
|
+
* `invert` needed the same partner and no longer does: it carries
|
|
181
|
+
* `*:text-text-on-color` itself now, which is what it always meant.
|
|
182
|
+
*/
|
|
183
|
+
'rsui-icon--primary': props.primary || (hasNoTone.value && props.background),
|
|
162
184
|
'rsui-icon--secondary': props.secondary,
|
|
163
185
|
'rsui-icon--brand': props.brand,
|
|
164
186
|
'rsui-icon--success': props.success,
|