@lucide/astro 1.74.0 → 1.75.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 +1 -1
- package/src/aliases/aliases.ts +90 -90
- package/src/aliases/prefixed.ts +488 -484
- package/src/aliases/suffixed.ts +738 -734
- package/src/icons/index.ts +159 -157
- package/src/icons/jacket.ts +20 -0
- package/src/icons/paint-gun.ts +20 -0
- package/src/icons/spray-can.ts +2 -2
- package/src/utils/hasA11yProp.ts +11 -3
- package/src/utils/mergeClasses.ts +12 -11
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import createLucideIcon from '../createLucideIcon';
|
|
3
|
+
import type { AstroComponent, LucideIconData } from '../types'
|
|
4
|
+
|
|
5
|
+
const iconData: LucideIconData = {"name":"jacket","size":24,"node":[["path",{"d":"M11 2a3 3 0 00-3 3c0 2.6 4 4.4 4 7 0-2.6 4-4.4 4-7a3 3 0 00-3-3"}],["path",{"d":"M12 12v10"}],["path",{"d":"M18 10v10a2 2 0 01-2 2H8a2 2 0 01-2-2V10"}],["path",{"d":"M18 17h-2"}],["path",{"d":"M18 20h3a1 1 0 001-1V9a7 7 0 00-7-7H9a7 7 0 00-7 7v10a1 1 0 001 1h3"}],["path",{"d":"M6 17h2"}]]};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @component @name Jacket
|
|
9
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
10
|
+
*
|
|
11
|
+
* @preview  - https://lucide.dev/icons/jacket
|
|
12
|
+
* @see https://lucide.dev/guide/packages/lucide-astro - Documentation
|
|
13
|
+
*
|
|
14
|
+
* @param {import('../types').IconProps} props - Lucide icons props and any valid SVG attribute
|
|
15
|
+
* @returns {any} Astro Component
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
const Jacket = createLucideIcon(iconData) as AstroComponent;
|
|
19
|
+
|
|
20
|
+
export default Jacket;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import createLucideIcon from '../createLucideIcon';
|
|
3
|
+
import type { AstroComponent, LucideIconData } from '../types'
|
|
4
|
+
|
|
5
|
+
const iconData: LucideIconData = {"name":"paint-gun","size":24,"node":[["path",{"d":"M11 10v-.172a2 2 0 0 1 .586-1.414l.828-.828A2 2 0 0 0 13 6.172V3a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v3.172a2 2 0 0 0 .586 1.414l.828.828A2 2 0 0 1 7 9.828V10"}],["path",{"d":"m12 14-.81 3.242a1 1 0 0 1-.97.758H7"}],["path",{"d":"M13 12h1"}],["path",{"d":"M18.01 10h.01"}],["path",{"d":"M18.01 14h.01"}],["path",{"d":"M22.01 12h.01"}],["path",{"d":"M22.01 16h.01"}],["path",{"d":"M22.01 8h.01"}],["path",{"d":"m4 14-1.845 7.379A.5.5 0 0 0 2.64 22h2.58a1 1 0 0 0 .97-.758L8 14"}],["rect",{"x":"2","y":"10","width":"11","height":"4","rx":"1"}]]};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @component @name PaintGun
|
|
9
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
10
|
+
*
|
|
11
|
+
* @preview  - https://lucide.dev/icons/paint-gun
|
|
12
|
+
* @see https://lucide.dev/guide/packages/lucide-astro - Documentation
|
|
13
|
+
*
|
|
14
|
+
* @param {import('../types').IconProps} props - Lucide icons props and any valid SVG attribute
|
|
15
|
+
* @returns {any} Astro Component
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
const PaintGun = createLucideIcon(iconData) as AstroComponent;
|
|
19
|
+
|
|
20
|
+
export default PaintGun;
|
package/src/icons/spray-can.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import createLucideIcon from '../createLucideIcon';
|
|
3
3
|
import type { AstroComponent, LucideIconData } from '../types'
|
|
4
4
|
|
|
5
|
-
const iconData: LucideIconData = {"name":"spray-can","size":24,"node":[["path",{"d":"
|
|
5
|
+
const iconData: LucideIconData = {"name":"spray-can","size":24,"node":[["path",{"d":"m12 19 8-3"}],["path",{"d":"M14 6h-2"}],["path",{"d":"M18 8.172V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v3.172"}],["path",{"d":"m20 11-8 3"}],["path",{"d":"M20 20a2 2 0 01-2 2h-4a2 2 0 01-2-2v-9a3 3 0 013-3h2a3 3 0 013 3z"}],["path",{"d":"M4 10h.01"}],["path",{"d":"M4 2h.01"}],["path",{"d":"M4 6h.01"}],["path",{"d":"M8 4h.01"}],["path",{"d":"M8 8h.01"}]]};
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @component @name SprayCan
|
|
9
9
|
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
10
10
|
*
|
|
11
|
-
* @preview  - https://lucide.dev/icons/spray-can
|
|
12
12
|
* @see https://lucide.dev/guide/packages/lucide-astro - Documentation
|
|
13
13
|
*
|
|
14
14
|
* @param {import('../types').IconProps} props - Lucide icons props and any valid SVG attribute
|
package/src/utils/hasA11yProp.ts
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if a component has an accessibility prop
|
|
3
3
|
*
|
|
4
|
-
* @param {object} props
|
|
4
|
+
* @param {object} [props]
|
|
5
5
|
* @returns {boolean} Whether the component has an accessibility prop
|
|
6
6
|
*/
|
|
7
|
-
export const hasA11yProp = (props
|
|
7
|
+
export const hasA11yProp = (props?: Record<string, unknown> | null): boolean => {
|
|
8
|
+
if (props == null || typeof props !== 'object') {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
for (const prop in props) {
|
|
9
|
-
if (
|
|
13
|
+
if (
|
|
14
|
+
Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
15
|
+
(prop.startsWith('aria-') || prop === 'role' || prop === 'title') &&
|
|
16
|
+
props[prop] != null
|
|
17
|
+
) {
|
|
10
18
|
return true;
|
|
11
19
|
}
|
|
12
20
|
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
* @param {array} classes
|
|
5
5
|
* @returns {string} A string of classes
|
|
6
6
|
*/
|
|
7
|
-
export const mergeClasses =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
export const mergeClasses = (...classes: (string | undefined | null)[]) => {
|
|
8
|
+
const tokens = new Set<string>();
|
|
9
|
+
|
|
10
|
+
for (const cls of classes) {
|
|
11
|
+
if (typeof cls !== 'string') continue;
|
|
12
|
+
for (const token of cls.split(/\s+/)) {
|
|
13
|
+
if (token) tokens.add(token);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return [...tokens].join(' ');
|
|
18
|
+
};
|