onecart-ui 0.2.8 → 0.3.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.
Files changed (59) hide show
  1. package/dist/index.js +112 -4789
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mobile.js +106 -208
  4. package/dist/index.mobile.js.map +1 -1
  5. package/icons/Icons.stories.js +1 -1
  6. package/package.json +20 -18
  7. package/tokens/tokens.scss +349 -0
  8. package/dist/Button/Button.mobile.d.ts +0 -4
  9. package/dist/Button/Button.types.d.ts +0 -43
  10. package/dist/Button/Button.web.d.ts +0 -4
  11. package/dist/Button/buttonStyles.d.ts +0 -12
  12. package/dist/Button/index.d.ts +0 -1
  13. package/dist/Button/index.mobile.d.ts +0 -1
  14. package/dist/Typography/Body/index.d.ts +0 -3
  15. package/dist/Typography/Display/index.d.ts +0 -3
  16. package/dist/Typography/Heading/index.d.ts +0 -3
  17. package/dist/Typography/Utility/index.d.ts +0 -3
  18. package/dist/Typography/index.d.ts +0 -4
  19. package/dist/components/Button.d.ts +0 -1
  20. package/dist/components/Icon.d.ts +0 -10
  21. package/dist/components/index.d.ts +0 -4
  22. package/dist/mobile/index.d.ts +0 -2
  23. package/dist/src/Button/Button.mobile.d.ts +0 -4
  24. package/dist/src/Button/Button.types.d.ts +0 -43
  25. package/dist/src/Button/Button.web.d.ts +0 -4
  26. package/dist/src/Button/buttonStyles.d.ts +0 -12
  27. package/dist/src/Button/index.d.ts +0 -2
  28. package/dist/src/Button/index.mobile.d.ts +0 -2
  29. package/dist/src/Typography/Body/Body.mobile.d.ts +0 -3
  30. package/dist/src/Typography/Body/Body.web.d.ts +0 -3
  31. package/dist/src/Typography/Body/index.d.ts +0 -1
  32. package/dist/src/Typography/Body/index.mobile.d.ts +0 -1
  33. package/dist/src/Typography/Display/Display.mobile.d.ts +0 -3
  34. package/dist/src/Typography/Display/Display.web.d.ts +0 -3
  35. package/dist/src/Typography/Display/index.d.ts +0 -1
  36. package/dist/src/Typography/Display/index.mobile.d.ts +0 -1
  37. package/dist/src/Typography/Heading/Heading.mobile.d.ts +0 -3
  38. package/dist/src/Typography/Heading/Heading.web.d.ts +0 -3
  39. package/dist/src/Typography/Heading/index.d.ts +0 -1
  40. package/dist/src/Typography/Heading/index.mobile.d.ts +0 -1
  41. package/dist/src/Typography/Typography.types.d.ts +0 -51
  42. package/dist/src/Typography/Utility/Utility.mobile.d.ts +0 -3
  43. package/dist/src/Typography/Utility/Utility.web.d.ts +0 -3
  44. package/dist/src/Typography/Utility/index.d.ts +0 -1
  45. package/dist/src/Typography/Utility/index.mobile.d.ts +0 -1
  46. package/dist/src/Typography/index.d.ts +0 -5
  47. package/dist/src/Typography/index.mobile.d.ts +0 -5
  48. package/dist/src/components/Button.d.ts +0 -1
  49. package/dist/src/components/Icon.d.ts +0 -10
  50. package/dist/src/components/index.d.ts +0 -2
  51. package/dist/src/index.d.ts +0 -2
  52. package/dist/src/styles/tokens/typography.d.ts +0 -138
  53. package/dist/src/theme/ThemeProvider.d.ts +0 -5
  54. package/dist/src/tokens/design-tokens.d.ts +0 -54
  55. package/dist/styles/tokens/typography.d.ts +0 -138
  56. package/dist/theme/ThemeProvider.d.ts +0 -5
  57. package/dist/tokens/design-tokens.d.ts +0 -54
  58. package/dist/types/Button.d.ts +0 -24
  59. package/dist/types/Typography.d.ts +0 -32
