@zonos/amino 5.1.25 → 5.1.26

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.
@@ -52,7 +52,7 @@ export type SimpleTableProps<T extends object> = {
52
52
  selectable?: {
53
53
  enabled: boolean;
54
54
  headerCheckboxValue?: boolean;
55
- selectedRowIndexes?: number[];
55
+ isRowChecked?: (item: T, index: number) => boolean;
56
56
  onHeaderCheckboxChange?: (checked: boolean) => void;
57
57
  onRowCheckboxChange?: (checked: boolean, index: number) => void;
58
58
  };
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../checkbox/Checkbox.js"),o=require("../skeleton/Skeleton.js"),i=require("../text/Text.js"),a=require("../../styles/constants/theme.js");function l(e){return e&&e.__esModule?e:{default:e}}require("react"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js");var c,d,s,h,u,x,g=l(t),m=g.default.table(c||(c=e.__makeTemplateObject(["\n width: 100%;\n"],["\n width: 100%;\n"]))),b=g.default.thead(d||(d=e.__makeTemplateObject(["\n text-transform: uppercase;\n"],["\n text-transform: uppercase;\n"]))),p=g.default.tr(s||(s=e.__makeTemplateObject(["\n border-bottom: ",";\n height: 48px;\n"],["\n border-bottom: ",";\n height: 48px;\n"])),a.theme.border),k=g.default.th(h||(h=e.__makeTemplateObject(["\n padding: ",";\n white-space: nowrap;\n text-align: ",";\n"],["\n padding: ",";\n white-space: nowrap;\n text-align: ",";\n"])),a.theme.space16,(function(e){return e.$textAlign})),v=g.default.tr(u||(u=e.__makeTemplateObject(["\n height: 48px;\n cursor: ",";\n & {\n border-bottom: ",";\n }\n\n &.with-hover:hover {\n background-color: ",";\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n"],["\n height: 48px;\n cursor: ",";\n & {\n border-bottom: ",";\n }\n\n &.with-hover:hover {\n background-color: ",";\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n"])),(function(e){return e.clickable?"pointer":"auto"}),a.theme.border,a.theme.gray50),j=g.default.td(x||(x=e.__makeTemplateObject(["\n padding: ",";\n text-align: ",";\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n"],["\n padding: ",";\n text-align: ",";\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n"])),(function(e){return e.$noPadding?void 0:a.theme.space16}),(function(e){return e.$textAlign}));exports.SimpleTable=function(t){var a=t.className,l=t.headers,c=t.items,d=t.keyExtractor,s=t.loading,h=void 0!==s&&s,u=t.loadingItems,x=void 0===u?10:u,g=t.noHoverBackground,f=void 0!==g&&g,w=t.onRowClick,y=t.onRowHover,_=t.renderFooter,C=t.selectable,$=void 0===C?{enabled:!1}:C;return n.jsxs(m,{className:a,children:[n.jsxs("colgroup",{children:[!!$.onHeaderCheckboxChange&&n.jsx("col",{}),l.map((function(e){return n.jsx("col",{width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)}))]}),n.jsx(b,{children:n.jsxs(p,{children:[!!$.onHeaderCheckboxChange&&n.jsx(k,{$textAlign:"center",children:n.jsx(r.Checkbox,{checked:!h&&$.headerCheckboxValue||!1,disabled:h,onChange:$.onHeaderCheckboxChange})}),l.map((function(e){return n.jsx(k,{$textAlign:e.align||"start",children:n.jsx(i.Text,{color:"gray800",type:"small-header",children:e.name})},e.key)}))]})}),n.jsx("tbody",{children:h?e.__spreadArray([],e.__read(Array(x+1).keys()),!1).map((function(e){return n.jsx(v,{clickable:!1,children:l.map((function(t){return n.jsx(j,{$noPadding:!!t.noPadding,$textAlign:"center",children:n.jsx(o.Skeleton,{height:30},e)},t.key)}))},e)})):c.map((function(e,t){var o;return n.jsxs(v,{className:f?"":"with-hover",clickable:!!w,onClick:function(){return null==w?void 0:w(e)},onMouseEnter:function(){return null==y?void 0:y(e)},children:[$.enabled&&n.jsx(j,{$noPadding:!1,$textAlign:"center",children:n.jsx(r.Checkbox,{checked:(null===(o=$.selectedRowIndexes)||void 0===o?void 0:o.includes(t))||!1,onChange:function(e){var n;return null===(n=$.onRowCheckboxChange)||void 0===n?void 0:n.call($,e,t)}})}),l.map((function(t){return function(e,t){var r=t[e.key];return e.renderCustom?n.jsx(j,{$noPadding:e.noPadding||!1,$textAlign:e.align||"start",children:e.renderCustom(r,t)},e.key):n.jsx(j,{$noPadding:e.noPadding||!1,$textAlign:e.align||"start",children:String(r)},e.key)}(t,e)}))]},d(e))}))}),_]})};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),t=require("styled-components"),r=require("../checkbox/Checkbox.js"),o=require("../skeleton/Skeleton.js"),i=require("../text/Text.js"),a=require("../../styles/constants/theme.js");function l(e){return e&&e.__esModule?e:{default:e}}require("react"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js");var c,d,s,h,u,x,g=l(t),m=g.default.table(c||(c=e.__makeTemplateObject(["\n width: 100%;\n"],["\n width: 100%;\n"]))),b=g.default.thead(d||(d=e.__makeTemplateObject(["\n text-transform: uppercase;\n"],["\n text-transform: uppercase;\n"]))),p=g.default.tr(s||(s=e.__makeTemplateObject(["\n border-bottom: ",";\n height: 48px;\n"],["\n border-bottom: ",";\n height: 48px;\n"])),a.theme.border),k=g.default.th(h||(h=e.__makeTemplateObject(["\n padding: ",";\n white-space: nowrap;\n text-align: ",";\n"],["\n padding: ",";\n white-space: nowrap;\n text-align: ",";\n"])),a.theme.space16,(function(e){return e.$textAlign})),v=g.default.tr(u||(u=e.__makeTemplateObject(["\n height: 48px;\n cursor: ",";\n & {\n border-bottom: ",";\n }\n\n &.with-hover:hover {\n background-color: ",";\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n"],["\n height: 48px;\n cursor: ",";\n & {\n border-bottom: ",";\n }\n\n &.with-hover:hover {\n background-color: ",";\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n"])),(function(e){return e.clickable?"pointer":"auto"}),a.theme.border,a.theme.gray50),j=g.default.td(x||(x=e.__makeTemplateObject(["\n padding: ",";\n text-align: ",";\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n"],["\n padding: ",";\n text-align: ",";\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n"])),(function(e){return e.$noPadding?void 0:a.theme.space16}),(function(e){return e.$textAlign}));exports.SimpleTable=function(t){var a=t.className,l=t.headers,c=t.items,d=t.keyExtractor,s=t.loading,h=void 0!==s&&s,u=t.loadingItems,x=void 0===u?10:u,g=t.noHoverBackground,f=void 0!==g&&g,w=t.onRowClick,y=t.onRowHover,C=t.renderFooter,_=t.selectable,$=void 0===_?{enabled:!1}:_;return n.jsxs(m,{className:a,children:[n.jsxs("colgroup",{children:[!!$.onHeaderCheckboxChange&&n.jsx("col",{}),l.map((function(e){return n.jsx("col",{width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)}))]}),n.jsx(b,{children:n.jsxs(p,{children:[!!$.onHeaderCheckboxChange&&n.jsx(k,{$textAlign:"center",children:n.jsx(r.Checkbox,{checked:!h&&$.headerCheckboxValue||!1,disabled:h,onChange:$.onHeaderCheckboxChange})}),l.map((function(e){return n.jsx(k,{$textAlign:e.align||"start",children:n.jsx(i.Text,{color:"gray800",type:"small-header",children:e.name})},e.key)}))]})}),n.jsx("tbody",{children:h?e.__spreadArray([],e.__read(Array(x+1).keys()),!1).map((function(e){return n.jsx(v,{clickable:!1,children:l.map((function(t){return n.jsx(j,{$noPadding:!!t.noPadding,$textAlign:"center",children:n.jsx(o.Skeleton,{height:30},e)},t.key)}))},e)})):c.map((function(e,t){var o;return n.jsxs(v,{className:f?"":"with-hover",clickable:!!w,onClick:function(){return null==w?void 0:w(e)},onMouseEnter:function(){return null==y?void 0:y(e)},children:[$.enabled&&n.jsx(j,{$noPadding:!1,$textAlign:"center",children:n.jsx(r.Checkbox,{checked:(null===(o=$.isRowChecked)||void 0===o?void 0:o.call($,e,t))||!1,onChange:function(e){var n;return null===(n=$.onRowCheckboxChange)||void 0===n?void 0:n.call($,e,t)}})}),l.map((function(t){return function(e,t){var r=t[e.key];return e.renderCustom?n.jsx(j,{$noPadding:e.noPadding||!1,$textAlign:e.align||"start",children:e.renderCustom(r,t)},e.key):n.jsx(j,{$noPadding:e.noPadding||!1,$textAlign:e.align||"start",children:String(r)},e.key)}(t,e)}))]},d(e))}))}),C]})};
@@ -5,4 +5,4 @@ export type SlideOverProps = BaseDialogProps & {
5
5
  label?: string;
6
6
  subtitle?: ReactNode;
7
7
  };
8
- export declare const SlideOver: ({ actions, children, label, onClose, subtitle, ...props }: SlideOverProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const SlideOver: ({ actions, children, label, onClose, subtitle, width, ...props }: SlideOverProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var r=require("styled-components"),t=require("../button/Button.js"),a=require("../dialog/BaseDialog.js"),i=require("../stack/HStack.js"),o=require("../stack/VStack.js"),s=require("../text/Text.js"),d=require("../../icons/RemoveIcon.js"),l=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("react-dom"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var u,p,h,m,b,x=c(r),g=x.default(a.BaseDialog)(u||(u=e.__makeTemplateObject(["\n /* Override BaseDialog.Popup styles */\n border-radius: 0;\n max-height: none;\n overflow: unset;\n border: none;\n background: transparent;\n box-shadow: none;\n\n position: absolute;\n height: 100vh;\n right: 0;\n top: 0;\n"],["\n /* Override BaseDialog.Popup styles */\n border-radius: 0;\n max-height: none;\n overflow: unset;\n border: none;\n background: transparent;\n box-shadow: none;\n\n position: absolute;\n height: 100vh;\n right: 0;\n top: 0;\n"]))),f=x.default.div(p||(p=e.__makeTemplateObject(["\n height: 100%;\n margin: ",";\n border-radius: ",";\n background: ",";\n\n display: flex;\n flex-direction: column;\n\n box-shadow: ",";\n"],["\n height: 100%;\n margin: ",";\n border-radius: ",";\n background: ",";\n\n display: flex;\n flex-direction: column;\n\n box-shadow: ",";\n"])),l.theme.space8,l.theme.space12,l.theme.surfaceColor,l.theme.v3ShadowXxl),j=x.default.header(h||(h=e.__makeTemplateObject(["\n padding: ",";\n border-bottom: ",";\n\n display: flex;\n gap: ",";\n align-items: center;\n\n .header-content {\n margin: 0;\n flex: 1;\n }\n"],["\n padding: ",";\n border-bottom: ",";\n\n display: flex;\n gap: ",";\n align-items: center;\n\n .header-content {\n margin: 0;\n flex: 1;\n }\n"])),l.theme.space16,l.theme.border,l.theme.space16),v=x.default.div(m||(m=e.__makeTemplateObject(["\n padding: ",";\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1;\n"],["\n padding: ",";\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1;\n"])),l.theme.space24),k=x.default.div(b||(b=e.__makeTemplateObject(["\n padding: ",";\n border-radius: ",";\n border-top: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"],["\n padding: ",";\n border-radius: ",";\n border-top: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"])),l.theme.space24,l.theme.space12,l.theme.border,l.theme.surfaceColorSecondary,l.theme.space8);exports.SlideOver=function(r){var a=r.actions,l=r.children,c=r.label,u=r.onClose,p=r.subtitle,h=e.__rest(r,["actions","children","label","onClose","subtitle"]);return n.jsx(g,e.__assign({onClose:u,popupMotionProps:{animate:{x:0},exit:{x:300},initial:{x:300},transition:{duration:.45,ease:[.4,0,.2,1]}},width:300},h,{children:n.jsxs(f,{children:[n.jsxs(j,{children:[n.jsx(t.Button,{icon:n.jsx(d.RemoveIcon,{}),onClick:u}),p?n.jsxs(o.VStack,{className:"header-content",spacing:0,children:[n.jsx(s.Text,{type:"subheader",children:c}),p]}):n.jsx(s.Text,{className:"header-content",type:"subheader",children:c})]}),n.jsx(v,{children:l}),a&&n.jsx(k,{children:n.jsx(i.HStack,{spacing:8,children:a})})]})}))};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var r=require("styled-components"),t=require("../button/Button.js"),i=require("../dialog/BaseDialog.js"),a=require("../stack/HStack.js"),o=require("../stack/VStack.js"),s=require("../text/Text.js"),d=require("../../icons/RemoveIcon.js"),l=require("../../styles/constants/theme.js");function c(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("react-dom"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var u,h,p,m,b,x=c(r),g=x.default(i.BaseDialog)(u||(u=e.__makeTemplateObject(["\n /* Override BaseDialog.Popup styles */\n border-radius: 0;\n max-height: none;\n overflow: unset;\n border: none;\n background: transparent;\n box-shadow: none;\n\n position: absolute;\n height: 100vh;\n right: 0;\n top: 0;\n"],["\n /* Override BaseDialog.Popup styles */\n border-radius: 0;\n max-height: none;\n overflow: unset;\n border: none;\n background: transparent;\n box-shadow: none;\n\n position: absolute;\n height: 100vh;\n right: 0;\n top: 0;\n"]))),f=x.default.div(h||(h=e.__makeTemplateObject(["\n height: 100%;\n margin: ",";\n border-radius: ",";\n background: ",";\n\n display: flex;\n flex-direction: column;\n\n box-shadow: ",";\n"],["\n height: 100%;\n margin: ",";\n border-radius: ",";\n background: ",";\n\n display: flex;\n flex-direction: column;\n\n box-shadow: ",";\n"])),l.theme.space8,l.theme.space12,l.theme.surfaceColor,l.theme.v3ShadowXxl),j=x.default.header(p||(p=e.__makeTemplateObject(["\n padding: ",";\n border-bottom: ",";\n\n display: flex;\n gap: ",";\n align-items: center;\n\n .header-content {\n margin: 0;\n flex: 1;\n }\n"],["\n padding: ",";\n border-bottom: ",";\n\n display: flex;\n gap: ",";\n align-items: center;\n\n .header-content {\n margin: 0;\n flex: 1;\n }\n"])),l.theme.space16,l.theme.border,l.theme.space16),v=x.default.div(m||(m=e.__makeTemplateObject(["\n padding: ",";\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1;\n"],["\n padding: ",";\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1;\n"])),l.theme.space24),k=x.default.div(b||(b=e.__makeTemplateObject(["\n padding: ",";\n border-radius: ",";\n border-top: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"],["\n padding: ",";\n border-radius: ",";\n border-top: ",";\n display: flex;\n align-items: center;\n justify-content: flex-end;\n background: ",";\n\n & > div + div {\n margin-left: ",";\n }\n"])),l.theme.space24,l.theme.space12,l.theme.border,l.theme.surfaceColorSecondary,l.theme.space8);exports.SlideOver=function(r){var i=r.actions,l=r.children,c=r.label,u=r.onClose,h=r.subtitle,p=r.width,m=e.__rest(r,["actions","children","label","onClose","subtitle","width"]);return n.jsx(g,e.__assign({onClose:u,popupMotionProps:{animate:{x:0},exit:{x:p},initial:{x:p},transition:{duration:.45,ease:[.4,0,.2,1]}},width:p},m,{children:n.jsxs(f,{children:[n.jsxs(j,{children:[n.jsx(t.Button,{icon:n.jsx(d.RemoveIcon,{}),onClick:u}),h?n.jsxs(o.VStack,{className:"header-content",spacing:0,children:[n.jsx(s.Text,{type:"subheader",children:c}),h]}):n.jsx(s.Text,{className:"header-content",type:"subheader",children:c})]}),n.jsx(v,{children:l}),i&&n.jsx(k,{children:n.jsx(a.HStack,{spacing:8,children:i})})]})}))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.25",
3
+ "version": "5.1.26",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",