@strapi/design-system 1.6.1 → 1.6.3
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/dist/Accordion/Accordion.cjs +5 -5
- package/dist/Accordion/Accordion.js +24 -22
- package/dist/Avatar/Avatar.cjs +5 -16
- package/dist/Avatar/Avatar.js +44 -48
- package/dist/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/BaseRadio/BaseRadio.js +25 -23
- package/dist/Box/Box.cjs +1 -1
- package/dist/Box/Box.js +36 -33
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +1 -1
- package/dist/Card/CardHeader.cjs +1 -2
- package/dist/Card/CardHeader.js +1 -1
- package/dist/Card/CardTimer.cjs +1 -5
- package/dist/Card/CardTimer.js +14 -20
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +9 -9
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +16 -16
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +139 -139
- package/dist/Combobox/ComboboxList.cjs +1 -1
- package/dist/Combobox/ComboboxList.js +5 -12
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +71 -71
- package/dist/Dialog/Dialog.cjs +4 -7
- package/dist/Dialog/Dialog.js +30 -29
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +7 -7
- package/dist/Field/FieldHint.cjs +1 -1
- package/dist/Field/FieldHint.js +4 -4
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +45 -42
- package/dist/JSONInput/JSONInputContainer.cjs +5 -2
- package/dist/JSONInput/JSONInputContainer.js +6 -3
- package/dist/Layout/HeaderLayout.cjs +3 -8
- package/dist/Layout/HeaderLayout.js +38 -38
- package/dist/Main/SkipToContent.cjs +1 -2
- package/dist/Main/SkipToContent.js +1 -1
- package/dist/MainNav/MainNav.cjs +1 -6
- package/dist/MainNav/MainNav.js +15 -15
- package/dist/MainNav/NavFooter.cjs +1 -3
- package/dist/MainNav/NavFooter.js +3 -4
- package/dist/ModalLayout/ModalLayout.cjs +3 -9
- package/dist/ModalLayout/ModalLayout.js +24 -23
- package/dist/NumberInput/NumberInput.cjs +1 -1
- package/dist/NumberInput/NumberInput.js +18 -18
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +112 -103
- package/dist/Popover/index.cjs +1 -1
- package/dist/Popover/index.js +9 -3
- package/dist/Select/Option.cjs +3 -7
- package/dist/Select/Option.js +6 -6
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +58 -58
- package/dist/Select/SelectTags.cjs +1 -3
- package/dist/Select/SelectTags.js +4 -4
- package/dist/Select/SingleSelect.cjs +82 -0
- package/dist/Select/SingleSelect.js +285 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/SimpleMenu/SimpleMenu.js +10 -10
- package/dist/Stack/Stack.cjs +5 -5
- package/dist/Stack/Stack.js +7 -6
- package/dist/SubNav/SubNavHeader.cjs +1 -1
- package/dist/SubNav/SubNavHeader.js +15 -15
- package/dist/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/SubNav/SubNavLinkSection.js +6 -6
- package/dist/SubNav/SubNavSection.cjs +1 -1
- package/dist/SubNav/SubNavSection.js +12 -12
- package/dist/Table/Table.cjs +1 -3
- package/dist/Table/Table.js +2 -3
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +11 -11
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +24 -24
- package/dist/Textarea/Textarea.cjs +1 -1
- package/dist/Textarea/Textarea.js +1 -1
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +2 -2
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +6 -6
- package/dist/ToggleCheckbox/ToggleCheckbox.js +45 -43
- package/dist/ToggleInput/ToggleInput.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.js +10 -10
- package/dist/Tooltip/Tooltip.cjs +2 -3
- package/dist/Tooltip/Tooltip.js +18 -18
- package/dist/helpers/deprecations.cjs +1 -0
- package/dist/helpers/deprecations.js +13 -0
- package/dist/helpers/useId.cjs +1 -1
- package/dist/helpers/useId.js +11 -4
- package/dist/hooks/useIntersection.cjs +1 -0
- package/dist/hooks/useIntersection.js +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +136 -134
- package/dist/v2/MainNav/MainNav.cjs +1 -6
- package/dist/v2/MainNav/MainNav.js +15 -15
- package/dist/v2/MainNav/NavFooter.cjs +1 -3
- package/dist/v2/MainNav/NavFooter.js +3 -4
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/v2/SimpleMenu/SimpleMenu.js +12 -12
- package/dist/v2/SubNav/SubNavHeader.cjs +1 -1
- package/dist/v2/SubNav/SubNavHeader.js +15 -15
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +8 -8
- package/dist/v2/SubNav/SubNavSection.cjs +1 -1
- package/dist/v2/SubNav/SubNavSection.js +4 -4
- package/package.json +3 -4
- package/dist/helpers/genId.cjs +0 -1
- package/dist/helpers/genId.js +0 -5
package/dist/Card/CardTimer.js
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
position: absolute;
|
|
7
|
-
bottom: ${({
|
|
8
|
-
theme: r
|
|
9
|
-
}) => r.spaces[1]};
|
|
10
|
-
right: ${({
|
|
11
|
-
theme: r
|
|
12
|
-
}) => r.spaces[1]};
|
|
13
|
-
`, l = ({
|
|
14
|
-
children: r,
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Box as i } from "../Box/Box.js";
|
|
3
|
+
import { Typography as a } from "../Typography/Typography.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
children: o,
|
|
15
6
|
...t
|
|
16
|
-
}) =>
|
|
17
|
-
|
|
7
|
+
}) => r(i, {
|
|
8
|
+
as: "time",
|
|
18
9
|
background: "neutral800",
|
|
10
|
+
bottom: 1,
|
|
11
|
+
right: 1,
|
|
19
12
|
color: "neutral0",
|
|
20
|
-
as: "time",
|
|
21
13
|
hasRadius: !0,
|
|
14
|
+
position: "absolute",
|
|
15
|
+
padding: 1,
|
|
22
16
|
...t,
|
|
23
|
-
children:
|
|
17
|
+
children: r(a, {
|
|
24
18
|
variant: "pi",
|
|
25
19
|
textColor: "neutral0",
|
|
26
|
-
children:
|
|
20
|
+
children: o
|
|
27
21
|
})
|
|
28
22
|
});
|
|
29
23
|
export {
|
|
30
|
-
|
|
24
|
+
p as CardTimer
|
|
31
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react"),m=require("prop-types"),E=require("./Carousel.cjs"),R=require("../Field/Field.cjs"),L=require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const I=require("../Field/FieldHint.cjs"),S=require("../Field/FieldError.cjs");require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const _=require("../Stack/Stack.cjs"),C=require("../helpers/useId.cjs"),u=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},r=u(v),e=u(m),l=({actions:t,children:a,error:n,hint:s,label:i,labelAction:o,nextLabel:c,onNext:f,onPrevious:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react"),m=require("prop-types"),E=require("./Carousel.cjs"),R=require("../Field/Field.cjs"),L=require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const I=require("../Field/FieldHint.cjs"),S=require("../Field/FieldError.cjs");require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const _=require("../Stack/Stack.cjs"),C=require("../helpers/useId.cjs"),u=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},r=u(v),e=u(m),l=({actions:t,children:a,error:n,hint:s,label:i,labelAction:o,nextLabel:c,onNext:f,onPrevious:F,previousLabel:p,required:q,secondaryLabel:b,selectedSlide:g,id:j,...y})=>{const d=C.useId(j);return r.default.createElement(R.Field,{hint:s,error:n,id:d,required:q},r.default.createElement(_.Stack,{spacing:1},i&&r.default.createElement(L.FieldLabel,{action:o},i),r.default.createElement(E.Carousel,{actions:t,label:i,nextLabel:c,onNext:f,onPrevious:F,previousLabel:p,secondaryLabel:b,selectedSlide:g,id:d,...y},a),r.default.createElement(I.FieldHint,null),r.default.createElement(S.FieldError,null)))};l.defaultProps={actions:void 0,error:void 0,hint:void 0,id:void 0,labelAction:void 0,required:!1,secondaryLabel:void 0};l.propTypes={actions:e.default.node,children:e.default.node.isRequired,error:e.default.string,hint:e.default.oneOfType([e.default.string,e.default.node,e.default.arrayOf(e.default.node)]),id:e.default.string,label:e.default.string.isRequired,labelAction:e.default.element,nextLabel:e.default.string.isRequired,onNext:e.default.func.isRequired,onPrevious:e.default.func.isRequired,previousLabel:e.default.string.isRequired,required:e.default.bool,secondaryLabel:e.default.string,selectedSlide:e.default.number.isRequired};exports.CarouselInput=l;
|
|
@@ -16,10 +16,10 @@ const t = ({
|
|
|
16
16
|
error: l,
|
|
17
17
|
hint: s,
|
|
18
18
|
label: i,
|
|
19
|
-
labelAction:
|
|
20
|
-
nextLabel:
|
|
21
|
-
onNext:
|
|
22
|
-
onPrevious:
|
|
19
|
+
labelAction: m,
|
|
20
|
+
nextLabel: a,
|
|
21
|
+
onNext: p,
|
|
22
|
+
onPrevious: u,
|
|
23
23
|
previousLabel: c,
|
|
24
24
|
required: f,
|
|
25
25
|
secondaryLabel: g,
|
|
@@ -27,7 +27,7 @@ const t = ({
|
|
|
27
27
|
id: b,
|
|
28
28
|
...v
|
|
29
29
|
}) => {
|
|
30
|
-
const o = x(
|
|
30
|
+
const o = x(b);
|
|
31
31
|
return /* @__PURE__ */ r.createElement(E, {
|
|
32
32
|
hint: s,
|
|
33
33
|
error: l,
|
|
@@ -36,13 +36,13 @@ const t = ({
|
|
|
36
36
|
}, /* @__PURE__ */ r.createElement(h, {
|
|
37
37
|
spacing: 1
|
|
38
38
|
}, i && /* @__PURE__ */ r.createElement(y, {
|
|
39
|
-
action:
|
|
39
|
+
action: m
|
|
40
40
|
}, i), /* @__PURE__ */ r.createElement(R, {
|
|
41
41
|
actions: n,
|
|
42
42
|
label: i,
|
|
43
|
-
nextLabel:
|
|
44
|
-
onNext:
|
|
45
|
-
onPrevious:
|
|
43
|
+
nextLabel: a,
|
|
44
|
+
onNext: p,
|
|
45
|
+
onPrevious: u,
|
|
46
46
|
previousLabel: c,
|
|
47
47
|
secondaryLabel: g,
|
|
48
48
|
selectedSlide: q,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),p=require("styled-components"),y=require("prop-types"),F=require("../BaseCheckbox/BaseCheckbox.cjs"),b=require("../Stack/Stack.cjs"),x=require("../Field/Field.cjs");require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const h=require("../Field/FieldHint.cjs"),q=require("../Field/FieldError.cjs"),g=require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const j=require("../Box/Box.cjs"),k=require("../helpers/useId.cjs"),m=require("../Typography/Typography.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),p=require("styled-components"),y=require("prop-types"),F=require("../BaseCheckbox/BaseCheckbox.cjs"),b=require("../Stack/Stack.cjs"),x=require("../Field/Field.cjs");require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const h=require("../Field/FieldHint.cjs"),q=require("../Field/FieldError.cjs"),g=require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const j=require("../Box/Box.cjs"),k=require("../helpers/useId.cjs"),m=require("../Typography/Typography.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=o(f),C=o(p),t=o(y),E=C.default(m.Typography)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: flex-start;
|
|
4
4
|
* {
|
|
5
5
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
6
6
|
}
|
|
7
|
-
`,T=e=>{const{id:l}=g.useField();return r.default.createElement(F.BaseCheckbox,{id:l,...e})},a=({children:e,disabled:l,id:n,hint:
|
|
7
|
+
`,T=e=>{const{id:l}=g.useField();return r.default.createElement(F.BaseCheckbox,{id:l,...e})},a=({children:e,disabled:l,id:n,hint:s,error:c,...u})=>{const d=k.useId(n);let i;return c?i=`${d}-error`:s&&(i=`${d}-hint`),r.default.createElement(x.Field,{id:d,hint:s,error:c},r.default.createElement(b.Stack,{spacing:1},r.default.createElement(E,{as:"label",textColor:"neutral800",disabled:l},r.default.createElement(T,{disabled:l,"aria-describedby":i,...u}),r.default.createElement(j.Box,{paddingLeft:2},e)),r.default.createElement(h.FieldHint,null),r.default.createElement(q.FieldError,null)))};a.defaultProps={disabled:!1,id:void 0,error:void 0,hint:void 0};a.propTypes={children:t.default.node.isRequired,disabled:t.default.bool,error:t.default.string,hint:t.default.oneOfType([t.default.string,t.default.node,t.default.arrayOf(t.default.node)]),id:t.default.oneOfType([t.default.string,t.default.number])};exports.Checkbox=a;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import
|
|
2
|
+
import s from "styled-components";
|
|
3
3
|
import e from "prop-types";
|
|
4
|
-
import { BaseCheckbox as
|
|
4
|
+
import { BaseCheckbox as c } from "../BaseCheckbox/BaseCheckbox.js";
|
|
5
5
|
import { Stack as f } from "../Stack/Stack.js";
|
|
6
|
-
import { Field as
|
|
6
|
+
import { Field as u } from "../Field/Field.js";
|
|
7
7
|
import "../Field/FieldLabel.js";
|
|
8
8
|
import "../Field/FieldInput.js";
|
|
9
|
-
import { FieldHint as
|
|
10
|
-
import { FieldError as
|
|
11
|
-
import { useField as
|
|
9
|
+
import { FieldHint as b } from "../Field/FieldHint.js";
|
|
10
|
+
import { FieldError as y } from "../Field/FieldError.js";
|
|
11
|
+
import { useField as x } from "../Field/FieldContext.js";
|
|
12
12
|
import "../Field/FieldAction.js";
|
|
13
|
-
import { Box as
|
|
14
|
-
import { useId as
|
|
15
|
-
import { Typography as
|
|
16
|
-
const k =
|
|
13
|
+
import { Box as E } from "../Box/Box.js";
|
|
14
|
+
import { useId as g } from "../helpers/useId.js";
|
|
15
|
+
import { Typography as h } from "../Typography/Typography.js";
|
|
16
|
+
const k = s(h)`
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: flex-start;
|
|
19
19
|
* {
|
|
20
20
|
cursor: ${({ disabled: o }) => o ? "not-allowed" : "pointer"};
|
|
21
21
|
}
|
|
22
22
|
`, T = (o) => {
|
|
23
|
-
const { id: t } =
|
|
24
|
-
return /* @__PURE__ */ r.createElement(
|
|
23
|
+
const { id: t } = x();
|
|
24
|
+
return /* @__PURE__ */ r.createElement(c, {
|
|
25
25
|
id: t,
|
|
26
26
|
...o
|
|
27
27
|
});
|
|
28
28
|
}, a = ({ children: o, disabled: t, id: p, hint: m, error: l, ...d }) => {
|
|
29
|
-
const i =
|
|
29
|
+
const i = g(p);
|
|
30
30
|
let n;
|
|
31
|
-
return l ? n = `${i}-error` : m && (n = `${i}-hint`), /* @__PURE__ */ r.createElement(
|
|
31
|
+
return l ? n = `${i}-error` : m && (n = `${i}-hint`), /* @__PURE__ */ r.createElement(u, {
|
|
32
32
|
id: i,
|
|
33
33
|
hint: m,
|
|
34
34
|
error: l
|
|
@@ -42,9 +42,9 @@ const k = c(g)`
|
|
|
42
42
|
disabled: t,
|
|
43
43
|
"aria-describedby": n,
|
|
44
44
|
...d
|
|
45
|
-
}), /* @__PURE__ */ r.createElement(
|
|
45
|
+
}), /* @__PURE__ */ r.createElement(E, {
|
|
46
46
|
paddingLeft: 2
|
|
47
|
-
}, o)), /* @__PURE__ */ r.createElement(
|
|
47
|
+
}, o)), /* @__PURE__ */ r.createElement(b, null), /* @__PURE__ */ r.createElement(y, null)));
|
|
48
48
|
};
|
|
49
49
|
a.defaultProps = {
|
|
50
50
|
disabled: !1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),he=require("prop-types"),H=require("@strapi/icons"),ve=require("../helpers/useId.cjs"),l=require("./utils.cjs"),_=require("../Flex/Flex.cjs"),N=require("../Select/components.cjs"),Ee=require("../Popover/Popover.cjs"),Fe=require("../Box/Box.cjs"),U=require("../Typography/Typography.cjs"),Ie=require("../Loader/Loader.cjs"),q=require("./components.cjs"),ke=require("./ComboboxOption.cjs"),qe=require("../Field/Field.cjs"),Me=require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const Oe=require("../Field/FieldHint.cjs"),je=require("../Field/FieldError.cjs");require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const Se=require("../Stack/Stack.cjs"),Le=require("../helpers/keyboardKeys.cjs"),Re=require("../VisuallyHidden/VisuallyHidden.cjs"),z=r=>r&&typeof r=="object"&&"default"in r?r:{default:r},o=z(a),e=z(he),C=({children:r,clearLabel:W,creatable:x,createMessage:G,disabled:d,error:F,hasMoreItems:J,hint:M,id:Q,label:h,labelAction:X,loading:O,loadingMessage:Y,noOptionsMessage:Z,onChange:R,onClear:A,onCreateOption:ee,onInputChange:T,onLoadMore:te,placeholder:oe,required:$,value:p,...ne})=>{const ae=()=>r.find(t=>t.props?.value.toLowerCase()===p.toLowerCase()).props?.children,[c,w]=a.useState(0),[re,le]=a.useState(null),[u,B]=a.useState(r),[m,se]=a.useState(!1),[s,I]=a.useState(""),v=a.useRef(),k=a.useRef(!1),E=a.useRef(),D=a.useRef(),ie=a.useRef(),P=a.useRef(!0),i=ve.useId(Q),ce=`${i}-label`;if(!h&&!ne["aria-label"])throw new Error('The Combobox component needs a "label" or an "aria-label" props');a.useEffect(()=>{B(l.filterOptions(r,s))},[s,r]),a.useEffect(()=>{m&&v.current&&l.maintainScrollVisibility(v.current)},[c,m]),a.useLayoutEffect(()=>{P.current&&(P.current=!1)},[p]);const ue=m?`${i}-${c}`:"",V=()=>{R(null),I("")},de=t=>{T&&T(t);const n=E.current.value;B(l.filterOptions(r,n)),w(0),le(null),s!==n&&I(n),m||b(!0,!1)},fe=t=>{const{key:n}=t,f=x&&s?u.length:u.length-1,y=l.getActionFromKey(n,m);switch(p&&!s&&n===Le.KeyboardKeys.BACKSPACE&&V(),y){case l.MenuActions.Next:{if(c===f){g(0);break}g(l.getUpdatedIndex(c,f,y));break}case l.MenuActions.Previous:{if(c===0){g(f);break}g(l.getUpdatedIndex(c,f,y));break}case l.MenuActions.Last:case l.MenuActions.First:{if(c===f){g(0);break}g(l.getUpdatedIndex(c,f,y));break}case l.MenuActions.CloseSelect:t.preventDefault(),j(c);break;case l.MenuActions.Close:t.preventDefault(),b(!1);break;case l.MenuActions.Open:b(!0);break}},pe=t=>{if(t.preventDefault(),p&&!k.current&&I(""),k.current){k.current=!1;return}b(!1,!1)},g=t=>{w(t)},be=t=>{g(t),j(t)},K=()=>{k.current=!0},j=t=>{const n=u[t];if(I(""),n){R(n.props.value),b(!1);return}x&&(ee(s),b(!1))},b=(t,n=!0)=>{se(t),n&&E.current.focus()},me=a.Children.toArray(u).map((t,n)=>{const f=c===n;return a.cloneElement(t,{id:`${i}-${n}`,"aria-selected":re===n,"aria-posinset":n+1,"aria-setsize":a.Children.toArray(u).length,ref(y){f&&(v.current=y)},onClick:()=>be(n),onMouseDown:K,isSelected:f})}),ge=()=>{E.current.focus(),A&&A(),V()},ye=()=>{E.current.focus(),b(!0)},Ce=()=>{const t=u.findIndex(n=>n.props?.children===s);return s&&t===-1},xe=t=>{t.preventDefault(),b(t,!0)};let S;return F?S=`${i}-error`:M&&(S=`${i}-hint`),o.default.createElement(qe.Field,{hint:M,error:F,id:i,required:$},o.default.createElement(Re.VisuallyHidden,{"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text"},p),o.default.createElement(Se.Stack,{spacing:h||M||F?1:0},h&&o.default.createElement(Me.FieldLabel,{action:X},h),o.default.createElement(q.MainRow,{ref:D,$disabled:d,hasError:F},o.default.createElement(q.InputContainer,{wrap:"wrap"},!s&&p&&o.default.createElement(q.ValueContainer,{id:`${i}-selected-value`},o.default.createElement(U.Typography,null,ae())),o.default.createElement(q.Input,{"aria-activedescendant":ue,"aria-autocomplete":"list","aria-controls":`${i}-listbox`,"aria-disabled":d,"aria-expanded":m,"aria-haspopup":"listbox","aria-describedby":S,autoComplete:"off",autoCorrect:"off",id:i,onBlur:d?void 0:pe,onClick:d?void 0:xe,onInput:d?void 0:de,onKeyDown:d?void 0:fe,placeholder:p?"":oe,readOnly:d,ref:E,required:$,role:"combobox",spellCheck:"off",type:"text",value:s})),o.default.createElement(_.Flex,null,(p||s)&&o.default.createElement(N.IconBox,{id:`${i}-clear`,"aria-label":W,disabled:d,paddingLeft:3,as:"button",onClick:ge,type:"button"},o.default.createElement(H.Cross,null)),o.default.createElement(N.CaretBox,{disabled:d,paddingLeft:3,"aria-hidden":!0,as:"button",onClick:ye,tabIndex:-1,type:"button"},o.default.createElement(H.CarretDown,null)))),o.default.createElement(Oe.FieldHint,null),o.default.createElement(je.FieldError,null)),m&&o.default.createElement(Ee.Popover,{id:`${i}-popover`,source:D,spacing:4,fullWidth:!0,intersectionId:`${i}-listbox-popover-intersection`,onReachEnd:J&&!O?te:void 0},o.default.createElement("div",{role:"listbox",ref:ie,id:`${i}-listbox`,"aria-labelledby":h?ce:void 0},(Boolean(u.length)||x)&&o.default.createElement(o.default.Fragment,null,me,Ce()&&x&&o.default.createElement(ke.ComboboxOption,{isSelected:c===u.length,ref:t=>{c===u.length&&(v.current=t)},onMouseDown:K,onClick:()=>j(),taindex:0},G(s))),!u.length&&!x&&!O&&o.default.createElement(Fe.Box,{paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2,ref:v},o.default.createElement(U.Typography,{textColor:"neutral800"},Z(s))),O&&o.default.createElement(_.Flex,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2},o.default.createElement(Ie.Loader,{small:!0},Y)))))},L=r=>o.default.createElement(C,{...r,creatable:!0});C.defaultProps={"aria-label":void 0,clearLabel:"clear",creatable:!1,createMessage:r=>`Create "${r}"`,disabled:!1,error:void 0,hasMoreItems:!1,hint:void 0,id:void 0,label:void 0,loading:!1,loadingMessage:"Loading content...",noOptionsMessage:()=>"No results found",onClear:void 0,onCreateOption:void 0,onInputChange:void 0,onLoadMore:void 0,placeholder:"Select or enter a value",value:void 0};L.defaultProps=C.defaultProps;C.propTypes={"aria-label":e.default.string,children:e.default.oneOfType([e.default.arrayOf(e.default.node),e.default.node]),clearLabel:e.default.string,creatable:e.default.bool,createMessage:e.default.func,disabled:e.default.bool,error:e.default.string,hasMoreItems:e.default.bool,id:e.default.string,hint:e.default.oneOfType([e.default.string,e.default.node,e.default.arrayOf(e.default.node)]),label:e.default.string,labelAction:e.default.element,loading:e.default.bool,loadingMessage:e.default.string,noOptionsMessage:e.default.func,onChange:e.default.func.isRequired,onClear:e.default.func,onCreateOption:e.default.func,onInputChange:e.default.func,onLoadMore:e.default.func,placeholder:e.default.string,value:e.default.string};L.propTypes={...C.propTypes,onCreateOption:e.default.func.isRequired};exports.Combobox=C;exports.CreatableCombobox=L;
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import o, { useState as y, useRef as
|
|
1
|
+
import o, { useState as y, useRef as C, useEffect as U, useLayoutEffect as xe, Children as _, cloneElement as ye } from "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { filterOptions as j, maintainScrollVisibility as
|
|
3
|
+
import { Cross as Ie, CarretDown as ke } from "@strapi/icons";
|
|
4
|
+
import { useId as Oe } from "../helpers/useId.js";
|
|
5
|
+
import { filterOptions as j, maintainScrollVisibility as Me, getActionFromKey as $e, MenuActions as b, getUpdatedIndex as R } from "./utils.js";
|
|
6
6
|
import { Flex as q } from "../Flex/Flex.js";
|
|
7
|
-
import { IconBox as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { Box as
|
|
7
|
+
import { IconBox as we, CaretBox as Le } from "../Select/components.js";
|
|
8
|
+
import { Popover as De } from "../Popover/Popover.js";
|
|
9
|
+
import { Box as Re } from "../Box/Box.js";
|
|
10
10
|
import { Typography as z } from "../Typography/Typography.js";
|
|
11
|
-
import { Loader as
|
|
12
|
-
import { MainRow as
|
|
13
|
-
import { ComboboxOption as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { FieldLabel as Ve } from "../Field/FieldLabel.js";
|
|
11
|
+
import { Loader as Se } from "../Loader/Loader.js";
|
|
12
|
+
import { MainRow as Be, InputContainer as Fe, ValueContainer as Te, Input as Ae } from "./components.js";
|
|
13
|
+
import { ComboboxOption as Pe } from "./ComboboxOption.js";
|
|
14
|
+
import { Field as Ve } from "../Field/Field.js";
|
|
15
|
+
import { FieldLabel as Ke } from "../Field/FieldLabel.js";
|
|
17
16
|
import "../Field/FieldInput.js";
|
|
18
|
-
import { FieldHint as
|
|
19
|
-
import { FieldError as
|
|
17
|
+
import { FieldHint as Ne } from "../Field/FieldHint.js";
|
|
18
|
+
import { FieldError as He } from "../Field/FieldError.js";
|
|
20
19
|
import "../Field/FieldContext.js";
|
|
21
20
|
import "../Field/FieldAction.js";
|
|
22
|
-
import { Stack as
|
|
23
|
-
import { KeyboardKeys as
|
|
24
|
-
import { VisuallyHidden as
|
|
21
|
+
import { Stack as Ue } from "../Stack/Stack.js";
|
|
22
|
+
import { KeyboardKeys as _e } from "../helpers/keyboardKeys.js";
|
|
23
|
+
import { VisuallyHidden as je } from "../VisuallyHidden/VisuallyHidden.js";
|
|
25
24
|
const I = ({
|
|
26
25
|
children: s,
|
|
27
26
|
clearLabel: G,
|
|
28
|
-
creatable:
|
|
27
|
+
creatable: h,
|
|
29
28
|
createMessage: J,
|
|
30
29
|
disabled: c,
|
|
31
|
-
error:
|
|
30
|
+
error: k,
|
|
32
31
|
hasMoreItems: Q,
|
|
33
|
-
hint:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
hint: $,
|
|
33
|
+
id: X,
|
|
34
|
+
label: E,
|
|
35
|
+
labelAction: Y,
|
|
36
|
+
loading: w,
|
|
37
|
+
loadingMessage: Z,
|
|
38
|
+
noOptionsMessage: ee,
|
|
39
39
|
onChange: S,
|
|
40
40
|
onClear: B,
|
|
41
|
-
onCreateOption:
|
|
42
|
-
onInputChange:
|
|
43
|
-
onLoadMore:
|
|
44
|
-
placeholder:
|
|
45
|
-
required:
|
|
41
|
+
onCreateOption: te,
|
|
42
|
+
onInputChange: F,
|
|
43
|
+
onLoadMore: oe,
|
|
44
|
+
placeholder: re,
|
|
45
|
+
required: T,
|
|
46
46
|
value: d,
|
|
47
47
|
...ne
|
|
48
48
|
}) => {
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
49
|
+
const ae = () => s.find((t) => t.props?.value.toLowerCase() === d.toLowerCase()).props?.children, [i, A] = y(0), [ie, le] = y(null), [l, P] = y(s), [u, se] = y(!1), [n, O] = y(""), v = C(), M = C(!1), x = C(), V = C(), ce = C(), K = C(!0), a = Oe(X), pe = `${a}-label`;
|
|
50
|
+
if (!E && !ne["aria-label"])
|
|
51
51
|
throw new Error('The Combobox component needs a "label" or an "aria-label" props');
|
|
52
52
|
U(() => {
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
u &&
|
|
56
|
-
}, [
|
|
57
|
-
|
|
53
|
+
P(j(s, n));
|
|
54
|
+
}, [n, s]), U(() => {
|
|
55
|
+
u && v.current && Me(v.current);
|
|
56
|
+
}, [i, u]), xe(() => {
|
|
57
|
+
K.current && (K.current = !1);
|
|
58
58
|
}, [d]);
|
|
59
|
-
const
|
|
60
|
-
S(null),
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
const { key:
|
|
67
|
-
switch (d && !
|
|
59
|
+
const de = u ? `${a}-${i}` : "", N = () => {
|
|
60
|
+
S(null), O("");
|
|
61
|
+
}, fe = (t) => {
|
|
62
|
+
F && F(t);
|
|
63
|
+
const r = x.current.value;
|
|
64
|
+
P(j(s, r)), A(0), le(null), n !== r && O(r), u || f(!0, !1);
|
|
65
|
+
}, ue = (t) => {
|
|
66
|
+
const { key: r } = t, p = h && n ? l.length : l.length - 1, g = $e(r, u);
|
|
67
|
+
switch (d && !n && r === _e.BACKSPACE && N(), g) {
|
|
68
68
|
case b.Next: {
|
|
69
|
-
if (
|
|
69
|
+
if (i === p) {
|
|
70
70
|
m(0);
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
|
-
m(
|
|
73
|
+
m(R(i, p, g));
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
case b.Previous: {
|
|
77
|
-
if (
|
|
77
|
+
if (i === 0) {
|
|
78
78
|
m(p);
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
|
-
m(
|
|
81
|
+
m(R(i, p, g));
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
84
|
case b.Last:
|
|
85
85
|
case b.First: {
|
|
86
|
-
if (
|
|
86
|
+
if (i === p) {
|
|
87
87
|
m(0);
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
|
-
m(
|
|
90
|
+
m(R(i, p, g));
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
case b.CloseSelect:
|
|
94
|
-
t.preventDefault(),
|
|
94
|
+
t.preventDefault(), L(i);
|
|
95
95
|
break;
|
|
96
96
|
case b.Close:
|
|
97
97
|
t.preventDefault(), f(!1);
|
|
@@ -100,150 +100,148 @@ const I = ({
|
|
|
100
100
|
f(!0);
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
|
-
},
|
|
104
|
-
if (t.preventDefault(), d && !
|
|
105
|
-
|
|
103
|
+
}, me = (t) => {
|
|
104
|
+
if (t.preventDefault(), d && !M.current && O(""), M.current) {
|
|
105
|
+
M.current = !1;
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
f(!1, !1);
|
|
109
109
|
}, m = (t) => {
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
m(t),
|
|
110
|
+
A(t);
|
|
111
|
+
}, be = (t) => {
|
|
112
|
+
m(t), L(t);
|
|
113
113
|
}, H = () => {
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
S(
|
|
114
|
+
M.current = !0;
|
|
115
|
+
}, L = (t) => {
|
|
116
|
+
const r = l[t];
|
|
117
|
+
if (O(""), r) {
|
|
118
|
+
S(r.props.value), f(!1);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
}, f = (t,
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
const p =
|
|
126
|
-
return
|
|
127
|
-
id: `${
|
|
128
|
-
"aria-selected":
|
|
129
|
-
"aria-posinset":
|
|
121
|
+
h && (te(n), f(!1));
|
|
122
|
+
}, f = (t, r = !0) => {
|
|
123
|
+
se(t), r && x.current.focus();
|
|
124
|
+
}, ge = _.toArray(l).map((t, r) => {
|
|
125
|
+
const p = i === r;
|
|
126
|
+
return ye(t, {
|
|
127
|
+
id: `${a}-${r}`,
|
|
128
|
+
"aria-selected": ie === r,
|
|
129
|
+
"aria-posinset": r + 1,
|
|
130
130
|
"aria-setsize": _.toArray(l).length,
|
|
131
|
-
ref(
|
|
132
|
-
p && (
|
|
131
|
+
ref(g) {
|
|
132
|
+
p && (v.current = g);
|
|
133
133
|
},
|
|
134
|
-
onClick: () =>
|
|
134
|
+
onClick: () => be(r),
|
|
135
135
|
onMouseDown: H,
|
|
136
136
|
isSelected: p
|
|
137
137
|
});
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
const t = l.findIndex((
|
|
144
|
-
return
|
|
145
|
-
},
|
|
138
|
+
}), Ce = () => {
|
|
139
|
+
x.current.focus(), B && B(), N();
|
|
140
|
+
}, he = () => {
|
|
141
|
+
x.current.focus(), f(!0);
|
|
142
|
+
}, Ee = () => {
|
|
143
|
+
const t = l.findIndex((r) => r.props?.children === n);
|
|
144
|
+
return n && t === -1;
|
|
145
|
+
}, ve = (t) => {
|
|
146
146
|
t.preventDefault(), f(t, !0);
|
|
147
147
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
let D;
|
|
149
|
+
return k ? D = `${a}-error` : $ && (D = `${a}-hint`), /* @__PURE__ */ o.createElement(Ve, {
|
|
150
|
+
hint: $,
|
|
151
|
+
error: k,
|
|
152
|
+
id: a,
|
|
153
|
+
required: T
|
|
154
|
+
}, /* @__PURE__ */ o.createElement(je, {
|
|
154
155
|
"aria-live": "polite",
|
|
155
156
|
"aria-atomic": "false",
|
|
156
157
|
"aria-relevant": "additions text"
|
|
157
|
-
}, d), /* @__PURE__ */ o.createElement(
|
|
158
|
-
spacing:
|
|
159
|
-
},
|
|
160
|
-
action:
|
|
161
|
-
},
|
|
162
|
-
ref:
|
|
158
|
+
}, d), /* @__PURE__ */ o.createElement(Ue, {
|
|
159
|
+
spacing: E || $ || k ? 1 : 0
|
|
160
|
+
}, E && /* @__PURE__ */ o.createElement(Ke, {
|
|
161
|
+
action: Y
|
|
162
|
+
}, E), /* @__PURE__ */ o.createElement(Be, {
|
|
163
|
+
ref: V,
|
|
163
164
|
$disabled: c,
|
|
164
|
-
hasError:
|
|
165
|
-
}, /* @__PURE__ */ o.createElement(
|
|
165
|
+
hasError: k
|
|
166
|
+
}, /* @__PURE__ */ o.createElement(Fe, {
|
|
166
167
|
wrap: "wrap"
|
|
167
|
-
}, !
|
|
168
|
-
id: `${
|
|
169
|
-
}, /* @__PURE__ */ o.createElement(z, null,
|
|
170
|
-
"aria-activedescendant":
|
|
168
|
+
}, !n && d && /* @__PURE__ */ o.createElement(Te, {
|
|
169
|
+
id: `${a}-selected-value`
|
|
170
|
+
}, /* @__PURE__ */ o.createElement(z, null, ae())), /* @__PURE__ */ o.createElement(Ae, {
|
|
171
|
+
"aria-activedescendant": de,
|
|
171
172
|
"aria-autocomplete": "list",
|
|
172
|
-
"aria-controls": `${
|
|
173
|
+
"aria-controls": `${a}-listbox`,
|
|
173
174
|
"aria-disabled": c,
|
|
174
175
|
"aria-expanded": u,
|
|
175
176
|
"aria-haspopup": "listbox",
|
|
176
|
-
"aria-
|
|
177
|
+
"aria-describedby": D,
|
|
177
178
|
autoComplete: "off",
|
|
178
179
|
autoCorrect: "off",
|
|
179
|
-
id:
|
|
180
|
-
onBlur: c ? void 0 :
|
|
181
|
-
onClick: c ? void 0 :
|
|
182
|
-
onInput: c ? void 0 :
|
|
183
|
-
onKeyDown: c ? void 0 :
|
|
184
|
-
placeholder: d ? "" :
|
|
180
|
+
id: a,
|
|
181
|
+
onBlur: c ? void 0 : me,
|
|
182
|
+
onClick: c ? void 0 : ve,
|
|
183
|
+
onInput: c ? void 0 : fe,
|
|
184
|
+
onKeyDown: c ? void 0 : ue,
|
|
185
|
+
placeholder: d ? "" : re,
|
|
185
186
|
readOnly: c,
|
|
186
|
-
ref:
|
|
187
|
-
required:
|
|
187
|
+
ref: x,
|
|
188
|
+
required: T,
|
|
188
189
|
role: "combobox",
|
|
189
190
|
spellCheck: "off",
|
|
190
191
|
type: "text",
|
|
191
|
-
value:
|
|
192
|
-
})), /* @__PURE__ */ o.createElement(q, null, (d ||
|
|
193
|
-
id: `${
|
|
192
|
+
value: n
|
|
193
|
+
})), /* @__PURE__ */ o.createElement(q, null, (d || n) && /* @__PURE__ */ o.createElement(we, {
|
|
194
|
+
id: `${a}-clear`,
|
|
194
195
|
"aria-label": G,
|
|
195
196
|
disabled: c,
|
|
196
197
|
paddingLeft: 3,
|
|
197
198
|
as: "button",
|
|
198
|
-
onClick:
|
|
199
|
+
onClick: Ce,
|
|
199
200
|
type: "button"
|
|
200
|
-
}, /* @__PURE__ */ o.createElement(
|
|
201
|
+
}, /* @__PURE__ */ o.createElement(Ie, null)), /* @__PURE__ */ o.createElement(Le, {
|
|
201
202
|
disabled: c,
|
|
202
203
|
paddingLeft: 3,
|
|
203
204
|
"aria-hidden": !0,
|
|
204
205
|
as: "button",
|
|
205
|
-
onClick:
|
|
206
|
+
onClick: he,
|
|
206
207
|
tabIndex: -1,
|
|
207
208
|
type: "button"
|
|
208
|
-
}, /* @__PURE__ */ o.createElement(
|
|
209
|
-
id: `${
|
|
210
|
-
source:
|
|
209
|
+
}, /* @__PURE__ */ o.createElement(ke, null)))), /* @__PURE__ */ o.createElement(Ne, null), /* @__PURE__ */ o.createElement(He, null)), u && /* @__PURE__ */ o.createElement(De, {
|
|
210
|
+
id: `${a}-popover`,
|
|
211
|
+
source: V,
|
|
211
212
|
spacing: 4,
|
|
212
213
|
fullWidth: !0,
|
|
213
|
-
intersectionId: `${
|
|
214
|
-
onReachEnd: Q && !
|
|
214
|
+
intersectionId: `${a}-listbox-popover-intersection`,
|
|
215
|
+
onReachEnd: Q && !w ? oe : void 0
|
|
215
216
|
}, /* @__PURE__ */ o.createElement("div", {
|
|
216
217
|
role: "listbox",
|
|
217
|
-
ref:
|
|
218
|
-
id: `${
|
|
219
|
-
"aria-labelledby":
|
|
220
|
-
}, (Boolean(l.length) ||
|
|
221
|
-
|
|
222
|
-
options: me
|
|
223
|
-
}), Ce() && x && /* @__PURE__ */ o.createElement(Te, {
|
|
224
|
-
isSelected: a === l.length,
|
|
218
|
+
ref: ce,
|
|
219
|
+
id: `${a}-listbox`,
|
|
220
|
+
"aria-labelledby": E ? pe : void 0
|
|
221
|
+
}, (Boolean(l.length) || h) && /* @__PURE__ */ o.createElement(o.Fragment, null, ge, Ee() && h && /* @__PURE__ */ o.createElement(Pe, {
|
|
222
|
+
isSelected: i === l.length,
|
|
225
223
|
ref: (t) => {
|
|
226
|
-
|
|
224
|
+
i === l.length && (v.current = t);
|
|
227
225
|
},
|
|
228
226
|
onMouseDown: H,
|
|
229
|
-
onClick: () =>
|
|
227
|
+
onClick: () => L(),
|
|
230
228
|
taindex: 0
|
|
231
|
-
}, J(
|
|
229
|
+
}, J(n))), !l.length && !h && !w && /* @__PURE__ */ o.createElement(Re, {
|
|
232
230
|
paddingLeft: 4,
|
|
233
231
|
paddingRight: 4,
|
|
234
232
|
paddingTop: 2,
|
|
235
233
|
paddingBottom: 2,
|
|
236
|
-
ref:
|
|
234
|
+
ref: v
|
|
237
235
|
}, /* @__PURE__ */ o.createElement(z, {
|
|
238
236
|
textColor: "neutral800"
|
|
239
|
-
},
|
|
237
|
+
}, ee(n))), w && /* @__PURE__ */ o.createElement(q, {
|
|
240
238
|
justifyContent: "center",
|
|
241
239
|
alignItems: "center",
|
|
242
240
|
paddingTop: 2,
|
|
243
241
|
paddingBottom: 2
|
|
244
|
-
}, /* @__PURE__ */ o.createElement(
|
|
242
|
+
}, /* @__PURE__ */ o.createElement(Se, {
|
|
245
243
|
small: !0
|
|
246
|
-
},
|
|
244
|
+
}, Z)))));
|
|
247
245
|
}, W = (s) => /* @__PURE__ */ o.createElement(I, {
|
|
248
246
|
...s,
|
|
249
247
|
creatable: !0
|
|
@@ -257,6 +255,7 @@ I.defaultProps = {
|
|
|
257
255
|
error: void 0,
|
|
258
256
|
hasMoreItems: !1,
|
|
259
257
|
hint: void 0,
|
|
258
|
+
id: void 0,
|
|
260
259
|
label: void 0,
|
|
261
260
|
loading: !1,
|
|
262
261
|
loadingMessage: "Loading content...",
|
|
@@ -278,6 +277,7 @@ I.propTypes = {
|
|
|
278
277
|
disabled: e.bool,
|
|
279
278
|
error: e.string,
|
|
280
279
|
hasMoreItems: e.bool,
|
|
280
|
+
id: e.string,
|
|
281
281
|
hint: e.oneOfType([e.string, e.node, e.arrayOf(e.node)]),
|
|
282
282
|
label: e.string,
|
|
283
283
|
labelAction: e.element,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("prop-types"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=r(t),o=({options:e})=>e;o.propTypes={options:s.default.array.isRequired};exports.ComboboxList=o;
|