@nudge-icons/vue 0.0.0-stage → 0.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.
@@ -0,0 +1,61 @@
1
+ import { h } from "vue";
2
+ // src/lib/render-svg.ts
3
+ const staticProps = {
4
+ /** Width and height. Default 24. */
5
+ size: {
6
+ type: [Number, String],
7
+ default: 24
8
+ },
9
+ /** Default 2. */
10
+ strokeWidth: {
11
+ type: [Number, String],
12
+ default: 2
13
+ },
14
+ /** Default `currentColor`, so the icon takes the text colour. */
15
+ color: {
16
+ type: String,
17
+ default: "currentColor"
18
+ },
19
+ /** Keep the stroke at `strokeWidth` pixels at any `size` (needs a numeric `size`). */
20
+ absoluteStrokeWidth: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ /** Accessible name. Without it (and without `aria-label`) the icon is hidden from assistive tech. */
25
+ title: {
26
+ type: String,
27
+ default: void 0
28
+ }
29
+ };
30
+ function renderNode(node) {
31
+ return node.map(([tag, attrs, children]) => h(tag, { ...attrs }, children ? renderNode(children) : void 0));
32
+ }
33
+ /**
34
+ * The <svg> every icon renders: size, stroke, class names and accessibility. Animated
35
+ * icons pass their data attributes and style in `extra` and their <style> tags in
36
+ * `styles`; static icons pass nothing.
37
+ */
38
+ function renderSvg(name, node, p, attrs, extra = {}, styles = []) {
39
+ const strokeWidth = p.absoluteStrokeWidth && Number(p.size) > 0 ? Number(p.strokeWidth) * 24 / Number(p.size) : p.strokeWidth;
40
+ const labelled = Boolean(p.title ?? attrs["aria-label"] ?? attrs["aria-labelledby"]);
41
+ return h("svg", {
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ width: p.size,
44
+ height: p.size,
45
+ viewBox: "0 0 24 24",
46
+ fill: "none",
47
+ stroke: p.color,
48
+ ...p.color !== "currentColor" && { color: p.color },
49
+ "stroke-width": strokeWidth,
50
+ "stroke-linecap": "round",
51
+ "stroke-linejoin": "round",
52
+ class: ["nudge-icon", `nudge-${name}`],
53
+ ...labelled ? { role: "img" } : { "aria-hidden": "true" },
54
+ ...extra
55
+ }, [
56
+ ...styles,
57
+ ...p.title ? [h("title", p.title)] : [],
58
+ ...renderNode(node)
59
+ ]);
60
+ }
61
+ export { staticProps as n, renderSvg as t };
@@ -0,0 +1,123 @@
1
+ import { r as StaticIconComponent } from "./types-DyDh9OBG.js";
2
+ export declare const AlertTriangle: StaticIconComponent;
3
+ export declare const AlertTriangleFilled: StaticIconComponent;
4
+ export declare const Archive: StaticIconComponent;
5
+ export declare const ArrowDown: StaticIconComponent;
6
+ export declare const ArrowDownRight: StaticIconComponent;
7
+ export declare const ArrowLeft: StaticIconComponent;
8
+ export declare const ArrowRight: StaticIconComponent;
9
+ export declare const ArrowUp: StaticIconComponent;
10
+ export declare const ArrowUpRight: StaticIconComponent;
11
+ export declare const Bell: StaticIconComponent;
12
+ export declare const BellFilled: StaticIconComponent;
13
+ export declare const Bolt: StaticIconComponent;
14
+ export declare const BoltFilled: StaticIconComponent;
15
+ export declare const Bookmark: StaticIconComponent;
16
+ export declare const BookmarkFilled: StaticIconComponent;
17
+ export declare const Calendar: StaticIconComponent;
18
+ export declare const Camera: StaticIconComponent;
19
+ export declare const ChartBar: StaticIconComponent;
20
+ export declare const ChartLine: StaticIconComponent;
21
+ export declare const ChartPie: StaticIconComponent;
22
+ export declare const Chat: StaticIconComponent;
23
+ export declare const Check: StaticIconComponent;
24
+ export declare const CheckCircle: StaticIconComponent;
25
+ export declare const CheckCircleFilled: StaticIconComponent;
26
+ export declare const ChevronDown: StaticIconComponent;
27
+ export declare const ChevronLeft: StaticIconComponent;
28
+ export declare const ChevronRight: StaticIconComponent;
29
+ export declare const ChevronUp: StaticIconComponent;
30
+ export declare const ChevronUpDown: StaticIconComponent;
31
+ export declare const Circle: StaticIconComponent;
32
+ export declare const CircleFilled: StaticIconComponent;
33
+ export declare const Clipboard: StaticIconComponent;
34
+ export declare const Clock: StaticIconComponent;
35
+ export declare const Cloud: StaticIconComponent;
36
+ export declare const Code: StaticIconComponent;
37
+ export declare const Comment: StaticIconComponent;
38
+ export declare const Copy: StaticIconComponent;
39
+ export declare const CreditCard: StaticIconComponent;
40
+ export declare const Database: StaticIconComponent;
41
+ export declare const Download: StaticIconComponent;
42
+ export declare const ExternalLink: StaticIconComponent;
43
+ export declare const Eye: StaticIconComponent;
44
+ export declare const File: StaticIconComponent;
45
+ export declare const Files: StaticIconComponent;
46
+ export declare const Flag: StaticIconComponent;
47
+ export declare const FlagFilled: StaticIconComponent;
48
+ export declare const Folder: StaticIconComponent;
49
+ export declare const FolderFilled: StaticIconComponent;
50
+ export declare const FolderOpen: StaticIconComponent;
51
+ export declare const Gallery: StaticIconComponent;
52
+ export declare const Gift: StaticIconComponent;
53
+ export declare const Globe: StaticIconComponent;
54
+ export declare const Grid: StaticIconComponent;
55
+ export declare const Heart: StaticIconComponent;
56
+ export declare const HeartFilled: StaticIconComponent;
57
+ export declare const HeartHalf: StaticIconComponent;
58
+ export declare const History: StaticIconComponent;
59
+ export declare const Hourglass: StaticIconComponent;
60
+ export declare const Image: StaticIconComponent;
61
+ export declare const Inbox: StaticIconComponent;
62
+ export declare const Info: StaticIconComponent;
63
+ export declare const InfoFilled: StaticIconComponent;
64
+ export declare const Key: StaticIconComponent;
65
+ export declare const Link: StaticIconComponent;
66
+ export declare const List: StaticIconComponent;
67
+ export declare const Loader: StaticIconComponent;
68
+ export declare const Lock: StaticIconComponent;
69
+ export declare const LockFilled: StaticIconComponent;
70
+ export declare const LockOpen: StaticIconComponent;
71
+ export declare const Map: StaticIconComponent;
72
+ export declare const MapPin: StaticIconComponent;
73
+ export declare const MapPinFilled: StaticIconComponent;
74
+ export declare const Menu: StaticIconComponent;
75
+ export declare const Minus: StaticIconComponent;
76
+ export declare const Moon: StaticIconComponent;
77
+ export declare const Package: StaticIconComponent;
78
+ export declare const Pause: StaticIconComponent;
79
+ export declare const PauseFilled: StaticIconComponent;
80
+ export declare const Pencil: StaticIconComponent;
81
+ export declare const Phone: StaticIconComponent;
82
+ export declare const Play: StaticIconComponent;
83
+ export declare const PlayFilled: StaticIconComponent;
84
+ export declare const Plug: StaticIconComponent;
85
+ export declare const Plus: StaticIconComponent;
86
+ export declare const Power: StaticIconComponent;
87
+ export declare const Printer: StaticIconComponent;
88
+ export declare const Receipt: StaticIconComponent;
89
+ export declare const Refresh: StaticIconComponent;
90
+ export declare const Repeat: StaticIconComponent;
91
+ export declare const Search: StaticIconComponent;
92
+ export declare const Send: StaticIconComponent;
93
+ export declare const Settings: StaticIconComponent;
94
+ export declare const SettingsFilled: StaticIconComponent;
95
+ export declare const Share: StaticIconComponent;
96
+ export declare const Shield: StaticIconComponent;
97
+ export declare const ShieldFilled: StaticIconComponent;
98
+ export declare const ShieldCheck: StaticIconComponent;
99
+ export declare const ShieldCheckFilled: StaticIconComponent;
100
+ export declare const ShoppingBag: StaticIconComponent;
101
+ export declare const ShoppingCart: StaticIconComponent;
102
+ export declare const Sidebar: StaticIconComponent;
103
+ export declare const SignOut: StaticIconComponent;
104
+ export declare const Sparkle: StaticIconComponent;
105
+ export declare const SparkleFilled: StaticIconComponent;
106
+ export declare const Star: StaticIconComponent;
107
+ export declare const StarFilled: StaticIconComponent;
108
+ export declare const StarHalf: StaticIconComponent;
109
+ export declare const Sun: StaticIconComponent;
110
+ export declare const Table: StaticIconComponent;
111
+ export declare const Tag: StaticIconComponent;
112
+ export declare const TagFilled: StaticIconComponent;
113
+ export declare const Terminal: StaticIconComponent;
114
+ export declare const Trash: StaticIconComponent;
115
+ export declare const Upload: StaticIconComponent;
116
+ export declare const User: StaticIconComponent;
117
+ export declare const UserPlus: StaticIconComponent;
118
+ export declare const Users: StaticIconComponent;
119
+ export declare const Video: StaticIconComponent;
120
+ export declare const Wallet: StaticIconComponent;
121
+ export declare const Wifi: StaticIconComponent;
122
+ export declare const X: StaticIconComponent;
123
+ export type { StaticIconComponent };