@kyndryl-design-system/shidoka-applications 2.109.6 → 2.109.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{__setFunctionName as t,__esDecorate as e,__runInitializers as i,__classPrivateFieldGet as a,__classPrivateFieldSet as s}from"tslib";import{css as n,LitElement as r,unsafeCSS as d,html as o}from"lit";import{customElement as l,property as h,state as m}from"lit/decorators.js";import{ContextConsumer as c}from"@lit/context";import{tableContext as g}from"./table-context.js";import{TABLE_CELL_ALIGN as p}from"./defs.js";var f=n`*,
1
+ import{__setFunctionName as t,__esDecorate as e,__runInitializers as i,__classPrivateFieldGet as a,__classPrivateFieldSet as s}from"tslib";import{css as n,LitElement as r,unsafeCSS as d,html as o}from"lit";import{customElement as l,property as h,state as m}from"lit/decorators.js";import{ContextConsumer as c}from"@lit/context";import{tableContext as p}from"./table-context.js";import{TABLE_CELL_ALIGN as g}from"./defs.js";var f=n`*,
2
2
  *::before,
3
3
  *::after {
4
4
  box-sizing: border-box;
@@ -76,15 +76,23 @@ import{__setFunctionName as t,__esDecorate as e,__runInitializers as i,__classPr
76
76
 
77
77
  .slot-wrapper {
78
78
  display: inline-block;
79
+ width: 100%;
80
+ min-width: 0;
79
81
  max-width: 100%;
80
82
  }
81
83
 
82
- .slot-wrapper::slotted(*) {
84
+ .slot-wrapper slot::slotted(*) {
83
85
  display: flex;
84
86
  min-width: 0;
85
87
  flex-shrink: 1;
86
88
  }
87
89
 
90
+ .slot-wrapper slot::slotted(kyn-progress-bar) {
91
+ display: block;
92
+ width: 100%;
93
+ max-width: 100%;
94
+ }
95
+
88
96
  :host([align=left]) {
89
97
  text-align: left;
90
98
  }
@@ -124,9 +132,9 @@ import{__setFunctionName as t,__esDecorate as e,__runInitializers as i,__classPr
124
132
 
125
133
  :host(:last-child) {
126
134
  border-bottom-right-radius: var(--kyn-td-border-radius-br);
127
- }`;let k=(()=>{var n,k,b,u,y,w,v,x,W;let z,C,M,S,j,_,P,B,O,T,E,F=[l("kyn-td")],L=[],q=r,A=[],D=[],G=[],H=[],I=[],J=[],K=[],N=[],Q=[],R=[],U=[],V=[],X=[],Y=[],Z=[],$=[],tt=[],et=[];return C=class extends q{constructor(){super(...arguments),n.set(this,i(this,A,!1)),k.set(this,(i(this,D),i(this,G,"cell"))),b.set(this,(i(this,H),i(this,I,p.LEFT))),u.set(this,(i(this,J),i(this,K,""))),y.set(this,(i(this,N),i(this,Q,""))),w.set(this,(i(this,R),i(this,U,""))),v.set(this,(i(this,V),i(this,X,!1))),x.set(this,(i(this,Y),i(this,Z,!1))),W.set(this,(i(this,$),i(this,tt,new c(this,g,(t=>{t&&this.handleContextChange(t)}),!0)))),this.handleContextChange=(i(this,et),({dense:t})=>{"boolean"==typeof t&&(this.dense=t)})}get dense(){return a(this,n,"f")}set dense(t){s(this,n,t,"f")}get role(){return a(this,k,"f")}set role(t){s(this,k,t,"f")}get align(){return a(this,b,"f")}set align(t){s(this,b,t,"f")}get width(){return a(this,u,"f")}set width(t){s(this,u,t,"f")}get maxWidth(){return a(this,y,"f")}set maxWidth(t){s(this,y,t,"f")}get minWidth(){return a(this,w,"f")}set minWidth(t){s(this,w,t,"f")}get disabled(){return a(this,v,"f")}set disabled(t){s(this,v,t,"f")}get dimmed(){return a(this,x,"f")}set dimmed(t){s(this,x,t,"f")}get _contextConsumer(){return a(this,W,"f")}set _contextConsumer(t){s(this,W,t,"f")}updated(t){super.updated(t),this.maxWidth&&t.has("maxWidth")&&this.style.setProperty("--kyn-td-max-width",this.maxWidth),this.width&&t.has("width")&&this.style.setProperty("--kyn-td-width",this.width),this.minWidth&&t.has("minWidth")&&this.style.setProperty("--kyn-td-min-width",this.minWidth)}render(){return o`
135
+ }`;let k=(()=>{var n,k,b,w,u,y,v,x,W;let z,C,M,S,j,_,P,B,O,T,E,F=[l("kyn-td")],L=[],q=r,A=[],D=[],G=[],H=[],I=[],J=[],K=[],N=[],Q=[],R=[],U=[],V=[],X=[],Y=[],Z=[],$=[],tt=[],et=[];return C=class extends q{constructor(){super(...arguments),n.set(this,i(this,A,!1)),k.set(this,(i(this,D),i(this,G,"cell"))),b.set(this,(i(this,H),i(this,I,g.LEFT))),w.set(this,(i(this,J),i(this,K,""))),u.set(this,(i(this,N),i(this,Q,""))),y.set(this,(i(this,R),i(this,U,""))),v.set(this,(i(this,V),i(this,X,!1))),x.set(this,(i(this,Y),i(this,Z,!1))),W.set(this,(i(this,$),i(this,tt,new c(this,p,(t=>{t&&this.handleContextChange(t)}),!0)))),this.handleContextChange=(i(this,et),({dense:t})=>{"boolean"==typeof t&&(this.dense=t)})}get dense(){return a(this,n,"f")}set dense(t){s(this,n,t,"f")}get role(){return a(this,k,"f")}set role(t){s(this,k,t,"f")}get align(){return a(this,b,"f")}set align(t){s(this,b,t,"f")}get width(){return a(this,w,"f")}set width(t){s(this,w,t,"f")}get maxWidth(){return a(this,u,"f")}set maxWidth(t){s(this,u,t,"f")}get minWidth(){return a(this,y,"f")}set minWidth(t){s(this,y,t,"f")}get disabled(){return a(this,v,"f")}set disabled(t){s(this,v,t,"f")}get dimmed(){return a(this,x,"f")}set dimmed(t){s(this,x,t,"f")}get _contextConsumer(){return a(this,W,"f")}set _contextConsumer(t){s(this,W,t,"f")}updated(t){super.updated(t),this.maxWidth&&t.has("maxWidth")&&this.style.setProperty("--kyn-td-max-width",this.maxWidth),this.width&&t.has("width")&&this.style.setProperty("--kyn-td-width",this.width),this.minWidth&&t.has("minWidth")&&this.style.setProperty("--kyn-td-min-width",this.minWidth)}render(){return o`
128
136
  <div class="slot-wrapper">
129
137
  <slot></slot>
130
138
  </div>
131
- `}},n=new WeakMap,k=new WeakMap,b=new WeakMap,u=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakMap,W=new WeakMap,t(C,"TableCell"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=q[Symbol.metadata])&&void 0!==t?t:null):void 0;M=[h({type:Boolean,reflect:!0})],S=[h({type:String,reflect:!0})],j=[h({type:String,reflect:!0})],_=[h({type:String,reflect:!0})],P=[h({type:String,reflect:!0})],B=[h({type:String,reflect:!0})],O=[h({type:Boolean,reflect:!0})],T=[h({type:Boolean,reflect:!0})],E=[m()],e(C,null,M,{kind:"accessor",name:"dense",static:!1,private:!1,access:{has:t=>"dense"in t,get:t=>t.dense,set:(t,e)=>{t.dense=e}},metadata:i},A,D),e(C,null,S,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:t=>"role"in t,get:t=>t.role,set:(t,e)=>{t.role=e}},metadata:i},G,H),e(C,null,j,{kind:"accessor",name:"align",static:!1,private:!1,access:{has:t=>"align"in t,get:t=>t.align,set:(t,e)=>{t.align=e}},metadata:i},I,J),e(C,null,_,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:i},K,N),e(C,null,P,{kind:"accessor",name:"maxWidth",static:!1,private:!1,access:{has:t=>"maxWidth"in t,get:t=>t.maxWidth,set:(t,e)=>{t.maxWidth=e}},metadata:i},Q,R),e(C,null,B,{kind:"accessor",name:"minWidth",static:!1,private:!1,access:{has:t=>"minWidth"in t,get:t=>t.minWidth,set:(t,e)=>{t.minWidth=e}},metadata:i},U,V),e(C,null,O,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:t=>"disabled"in t,get:t=>t.disabled,set:(t,e)=>{t.disabled=e}},metadata:i},X,Y),e(C,null,T,{kind:"accessor",name:"dimmed",static:!1,private:!1,access:{has:t=>"dimmed"in t,get:t=>t.dimmed,set:(t,e)=>{t.dimmed=e}},metadata:i},Z,$),e(C,null,E,{kind:"accessor",name:"_contextConsumer",static:!1,private:!1,access:{has:t=>"_contextConsumer"in t,get:t=>t._contextConsumer,set:(t,e)=>{t._contextConsumer=e}},metadata:i},tt,et),e(null,z={value:C},F,{kind:"class",name:C.name,metadata:i},null,L),C=z.value,i&&Object.defineProperty(C,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),C.styles=d(f),i(C,L),C})();export{k as TableCell};
139
+ `}},n=new WeakMap,k=new WeakMap,b=new WeakMap,w=new WeakMap,u=new WeakMap,y=new WeakMap,v=new WeakMap,x=new WeakMap,W=new WeakMap,t(C,"TableCell"),(()=>{var t;const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=q[Symbol.metadata])&&void 0!==t?t:null):void 0;M=[h({type:Boolean,reflect:!0})],S=[h({type:String,reflect:!0})],j=[h({type:String,reflect:!0})],_=[h({type:String,reflect:!0})],P=[h({type:String,reflect:!0})],B=[h({type:String,reflect:!0})],O=[h({type:Boolean,reflect:!0})],T=[h({type:Boolean,reflect:!0})],E=[m()],e(C,null,M,{kind:"accessor",name:"dense",static:!1,private:!1,access:{has:t=>"dense"in t,get:t=>t.dense,set:(t,e)=>{t.dense=e}},metadata:i},A,D),e(C,null,S,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:t=>"role"in t,get:t=>t.role,set:(t,e)=>{t.role=e}},metadata:i},G,H),e(C,null,j,{kind:"accessor",name:"align",static:!1,private:!1,access:{has:t=>"align"in t,get:t=>t.align,set:(t,e)=>{t.align=e}},metadata:i},I,J),e(C,null,_,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:i},K,N),e(C,null,P,{kind:"accessor",name:"maxWidth",static:!1,private:!1,access:{has:t=>"maxWidth"in t,get:t=>t.maxWidth,set:(t,e)=>{t.maxWidth=e}},metadata:i},Q,R),e(C,null,B,{kind:"accessor",name:"minWidth",static:!1,private:!1,access:{has:t=>"minWidth"in t,get:t=>t.minWidth,set:(t,e)=>{t.minWidth=e}},metadata:i},U,V),e(C,null,O,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:t=>"disabled"in t,get:t=>t.disabled,set:(t,e)=>{t.disabled=e}},metadata:i},X,Y),e(C,null,T,{kind:"accessor",name:"dimmed",static:!1,private:!1,access:{has:t=>"dimmed"in t,get:t=>t.dimmed,set:(t,e)=>{t.dimmed=e}},metadata:i},Z,$),e(C,null,E,{kind:"accessor",name:"_contextConsumer",static:!1,private:!1,access:{has:t=>"_contextConsumer"in t,get:t=>t._contextConsumer,set:(t,e)=>{t._contextConsumer=e}},metadata:i},tt,et),e(null,z={value:C},F,{kind:"class",name:C.name,metadata:i},null,L),C=z.value,i&&Object.defineProperty(C,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),C.styles=d(f),i(C,L),C})();export{k as TableCell};
132
140
  //# sourceMappingURL=table-cell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-cell.js","sources":["../../../../src/components/reusable/table/table-cell.ts"],"sourcesContent":["import { html, LitElement, PropertyValues, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ContextConsumer } from '@lit/context';\nimport { tableContext, TableContextType } from './table-context';\n\nimport styles from './table-cell.scss?inline';\n\nimport { TABLE_CELL_ALIGN } from './defs';\n\n/**\n * `kyn-td` Web Component.\n *\n * Represents a table cell (data cell) within Shidoka's design system tables.\n * Allows customization of alignment and can reflect the sort direction when\n * used within sortable columns.\n *\n * @slot unnamed - The content slot for adding table data inside the cell.\n */\n@customElement('kyn-td')\nexport class TableCell extends LitElement {\n static override styles = unsafeCSS(styles);\n\n @property({ type: Boolean, reflect: true })\n accessor dense = false;\n\n /** aria role.\n * @internal\n */\n @property({ type: String, reflect: true })\n override accessor role = 'cell';\n\n /** Determines the text alignment of the table cell's content. */\n @property({ type: String, reflect: true })\n accessor align: TABLE_CELL_ALIGN = TABLE_CELL_ALIGN.LEFT;\n\n /**\n * Sets a fixed width for the cell.\n * Accepts standard CSS width values (e.g., '150px', '50%').\n */\n @property({ type: String, reflect: true })\n accessor width = '';\n\n /**\n * Sets a maximum width for the cell.\n * Accepts standard CSS width values (e.g., '150px', '50%').\n */\n @property({ type: String, reflect: true })\n accessor maxWidth = '';\n\n /**\n * Sets a minimum width for the cell;\n * Accepts standard CSS width values (e.g., '150px', '50%').\n * @type {string}\n */\n @property({ type: String, reflect: true })\n accessor minWidth = '';\n\n /** Disables the cell. */\n @property({ type: Boolean, reflect: true })\n accessor disabled = false;\n\n /** Dim the cell. */\n @property({ type: Boolean, reflect: true })\n accessor dimmed = false;\n\n /**\n * Context consumer for the table context.\n * Updates the cell's dense properties when the context changes.\n * @private\n * @ignore\n * @type {ContextConsumer<TableContextType, TableCell>}\n */\n @state()\n // @ts-expect-error - This is a context consumer\n private accessor _contextConsumer = new ContextConsumer(\n this,\n tableContext,\n (context) => {\n if (context) this.handleContextChange(context);\n },\n true\n );\n\n /**\n * Updates the cell's dense properties when the context changes.\n * @param {TableContextType} context - The updated context.\n */\n handleContextChange = ({ dense }: TableContextType) => {\n if (typeof dense == 'boolean') {\n this.dense = dense;\n }\n };\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (this.maxWidth && changedProperties.has('maxWidth')) {\n this.style.setProperty('--kyn-td-max-width', this.maxWidth);\n }\n\n if (this.width && changedProperties.has('width')) {\n this.style.setProperty('--kyn-td-width', this.width);\n }\n\n if (this.minWidth && changedProperties.has('minWidth')) {\n this.style.setProperty('--kyn-td-min-width', this.minWidth);\n }\n }\n\n override render() {\n return html`\n <div class=\"slot-wrapper\">\n <slot></slot>\n </div>\n `;\n }\n}\n\n// Define the custom element in the global namespace\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-td': TableCell;\n }\n}\n"],"names":["TableCell","customElement","LitElement","_classThis","_classSuper","_TableCell_dense_accessor_storage","set","this","__runInitializers","_dense_initializers","_TableCell_role_accessor_storage","_dense_extraInitializers","_role_initializers","_TableCell_align_accessor_storage","_role_extraInitializers","_align_initializers","TABLE_CELL_ALIGN","LEFT","_TableCell_width_accessor_storage","_align_extraInitializers","_width_initializers","_TableCell_maxWidth_accessor_storage","_width_extraInitializers","_maxWidth_initializers","_TableCell_minWidth_accessor_storage","_maxWidth_extraInitializers","_minWidth_initializers","_TableCell_disabled_accessor_storage","_minWidth_extraInitializers","_disabled_initializers","_TableCell_dimmed_accessor_storage","_disabled_extraInitializers","_dimmed_initializers","_TableCell__contextConsumer_accessor_storage","_dimmed_extraInitializers","__contextConsumer_initializers","ContextConsumer","tableContext","context","handleContextChange","dense","__classPrivateFieldGet","value","__classPrivateFieldSet","role","align","width","maxWidth","minWidth","disabled","dimmed","_contextConsumer","updated","changedProperties","super","has","style","setProperty","render","html","property","type","Boolean","reflect","String","__contextConsumer_decorators","state","__esDecorate","_dense_decorators","kind","name","static","private","access","obj","get","metadata","_metadata","_role_decorators","_align_decorators","_width_decorators","_maxWidth_decorators","_minWidth_decorators","_disabled_decorators","_dimmed_decorators","__contextConsumer_extraInitializers","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmBaA,EAAS,yDADrBC,EAAc,kBACgBC,qGAARC,EAAA,cAAQC,oCAIpBC,EAAAC,IAAAC,KAAAC,EAAAD,KAAAE,GAAQ,IAMCC,EAAAJ,IAAAC,MAAAC,EAAAD,KAAAI,GAAAH,EAAAD,KAAAK,EAAO,UAIhBC,EAAAP,IAAAC,MAAAC,EAAAD,KAAAO,GAAAN,EAAAD,KAAAQ,EAA0BC,EAAiBC,QAO3CC,EAAAZ,IAAAC,MAAAC,EAAAD,KAAAY,GAAAX,EAAAD,KAAAa,EAAQ,MAORC,EAAAf,IAAAC,MAAAC,EAAAD,KAAAe,GAAAd,EAAAD,KAAAgB,EAAW,MAQXC,EAAAlB,IAAAC,MAAAC,EAAAD,KAAAkB,GAAAjB,EAAAD,KAAAmB,EAAW,MAIXC,EAAArB,IAAAC,MAAAC,EAAAD,KAAAqB,GAAApB,EAAAD,KAAAsB,GAA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KAAA,WAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAlB,IAAAmB,GAAA,aAAAA,EAAAC,IAAAD,GAAAA,EAASzB,SAAQ3C,IAAA,CAAAoE,EAAAhC,KAAAgC,EAARzB,SAAQP,CAAA,GAAAkC,SAAAC,GAAAhD,EAAAE,GAIjBoC,EAAAhE,EAAA,KAAAiF,EAAA,CAAAf,KAAA,WAAAC,KAAA,SAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAlB,IAAAmB,GAAA,WAAAA,EAAAC,IAAAD,GAAAA,EAASxB,OAAM5C,IAAA,CAAAoE,EAAAhC,KAAAgC,EAANxB,OAAMR,CAAA,GAAAkC,SAAAC,GAAA7C,EAAAE,GAWfiC,EAAAhE,EAAA,KAAA8D,EAAA,CAAAI,KAAA,WAAAC,KAAA,mBAAAC,QAAA,EAAAC,SAAA,EAAAC,OAAA,CAAAlB,IAAAmB,GAAA,qBAAAA,EAAAC,IAAAD,GAAAA,EAAiBvB,iBAAgB7C,IAAA,CAAAoE,EAAAhC,KAAAgC,EAAhBvB,iBAAgBT,CAAA,GAAAkC,SAAAC,GAAA1C,GAAAkD,IAvDnClB,EAAA,KAAAmB,EAAA,CAAA5C,MAAAvC,GAAAoF,EAAA,CAAAlB,KAAA,QAAAC,KAAAnE,EAAAmE,KAAAM,SAAAC,GAAA,KAAAW,iHACkBrF,EAAAsF,OAASC,EAAUD,GADxBjF,EAAAL,EAAAqF,MAAS"}
