@mw-kit/mw-ui 1.8.18 → 1.8.19

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.
@@ -43,9 +43,9 @@ export declare const assets: {
43
43
  };
44
44
  };
45
45
  declare const fonts: {
46
- readonly Allura: "Allura";
47
- readonly GreatVibes: "Great Vibes";
48
- readonly Pacifico: "Pacifico";
46
+ readonly Allura: "\"Allura\", cursive";
47
+ readonly GreatVibes: "\"Great Vibes\", cursive";
48
+ readonly Pacifico: "\"Pacifico\", cursive";
49
49
  readonly Lato: "\"Lato\", sans-serif";
50
50
  };
51
51
  export default fonts;
package/dist/index.d.mts CHANGED
@@ -31,76 +31,10 @@ type MappedTransitions<P extends string> = {
31
31
  };
32
32
  };
33
33
 
34
- declare const theme$1: {
35
- readonly button: {
36
- readonly sizes: {
37
- tiny: {
38
- fontSize: string;
39
- lineHeight: string;
40
- minWidth: string;
41
- minHeight: string;
42
- };
43
- mini: {
44
- fontSize: string;
45
- lineHeight: string;
46
- minWidth: string;
47
- minHeight: string;
48
- };
49
- small: {
50
- fontSize: string;
51
- lineHeight: string;
52
- minWidth: string;
53
- minHeight: string;
54
- };
55
- large: {
56
- fontSize: string;
57
- lineHeight: string;
58
- minWidth: string;
59
- minHeight: string;
60
- };
61
- big: {
62
- fontSize: string;
63
- lineHeight: string;
64
- minWidth: string;
65
- minHeight: string;
66
- };
67
- };
68
- };
69
- };
70
-
71
- type ColorOptions = keyof typeof colors;
72
- type OpacitiyOptions = keyof typeof opacities;
73
- type SpacingOptions = keyof typeof spacings;
74
- type FontOptions = keyof typeof fonts;
75
- type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
76
- interface Typography {
77
- fontFamily: FontOptions;
78
- fontWeight: FontWeight;
79
- fontSize: string;
80
- }
81
- type TypographyOptions = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
82
- type Typographies = {
83
- [key in TypographyOptions]: Typography;
84
- };
85
- type useTypographyFunc = (typography: TypographyOptions, options?: {
86
- fontWeight?: FontWeight;
87
- }) => RuleSet;
88
- interface ThemeInterface {
89
- colors: typeof colors;
90
- fonts: typeof fonts;
91
- getColor: (color: ColorOptions, opacity?: OpacitiyOptions) => string;
92
- useTypography: useTypographyFunc;
93
- isDarkColor: (color: ColorOptions, ifDark?: ColorOptions, ifLight?: ColorOptions) => ColorOptions;
94
- spacings: typeof spacings;
95
- typographies: typeof typographies;
96
- components: typeof theme$1;
97
- assetUrl: (asset: string) => string;
98
- }
99
-
100
34
  declare const fonts: {
101
- readonly Allura: "Allura";
102
- readonly GreatVibes: "Great Vibes";
103
- readonly Pacifico: "Pacifico";
35
+ readonly Allura: "\"Allura\", cursive";
36
+ readonly GreatVibes: "\"Great Vibes\", cursive";
37
+ readonly Pacifico: "\"Pacifico\", cursive";
104
38
  readonly Lato: "\"Lato\", sans-serif";
105
39
  };
106
40
 
@@ -172,7 +106,119 @@ declare const spacings: {
172
106
  readonly s6: "35px";
173
107
  };
174
108
 
