@strapi/design-system 1.8.1 → 1.9.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 (37) hide show
  1. package/dist/BaseCheckbox/BaseCheckbox.cjs +4 -4
  2. package/dist/BaseCheckbox/BaseCheckbox.js +19 -18
  3. package/dist/CarouselInput/Carousel.cjs +4 -4
  4. package/dist/CarouselInput/Carousel.js +13 -13
  5. package/dist/CarouselInput/CarouselInput.cjs +1 -1
  6. package/dist/CarouselInput/CarouselInput.js +14 -13
  7. package/dist/Checkbox/Checkbox.cjs +2 -2
  8. package/dist/Checkbox/Checkbox.js +22 -21
  9. package/dist/Combobox/Combobox.cjs +10 -10
  10. package/dist/Combobox/Combobox.js +57 -56
  11. package/dist/DatePicker/DatePicker.cjs +9 -9
  12. package/dist/DatePicker/DatePicker.js +67 -66
  13. package/dist/DateTimePicker/DateTimePicker.cjs +3 -3
  14. package/dist/DateTimePicker/DateTimePicker.js +46 -42
  15. package/dist/JSONInput/JSONInput.cjs +33 -1
  16. package/dist/JSONInput/JSONInput.js +85 -46
  17. package/dist/Popover/Popover.cjs +3 -3
  18. package/dist/Popover/Popover.js +52 -51
  19. package/dist/Select/MultiSelect.cjs +7 -7
  20. package/dist/Select/MultiSelect.js +45 -44
  21. package/dist/Select/SingleSelect.cjs +1 -1
  22. package/dist/Select/SingleSelect.js +35 -34
  23. package/dist/TextInput/TextInput.cjs +1 -1
  24. package/dist/TextInput/TextInput.js +15 -14
  25. package/dist/TimePicker/TimePicker.cjs +2 -2
  26. package/dist/TimePicker/TimePicker.js +38 -38
  27. package/dist/ToggleInput/ToggleInput.cjs +20 -4
  28. package/dist/ToggleInput/ToggleInput.js +44 -18
  29. package/dist/Typography/Typography.cjs +1 -1
  30. package/dist/Typography/Typography.js +6 -6
  31. package/dist/Typography/utils.cjs +1 -1
  32. package/dist/Typography/utils.js +4 -5
  33. package/dist/themes/utils.cjs +9 -9
  34. package/dist/themes/utils.js +9 -9
  35. package/package.json +10 -10
  36. package/dist/JSONInput/JSONInputContainer.cjs +0 -33
  37. package/dist/JSONInput/JSONInputContainer.js +0 -39