1
+ {"version":3,"file":"table-cell.js","sources":["../../../../src/components/reusable/table/table-cell.ts"],"sourcesContent":["import { html, LitElement, PropertyValues, unsafeCSS } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ContextConsumer } from '@lit/context';\nimport { tableContext, TableContextType } from './table-context';\n\nimport styles from './table-cell.scss?inline';\n\nimport { TABLE_CELL_ALIGN } from './defs';\n\n/**\n * `kyn-td` Web Component.\n *\n * Represents a table cell (data cell) within Shidoka's design system tables.\n * Allows customization of alignment and can reflect the sort direction when\n * used within sortable columns.\n *\n * @slot unnamed - The content slot for adding table data inside the cell.\n */\n@customElement('kyn-td')\nexport class TableCell extends LitElement {\n static override styles = unsafeCSS(styles);\n\n @property({ type: Boolean, reflect: true })\n accessor dense = false;\n\n /** aria role.\n * @internal\n */\n @property({ type: String, reflect: true })\n override accessor role = 'cell';\n\n /** Determines the text alignment of the table cell's content. */\n @property({ type: String, reflect: true })\n accessor align: TABLE_CELL_ALIGN = TABLE_CELL_ALIGN.LEFT;\n\n /**\n * Sets a fixed width for the cell.\n * Accepts standard CSS width values (e.g., '150px', '50%').\n */\n @property({ type: String, reflect: true })\n accessor width = '';\n\n /**\n * Sets a maximum width for the cell.\n * Accepts standard CSS width values (e.g., '150px', '50%').\n */\n @property({ type: String, reflect: true })\n accessor maxWidth = '';\n\n /**\n * Sets a minimum width for the cell;\n * Accepts standard CSS width values (e.g., '150px', '50%').\n * @type {string}\n */\n @property({ type: String, reflect: true })\n accessor minWidth = '';\n\n /** Disables the cell. */\n @property({ type: Boolean, reflect: true })\n accessor disabled = false;\n\n /** Dim the cell. */\n @property({ type: Boolean, reflect: true })\n accessor dimmed = false;\n\n /**\n * Context consumer for the table context.\n * Updates the cell's dense properties when the context changes.\n * @private\n * @ignore\n * @type {ContextConsumer<TableContextType, TableCell>}\n */\n @state()\n // @ts-expect-error - This is a context consumer\n private accessor _contextConsumer = new ContextConsumer(\n this,\n tableContext,\n (context) => {\n if (context) this.handleContextChange(context);\n },\n true\n );\n\n /**\n * Updates the cell's dense properties when the context changes.\n * @param {TableContextType} context - The updated context.\n */\n handleContextChange = ({ dense }: TableContextType) => {\n if (typeof dense == 'boolean') {\n this.dense = dense;\n }\n };\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (this.maxWidth && changedProperties.has('maxWidth')) {\n this.style.setProperty('--kyn-td-max-width', this.maxWidth);\n }\n\n if (this.width && changedProperties.has('width')) {\n this.style.setProperty('--kyn-td-width', this.width);\n }\n\n if (this.minWidth && changedProperties.has('minWidth')) {\n this.style.setProperty('--kyn-td-min-width', this.minWidth);\n }\n }\n\n override render() {\n return html`\n <div class=\"slot-wrapper\">\n <slot></slot>\n </div>\n `;\n }\n}\n\n// Define the custom element in the global namespace\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-td': TableCell;\n }\n}\n"],"names":["TableCell","customElement","LitElement","_classThis","_classSuper","_TableCell_dense_accessor_storage","set","this","__runInitializers","_dense_initializers","_TableCell_role_accessor_storage","_dense_extraInitializers","_role_initializers","_TableCell_align_accessor_storage","_role_extraInitializers","_align_initializers","TABLE_CELL_ALIGN","LEFT","_TableCell_width_accessor_storage","_align_extraInitializers","_width_initializers","_TableCell_maxWidth_accessor_storage","_width_extraInitializers","_maxWidth_initializers","_TableCell_minWidth_accessor_storage","_maxWidth_extraInitializers","_minWidth_initializers","_TableCell_disabled_accessor_storage","_minWidth_extraInitializers","_disabled_initializers","_TableCell_dimmed_accessor_storage","_disabled_extraInitializers","_dimmed_initializers","_TableCell__contextConsumer_accessor_storage","_dimmed_extraInitializers","__contextConsumer_initializers","ContextConsumer","tableContext","context","handleContextChange","dense","__classPrivateFieldGet","value","__classPrivateFieldSet","role","align","width","maxWidth","minWidth","disabled","dimmed","_contextConsumer","updated","changedProperties","super","has","style","setProperty","render","html","property","type","Boolean","reflect","String","__contextConsumer_decorators","state","__esDecorate","_dense_decorators","kind","name","static","private","access","obj","get","metadata","_metadata","_role_decorators","_align_decorators","_width_decorators","_maxWidth_decorators","_minWidth_decorators","_disabled_decorators","_dimmed_decorators","__contextConsumer_extraInitializers","_classDescriptor","_classDecorators","_classExtraInitializers","styles","unsafeCSS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmBaA,EAAS,yDADrBC,EAAc,kBACgBC,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,GAAAkD,IAvDnClB,EAAA,KAAAmB,EAAA,CAAA5C,MAAAvC,GAAAoF,EAAA,CAAAlB,KAAA,QAAAC,KAAAnE,EAAAmE,KAAAM,SAAAC,GAAA,KAAAW,iHACkBrF,EAAAsF,OAASC,EAAUD,GADxBjF,EAAAL,EAAAqF,MAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyndryl-design-system/shidoka-applications",
3
- "version": "2.109.6",
3
+ "version": "2.109.7",
4
4
  "description": "Shidoka Web Components for Applications",
5
5
  "license": "MIT",
6
6
  "main": "index.js",