175
- declare const typographies: Typographies;
109
+ declare const typographies: {
110
+ readonly h1: {
111
+ readonly fontFamily: "Lato";
112
+ readonly fontWeight: "bold";
113
+ readonly fontSize: "18px";
114
+ readonly lineHeight: "22px";
115
+ readonly letterSpacing: "0px";
116
+ };
117
+ readonly h2: {
118
+ readonly fontFamily: "Lato";
119
+ readonly fontWeight: "bold";
120
+ readonly fontSize: "16px";
121
+ readonly lineHeight: "19px";
122
+ readonly letterSpacing: "0px";
123
+ };
124
+ readonly h3: {
125
+ readonly fontFamily: "Lato";
126
+ readonly fontWeight: "normal";
127
+ readonly fontSize: "16px";
128
+ readonly lineHeight: "19px";
129
+ readonly letterSpacing: "0px";
130
+ };
131
+ readonly h4: {
132
+ readonly fontFamily: "Lato";
133
+ readonly fontWeight: "bold";
134
+ readonly fontSize: "14px";
135
+ readonly lineHeight: "17px";
136
+ readonly letterSpacing: "0px";
137
+ };
138
+ readonly h5: {
139
+ readonly fontFamily: "Lato";
140
+ readonly fontWeight: "normal";
141
+ readonly fontSize: "14px";
142
+ readonly lineHeight: "17px";
143
+ readonly letterSpacing: "0px";
144
+ };
145
+ readonly h6: {
146
+ readonly fontFamily: "Lato";
147
+ readonly fontWeight: "normal";
148
+ readonly fontSize: "13px";
149
+ readonly lineHeight: "16px";
150
+ readonly letterSpacing: "0px";
151
+ };
152
+ readonly p: {
153
+ readonly fontFamily: "Lato";
154
+ readonly fontWeight: "normal";
155
+ readonly fontSize: "14px";
156
+ readonly lineHeight: "17px";
157
+ readonly letterSpacing: "0px";
158
+ };
159
+ };
160
+
161
+ declare const theme$1: {
162
+ readonly button: {
163
+ readonly sizes: {
164
+ tiny: {
165
+ fontSize: string;
166
+ lineHeight: string;
167
+ minWidth: string;
168
+ minHeight: string;
169
+ };
170
+ mini: {
171
+ fontSize: string;
172
+ lineHeight: string;
173
+ minWidth: string;
174
+ minHeight: string;
175
+ };
176
+ small: {
177
+ fontSize: string;
178
+ lineHeight: string;
179
+ minWidth: string;
180
+ minHeight: string;
181
+ };
182
+ large: {
183
+ fontSize: string;
184
+ lineHeight: string;
185
+ minWidth: string;
186
+ minHeight: string;
187
+ };
188
+ big: {
189
+ fontSize: string;
190
+ lineHeight: string;
191
+ minWidth: string;
192
+ minHeight: string;
193
+ };
194
+ };
195
+ };
196
+ };
197
+
198
+ type ColorOptions = keyof typeof colors;
199
+ type OpacitiyOptions = keyof typeof opacities;
200
+ type SpacingOptions = keyof typeof spacings;
201
+ type FontOptions = keyof typeof fonts;
202
+ type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
203
+ interface Typography {
204
+ fontFamily: FontOptions;
205
+ fontWeight: FontWeight;
206
+ fontSize: string;
207
+ lineHeight: string;
208
+ letterSpacing: string;
209
+ }
210
+ type TypographyOptions = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
211
+ interface ThemeInterface {
212
+ colors: typeof colors;
213
+ fonts: typeof fonts;
214
+ getColor: (color: ColorOptions, opacity?: OpacitiyOptions) => string;
215
+ useTypography: (typography: TypographyOptions, options?: Partial<Pick<Typography, 'fontWeight' | 'lineHeight' | 'letterSpacing'>>) => RuleSet;
216
+ isDarkColor: (color: ColorOptions, ifDark?: ColorOptions, ifLight?: ColorOptions) => ColorOptions;
217
+ spacings: typeof spacings;
218
+ typographies: typeof typographies;
219
+ components: typeof theme$1;
220
+ assetUrl: (asset: string) => string;
221
+ }
176
222
 
177
223
  type Position = 'top right' | 'top left' | 'bottom right' | 'bottom left' | 'right top' | 'right bottom' | 'left top' | 'left bottom';
178
224
  interface References {
package/dist/index.js CHANGED
@@ -212,9 +212,9 @@ var assets = {
212
212
  }
213
213
  };
214
214
  var fonts = {
215
- Allura: "Allura",
216
- GreatVibes: "Great Vibes",
217
- Pacifico: "Pacifico",
215
+ Allura: '"Allura", cursive',
216
+ GreatVibes: '"Great Vibes", cursive',
217
+ Pacifico: '"Pacifico", cursive',
218
218
  Lato: '"Lato", sans-serif'
219
219
  };
220
220
  var fonts_default = fonts;
