@ornikar/kitt-universal 7.5.0 → 7.6.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 (43) hide show
  1. package/dist/definitions/Picker/Picker.d.ts +17 -0
  2. package/dist/definitions/Picker/Picker.d.ts.map +1 -0
  3. package/dist/definitions/Picker/Picker.web.d.ts +3 -0
  4. package/dist/definitions/Picker/Picker.web.d.ts.map +1 -0
  5. package/dist/definitions/Picker/PickerItem.d.ts +9 -0
  6. package/dist/definitions/Picker/PickerItem.d.ts.map +1 -0
  7. package/dist/definitions/TimePicker/useTimePicker.d.ts +2 -2
  8. package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
  9. package/dist/definitions/index.d.ts +2 -0
  10. package/dist/definitions/index.d.ts.map +1 -1
  11. package/dist/definitions/themes/default.d.ts +1 -0
  12. package/dist/definitions/themes/default.d.ts.map +1 -1
  13. package/dist/definitions/themes/late-ocean/picker.d.ts +21 -0
  14. package/dist/definitions/themes/late-ocean/picker.d.ts.map +1 -0
  15. package/dist/definitions/typography/Typography.d.ts +3 -2
  16. package/dist/definitions/typography/Typography.d.ts.map +1 -1
  17. package/dist/index-browser-all.es.android.js +168 -36
  18. package/dist/index-browser-all.es.android.js.map +1 -1
  19. package/dist/index-browser-all.es.ios.js +168 -36
  20. package/dist/index-browser-all.es.ios.js.map +1 -1
  21. package/dist/index-browser-all.es.js +168 -36
  22. package/dist/index-browser-all.es.js.map +1 -1
  23. package/dist/index-browser-all.es.web.js +72 -35
  24. package/dist/index-browser-all.es.web.js.map +1 -1
  25. package/dist/index-node-14.17.cjs.js +180 -67
  26. package/dist/index-node-14.17.cjs.js.map +1 -1
  27. package/dist/index-node-14.17.cjs.web.js +51 -24
  28. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  29. package/dist/linaria-themes-browser-all.es.android.js +26 -0
  30. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  31. package/dist/linaria-themes-browser-all.es.ios.js +26 -0
  32. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  33. package/dist/linaria-themes-browser-all.es.js +26 -0
  34. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  35. package/dist/linaria-themes-browser-all.es.web.js +27 -0
  36. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  37. package/dist/linaria-themes-node-14.17.cjs.js +25 -0
  38. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  39. package/dist/linaria-themes-node-14.17.cjs.web.js +25 -0
  40. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  41. package/dist/tsbuildinfo +1 -1
  42. package/package.json +7 -2
  43. package/translations/fr-FR.json +2 -1