@@ -1,44 +1,45 @@
1
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { Item as j, ItemText as q, Root as W, Trigger as _, Value as H, Portal as M, Content as P, Viewport as z } from "./SelectParts.js";
4
- import { stripReactIdOfColon as A } from "../helpers/strings.js";
5
- import { useId as R } from "../hooks/useId.js";
6
- import { useIntersection as D } from "../hooks/useIntersection.js";
7
- import { Box as x } from "../Box/Box.js";
8
- import { Typography as G } from "../Typography/Typography.js";
9
- import { Field as J } from "../Field/Field.js";
10
- import { Flex as K } from "../Flex/Flex.js";
11
- import { FieldLabel as Q } from "../Field/FieldLabel.js";
12
- import { FieldHint as U } from "../Field/FieldHint.js";
13
- import { FieldError as X } from "../Field/FieldError.js";
14
- const pe = ({ error: r, hint: i, id: c, label: n, labelAction: o, required: f, selectButtonTitle: m, ...d }) => {
15
- const l = R(c), a = u.useRef(null);
16
- return e(J, { hint: i, error: r, id: l, required: f, children: p(K, { direction: "column", alignItems: "stretch", gap: 1, children: [e(Q, { onClick: () => {
17
- a.current.focus();
18
- }, action: o, children: n }), e(Y, { label: n, id: l, triggerRef: a, required: f, ...d }), e(U, {}), e(X, {})] }) });
19
- }, Y = ({ id: r, children: i, clearLabel: c = "Clear", customizeContent: n, disabled: o, error: f, label: m, onChange: d, onClear: l, onReachEnd: a, placeholder: g, required: C, selectButtonTitle: Z, startIcon: B, size: O = "M", value: h, triggerRef: T, ...F }) => {
20
- const [$, I] = u.useState(), [y, k] = u.useState(!1), w = (t) => {
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { Root as q, Trigger as W, Value as _, Portal as H, Content as M, Viewport as P, Item as z, ItemText as A } from "./SelectParts.js";
4
+ import { stripReactIdOfColon as D } from "../helpers/strings.js";
5
+ import { useComposedRefs as G } from "../hooks/useComposeRefs.js";
6
+ import { useId as C } from "../hooks/useId.js";
7
+ import { useIntersection as J } from "../hooks/useIntersection.js";
8
+ import { Field as K } from "../Field/Field.js";
9
+ import { Flex as Q } from "../Flex/Flex.js";
10
+ import { FieldLabel as U } from "../Field/FieldLabel.js";
11
+ import { FieldHint as X } from "../Field/FieldHint.js";
12
+ import { FieldError as Y } from "../Field/FieldError.js";
13
+ import { Box as T } from "../Box/Box.js";
14
+ import { Typography as Z } from "../Typography/Typography.js";
15
+ const Ie = o.forwardRef(({ error: d, hint: r, id: c, label: n, labelAction: i, required: s, selectButtonTitle: R, ...m }, a) => {
16
+ const l = C(c), f = o.useRef(null), g = () => {
17
+ f.current.focus();
18
+ }, I = G(a, f);
19
+ return e(K, { hint: r, error: d, id: l, required: s, children: h(Q, { direction: "column", alignItems: "stretch", gap: 1, children: [n ? e(U, { onClick: g, action: i, children: n }) : null, e(ee, { label: n, id: l, ref: I, required: s, ...m }), e(X, {}), e(Y, {})] }) });
20
+ }), ee = o.forwardRef(({ "aria-label": d, id: r, children: c, clearLabel: n = "Clear", customizeContent: i, disabled: s, error: R, label: m, onChange: a, onClear: l, onReachEnd: f, placeholder: g, required: I, selectButtonTitle: re, startIcon: B, size: O = "M", value: p, ...w }, F) => {
21
+ const [$, S] = o.useState(), [y, k] = o.useState(!1), v = (t) => {
21
22
  k(t);
22
- }, L = (t) => {
23
- l && l(t), d || I("");
24
- }, v = `${r}-hint`, E = `${r}-error`, N = (t) => {
25
- d ? d(typeof h == "number" ? Number(t) : t) : I(t);
26
- }, b = u.useRef(null), V = R(), S = `intersection-${A(V)}`;
27
- D(b, (t) => {
28
- a && a(t);
23
+ }, E = (t) => {
24
+ l && l(t), a || S("");
25
+ }, L = `${r}-hint`, N = `${r}-error`, V = (t) => {
26
+ a ? a(typeof p == "number" ? Number(t) : t) : S(t);
27
+ }, b = o.useRef(null), j = C(), x = `intersection-${D(j)}`;
28
+ J(b, (t) => {
29
+ f && f(t);
29
30
  }, {
30
- selectorToWatch: `#${S}`,
31
+ selectorToWatch: `#${x}`,
31
32
  /**
32
33
  * We need to know when the select is open because only then will viewportRef
33
34
  * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
34
35
  */
35
36
  skipWhen: !y
36
37
  });
37
- const s = (typeof h < "u" && h !== null ? h.toString() : $) ?? "";
38
- return p(W, { onOpenChange: w, disabled: o, required: C, onValueChange: N, value: s, ...F, children: [e(_, { ref: T, "aria-label": m, "aria-describedby": r ? `${v} ${E}` : void 0, id: r, startIcon: B, size: O, hasError: !!f, disabled: o, clearLabel: c, onClear: s && l ? L : void 0, children: e(H, { placeholder: g, textColor: s ? "neutral800" : "neutral600", children: s && n ? n(s) : void 0 }) }), e(M, { children: e(P, { position: "popper", sideOffset: 4, children: p(z, { ref: b, children: [i, e(x, { id: S, width: "100%", height: "1px" })] }) }) })] });
39
- }, me = u.forwardRef(({ value: r, startIcon: i, children: c, ...n }, o) => p(j, { ref: o, value: r.toString(), ...n, children: [i && e(x, { as: "span", "aria-hidden": !0, children: i }), e(G, { textColor: "neutral800", children: e(q, { children: c }) })] }));
38
+ const u = (typeof p < "u" && p !== null ? p.toString() : $) ?? "";
39
+ return h(q, { onOpenChange: v, disabled: s, required: I, onValueChange: V, value: u, ...w, children: [e(W, { ref: F, "aria-label": m ?? d, "aria-describedby": r ? `${L} ${N}` : void 0, id: r, startIcon: B, size: O, hasError: !!R, disabled: s, clearLabel: n, onClear: u && l ? E : void 0, children: e(_, { placeholder: g, textColor: u ? "neutral800" : "neutral600", children: u && i ? i(u) : void 0 }) }), e(H, { children: e(M, { position: "popper", sideOffset: 4, children: h(P, { ref: b, children: [c, e(T, { id: x, width: "100%", height: "1px" })] }) }) })] });
40
+ }), Re = o.forwardRef(({ value: d, startIcon: r, children: c, ...n }, i) => h(z, { ref: i, value: d.toString(), ...n, children: [r && e(T, { as: "span", "aria-hidden": !0, children: r }), e(Z, { textColor: "neutral800", children: e(A, { children: c }) })] }));
40
41
  export {
41
- pe as SingleSelect,
42
- Y as SingleSelectInput,
43
- me as SingleSelectOption
42
+ Ie as SingleSelect,
43
+ ee as SingleSelectInput,
44
+ Re as SingleSelectOption
44
45
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),F=require("../hooks/useId.cjs"),I=require("../Field/Field.cjs"),q=require("../Flex/Flex.cjs"),j=require("../Field/FieldLabel.cjs"),h=require("../Field/FieldInput.cjs"),m=require("../Field/FieldHint.cjs"),f=require("../Field/FieldError.cjs"),s=t.forwardRef(({name:l,hint:d,error:o,label:r,labelAction:u,id:c,required:a,...i},p)=>{const x=F.useId(c),n=t.useRef(null);if(!r&&!i["aria-label"])throw new Error('The TextInput component needs a "label" or an "aria-label" props');return t.useImperativeHandle(p,()=>({inputWrapperRef:n})),e.jsx("div",{ref:n,children:e.jsx(I.Field,{name:l,hint:d,error:o,id:x,required:a,children:e.jsxs(q.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[r&&e.jsx(j.FieldLabel,{action:u,children:r}),e.jsx(h.FieldInput,{...i}),e.jsx(m.FieldHint,{}),e.jsx(f.FieldError,{})]})})})});s.displayName="TextInput";exports.TextInput=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),I=require("../hooks/useId.cjs"),f=require("../Field/Field.cjs"),q=require("../Flex/Flex.cjs"),j=require("../Field/FieldLabel.cjs"),h=require("../Field/FieldInput.cjs"),m=require("../Field/FieldHint.cjs"),R=require("../Field/FieldError.cjs"),u=r.forwardRef(({name:l,hint:o,error:d,label:n,labelAction:c,id:a,required:p,...t},x)=>{const F=I.useId(a),i=r.useRef(null),s=r.useRef(null);if(!n&&!t["aria-label"])throw new Error('The TextInput component needs a "label" or an "aria-label" props');return r.useImperativeHandle(x,()=>({input:s,inputWrapperRef:i}),[]),e.jsx("div",{ref:i,children:e.jsx(f.Field,{name:l,hint:o,error:d,id:F,required:p,children:e.jsxs(q.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[n&&e.jsx(j.FieldLabel,{action:c,children:n}),e.jsx(h.FieldInput,{ref:s,...t}),e.jsx(m.FieldHint,{}),e.jsx(R.FieldError,{})]})})})});u.displayName="TextInput";exports.TextInput=u;
@@ -1,21 +1,22 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { forwardRef as c, useRef as u, useImperativeHandle as h } from "react";
3
- import { useId as I } from "../hooks/useId.js";
4
- import { Field as x } from "../Field/Field.js";
5
- import { Flex as F } from "../Flex/Flex.js";
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { forwardRef as h, useRef as n, useImperativeHandle as I } from "react";
3
+ import { useId as x } from "../hooks/useId.js";
4
+ import { Field as F } from "../Field/Field.js";
5
+ import { Flex as R } from "../Flex/Flex.js";
6
6
  import { FieldLabel as T } from "../Field/FieldLabel.js";