@@ -291,37 +291,51 @@ var typographies = {
291
291
  h1: {
292
292
  fontFamily: "Lato",
293
293
  fontWeight: "bold",
294
- fontSize: "18px"
294
+ fontSize: "18px",
295
+ lineHeight: "22px",
296
+ letterSpacing: "0px"
295
297
  },
296
298
  h2: {
297
299
  fontFamily: "Lato",
298
300
  fontWeight: "bold",
299
- fontSize: "16px"
301
+ fontSize: "16px",
302
+ lineHeight: "19px",
303
+ letterSpacing: "0px"
300
304
  },
301
305
  h3: {
302
306
  fontFamily: "Lato",
303
307
  fontWeight: "normal",
304
- fontSize: "16px"
308
+ fontSize: "16px",
309
+ lineHeight: "19px",
310
+ letterSpacing: "0px"
305
311
  },
306
312
  h4: {
307
313
  fontFamily: "Lato",
308
314
  fontWeight: "bold",
309
- fontSize: "14px"
315
+ fontSize: "14px",
316
+ lineHeight: "17px",
317
+ letterSpacing: "0px"
310
318
  },
311
319
  h5: {
312
320
  fontFamily: "Lato",
313
321
  fontWeight: "normal",
314
- fontSize: "14px"
322
+ fontSize: "14px",
323
+ lineHeight: "17px",
324
+ letterSpacing: "0px"
315
325
  },
316
326
  h6: {
317
327
  fontFamily: "Lato",
318
328
  fontWeight: "normal",
319
- fontSize: "13px"
329
+ fontSize: "13px",
330
+ lineHeight: "16px",
331
+ letterSpacing: "0px"
320
332
  },
321
333
  p: {
322
334
  fontFamily: "Lato",
323
335
  fontWeight: "normal",
324
- fontSize: "14px"
336
+ fontSize: "14px",
337
+ lineHeight: "17px",
338
+ letterSpacing: "0px"
325
339
  }
326
340
  };
327
341
 
@@ -1078,7 +1092,7 @@ var import_styled_components4 = __toESM(require("styled-components"));
1078
1092
  var Button = import_styled_components4.default.button`
1079
1093
  padding: 0
1080
1094
  ${({ theme: theme4, $appearance: appearance }) => appearance === "link" ? 0 : theme4.spacings.s3};
1081
- font-family: 'Lato', sans-serif;
1095
+ font-family: ${({ theme: theme4 }) => theme4.fonts.Lato};
1082
1096
  font-weight: ${({ $appearance: appearance }) => appearance === "link" ? "normal" : "bold"};
1083
1097
  border-radius: 4px;
1084
1098
  position: relative;
@@ -1679,11 +1693,13 @@ var globals_default = Globals;
1679
1693
  var import_jsx_runtime5 = require("react/jsx-runtime");
1680
1694
  var getColor = (color, opacity = 100) => `${colors[color]}${opacities[opacity]}`;
1681
1695
  var useTypography = (typography, options = {}) => {
1682
- const { fontFamily, fontWeight, fontSize } = typographies[typography];
1696
+ const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographies[typography];
1683
1697
  return import_styled_components6.css`
1684
- font-family: ${fonts_default[fontFamily]};
1685
- font-weight: ${options.fontWeight || fontWeight};
1698
+ font-family: ${fontFamily};
1686
1699
  font-size: ${fontSize};
1700
+ font-weight: ${options.fontWeight || fontWeight};
1701
+ line-height: ${options.lineHeight || lineHeight};
1702
+ letter-spacing: ${options.letterSpacing || letterSpacing};
1687
1703
  `;
1688
1704
  };
1689
1705
  var isDarkColor = (color, ifDark = "white", ifLight = "black") => {
@@ -8947,8 +8963,9 @@ var ScrollContainer_default = ScrollContainer;
8947
8963
  // src/components/Menu/styles.ts
8948
8964
  var import_styled_components12 = __toESM(require("styled-components"));
8949
8965
  var Option = import_styled_components12.default.div`
8950
- ${({ theme: theme4 }) => theme4.useTypography("p")};
8951
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
8966
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
8967
+ lineHeight: theme4.spacings.s3
8968
+ })}
8952
8969
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
8953
8970
  display: flex;
8954
8971
  gap: ${({ theme: theme4 }) => theme4.spacings.s1};
@@ -9219,8 +9236,9 @@ var Container5 = import_styled_components13.default.div`
9219
9236
  }};
9220
9237
  `;
9221
9238
  var LabelContainer = import_styled_components13.default.div`
9222
- ${({ theme: theme4 }) => theme4.useTypography("p")};
9223
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9239
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
9240
+ lineHeight: theme4.spacings.s3
9241
+ })}
9224
9242
  `;
9225
9243
  var CalendarContainer = import_styled_components13.default.div`
9226
9244
  border: 1px solid ${({ theme: theme4 }) => theme4.colors.lightestGrey};
@@ -9241,8 +9259,9 @@ var MonthContainer = import_styled_components13.default.div`
9241
9259
  }
9242
9260
  `;
9243
9261
  var MonthName = import_styled_components13.default.div`
