@zonos/amino 5.1.39 → 5.1.41

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.
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import type { Color } from "../../types";
3
- export interface RippleActions {
3
+ export type RippleActions = {
4
4
  start: (event: React.SyntheticEvent) => void;
5
- }
5
+ };
6
6
  export type RippleGroupProps = {
7
7
  /**
8
8
  * @default 'inherit'
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import type { RippleActions } from "./RippleGroup";
3
- interface IRippleEventHandlers {
3
+ type RippleEventHandlers = {
4
4
  onMouseDown: React.MouseEventHandler;
5
- }
5
+ };
6
6
  type Props = {
7
7
  disabled: boolean;
8
8
  rippleEnabled: boolean;
@@ -10,7 +10,7 @@ type Props = {
10
10
  };
11
11
  type Return = {
12
12
  /** Combines event handlers */
13
- getRippleHandlers(otherEvents: Partial<IRippleEventHandlers>): IRippleEventHandlers;
13
+ getRippleHandlers(otherEvents: Partial<RippleEventHandlers>): RippleEventHandlers;
14
14
  rippleEnabled: boolean;
15
15
  };
16
16
  export declare const useRipple: ({ disabled, rippleEnabled, rippleRef, }: Props) => Return;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),n=require("styled-components"),i=require("../help-text/HelpText.js"),a=require("./input-type/_DateInput.js"),t=require("./input-type/_FloatLabelInput.js"),s=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),o=require("./input-type/_TimeInput.js"),l=require("../../styles/constants/theme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("react"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../icons/CaretDownIcon.js"),require("../../icons/CaretUpIcon.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../../icons/ClockIcon.js");var p,c,x=d(n),f=x.default.div(p||(p=e.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"])),l.theme.radius6,l.theme.border,l.theme.gray300),b=x.default.div(c||(c=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"],["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"])),(function(e){return e.width?"".concat(e.width,"px"):"100%"}));exports.Input=function(n){var l=n.autoFocus,d=n.className,p=n.disabled,c=n.error,x=n.helpText,h=n.inputMode,y=n.inputPrefix,j=n.inputSuffix,m=n.label,q=n.onChange,v=n.onKeyDown,I=n.pattern,_=n.placeholder,w=n.prefix,g=n.readOnly,C=n.required,P=n.size,T=void 0===P?"xl":P,D=n.suffix,N=n.tabIndex,O=n.type,F=n.value,M=n.valuePrefix,z=n.width,K=e.__rest(n,["autoFocus","className","disabled","error","helpText","inputMode","inputPrefix","inputSuffix","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix","width"]);return r.jsxs(b,{className:"amino-input-wrapper ".concat(p?"disabled":""),width:z,children:[r.jsx(f,{children:function(){switch(O){case"password":return r.jsx(u.PasswordInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:T,suffix:D||j,tabIndex:N,value:F||"",valuePrefix:M},K));case"date":case"datetime-local":return r.jsx(a.DateInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:T,suffix:D||j,tabIndex:N,type:O,value:F||"",valuePrefix:M},K));case"number":return r.jsx(s.NumberInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:T,suffix:null===D?null:D||j,tabIndex:N,value:F||"",valuePrefix:M},K));case"time":return r.jsx(o.TimeInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:T,suffix:D||j,tabIndex:N,value:F||"",valuePrefix:M},K));default:return r.jsx(t.FloatLabelInput,e.__assign({autoFocus:l,className:d,disabled:p,error:c,inputMode:h,label:m,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||y,readOnly:g,required:C,size:T,suffix:D||j,tabIndex:N,type:O,value:F||"",valuePrefix:M},K))}}()}),r.jsx(i.HelpText,{error:c,helpText:x})]})};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),n=require("styled-components"),t=require("../help-text/HelpText.js"),a=require("./input-type/_DateInput.js"),i=require("./input-type/_FloatLabelInput.js"),s=require("./input-type/_NumberInput.js"),u=require("./input-type/_PasswordInput.js"),o=require("./input-type/_TimeInput.js"),l=require("../../styles/constants/theme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../text/Text.js"),require("react"),require("../../icons/CalendarIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../icons/CaretDownIcon.js"),require("../../icons/CaretUpIcon.js"),require("../../icons/EyeIcon.js"),require("../../icons/EyeOffIcon.js"),require("../../icons/ClockIcon.js");var c,p,x=d(n),f=x.default.div(c||(c=e.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n &:hover {\n border: 1px solid ",";\n }\n"])),(function(e){return function(e){switch(e){case"sm":return"".concat(l.theme.radius6);case"lg":return"".concat(l.theme.radius10);case"xl":return"".concat(l.theme.radius12);default:return"".concat(l.theme.radius8)}}(e.size)}),l.theme.border,l.theme.gray300),b=x.default.div(p||(p=e.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"],["\n position: relative;\n width: ",";\n\n & > div {\n flex-direction: row;\n align-items: center;\n display: flex;\n }\n\n &.disabled {\n opacity: 0.4;\n }\n"])),(function(e){return e.width?"".concat(e.width,"px"):"100%"}));exports.Input=function(n){var l=n.autoFocus,d=n.className,c=n.disabled,p=n.error,x=n.helpText,h=n.inputMode,m=n.inputPrefix,y=n.inputSuffix,j=n.label,q=n.onChange,v=n.onKeyDown,I=n.pattern,_=n.placeholder,w=n.prefix,g=n.readOnly,C=n.required,P=n.size,T=void 0===P?"xl":P,D=n.suffix,N=n.tabIndex,O=n.type,z=n.value,F=n.valuePrefix,M=n.width,K=e.__rest(n,["autoFocus","className","disabled","error","helpText","inputMode","inputPrefix","inputSuffix","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix","width"]);return r.jsxs(b,{className:"amino-input-wrapper ".concat(c?"disabled":""),width:M,children:[r.jsx(f,{size:T,children:function(){switch(O){case"password":return r.jsx(u.PasswordInput,e.__assign({autoFocus:l,className:d,disabled:c,error:p,inputMode:h,label:j,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||m,readOnly:g,required:C,size:T,suffix:D||y,tabIndex:N,value:z||"",valuePrefix:F},K));case"date":case"datetime-local":return r.jsx(a.DateInput,e.__assign({autoFocus:l,className:d,disabled:c,error:p,inputMode:h,label:j,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||m,readOnly:g,required:C,size:T,suffix:D||y,tabIndex:N,type:O,value:z||"",valuePrefix:F},K));case"number":return r.jsx(s.NumberInput,e.__assign({autoFocus:l,className:d,disabled:c,error:p,inputMode:h,label:j,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||m,readOnly:g,required:C,size:T,suffix:null===D?null:D||y,tabIndex:N,value:z||"",valuePrefix:F},K));case"time":return r.jsx(o.TimeInput,e.__assign({autoFocus:l,className:d,disabled:c,error:p,inputMode:h,label:j,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||m,readOnly:g,required:C,size:T,suffix:D||y,tabIndex:N,value:z||"",valuePrefix:F},K));default:return r.jsx(i.FloatLabelInput,e.__assign({autoFocus:l,className:d,disabled:c,error:p,inputMode:h,label:j,onChange:q,onKeyDown:v,pattern:I,placeholder:_,prefix:w||m,readOnly:g,required:C,size:T,suffix:D||y,tabIndex:N,type:O,value:z||"",valuePrefix:F},K))}}()}),r.jsx(t.HelpText,{error:p,helpText:x})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),i=require("./_FloatLabelInput.js"),r=require("../../../icons/CalendarIcon.js"),o=require("../../../styles/constants/theme.js");function s(e){return e&&e.__esModule?e:{default:e}}require("../../../utils/getTestId.js"),require("../../../icons/icon-base/_IconBase.js");var d,l,u,c,p=s(a),b=p.default.div(d||(d=e.__makeTemplateObject(["\n position: relative;\n width: 100%;\n"],["\n position: relative;\n width: 100%;\n"]))),f=p.default.div(l||(l=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"],["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"]))),x=p.default.button(u||(u=e.__makeTemplateObject(["\n padding: 6px;\n border-radius: ",";\n transition: ",";\n\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n &:active {\n background: rgba(0, 0, 0, 0.1);\n }\n &:focus {\n outline: none;\n }\n"],["\n padding: 6px;\n border-radius: ",";\n transition: ",";\n\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n &:active {\n background: rgba(0, 0, 0, 0.1);\n }\n &:focus {\n outline: none;\n }\n"])),o.theme.radius4,o.theme.transition),h=p.default(i.FloatLabelInput)(c||(c=e.__makeTemplateObject(["\n && input {\n padding-right: ",";\n appearance: textfield;\n &::-webkit-inner-spin-button,\n &::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n\n &::-webkit-datetime-edit-fields-wrapper {\n transition: 0.5s all ease;\n }\n &:not(:focus):not(.has-content) {\n &::-webkit-datetime-edit-fields-wrapper {\n opacity: 0;\n }\n }\n }\n"],["\n && input {\n padding-right: ",";\n appearance: textfield;\n &::-webkit-inner-spin-button,\n &::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n\n &::-webkit-datetime-edit-fields-wrapper {\n transition: 0.5s all ease;\n }\n &:not(:focus):not(.has-content) {\n &::-webkit-datetime-edit-fields-wrapper {\n opacity: 0;\n }\n }\n }\n"])),o.theme.space40);exports.DateInput=function(a){var i=a.autoFocus,o=a.className,s=a.disabled,d=a.error,l=a.inputMode,u=a.label,c=a.onChange,p=a.onKeyDown,m=a.pattern,k=a.placeholder,w=a.prefix,g=a.readOnly,v=a.required,j=a.suffix,y=a.tabIndex,_=a.value,q=e.__rest(a,["autoFocus","className","disabled","error","inputMode","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","suffix","tabIndex","value"]),I=t.useRef(null);return n.jsx(b,{className:o,children:n.jsx(h,e.__assign({ref:I,"aria-label":u,autoFocus:i,disabled:s,error:d,inputMode:l,label:u,onChange:c,onKeyDown:p,pattern:m,placeholder:k,prefix:w,readOnly:g,required:v,suffix:j||n.jsx(f,{children:n.jsx(x,{onClick:function(){var e,n;null===(e=I.current)||void 0===e||e.showPicker(),null===(n=I.current)||void 0===n||n.dispatchEvent(new Event("input",{bubbles:!0}))},type:"button",children:n.jsx(r.CalendarIcon,{size:24})})}),tabIndex:y,type:"date",value:_},q))})};
1
+ "use strict";var e=require("../../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),i=require("./_FloatLabelInput.js"),r=require("../../../icons/CalendarIcon.js"),o=require("../../../styles/constants/theme.js");function s(e){return e&&e.__esModule?e:{default:e}}require("../../../utils/getTestId.js"),require("../../../icons/icon-base/_IconBase.js");var l,d,u,c,p=s(a),b=p.default.div(l||(l=e.__makeTemplateObject(["\n position: relative;\n width: 100%;\n"],["\n position: relative;\n width: 100%;\n"]))),f=p.default.div(d||(d=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"],["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"]))),x=p.default.button(u||(u=e.__makeTemplateObject(["\n padding: 6px;\n border-radius: 50%;\n transition: ",";\n\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n &:active {\n background: rgba(0, 0, 0, 0.1);\n }\n &:focus {\n outline: none;\n }\n"],["\n padding: 6px;\n border-radius: 50%;\n transition: ",";\n\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n &:active {\n background: rgba(0, 0, 0, 0.1);\n }\n &:focus {\n outline: none;\n }\n"])),o.theme.transition),h=p.default(i.FloatLabelInput)(c||(c=e.__makeTemplateObject(["\n && input {\n padding-right: ",";\n appearance: textfield;\n &::-webkit-inner-spin-button,\n &::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n\n &::-webkit-datetime-edit-fields-wrapper {\n transition: 0.5s all ease;\n }\n &:not(:focus):not(.has-content) {\n &::-webkit-datetime-edit-fields-wrapper {\n opacity: 0;\n }\n }\n }\n"],["\n && input {\n padding-right: ",";\n appearance: textfield;\n &::-webkit-inner-spin-button,\n &::-webkit-calendar-picker-indicator {\n display: none;\n -webkit-appearance: none;\n }\n\n &::-webkit-datetime-edit-fields-wrapper {\n transition: 0.5s all ease;\n }\n &:not(:focus):not(.has-content) {\n &::-webkit-datetime-edit-fields-wrapper {\n opacity: 0;\n }\n }\n }\n"])),o.theme.space40);exports.DateInput=function(a){var i=a.autoFocus,o=a.className,s=a.disabled,l=a.error,d=a.inputMode,u=a.label,c=a.onChange,p=a.onKeyDown,k=a.pattern,m=a.placeholder,w=a.prefix,g=a.readOnly,v=a.required,j=a.suffix,y=a.tabIndex,_=a.value,q=e.__rest(a,["autoFocus","className","disabled","error","inputMode","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","suffix","tabIndex","value"]),I=t.useRef(null);return n.jsx(b,{className:o,children:n.jsx(h,e.__assign({ref:I,"aria-label":u,autoFocus:i,disabled:s,error:l,inputMode:d,label:u,onChange:c,onKeyDown:p,pattern:k,placeholder:m,prefix:w,readOnly:g,required:v,suffix:j||n.jsx(f,{children:n.jsx(x,{onClick:function(){var e,n;null===(e=I.current)||void 0===e||e.showPicker(),null===(n=I.current)||void 0===n||n.dispatchEvent(new Event("input",{bubbles:!0}))},type:"button",children:n.jsx(r.CalendarIcon,{size:24})})}),tabIndex:y,type:"date",value:_},q))})};
@@ -1 +1 @@
1
- "use strict";var n=require("../../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),o=require("../../../styles/constants/theme.js"),r=require("../../../utils/getTestId.js");function i(n){return n&&n.__esModule?n:{default:n}}var l,d,s,p,c,u,f,h=i(a),b=h.default.label(l||(l=n.__makeTemplateObject(["\n display: block;\n max-height: 0;\n pointer-events: none;\n order: 1;\n &::before {\n content: attr(data-label);\n color: ",";\n position: absolute;\n font-size: ",";\n line-height: ",";\n display: inline-block;\n filter: blur(0);\n transform-origin: left top;\n transition: ",";\n margin-left: ",";\n top: calc(50% - "," / 2);\n z-index: 1;\n }\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n /** disabled state */\n .disabled & {\n pointer-events: inherit;\n ::after {\n cursor: not-allowed;\n z-index: 1;\n }\n }\n"],["\n display: block;\n max-height: 0;\n pointer-events: none;\n order: 1;\n &::before {\n content: attr(data-label);\n color: ",";\n position: absolute;\n font-size: ",";\n line-height: ",";\n display: inline-block;\n filter: blur(0);\n transform-origin: left top;\n transition: ",";\n margin-left: ",";\n top: calc(50% - "," / 2);\n z-index: 1;\n }\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n /** disabled state */\n .disabled & {\n pointer-events: inherit;\n ::after {\n cursor: not-allowed;\n z-index: 1;\n }\n }\n"])),o.theme.gray800,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.transition,o.theme.space16,o.theme.fontSizeBase,o.theme.radius6),m=h.default.div(d||(d=n.__makeTemplateObject(["\n font-size: ",";\n line-height: ",";\n font-weight: 500;\n background: transparent;\n padding: 0 6px;\n font-weight: 700;\n flex-basis: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n"],["\n font-size: ",";\n line-height: ",";\n font-weight: 500;\n background: transparent;\n padding: 0 6px;\n font-weight: 700;\n flex-basis: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n"])),o.theme.fontSizeS,o.theme.fontSizeS),g=h.default(m)(s||(s=n.__makeTemplateObject(["\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n"],["\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n"])),o.theme.radius6,o.theme.radius6),x=h.default(m)(p||(p=n.__makeTemplateObject(["\n order: 3;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n"],["\n order: 3;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n"])),o.theme.radius6,o.theme.radius6),y=h.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n order: 2;\n align-items: flex-end;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: calc(",");\n color: ",";\n white-space: nowrap;\n"],["\n display: flex;\n order: 2;\n align-items: flex-end;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: calc(",");\n color: ",";\n white-space: nowrap;\n"])),o.theme.space16,o.theme.space4,o.theme.space8,o.theme.gray800),w=h.default.input(u||(u=n.__makeTemplateObject(["\n height: ",";\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n outline: none;\n transition: ",";\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n order: 2;\n font-weight: 500;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n &.has-input-prefix {\n padding-left: 0;\n & + ","::before {\n margin-left: 0;\n }\n }\n }\n &:not(.has-label) {\n ::placeholder {\n opacity: 0.6;\n }\n }\n\n &.has-value-prefix {\n padding-left: 8px;\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n }\n\n :focus {\n outline: none;\n & + ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error + ","::after {\n box-shadow: ",";\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + ","::before {\n top: 11px;\n transform: scale(0.8);\n }\n }\n\n &:-webkit-autofill,\n &:-moz-autofill {\n background-color: ",";\n color: ",";\n }\n"],["\n height: ",";\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n outline: none;\n transition: ",";\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n order: 2;\n font-weight: 500;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n &.has-input-prefix {\n padding-left: 0;\n & + ","::before {\n margin-left: 0;\n }\n }\n }\n &:not(.has-label) {\n ::placeholder {\n opacity: 0.6;\n }\n }\n\n &.has-value-prefix {\n padding-left: 8px;\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n }\n\n :focus {\n outline: none;\n & + ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error + ","::after {\n box-shadow: ",";\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + ","::before {\n top: 11px;\n transform: scale(0.8);\n }\n }\n\n &:-webkit-autofill,\n &:-moz-autofill {\n background-color: ",";\n color: ",";\n }\n"])),(function(n){return"calc(var(--amino-size-".concat(n.$size,") - 2px)")}),o.theme.space16,o.theme.transition,o.theme.radius6,o.theme.inputBackground,o.theme.radius6,o.theme.radius6,o.theme.space16,o.theme.space8,o.theme.space16,b,o.theme.transition,b,o.theme.glowBlue,b,o.theme.glowError,b,o.theme.inputBackground,o.theme.textColor),k=h.default.div(f||(f=n.__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: row;\n width: 100%;\n background: ",";\n border-radius: ",";\n\n &.sm ",".has-label {\n padding-top: 13px;\n padding-bottom: 0;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 2px;\n }\n }\n }\n\n &.md ",".has-label {\n padding-top: 20px;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 6px;\n }\n }\n }\n\n &.lg ",".has-label {\n &:focus,\n &.has-content {\n & + ","::before {\n top: 10px;\n }\n }\n }\n &.xl ",".has-label {\n padding-bottom: 2px;\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: row;\n width: 100%;\n background: ",";\n border-radius: ",";\n\n &.sm ",".has-label {\n padding-top: 13px;\n padding-bottom: 0;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 2px;\n }\n }\n }\n\n &.md ",".has-label {\n padding-top: 20px;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 6px;\n }\n }\n }\n\n &.lg ",".has-label {\n &:focus,\n &.has-content {\n & + ","::before {\n top: 10px;\n }\n }\n }\n &.xl ",".has-label {\n padding-bottom: 2px;\n }\n"])),o.theme.inputBackground,o.theme.radius6,w,b,w,b,w,b,w),v=t.forwardRef((function(a,o){var i=a.autoFocus,l=a.className,d=a.disabled,s=a.error,p=a.inputMode,c=a.label,u=a.onChange,f=a.onKeyDown,h=a.pattern,m=a.placeholder,v=a.prefix,z=a.readOnly,_=a.required,j=a.size,O=void 0===j?"xl":j,q=a.suffix,T=a.tabIndex,S=a.type,B=a.value,I=a.valuePrefix,M=n.__rest(a,["autoFocus","className","disabled","error","inputMode","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix"]),N=t.useMemo((function(){return r.getTestId({componentName:"input",name:c})}),[c]),P=!!v||!!I,C=!!B||!!I;return e.jsxs(k,{className:"".concat(l||""," ").concat(O),children:[v&&e.jsx(g,{children:v}),I&&e.jsx(y,{children:I}),e.jsx(w,n.__assign({ref:o,$size:O,"aria-label":c,autoFocus:i,className:[s?"has-error":"",c?"has-label":"",C?"has-content":"",v?"has-input-prefix":"",I?"has-value-prefix":""].join(" "),"data-testid":N,disabled:d,hasPrefix:!!v,hasSuffix:!!q,inputMode:p,onChange:u,onKeyDown:f,pattern:h,placeholder:m,readOnly:z,required:_,tabIndex:T,type:S||"text",value:B||""},M)),e.jsx(b,{"data-label":c,hasPrefix:P}),q&&e.jsx(x,{children:q})]})}));exports.FloatLabelInput=v,exports.InputValuePrefix=y;
1
+ "use strict";var n=require("../../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),a=require("styled-components"),o=require("../../../styles/constants/theme.js"),r=require("../../../utils/getTestId.js");function i(n){return n&&n.__esModule?n:{default:n}}var l,s,d,p,c,u,f,h=i(a),b=function(n){switch(n){case"sm":return"".concat(o.theme.radius6);case"lg":return"".concat(o.theme.radius10);case"xl":return"".concat(o.theme.radius12);default:return"".concat(o.theme.radius8)}},m=h.default.label(l||(l=n.__makeTemplateObject(["\n display: block;\n max-height: 0;\n pointer-events: none;\n order: 1;\n &::before {\n content: attr(data-label);\n color: ",";\n position: absolute;\n font-size: ",";\n line-height: ",";\n display: inline-block;\n filter: blur(0);\n transform-origin: left top;\n transition: ",";\n margin-left: ",";\n top: calc(50% - "," / 2);\n z-index: 1;\n }\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n /** disabled state */\n .disabled & {\n pointer-events: inherit;\n ::after {\n cursor: not-allowed;\n z-index: 1;\n }\n }\n"],["\n display: block;\n max-height: 0;\n pointer-events: none;\n order: 1;\n &::before {\n content: attr(data-label);\n color: ",";\n position: absolute;\n font-size: ",";\n line-height: ",";\n display: inline-block;\n filter: blur(0);\n transform-origin: left top;\n transition: ",";\n margin-left: ",";\n top: calc(50% - "," / 2);\n z-index: 1;\n }\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n /** disabled state */\n .disabled & {\n pointer-events: inherit;\n ::after {\n cursor: not-allowed;\n z-index: 1;\n }\n }\n"])),o.theme.gray800,o.theme.fontSizeBase,o.theme.fontSizeBase,o.theme.transition,o.theme.space16,o.theme.fontSizeBase,(function(n){return b(n.$size)})),g=h.default.div(s||(s=n.__makeTemplateObject(["\n font-size: ",";\n line-height: ",";\n font-weight: 500;\n background: transparent;\n padding: 0 6px;\n font-weight: 700;\n flex-basis: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n"],["\n font-size: ",";\n line-height: ",";\n font-weight: 500;\n background: transparent;\n padding: 0 6px;\n font-weight: 700;\n flex-basis: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n"])),o.theme.fontSizeS,o.theme.fontSizeS),x=h.default(g)(d||(d=n.__makeTemplateObject(["\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n"],["\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n"])),o.theme.radius6,o.theme.radius6),w=h.default(g)(p||(p=n.__makeTemplateObject(["\n order: 3;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n"],["\n order: 3;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n"])),o.theme.radius6,o.theme.radius6),y=h.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n order: 2;\n align-items: flex-end;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: calc(",");\n color: ",";\n white-space: nowrap;\n"],["\n display: flex;\n order: 2;\n align-items: flex-end;\n padding-left: ",";\n padding-right: ",";\n padding-bottom: calc(",");\n color: ",";\n white-space: nowrap;\n"])),o.theme.space16,o.theme.space4,o.theme.space8,o.theme.gray800),k=h.default.input(u||(u=n.__makeTemplateObject(["\n height: ",";\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n outline: none;\n transition: ",";\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n order: 2;\n font-weight: 500;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n &.has-input-prefix {\n padding-left: 0;\n & + ","::before {\n margin-left: 0;\n }\n }\n }\n &:not(.has-label) {\n ::placeholder {\n opacity: 0.6;\n }\n }\n\n &.has-value-prefix {\n padding-left: 8px;\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n }\n\n :focus {\n outline: none;\n & + ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error + ","::after {\n box-shadow: ",";\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + ","::before {\n top: 11px;\n transform: scale(0.8);\n }\n }\n\n &:-webkit-autofill,\n &:-moz-autofill {\n background-color: ",";\n color: ",";\n }\n"],["\n height: ",";\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n outline: none;\n transition: ",";\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n order: 2;\n font-weight: 500;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n padding: "," 4px "," ",";\n &.has-input-prefix {\n padding-left: 0;\n & + ","::before {\n margin-left: 0;\n }\n }\n }\n &:not(.has-label) {\n ::placeholder {\n opacity: 0.6;\n }\n }\n\n &.has-value-prefix {\n padding-left: 8px;\n }\n\n ::placeholder {\n transition: ",";\n opacity: 0;\n }\n\n :focus {\n outline: none;\n & + ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error + ","::after {\n box-shadow: ",";\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + ","::before {\n top: 11px;\n transform: scale(0.8);\n }\n }\n\n &:-webkit-autofill,\n &:-moz-autofill {\n background-color: ",";\n color: ",";\n }\n"])),(function(n){return"calc(var(--amino-size-".concat(n.$size,") - 2px)")}),o.theme.space16,o.theme.transition,(function(n){return b(n.$size)}),o.theme.inputBackground,o.theme.radius6,o.theme.radius6,o.theme.space16,o.theme.space8,o.theme.space16,m,o.theme.transition,m,o.theme.glowBlue,m,o.theme.glowError,m,o.theme.inputBackground,o.theme.textColor),v=h.default.div(f||(f=n.__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: row;\n width: 100%;\n background: ",";\n border-radius: ",";\n\n &.sm ",".has-label {\n padding-top: 13px;\n padding-bottom: 0;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 2px;\n }\n }\n }\n\n &.md ",".has-label {\n padding-top: 20px;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 6px;\n }\n }\n }\n\n &.lg ",".has-label {\n &:focus,\n &.has-content {\n & + ","::before {\n top: 10px;\n }\n }\n }\n &.xl ",".has-label {\n padding-bottom: 2px;\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: row;\n width: 100%;\n background: ",";\n border-radius: ",";\n\n &.sm ",".has-label {\n padding-top: 13px;\n padding-bottom: 0;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 2px;\n }\n }\n }\n\n &.md ",".has-label {\n padding-top: 20px;\n &:focus,\n &.has-content {\n & + ","::before {\n top: 6px;\n }\n }\n }\n\n &.lg ",".has-label {\n &:focus,\n &.has-content {\n & + ","::before {\n top: 10px;\n }\n }\n }\n &.xl ",".has-label {\n padding-bottom: 2px;\n }\n"])),o.theme.inputBackground,(function(n){return b(n.$size)}),k,m,k,m,k,m,k),z=t.forwardRef((function(a,o){var i=a.autoFocus,l=a.className,s=a.disabled,d=a.error,p=a.inputMode,c=a.label,u=a.onChange,f=a.onKeyDown,h=a.pattern,b=a.placeholder,g=a.prefix,z=a.readOnly,_=a.required,j=a.size,O=void 0===j?"xl":j,q=a.suffix,T=a.tabIndex,S=a.type,B=a.value,I=a.valuePrefix,$=n.__rest(a,["autoFocus","className","disabled","error","inputMode","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix"]),M=t.useMemo((function(){return r.getTestId({componentName:"input",name:c})}),[c]),N=!!g||!!I,P=!!B||!!I;return e.jsxs(v,{className:"".concat(l||""," ").concat(O),children:[g&&e.jsx(x,{children:g}),I&&e.jsx(y,{children:I}),e.jsx(k,n.__assign({ref:o,$size:O,"aria-label":c,autoFocus:i,className:[d?"has-error":"",c?"has-label":"",P?"has-content":"",g?"has-input-prefix":"",I?"has-value-prefix":""].join(" "),"data-testid":M,disabled:s,hasPrefix:!!g,hasSuffix:!!q,inputMode:p,onChange:u,onKeyDown:f,pattern:h,placeholder:b,readOnly:z,required:_,tabIndex:T,type:S||"text",value:B||""},$)),e.jsx(m,{$size:O,"data-label":c,hasPrefix:N}),q&&e.jsx(w,{children:q})]})}));exports.FloatLabelInput=z,exports.InputValuePrefix=y;
@@ -4,7 +4,7 @@ import { type HelpTextProps } from "../help-text/HelpText";
4
4
  import { type CountryOption, type UnavailableCountry } from "../../types/Country";
