gantri-components 0.0.0-semantic-release
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 +25 -0
- package/README.md +1 -0
- package/dist/index.cjs.js +4280 -0
- package/lib/components/Button/Button.d.ts +29 -0
- package/lib/components/Button/Button.stories.d.ts +7 -0
- package/lib/components/Button/index.d.ts +1 -0
- package/lib/components/icon/generated/30DaysReturn.d.ts +3 -0
- package/lib/components/icon/generated/Address.d.ts +3 -0
- package/lib/components/icon/generated/Affirm.d.ts +3 -0
- package/lib/components/icon/generated/AffirmBlue.d.ts +3 -0
- package/lib/components/icon/generated/Amex.d.ts +3 -0
- package/lib/components/icon/generated/ApplePay.d.ts +3 -0
- package/lib/components/icon/generated/Ar.d.ts +3 -0
- package/lib/components/icon/generated/ArrowCircle.d.ts +3 -0
- package/lib/components/icon/generated/ArrowDown.d.ts +3 -0
- package/lib/components/icon/generated/ArrowLeft.d.ts +3 -0
- package/lib/components/icon/generated/ArrowRight.d.ts +3 -0
- package/lib/components/icon/generated/Behance.d.ts +3 -0
- package/lib/components/icon/generated/Bell.d.ts +3 -0
- package/lib/components/icon/generated/BellTransparent.d.ts +3 -0
- package/lib/components/icon/generated/BlankCard.d.ts +3 -0
- package/lib/components/icon/generated/Box.d.ts +3 -0
- package/lib/components/icon/generated/Branch.d.ts +3 -0
- package/lib/components/icon/generated/Bulb.d.ts +3 -0
- package/lib/components/icon/generated/Calendar.d.ts +3 -0
- package/lib/components/icon/generated/California.d.ts +3 -0
- package/lib/components/icon/generated/Camera.d.ts +3 -0
- package/lib/components/icon/generated/CameraSquare.d.ts +3 -0
- package/lib/components/icon/generated/Cart.d.ts +3 -0
- package/lib/components/icon/generated/Chain.d.ts +3 -0
- package/lib/components/icon/generated/Check.d.ts +3 -0
- package/lib/components/icon/generated/CheckFill.d.ts +3 -0
- package/lib/components/icon/generated/CheckReverse.d.ts +3 -0
- package/lib/components/icon/generated/CheckRound.d.ts +3 -0
- package/lib/components/icon/generated/ChevronDown.d.ts +3 -0
- package/lib/components/icon/generated/ChevronLeft.d.ts +3 -0
- package/lib/components/icon/generated/ChevronRight.d.ts +3 -0
- package/lib/components/icon/generated/Clip.d.ts +3 -0
- package/lib/components/icon/generated/Close.d.ts +3 -0
- package/lib/components/icon/generated/Cloud.d.ts +3 -0
- package/lib/components/icon/generated/Dashboard.d.ts +3 -0
- package/lib/components/icon/generated/DashboardChart.d.ts +3 -0
- package/lib/components/icon/generated/Design.d.ts +3 -0
- package/lib/components/icon/generated/Dimming.d.ts +3 -0
- package/lib/components/icon/generated/DisabledArrows.d.ts +3 -0
- package/lib/components/icon/generated/DisabledInputArrow.d.ts +3 -0
- package/lib/components/icon/generated/Discover.d.ts +3 -0
- package/lib/components/icon/generated/Docs.d.ts +3 -0
- package/lib/components/icon/generated/Dollar.d.ts +3 -0
- package/lib/components/icon/generated/Dots.d.ts +3 -0
- package/lib/components/icon/generated/DotsAnimated.d.ts +3 -0
- package/lib/components/icon/generated/Download.d.ts +3 -0
- package/lib/components/icon/generated/Drag.d.ts +3 -0
- package/lib/components/icon/generated/DragHandler.d.ts +3 -0
- package/lib/components/icon/generated/ElkLogo.d.ts +3 -0
- package/lib/components/icon/generated/Email.d.ts +3 -0
- package/lib/components/icon/generated/EmailRound.d.ts +3 -0
- package/lib/components/icon/generated/Error.d.ts +3 -0
- package/lib/components/icon/generated/FacebookBlack.d.ts +3 -0
- package/lib/components/icon/generated/FacebookTransparent.d.ts +3 -0
- package/lib/components/icon/generated/Flower.d.ts +3 -0
- package/lib/components/icon/generated/FreeShipping.d.ts +3 -0
- package/lib/components/icon/generated/Gift.d.ts +3 -0
- package/lib/components/icon/generated/GiftCard.d.ts +3 -0
- package/lib/components/icon/generated/GiftGold.d.ts +3 -0
- package/lib/components/icon/generated/GiftTeal.d.ts +3 -0
- package/lib/components/icon/generated/Google.d.ts +3 -0
- package/lib/components/icon/generated/Guarantee.d.ts +3 -0
- package/lib/components/icon/generated/Hand.d.ts +3 -0
- package/lib/components/icon/generated/Heart.d.ts +3 -0
- package/lib/components/icon/generated/HeartOutlined.d.ts +3 -0
- package/lib/components/icon/generated/Help.d.ts +3 -0
- package/lib/components/icon/generated/House.d.ts +3 -0
- package/lib/components/icon/generated/IconBell.d.ts +3 -0
- package/lib/components/icon/generated/IconCheck.d.ts +3 -0
- package/lib/components/icon/generated/IconDotArrow.d.ts +3 -0
- package/lib/components/icon/generated/IconDotModalClose.d.ts +3 -0
- package/lib/components/icon/generated/IconDownload.d.ts +3 -0
- package/lib/components/icon/generated/IconInfo.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsAssemble.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsBondo.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsPack.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsPrint.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsQa.d.ts +3 -0
- package/lib/components/icon/generated/IconJobsSand.d.ts +3 -0
- package/lib/components/icon/generated/IconMenu.d.ts +3 -0
- package/lib/components/icon/generated/IconMenuClose.d.ts +3 -0
- package/lib/components/icon/generated/IconMore.d.ts +3 -0
- package/lib/components/icon/generated/IconReorderOff.d.ts +3 -0
- package/lib/components/icon/generated/IconReorderOn.d.ts +3 -0
- package/lib/components/icon/generated/IconSequence.d.ts +3 -0
- package/lib/components/icon/generated/IconStar.d.ts +3 -0
- package/lib/components/icon/generated/IconStarFilled.d.ts +3 -0
- package/lib/components/icon/generated/IconUpload.d.ts +3 -0
- package/lib/components/icon/generated/IconUserProfile.d.ts +3 -0
- package/lib/components/icon/generated/IconUserStats.d.ts +3 -0
- package/lib/components/icon/generated/Info.d.ts +3 -0
- package/lib/components/icon/generated/InputArrow.d.ts +3 -0
- package/lib/components/icon/generated/Instagram.d.ts +3 -0
- package/lib/components/icon/generated/InstagramColored.d.ts +3 -0
- package/lib/components/icon/generated/Lamp.d.ts +3 -0
- package/lib/components/icon/generated/Leaf.d.ts +3 -0
- package/lib/components/icon/generated/Led.d.ts +3 -0
- package/lib/components/icon/generated/LeftQuote.d.ts +3 -0
- package/lib/components/icon/generated/Letter.d.ts +3 -0
- package/lib/components/icon/generated/Link.d.ts +3 -0
- package/lib/components/icon/generated/LiveTracking.d.ts +3 -0
- package/lib/components/icon/generated/Loader.d.ts +3 -0
- package/lib/components/icon/generated/Logo.d.ts +3 -0
- package/lib/components/icon/generated/Mastercard.d.ts +3 -0
- package/lib/components/icon/generated/Menu.d.ts +3 -0
- package/lib/components/icon/generated/MenuDown.d.ts +3 -0
- package/lib/components/icon/generated/MinusCircle.d.ts +3 -0
- package/lib/components/icon/generated/Moon.d.ts +3 -0
- package/lib/components/icon/generated/NavHelp.d.ts +3 -0
- package/lib/components/icon/generated/Next.d.ts +3 -0
- package/lib/components/icon/generated/One.d.ts +3 -0
- package/lib/components/icon/generated/Paint.d.ts +3 -0
- package/lib/components/icon/generated/Pencil.d.ts +3 -0
- package/lib/components/icon/generated/Pinterest.d.ts +3 -0
- package/lib/components/icon/generated/PinterestColored.d.ts +3 -0
- package/lib/components/icon/generated/Play.d.ts +3 -0
- package/lib/components/icon/generated/PlayFull.d.ts +3 -0
- package/lib/components/icon/generated/Plus.d.ts +3 -0
- package/lib/components/icon/generated/PlusCircle.d.ts +3 -0
- package/lib/components/icon/generated/PlusCircleBold.d.ts +3 -0
- package/lib/components/icon/generated/Pointing.d.ts +3 -0
- package/lib/components/icon/generated/Previous.d.ts +3 -0
- package/lib/components/icon/generated/Ray.d.ts +3 -0
- package/lib/components/icon/generated/Reach.d.ts +3 -0
- package/lib/components/icon/generated/ReachLogo.d.ts +3 -0
- package/lib/components/icon/generated/Returns.d.ts +3 -0
- package/lib/components/icon/generated/RightArrow.d.ts +3 -0
- package/lib/components/icon/generated/Ruler.d.ts +3 -0
- package/lib/components/icon/generated/Search.d.ts +3 -0
- package/lib/components/icon/generated/Settings.d.ts +3 -0
- package/lib/components/icon/generated/Share.d.ts +3 -0
- package/lib/components/icon/generated/SprkLogo.d.ts +3 -0
- package/lib/components/icon/generated/Star.d.ts +3 -0
- package/lib/components/icon/generated/StarHalf.d.ts +3 -0
- package/lib/components/icon/generated/StarOutlined.d.ts +3 -0
- package/lib/components/icon/generated/Sun.d.ts +3 -0
- package/lib/components/icon/generated/Tip.d.ts +3 -0
- package/lib/components/icon/generated/Trash.d.ts +3 -0
- package/lib/components/icon/generated/TrashRound.d.ts +3 -0
- package/lib/components/icon/generated/Trunk.d.ts +3 -0
- package/lib/components/icon/generated/Twitter.d.ts +3 -0
- package/lib/components/icon/generated/TwitterTransparent.d.ts +3 -0
- package/lib/components/icon/generated/User.d.ts +3 -0
- package/lib/components/icon/generated/UserSmiling.d.ts +3 -0
- package/lib/components/icon/generated/Visa.d.ts +3 -0
- package/lib/components/icon/generated/Warranty.d.ts +3 -0
- package/lib/components/icon/generated/Website.d.ts +3 -0
- package/lib/components/icon/generated/Windows.d.ts +3 -0
- package/lib/components/icon/generated/Wishlist.d.ts +3 -0
- package/lib/components/icon/generated/World.d.ts +3 -0
- package/lib/components/icon/generated/Yotpo.d.ts +3 -0
- package/lib/components/icon/generated/index.d.ts +151 -0
- package/lib/components/icon/icon.d.ts +3 -0
- package/lib/components/icon/icon.hooks.d.ts +1 -0
- package/lib/components/icon/icon.presets.d.ts +2 -0
- package/lib/components/icon/icon.props.d.ts +20 -0
- package/lib/components/icon/icon.styles.d.ts +1 -0
- package/lib/components/icon/icon.type.d.ts +1 -0
- package/lib/components/icon/index.d.ts +2 -0
- package/lib/helpers/layout.helpers.d.ts +16 -0
- package/lib/index.d.ts +4 -0
- package/lib/styles/index.d.ts +3 -0
- package/lib/styles/media.d.ts +10 -0
- package/lib/styles/theme-provider.d.ts +5 -0
- package/lib/styles/theme.d.ts +180 -0
- package/lib/theme/index.d.ts +2 -0
- package/lib/theme/theme-provider.d.ts +5 -0
- package/lib/theme/theme.d.ts +180 -0
- package/lib/types/layout.d.ts +8 -0
- package/lib/types/resolution-aware-prop.type.d.ts +7 -0
- package/package.json +103 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
import { ResolutionAwareProp } from '../types/resolution-aware-prop.type';
|
|
4
|
+
export declare type PaletteColor = 'blue_100' | 'blue_200' | 'blue_300' | 'blue_400' | 'blue_500' | 'gold_100' | 'gold_200' | 'gold_300' | 'gold_400' | 'gold_500' | 'green_100' | 'green_200' | 'green_300' | 'green_400' | 'green_500' | 'monochrome_050' | 'monochrome_100' | 'monochrome_200' | 'monochrome_300' | 'monochrome_400' | 'monochrome_500' | 'monochrome_600' | 'monochrome_700' | 'monochrome_800' | 'monochrome_900' | 'monochrome_black' | 'monochrome_white' | 'pink_300' | 'pink_400' | 'pink_500' | 'red_100' | 'red_200' | 'red_300' | 'red_400' | 'red_500' | 'translucent_black' | 'translucent_cream' | 'translucent_white' | 'yellow_100' | 'yellow_200' | 'yellow_300' | 'yellow_400' | 'yellow_500' | string;
|
|
5
|
+
export declare const palette: Record<PaletteColor, string>;
|
|
6
|
+
declare module 'styled-components' {
|
|
7
|
+
interface FontInfo {
|
|
8
|
+
family: string;
|
|
9
|
+
familyMedium?: string;
|
|
10
|
+
familySmaller?: string;
|
|
11
|
+
fontWeight?: Property.FontWeight;
|
|
12
|
+
lineHeight: string;
|
|
13
|
+
lineHeightMedium?: string;
|
|
14
|
+
lineHeightSmaller: string;
|
|
15
|
+
size: string;
|
|
16
|
+
sizeMedium?: string;
|
|
17
|
+
sizeSmaller: string;
|
|
18
|
+
}
|
|
19
|
+
interface DefaultTheme {
|
|
20
|
+
border: string;
|
|
21
|
+
borderRadius: string;
|
|
22
|
+
colors: {
|
|
23
|
+
dividers: {
|
|
24
|
+
t1: PaletteColor;
|
|
25
|
+
t2: PaletteColor;
|
|
26
|
+
t3: PaletteColor;
|
|
27
|
+
};
|
|
28
|
+
iconography: {
|
|
29
|
+
alert: PaletteColor;
|
|
30
|
+
link: PaletteColor;
|
|
31
|
+
t1: PaletteColor;
|
|
32
|
+
t2: PaletteColor;
|
|
33
|
+
t3: PaletteColor;
|
|
34
|
+
warning: PaletteColor;
|
|
35
|
+
};
|
|
36
|
+
palette: Record<PaletteColor, string>;
|
|
37
|
+
surface: {
|
|
38
|
+
alert: PaletteColor;
|
|
39
|
+
hover: PaletteColor;
|
|
40
|
+
level1: PaletteColor;
|
|
41
|
+
level2: PaletteColor;
|
|
42
|
+
level3: PaletteColor;
|
|
43
|
+
selected: PaletteColor;
|
|
44
|
+
success: PaletteColor;
|
|
45
|
+
successAlt: PaletteColor;
|
|
46
|
+
warning: PaletteColor;
|
|
47
|
+
};
|
|
48
|
+
typography: {
|
|
49
|
+
alert: PaletteColor;
|
|
50
|
+
alt: PaletteColor;
|
|
51
|
+
link: PaletteColor;
|
|
52
|
+
success: PaletteColor;
|
|
53
|
+
t1: PaletteColor;
|
|
54
|
+
t2: PaletteColor;
|
|
55
|
+
t3: PaletteColor;
|
|
56
|
+
warning: PaletteColor;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
dimensions: {
|
|
60
|
+
gridGutter: ResolutionAwareProp<string>;
|
|
61
|
+
headerHeight: ResolutionAwareProp<string>;
|
|
62
|
+
maxWidth: string;
|
|
63
|
+
spacing: {
|
|
64
|
+
s1: string;
|
|
65
|
+
s2: string;
|
|
66
|
+
s3: string;
|
|
67
|
+
s4: string;
|
|
68
|
+
s5: string;
|
|
69
|
+
s6: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
fonts: {
|
|
73
|
+
badge: FontInfo;
|
|
74
|
+
boldFontFamily: string;
|
|
75
|
+
h1: FontInfo;
|
|
76
|
+
h2: FontInfo;
|
|
77
|
+
h3: FontInfo;
|
|
78
|
+
h4: FontInfo;
|
|
79
|
+
h5: FontInfo;
|
|
80
|
+
hero: FontInfo;
|
|
81
|
+
link: FontInfo;
|
|
82
|
+
p0: FontInfo;
|
|
83
|
+
p1: FontInfo;
|
|
84
|
+
p2: FontInfo;
|
|
85
|
+
p3: FontInfo;
|
|
86
|
+
regularFontFamily: string;
|
|
87
|
+
};
|
|
88
|
+
name: string;
|
|
89
|
+
shadow: string;
|
|
90
|
+
transitions: {
|
|
91
|
+
base: string;
|
|
92
|
+
slow: string;
|
|
93
|
+
slowest: string;
|
|
94
|
+
turtle: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
declare const lightTheme: DefaultTheme;
|
|
99
|
+
declare const darkTheme: DefaultTheme;
|
|
100
|
+
export declare const getThemeColor: (color: PaletteColor, currentTheme?: DefaultTheme) => string;
|
|
101
|
+
declare const combinationsByColor: (appTheme?: DefaultTheme) => {
|
|
102
|
+
alert: {
|
|
103
|
+
background: string;
|
|
104
|
+
color: string;
|
|
105
|
+
hover: string;
|
|
106
|
+
selected: string;
|
|
107
|
+
};
|
|
108
|
+
black: {
|
|
109
|
+
background: string;
|
|
110
|
+
color: string;
|
|
111
|
+
hover: string;
|
|
112
|
+
selected: string;
|
|
113
|
+
};
|
|
114
|
+
blue: {
|
|
115
|
+
background: string;
|
|
116
|
+
color: string;
|
|
117
|
+
hover: string;
|
|
118
|
+
selected: string;
|
|
119
|
+
};
|
|
120
|
+
gold: {
|
|
121
|
+
background: string;
|
|
122
|
+
color: string;
|
|
123
|
+
hover: string;
|
|
124
|
+
selected: string;
|
|
125
|
+
};
|
|
126
|
+
green: {
|
|
127
|
+
background: string;
|
|
128
|
+
color: string;
|
|
129
|
+
hover: string;
|
|
130
|
+
selected: string;
|
|
131
|
+
};
|
|
132
|
+
grey: {
|
|
133
|
+
background: string;
|
|
134
|
+
color: string;
|
|
135
|
+
hover: string;
|
|
136
|
+
selected: string;
|
|
137
|
+
};
|
|
138
|
+
greyLight: {
|
|
139
|
+
background: string;
|
|
140
|
+
color: string;
|
|
141
|
+
hover: string;
|
|
142
|
+
selected: string;
|
|
143
|
+
};
|
|
144
|
+
pink: {
|
|
145
|
+
background: string;
|
|
146
|
+
color: string;
|
|
147
|
+
hover: string;
|
|
148
|
+
selected: string;
|
|
149
|
+
};
|
|
150
|
+
primary: {
|
|
151
|
+
background: string;
|
|
152
|
+
color: string;
|
|
153
|
+
hover: string;
|
|
154
|
+
selected: string;
|
|
155
|
+
};
|
|
156
|
+
secondary: {
|
|
157
|
+
background: string;
|
|
158
|
+
hover: string;
|
|
159
|
+
selected: string;
|
|
160
|
+
};
|
|
161
|
+
secondaryAlt: {
|
|
162
|
+
background: string;
|
|
163
|
+
color: string;
|
|
164
|
+
hover: string;
|
|
165
|
+
selected: string;
|
|
166
|
+
};
|
|
167
|
+
white: {
|
|
168
|
+
background: string;
|
|
169
|
+
color: string;
|
|
170
|
+
hover: string;
|
|
171
|
+
selected: string;
|
|
172
|
+
};
|
|
173
|
+
yellow: {
|
|
174
|
+
background: string;
|
|
175
|
+
color: string;
|
|
176
|
+
hover: string;
|
|
177
|
+
selected: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
export { lightTheme, darkTheme, combinationsByColor };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
import { ResolutionAwareProp } from '../types/resolution-aware-prop.type';
|
|
4
|
+
export declare type PaletteColor = 'blue_100' | 'blue_200' | 'blue_300' | 'blue_400' | 'blue_500' | 'gold_100' | 'gold_200' | 'gold_300' | 'gold_400' | 'gold_500' | 'green_100' | 'green_200' | 'green_300' | 'green_400' | 'green_500' | 'monochrome_050' | 'monochrome_100' | 'monochrome_200' | 'monochrome_300' | 'monochrome_400' | 'monochrome_500' | 'monochrome_600' | 'monochrome_700' | 'monochrome_800' | 'monochrome_900' | 'monochrome_black' | 'monochrome_white' | 'pink_300' | 'pink_400' | 'pink_500' | 'red_100' | 'red_200' | 'red_300' | 'red_400' | 'red_500' | 'translucent_black' | 'translucent_cream' | 'translucent_white' | 'yellow_100' | 'yellow_200' | 'yellow_300' | 'yellow_400' | 'yellow_500' | string;
|
|
5
|
+
export declare const palette: Record<PaletteColor, string>;
|
|
6
|
+
declare module 'styled-components' {
|
|
7
|
+
interface FontInfo {
|
|
8
|
+
family: string;
|
|
9
|
+
familyMedium?: string;
|
|
10
|
+
familySmaller?: string;
|
|
11
|
+
fontWeight?: Property.FontWeight;
|
|
12
|
+
lineHeight: string;
|
|
13
|
+
lineHeightMedium?: string;
|
|
14
|
+
lineHeightSmaller: string;
|
|
15
|
+
size: string;
|
|
16
|
+
sizeMedium?: string;
|
|
17
|
+
sizeSmaller: string;
|
|
18
|
+
}
|
|
19
|
+
interface DefaultTheme {
|
|
20
|
+
border: string;
|
|
21
|
+
borderRadius: string;
|
|
22
|
+
colors: {
|
|
23
|
+
dividers: {
|
|
24
|
+
t1: PaletteColor;
|
|
25
|
+
t2: PaletteColor;
|
|
26
|
+
t3: PaletteColor;
|
|
27
|
+
};
|
|
28
|
+
iconography: {
|
|
29
|
+
alert: PaletteColor;
|
|
30
|
+
link: PaletteColor;
|
|
31
|
+
t1: PaletteColor;
|
|
32
|
+
t2: PaletteColor;
|
|
33
|
+
t3: PaletteColor;
|
|
34
|
+
warning: PaletteColor;
|
|
35
|
+
};
|
|
36
|
+
palette: Record<PaletteColor, string>;
|
|
37
|
+
surface: {
|
|
38
|
+
alert: PaletteColor;
|
|
39
|
+
hover: PaletteColor;
|
|
40
|
+
level1: PaletteColor;
|
|
41
|
+
level2: PaletteColor;
|
|
42
|
+
level3: PaletteColor;
|
|
43
|
+
selected: PaletteColor;
|
|
44
|
+
success: PaletteColor;
|
|
45
|
+
successAlt: PaletteColor;
|
|
46
|
+
warning: PaletteColor;
|
|
47
|
+
};
|
|
48
|
+
typography: {
|
|
49
|
+
alert: PaletteColor;
|
|
50
|
+
alt: PaletteColor;
|
|
51
|
+
link: PaletteColor;
|
|
52
|
+
success: PaletteColor;
|
|
53
|
+
t1: PaletteColor;
|
|
54
|
+
t2: PaletteColor;
|
|
55
|
+
t3: PaletteColor;
|
|
56
|
+
warning: PaletteColor;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
dimensions: {
|
|
60
|
+
gridGutter: ResolutionAwareProp<string>;
|
|
61
|
+
headerHeight: ResolutionAwareProp<string>;
|
|
62
|
+
maxWidth: string;
|
|
63
|
+
spacing: {
|
|
64
|
+
s1: string;
|
|
65
|
+
s2: string;
|
|
66
|
+
s3: string;
|
|
67
|
+
s4: string;
|
|
68
|
+
s5: string;
|
|
69
|
+
s6: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
fonts: {
|
|
73
|
+
badge: FontInfo;
|
|
74
|
+
boldFontFamily: string;
|
|
75
|
+
h1: FontInfo;
|
|
76
|
+
h2: FontInfo;
|
|
77
|
+
h3: FontInfo;
|
|
78
|
+
h4: FontInfo;
|
|
79
|
+
h5: FontInfo;
|
|
80
|
+
hero: FontInfo;
|
|
81
|
+
link: FontInfo;
|
|
82
|
+
p0: FontInfo;
|
|
83
|
+
p1: FontInfo;
|
|
84
|
+
p2: FontInfo;
|
|
85
|
+
p3: FontInfo;
|
|
86
|
+
regularFontFamily: string;
|
|
87
|
+
};
|
|
88
|
+
name: string;
|
|
89
|
+
shadow: string;
|
|
90
|
+
transitions: {
|
|
91
|
+
base: string;
|
|
92
|
+
slow: string;
|
|
93
|
+
slowest: string;
|
|
94
|
+
turtle: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
declare const lightTheme: DefaultTheme;
|
|
99
|
+
declare const darkTheme: DefaultTheme;
|
|
100
|
+
export declare const getThemeColor: (color: PaletteColor, currentTheme?: DefaultTheme) => string;
|
|
101
|
+
declare const combinationsByColor: (appTheme?: DefaultTheme) => {
|
|
102
|
+
alert: {
|
|
103
|
+
background: string;
|
|
104
|
+
color: string;
|
|
105
|
+
hover: string;
|
|
106
|
+
selected: string;
|
|
107
|
+
};
|
|
108
|
+
black: {
|
|
109
|
+
background: string;
|
|
110
|
+
color: string;
|
|
111
|
+
hover: string;
|
|
112
|
+
selected: string;
|
|
113
|
+
};
|
|
114
|
+
blue: {
|
|
115
|
+
background: string;
|
|
116
|
+
color: string;
|
|
117
|
+
hover: string;
|
|
118
|
+
selected: string;
|
|
119
|
+
};
|
|
120
|
+
gold: {
|
|
121
|
+
background: string;
|
|
122
|
+
color: string;
|
|
123
|
+
hover: string;
|
|
124
|
+
selected: string;
|
|
125
|
+
};
|
|
126
|
+
green: {
|
|
127
|
+
background: string;
|
|
128
|
+
color: string;
|
|
129
|
+
hover: string;
|
|
130
|
+
selected: string;
|
|
131
|
+
};
|
|
132
|
+
grey: {
|
|
133
|
+
background: string;
|
|
134
|
+
color: string;
|
|
135
|
+
hover: string;
|
|
136
|
+
selected: string;
|
|
137
|
+
};
|
|
138
|
+
greyLight: {
|
|
139
|
+
background: string;
|
|
140
|
+
color: string;
|
|
141
|
+
hover: string;
|
|
142
|
+
selected: string;
|
|
143
|
+
};
|
|
144
|
+
pink: {
|
|
145
|
+
background: string;
|
|
146
|
+
color: string;
|
|
147
|
+
hover: string;
|
|
148
|
+
selected: string;
|
|
149
|
+
};
|
|
150
|
+
primary: {
|
|
151
|
+
background: string;
|
|
152
|
+
color: string;
|
|
153
|
+
hover: string;
|
|
154
|
+
selected: string;
|
|
155
|
+
};
|
|
156
|
+
secondary: {
|
|
157
|
+
background: string;
|
|
158
|
+
hover: string;
|
|
159
|
+
selected: string;
|
|
160
|
+
};
|
|
161
|
+
secondaryAlt: {
|
|
162
|
+
background: string;
|
|
163
|
+
color: string;
|
|
164
|
+
hover: string;
|
|
165
|
+
selected: string;
|
|
166
|
+
};
|
|
167
|
+
white: {
|
|
168
|
+
background: string;
|
|
169
|
+
color: string;
|
|
170
|
+
hover: string;
|
|
171
|
+
selected: string;
|
|
172
|
+
};
|
|
173
|
+
yellow: {
|
|
174
|
+
background: string;
|
|
175
|
+
color: string;
|
|
176
|
+
hover: string;
|
|
177
|
+
selected: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
export { lightTheme, darkTheme, combinationsByColor };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AppSize, ResolutionAwareProp } from './resolution-aware-prop.type';
|
|
2
|
+
export interface ExtractStyleFromResolutionAwarePropEntry {
|
|
3
|
+
cssProperty: string;
|
|
4
|
+
isImportant?: boolean;
|
|
5
|
+
lookIn?: any;
|
|
6
|
+
resolutionAwareProp: ResolutionAwareProp<any> | ResolutionAwareProp<any>[];
|
|
7
|
+
valueFormatter?: (value: any | any[], size: AppSize) => string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare type AppSize = 'lg' | 'md' | 'sm' | string;
|
|
2
|
+
export interface ResolutionAwarePropBase<T> {
|
|
3
|
+
lg?: T;
|
|
4
|
+
md?: T;
|
|
5
|
+
sm?: T;
|
|
6
|
+
}
|
|
7
|
+
export declare type ResolutionAwareProp<T> = T extends boolean ? boolean | ResolutionAwarePropBase<T> | any : T | ResolutionAwarePropBase<T>;
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gantri-components",
|
|
3
|
+
"version": "0.0.0-semantic-release",
|
|
4
|
+
"main": "dist/index.cjs.js",
|
|
5
|
+
"module": "dist/src/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"repository": "git@github.com:gantri/ui-library.git",
|
|
8
|
+
"author": "Danny <danny@gantri.com>",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rollup -c",
|
|
13
|
+
"storybook": "start-storybook -p 6006",
|
|
14
|
+
"build-storybook": "build-storybook",
|
|
15
|
+
"prepare": "husky install",
|
|
16
|
+
"generate-icons": "npm run clean:svgs && npm run svg && npm run git-add:svgs",
|
|
17
|
+
"svg": "svgr -d src/components/icon/generated src/assets/icons --icon --ext tsx --replace-attr-values \"#000={strokeColor}\" --replace-attr-values \"#8f8e8b={color}\" --replace-attr-values \"currentColor={color}\" --replace-attr-values \"strokeWidth={strokeWidth}\"",
|
|
18
|
+
"git-add:svgs": "cd src/components/icon/generated && git add --all",
|
|
19
|
+
"clean:svgs": "cd src/components/icon/generated && del-cli *.tsx"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^17.0.2",
|
|
23
|
+
"react-dom": "^17.0.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@babel/core": "^7.17.5",
|
|
27
|
+
"@commitlint/cli": "^16.2.1",
|
|
28
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
29
|
+
"@react-theming/storybook-addon": "^1.1.5",
|
|
30
|
+
"@rollup/plugin-commonjs": "^21.0.2",
|
|
31
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
32
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
33
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
34
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
35
|
+
"@semantic-release/git": "^10.0.1",
|
|
36
|
+
"@semantic-release/github": "^8.0.2",
|
|
37
|
+
"@semantic-release/npm": "^9.0.1",
|
|
38
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
39
|
+
"@storybook/addon-actions": "^6.4.19",
|
|
40
|
+
"@storybook/addon-essentials": "^6.4.19",
|
|
41
|
+
"@storybook/addon-interactions": "^6.4.19",
|
|
42
|
+
"@storybook/addon-links": "^6.4.19",
|
|
43
|
+
"@storybook/addons": "^6.4.19",
|
|
44
|
+
"@storybook/react": "^6.4.19",
|
|
45
|
+
"@storybook/testing-library": "^0.0.9",
|
|
46
|
+
"@storybook/theming": "^6.4.19",
|
|
47
|
+
"@svgr/cli": "^6.2.1",
|
|
48
|
+
"@types/lodash.isobject": "^3.0.6",
|
|
49
|
+
"@types/react": "^17.0.39",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
|
51
|
+
"@typescript-eslint/parser": "^5.14.0",
|
|
52
|
+
"babel-loader": "^8.2.3",
|
|
53
|
+
"del-cli": "^4.0.1",
|
|
54
|
+
"eslint": "^8.10.0",
|
|
55
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
56
|
+
"eslint-config-airbnb-typescript": "^16.1.0",
|
|
57
|
+
"eslint-config-node": "^4.1.0",
|
|
58
|
+
"eslint-config-prettier": "^8.5.0",
|
|
59
|
+
"eslint-plugin-import": "^2.25.4",
|
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
61
|
+
"eslint-plugin-node": "^11.1.0",
|
|
62
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
63
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
64
|
+
"eslint-plugin-react": "^7.29.3",
|
|
65
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
66
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
67
|
+
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
68
|
+
"husky": "^7.0.4",
|
|
69
|
+
"lint-staged": "^12.3.5",
|
|
70
|
+
"postcss": "^8.4.8",
|
|
71
|
+
"prettier": "^2.5.1",
|
|
72
|
+
"react": "^17.0.2",
|
|
73
|
+
"react-dom": "^17.0.2",
|
|
74
|
+
"rollup": "^2.70.0",
|
|
75
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
76
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
77
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
78
|
+
"typescript": "^4.6.2"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@types/styled-components": "^5.1.24",
|
|
82
|
+
"lodash.isobject": "^3.0.2",
|
|
83
|
+
"styled-components": "^5.3.3",
|
|
84
|
+
"styled-media-query": "^2.1.2"
|
|
85
|
+
},
|
|
86
|
+
"files": [
|
|
87
|
+
"lib"
|
|
88
|
+
],
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">= 14.17.0",
|
|
91
|
+
"npm": "please-use-yarn",
|
|
92
|
+
"yarn": ">= 1.22.10"
|
|
93
|
+
},
|
|
94
|
+
"lint-staged": {
|
|
95
|
+
"*.{js,jsx,ts,tsx}": [
|
|
96
|
+
"eslint --cache --fix --quiet",
|
|
97
|
+
"prettier --write"
|
|
98
|
+
],
|
|
99
|
+
"*.{md,html,css}": [
|
|
100
|
+
"prettier --write"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|