@synerise/ds-core 1.10.2 → 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.
- package/CHANGELOG.md +10 -0
- package/README.md +2 -1
- package/dist/i18n/{en.json → en.json.d.ts} +6 -3
- package/dist/i18n/en.json.js +8 -0
- package/dist/i18n/{es.json → es.json.d.ts} +6 -3
- package/dist/i18n/es.json.js +8 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.js +14 -11
- package/dist/i18n/{pl.json → pl.json.d.ts} +6 -3
- package/dist/i18n/pl.json.js +8 -0
- package/dist/i18n/{pt.json → pt.json.d.ts} +6 -3
- package/dist/i18n/pt.json.js +8 -0
- package/dist/js/DSProvider/DSProvider.d.ts +5 -6
- package/dist/js/DSProvider/DSProvider.js +36 -31
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.d.ts +2 -2
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.js +29 -38
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.d.ts +3 -3
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.js +1 -1
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.d.ts +3 -1
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.js +22 -19
- package/dist/js/DSProvider/LocaleProvider/antLocales.d.ts +6 -6
- package/dist/js/DSProvider/LocaleProvider/antLocales.js +16 -13
- package/dist/js/DSProvider/LocaleProvider/index.js +4 -1
- package/dist/js/DSProvider/ThemeProvider/ThemeProvider.d.ts +2 -2
- package/dist/js/DSProvider/ThemeProvider/ThemeProvider.js +14 -12
- package/dist/js/DSProvider/ThemeProvider/breakpoints.js +5 -2
- package/dist/js/DSProvider/ThemeProvider/index.js +4 -1
- package/dist/js/DSProvider/ThemeProvider/theme.d.ts +1 -1
- package/dist/js/DSProvider/ThemeProvider/theme.js +17 -17
- package/dist/js/DSProvider/ThemeProvider/variables.d.ts +8 -0
- package/dist/js/DSProvider/ThemeProvider/variables.js +531 -530
- package/dist/js/DSProvider/index.js +4 -1
- package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.d.ts +2 -2
- package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.js +11 -11
- package/dist/js/DropdownContext/DropdownContext.d.ts +1 -1
- package/dist/js/DropdownContext/DropdownContext.js +5 -2
- package/dist/js/DropdownContext/DropdownContextProvider.d.ts +2 -2
- package/dist/js/DropdownContext/DropdownContextProvider.js +11 -11
- package/dist/js/DropdownContext/index.js +8 -3
- package/dist/js/DropdownContext/useDropdown.d.ts +1 -1
- package/dist/js/DropdownContext/useDropdown.js +7 -4
- package/dist/js/data-format/components/FormattedDate.d.ts +4 -4
- package/dist/js/data-format/components/FormattedDate.js +23 -9
- package/dist/js/data-format/components/FormattedDateTime.d.ts +4 -4
- package/dist/js/data-format/components/FormattedDateTime.js +26 -12
- package/dist/js/data-format/components/FormattedNumber.d.ts +2 -2
- package/dist/js/data-format/components/FormattedNumber.js +23 -9
- package/dist/js/data-format/components/FormattedRelativeDateTime.d.ts +3 -3
- package/dist/js/data-format/components/FormattedRelativeDateTime.js +40 -21
- package/dist/js/data-format/components/FormattedTime.d.ts +4 -4
- package/dist/js/data-format/components/FormattedTime.js +26 -12
- package/dist/js/data-format/components/index.js +13 -5
- package/dist/js/data-format/constants/dataFormat.constants.d.ts +2 -2
- package/dist/js/data-format/constants/dataFormat.constants.js +85 -49
- package/dist/js/data-format/constants/dataFormatConfig.constants.d.ts +2 -2
- package/dist/js/data-format/constants/dataFormatConfig.constants.js +15 -8
- package/dist/js/data-format/constants/dateTimeParts.constants.d.ts +1 -1
- package/dist/js/data-format/constants/dateTimeParts.constants.js +10 -4
- package/dist/js/data-format/constants/index.js +48 -3
- package/dist/js/data-format/contexts/DataFormatConfigContext.d.ts +2 -2
- package/dist/js/data-format/contexts/DataFormatConfigContext.js +6 -3
- package/dist/js/data-format/contexts/DataFormatIntlsContext.d.ts +2 -2
- package/dist/js/data-format/contexts/DataFormatIntlsContext.js +7 -4
- package/dist/js/data-format/contexts/index.js +6 -2
- package/dist/js/data-format/hocs/withDataFormat.d.ts +2 -2
- package/dist/js/data-format/hocs/withDataFormat.js +23 -9
- package/dist/js/data-format/hooks/index.js +14 -6
- package/dist/js/data-format/hooks/useDataFormat.d.ts +1 -1
- package/dist/js/data-format/hooks/useDataFormat.js +93 -90
- package/dist/js/data-format/hooks/useDataFormatConfig.d.ts +1 -1
- package/dist/js/data-format/hooks/useDataFormatConfig.js +8 -4
- package/dist/js/data-format/hooks/useDataFormatIntls.d.ts +1 -1
- package/dist/js/data-format/hooks/useDataFormatIntls.js +8 -4
- package/dist/js/data-format/hooks/useDataFormatUtils.d.ts +4 -4
- package/dist/js/data-format/hooks/useDataFormatUtils.js +62 -63
- package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.d.ts +2 -2
- package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.js +19 -23
- package/dist/js/data-format/hooks/useSingleIntl.d.ts +1 -1
- package/dist/js/data-format/hooks/useSingleIntl.js +11 -8
- package/dist/js/data-format/index.js +83 -7
- package/dist/js/data-format/providers/DataFormatConfigProvider.d.ts +2 -2
- package/dist/js/data-format/providers/DataFormatConfigProvider.js +37 -26
- package/dist/js/data-format/types/dataFormat.types.d.ts +3 -3
- package/dist/js/data-format/types/dataFormat.types.js +1 -5
- package/dist/js/data-format/types/dataFormatConfig.types.d.ts +1 -1
- package/dist/js/data-format/types/dataFormatConfig.types.js +1 -2
- package/dist/js/data-format/types/dateTimeParts.types.js +1 -2
- package/dist/js/data-format/types/index.js +1 -1
- package/dist/js/data-format/utils/dataFormat.utils.d.ts +2 -2
- package/dist/js/data-format/utils/dataFormat.utils.js +82 -67
- package/dist/js/data-format/utils/dataFormatConfig.utils.d.ts +1 -1
- package/dist/js/data-format/utils/dataFormatConfig.utils.js +9 -8
- package/dist/js/data-format/utils/date.utils.d.ts +2 -2
- package/dist/js/data-format/utils/date.utils.js +25 -21
- package/dist/js/data-format/utils/dateTimeParts.utils.d.ts +2 -2
- package/dist/js/data-format/utils/dateTimeParts.utils.js +68 -52
- package/dist/js/data-format/utils/index.js +41 -5
- package/dist/js/data-format/utils/timeZone.utils.d.ts +1 -1
- package/dist/js/data-format/utils/timeZone.utils.js +59 -51
- package/dist/js/index.js +112 -7
- package/dist/js/mediaQuery/mediaQuery.d.ts +2 -2
- package/dist/js/mediaQuery/mediaQuery.js +15 -25
- package/dist/js/style.d.ts +0 -2
- package/dist/js/style.js +1 -2
- package/dist/js/testing/index.js +6 -2
- package/dist/js/testing/renderWithProvider/renderWithProvider.d.ts +4 -4
- package/dist/js/testing/renderWithProvider/renderWithProvider.js +35 -27
- package/dist/js/testing/sleep.js +6 -8
- package/dist/js/toaster/Toaster.d.ts +1 -1
- package/dist/js/toaster/Toaster.js +12 -8
- package/dist/js/toaster/Toaster.types.js +1 -1
- package/dist/js/toaster/constants.d.ts +1 -1
- package/dist/js/toaster/constants.js +7 -4
- package/dist/js/toaster/contexts/ToasterContext.d.ts +2 -2
- package/dist/js/toaster/contexts/ToasterContext.js +9 -5
- package/dist/js/toaster/hooks/useToaster.d.ts +1 -1
- package/dist/js/toaster/hooks/useToaster.js +7 -4
- package/dist/js/toaster/index.js +12 -5
- package/dist/js/toaster/providers/ToasterProvider.d.ts +2 -2
- package/dist/js/toaster/providers/ToasterProvider.js +17 -17
- package/package.json +4 -4
- package/dist/js/testing/renderWithProvider/renderWithProvider.spec.d.ts +0 -1
- package/dist/style/colors.less +0 -137
- package/dist/style/config.less +0 -521
- package/dist/style/core.less +0 -55
- package/dist/style/variables.less +0 -2
- /package/dist/{style/variables.css → assets/style/core-tn0RQdqM.css} +0 -0
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import dsMessages from
|
|
2
|
-
import antMessages from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export var getAntMessages = function getAntMessages(lang) {
|
|
1
|
+
import dsMessages from "../../../i18n/index.js";
|
|
2
|
+
import antMessages from "./antLocales.js";
|
|
3
|
+
const getLangForCode = (code) => code.substring(0, 2);
|
|
4
|
+
const getAntMessages = (lang) => {
|
|
7
5
|
switch (lang) {
|
|
8
|
-
case
|
|
9
|
-
case
|
|
10
|
-
case
|
|
11
|
-
case
|
|
12
|
-
case
|
|
6
|
+
case "pl":
|
|
7
|
+
case "en":
|
|
8
|
+
case "fr":
|
|
9
|
+
case "pt":
|
|
10
|
+
case "es":
|
|
13
11
|
return antMessages[lang];
|
|
14
12
|
default:
|
|
15
|
-
return antMessages
|
|
13
|
+
return antMessages.default;
|
|
16
14
|
}
|
|
17
15
|
};
|
|
18
|
-
|
|
16
|
+
const getDSMessages = (lang) => {
|
|
19
17
|
switch (lang) {
|
|
20
|
-
case
|
|
21
|
-
case
|
|
22
|
-
case
|
|
23
|
-
case
|
|
18
|
+
case "pl":
|
|
19
|
+
case "en":
|
|
20
|
+
case "pt":
|
|
21
|
+
case "es":
|
|
24
22
|
return dsMessages[lang];
|
|
25
23
|
default:
|
|
26
|
-
return dsMessages
|
|
24
|
+
return dsMessages.default;
|
|
27
25
|
}
|
|
28
|
-
};
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
getAntMessages,
|
|
29
|
+
getDSMessages,
|
|
30
|
+
getLangForCode
|
|
31
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
pl: import(
|
|
3
|
-
en: import(
|
|
4
|
-
es: import(
|
|
5
|
-
pt: import(
|
|
6
|
-
fr: import(
|
|
7
|
-
default: import(
|
|
2
|
+
pl: import('antd/lib/locale-provider').Locale;
|
|
3
|
+
en: import('antd/lib/locale-provider').Locale;
|
|
4
|
+
es: import('antd/lib/locale-provider').Locale;
|
|
5
|
+
pt: import('antd/lib/locale-provider').Locale;
|
|
6
|
+
fr: import('antd/lib/locale-provider').Locale;
|
|
7
|
+
default: import('antd/lib/locale-provider').Locale;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import en from
|
|
2
|
-
import es from
|
|
3
|
-
import fr from
|
|
4
|
-
import pl from
|
|
5
|
-
import pt from
|
|
6
|
-
|
|
7
|
-
pl
|
|
8
|
-
en
|
|
9
|
-
es
|
|
10
|
-
pt
|
|
11
|
-
fr
|
|
12
|
-
|
|
13
|
-
};
|
|
1
|
+
import en from "antd/lib/locale/en_US";
|
|
2
|
+
import es from "antd/lib/locale/es_ES";
|
|
3
|
+
import fr from "antd/lib/locale/fr_FR";
|
|
4
|
+
import pl from "antd/lib/locale/pl_PL";
|
|
5
|
+
import pt from "antd/lib/locale/pt_PT";
|
|
6
|
+
const antMessages = {
|
|
7
|
+
pl,
|
|
8
|
+
en,
|
|
9
|
+
es,
|
|
10
|
+
pt,
|
|
11
|
+
fr,
|
|
12
|
+
default: en
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
antMessages as default
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
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
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
theme
|
|
11
|
-
},
|
|
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,25 +1,25 @@
|
|
|
1
|
-
import { useTheme as
|
|
2
|
-
import { breakpoints } from
|
|
3
|
-
import vars from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
13
|
+
colorsOrder,
|
|
20
14
|
variable: function variable(name) {
|
|
21
15
|
return name ? this.variables[name.slice(1)] : null;
|
|
22
16
|
}
|
|
23
17
|
};
|
|
24
|
-
|
|
25
|
-
export
|
|
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>;
|