@synerise/ds-core 1.0.1 → 1.2.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.
- package/CHANGELOG.md +23 -0
- package/README.md +8 -7
- package/dist/i18n/en.json +1 -1
- package/dist/i18n/pl.json +21 -0
- package/dist/js/DSProvider/DSProvider.d.ts +5 -2
- package/dist/js/DSProvider/DSProvider.js +7 -2
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.d.ts +1 -1
- package/dist/js/DSProvider/LocaleProvider/LocaleProvider.js +4 -4
- package/dist/js/DSProvider/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/js/DSProvider/ThemeProvider/variables.js +2 -2
- package/dist/js/index.d.ts +1 -0
- package/dist/style/config.less +2 -2
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.2.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@1.1.0...@synerise/ds-core@1.2.0) (2025-05-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **button:** add ButtonToggle component ([1e86e54](https://github.com/synerise/synerise-design/commit/1e86e54273e2204bcbbbbe302ff0c2e2a326e94f))
|
|
12
|
+
* **toast:** toast component ([0cb20d0](https://github.com/synerise/synerise-design/commit/0cb20d07b48d1c768a0ddf133b1970a4a13444ca))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [1.1.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@1.0.1...@synerise/ds-core@1.1.0) (2025-04-16)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **item-picker:** custom limit per section ([d45ec39](https://github.com/synerise/synerise-design/commit/d45ec3951828811a03ca89bdbb3f39c91a120e22))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
## [1.0.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-core@1.0.0...@synerise/ds-core@1.0.1) (2025-03-18)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @synerise/ds-core
|
package/README.md
CHANGED
|
@@ -18,10 +18,11 @@ Bunch of components to bootstrap application.
|
|
|
18
18
|
|
|
19
19
|
## API
|
|
20
20
|
|
|
21
|
-
| Property | Description
|
|
22
|
-
|
|
23
|
-
| locale | Current lang (ex. en-US)
|
|
24
|
-
| timeZone | Current timezone (ex. Europe/Warsaw)
|
|
25
|
-
| messages | Object with translations
|
|
26
|
-
| defaultMessages | Object with fallback translations
|
|
27
|
-
| dataFormatConfig | Object with data (dates/numbers) notations
|
|
21
|
+
| Property | Description | Type | Default |
|
|
22
|
+
|------------------|--------------------------------------------------------------------------|------------------|-------------|
|
|
23
|
+
| locale | Current lang (ex. en-US) | string | en |
|
|
24
|
+
| timeZone | Current timezone (ex. Europe/Warsaw) | string | |
|
|
25
|
+
| messages | Object with translations | object | |
|
|
26
|
+
| defaultMessages | Object with fallback translations | object | |
|
|
27
|
+
| dataFormatConfig | Object with data (dates/numbers) notations | DataFormatConfig | EU notation |
|
|
28
|
+
| includeToaster | Opt out of rendering a Toaster component for rendering toasts (messages) | boolean | true |
|
package/dist/i18n/en.json
CHANGED
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"CLEAR-SEARCH-TOOLTIP": "Clear",
|
|
124
124
|
"BACK-TOOLTIP": "Back",
|
|
125
125
|
"SEARCH-EVERYWHERE": "Search all folders",
|
|
126
|
-
"SEARCH-PLACEHOLDER": "Search"
|
|
126
|
+
"SEARCH-PLACEHOLDER": "Search for object or type {shortCutKey} to show actions"
|
|
127
127
|
},
|
|
128
128
|
"ITEM-PICKER": {
|
|
129
129
|
"CLEAR-CONFIRM": "Are you sure you want to remove this selection?",
|
package/dist/i18n/pl.json
CHANGED
|
@@ -108,6 +108,27 @@
|
|
|
108
108
|
"DELETE-CONFIRMATION-NO": "Anuluj",
|
|
109
109
|
"SEARCH-PLACEHOLDER": "Szukaj"
|
|
110
110
|
},
|
|
111
|
+
"ITEM-PICKER-DROPDOWN": {
|
|
112
|
+
"NO-ITEMS": "Brak obiektów",
|
|
113
|
+
"NO-SEARCH-RESULTS": "Nie znaleziono wyników",
|
|
114
|
+
"NO-SEARCH-RESULTS-FOLDER": "Sprawdź wyszukiwaną frazę lub wyszukaj we wszystkich folderach",
|
|
115
|
+
"NO-ACTIONS": "Brak akcji",
|
|
116
|
+
"REFRESH": "Odśwież",
|
|
117
|
+
"RECENTS": "Ostatnie",
|
|
118
|
+
"ACTIONS": "Akcje",
|
|
119
|
+
"RESULTS": "Wyniki",
|
|
120
|
+
"ITEMS": "Obiekty",
|
|
121
|
+
"LOADING-MORE": "Pobieram więcej...",
|
|
122
|
+
"LOADING-ERROR": "Błąd pobierania wyników",
|
|
123
|
+
"LOADED-ALL": "Wszystkie wyniki",
|
|
124
|
+
"ERROR-TITLE": "Błąd pobierania wyników",
|
|
125
|
+
"ERROR-DESCRIPTION": "Spróbuj odświeżyć listę wyników",
|
|
126
|
+
"SHOW-MORE": "Pokaż więcej",
|
|
127
|
+
"CLEAR-SEARCH-TOOLTIP": "Wyczyść",
|
|
128
|
+
"BACK-TOOLTIP": "Wstecz",
|
|
129
|
+
"SEARCH-EVERYWHERE": "Przeszukaj wszystkie foldery",
|
|
130
|
+
"SEARCH-PLACEHOLDER": "Wyszukaj obiekt lub wpisz {shortCutKey} aby wylistować akcje"
|
|
131
|
+
},
|
|
111
132
|
"ITEM-PICKER": {
|
|
112
133
|
"CLEAR-CONFIRM": "Czy na pewno chcesz usunąć to zaznaczenie?",
|
|
113
134
|
"YES-TEXT": "Tak",
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { DataFormatConfigProviderProps } from '@synerise/ds-data-format';
|
|
3
|
+
import { ToasterProps } from '@synerise/ds-toaster';
|
|
3
4
|
import '../style';
|
|
4
5
|
import { LocaleProviderProps } from './LocaleProvider/LocaleProvider';
|
|
5
6
|
import { ThemeProviderProps } from './ThemeProvider/ThemeProvider';
|
|
6
|
-
export type DSProviderProps = PropsWithChildren<LocaleProviderProps & ThemeProviderProps & DataFormatConfigProviderProps
|
|
7
|
-
|
|
7
|
+
export type DSProviderProps = PropsWithChildren<LocaleProviderProps & ThemeProviderProps & DataFormatConfigProviderProps & {
|
|
8
|
+
toasterProps?: false | Partial<ToasterProps>;
|
|
9
|
+
}>;
|
|
10
|
+
declare const DSProvider: ({ locale, defaultLocale, messages, timeZone, children, theme, dataFormatConfig, onErrorIntl, onDSLocalesLoaded, toasterProps, }: DSProviderProps) => React.JSX.Element;
|
|
8
11
|
export default DSProvider;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DataFormatConfigProvider } from '@synerise/ds-data-format';
|
|
3
|
+
import Toaster, { ToasterProvider, TOASTER_DEFAULTS } from '@synerise/ds-toaster';
|
|
3
4
|
import '../style';
|
|
4
5
|
import LocaleProvider from './LocaleProvider';
|
|
5
6
|
import ThemeProvider from './ThemeProvider';
|
|
@@ -12,7 +13,9 @@ var DSProvider = function DSProvider(_ref) {
|
|
|
12
13
|
theme = _ref.theme,
|
|
13
14
|
dataFormatConfig = _ref.dataFormatConfig,
|
|
14
15
|
onErrorIntl = _ref.onErrorIntl,
|
|
15
|
-
onDSLocalesLoaded = _ref.onDSLocalesLoaded
|
|
16
|
+
onDSLocalesLoaded = _ref.onDSLocalesLoaded,
|
|
17
|
+
_ref$toasterProps = _ref.toasterProps,
|
|
18
|
+
toasterProps = _ref$toasterProps === void 0 ? false : _ref$toasterProps;
|
|
16
19
|
return /*#__PURE__*/React.createElement(LocaleProvider, {
|
|
17
20
|
locale: locale,
|
|
18
21
|
messages: messages,
|
|
@@ -24,6 +27,8 @@ var DSProvider = function DSProvider(_ref) {
|
|
|
24
27
|
theme: theme
|
|
25
28
|
}, /*#__PURE__*/React.createElement(DataFormatConfigProvider, {
|
|
26
29
|
dataFormatConfig: dataFormatConfig
|
|
27
|
-
},
|
|
30
|
+
}, /*#__PURE__*/React.createElement(ToasterProvider, {
|
|
31
|
+
toasterProps: toasterProps || TOASTER_DEFAULTS
|
|
32
|
+
}, children, toasterProps !== false && /*#__PURE__*/React.createElement(Toaster, null)))));
|
|
28
33
|
};
|
|
29
34
|
export default DSProvider;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
function _inheritsLoose(
|
|
3
|
-
function _setPrototypeOf(
|
|
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
|
+
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
3
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
5
|
import { IntlProvider } from 'react-intl';
|
|
6
6
|
import { flatten } from 'flat';
|
|
@@ -12,7 +12,6 @@ var getLangForCode = function getLangForCode(code) {
|
|
|
12
12
|
return code.substring(0, 2);
|
|
13
13
|
};
|
|
14
14
|
var LocaleProvider = /*#__PURE__*/function (_Component) {
|
|
15
|
-
_inheritsLoose(LocaleProvider, _Component);
|
|
16
15
|
function LocaleProvider() {
|
|
17
16
|
var _this;
|
|
18
17
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -25,6 +24,7 @@ var LocaleProvider = /*#__PURE__*/function (_Component) {
|
|
|
25
24
|
};
|
|
26
25
|
return _this;
|
|
27
26
|
}
|
|
27
|
+
_inheritsLoose(LocaleProvider, _Component);
|
|
28
28
|
var _proto = LocaleProvider.prototype;
|
|
29
29
|
_proto.componentDidMount = function componentDidMount() {
|
|
30
30
|
var _this2 = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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
2
|
import React from 'react';
|
|
3
3
|
import { ThemeProvider as ThemeProviderBase } from 'styled-components';
|
|
4
4
|
import dsTheme from './theme';
|
|
@@ -307,7 +307,7 @@ const variables = {
|
|
|
307
307
|
"btn-primary-focus-bg": "#0044d9",
|
|
308
308
|
"btn-primary-active-bg": "#0044d9",
|
|
309
309
|
"btn-primary-shadow": "rgba(35, 138, 254, 0.2)",
|
|
310
|
-
"btn-default-color": "#
|
|
310
|
+
"btn-default-color": "#6a7580",
|
|
311
311
|
"btn-default-bg": "#f9fafb",
|
|
312
312
|
"btn-default-border": "#dbe0e3",
|
|
313
313
|
"btn-default-focus-bg": "#f9fafb",
|
|
@@ -327,7 +327,7 @@ const variables = {
|
|
|
327
327
|
"btn-tertiary-white-focus-bg": "rgba(219, 224, 227, 0.15)",
|
|
328
328
|
"btn-tertiary-white-active-bg": "rgba(219, 224, 227, 0.1)",
|
|
329
329
|
"btn-tertiary-white-border": "transparent",
|
|
330
|
-
"btn-ghost-color": "#
|
|
330
|
+
"btn-ghost-color": "#6a7580",
|
|
331
331
|
"btn-ghost-bg": "transparent",
|
|
332
332
|
"btn-ghost-hover-bg": "rgba(181, 189, 195, 0.25)",
|
|
333
333
|
"btn-ghost-focus-bg": "transparent",
|
package/dist/js/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { default as DSProvider } from './DSProvider';
|
|
|
2
2
|
export { default as mediaQuery } from './mediaQuery/mediaQuery';
|
|
3
3
|
export { theme, useTheme, defaultColorsOrder } from './DSProvider/ThemeProvider/theme';
|
|
4
4
|
export type { ThemePropsVars, ThemeProps, WithTheme, DefaultColor } from './DSProvider/ThemeProvider/theme';
|
|
5
|
+
export type { DSProviderProps } from './DSProvider';
|
package/dist/style/config.less
CHANGED
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
@btn-primary-active-bg: @primary-color-darker-1;
|
|
226
226
|
@btn-primary-shadow: rgba(35, 138, 254, 0.2);
|
|
227
227
|
|
|
228
|
-
@btn-default-color: @gray-color-lighter-
|
|
228
|
+
@btn-default-color: @gray-color-lighter-2;
|
|
229
229
|
@btn-default-bg: @gray-color-lighter-8;
|
|
230
230
|
@btn-default-border: @gray-color-lighter-5;
|
|
231
231
|
@btn-default-focus-bg: @gray-color-lighter-8;
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
@btn-tertiary-white-active-bg: rgba(@gray-color-lighter-5, 0.1);
|
|
249
249
|
@btn-tertiary-white-border: transparent;
|
|
250
250
|
|
|
251
|
-
@btn-ghost-color: @gray-color-lighter-
|
|
251
|
+
@btn-ghost-color: @gray-color-lighter-2;
|
|
252
252
|
@btn-ghost-bg: transparent;
|
|
253
253
|
@btn-ghost-hover-bg: @gray-color-opacity-2;
|
|
254
254
|
@btn-ghost-focus-bg: transparent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Core Components for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"types": "dist/js/index.js",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@synerise/ds-data-format": "^1.0.0",
|
|
36
|
+
"@synerise/ds-toaster": "^1.1.0",
|
|
36
37
|
"deepmerge": "^4.2.2",
|
|
37
|
-
"flat": "^5.0.2"
|
|
38
|
-
"intl-messageformat-parser": "^3.6.4"
|
|
38
|
+
"flat": "^5.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"antd": "4.24.16",
|
|
@@ -44,8 +44,10 @@
|
|
|
44
44
|
"styled-components": "^5.3.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
+
"@formatjs/icu-messageformat-parser": "^2.11.1",
|
|
48
|
+
"@formatjs/intl": "^2.10.14",
|
|
47
49
|
"hex-rgb": "^5.0.0",
|
|
48
50
|
"less-vars-to-js": "^1.3.0"
|
|
49
51
|
},
|
|
50
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "90af7549cf0f556340bdd0deec4bb59bacf3e95e"
|
|
51
53
|
}
|