9244
- ${({ theme: theme4 }) => theme4.useTypography("h6")};
9245
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9262
+ ${({ theme: theme4 }) => theme4.useTypography("h6", {
9263
+ lineHeight: theme4.spacings.s3
9264
+ })}
9246
9265
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
9247
9266
  text-align: center;
9248
9267
  `;
@@ -9260,8 +9279,9 @@ var MonthBtn = import_styled_components13.default.div`
9260
9279
  }}
9261
9280
  `;
9262
9281
  var NavBtn = import_styled_components13.default.button`
9263
- ${({ theme: theme4 }) => theme4.useTypography("p")}
9264
- line-height: 14px;
9282
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
9283
+ lineHeight: theme4.spacings.s3
9284
+ })}
9265
9285
  width: 21px;
9266
9286
  height: 32px;
9267
9287
  box-shadow: none;
@@ -9445,8 +9465,9 @@ var WeekContainer = import_styled_components15.default.div`
9445
9465
  }
9446
9466
 
9447
9467
  > * {
9448
- ${({ theme: theme4 }) => theme4.useTypography("h6")}
9449
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9468
+ ${({ theme: theme4 }) => theme4.useTypography("h6", {
9469
+ lineHeight: theme4.spacings.s3
9470
+ })}
9450
9471
  width: 25px;
9451
9472
  height: 25px;
9452
9473
 
@@ -9988,15 +10009,11 @@ var Input = import_styled_components17.default.input`
9988
10009
  return invalid ? theme4.colors.warningRed : theme4.colors.darkBlue;
9989
10010
  }};
9990
10011
 
9991
- line-height: 17px;
9992
-
9993
10012
  &::placeholder {
9994
10013
  color: ${({ theme: theme4, $invalid: invalid }) => {
9995
10014
  return invalid ? theme4.colors.warningRed : theme4.colors.darkGrey;
9996
10015
  }};
9997
10016
 
9998
- line-height: 17px;
9999
-
10000
10017
  ${({ placeholder }) => {
10001
10018
  if (placeholder !== "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022") {
10002
10019
  return import_styled_components17.css`
@@ -11166,8 +11183,9 @@ var Checkmark = import_styled_components22.default.div`
11166
11183
  }
11167
11184
  `;
11168
11185
  var Label2 = import_styled_components22.default.label`
11169
- ${({ theme: theme4 }) => theme4.useTypography("p")}
11170
- line-height: 14px;
11186
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
11187
+ lineHeight: theme4.spacings.s3
11188
+ })}
11171
11189
 