@@ -1 +0,0 @@
1
- export * from "./Utility.mobile";
@@ -1,5 +0,0 @@
1
- export { Display } from "./Display";
2
- export { Heading } from "./Heading";
3
- export { Body } from "./Body";
4
- export { Utility } from "./Utility";
5
- export * from "./Typography.types";
@@ -1,5 +0,0 @@
1
- export { Display } from "./Display/index.mobile";
2
- export { Heading } from "./Heading/index.mobile";
3
- export { Body } from "./Body/index.mobile";
4
- export { Utility } from "./Utility/index.mobile";
5
- export * from "./Typography.types";
@@ -1 +0,0 @@
1
- export { Button } from "../Button/Button.web";
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- export interface IconDef {
3
- name: string;
4
- svg?: React.ReactNode;
5
- }
6
- export declare const icons: IconDef[];
7
- export declare const Icon: React.FC<{
8
- name: string;
9
- size?: number;
10
- }>;
@@ -1,2 +0,0 @@
1
- export * from "./Button";
2
- export { Body, Display, Heading, Utility } from "../Typography";
@@ -1,2 +0,0 @@
1
- export * from "./Button";
2
- export * from "./Typography";
@@ -1,138 +0,0 @@
1
- export declare const typographyTokens: {
2
- display2xl: {
3
- fontFamily: string;
4
- fontSize: number;
5
- lineHeight: number;
6
- fontWeight: string;
7
- color: string;
8
- letterSpacing: string;
9
- textDecoration: string;
10
- };
11
- displayXl: {
12
- fontFamily: string;
13
- fontSize: number;
14
- lineHeight: number;
15
- fontWeight: string;
16
- color: string;
17
- letterSpacing: string;
18
- textDecoration: string;
19
- };
20
- headingXl: {
21
- fontFamily: string;
22
- fontSize: number;
23
- lineHeight: number;
24
- fontWeight: string;
25
- color: string;
26
- letterSpacing: string;
27
- textDecoration: string;
28
- };
29
- headingLg: {
30
- fontFamily: string;
31
- fontSize: number;
32
- lineHeight: number;
33
- fontWeight: string;
34
- color: string;
35
- letterSpacing: string;
36
- textDecoration: string;
37
- };
38
- headingMd: {
39
- fontFamily: string;
40
- fontSize: number;
41
- lineHeight: number;
42
- fontWeight: string;
43
- color: string;
44
- letterSpacing: string;
45
- textDecoration: string;
46
- };
47
- headingSm: {
48
- fontFamily: string;
49
- fontSize: number;
50
- lineHeight: number;
51
- fontWeight: string;
52
- color: string;
53
- letterSpacing: string;
54
- textDecoration: string;
55
- };
56
- headingXs: {
57
- fontFamily: string;
58
- fontSize: number;
59
- lineHeight: number;
60
- fontWeight: string;
61
- color: string;
62
- letterSpacing: string;
63
- textDecoration: string;
64
- };
65
- heading2xs: {
66
- fontFamily: string;
67
- fontSize: number;
68
- lineHeight: number;
69
- fontWeight: string;
70
- color: string;
71
- letterSpacing: string;
72
- textDecoration: string;
73
- };
74
- bodyXl: {
75
- fontFamily: string;
76
- fontSize: number;
77
- lineHeight: number;
78
- fontWeight: string;
79
- color: string;
80
- letterSpacing: string;
81
- textDecoration: string;
82
- };
83
- bodyLg: {
84
- fontFamily: string;
85
- fontSize: number;
86
- lineHeight: number;
87
- fontWeight: string;
88
- color: string;
89
- letterSpacing: string;
90
- textDecoration: string;
91
- };
92
- bodyMd: {
93
- fontFamily: string;
94
- fontSize: number;
95
- lineHeight: number;
96
- fontWeight: string;
97
- color: string;
98
- letterSpacing: string;
99
- textDecoration: string;
100
- };
101
- bodySm: {
102
- fontFamily: string;
103
- fontSize: number;
104
- lineHeight: number;
105
- fontWeight: string;
106
- color: string;
107
- letterSpacing: string;
108
- textDecoration: string;
109
- };
110
- labelLg: {
111
- fontFamily: string;
112
- fontSize: number;
113
- lineHeight: number;
114
- fontWeight: string;
115
- color: string;
116
- letterSpacing: string;
117
- textDecoration: string;
118
- };
119
- labelMd: {
120
- fontFamily: string;
121
- fontSize: number;
122
- lineHeight: number;
123
- fontWeight: string;
124
- color: string;
125
- letterSpacing: string;
126
- textDecoration: string;
127
- };
128
- labelSm: {
129
- fontFamily: string;
130
- fontSize: number;
131
- lineHeight: number;
132
- fontWeight: string;
133
- color: string;
134
- letterSpacing: string;
135
- textDecoration: string;
136
- };
137
- };
138
- export type TypographyTokenMap = typeof typographyTokens;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- export declare const ThemeContext: React.Context<{}>;
3
- export declare const ThemeProvider: React.FC<{
4
- children: React.ReactNode;
5
- }>;
@@ -1,54 +0,0 @@
1
- export declare const buttonTokens: {
2
- primary: {
3
- default: string;
4
- hover: string;
5
- active: string;
6
- disabled: string;
7
- };
8
- secondary: {
9
- default: string;
10
- hover: string;
11
- active: string;
12
- disabled: string;
13
- };
14
- outline: {
15
- borderDefault: string;
16
- borderHover: string;
17
- borderActive: string;
18
- text: {
19
- default: string;
20
- hover: string;
21
- active: string;
22
- disabled: string;
23
- };
24
- };
25
- ghost: {
26
- text: {
27
- default: string;
28
- hover: string;
29
- active: string;
30
- disabled: string;
31
- };
32
- };
33
- destructive: {
34
- text: {
35
- default: string;
36
- hover: string;
37
- active: string;
38
- disabled: string;
39
- };
40
- };
41
- spacing: {
42
- none: string | number;
43
- cardSm: string;
44
- gapMd: string;
45
- gapXs: string;
46
- };
47
- radius: string;
48
- typography: {
49
- family: string;
50
- weightMedium: string | number;
51
- };
52
- neutralText: string;
53
- };
54
- export type ButtonTokenMap = typeof buttonTokens;
@@ -1,138 +0,0 @@
1
- export declare const typographyTokens: {
2
- display2xl: {
3
- fontFamily: string;
4
- fontSize: number;
5
- lineHeight: number;
6
- fontWeight: string;
7
- color: string;
8
- letterSpacing: string;
9
- textDecoration: string;
10
- };
11
- displayXl: {
12
- fontFamily: string;
13
- fontSize: number;
14
- lineHeight: number;
15
- fontWeight: string;
16
- color: string;
17
- letterSpacing: string;
18
- textDecoration: string;
19
- };
20
- headingXl: {
21
- fontFamily: string;
22
- fontSize: number;
23
- lineHeight: number;
24
- fontWeight: string;
25
- color: string;
26
- letterSpacing: string;
27
- textDecoration: string;
28
- };
29
- headingLg: {
30
- fontFamily: string;
31
- fontSize: number;
32
- lineHeight: number;
33
- fontWeight: string;
34
- color: string;
35
- letterSpacing: string;
36
- textDecoration: string;
37
- };
38
- headingMd: {
39
- fontFamily: string;
40
- fontSize: number;
41
- lineHeight: number;
42
- fontWeight: string;
43
- color: string;
44
- letterSpacing: string;
45
- textDecoration: string;
46
- };
47
- headingSm: {
48
- fontFamily: string;
49
- fontSize: number;
50
- lineHeight: number;
51
- fontWeight: string;
52
- color: string;
53
- letterSpacing: string;
54
- textDecoration: string;
55
- };
56
- headingXs: {
57
- fontFamily: string;
58
- fontSize: number;
59
- lineHeight: number;
60
- fontWeight: string;
61
- color: string;
62
- letterSpacing: string;
63
- textDecoration: string;
64
- };
65
- heading2xs: {
66
- fontFamily: string;
67
- fontSize: number;
68
- lineHeight: number;
69
- fontWeight: string;
70
- color: string;
71
- letterSpacing: string;
72
- textDecoration: string;
73
- };
74
- bodyXl: {
75
- fontFamily: string;
76
- fontSize: number;
77
- lineHeight: number;
78
- fontWeight: string;
79
- color: string;
80
- letterSpacing: string;
81
- textDecoration: string;
82
- };
83
- bodyLg: {
84
- fontFamily: string;
85
- fontSize: number;
86
- lineHeight: number;
87
- fontWeight: string;
88
- color: string;
89
- letterSpacing: string;
90
- textDecoration: string;
91
- };
92
- bodyMd: {
93
- fontFamily: string;
94
- fontSize: number;
95
- lineHeight: number;
96
- fontWeight: string;
97
- color: string;
98
- letterSpacing: string;
99
- textDecoration: string;
100
- };
101
- bodySm: {
102
- fontFamily: string;
103
- fontSize: number;
104
- lineHeight: number;
105
- fontWeight: string;
106
- color: string;
107
- letterSpacing: string;
108
- textDecoration: string;
109
- };
110
- labelLg: {
111
- fontFamily: string;
112
- fontSize: number;
113
- lineHeight: number;
114
- fontWeight: string;
115
- color: string;
116
- letterSpacing: string;
117
- textDecoration: string;
118
- };
119
- labelMd: {
120
- fontFamily: string;
121
- fontSize: number;
122
- lineHeight: number;
123
- fontWeight: string;
124
- color: string;
125
- letterSpacing: string;
126
- textDecoration: string;
127
- };
128
- labelSm: {
129
- fontFamily: string;
130
- fontSize: number;
131
- lineHeight: number;
132
- fontWeight: string;
133
- color: string;
134
- letterSpacing: string;
135
- textDecoration: string;
136
- };
137
- };
138
- export type TypographyTokenMap = typeof typographyTokens;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- export declare const ThemeContext: React.Context<{}>;
3
- export declare const ThemeProvider: React.FC<{
4
- children: React.ReactNode;
5
- }>;
@@ -1,54 +0,0 @@
1
- export declare const buttonTokens: {
2
- primary: {
3
- default: string;
4
- hover: string;
5
- active: string;
6
- disabled: string;
7
- };
8
- secondary: {
9
- default: string;
10
- hover: string;
11
- active: string;
12
- disabled: string;
13
- };
14
- outline: {
15
- borderDefault: string;
16
- borderHover: string;
17
- borderActive: string;
18
- text: {
19
- default: string;
20
- hover: string;
21
- active: string;
22
- disabled: string;
23
- };
24
- };
25
- ghost: {
26
- text: {
27
- default: string;
28
- hover: string;
29
- active: string;
30
- disabled: string;
31
- };
32
- };
33
- destructive: {
34
- text: {
35
- default: string;
36
- hover: string;
37
- active: string;
38
- disabled: string;
39
- };
40
- };
41
- spacing: {
42
- none: string | number;
43
- cardSm: string;
44
- gapMd: string;
45
- gapXs: string;
46
- };
47
- radius: string;
48
- typography: {
49
- family: string;
50
- weightMedium: string | number;
51
- };
52
- neutralText: string;
53
- };
54
- export type ButtonTokenMap = typeof buttonTokens;
@@ -1,24 +0,0 @@
1
- export type ButtonType = "primary" | "outline" | "ghost" | "destructive";
2
- export type ButtonSize = "large" | "small";
3
- export type ButtonState = "default" | "hover" | "active" | "disabled";
4
- export interface ButtonProps {
5
- label: string;
6
- type?: ButtonType;
7
- size?: ButtonSize;
8
- disabled?: boolean;
9
- leftIcon?: string;
10
- rightIcon?: string;
11
- icon?: string;
12
- fullWidth?: boolean;
13
- ghostUnderline?: boolean;
14
- accessibilityLabel?: string;
15
- testID?: string;
16
- className?: string;
17
- style?: React.CSSProperties | Record<string, unknown>;
18
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
19
- onPress?: () => void;
20
- onMouseEnter?: (e: React.MouseEvent<HTMLButtonElement>) => void;
21
- onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
22
- onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
23
- onMouseUp?: (e: React.MouseEvent<HTMLButtonElement>) => void;
24
- }
@@ -1,32 +0,0 @@
1
- import React from "react";
2
- export type BodySize = "xl" | "lg" | "md" | "sm";
3
- export interface BaseTypographyProps {
4
- align?: "left" | "center" | "right";
5
- color?: string;
6
- truncate?: boolean;
7
- lineClamp?: number;
8
- className?: string;
9
- style?: React.CSSProperties | Record<string, unknown>;
10
- onClick?: (e: React.MouseEvent<HTMLElement>) => void;
11
- testID?: string;
12
- children?: React.ReactNode;
13
- }
14
- export interface BodyProps extends BaseTypographyProps {
15
- size?: BodySize;
16
- element?: keyof JSX.IntrinsicElements;
17
- }
18
- export type DisplaySize = "2xl" | "xl";
19
- export interface DisplayProps extends BaseTypographyProps {
20
- size?: DisplaySize;
21
- element?: keyof JSX.IntrinsicElements;
22
- }
23
- export type HeadingSize = "xl" | "lg" | "md" | "sm" | "xs" | "2xs";
24
- export interface HeadingProps extends BaseTypographyProps {
25
- size?: HeadingSize;
26
- element?: keyof JSX.IntrinsicElements;
27
- }
28
- export type UtilityVariant = "button" | "link" | "caption";
29
- export interface UtilityProps extends BaseTypographyProps {
30
- variant?: UtilityVariant;
31
- element?: keyof JSX.IntrinsicElements;
32
- }