@nicolassancho/storybook-core 4.1.2 → 4.1.4
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.
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type SvgIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
1
3
|
export declare const IconsMap: {
|
|
2
|
-
Home:
|
|
3
|
-
ShoppingCart:
|
|
4
|
-
ArrowDown:
|
|
5
|
-
ArrowLeft:
|
|
6
|
-
AlertOctagon:
|
|
7
|
-
AlertTriangle:
|
|
8
|
-
Sun:
|
|
9
|
-
Moon:
|
|
4
|
+
Home: SvgIcon;
|
|
5
|
+
ShoppingCart: SvgIcon;
|
|
6
|
+
ArrowDown: SvgIcon;
|
|
7
|
+
ArrowLeft: SvgIcon;
|
|
8
|
+
AlertOctagon: SvgIcon;
|
|
9
|
+
AlertTriangle: SvgIcon;
|
|
10
|
+
Sun: SvgIcon;
|
|
11
|
+
Moon: SvgIcon;
|
|
10
12
|
};
|
|
13
|
+
export {};
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//
|
|
3
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Feather draws every icon on a 24px grid with a 2px round stroke in the current text color.
|
|
3
|
+
// `width` and `height` are the fallback size when a consumer's Tailwind does not apply the
|
|
4
|
+
// size classes from Icon.
|
|
5
|
+
const createIcon = (paths) => (props) => (_jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, props, { children: paths })));
|
|
6
|
+
// To add an icon, paste the shapes from its Feather SVG here and register it in IconsMap.
|
|
7
|
+
const Home = createIcon(_jsxs(_Fragment, { children: [_jsx("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }), _jsx("polyline", { points: "9 22 9 12 15 12 15 22" })] }));
|
|
8
|
+
const ShoppingCart = createIcon(_jsxs(_Fragment, { children: [_jsx("circle", { cx: "9", cy: "21", r: "1" }), _jsx("circle", { cx: "20", cy: "21", r: "1" }), _jsx("path", { d: "M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6" })] }));
|
|
9
|
+
const ArrowDown = createIcon(_jsxs(_Fragment, { children: [_jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), _jsx("polyline", { points: "19 12 12 19 5 12" })] }));
|
|
10
|
+
const ArrowLeft = createIcon(_jsxs(_Fragment, { children: [_jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), _jsx("polyline", { points: "12 19 5 12 12 5" })] }));
|
|
11
|
+
const AlertOctagon = createIcon(_jsxs(_Fragment, { children: [_jsx("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }), _jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12" }), _jsx("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })] }));
|
|
12
|
+
const AlertTriangle = createIcon(_jsxs(_Fragment, { children: [_jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }));
|
|
13
|
+
const Sun = createIcon(_jsxs(_Fragment, { children: [_jsx("circle", { cx: "12", cy: "12", r: "5" }), _jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), _jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), _jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), _jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), _jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), _jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), _jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), _jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] }));
|
|
14
|
+
const Moon = createIcon(_jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }));
|
|
4
15
|
export const IconsMap = {
|
|
5
16
|
Home,
|
|
6
17
|
ShoppingCart,
|
|
@@ -10,5 +21,4 @@ export const IconsMap = {
|
|
|
10
21
|
AlertTriangle,
|
|
11
22
|
Sun,
|
|
12
23
|
Moon,
|
|
13
|
-
// Add other icons here
|
|
14
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicolassancho/storybook-core",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Accessible React + Tailwind component library built with tailwind-variants and documented in Storybook.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -85,9 +85,6 @@
|
|
|
85
85
|
"typescript": "^5.9.3",
|
|
86
86
|
"vitest": "^5.0.3"
|
|
87
87
|
},
|
|
88
|
-
"dependencies": {
|
|
89
|
-
"react-feather": "^2.0.10"
|
|
90
|
-
},
|
|
91
88
|
"peerDependencies": {
|
|
92
89
|
"react": "^19.0.0",
|
|
93
90
|
"react-dom": "^19.0.0",
|