@saas-ui/storybook-addon 1.0.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/CHANGELOG.md +497 -0
- package/README.md +97 -0
- package/dist/chunk-E3MMX4DM.js +4973 -0
- package/dist/chunk-GII4NPN2.js +81 -0
- package/dist/chunk-HSBRF2QZ.js +18 -0
- package/dist/chunk-N4JZ67DU.js +26 -0
- package/dist/chunk-NOGSFSIA.js +52 -0
- package/dist/chunk-QNOLFHPG.js +63 -0
- package/dist/chunk-SGM3YTWS.js +82 -0
- package/dist/chunk-SVHNULTN.js +24 -0
- package/dist/chunk-UK7U2PBM.js +70 -0
- package/dist/constants.cjs +46 -0
- package/dist/constants.d.ts +11 -0
- package/dist/constants.js +15 -0
- package/dist/feature/arg-types.cjs +76 -0
- package/dist/feature/arg-types.d.ts +46 -0
- package/dist/feature/arg-types.js +7 -0
- package/dist/feature/color-mode/ColorModeSync.cjs +57 -0
- package/dist/feature/color-mode/ColorModeSync.d.ts +6 -0
- package/dist/feature/color-mode/ColorModeSync.js +8 -0
- package/dist/feature/color-mode/ColorModeTool.cjs +95 -0
- package/dist/feature/color-mode/ColorModeTool.d.ts +6 -0
- package/dist/feature/color-mode/ColorModeTool.js +8 -0
- package/dist/feature/color-mode/ThemeTool.cjs +5038 -0
- package/dist/feature/color-mode/ThemeTool.d.ts +6 -0
- package/dist/feature/color-mode/ThemeTool.js +8 -0
- package/dist/feature/decorator/ChakraProviderDecorator.cjs +168 -0
- package/dist/feature/decorator/ChakraProviderDecorator.d.ts +5 -0
- package/dist/feature/decorator/ChakraProviderDecorator.js +10 -0
- package/dist/feature/direction/DirectionTool.cjs +127 -0
- package/dist/feature/direction/DirectionTool.d.ts +6 -0
- package/dist/feature/direction/DirectionTool.js +8 -0
- package/dist/feature/direction/useDirection.cjs +59 -0
- package/dist/feature/direction/useDirection.d.ts +6 -0
- package/dist/feature/direction/useDirection.js +8 -0
- package/dist/index.cjs +99 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +19 -0
- package/dist/preset/decorators.cjs +173 -0
- package/dist/preset/decorators.d.ts +3 -0
- package/dist/preset/decorators.js +13 -0
- package/dist/preset/index.cjs +60 -0
- package/dist/preset/index.d.ts +5 -0
- package/dist/preset/index.js +27 -0
- package/dist/preset/register.cjs +5175 -0
- package/dist/preset/register.d.ts +2 -0
- package/dist/preset/register.js +40 -0
- package/package.json +120 -0
- package/theming-arg-types.png +0 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
import {
|
2
|
+
ThemeTool
|
3
|
+
} from "../chunk-E3MMX4DM.js";
|
4
|
+
import {
|
5
|
+
DirectionTool
|
6
|
+
} from "../chunk-SGM3YTWS.js";
|
7
|
+
import {
|
8
|
+
ColorModeTool
|
9
|
+
} from "../chunk-QNOLFHPG.js";
|
10
|
+
import {
|
11
|
+
ADDON_ID,
|
12
|
+
COLOR_MODE_TOOL_ID,
|
13
|
+
DIRECTION_TOOL_ID,
|
14
|
+
THEME_TOOL_ID
|
15
|
+
} from "../chunk-HSBRF2QZ.js";
|
16
|
+
import "../chunk-UK7U2PBM.js";
|
17
|
+
|
18
|
+
// src/preset/register.ts
|
19
|
+
import { addons, types } from "@storybook/addons";
|
20
|
+
addons.register(ADDON_ID, () => {
|
21
|
+
const match = ({ viewMode }) => Boolean(viewMode && viewMode.match(/^(story|docs)$/));
|
22
|
+
addons.add(DIRECTION_TOOL_ID, {
|
23
|
+
type: types.TOOL,
|
24
|
+
title: "Direction",
|
25
|
+
render: DirectionTool,
|
26
|
+
match
|
27
|
+
});
|
28
|
+
addons.add(COLOR_MODE_TOOL_ID, {
|
29
|
+
type: types.TOOL,
|
30
|
+
title: "Color Mode",
|
31
|
+
render: ColorModeTool,
|
32
|
+
match
|
33
|
+
});
|
34
|
+
addons.add(THEME_TOOL_ID, {
|
35
|
+
type: types.TOOL,
|
36
|
+
title: "Theme",
|
37
|
+
render: ThemeTool,
|
38
|
+
match
|
39
|
+
});
|
40
|
+
});
|
package/package.json
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
{
|
2
|
+
"name": "@saas-ui/storybook-addon",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "The official Storybook Addon for Saas UI",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"module": "dist/index.mjs",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"type": "module",
|
9
|
+
"files": [
|
10
|
+
"dist",
|
11
|
+
"theming-arg-types.png"
|
12
|
+
],
|
13
|
+
"exports": {
|
14
|
+
".": {
|
15
|
+
"types": "./dist/index.d.ts",
|
16
|
+
"import": "./dist/index.mjs",
|
17
|
+
"require": "./dist/index.js"
|
18
|
+
},
|
19
|
+
"./*": "./*",
|
20
|
+
"./preset": {
|
21
|
+
"types": "./dist/preset/index.d.ts",
|
22
|
+
"import": "./dist/preset/index.mjs",
|
23
|
+
"require": "./dist/preset/index.js"
|
24
|
+
},
|
25
|
+
"./preset/decorators": {
|
26
|
+
"types": "./dist/preset/index.d.ts",
|
27
|
+
"import": "./dist/preset/decorators.mjs",
|
28
|
+
"require": "./dist/preset/decorators.js"
|
29
|
+
},
|
30
|
+
"./preset/register": {
|
31
|
+
"types": "./dist/preset/index.d.ts",
|
32
|
+
"import": "./dist/preset/register.mjs",
|
33
|
+
"require": "./dist/preset/register.js"
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"typesVersions": {
|
37
|
+
"*": {
|
38
|
+
"preset": [
|
39
|
+
"./dist/preset/index.d.ts"
|
40
|
+
],
|
41
|
+
"preset/decorators": [
|
42
|
+
"./dist/preset/decorators.d.ts"
|
43
|
+
],
|
44
|
+
"preset/register": [
|
45
|
+
"./dist/preset/register.d.ts"
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"scripts": {
|
50
|
+
"build": "tsup --dts",
|
51
|
+
"dev": "yarn build -- --watch",
|
52
|
+
"clean": "rimraf dist .turbo",
|
53
|
+
"typecheck": "tsc --noEmit",
|
54
|
+
"build:fast": "tsup"
|
55
|
+
},
|
56
|
+
"repository": {
|
57
|
+
"type": "git",
|
58
|
+
"url": "git+https://github.com/chakra-ui/chakra-ui.git",
|
59
|
+
"directory": "tooling/storybook-addon"
|
60
|
+
},
|
61
|
+
"keywords": [
|
62
|
+
"storybook-addon",
|
63
|
+
"chakra-ui",
|
64
|
+
"saas-ui",
|
65
|
+
"storybook",
|
66
|
+
"addons",
|
67
|
+
"dark-mode"
|
68
|
+
],
|
69
|
+
"author": "Andres Tuñón <andressp@ngxcoder.dev>",
|
70
|
+
"license": "MIT",
|
71
|
+
"bugs": {
|
72
|
+
"url": "https://github.com/saas-ui/saas-ui/issues"
|
73
|
+
},
|
74
|
+
"homepage": "https://github.com/saas-ui/saas-ui#readme",
|
75
|
+
"devDependencies": {
|
76
|
+
"@chakra-ui/react": "^2.5.1",
|
77
|
+
"@chakra-ui/system": ">=2.3.8",
|
78
|
+
"@emotion/react": ">=11.1.5",
|
79
|
+
"@emotion/styled": ">=11.1.5",
|
80
|
+
"@saas-ui/react": "2.0.0-next.5",
|
81
|
+
"@saas-ui/theme-glass": "0.3.2-next.1",
|
82
|
+
"@storybook/addons": "^7.0.0-rc.6",
|
83
|
+
"@storybook/api": "^7.0.0-rc.6",
|
84
|
+
"@storybook/components": "^7.0.0-rc.6",
|
85
|
+
"framer-motion": ">=4.1.17",
|
86
|
+
"react": "^18.0.0",
|
87
|
+
"react-dom": ">=18.0.0",
|
88
|
+
"tsup": "^6.6.3"
|
89
|
+
},
|
90
|
+
"peerDependencies": {
|
91
|
+
"@chakra-ui/react": ">=2.0.0",
|
92
|
+
"@storybook/addons": ">=7",
|
93
|
+
"@storybook/api": ">=7",
|
94
|
+
"@storybook/components": ">=7",
|
95
|
+
"react": ">=16.8.x"
|
96
|
+
},
|
97
|
+
"peerDependenciesMeta": {
|
98
|
+
"react": {
|
99
|
+
"optional": true
|
100
|
+
},
|
101
|
+
"react-dom": {
|
102
|
+
"optional": true
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"publishConfig": {
|
106
|
+
"access": "public"
|
107
|
+
},
|
108
|
+
"storybook": {
|
109
|
+
"displayName": "Chakra UI",
|
110
|
+
"supportedFrameworks": [
|
111
|
+
"react"
|
112
|
+
],
|
113
|
+
"unsupportedFrameworks": [
|
114
|
+
"Vue",
|
115
|
+
"Angular",
|
116
|
+
"Svelte"
|
117
|
+
],
|
118
|
+
"icon": "https://raw.githubusercontent.com/chakra-ui/chakra-ui/main/logo/logomark-colored.svg"
|
119
|
+
}
|
120
|
+
}
|
Binary file
|