@impulse-ui-native/storybook 2.1.0 → 2.1.1

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,11 @@
1
+ import * as react from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+
5
+ interface StoryDocumentationPageProps extends PropsWithChildren {
6
+ title: string;
7
+ description?: string;
8
+ }
9
+ declare const StoryDocumentationPage: react.MemoExoticComponent<({ title, description, children, }: StoryDocumentationPageProps) => react_jsx_runtime.JSX.Element>;
10
+
11
+ export { StoryDocumentationPage };
@@ -0,0 +1,23 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { ScrollView } from "react-native";
4
+ import { Typography, View } from "@impulse-ui-native/primitives";
5
+ import { useSpace } from "@impulse-ui-native/theme";
6
+ const StoryDocumentationPage = memo(function StoryDocumentationPage2({
7
+ title,
8
+ description,
9
+ children
10
+ }) {
11
+ const space = useSpace();
12
+ return /* @__PURE__ */ jsx(ScrollView, { children: /* @__PURE__ */ jsxs(View, { gap: space.md, padding: space.sm, children: [
13
+ /* @__PURE__ */ jsxs(View, { gap: space.xs, children: [
14
+ /* @__PURE__ */ jsx(Typography.Title2, { children: title }),
15
+ description ? /* @__PURE__ */ jsx(Typography.Master, { children: description }) : null
16
+ ] }),
17
+ /* @__PURE__ */ jsx(View, { gap: space.md, children })
18
+ ] }) });
19
+ });
20
+ export {
21
+ StoryDocumentationPage
22
+ };
23
+ //# sourceMappingURL=story-documentation-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/story-documentation-page.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport { memo } from \"react\";\nimport { ScrollView } from \"react-native\";\n\nimport { Typography, View } from \"@impulse-ui-native/primitives\";\nimport { useSpace } from \"@impulse-ui-native/theme\";\n\ninterface StoryDocumentationPageProps extends PropsWithChildren {\n title: string;\n description?: string;\n}\n\nexport const StoryDocumentationPage = memo(function StoryDocumentationPage({\n title,\n description,\n children,\n}: StoryDocumentationPageProps) {\n const space = useSpace();\n\n return (\n <ScrollView>\n <View gap={space.md} padding={space.sm}>\n <View gap={space.xs}>\n <Typography.Title2>{title}</Typography.Title2>\n\n {description ? (\n <Typography.Master>{description}</Typography.Master>\n ) : null}\n </View>\n\n <View gap={space.md}>{children}</View>\n </View>\n </ScrollView>\n );\n});\n"],"mappings":"AAsBQ,SACE,KADF;AArBR,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAE3B,SAAS,YAAY,YAAY;AACjC,SAAS,gBAAgB;AAOlB,MAAM,yBAAyB,KAAK,SAASA,wBAAuB;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AACF,GAAgC;AAC9B,QAAM,QAAQ,SAAS;AAEvB,SACE,oBAAC,cACC,+BAAC,QAAK,KAAK,MAAM,IAAI,SAAS,MAAM,IAClC;AAAA,yBAAC,QAAK,KAAK,MAAM,IACf;AAAA,0BAAC,WAAW,QAAX,EAAmB,iBAAM;AAAA,MAEzB,cACC,oBAAC,WAAW,QAAX,EAAmB,uBAAY,IAC9B;AAAA,OACN;AAAA,IAEA,oBAAC,QAAK,KAAK,MAAM,IAAK,UAAS;AAAA,KACjC,GACF;AAEJ,CAAC;","names":["StoryDocumentationPage"]}
@@ -0,0 +1,18 @@
1
+ import * as react from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+
5
+ interface StoryExamplePropDefinition {
6
+ name: string;
7
+ value: string;
8
+ description?: string;
9
+ }
10
+ interface StoryExampleProps extends PropsWithChildren {
11
+ title: string;
12
+ description: string;
13
+ props?: StoryExamplePropDefinition[];
14
+ elevated?: boolean;
15
+ }
16
+ declare const StoryExample: react.MemoExoticComponent<({ title, description, props, children, elevated, }: StoryExampleProps) => react_jsx_runtime.JSX.Element>;
17
+
18
+ export { StoryExample, type StoryExamplePropDefinition };
@@ -0,0 +1,77 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { Typography, View } from "@impulse-ui-native/primitives";
4
+ import { useColors, useRadii, useSpace } from "@impulse-ui-native/theme";
5
+ const StoryExample = memo(function StoryExample2({
6
+ title,
7
+ description,
8
+ props,
9
+ children,
10
+ elevated
11
+ }) {
12
+ const colors = useColors();
13
+ const radii = useRadii();
14
+ const space = useSpace();
15
+ return /* @__PURE__ */ jsxs(
16
+ View,
17
+ {
18
+ gap: space.md,
19
+ padding: space.sm,
20
+ borderRadius: elevated ? radii.sm : void 0,
21
+ backgroundColor: elevated ? colors.surface.elevated.value : void 0,
22
+ shadow: elevated ? "sm" : void 0,
23
+ children: [
24
+ /* @__PURE__ */ jsxs(View, { gap: space.xs, children: [
25
+ /* @__PURE__ */ jsx(Typography.Title4, { children: title }),
26
+ /* @__PURE__ */ jsx(Typography.Master, { children: description })
27
+ ] }),
28
+ props?.length ? /* @__PURE__ */ jsxs(View, { gap: space.sm, children: [
29
+ /* @__PURE__ */ jsx(Typography.Overline, { children: "Props" }),
30
+ /* @__PURE__ */ jsx(View, { gap: space.xs, children: props.map((prop) => /* @__PURE__ */ jsxs(
31
+ View,
32
+ {
33
+ gap: space.xs,
34
+ padding: space.xs,
35
+ borderRadius: radii.md,
36
+ backgroundColor: colors.surface.secondary.value,
37
+ children: [
38
+ /* @__PURE__ */ jsxs(
39
+ View,
40
+ {
41
+ flexDirection: "row",
42
+ alignItems: "center",
43
+ justifyContent: "space-between",
44
+ gap: space.sm,
45
+ children: [
46
+ /* @__PURE__ */ jsx(Typography.Label, { children: prop.name }),
47
+ /* @__PURE__ */ jsx(
48
+ View,
49
+ {
50
+ paddingHorizontal: space.xs,
51
+ paddingVertical: space.xxs,
52
+ borderRadius: radii.sm,
53
+ backgroundColor: colors.surface.primary.value,
54
+ children: /* @__PURE__ */ jsx(Typography.Code, { children: prop.value })
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ ),
60
+ prop.description ? /* @__PURE__ */ jsx(Typography.Helper, { children: prop.description }) : null
61
+ ]
62
+ },
63
+ prop.name
64
+ )) })
65
+ ] }) : null,
66
+ /* @__PURE__ */ jsxs(View, { gap: space.xs, children: [
67
+ /* @__PURE__ */ jsx(Typography.Caption, { children: "Preview" }),
68
+ children
69
+ ] })
70
+ ]
71
+ }
72
+ );
73
+ });
74
+ export {
75
+ StoryExample
76
+ };
77
+ //# sourceMappingURL=story-example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/story-example.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport { memo } from \"react\";\n\nimport { Typography, View } from \"@impulse-ui-native/primitives\";\nimport { useColors, useRadii, useSpace } from \"@impulse-ui-native/theme\";\n\nexport interface StoryExamplePropDefinition {\n name: string;\n value: string;\n description?: string;\n}\n\ninterface StoryExampleProps extends PropsWithChildren {\n title: string;\n description: string;\n props?: StoryExamplePropDefinition[];\n elevated?: boolean;\n}\n\nexport const StoryExample = memo(function StoryExample({\n title,\n description,\n props,\n children,\n elevated,\n}: StoryExampleProps) {\n const colors = useColors();\n const radii = useRadii();\n const space = useSpace();\n\n return (\n <View\n gap={space.md}\n padding={space.sm}\n borderRadius={elevated ? radii.sm : undefined}\n backgroundColor={elevated ? colors.surface.elevated.value : undefined}\n shadow={elevated ? \"sm\" : undefined}\n >\n <View gap={space.xs}>\n <Typography.Title4>{title}</Typography.Title4>\n <Typography.Master>{description}</Typography.Master>\n </View>\n\n {props?.length ? (\n <View gap={space.sm}>\n <Typography.Overline>Props</Typography.Overline>\n\n <View gap={space.xs}>\n {props.map((prop) => (\n <View\n key={prop.name}\n gap={space.xs}\n padding={space.xs}\n borderRadius={radii.md}\n backgroundColor={colors.surface.secondary.value}\n >\n <View\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n gap={space.sm}\n >\n <Typography.Label>{prop.name}</Typography.Label>\n\n <View\n paddingHorizontal={space.xs}\n paddingVertical={space.xxs}\n borderRadius={radii.sm}\n backgroundColor={colors.surface.primary.value}\n >\n <Typography.Code>{prop.value}</Typography.Code>\n </View>\n </View>\n\n {prop.description ? (\n <Typography.Helper>{prop.description}</Typography.Helper>\n ) : null}\n </View>\n ))}\n </View>\n </View>\n ) : null}\n\n <View gap={space.xs}>\n <Typography.Caption>Preview</Typography.Caption>\n {children}\n </View>\n </View>\n );\n});\n"],"mappings":"AAsCM,SACE,KADF;AArCN,SAAS,YAAY;AAErB,SAAS,YAAY,YAAY;AACjC,SAAS,WAAW,UAAU,gBAAgB;AAevC,MAAM,eAAe,KAAK,SAASA,cAAa;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAsB;AACpB,QAAM,SAAS,UAAU;AACzB,QAAM,QAAQ,SAAS;AACvB,QAAM,QAAQ,SAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,MAAM;AAAA,MACX,SAAS,MAAM;AAAA,MACf,cAAc,WAAW,MAAM,KAAK;AAAA,MACpC,iBAAiB,WAAW,OAAO,QAAQ,SAAS,QAAQ;AAAA,MAC5D,QAAQ,WAAW,OAAO;AAAA,MAE1B;AAAA,6BAAC,QAAK,KAAK,MAAM,IACf;AAAA,8BAAC,WAAW,QAAX,EAAmB,iBAAM;AAAA,UAC1B,oBAAC,WAAW,QAAX,EAAmB,uBAAY;AAAA,WAClC;AAAA,QAEC,OAAO,SACN,qBAAC,QAAK,KAAK,MAAM,IACf;AAAA,8BAAC,WAAW,UAAX,EAAoB,mBAAK;AAAA,UAE1B,oBAAC,QAAK,KAAK,MAAM,IACd,gBAAM,IAAI,CAAC,SACV;AAAA,YAAC;AAAA;AAAA,cAEC,KAAK,MAAM;AAAA,cACX,SAAS,MAAM;AAAA,cACf,cAAc,MAAM;AAAA,cACpB,iBAAiB,OAAO,QAAQ,UAAU;AAAA,cAE1C;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAc;AAAA,oBACd,YAAW;AAAA,oBACX,gBAAe;AAAA,oBACf,KAAK,MAAM;AAAA,oBAEX;AAAA,0CAAC,WAAW,OAAX,EAAkB,eAAK,MAAK;AAAA,sBAE7B;AAAA,wBAAC;AAAA;AAAA,0BACC,mBAAmB,MAAM;AAAA,0BACzB,iBAAiB,MAAM;AAAA,0BACvB,cAAc,MAAM;AAAA,0BACpB,iBAAiB,OAAO,QAAQ,QAAQ;AAAA,0BAExC,8BAAC,WAAW,MAAX,EAAiB,eAAK,OAAM;AAAA;AAAA,sBAC/B;AAAA;AAAA;AAAA,gBACF;AAAA,gBAEC,KAAK,cACJ,oBAAC,WAAW,QAAX,EAAmB,eAAK,aAAY,IACnC;AAAA;AAAA;AAAA,YA1BC,KAAK;AAAA,UA2BZ,CACD,GACH;AAAA,WACF,IACE;AAAA,QAEJ,qBAAC,QAAK,KAAK,MAAM,IACf;AAAA,8BAAC,WAAW,SAAX,EAAmB,qBAAO;AAAA,UAC1B;AAAA,WACH;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;","names":["StoryExample"]}
@@ -0,0 +1 @@
1
+ export { ComponentSizeOptions, ComponentVariantOptions } from './storybook.constants.mjs';
@@ -0,0 +1,2 @@
1
+ export * from "./storybook.constants";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/constants/index.ts"],"sourcesContent":["export * from \"./storybook.constants\";\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -0,0 +1,4 @@
1
+ declare const ComponentSizeOptions: ("small" | "medium" | "large")[];
2
+ declare const ComponentVariantOptions: ("filled" | "outlined" | "soft" | "ghost" | "plain")[];
3
+
4
+ export { ComponentSizeOptions, ComponentVariantOptions };
@@ -0,0 +1,17 @@
1
+ const ComponentSizeOptions = [
2
+ "small",
3
+ "medium",
4
+ "large"
5
+ ];
6
+ const ComponentVariantOptions = [
7
+ "filled",
8
+ "outlined",
9
+ "soft",
10
+ "ghost",
11
+ "plain"
12
+ ];
13
+ export {
14
+ ComponentSizeOptions,
15
+ ComponentVariantOptions
16
+ };
17
+ //# sourceMappingURL=storybook.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/constants/storybook.constants.ts"],"sourcesContent":["import type { ComponentSize, ComponentVariant } from \"@impulse-ui-native/theme\";\n\nexport const ComponentSizeOptions = [\n \"small\",\n \"medium\",\n \"large\",\n] satisfies ComponentSize[];\n\nexport const ComponentVariantOptions = [\n \"filled\",\n \"outlined\",\n \"soft\",\n \"ghost\",\n \"plain\",\n] satisfies ComponentVariant[];\n"],"mappings":"AAEO,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
package/dist/index.d.mts CHANGED
@@ -1,11 +1,2 @@
1
- declare function createStoryDescription(notes: string): {
2
- notes: string;
3
- };
4
- declare function createComponentDescription(notes: string): {
5
- notes: string;
6
- };
7
-
8
- declare const ComponentSizeOptions: ("small" | "medium" | "large")[];
9
- declare const ComponentVariantOptions: ("filled" | "outlined" | "soft" | "ghost" | "plain")[];
10
-
11
- export { ComponentSizeOptions, ComponentVariantOptions, createComponentDescription, createStoryDescription };
1
+ export { createComponentDescription, createStoryDescription } from './utils/storybook.utils.mjs';
2
+ export { ComponentSizeOptions, ComponentVariantOptions } from './constants/storybook.constants.mjs';
package/dist/index.js CHANGED
@@ -1,32 +1,3 @@
1
- // src/utils/storybook.utils.ts
2
- function createStoryDescription(notes) {
3
- return {
4
- notes
5
- };
6
- }
7
- function createComponentDescription(notes) {
8
- return {
9
- notes
10
- };
11
- }
12
-
13
- // src/constants/storybook.constants.ts
14
- var ComponentSizeOptions = [
15
- "small",
16
- "medium",
17
- "large"
18
- ];
19
- var ComponentVariantOptions = [
20
- "filled",
21
- "outlined",
22
- "soft",
23
- "ghost",
24
- "plain"
25
- ];
26
- export {
27
- ComponentSizeOptions,
28
- ComponentVariantOptions,
29
- createComponentDescription,
30
- createStoryDescription
31
- };
1
+ export * from "./utils";
2
+ export * from "./constants";
32
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/storybook.utils.ts","../src/constants/storybook.constants.ts"],"sourcesContent":["export function createStoryDescription(notes: string) {\n return {\n notes,\n };\n}\n\nexport function createComponentDescription(notes: string) {\n return {\n notes,\n };\n}\n","import type { ComponentSize, ComponentVariant } from \"@impulse-ui-native/theme\";\n\nexport const ComponentSizeOptions = [\n \"small\",\n \"medium\",\n \"large\",\n] satisfies ComponentSize[];\n\nexport const ComponentVariantOptions = [\n \"filled\",\n \"outlined\",\n \"soft\",\n \"ghost\",\n \"plain\",\n] satisfies ComponentVariant[];\n"],"mappings":";AAAO,SAAS,uBAAuB,OAAe;AACpD,SAAO;AAAA,IACL;AAAA,EACF;AACF;AAEO,SAAS,2BAA2B,OAAe;AACxD,SAAO;AAAA,IACL;AAAA,EACF;AACF;;;ACRO,IAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./utils\";\nexport * from \"./constants\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1 @@
1
+ export { createComponentDescription, createStoryDescription } from './storybook.utils.mjs';
@@ -0,0 +1,2 @@
1
+ export * from "./storybook.utils";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from \"./storybook.utils\";\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -0,0 +1,8 @@
1
+ declare function createStoryDescription(notes: string): {
2
+ notes: string;
3
+ };
4
+ declare function createComponentDescription(notes: string): {
5
+ notes: string;
6
+ };
7
+
8
+ export { createComponentDescription, createStoryDescription };
@@ -0,0 +1,15 @@
1
+ function createStoryDescription(notes) {
2
+ return {
3
+ notes
4
+ };
5
+ }
6
+ function createComponentDescription(notes) {
7
+ return {
8
+ notes
9
+ };
10
+ }
11
+ export {
12
+ createComponentDescription,
13
+ createStoryDescription
14
+ };
15
+ //# sourceMappingURL=storybook.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/storybook.utils.ts"],"sourcesContent":["export function createStoryDescription(notes: string) {\n return {\n notes,\n };\n}\n\nexport function createComponentDescription(notes: string) {\n return {\n notes,\n };\n}\n"],"mappings":"AAAO,SAAS,uBAAuB,OAAe;AACpD,SAAO;AAAA,IACL;AAAA,EACF;AACF;AAEO,SAAS,2BAA2B,OAAe;AACxD,SAAO;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impulse-ui-native/storybook",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "source": "src/index.ts",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.mts",
@@ -17,10 +17,11 @@
17
17
  "README.md",
18
18
  "LICENSE"
19
19
  ],
20
+ "sideEffects": false,
20
21
  "dependencies": {
21
- "@impulse-ui-native/icon": "2.1.0",
22
- "@impulse-ui-native/theme": "2.1.0",
23
- "@impulse-ui-native/primitives": "2.1.0"
22
+ "@impulse-ui-native/theme": "2.1.1",
23
+ "@impulse-ui-native/primitives": "2.1.1",
24
+ "@impulse-ui-native/icon": "2.1.1"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/react": "~19.2.14",
@@ -29,8 +30,8 @@
29
30
  "react": "19.2.3",
30
31
  "react-native": "0.86.2",
31
32
  "typescript": "~6.0.3",
32
- "@impulse-ui-native/eslint-config": "1.0.0",
33
33
  "@impulse-ui-native/prettier-config": "1.0.0",
34
+ "@impulse-ui-native/eslint-config": "1.0.0",
34
35
  "@impulse-ui-native/tsconfig": "1.0.0"
35
36
  },
36
37
  "peerDependencies": {