@sula-tech/webcomponents 0.14.1 → 0.16.0
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.
- package/dist/cjs/{index-C19aFtyq.js → index-CHZXBkfx.js} +357 -7
- package/dist/cjs/index-CHZXBkfx.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{sula-avatar_21.cjs.entry.js → sula-avatar_28.cjs.entry.js} +2103 -23
- package/dist/cjs/sula-avatar_28.cjs.entry.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +6 -6
- package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-table/model/sula-table.model.js +8 -0
- package/dist/collection/components/sula-table/model/sula-table.model.js.map +1 -0
- package/dist/collection/components/sula-table/sula-table.css +1 -0
- package/dist/collection/components/sula-table/sula-table.js +111 -0
- package/dist/collection/components/sula-table/sula-table.js.map +1 -0
- package/dist/collection/components/sula-table/sula-table.stories.js +298 -0
- package/dist/collection/components/sula-table/sula-table.stories.js.map +1 -0
- package/dist/collection/components/sula-table-body/sula-table-body.css +1 -0
- package/dist/collection/components/sula-table-body/sula-table-body.js +23 -0
- package/dist/collection/components/sula-table-body/sula-table-body.js.map +1 -0
- package/dist/collection/components/sula-table-cell/sula-table-cell.css +1 -0
- package/dist/collection/components/sula-table-cell/sula-table-cell.js +34 -0
- package/dist/collection/components/sula-table-cell/sula-table-cell.js.map +1 -0
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.css +1 -0
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js +34 -0
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js.map +1 -0
- package/dist/collection/components/sula-table-header/sula-table-header.css +1 -0
- package/dist/collection/components/sula-table-header/sula-table-header.js +23 -0
- package/dist/collection/components/sula-table-header/sula-table-header.js.map +1 -0
- package/dist/collection/components/sula-table-row/sula-table-row.css +1 -0
- package/dist/collection/components/sula-table-row/sula-table-row.js +23 -0
- package/dist/collection/components/sula-table-row/sula-table-row.js.map +1 -0
- package/dist/collection/components/sula-tag/sula-tag.js +3 -3
- package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
- package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
- package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
- package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
- package/dist/collection/components/sula-tooltip/model/sula-tooltip.model.js +13 -0
- package/dist/collection/components/sula-tooltip/model/sula-tooltip.model.js.map +1 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.css +1 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +218 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.js.map +1 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.stories.js +179 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.stories.js.map +1 -0
- package/dist/collection/utils/replace-host-with-rendered-element.js +24 -0
- package/dist/collection/utils/replace-host-with-rendered-element.js.map +1 -0
- package/dist/components/index.js +355 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-tr2oA4pB.js → p-BoXZrDgj.js} +3 -3
- package/dist/components/{p-tr2oA4pB.js.map → p-BoXZrDgj.js.map} +1 -1
- package/dist/components/p-CQ1I0UIz.js +12 -0
- package/dist/components/p-CQ1I0UIz.js.map +1 -0
- package/dist/components/p-DrIWCpI3.js +28 -0
- package/dist/components/p-DrIWCpI3.js.map +1 -0
- package/dist/components/{p-BlyFOqde.js → p-ExcZQ46X.js} +3 -3
- package/dist/components/{p-BlyFOqde.js.map → p-ExcZQ46X.js.map} +1 -1
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-checkbox.js +1 -1
- package/dist/components/sula-chip.js +1 -1
- package/dist/components/sula-dropdown.js +7 -7
- package/dist/components/sula-dropdown.js.map +1 -1
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/components/sula-progress-bar.js +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +1 -1
- package/dist/components/sula-table-body.d.ts +11 -0
- package/dist/components/sula-table-body.js +41 -0
- package/dist/components/sula-table-body.js.map +1 -0
- package/dist/components/sula-table-cell.d.ts +11 -0
- package/dist/components/sula-table-cell.js +52 -0
- package/dist/components/sula-table-cell.js.map +1 -0
- package/dist/components/sula-table-head-cell.d.ts +11 -0
- package/dist/components/sula-table-head-cell.js +52 -0
- package/dist/components/sula-table-head-cell.js.map +1 -0
- package/dist/components/sula-table-header.d.ts +11 -0
- package/dist/components/sula-table-header.js +41 -0
- package/dist/components/sula-table-header.js.map +1 -0
- package/dist/components/sula-table-row.d.ts +11 -0
- package/dist/components/sula-table-row.js +41 -0
- package/dist/components/sula-table-row.js.map +1 -0
- package/dist/components/sula-table.d.ts +11 -0
- package/dist/components/sula-table.js +61 -0
- package/dist/components/sula-table.js.map +1 -0
- package/dist/components/sula-tag.js +4 -4
- package/dist/components/sula-textarea.js +6 -6
- package/dist/components/sula-textfield.js +3 -3
- package/dist/components/sula-tiles.js +2 -2
- package/dist/components/sula-timeline-list.js +2 -2
- package/dist/components/sula-tooltip.d.ts +11 -0
- package/dist/components/sula-tooltip.js +1946 -0
- package/dist/components/sula-tooltip.js.map +1 -0
- package/dist/esm/{index-CwIBTB8E.js → index-CwrCjm3e.js} +357 -7
- package/dist/esm/index-CwrCjm3e.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{sula-avatar_21.entry.js → sula-avatar_28.entry.js} +2097 -24
- package/dist/esm/sula-avatar_28.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/components/sula-table/model/sula-table.model.d.ts +6 -0
- package/dist/types/components/sula-table/sula-table.d.ts +16 -0
- package/dist/types/components/sula-table/sula-table.stories.d.ts +69 -0
- package/dist/types/components/sula-table-body/sula-table-body.d.ts +5 -0
- package/dist/types/components/sula-table-cell/sula-table-cell.d.ts +6 -0
- package/dist/types/components/sula-table-head-cell/sula-table-head-cell.d.ts +6 -0
- package/dist/types/components/sula-table-header/sula-table-header.d.ts +5 -0
- package/dist/types/components/sula-table-row/sula-table-row.d.ts +5 -0
- package/dist/types/components/sula-tooltip/model/sula-tooltip.model.d.ts +10 -0
- package/dist/types/components/sula-tooltip/sula-tooltip.d.ts +40 -0
- package/dist/types/components/sula-tooltip/sula-tooltip.stories.d.ts +105 -0
- package/dist/types/components.d.ts +163 -0
- package/dist/types/utils/replace-host-with-rendered-element.d.ts +1 -0
- package/dist/webcomponents/{p-a7141407.entry.js → p-8472342b.entry.js} +3258 -1317
- package/dist/webcomponents/p-8472342b.entry.js.map +1 -0
- package/dist/webcomponents/{p-CwIBTB8E.js → p-CwrCjm3e.js} +504 -150
- package/dist/webcomponents/p-CwrCjm3e.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +14 -4
- package/package.json +2 -1
- package/dist/cjs/index-C19aFtyq.js.map +0 -1
- package/dist/cjs/sula-avatar_21.cjs.entry.js.map +0 -1
- package/dist/esm/index-CwIBTB8E.js.map +0 -1
- package/dist/esm/sula-avatar_21.entry.js.map +0 -1
- package/dist/webcomponents/p-CwIBTB8E.js.map +0 -1
- package/dist/webcomponents/p-a7141407.entry.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var SulaTableDensity;
|
|
2
|
+
(function (SulaTableDensity) {
|
|
3
|
+
SulaTableDensity["Compact"] = "compact";
|
|
4
|
+
SulaTableDensity["Default"] = "default";
|
|
5
|
+
SulaTableDensity["Spaced"] = "spaced";
|
|
6
|
+
SulaTableDensity["Confortable"] = "comfortable";
|
|
7
|
+
})(SulaTableDensity || (SulaTableDensity = {}));
|
|
8
|
+
//# sourceMappingURL=sula-table.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-table.model.js","sourceRoot":"","sources":["../../../../src/components/sula-table/model/sula-table.model.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,+CAA2B,CAAA;AAC7B,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B","sourcesContent":["export enum SulaTableDensity {\n Compact = 'compact',\n Default = 'default',\n Spaced = 'spaced',\n Confortable = 'comfortable',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.box-border{box-sizing:border-box}.block{display:block}.table{display:table}.w-full{width:100%}.w-max{width:max-content}.min-w-full{min-width:100%}.max-w-full{max-width:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.overflow-x-auto{overflow-x:auto}.container{width:100%}@media (min-width:22.5rem){.container{max-width:22.5rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { SulaTableDensity } from "./model/sula-table.model";
|
|
3
|
+
export class SulaTable {
|
|
4
|
+
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* Density of the table
|
|
7
|
+
*/
|
|
8
|
+
this.density = SulaTableDensity.Default;
|
|
9
|
+
/**
|
|
10
|
+
* If true, all columns will have equal width
|
|
11
|
+
*/
|
|
12
|
+
this.equalWidth = true;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the table will take the full width of its container
|
|
15
|
+
*/
|
|
16
|
+
this.fullWidth = true;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, { key: 'f89ff123aa21b03dac2851520b1f4f9a456b733e', class: {
|
|
20
|
+
'block max-w-full overflow-x-auto': true,
|
|
21
|
+
} }, h("table", { key: 'fadb3c57fd65dc625799c6e4d9ceec9b810ec5b6', class: {
|
|
22
|
+
'w-full': this.fullWidth && this.equalWidth,
|
|
23
|
+
'w-max': !this.equalWidth,
|
|
24
|
+
'min-w-full': this.fullWidth && !this.equalWidth,
|
|
25
|
+
'table-fixed': this.equalWidth,
|
|
26
|
+
'border-collapse border-spacing-0 box-border': true,
|
|
27
|
+
} }, h("slot", { key: 'e6de13e3cd929e6ef4dd2bddafdbc3f0a57f4b7e' }))));
|
|
28
|
+
}
|
|
29
|
+
static get is() { return "sula-table"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["sula-table.scss"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["sula-table.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"density": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"attribute": "density",
|
|
45
|
+
"mutable": false,
|
|
46
|
+
"complexType": {
|
|
47
|
+
"original": "SulaTableDensity",
|
|
48
|
+
"resolved": "SulaTableDensity.Compact | SulaTableDensity.Confortable | SulaTableDensity.Default | SulaTableDensity.Spaced",
|
|
49
|
+
"references": {
|
|
50
|
+
"SulaTableDensity": {
|
|
51
|
+
"location": "import",
|
|
52
|
+
"path": "./model/sula-table.model",
|
|
53
|
+
"id": "src/components/sula-table/model/sula-table.model.ts::SulaTableDensity"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": "Density of the table"
|
|
62
|
+
},
|
|
63
|
+
"getter": false,
|
|
64
|
+
"setter": false,
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"defaultValue": "SulaTableDensity.Default"
|
|
67
|
+
},
|
|
68
|
+
"equalWidth": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"attribute": "equal-width",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "boolean",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "If true, all columns will have equal width"
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"defaultValue": "true"
|
|
87
|
+
},
|
|
88
|
+
"fullWidth": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"attribute": "full-width",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "boolean",
|
|
94
|
+
"resolved": "boolean",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "If true, the table will take the full width of its container"
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"defaultValue": "true"
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=sula-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-table.js","sourceRoot":"","sources":["../../../src/components/sula-table/sula-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,MAAM,OAAO,SAAS;IALtB;QAME;;WAEG;QAEH,YAAO,GAAqB,gBAAgB,CAAC,OAAO,CAAC;QAErD;;WAEG;QAEH,eAAU,GAAY,IAAI,CAAC;QAE3B;;WAEG;QAEH,cAAS,GAAY,IAAI,CAAC;KAuB3B;IArBC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,kCAAkC,EAAE,IAAI;aACzC;YAED,8DACE,KAAK,EAAE;oBACL,QAAQ,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU;oBAC3C,OAAO,EAAE,CAAC,IAAI,CAAC,UAAU;oBACzB,YAAY,EAAE,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,UAAU;oBAChD,aAAa,EAAE,IAAI,CAAC,UAAU;oBAC9B,6CAA6C,EAAE,IAAI;iBACpD;gBAED,8DAAa,CACP,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport { SulaTableDensity } from './model/sula-table.model';\n\n@Component({\n tag: 'sula-table',\n styleUrl: 'sula-table.scss',\n shadow: false,\n})\nexport class SulaTable {\n /**\n * Density of the table\n */\n @Prop()\n density: SulaTableDensity = SulaTableDensity.Default;\n\n /**\n * If true, all columns will have equal width\n */\n @Prop()\n equalWidth: boolean = true;\n\n /**\n * If true, the table will take the full width of its container\n */\n @Prop()\n fullWidth: boolean = true;\n\n render() {\n return (\n <Host\n class={{\n 'block max-w-full overflow-x-auto': true,\n }}\n >\n <table\n class={{\n 'w-full': this.fullWidth && this.equalWidth,\n 'w-max': !this.equalWidth,\n 'min-w-full': this.fullWidth && !this.equalWidth,\n 'table-fixed': this.equalWidth,\n 'border-collapse border-spacing-0 box-border': true,\n }}\n >\n <slot></slot>\n </table>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { SulaTableDensity } from "./model/sula-table.model";
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/sula-table',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
argTypes: {
|
|
6
|
+
density: {
|
|
7
|
+
control: { type: 'select' },
|
|
8
|
+
options: Object.values(SulaTableDensity),
|
|
9
|
+
description: 'Define a densidade visual da tabela e das células.',
|
|
10
|
+
table: {
|
|
11
|
+
type: { summary: 'SulaTableDensity' },
|
|
12
|
+
defaultValue: { summary: 'SulaTableDensity.Default' },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
fullWidth: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'Quando `true`, a tabela ocupa toda a largura disponível do container.',
|
|
18
|
+
table: {
|
|
19
|
+
type: { summary: 'boolean' },
|
|
20
|
+
defaultValue: { summary: 'true' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
equalWidth: {
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
description: 'Quando `true`, distribui as colunas com a mesma largura.',
|
|
26
|
+
table: {
|
|
27
|
+
type: { summary: 'boolean' },
|
|
28
|
+
defaultValue: { summary: 'true' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
parameters: {
|
|
33
|
+
docs: {
|
|
34
|
+
description: {
|
|
35
|
+
component: `
|
|
36
|
+
As tabelas no Sula Design System são projetadas para apresentar dados de forma clara e organizada. Elas garantem uma estética harmoniosa e alinhada aos princípios design que valorizamos em nosso design.
|
|
37
|
+
`,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const HEADERS = ['Protocolo', 'Cliente', 'Status', 'Integração', 'Ação'];
|
|
43
|
+
const createStoryContainer = (maxWidth = '960px') => {
|
|
44
|
+
const container = document.createElement('div');
|
|
45
|
+
container.style.margin = '20px auto';
|
|
46
|
+
container.style.maxWidth = maxWidth;
|
|
47
|
+
container.style.padding = '20px';
|
|
48
|
+
container.style.boxSizing = 'border-box';
|
|
49
|
+
return container;
|
|
50
|
+
};
|
|
51
|
+
const createTitle = (text, marginTop = '0') => {
|
|
52
|
+
const title = document.createElement('h3');
|
|
53
|
+
title.textContent = text;
|
|
54
|
+
title.style.margin = `${marginTop} 0 12px`;
|
|
55
|
+
title.style.fontSize = '18px';
|
|
56
|
+
title.style.fontWeight = '700';
|
|
57
|
+
title.style.color = '#2f3131';
|
|
58
|
+
return title;
|
|
59
|
+
};
|
|
60
|
+
const createDescription = (text) => {
|
|
61
|
+
const description = document.createElement('p');
|
|
62
|
+
description.textContent = text;
|
|
63
|
+
description.style.margin = '0 0 16px';
|
|
64
|
+
description.style.fontSize = '14px';
|
|
65
|
+
description.style.lineHeight = '20px';
|
|
66
|
+
description.style.color = '#6c6e6e';
|
|
67
|
+
return description;
|
|
68
|
+
};
|
|
69
|
+
const createHeadCell = (content) => {
|
|
70
|
+
const cell = document.createElement('sula-table-head-cell');
|
|
71
|
+
cell.textContent = content;
|
|
72
|
+
return cell;
|
|
73
|
+
};
|
|
74
|
+
const createBodyCell = (content) => {
|
|
75
|
+
const cell = document.createElement('sula-table-cell');
|
|
76
|
+
if (typeof content === 'string') {
|
|
77
|
+
cell.textContent = content;
|
|
78
|
+
return cell;
|
|
79
|
+
}
|
|
80
|
+
cell.appendChild(content);
|
|
81
|
+
return cell;
|
|
82
|
+
};
|
|
83
|
+
const createRow = (items, isHeader = false) => {
|
|
84
|
+
const row = document.createElement('sula-table-row');
|
|
85
|
+
items.forEach(item => {
|
|
86
|
+
row.appendChild(isHeader ? createHeadCell(item) : createBodyCell(item));
|
|
87
|
+
});
|
|
88
|
+
return row;
|
|
89
|
+
};
|
|
90
|
+
const createTable = (args, rows, headers = HEADERS) => {
|
|
91
|
+
const table = document.createElement('sula-table');
|
|
92
|
+
table.setAttribute('density', args.density);
|
|
93
|
+
table.setAttribute('full-width', args.fullWidth ? 'true' : 'false');
|
|
94
|
+
table.setAttribute('equal-width', args.equalWidth ? 'true' : 'false');
|
|
95
|
+
const header = document.createElement('sula-table-header');
|
|
96
|
+
header.appendChild(createRow(headers, true));
|
|
97
|
+
const body = document.createElement('sula-table-body');
|
|
98
|
+
rows.forEach(row => body.appendChild(createRow(row)));
|
|
99
|
+
table.appendChild(header);
|
|
100
|
+
table.appendChild(body);
|
|
101
|
+
return table;
|
|
102
|
+
};
|
|
103
|
+
const createCustomerContent = (name, email) => {
|
|
104
|
+
const content = document.createElement('div');
|
|
105
|
+
content.style.display = 'flex';
|
|
106
|
+
content.style.flexDirection = 'column';
|
|
107
|
+
content.style.gap = '4px';
|
|
108
|
+
const strong = document.createElement('strong');
|
|
109
|
+
strong.textContent = name;
|
|
110
|
+
strong.style.color = '#2f3131';
|
|
111
|
+
const span = document.createElement('span');
|
|
112
|
+
span.textContent = email;
|
|
113
|
+
span.style.fontSize = '12px';
|
|
114
|
+
span.style.color = '#6c6e6e';
|
|
115
|
+
content.appendChild(strong);
|
|
116
|
+
content.appendChild(span);
|
|
117
|
+
return content;
|
|
118
|
+
};
|
|
119
|
+
const createTag = (label, icon, iconStatus) => {
|
|
120
|
+
const tag = document.createElement('sula-tag');
|
|
121
|
+
tag.setAttribute('label', label);
|
|
122
|
+
tag.setAttribute('appearance', 'bordered');
|
|
123
|
+
tag.setAttribute('size', 'small');
|
|
124
|
+
tag.setAttribute('icon', icon);
|
|
125
|
+
tag.setAttribute('icon-status', iconStatus);
|
|
126
|
+
return tag;
|
|
127
|
+
};
|
|
128
|
+
const createLoaderContent = (text) => {
|
|
129
|
+
const content = document.createElement('div');
|
|
130
|
+
content.style.display = 'flex';
|
|
131
|
+
content.style.alignItems = 'center';
|
|
132
|
+
content.style.gap = '8px';
|
|
133
|
+
const loader = document.createElement('sula-loader');
|
|
134
|
+
loader.setAttribute('size', 'small');
|
|
135
|
+
const span = document.createElement('span');
|
|
136
|
+
span.textContent = text;
|
|
137
|
+
content.appendChild(loader);
|
|
138
|
+
content.appendChild(span);
|
|
139
|
+
return content;
|
|
140
|
+
};
|
|
141
|
+
const createActionButton = (text) => {
|
|
142
|
+
const button = document.createElement('sula-button');
|
|
143
|
+
button.setAttribute('text', text);
|
|
144
|
+
button.setAttribute('appearance', 'secondary');
|
|
145
|
+
return button;
|
|
146
|
+
};
|
|
147
|
+
const textRows = () => [
|
|
148
|
+
['PRT-2024', 'Mariana Costa', 'Aprovado', 'Concluída', 'Ver detalhes'],
|
|
149
|
+
['PRT-2025', 'Bruno Alves', 'Pendente', 'Sincronizando', 'Reprocessar'],
|
|
150
|
+
['PRT-2026', 'Camila Rocha', 'Em análise', 'Aguardando retorno', 'Abrir'],
|
|
151
|
+
];
|
|
152
|
+
const customRows = () => [
|
|
153
|
+
[
|
|
154
|
+
'PRT-1024',
|
|
155
|
+
createCustomerContent('Mariana Costa', 'mariana@sula.com'),
|
|
156
|
+
createTag('Aprovado', 'ph-bold ph-check', 'success'),
|
|
157
|
+
createTag('Concluída', 'ph-bold ph-check', 'success'),
|
|
158
|
+
createActionButton('Ver detalhes'),
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
'PRT-1025',
|
|
162
|
+
createCustomerContent('Bruno Alves', 'bruno@sula.com'),
|
|
163
|
+
createTag('Pendente', 'ph-bold ph-clock', 'warning'),
|
|
164
|
+
createLoaderContent('Sincronizando'),
|
|
165
|
+
createActionButton('Reprocessar'),
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
'PRT-1026',
|
|
169
|
+
createCustomerContent('Camila Rocha', 'camila@sula.com'),
|
|
170
|
+
createTag('Em análise', 'ph-bold ph-hourglass-medium', 'info'),
|
|
171
|
+
createLoaderContent('Aguardando retorno'),
|
|
172
|
+
createActionButton('Abrir'),
|
|
173
|
+
],
|
|
174
|
+
];
|
|
175
|
+
const longTextRows = () => [
|
|
176
|
+
[
|
|
177
|
+
'PRT-3001',
|
|
178
|
+
'Cliente com nome consideravelmente maior para testar a distribuição da largura',
|
|
179
|
+
'Pendente de revisão manual',
|
|
180
|
+
'Integração aguardando retorno do parceiro externo',
|
|
181
|
+
'Visualizar detalhes',
|
|
182
|
+
],
|
|
183
|
+
['PRT-3002', 'Operação padrão', 'Aprovado', 'Concluída', 'Abrir'],
|
|
184
|
+
];
|
|
185
|
+
const intrinsicWidthRows = () => [
|
|
186
|
+
['PRT-4101', 'Mariana Costa', 'Aprovado'],
|
|
187
|
+
['PRT-4102', 'Bruno Alves', 'Pendente'],
|
|
188
|
+
['PRT-4103', 'Camila Rocha', 'Em análise'],
|
|
189
|
+
];
|
|
190
|
+
const PlaygroundTemplate = (args) => {
|
|
191
|
+
const container = createStoryContainer();
|
|
192
|
+
container.appendChild(createTable(args, customRows()));
|
|
193
|
+
return container;
|
|
194
|
+
};
|
|
195
|
+
const TextOnlyTemplate = (args) => {
|
|
196
|
+
const container = createStoryContainer();
|
|
197
|
+
container.appendChild(createTable(args, textRows()));
|
|
198
|
+
return container;
|
|
199
|
+
};
|
|
200
|
+
const EqualWidthTemplate = (args) => {
|
|
201
|
+
const container = createStoryContainer();
|
|
202
|
+
container.appendChild(createDescription('Use `equalWidth` para forçar a mesma largura entre colunas, mesmo quando o conteúdo é assimétrico.'));
|
|
203
|
+
container.appendChild(createTable(args, longTextRows(), ['Protocolo', 'Cliente', 'Status', 'Integração', 'Ação']));
|
|
204
|
+
return container;
|
|
205
|
+
};
|
|
206
|
+
const IntrinsicWidthTemplate = (args) => {
|
|
207
|
+
const container = createStoryContainer('1200px');
|
|
208
|
+
container.appendChild(createDescription('Com `fullWidth=false`, a tabela passa a respeitar a largura natural do conteúdo e não ocupa toda a área disponível.'));
|
|
209
|
+
container.appendChild(createTable(args, intrinsicWidthRows(), ['Protocolo', 'Cliente', 'Status']));
|
|
210
|
+
return container;
|
|
211
|
+
};
|
|
212
|
+
export const Playground = PlaygroundTemplate.bind({});
|
|
213
|
+
Playground.args = {
|
|
214
|
+
density: SulaTableDensity.Confortable,
|
|
215
|
+
fullWidth: true,
|
|
216
|
+
equalWidth: false,
|
|
217
|
+
};
|
|
218
|
+
Playground.parameters = {
|
|
219
|
+
docs: {
|
|
220
|
+
description: {
|
|
221
|
+
story: 'Visão principal da tabela com composição de células de texto, tag, loader e botão.',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
export const TextOnly = TextOnlyTemplate.bind({});
|
|
226
|
+
TextOnly.args = {
|
|
227
|
+
density: SulaTableDensity.Confortable,
|
|
228
|
+
fullWidth: true,
|
|
229
|
+
equalWidth: false,
|
|
230
|
+
};
|
|
231
|
+
TextOnly.parameters = {
|
|
232
|
+
docs: {
|
|
233
|
+
description: {
|
|
234
|
+
story: 'Exemplo mínimo da tabela usando apenas textos nas células.',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
export const CustomContent = PlaygroundTemplate.bind({});
|
|
239
|
+
CustomContent.args = {
|
|
240
|
+
density: SulaTableDensity.Default,
|
|
241
|
+
fullWidth: true,
|
|
242
|
+
equalWidth: false,
|
|
243
|
+
};
|
|
244
|
+
CustomContent.parameters = {
|
|
245
|
+
docs: {
|
|
246
|
+
description: {
|
|
247
|
+
story: 'Exemplo com conteúdo rico via composição: blocos de texto, outros web components e conteúdo misto dentro das células.',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
export const EqualWidthColumns = EqualWidthTemplate.bind({});
|
|
252
|
+
EqualWidthColumns.args = {
|
|
253
|
+
density: SulaTableDensity.Default,
|
|
254
|
+
fullWidth: true,
|
|
255
|
+
equalWidth: true,
|
|
256
|
+
};
|
|
257
|
+
EqualWidthColumns.parameters = {
|
|
258
|
+
docs: {
|
|
259
|
+
description: {
|
|
260
|
+
story: 'Tabela com `equalWidth=true`, útil quando o layout precisa de colunas equilibradas.',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
export const IntrinsicWidth = IntrinsicWidthTemplate.bind({});
|
|
265
|
+
IntrinsicWidth.args = {
|
|
266
|
+
density: SulaTableDensity.Default,
|
|
267
|
+
fullWidth: false,
|
|
268
|
+
equalWidth: false,
|
|
269
|
+
};
|
|
270
|
+
IntrinsicWidth.parameters = {
|
|
271
|
+
docs: {
|
|
272
|
+
description: {
|
|
273
|
+
story: 'Tabela sem ocupar a largura total do container, deixando o tamanho ser guiado pelo conteúdo.',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
export const DensityComparison = () => {
|
|
278
|
+
const container = createStoryContainer();
|
|
279
|
+
const densities = [
|
|
280
|
+
{ title: 'Compact', density: SulaTableDensity.Compact },
|
|
281
|
+
{ title: 'Default', density: SulaTableDensity.Default },
|
|
282
|
+
{ title: 'Spaced', density: SulaTableDensity.Spaced },
|
|
283
|
+
{ title: 'Comfortable', density: SulaTableDensity.Confortable },
|
|
284
|
+
];
|
|
285
|
+
densities.forEach(({ title, density }, index) => {
|
|
286
|
+
container.appendChild(createTitle(title, index === 0 ? '0' : '28px'));
|
|
287
|
+
container.appendChild(createTable({ density, fullWidth: true, equalWidth: false }, textRows()));
|
|
288
|
+
});
|
|
289
|
+
return container;
|
|
290
|
+
};
|
|
291
|
+
DensityComparison.parameters = {
|
|
292
|
+
docs: {
|
|
293
|
+
description: {
|
|
294
|
+
story: 'Comparação entre as densidades disponíveis para validar alturas e espaçamentos das células.',
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
//# sourceMappingURL=sula-table.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-table.stories.js","sourceRoot":"","sources":["../../../src/components/sula-table/sula-table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACxC,WAAW,EAAE,oDAAoD;YACjE,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;gBACrC,YAAY,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE;aACtD;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,uEAAuE;YACpF,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;gBAC5B,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;aAClC;SACF;QACD,UAAU,EAAE;YACV,OAAO,EAAE,SAAS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AW,EAAE;YACX,KAAK,EAAE,8FAA8F;SACtG;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,SAAS,GAAG,oBAAoB,EAAE,CAAC;IACzC,MAAM,SAAS,GAAwD;QACrE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE;QACvD,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE;QACvD,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAAE;QACrD,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,CAAC,WAAW,EAAE;KAChE,CAAC;IAEF,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE;QAC9C,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACtE,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF,iBAAiB,CAAC,UAAU,GAAG;IAC7B,IAAI,EAAE;QACJ,WAAW,EAAE;YACX,KAAK,EAAE,6FAA6F;SACrG;KACF;CACF,CAAC","sourcesContent":["import { SulaTableDensity } from './model/sula-table.model';\n\nexport default {\n title: 'Components/sula-table',\n tags: ['autodocs'],\n argTypes: {\n density: {\n control: { type: 'select' },\n options: Object.values(SulaTableDensity),\n description: 'Define a densidade visual da tabela e das células.',\n table: {\n type: { summary: 'SulaTableDensity' },\n defaultValue: { summary: 'SulaTableDensity.Default' },\n },\n },\n fullWidth: {\n control: 'boolean',\n description: 'Quando `true`, a tabela ocupa toda a largura disponível do container.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: 'true' },\n },\n },\n equalWidth: {\n control: 'boolean',\n description: 'Quando `true`, distribui as colunas com a mesma largura.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: 'true' },\n },\n },\n },\n parameters: {\n docs: {\n description: {\n component: `\nAs tabelas no Sula Design System são projetadas para apresentar dados de forma clara e organizada. Elas garantem uma estética harmoniosa e alinhada aos princípios design que valorizamos em nosso design.\n `,\n },\n },\n },\n};\n\ntype StoryArgs = {\n density: SulaTableDensity;\n fullWidth: boolean;\n equalWidth: boolean;\n};\n\ntype CellContent = string | Node;\n\nconst HEADERS = ['Protocolo', 'Cliente', 'Status', 'Integração', 'Ação'];\n\nconst createStoryContainer = (maxWidth = '960px') => {\n const container = document.createElement('div');\n container.style.margin = '20px auto';\n container.style.maxWidth = maxWidth;\n container.style.padding = '20px';\n container.style.boxSizing = 'border-box';\n return container;\n};\n\nconst createTitle = (text: string, marginTop = '0') => {\n const title = document.createElement('h3');\n title.textContent = text;\n title.style.margin = `${marginTop} 0 12px`;\n title.style.fontSize = '18px';\n title.style.fontWeight = '700';\n title.style.color = '#2f3131';\n return title;\n};\n\nconst createDescription = (text: string) => {\n const description = document.createElement('p');\n description.textContent = text;\n description.style.margin = '0 0 16px';\n description.style.fontSize = '14px';\n description.style.lineHeight = '20px';\n description.style.color = '#6c6e6e';\n return description;\n};\n\nconst createHeadCell = (content: string) => {\n const cell = document.createElement('sula-table-head-cell');\n cell.textContent = content;\n return cell;\n};\n\nconst createBodyCell = (content: CellContent) => {\n const cell = document.createElement('sula-table-cell');\n\n if (typeof content === 'string') {\n cell.textContent = content;\n return cell;\n }\n\n cell.appendChild(content);\n return cell;\n};\n\nconst createRow = (items: CellContent[], isHeader = false) => {\n const row = document.createElement('sula-table-row');\n\n items.forEach(item => {\n row.appendChild(isHeader ? createHeadCell(item as string) : createBodyCell(item));\n });\n\n return row;\n};\n\nconst createTable = (args: StoryArgs, rows: CellContent[][], headers = HEADERS) => {\n const table = document.createElement('sula-table');\n table.setAttribute('density', args.density);\n table.setAttribute('full-width', args.fullWidth ? 'true' : 'false');\n table.setAttribute('equal-width', args.equalWidth ? 'true' : 'false');\n\n const header = document.createElement('sula-table-header');\n header.appendChild(createRow(headers, true));\n\n const body = document.createElement('sula-table-body');\n rows.forEach(row => body.appendChild(createRow(row)));\n\n table.appendChild(header);\n table.appendChild(body);\n\n return table;\n};\n\nconst createCustomerContent = (name: string, email: string) => {\n const content = document.createElement('div');\n content.style.display = 'flex';\n content.style.flexDirection = 'column';\n content.style.gap = '4px';\n\n const strong = document.createElement('strong');\n strong.textContent = name;\n strong.style.color = '#2f3131';\n\n const span = document.createElement('span');\n span.textContent = email;\n span.style.fontSize = '12px';\n span.style.color = '#6c6e6e';\n\n content.appendChild(strong);\n content.appendChild(span);\n\n return content;\n};\n\nconst createTag = (label: string, icon: string, iconStatus: string) => {\n const tag = document.createElement('sula-tag');\n tag.setAttribute('label', label);\n tag.setAttribute('appearance', 'bordered');\n tag.setAttribute('size', 'small');\n tag.setAttribute('icon', icon);\n tag.setAttribute('icon-status', iconStatus);\n return tag;\n};\n\nconst createLoaderContent = (text: string) => {\n const content = document.createElement('div');\n content.style.display = 'flex';\n content.style.alignItems = 'center';\n content.style.gap = '8px';\n\n const loader = document.createElement('sula-loader');\n loader.setAttribute('size', 'small');\n\n const span = document.createElement('span');\n span.textContent = text;\n\n content.appendChild(loader);\n content.appendChild(span);\n\n return content;\n};\n\nconst createActionButton = (text: string) => {\n const button = document.createElement('sula-button');\n button.setAttribute('text', text);\n button.setAttribute('appearance', 'secondary');\n return button;\n};\n\nconst textRows = (): CellContent[][] => [\n ['PRT-2024', 'Mariana Costa', 'Aprovado', 'Concluída', 'Ver detalhes'],\n ['PRT-2025', 'Bruno Alves', 'Pendente', 'Sincronizando', 'Reprocessar'],\n ['PRT-2026', 'Camila Rocha', 'Em análise', 'Aguardando retorno', 'Abrir'],\n];\n\nconst customRows = (): CellContent[][] => [\n [\n 'PRT-1024',\n createCustomerContent('Mariana Costa', 'mariana@sula.com'),\n createTag('Aprovado', 'ph-bold ph-check', 'success'),\n createTag('Concluída', 'ph-bold ph-check', 'success'),\n createActionButton('Ver detalhes'),\n ],\n [\n 'PRT-1025',\n createCustomerContent('Bruno Alves', 'bruno@sula.com'),\n createTag('Pendente', 'ph-bold ph-clock', 'warning'),\n createLoaderContent('Sincronizando'),\n createActionButton('Reprocessar'),\n ],\n [\n 'PRT-1026',\n createCustomerContent('Camila Rocha', 'camila@sula.com'),\n createTag('Em análise', 'ph-bold ph-hourglass-medium', 'info'),\n createLoaderContent('Aguardando retorno'),\n createActionButton('Abrir'),\n ],\n];\n\nconst longTextRows = (): CellContent[][] => [\n [\n 'PRT-3001',\n 'Cliente com nome consideravelmente maior para testar a distribuição da largura',\n 'Pendente de revisão manual',\n 'Integração aguardando retorno do parceiro externo',\n 'Visualizar detalhes',\n ],\n ['PRT-3002', 'Operação padrão', 'Aprovado', 'Concluída', 'Abrir'],\n];\n\nconst intrinsicWidthRows = (): CellContent[][] => [\n ['PRT-4101', 'Mariana Costa', 'Aprovado'],\n ['PRT-4102', 'Bruno Alves', 'Pendente'],\n ['PRT-4103', 'Camila Rocha', 'Em análise'],\n];\n\nconst PlaygroundTemplate = (args: StoryArgs) => {\n const container = createStoryContainer();\n container.appendChild(createTable(args, customRows()));\n return container;\n};\n\nconst TextOnlyTemplate = (args: StoryArgs) => {\n const container = createStoryContainer();\n container.appendChild(createTable(args, textRows()));\n return container;\n};\n\nconst EqualWidthTemplate = (args: StoryArgs) => {\n const container = createStoryContainer();\n container.appendChild(createDescription('Use `equalWidth` para forçar a mesma largura entre colunas, mesmo quando o conteúdo é assimétrico.'));\n container.appendChild(createTable(args, longTextRows(), ['Protocolo', 'Cliente', 'Status', 'Integração', 'Ação']));\n return container;\n};\n\nconst IntrinsicWidthTemplate = (args: StoryArgs) => {\n const container = createStoryContainer('1200px');\n container.appendChild(createDescription('Com `fullWidth=false`, a tabela passa a respeitar a largura natural do conteúdo e não ocupa toda a área disponível.'));\n container.appendChild(createTable(args, intrinsicWidthRows(), ['Protocolo', 'Cliente', 'Status']));\n return container;\n};\n\nexport const Playground = PlaygroundTemplate.bind({});\nPlayground.args = {\n density: SulaTableDensity.Confortable,\n fullWidth: true,\n equalWidth: false,\n};\nPlayground.parameters = {\n docs: {\n description: {\n story: 'Visão principal da tabela com composição de células de texto, tag, loader e botão.',\n },\n },\n};\n\nexport const TextOnly = TextOnlyTemplate.bind({});\nTextOnly.args = {\n density: SulaTableDensity.Confortable,\n fullWidth: true,\n equalWidth: false,\n};\nTextOnly.parameters = {\n docs: {\n description: {\n story: 'Exemplo mínimo da tabela usando apenas textos nas células.',\n },\n },\n};\n\nexport const CustomContent = PlaygroundTemplate.bind({});\nCustomContent.args = {\n density: SulaTableDensity.Default,\n fullWidth: true,\n equalWidth: false,\n};\nCustomContent.parameters = {\n docs: {\n description: {\n story: 'Exemplo com conteúdo rico via composição: blocos de texto, outros web components e conteúdo misto dentro das células.',\n },\n },\n};\n\nexport const EqualWidthColumns = EqualWidthTemplate.bind({});\nEqualWidthColumns.args = {\n density: SulaTableDensity.Default,\n fullWidth: true,\n equalWidth: true,\n};\nEqualWidthColumns.parameters = {\n docs: {\n description: {\n story: 'Tabela com `equalWidth=true`, útil quando o layout precisa de colunas equilibradas.',\n },\n },\n};\n\nexport const IntrinsicWidth = IntrinsicWidthTemplate.bind({});\nIntrinsicWidth.args = {\n density: SulaTableDensity.Default,\n fullWidth: false,\n equalWidth: false,\n};\nIntrinsicWidth.parameters = {\n docs: {\n description: {\n story: 'Tabela sem ocupar a largura total do container, deixando o tamanho ser guiado pelo conteúdo.',\n },\n },\n};\n\nexport const DensityComparison = () => {\n const container = createStoryContainer();\n const densities: Array<{ title: string; density: SulaTableDensity }> = [\n { title: 'Compact', density: SulaTableDensity.Compact },\n { title: 'Default', density: SulaTableDensity.Default },\n { title: 'Spaced', density: SulaTableDensity.Spaced },\n { title: 'Comfortable', density: SulaTableDensity.Confortable },\n ];\n\n densities.forEach(({ title, density }, index) => {\n container.appendChild(createTitle(title, index === 0 ? '0' : '28px'));\n container.appendChild(createTable({ density, fullWidth: true, equalWidth: false }, textRows()));\n });\n\n return container;\n};\nDensityComparison.parameters = {\n docs: {\n description: {\n story: 'Comparação entre as densidades disponíveis para validar alturas e espaçamentos das células.',\n },\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { replaceHostWithRenderedElement } from "../../utils/replace-host-with-rendered-element";
|
|
3
|
+
export class SulaTableBody {
|
|
4
|
+
componentDidLoad() {
|
|
5
|
+
replaceHostWithRenderedElement(this.host, 'tbody');
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { key: '255fb81b2515c7de6f3dbda43a77db8564eb345e' }, h("tbody", { key: '792001ad301eed9649dcdc61c0ae7f9823697ae2' }, h("slot", { key: '1f30c22854d060ed58bd96d60f66f74e037e1fcb' }))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "sula-table-body"; }
|
|
11
|
+
static get originalStyleUrls() {
|
|
12
|
+
return {
|
|
13
|
+
"$": ["sula-table-body.scss"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static get styleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["sula-table-body.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get elementRef() { return "host"; }
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sula-table-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-table-body.js","sourceRoot":"","sources":["../../../src/components/sula-table-body/sula-table-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAOhG,MAAM,OAAO,aAAa;IAGxB,gBAAgB;QACd,8BAA8B,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH;gBACE,8DAAa,CACP,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h } from '@stencil/core';\nimport { replaceHostWithRenderedElement } from '../../utils/replace-host-with-rendered-element';\n\n@Component({\n tag: 'sula-table-body',\n styleUrl: 'sula-table-body.scss',\n shadow: false,\n})\nexport class SulaTableBody {\n @Element() host!: HTMLElement;\n\n componentDidLoad() {\n replaceHostWithRenderedElement(this.host, 'tbody');\n }\n\n render() {\n return (\n <Host>\n <tbody>\n <slot></slot>\n </tbody>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.box-border{box-sizing:border-box}.flex{display:flex}.min-h-56{min-height:3.5rem}.min-h-60{min-height:3.75rem}.min-h-64{min-height:4rem}.min-h-72{min-height:4.5rem}.w-full{width:100%}.items-center{align-items:center}.justify-start{justify-content:flex-start}.border-b{border-bottom-width:1px}.border-dashed{border-style:dashed}.border-line-general{border-color:var(--color-line-general)}.px-16{padding-left:1rem;padding-right:1rem}.py-4{padding-bottom:.25rem;padding-top:.25rem}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.text-text-secondary{color:var(--color-text-secondary)}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { SulaTableDensity } from "../sula-table/model/sula-table.model";
|
|
3
|
+
import { replaceHostWithRenderedElement } from "../../utils/replace-host-with-rendered-element";
|
|
4
|
+
export class SulaTableCell {
|
|
5
|
+
get tableDensity() {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return ((_b = (_a = this.host.closest('sula-table')) === null || _a === void 0 ? void 0 : _a.density) !== null && _b !== void 0 ? _b : SulaTableDensity.Default);
|
|
8
|
+
}
|
|
9
|
+
componentDidLoad() {
|
|
10
|
+
replaceHostWithRenderedElement(this.host, 'td');
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, { key: 'b2bf27030078f512b8ff89582d49e4c1d1c91f50' }, h("td", { key: '7c41ad37c806e28fc4489d7c571e718a87d79434', class: "align-middle text-left" }, h("div", { key: '79356a114b7f33ffe7892ab9a1fe133201d022e9', class: {
|
|
14
|
+
'px-16 py-4 w-full flex justify-start items-center box-border border-b border-dashed border-line-general text-label-medium-regular text-text-secondary': true,
|
|
15
|
+
'min-h-56': this.tableDensity === SulaTableDensity.Compact,
|
|
16
|
+
'min-h-60': this.tableDensity === SulaTableDensity.Default,
|
|
17
|
+
'min-h-64': this.tableDensity === SulaTableDensity.Spaced,
|
|
18
|
+
'min-h-72': this.tableDensity === SulaTableDensity.Confortable,
|
|
19
|
+
} }, h("slot", { key: '686baec6c304b80996201447c0fb2d7b6d5be9b1' })))));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "sula-table-cell"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["sula-table-cell.scss"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["sula-table-cell.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get elementRef() { return "host"; }
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=sula-table-cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-table-cell.js","sourceRoot":"","sources":["../../../src/components/sula-table-cell/sula-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAOhG,MAAM,OAAO,aAAa;IAGxB,IAAY,YAAY;;QACtB,OAAO,CAAC,MAAA,MAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAA2D,0CAAE,OAAO,mCAAI,gBAAgB,CAAC,OAAO,CAAqB,CAAC;IAC/J,CAAC;IAED,gBAAgB;QACd,8BAA8B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,2DAAI,KAAK,EAAC,wBAAwB;gBAChC,4DACE,KAAK,EAAE;wBACL,uJAAuJ,EAAE,IAAI;wBAC7J,UAAU,EAAE,IAAI,CAAC,YAAY,KAAK,gBAAgB,CAAC,OAAO;wBAC1D,UAAU,EAAE,IAAI,CAAC,YAAY,KAAK,gBAAgB,CAAC,OAAO;wBAC1D,UAAU,EAAE,IAAI,CAAC,YAAY,KAAK,gBAAgB,CAAC,MAAM;wBACzD,UAAU,EAAE,IAAI,CAAC,YAAY,KAAK,gBAAgB,CAAC,WAAW;qBAC/D;oBAED,8DAAa,CACT,CACH,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, h } from '@stencil/core';\nimport { SulaTableDensity } from '../sula-table/model/sula-table.model';\nimport { replaceHostWithRenderedElement } from '../../utils/replace-host-with-rendered-element';\n\n@Component({\n tag: 'sula-table-cell',\n styleUrl: 'sula-table-cell.scss',\n shadow: false,\n})\nexport class SulaTableCell {\n @Element() host!: HTMLElement;\n\n private get tableDensity(): SulaTableDensity {\n return ((this.host.closest('sula-table') as (HTMLElement & { density?: SulaTableDensity }) | null)?.density ?? SulaTableDensity.Default) as SulaTableDensity;\n }\n\n componentDidLoad() {\n replaceHostWithRenderedElement(this.host, 'td');\n }\n\n render() {\n return (\n <Host>\n <td class=\"align-middle text-left\">\n <div\n class={{\n 'px-16 py-4 w-full flex justify-start items-center box-border border-b border-dashed border-line-general text-label-medium-regular text-text-secondary': true,\n 'min-h-56': this.tableDensity === SulaTableDensity.Compact,\n 'min-h-60': this.tableDensity === SulaTableDensity.Default,\n 'min-h-64': this.tableDensity === SulaTableDensity.Spaced,\n 'min-h-72': this.tableDensity === SulaTableDensity.Confortable,\n }}\n >\n <slot></slot>\n </div>\n </td>\n </Host>\n );\n }\n}\n"]}
|