7
7
  import { FieldInput as g } from "../Field/FieldInput.js";
8
8
  import { FieldHint as w } from "../Field/FieldHint.js";
9
- import { FieldError as R } from "../Field/FieldError.js";
10
- const b = c(({ name: t, hint: n, error: m, label: e, labelAction: p, id: d, required: a, ...i }, l) => {
11
- const f = I(d), o = u(null);
12
- if (!e && !i["aria-label"])
9
+ import { FieldError as b } from "../Field/FieldError.js";
10
+ const j = h(({ name: m, hint: p, error: l, label: e, labelAction: d, id: a, required: f, ...t }, u) => {
11
+ const s = x(a), i = n(null), o = n(null);
12
+ if (!e && !t["aria-label"])
13
13
  throw new Error('The TextInput component needs a "label" or an "aria-label" props');
14
- return h(l, () => ({
15
- inputWrapperRef: o
16
- })), r("div", { ref: o, children: r(x, { name: t, hint: n, error: m, id: f, required: a, children: s(F, { direction: "column", alignItems: "stretch", gap: 1, children: [e && r(T, { action: p, children: e }), r(g, { ...i }), r(w, {}), r(R, {})] }) }) });
14
+ return I(u, () => ({
15
+ input: o,
16
+ inputWrapperRef: i
17
+ }), []), r("div", { ref: i, children: r(F, { name: m, hint: p, error: l, id: s, required: f, children: c(R, { direction: "column", alignItems: "stretch", gap: 1, children: [e && r(T, { action: d, children: e }), r(g, { ref: o, ...t }), r(w, {}), r(b, {})] }) }) });
17
18
  });
18
- b.displayName = "TextInput";
19
+ j.displayName = "TextInput";
19
20
  export {
20
- b as TextInput
21
+ j as TextInput
21
22
  };
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),V=require("react"),M=require("@strapi/icons"),O=require("styled-components"),C=require("../Combobox/Combobox.cjs"),N=require("../DesignSystemProvider.cjs"),v=require("../hooks/useControllableState.cjs"),A=require("../hooks/useDateFormatter.cjs"),T=require("../hooks/useId.cjs"),B=require("../Field/Field.cjs"),L=require("../Flex/Flex.cjs"),$=require("../Field/FieldLabel.cjs"),E=require("../Field/FieldHint.cjs"),R=require("../Field/FieldError.cjs"),z=t=>t&&t.__esModule?t:{default:t};function H(t){if(t&&t.__esModule)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const m=H(V),Z=z(O),x=t=>!!t.match(/^[^a-zA-Z]*$/),F=({id:t,step:n=15,ariaLabel:s,selectButtonTitle:u,value:a,defaultValue:f,onChange:p,...d})=>{const _=N.useDesignSystem("TimePicker"),k=T.useId(t),[I,l]=m.useState(""),[g,h]=v.useControllableState({prop:a,defaultProp:f,onChange:p}),c=A.useDateFormatter(_.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),b=m.useMemo(()=>{const e=c.formatToParts(new Date),{value:r}=e.find(i=>i.type==="literal");return r},[c]),S=m.useMemo(()=>{const e=60/n;return[...Array(24).keys()].flatMap(r=>[...Array(e).keys()].map(i=>c.format(new Date(0,0,0,r,i*n))))},[n,c]),w=e=>{(!e||x(e))&&l(e)},y=e=>{const[r,i]=e.split(b);if(!r&&!i)return;const j=Number(r??"0"),q=Number(i??"0");if(!(j>23||q>59))return c.format(new Date(0,0,0,j,q))},D=e=>{const r=y(e.target.value);r?(l(r),h(r)):l(g)},P=e=>{if(typeof e<"u"){const r=y(e);h(r)}else h(e)};return m.useEffect(()=>{const e=typeof a>"u"?"":a;x(e)&&l(e)},[a,l]),o.jsx(C.ComboboxInput,{...d,value:g,onChange:P,isPrintableCharacter:x,allowCustomValue:!0,placeholder:`--${b}--`,autocomplete:"none",startIcon:o.jsx(G,{}),id:k,inputMode:"numeric",pattern:`\\d{2}${b}\\d{2}`,textValue:I,onTextValueChange:w,onBlur:D,children:S.map(e=>o.jsx(C.Option,{value:e,children:e},e))})},G=Z.default(M.Clock)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),M=require("react"),O=require("@strapi/icons"),N=require("styled-components"),T=require("../Combobox/Combobox.cjs"),v=require("../DesignSystemProvider.cjs"),A=require("../hooks/useControllableState.cjs"),B=require("../hooks/useDateFormatter.cjs"),F=require("../hooks/useId.cjs"),R=require("../Field/Field.cjs"),L=require("../Flex/Flex.cjs"),$=require("../Field/FieldLabel.cjs"),E=require("../Field/FieldHint.cjs"),z=require("../Field/FieldError.cjs"),H=t=>t&&t.__esModule?t:{default:t};function Z(t){if(t&&t.__esModule)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,l.get?l:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const u=Z(M),G=H(N),g=t=>!!t.match(/^[^a-zA-Z]*$/),_=u.forwardRef(({id:t,step:n=15,ariaLabel:s,selectButtonTitle:l,value:a,defaultValue:m,onChange:p,...h},f)=>{const w=v.useDesignSystem("TimePicker"),k=F.useId(t),[I,c]=u.useState(""),[y,b]=A.useControllableState({prop:a,defaultProp:m,onChange:p}),d=B.useDateFormatter(w.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),x=u.useMemo(()=>{const e=d.formatToParts(new Date),{value:r}=e.find(i=>i.type==="literal");return r},[d]),S=u.useMemo(()=>{const e=60/n;return[...Array(24).keys()].flatMap(r=>[...Array(e).keys()].map(i=>d.format(new Date(0,0,0,r,i*n))))},[n,d]),D=e=>{(!e||g(e))&&c(e)},j=e=>{const[r,i]=e.split(x);if(!r&&!i)return;const q=Number(r??"0"),C=Number(i??"0");if(!(q>23||C>59))return d.format(new Date(0,0,0,q,C))},P=e=>{const r=j(e.target.value);r?(c(r),b(r)):c(y)},V=e=>{if(typeof e<"u"){const r=j(e);b(r)}else b(e)};return u.useEffect(()=>{const e=typeof a>"u"?"":a;g(e)&&c(e)},[a,c]),o.jsx(T.ComboboxInput,{...h,ref:f,value:y,onChange:V,isPrintableCharacter:g,allowCustomValue:!0,placeholder:`--${x}--`,autocomplete:"none",startIcon:o.jsx(J,{}),id:k,inputMode:"numeric",pattern:`\\d{2}\\${x}\\d{2}`,textValue:I,onTextValueChange:D,onBlur:P,children:S.map(e=>o.jsx(T.Option,{value:e,children:e},e))})}),J=G.default(O.Clock)`
2
2
  height: 1rem;
3
3
  width: 1rem;
4
4
 
5
5
  & > path {
6
6
  fill: ${({theme:t})=>t.colors.neutral500};
7
7
  }
8
- `,J=({label:t,error:n,hint:s,id:u,required:a,labelAction:f,...p})=>{const d=T.useId(u);return o.jsx(B.Field,{hint:s,error:n,id:d,required:a,children:o.jsxs(L.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[o.jsx($.FieldLabel,{action:f,children:t}),o.jsx(F,{id:d,error:n,required:a,...p}),o.jsx(E.FieldHint,{}),o.jsx(R.FieldError,{})]})})};exports.TimePicker=J;exports.TimePickerInput=F;
8
+ `,K=u.forwardRef(({label:t,error:n,hint:s,id:l,required:a,labelAction:m,...p},h)=>{const f=F.useId(l);return o.jsx(R.Field,{hint:s,error:n,id:f,required:a,children:o.jsxs(L.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[o.jsx($.FieldLabel,{action:m,children:t}),o.jsx(_,{ref:h,id:f,error:n,required:a,...p}),o.jsx(E.FieldHint,{}),o.jsx(z.FieldError,{})]})})});exports.TimePicker=K;exports.TimePickerInput=_;
@@ -1,10 +1,10 @@
1
- import { jsx as r, jsxs as D } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { Clock as M } from "@strapi/icons";
4
- import S from "styled-components";
5
- import { ComboboxInput as $, Option as v } from "../Combobox/Combobox.js";
6
- import { useDesignSystem as L } from "../DesignSystemProvider.js";
7
- import { useControllableState as P } from "../hooks/useControllableState.js";
1
+ import { jsx as r, jsxs as M } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { Clock as S } from "@strapi/icons";
4
+ import $ from "styled-components";
5
+ import { ComboboxInput as v, Option as L } from "../Combobox/Combobox.js";
6
+ import { useDesignSystem as P } from "../DesignSystemProvider.js";
7
+ import { useControllableState as R } from "../hooks/useControllableState.js";
8
8
  import { useDateFormatter as j } from "../hooks/useDateFormatter.js";
9
9
  import { useId as V } from "../hooks/useId.js";
10
10
  import { Field as E } from "../Field/Field.js";
@@ -12,73 +12,73 @@ import { Flex as O } from "../Flex/Flex.js";
12
12
  import { FieldLabel as _ } from "../Field/FieldLabel.js";
13
13
  import { FieldHint as q } from "../Field/FieldHint.js";
14
14
  import { FieldError as z } from "../Field/FieldError.js";
15
- const h = (o) => !!o.match(/^[^a-zA-Z]*$/), H = ({
15
+ const b = (o) => !!o.match(/^[^a-zA-Z]*$/), H = l.forwardRef(({
16
16
  id: o,
17
17
  step: a = 15,
18
18
  /**
19
19
  * @preserve
20
20
  * @deprecated This is no longer used.
21
21
  */
22
- ariaLabel: b,
22
+ ariaLabel: C,
23
23
  /**
24
24
  * @preserve
25
25
  * @deprecated This is no longer used.
26
26
  */
27
- selectButtonTitle: C,
27
+ selectButtonTitle: x,
28
28
  value: n,
29
29
  defaultValue: c,
30
- onChange: d,
31
- ...u
32
- }) => {
33
- const w = L("TimePicker"), k = V(o), [I, l] = m.useState(""), [x, f] = P({
30
+ onChange: f,
31
+ ...d
32
+ }, m) => {
33
+ const k = P("TimePicker"), I = V(o), [A, s] = l.useState(""), [w, p] = R({
34
34
  prop: n,
35
35
  defaultProp: c,
36
- onChange: d
37
- }), s = j(w.locale, {
36
+ onChange: f
37
+ }), u = j(k.locale, {
38
38
  hour: "2-digit",
39
39
  minute: "2-digit",
40
40
  hour12: !1
41
- }), p = m.useMemo(() => {
42
- const e = s.formatToParts(/* @__PURE__ */ new Date()), { value: t } = e.find((i) => i.type === "literal");
41
+ }), h = l.useMemo(() => {
42
+ const e = u.formatToParts(/* @__PURE__ */ new Date()), { value: t } = e.find((i) => i.type === "literal");
43
43
  return t;
44
- }, [s]), A = m.useMemo(() => {
44
+ }, [u]), F = l.useMemo(() => {
45
45
  const e = 60 / a;
46
- return [...Array(24).keys()].flatMap((t) => [...Array(e).keys()].map((i) => s.format(new Date(0, 0, 0, t, i * a))));
47
- }, [a, s]), F = (e) => {
48
- (!e || h(e)) && l(e);
46
+ return [...Array(24).keys()].flatMap((t) => [...Array(e).keys()].map((i) => u.format(new Date(0, 0, 0, t, i * a))));
47
+ }, [a, u]), N = (e) => {
48
+ (!e || b(e)) && s(e);
49
49
  }, y = (e) => {
50
- const [t, i] = e.split(p);
50
+ const [t, i] = e.split(h);
51
51
  if (!t && !i)
52
52
  return;
53
53
  const T = Number(t ?? "0"), g = Number(i ?? "0");
54
54
  if (!(T > 23 || g > 59))
55
- return s.format(new Date(0, 0, 0, T, g));
56
- }, N = (e) => {
57
- const t = y(e.target.value);
58
- t ? (l(t), f(t)) : l(x);
55
+ return u.format(new Date(0, 0, 0, T, g));
59
56
  }, B = (e) => {
57
+ const t = y(e.target.value);
58
+ t ? (s(t), p(t)) : s(w);
59
+ }, D = (e) => {
60
60
  if (typeof e < "u") {
61
61
  const t = y(e);
62
- f(t);
62
+ p(t);
63
63
  } else
64
- f(e);
64
+ p(e);
65
65
  };
66
- return m.useEffect(() => {
66
+ return l.useEffect(() => {
67
67
  const e = typeof n > "u" ? "" : n;
68
- h(e) && l(e);
69
- }, [n, l]), r($, { ...u, value: x, onChange: B, isPrintableCharacter: h, allowCustomValue: !0, placeholder: `--${p}--`, autocomplete: "none", startIcon: r(R, {}), id: k, inputMode: "numeric", pattern: `\\d{2}${p}\\d{2}`, textValue: I, onTextValueChange: F, onBlur: N, children: A.map((e) => r(v, { value: e, children: e }, e)) });
70
- }, R = S(M)`
68
+ b(e) && s(e);
69
+ }, [n, s]), r(v, { ...d, ref: m, value: w, onChange: D, isPrintableCharacter: b, allowCustomValue: !0, placeholder: `--${h}--`, autocomplete: "none", startIcon: r(Z, {}), id: I, inputMode: "numeric", pattern: `\\d{2}\\${h}\\d{2}`, textValue: A, onTextValueChange: N, onBlur: B, children: F.map((e) => r(L, { value: e, children: e }, e)) });
70
+ }), Z = $(S)`
71
71
  height: 1rem;
72
72
  width: 1rem;
73
73
 
74
74
  & > path {
75
75
  fill: ${({ theme: o }) => o.colors.neutral500};
76
76
  }
77
- `, ne = ({ label: o, error: a, hint: b, id: C, required: n, labelAction: c, ...d }) => {
78
- const u = V(C);
79
- return r(E, { hint: b, error: a, id: u, required: n, children: D(O, { direction: "column", alignItems: "stretch", gap: 1, children: [r(_, { action: c, children: o }), r(H, { id: u, error: a, required: n, ...d }), r(q, {}), r(z, {})] }) });
80
- };
77
+ `, ae = l.forwardRef(({ label: o, error: a, hint: C, id: x, required: n, labelAction: c, ...f }, d) => {
78
+ const m = V(x);
79
+ return r(E, { hint: C, error: a, id: m, required: n, children: M(O, { direction: "column", alignItems: "stretch", gap: 1, children: [r(_, { action: c, children: o }), r(H, { ref: d, id: m, error: a, required: n, ...f }), r(q, {}), r(z, {})] }) });
80
+ });
81
81
  export {
82
- ne as TimePicker,
82
+ ae as TimePicker,
83
83
  H as TimePickerInput
84
84
  };
@@ -1,6 +1,22 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("styled-components"),p=require("../hooks/useId.cjs"),m=require("../ToggleCheckbox/ToggleCheckbox.cjs"),T=require("../Field/Field.cjs"),I=require("../TextButton/TextButton.cjs"),o=require("../Flex/Flex.cjs"),y=require("../Field/FieldLabel.cjs"),_=require("../Field/FieldHint.cjs"),b=require("../Field/FieldError.cjs"),k=t=>t&&t.__esModule?t:{default:t},d=k(j),B=d.default(T.Field)`
2
- max-width: 320px;
3
- `,C=d.default(I.TextButton)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("react"),C=require("styled-components"),k=require("../hooks/useControllableState.cjs"),I=require("../hooks/useId.cjs"),R=require("../Field/FieldContext.cjs"),b=require("../Typography/Typography.cjs"),c=require("../Flex/Flex.cjs"),S=require("../themes/utils.cjs"),_=require("../Field/Field.cjs"),$=require("../Field/FieldLabel.cjs"),v=require("../Field/FieldHint.cjs"),B=require("../Field/FieldError.cjs"),O=require("../TextButton/TextButton.cjs"),W=e=>e&&e.__esModule?e:{default:e};function M(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const q=M(w),p=W(C),z=q.forwardRef(({offLabel:e,onLabel:o,disabled:t,checked:a,onChange:h,size:u="M",...g},f)=>{const[n=!1,s]=k.useControllableState({prop:a}),{error:d,id:i,name:x,required:j}=R.useField(),l=n!==null&&!n,F=`${i}-hint`,T=`${i}-error`;return r.jsxs(E,{position:"relative",hasRadius:!0,padding:1,background:t?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral200",wrap:"wrap",cursor:t?"not-allowed":"pointer",hasError:!!d,children:[r.jsx(m,{hasRadius:!0,flex:"1 1 50%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,justifyContent:"center",background:t&&l?"neutral200":l?"neutral0":"transparent",borderColor:t&&l?"neutral300":l?"neutral200":t?"neutral150":"neutral100",size:u,children:r.jsx(b.Typography,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:t?"neutral700":l?"danger700":"neutral600",children:e})}),r.jsx(m,{hasRadius:!0,flex:"1 1 50%",paddingLeft:3,paddingRight:3,justifyContent:"center",background:t&&n?"neutral200":n?"neutral0":"transparent",borderColor:t&&n?"neutral300":n?"neutral200":t?"neutral150":"neutral100",size:u,children:r.jsx(b.Typography,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:t?"neutral700":n?"primary600":"neutral600",children:o})}),r.jsx(L,{...g,ref:f,onChange:y=>{s(y.currentTarget.checked),h?.(y)},type:"checkbox",id:i,name:x,"aria-required":j,disabled:t,"aria-disabled":t,"aria-describedby":i?`${F} ${T}`:void 0,checked:!!n})]})}),E=p.default(c.Flex)`
2
+ ${S.inputFocusStyle()}
3
+ `,m=p.default(c.Flex)`
4
+ /**
5
+ We declare the defined value because we want the height of the input when
6
+ the values are in a row to be 40px. But defining a height on the label
7
+ would break the input when it wraps.
8
+ */
9
+ padding-top: ${({size:e})=>`${e==="S"?"2px":"6px"}`};
10
+ padding-bottom: ${({size:e})=>`${e==="S"?"2px":"6px"}`};
11
+ `,L=p.default.input`
12
+ height: 100%;
13
+ left: 0;
14
+ opacity: 0;
15
+ position: absolute;
16
+ top: 0;
17
+ z-index: 0;
18
+ width: 100%;
19
+ `,P=q.forwardRef(({disabled:e=!1,error:o,hint:t,label:a,name:h,labelAction:u,required:g=!1,id:f,onClear:n,clearLabel:s,checked:d,...i},x)=>{const j=I.useId(f);return r.jsx(_.Field,{name:h,hint:t,error:o,id:j,required:g,maxWidth:"320px",children:r.jsxs(c.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[r.jsxs(c.Flex,{children:[a?r.jsx($.FieldLabel,{action:u,children:a}):null,s&&n&&d!==null&&!e&&r.jsx(D,{onClick:n,children:s})]}),r.jsx(z,{ref:x,checked:d,disabled:e,...i}),r.jsx(v.FieldHint,{}),r.jsx(B.FieldError,{})]})})}),D=p.default(O.TextButton)`
4
20
  align-self: flex-end;
