@carbon/web-components 2.58.0-rc.0 → 2.58.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 (123) hide show
  1. package/es/components/accordion/accordion.scss.js +1 -1
  2. package/es/components/accordion/accordion.scss.js.map +1 -1
  3. package/es/components/ai-label/ai-label.scss.js +1 -1
  4. package/es/components/breadcrumb/breadcrumb.scss.js +1 -1
  5. package/es/components/button/button-set.d.ts +4 -0
  6. package/es/components/button/button-set.d.ts.map +1 -1
  7. package/es/components/button/button-set.js +4 -4
  8. package/es/components/button/button-set.js.map +1 -1
  9. package/es/components/button/button.scss.js +1 -1
  10. package/es/components/code-snippet/code-snippet.scss.js +1 -1
  11. package/es/components/combo-button/combo-button.scss.js +1 -1
  12. package/es/components/contained-list/contained-list.scss.js +1 -1
  13. package/es/components/content-switcher/content-switcher.scss.js +1 -1
  14. package/es/components/copy-button/copy-button.scss.js +1 -1
  15. package/es/components/data-table/data-table.scss.js +1 -1
  16. package/es/components/data-table/table-batch-actions.d.ts +8 -0
  17. package/es/components/data-table/table-batch-actions.d.ts.map +1 -1
  18. package/es/components/data-table/table-batch-actions.js +9 -8
  19. package/es/components/data-table/table-batch-actions.js.map +1 -1
  20. package/es/components/dialog/dialog.scss.js +1 -1
  21. package/es/components/file-uploader/file-uploader.scss.js +1 -1
  22. package/es/components/fluid-password-input/fluid-password-input.d.ts +1 -0
  23. package/es/components/fluid-password-input/fluid-password-input.d.ts.map +1 -1
  24. package/es/components/fluid-password-input/fluid-password-input.js +3 -2
  25. package/es/components/fluid-password-input/fluid-password-input.js.map +1 -1
  26. package/es/components/fluid-text-input/fluid-text-input.d.ts +1 -0
  27. package/es/components/fluid-text-input/fluid-text-input.d.ts.map +1 -1
  28. package/es/components/fluid-text-input/fluid-text-input.js +3 -2
  29. package/es/components/fluid-text-input/fluid-text-input.js.map +1 -1
  30. package/es/components/menu-button/menu-button.scss.js +1 -1
  31. package/es/components/modal/modal.scss.js +1 -1
  32. package/es/components/notification/actionable-notification.scss.js +1 -1
  33. package/es/components/notification/inline-notification.scss.js +1 -1
  34. package/es/components/notification/toast-notification.scss.js +1 -1
  35. package/es/components/overflow-menu/overflow-menu.d.ts +8 -0
  36. package/es/components/overflow-menu/overflow-menu.d.ts.map +1 -1
  37. package/es/components/overflow-menu/overflow-menu.js +10 -9
  38. package/es/components/overflow-menu/overflow-menu.js.map +1 -1
  39. package/es/components/overflow-menu/overflow-menu.scss.js +1 -1
  40. package/es/components/pagination/pagination.scss.js +1 -1
  41. package/es/components/pagination-nav/pagination-nav.scss.js +1 -1
  42. package/es/components/popover/popover.scss.js +1 -1
  43. package/es/components/progress-bar/progress-bar.d.ts +1 -0
  44. package/es/components/progress-bar/progress-bar.d.ts.map +1 -1
  45. package/es/components/progress-bar/progress-bar.js +4 -4
  46. package/es/components/progress-bar/progress-bar.js.map +1 -1
  47. package/es/components/progress-indicator/progress-indicator.scss.js +1 -1
  48. package/es/components/skip-to-content/skip-to-content.scss.js +1 -1
  49. package/es/components/slug/slug.scss.js +1 -1
  50. package/es/components/tabs/tabs.scss.js +1 -1
  51. package/es/components/tag/tag.scss.js +1 -1
  52. package/es/components/toggle-tip/toggletip.scss.js +1 -1
  53. package/es/components/tooltip/tooltip.scss.js +1 -1
  54. package/es/components/ui-shell/header.scss.js +1 -1
  55. package/es-custom/components/accordion/accordion.scss.js +1 -1
  56. package/es-custom/components/accordion/accordion.scss.js.map +1 -1
  57. package/es-custom/components/ai-label/ai-label.scss.js +1 -1
  58. package/es-custom/components/breadcrumb/breadcrumb.scss.js +1 -1
  59. package/es-custom/components/button/button-set.d.ts +4 -0
  60. package/es-custom/components/button/button-set.d.ts.map +1 -1
  61. package/es-custom/components/button/button-set.js +4 -4
  62. package/es-custom/components/button/button-set.js.map +1 -1
  63. package/es-custom/components/button/button.scss.js +1 -1
  64. package/es-custom/components/code-snippet/code-snippet.scss.js +1 -1
  65. package/es-custom/components/combo-button/combo-button.scss.js +1 -1
  66. package/es-custom/components/contained-list/contained-list.scss.js +1 -1
  67. package/es-custom/components/content-switcher/content-switcher.scss.js +1 -1
  68. package/es-custom/components/copy-button/copy-button.scss.js +1 -1
  69. package/es-custom/components/data-table/data-table.scss.js +1 -1
  70. package/es-custom/components/data-table/table-batch-actions.d.ts +8 -0
  71. package/es-custom/components/data-table/table-batch-actions.d.ts.map +1 -1
  72. package/es-custom/components/data-table/table-batch-actions.js +9 -8
  73. package/es-custom/components/data-table/table-batch-actions.js.map +1 -1
  74. package/es-custom/components/dialog/dialog.scss.js +1 -1
  75. package/es-custom/components/file-uploader/file-uploader.scss.js +1 -1
  76. package/es-custom/components/fluid-password-input/fluid-password-input.d.ts +1 -0
  77. package/es-custom/components/fluid-password-input/fluid-password-input.d.ts.map +1 -1
  78. package/es-custom/components/fluid-password-input/fluid-password-input.js +3 -2
  79. package/es-custom/components/fluid-password-input/fluid-password-input.js.map +1 -1
  80. package/es-custom/components/fluid-text-input/fluid-text-input.d.ts +1 -0
  81. package/es-custom/components/fluid-text-input/fluid-text-input.d.ts.map +1 -1
  82. package/es-custom/components/fluid-text-input/fluid-text-input.js +3 -2
  83. package/es-custom/components/fluid-text-input/fluid-text-input.js.map +1 -1
  84. package/es-custom/components/menu-button/menu-button.scss.js +1 -1
  85. package/es-custom/components/modal/modal.scss.js +1 -1
  86. package/es-custom/components/notification/actionable-notification.scss.js +1 -1
  87. package/es-custom/components/notification/inline-notification.scss.js +1 -1
  88. package/es-custom/components/notification/toast-notification.scss.js +1 -1
  89. package/es-custom/components/overflow-menu/overflow-menu.d.ts +8 -0
  90. package/es-custom/components/overflow-menu/overflow-menu.d.ts.map +1 -1
  91. package/es-custom/components/overflow-menu/overflow-menu.js +10 -9
  92. package/es-custom/components/overflow-menu/overflow-menu.js.map +1 -1
  93. package/es-custom/components/overflow-menu/overflow-menu.scss.js +1 -1
  94. package/es-custom/components/pagination/pagination.scss.js +1 -1
  95. package/es-custom/components/pagination-nav/pagination-nav.scss.js +1 -1
  96. package/es-custom/components/popover/popover.scss.js +1 -1
  97. package/es-custom/components/progress-bar/progress-bar.d.ts +1 -0
  98. package/es-custom/components/progress-bar/progress-bar.d.ts.map +1 -1
  99. package/es-custom/components/progress-bar/progress-bar.js +4 -4
  100. package/es-custom/components/progress-bar/progress-bar.js.map +1 -1
  101. package/es-custom/components/progress-indicator/progress-indicator.scss.js +1 -1
  102. package/es-custom/components/skip-to-content/skip-to-content.scss.js +1 -1
  103. package/es-custom/components/slug/slug.scss.js +1 -1
  104. package/es-custom/components/tabs/tabs.scss.js +1 -1
  105. package/es-custom/components/tag/tag.scss.js +1 -1
  106. package/es-custom/components/toggle-tip/toggletip.scss.js +1 -1
  107. package/es-custom/components/tooltip/tooltip.scss.js +1 -1
  108. package/es-custom/components/ui-shell/header.scss.js +1 -1
  109. package/lib/components/button/button-set.d.ts +4 -0
  110. package/lib/components/button/button-set.d.ts.map +1 -1
  111. package/lib/components/data-table/table-batch-actions.d.ts +8 -0
  112. package/lib/components/data-table/table-batch-actions.d.ts.map +1 -1
  113. package/lib/components/fluid-password-input/fluid-password-input.d.ts +1 -0
  114. package/lib/components/fluid-password-input/fluid-password-input.d.ts.map +1 -1
  115. package/lib/components/fluid-text-input/fluid-text-input.d.ts +1 -0
  116. package/lib/components/fluid-text-input/fluid-text-input.d.ts.map +1 -1
  117. package/lib/components/overflow-menu/overflow-menu.d.ts +8 -0
  118. package/lib/components/overflow-menu/overflow-menu.d.ts.map +1 -1
  119. package/lib/components/progress-bar/progress-bar.d.ts +1 -0
  120. package/lib/components/progress-bar/progress-bar.d.ts.map +1 -1
  121. package/package.json +6 -6
  122. package/scss/components/accordion/accordion.scss +32 -28
  123. package/scss/components/grid/grid-story.scss +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"button-set.js","names":["CDSButtonSetBase","styles","customElement"],"sources":["../../../src/components/button/button-set.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2020, 2024\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 { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { BUTTON_KIND } from './defs';\nimport styles from './button.scss?lit';\nimport { prefix } from '../../globals/settings';\nimport CDSButtonSetBase from './button-set-base';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Button set.\n *\n * @element cds-custom-button-set\n */\n@customElement(`${prefix}-button-set`)\nclass CDSButtonSet extends CDSButtonSetBase {\n /**\n * `true` if the buttons should be stacked. Only applies to the button-set variant.\n */\n @property({ type: Boolean, reflect: true })\n stacked = false;\n\n /**\n * Handler for @slotchange, set the first cds-custom-button to kind secondary and primary for the remaining ones\n *\n * @private\n */\n protected _handleSlotChange(event: Event) {\n const childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof CDSButtonSet).selectorItem\n )\n : false\n );\n\n childItems.forEach((elem, index) => {\n (elem as HTMLElement).setAttribute(\n 'kind',\n index === 0 ? BUTTON_KIND.SECONDARY : BUTTON_KIND.PRIMARY\n );\n });\n\n const update = new CustomEvent(`${prefix}-btn-set-update`, {\n bubbles: true,\n cancelable: true,\n composed: true,\n });\n\n this.dispatchEvent(update);\n }\n\n /**\n * When a button within a button-set is focused, hide the margin on both sides\n * of the focused button, by applying the appropriate styles to its sibling\n *\n * @private\n */\n private _hideSiblingMargin = () => {\n const slot = this.shadowRoot?.querySelector('slot');\n if (!slot) return;\n const items = slot\n .assignedElements()\n .filter(\n (el) => el.tagName.toLowerCase() === `${prefix}-button`\n ) as HTMLElement[];\n\n const focusedIndex = items.findIndex((el) => el.matches(':focus-within'));\n\n items.forEach((el, idx) => {\n const shouldHide =\n focusedIndex >= 0 && (idx === focusedIndex || idx === focusedIndex + 1);\n el.toggleAttribute('hide-margin', shouldHide);\n });\n };\n\n connectedCallback() {\n super.connectedCallback?.();\n this.addEventListener('focusin', this._hideSiblingMargin);\n this.addEventListener('focusout', this._hideSiblingMargin);\n }\n\n render() {\n const { stacked } = this;\n const defaultClasses = {\n [`${prefix}--btn-set--stacked`]: stacked,\n [`${prefix}--btn-set`]: true,\n };\n const classes = classMap(defaultClasses);\n\n return html`<slot\n class=\"${classes}\"\n part=\"button-set\"\n @slotchange=\"${this._handleSlotChange}\"></slot>`;\n }\n /**\n * A selector that will return the child items.\n */\n static get selectorItem() {\n return `${prefix}-button`;\n }\n\n static styles = styles;\n}\n\nexport default CDSButtonSet;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAA,eAAA,MACM,qBAAqBA,wBAAiB;;;iBAKhC;kCAwCyB;GACjC,MAAM,OAAO,KAAK,YAAY,cAAc,MAAM;GAClD,IAAI,CAAC,MAAM;GACX,MAAM,QAAQ,KACX,iBAAiB,CAAC,CAClB,QACE,OAAO,GAAG,QAAQ,YAAY,MAAM,YACvC;GAEF,MAAM,eAAe,MAAM,WAAW,OAAO,GAAG,QAAQ,eAAe,CAAC;GAExE,MAAM,SAAS,IAAI,QAAQ;IACzB,MAAM,aACJ,gBAAgB,MAAM,QAAQ,gBAAgB,QAAQ,eAAe;IACvE,GAAG,gBAAgB,eAAe,UAAU;GAC9C,CAAC;EACH;;;;;;;CAjDA,kBAA4B,OAAc;EAWxC,MAV0B,OACvB,cAAc,CAAC,CACf,QAAQ,SACN,KAAqB,YAAY,KAAA,IAC7B,KAAqB,QACnB,KAAK,YAAoC,YAC5C,IACA,KAGC,CAAC,CAAC,SAAS,MAAM,UAAU;GAClC,KAAsB,aACpB,QACA,UAAU,IAAA,cAAA,SACZ;EACF,CAAC;EAED,MAAM,SAAS,IAAI,YAAY,sBAA4B;GACzD,SAAS;GACT,YAAY;GACZ,UAAU;EACZ,CAAC;EAED,KAAK,cAAc,MAAM;CAC3B;CA0BA,oBAAoB;EAClB,MAAM,oBAAoB;EAC1B,KAAK,iBAAiB,WAAW,KAAK,kBAAkB;EACxD,KAAK,iBAAiB,YAAY,KAAK,kBAAkB;CAC3D;CAEA,SAAS;EACP,MAAM,EAAE,YAAY;EAOpB,OAAO,IAAI;eAFK,SAAS;IAHtB,0BAAgC;IAChC,iBAAuB;EAEY,CAGrB,EAAE;;qBAEF,KAAK,kBAAkB;CAC1C;;;;CAIA,WAAW,eAAe;EACxB,OAAO;CACT;;gBAEgBC;;AAClB;YAtFG,SAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,aAAA,WAAA,WAAA,KAAA,CAAA;2BAL3CC,cAAc,gBAAsB,CAAA,GAAA,YAAA;AA6FrC,IAAA,qBAAe"}
