@zonos/amino 4.2.0 → 4.2.1
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.
|
@@ -9,9 +9,5 @@ export declare type Props = {
|
|
|
9
9
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
10
10
|
/** @description Decorater takes a React node, preferably an icon or an avatar */
|
|
11
11
|
decorator?: ReactNode;
|
|
12
|
-
/** @deprecated use decorator instead */
|
|
13
|
-
icon?: string;
|
|
14
|
-
/** @deprecated use decorator instead */
|
|
15
|
-
iconComponent?: ReactNode;
|
|
16
12
|
};
|
|
17
13
|
export declare const ListItem: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("../../_tslib-fe391a2e.js"),n=require("react/jsx-runtime"),r=require("react"),i=require("../text/Text.js"),t=require("../../styles/constants/theme.js"),a=require("styled-components");function l(e){return e&&e.__esModule?e:{default:e}}var s,o,c,d,p,u,m=l(a),h=m.default.div(d||(d=e.__makeTemplateObject(["\n padding: "," ",";\n display: flex;\n flex-direction: row;\n gap: ",";\n align-items: center;\n min-height: ",";\n border-radius: ",";\n line-height: 16px;\n\n .___icon-wrapper {\n display: none;\n &.has-icon {\n display: inline-block;\n }\n }\n\n ","\n\n ","\n\n :hover {\n ","\n }\n"],["\n padding: "," ",";\n display: flex;\n flex-direction: row;\n gap: ",";\n align-items: center;\n min-height: ",";\n border-radius: ",";\n line-height: 16px;\n\n .___icon-wrapper {\n display: none;\n &.has-icon {\n display: inline-block;\n }\n }\n\n ","\n\n ","\n\n :hover {\n ","\n }\n"])),t.theme.space8,t.theme.space16,t.theme.space16,t.theme.sizeXl,t.theme.radius8,(function(n){var r=n.selected;return!n.disabled&&r&&a.css(s||(s=e.__makeTemplateObject(["\n background-color: ",";\n color: ",";\n "],["\n background-color: ",";\n color: ",";\n "])),t.theme.blue100,t.theme.blue800)}),(function(n){return n.disabled&&a.css(o||(o=e.__makeTemplateObject(["\n color: ",";\n cursor: not-allowed;\n "],["\n color: ",";\n cursor: not-allowed;\n "])),t.theme.gray600)}),(function(n){var r=n.disabled,i=n.withClick,l=n.selected;return!r&&i&&!l&&a.css(c||(c=e.__makeTemplateObject(["\n background-color: ",";\n cursor: pointer;\n "],["\n background-color: ",";\n cursor: pointer;\n "])),t.theme.gray100)})),g=m.default.div(p||(p=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n flex-grow: 1;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n flex-grow: 1;\n"]))),x=m.default.img(u||(u=e.__makeTemplateObject(["\n margin-right: ",";\n width: 32px;\n height: 32px;\n border-radius: ",";\n"],["\n margin-right: ",";\n width: 32px;\n height: 32px;\n border-radius: ",";\n"])),t.theme.space16,t.theme.radius6),_=function(e){var r=e.icon,i=e.iconComponent,t=e.label;return r?n.jsx(x,{src:r,alt:t}):i?n.jsx(n.Fragment,{children:i}):null},b=r.forwardRef((function(r,t){var a=r.className,l=r.disabled,s=r.decorator,o=r.selected,c=r.label,d=r.subtitle,p=r.rightDecorator,u=r.onClick;return n.jsxs(h,e.__assign({className:a,disabled:l,selected:o,withClick:!!u,onClick:function(e){return!l&&u&&u(e)},ref:t},{children:[n.jsxs("div",e.__assign({className:["___icon-wrapper",s?"has-icon":""].join(" ")},{children:[s,n.jsx(_,{label:"string"==typeof c?c:""})]})),n.jsxs(g,{children:[n.jsx(i.Text,e.__assign({type:"label"},{children:c})),d&&n.jsx(i.Text,e.__assign({type:"caption"},{children:d}))]}),p]}))}));exports.ListItem=b;
|