@synerise/ds-core 1.11.0 → 1.11.1

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 (125) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/i18n/{en.json → en.json.d.ts} +4 -2
  3. package/dist/i18n/en.json.js +8 -0
  4. package/dist/i18n/{es.json → es.json.d.ts} +4 -2
  5. package/dist/i18n/es.json.js +8 -0
  6. package/dist/i18n/index.js +14 -11
  7. package/dist/i18n/{pl.json → pl.json.d.ts} +4 -2
  8. package/dist/i18n/pl.json.js +8 -0
  9. package/dist/i18n/{pt.json → pt.json.d.ts} +4 -2
  10. package/dist/i18n/pt.json.js +8 -0
  11. package/dist/js/DSProvider/DSProvider.d.ts +5 -6
  12. package/dist/js/DSProvider/DSProvider.js +36 -31
  13. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.d.ts +2 -2
  14. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.js +29 -38
  15. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.d.ts +3 -3
  16. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.js +1 -1
  17. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.d.ts +1 -1
  18. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.js +22 -19
  19. package/dist/js/DSProvider/LocaleProvider/antLocales.d.ts +6 -6
  20. package/dist/js/DSProvider/LocaleProvider/antLocales.js +16 -13
  21. package/dist/js/DSProvider/LocaleProvider/index.js +4 -1
  22. package/dist/js/DSProvider/ThemeProvider/ThemeProvider.d.ts +2 -2
  23. package/dist/js/DSProvider/ThemeProvider/ThemeProvider.js +14 -12
  24. package/dist/js/DSProvider/ThemeProvider/breakpoints.js +5 -2
  25. package/dist/js/DSProvider/ThemeProvider/index.js +4 -1
  26. package/dist/js/DSProvider/ThemeProvider/theme.d.ts +1 -1
  27. package/dist/js/DSProvider/ThemeProvider/theme.js +17 -17
  28. package/dist/js/DSProvider/ThemeProvider/variables.d.ts +8 -0
  29. package/dist/js/DSProvider/ThemeProvider/variables.js +531 -530
  30. package/dist/js/DSProvider/index.js +4 -1
  31. package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.d.ts +2 -2
  32. package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.js +11 -11
  33. package/dist/js/DropdownContext/DropdownContext.d.ts +1 -1
  34. package/dist/js/DropdownContext/DropdownContext.js +5 -2
  35. package/dist/js/DropdownContext/DropdownContextProvider.d.ts +2 -2
  36. package/dist/js/DropdownContext/DropdownContextProvider.js +11 -11
  37. package/dist/js/DropdownContext/index.js +8 -3
  38. package/dist/js/DropdownContext/useDropdown.d.ts +1 -1
  39. package/dist/js/DropdownContext/useDropdown.js +7 -4
  40. package/dist/js/data-format/components/FormattedDate.d.ts +4 -4
  41. package/dist/js/data-format/components/FormattedDate.js +23 -9
  42. package/dist/js/data-format/components/FormattedDateTime.d.ts +4 -4
  43. package/dist/js/data-format/components/FormattedDateTime.js +26 -12
  44. package/dist/js/data-format/components/FormattedNumber.d.ts +2 -2
  45. package/dist/js/data-format/components/FormattedNumber.js +23 -9
  46. package/dist/js/data-format/components/FormattedRelativeDateTime.d.ts +3 -3
  47. package/dist/js/data-format/components/FormattedRelativeDateTime.js +40 -21
  48. package/dist/js/data-format/components/FormattedTime.d.ts +4 -4
  49. package/dist/js/data-format/components/FormattedTime.js +26 -12
  50. package/dist/js/data-format/components/index.js +13 -5
  51. package/dist/js/data-format/constants/dataFormat.constants.d.ts +2 -2
  52. package/dist/js/data-format/constants/dataFormat.constants.js +85 -49
  53. package/dist/js/data-format/constants/dataFormatConfig.constants.d.ts +2 -2
  54. package/dist/js/data-format/constants/dataFormatConfig.constants.js +15 -8
  55. package/dist/js/data-format/constants/dateTimeParts.constants.d.ts +1 -1
  56. package/dist/js/data-format/constants/dateTimeParts.constants.js +10 -4
  57. package/dist/js/data-format/constants/index.js +48 -3
  58. package/dist/js/data-format/contexts/DataFormatConfigContext.d.ts +2 -2
  59. package/dist/js/data-format/contexts/DataFormatConfigContext.js +6 -3
  60. package/dist/js/data-format/contexts/DataFormatIntlsContext.d.ts +2 -2
  61. package/dist/js/data-format/contexts/DataFormatIntlsContext.js +7 -4
  62. package/dist/js/data-format/contexts/index.js +6 -2
  63. package/dist/js/data-format/hocs/withDataFormat.d.ts +2 -2
  64. package/dist/js/data-format/hocs/withDataFormat.js +23 -9
  65. package/dist/js/data-format/hooks/index.js +14 -6
  66. package/dist/js/data-format/hooks/useDataFormat.d.ts +1 -1
  67. package/dist/js/data-format/hooks/useDataFormat.js +93 -90
  68. package/dist/js/data-format/hooks/useDataFormatConfig.d.ts +1 -1
  69. package/dist/js/data-format/hooks/useDataFormatConfig.js +8 -4
  70. package/dist/js/data-format/hooks/useDataFormatIntls.d.ts +1 -1
  71. package/dist/js/data-format/hooks/useDataFormatIntls.js +8 -4
  72. package/dist/js/data-format/hooks/useDataFormatUtils.d.ts +4 -4
  73. package/dist/js/data-format/hooks/useDataFormatUtils.js +62 -63
  74. package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.d.ts +2 -2
  75. package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.js +19 -23
  76. package/dist/js/data-format/hooks/useSingleIntl.d.ts +1 -1
  77. package/dist/js/data-format/hooks/useSingleIntl.js +11 -8
  78. package/dist/js/data-format/index.js +83 -7
  79. package/dist/js/data-format/providers/DataFormatConfigProvider.d.ts +2 -2
  80. package/dist/js/data-format/providers/DataFormatConfigProvider.js +37 -26
  81. package/dist/js/data-format/types/dataFormat.types.d.ts +3 -3
  82. package/dist/js/data-format/types/dataFormat.types.js +1 -5
  83. package/dist/js/data-format/types/dataFormatConfig.types.d.ts +1 -1
  84. package/dist/js/data-format/types/dataFormatConfig.types.js +1 -2
  85. package/dist/js/data-format/types/dateTimeParts.types.js +1 -2
  86. package/dist/js/data-format/types/index.js +1 -1
  87. package/dist/js/data-format/utils/dataFormat.utils.d.ts +2 -2
  88. package/dist/js/data-format/utils/dataFormat.utils.js +82 -67
  89. package/dist/js/data-format/utils/dataFormatConfig.utils.d.ts +1 -1
  90. package/dist/js/data-format/utils/dataFormatConfig.utils.js +9 -8
  91. package/dist/js/data-format/utils/date.utils.d.ts +2 -2
  92. package/dist/js/data-format/utils/date.utils.js +25 -21
  93. package/dist/js/data-format/utils/dateTimeParts.utils.d.ts +2 -2
  94. package/dist/js/data-format/utils/dateTimeParts.utils.js +68 -52
  95. package/dist/js/data-format/utils/index.js +41 -5
  96. package/dist/js/data-format/utils/timeZone.utils.d.ts +1 -1
  97. package/dist/js/data-format/utils/timeZone.utils.js +59 -51
  98. package/dist/js/index.js +112 -7
  99. package/dist/js/mediaQuery/mediaQuery.d.ts +2 -2
  100. package/dist/js/mediaQuery/mediaQuery.js +15 -25
  101. package/dist/js/style.d.ts +0 -2
  102. package/dist/js/style.js +1 -2
  103. package/dist/js/testing/index.js +6 -2
  104. package/dist/js/testing/renderWithProvider/renderWithProvider.d.ts +4 -4
  105. package/dist/js/testing/renderWithProvider/renderWithProvider.js +35 -27
  106. package/dist/js/testing/sleep.js +6 -8
  107. package/dist/js/toaster/Toaster.d.ts +1 -1
  108. package/dist/js/toaster/Toaster.js +12 -8
  109. package/dist/js/toaster/Toaster.types.js +1 -1
  110. package/dist/js/toaster/constants.d.ts +1 -1
  111. package/dist/js/toaster/constants.js +7 -4
  112. package/dist/js/toaster/contexts/ToasterContext.d.ts +2 -2
  113. package/dist/js/toaster/contexts/ToasterContext.js +9 -5
  114. package/dist/js/toaster/hooks/useToaster.d.ts +1 -1
  115. package/dist/js/toaster/hooks/useToaster.js +7 -4
  116. package/dist/js/toaster/index.js +12 -5
  117. package/dist/js/toaster/providers/ToasterProvider.d.ts +2 -2
  118. package/dist/js/toaster/providers/ToasterProvider.js +17 -17
  119. package/package.json +4 -4
  120. package/dist/js/testing/renderWithProvider/renderWithProvider.spec.d.ts +0 -1
  121. package/dist/style/colors.less +0 -137
  122. package/dist/style/config.less +0 -521
  123. package/dist/style/core.less +0 -55
  124. package/dist/style/variables.less +0 -2
  125. /package/dist/{style/variables.css → assets/style/core-tn0RQdqM.css} +0 -0