11172
11190
  ${({ $padding: padding, theme: theme4 }) => {
11173
11191
  if (!padding) return;
@@ -11293,8 +11311,9 @@ var Label2 = import_styled_components22.default.label`
11293
11311
  `;
11294
11312
  var LabelContent = import_styled_components22.default.div`
11295
11313
  display: inline-block;
11296
- ${({ theme: theme4 }) => theme4.useTypography("p")}
11297
- line-height: 14px;
11314
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
11315
+ lineHeight: theme4.spacings.s3
11316
+ })}
11298
11317
  flex: 1;
11299
11318
  overflow: hidden;
11300
11319
 
@@ -11722,7 +11741,6 @@ var RelativeContainer3 = import_styled_components24.default.div`
11722
11741
  `;
11723
11742
  var LabelContainer3 = import_styled_components24.default.div`
11724
11743
  ${({ theme: theme4 }) => theme4.useTypography("p")}
11725
- line-height: 17px;
11726
11744
  flex: 1;
11727
11745
 
11728
11746
  &:first-child {
@@ -12065,8 +12083,9 @@ var RelativeContainer4 = import_styled_components25.default.div`
12065
12083
  }
12066
12084
  `;
12067
12085
  var LabelContainer4 = import_styled_components25.default.div`
12068
- ${({ theme: theme4 }) => theme4.useTypography("p")}
12069
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
12086
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
12087
+ lineHeight: theme4.spacings.s3
12088
+ })}
12070
12089
  `;
12071
12090
  var Container10 = import_styled_components25.default.div`
12072
12091
  position: absolute;
@@ -13326,8 +13345,7 @@ var NavBar_default = NavBar;
13326
13345
 
13327
13346
  // src/components/Input/components/Range/styles/Label/index.ts
13328
13347
  var Label5 = import_styled_components35.default.label`
13329
- ${({ theme: theme4 }) => theme4.useTypography("p")};
13330
- line-height: 17px;
13348
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
13331
13349
 
13332
13350
  ${({ $width: width, $viewMode: viewMode }) => {
13333
13351
  if (width) {
@@ -14607,8 +14625,9 @@ var import_react38 = __toESM(require("react"));
14607
14625
  // src/components/Input/components/Switch/styles.ts
14608
14626
  var import_styled_components45 = __toESM(require("styled-components"));
14609
14627
  var LabelContainer7 = import_styled_components45.default.div`
14610
- ${({ theme: theme4 }) => theme4.useTypography("p")}
14611
- line-height: 14px;
14628
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
14629
+ lineHeight: theme4.spacings.s3
14630
+ })}
14612
14631
  display: flex;
14613
14632
  align-items: center;
14614
14633
 
@@ -14783,21 +14802,18 @@ var import_react39 = __toESM(require("react"));
14783
14802
  // src/components/Input/components/Tags/components/Input/styles.ts
14784
14803
  var import_styled_components46 = __toESM(require("styled-components"));
14785
14804
  var Input4 = import_styled_components46.default.input`
14786
- ${({ theme: theme4 }) => theme4.useTypography("p")};
14805
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
14787
14806
 
14788
14807
  color: ${({ theme: theme4, $invalid: invalid }) => {
14789
14808
  return invalid ? theme4.colors.warningRed : theme4.colors.darkBlue;
14790
14809
  }};
14791
14810
 
14792
- line-height: 17px;
14793
-
14794
14811
  &::placeholder {
14795
14812
  color: ${({ theme: theme4, $invalid: invalid }) => {
14796
14813
  return invalid ? theme4.colors.warningRed : theme4.colors.darkGrey;
14797
14814
  }};
14798
14815
 
14799
- line-height: 17px;
14800
- ${({ theme: theme4 }) => theme4.useTypography("p")};
14816
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
14801
14817
  opacity: 1;
14802
14818
  }
14803
14819
 
@@ -14881,7 +14897,6 @@ var Label_default3 = Label9;
14881
14897
  var import_styled_components48 = __toESM(require("styled-components"));
14882
14898
  var Tag = import_styled_components48.default.div`
14883
14899
  ${({ theme: theme4 }) => theme4.useTypography("p")}
14884
- line-height: 17px;
14885
14900
 
14886
14901
  background-color: ${({ theme: theme4 }) => theme4.colors.white};
14887
14902
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
package/dist/index.mjs CHANGED
@@ -154,9 +154,9 @@ var assets = {
154
154
  }
155
155
  };
156
156
  var fonts = {
157
- Allura: "Allura",
158
- GreatVibes: "Great Vibes",
159
- Pacifico: "Pacifico",
157
+ Allura: '"Allura", cursive',
158
+ GreatVibes: '"Great Vibes", cursive',
159
+ Pacifico: '"Pacifico", cursive',
160
160
  Lato: '"Lato", sans-serif'
161
161
  };
162
162
  var fonts_default = fonts;
@@ -233,37 +233,51 @@ var typographies = {
233
233
  h1: {
234
234
  fontFamily: "Lato",
235
235
  fontWeight: "bold",
236
- fontSize: "18px"
236
+ fontSize: "18px",
237
+ lineHeight: "22px",
238
+ letterSpacing: "0px"
237
239
  },
238
240
  h2: {
239
241
  fontFamily: "Lato",
240
242
  fontWeight: "bold",
241
- fontSize: "16px"
243
+ fontSize: "16px",
244
+ lineHeight: "19px",
245
+ letterSpacing: "0px"
242
246
  },
243
247
  h3: {
244
248
  fontFamily: "Lato",
245
249
  fontWeight: "normal",
246
- fontSize: "16px"
250
+ fontSize: "16px",
251
+ lineHeight: "19px",
252
+ letterSpacing: "0px"
247
253
  },
248
254
  h4: {
249
255
  fontFamily: "Lato",
250
256
  fontWeight: "bold",
251
- fontSize: "14px"
257
+ fontSize: "14px",
258
+ lineHeight: "17px",
259
+ letterSpacing: "0px"
252
260
  },
253
261
  h5: {
254
262
  fontFamily: "Lato",
255
263
  fontWeight: "normal",
256
- fontSize: "14px"
264
+ fontSize: "14px",
265
+ lineHeight: "17px",
266
+ letterSpacing: "0px"
257
267
  },
258
268
  h6: {
259
269
  fontFamily: "Lato",
260
270
  fontWeight: "normal",
261
- fontSize: "13px"
271
+ fontSize: "13px",
272
+ lineHeight: "16px",
273
+ letterSpacing: "0px"
262
274
  },
263
275
  p: {
264
276
  fontFamily: "Lato",
265
277
  fontWeight: "normal",
266
- fontSize: "14px"
278
+ fontSize: "14px",
279
+ lineHeight: "17px",
280
+ letterSpacing: "0px"
267
281
  }
268
282
  };
269
283
 
@@ -1020,7 +1034,7 @@ import styled3, { css as css4 } from "styled-components";
1020
1034
  var Button = styled3.button`
1021
1035
  padding: 0
1022
1036
  ${({ theme: theme4, $appearance: appearance }) => appearance === "link" ? 0 : theme4.spacings.s3};
1023
- font-family: 'Lato', sans-serif;
1037
+ font-family: ${({ theme: theme4 }) => theme4.fonts.Lato};
1024
1038
  font-weight: ${({ $appearance: appearance }) => appearance === "link" ? "normal" : "bold"};
1025
1039
  border-radius: 4px;
1026
1040
  position: relative;
@@ -1621,11 +1635,13 @@ var globals_default = Globals;
1621
1635
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1622
1636
  var getColor = (color, opacity = 100) => `${colors[color]}${opacities[opacity]}`;
1623
1637
  var useTypography = (typography, options = {}) => {
1624
- const { fontFamily, fontWeight, fontSize } = typographies[typography];
1638
+ const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographies[typography];
1625
1639
  return css5`
1626
- font-family: ${fonts_default[fontFamily]};
1627
- font-weight: ${options.fontWeight || fontWeight};
1640
+ font-family: ${fontFamily};
1628
1641
  font-size: ${fontSize};
1642
+ font-weight: ${options.fontWeight || fontWeight};
1643
+ line-height: ${options.lineHeight || lineHeight};
1644
+ letter-spacing: ${options.letterSpacing || letterSpacing};
1629
1645
  `;
1630
1646
  };
1631
1647
  var isDarkColor = (color, ifDark = "white", ifLight = "black") => {
@@ -8889,8 +8905,9 @@ var ScrollContainer_default = ScrollContainer;
8889
8905
  // src/components/Menu/styles.ts
8890
8906
  import styled9, { css as css9 } from "styled-components";
8891
8907
  var Option = styled9.div`
8892
- ${({ theme: theme4 }) => theme4.useTypography("p")};
8893
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
8908
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
8909
+ lineHeight: theme4.spacings.s3
8910
+ })}
8894
8911
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
8895
8912
  display: flex;
8896
8913
  gap: ${({ theme: theme4 }) => theme4.spacings.s1};
@@ -9161,8 +9178,9 @@ var Container5 = styled10.div`
9161
9178
  }};
9162
9179
  `;
9163
9180
  var LabelContainer = styled10.div`
9164
- ${({ theme: theme4 }) => theme4.useTypography("p")};
9165
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9181
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
9182
+ lineHeight: theme4.spacings.s3
9183
+ })}
9166
9184
  `;
9167
9185
  var CalendarContainer = styled10.div`
9168
9186
  border: 1px solid ${({ theme: theme4 }) => theme4.colors.lightestGrey};
@@ -9183,8 +9201,9 @@ var MonthContainer = styled10.div`
9183
9201
  }
9184
9202
  `;
9185
9203
  var MonthName = styled10.div`
9186
- ${({ theme: theme4 }) => theme4.useTypography("h6")};
9187
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9204
+ ${({ theme: theme4 }) => theme4.useTypography("h6", {
9205
+ lineHeight: theme4.spacings.s3
9206
+ })}
9188
9207
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
9189
9208
  text-align: center;
9190
9209
  `;
@@ -9202,8 +9221,9 @@ var MonthBtn = styled10.div`
9202
9221
  }}
9203
9222
  `;
9204
9223
  var NavBtn = styled10.button`
9205
- ${({ theme: theme4 }) => theme4.useTypography("p")}
9206
- line-height: 14px;
9224
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
9225
+ lineHeight: theme4.spacings.s3
9226
+ })}
9207
9227
  width: 21px;
9208
9228
  height: 32px;
9209
9229
  box-shadow: none;
@@ -9387,8 +9407,9 @@ var WeekContainer = styled12.div`
9387
9407
  }
9388
9408
 
9389
9409
  > * {
9390
- ${({ theme: theme4 }) => theme4.useTypography("h6")}
9391
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
9410
+ ${({ theme: theme4 }) => theme4.useTypography("h6", {
9411
+ lineHeight: theme4.spacings.s3
9412
+ })}
9392
9413
  width: 25px;
9393
9414
  height: 25px;
9394
9415
 
@@ -9930,15 +9951,11 @@ var Input = styled14.input`
9930
9951
  return invalid ? theme4.colors.warningRed : theme4.colors.darkBlue;
9931
9952
  }};
9932
9953
 
9933
- line-height: 17px;
9934
-
9935
9954
  &::placeholder {
9936
9955
  color: ${({ theme: theme4, $invalid: invalid }) => {
9937
9956
  return invalid ? theme4.colors.warningRed : theme4.colors.darkGrey;
9938
9957
  }};
9939
9958
 
9940
- line-height: 17px;
9941
-
9942
9959
  ${({ placeholder }) => {
9943
9960
  if (placeholder !== "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022") {
9944
9961
  return css14`
@@ -11108,8 +11125,9 @@ var Checkmark = styled19.div`
11108
11125
  }
11109
11126
  `;
11110
11127
  var Label2 = styled19.label`
11111
- ${({ theme: theme4 }) => theme4.useTypography("p")}
11112
- line-height: 14px;
11128
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
11129
+ lineHeight: theme4.spacings.s3
11130
+ })}
11113
11131
 
11114
11132
  ${({ $padding: padding, theme: theme4 }) => {
11115
11133
  if (!padding) return;
@@ -11235,8 +11253,9 @@ var Label2 = styled19.label`
11235
11253
  `;
11236
11254
  var LabelContent = styled19.div`
11237
11255
  display: inline-block;
11238
- ${({ theme: theme4 }) => theme4.useTypography("p")}
11239
- line-height: 14px;
11256
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
11257
+ lineHeight: theme4.spacings.s3
11258
+ })}
11240
11259
  flex: 1;