5
21
  margin-left: auto;
6
- `,u=({disabled:t=!1,size:c="M",error:a,hint:x,label:r,name:g,labelAction:f,required:F=!1,id:h,onClear:i,clearLabel:n,checked:l=!1,...q})=>{const s=p.useId(h);return e.jsx(B,{name:g,hint:x,error:a,id:s,required:F,children:e.jsxs(o.Flex,{direction:"column",alignItems:"stretch",gap:1,children:[e.jsxs(o.Flex,{children:[e.jsx(y.FieldLabel,{action:f,children:r}),n&&i&&l!==null&&!t&&e.jsx(C,{onClick:i,children:n})]}),e.jsx(m.ToggleCheckbox,{id:s,size:c,checked:l,disabled:t,...q,children:r}),e.jsx(_.FieldHint,{}),e.jsx(b.FieldError,{})]})})};u.displayName="ToggleInput";exports.ToggleInput=u;
22
+ `;exports.ToggleInput=P;
@@ -1,23 +1,49 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import p from "styled-components";
1
+ import { jsxs as w, jsx as t } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import c from "styled-components";
4
+ import { useControllableState as $ } from "../hooks/useControllableState.js";
3
5
  import { useId as F } from "../hooks/useId.js";
4
- import { ToggleCheckbox as I } from "../ToggleCheckbox/ToggleCheckbox.js";
5
- import { Field as T } from "../Field/Field.js";
6
- import { TextButton as j } from "../TextButton/TextButton.js";
7
- import { Flex as d } from "../Flex/Flex.js";
8
- import { FieldLabel as k } from "../Field/FieldLabel.js";
9
- import { FieldHint as y } from "../Field/FieldHint.js";
10
- import { FieldError as B } from "../Field/FieldError.js";
11
- const C = p(T)`
12
- max-width: 320px;
13
- `, q = p(j)`
6
+ import { useField as R } from "../Field/FieldContext.js";
7
+ import { Typography as y } from "../Typography/Typography.js";
8
+ import { Flex as u } from "../Flex/Flex.js";
9
+ import { inputFocusStyle as B } from "../themes/utils.js";
10
+ import { Field as W } from "../Field/Field.js";
11
+ import { FieldLabel as v } from "../Field/FieldLabel.js";
12
+ import { FieldHint as S } from "../Field/FieldHint.js";
13
+ import { FieldError as j } from "../Field/FieldError.js";
14
+ import { TextButton as q } from "../TextButton/TextButton.js";
15
+ const z = b.forwardRef(({ offLabel: n, onLabel: h, disabled: e, checked: a, onChange: s, size: l = "M", ...f }, m) => {
16
+ const [r = !1, p] = $({
17
+ prop: a
18
+ }), { error: d, id: o, name: g, required: x } = R(), i = r !== null && !r, T = `${o}-hint`, I = `${o}-error`;
19
+ return w(E, { position: "relative", hasRadius: !0, padding: 1, background: e ? "neutral150" : "neutral100", borderStyle: "solid", borderWidth: "1px", borderColor: "neutral200", wrap: "wrap", cursor: e ? "not-allowed" : "pointer", hasError: !!d, children: [t(C, { hasRadius: !0, flex: "1 1 50%", paddingTop: 2, paddingBottom: 2, paddingLeft: 3, paddingRight: 3, justifyContent: "center", background: e && i ? "neutral200" : i ? "neutral0" : "transparent", borderColor: e && i ? "neutral300" : i ? "neutral200" : e ? "neutral150" : "neutral100", size: l, children: t(y, { variant: "pi", fontWeight: "bold", textTransform: "uppercase", textColor: e ? "neutral700" : i ? "danger700" : "neutral600", children: n }) }), t(C, { hasRadius: !0, flex: "1 1 50%", paddingLeft: 3, paddingRight: 3, justifyContent: "center", background: e && r ? "neutral200" : r ? "neutral0" : "transparent", borderColor: e && r ? "neutral300" : r ? "neutral200" : e ? "neutral150" : "neutral100", size: l, children: t(y, { variant: "pi", fontWeight: "bold", textTransform: "uppercase", textColor: e ? "neutral700" : r ? "primary600" : "neutral600", children: h }) }), t(L, { ...f, ref: m, onChange: (k) => {
20
+ p(k.currentTarget.checked), s?.(k);
21
+ }, type: "checkbox", id: o, name: g, "aria-required": x, disabled: e, "aria-disabled": e, "aria-describedby": o ? `${T} ${I}` : void 0, checked: !!r })] });
22
+ }), E = c(u)`
23
+ ${B()}
24
+ `, C = c(u)`
25
+ /**
26
+ We declare the defined value because we want the height of the input when
27
+ the values are in a row to be 40px. But defining a height on the label
28
+ would break the input when it wraps.
29
+ */
30
+ padding-top: ${({ size: n }) => `${n === "S" ? "2px" : "6px"}`};
31
+ padding-bottom: ${({ size: n }) => `${n === "S" ? "2px" : "6px"}`};
32
+ `, L = c.input`
33
+ height: 100%;
34
+ left: 0;
35
+ opacity: 0;
36
+ position: absolute;
37
+ top: 0;
38
+ z-index: 0;
39
+ width: 100%;
40
+ `, Y = b.forwardRef(({ disabled: n = !1, error: h, hint: e, label: a, name: s, labelAction: l, required: f = !1, id: m, onClear: r, clearLabel: p, checked: d, ...o }, g) => {
41
+ const x = F(m);
42
+ return t(W, { name: s, hint: e, error: h, id: x, required: f, maxWidth: "320px", children: w(u, { direction: "column", alignItems: "stretch", gap: 1, children: [w(u, { children: [a ? t(v, { action: l, children: a }) : null, p && r && d !== null && !n && t(H, { onClick: r, children: p })] }), t(z, { ref: g, checked: d, disabled: n, ...o }), t(S, {}), t(j, {})] }) });
43
+ }), H = c(q)`
14
44
  align-self: flex-end;
