@strapi/design-system 1.10.0 → 1.11.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.
|
@@ -23,10 +23,28 @@ const FieldError = require('../Field/FieldError.js');
|
|
|
23
23
|
|
|
24
24
|
const _interopDefault = e => e && e.__esModule ? e : { default: e };
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
function _interopNamespace(e) {
|
|
27
|
+
if (e && e.__esModule) return e;
|
|
28
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
29
|
+
if (e) {
|
|
30
|
+
for (const k in e) {
|
|
31
|
+
if (k !== 'default') {
|
|
32
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
33
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: () => e[k]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
n.default = e;
|
|
41
|
+
return Object.freeze(n);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
45
|
const styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
28
46
|
|
|
29
|
-
const DateTimePicker =
|
|
47
|
+
const DateTimePicker = React__namespace.forwardRef(({
|
|
30
48
|
/**
|
|
31
49
|
* @preserve
|
|
32
50
|
* @deprecated This is no longer used.
|
|
@@ -37,7 +55,7 @@ ariaLabel: _ariaLabel, clearLabel = 'clear', dateLabel = 'Choose date', timeLabe
|
|
|
37
55
|
* @deprecated This is no longer used.
|
|
38
56
|
*/
|
|
39
57
|
selectButtonTitle: _selectButtonTitle, size = 'M', step, value, initialDate, ...props }, forwardedRef) => {
|
|
40
|
-
const DatePickerElement =
|
|
58
|
+
const DatePickerElement = React__namespace.useRef(null);
|
|
41
59
|
const [dateValue, setDateValue] = useControllableState.useControllableState({
|
|
42
60
|
defaultProp: initialDate ? convertUTCDateToCalendarDateTime(initialDate, false) : undefined,
|
|
43
61
|
prop: value ? convertUTCDateToCalendarDateTime(value, false) : value ?? undefined,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { getLocalTimeZone, parseAbsoluteToLocal, toCalendarDateTime } from '@internationalized/date';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { DatePickerInput } from '../DatePicker/DatePicker.mjs';
|
|
@@ -17,7 +17,7 @@ import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.mjs';
|
|
|
17
17
|
import { FieldHint } from '../Field/FieldHint.mjs';
|
|
18
18
|
import { FieldError } from '../Field/FieldError.mjs';
|
|
19
19
|
|
|
20
|
-
const DateTimePicker = forwardRef(({
|
|
20
|
+
const DateTimePicker = React.forwardRef(({
|
|
21
21
|
/**
|
|
22
22
|
* @preserve
|
|
23
23
|
* @deprecated This is no longer used.
|
|
@@ -28,7 +28,7 @@ ariaLabel: _ariaLabel, clearLabel = 'clear', dateLabel = 'Choose date', timeLabe
|
|
|
28
28
|
* @deprecated This is no longer used.
|
|
29
29
|
*/
|
|
30
30
|
selectButtonTitle: _selectButtonTitle, size = 'M', step, value, initialDate, ...props }, forwardedRef) => {
|
|
31
|
-
const DatePickerElement =
|
|
31
|
+
const DatePickerElement = React.useRef(null);
|
|
32
32
|
const [dateValue, setDateValue] = useControllableState({
|
|
33
33
|
defaultProp: initialDate ? convertUTCDateToCalendarDateTime(initialDate, false) : undefined,
|
|
34
34
|
prop: value ? convertUTCDateToCalendarDateTime(value, false) : value ?? undefined,
|
|
@@ -52,14 +52,13 @@ const IconButton = React__namespace.forwardRef(({ label, background, borderWidth
|
|
|
52
52
|
return label ? jsxRuntime.jsx(Tooltip.Tooltip, { label: label, children: component }) : component;
|
|
53
53
|
});
|
|
54
54
|
const IconButtonWrapper = styled__default.default(BaseButton.BaseButton) `
|
|
55
|
-
background: ${({ theme, variant }) => {
|
|
55
|
+
background-color: ${({ theme, variant }) => {
|
|
56
56
|
if (variant === VARIANT_SECONDARY) {
|
|
57
57
|
return theme.colors.primary100;
|
|
58
58
|
}
|
|
59
59
|
return undefined;
|
|
60
60
|
}};
|
|
61
|
-
border:
|
|
62
|
-
${({ theme, variant }) => {
|
|
61
|
+
border-color: ${({ theme, variant }) => {
|
|
63
62
|
if (variant === VARIANT_SECONDARY) {
|
|
64
63
|
return theme.colors.primary200;
|
|
65
64
|
}
|
|
@@ -25,14 +25,13 @@ const IconButton = React.forwardRef(({ label, background, borderWidth, noBorder
|
|
|
25
25
|
return label ? jsx(Tooltip, { label: label, children: component }) : component;
|
|
26
26
|
});
|
|
27
27
|
const IconButtonWrapper = styled(BaseButton) `
|
|
28
|
-
background: ${({ theme, variant }) => {
|
|
28
|
+
background-color: ${({ theme, variant }) => {
|
|
29
29
|
if (variant === VARIANT_SECONDARY) {
|
|
30
30
|
return theme.colors.primary100;
|
|
31
31
|
}
|
|
32
32
|
return undefined;
|
|
33
33
|
}};
|
|
34
|
-
border:
|
|
35
|
-
${({ theme, variant }) => {
|
|
34
|
+
border-color: ${({ theme, variant }) => {
|
|
36
35
|
if (variant === VARIANT_SECONDARY) {
|
|
37
36
|
return theme.colors.primary200;
|
|
38
37
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@codemirror/lang-json": "^6.0.1",
|
|
30
30
|
"@floating-ui/react-dom": "^2.0.2",
|
|
31
|
-
"@internationalized/date": "^3.
|
|
31
|
+
"@internationalized/date": "^3.5.0",
|
|
32
32
|
"@internationalized/number": "^3.2.1",
|
|
33
33
|
"@radix-ui/react-dismissable-layer": "^1.0.4",
|
|
34
34
|
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
|
35
35
|
"@radix-ui/react-focus-scope": "1.0.3",
|
|
36
|
-
"@strapi/ui-primitives": "^1.
|
|
36
|
+
"@strapi/ui-primitives": "^1.11.0",
|
|
37
37
|
"@uiw/react-codemirror": "^4.21.13",
|
|
38
38
|
"aria-hidden": "^1.2.3",
|
|
39
39
|
"compute-scroll-into-view": "^3.0.3",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"react-remove-scroll": "^2.5.6"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@playwright/test": "1.
|
|
45
|
-
"@strapi/icons": "^1.
|
|
44
|
+
"@playwright/test": "1.38.0",
|
|
45
|
+
"@strapi/icons": "^1.11.0",
|
|
46
46
|
"@types/react-router-dom": "^5.3.3",
|
|
47
47
|
"@types/styled-components": "^5.1.26",
|
|
48
48
|
"axe-playwright": "^1.2.3",
|