@@ -1,5 +1,5 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type ThemePropsVars } from './theme';
1
+ import { default as React, ReactNode } from 'react';
2
+ import { ThemePropsVars } from './theme';
3
3
  export type ThemeProviderProps = {
4
4
  theme?: ThemePropsVars;
5
5
  children?: ReactNode;
@@ -1,13 +1,15 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { ThemeProvider as ThemeProviderBase } from 'styled-components';
4
- import dsTheme from './theme';
5
- var ThemeProvider = function ThemeProvider(_ref) {
6
- var _ref$theme = _ref.theme,
7
- theme = _ref$theme === void 0 ? dsTheme : _ref$theme,
8
- children = _ref.children;
9
- return /*#__PURE__*/React.createElement(ThemeProviderBase, {
10
- theme: _extends({}, dsTheme, theme)
11
- }, /*#__PURE__*/React.createElement(React.Fragment, null, children));
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { ThemeProvider as ThemeProvider$1 } from "styled-components";
3
+ import theme from "./theme.js";
4
+ const ThemeProvider = ({
5
+ theme: theme$1 = theme,
6
+ children
7
+ }) => {
8
+ return /* @__PURE__ */ jsx(ThemeProvider$1, { theme: {
9
+ ...theme,
10
+ ...theme$1
11
+ }, children: /* @__PURE__ */ jsx(Fragment, { children }) });
12
+ };
13
+ export {
14
+ ThemeProvider as default
12
15
  };
13
- export default ThemeProvider;
@@ -1,4 +1,4 @@
1
- export var breakpoints = {
1
+ const breakpoints = {
2
2
  xsmall: {
3
3
  min: 0,
4
4
  max: 320
@@ -24,4 +24,7 @@ export var breakpoints = {
24
24
  max: 0
25
25
  }
26
26
  };
27
- export default breakpoints;
27
+ export {
28
+ breakpoints,
29
+ breakpoints as default
30
+ };
@@ -1 +1,4 @@
1
- export { default } from './ThemeProvider';
1
+ import { default as default2 } from "./ThemeProvider.js";
2
+ export {
3
+ default2 as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { type ThemeProps as SCThemeProps } from 'styled-components';
1
+ import { ThemeProps as SCThemeProps } from 'styled-components';
2
2
  export type ThemePropsVars = {
3
3
  variables: {
4
4
  [key: string]: string;
@@ -1,25 +1,25 @@
1
- import { useTheme as originalUseTheme } from 'styled-components';
2
- import { breakpoints } from './breakpoints';
3
- import vars from './variables';
4
- export var useTheme = originalUseTheme;
5
- var getBreakpoints = function getBreakpoints() {
6
- return [breakpoints.small.max, breakpoints.medium.max, breakpoints.large.max].map(function (item) {
7
- return item + "px";
8
- });
9
- };
10
- export var defaultColorsOrder = ['blue-600', 'green-600', 'yellow-600', 'purple-600', 'cyan-600', 'orange-600', 'violet-600', 'blue-700', 'green-700', 'yellow-700', 'purple-700', 'cyan-700', 'orange-700', 'violet-700', 'blue-500', 'green-500', 'yellow-500', 'purple-500', 'cyan-500', 'orange-500', 'violet-500'];
11
- var colorsOrder = defaultColorsOrder.map(function (color) {
12
- return vars.colors[color];
13
- });
14
- export var theme = {
1
+ import { useTheme as useTheme$1 } from "styled-components";
2
+ import { breakpoints } from "./breakpoints.js";
3
+ import vars from "./variables.js";
4
+ const useTheme = useTheme$1;
5
+ const getBreakpoints = () => [breakpoints.small.max, breakpoints.medium.max, breakpoints.large.max].map((item) => `${item}px`);
6
+ const defaultColorsOrder = ["blue-600", "green-600", "yellow-600", "purple-600", "cyan-600", "orange-600", "violet-600", "blue-700", "green-700", "yellow-700", "purple-700", "cyan-700", "orange-700", "violet-700", "blue-500", "green-500", "yellow-500", "purple-500", "cyan-500", "orange-500", "violet-500"];
7
+ const colorsOrder = defaultColorsOrder.map((color) => vars.colors[color]);
8
+ const theme = {
15
9
  variables: vars.variables,
16
10
  palette: vars.colors,
17
11
  breakpoints: getBreakpoints(),
18
12
  space: [0, 8, 12, 16, 24, 32, 48, 64],
19
- colorsOrder: colorsOrder,
13
+ colorsOrder,
20
14
  variable: function variable(name) {
21
15
  return name ? this.variables[name.slice(1)] : null;
22
16
  }
23
17
  };
24
- export var themeVariables = vars.variables;
25
- export default theme;
18
+ const themeVariables = vars.variables;
19
+ export {
20
+ theme as default,
21
+ defaultColorsOrder,
22
+ theme,
23
+ themeVariables,
24
+ useTheme
25
+ };
@@ -1,3 +1,11 @@
1
+ /**
2
+ * AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
3
+ *
4
+ * Generated by: packages/components/core/build/vars.js
5
+ * Source: src/style/colors.less + src/style/config.less
6
+ *
7
+ * To regenerate, run: cd packages/components/core && node build/vars.js
8
+ */
1
9
  declare const _default: {
2
10
  variables: Record<string, string>;
3
11
  colors: Record<string, string>;