@qeetrix/icons 1.0.9 → 1.0.10

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.
@@ -15,5 +15,9 @@ export declare const defaultIconSize = 24;
15
15
  * - Unnamed icons are decorative: `aria-hidden="true"`, `focusable="false"`, and no role.
16
16
  * - A non-empty `aria-label` or `aria-labelledby` exposes the icon as `role="img"` instead.
17
17
  * - Explicit `width`, `height`, `focusable`, `aria-hidden`, or `role` always wins.
18
+ * - A prop passed as `undefined` counts as not passed. The generated `<svg>` spreads these props
19
+ * after its authored `strokeWidth="2"`, `fill`, `stroke`, and the rest, so a key holding
20
+ * `undefined` (`strokeWidth={maybe}`) would erase that attribute and SVG would fall back to its
21
+ * initial value: a stroke 1 unit wide, a black fill, or no stroke at all.
18
22
  */
19
23
  export declare function resolveIconProps({ size, shape: _shape, variant: _variant, ...props }: IconProps): SVGProps<SVGSVGElement>;
@@ -14,11 +14,21 @@ const hasText = (value) => value !== undefined && value.trim() !== "";
14
14
  * - Unnamed icons are decorative: `aria-hidden="true"`, `focusable="false"`, and no role.
15
15
  * - A non-empty `aria-label` or `aria-labelledby` exposes the icon as `role="img"` instead.
16
16
  * - Explicit `width`, `height`, `focusable`, `aria-hidden`, or `role` always wins.
17
+ * - A prop passed as `undefined` counts as not passed. The generated `<svg>` spreads these props
18
+ * after its authored `strokeWidth="2"`, `fill`, `stroke`, and the rest, so a key holding
19
+ * `undefined` (`strokeWidth={maybe}`) would erase that attribute and SVG would fall back to its
20
+ * initial value: a stroke 1 unit wide, a black fill, or no stroke at all.
17
21
  */
18
22
  export function resolveIconProps({ size = defaultIconSize, shape: _shape, variant: _variant, ...props }) {
19
23
  const named = hasText(props["aria-label"]) || hasText(props["aria-labelledby"]);
24
+ const passed = {};
25
+ for (const key in props) {
26
+ const value = props[key];
27
+ if (value !== undefined)
28
+ passed[key] = value;
29
+ }
20
30
  return {
21
- ...props,
31
+ ...passed,
22
32
  width: props.width ?? size,
23
33
  height: props.height ?? size,
24
34
  focusable: props.focusable ?? false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qeetrix/icons",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "description": "Qeetrix Icons — Lucide icons in round and sharp shapes with derived filled variants, plus theSVG brand logos, as tree-shakeable React components.",
6
6
  "license": "SEE LICENSE IN LICENSE",