@carbon/web-components 2.51.1 → 2.52.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.
Files changed (120) hide show
  1. package/custom-elements.json +552 -0
  2. package/es/components/accordion/accordion.scss.js +1 -1
  3. package/es/components/accordion/accordion.scss.js.map +1 -1
  4. package/es/components/checkbox/checkbox.js +8 -2
  5. package/es/components/checkbox/checkbox.js.map +1 -1
  6. package/es/components/combo-box/combo-box.d.ts.map +1 -1
  7. package/es/components/combo-box/combo-box.js +2 -6
  8. package/es/components/combo-box/combo-box.js.map +1 -1
  9. package/es/components/contained-list/contained-list-item.d.ts +1 -1
  10. package/es/components/contained-list/contained-list-item.d.ts.map +1 -1
  11. package/es/components/contained-list/contained-list-item.js +3 -11
  12. package/es/components/contained-list/contained-list-item.js.map +1 -1
  13. package/es/components/contained-list/contained-list.scss.js +1 -1
  14. package/es/components/contained-list/contained-list.scss.js.map +1 -1
  15. package/es/components/dropdown/dropdown.d.ts +4 -0
  16. package/es/components/dropdown/dropdown.d.ts.map +1 -1
  17. package/es/components/dropdown/dropdown.js +3 -0
  18. package/es/components/dropdown/dropdown.js.map +1 -1
  19. package/es/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
  20. package/es/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
  21. package/es/components/fluid-dropdown/fluid-dropdown-skeleton.js +47 -0
  22. package/es/components/fluid-dropdown/fluid-dropdown-skeleton.js.map +1 -0
  23. package/es/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
  24. package/es/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
  25. package/es/components/fluid-dropdown/fluid-dropdown.js +58 -0
  26. package/es/components/fluid-dropdown/fluid-dropdown.js.map +1 -0
  27. package/es/components/fluid-dropdown/fluid-dropdown.scss.js +15 -0
  28. package/es/components/fluid-dropdown/fluid-dropdown.scss.js.map +1 -0
  29. package/es/components/fluid-dropdown/index.d.ts +9 -0
  30. package/es/components/fluid-dropdown/index.d.ts.map +1 -0
  31. package/es/components/fluid-dropdown/index.js +9 -0
  32. package/es/components/layout/index.d.ts +10 -0
  33. package/es/components/layout/index.d.ts.map +1 -0
  34. package/es/components/layout/index.js +11 -0
  35. package/es/components/layout/layout-constraint.d.ts +24 -0
  36. package/es/components/layout/layout-constraint.d.ts.map +1 -0
  37. package/es/components/layout/layout-constraint.js +52 -0
  38. package/es/components/layout/layout-constraint.js.map +1 -0
  39. package/es/components/layout/layout.d.ts +34 -0
  40. package/es/components/layout/layout.d.ts.map +1 -0
  41. package/es/components/layout/layout.js +53 -0
  42. package/es/components/layout/layout.js.map +1 -0
  43. package/es/components/layout/layout.scss.js +15 -0
  44. package/es/components/layout/layout.scss.js.map +1 -0
  45. package/es/components/list/list.scss.js +1 -1
  46. package/es/index.d.ts +2 -0
  47. package/es/index.d.ts.map +1 -1
  48. package/es/index.js +3 -1
  49. package/es-custom/components/accordion/accordion.scss.js +1 -1
  50. package/es-custom/components/accordion/accordion.scss.js.map +1 -1
  51. package/es-custom/components/checkbox/checkbox.js +8 -2
  52. package/es-custom/components/checkbox/checkbox.js.map +1 -1
  53. package/es-custom/components/combo-box/combo-box.d.ts.map +1 -1
  54. package/es-custom/components/combo-box/combo-box.js +2 -6
  55. package/es-custom/components/combo-box/combo-box.js.map +1 -1
  56. package/es-custom/components/contained-list/contained-list-item.d.ts +1 -1
  57. package/es-custom/components/contained-list/contained-list-item.d.ts.map +1 -1
  58. package/es-custom/components/contained-list/contained-list-item.js +3 -11
  59. package/es-custom/components/contained-list/contained-list-item.js.map +1 -1
  60. package/es-custom/components/contained-list/contained-list.scss.js +1 -1
  61. package/es-custom/components/contained-list/contained-list.scss.js.map +1 -1
  62. package/es-custom/components/dropdown/dropdown.d.ts +4 -0
  63. package/es-custom/components/dropdown/dropdown.d.ts.map +1 -1
  64. package/es-custom/components/dropdown/dropdown.js +3 -0
  65. package/es-custom/components/dropdown/dropdown.js.map +1 -1
  66. package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
  67. package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
  68. package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.js +47 -0
  69. package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.js.map +1 -0
  70. package/es-custom/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
  71. package/es-custom/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
  72. package/es-custom/components/fluid-dropdown/fluid-dropdown.js +58 -0
  73. package/es-custom/components/fluid-dropdown/fluid-dropdown.js.map +1 -0
  74. package/es-custom/components/fluid-dropdown/fluid-dropdown.scss.js +15 -0
  75. package/es-custom/components/fluid-dropdown/fluid-dropdown.scss.js.map +1 -0
  76. package/es-custom/components/fluid-dropdown/index.d.ts +9 -0
  77. package/es-custom/components/fluid-dropdown/index.d.ts.map +1 -0
  78. package/es-custom/components/fluid-dropdown/index.js +9 -0
  79. package/es-custom/components/layout/index.d.ts +10 -0
  80. package/es-custom/components/layout/index.d.ts.map +1 -0
  81. package/es-custom/components/layout/index.js +11 -0
  82. package/es-custom/components/layout/layout-constraint.d.ts +24 -0
  83. package/es-custom/components/layout/layout-constraint.d.ts.map +1 -0
  84. package/es-custom/components/layout/layout-constraint.js +52 -0
  85. package/es-custom/components/layout/layout-constraint.js.map +1 -0
  86. package/es-custom/components/layout/layout.d.ts +34 -0
  87. package/es-custom/components/layout/layout.d.ts.map +1 -0
  88. package/es-custom/components/layout/layout.js +53 -0
  89. package/es-custom/components/layout/layout.js.map +1 -0
  90. package/es-custom/components/layout/layout.scss.js +15 -0
  91. package/es-custom/components/layout/layout.scss.js.map +1 -0
  92. package/es-custom/components/list/list.scss.js +1 -1
  93. package/es-custom/index.d.ts +2 -0
  94. package/es-custom/index.d.ts.map +1 -1
  95. package/es-custom/index.js +3 -1
  96. package/lib/components/combo-box/combo-box.d.ts.map +1 -1
  97. package/lib/components/contained-list/contained-list-item.d.ts +1 -1
  98. package/lib/components/contained-list/contained-list-item.d.ts.map +1 -1
  99. package/lib/components/dropdown/dropdown.d.ts +4 -0
  100. package/lib/components/dropdown/dropdown.d.ts.map +1 -1
  101. package/lib/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
  102. package/lib/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
  103. package/lib/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
  104. package/lib/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
  105. package/lib/components/fluid-dropdown/index.d.ts +9 -0
  106. package/lib/components/fluid-dropdown/index.d.ts.map +1 -0
  107. package/lib/components/layout/index.d.ts +10 -0
  108. package/lib/components/layout/index.d.ts.map +1 -0
  109. package/lib/components/layout/layout-constraint.d.ts +24 -0
  110. package/lib/components/layout/layout-constraint.d.ts.map +1 -0
  111. package/lib/components/layout/layout.d.ts +34 -0
  112. package/lib/components/layout/layout.d.ts.map +1 -0
  113. package/lib/index.d.ts +2 -0
  114. package/lib/index.d.ts.map +1 -1
  115. package/package.json +6 -6
  116. package/scss/components/accordion/accordion.scss +25 -0
  117. package/scss/components/contained-list/contained-list.scss +13 -1
  118. package/scss/components/fluid-dropdown/fluid-dropdown.scss +234 -0
  119. package/scss/components/layout/layout.scss +21 -0
  120. package/telemetry.yml +32 -0