11241
11260
  overflow: hidden;
11242
11261
 
@@ -11664,7 +11683,6 @@ var RelativeContainer3 = styled21.div`
11664
11683
  `;
11665
11684
  var LabelContainer3 = styled21.div`
11666
11685
  ${({ theme: theme4 }) => theme4.useTypography("p")}
11667
- line-height: 17px;
11668
11686
  flex: 1;
11669
11687
 
11670
11688
  &:first-child {
@@ -12007,8 +12025,9 @@ var RelativeContainer4 = styled22.div`
12007
12025
  }
12008
12026
  `;
12009
12027
  var LabelContainer4 = styled22.div`
12010
- ${({ theme: theme4 }) => theme4.useTypography("p")}
12011
- line-height: ${({ theme: theme4 }) => theme4.spacings.s3};
12028
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
12029
+ lineHeight: theme4.spacings.s3
12030
+ })}
12012
12031
  `;
12013
12032
  var Container10 = styled22.div`
12014
12033
  position: absolute;
@@ -13268,8 +13287,7 @@ var NavBar_default = NavBar;
13268
13287
 
13269
13288
  // src/components/Input/components/Range/styles/Label/index.ts
13270
13289
  var Label5 = styled32.label`
13271
- ${({ theme: theme4 }) => theme4.useTypography("p")};
13272
- line-height: 17px;
13290
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
13273
13291
 
13274
13292
  ${({ $width: width, $viewMode: viewMode }) => {
13275
13293
  if (width) {
@@ -14549,8 +14567,9 @@ import React34 from "react";
14549
14567
  // src/components/Input/components/Switch/styles.ts
14550
14568
  import styled42, { css as css32 } from "styled-components";
14551
14569
  var LabelContainer7 = styled42.div`