15
45
  margin-left: auto;
16
- `, w = ({ disabled: e = !1, size: s = "M", error: f, hint: c, label: o, name: a, labelAction: g, required: h = !1, id: u, onClear: i, clearLabel: t, checked: n = !1, ...x }) => {
17
- const l = F(u);
18
- return r(C, { name: a, hint: c, error: f, id: l, required: h, children: m(d, { direction: "column", alignItems: "stretch", gap: 1, children: [m(d, { children: [r(k, { action: g, children: o }), t && i && n !== null && !e && r(q, { onClick: i, children: t })] }), r(I, { id: l, size: s, checked: n, disabled: e, ...x, children: o }), r(y, {}), r(B, {})] }) });
19
- };
20
- w.displayName = "ToggleInput";
46
+ `;
21
47
  export {
22
- w as ToggleInput
48
+ Y as ToggleInput
23
49
  };
@@ -7,7 +7,7 @@
7
7
  font-weight: ${({theme:e,fontWeight:t})=>r.extractStyleFromTheme(e.fontWeights,t,void 0)};
8
8
  font-size: ${({theme:e,fontSize:t})=>r.extractStyleFromTheme(e.fontSizes,t,void 0)};
9
9
  line-height: ${({theme:e,lineHeight:t})=>r.extractStyleFromTheme(e.lineHeights,t,t)};
