@zonos/amino 5.1.95 → 5.1.96

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 +1 @@
1
- "use strict";var e=require("../../_tslib-bd4862e8.js"),l=require("react/jsx-runtime"),o=require("react"),i=require("clsx"),t=require("../checkbox/Checkbox.js"),n=require("../skeleton/Skeleton.js"),a=require("../text/Text.js"),d=require("../../style-inject.es-d4ddeae4.js");function r(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../styles/constants/theme.js"),require("../../utils/getTestId.js");var m=r(i),s="Amino_SimpleTable-module__tableStyled--Q3YSy",c="Amino_SimpleTable-module__noPadding--b5Y-c",_="Amino_SimpleTable-module__withHover--eL3XX",b="Amino_SimpleTable-module__clickable--XnaaE",u="Amino_SimpleTable-module__loading--bvjof",h="Amino_SimpleTable-module__cellLink--jySVK",S="Amino_SimpleTable-module__styledCheckbox---753a";d.styleInject(".Amino_SimpleTable-module__tableStyled--Q3YSy{width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead{text-transform:uppercase}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr{border-bottom:var(--amino-border);height:56px}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th{padding:16px;white-space:nowrap}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr{border-bottom:var(--amino-border);height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__withHover--eL3XX:hover{background-color:var(--amino-gray-50)}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__clickable--XnaaE{cursor:pointer}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr:not(:hover) .Amino_SimpleTable-module__row-hover-show--wkowE{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td{padding:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__loading--bvjof{text-align:center}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td:not(:hover) .Amino_SimpleTable-module__cell-hover-show--fenGT{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK>a{display:block;height:100%;padding:12px;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK>a.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__styledCheckbox---753a{display:inline-flex;padding:12px}");exports.SimpleTable=function(i){var d=i.className,r=i.getRowLink,y=i.headers,p=i.items,x=i.keyExtractor,g=i.loading,k=void 0!==g&&g,j=i.loadingItems,v=void 0===j?10:j,A=i.noHoverBackground,T=void 0!==A&&A,C=i.onRowClick,f=i.onRowHover,w=i.renderFooter,Y=i.selectable,Q=void 0===Y?{enabled:!1}:Y,q=i.style,N=function(e,o){var i=o[e.key],t=function(i){return r&&!Q.anySelected?l.jsx("td",{className:h,children:l.jsx("a",{className:m.default(e.noPadding&&c),href:r(o),style:{textAlign:e.align||"start"},children:i})}):l.jsx("td",{className:m.default(e.noPadding&&c),style:{textAlign:e.align||"start"},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.jsxs("table",{className:m.default(d,s),style:q,children:[l.jsxs("colgroup",{children:[!!Q.onHeaderCheckboxChange&&l.jsx("col",{width:0}),y.map((function(e){return l.jsx("col",{width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)}))]}),l.jsx("thead",{children:l.jsxs("tr",{children:[!!Q.onHeaderCheckboxChange&&l.jsx("th",{className:c,children:Q.renderCustomHeaderCheckbox||l.jsx(t.Checkbox,{checked:!k&&Q.headerCheckboxValue||!1,className:S,disabled:k,onChange:Q.onHeaderCheckboxChange})}),y.map((function(e){return l.jsx("th",{className:m.default(e.noPadding&&c),style:{textAlign:e.align||"start"},children:"string"==typeof e.name?l.jsx(a.Text,{color:"gray800",type:"small-header",children:e.name}):e.name},e.key)}))]})}),l.jsx("tbody",{children:k?e.__spreadArray([],e.__read(Array(v).keys()),!1).map((function(e){return l.jsxs("tr",{children:[Q.enabled&&l.jsx("td",{children:l.jsx(n.Skeleton,{height:30},e)}),y.map((function(o){return l.jsx("td",{className:m.default(u,o.noPadding&&c),children:l.jsx(n.Skeleton,{height:30},e)},o.key)}))]},e)})):p.map((function(e,i){var n,a,d,r=!!C||!!Q.anySelected&&!!Q.onRowCheckboxChange;return l.jsxs("tr",{className:m.default(r&&b,!T&&_),onClick:function(){var l,o,t;Q.anySelected?(null===(l=Q.isRowCheckboxDisabled)||void 0===l?void 0:l.call(Q,e,i))||null===(o=Q.onRowCheckboxChange)||void 0===o||o.call(Q,!(null===(t=Q.isRowChecked)||void 0===t?void 0:t.call(Q,e,i)),e,i):null==C||C(e)},onMouseEnter:function(){return null==f?void 0:f(e)},children:[Q.enabled&&l.jsx("td",{className:c,children:(null===(n=Q.renderCustomRowCheckbox)||void 0===n?void 0:n.call(Q,e,i))||l.jsx(t.Checkbox,{checked:(null===(a=Q.isRowChecked)||void 0===a?void 0:a.call(Q,e,i))||!1,className:S,disabled:(null===(d=Q.isRowCheckboxDisabled)||void 0===d?void 0:d.call(Q,e,i))||!1,onChange:function(l){var o;return null===(o=Q.onRowCheckboxChange)||void 0===o?void 0:o.call(Q,l,e,i)}})}),y.map((function(i){return l.jsx(o.Fragment,{children:N(i,e)},i.key)}))]},x(e))}))}),w]})};
1
+ "use strict";var e=require("../../_tslib-bd4862e8.js"),l=require("react/jsx-runtime"),o=require("react"),i=require("clsx"),t=require("../checkbox/Checkbox.js"),a=require("../skeleton/Skeleton.js"),n=require("../text/Text.js"),d=require("../../style-inject.es-d4ddeae4.js");function r(e){return e&&e.__esModule?e:{default:e}}require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../styles/constants/theme.js"),require("../../utils/getTestId.js");var m=r(i),s="Amino_SimpleTable-module__tableStyled--Q3YSy",c="Amino_SimpleTable-module__noPadding--b5Y-c",b="Amino_SimpleTable-module__withHover--eL3XX",_="Amino_SimpleTable-module__clickable--XnaaE",u="Amino_SimpleTable-module__loading--bvjof",h="Amino_SimpleTable-module__cellLink--jySVK",y="Amino_SimpleTable-module__styledCheckbox---753a";d.styleInject(".Amino_SimpleTable-module__tableStyled--Q3YSy{width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead{text-transform:uppercase}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr{border-bottom:var(--amino-border);height:56px}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th{padding:16px;white-space:nowrap}.Amino_SimpleTable-module__tableStyled--Q3YSy>thead>tr>th.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr{border-bottom:var(--amino-border);height:48px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr.Amino_SimpleTable-module__withHover--eL3XX:hover{background-color:var(--amino-gray-50)}.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{padding:12px}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__loading--bvjof{text-align:center}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td:not(:hover) .cell-hover-show{visibility:collapse}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK{padding:0}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK>a{display:block;height:100%;padding:12px;width:100%}.Amino_SimpleTable-module__tableStyled--Q3YSy>tbody>tr>td.Amino_SimpleTable-module__cellLink--jySVK>a.Amino_SimpleTable-module__noPadding--b5Y-c{padding:0}.Amino_SimpleTable-module__styledCheckbox---753a{display:inline-flex;padding:12px}");exports.SimpleTable=function(i){var d=i.className,r=i.getRowLink,S=i.headers,p=i.items,x=i.keyExtractor,g=i.loading,k=void 0!==g&&g,j=i.loadingItems,v=void 0===j?10:j,A=i.noHoverBackground,T=void 0!==A&&A,C=i.onRowClick,f=i.onRowHover,w=i.renderFooter,Y=i.selectable,Q=void 0===Y?{enabled:!1}:Y,q=i.style,N=function(e,o){var i=o[e.key],t=function(i){return r&&!Q.anySelected?l.jsx("td",{className:h,children:l.jsx("a",{className:m.default(e.noPadding&&c),href:r(o),style:{textAlign:e.align||"start"},children:i})}):l.jsx("td",{className:m.default(e.noPadding&&c),style:{textAlign:e.align||"start"},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.jsxs("table",{className:m.default(d,s),style:q,children:[l.jsxs("colgroup",{children:[!!Q.onHeaderCheckboxChange&&l.jsx("col",{width:0}),S.map((function(e){return l.jsx("col",{width:void 0!==e.width?"".concat(e.width,"%"):void 0},e.key)}))]}),l.jsx("thead",{children:l.jsxs("tr",{children:[!!Q.onHeaderCheckboxChange&&l.jsx("th",{className:c,children:Q.renderCustomHeaderCheckbox||l.jsx(t.Checkbox,{checked:!k&&Q.headerCheckboxValue||!1,className:y,disabled:k,onChange:Q.onHeaderCheckboxChange})}),S.map((function(e){return l.jsx("th",{className:m.default(e.noPadding&&c),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)}))]})}),l.jsx("tbody",{children:k?e.__spreadArray([],e.__read(Array(v).keys()),!1).map((function(e){return l.jsxs("tr",{children:[Q.enabled&&l.jsx("td",{children:l.jsx(a.Skeleton,{height:30},e)}),S.map((function(o){return l.jsx("td",{className:m.default(u,o.noPadding&&c),children:l.jsx(a.Skeleton,{height:30},e)},o.key)}))]},e)})):p.map((function(e,i){var a,n,d,r=!!C||!!Q.anySelected&&!!Q.onRowCheckboxChange;return l.jsxs("tr",{className:m.default(r&&_,!T&&b),onClick:function(){var l,o,t;Q.anySelected?(null===(l=Q.isRowCheckboxDisabled)||void 0===l?void 0:l.call(Q,e,i))||null===(o=Q.onRowCheckboxChange)||void 0===o||o.call(Q,!(null===(t=Q.isRowChecked)||void 0===t?void 0:t.call(Q,e,i)),e,i):null==C||C(e)},onMouseEnter:function(){return null==f?void 0:f(e)},children:[Q.enabled&&l.jsx("td",{className:c,children:(null===(a=Q.renderCustomRowCheckbox)||void 0===a?void 0:a.call(Q,e,i))||l.jsx(t.Checkbox,{checked:(null===(n=Q.isRowChecked)||void 0===n?void 0:n.call(Q,e,i))||!1,className:y,disabled:(null===(d=Q.isRowCheckboxDisabled)||void 0===d?void 0:d.call(Q,e,i))||!1,onChange:function(l){var o;return null===(o=Q.onRowCheckboxChange)||void 0===o?void 0:o.call(Q,l,e,i)}})}),S.map((function(i){return l.jsx(o.Fragment,{children:N(i,e)},i.key)}))]},x(e))}))}),w]})};
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-bd4862e8.js"),s=require("react/jsx-runtime"),t=require("@mui/material/styles"),o=require("@mui/material/Tooltip"),r=require("../stack/VStack.js"),i=require("../text/Text.js"),a=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/useAminoTheme.js"),n=require("../../style-inject.es-d4ddeae4.js");function d(e){return e&&e.__esModule?e:{default:e}}require("clsx"),require("../stack/Stack.js"),require("react"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr");var p=d(o),c="Amino_Tooltip-module__styledVStack--oMl2F",u="Amino_Tooltip-module__hiddenSpan--jqQ9w",m="Amino_Tooltip-module__childWrapper--srD4p";n.styleInject(".Amino_Tooltip-module__styledVStack--oMl2F{padding:0}.Amino_Tooltip-module__hiddenSpan--jqQ9w{display:none}.Amino_Tooltip-module__childWrapper--srD4p{position:relative}.Amino_Tooltip-module__childWrapper--srD4p [disabled]+.Amino_Tooltip-module__hiddenSpan--jqQ9w{bottom:0;cursor:not-allowed;display:block;left:0;position:absolute;right:0;top:0;z-index:10}");var h=t.styled((function(t){var o=t.className,r=t.dataTheme,i=e.__rest(t,["className","dataTheme"]);return s.jsx(p.default,e.__assign({},i,{classes:{popper:o},PopperProps:e.__assign(e.__assign({},i.PopperProps),{"data-theme":r})}))}))((function(e){var s,t,r=e.background;return(s={})["& .".concat(o.tooltipClasses.tooltip,".").concat(o.tooltipClasses.tooltip)]={backgroundColor:r?a.theme[r]:a.theme.gray1200,borderRadius:a.theme.radius10,boxShadow:a.theme.v3ShadowLarge,padding:a.theme.space12},s["&[data-theme='night']"]=((t={})[".".concat(o.tooltipClasses.tooltip)]={backgroundColor:r?a.theme[r]:a.theme.gray50},t),s}));exports.Tooltip=function(t){var o=t.background,a=t.children,n=t.className,d=t.open,p=t.showTooltip,_=t.subtitle,j=t.tag,g=t.themeOverride,T=t.title,q=e.__rest(t,["background","children","className","open","showTooltip","subtitle","tag","themeOverride","title"]),x=l.useAminoTheme().aminoTheme,k="night"===g?"gray1200":"gray0";return p?s.jsx(h,e.__assign({},q,{background:o,className:n,dataTheme:g||x,open:d,title:s.jsxs(r.VStack,{className:c,spacing:8,children:[T&&s.jsx(i.Text,{color:k,isUppercase:!1,type:"small-header",children:T}),"string"==typeof _?s.jsx(i.Text,{color:k,type:"caption",children:_}):_]}),children:"span"===j?s.jsxs("span",{className:m,children:[a,s.jsx("span",{className:u})]}):s.jsxs("div",{className:m,children:[a,s.jsx("span",{className:u})]})})):"span"===j?s.jsx("span",{children:a}):s.jsx("div",{children:a})};
1
+ "use strict";var e=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),t=require("@mui/material/styles"),s=require("@mui/material/Tooltip"),i=require("clsx"),r=require("../stack/VStack.js"),a=require("../text/Text.js"),l=require("../../styles/constants/theme.js"),n=require("../../utils/hooks/useAminoTheme.js"),p=require("../../style-inject.es-d4ddeae4.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../stack/Stack.js"),require("react"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr");var m=d(s),u=d(i),c="Amino_Tooltip-module__tooltip--W10n3",_="Amino_Tooltip-module__styledVStack--oMl2F",h="Amino_Tooltip-module__hiddenSpan--jqQ9w",j="Amino_Tooltip-module__childWrapper--srD4p";p.styleInject(".Amino_Tooltip-module__tooltip--W10n3 .Amino_Tooltip-module__styledVStack--oMl2F{padding:0}.Amino_Tooltip-module__tooltip--W10n3 .Amino_Tooltip-module__hiddenSpan--jqQ9w{display:none}.Amino_Tooltip-module__tooltip--W10n3 .Amino_Tooltip-module__childWrapper--srD4p{position:relative}.Amino_Tooltip-module__tooltip--W10n3 .Amino_Tooltip-module__childWrapper--srD4p [disabled]+.Amino_Tooltip-module__hiddenSpan--jqQ9w{bottom:0;cursor:not-allowed;display:block;left:0;position:absolute;right:0;top:0;z-index:10}");var T=t.styled((function(t){var s=t.className,i=t.dataTheme,r=e.__rest(t,["className","dataTheme"]);return o.jsx(m.default,e.__assign({},r,{classes:{popper:s},PopperProps:e.__assign(e.__assign({},r.PopperProps),{"data-theme":i})}))}))((function(e){var o,t,i,r=e.background;return(o={})["& .".concat(s.tooltipClasses.tooltip)]=((t={})["*"]={color:l.theme.gray0},t.backgroundColor=r?l.theme[r]:l.theme.gray1200,t.borderRadius=l.theme.radius10,t.boxShadow=l.theme.v3ShadowLarge,t.padding=l.theme.space12,t),o["&[data-theme='night']"]=((i={})[".".concat(s.tooltipClasses.tooltip)]={backgroundColor:r?l.theme[r]:l.theme.gray50},i["*"]={color:l.theme.gray1200},i),o}));exports.Tooltip=function(t){var s=t.background,i=t.children,l=t.className,p=t.open,d=t.showTooltip,m=t.subtitle,g=t.tag,q=t.themeOverride,x=t.title,k=e.__rest(t,["background","children","className","open","showTooltip","subtitle","tag","themeOverride","title"]),y=n.useAminoTheme().aminoTheme;return d?o.jsx(T,e.__assign({},k,{background:s,className:u.default(l,c),dataTheme:q||y,open:p,title:o.jsxs(r.VStack,{className:_,spacing:8,children:[x&&o.jsx(a.Text,{isUppercase:!1,type:"small-header",children:x}),"string"==typeof m?o.jsx(a.Text,{type:"caption",children:m}):m]}),children:"span"===g?o.jsxs("span",{className:j,children:[i,o.jsx("span",{className:h})]}):o.jsxs("div",{className:j,children:[i,o.jsx("span",{className:h})]})})):"span"===g?o.jsx("span",{children:i}):o.jsx("div",{children:i})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.95",
3
+ "version": "5.1.96",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",