14552
- ${({ theme: theme4 }) => theme4.useTypography("p")}
14553
- line-height: 14px;
14570
+ ${({ theme: theme4 }) => theme4.useTypography("p", {
14571
+ lineHeight: theme4.spacings.s3
14572
+ })}
14554
14573
  display: flex;
14555
14574
  align-items: center;
14556
14575
 
@@ -14725,21 +14744,18 @@ import React35 from "react";
14725
14744
  // src/components/Input/components/Tags/components/Input/styles.ts
14726
14745
  import styled43 from "styled-components";
14727
14746
  var Input4 = styled43.input`
14728
- ${({ theme: theme4 }) => theme4.useTypography("p")};
14747
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
14729
14748
 
14730
14749
  color: ${({ theme: theme4, $invalid: invalid }) => {
14731
14750
  return invalid ? theme4.colors.warningRed : theme4.colors.darkBlue;
14732
14751
  }};
14733
14752
 
14734
- line-height: 17px;
14735
-
14736
14753
  &::placeholder {
14737
14754
  color: ${({ theme: theme4, $invalid: invalid }) => {
14738
14755
  return invalid ? theme4.colors.warningRed : theme4.colors.darkGrey;
14739
14756
  }};
14740
14757
 
14741
- line-height: 17px;
14742
- ${({ theme: theme4 }) => theme4.useTypography("p")};
14758
+ ${({ theme: theme4 }) => theme4.useTypography("p")}
14743
14759
  opacity: 1;
14744
14760
  }
14745
14761
 
@@ -14823,7 +14839,6 @@ var Label_default3 = Label9;
14823
14839
  import styled45 from "styled-components";
14824
14840
  var Tag = styled45.div`
