@strapi/design-system 1.5.0 → 1.6.0-alpha.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/dist/Accordion/Accordion.cjs +8 -8
- package/dist/Accordion/Accordion.js +73 -67
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +20 -17
- package/dist/Accordion/AccordionContext.cjs +1 -1
- package/dist/Accordion/AccordionContext.js +10 -4
- package/dist/Accordion/AccordionGroup.cjs +20 -20
- package/dist/Accordion/AccordionGroup.js +98 -59
- package/dist/Accordion/AccordionToggle.cjs +3 -3
- package/dist/Accordion/AccordionToggle.js +108 -89
- package/dist/Accordion/utils.cjs +1 -1
- package/dist/Accordion/utils.js +4 -4
- package/dist/Alert/Alert.cjs +7 -7
- package/dist/Alert/Alert.js +92 -85
- package/dist/Avatar/Avatar.cjs +6 -6
- package/dist/Avatar/Avatar.js +68 -67
- package/dist/Avatar/constants.cjs +1 -1
- package/dist/Avatar/constants.js +1 -1
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.js +37 -37
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.js +39 -27
- package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
- package/dist/BaseCheckbox/BaseCheckbox.js +77 -59
- package/dist/BaseLink/BaseLink.cjs +2 -2
- package/dist/BaseLink/BaseLink.js +20 -27
- package/dist/BaseRadio/BaseRadio.cjs +7 -7
- package/dist/BaseRadio/BaseRadio.js +55 -35
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +31 -28
- package/dist/BaseRadio/context.cjs +1 -1
- package/dist/BaseRadio/context.js +8 -4
- package/dist/BaseRadio/utils.cjs +1 -1
- package/dist/BaseRadio/utils.js +1 -1
- package/dist/Box/Box.cjs +31 -32
- package/dist/Box/Box.js +182 -59
- package/dist/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/Breadcrumbs/Breadcrumbs.js +50 -39
- package/dist/Button/Button.cjs +20 -20
- package/dist/Button/Button.js +83 -74
- package/dist/Button/utils.cjs +23 -23
- package/dist/Button/utils.js +15 -15
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +28 -29
- package/dist/Card/CardAction.cjs +4 -4
- package/dist/Card/CardAction.js +12 -6
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.js +32 -26
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.js +14 -10
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +11 -10
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +16 -13
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.js +11 -11
- package/dist/Card/CardContext.cjs +1 -1
- package/dist/Card/CardContext.js +3 -1
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.js +9 -7
- package/dist/Card/CardTimer.cjs +2 -2
- package/dist/Card/CardTimer.js +21 -16
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +11 -9
- package/dist/CarouselInput/Carousel.cjs +4 -4
- package/dist/CarouselInput/Carousel.js +8 -9
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +32 -33
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +26 -29
- package/dist/Flex/Flex.cjs +5 -5
- package/dist/Flex/Flex.js +29 -17
- package/dist/Icon/Icon.cjs +3 -3
- package/dist/Icon/Icon.js +23 -19
- package/dist/JSONInput/JSONInput.cjs +1 -0
- package/dist/JSONInput/JSONInput.js +97 -0
- package/dist/JSONInput/JSONInputContainer.cjs +30 -0
- package/dist/JSONInput/JSONInputContainer.js +36 -0
- package/dist/JSONInput/index.cjs +1 -0
- package/dist/JSONInput/index.js +4 -0
- package/dist/JSONInput/utils/decorationExtension.cjs +1 -0
- package/dist/JSONInput/utils/decorationExtension.js +24 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +44 -49
- package/dist/Link/Link.cjs +5 -5
- package/dist/Link/Link.js +1 -1
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.js +22 -20
- package/dist/LiveRegions/index.cjs +1 -1
- package/dist/LiveRegions/index.js +4 -2
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.js +1 -2
- package/dist/MainNav/NavSections.cjs +3 -3
- package/dist/MainNav/NavSections.js +5 -5
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +1 -1
- package/dist/NumberInput/NumberInput.cjs +2 -2
- package/dist/NumberInput/NumberInput.js +1 -1
- package/dist/Pagination/components.cjs +6 -6
- package/dist/Pagination/components.js +16 -17
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.js +7 -8
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +4 -5
- package/dist/Select/SelectTags.cjs +3 -3
- package/dist/Select/SelectTags.js +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +9 -9
- package/dist/SimpleMenu/SimpleMenu.js +1 -1
- package/dist/Stack/Stack.cjs +5 -5
- package/dist/Stack/Stack.js +33 -33
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.js +1 -1
- package/dist/SubNav/SubNavLink.cjs +4 -4
- package/dist/SubNav/SubNavLink.js +4 -4
- package/dist/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/SubNav/SubNavLinkSection.js +1 -1
- package/dist/SubNav/SubNavSectionLabel.cjs +3 -3
- package/dist/SubNav/SubNavSectionLabel.js +1 -1
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +51 -50
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/ThemeProvider/ThemeProvider.js +12 -11
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +1 -1
- package/dist/Typography/Typography.cjs +7 -7
- package/dist/Typography/Typography.js +28 -17
- package/dist/Typography/utils.cjs +2 -2
- package/dist/Typography/utils.js +6 -6
- package/dist/helpers/arrays.cjs +1 -0
- package/dist/helpers/arrays.js +6 -0
- package/dist/helpers/handleResponsiveValues.cjs +1 -5
- package/dist/helpers/handleResponsiveValues.js +21 -15
- package/dist/helpers/objects.cjs +1 -0
- package/dist/helpers/objects.js +26 -0
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setOpacity.js +1 -1
- package/dist/helpers/theme.cjs +1 -0
- package/dist/helpers/theme.js +7 -0
- package/dist/helpers/useIntersection.cjs +1 -1
- package/dist/helpers/useIntersection.js +8 -8
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useControllableState.js +13 -16
- package/dist/index.cjs +1 -1
- package/dist/index.js +205 -201
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.js +13 -21
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +1 -1
- package/dist/v2/Link/Link.cjs +4 -4
- package/dist/v2/Link/Link.js +1 -1
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +1 -2
- package/dist/v2/MainNav/NavSections.cjs +3 -3
- package/dist/v2/MainNav/NavSections.js +5 -5
- package/dist/v2/Pagination/components.cjs +7 -7
- package/dist/v2/Pagination/components.js +18 -19
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +9 -9
- package/dist/v2/SimpleMenu/SimpleMenu.js +96 -89
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.js +1 -1
- package/dist/v2/SubNav/SubNavLink.cjs +4 -4
- package/dist/v2/SubNav/SubNavLink.js +1 -1
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +1 -1
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +3 -3
- package/dist/v2/SubNav/SubNavSectionLabel.js +1 -1
- package/package.json +18 -15
- package/dist/Box/BoxProps.cjs +0 -1
- package/dist/Box/BoxProps.js +0 -51
- package/dist/Flex/FlexProps.cjs +0 -1
- package/dist/Flex/FlexProps.js +0 -41
- package/dist/FocusTrap/ExampleComponent.cjs +0 -1
- package/dist/FocusTrap/ExampleComponent.js +0 -71
- package/dist/LiveRegions/StoryComponent.cjs +0 -1
- package/dist/LiveRegions/StoryComponent.js +0 -18
- package/dist/Typography/TypographyProps.cjs +0 -1
- package/dist/Typography/TypographyProps.js +0 -31
- package/dist/themes/ColorButton.cjs +0 -3
- package/dist/themes/ColorButton.js +0 -25
- package/dist/themes/colors.cjs +0 -1
- package/dist/themes/colors.js +0 -49
package/dist/Select/Select.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import r, { useState as ee, useRef as te, Children as j, cloneElement as A } from "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
|
-
import re from "
|
|
4
|
-
import oe from "@strapi/icons
|
|
5
|
-
import ne from "styled-components";
|
|
3
|
+
import re from "styled-components";
|
|
4
|
+
import { Cross as oe, CarretDown as ne } from "@strapi/icons";
|
|
6
5
|
import { sizes as ie } from "../themes/sizes.js";
|
|
7
6
|
import { SelectButton as le } from "./SelectButton.js";
|
|
8
7
|
import { Field as se } from "../Field/Field.js";
|
|
@@ -25,7 +24,7 @@ import { VisuallyHidden as q } from "../VisuallyHidden/VisuallyHidden.js";
|
|
|
25
24
|
import { DownState as ge } from "./constants.js";
|
|
26
25
|
import { escapeSelector as z } from "../helpers/escapeSelector.js";
|
|
27
26
|
import { SelectTags as ve } from "./SelectTags.js";
|
|
28
|
-
const Be =
|
|
27
|
+
const Be = re(C)`
|
|
29
28
|
width: 100%;
|
|
30
29
|
`, G = ({
|
|
31
30
|
label: m,
|
|
@@ -158,7 +157,7 @@ const Be = ne(C)`
|
|
|
158
157
|
tabIndex: -1,
|
|
159
158
|
disabled: s,
|
|
160
159
|
title: Q
|
|
161
|
-
}, /* @__PURE__ */ r.createElement(
|
|
160
|
+
}, /* @__PURE__ */ r.createElement(ne, null))))), /* @__PURE__ */ r.createElement(pe, null), /* @__PURE__ */ r.createElement(ce, null)), h && /* @__PURE__ */ r.createElement(me, {
|
|
162
161
|
source: R,
|
|
163
162
|
spacing: 4,
|
|
164
163
|
fullWidth: !0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),d=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),d=require("prop-types"),i=require("styled-components"),f=require("@strapi/icons"),p=require("../Tag/Tag.cjs"),g=require("../Flex/Flex.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=s(c),t=s(d),o=s(i),T=o.default.div`
|
|
2
2
|
margin-bottom: ${({theme:e})=>e.spaces[1]};
|
|
3
|
-
`,
|
|
3
|
+
`,m=o.default(p.Tag)`
|
|
4
4
|
position: relative;
|
|
5
5
|
z-index: 1;
|
|
6
6
|
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
7
7
|
margin-top: ${({theme:e})=>e.spaces[1]};
|
|
8
|
-
`,r=({tags:e,onRemoveTag:
|
|
8
|
+
`,r=({tags:e,onRemoveTag:n,disabled:u})=>a.default.createElement(T,null,a.default.createElement(g.Flex,{wrap:"wrap"},e.map(l=>a.default.createElement(m,{icon:a.default.createElement(f.Cross,null),disabled:u,onClick:()=>n(l.value),tabIndex:-1,key:`tag-${l.value}`},l.label))));r.defaultProps={disabled:!1,tags:[]};r.propTypes={disabled:t.default.bool,onRemoveTag:t.default.func.isRequired,tags:t.default.arrayOf(t.default.shape({label:t.default.string,value:t.default.oneOfType([t.default.string,t.default.number])}))};exports.SelectTags=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "react";
|
|
2
2
|
import e from "prop-types";
|
|
3
|
-
import n from "@strapi/icons/Cross";
|
|
4
3
|
import o from "styled-components";
|
|
4
|
+
import { Cross as n } from "@strapi/icons";
|
|
5
5
|
import { Tag as m } from "../Tag/Tag.js";
|
|
6
6
|
import { Flex as i } from "../Flex/Flex.js";
|
|
7
7
|
const c = o.div`
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),z=require("prop-types"),U=require("styled-components"),H=require("react-router-dom"),M=require("@radix-ui/react-use-callback-ref"),G=require("@strapi/icons
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react"),z=require("prop-types"),U=require("styled-components"),H=require("react-router-dom"),M=require("@radix-ui/react-use-callback-ref"),G=require("@strapi/icons"),T=require("../Typography/Typography.cjs"),J=require("../Link/Link.cjs"),b=require("../Box/Box.cjs"),Q=require("../Flex/Flex.cjs"),j=require("../Button/Button.cjs"),w=require("../Popover/Popover.cjs"),q=require("./utils.cjs"),X=require("../helpers/useId.cjs"),s=require("../helpers/keyboardKeys.cjs"),B=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=B(a),t=B(z),E=B(U),Y=E.default.button`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
5
|
cursor: pointer;
|
|
6
|
-
${
|
|
7
|
-
`,
|
|
6
|
+
${q.getOptionStyle}
|
|
7
|
+
`,Z=E.default(H.NavLink)`
|
|
8
8
|
text-decoration: none;
|
|
9
|
-
${
|
|
10
|
-
`,
|
|
9
|
+
${q.getOptionStyle}
|
|
10
|
+
`,ee=E.default(J.Link)`
|
|
11
11
|
/* Removing Link hover effect */
|
|
12
12
|
&:hover {
|
|
13
13
|
color: currentColor;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
${
|
|
26
|
-
`,
|
|
25
|
+
${q.getOptionStyle}
|
|
26
|
+
`,te=E.default.span`
|
|
27
27
|
display: flex;
|
|
28
28
|
align-items: center;
|
|
29
29
|
svg {
|
|
30
30
|
height: 4px;
|
|
31
31
|
width: 6px;
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,ne=E.default(j.Button)`
|
|
34
34
|
padding: ${({theme:e})=>`${e.spaces[1]} ${e.spaces[3]}`};
|
|
35
|
-
`,
|
|
35
|
+
`,I=({children:e,onClick:h,to:u,isFocused:l,href:c,...x})=>{const i=a.useRef();a.useEffect(()=>{l&&i.current&&i.current.focus()},[l]);const d={tabIndex:l?0:-1,ref:i,role:"menuitem",...x},f=v=>{(v.key===s.KeyboardKeys.SPACE||v.key===s.KeyboardKeys.ENTER)&&h()};return u&&!c?o.default.createElement(Z,{to:u,...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,e))):c&&!u?o.default.createElement(ee,{isExternal:!0,href:c,...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,e))):o.default.createElement(Y,{onKeyDown:f,onMouseDown:h,type:"button",...d},o.default.createElement(b.Box,{padding:2},o.default.createElement(T.Typography,null,e)))};I.defaultProps={as:void 0,href:void 0,isFocused:!1,onClick(){},to:void 0};I.propTypes={as:t.default.elementType,children:t.default.node.isRequired,href:t.default.string,isFocused:t.default.bool,onClick:t.default.func,to:t.default.string};const g=({label:e,children:h,id:u,as:l,onOpen:c=()=>{},onClose:x=()=>{},size:i,popoverPlacement:d,onReachEnd:f,...v})=>{const p=a.useRef(),K=X.useId("simplemenu",u),R=a.useRef(!1),[y,m]=a.useState(!1),[P,C]=a.useState(0),k=a.Children.toArray(h),L=i==="S"?ne:j.Button,_=l||L,O=!!f&&typeof f=="function";a.useEffect(()=>{if(["string","number"].includes(typeof e)){const n=k.findIndex(r=>r.props.children===e);n!==-1&&C(n)}},[e]);const S=M.useCallbackRef(c),D=M.useCallbackRef(x);a.useEffect(()=>{R?.current?y?S():D():R.current=!0},[R,D,S,y]),a.useEffect(()=>{o.default.isValidElement(e)&&P===-1&&p.current.focus()},[e,P]);const $=n=>{y&&(n.key===s.KeyboardKeys.ESCAPE&&(n.stopPropagation(),m(!1),p.current.focus()),n.key===s.KeyboardKeys.DOWN&&C(r=>r===k.length-1?0:r+1),n.key===s.KeyboardKeys.UP&&C(r=>r===0?k.length-1:r-1))},F=n=>{(n.key===s.KeyboardKeys.ENTER||n.key===s.KeyboardKeys.SPACE)&&m(r=>!r)},A=n=>{n.preventDefault(),n.currentTarget.contains(n.relatedTarget)||m(!1)},N=n=>{n.preventDefault(),m(r=>!r)},V=()=>{O&&f()},W=k.map((n,r)=>o.default.createElement(Q.Flex,{as:"li",key:r,justifyContent:"center",role:"menuitem"},a.cloneElement(n,{onClick(){n.props.onClick(),m(!1),p.current.focus()},isFocused:P===r})));return o.default.createElement("div",{onKeyDown:$},o.default.createElement(_,{label:o.default.isValidElement(e)?null:e,"aria-haspopup":!0,"aria-expanded":y,"aria-controls":K,onKeyDown:F,onMouseDown:N,ref:p,type:"button",variant:"ghost",endIcon:o.default.createElement(te,null,o.default.createElement(G.CarretDown,{"aria-hidden":!0})),...v},e),y&&o.default.createElement(w.Popover,{onBlur:A,placement:d,source:p,onReachEnd:V,intersectionId:O?`popover-${K}`:void 0,spacing:4},o.default.createElement(b.Box,{role:"menu",as:"ul",padding:1,id:K},W)))};g.defaultProps={as:void 0};g.displayName="SimpleMenu";g.defaultProps={id:void 0,onOpen:void 0,onClose:void 0,onReachEnd:void 0,popoverPlacement:"bottom-start",size:"M"};g.propTypes={as:t.default.any,children:t.default.oneOfType([t.default.arrayOf(t.default.node),t.default.node]).isRequired,id:t.default.string,label:t.default.oneOfType([t.default.string,t.default.number,t.default.element]).isRequired,onClose:t.default.func,onOpen:t.default.func,onReachEnd:t.default.func,popoverPlacement:t.default.oneOf(w.POPOVER_PLACEMENTS),size:t.default.oneOf(["S","M"])};exports.MenuItem=I;exports.SimpleMenu=g;
|
|
@@ -3,7 +3,7 @@ import e from "prop-types";
|
|
|
3
3
|
import y from "styled-components";
|
|
4
4
|
import { NavLink as H } from "react-router-dom";
|
|
5
5
|
import { useCallbackRef as K } from "@radix-ui/react-use-callback-ref";
|
|
6
|
-
import U from "@strapi/icons
|
|
6
|
+
import { CarretDown as U } from "@strapi/icons";
|
|
7
7
|
import { Typography as O } from "../Typography/Typography.js";
|
|
8
8
|
import { Link as G } from "../Link/Link.js";
|
|
9
9
|
import { Box as k } from "../Box/Box.js";
|
package/dist/Stack/Stack.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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 s=require("react/jsx-runtime"),u=require("react"),m=require("styled-components"),o=require("../Flex/Flex.cjs"),i=require("../helpers/theme.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},c=f(m),l={size:!0},g=c.default(o.Flex).withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
|
|
2
2
|
& > * {
|
|
3
3
|
margin-top: 0;
|
|
4
4
|
margin-bottom: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
& > * + * {
|
|
8
|
-
margin-top: ${({theme:e,spacing:t})=>e.spaces
|
|
8
|
+
margin-top: ${({theme:e,spacing:t})=>i.extractStyleFromTheme(e.spaces,t,void 0)};
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,h=c.default(o.Flex).withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
|
|
11
11
|
& > * {
|
|
12
12
|
margin-left: 0;
|
|
13
13
|
margin-right: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
& > * + * {
|
|
17
|
-
margin-left: ${({theme:e,spacing:t})=>e.spaces
|
|
17
|
+
margin-left: ${({theme:e,spacing:t})=>i.extractStyleFromTheme(e.spaces,t,void 0)};
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,d=u.forwardRef(({horizontal:e=!1,spacing:t,size:r,...n},a)=>(r&&console.warn('Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'),e?s.jsx(h,{ref:a,spacing:t||r,...n}):s.jsx(g,{direction:"column",alignItems:"stretch",ref:a,spacing:t||r,...n})));d.displayName="Stack";exports.Stack=d;
|
package/dist/Stack/Stack.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Flex as
|
|
5
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import a from "styled-components";
|
|
4
|
+
import { Flex as s } from "../Flex/Flex.js";
|
|
5
|
+
import { extractStyleFromTheme as m } from "../helpers/theme.js";
|
|
6
|
+
const c = {
|
|
6
7
|
size: !0
|
|
7
|
-
},
|
|
8
|
-
shouldForwardProp: (e,
|
|
8
|
+
}, f = a(s).withConfig({
|
|
9
|
+
shouldForwardProp: (e, r) => !c[e] && r(e)
|
|
9
10
|
})`
|
|
10
11
|
& > * {
|
|
11
12
|
margin-top: 0;
|
|
@@ -13,10 +14,13 @@ const l = {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
& > * + * {
|
|
16
|
-
margin-top: ${({
|
|
17
|
+
margin-top: ${({
|
|
18
|
+
theme: e,
|
|
19
|
+
spacing: r
|
|
20
|
+
}) => m(e.spaces, r, void 0)};
|
|
17
21
|
}
|
|
18
|
-
`,
|
|
19
|
-
shouldForwardProp: (e,
|
|
22
|
+
`, l = a(s).withConfig({
|
|
23
|
+
shouldForwardProp: (e, r) => !c[e] && r(e)
|
|
20
24
|
})`
|
|
21
25
|
& > * {
|
|
22
26
|
margin-left: 0;
|
|
@@ -24,32 +28,28 @@ const l = {
|
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
& > * + * {
|
|
27
|
-
margin-left: ${({
|
|
31
|
+
margin-left: ${({
|
|
32
|
+
theme: e,
|
|
33
|
+
spacing: r
|
|
34
|
+
}) => m(e.spaces, r, void 0)};
|
|
28
35
|
}
|
|
29
|
-
`,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
`, g = d(({
|
|
37
|
+
horizontal: e = !1,
|
|
38
|
+
spacing: r,
|
|
39
|
+
size: t,
|
|
40
|
+
...o
|
|
41
|
+
}, i) => (t && console.warn('Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead'), e ? n(l, {
|
|
42
|
+
ref: i,
|
|
43
|
+
spacing: r || t,
|
|
44
|
+
...o
|
|
45
|
+
}) : n(f, {
|
|
36
46
|
direction: "column",
|
|
37
47
|
alignItems: "stretch",
|
|
38
|
-
ref:
|
|
39
|
-
spacing:
|
|
40
|
-
...
|
|
48
|
+
ref: i,
|
|
49
|
+
spacing: r || t,
|
|
50
|
+
...o
|
|
41
51
|
})));
|
|
42
|
-
|
|
43
|
-
a.defaultProps = {
|
|
44
|
-
horizontal: !1,
|
|
45
|
-
size: void 0,
|
|
46
|
-
spacing: void 0
|
|
47
|
-
};
|
|
48
|
-
a.propTypes = {
|
|
49
|
-
horizontal: r.bool,
|
|
50
|
-
size: r.number,
|
|
51
|
-
spacing: r.number
|
|
52
|
-
};
|
|
52
|
+
g.displayName = "Stack";
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
g as Stack
|
|
55
55
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),C=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),C=require("prop-types"),I=require("styled-components"),R=require("@strapi/icons"),_=require("../Flex/Flex.cjs"),D=require("../Typography/Typography.cjs"),P=require("../IconButton/IconButton.cjs"),s=require("../Box/Box.cjs"),F=require("../Divider/Divider.cjs"),K=require("../Searchbar/Searchbar.cjs"),L=require("../Searchbar/SearchForm.cjs"),k=require("../helpers/useId.cjs"),w=require("../helpers/usePrevious.cjs"),O=require("../helpers/keyboardKeys.cjs"),d=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=d(o),r=d(C),H=d(I),h=H.default(F.Divider)`
|
|
2
2
|
width: ${24/16}rem;
|
|
3
3
|
background-color: ${({theme:t})=>t.colors.neutral200};
|
|
4
|
-
`,i=({as:t,label:g,searchLabel:f,searchable:b,onChange:y,value:m,onClear:S,onSubmit:v,id:B})=>{const[n,
|
|
4
|
+
`,i=({as:t,label:g,searchLabel:f,searchable:b,onChange:y,value:m,onClear:S,onSubmit:v,id:B})=>{const[n,l]=o.useState(!1),p=w.usePrevious(n),q=k.useId("subnav-searchbar-clear",B),c=o.useRef(),u=o.useRef();o.useEffect(()=>{n&&c.current&&c.current.focus(),p&&!n&&u.current&&u.current.focus()},[n,p]);const E=()=>{l(a=>!a)},j=a=>{S(a),c.current.focus()},T=a=>{a.relatedTarget?.id!==q&&l(!1)},x=a=>{a.key===O.KeyboardKeys.ESCAPE&&l(!1)};return n?e.default.createElement(s.Box,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4},e.default.createElement(L.SearchForm,null,e.default.createElement(K.Searchbar,{name:"searchbar",value:m,onChange:y,placeholder:"e.g: strapi-plugin-abcd",onKeyDown:x,ref:c,onBlur:T,onClear:j,onSubmit:v,clearLabel:"Clear",size:"S"},f)),e.default.createElement(s.Box,{paddingLeft:2,paddingTop:4},e.default.createElement(h,null))):e.default.createElement(s.Box,{paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4},e.default.createElement(_.Flex,{justifyContent:"space-between",alignItems:"flex-start"},e.default.createElement(D.Typography,{variant:"beta",as:t},g),b&&e.default.createElement(P.IconButton,{ref:u,onClick:E,label:f,icon:e.default.createElement(R.Search,null)})),e.default.createElement(s.Box,{paddingTop:4},e.default.createElement(h,null)))};i.defaultProps={as:"h2",searchable:!1,onChange(){},onClear(){},onSubmit(){},value:"",searchLabel:"",id:void 0};i.propTypes={as:r.default.string,id:r.default.string,label:r.default.string.isRequired,onChange:r.default.func,onClear:r.default.func,onSubmit:r.default.func,searchLabel:r.default.string,searchable:r.default.bool,value:r.default.string};exports.SubNavHeader=i;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { useState as L, useRef as p, useEffect as w } from "react";
|
|
2
2
|
import r from "prop-types";
|
|
3
3
|
import x from "styled-components";
|
|
4
|
-
import D from "@strapi/icons
|
|
4
|
+
import { Search as D } from "@strapi/icons";
|
|
5
5
|
import { Flex as I } from "../Flex/Flex.js";
|
|
6
6
|
import { Typography as K } from "../Typography/Typography.js";
|
|
7
7
|
import { IconButton as P } from "../IconButton/IconButton.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react"),g=require("prop-types"),m=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react"),g=require("prop-types"),m=require("react-router-dom"),b=require("styled-components"),h=require("@strapi/icons"),a=require("../Box/Box.cjs"),c=require("../Typography/Typography.cjs"),s=require("../Flex/Flex.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=n(y),r=n(g),i=n(b),x=i.default(a.Box)`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
&:focus-visible {
|
|
26
26
|
outline-offset: -2px;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`,u=i.default(h.Dot)`
|
|
29
29
|
width: ${12/16}rem;
|
|
30
30
|
height: ${4/16}rem;
|
|
31
31
|
* {
|
|
32
32
|
fill: ${({theme:e,$active:o})=>o?e.colors.primary600:e.colors.neutral600};
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
`,v=i.default.div`
|
|
35
35
|
svg {
|
|
36
36
|
height: ${12/16}rem;
|
|
37
37
|
width: ${12/16}rem;
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,l=({children:e,icon:o,withBullet:d,isSubSectionChild:p,...f})=>t.default.createElement(x,{as:m.NavLink,icon:o,background:"neutral100",paddingLeft:p?9:7,paddingBottom:2,paddingTop:2,...f},t.default.createElement(s.Flex,null,o?t.default.createElement(v,null,o):t.default.createElement(u,null),t.default.createElement(a.Box,{paddingLeft:2},t.default.createElement(c.Typography,{as:"span"},e))),d&&t.default.createElement(a.Box,{as:s.Flex,paddingRight:4},t.default.createElement(u,{$active:!0})));l.displayName="SubNavLink";l.defaultProps={icon:null,isSubSectionChild:!1,withBullet:!1};l.propTypes={children:r.default.node.isRequired,icon:r.default.element,isSubSectionChild:r.default.bool,withBullet:r.default.bool};exports.SubNavLink=l;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import r from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
|
+
import { NavLink as u } from "react-router-dom";
|
|
3
4
|
import i from "styled-components";
|
|
4
|
-
import
|
|
5
|
-
import { NavLink as f } from "react-router-dom";
|
|
5
|
+
import { Dot as f } from "@strapi/icons";
|
|
6
6
|
import { Box as l } from "../Box/Box.js";
|
|
7
7
|
import { Typography as s } from "../Typography/Typography.js";
|
|
8
8
|
import { Flex as a } from "../Flex/Flex.js";
|
|
@@ -33,7 +33,7 @@ const g = i(l)`
|
|
|
33
33
|
&:focus-visible {
|
|
34
34
|
outline-offset: -2px;
|
|
35
35
|
}
|
|
36
|
-
`, p = i(
|
|
36
|
+
`, p = i(f)`
|
|
37
37
|
width: ${12 / 16}rem;
|
|
38
38
|
height: ${4 / 16}rem;
|
|
39
39
|
* {
|
|
@@ -45,7 +45,7 @@ const g = i(l)`
|
|
|
45
45
|
width: ${12 / 16}rem;
|
|
46
46
|
}
|
|
47
47
|
`, n = ({ children: e, icon: o, withBullet: c, isSubSectionChild: m, ...d }) => /* @__PURE__ */ r.createElement(g, {
|
|
48
|
-
as:
|
|
48
|
+
as: u,
|
|
49
49
|
icon: o,
|
|
50
50
|
background: "neutral100",
|
|
51
51
|
paddingLeft: m ? 9 : 7,
|
|
@@ -1,4 +1,4 @@
|
|
|
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 o=require("react"),m=require("prop-types"),h=require("styled-components"),x=require("@strapi/icons"),l=require("../Box/Box.cjs"),b=require("../Flex/Flex.cjs"),v=require("../Typography/Typography.cjs"),S=require("../helpers/useId.cjs"),d=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=d(o),r=d(m),i=d(h),E=i.default(l.Box)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${4/16}rem;
|
|
4
4
|
path {
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
width: ${12/16}rem;
|
|
18
18
|
transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
|
|
19
|
-
`,s=({label:e,children:c,id:p})=>{const[
|
|
19
|
+
`,s=({label:e,children:c,id:p})=>{const[n,f]=o.useState(!0),u=S.useId("subnav-list",p),g=()=>{f(a=>!a)};return t.default.createElement(l.Box,null,t.default.createElement(E,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4},t.default.createElement(b.Flex,{justifyContent:"space-between"},t.default.createElement(k,{onClick:g,"aria-expanded":n,"aria-controls":u},t.default.createElement(q,{rotated:n},t.default.createElement(x.CarretDown,{"aria-hidden":!0})),t.default.createElement(l.Box,{paddingLeft:2},t.default.createElement(v.Typography,{as:"span",fontWeight:"semiBold",textColor:"neutral800"},e))))),n&&t.default.createElement("ul",{id:u},o.Children.map(c,(a,y)=>t.default.createElement("li",{key:y},a))))};s.defaultProps={children:void 0,id:void 0};s.propTypes={children:r.default.node,id:r.default.string,label:r.default.string.isRequired};exports.SubNavLinkSection=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { useState as f, Children as g } from "react";
|
|
2
2
|
import o from "prop-types";
|
|
3
3
|
import a from "styled-components";
|
|
4
|
-
import h from "@strapi/icons
|
|
4
|
+
import { CarretDown as h } from "@strapi/icons";
|
|
5
5
|
import { Box as i } from "../Box/Box.js";
|
|
6
6
|
import { Flex as E } from "../Flex/Flex.js";
|
|
7
7
|
import { Typography as b } from "../Typography/Typography.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),g=require("prop-types"),y=require("styled-components"),b=require("@strapi/icons
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),g=require("prop-types"),y=require("styled-components"),b=require("@strapi/icons"),u=require("../Typography/Typography.cjs"),s=require("../Box/Box.cjs"),x=require("../Flex/Flex.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=r(f),a=r(g),i=r(y),d=i.default(x.Flex)`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
|
-
`,
|
|
5
|
+
`,m=i.default.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
|
|
9
|
-
`,o=({collapsable:e,label:l,onClick:
|
|
9
|
+
`,o=({collapsable:e,label:l,onClick:c,ariaExpanded:n,ariaControls:p})=>e?t.default.createElement(d,{as:"button",onClick:c,"aria-expanded":n,"aria-controls":p,textAlign:"left"},t.default.createElement(s.Box,{paddingRight:1},t.default.createElement(u.Typography,{variant:"sigma",textColor:"neutral600"},l)),e&&t.default.createElement(m,{rotated:n},t.default.createElement(b.CarretDown,{"aria-hidden":!0}))):t.default.createElement(d,null,t.default.createElement(s.Box,{paddingRight:1},t.default.createElement(u.Typography,{variant:"sigma",textColor:"neutral600"},l)));o.defaultProps={ariaControls:null,ariaExpanded:null,collapsable:!1,onClick(){}};o.propTypes={ariaControls:a.default.string,ariaExpanded:a.default.bool,collapsable:a.default.bool,label:a.default.string.isRequired,onClick:a.default.func};exports.SubNavSectionLabel=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import r from "prop-types";
|
|
3
3
|
import p from "styled-components";
|
|
4
|
-
import s from "@strapi/icons
|
|
4
|
+
import { CarretDown as s } from "@strapi/icons";
|
|
5
5
|
import { Typography as n } from "../Typography/Typography.js";
|
|
6
6
|
import { Box as l } from "../Box/Box.js";
|
|
7
7
|
import { Flex as u } from "../Flex/Flex.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
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("react/jsx-runtime"),h=require("react"),u=require("styled-components"),g=require("@strapi/icons"),l=require("../Box/Box.cjs"),m=require("../Typography/Typography.cjs"),j=require("../Flex/Flex.cjs"),b=require("../themes/utils.cjs"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},B=c(h),d=c(u),T=u.keyframes`
|
|
2
2
|
from {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
5
5
|
to {
|
|
6
6
|
transform: rotate(359deg);
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
9
|
-
animation: ${
|
|
8
|
+
`,q=d.default.div`
|
|
9
|
+
animation: ${T} 2s infinite linear;
|
|
10
10
|
will-change: transform;
|
|
11
|
-
`,
|
|
11
|
+
`,v=d.default(j.Flex)`
|
|
12
12
|
background: transparent;
|
|
13
13
|
border: none;
|
|
14
14
|
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
fill: ${({theme:e})=>e.colors.primary600};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
${
|
|
32
|
-
`,
|
|
31
|
+
${b.buttonFocusStyle}
|
|
32
|
+
`,p=B.default.forwardRef(({children:e,startIcon:s,endIcon:a,onClick:n,disabled:o=!1,loading:r=!1,...f},x)=>{const y=n&&!o?n:void 0,i=o||r;return t.jsxs(v,{ref:x,"aria-disabled":i,onClick:y,as:"button",type:"button",...f,children:[(s||r)&&t.jsx(l.Box,{as:"span",paddingRight:2,"aria-hidden":!0,children:r?t.jsx(q,{children:t.jsx(g.Loader,{})}):s}),t.jsx(m.Typography,{variant:"pi",textColor:i?"neutral600":"primary600",children:e}),a&&t.jsx(l.Box,{as:"span",paddingLeft:2,"aria-hidden":!0,children:a})]})});p.displayName="TextButton";exports.TextButton=p;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import d, { keyframes as h } from "styled-components";
|
|
4
|
+
import { Loader as g } from "@strapi/icons";
|
|
5
5
|
import { Box as p } from "../Box/Box.js";
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { buttonFocusStyle as
|
|
9
|
-
const
|
|
6
|
+
import { Typography as x } from "../Typography/Typography.js";
|
|
7
|
+
import { Flex as y } from "../Flex/Flex.js";
|
|
8
|
+
import { buttonFocusStyle as b } from "../themes/utils.js";
|
|
9
|
+
const v = h`
|
|
10
10
|
from {
|
|
11
11
|
transform: rotate(0deg);
|
|
12
12
|
}
|
|
13
13
|
to {
|
|
14
14
|
transform: rotate(359deg);
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
17
|
-
animation: ${
|
|
16
|
+
`, $ = d.div`
|
|
17
|
+
animation: ${v} 2s infinite linear;
|
|
18
18
|
will-change: transform;
|
|
19
|
-
`,
|
|
19
|
+
`, B = d(y)`
|
|
20
20
|
background: transparent;
|
|
21
21
|
border: none;
|
|
22
22
|
|
|
23
23
|
&[aria-disabled='true'] {
|
|
24
24
|
pointer-events: none;
|
|
25
25
|
svg path {
|
|
26
|
-
fill: ${({
|
|
26
|
+
fill: ${({
|
|
27
|
+
theme: r
|
|
28
|
+
}) => r.colors.neutral600};
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -33,50 +35,49 @@ const x = g`
|
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
svg path {
|
|
36
|
-
fill: ${({
|
|
38
|
+
fill: ${({
|
|
39
|
+
theme: r
|
|
40
|
+
}) => r.colors.primary600};
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
${
|
|
40
|
-
`,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
${b}
|
|
44
|
+
`, T = u.forwardRef(({
|
|
45
|
+
children: r,
|
|
46
|
+
startIcon: o,
|
|
47
|
+
endIcon: a,
|
|
48
|
+
onClick: n,
|
|
49
|
+
disabled: i = !1,
|
|
50
|
+
loading: e = !1,
|
|
51
|
+
...l
|
|
52
|
+
}, f) => {
|
|
53
|
+
const m = n && !i ? n : void 0, s = i || e;
|
|
54
|
+
return c(B, {
|
|
55
|
+
ref: f,
|
|
56
|
+
"aria-disabled": s,
|
|
57
|
+
onClick: m,
|
|
58
|
+
as: "button",
|
|
59
|
+
type: "button",
|
|
60
|
+
...l,
|
|
61
|
+
children: [(o || e) && t(p, {
|
|
51
62
|
as: "span",
|
|
52
63
|
paddingRight: 2,
|
|
53
|
-
"aria-hidden": !0
|
|
54
|
-
|
|
64
|
+
"aria-hidden": !0,
|
|
65
|
+
children: e ? t($, {
|
|
66
|
+
children: t(g, {})
|
|
67
|
+
}) : o
|
|
68
|
+
}), t(x, {
|
|
55
69
|
variant: "pi",
|
|
56
|
-
textColor:
|
|
57
|
-
|
|
70
|
+
textColor: s ? "neutral600" : "primary600",
|
|
71
|
+
children: r
|
|
72
|
+
}), a && t(p, {
|
|
58
73
|
as: "span",
|
|
59
74
|
paddingLeft: 2,
|
|
60
|
-
"aria-hidden": !0
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
disabled: !1,
|
|
67
|
-
startIcon: void 0,
|
|
68
|
-
endIcon: void 0,
|
|
69
|
-
loading: !1,
|
|
70
|
-
onClick: void 0
|
|
71
|
-
};
|
|
72
|
-
a.propTypes = {
|
|
73
|
-
children: t.node.isRequired,
|
|
74
|
-
disabled: t.bool,
|
|
75
|
-
endIcon: t.element,
|
|
76
|
-
loading: t.bool,
|
|
77
|
-
onClick: t.func,
|
|
78
|
-
startIcon: t.element
|
|
79
|
-
};
|
|
75
|
+
"aria-hidden": !0,
|
|
76
|
+
children: a
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
T.displayName = "TextButton";
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
T as TextButton
|
|
82
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
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 o=require("react/jsx-runtime"),t=require("styled-components"),r=require("../LiveRegions/LiveRegions.cjs"),n=t.createGlobalStyle`
|
|
2
2
|
/* http://meyerweb.com/eric/tools/css/reset/
|
|
3
3
|
v2.0 | 20110126
|
|
4
4
|
License: none (public domain)
|
|
@@ -170,4 +170,4 @@
|
|
|
170
170
|
height: 100vh;
|
|
171
171
|
overflow-y: hidden;
|
|
172
172
|
}
|
|
173
|
-
`,s=({children:e,theme:
|
|
173
|
+
`,s=({children:e,theme:i})=>o.jsxs(t.ThemeProvider,{theme:i,children:[o.jsx(n,{}),e,o.jsx(r.LiveRegions,{})]});exports.ThemeProvider=s;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "prop-types";
|
|
1
|
+
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
3
2
|
import { createGlobalStyle as i, ThemeProvider as n } from "styled-components";
|
|
4
3
|
import { LiveRegions as l } from "../LiveRegions/LiveRegions.js";
|
|
5
4
|
const s = i`
|
|
@@ -139,7 +138,9 @@ const s = i`
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
*:focus-visible {
|
|
142
|
-
outline: 2px solid ${({
|
|
141
|
+
outline: 2px solid ${({
|
|
142
|
+
theme: e
|
|
143
|
+
}) => e.colors.primary600};
|
|
143
144
|
outline-offset: 2px;
|
|
144
145
|
}
|
|
145
146
|
|
|
@@ -174,13 +175,13 @@ const s = i`
|
|
|
174
175
|
height: 100vh;
|
|
175
176
|
overflow-y: hidden;
|
|
176
177
|
}
|
|
177
|
-
`,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
};
|
|
178
|
+
`, c = ({
|
|
179
|
+
children: e,
|
|
180
|
+
theme: t
|
|
181
|
+
}) => r(n, {
|
|
182
|
+
theme: t,
|
|
183
|
+
children: [o(s, {}), e, o(l, {})]
|
|
184
|
+
});
|
|
184
185
|
export {
|
|
185
|
-
|
|
186
|
+
c as ThemeProvider
|
|
186
187
|
};
|