@ornikar/kitt-universal 7.3.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 +169 -36
  18. package/dist/index-browser-all.es.android.js.map +1 -1
  19. package/dist/index-browser-all.es.ios.js +169 -36
  20. package/dist/index-browser-all.es.ios.js.map +1 -1
  21. package/dist/index-browser-all.es.js +169 -36
  22. package/dist/index-browser-all.es.js.map +1 -1
  23. package/dist/index-browser-all.es.web.js +73 -35
  24. package/dist/index-browser-all.es.web.js.map +1 -1
  25. package/dist/index-node-14.17.cjs.js +181 -67
  26. package/dist/index-node-14.17.cjs.js.map +1 -1
  27. package/dist/index-node-14.17.cjs.web.js +52 -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 +8 -3
  43. package/translations/fr-FR.json +2 -1
@@ -99,7 +99,7 @@ var KittBreakpointsMax = {
99
99
  LARGE: KittBreakpoints.WIDE - 1
100
100
  };
101
101
 
102
- var _excluded$g = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
102
+ var _excluded$g = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color", "textAlign"];
103
103
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
104
104
  var TypographyColorContext = /*#__PURE__*/createContext('black');
105
105
  function useTypographyColor() {
@@ -131,19 +131,23 @@ function getTypographyTypeConfig(type, theme) {
131
131
  var StyledTypography = /*#__PURE__*/styled(Text$1).withConfig({
132
132
  displayName: "Typography__StyledTypography",
133
133
  componentId: "kitt-universal__sc-1dz700q-0"
134
- })(["", " ", ""], function (_ref) {
135
- var theme = _ref.theme,
136
- $isHeader = _ref.$isHeader,
137
- $typeForCurrentWindowSize = _ref.$typeForCurrentWindowSize,
138
- $variant = _ref.$variant;
134
+ })(["", ";", " ", ""], function (_ref) {
135
+ var $textAlign = _ref.$textAlign;
136
+ if (!$textAlign) return undefined;
137
+ return css(["text-align:", ";"], $textAlign);
138
+ }, function (_ref2) {
139
+ var theme = _ref2.theme,
140
+ $isHeader = _ref2.$isHeader,
141
+ $typeForCurrentWindowSize = _ref2.$typeForCurrentWindowSize,
142
+ $variant = _ref2.$variant;
139
143
  var _theme$kitt$typograph = theme.kitt.typography.types,
140
144
  headers = _theme$kitt$typograph.headers,
141
145
  bodies = _theme$kitt$typograph.bodies;
142
146
  var typeConfigKey = getTypographyTypeConfigKey(theme);
143
- return "\n /* type */\n ".concat(!$typeForCurrentWindowSize ? '' : "\n font-family: ".concat($isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant], ";\n font-size: ").concat($isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize, "px;\n line-height: ").concat($isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight, "px;\n "), "\n\n /* variant */\n font-weight: ").concat($isHeader ? headers.fontWeight : bodies.fontWeight[$variant], ";\n font-style: ").concat($isHeader ? headers.fontStyle : bodies.fontStyle[$variant], ";\n ");
144
- }, function (_ref2) {
145
- var theme = _ref2.theme,
146
- $color = _ref2.$color;
147
+ return css(["", " font-weight:", ";font-style:", ";"], !$typeForCurrentWindowSize ? '' : 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]);
148
+ }, function (_ref3) {
149
+ var theme = _ref3.theme,
150
+ $color = _ref3.$color;
147
151
  if (!$color) return '';
148
152
  return css(["color:", ";text-decoration-color:", ";"], theme.kitt.typography.colors[$color], theme.kitt.typography.colors[$color]);
149
153
  });
@@ -156,9 +160,9 @@ function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
156
160
  if (small && width >= KittBreakpoints.SMALL) return small;
157
161
  return base;
158
162
  }
