@strapi/design-system 0.0.1-alpha.74 → 0.0.1-alpha.77
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/Accordion.development.js +32 -10
- package/Accordion.production.js +1 -1
- package/Alert.development.js +18 -7
- package/Alert.production.js +1 -1
- package/Avatar.development.js +18 -7
- package/Avatar.production.js +1 -1
- package/Badge.development.js +18 -7
- package/Badge.production.js +1 -1
- package/BaseButton.production.js +1 -1
- package/BaseCheckbox.development.js +1 -1
- package/BaseCheckbox.production.js +1 -1
- package/{Text.development.js → BaseLink.development.js} +13 -73
- package/BaseLink.js +9 -0
- package/BaseLink.production.js +1 -0
- package/BaseRadio.production.js +1 -1
- package/Box.development.js +17 -6
- package/Box.production.js +1 -1
- package/Breadcrumbs.development.js +17 -6
- package/Breadcrumbs.production.js +1 -1
- package/Button.development.js +19 -8
- package/Button.production.js +1 -1
- package/Card.development.js +45 -10
- package/Card.production.js +1 -1
- package/CarouselInput.development.js +22 -11
- package/CarouselInput.production.js +1 -1
- package/Checkbox.development.js +22 -11
- package/Checkbox.production.js +1 -1
- package/Combobox.development.js +24 -13
- package/Combobox.production.js +1 -1
- package/DatePicker.development.js +30 -19
- package/DatePicker.production.js +1 -1
- package/Dialog.development.js +19 -8
- package/Dialog.production.js +1 -1
- package/Divider.development.js +17 -6
- package/Divider.production.js +1 -1
- package/EmptyStateLayout.development.js +17 -6
- package/EmptyStateLayout.production.js +1 -1
- package/Field.development.js +19 -8
- package/Field.production.js +1 -1
- package/Flex.development.js +17 -6
- package/Flex.production.js +1 -1
- package/FocusTrap.production.js +1 -1
- package/Grid.development.js +19 -8
- package/Grid.production.js +1 -1
- package/Icon.development.js +17 -6
- package/Icon.production.js +1 -1
- package/IconButton.development.js +17 -6
- package/IconButton.production.js +1 -1
- package/KeyboardNavigable.development.js +17 -6
- package/KeyboardNavigable.production.js +1 -1
- package/Layout.development.js +20 -9
- package/Layout.production.js +1 -1
- package/Link.development.js +18 -7
- package/Link.production.js +1 -1
- package/LinkButton.development.js +19 -8
- package/LinkButton.production.js +1 -1
- package/LiveRegions.production.js +1 -1
- package/Loader.development.js +1 -1
- package/Loader.production.js +1 -1
- package/Main.development.js +17 -6
- package/Main.production.js +1 -1
- package/MainNav.development.js +26 -15
- package/MainNav.production.js +1 -1
- package/ModalLayout.development.js +18 -7
- package/ModalLayout.production.js +1 -1
- package/NumberInput.development.js +21 -10
- package/NumberInput.production.js +1 -1
- package/Pagination.development.js +19 -8
- package/Pagination.production.js +1 -1
- package/Popover.development.js +19 -8
- package/Popover.production.js +1 -1
- package/Portal.production.js +1 -1
- package/ProgressBar.production.js +1 -1
- package/Radio.development.js +17 -6
- package/Radio.production.js +1 -1
- package/RawLink.development.js +481 -0
- package/RawLink.js +9 -0
- package/RawLink.production.js +1 -0
- package/RawTable.development.js +17 -6
- package/RawTable.production.js +1 -1
- package/Searchbar.development.js +19 -8
- package/Searchbar.production.js +1 -1
- package/Select.development.js +25 -14
- package/Select.production.js +1 -1
- package/SimpleMenu.development.js +23 -12
- package/SimpleMenu.production.js +1 -1
- package/Stack.development.js +18 -7
- package/Stack.production.js +1 -1
- package/Status.development.js +17 -6
- package/Status.production.js +1 -1
- package/SubNav.development.js +27 -16
- package/SubNav.production.js +1 -1
- package/Switch.development.js +17 -6
- package/Switch.production.js +1 -1
- package/Table.development.js +17 -6
- package/Table.production.js +1 -1
- package/Tabs.development.js +17 -6
- package/Tabs.production.js +1 -1
- package/Tag.development.js +18 -7
- package/Tag.production.js +1 -1
- package/TextButton.development.js +17 -6
- package/TextButton.production.js +1 -1
- package/TextInput.development.js +21 -10
- package/TextInput.production.js +1 -1
- package/Textarea.development.js +22 -11
- package/Textarea.production.js +1 -1
- package/ThemeProvider.production.js +1 -1
- package/TimePicker.development.js +25 -14
- package/TimePicker.production.js +1 -1
- package/ToggleCheckbox.development.js +18 -7
- package/ToggleCheckbox.production.js +1 -1
- package/ToggleInput.development.js +46 -11
- package/ToggleInput.production.js +1 -1
- package/Tooltip.development.js +17 -6
- package/Tooltip.production.js +1 -1
- package/Typography.production.js +1 -1
- package/VisuallyHidden.production.js +1 -1
- package/index.development.js +157 -109
- package/index.production.js +1 -1
- package/package.json +8 -8
- package/themes.development.js +50 -14
- package/themes.production.js +1 -1
- package/Text.js +0 -9
- package/Text.production.js +0 -1
package/TextInput.production.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("styled-components")):"function"==typeof define&&define.amd?define("strapiDs",["react","styled-components"],e):"object"==typeof exports?exports.strapiDs=e(require("react"),require("styled-components")):n.strapiDs=e(n.react,n["styled-components"])}(this,(function(n,e){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(r,o,function(e){return n[e]}.bind(null,o));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=79)}([function(n,e,t){n.exports=t(16)()},function(e,t){e.exports=n},function(n,t){n.exports=e},function(n,e){n.exports=function(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";t.r(e),t.d(e,"Box",(function(){return f}));var r,o=t(3),i=t.n(o),a=t(0),u=t.n(a),c=t(2),s=t.n(c),d=t(7),l={color:!0},f=s.a.div.withConfig({shouldForwardProp:function(n,e){return!l[n]&&e(n)}})(r||(r=i()(["\n // Font\n font-size: ",";\n\n // Colors\n background: ",";\n color: ",";\n\n // Spaces\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n\n // Responsive hiding\n ","\n ","\n \n\n // Borders\n border-radius: ",";\n border-style: ",";\n border-width: ",";\n border-color: ",";\n border: ",";\n\n // Shadows\n box-shadow: ",";\n\n // Handlers\n pointer-events: ",";\n &:hover {\n ","\n }\n\n // Display\n display: ",";\n\n // Position\n position: ",";\n left: ",";\n right: ",";\n top: ",";\n bottom: ",";\n z-index: ",";\n overflow: ",";\n cursor: ",";\n\n // Size\n width: ",";\n max-width: ",";\n min-width: ",";\n height: ",";\n max-height: ",";\n min-height: ",";\n\n // Animation\n transition: ",";\n transform: ",";\n animation: ",";\n\n //Flexbox children props\n flex-shrink: ",";\n flex-grow: ",";\n flex-basis: ",";\n flex: ",";\n\n // Text\n text-align: ",";\n text-transform: ",";\n line-height: ",";\n\n // Cursor\n cursor: ",";\n"])),(function(n){var e=n.fontSize;return n.theme.fontSizes[e]||e}),(function(n){var e=n.theme,t=n.background;return e.colors[t]}),(function(n){var e=n.theme,t=n.color;return e.colors[t]}),(function(n){var e=n.theme,t=n.padding;return Object(d.a)("padding",t,e)}),(function(n){var e=n.theme,t=n.paddingTop;return Object(d.a)("padding-top",t,e)}),(function(n){var e=n.theme,t=n.paddingRight;return Object(d.a)("padding-right",t,e)}),(function(n){var e=n.theme,t=n.paddingBottom;return Object(d.a)("padding-bottom",t,e)}),(function(n){var e=n.theme,t=n.paddingLeft;return Object(d.a)("padding-left",t,e)}),(function(n){var e=n.theme,t=n.marginLeft;return Object(d.a)("margin-left",t,e)}),(function(n){var e=n.theme,t=n.marginRight;return Object(d.a)("margin-right",t,e)}),(function(n){var e=n.theme,t=n.marginTop;return Object(d.a)("margin-top",t,e)}),(function(n){var e=n.theme,t=n.marginBottom;return Object(d.a)("margin-bottom",t,e)}),(function(n){var e=n.theme;return n.hiddenS?"".concat(e.mediaQueries.tablet," { display: none; }"):void 0}),(function(n){var e=n.theme;return n.hiddenXS?"".concat(e.mediaQueries.mobile," { display: none; }"):void 0}),(function(n){var e=n.theme,t=n.hasRadius,r=n.borderRadius;return t?e.borderRadius:r}),(function(n){return n.borderStyle}),(function(n){return n.borderWidth}),(function(n){var e=n.borderColor;return n.theme.colors[e]}),(function(n){var e=n.theme,t=n.borderColor,r=n.borderStyle,o=n.borderWidth;if(t&&!r&&!o)return"1px solid ".concat(e.colors[t])}),(function(n){var e=n.theme,t=n.shadow;return e.shadows[t]}),(function(n){return n.pointerEvents}),(function(n){var e=n._hover,t=n.theme;return e?e(t):void 0}),(function(n){return n.display}),(function(n){return n.position}),(function(n){var e=n.left;return n.theme.spaces[e]||e}),(function(n){var e=n.right;return n.theme.spaces[e]||e}),(function(n){var e=n.top;return n.theme.spaces[e]||e}),(function(n){var e=n.bottom;return n.theme.spaces[e]||e}),(function(n){return n.zIndex}),(function(n){return n.overflow}),(function(n){return n.cursor}),(function(n){var e=n.width;return n.theme.spaces[e]||e}),(function(n){var e=n.maxWidth;return n.theme.spaces[e]||e}),(function(n){var e=n.minWidth;return n.theme.spaces[e]||e}),(function(n){var e=n.height;return n.theme.spaces[e]||e}),(function(n){var e=n.maxHeight;return n.theme.spaces[e]||e}),(function(n){var e=n.minHeight;return n.theme.spaces[e]||e}),(function(n){return n.transition}),(function(n){return n.transform}),(function(n){return n.animation}),(function(n){return n.shrink}),(function(n){return n.grow}),(function(n){return n.basis}),(function(n){return n.flex}),(function(n){return n.textAlign}),(function(n){return n.textTransform}),(function(n){return n.lineHeight}),(function(n){return n.cursor}));f.displayName="Box",f.defaultProps={background:void 0,borderColor:void 0,color:void 0,hiddenS:!1,hiddenXS:!1,padding:void 0,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0,hasRadius:!1,shadow:void 0,children:null,shrink:void 0,grow:void 0,basis:void 0,flex:void 0,_hover:function(){}},f.propTypes={_hover:u.a.func,background:u.a.string,basis:u.a.oneOfType([u.a.string,u.a.string]),borderColor:u.a.string,children:u.a.oneOfType([u.a.node,u.a.string]),color:u.a.string,flex:u.a.oneOfType([u.a.string,u.a.string]),grow:u.a.oneOfType([u.a.string,u.a.string]),hasRadius:u.a.bool,hiddenS:u.a.bool,hiddenXS:u.a.bool,padding:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),paddingBottom:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),paddingLeft:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),paddingRight:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),paddingTop:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),shadow:u.a.string,shrink:u.a.oneOfType([u.a.string,u.a.string])}},function(n,e,t){var r=t(21);n.exports=function(n,e){if(null==n)return{};var t,o,i=r(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(){return n.exports=t=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},n.exports.default=n.exports,n.exports.__esModule=!0,t.apply(this,arguments)}n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";var r=t(10),o=t.n(r);e.a=function(n,e,t){if(void 0!==e){if(Array.isArray(e)){var r=o()(e,3),i=r[0],a=r[1],u=r[2],c="".concat(n,": ").concat(t.spaces[i],";");return void 0!==a&&(c+="".concat(t.mediaQueries.tablet,"{\n ").concat(n,": ").concat(t.spaces[a],";\n }")),void 0!==u&&(c+="".concat(t.mediaQueries.mobile,"{\n ").concat(n,": ").concat(t.spaces[u],";\n }")),c}var s=t.spaces[e]||e;return"".concat(n,": ").concat(s,";")}}},function(n,e,t){"use strict";t.r(e),t.d(e,"Typography",(function(){return l}));var r,o=t(3),i=t.n(o),a=t(0),u=t.n(a),c=t(2),s=["alpha","beta","delta","epsilon","omega","pi","sigma"],d={fontSize:!0,fontWeight:!0},l=t.n(c).a.span.withConfig({shouldForwardProp:function(n,e){return!d[n]&&e(n)}})(r||(r=i()(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n text-transform: ",";\n ","\n ","\n"])),(function(n){var e=n.theme,t=n.fontWeight;return e.fontWeights[t]}),(function(n){var e=n.theme,t=n.fontSize;return e.fontSizes[t]}),(function(n){var e=n.theme,t=n.lineHeight;return e.lineHeights[t]}),(function(n){var e=n.theme,t=n.textColor;return e.colors[t||"neutral800"]}),(function(n){return n.textTransform}),(function(n){return n.ellipsis&&"\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n "}),(function(n){var e=n.variant,t=n.theme;switch(e){case"alpha":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[5],";\n line-height: ").concat(t.lineHeights[2],";\n ");case"beta":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[4],";\n line-height: ").concat(t.lineHeights[1],";\n ");case"delta":return"\n font-weight: ".concat(t.fontWeights.semiBold,";\n font-size: ").concat(t.fontSizes[3],";\n line-height: ").concat(t.lineHeights[2],";\n ");case"epsilon":return"\n font-size: ".concat(t.fontSizes[3],";\n line-height: ").concat(t.lineHeights[6],";\n ");case"omega":return"\n font-size: ".concat(t.fontSizes[2],";\n line-height: ").concat(t.lineHeights[4],";\n ");case"pi":return"\n font-size: ".concat(t.fontSizes[1],";\n line-height: ").concat(t.lineHeights[3],";\n ");case"sigma":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[0],";\n line-height: ").concat(t.lineHeights[5],";\n text-transform: uppercase;\n ");default:return"\n font-size: ".concat(t.fontSizes[2],";\n ")}}));l.defaultProps={fontWeight:void 0,fontSize:void 0,lineHeight:void 0,textColor:void 0,textTransform:void 0,variant:"omega"},l.propTypes={fontSize:u.a.oneOfType([u.a.number,u.a.string]),fontWeight:u.a.string,lineHeight:u.a.oneOfType([u.a.number,u.a.string]),textColor:u.a.string,textTransform:u.a.string,variant:u.a.oneOf(s)}},function(n,e,t){"use strict";t.r(e),t.d(e,"Flex",(function(){return f}));var r,o=t(3),i=t.n(o),a=t(0),u=t.n(a),c=t(2),s=t.n(c),d=t(4),l={direction:!0},f=s()(d.Box).withConfig({shouldForwardProp:function(n,e){return!l[n]&&e(n)}})(r||(r=i()(["\n display: ",";\n flex-direction: ",";\n justify-content: ",";\n align-items: ",";\n flex-wrap: ",";\n"])),(function(n){return n.inline?"inline-flex":"flex"}),(function(n){return n.direction}),(function(n){return n.justifyContent}),(function(n){return n.alignItems}),(function(n){return n.wrap}));f.defaultProps={alignItems:"center",basis:void 0,direction:"row",inline:!1,justifyContent:void 0,reverse:!1,wrap:void 0},f.propTypes={alignItems:u.a.string,basis:u.a.oneOfType([u.a.string,u.a.number]),direction:u.a.string,inline:u.a.bool,justifyContent:u.a.string,reverse:u.a.bool,wrap:u.a.string}},function(n,e,t){var r=t(22),o=t(23),i=t(19),a=t(24);n.exports=function(n,e){return r(n)||o(n,e)||i(n,e)||a()},n.exports.default=n.exports,n.exports.__esModule=!0},,function(n,e,t){"use strict";t.d(e,"a",(function(){return o})),t.d(e,"b",(function(){return i}));var r=t(1),o=Object(r.createContext)({error:void 0,hint:void 0,name:"",id:""}),i=function(){return Object(r.useContext)(o)}},function(n,e,t){"use strict";t.d(e,"a",(function(){return i}));var r=t(1),o=0,i=function(n,e){return Object(r.useRef)(e||"".concat(n,"-").concat(++o)).current}},function(n,e,t){"use strict";t.d(e,"b",(function(){return r})),t.d(e,"c",(function(){return o})),t.d(e,"a",(function(){return i}));var r=function(n){return function(e){var t=e.theme,r=e.size;return t.sizes[n][r]}},o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return function(e){var t=e.theme,r=e.hasError;return"\n outline: none;\n box-shadow: 0;\n transition-property: border-color, box-shadow, fill;\n transition-duration: 0.2s;\n\n ".concat(n,":focus-within {\n border: 1px solid ").concat(r?t.colors.danger600:t.colors.primary600,";\n box-shadow: ").concat(r?t.colors.danger600:t.colors.primary600," 0px 0px 0px 2px;\n }\n ")}},i=function(n){var e=n.theme;return"\n position: relative;\n outline: none;\n \n &:after {\n transition-property: all;\n transition-duration: 0.2s;\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -4px;\n bottom: -4px;\n left: -4px;\n right: -4px;\n border: 2px solid transparent;\n }\n\n &:focus-visible {\n outline: none;\n &:after {\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -5px;\n bottom: -5px;\n left: -5px;\n right: -5px;\n border: 2px solid ".concat(e.colors.primary600,";\n }\n }\n")}},function(n,e,t){"use strict";t.r(e),t.d(e,"Field",(function(){return f})),t.d(e,"FieldLabel",(function(){return z})),t.d(e,"InputWrapper",(function(){return j.b})),t.d(e,"FieldInput",(function(){return j.a})),t.d(e,"FieldHint",(function(){return S})),t.d(e,"FieldError",(function(){return _})),t.d(e,"FieldContext",(function(){return s.a})),t.d(e,"useField",(function(){return s.b})),t.d(e,"FieldAction",(function(){return C}));var r=t(5),o=t.n(r),i=t(1),a=t.n(i),u=t(0),c=t.n(u),s=t(12),d=t(13),l=["children","name","error","hint","id"],f=function(n){var e=n.children,t=n.name,r=n.error,i=n.hint,u=n.id,c=o()(n,l),f=Object(d.a)("field",u);return a.a.createElement("div",c,a.a.createElement(s.a.Provider,{value:{name:t,id:f,error:r,hint:i}},e))};f.defaultProps={error:void 0,hint:void 0,id:void 0,name:void 0},f.propTypes={children:c.a.node.isRequired,error:c.a.string,hint:c.a.string,id:c.a.oneOfType([c.a.string,c.a.number]),name:c.a.string};var p,h=t(6),m=t.n(h),b=t(3),g=t.n(b),v=t(2),x=t.n(v),y=t(8),O=["children","required"],w=x()(y.Typography)(p||(p=g()(["\n line-height: 0;\n"]))),z=function(n){var e=n.children,t=n.required,r=o()(n,O),i=Object(s.b)().id;return a.a.createElement(y.Typography,m()({variant:"pi",textColor:"neutral800",htmlFor:i,fontWeight:"bold",as:"label",required:t},r),e,t&&a.a.createElement(w,{textColor:"danger600"},"*"))};z.defaultProps={required:!1},z.propTypes={children:c.a.node.isRequired,required:c.a.bool};var T,j=t(30),S=function(){var n=Object(s.b)(),e=n.id,t=n.hint,r=n.error;return!t||r?null:a.a.createElement(y.Typography,{variant:"pi",as:"p",id:"".concat(e,"-hint"),textColor:"neutral600"},t)},_=function(){var n=Object(s.b)(),e=n.id,t=n.error;return t?a.a.createElement(y.Typography,{variant:"pi",as:"p",id:"".concat(e,"-error"),textColor:"danger600","data-strapi-field-error":!0},t):null},A=["label","children"],E=x.a.button(T||(T=g()(["\n border: none;\n background: transparent;\n // TODO: Make sure to use the theme when it's ready\n font-size: 1.6rem;\n width: auto;\n padding: 0;\n display: flex;\n align-items: center;\n"]))),C=function(n){var e=n.label,t=n.children,r=o()(n,A);return a.a.createElement(E,m()({"aria-label":e,type:"button"},r),t)};C.propTypes={children:c.a.node.isRequired,label:c.a.string.isRequired}},function(n,e,t){"use strict";var r=t(17);function o(){}function i(){}i.resetWarningCache=o,n.exports=function(){function n(n,e,t,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return n}n.isRequired=n;var t={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},function(n,e,t){"use strict";n.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(n,e){n.exports=function(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(18);n.exports=function(n,e){if(n){if("string"==typeof n)return r(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(n,e):void 0}},n.exports.default=n.exports,n.exports.__esModule=!0},,function(n,e){n.exports=function(n,e){if(null==n)return{};var t,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)t=i[r],e.indexOf(t)>=0||(o[t]=n[t]);return o},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(n){if(Array.isArray(n))return n},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(n);!(a=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(n){u=!0,o=n}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";t.r(e),t.d(e,"Stack",(function(){return z}));var r,o,i=t(6),a=t.n(i),u=t(5),c=t.n(u),s=t(3),d=t.n(s),l=t(1),f=t.n(l),p=t(0),h=t.n(p),m=t(2),b=t.n(m),g=t(4),v=t(9),x=["horizontal","size"],y={size:!0},O=b()(g.Box).withConfig({shouldForwardProp:function(n,e){return!y[n]&&e(n)}})(r||(r=d()(["\n display: flex;\n flex-direction: column;\n\n & > * {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n & > * + * {\n margin-top: ",";\n }\n"])),(function(n){var e=n.theme,t=n.size;return e.spaces[t]})),w=b()(v.Flex).withConfig({shouldForwardProp:function(n,e){return!y[n]&&e(n)}})(o||(o=d()(["\n & > * {\n margin-left: 0;\n margin-right: 0;\n }\n\n & > * + * {\n margin-left: ",";\n }\n"])),(function(n){var e=n.theme,t=n.size;return e.spaces[t]})),z=Object(l.forwardRef)((function(n,e){var t=n.horizontal,r=n.size,o=c()(n,x);return t?f.a.createElement(w,a()({ref:e,size:r},o)):f.a.createElement(O,a()({ref:e,size:r},o))}));z.displayName="Stack",z.defaultProps={horizontal:!1},z.propTypes={horizontal:h.a.bool,size:h.a.number.isRequired}},function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={input:{S:"".concat(2,"rem"),M:"".concat(2.5,"rem")},accordions:{S:"".concat(3,"rem"),M:"".concat(5.5,"rem")}}},,,,function(n,e,t){"use strict";t.d(e,"b",(function(){return T})),t.d(e,"a",(function(){return j}));var r,o,i=t(6),a=t.n(i),u=t(5),c=t.n(u),s=t(3),d=t.n(s),l=t(1),f=t.n(l),p=t(2),h=t.n(p),m=t(0),b=t.n(m),g=t(26),v=t(14),x=t(12),y=t(9),O=t(4),w=["endAction","startAction","disabled","onChange","size"],z=h.a.input(r||(r=d()(["\n border: none;\n border-radius: ",";\n padding-left: ",";\n padding-right: ",";\n cursor: ",";\n\n color: ",";\n font-weight: 400;\n // TODO: Make sure to use the theme when it's ready\n font-size: ","rem;\n display: block;\n width: 100%;\n\n ::placeholder {\n color: ",";\n opacity: 1;\n }\n\n &[aria-disabled='true'] {\n background: inherit;\n color: inherit;\n }\n\n //focus managed by InputWrapper\n &:focus {\n outline: none;\n box-shadow: none;\n }\n"])),(function(n){return n.theme.borderRadius}),(function(n){var e=n.theme;return n.hasLeftAction?0:e.spaces[4]}),(function(n){var e=n.theme;return n.hasRightAction?0:e.spaces[4]}),(function(n){return n["aria-disabled"]?"not-allowed":void 0}),(function(n){return n.theme.colors.neutral800}),.875,(function(n){return n.theme.colors.neutral500})),T=h()(y.Flex)(o||(o=d()(["\n border: 1px solid ",";\n border-radius: ",";\n background: ",";\n height: ",";\n\n ","\n\n ","\n"])),(function(n){var e=n.theme;return n.hasError?e.colors.danger600:e.colors.neutral200}),(function(n){return n.theme.borderRadius}),(function(n){return n.theme.colors.neutral0}),Object(v.b)("input"),Object(v.c)(),(function(n){var e=n.theme;return n.disabled?"\n color: ".concat(e.colors.neutral600,";\n background: ").concat(e.colors.neutral150,";\n \n "):void 0})),j=Object(l.forwardRef)((function(n,e){var t,r=n.endAction,o=n.startAction,i=n.disabled,u=n.onChange,s=n.size,d=c()(n,w),l=Object(x.b)(),p=l.id,h=l.error,m=l.hint,b=l.name;h?t="".concat(p,"-error"):m&&(t="".concat(p,"-hint"));var g=Boolean(h);return f.a.createElement(T,{size:s,justifyContent:"space-between",hasError:g,disabled:i},o&&f.a.createElement(O.Box,{paddingLeft:3,paddingRight:2},o),f.a.createElement(z,a()({id:p,name:b,ref:e,"aria-describedby":t,"aria-invalid":g,"aria-disabled":i,hasLeftAction:Boolean(o),hasRightAction:Boolean(r),onChange:function(n){i||u(n)}},d)),r&&f.a.createElement(O.Box,{paddingLeft:2,paddingRight:3},r))}));j.displayName="FieldInput",j.defaultProps={disabled:!1,endAction:void 0,size:"M",startAction:void 0,onChange:function(){}},j.propTypes={disabled:b.a.bool,endAction:b.a.element,onChange:b.a.func,size:b.a.oneOf(Object.keys(g.a.input)),startAction:b.a.element}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(n,e,t){"use strict";t.r(e),t.d(e,"TextInput",(function(){return T}));var r,o=t(6),i=t.n(o),a=t(5),u=t.n(a),c=t(3),s=t.n(c),d=t(1),l=t.n(d),f=t(0),p=t.n(f),h=t(15),m=t(25),b=t(9),g=t(4),v=t(26),x=t(2),y=t.n(x),O=t(13),w=["size","startAction","endAction","name","hint","error","label","labelAction","id","required"],z=y()(g.Box)(r||(r=s()(["\n svg path {\n fill: ",";\n }\n"])),(function(n){return n.theme.colors.neutral500})),T=l.a.forwardRef((function(n,e){var t=n.size,r=n.startAction,o=n.endAction,a=n.name,c=n.hint,s=n.error,f=n.label,p=n.labelAction,g=n.id,v=n.required,x=u()(n,w),y=Object(O.a)("textinput",g),T=Object(d.useRef)(null);if(!f&&!x["aria-label"])throw new Error('The TextInput component needs a "label" or an "aria-label" props');return Object(d.useImperativeHandle)(e,(function(){return{inputWrapperRef:T}})),l.a.createElement("div",{ref:T},l.a.createElement(h.Field,{name:a,hint:c,error:s,id:y},l.a.createElement(m.Stack,{size:1},f&&l.a.createElement(b.Flex,null,l.a.createElement(h.FieldLabel,{required:v},f),p&&l.a.createElement(z,{paddingLeft:1},p)),l.a.createElement(h.FieldInput,i()({size:t,ref:e,startAction:r,endAction:o},x)),l.a.createElement(h.FieldHint,null),l.a.createElement(h.FieldError,null))))}));T.displayName="TextInput",T.defaultProps={"aria-label":void 0,label:void 0,labelAction:void 0,error:void 0,hint:void 0,id:void 0,startAction:void 0,size:"M",endAction:void 0,required:!1},T.propTypes={"aria-label":p.a.string,endAction:p.a.element,error:p.a.string,hint:p.a.string,id:p.a.string,label:p.a.string,labelAction:p.a.element,name:p.a.string.isRequired,required:p.a.bool,size:p.a.oneOf(Object.keys(v.a.input)),startAction:p.a.element}}])}));
|
|
1
|
+
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("styled-components")):"function"==typeof define&&define.amd?define("strapiDs",["react","styled-components"],e):"object"==typeof exports?exports.strapiDs=e(require("react"),require("styled-components")):n.strapiDs=e(n.react,n["styled-components"])}(this,(function(n,e){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(r,o,function(e){return n[e]}.bind(null,o));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=82)}([function(n,e,t){n.exports=t(17)()},function(e,t){e.exports=n},function(n,t){n.exports=e},function(n,e){n.exports=function(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";t.r(e),t.d(e,"Box",(function(){return f}));var r,o=t(3),i=t.n(o),a=t(0),c=t.n(a),u=t(2),s=t.n(u),d=t(7),l={color:!0},f=s.a.div.withConfig({shouldForwardProp:function(n,e){return!l[n]&&e(n)}})(r||(r=i()(["\n // Font\n font-size: ",";\n\n // Colors\n background: ",";\n color: ",";\n\n // Spaces\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n\n // Responsive hiding\n ","\n ","\n \n\n // Borders\n border-radius: ",";\n border-style: ",";\n border-width: ",";\n border-color: ",";\n border: ",";\n\n // Shadows\n box-shadow: ",";\n\n // Handlers\n pointer-events: ",";\n &:hover {\n ","\n }\n\n // Display\n display: ",";\n\n // Position\n position: ",";\n left: ",";\n right: ",";\n top: ",";\n bottom: ",";\n z-index: ",";\n overflow: ",";\n cursor: ",";\n\n // Size\n width: ",";\n max-width: ",";\n min-width: ",";\n height: ",";\n max-height: ",";\n min-height: ",";\n\n // Animation\n transition: ",";\n transform: ",";\n animation: ",";\n\n //Flexbox children props\n flex-shrink: ",";\n flex-grow: ",";\n flex-basis: ",";\n flex: ",";\n\n // Text\n text-align: ",";\n text-transform: ",";\n line-height: ",";\n\n // Cursor\n cursor: ",";\n"])),(function(n){var e=n.fontSize;return n.theme.fontSizes[e]||e}),(function(n){var e=n.theme,t=n.background;return e.colors[t]}),(function(n){var e=n.theme,t=n.color;return e.colors[t]}),(function(n){var e=n.theme,t=n.padding;return Object(d.a)("padding",t,e)}),(function(n){var e=n.theme,t=n.paddingTop;return Object(d.a)("padding-top",t,e)}),(function(n){var e=n.theme,t=n.paddingRight;return Object(d.a)("padding-right",t,e)}),(function(n){var e=n.theme,t=n.paddingBottom;return Object(d.a)("padding-bottom",t,e)}),(function(n){var e=n.theme,t=n.paddingLeft;return Object(d.a)("padding-left",t,e)}),(function(n){var e=n.theme,t=n.marginLeft;return Object(d.a)("margin-left",t,e)}),(function(n){var e=n.theme,t=n.marginRight;return Object(d.a)("margin-right",t,e)}),(function(n){var e=n.theme,t=n.marginTop;return Object(d.a)("margin-top",t,e)}),(function(n){var e=n.theme,t=n.marginBottom;return Object(d.a)("margin-bottom",t,e)}),(function(n){var e=n.theme;return n.hiddenS?"".concat(e.mediaQueries.tablet," { display: none; }"):void 0}),(function(n){var e=n.theme;return n.hiddenXS?"".concat(e.mediaQueries.mobile," { display: none; }"):void 0}),(function(n){var e=n.theme,t=n.hasRadius,r=n.borderRadius;return t?e.borderRadius:r}),(function(n){return n.borderStyle}),(function(n){return n.borderWidth}),(function(n){var e=n.borderColor;return n.theme.colors[e]}),(function(n){var e=n.theme,t=n.borderColor,r=n.borderStyle,o=n.borderWidth;if(t&&!r&&!o)return"1px solid ".concat(e.colors[t])}),(function(n){var e=n.theme,t=n.shadow;return e.shadows[t]}),(function(n){return n.pointerEvents}),(function(n){var e=n._hover,t=n.theme;return e?e(t):void 0}),(function(n){return n.display}),(function(n){return n.position}),(function(n){var e=n.left;return n.theme.spaces[e]||e}),(function(n){var e=n.right;return n.theme.spaces[e]||e}),(function(n){var e=n.top;return n.theme.spaces[e]||e}),(function(n){var e=n.bottom;return n.theme.spaces[e]||e}),(function(n){return n.zIndex}),(function(n){return n.overflow}),(function(n){return n.cursor}),(function(n){var e=n.width;return n.theme.spaces[e]||e}),(function(n){var e=n.maxWidth;return n.theme.spaces[e]||e}),(function(n){var e=n.minWidth;return n.theme.spaces[e]||e}),(function(n){var e=n.height;return n.theme.spaces[e]||e}),(function(n){var e=n.maxHeight;return n.theme.spaces[e]||e}),(function(n){var e=n.minHeight;return n.theme.spaces[e]||e}),(function(n){return n.transition}),(function(n){return n.transform}),(function(n){return n.animation}),(function(n){return n.shrink}),(function(n){return n.grow}),(function(n){return n.basis}),(function(n){return n.flex}),(function(n){return n.textAlign}),(function(n){return n.textTransform}),(function(n){return n.lineHeight}),(function(n){return n.cursor}));f.displayName="Box",f.defaultProps={background:void 0,borderColor:void 0,color:void 0,hiddenS:!1,hiddenXS:!1,padding:void 0,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0,hasRadius:!1,shadow:void 0,children:null,shrink:void 0,grow:void 0,basis:void 0,flex:void 0,_hover:function(){}},f.propTypes={_hover:c.a.func,background:c.a.string,basis:c.a.oneOfType([c.a.string,c.a.string]),borderColor:c.a.string,children:c.a.oneOfType([c.a.node,c.a.string]),color:c.a.string,flex:c.a.oneOfType([c.a.string,c.a.string]),grow:c.a.oneOfType([c.a.string,c.a.string]),hasRadius:c.a.bool,hiddenS:c.a.bool,hiddenXS:c.a.bool,padding:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),paddingBottom:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),paddingLeft:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),paddingRight:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),paddingTop:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),shadow:c.a.string,shrink:c.a.oneOfType([c.a.string,c.a.string])}},function(n,e,t){var r=t(22);n.exports=function(n,e){if(null==n)return{};var t,o,i=r(n,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(){return n.exports=t=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},n.exports.default=n.exports,n.exports.__esModule=!0,t.apply(this,arguments)}n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";var r=t(10),o=t.n(r),i=t(13),a=t.n(i);e.a=function(n,e,t){var r=e;if(Array.isArray(e)||"object"!==a()(e)||(r=[null==e?void 0:e.desktop,null==e?void 0:e.tablet,null==e?void 0:e.mobile]),void 0!==r){if(Array.isArray(r)){var i=r,c=o()(i,3),u=c[0],s=c[1],d=c[2],l="".concat(n,": ").concat(t.spaces[u],";");return void 0!==s&&(l+="".concat(t.mediaQueries.tablet,"{\n ").concat(n,": ").concat(t.spaces[s],";\n }")),void 0!==d&&(l+="".concat(t.mediaQueries.mobile,"{\n ").concat(n,": ").concat(t.spaces[d],";\n }")),l}var f=t.spaces[r]||r;return"".concat(n,": ").concat(f,";")}}},function(n,e,t){"use strict";t.r(e),t.d(e,"Typography",(function(){return l}));var r,o=t(3),i=t.n(o),a=t(0),c=t.n(a),u=t(2),s=["alpha","beta","delta","epsilon","omega","pi","sigma"],d={fontSize:!0,fontWeight:!0},l=t.n(u).a.span.withConfig({shouldForwardProp:function(n,e){return!d[n]&&e(n)}})(r||(r=i()(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n text-transform: ",";\n ","\n ","\n"])),(function(n){var e=n.theme,t=n.fontWeight;return e.fontWeights[t]}),(function(n){var e=n.theme,t=n.fontSize;return e.fontSizes[t]}),(function(n){var e=n.theme,t=n.lineHeight;return e.lineHeights[t]}),(function(n){var e=n.theme,t=n.textColor;return e.colors[t||"neutral800"]}),(function(n){return n.textTransform}),(function(n){return n.ellipsis&&"\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n "}),(function(n){var e=n.variant,t=n.theme;switch(e){case"alpha":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[5],";\n line-height: ").concat(t.lineHeights[2],";\n ");case"beta":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[4],";\n line-height: ").concat(t.lineHeights[1],";\n ");case"delta":return"\n font-weight: ".concat(t.fontWeights.semiBold,";\n font-size: ").concat(t.fontSizes[3],";\n line-height: ").concat(t.lineHeights[2],";\n ");case"epsilon":return"\n font-size: ".concat(t.fontSizes[3],";\n line-height: ").concat(t.lineHeights[6],";\n ");case"omega":return"\n font-size: ".concat(t.fontSizes[2],";\n line-height: ").concat(t.lineHeights[4],";\n ");case"pi":return"\n font-size: ".concat(t.fontSizes[1],";\n line-height: ").concat(t.lineHeights[3],";\n ");case"sigma":return"\n font-weight: ".concat(t.fontWeights.bold,";\n font-size: ").concat(t.fontSizes[0],";\n line-height: ").concat(t.lineHeights[5],";\n text-transform: uppercase;\n ");default:return"\n font-size: ".concat(t.fontSizes[2],";\n ")}}));l.defaultProps={fontWeight:void 0,fontSize:void 0,lineHeight:void 0,textColor:void 0,textTransform:void 0,variant:"omega"},l.propTypes={fontSize:c.a.oneOfType([c.a.number,c.a.string]),fontWeight:c.a.string,lineHeight:c.a.oneOfType([c.a.number,c.a.string]),textColor:c.a.string,textTransform:c.a.string,variant:c.a.oneOf(s)}},function(n,e,t){"use strict";t.r(e),t.d(e,"Flex",(function(){return f}));var r,o=t(3),i=t.n(o),a=t(0),c=t.n(a),u=t(2),s=t.n(u),d=t(4),l={direction:!0},f=s()(d.Box).withConfig({shouldForwardProp:function(n,e){return!l[n]&&e(n)}})(r||(r=i()(["\n display: ",";\n flex-direction: ",";\n justify-content: ",";\n align-items: ",";\n flex-wrap: ",";\n"])),(function(n){return n.inline?"inline-flex":"flex"}),(function(n){return n.direction}),(function(n){return n.justifyContent}),(function(n){return n.alignItems}),(function(n){return n.wrap}));f.defaultProps={alignItems:"center",basis:void 0,direction:"row",inline:!1,justifyContent:void 0,reverse:!1,wrap:void 0},f.propTypes={alignItems:c.a.string,basis:c.a.oneOfType([c.a.string,c.a.number]),direction:c.a.string,inline:c.a.bool,justifyContent:c.a.string,reverse:c.a.bool,wrap:c.a.string}},function(n,e,t){var r=t(23),o=t(24),i=t(20),a=t(25);n.exports=function(n,e){return r(n)||o(n,e)||i(n,e)||a()},n.exports.default=n.exports,n.exports.__esModule=!0},,function(n,e,t){"use strict";t.d(e,"a",(function(){return o})),t.d(e,"b",(function(){return i}));var r=t(1),o=Object(r.createContext)({error:void 0,hint:void 0,name:"",id:""}),i=function(){return Object(r.useContext)(o)}},function(n,e){function t(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(n.exports=t=function(n){return typeof n},n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=t=function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},n.exports.default=n.exports,n.exports.__esModule=!0),t(e)}n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";t.d(e,"b",(function(){return r})),t.d(e,"c",(function(){return o})),t.d(e,"a",(function(){return i}));var r=function(n){return function(e){var t=e.theme,r=e.size;return t.sizes[n][r]}},o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return function(e){var t=e.theme,r=e.hasError;return"\n outline: none;\n box-shadow: 0;\n transition-property: border-color, box-shadow, fill;\n transition-duration: 0.2s;\n\n ".concat(n,":focus-within {\n border: 1px solid ").concat(r?t.colors.danger600:t.colors.primary600,";\n box-shadow: ").concat(r?t.colors.danger600:t.colors.primary600," 0px 0px 0px 2px;\n }\n ")}},i=function(n){var e=n.theme;return"\n position: relative;\n outline: none;\n \n &:after {\n transition-property: all;\n transition-duration: 0.2s;\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -4px;\n bottom: -4px;\n left: -4px;\n right: -4px;\n border: 2px solid transparent;\n }\n\n &:focus-visible {\n outline: none;\n &:after {\n border-radius: 8px;\n content: '';\n position: absolute;\n top: -5px;\n bottom: -5px;\n left: -5px;\n right: -5px;\n border: 2px solid ".concat(e.colors.primary600,";\n }\n }\n")}},function(n,e,t){"use strict";t.d(e,"a",(function(){return i}));var r=t(1),o=0,i=function(n,e){return Object(r.useRef)(e||"".concat(n,"-").concat(++o)).current}},function(n,e,t){"use strict";t.r(e),t.d(e,"Field",(function(){return f})),t.d(e,"FieldLabel",(function(){return S})),t.d(e,"InputWrapper",(function(){return A.b})),t.d(e,"FieldInput",(function(){return A.a})),t.d(e,"FieldHint",(function(){return E})),t.d(e,"FieldError",(function(){return C})),t.d(e,"FieldContext",(function(){return s.a})),t.d(e,"useField",(function(){return s.b})),t.d(e,"FieldAction",(function(){return k}));var r=t(5),o=t.n(r),i=t(1),a=t.n(i),c=t(0),u=t.n(c),s=t(12),d=t(15),l=["children","name","error","hint","id"],f=function(n){var e=n.children,t=n.name,r=n.error,i=n.hint,c=n.id,u=o()(n,l),f=Object(d.a)("field",c);return a.a.createElement("div",u,a.a.createElement(s.a.Provider,{value:{name:t,id:f,error:r,hint:i}},e))};f.defaultProps={error:void 0,hint:void 0,id:void 0,name:void 0},f.propTypes={children:u.a.node.isRequired,error:u.a.string,hint:u.a.string,id:u.a.oneOfType([u.a.string,u.a.number]),name:u.a.string};var p,h,m=t(6),g=t.n(m),b=t(3),v=t.n(b),x=t(2),y=t.n(x),O=t(9),w=t(8),j=["children","required","action"],T=y()(w.Typography)(p||(p=v()(["\n line-height: 0;\n"]))),z=y()(O.Flex)(h||(h=v()(["\n line-height: 0;\n\n svg path {\n fill: ",";\n }\n"])),(function(n){return n.theme.colors.neutral500})),S=function(n){var e=n.children,t=n.required,r=n.action,i=o()(n,j),c=Object(s.b)().id;return a.a.createElement(w.Typography,g()({variant:"pi",textColor:"neutral800",htmlFor:c,fontWeight:"bold",as:"label",required:t},i),a.a.createElement(O.Flex,{alignItems:"center"},e,t&&a.a.createElement(T,{textColor:"danger600"},"*"),r&&a.a.createElement(z,{marginLeft:1},r)))};S.defaultProps={required:!1,action:void 0},S.propTypes={action:u.a.element,children:u.a.node.isRequired,required:u.a.bool};var _,A=t(32),E=function(){var n=Object(s.b)(),e=n.id,t=n.hint,r=n.error;return!t||r?null:a.a.createElement(w.Typography,{variant:"pi",as:"p",id:"".concat(e,"-hint"),textColor:"neutral600"},t)},C=function(){var n=Object(s.b)(),e=n.id,t=n.error;return t?a.a.createElement(w.Typography,{variant:"pi",as:"p",id:"".concat(e,"-error"),textColor:"danger600","data-strapi-field-error":!0},t):null},R=["label","children"],P=y.a.button(_||(_=v()(["\n border: none;\n background: transparent;\n // TODO: Make sure to use the theme when it's ready\n font-size: 1.6rem;\n width: auto;\n padding: 0;\n display: flex;\n align-items: center;\n"]))),k=function(n){var e=n.label,t=n.children,r=o()(n,R);return a.a.createElement(P,g()({"aria-label":e,type:"button"},r),t)};k.propTypes={children:u.a.node.isRequired,label:u.a.string.isRequired}},function(n,e,t){"use strict";var r=t(18);function o(){}function i(){}i.resetWarningCache=o,n.exports=function(){function n(n,e,t,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return n}n.isRequired=n;var t={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},function(n,e,t){"use strict";n.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(n,e){n.exports=function(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(19);n.exports=function(n,e){if(n){if("string"==typeof n)return r(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(n,e):void 0}},n.exports.default=n.exports,n.exports.__esModule=!0},,function(n,e){n.exports=function(n,e){if(null==n)return{};var t,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)t=i[r],e.indexOf(t)>=0||(o[t]=n[t]);return o},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(n){if(Array.isArray(n))return n},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(n);!(a=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";t.r(e),t.d(e,"Stack",(function(){return j}));var r,o,i=t(6),a=t.n(i),c=t(5),u=t.n(c),s=t(3),d=t.n(s),l=t(1),f=t.n(l),p=t(0),h=t.n(p),m=t(2),g=t.n(m),b=t(4),v=t(9),x=["horizontal","spacing","size"],y={size:!0},O=g()(b.Box).withConfig({shouldForwardProp:function(n,e){return!y[n]&&e(n)}})(r||(r=d()(["\n display: flex;\n flex-direction: column;\n\n & > * {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n & > * + * {\n margin-top: ",";\n }\n"])),(function(n){var e=n.theme,t=n.spacing;return e.spaces[t]})),w=g()(v.Flex).withConfig({shouldForwardProp:function(n,e){return!y[n]&&e(n)}})(o||(o=d()(["\n & > * {\n margin-left: 0;\n margin-right: 0;\n }\n\n & > * + * {\n margin-left: ",";\n }\n"])),(function(n){var e=n.theme,t=n.spacing;return e.spaces[t]})),j=Object(l.forwardRef)((function(n,e){var t=n.horizontal,r=n.spacing,o=n.size,i=u()(n,x);return o&&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'),t?f.a.createElement(w,a()({ref:e,spacing:r||o},i)):f.a.createElement(O,a()({ref:e,spacing:r||o},i))}));j.displayName="Stack",j.defaultProps={horizontal:!1,size:void 0,spacing:void 0},j.propTypes={horizontal:h.a.bool,size:h.a.number,spacing:h.a.number}},function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={input:{S:"".concat(2,"rem"),M:"".concat(2.5,"rem")},accordions:{S:"".concat(3,"rem"),M:"".concat(5.5,"rem")}}},,,,,function(n,e,t){"use strict";t.d(e,"b",(function(){return T})),t.d(e,"a",(function(){return z}));var r,o,i=t(6),a=t.n(i),c=t(5),u=t.n(c),s=t(3),d=t.n(s),l=t(1),f=t.n(l),p=t(2),h=t.n(p),m=t(0),g=t.n(m),b=t(27),v=t(14),x=t(12),y=t(9),O=t(4),w=["endAction","startAction","disabled","onChange","size"],j=h.a.input(r||(r=d()(["\n border: none;\n border-radius: ",";\n padding-left: ",";\n padding-right: ",";\n cursor: ",";\n\n color: ",";\n font-weight: 400;\n // TODO: Make sure to use the theme when it's ready\n font-size: ","rem;\n display: block;\n width: 100%;\n background: inherit;\n\n ::placeholder {\n color: ",";\n opacity: 1;\n }\n\n &[aria-disabled='true'] {\n color: inherit;\n }\n\n //focus managed by InputWrapper\n &:focus {\n outline: none;\n box-shadow: none;\n }\n"])),(function(n){return n.theme.borderRadius}),(function(n){var e=n.theme;return n.hasLeftAction?0:e.spaces[4]}),(function(n){var e=n.theme;return n.hasRightAction?0:e.spaces[4]}),(function(n){return n["aria-disabled"]?"not-allowed":void 0}),(function(n){return n.theme.colors.neutral800}),.875,(function(n){return n.theme.colors.neutral500})),T=h()(y.Flex)(o||(o=d()(["\n border: 1px solid ",";\n border-radius: ",";\n background: ",";\n height: ",";\n\n ","\n\n ","\n"])),(function(n){var e=n.theme;return n.hasError?e.colors.danger600:e.colors.neutral200}),(function(n){return n.theme.borderRadius}),(function(n){return n.theme.colors.neutral0}),Object(v.b)("input"),Object(v.c)(),(function(n){var e=n.theme;return n.disabled?"\n color: ".concat(e.colors.neutral600,";\n background: ").concat(e.colors.neutral150,";\n \n "):void 0})),z=Object(l.forwardRef)((function(n,e){var t,r=n.endAction,o=n.startAction,i=n.disabled,c=n.onChange,s=n.size,d=u()(n,w),l=Object(x.b)(),p=l.id,h=l.error,m=l.hint,g=l.name;h?t="".concat(p,"-error"):m&&(t="".concat(p,"-hint"));var b=Boolean(h);return f.a.createElement(T,{size:s,justifyContent:"space-between",hasError:b,disabled:i},o&&f.a.createElement(O.Box,{paddingLeft:3,paddingRight:2},o),f.a.createElement(j,a()({id:p,name:g,ref:e,"aria-describedby":t,"aria-invalid":b,"aria-disabled":i,hasLeftAction:Boolean(o),hasRightAction:Boolean(r),onChange:function(n){i||c(n)}},d)),r&&f.a.createElement(O.Box,{paddingLeft:2,paddingRight:3},r))}));z.displayName="FieldInput",z.defaultProps={disabled:!1,endAction:void 0,size:"M",startAction:void 0,onChange:function(){}},z.propTypes={disabled:g.a.bool,endAction:g.a.element,onChange:g.a.func,size:g.a.oneOf(Object.keys(b.a.input)),startAction:g.a.element}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(n,e,t){"use strict";t.r(e),t.d(e,"TextInput",(function(){return g}));var r=t(6),o=t.n(r),i=t(5),a=t.n(i),c=t(1),u=t.n(c),s=t(0),d=t.n(s),l=t(16),f=t(26),p=t(27),h=t(15),m=["size","startAction","endAction","name","hint","error","label","labelAction","id","required"],g=u.a.forwardRef((function(n,e){var t=n.size,r=n.startAction,i=n.endAction,s=n.name,d=n.hint,p=n.error,g=n.label,b=n.labelAction,v=n.id,x=n.required,y=a()(n,m),O=Object(h.a)("textinput",v),w=Object(c.useRef)(null);if(!g&&!y["aria-label"])throw new Error('The TextInput component needs a "label" or an "aria-label" props');return Object(c.useImperativeHandle)(e,(function(){return{inputWrapperRef:w}})),u.a.createElement("div",{ref:w},u.a.createElement(l.Field,{name:s,hint:d,error:p,id:O},u.a.createElement(f.Stack,{spacing:1},g&&u.a.createElement(l.FieldLabel,{required:x,action:b},g),u.a.createElement(l.FieldInput,o()({size:t,ref:e,startAction:r,endAction:i},y)),u.a.createElement(l.FieldHint,null),u.a.createElement(l.FieldError,null))))}));g.displayName="TextInput",g.defaultProps={"aria-label":void 0,label:void 0,labelAction:void 0,error:void 0,hint:void 0,id:void 0,startAction:void 0,size:"M",endAction:void 0,required:!1},g.propTypes={"aria-label":d.a.string,endAction:d.a.element,error:d.a.string,hint:d.a.string,id:d.a.string,label:d.a.string,labelAction:d.a.element,name:d.a.string.isRequired,required:d.a.bool,size:d.a.oneOf(Object.keys(p.a.input)),startAction:d.a.element}}])}));
|