10
- color: ${o.handleColor};
10
+ color: ${({theme:e,textColor:t})=>e.colors[t||"neutral800"]};
11
11
  text-align: ${({textAlign:e})=>e};
12
12
  text-decoration: ${({textDecoration:e})=>e};
13
13
  text-transform: ${({textTransform:e})=>e};
@@ -1,11 +1,11 @@
1
1
  import r from "styled-components";
2
- import { variantStyle as i, ellipsisStyle as n, handleColor as a } from "./utils.js";
2
+ import { variantStyle as i, ellipsisStyle as n } from "./utils.js";
3
3
  import { extractStyleFromTheme as o } from "../helpers/theme.js";
4
- const s = {
4
+ const a = {
5
5
  fontSize: !0,
6
6
  fontWeight: !0
7
- }, m = r.span.withConfig({
8
- shouldForwardProp: (t, e) => !s[t] && e(t)
7
+ }, h = r.span.withConfig({
8
+ shouldForwardProp: (t, e) => !a[t] && e(t)
9
9
  })`
10
10
  ${i}
11
11
  ${n}
@@ -15,11 +15,11 @@ const s = {
15
15
  font-weight: ${({ theme: t, fontWeight: e }) => o(t.fontWeights, e, void 0)};
16
16
  font-size: ${({ theme: t, fontSize: e }) => o(t.fontSizes, e, void 0)};
17
17
  line-height: ${({ theme: t, lineHeight: e }) => o(t.lineHeights, e, e)};
18
- color: ${a};
18
+ color: ${({ theme: t, textColor: e }) => t.colors[e || "neutral800"]};
19
19
  text-align: ${({ textAlign: t }) => t};
20
20
  text-decoration: ${({ textDecoration: t }) => t};
21
21
  text-transform: ${({ textTransform: t }) => t};
22
22
  `;
23
23
  export {
24
- m as Typography
24
+ h as Typography
25
25
  };
@@ -31,4 +31,4 @@
31
31
  text-transform: uppercase;
32
32
  `;default:return`
33
33
  font-size: ${i.fontSizes[2]};
34
- `}},o=({theme:e,textColor:i})=>e.colors[i||"neutral800"];exports.ellipsisStyle=n;exports.handleColor=o;exports.variantStyle=s;
34
+ `}};exports.ellipsisStyle=n;exports.variantStyle=s;
@@ -1,4 +1,4 @@
1
- import { SIGMA as e, PI as s, OMEGA as t, EPSILON as o, DELTA as l, BETA as f, ALPHA as r } from "./constants.js";
1
+ import { SIGMA as e, PI as s, OMEGA as t, EPSILON as o, DELTA as f, BETA as l, ALPHA as r } from "./constants.js";
2
2
  const $ = ({ ellipsis: n = !1 }) => n && `
3
3
  display: block;
4
4
  white-space: nowrap;
@@ -12,13 +12,13 @@ const $ = ({ ellipsis: n = !1 }) => n && `
12
12
  font-size: ${i.fontSizes[5]};