159
- function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, _ref3) {
160
- var base = _ref3.base,
161
- color = _ref3.color;
163
+ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypographyAncestor, _ref4) {
164
+ var base = _ref4.base,
165
+ color = _ref4.color;
162
166
  // return the props set or undefined. In case of undefined, the value will be inherited from its parents.
163
167
  if (hasTypographyAncestor) return {
164
168
  base: base,
@@ -169,15 +173,16 @@ function getTypographyInheritedOrDefaultValuesBasedOnExistingAncestors(hasTypogr
169
173
  color: color !== null && color !== void 0 ? color : 'black'
170
174
  };
171
175
  }
172
- function Typography(_ref4) {
173
- var accessibilityRole = _ref4.accessibilityRole,
174
- base = _ref4.base,
175
- small = _ref4.small,
176
- medium = _ref4.medium,
177
- large = _ref4.large,
178
- variant = _ref4.variant,
179
- color = _ref4.color,
180
- otherProps = _objectWithoutProperties(_ref4, _excluded$g);
176
+ function Typography(_ref5) {
177
+ var accessibilityRole = _ref5.accessibilityRole,
178
+ base = _ref5.base,
179
+ small = _ref5.small,
180
+ medium = _ref5.medium,
181
+ large = _ref5.large,
182
+ variant = _ref5.variant,
183
+ color = _ref5.color,
184
+ textAlign = _ref5.textAlign,
185
+ otherProps = _objectWithoutProperties(_ref5, _excluded$g);
181
186
 
182
187
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
183
188
  var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
@@ -192,21 +197,21 @@ function Typography(_ref4) {
192
197
  var typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
193
198
  var isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
194
199
  var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
195
- var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
196
- value: isHeader,
197
- children: /*#__PURE__*/jsx(StyledTypography, _objectSpread({
198
- $color: colorOrDefaultToBlack,
199
- $isHeader: isHeader,
200
- $typeForCurrentWindowSize: typeForCurrentWindowSize,
201
- $variant: nonNullableVariant,
202
- accessibilityRole: accessibilityRole || undefined
203
- }, otherProps))
204
- }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread({
200
+
201
+ var sharedProps = _objectSpread({
205
202
  $color: colorOrDefaultToBlack,
206
203
  $isHeader: isHeader,
207
204
  $variant: nonNullableVariant,
208
- accessibilityRole: accessibilityRole || undefined
209
- }, otherProps));
205
+ accessibilityRole: accessibilityRole || undefined,
206
+ $textAlign: textAlign
207
+ }, otherProps);
208
+
209
+ var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
210
+ value: isHeader,
211
+ children: /*#__PURE__*/jsx(StyledTypography, _objectSpread(_objectSpread({}, sharedProps), {}, {
212
+ $typeForCurrentWindowSize: typeForCurrentWindowSize
213
+ }, otherProps))
214
+ }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread({}, sharedProps));
210
215
  return color ? /*#__PURE__*/jsx(TypographyColorContext.Provider, {
211
216
  value: color,
212
217
  children: content
@@ -1377,6 +1382,30 @@ var pageLoader = {
1377
1382
  }
1378
1383
  };
1379
1384
 
1385
+ var picker = {
1386
+ ios: {
1387
+ "default": _objectSpread(_objectSpread({
1388
+ fontFamily: typography.types.bodies.fontFamily.regular
1389
+ }, typography.types.bodies.configs.body.baseAndSmall), {}, {
1390
+ fontSize: 16,
1391
+ color: typography.colors['black-light']
1392
+ }),
1393
+ selected: {
1394
+ color: typography.colors.primary
1395
+ }
1396
+ },
1397
+ android: {
1398
+ padding: '12px 24px',
1399
+ "default": {
1400
+ backgroundColor: colors.transparent
1401
+ },
1402
+ selected: {
1403
+ backgroundColor: colors.primary,
1404
+ color: typography.colors.white
1405
+ }
1406
+ }
1407
+ };
1408
+
1380
1409
  var shadows = {
1381
1410
  medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
1382
1411
  };
@@ -1476,6 +1505,7 @@ var theme = {
1476
1505
  iconButton: iconButton,
1477
1506
  listItem: listItem,
1478
1507
  pageLoader: pageLoader,
1508
+ picker: picker,
1479
1509
  shadows: shadows,
1480
1510
  skeleton: skeleton,
1481
1511
  tag: tag,
@@ -2046,6 +2076,7 @@ function InputPassword(_ref) {
2046
2076
  autoCorrect: false,
2047
2077
  secureTextEntry: !isVisible,
2048
2078
  right: right || /*#__PURE__*/jsx(InputPressable, {
2079
+ hitSlop: 20,
2049
2080
  accessibilityRole: "button",
2050
2081
  onPress: function onPress() {
2051
2082
  return setIsVisible(function (prev) {
@@ -3142,6 +3173,13 @@ function PageLoader() {
3142
3173
  });
3143
3174
  }
3144
3175
 
3176
+ function Picker() {
3177
+ return /*#__PURE__*/jsx(Typography.Text, {
3178
+ base: "body",
3179
+ children: "Picker is not implemented for the web"
3180
+ });
3181
+ }
3182
+
3145
3183
  var StyledSkeleton = withTheme( /*#__PURE__*/styled$1("div")({
3146
3184
  name: "StyledSkeleton",
3147
3185
  "class": "kitt-u_StyledSkeleton_sc3upcl",
@@ -3973,5 +4011,5 @@ function MatchWindowSize(_ref) {
3973
4011
  return children;
3974
4012
  }
3975
4013
 
3976
- export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
4014
+ export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MatchWindowSize, Message, Modal, Notification, Overlay, PageLoader, Picker, Radio, DeprecatedSection as Section, Skeleton, SpinningIcon, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
3977
4015
  //# sourceMappingURL=index-browser-all.es.web.js.map