@nysds/nys-icon 1.21.1 → 1.22.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/dist/nys-icon.d.ts +18 -0
- package/dist/nys-icon.js +1217 -633
- package/dist/nys-icon.js.map +1 -1
- package/dist/{nys-icon.library-BxwfG3ym.js → nys-icon.library-DYsQ8Tiv.js} +2 -2
- package/dist/{nys-icon.library-BxwfG3ym.js.map → nys-icon.library-DYsQ8Tiv.js.map} +1 -1
- package/package.json +4 -4
package/dist/nys-icon.d.ts
CHANGED
|
@@ -13,6 +13,24 @@ import { NysIconWatcher } from "./icon-library-registry";
|
|
|
13
13
|
* @summary SVG icon with swappable library support, size, rotation, and color options.
|
|
14
14
|
* @element nys-icon
|
|
15
15
|
*
|
|
16
|
+
* @cssprop [--nys-icon-size] - Width and height of the component
|
|
17
|
+
*
|
|
18
|
+
* @usagedos
|
|
19
|
+
* - Use icons to draw attention to actions, help users scan for key information, or enhance recognizable common actions (e.g., search, download, share).
|
|
20
|
+
* - Pair icons with a text label—few icons are universally understood alone.
|
|
21
|
+
* - Use icons consistently: same icon and label for the same meaning throughout your app.
|
|
22
|
+
* - Use `ariaLabel` when the icon conveys meaning, so screen readers can announce its purpose.
|
|
23
|
+
* - Use icons from the NYS Design System library; if unavailable, use Google Material Symbols (rounded, unfilled).
|
|
24
|
+
* - Match icon size and color to the design system.
|
|
25
|
+
*
|
|
26
|
+
* @usagedonts
|
|
27
|
+
* - Use an icon if its meaning isn't immediately clear—if you suspect users won't recognize it, remove it.
|
|
28
|
+
* - Use icons to compensate for unclear page hierarchy or confusing content organization.
|
|
29
|
+
* - Use standalone icons for actions—use `<nys-button>` with an icon inside instead.
|
|
30
|
+
* - Replace meaningful text with icons unless the icon is universally recognized or paired with a label.
|
|
31
|
+
* - Overuse icons—too many create visual noise and reduce focus.
|
|
32
|
+
* - Use excessive icon customization that breaks design consistency.
|
|
33
|
+
*
|
|
16
34
|
* @example Basic
|
|
17
35
|
* ```html
|
|
18
36
|
* <nys-icon name="check_circle"></nys-icon>
|