13
13
  line-height: ${i.lineHeights[2]};
14
14
  `;
15
- case f:
15
+ case l:
16
16
  return `
17
17
  font-weight: ${i.fontWeights.bold};
18
18
  font-size: ${i.fontSizes[4]};
19
19
  line-height: ${i.lineHeights[1]};
20
20
  `;
21
- case l:
21
+ case f:
22
22
  return `
23
23
  font-weight: ${i.fontWeights.semiBold};
24
24
  font-size: ${i.fontSizes[3]};
@@ -51,9 +51,8 @@ const $ = ({ ellipsis: n = !1 }) => n && `
51
51
  font-size: ${i.fontSizes[2]};
52
52
  `;
53
53
  }
54
- }, z = ({ theme: n, textColor: i }) => n.colors[i || "neutral800"];
54
+ };
55
55
  export {
56
56
  $ as ellipsisStyle,
57
- z as handleColor,
58
57
  a as variantStyle
59
58
  };
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),s=t=>({theme:o,size:r})=>o.sizes[t][r],i=(t="&")=>({theme:o,hasError:r=!1})=>e.css`
2
- outline: none;
3
- box-shadow: 0;
4
- transition-property: border-color, box-shadow, fill;
5
- transition-duration: 0.2s;
2
+ outline: none;
3
+ box-shadow: 0;
4
+ transition-property: border-color, box-shadow, fill;
5
+ transition-duration: 0.2s;
6
6
 
7
- ${t}:focus-within {
8
- border: 1px solid ${r?o.colors.danger600:o.colors.primary600};
9
- box-shadow: ${r?o.colors.danger600:o.colors.primary600} 0px 0px 0px 2px;
10
- }
11
- `,n=({theme:t})=>e.css`
7
+ ${t}:focus-within {
8
+ border: 1px solid ${r?o.colors.danger600:o.colors.primary600};
9
+ box-shadow: ${r?o.colors.danger600:o.colors.primary600} 0px 0px 0px 2px;
10
+ }
11
+ `,n=({theme:t})=>e.css`
12
12
  position: relative;
13
13
  outline: none;
14
14
 
@@ -1,15 +1,15 @@
1
1
  import { css as i } from "styled-components";
2
2
  const s = (t) => ({ theme: o, size: r }) => o.sizes[t][r], p = (t = "&") => ({ theme: o, hasError: r = !1 }) => i`