5
5
  import type { SelectOption } from "../../types/SelectOption";
6
6
  export declare const MenuList: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, ...props }: MenuListProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
7
- export interface CountryMultiSelectProps<Option extends SelectOption<string> = SelectOption<string>, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'options' | 'value'>, HelpTextProps {
7
+ export type CountryMultiSelectProps<Option extends SelectOption<string> = SelectOption<string>, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> = {
8
8
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
9
9
  countryOptions: CountryOption<Option['value']>[];
10
10
  icon?: ReactNode;
@@ -13,5 +13,5 @@ export interface CountryMultiSelectProps<Option extends SelectOption<string> = S
13
13
  unavailableCountries: UnavailableCountry[];
14
14
  value: Option['value'][];
15
15
  onChange: (countryCodes: Option['value'][]) => void;
16
- }
16
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'options' | 'value'> & HelpTextProps;
17
17
  export declare const CountryMultiSelect: <T extends string>({ countryOptions, label, onChange, unavailableCountries, value, ...props }: CountryMultiSelectProps<SelectOption<T>, true, GroupBase<SelectOption<T>>>) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import { type GroupBase, type Props, type SelectComponentsConfig, type StylesCon
3
3
  import type { HelpTextProps } from "../help-text/HelpText";
4
4
  import type { CountryOption } from "../../types/Country";
5
5
  import type { SelectOption } from "../../types/SelectOption";
6
- export interface CountryPhoneSelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'value'>, HelpTextProps {
6
+ export type CountryPhoneSelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
7
7
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
8
8
  countryOptions: CountryOption[];
9
9
  hasGroups?: boolean;
@@ -14,5 +14,5 @@ export interface CountryPhoneSelectProps<Option extends SelectOption = SelectOpt
14
14
  styles?: StylesConfig<Option, IsMulti, Group>;
15
15
  setPhone: (changed: string) => void;
16
16
  setPhoneCountry: (changed: CountryOption | null) => void;
17
- }
17
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | 'onChange' | 'value'> & HelpTextProps;
18
18
  export declare const CountryPhoneSelect: ({ countryOptions, icon, label, phone, phoneCountry, setPhone, setPhoneCountry, ...props }: CountryPhoneSelectProps<CountryOption>) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ import type { GroupBase, Props, PropsValue, SelectComponentsConfig, StylesConfig
3
3
  import { type HelpTextProps } from "../help-text/HelpText";
4
4
  import type { SelectOption } from "../../types/SelectOption";
5
5
  type RequiredProps = 'onChange' | 'options' | 'value';
6
- export interface MultiSelectProps<Option extends SelectOption = SelectOption, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps>, Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>>, HelpTextProps {
6
+ export type MultiSelectProps<Option extends SelectOption = SelectOption, IsMulti extends true = true, Group extends GroupBase<Option> = GroupBase<Option>> = {
7
7
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
8
8
  hasGroups?: boolean;
9
9
  icon?: ReactNode;
@@ -14,7 +14,7 @@ export interface MultiSelectProps<Option extends SelectOption = SelectOption, Is
14
14
  * value: { label: string; value: string; }[];
15
15
  */
16
16
  value: PropsValue<Option>;
17
- }
17
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
18
18
  export type GroupOption<Option extends SelectOption> = {
19
19
  data: Option;
20
20
  index: 0;
@@ -4,7 +4,7 @@ import { type HelpTextProps } from "../help-text/HelpText";
4
4
  import type { SelectOption } from "../../types/SelectOption";
5
5
  import type { Size } from "../../types/Size";
6
6
  type RequiredProps = 'options' | 'value';
7
- export interface SelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps>, Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>>, HelpTextProps {
7
+ export type SelectProps<Option extends SelectOption = SelectOption, IsMulti extends false = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
8
8
  /** Close the select dropdown menu when scrolling outside of menu to prevent graphical jank */
9
9
  closeOnOutsideScroll?: boolean;
10
10
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
@@ -27,6 +27,6 @@ export interface SelectProps<Option extends SelectOption = SelectOption, IsMulti
27
27
  * onChange={changed => setExampleValue(changed?.value || null)}
28
28
  */
29
29
  onChange: (changed: Option | null, actionMeta: ActionMeta<Option>) => void;
30
- }
30
+ } & Omit<Props<Option, IsMulti, Group>, 'isMulti' | RequiredProps> & Required<Pick<Props<Option, IsMulti, Group>, RequiredProps>> & HelpTextProps;
31
31
  export declare const Select: <Option extends SelectOption, Group extends GroupBase<Option> = GroupBase<Option>>({ isClearable, label, value, ...props }: SelectProps<Option, false, Group>) => import("react/jsx-runtime").JSX.Element;
32
32
  export {};
@@ -11,11 +11,11 @@ type AdditionalProps<Value> = {
11
11
  customOption?: (value: Value) => ReactNode;
12
12
  };
13
13
  export declare const CheckboxOptionComponent: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
14
- export interface StyledReactSelectProps<Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>> extends Props<Option, IsMulti, Group>, HelpTextProps, AdditionalProps<Option['value']> {
14
+ export type StyledReactSelectProps<Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>> = {
15
15
  closeOnOutsideScroll?: boolean;
16
16
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
17
17
  size?: Size;
18
18
  styles?: StylesConfig<Option, IsMulti, Group>;
19
- }
19
+ } & Props<Option, IsMulti, Group> & HelpTextProps & AdditionalProps<Option['value']>;
20
20
  export declare const StyledReactSelect: <Option extends SelectOption, IsMulti extends boolean, Group extends GroupBase<Option>>({ closeOnOutsideScroll, components, customOption, error, hasGroups, helpText, icon, label, menuPosition, placeholder, size, styles, ...props }: StyledReactSelectProps<Option, IsMulti, Group>) => import("react/jsx-runtime").JSX.Element;
21
21
  export {};
@@ -1 +1 @@
1
- "use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("react-select"),i=require("styled-components"),s=require("../checkbox/Checkbox.js"),r=require("../help-text/HelpText.js"),a=require("../../icons/CheckCircleIcon.js"),l=require("../../icons/DoubleChevronIcon.js"),c=require("../../icons/RemoveCircleIcon.js"),u=require("../../icons/RemoveIcon.js"),d=require("../../styles/constants/theme.js"),p=require("../../utils/getTestId.js");function h(n){return n&&n.__esModule?n:{default:n}}require("clsx"),require("framer-motion"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js");var m,g,f,_,x,b,v,j,y,k,T,z=h(o),C=h(i),O=function(t){return e.jsx(o.components.ClearIndicator,n.__assign({},t,{children:e.jsx(c.RemoveCircleIcon,{size:24})}))},w=function(t){return e.jsx(o.components.DropdownIndicator,n.__assign({},t,{children:e.jsx(l.DoubleChevronIcon,{size:24})}))},I=C.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: ",";\n padding: 10px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: ",";\n padding: 10px;\n"])),d.theme.gray700),q=C.default.label(b||(b=n.__makeTemplateObject(["\n position: absolute;\n transition: ",";\n font-size: ",";\n line-height: ",";\n transform-origin: left top;\n left: calc("," - 2px);\n .has-icon & {\n left: calc("," + 2px);\n }\n top: calc(50% - "," / 2);\n .has-label & {\n & + div {\n align-self: flex-end;\n }\n }\n .has-value &,\n .is-focused & {\n top: calc("," + 3px);\n transform: scale(0.8);\n }\n\n /* Size modify */\n ","\n\n ","\n\n ","\n\n ","\n"],["\n position: absolute;\n transition: ",";\n font-size: ",";\n line-height: ",";\n transform-origin: left top;\n left: calc("," - 2px);\n .has-icon & {\n left: calc("," + 2px);\n }\n top: calc(50% - "," / 2);\n .has-label & {\n & + div {\n align-self: flex-end;\n }\n }\n .has-value &,\n .is-focused & {\n top: calc("," + 3px);\n transform: scale(0.8);\n }\n\n /* Size modify */\n ","\n\n ","\n\n ","\n\n ","\n"])),d.theme.transition,d.theme.fontSizeBase,d.theme.fontSizeBase,d.theme.space16,d.theme.space40,d.theme.fontSizeBase,d.theme.space8,(function(e){var t=e.$size;return"sm"===t&&i.css(g||(g=n.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: -6px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 2px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: -6px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 2px;\n }\n "])),t,t,t)}),(function(e){var t=e.$size;return"md"===t&&i.css(f||(f=n.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: -2px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 6px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: -2px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 6px;\n }\n "])),t,t,t)}),(function(e){var t=e.$size;return"lg"===t&&i.css(_||(_=n.__makeTemplateObject(["\n .",".has-value &,\n .",".is-focused & {\n top: 10px;\n }\n "],["\n .",".has-value &,\n .",".is-focused & {\n top: 10px;\n }\n "])),t,t)}),(function(e){var t=e.$size;return"xl"===t&&i.css(x||(x=n.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: 3px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 11px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: 3px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 11px;\n }\n "])),t,t,t)})),R=C.default.div(v||(v=n.__makeTemplateObject(["\n .react-select-control + div {\n z-index: 20;\n }\n\n &.has-error .react-select-control {\n box-shadow: ",";\n }\n"],["\n .react-select-control + div {\n z-index: 20;\n }\n\n &.has-error .react-select-control {\n box-shadow: ",";\n }\n"])),d.theme.glowError),S=C.default.strong(j||(j=n.__makeTemplateObject(["\n font-weight: 600;\n"],["\n font-weight: 600;\n"]))),L=function(t){var o=t.children,i=t.className,s=t.cx,r=t.getStyles,a=t.hasValue,l=t.innerProps,c=t.innerRef,u=t.isDisabled,d=t.isFocused,p=t.menuIsOpen,h=t.selectProps,m=h.icon,g=h.label,f=h.size,_=h.value;return e.jsxs("div",n.__assign({ref:c,className:s({control:!0,"control--is-disabled":u,"control--is-focused":d,"control--menu-is-open":p},[i,a?"has-value":"",m?"has-icon":"",d?"is-focused":"",g||Array.isArray(_)&&_.length>1?"has-label":"",f,"react-select-control"].join(" ")),style:r("control",t)},l,{children:[m&&e.jsx(I,{children:m}),e.jsxs(q,{$size:f,children:[g," ",Array.isArray(_)&&_.length>1&&e.jsxs(S,{children:["(",_.length," selected)"]})]}),o]}))},M=C.default.div(y||(y=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n color: ",";\n svg {\n margin-right: 4px;\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n color: ",";\n svg {\n margin-right: 4px;\n color: ",";\n }\n"])),(function(n){return n.$color||"inherit"}),d.theme.gray1200),P=C.default.div(k||(k=n.__makeTemplateObject(["\n &:not(.is-disabled) {\n &.is-focused,\n &:hover {\n /* The styles are inlined on this component from emotion, so we must override */\n background-color: "," !important;\n }\n }\n"],["\n &:not(.is-disabled) {\n &.is-focused,\n &:hover {\n /* The styles are inlined on this component from emotion, so we must override */\n background-color: "," !important;\n }\n }\n"])),d.theme.gray100),B=C.default.div(T||(T=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))),D=function(n){var t=n.children,o=n.color,i=n.icon;return e.jsxs(M,{$color:o,children:[i,t]})},N=function(t){var i=t.children,s=n.__rest(t,["children"]);return e.jsx(o.components.MultiValueLabel,n.__assign({},s,{children:e.jsx(D,{icon:s.data.icon,children:i})}))},V=function(t){var o=t.innerProps;return e.jsx("div",n.__assign({},o,{role:"button",children:e.jsx(u.RemoveIcon,{size:14})}))},$=function(t){var o=t.children,i=t.className,r=t.data,l=t.getStyles,c=t.innerProps,u=t.innerRef,d=t.isDisabled,p=t.isFocused,h=t.isSelected,m=t.selectProps,g=m,f=g.customOption,_=g.hasGroups,x=l("option",t),b=x.color,v=n.__rest(x,["color"]);_&&(v.paddingLeft=48);return e.jsx("div",n.__assign({ref:u},c,{children:e.jsx(P,{className:[i,p?"is-focused":"",d?"is-disabled":""].join(" "),style:v,children:m.isMulti?e.jsx(s.Checkbox,{checked:h,disabled:d,icon:r.icon,label:r.label,labelDescription:r.labelDescription,onChange:function(){}}):f?f(r.value):e.jsxs(B,{children:[e.jsx(D,{color:b,icon:r.icon,children:o}),h&&e.jsx(a.CheckCircleIcon,{color:"blue600",size:24})]})})}))},W={clearIndicator:function(e){return n.__assign(n.__assign({},e),{color:d.theme.gray700,paddingLeft:14,paddingRight:4})},control:function(e,t){var o=t.selectProps.size;return n.__assign(n.__assign({},e),{background:d.theme.inputBackground,borderColor:"".concat(d.theme.gray200),borderRadius:6,boxShadow:t.isFocused?"".concat(d.theme.glowBlue):"",color:d.theme.gray800,cursor:"pointer",flexWrap:"inherit",height:"var(--amino-size-".concat(o,")"),minHeight:"var(--amino-size-".concat(o,")")})},dropdownIndicator:function(e){return n.__assign(n.__assign({},e),{color:d.theme.gray900,paddingLeft:4,paddingRight:10})},group:function(e){return n.__assign(n.__assign({},e),{paddingBottom:0,paddingTop:0})},indicatorSeparator:function(e){return n.__assign(n.__assign({},e),{width:0})},input:function(e){return n.__assign(n.__assign({},e),{color:d.theme.textColor,opacity:.8})},menu:function(e){return n.__assign(n.__assign({},e),{background:d.theme.surfaceColor,borderRadius:12,boxShadow:d.theme.v3ShadowLarge,marginTop:4})},menuList:function(e){return n.__assign(n.__assign({},e),{paddingLeft:8,paddingRight:8,paddingTop:8})},multiValue:function(e){return n.__assign(n.__assign({},e),{alignItems:"center",background:d.theme.gray100,borderRadius:d.theme.radius4,fontWeight:600,maxHeight:20,minWidth:"inherit",paddingRight:2})},multiValueLabel:function(e){return n.__assign(n.__assign({},e),{color:d.theme.textColor})},option:function(e,t){return n.__assign(n.__assign({},e),{backgroundColor:"inherit",borderRadius:"8px",color:t.isSelected?d.theme.blue600:d.theme.textColor,cursor:"pointer",fontWeight:t.isSelected?500:400,paddingBottom:7,paddingLeft:8,paddingRight:12,paddingTop:7})},placeholder:function(e){return n.__assign(n.__assign({},e),{".has-label.is-focused &":{opacity:1},opacity:0})},singleValue:function(e){return n.__assign(n.__assign({},e),{color:d.theme.textColor,fontWeight:500})},valueContainer:function(e){return n.__assign(n.__assign({},e),{".has-icon &":{paddingLeft:0},flexWrap:"nowrap",padding:"unset",paddingLeft:12})}};exports.CheckboxOptionComponent=$,exports.StyledReactSelect=function(o){var i=o.closeOnOutsideScroll,s=void 0!==i&&i,a=o.components,l=o.customOption,c=o.error,u=o.hasGroups,d=o.helpText,h=o.icon,m=o.label,g=o.menuPosition,f=void 0===g?"fixed":g,_=o.placeholder,x=o.size,b=void 0===x?"xl":x,v=o.styles,j=n.__rest(o,["closeOnOutsideScroll","components","customOption","error","hasGroups","helpText","icon","label","menuPosition","placeholder","size","styles"]),y={customOption:l,hasGroups:u,icon:h,label:m,size:b},k=t.useMemo((function(){return p.getTestId({componentName:"select",name:m})}),[m]),T=t.useRef(null),C=t.useMemo((function(){return!!s&&function(n){var e,t,o;return!(n.target instanceof HTMLElement)||(null===(o=!(null===(t=null===(e=T.current)||void 0===e?void 0:e.menuListRef)||void 0===t?void 0:t.isEqualNode(n.target)))||void 0===o||o)}}),[s]);return e.jsxs(R,{className:[c?"has-error":""].join(" "),"data-testid":k,children:[e.jsx(z.default,n.__assign({ref:T,closeMenuOnScroll:C,components:n.__assign({ClearIndicator:O,Control:L,DropdownIndicator:w,MultiValueLabel:N,MultiValueRemove:V,Option:$},a),menuPosition:f,placeholder:_||"",styles:n.__assign(n.__assign({},v),W)},j,y)),e.jsx(r.HelpText,{error:c,helpText:d})]})};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("react"),o=require("react-select"),i=require("styled-components"),s=require("../checkbox/Checkbox.js"),r=require("../help-text/HelpText.js"),a=require("../../icons/CheckCircleIcon.js"),c=require("../../icons/DoubleChevronIcon.js"),l=require("../../icons/RemoveCircleIcon.js"),u=require("../../icons/RemoveIcon.js"),d=require("../../styles/constants/theme.js"),p=require("../../utils/getTestId.js");function h(e){return e&&e.__esModule?e:{default:e}}require("clsx"),require("framer-motion"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js");var m,g,f,_,x,b,v,j,y,k,T,z=h(o),C=h(i),O=function(e){switch(e){case"sm":return"".concat(d.theme.radius6);case"lg":return"".concat(d.theme.radius10);case"xl":return"".concat(d.theme.radius12);default:return"".concat(d.theme.radius8)}},w=function(t){return n.jsx(o.components.ClearIndicator,e.__assign({},t,{children:n.jsx(l.RemoveCircleIcon,{size:24})}))},I=function(t){return n.jsx(o.components.DropdownIndicator,e.__assign({},t,{children:n.jsx(c.DoubleChevronIcon,{size:24})}))},q=C.default.div(m||(m=e.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: ",";\n padding: 10px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: ",";\n padding: 10px;\n"])),d.theme.gray700),R=C.default.label(b||(b=e.__makeTemplateObject(["\n position: absolute;\n transition: ",";\n font-size: ",";\n line-height: ",";\n transform-origin: left top;\n left: calc("," - 2px);\n .has-icon & {\n left: calc("," + 2px);\n }\n top: calc(50% - "," / 2);\n .has-label & {\n & + div {\n align-self: flex-end;\n }\n }\n .has-value &,\n .is-focused & {\n top: calc("," + 3px);\n transform: scale(0.8);\n }\n\n /* Size modify */\n ","\n\n ","\n\n ","\n\n ","\n"],["\n position: absolute;\n transition: ",";\n font-size: ",";\n line-height: ",";\n transform-origin: left top;\n left: calc("," - 2px);\n .has-icon & {\n left: calc("," + 2px);\n }\n top: calc(50% - "," / 2);\n .has-label & {\n & + div {\n align-self: flex-end;\n }\n }\n .has-value &,\n .is-focused & {\n top: calc("," + 3px);\n transform: scale(0.8);\n }\n\n /* Size modify */\n ","\n\n ","\n\n ","\n\n ","\n"])),d.theme.transition,d.theme.fontSizeBase,d.theme.fontSizeBase,d.theme.space16,d.theme.space40,d.theme.fontSizeBase,d.theme.space8,(function(n){var t=n.$size;return"sm"===t&&i.css(g||(g=e.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: -6px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 2px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: -6px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 2px;\n }\n "])),t,t,t)}),(function(n){var t=n.$size;return"md"===t&&i.css(f||(f=e.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: -2px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 6px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: -2px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 6px;\n }\n "])),t,t,t)}),(function(n){var t=n.$size;return"lg"===t&&i.css(_||(_=e.__makeTemplateObject(["\n .",".has-value &,\n .",".is-focused & {\n top: 10px;\n }\n "],["\n .",".has-value &,\n .",".is-focused & {\n top: 10px;\n }\n "])),t,t)}),(function(n){var t=n.$size;return"xl"===t&&i.css(x||(x=e.__makeTemplateObject(["\n .",".has-label & {\n & + div {\n margin-bottom: 3px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 11px;\n }\n "],["\n .",".has-label & {\n & + div {\n margin-bottom: 3px;\n }\n }\n .",".has-value &,\n .",".is-focused & {\n top: 11px;\n }\n "])),t,t,t)})),S=C.default.div(v||(v=e.__makeTemplateObject(["\n .react-select-control + div {\n z-index: 20;\n }\n\n &.has-error .react-select-control {\n box-shadow: ",";\n }\n"],["\n .react-select-control + div {\n z-index: 20;\n }\n\n &.has-error .react-select-control {\n box-shadow: ",";\n }\n"])),d.theme.glowError),L=C.default.strong(j||(j=e.__makeTemplateObject(["\n font-weight: 600;\n"],["\n font-weight: 600;\n"]))),M=function(t){var o=t.children,i=t.className,s=t.cx,r=t.getStyles,a=t.hasValue,c=t.innerProps,l=t.innerRef,u=t.isDisabled,d=t.isFocused,p=t.menuIsOpen,h=t.selectProps,m=h.icon,g=h.label,f=h.size,_=h.value;return n.jsxs("div",e.__assign({ref:l,className:s({control:!0,"control--is-disabled":u,"control--is-focused":d,"control--menu-is-open":p},[i,a?"has-value":"",m?"has-icon":"",d?"is-focused":"",g||Array.isArray(_)&&_.length>1?"has-label":"",f,"react-select-control"].join(" ")),style:r("control",t)},c,{children:[m&&n.jsx(q,{children:m}),n.jsxs(R,{$size:f,children:[g," ",Array.isArray(_)&&_.length>1&&n.jsxs(L,{children:["(",_.length," selected)"]})]}),o]}))},P=C.default.div(y||(y=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n color: ",";\n svg {\n margin-right: 4px;\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n color: ",";\n svg {\n margin-right: 4px;\n color: ",";\n }\n"])),(function(e){return e.$color||"inherit"}),d.theme.gray1200),B=C.default.div(k||(k=e.__makeTemplateObject(["\n &:not(.is-disabled) {\n &.is-focused,\n &:hover {\n /* The styles are inlined on this component from emotion, so we must override */\n background-color: "," !important;\n }\n }\n"],["\n &:not(.is-disabled) {\n &.is-focused,\n &:hover {\n /* The styles are inlined on this component from emotion, so we must override */\n background-color: "," !important;\n }\n }\n"])),d.theme.gray100),D=C.default.div(T||(T=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n"]))),N=function(e){var t=e.children,o=e.color,i=e.icon;return n.jsxs(P,{$color:o,children:[i,t]})},V=function(t){var i=t.children,s=e.__rest(t,["children"]);return n.jsx(o.components.MultiValueLabel,e.__assign({},s,{children:n.jsx(N,{icon:s.data.icon,children:i})}))},$=function(t){var o=t.innerProps;return n.jsx("div",e.__assign({},o,{role:"button",children:n.jsx(u.RemoveIcon,{size:14})}))},W=function(t){var o=t.children,i=t.className,r=t.data,c=t.getStyles,l=t.innerProps,u=t.innerRef,d=t.isDisabled,p=t.isFocused,h=t.isSelected,m=t.selectProps,g=m,f=g.customOption,_=g.hasGroups,x=c("option",t),b=x.color,v=e.__rest(x,["color"]);_&&(v.paddingLeft=48);return n.jsx("div",e.__assign({ref:u},l,{children:n.jsx(B,{className:[i,p?"is-focused":"",d?"is-disabled":""].join(" "),style:v,children:m.isMulti?n.jsx(s.Checkbox,{checked:h,disabled:d,icon:r.icon,label:r.label,labelDescription:r.labelDescription,onChange:function(){}}):f?f(r.value):n.jsxs(D,{children:[n.jsx(N,{color:b,icon:r.icon,children:o}),h&&n.jsx(a.CheckCircleIcon,{color:"blue600",size:24})]})})}))},H={clearIndicator:function(n){return e.__assign(e.__assign({},n),{color:d.theme.gray700,paddingLeft:14,paddingRight:4})},control:function(n,t){var o=t.selectProps.size;return e.__assign(e.__assign({},n),{background:d.theme.inputBackground,borderColor:"".concat(d.theme.gray200),borderRadius:O(o),boxShadow:t.isFocused?"".concat(d.theme.glowBlue):"",color:d.theme.gray800,cursor:"pointer",flexWrap:"inherit",height:"var(--amino-size-".concat(o,")"),minHeight:"var(--amino-size-".concat(o,")")})},dropdownIndicator:function(n){return e.__assign(e.__assign({},n),{color:d.theme.gray900,paddingLeft:4,paddingRight:10})},group:function(n){return e.__assign(e.__assign({},n),{paddingBottom:0,paddingTop:0})},indicatorSeparator:function(n){return e.__assign(e.__assign({},n),{width:0})},input:function(n){return e.__assign(e.__assign({},n),{color:d.theme.textColor,opacity:.8})},menu:function(n){return e.__assign(e.__assign({},n),{background:d.theme.surfaceColor,borderRadius:12,boxShadow:d.theme.v3ShadowLarge,marginTop:4})},menuList:function(n){return e.__assign(e.__assign({},n),{paddingLeft:8,paddingRight:8,paddingTop:8})},multiValue:function(n){return e.__assign(e.__assign({},n),{alignItems:"center",background:d.theme.gray100,borderRadius:d.theme.radius4,fontWeight:600,maxHeight:20,minWidth:"inherit",paddingRight:2})},multiValueLabel:function(n){return e.__assign(e.__assign({},n),{color:d.theme.textColor})},option:function(n,t){return e.__assign(e.__assign({},n),{backgroundColor:"inherit",borderRadius:"8px",color:t.isSelected?d.theme.blue600:d.theme.textColor,cursor:"pointer",fontWeight:t.isSelected?500:400,paddingBottom:7,paddingLeft:8,paddingRight:12,paddingTop:7})},placeholder:function(n){return e.__assign(e.__assign({},n),{".has-label.is-focused &":{opacity:1},opacity:0})},singleValue:function(n){return e.__assign(e.__assign({},n),{color:d.theme.textColor,fontWeight:500})},valueContainer:function(n){return e.__assign(e.__assign({},n),{".has-icon &":{paddingLeft:0},flexWrap:"nowrap",padding:"unset",paddingLeft:12})}};exports.CheckboxOptionComponent=W,exports.StyledReactSelect=function(o){var i=o.closeOnOutsideScroll,s=void 0!==i&&i,a=o.components,c=o.customOption,l=o.error,u=o.hasGroups,d=o.helpText,h=o.icon,m=o.label,g=o.menuPosition,f=void 0===g?"fixed":g,_=o.placeholder,x=o.size,b=void 0===x?"xl":x,v=o.styles,j=e.__rest(o,["closeOnOutsideScroll","components","customOption","error","hasGroups","helpText","icon","label","menuPosition","placeholder","size","styles"]),y={customOption:c,hasGroups:u,icon:h,label:m,size:b},k=t.useMemo((function(){return p.getTestId({componentName:"select",name:m})}),[m]),T=t.useRef(null),C=t.useMemo((function(){return!!s&&function(e){var n,t,o;return!(e.target instanceof HTMLElement)||(null===(o=!(null===(t=null===(n=T.current)||void 0===n?void 0:n.menuListRef)||void 0===t?void 0:t.isEqualNode(e.target)))||void 0===o||o)}}),[s]);return n.jsxs(S,{className:[l?"has-error":""].join(" "),"data-testid":k,children:[n.jsx(z.default,e.__assign({ref:T,closeMenuOnScroll:C,components:e.__assign({ClearIndicator:w,Control:M,DropdownIndicator:I,MultiValueLabel:V,MultiValueRemove:$,Option:W},a),menuPosition:f,placeholder:_||"",styles:e.__assign(e.__assign({},v),H)},j,y)),n.jsx(r.HelpText,{error:l,helpText:d})]})};
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { SortingStrategy } from '@dnd-kit/sortable/dist/types';
3
3
  import type { DragEndEvent } from "./SortableListDeps";
4
- export interface SortableListProps {
4
+ export type SortableListProps = {
5
5
  children: ReactNode;
6
6
  itemIds: string[];
7
7
  sortingStrategy?: SortingStrategy;
8
8
  handleDragEnd: (e: DragEndEvent) => void;
9
- }
9
+ };
10
10
  export declare const SortableList: ({ children, handleDragEnd, itemIds, sortingStrategy, }: SortableListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
- export interface SortableListItemProps {
2
+ export type SortableListItemProps = {
3
3
  children: ReactNode;
4
4
  handleIconSize?: number;
5
5
  id: string;
6
6
  useHandle?: boolean;
7
- }
7
+ };
8
8
  /** @description This must be a direct child of SortableList */
9
9
  export declare const SortableListItem: ({ children, handleIconSize, id, useHandle, }: SortableListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import type { GridAlignment, GridSpacing } from "../../types";
3
3
  type DivProps = Omit<HTMLAttributes<HTMLDivElement>, 'translate' | 'style' | 'prefix' | 'contentEditable' | 'inputMode' | 'children'>;
4
- export interface StackProps extends DivProps {
4
+ export type StackProps = {
5
5
  /** @default 'unset' */
6
6
  alignment?: GridAlignment;
7
7
  children: ReactNode;
8
8
  /** @default 24 */
9
9
  spacing?: GridSpacing;
10
- }
10
+ } & DivProps;
11
11
  export declare const Stack: ({ alignment, children, ...otherProps }: StackProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  type TagSize = 'base' | 'lg';
3
- export interface TagProps {
3
+ export type TagProps = {
4
4
  children?: ReactNode | string;
5
5
  className?: string;
6
6
  icon?: ReactNode;
@@ -8,6 +8,6 @@ export interface TagProps {
8
8
  size?: TagSize;
9
9
  onClick?: () => void;
10
10
  onClose: () => void;
11
- }
11
+ };
12
12
  export declare const Tag: ({ children, className, icon, iconRight, onClick, onClose, size, }: TagProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1 +1 @@
1
- "use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("../help-text/HelpText.js"),a=require("../../styles/constants/theme.js"),i=require("../../utils/hooks/useHeightAdjustTextarea.js");function l(n){return n&&n.__esModule?n:{default:n}}require("../text/Text.js");var s,d,u,c,p,h=l(o),b=h.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),a.theme.radius6,a.theme.border,a.theme.gray300),f=h.default.div(d||(d=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),a.theme.radius6),m=h.default.label(u||(u=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),a.theme.gray800,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.transition,a.theme.space16),x=h.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"],["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"])),a.theme.space16,a.theme.space8,a.theme.radius6,a.theme.inputBackground,a.theme.fontSizeBase,a.theme.radius6,a.theme.radius6,a.theme.space24,a.theme.space8,a.theme.space16,m,f,a.theme.inputBackground,a.theme.radius6,a.theme.transition,a.theme.gray400,f,a.theme.glowBlue,f,a.theme.glowError),g=h.default.div(p||(p=n.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"],["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"])),(function(n){return n.width?"".concat(n.width,"px"):"100%"}),b,x),w=t.forwardRef((function(o,a){var l=o.className,s=o.disabled,d=o.error,u=o.expandable,c=o.helpText,p=o.label,h=o.maxRows,w=o.rows,v=o.value,j=o.width,k=n.__rest(o,["className","disabled","error","expandable","helpText","label","maxRows","rows","value","width"]),z=!!v,_=t.useRef(null);return i.useHeightAdjustTextarea({maxRows:h,ref:_,shouldExpand:!!u,textareaValue:(null==v?void 0:v.toString())||""}),e.jsxs(g,{className:"amino-input-wrapper ".concat(l||""," ").concat(s?"disabled":""),width:j,children:[e.jsxs(b,{onClick:function(){var n;return null===(n=null==_?void 0:_.current)||void 0===n?void 0:n.focus()},children:[e.jsx(x,n.__assign({ref:function(n){a&&"function"==typeof a?a(n):a&&(a.current=n),_.current=n},className:[d?"has-error":"",p?"has-label":"",z?"has-content":""].join(" "),disabled:s,label:p,rows:w,value:v},k)),e.jsx(m,{"data-label":p,onClick:function(){var n;return null===(n=null==_?void 0:_.current)||void 0===n?void 0:n.focus()},children:p}),e.jsx(f,{})]}),e.jsx(r.HelpText,{error:d,helpText:c})]})}));exports.Textarea=w;
1
+ "use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("../help-text/HelpText.js"),a=require("../../styles/constants/theme.js"),i=require("../../utils/hooks/useHeightAdjustTextarea.js");function l(n){return n&&n.__esModule?n:{default:n}}require("../text/Text.js");var s,d,u,c,p,h=l(o),b=h.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),a.theme.radius12,a.theme.border,a.theme.gray300),f=h.default.div(d||(d=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),a.theme.radius12),m=h.default.label(u||(u=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),a.theme.gray800,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.transition,a.theme.space16),x=h.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"],["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n ::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n ::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"])),a.theme.space16,a.theme.space8,a.theme.radius6,a.theme.inputBackground,a.theme.fontSizeBase,a.theme.radius6,a.theme.radius6,a.theme.space24,a.theme.space8,a.theme.space16,m,f,a.theme.inputBackground,a.theme.radius6,a.theme.transition,a.theme.gray400,f,a.theme.glowBlue,f,a.theme.glowError),g=h.default.div(p||(p=n.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"],["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"])),(function(n){return n.width?"".concat(n.width,"px"):"100%"}),b,x),w=t.forwardRef((function(o,a){var l=o.className,s=o.disabled,d=o.error,u=o.expandable,c=o.helpText,p=o.label,h=o.maxRows,w=o.rows,v=o.value,j=o.width,k=n.__rest(o,["className","disabled","error","expandable","helpText","label","maxRows","rows","value","width"]),z=!!v,_=t.useRef(null);return i.useHeightAdjustTextarea({maxRows:h,ref:_,shouldExpand:!!u,textareaValue:(null==v?void 0:v.toString())||""}),e.jsxs(g,{className:"amino-input-wrapper ".concat(l||""," ").concat(s?"disabled":""),width:j,children:[e.jsxs(b,{onClick:function(){var n;return null===(n=null==_?void 0:_.current)||void 0===n?void 0:n.focus()},children:[e.jsx(x,n.__assign({ref:function(n){a&&"function"==typeof a?a(n):a&&(a.current=n),_.current=n},className:[d?"has-error":"",p?"has-label":"",z?"has-content":""].join(" "),disabled:s,label:p,rows:w,value:v},k)),e.jsx(m,{"data-label":p,onClick:function(){var n;return null===(n=null==_?void 0:_.current)||void 0===n?void 0:n.focus()},children:p}),e.jsx(f,{})]}),e.jsx(r.HelpText,{error:d,helpText:c})]})}));exports.Textarea=w;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.39",
3
+ "version": "5.1.41",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * All components props should extend this interface.
3
3
  */
4
- export interface BaseProps {
4
+ export type BaseProps = {
5
5
  /** For styled-components styling */
6
6
  className?: string;
7
- }
7
+ };
@@ -2,7 +2,7 @@ import type { SelectOption } from "./SelectOption";
2
2
  export declare const regions: readonly ["Africa", "Americas", "Asia", "Central America", "Europe", "North America", "Oceania", "South America"];
3
3
  type Region = (typeof regions)[number];
4
4
  /** @desc /api/address/getCountries */
5
- export interface Country<CountryCode extends string = string> {
5
+ export type Country<CountryCode extends string = string> = {
6
6
  active: boolean;
7
7
  code: CountryCode;
8
8
  code3: string | null;
@@ -14,20 +14,20 @@ export interface Country<CountryCode extends string = string> {
14
14
  region: Region;
15
15
  upsCode: string | null;
16
16
  zipRegex: string | null;
17
- }
18
- export interface CountryOption<CountryCode extends string = string> extends Country<CountryCode>, SelectOption<CountryCode> {
17
+ };
18
+ export type CountryOption<CountryCode extends string = string> = {
19
19
  phoneCode: string[];
20
- }
21
- export interface RegionCountryOption {
20
+ } & Country<CountryCode> & SelectOption<CountryCode>;
21
+ export type RegionCountryOption = {
22
22
  label: Region;
23
23
  options: CountryOption[];
24
- }
25
- export interface UnavailableCountry {
24
+ };
25
+ export type UnavailableCountry = {
26
26
  code: string;
27
27
  message: string;
28
- }
28
+ };
29
29
  /** @desc /api/address/getCountries */
30
- export interface GetCountriesResponse<CountryCode extends string = string> {
30
+ export type GetCountriesResponse<CountryCode extends string = string> = {
31
31
  [key: string]: Country<CountryCode>;
32
- }
32
+ };
33
33
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { JsonError } from "./JsonError";
2
- export interface FetcherError {
2
+ export type FetcherError = {
3
3
  errors: JsonError[];
4
4
  status: number;
5
- }
5
+ };
@@ -1,5 +1,5 @@
1
- export interface JsonError {
1
+ export type JsonError = {
2
2
  errorId?: number;
3
3
  message: string;
4
4
  type: string;
5
- }
5
+ };
@@ -1,4 +1,4 @@
1
- export interface SwrtParams<T> {
1
+ export type SwrtParams<T> = {
2
2
  json: T | null;
3
3
  response: Response | null;
4
- }
4
+ };