@zonos/amino 5.5.2 → 5.5.4

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.
@@ -2,11 +2,6 @@ import { type ChangeEvent, type ComponentPropsWithoutRef, type KeyboardEvent, ty
2
2
  import { type HelpTextProps } from "../help-text/HelpText";
3
3
  import type { BaseProps } from "../../types/BaseProps";
4
4
  export type CheckboxProps = Omit<ComponentPropsWithoutRef<'label'>, 'onClick' | 'onChange'> & BaseProps & HelpTextProps & {
5
- /**
6
- * Don't stop propagation of the click event
7
- * @default false
8
- */
9
- allowPropagation?: boolean;
10
5
  checked: boolean;
11
6
  disabled?: boolean;
12
7
  icon?: ReactNode;
@@ -14,6 +9,6 @@ export type CheckboxProps = Omit<ComponentPropsWithoutRef<'label'>, 'onClick' |
14
9
  labelComponent?: ReactNode;
15
10
  labelDescription?: string;
16
11
  onChange: (checked: boolean, event: ChangeEvent<HTMLInputElement> | KeyboardEvent<HTMLInputElement>) => void;
17
- subtitle?: string;
12
+ subtitle?: ReactNode;
18
13
  };
19
- export declare const Checkbox: ({ allowPropagation, checked, className, disabled, error, helpText, icon, label, labelComponent, labelDescription, onChange, style, subtitle, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Checkbox: ({ checked, className, disabled, error, helpText, icon, label, labelComponent, labelDescription, onChange, style, subtitle, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";var e=require("../../tslib.es6-5672428a.js"),o=require("react/jsx-runtime"),n=require("react"),i=require("clsx"),a=require("framer-motion"),c=require("../help-text/HelpText.js"),l=require("../text/Text.js"),r=require("../../icons/CheckmarkIcon.js"),t=require("../../styles/constants/theme.js"),s=require("../../global.module-569e4fd5.js"),d=require("../../utils/getTestId.js"),m=require("../../style-inject.es-d4ddeae4.js");function b(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js");var h=b(i),_="Amino_Checkbox-module__wrapper--PnUGD",x="Amino_Checkbox-module__checkboxContainer--T3dHf",u="Amino_Checkbox-module__disabled--5BFJi",k="Amino_Checkbox-module__aminoCheckbox--s-hZQ",p="Amino_Checkbox-module__styledLabel--nNdgS",C="Amino_Checkbox-module__styledSubtitle--F4Zg5",g="Amino_Checkbox-module__labelWrapper--opXpk",y="Amino_Checkbox-module__infoWrapper--0j0cc",A="Amino_Checkbox-module__styledLabelDescription--m4mFs";m.styleInject(".Amino_Checkbox-module__wrapper--PnUGD{cursor:pointer}.Amino_Checkbox-module__checkboxContainer--T3dHf{display:flex;flex-direction:row}.Amino_Checkbox-module__checkboxContainer--T3dHf,.Amino_Checkbox-module__checkboxContainer--T3dHf *{pointer-events:none;-webkit-user-select:none;user-select:none}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi{cursor:not-allowed}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__aminoCheckbox--s-hZQ{background:var(--amino-checkbox-disabled-background);border:var(--amino-checkbox-disabled-border);box-shadow:none}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__styledLabel--nNdgS{color:var(--amino-gray-600)}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__styledSubtitle--F4Zg5{color:var(--amino-gray-400)}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__labelWrapper--opXpk svg{opacity:var(--amino-opacity-disabled)}.Amino_Checkbox-module__aminoCheckbox--s-hZQ{align-items:center;background:var(--amino-checkbox-background);border:var(--amino-checkbox-border);border-radius:var(--amino-radius-4);box-shadow:var(--amino-checkbox-box-shadow);display:flex;height:16px;justify-content:center;line-height:16px;min-height:16px;min-width:16px;transition:all .15s ease-in-out;-webkit-user-select:none;user-select:none;width:16px}.Amino_Checkbox-module__aminoCheckbox--s-hZQ svg{box-shadow:0 2px 4px #0000000f,0 1px 2px #0000000a;color:var(--amino-gray-0);height:16px;width:16px}[data-theme=night] .Amino_Checkbox-module__aminoCheckbox--s-hZQ svg{color:var(--amino-gray-1000)}.Amino_Checkbox-module__infoWrapper--0j0cc{margin-left:8px}.Amino_Checkbox-module__styledLabelDescription--m4mFs{color:var(--amino-gray-600);margin-left:4px}.Amino_Checkbox-module__styledLabel--nNdgS.Amino_Checkbox-module__styledLabel--nNdgS{margin-bottom:0}.Amino_Checkbox-module__labelWrapper--opXpk{align-items:center;display:flex;line-height:16px}.Amino_Checkbox-module__labelWrapper--opXpk svg{margin-right:4px}");var f=a.motion(r.CheckmarkIcon),v=function(e,o){return e?o?t.theme.danger:t.theme.primary:t.theme.inputBackground},j=function(e,o){return e?"none":"1.5px solid ".concat(o?t.theme.danger:t.theme.gray400)};exports.Checkbox=function(i){var r=i.allowPropagation,m=void 0!==r&&r,b=i.checked,w=void 0!==b&&b,T=i.className,N=i.disabled,q=i.error,H=void 0!==q&&q,F=i.helpText,B=i.icon,S=i.label,I=i.labelComponent,P=i.labelDescription,D=i.onChange,L=i.style,Z=i.subtitle,J=e.__rest(i,["allowPropagation","checked","className","disabled","error","helpText","icon","label","labelComponent","labelDescription","onChange","style","subtitle"]),W=n.useId(),Q=n.useMemo((function(){return d.getTestId({componentName:"checkbox",name:S})}),[S]),X=function(e){m||e.stopPropagation(),N||D(!w,e)};return o.jsxs("label",e.__assign({className:h.default(s.globalStyles.focusableLabel,_,T),htmlFor:W,onClick:function(e){return!m&&e.stopPropagation()},style:e.__assign(e.__assign({},L),{"--amino-checkbox-background":v(w,H),"--amino-checkbox-border":j(w,H),"--amino-checkbox-box-shadow":w?t.theme.shadowButtonPrimary:"none","--amino-checkbox-disabled-background":w?t.theme.blue200:"","--amino-checkbox-disabled-border":w?"none":"1.5px solid ".concat(t.theme.gray300)})},J,{children:[o.jsx("input",{checked:w,className:h.default(s.globalStyles.inputHidden,N&&"disabled"),"data-testid":Q,id:W,onChange:X,onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||X(e)},tabIndex:0,type:"checkbox"}),o.jsxs("div",{className:h.default(x,"amino-input-wrapper",N&&u,N&&"disabled"),children:[o.jsx("div",{className:k,children:o.jsx(a.AnimatePresence,{children:w&&o.jsx(f,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},initial:{opacity:0,scale:.5},transition:{duration:.35,ease:[.4,0,.2,1]}},"checkbox")})}),I||S&&o.jsxs("div",{className:y,children:[o.jsxs("div",{className:g,children:[B,o.jsxs(l.Text,{className:p,type:"input-label",children:[S,P&&o.jsx("span",{className:A,children:P})]})]}),Z&&o.jsx(l.Text,{className:C,type:"subtitle",children:Z})]})]}),o.jsx(c.HelpText,{error:H,helpText:F})]}))};
1
+ "use strict";var e=require("../../tslib.es6-5672428a.js"),o=require("react/jsx-runtime"),n=require("react"),i=require("clsx"),a=require("framer-motion"),c=require("../help-text/HelpText.js"),l=require("../text/Text.js"),r=require("../../icons/CheckmarkIcon.js"),t=require("../../styles/constants/theme.js"),s=require("../../global.module-569e4fd5.js"),d=require("../../utils/getTestId.js"),m=require("../../style-inject.es-d4ddeae4.js");function b(e){return e&&e.__esModule?e:{default:e}}require("../../icons/icon-base/_IconBase.js");var h=b(i),_="Amino_Checkbox-module__wrapper--PnUGD",x="Amino_Checkbox-module__checkboxContainer--T3dHf",u="Amino_Checkbox-module__disabled--5BFJi",k="Amino_Checkbox-module__aminoCheckbox--s-hZQ",p="Amino_Checkbox-module__styledLabel--nNdgS",C="Amino_Checkbox-module__styledSubtitle--F4Zg5",g="Amino_Checkbox-module__labelWrapper--opXpk",y="Amino_Checkbox-module__infoWrapper--0j0cc",A="Amino_Checkbox-module__styledLabelDescription--m4mFs";m.styleInject(".Amino_Checkbox-module__wrapper--PnUGD{cursor:pointer}.Amino_Checkbox-module__checkboxContainer--T3dHf{display:flex;flex-direction:row}.Amino_Checkbox-module__checkboxContainer--T3dHf,.Amino_Checkbox-module__checkboxContainer--T3dHf *{pointer-events:none;-webkit-user-select:none;user-select:none}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi{cursor:not-allowed}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__aminoCheckbox--s-hZQ{background:var(--amino-checkbox-disabled-background);border:var(--amino-checkbox-disabled-border);box-shadow:none}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__styledLabel--nNdgS{color:var(--amino-gray-600)}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__styledSubtitle--F4Zg5{color:var(--amino-gray-400)}.Amino_Checkbox-module__checkboxContainer--T3dHf.Amino_Checkbox-module__disabled--5BFJi .Amino_Checkbox-module__labelWrapper--opXpk svg{opacity:var(--amino-opacity-disabled)}.Amino_Checkbox-module__aminoCheckbox--s-hZQ{align-items:center;background:var(--amino-checkbox-background);border:var(--amino-checkbox-border);border-radius:var(--amino-radius-4);box-shadow:var(--amino-checkbox-box-shadow);display:flex;height:16px;justify-content:center;line-height:16px;min-height:16px;min-width:16px;transition:all .15s ease-in-out;-webkit-user-select:none;user-select:none;width:16px}.Amino_Checkbox-module__aminoCheckbox--s-hZQ svg{box-shadow:0 2px 4px #0000000f,0 1px 2px #0000000a;color:var(--amino-gray-0);height:16px;width:16px}[data-theme=night] .Amino_Checkbox-module__aminoCheckbox--s-hZQ svg{color:var(--amino-gray-1000)}.Amino_Checkbox-module__infoWrapper--0j0cc{margin-left:8px}.Amino_Checkbox-module__styledLabelDescription--m4mFs{color:var(--amino-gray-600);margin-left:4px}.Amino_Checkbox-module__styledLabel--nNdgS.Amino_Checkbox-module__styledLabel--nNdgS{margin-bottom:0}.Amino_Checkbox-module__styledSubtitle--F4Zg5{margin-left:24px;margin-top:4px}.Amino_Checkbox-module__labelWrapper--opXpk{align-items:center;display:flex;line-height:16px}.Amino_Checkbox-module__labelWrapper--opXpk svg{margin-right:4px}");var f=a.motion(r.CheckmarkIcon),j=function(e,o){return e?o?t.theme.danger:t.theme.primary:t.theme.inputBackground},v=function(e,o){return e?"none":"1.5px solid ".concat(o?t.theme.danger:t.theme.gray400)};exports.Checkbox=function(i){var r=i.checked,m=void 0!==r&&r,b=i.className,T=i.disabled,w=i.error,N=void 0!==w&&w,q=i.helpText,F=i.icon,H=i.label,S=i.labelComponent,B=i.labelDescription,I=i.onChange,Z=i.style,D=i.subtitle,L=e.__rest(i,["checked","className","disabled","error","helpText","icon","label","labelComponent","labelDescription","onChange","style","subtitle"]),J=n.useId(),W=n.useMemo((function(){return d.getTestId({componentName:"checkbox",name:H})}),[H]),Q=function(e){T||I(!m,e)};return o.jsxs("label",e.__assign({className:h.default(s.globalStyles.focusableLabel,_,b),htmlFor:J,style:e.__assign(e.__assign({},Z),{"--amino-checkbox-background":j(m,N),"--amino-checkbox-border":v(m,N),"--amino-checkbox-box-shadow":m?t.theme.shadowButtonPrimary:"none","--amino-checkbox-disabled-background":m?t.theme.blue200:"","--amino-checkbox-disabled-border":m?"none":"1.5px solid ".concat(t.theme.gray300)})},L,{children:[o.jsx("input",{checked:m,className:h.default(s.globalStyles.inputHidden,T&&"disabled"),"data-testid":W,id:J,onChange:Q,onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||Q(e)},tabIndex:0,type:"checkbox"}),o.jsxs("div",{className:h.default(x,"amino-input-wrapper",T&&u,T&&"disabled"),children:[o.jsx("div",{className:k,children:o.jsx(a.AnimatePresence,{children:m&&o.jsx(f,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},initial:{opacity:0,scale:.5},transition:{duration:.35,ease:[.4,0,.2,1]}},"checkbox")})}),S||H&&o.jsx("div",{className:y,children:o.jsxs("div",{className:g,children:[F,o.jsxs(l.Text,{className:p,type:"input-label",children:[H,B&&o.jsx("span",{className:A,children:B})]})]})})]}),D&&o.jsx("div",{className:C,children:o.jsx(l.Text,{type:"subtitle",children:D})}),o.jsx(c.HelpText,{error:N,helpText:q})]}))};
@@ -1 +1 @@
1
- "use strict";var e=require("../../tslib.es6-5672428a.js"),t=require("react/jsx-runtime"),l=require("react"),o=require("react-intersection-observer"),n=require("react-select"),a=require("clsx"),i=require("../checkbox/Checkbox.js"),c=require("../help-text/HelpText.js"),s=require("../../icons/CheckCircleIcon.js"),r=require("../../icons/DoubleChevronIcon.js"),d=require("../../icons/RemoveCircleIcon.js"),_=require("../../icons/RemoveIcon.js"),u=require("../../styles/constants/theme.js"),m=require("../../utils/getTestId.js"),S=require("../../style-inject.es-d4ddeae4.js");function p(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../global.module-569e4fd5.js");var y=p(n),h=p(a),g={iconWrapper:"Amino__StyledReactSelect-module__iconWrapper--o6af4",styledFloatedLabel:"Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB",hasIcon:"Amino__StyledReactSelect-module__hasIcon--ua8Qm",hasLabel:"Amino__StyledReactSelect-module__hasLabel--2uysz",hasValue:"Amino__StyledReactSelect-module__hasValue--QzRR6",isFocused:"Amino__StyledReactSelect-module__isFocused--cvHNw",sm:"Amino__StyledReactSelect-module__sm--uRxwS",md:"Amino__StyledReactSelect-module__md--05qsU",lg:"Amino__StyledReactSelect-module__lg--iGesU",xl:"Amino__StyledReactSelect-module__xl--4TfG5",isDisabled:"Amino__StyledReactSelect-module__isDisabled--WwkVj",styledSelectWrapper:"Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S",reactSelectControl:"Amino__StyledReactSelect-module__reactSelectControl--0sbFa",hasError:"Amino__StyledReactSelect-module__hasError--DJ10C",strongLabel:"Amino__StyledReactSelect-module__strongLabel--iF71N",checkboxOptionIconWrapper:"Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF",styledSelectOptionWrapper:"Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9",selectedSingleOptionWrapper:"Amino__StyledReactSelect-module__selectedSingleOptionWrapper--0Yd8x"};S.styleInject(".Amino__StyledReactSelect-module__iconWrapper--o6af4{align-items:center;color:var(--amino-gray-700);display:flex;height:24px;justify-content:space-evenly;margin-left:var(--amino-space-8);margin-right:-2px;width:24px}.Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{font-size:var(--amino-font-size-base);left:14px;line-height:var(--amino-font-size-base);position:absolute;top:calc(50% - var(--amino-font-size-base)/2);transform-origin:left top;transition:var(--amino-transition)}.Amino__StyledReactSelect-module__hasIcon--ua8Qm .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{left:44px}.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{align-self:flex-end}.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:11px;transform:scale(.8)}.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:-6px}.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:2px}.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:-2px}.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:6px}.Amino__StyledReactSelect-module__lg--iGesU.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__lg--iGesU.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:10px}.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:3px}.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:11px}.Amino__StyledReactSelect-module__isDisabled--WwkVj{opacity:var(--amino-opacity-disabled)}.Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S .Amino__StyledReactSelect-module__reactSelectControl--0sbFa+div{z-index:20}.Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S.Amino__StyledReactSelect-module__hasError--DJ10C .Amino__StyledReactSelect-module__reactSelectControl--0sbFa{box-shadow:var(--amino-shadow-select-error)!important}.Amino__StyledReactSelect-module__strongLabel--iF71N{font-weight:600}.Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF{align-items:center;color:var(--amino-styled-react-select-color);display:flex}.Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF svg{color:var(--amino-gray-1000);margin-right:4px}.Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9:not(.Amino__StyledReactSelect-module__isDisabled--WwkVj).Amino__StyledReactSelect-module__isFocused--cvHNw,.Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9:not(.Amino__StyledReactSelect-module__isDisabled--WwkVj):hover{background-color:var(--amino-gray-100)!important}.Amino__StyledReactSelect-module__selectedSingleOptionWrapper--0Yd8x{align-items:center;display:flex;justify-content:space-between}");var R=function(e){switch(e){case"sm":return"".concat(u.theme.radius6);case"lg":case"xl":return"".concat(u.theme.radius10);default:return"".concat(u.theme.radius8)}},b=function(l){return t.jsx(n.components.ClearIndicator,e.__assign({},l,{children:t.jsx(d.RemoveCircleIcon,{size:24})}))},x=function(l){return t.jsx(n.components.DropdownIndicator,e.__assign({},l,{children:t.jsx(r.DoubleChevronIcon,{size:24})}))},f=function(l){var o=l.children,n=l.className,a=l.getStyles,i=l.hasValue,c=l.innerProps,s=l.innerRef,r=l.isDisabled,d=l.isFocused,_=l.selectProps,u=_.icon,m=_.label,S=_.size,p=_.value;return t.jsxs("div",e.__assign({ref:s,className:h.default([n,i&&g.hasValue,u&&g.hasIcon,d&&g.isFocused,r&&g.isDisabled,m||Array.isArray(p)&&p.length>1?g.hasLabel:"",S&&g[S],g.reactSelectControl,"react-select-control"]),style:a("control",l)},c,{children:[u&&t.jsx("div",{className:g.iconWrapper,children:u}),t.jsxs("div",{className:g.styledFloatedLabel,children:[m," ",Array.isArray(p)&&p.length>1&&t.jsxs("strong",{className:g.strongLabel,children:["(",p.length," selected)"]})]}),o]}))},A=function(e){var l=e.children,o=e.color,n=e.icon;return t.jsxs("div",{className:g.checkboxOptionIconWrapper,style:{"--amino-styled-react-select-color":o||"inherit"},children:[n,l]})},v=function(l){var o=l.children,a=e.__rest(l,["children"]);return t.jsx(n.components.MultiValueLabel,e.__assign({},a,{children:t.jsx(A,{icon:a.data.icon,children:o})}))},j=function(l){var o=l.innerProps;return t.jsx("div",e.__assign({},o,{role:"button",children:t.jsx(_.RemoveIcon,{size:14})}))},z=function(l){var n=l.children,a=l.className,c=l.data,r=l.getStyles,d=l.innerProps,_=l.innerRef,u=l.isDisabled,m=l.isFocused,S=l.isSelected,p=l.selectProps,y=o.useInView({fallbackInView:!0,triggerOnce:!0}),h=y.inView,R=y.ref,b=p,x=b.customOption,f=b.hasGroups,v=r("option",l),j=v.color,z=e.__rest(v,["color"]);f&&(z.paddingLeft=48);return t.jsx("div",e.__assign({ref:_},d,{children:t.jsx("div",{className:[a,g.styledSelectOptionWrapper,m&&g.isFocused,u&&g.isDisabled].join(" "),style:z,children:p.isMulti?t.jsx(i.Checkbox,{allowPropagation:!0,checked:S,disabled:u,icon:c.icon,label:c.label,labelDescription:c.labelDescription,onChange:function(){}}):x?x(c.value):t.jsxs("div",{ref:R,className:g.selectedSingleOptionWrapper,children:[h&&t.jsx(A,{color:j,icon:c.icon,children:n}),S&&t.jsx(s.CheckCircleIcon,{color:"blue600",size:24})]})})}))},L={clearIndicator:function(t){return e.__assign(e.__assign({},t),{color:u.theme.gray700,paddingLeft:14,paddingRight:4})},control:function(t,l){var o=l.selectProps.size;return e.__assign(e.__assign({},t),{backgroundColor:u.theme.raisedSurfaceColor,borderColor:"unset",borderRadius:R(o),borderWidth:0,boxShadow:l.isFocused?"".concat(u.theme.shadowSelectActive):"".concat(u.theme.shadowSelectBase),color:u.theme.gray800,cursor:"pointer",flexWrap:"inherit",height:"var(--amino-size-".concat(o,")"),minHeight:"var(--amino-size-".concat(o,")")})},dropdownIndicator:function(t){return e.__assign(e.__assign({},t),{color:u.theme.gray900,paddingLeft:4,paddingRight:10})},group:function(t){return e.__assign(e.__assign({},t),{paddingBottom:0,paddingTop:0})},indicatorSeparator:function(t){return e.__assign(e.__assign({},t),{width:0})},input:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor,opacity:.8})},menu:function(t){return e.__assign(e.__assign({},t),{background:u.theme.surfaceColor,borderRadius:12,boxShadow:u.theme.v3ShadowLarge,marginTop:4})},menuList:function(t){return e.__assign(e.__assign({},t),{paddingLeft:8,paddingRight:8,paddingTop:8})},multiValue:function(t){return e.__assign(e.__assign({},t),{alignItems:"center",background:u.theme.gray100,borderRadius:u.theme.radius4,fontWeight:600,maxHeight:20,minWidth:"inherit",paddingRight:2})},multiValueLabel:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor})},option:function(t,l){return e.__assign(e.__assign({},t),{backgroundColor:"inherit",borderRadius:"8px",color:l.isSelected?u.theme.blue600:u.theme.textColor,cursor:"pointer",fontWeight:l.isSelected?500:400,paddingBottom:7,paddingLeft:8,paddingRight:12,paddingTop:7})},placeholder:function(t){return e.__assign(e.__assign({},t),{".has-label.is-focused &":{opacity:1},opacity:0})},singleValue:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor,fontWeight:500})},valueContainer:function(t){return e.__assign(e.__assign({},t),{".has-icon &":{paddingLeft:0},flexWrap:"nowrap",padding:"unset",paddingLeft:12})}};exports.CheckboxOptionComponent=z,exports.StyledReactSelect=function(o){var n=o.closeOnOutsideScroll,a=void 0!==n&&n,i=o.components,s=o.customOption,r=o.error,d=o.hasGroups,_=o.helpText,u=o.icon,S=o.label,p=o.menuPosition,R=void 0===p?"fixed":p,A=o.placeholder,F=o.size,w=void 0===F?"xl":F,C=o.style,D=e.__rest(o,["closeOnOutsideScroll","components","customOption","error","hasGroups","helpText","icon","label","menuPosition","placeholder","size","style"]),W={customOption:s,hasGroups:d,icon:u,label:S,size:w},I=l.useMemo((function(){return m.getTestId({componentName:"select",name:S})}),[S]),U=l.useRef(null),O=l.useMemo((function(){return!!a&&function(e){var t,l;return!(e.target instanceof HTMLElement)||!(null===(l=null===(t=U.current)||void 0===t?void 0:t.menuListRef)||void 0===l?void 0:l.isEqualNode(e.target))}}),[a]);return t.jsxs("div",{className:h.default(g.styledSelectWrapper,r&&g.hasError),"data-testid":I,children:[t.jsx(y.default,e.__assign({ref:U,closeMenuOnScroll:O,components:e.__assign({ClearIndicator:b,Control:f,DropdownIndicator:x,MultiValueLabel:v,MultiValueRemove:j,Option:z},i),menuPosition:R,placeholder:A||"",styles:e.__assign(e.__assign({},C),L)},D,W)),t.jsx(c.HelpText,{error:r,helpText:_})]})};
1
+ "use strict";var e=require("../../tslib.es6-5672428a.js"),t=require("react/jsx-runtime"),l=require("react"),o=require("react-intersection-observer"),n=require("react-select"),i=require("clsx"),a=require("../checkbox/Checkbox.js"),c=require("../help-text/HelpText.js"),s=require("../../icons/CheckCircleIcon.js"),r=require("../../icons/DoubleChevronIcon.js"),d=require("../../icons/RemoveCircleIcon.js"),_=require("../../icons/RemoveIcon.js"),u=require("../../styles/constants/theme.js"),m=require("../../utils/getTestId.js"),S=require("../../style-inject.es-d4ddeae4.js");function p(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../text/Text.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../global.module-569e4fd5.js");var y=p(n),h=p(i),g={iconWrapper:"Amino__StyledReactSelect-module__iconWrapper--o6af4",styledFloatedLabel:"Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB",hasIcon:"Amino__StyledReactSelect-module__hasIcon--ua8Qm",hasLabel:"Amino__StyledReactSelect-module__hasLabel--2uysz",hasValue:"Amino__StyledReactSelect-module__hasValue--QzRR6",isFocused:"Amino__StyledReactSelect-module__isFocused--cvHNw",sm:"Amino__StyledReactSelect-module__sm--uRxwS",md:"Amino__StyledReactSelect-module__md--05qsU",lg:"Amino__StyledReactSelect-module__lg--iGesU",xl:"Amino__StyledReactSelect-module__xl--4TfG5",isDisabled:"Amino__StyledReactSelect-module__isDisabled--WwkVj",styledSelectWrapper:"Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S",reactSelectControl:"Amino__StyledReactSelect-module__reactSelectControl--0sbFa",hasError:"Amino__StyledReactSelect-module__hasError--DJ10C",strongLabel:"Amino__StyledReactSelect-module__strongLabel--iF71N",checkboxOptionIconWrapper:"Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF",styledSelectOptionWrapper:"Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9",selectedSingleOptionWrapper:"Amino__StyledReactSelect-module__selectedSingleOptionWrapper--0Yd8x"};S.styleInject(".Amino__StyledReactSelect-module__iconWrapper--o6af4{align-items:center;color:var(--amino-gray-700);display:flex;height:24px;justify-content:space-evenly;margin-left:var(--amino-space-8);margin-right:-2px;width:24px}.Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{font-size:var(--amino-font-size-base);left:14px;line-height:var(--amino-font-size-base);position:absolute;top:calc(50% - var(--amino-font-size-base)/2);transform-origin:left top;transition:var(--amino-transition)}.Amino__StyledReactSelect-module__hasIcon--ua8Qm .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{left:44px}.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{align-self:flex-end}.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:11px;transform:scale(.8)}.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:-6px}.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__sm--uRxwS.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:2px}.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:-2px}.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__md--05qsU.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:6px}.Amino__StyledReactSelect-module__lg--iGesU.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__lg--iGesU.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:10px}.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__hasLabel--2uysz .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB+div{margin-bottom:3px}.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__hasValue--QzRR6 .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB,.Amino__StyledReactSelect-module__xl--4TfG5.Amino__StyledReactSelect-module__isFocused--cvHNw .Amino__StyledReactSelect-module__styledFloatedLabel--zUtDB{top:11px}.Amino__StyledReactSelect-module__isDisabled--WwkVj{opacity:var(--amino-opacity-disabled)}.Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S .Amino__StyledReactSelect-module__reactSelectControl--0sbFa+div{z-index:20}.Amino__StyledReactSelect-module__styledSelectWrapper--s0t-S.Amino__StyledReactSelect-module__hasError--DJ10C .Amino__StyledReactSelect-module__reactSelectControl--0sbFa{box-shadow:var(--amino-shadow-select-error)!important}.Amino__StyledReactSelect-module__strongLabel--iF71N{font-weight:600}.Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF{align-items:center;color:var(--amino-styled-react-select-color);display:flex}.Amino__StyledReactSelect-module__checkboxOptionIconWrapper--Q91uF svg{color:var(--amino-gray-1000);margin-right:4px}.Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9:not(.Amino__StyledReactSelect-module__isDisabled--WwkVj).Amino__StyledReactSelect-module__isFocused--cvHNw,.Amino__StyledReactSelect-module__styledSelectOptionWrapper--RNcU9:not(.Amino__StyledReactSelect-module__isDisabled--WwkVj):hover{background-color:var(--amino-gray-100)!important}.Amino__StyledReactSelect-module__selectedSingleOptionWrapper--0Yd8x{align-items:center;display:flex;justify-content:space-between}");var R=function(e){switch(e){case"sm":return"".concat(u.theme.radius6);case"lg":case"xl":return"".concat(u.theme.radius10);default:return"".concat(u.theme.radius8)}},b=function(l){return t.jsx(n.components.ClearIndicator,e.__assign({},l,{children:t.jsx(d.RemoveCircleIcon,{size:24})}))},x=function(l){return t.jsx(n.components.DropdownIndicator,e.__assign({},l,{children:t.jsx(r.DoubleChevronIcon,{size:24})}))},f=function(l){var o=l.children,n=l.className,i=l.getStyles,a=l.hasValue,c=l.innerProps,s=l.innerRef,r=l.isDisabled,d=l.isFocused,_=l.selectProps,u=_.icon,m=_.label,S=_.size,p=_.value;return t.jsxs("div",e.__assign({ref:s,className:h.default([n,a&&g.hasValue,u&&g.hasIcon,d&&g.isFocused,r&&g.isDisabled,m||Array.isArray(p)&&p.length>1?g.hasLabel:"",S&&g[S],g.reactSelectControl,"react-select-control"]),style:i("control",l)},c,{children:[u&&t.jsx("div",{className:g.iconWrapper,children:u}),t.jsxs("div",{className:g.styledFloatedLabel,children:[m," ",Array.isArray(p)&&p.length>1&&t.jsxs("strong",{className:g.strongLabel,children:["(",p.length," selected)"]})]}),o]}))},A=function(e){var l=e.children,o=e.color,n=e.icon;return t.jsxs("div",{className:g.checkboxOptionIconWrapper,style:{"--amino-styled-react-select-color":o||"inherit"},children:[n,l]})},v=function(l){var o=l.children,i=e.__rest(l,["children"]);return t.jsx(n.components.MultiValueLabel,e.__assign({},i,{children:t.jsx(A,{icon:i.data.icon,children:o})}))},j=function(l){var o=l.innerProps;return t.jsx("div",e.__assign({},o,{role:"button",children:t.jsx(_.RemoveIcon,{size:14})}))},z=function(l){var n=l.children,i=l.className,c=l.data,r=l.getStyles,d=l.innerProps,_=l.innerRef,u=l.isDisabled,m=l.isFocused,S=l.isSelected,p=l.selectProps,y=o.useInView({fallbackInView:!0,triggerOnce:!0}),h=y.inView,R=y.ref,b=p,x=b.customOption,f=b.hasGroups,v=r("option",l),j=v.color,z=e.__rest(v,["color"]);f&&(z.paddingLeft=48);return t.jsx("div",e.__assign({ref:_},d,{children:t.jsx("div",{className:[i,g.styledSelectOptionWrapper,m&&g.isFocused,u&&g.isDisabled].join(" "),style:z,children:p.isMulti?t.jsx(a.Checkbox,{checked:S,disabled:u,icon:c.icon,label:c.label,labelDescription:c.labelDescription,onChange:function(){}}):x?x(c.value):t.jsxs("div",{ref:R,className:g.selectedSingleOptionWrapper,children:[h&&t.jsx(A,{color:j,icon:c.icon,children:n}),S&&t.jsx(s.CheckCircleIcon,{color:"blue600",size:24})]})})}))},L={clearIndicator:function(t){return e.__assign(e.__assign({},t),{color:u.theme.gray700,paddingLeft:14,paddingRight:4})},control:function(t,l){var o=l.selectProps.size;return e.__assign(e.__assign({},t),{backgroundColor:u.theme.raisedSurfaceColor,borderColor:"unset",borderRadius:R(o),borderWidth:0,boxShadow:l.isFocused?"".concat(u.theme.shadowSelectActive):"".concat(u.theme.shadowSelectBase),color:u.theme.gray800,cursor:"pointer",flexWrap:"inherit",height:"var(--amino-size-".concat(o,")"),minHeight:"var(--amino-size-".concat(o,")")})},dropdownIndicator:function(t){return e.__assign(e.__assign({},t),{color:u.theme.gray900,paddingLeft:4,paddingRight:10})},group:function(t){return e.__assign(e.__assign({},t),{paddingBottom:0,paddingTop:0})},indicatorSeparator:function(t){return e.__assign(e.__assign({},t),{width:0})},input:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor,opacity:.8})},menu:function(t){return e.__assign(e.__assign({},t),{background:u.theme.surfaceColor,borderRadius:12,boxShadow:u.theme.v3ShadowLarge,marginTop:4})},menuList:function(t){return e.__assign(e.__assign({},t),{paddingLeft:8,paddingRight:8,paddingTop:8})},multiValue:function(t){return e.__assign(e.__assign({},t),{alignItems:"center",background:u.theme.gray100,borderRadius:u.theme.radius4,fontWeight:600,maxHeight:20,minWidth:"inherit",paddingRight:2})},multiValueLabel:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor})},option:function(t,l){return e.__assign(e.__assign({},t),{backgroundColor:"inherit",borderRadius:"8px",color:l.isSelected?u.theme.blue600:u.theme.textColor,cursor:"pointer",fontWeight:l.isSelected?500:400,paddingBottom:7,paddingLeft:8,paddingRight:12,paddingTop:7})},placeholder:function(t){return e.__assign(e.__assign({},t),{".has-label.is-focused &":{opacity:1},opacity:0})},singleValue:function(t){return e.__assign(e.__assign({},t),{color:u.theme.textColor,fontWeight:500})},valueContainer:function(t){return e.__assign(e.__assign({},t),{".has-icon &":{paddingLeft:0},flexWrap:"nowrap",padding:"unset",paddingLeft:12})}};exports.CheckboxOptionComponent=z,exports.StyledReactSelect=function(o){var n=o.closeOnOutsideScroll,i=void 0!==n&&n,a=o.components,s=o.customOption,r=o.error,d=o.hasGroups,_=o.helpText,u=o.icon,S=o.label,p=o.menuPosition,R=void 0===p?"fixed":p,A=o.placeholder,F=o.size,w=void 0===F?"xl":F,C=o.style,D=e.__rest(o,["closeOnOutsideScroll","components","customOption","error","hasGroups","helpText","icon","label","menuPosition","placeholder","size","style"]),W={customOption:s,hasGroups:d,icon:u,label:S,size:w},I=l.useMemo((function(){return m.getTestId({componentName:"select",name:S})}),[S]),U=l.useRef(null),O=l.useMemo((function(){return!!i&&function(e){var t,l;return!(e.target instanceof HTMLElement)||!(null===(l=null===(t=U.current)||void 0===t?void 0:t.menuListRef)||void 0===l?void 0:l.isEqualNode(e.target))}}),[i]);return t.jsxs("div",{className:h.default(g.styledSelectWrapper,r&&g.hasError),"data-testid":I,children:[t.jsx(y.default,e.__assign({ref:U,closeMenuOnScroll:O,components:e.__assign({ClearIndicator:b,Control:f,DropdownIndicator:x,MultiValueLabel:v,MultiValueRemove:j,Option:z},a),menuPosition:R,placeholder:A||"",styles:e.__assign(e.__assign({},C),L)},D,W)),t.jsx(c.HelpText,{error:r,helpText:_})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../tslib.es6-5672428a.js"),l=require("react/jsx-runtime"),o=require("react"),i=require("clsx"),t=require("../checkbox/Checkbox.js"),d=require("../skeleton/Skeleton.js"),a=require("../table/TableRowCollapse.js"),n=require("../text/Text.js"),r=require("../tooltip/Tooltip.js"),m=require("../../style-inject.es-d4ddeae4.js");function s(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../help-text/HelpText.js"),require("../../styles/constants/theme.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../global.module-569e4fd5.js"),require("../../utils/getTestId.js"),require("../button/Button.js"),require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../collapse/Collapse.js"),require("@mui/material/Collapse"),require("../table/TableCell.js"),require("../table/TableRow.js"),require("../../icons/ChevronUpIcon.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../flex/Flex.js");var b=s(o),_=s(i),u="Amino_SimpleTable-module__tableContainer--UsGFZ",c="Amino_SimpleTable-module__tableStyled--Q3YSy",p="Amino_SimpleTable-module__noHeaders---Nf59",h="Amino_SimpleTable-module__bordered--rYjAD",S="Amino_SimpleTable-module__noPadding--b5Y-c",y="Amino_SimpleTable-module__withHover--eL3XX",x="Amino_SimpleTable-module__clickable--XnaaE",T="Amino_SimpleTable-module__allowTextWrap--yVvjm",A="Amino_SimpleTable-module__loading--bvjof",v="Amino_SimpleTable-module__skeletonCellWrapper--I8vJ7",f="Amino_SimpleTable-module__shouldTruncate--x-zmL",j="Amino_SimpleTable-module__collapsible--ozkOZ",g="Amino_SimpleTable-module__collapsed--VazPW",k="Amino_SimpleTable-module__hasContent--typkG",C="Amino_SimpleTable-module__styledCheckbox---753a";m.styleInject(".Amino_SimpleTable-module__tableContainer--UsGFZ{width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy{border-collapse:initial;border-spacing:0;font-size:var(--amino-font-size-base);width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__noHeaders---Nf59 thead{display:none;max-height:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD th{border:none}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td{border-top:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td:first-child{border-top-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td:last-child{border-top-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:last-child td:first-child{border-bottom-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:last-child td:last-child{border-bottom-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD td:first-child{border-left:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD td:last-child{border-right:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead{text-transform:none}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr{border-bottom:var(--amino-border-subtle);height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th{background-color:var(--amino-gray-0);border-bottom:var(--amino-border-subtle);padding:12px;position:-webkit-sticky;position:sticky;top:0;white-space:nowrap;z-index:1}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr{height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__withHover--eL3XX:hover{background-color:var(--amino-hover-color)}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__clickable--XnaaE{cursor:pointer}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr:not(:hover) .row-hover-show{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td{border-bottom:var(--amino-border-subtle);padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child{display:block;height:100%;padding:12px;white-space:nowrap;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.tooltip-wrapper{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.tooltip-wrapper>a{display:inline-flex;height:100%;padding:12px;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__allowTextWrap--yVvjm{white-space:normal}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__loading--bvjof{text-align:center}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__skeletonCellWrapper--I8vJ7{display:flex}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child:not(:hover) .cell-hover-show{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__shouldTruncate--x-zmL{max-width:var(--amino-cell-min-width);min-width:var(--amino-cell-min-width)}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__shouldTruncate--x-zmL>:first-child{overflow:hidden;text-overflow:ellipsis}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ tr>td:last-child{width:40px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ tr>td:last-child>div{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ.Amino_SimpleTable-module__bordered--rYjAD tr:nth-last-child(2).Amino_SimpleTable-module__collapsed--VazPW td:first-child{border-bottom-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ.Amino_SimpleTable-module__bordered--rYjAD tr:nth-last-child(2).Amino_SimpleTable-module__collapsed--VazPW td:last-child{border-bottom-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody *{transition:var(--amino-transition)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)){height:unset}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)):not(.Amino_SimpleTable-module__collapsed--VazPW) td{border-bottom:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)).Amino_SimpleTable-module__collapsed--VazPW.Amino_SimpleTable-module__hasContent--typkG+tr>td{border:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)).Amino_SimpleTable-module__collapsed--VazPW.Amino_SimpleTable-module__hasContent--typkG+tr>td>:first-child{padding:0}.Amino_SimpleTable-module__styledCheckbox---753a{display:inline-flex;padding:12px}");var w=function(e){switch(e){case"center":return"center";case"end":return"flex-end";default:return"flex-start"}},Y=800;exports.SimpleTable=function(i){var m=i.bordered,s=void 0!==m&&m,Q=i.className,q=i.collapsible,z=void 0===q?{enabled:!1,expandedItemKeys:[],toggleItem:function(){}}:q,R=i.CustomLinkComponent,D=i.getRowLink,N=i.headers,W=i.items,H=i.keyExtractor,I=i.loading,P=void 0!==I&&I,Z=i.loadingItems,O=void 0===Z?10:Z,V=i.loadingSkeletonHeight,F=void 0===V?13:V,L=i.maxHeight,G=void 0===L?"100%":L,M=i.noHoverBackground,X=void 0!==M&&M,E=i.onRowClick,B=i.onRowHover,U=i.renderFooter,J=i.selectable,K=void 0===J?{enabled:!1}:J,$=i.style,ee=function(e,o){var i=o[e.key],t=function(i){var t=b.default.Children.toArray(i).some((function(e){return!!b.default.isValidElement(e)&&/row-hover-show|cell-hover-show/.test(e.props.className)})),d=_.default("truncate"===e.textWrapMethod&&!t&&f),a={"--amino-cell-min-width":"".concat(e.minWidth||0,"px")},n=_.default(e.noPadding&&S,"normal"===e.textWrapMethod&&T),m={textAlign:e.align||"start"},s=function(e){switch(e){case"center":return"bottom";case"end":return"bottom-end";default:return"bottom-start"}}(e.align);if(D&&!K.anySelected&&!e.disabledLink){var u=R||"a";return l.jsx("td",{className:d,style:a,children:l.jsx(r.Tooltip,{disabled:"truncate"!==e.textWrapMethod,enterDelay:Y,enterNextDelay:Y,placement:s,subtitle:i,children:l.jsx(u,{className:n,href:D(o),style:m,children:i})})})}return l.jsx("td",{className:d,style:a,children:l.jsx(r.Tooltip,{disabled:"truncate"!==e.textWrapMethod,enterDelay:Y,enterNextDelay:Y,placement:s,subtitle:i,children:l.jsx("span",{className:n,style:m,children:i})})})};return e.renderCustom?l.jsx(l.Fragment,{children:t(e.renderCustom(i,o))}):l.jsx(l.Fragment,{children:t(String(i))})};return l.jsx("div",{className:_.default(u,Q),style:e.__assign({maxHeight:G},$),children:l.jsxs("table",{className:_.default(z.enabled&&j,c,s&&h,N.every((function(e){return!e.name}))&&p),children:[l.jsxs("colgroup",{children:[!!K.onHeaderCheckboxChange&&l.jsx("col",{width:0}),N.map((function(e){return l.jsx("col",{style:{minWidth:void 0!==e.minWidth?"".concat(e.minWidth,"px"):void 0},width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)})),z.enabled&&l.jsx("col",{})]}),l.jsx("thead",{children:l.jsxs("tr",{children:[!!K.onHeaderCheckboxChange&&l.jsx("th",{className:S,children:K.renderCustomHeaderCheckbox||l.jsx(t.Checkbox,{checked:!P&&K.headerCheckboxValue||!1,className:C,disabled:P,onChange:K.onHeaderCheckboxChange})}),N.map((function(e){return l.jsx("th",{className:_.default(e.noPadding&&S),style:{textAlign:e.align||"start"},children:"string"==typeof e.name?l.jsx(n.Text,{color:"gray800",type:"small-header",children:e.name}):e.name},e.key)})),z.enabled&&l.jsx("th",{})]})}),l.jsx("tbody",{children:function(){var i;if(P)return e.__spreadArray([],e.__read(Array(O).keys()),!1).map((function(e){return l.jsxs("tr",{children:[K.enabled&&l.jsx("td",{children:l.jsx("div",{children:l.jsx(d.Skeleton,{height:F},e)})}),N.map((function(o){return l.jsx("td",{className:_.default(A,o.noPadding&&S),children:l.jsx("div",{className:v,style:{justifyContent:w(o.align)},children:l.jsx(d.Skeleton,{height:F,style:{width:"50%"}},e)})},o.key)})),z.enabled&&l.jsx("td",{})]},e)}));if(z.enabled&&(null===(i=z.collapseContent)||void 0===i?void 0:i.length)){var n=z.collapseContent,r=z.expandedItemKeys,m=z.toggleItem;return W.map((function(e,i){var d,s,b,u,c=H(e),p=!r.includes(c),h=null===(d=null==n?void 0:n.find((function(e){return e.key===c})))||void 0===d?void 0:d.content;return l.jsx(a.TableRowCollapse,{className:_.default(!X&&y,p&&g,h&&k),collapsed:p,onToggleCollapse:function(){m(c),null==E||E(e)},rowContent:l.jsxs(l.Fragment,{children:[K.enabled&&l.jsx("td",{children:(null===(s=K.renderCustomRowCheckbox)||void 0===s?void 0:s.call(K,e,i))||l.jsx(t.Checkbox,{checked:(null===(b=K.isRowChecked)||void 0===b?void 0:b.call(K,e,i))||!1,disabled:(null===(u=K.isRowCheckboxDisabled)||void 0===u?void 0:u.call(K,e,i))||!1,onChange:function(l){var o;return null===(o=K.onRowCheckboxChange)||void 0===o?void 0:o.call(K,l,e,i)}})}),N.map((function(i){return l.jsx(o.Fragment,{children:ee(i,e)},i.key)}))]}),children:h},c)}))}return W.map((function(e,i){var d,a,n,r=!!E||!!K.anySelected&&!!K.onRowCheckboxChange;return l.jsxs("tr",{className:_.default(r&&x,!X&&y),onClick:function(l){var o,t,d;K.anySelected?(null===(o=K.isRowCheckboxDisabled)||void 0===o?void 0:o.call(K,e,i))||(l.preventDefault(),null===(t=K.onRowCheckboxChange)||void 0===t||t.call(K,!(null===(d=K.isRowChecked)||void 0===d?void 0:d.call(K,e,i)),e,i)):null==E||E(e)},onMouseEnter:function(){return null==B?void 0:B(e)},children:[K.enabled&&l.jsx("td",{children:(null===(d=K.renderCustomRowCheckbox)||void 0===d?void 0:d.call(K,e,i))||l.jsx(t.Checkbox,{checked:(null===(a=K.isRowChecked)||void 0===a?void 0:a.call(K,e,i))||!1,disabled:(null===(n=K.isRowCheckboxDisabled)||void 0===n?void 0:n.call(K,e,i))||!1,onChange:function(l){var o;return null===(o=K.onRowCheckboxChange)||void 0===o?void 0:o.call(K,l,e,i)}})}),N.map((function(i){return l.jsx(o.Fragment,{children:ee(i,e)},i.key)}))]},H(e))}))}()}),U]})})};
1
+ "use strict";var e=require("../../tslib.es6-5672428a.js"),l=require("react/jsx-runtime"),o=require("react"),i=require("clsx"),t=require("../checkbox/Checkbox.js"),d=require("../skeleton/Skeleton.js"),a=require("../table/TableRowCollapse.js"),n=require("../text/Text.js"),r=require("../tooltip/Tooltip.js"),m=require("../../style-inject.es-d4ddeae4.js");function s(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../help-text/HelpText.js"),require("../../styles/constants/theme.js"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../global.module-569e4fd5.js"),require("../../utils/getTestId.js"),require("../button/Button.js"),require("../button/RippleGroup.js"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("../collapse/Collapse.js"),require("@mui/material/Collapse"),require("../table/TableCell.js"),require("../table/TableRow.js"),require("../../icons/ChevronUpIcon.js"),require("@mui/material/styles"),require("@mui/material/Tooltip"),require("../flex/Flex.js");var b=s(o),_=s(i),u="Amino_SimpleTable-module__tableContainer--UsGFZ",c="Amino_SimpleTable-module__tableStyled--Q3YSy",p="Amino_SimpleTable-module__noHeaders---Nf59",h="Amino_SimpleTable-module__bordered--rYjAD",S="Amino_SimpleTable-module__noPadding--b5Y-c",y="Amino_SimpleTable-module__withHover--eL3XX",x="Amino_SimpleTable-module__clickable--XnaaE",T="Amino_SimpleTable-module__allowTextWrap--yVvjm",A="Amino_SimpleTable-module__loading--bvjof",v="Amino_SimpleTable-module__skeletonCellWrapper--I8vJ7",f="Amino_SimpleTable-module__shouldTruncate--x-zmL",j="Amino_SimpleTable-module__collapsible--ozkOZ",g="Amino_SimpleTable-module__collapsed--VazPW",k="Amino_SimpleTable-module__hasContent--typkG",C="Amino_SimpleTable-module__styledCheckbox---753a";m.styleInject(".Amino_SimpleTable-module__tableContainer--UsGFZ{width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy{border-collapse:initial;border-spacing:0;font-size:var(--amino-font-size-base);width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__noHeaders---Nf59 thead{display:none;max-height:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD th{border:none}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td{border-top:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td:first-child{border-top-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:first-child td:last-child{border-top-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:last-child td:first-child{border-bottom-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD tr:last-child td:last-child{border-bottom-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD td:first-child{border-left:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__bordered--rYjAD td:last-child{border-right:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead{text-transform:none}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr{border-bottom:var(--amino-border-subtle);height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th{background-color:var(--amino-gray-0);border-bottom:var(--amino-border-subtle);padding:12px;position:-webkit-sticky;position:sticky;top:0;white-space:nowrap;z-index:1}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr{height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__withHover--eL3XX:hover{background-color:var(--amino-hover-color)}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__clickable--XnaaE{cursor:pointer}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr:not(:hover) .row-hover-show{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td{border-bottom:var(--amino-border-subtle);padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child{display:block;height:100%;padding:12px;white-space:nowrap;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.tooltip-wrapper{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.tooltip-wrapper>a{display:inline-flex;height:100%;padding:12px;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__allowTextWrap--yVvjm{white-space:normal}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__loading--bvjof{text-align:center}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child.Amino_SimpleTable-module__skeletonCellWrapper--I8vJ7{display:flex}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td>:first-child:not(:hover) .cell-hover-show{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__shouldTruncate--x-zmL{max-width:var(--amino-cell-min-width);min-width:var(--amino-cell-min-width)}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__shouldTruncate--x-zmL>:first-child{overflow:hidden;text-overflow:ellipsis}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ tr>td:last-child{width:40px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ tr>td:last-child>div{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ.Amino_SimpleTable-module__bordered--rYjAD tr:nth-last-child(2).Amino_SimpleTable-module__collapsed--VazPW td:first-child{border-bottom-left-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ.Amino_SimpleTable-module__bordered--rYjAD tr:nth-last-child(2).Amino_SimpleTable-module__collapsed--VazPW td:last-child{border-bottom-right-radius:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody *{transition:var(--amino-transition)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)){height:unset}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)):not(.Amino_SimpleTable-module__collapsed--VazPW) td{border-bottom:var(--amino-border-subtle)}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)).Amino_SimpleTable-module__collapsed--VazPW.Amino_SimpleTable-module__hasContent--typkG+tr>td{border:0}.Amino_SimpleTable-module__tableStyled--Q3YSy.Amino_SimpleTable-module__collapsible--ozkOZ>tbody>tr:not(:has(.Amino_SimpleTable-module__loading--bvjof)).Amino_SimpleTable-module__collapsed--VazPW.Amino_SimpleTable-module__hasContent--typkG+tr>td>:first-child{padding:0}.Amino_SimpleTable-module__styledCheckbox---753a{display:inline-flex;padding:12px}");var w=function(e){switch(e){case"center":return"center";case"end":return"flex-end";default:return"flex-start"}},Y=800;exports.SimpleTable=function(i){var m=i.bordered,s=void 0!==m&&m,Q=i.className,q=i.collapsible,z=void 0===q?{enabled:!1,expandedItemKeys:[],toggleItem:function(){}}:q,R=i.CustomLinkComponent,D=i.getRowLink,N=i.headers,W=i.items,H=i.keyExtractor,I=i.loading,P=void 0!==I&&I,Z=i.loadingItems,O=void 0===Z?10:Z,V=i.loadingSkeletonHeight,F=void 0===V?13:V,L=i.maxHeight,G=void 0===L?"100%":L,M=i.noHoverBackground,X=void 0!==M&&M,E=i.onRowClick,B=i.onRowHover,U=i.renderFooter,J=i.selectable,K=void 0===J?{enabled:!1}:J,$=i.style,ee=function(e,o){var i=o[e.key],t=function(i){var t=b.default.Children.toArray(i).some((function(e){return!!b.default.isValidElement(e)&&/row-hover-show|cell-hover-show/.test(e.props.className)})),d=_.default("truncate"===e.textWrapMethod&&!t&&f),a={"--amino-cell-min-width":"".concat(e.minWidth||0,"px")},n=_.default(e.noPadding&&S,"normal"===e.textWrapMethod&&T),m={textAlign:e.align||"start"},s=function(e){switch(e){case"center":return"bottom";case"end":return"bottom-end";default:return"bottom-start"}}(e.align);if(D&&!K.anySelected&&!e.disabledLink){var u=R||"a";return l.jsx("td",{className:d,style:a,children:l.jsx(r.Tooltip,{disabled:"truncate"!==e.textWrapMethod,enterDelay:Y,enterNextDelay:Y,placement:s,subtitle:i,children:l.jsx(u,{className:n,href:D(o),style:m,children:i})})})}return l.jsx("td",{className:d,style:a,children:l.jsx(r.Tooltip,{disabled:"truncate"!==e.textWrapMethod,enterDelay:Y,enterNextDelay:Y,placement:s,subtitle:i,children:l.jsx("span",{className:n,style:m,children:i})})})};return e.renderCustom?l.jsx(l.Fragment,{children:t(e.renderCustom(i,o))}):l.jsx(l.Fragment,{children:t(String(i))})};return l.jsx("div",{className:_.default(u,Q),style:e.__assign({maxHeight:G},$),children:l.jsxs("table",{className:_.default(z.enabled&&j,c,s&&h,N.every((function(e){return!e.name}))&&p),children:[l.jsxs("colgroup",{children:[!!K.onHeaderCheckboxChange&&l.jsx("col",{width:0}),N.map((function(e){return l.jsx("col",{style:{minWidth:void 0!==e.minWidth?"".concat(e.minWidth,"px"):void 0},width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)})),z.enabled&&l.jsx("col",{})]}),l.jsx("thead",{children:l.jsxs("tr",{children:[!!K.onHeaderCheckboxChange&&l.jsx("th",{className:S,children:K.renderCustomHeaderCheckbox||l.jsx(t.Checkbox,{checked:!P&&K.headerCheckboxValue||!1,className:C,disabled:P,onChange:K.onHeaderCheckboxChange})}),N.map((function(e){return l.jsx("th",{className:_.default(e.noPadding&&S),style:{textAlign:e.align||"start"},children:"string"==typeof e.name?l.jsx(n.Text,{color:"gray800",type:"small-header",children:e.name}):e.name},e.key)})),z.enabled&&l.jsx("th",{})]})}),l.jsx("tbody",{children:function(){var i;if(P)return e.__spreadArray([],e.__read(Array(O).keys()),!1).map((function(e){return l.jsxs("tr",{children:[K.enabled&&l.jsx("td",{children:l.jsx("div",{children:l.jsx(d.Skeleton,{height:F},e)})}),N.map((function(o){return l.jsx("td",{className:_.default(A,o.noPadding&&S),children:l.jsx("div",{className:v,style:{justifyContent:w(o.align)},children:l.jsx(d.Skeleton,{height:F,style:{width:"50%"}},e)})},o.key)})),z.enabled&&l.jsx("td",{})]},e)}));if(z.enabled&&(null===(i=z.collapseContent)||void 0===i?void 0:i.length)){var n=z.collapseContent,r=z.expandedItemKeys,m=z.toggleItem;return W.map((function(e,i){var d,s,b,u,c=H(e),p=!r.includes(c),h=null===(d=null==n?void 0:n.find((function(e){return e.key===c})))||void 0===d?void 0:d.content;return l.jsx(a.TableRowCollapse,{className:_.default(!X&&y,p&&g,h&&k),collapsed:p,onToggleCollapse:function(){m(c),null==E||E(e)},rowContent:l.jsxs(l.Fragment,{children:[K.enabled&&l.jsx("td",{children:(null===(s=K.renderCustomRowCheckbox)||void 0===s?void 0:s.call(K,e,i))||l.jsx(t.Checkbox,{checked:(null===(b=K.isRowChecked)||void 0===b?void 0:b.call(K,e,i))||!1,disabled:(null===(u=K.isRowCheckboxDisabled)||void 0===u?void 0:u.call(K,e,i))||!1,onChange:function(l){var o;return null===(o=K.onRowCheckboxChange)||void 0===o?void 0:o.call(K,l,e,i)}})}),N.map((function(i){return l.jsx(o.Fragment,{children:ee(i,e)},i.key)}))]}),children:h},c)}))}return W.map((function(e,i){var d,a,n,r=o.useRef(null),m=!!E||!!K.anySelected&&!!K.onRowCheckboxChange;return l.jsxs("tr",{className:_.default(m&&x,!X&&y),onClick:function(l){var o,t,d,a;K.anySelected||(null===(o=r.current)||void 0===o?void 0:o.contains(l.target))?(null===(t=K.isRowCheckboxDisabled)||void 0===t?void 0:t.call(K,e,i))||(l.preventDefault(),null===(d=K.onRowCheckboxChange)||void 0===d||d.call(K,!(null===(a=K.isRowChecked)||void 0===a?void 0:a.call(K,e,i)),e,i)):null==E||E(e)},onMouseEnter:function(){return null==B?void 0:B(e)},children:[K.enabled&&l.jsx("td",{ref:r,children:(null===(d=K.renderCustomRowCheckbox)||void 0===d?void 0:d.call(K,e,i))||l.jsx(t.Checkbox,{checked:(null===(a=K.isRowChecked)||void 0===a?void 0:a.call(K,e,i))||!1,disabled:(null===(n=K.isRowCheckboxDisabled)||void 0===n?void 0:n.call(K,e,i))||!1,onChange:function(l){var o;return null===(o=K.onRowCheckboxChange)||void 0===o?void 0:o.call(K,l,e,i)}})}),N.map((function(i){return l.jsx(o.Fragment,{children:ee(i,e)},i.key)}))]},H(e))}))}()}),U]})})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.5.2",
3
+ "version": "5.5.4",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",