3
- outline: none;
4
- box-shadow: 0;
5
- transition-property: border-color, box-shadow, fill;
6
- transition-duration: 0.2s;
3
+ outline: none;
4
+ box-shadow: 0;
5
+ transition-property: border-color, box-shadow, fill;
6
+ transition-duration: 0.2s;
7
7
 
8
- ${t}:focus-within {
9
- border: 1px solid ${r ? o.colors.danger600 : o.colors.primary600};
10
- box-shadow: ${r ? o.colors.danger600 : o.colors.primary600} 0px 0px 0px 2px;
11
- }
12
- `, e = ({ theme: t }) => i`
8
+ ${t}:focus-within {
9
+ border: 1px solid ${r ? o.colors.danger600 : o.colors.primary600};
10
+ box-shadow: ${r ? o.colors.danger600 : o.colors.primary600} 0px 0px 0px 2px;
11
+ }
12
+ `, e = ({ theme: t }) => i`
13
13
  position: relative;
14
14
  outline: none;
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/design-system",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -19,22 +19,22 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@codemirror/lang-json": "^6.0.1",
22
- "@floating-ui/react-dom": "^1.3.0",
23
- "@internationalized/date": "^3.2.0",
24
- "@internationalized/number": "^3.2.0",
22
+ "@floating-ui/react-dom": "^2.0.1",
23
+ "@internationalized/date": "^3.3.0",
24
+ "@internationalized/number": "^3.2.1",
25
25
  "@radix-ui/react-dismissable-layer": "^1.0.4",
26
26
  "@radix-ui/react-dropdown-menu": "^2.0.5",
27
27
  "@radix-ui/react-focus-scope": "1.0.3",
28
- "@strapi/ui-primitives": "^1.8.1",
29
- "@uiw/react-codemirror": "^4.21.3",
28
+ "@strapi/ui-primitives": "^1.9.0",
29
+ "@uiw/react-codemirror": "^4.21.9",
30
30
  "aria-hidden": "^1.2.3",
31
31
  "compute-scroll-into-view": "^3.0.3",
32
32
  "prop-types": "^15.8.1",
33
- "react-remove-scroll": "^2.5.5"
33
+ "react-remove-scroll": "^2.5.6"
34
34
  },
35
35
  "devDependencies": {
36
- "@playwright/test": "1.33.0",
37
- "@strapi/icons": "^1.8.1",
36
+ "@playwright/test": "1.35.1",
37
+ "@strapi/icons": "^1.9.0",
38
38
  "@types/react-router-dom": "^5.3.3",
39
39
  "@types/styled-components": "^5.1.26",
40
40
  "axe-playwright": "^1.2.3",
@@ -65,5 +65,5 @@
65
65
  "test:e2e:watch": "chokidar '**/__tests__/*.e2e.js' -c 'npm run test:e2e -- --retries=0 {path}'",
66
66
  "test:e2e:debug": "cross-env PWDEBUG=1 playwright test"
67
67
  },
68
- "gitHead": "203b39b5eae476962807fa10b73ed0731d694da6"
68
+ "gitHead": "13f4821716ce30a1b2f7dd3c30d51de79baadee5"
69
69
  }
@@ -1,33 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),o=require("../themes/utils.cjs"),s=require("../Flex/Flex.cjs"),n=e=>e&&e.__esModule?e:{default:e},c=n(r),l=c.default(s.Flex)`
2
- line-height: ${({theme:e})=>e.lineHeights[2]};
3
-
4
- .cm-editor {
5
- /**
6
- * Hard coded since the color is the same between themes,
7
- * theme.colors.neutral800 changes between themes
8
- */
9
- background-color: #32324d;
10
- width: 100%;
11
- outline: none;
12
- }
13
-
14
- .cm-scroller {
15
- border: 1px solid ${({theme:e,hasError:t})=>t?e.colors.danger600:e.colors.neutral200};
16
- /* inputFocusStyle will receive hasError prop */
17
- ${o.inputFocusStyle()}
18
- }
19
-
20
- .cm-editor,
21
- .cm-scroller {
22
- border-radius: ${({theme:e})=>e.borderRadius};
23
- }
24
-
25
- .cm-gutters,
26
- .cm-activeLineGutter {
27
- /**
28
- * Hard coded since the color is the same between themes,
29
- * theme.colors.neutral700 changes between themes
30
- */
31
- background-color: #4a4a6a;
32
- }
33
- `;exports.JSONInputContainer=l;