1
+ {"version":3,"file":"button-set.js","names":["CDSButtonSetBase","styles","customElement"],"sources":["../../../src/components/button/button-set.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2020, 2024\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 { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { BUTTON_KIND } from './defs';\nimport styles from './button.scss?lit';\nimport { prefix } from '../../globals/settings';\nimport CDSButtonSetBase from './button-set-base';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Button set.\n *\n * @element cds-custom-button-set\n */\n@customElement(`${prefix}-button-set`)\nclass CDSButtonSet extends CDSButtonSetBase {\n /**\n * The slot element\n */\n @query('slot')\n private _slotElement?: HTMLSlotElement;\n\n /**\n * `true` if the buttons should be stacked. Only applies to the button-set variant.\n */\n @property({ type: Boolean, reflect: true })\n stacked = false;\n\n /**\n * Handler for @slotchange, set the first cds-custom-button to kind secondary and primary for the remaining ones\n *\n * @private\n */\n protected _handleSlotChange(event: Event) {\n const childItems = (event.target as HTMLSlotElement)\n .assignedNodes()\n .filter((elem) =>\n (elem as HTMLElement).matches !== undefined\n ? (elem as HTMLElement).matches(\n (this.constructor as typeof CDSButtonSet).selectorItem\n )\n : false\n );\n\n childItems.forEach((elem, index) => {\n (elem as HTMLElement).setAttribute(\n 'kind',\n index === 0 ? BUTTON_KIND.SECONDARY : BUTTON_KIND.PRIMARY\n );\n });\n\n const update = new CustomEvent(`${prefix}-btn-set-update`, {\n bubbles: true,\n cancelable: true,\n composed: true,\n });\n\n this.dispatchEvent(update);\n }\n\n /**\n * When a button within a button-set is focused, hide the margin on both sides\n * of the focused button, by applying the appropriate styles to its sibling\n *\n * @private\n */\n private _hideSiblingMargin = () => {\n if (!this._slotElement) return;\n const items = this._slotElement\n .assignedElements()\n .filter(\n (el) => el.tagName.toLowerCase() === `${prefix}-button`\n ) as HTMLElement[];\n\n const focusedIndex = items.findIndex((el) => el.matches(':focus-within'));\n\n items.forEach((el, idx) => {\n const shouldHide =\n focusedIndex >= 0 && (idx === focusedIndex || idx === focusedIndex + 1);\n el.toggleAttribute('hide-margin', shouldHide);\n });\n };\n\n connectedCallback() {\n super.connectedCallback?.();\n this.addEventListener('focusin', this._hideSiblingMargin);\n this.addEventListener('focusout', this._hideSiblingMargin);\n }\n\n render() {\n const { stacked } = this;\n const defaultClasses = {\n [`${prefix}--btn-set--stacked`]: stacked,\n [`${prefix}--btn-set`]: true,\n };\n const classes = classMap(defaultClasses);\n\n return html`<slot\n class=\"${classes}\"\n part=\"button-set\"\n @slotchange=\"${this._handleSlotChange}\"></slot>`;\n }\n /**\n * A selector that will return the child items.\n */\n static get selectorItem() {\n return `${prefix}-button`;\n }\n\n static styles = styles;\n}\n\nexport default CDSButtonSet;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAA,eAAA,MACM,qBAAqBA,wBAAiB;;;iBAWhC;kCAwCyB;GACjC,IAAI,CAAC,KAAK,cAAc;GACxB,MAAM,QAAQ,KAAK,aAChB,iBAAiB,CAAC,CAClB,QACE,OAAO,GAAG,QAAQ,YAAY,MAAM,YACvC;GAEF,MAAM,eAAe,MAAM,WAAW,OAAO,GAAG,QAAQ,eAAe,CAAC;GAExE,MAAM,SAAS,IAAI,QAAQ;IACzB,MAAM,aACJ,gBAAgB,MAAM,QAAQ,gBAAgB,QAAQ,eAAe;IACvE,GAAG,gBAAgB,eAAe,UAAU;GAC9C,CAAC;EACH;;;;;;;CAhDA,kBAA4B,OAAc;EAWxC,MAV0B,OACvB,cAAc,CAAC,CACf,QAAQ,SACN,KAAqB,YAAY,KAAA,IAC7B,KAAqB,QACnB,KAAK,YAAoC,YAC5C,IACA,KAGC,CAAC,CAAC,SAAS,MAAM,UAAU;GAClC,KAAsB,aACpB,QACA,UAAU,IAAA,cAAA,SACZ;EACF,CAAC;EAED,MAAM,SAAS,IAAI,YAAY,sBAA4B;GACzD,SAAS;GACT,YAAY;GACZ,UAAU;EACZ,CAAC;EAED,KAAK,cAAc,MAAM;CAC3B;CAyBA,oBAAoB;EAClB,MAAM,oBAAoB;EAC1B,KAAK,iBAAiB,WAAW,KAAK,kBAAkB;EACxD,KAAK,iBAAiB,YAAY,KAAK,kBAAkB;CAC3D;CAEA,SAAS;EACP,MAAM,EAAE,YAAY;EAOpB,OAAO,IAAI;eAFK,SAAS;IAHtB,0BAAgC;IAChC,iBAAuB;EAEY,CAGrB,EAAE;;qBAEF,KAAK,kBAAkB;CAC1C;;;;CAIA,WAAW,eAAe;EACxB,OAAO;CACT;;gBAEgBC;;AAClB;YA3FG,MAAM,MAAM,CAAA,GAAA,aAAA,WAAA,gBAAA,KAAA,CAAA;YAMZ,SAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,aAAA,WAAA,WAAA,KAAA,CAAA;2BAX3CC,cAAc,gBAAsB,CAAA,GAAA,YAAA;AAkGrC,IAAA,qBAAe"}