@@ -124,7 +124,12 @@ function getTypographyTypeConfig(type, theme) {
124
124
  const StyledTypography = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Text).withConfig({
125
125
  displayName: "Typography__StyledTypography",
126
126
  componentId: "kitt-universal__sc-1dz700q-0"
127
- })(["", " ", ""], ({
127
+ })(["", ";", " ", ""], ({
128
+ $textAlign
129
+ }) => {
130
+ if (!$textAlign) return undefined;
131
+ return styled.css(["text-align:", ";"], $textAlign);
132
+ }, ({
128
133
  theme,
129
134
  $isHeader,
130
135
  $typeForCurrentWindowSize,
@@ -135,18 +140,7 @@ const StyledTypography = /*#__PURE__*/styled__default(BabelPluginStyledComponent
135
140
  bodies
136
141
  } = theme.kitt.typography.types;
137
142
  const typeConfigKey = getTypographyTypeConfigKey(theme);
138
- return `
139
- /* type */
140
- ${!$typeForCurrentWindowSize ? '' : `
141
- font-family: ${$isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant]};
142
- font-size: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize}px;
143
- line-height: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight}px;
144
- `}
145
-
146
- /* variant */
147
- font-weight: ${$isHeader ? headers.fontWeight : bodies.fontWeight[$variant]};
148
- font-style: ${$isHeader ? headers.fontStyle : bodies.fontStyle[$variant]};
149
- `;
143
+ return styled.css(["", " font-weight:", ";font-style:", ";"], !$typeForCurrentWindowSize ? '' : styled.css(["font-family:", ";font-size:", "px;line-height:", "px;"], $isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant], $isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize, $isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight), $isHeader ? headers.fontWeight : bodies.fontWeight[$variant], $isHeader ? headers.fontStyle : bodies.fontStyle[$variant]);
150
144
  }, ({
151
145
  theme,
152
146
  $color
@@ -185,6 +179,7 @@ function Typography({
185
179
  large,
186
180
  variant,
187
181
  color,
182
+ textAlign,
188
183
  ...otherProps
189
184
  }) {
190
185
  const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
@@ -199,22 +194,21 @@ function Typography({
199
194
  const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
200
195
  const isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
201
196
  const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular');
202
- const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
203
- value: isHeader,
204
- children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
205
- $color: colorOrDefaultToBlack,
206
- $isHeader: isHeader,
207
- $typeForCurrentWindowSize: typeForCurrentWindowSize,
208
- $variant: nonNullableVariant,
209
- accessibilityRole: accessibilityRole || undefined,
210
- ...otherProps
211
- })
212
- }) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
197
+ const sharedProps = {
213
198
  $color: colorOrDefaultToBlack,
214
199
  $isHeader: isHeader,
215
200
  $variant: nonNullableVariant,
216
201
  accessibilityRole: accessibilityRole || undefined,
202
+ $textAlign: textAlign,
217
203
  ...otherProps
204
+ };
205
+ const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
206
+ value: isHeader,
207
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, { ...sharedProps,
208
+ $typeForCurrentWindowSize: typeForCurrentWindowSize,
209
+ ...otherProps
210
+ })
211
+ }) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, { ...sharedProps
218
212
  });
219
213
  return color ? /*#__PURE__*/jsxRuntime.jsx(TypographyColorContext.Provider, {
220
214
  value: color,
@@ -1358,6 +1352,30 @@ const pageLoader = {
1358
1352
  }
1359
1353
  };
1360
1354
 
1355
+ const picker = {
1356
+ ios: {
1357
+ default: {
1358
+ fontFamily: typography.types.bodies.fontFamily.regular,
1359
+ ...typography.types.bodies.configs.body.baseAndSmall,
1360
+ fontSize: 16,
1361
+ color: typography.colors['black-light']
1362
+ },
1363
+ selected: {
1364
+ color: typography.colors.primary
1365
+ }
1366
+ },
1367
+ android: {
1368
+ padding: '12px 24px',
1369
+ default: {
1370
+ backgroundColor: colors.transparent
1371
+ },
1372
+ selected: {
1373
+ backgroundColor: colors.primary,
1374
+ color: typography.colors.white
1375
+ }
1376
+ }
1377
+ };
1378
+
1361
1379
  const shadows = {
1362
1380
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
1363
1381
  };
@@ -1457,6 +1475,7 @@ const theme = {
1457
1475
  iconButton,
1458
1476
  listItem,
1459
1477
  pageLoader,
1478
+ picker,
1460
1479
  shadows,
1461
1480
  skeleton,
1462
1481
  tag,
@@ -3039,6 +3058,13 @@ function PageLoader() {
3039
3058
  });
3040
3059
  }
3041
3060
 
3061
+ function Picker() {
3062
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
3063
+ base: "body",
3064
+ children: "Picker is not implemented for the web"
3065
+ });
3066
+ }
3067
+
3042
3068
  const StyledSkeleton = withTheme( /*#__PURE__*/react$1.styled("div")({
3043
3069
  name: "StyledSkeleton",
3044
3070
  class: "kitt-u_StyledSkeleton_sc3upcl",
@@ -3867,6 +3893,7 @@ exports.Modal = Modal;
3867
3893
  exports.Notification = Notification;
3868
3894
  exports.Overlay = Overlay;
3869
3895
  exports.PageLoader = PageLoader;
3896
+ exports.Picker = Picker;
3870
3897
  exports.Radio = Radio;
3871
3898
  exports.Section = DeprecatedSection;
3872
3899
  exports.Skeleton = Skeleton;