@@ -15,7 +15,7 @@ import { classMap } from "lit/directives/class-map.js";
15
15
 
16
16
  //#region src/components/contained-list/contained-list-item.ts
17
17
  /**
18
- * Copyright IBM Corp. 2022, 2025
18
+ * Copyright IBM Corp. 2022, 2026
19
19
  *
20
20
  * This source code is licensed under the Apache-2.0 license found in the
21
21
  * LICENSE file in the root directory of this source tree.
@@ -71,16 +71,8 @@ let CDSContainedListItem = class CDSContainedListItem extends LitElement {
71
71
  });
72
72
  const contentClasses = `${prefix}--contained-list-item__content`;
73
73
  const content = html`
74
- ${_hasIcon ? html`
75
- <div class="${prefix}--contained-list-item__icon">
76
- <slot
77
- name="icon"
78
- @slotchange="${this._handleIconSlotChange}"></slot>
79
- </div>
80
- ` : html`<slot
81
- name="icon"
82
- @slotchange="${this._handleIconSlotChange}"></slot>`}
83
- <div><slot></slot></div>
74
+ <slot name="icon" @slotchange="${this._handleIconSlotChange}"></slot>
75
+ <slot></slot>
84
76
  `;
85
77
  return html`
86
78
  <div class="${classes}">
@@ -1 +1 @@
1
- {"version":3,"file":"contained-list-item.js","names":["styles","customElement"],"sources":["../../../src/components/contained-list/contained-list-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2022, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './contained-list.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Contained list item.\n *\n * @element cds-custom-contained-list-item\n * @slot - The content of the list item\n * @slot icon - The icon slot for rendering an icon\n * @slot action - The action slot for interactive elements\n * @fires cds-custom-contained-list-item-click - Fires when clickable item is clicked\n */\n@customElement(`${prefix}-contained-list-item`)\nclass CDSContainedListItem extends LitElement {\n /**\n * Whether this item is clickable\n */\n @property({ type: Boolean, reflect: true })\n clickable = false;\n\n /**\n * Whether this item is disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Handles slot change for icon\n */\n private _handleIconSlotChange({ target }: Event) {\n const slot = target as HTMLSlotElement;\n const hasIcon = slot.assignedElements().length > 0;\n this._hasIcon = hasIcon;\n this.requestUpdate();\n }\n\n private _hasIcon = false;\n\n /**\n * Handles click event\n */\n private _handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n const { eventClick } = this.constructor as typeof CDSContainedListItem;\n this.dispatchEvent(\n new CustomEvent(eventClick, {\n bubbles: true,\n composed: true,\n detail: { item: this },\n })\n );\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n }\n\n render() {\n const { disabled, clickable, _hasIcon } = this;\n\n const classes = classMap({\n [`${prefix}--contained-list-item`]: true,\n [`${prefix}--contained-list-item--clickable`]: clickable,\n [`${prefix}--contained-list-item--with-icon`]: _hasIcon,\n });\n\n const contentClasses = `${prefix}--contained-list-item__content`;\n\n const content = html`\n ${_hasIcon\n ? html`\n <div class=\"${prefix}--contained-list-item__icon\">\n <slot\n name=\"icon\"\n @slotchange=\"${this._handleIconSlotChange}\"></slot>\n </div>\n `\n : html`<slot\n name=\"icon\"\n @slotchange=\"${this._handleIconSlotChange}\"></slot>`}\n <div><slot></slot></div>\n `;\n\n return html`\n <div class=\"${classes}\">\n ${clickable\n ? html`\n <button\n class=\"${contentClasses}\"\n type=\"button\"\n ?disabled=\"${disabled}\"\n @click=\"${this._handleClick}\">\n ${content}\n </button>\n `\n : html`<div class=\"${contentClasses}\">${content}</div>`}\n <div class=\"${prefix}--contained-list-item__action\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The name of the custom event fired when a clickable item is clicked\n */\n static get eventClick() {\n return `${prefix}-contained-list-item-click`;\n }\n\n static styles = styles;\n}\n\nexport default CDSContainedListItem;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,iCACM,6BAA6B,WAAW;;;mBAKhC;kBAMD;kBAYQ;;;;;CAPnB,AAAQ,sBAAsB,EAAE,UAAiB;AAG/C,OAAK,WAFQ,OACQ,kBAAkB,CAAC,SAAS;AAEjD,OAAK,eAAe;;;;;CAQtB,AAAQ,aAAa,OAAmB;AACtC,MAAI,KAAK,UAAU;AACjB,SAAM,gBAAgB;AACtB;;EAGF,MAAM,EAAE,eAAe,KAAK;AAC5B,OAAK,cACH,IAAI,YAAY,YAAY;GAC1B,SAAS;GACT,UAAU;GACV,QAAQ,EAAE,MAAM,MAAM;GACvB,CAAC,CACH;;CAGH,oBAAoB;AAClB,QAAM,mBAAmB;AACzB,MAAI,CAAC,KAAK,aAAa,OAAO,CAC5B,MAAK,aAAa,QAAQ,WAAW;;CAIzC,SAAS;EACP,MAAM,EAAE,UAAU,WAAW,aAAa;EAE1C,MAAM,UAAU,SAAS;IACtB,GAAG,OAAO,yBAAyB;IACnC,GAAG,OAAO,oCAAoC;IAC9C,GAAG,OAAO,oCAAoC;GAChD,CAAC;EAEF,MAAM,iBAAiB,GAAG,OAAO;EAEjC,MAAM,UAAU,IAAI;QAChB,WACE,IAAI;0BACY,OAAO;;;+BAGF,KAAK,sBAAsB;;cAGhD,IAAI;;2BAEa,KAAK,sBAAsB,WAAW;;;AAI7D,SAAO,IAAI;oBACK,QAAQ;UAClB,YACE,IAAI;;yBAES,eAAe;;6BAEX,SAAS;0BACZ,KAAK,aAAa;kBAC1B,QAAQ;;gBAGd,IAAI,eAAe,eAAe,IAAI,QAAQ,QAAQ;sBAC5C,OAAO;;;;;;;;;CAU3B,WAAW,aAAa;AACtB,SAAO,GAAG,OAAO;;;gBAGHA;;;YApGf,SAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC;YAM1C,SAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC;mCAX5CC,cAAc,GAAG,OAAO,sBAAsB;AA4G/C,kCAAe"}
1
+ {"version":3,"file":"contained-list-item.js","names":["styles","customElement"],"sources":["../../../src/components/contained-list/contained-list-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2022, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './contained-list.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Contained list item.\n *\n * @element cds-custom-contained-list-item\n * @slot - The content of the list item\n * @slot icon - The icon slot for rendering an icon\n * @slot action - The action slot for interactive elements\n * @fires cds-custom-contained-list-item-click - Fires when clickable item is clicked\n */\n@customElement(`${prefix}-contained-list-item`)\nclass CDSContainedListItem extends LitElement {\n /**\n * Whether this item is clickable\n */\n @property({ type: Boolean, reflect: true })\n clickable = false;\n\n /**\n * Whether this item is disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Handles slot change for icon\n */\n private _handleIconSlotChange({ target }: Event) {\n const slot = target as HTMLSlotElement;\n const hasIcon = slot.assignedElements().length > 0;\n this._hasIcon = hasIcon;\n this.requestUpdate();\n }\n\n private _hasIcon = false;\n\n /**\n * Handles click event\n */\n private _handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n const { eventClick } = this.constructor as typeof CDSContainedListItem;\n this.dispatchEvent(\n new CustomEvent(eventClick, {\n bubbles: true,\n composed: true,\n detail: { item: this },\n })\n );\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n }\n\n render() {\n const { disabled, clickable, _hasIcon } = this;\n\n const classes = classMap({\n [`${prefix}--contained-list-item`]: true,\n [`${prefix}--contained-list-item--clickable`]: clickable,\n [`${prefix}--contained-list-item--with-icon`]: _hasIcon,\n });\n\n const contentClasses = `${prefix}--contained-list-item__content`;\n\n const content = html`\n <slot name=\"icon\" @slotchange=\"${this._handleIconSlotChange}\"></slot>\n <slot></slot>\n `;\n\n return html`\n <div class=\"${classes}\">\n ${clickable\n ? html`\n <button\n class=\"${contentClasses}\"\n type=\"button\"\n ?disabled=\"${disabled}\"\n @click=\"${this._handleClick}\">\n ${content}\n </button>\n `\n : html`<div class=\"${contentClasses}\">${content}</div>`}\n <div class=\"${prefix}--contained-list-item__action\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The name of the custom event fired when a clickable item is clicked\n */\n static get eventClick() {\n return `${prefix}-contained-list-item-click`;\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