@propellerads/icon 9.1.0 → 11.0.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/README.md +10 -2
- package/dist/index.css +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +500 -516
- package/dist/index.js.map +1 -1
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -38,5 +38,13 @@ Each `Color` is named after its token:
|
|
|
38
38
|
| `Danger` | `--color-danger` | #EE2B2B | the same | `Error` |
|
|
39
39
|
|
|
40
40
|
The old names still work and give the same colour; they are deprecated and go in the next major.
|
|
41
|
-
They turn over with the theme.
|
|
42
|
-
|
|
41
|
+
They turn over with the theme. `Action` is the brand's action colour from its stylesheet: to give a product
|
|
42
|
+
another one, set `--color-action` on `:root`. Any other string — a hex, `currentColor` — is used as is.
|
|
43
|
+
|
|
44
|
+
### Styles
|
|
45
|
+
|
|
46
|
+
The icon ships a small stylesheet and imports it itself: nothing to add next to the component, and no
|
|
47
|
+
styled-components. Its sizes are in pixels and work without the tokens; only the colours of `Color` need them.
|
|
48
|
+
|
|
49
|
+
The rules stay at the specificity of one class, so a product overrides the fill as it did before:
|
|
50
|
+
`.SomeBlock svg {fill: …}` wins, and so does `color="currentColor"` with the colour set on the parent.
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:where(svg).icon{--icon-size:24px;width:var(--icon-size);height:var(--icon-size);fill:var(--icon-color);display:inline-flex}:where(svg).icon:hover{fill:var(--icon-hover-color,var(--icon-color))}:where(svg).icon--extra-small{--icon-size:12px}:where(svg).icon--small{--icon-size:16px}:where(svg).icon--medium-small{--icon-size:20px}:where(svg).icon--medium{--icon-size:24px}:where(svg).icon--large{--icon-size:32px}:where(svg).icon--extra-large{--icon-size:64px}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,13 +18,13 @@ declare const Color: {
|
|
|
18
18
|
readonly QuietText: "quiet-text";
|
|
19
19
|
/** `--color-light`: on a coloured fill. */
|
|
20
20
|
readonly Light: "light";
|
|
21
|
-
/** `--color-action
|
|
21
|
+
/** `--color-action`: the brand's action colour. */
|
|
22
22
|
readonly Action: "action";
|
|
23
|
-
/** `--color-success
|
|
23
|
+
/** `--color-success`. */
|
|
24
24
|
readonly Success: "success";
|
|
25
|
-
/** `--color-warning
|
|
25
|
+
/** `--color-warning`. */
|
|
26
26
|
readonly Warning: "warning";
|
|
27
|
-
/** `--color-danger
|
|
27
|
+
/** `--color-danger`. */
|
|
28
28
|
readonly Danger: "danger";
|
|
29
29
|
/** @deprecated The same as `DarkInversion`: it is not black in the dark theme. */
|
|
30
30
|
readonly Black: "black";
|