@zonos/amino 5.1.79 → 5.1.80

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,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  import type { BaseProps } from "../../types/BaseProps";
3
3
  type SimpleTableHeaderBaseProps = {
4
4
  /**
@@ -1 +1 @@
1
- "use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),i=require("clsx"),o=require("styled-components"),t=require("../checkbox/Checkbox.js"),r=require("../skeleton/Skeleton.js"),d=require("../text/Text.js"),a=require("../../styles/constants/theme.js");function l(n){return n&&n.__esModule?n:{default:n}}require("react"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../style-inject.es-d4ddeae4.js");var s,c,h=l(i),u=l(o),g=u.default.table(s||(s=n.__makeTemplateObject(["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"],["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"])),a.theme.border,a.theme.space16,a.theme.border,a.theme.gray50,a.theme.space12,a.theme.space12),x=u.default(t.Checkbox)(c||(c=n.__makeTemplateObject(["\n padding: ",";\n display: inline-flex;\n"],["\n padding: ",";\n display: inline-flex;\n"])),a.theme.space12);exports.SimpleTable=function(i){var o=i.className,t=i.getRowLink,a=i.headers,l=i.items,s=i.keyExtractor,c=i.loading,u=void 0!==c&&c,p=i.loadingItems,b=void 0===p?10:p,m=i.noHoverBackground,k=void 0!==m&&m,v=i.onRowClick,j=i.onRowHover,y=i.renderFooter,w=i.selectable,C=void 0===w?{enabled:!1}:w;return e.jsxs(g,{className:o,children:[e.jsxs("colgroup",{children:[!!C.onHeaderCheckboxChange&&e.jsx("col",{width:0}),a.map((function(n){return e.jsx("col",{width:void 0!==n.width?"".concat(n.width,"%"):void 0},n.key)}))]}),e.jsx("thead",{children:e.jsxs("tr",{children:[!!C.onHeaderCheckboxChange&&e.jsx("th",{className:"noPadding",children:C.renderCustomHeaderCheckbox||e.jsx(x,{checked:!u&&C.headerCheckboxValue||!1,disabled:u,onChange:C.onHeaderCheckboxChange})}),a.map((function(n){return e.jsx("th",{style:{textAlign:n.align||"start"},children:e.jsx(d.Text,{color:"gray800",type:"small-header",children:n.name})},n.key)}))]})}),e.jsx("tbody",{children:u?n.__spreadArray([],n.__read(Array(b+1).keys()),!1).map((function(n){return e.jsxs("tr",{children:[C.enabled&&e.jsx("td",{children:e.jsx(r.Skeleton,{height:30},n)}),a.map((function(i){return e.jsx("td",{className:h.default({loading:!0,noPadding:i.noPadding}),children:e.jsx(r.Skeleton,{height:30},n)},i.key)}))]},n)})):l.map((function(n,i){var o,r,d,l=!!v||!!C.anySelected&&!!C.onRowCheckboxChange;return e.jsxs("tr",{className:h.default({clickable:l,withHover:!k}),onClick:function(){var e,o,t;C.anySelected?(null===(e=C.isRowCheckboxDisabled)||void 0===e?void 0:e.call(C,n,i))||null===(o=C.onRowCheckboxChange)||void 0===o||o.call(C,!(null===(t=C.isRowChecked)||void 0===t?void 0:t.call(C,n,i)),n,i):null==v||v(n)},onMouseEnter:function(){return null==j?void 0:j(n)},children:[C.enabled&&e.jsx("td",{className:"noPadding",children:(null===(o=C.renderCustomRowCheckbox)||void 0===o?void 0:o.call(C,n,i))||e.jsx(x,{checked:(null===(r=C.isRowChecked)||void 0===r?void 0:r.call(C,n,i))||!1,disabled:(null===(d=C.isRowCheckboxDisabled)||void 0===d?void 0:d.call(C,n,i))||!1,onChange:function(e){var o;return null===(o=C.onRowCheckboxChange)||void 0===o?void 0:o.call(C,e,n,i)}})}),a.map((function(i){return function(n,i){var o=i[n.key],r=function(o){return t&&!C.anySelected?e.jsx("td",{className:"cellLink",children:e.jsx("a",{className:h.default({noPadding:n.noPadding}),href:t(i),style:{textAlign:n.align||"start"},children:o})},n.key):e.jsx("td",{className:h.default({noPadding:n.noPadding}),style:{textAlign:n.align||"start"},children:o},n.key)};return n.renderCustom?e.jsx(e.Fragment,{children:r(n.renderCustom(o,i))}):e.jsx(e.Fragment,{children:r(String(o))})}(i,n)}))]},s(n))}))}),y]})};
1
+ "use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),i=require("react"),o=require("clsx"),r=require("styled-components"),t=require("../checkbox/Checkbox.js"),d=require("../skeleton/Skeleton.js"),a=require("../text/Text.js"),l=require("../../styles/constants/theme.js");function s(n){return n&&n.__esModule?n:{default:n}}require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../style-inject.es-d4ddeae4.js");var c,h,u=s(o),g=s(r),x=g.default.table(c||(c=n.__makeTemplateObject(["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"],["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"])),l.theme.border,l.theme.space16,l.theme.border,l.theme.gray50,l.theme.space12,l.theme.space12),p=g.default(t.Checkbox)(h||(h=n.__makeTemplateObject(["\n padding: ",";\n display: inline-flex;\n"],["\n padding: ",";\n display: inline-flex;\n"])),l.theme.space12);exports.SimpleTable=function(o){var r=o.className,t=o.getRowLink,l=o.headers,s=o.items,c=o.keyExtractor,h=o.loading,g=void 0!==h&&h,b=o.loadingItems,m=void 0===b?10:b,k=o.noHoverBackground,v=void 0!==k&&k,j=o.onRowClick,w=o.onRowHover,y=o.renderFooter,C=o.selectable,f=void 0===C?{enabled:!1}:C,q=function(n,i){var o=i[n.key],r=function(o){return t&&!f.anySelected?e.jsx("td",{className:"cellLink",children:e.jsx("a",{className:u.default({noPadding:n.noPadding}),href:t(i),style:{textAlign:n.align||"start"},children:o})}):e.jsx("td",{className:u.default({noPadding:n.noPadding}),style:{textAlign:n.align||"start"},children:o})};return n.renderCustom?e.jsx(e.Fragment,{children:r(n.renderCustom(o,i))}):e.jsx(e.Fragment,{children:r(String(o))})};return e.jsxs(x,{className:r,children:[e.jsxs("colgroup",{children:[!!f.onHeaderCheckboxChange&&e.jsx("col",{width:0}),l.map((function(n){return e.jsx("col",{width:void 0!==n.width?"".concat(n.width,"%"):void 0},n.key)}))]}),e.jsx("thead",{children:e.jsxs("tr",{children:[!!f.onHeaderCheckboxChange&&e.jsx("th",{className:"noPadding",children:f.renderCustomHeaderCheckbox||e.jsx(p,{checked:!g&&f.headerCheckboxValue||!1,disabled:g,onChange:f.onHeaderCheckboxChange})}),l.map((function(n){return e.jsx("th",{style:{textAlign:n.align||"start"},children:e.jsx(a.Text,{color:"gray800",type:"small-header",children:n.name})},n.key)}))]})}),e.jsx("tbody",{children:g?n.__spreadArray([],n.__read(Array(m+1).keys()),!1).map((function(n){return e.jsxs("tr",{children:[f.enabled&&e.jsx("td",{children:e.jsx(d.Skeleton,{height:30},n)}),l.map((function(i){return e.jsx("td",{className:u.default({loading:!0,noPadding:i.noPadding}),children:e.jsx(d.Skeleton,{height:30},n)},i.key)}))]},n)})):s.map((function(n,o){var r,t,d,a=!!j||!!f.anySelected&&!!f.onRowCheckboxChange;return e.jsxs("tr",{className:u.default({clickable:a,withHover:!v}),onClick:function(){var e,i,r;f.anySelected?(null===(e=f.isRowCheckboxDisabled)||void 0===e?void 0:e.call(f,n,o))||null===(i=f.onRowCheckboxChange)||void 0===i||i.call(f,!(null===(r=f.isRowChecked)||void 0===r?void 0:r.call(f,n,o)),n,o):null==j||j(n)},onMouseEnter:function(){return null==w?void 0:w(n)},children:[f.enabled&&e.jsx("td",{className:"noPadding",children:(null===(r=f.renderCustomRowCheckbox)||void 0===r?void 0:r.call(f,n,o))||e.jsx(p,{checked:(null===(t=f.isRowChecked)||void 0===t?void 0:t.call(f,n,o))||!1,disabled:(null===(d=f.isRowCheckboxDisabled)||void 0===d?void 0:d.call(f,n,o))||!1,onChange:function(e){var i;return null===(i=f.onRowCheckboxChange)||void 0===i?void 0:i.call(f,e,n,o)}})}),l.map((function(o){return e.jsx(i.Fragment,{children:q(o,n)},o.key)}))]},c(n))}))}),y]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.79",
3
+ "version": "5.1.80",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",