14825
14841
  ${({ theme: theme4 }) => theme4.useTypography("p")}
14826
- line-height: 17px;
14827
14842
 
14828
14843
  background-color: ${({ theme: theme4 }) => theme4.colors.white};
14829
14844
  color: ${({ theme: theme4 }) => theme4.colors.darkBlue};
@@ -1,4 +1,3 @@
1
- import type { Typographies } from './interfaces';
2
1
  export declare const colors: {
3
2
  readonly black: "#000000";
4
3
  readonly blue: "#3455AB";
@@ -67,4 +66,54 @@ export declare const spacings: {
67
66
  readonly s6: "35px";
68
67
  };
69
68
  export { default as fonts } from '../assets/fonts';
70
- export declare const typographies: Typographies;
69
+ export declare const typographies: {
70
+ readonly h1: {
71
+ readonly fontFamily: "Lato";
72
+ readonly fontWeight: "bold";
73
+ readonly fontSize: "18px";
74
+ readonly lineHeight: "22px";
75
+ readonly letterSpacing: "0px";
76
+ };
77
+ readonly h2: {
78
+ readonly fontFamily: "Lato";
79
+ readonly fontWeight: "bold";
80
+ readonly fontSize: "16px";
81
+ readonly lineHeight: "19px";
82
+ readonly letterSpacing: "0px";
83
+ };
84
+ readonly h3: {
85
+ readonly fontFamily: "Lato";
86
+ readonly fontWeight: "normal";
87
+ readonly fontSize: "16px";
88
+ readonly lineHeight: "19px";
89
+ readonly letterSpacing: "0px";
90
+ };
91
+ readonly h4: {
92
+ readonly fontFamily: "Lato";
93
+ readonly fontWeight: "bold";
94
+ readonly fontSize: "14px";
95
+ readonly lineHeight: "17px";
96
+ readonly letterSpacing: "0px";
97
+ };
98
+ readonly h5: {
99
+ readonly fontFamily: "Lato";
100
+ readonly fontWeight: "normal";
101
+ readonly fontSize: "14px";
102
+ readonly lineHeight: "17px";
103
+ readonly letterSpacing: "0px";
104
+ };
105
+ readonly h6: {
106
+ readonly fontFamily: "Lato";
107
+ readonly fontWeight: "normal";
108
+ readonly fontSize: "13px";
109
+ readonly lineHeight: "16px";
110
+ readonly letterSpacing: "0px";
111
+ };
112
+ readonly p: {
113
+ readonly fontFamily: "Lato";
114
+ readonly fontWeight: "normal";
115
+ readonly fontSize: "14px";
116
+ readonly lineHeight: "17px";
117
+ readonly letterSpacing: "0px";
118
+ };
119
+ };
@@ -10,19 +10,18 @@ interface Typography {
10
10
  fontFamily: FontOptions;
11
11
  fontWeight: FontWeight;
12
12
  fontSize: string;
13
+ lineHeight: string;
14
+ letterSpacing: string;
13
15
  }
14
16
  type TypographyOptions = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
15
17
  export type Typographies = {
16
18
  [key in TypographyOptions]: Typography;
17
19
  };
18
- export type useTypographyFunc = (typography: TypographyOptions, options?: {
19
- fontWeight?: FontWeight;
20
- }) => RuleSet;
21
20
  export interface ThemeInterface {
22
21
  colors: typeof colors;
23
22
  fonts: typeof fonts;
24
23
  getColor: (color: ColorOptions, opacity?: OpacitiyOptions) => string;
25
- useTypography: useTypographyFunc;
24
+ useTypography: (typography: TypographyOptions, options?: Partial<Pick<Typography, 'fontWeight' | 'lineHeight' | 'letterSpacing'>>) => RuleSet;
26
25
  isDarkColor: (color: ColorOptions, ifDark?: ColorOptions, ifLight?: ColorOptions) => ColorOptions;
27
26
  spacings: typeof spacings;
28
27
  typographies: typeof typographies;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mw-kit/mw-ui",
3
- "version": "1.8.18",
3
+ "version": "1.8.19",
4
4
  "description": "Made with create-react-library",
5
5
  "author": "fmgusmao",
6
6
  "license": "MIT",