@pine-ds/core 3.5.2 → 3.6.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 (175) hide show
  1. package/components/mock-pds-modal.js +9 -4
  2. package/components/mock-pds-modal.js.map +1 -1
  3. package/components/pds-box2.js +132 -2
  4. package/components/pds-box2.js.map +1 -1
  5. package/components/pds-button2.js +51 -2
  6. package/components/pds-button2.js.map +1 -1
  7. package/components/pds-modal-content.js +128 -11
  8. package/components/pds-modal-content.js.map +1 -1
  9. package/components/pds-modal.js +13 -3
  10. package/components/pds-modal.js.map +1 -1
  11. package/components/pds-textarea.js +111 -7
  12. package/components/pds-textarea.js.map +1 -1
  13. package/components/pds-toast.js +3 -3
  14. package/components/pds-tooltip.js +2 -2
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/mock-pds-modal.cjs.entry.js +8 -4
  17. package/dist/cjs/mock-pds-modal.cjs.entry.js.map +1 -1
  18. package/dist/cjs/mock-pds-modal.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pds-box.cjs.entry.js +67 -2
  20. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  21. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  22. package/dist/cjs/pds-button.cjs.entry.js +50 -1
  23. package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
  24. package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
  25. package/dist/cjs/pds-modal-content.cjs.entry.js +128 -11
  26. package/dist/cjs/pds-modal-content.cjs.entry.js.map +1 -1
  27. package/dist/cjs/pds-modal-content.entry.cjs.js.map +1 -1
  28. package/dist/cjs/pds-modal.cjs.entry.js +12 -3
  29. package/dist/cjs/pds-modal.cjs.entry.js.map +1 -1
  30. package/dist/cjs/pds-modal.entry.cjs.js.map +1 -1
  31. package/dist/cjs/pds-textarea.cjs.entry.js +108 -6
  32. package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
  33. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  34. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  35. package/dist/cjs/pds-tooltip.cjs.entry.js +2 -2
  36. package/dist/cjs/pine-core.cjs.js +1 -1
  37. package/dist/collection/components/pds-box/pds-box.css +1325 -0
  38. package/dist/collection/components/pds-box/pds-box.js +1913 -148
  39. package/dist/collection/components/pds-box/pds-box.js.map +1 -1
  40. package/dist/collection/components/pds-button/pds-button.js +59 -1
  41. package/dist/collection/components/pds-button/pds-button.js.map +1 -1
  42. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +4 -6
  43. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +128 -11
  44. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js.map +1 -1
  45. package/dist/collection/components/pds-modal/pds-modal.css +42 -1
  46. package/dist/collection/components/pds-modal/pds-modal.js +34 -2
  47. package/dist/collection/components/pds-modal/pds-modal.js.map +1 -1
  48. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +245 -0
  49. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +30 -3
  50. package/dist/collection/components/pds-modal/test/mock-pds-modal.js.map +1 -1
  51. package/dist/collection/components/pds-textarea/pds-textarea.css +51 -11
  52. package/dist/collection/components/pds-textarea/pds-textarea.js +127 -4
  53. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  54. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +13 -0
  55. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  56. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  57. package/dist/docs.json +3988 -380
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/esm/mock-pds-modal.entry.js +8 -4
  60. package/dist/esm/mock-pds-modal.entry.js.map +1 -1
  61. package/dist/esm/pds-box.entry.js +67 -2
  62. package/dist/esm/pds-box.entry.js.map +1 -1
  63. package/dist/esm/pds-button.entry.js +50 -1
  64. package/dist/esm/pds-button.entry.js.map +1 -1
  65. package/dist/esm/pds-modal-content.entry.js +128 -11
  66. package/dist/esm/pds-modal-content.entry.js.map +1 -1
  67. package/dist/esm/pds-modal.entry.js +12 -3
  68. package/dist/esm/pds-modal.entry.js.map +1 -1
  69. package/dist/esm/pds-textarea.entry.js +108 -6
  70. package/dist/esm/pds-textarea.entry.js.map +1 -1
  71. package/dist/esm/pds-toast.entry.js +3 -3
  72. package/dist/esm/pds-tooltip.entry.js +2 -2
  73. package/dist/esm/pine-core.js +1 -1
  74. package/dist/esm-es5/loader.js +1 -1
  75. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  76. package/dist/esm-es5/mock-pds-modal.entry.js.map +1 -1
  77. package/dist/esm-es5/pds-box.entry.js +1 -1
  78. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  79. package/dist/esm-es5/pds-button.entry.js +1 -1
  80. package/dist/esm-es5/pds-button.entry.js.map +1 -1
  81. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  82. package/dist/esm-es5/pds-modal-content.entry.js.map +1 -1
  83. package/dist/esm-es5/pds-modal.entry.js +1 -1
  84. package/dist/esm-es5/pds-modal.entry.js.map +1 -1
  85. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  86. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  87. package/dist/esm-es5/pds-toast.entry.js +1 -1
  88. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  89. package/dist/esm-es5/pine-core.js +1 -1
  90. package/dist/pine-core/mock-pds-modal.entry.esm.js.map +1 -1
  91. package/dist/pine-core/p-318fd0cf.entry.js +2 -0
  92. package/dist/pine-core/p-318fd0cf.entry.js.map +1 -0
  93. package/dist/pine-core/{p-c4d6fe50.system.entry.js → p-346561a6.system.entry.js} +2 -2
  94. package/dist/pine-core/p-346561a6.system.entry.js.map +1 -0
  95. package/dist/pine-core/p-3gYSFJIn.system.js.map +1 -0
  96. package/dist/pine-core/{p-IG5YumI3.system.js.map → p-3pEJO0vO.system.js.map} +1 -1
  97. package/dist/pine-core/p-41d1b164.entry.js +2 -0
  98. package/dist/pine-core/p-41d1b164.entry.js.map +1 -0
  99. package/dist/pine-core/{p-02326ac3.entry.js → p-4c81420c.entry.js} +2 -2
  100. package/dist/pine-core/p-52cb152b.system.entry.js +2 -0
  101. package/dist/pine-core/p-52cb152b.system.entry.js.map +1 -0
  102. package/dist/pine-core/p-540cfd70.entry.js +2 -0
  103. package/dist/pine-core/p-540cfd70.entry.js.map +1 -0
  104. package/dist/pine-core/{p-11d4036e.entry.js → p-5f5b19f4.entry.js} +2 -2
  105. package/dist/pine-core/p-6d4d4705.system.entry.js +2 -0
  106. package/dist/pine-core/p-6d4d4705.system.entry.js.map +1 -0
  107. package/dist/pine-core/{p-68b5665a.entry.js → p-84949a12.entry.js} +2 -2
  108. package/dist/pine-core/p-84949a12.entry.js.map +1 -0
  109. package/dist/pine-core/{p-7a95a90f.system.entry.js → p-8726c99d.system.entry.js} +2 -2
  110. package/dist/pine-core/{p-2kXtbFXu.system.js.map → p-BZoPY2dP.system.js.map} +1 -1
  111. package/dist/pine-core/p-C0zqu7Gr.system.js.map +1 -0
  112. package/dist/pine-core/p-CHJgq_z7.system.js.map +1 -0
  113. package/dist/pine-core/p-Co5XZmTN.system.js.map +1 -0
  114. package/dist/pine-core/p-Czoq9yJM.system.js.map +1 -0
  115. package/dist/pine-core/p-De9tROL-.system.js +1 -1
  116. package/dist/pine-core/p-WkrM7Vv0.system.js.map +1 -0
  117. package/dist/pine-core/p-a9895385.system.entry.js +2 -0
  118. package/dist/pine-core/p-a9895385.system.entry.js.map +1 -0
  119. package/dist/pine-core/p-c0df3222.entry.js +2 -0
  120. package/dist/pine-core/p-c0df3222.entry.js.map +1 -0
  121. package/dist/pine-core/{p-884b9ae6.system.entry.js → p-d8d8fe07.system.entry.js} +2 -2
  122. package/dist/pine-core/p-dc19ce6c.system.entry.js +2 -0
  123. package/dist/pine-core/p-dc19ce6c.system.entry.js.map +1 -0
  124. package/dist/pine-core/p-e08f492a.entry.js +2 -0
  125. package/dist/pine-core/p-e08f492a.entry.js.map +1 -0
  126. package/dist/pine-core/p-fcb39155.system.entry.js +2 -0
  127. package/dist/pine-core/p-fcb39155.system.entry.js.map +1 -0
  128. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  129. package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
  130. package/dist/pine-core/pds-modal-content.entry.esm.js.map +1 -1
  131. package/dist/pine-core/pds-modal.entry.esm.js.map +1 -1
  132. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  133. package/dist/pine-core/pine-core.esm.js +1 -1
  134. package/dist/types/components/pds-box/pds-box.d.ts +315 -0
  135. package/dist/types/components/pds-button/pds-button.d.ts +4 -0
  136. package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +18 -1
  137. package/dist/types/components/pds-modal/pds-modal.d.ts +5 -0
  138. package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +5 -0
  139. package/dist/types/components/pds-textarea/pds-textarea.d.ts +20 -0
  140. package/dist/types/components.d.ts +660 -2
  141. package/hydrate/index.js +448 -34
  142. package/hydrate/index.mjs +448 -34
  143. package/package.json +2 -2
  144. package/dist/pine-core/p-007b61e9.system.entry.js +0 -2
  145. package/dist/pine-core/p-007b61e9.system.entry.js.map +0 -1
  146. package/dist/pine-core/p-0485aa93.system.entry.js +0 -2
  147. package/dist/pine-core/p-0485aa93.system.entry.js.map +0 -1
  148. package/dist/pine-core/p-2186e5d4.system.entry.js +0 -2
  149. package/dist/pine-core/p-2186e5d4.system.entry.js.map +0 -1
  150. package/dist/pine-core/p-54061a33.entry.js +0 -2
  151. package/dist/pine-core/p-54061a33.entry.js.map +0 -1
  152. package/dist/pine-core/p-68b5665a.entry.js.map +0 -1
  153. package/dist/pine-core/p-96a89cd5.system.entry.js +0 -2
  154. package/dist/pine-core/p-96a89cd5.system.entry.js.map +0 -1
  155. package/dist/pine-core/p-Bv5PJxD8.system.js.map +0 -1
  156. package/dist/pine-core/p-CD_nPb2F.system.js.map +0 -1
  157. package/dist/pine-core/p-DJekRkSL.system.js.map +0 -1
  158. package/dist/pine-core/p-DNYl_6t_.system.js.map +0 -1
  159. package/dist/pine-core/p-Dt10r3RZ.system.js.map +0 -1
  160. package/dist/pine-core/p-IIl2cTlj.system.js.map +0 -1
  161. package/dist/pine-core/p-a24c46e4.entry.js +0 -2
  162. package/dist/pine-core/p-a24c46e4.entry.js.map +0 -1
  163. package/dist/pine-core/p-c4d6fe50.system.entry.js.map +0 -1
  164. package/dist/pine-core/p-c6badcf8.entry.js +0 -2
  165. package/dist/pine-core/p-c6badcf8.entry.js.map +0 -1
  166. package/dist/pine-core/p-d714f68f.system.entry.js +0 -2
  167. package/dist/pine-core/p-d714f68f.system.entry.js.map +0 -1
  168. package/dist/pine-core/p-e5ca5b8e.entry.js +0 -2
  169. package/dist/pine-core/p-e5ca5b8e.entry.js.map +0 -1
  170. package/dist/pine-core/p-fb4058e6.entry.js +0 -2
  171. package/dist/pine-core/p-fb4058e6.entry.js.map +0 -1
  172. /package/dist/pine-core/{p-02326ac3.entry.js.map → p-4c81420c.entry.js.map} +0 -0
  173. /package/dist/pine-core/{p-11d4036e.entry.js.map → p-5f5b19f4.entry.js.map} +0 -0
  174. /package/dist/pine-core/{p-7a95a90f.system.entry.js.map → p-8726c99d.system.entry.js.map} +0 -0
  175. /package/dist/pine-core/{p-884b9ae6.system.entry.js.map → p-d8d8fe07.system.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"pds-box.js","sourceRoot":"","sources":["../../../src/components/pds-box/pds-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,OAAO,MAAM;IAJnB;QAuFE;;WAEG;QACK,WAAM,GAAI,KAAK,CAAC;KAqSzB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\nimport { BoxColumnType, BoxTShirtSizeType, BoxShadowSizeType } from '../../utils/types';\nimport { normalizeColorValue } from '../../utils/utils';\n\n@Component({\n tag: 'pds-box',\n styleUrl: 'pds-box.scss',\n})\nexport class PdsBox {\n /**\n * Defines how items within the box are aligned.\n * @defaultValue stretch\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch` ;\n\n /**\n * Defines how items within the box are aligned at the XS breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsXs?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the SM breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsSm?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the MD breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsMd?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the LG breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsLg?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the XL breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsXl?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container.\n * @defaultValue stretch\n */\n @Prop() alignSelf?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the XS breakpoint.\n *\n */\n @Prop() alignSelfXs?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the SM breakpoint.\n *\n */\n @Prop() alignSelfSm?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the MD breakpoint.\n *\n */\n @Prop() alignSelfMd?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the LG breakpoint.\n *\n */\n @Prop() alignSelfLg?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the XL breakpoint.\n *\n */\n @Prop() alignSelfXl?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the box will be sized to fit its contents.\n */\n @Prop() auto?: boolean;\n\n /**\n * Defines the background-color of the box.\n */\n @Prop() backgroundColor?: string;\n\n /**\n * If `true`, the box will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the border color of the box.\n */\n @Prop() borderColor?: string;\n\n /**\n * Defines how rounded the box corners are.\n * @defaultValue none\n */\n @Prop() borderRadius?: `none` | `xs`| `sm` | `md` | `lg` | `circle`;\n\n /**\n * Defines the orientation of the box items.\n * @defaultValue row\n */\n @Prop() direction?: `row` | `column`;\n\n /**\n * Defines the display style of the box.\n * @defaultValue flex\n */\n @Prop() display?: `flex` | `inline-flex` | `block` | `inline-block`;\n\n /**\n * If `true`, sets the box `max-width` to `100%`.\n */\n @Prop() fit?: boolean;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() gap?: BoxTShirtSizeType;\n\n /**\n * Defines whether flex items are forced onto one line or can wrap onto multiple lines.\n * @defaultValue false\n */\n @Prop() wrap?: boolean;\n\n /**\n * Defines how a box will grow or shrink to fit the space available in its container.\n * Can be a predefined value ('none', 'grow', 'shrink') or a custom flex value (e.g., '1', '0 1 auto').\n * @defaultValue none\n */\n @Prop() flex?: `none` | `grow` | `shrink` | string;\n\n /**\n * Defines the horizontal alignment of the box items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the XS breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentXs?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the SM breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentSm?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the MD breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentMd?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the LG breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentLg?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the XL breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentXl?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the box's outer top spacing.\n * @defaultValue none\n */\n @Prop() marginBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing.\n * @defaultValue none\n */\n @Prop() marginInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing.\n * @defaultValue none\n */\n @Prop() marginInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing.\n * @defaultValue none\n */\n @Prop() marginBlockEnd?: BoxTShirtSizeType;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop({ reflect: true }) minHeight?: string;\n\n /**\n * The minimum width of the row. Used in conjunction with alignment props\n */\n @Prop({ reflect: true }) minWidth?: string;\n\n /**\n * Move columns to the end direction of the row for all screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offset?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XS` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXs?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `SM` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetSm?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `MD` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetMd?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `LG` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetLg?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XL` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXl?: BoxColumnType;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() padding?: BoxTShirtSizeType;\n\n\n /**\n * Defines the top spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box shadow.\n * @defaultValue none\n */\n @Prop() shadow?: BoxShadowSizeType;\n\n /**\n * Sets the default column width for the component. This value applies from the smallest screen size (XS) upwards, unless overridden by a breakpoint-specific size prop at that breakpoint or larger.\n */\n @Prop() size?: BoxColumnType;\n\n /**\n * At the XS breakpoint, this prop will take the number of columns specified. This overrides the base size prop for this specific range.\n */\n @Prop() sizeXs?: BoxColumnType;\n\n /**\n * At screen sizes from the SM breakpoint and larger (576px and up), this will take the specified number of columns. This overrides any value set by size or sizeXs.\n */\n @Prop() sizeSm?: BoxColumnType;\n\n /**\n * At screen sizes from the MD breakpoint and larger (768px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeMd?: BoxColumnType;\n\n /**\n * At screen sizes from the LG breakpoint and larger (992px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeLg?: BoxColumnType;\n\n /**\n * At screen sizes from the XL breakpoint and larger (1200px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeXl?: BoxColumnType;\n\n\n\n render() {\n const boxClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.alignItemsXs !== undefined && this.alignItemsXs.trim() !== '' ? `pds-align-items-xs-${this.alignItemsXs}` : ''}\n ${this.alignItemsSm !== undefined && this.alignItemsSm.trim() !== '' ? `pds-align-items-sm-${this.alignItemsSm}` : ''}\n ${this.alignItemsMd !== undefined && this.alignItemsMd.trim() !== '' ? `pds-align-items-md-${this.alignItemsMd}` : ''}\n ${this.alignItemsLg !== undefined && this.alignItemsLg.trim() !== '' ? `pds-align-items-lg-${this.alignItemsLg}` : ''}\n ${this.alignItemsXl !== undefined && this.alignItemsXl.trim() !== '' ? `pds-align-items-xl-${this.alignItemsXl}` : ''}\n ${this.alignSelf !== undefined && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}\n ${this.alignSelfXs !== undefined && this.alignSelfXs.trim() !== '' ? `pds-align-self-xs-${this.alignSelfXs}` : ''}\n ${this.alignSelfSm !== undefined && this.alignSelfSm.trim() !== '' ? `pds-align-self-sm-${this.alignSelfSm}` : ''}\n ${this.alignSelfMd !== undefined && this.alignSelfMd.trim() !== '' ? `pds-align-self-md-${this.alignSelfMd}` : ''}\n ${this.alignSelfLg !== undefined && this.alignSelfLg.trim() !== '' ? `pds-align-self-lg-${this.alignSelfLg}` : ''}\n ${this.alignSelfXl !== undefined && this.alignSelfXl.trim() !== '' ? `pds-align-self-xl-${this.alignSelfXl}` : ''}\n ${this.auto ? 'pds-box--auto' : ''}\n ${this.border ? 'pds-box--border' : ''}\n ${this.borderRadius !== undefined && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}\n ${this.direction !== undefined && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}\n ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}\n ${this.fit ? 'pds-box--fit' : ''}\n ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}\n ${this.wrap ? 'pds-box--wrap' : ''}\n ${this.flex !== undefined && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.justifyContentXs !== undefined && this.justifyContentXs.trim() !== '' ? `pds-justify-content-xs-${this.justifyContentXs}` : ''}\n ${this.justifyContentSm !== undefined && this.justifyContentSm.trim() !== '' ? `pds-justify-content-sm-${this.justifyContentSm}` : ''}\n ${this.justifyContentMd !== undefined && this.justifyContentMd.trim() !== '' ? `pds-justify-content-md-${this.justifyContentMd}` : ''}\n ${this.justifyContentLg !== undefined && this.justifyContentLg.trim() !== '' ? `pds-justify-content-lg-${this.justifyContentLg}` : ''}\n ${this.justifyContentXl !== undefined && this.justifyContentXl.trim() !== '' ? `pds-justify-content-xl-${this.justifyContentXl}` : ''}\n ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}\n ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}\n ${this.marginInlineEnd !== undefined && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}\n ${this.marginBlockEnd !== undefined && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}\n ${this.offset !== undefined && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}\n ${this.offsetXs !== undefined && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}\n ${this.offsetSm !== undefined && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}\n ${this.offsetMd !== undefined && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}\n ${this.offsetLg !== undefined && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}\n ${this.offsetXl !== undefined && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}\n ${this.padding !== undefined && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}\n ${this.paddingBlockStart !== undefined && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}\n ${this.paddingBlockEnd !== undefined && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}\n ${this.paddingInlineStart !== undefined && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}\n ${this.paddingInlineEnd !== undefined && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}\n ${this.shadow !== undefined && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}\n ${this.size !== undefined && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}\n ${this.sizeXs !== undefined && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}\n ${this.sizeSm !== undefined && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}\n ${this.sizeMd !== undefined && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}\n ${this.sizeLg !== undefined && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}\n ${this.sizeXl !== undefined && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}\n ${this.size == undefined &&\n this.sizeSm == undefined &&\n this.sizeMd == undefined &&\n this.sizeLg == undefined &&\n this.sizeXl == undefined ? 'pds-box' : ''}\n `;\n\n // Normalize so pds-box accepts --token, var(--token), or literals (no semantic names)\n const normalizedBackground = normalizeColorValue(this.backgroundColor);\n const normalizedBorder = normalizeColorValue(this.borderColor);\n\n const boxInlineStyles = {\n ...(normalizedBackground && { '--color-background-box': normalizedBackground }),\n ...(normalizedBorder && { '--color-border-box': normalizedBorder }),\n ...(this.minHeight && { '--sizing-min-height-box': this.minHeight }),\n ...(this.minWidth && { '--sizing-min-width-box': this.minWidth }),\n ...(this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }),\n };\n\n return (\n <Host class={boxClasses} style={boxInlineStyles}>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-box.js","sourceRoot":"","sources":["../../../src/components/pds-box/pds-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,OAAO,MAAM;IAJnB;QAgHE;;WAEG;QACK,WAAM,GAAI,KAAK,CAAC;KAysBzB;IA5IC,MAAM;QACJ,MAAM,UAAU,GAAG;MACjB,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,UAAU,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\nimport { BoxColumnType, BoxTShirtSizeType, BoxShadowSizeType } from '../../utils/types';\nimport { normalizeColorValue } from '../../utils/utils';\n\n@Component({\n tag: 'pds-box',\n styleUrl: 'pds-box.scss',\n})\nexport class PdsBox {\n /**\n * Defines how items within the box are aligned.\n * @defaultValue stretch\n */\n @Prop() alignItems?: `start` | `center` | `end` | `baseline` | `stretch` ;\n\n /**\n * Defines how items within the box are aligned at the XS breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsXs?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the SM breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsSm?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the MD breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsMd?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the LG breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsLg?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how items within the box are aligned at the XL breakpoint.\n * @defaultValue stretch\n */\n @Prop() alignItemsXl?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container.\n * @defaultValue stretch\n */\n @Prop() alignSelf?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the XS breakpoint.\n *\n */\n @Prop() alignSelfXs?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the SM breakpoint.\n *\n */\n @Prop() alignSelfSm?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the MD breakpoint.\n *\n */\n @Prop() alignSelfMd?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the LG breakpoint.\n *\n */\n @Prop() alignSelfLg?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * Defines how the box is aligned within its container at the XL breakpoint.\n *\n */\n @Prop() alignSelfXl?: `start` | `center` | `end` | `baseline` | `stretch`;\n\n /**\n * If `true`, the box will be sized to fit its contents.\n */\n @Prop() auto?: boolean;\n\n /**\n * If `true`, the box will be sized to fit its contents at the XS breakpoint.\n */\n @Prop() autoXs?: boolean;\n\n /**\n * If `true`, the box will be sized to fit its contents at the SM breakpoint.\n */\n @Prop() autoSm?: boolean;\n\n /**\n * If `true`, the box will be sized to fit its contents at the MD breakpoint.\n */\n @Prop() autoMd?: boolean;\n\n /**\n * If `true`, the box will be sized to fit its contents at the LG breakpoint.\n */\n @Prop() autoLg?: boolean;\n\n /**\n * If `true`, the box will be sized to fit its contents at the XL breakpoint.\n */\n @Prop() autoXl?: boolean;\n\n /**\n * Defines the background-color of the box.\n */\n @Prop() backgroundColor?: string;\n\n /**\n * If `true`, the box will have a border.\n */\n @Prop() border? = false;\n\n /**\n * Defines the border color of the box.\n */\n @Prop() borderColor?: string;\n\n /**\n * Defines how rounded the box corners are.\n * @defaultValue none\n */\n @Prop() borderRadius?: `none` | `xs`| `sm` | `md` | `lg` | `circle`;\n\n /**\n * Defines the orientation of the box items.\n * @defaultValue row\n */\n @Prop() direction?: `row` | `column`;\n\n /**\n * Defines the display style of the box.\n * @defaultValue flex\n */\n @Prop() display?: `flex` | `inline-flex` | `block` | `inline-block`;\n\n /**\n * If `true`, sets the box `max-width` to `100%`.\n */\n @Prop() fit?: boolean;\n\n /**\n * If `true`, sets the box `max-width` to `100%` at the XS breakpoint.\n */\n @Prop() fitXs?: boolean;\n\n /**\n * If `true`, sets the box `max-width` to `100%` at the SM breakpoint.\n */\n @Prop() fitSm?: boolean;\n\n /**\n * If `true`, sets the box `max-width` to `100%` at the MD breakpoint.\n */\n @Prop() fitMd?: boolean;\n\n /**\n * If `true`, sets the box `max-width` to `100%` at the LG breakpoint.\n */\n @Prop() fitLg?: boolean;\n\n /**\n * If `true`, sets the box `max-width` to `100%` at the XL breakpoint.\n */\n @Prop() fitXl?: boolean;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() gap?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() gapXs?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() gapSm?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() gapMd?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() gapLg?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() gapXl?: BoxTShirtSizeType;\n\n /**\n * Defines whether flex items are forced onto one line or can wrap onto multiple lines.\n * @defaultValue false\n */\n @Prop() wrap?: boolean;\n\n /**\n * Defines whether flex items can wrap onto multiple lines at the XS breakpoint.\n * @defaultValue false\n */\n @Prop() wrapXs?: boolean;\n\n /**\n * Defines whether flex items can wrap onto multiple lines at the SM breakpoint.\n * @defaultValue false\n */\n @Prop() wrapSm?: boolean;\n\n /**\n * Defines whether flex items can wrap onto multiple lines at the MD breakpoint.\n * @defaultValue false\n */\n @Prop() wrapMd?: boolean;\n\n /**\n * Defines whether flex items can wrap onto multiple lines at the LG breakpoint.\n * @defaultValue false\n */\n @Prop() wrapLg?: boolean;\n\n /**\n * Defines whether flex items can wrap onto multiple lines at the XL breakpoint.\n * @defaultValue false\n */\n @Prop() wrapXl?: boolean;\n\n /**\n * Defines how a box will grow or shrink to fit the space available in its container.\n * Can be a predefined value ('none', 'grow', 'shrink') or a custom flex value (e.g., '1', '0 1 auto').\n * @defaultValue none\n */\n @Prop() flex?: `none` | `grow` | `shrink` | string;\n\n /**\n * Defines the horizontal alignment of the box items.\n * @defaultValue start\n */\n @Prop() justifyContent?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the XS breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentXs?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the SM breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentSm?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the MD breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentMd?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the LG breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentLg?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the horizontal alignment of the box items at the XL breakpoint.\n * @defaultValue start\n */\n @Prop() justifyContentXl?: `start` | `center` | `end` | `space-between` | `space-around` | `space-evenly`;\n\n /**\n * Defines the box's outer top spacing.\n * @defaultValue none\n */\n @Prop() marginBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer top spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockStartXs?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer top spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockStartSm?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer top spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockStartMd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer top spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockStartLg?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer top spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockStartXl?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing.\n * @defaultValue none\n */\n @Prop() marginInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineStartXs?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineStartSm?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineStartMd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineStartLg?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer left spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineStartXl?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing.\n * @defaultValue none\n */\n @Prop() marginInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineEndXs?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineEndSm?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineEndMd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineEndLg?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer right spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() marginInlineEndXl?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing.\n * @defaultValue none\n */\n @Prop() marginBlockEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockEndXs?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockEndSm?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockEndMd?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockEndLg?: BoxTShirtSizeType;\n\n /**\n * Defines the box's outer bottom spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() marginBlockEndXl?: BoxTShirtSizeType;\n\n /**\n * The minimum height of the row. Used in conjunction with alignment props\n */\n @Prop({ reflect: true }) minHeight?: string;\n\n /**\n * The minimum width of the row. Used in conjunction with alignment props\n */\n @Prop({ reflect: true }) minWidth?: string;\n\n /**\n * Move columns to the end direction of the row for all screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offset?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XS` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXs?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `SM` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetSm?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `MD` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetMd?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `LG` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetLg?: BoxColumnType;\n\n /**\n * Move columns to the end direction of the row for `XL` screen sizes. Increases the starting margin of a column by specified number of columns.\n */\n @Prop() offsetXl?: BoxColumnType;\n\n /**\n * Defines the spacing between the box items.\n * @defaultValue none\n */\n @Prop() padding?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() paddingXs?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() paddingSm?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() paddingMd?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() paddingLg?: BoxTShirtSizeType;\n\n /**\n * Defines the spacing between the box items at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() paddingXl?: BoxTShirtSizeType;\n\n\n /**\n * Defines the top spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockStart?: BoxTShirtSizeType;\n\n /**\n * Defines the top spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockStartXs?: BoxTShirtSizeType;\n\n /**\n * Defines the top spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockStartSm?: BoxTShirtSizeType;\n\n /**\n * Defines the top spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockStartMd?: BoxTShirtSizeType;\n\n /**\n * Defines the top spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockStartLg?: BoxTShirtSizeType;\n\n /**\n * Defines the top spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockStartXl?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing.\n * @defaultValue none\n */\n @Prop() paddingBlockEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockEndXs?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockEndSm?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockEndMd?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockEndLg?: BoxTShirtSizeType;\n\n /**\n * Defines the bottom spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() paddingBlockEndXl?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineStart?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineStartXs?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineStartSm?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineStartMd?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineStartLg?: BoxTShirtSizeType;\n\n /**\n * Defines the left spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineStartXl?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing.\n * @defaultValue none\n */\n @Prop() paddingInlineEnd?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing at the XS breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineEndXs?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing at the SM breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineEndSm?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing at the MD breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineEndMd?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing at the LG breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineEndLg?: BoxTShirtSizeType;\n\n /**\n * Defines the right spacing at the XL breakpoint.\n * @defaultValue none\n */\n @Prop() paddingInlineEndXl?: BoxTShirtSizeType;\n\n /**\n * Defines the box shadow.\n * @defaultValue none\n */\n @Prop() shadow?: BoxShadowSizeType;\n\n /**\n * Sets the default column width for the component. This value applies from the smallest screen size (XS) upwards, unless overridden by a breakpoint-specific size prop at that breakpoint or larger.\n */\n @Prop() size?: BoxColumnType;\n\n /**\n * At the XS breakpoint, this prop will take the number of columns specified. This overrides the base size prop for this specific range.\n */\n @Prop() sizeXs?: BoxColumnType;\n\n /**\n * At screen sizes from the SM breakpoint and larger (576px and up), this will take the specified number of columns. This overrides any value set by size or sizeXs.\n */\n @Prop() sizeSm?: BoxColumnType;\n\n /**\n * At screen sizes from the MD breakpoint and larger (768px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeMd?: BoxColumnType;\n\n /**\n * At screen sizes from the LG breakpoint and larger (992px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeLg?: BoxColumnType;\n\n /**\n * At screen sizes from the XL breakpoint and larger (1200px and up), this will take the specified number of columns. This overrides any value set by size, sizeXs, and up.\n */\n @Prop() sizeXl?: BoxColumnType;\n\n\n\n render() {\n const boxClasses = `\n ${this.alignItems !== undefined && this.alignItems.trim() !== '' ? `pds-align-items-${this.alignItems}` : ''}\n ${this.alignItemsXs !== undefined && this.alignItemsXs.trim() !== '' ? `pds-align-items-xs-${this.alignItemsXs}` : ''}\n ${this.alignItemsSm !== undefined && this.alignItemsSm.trim() !== '' ? `pds-align-items-sm-${this.alignItemsSm}` : ''}\n ${this.alignItemsMd !== undefined && this.alignItemsMd.trim() !== '' ? `pds-align-items-md-${this.alignItemsMd}` : ''}\n ${this.alignItemsLg !== undefined && this.alignItemsLg.trim() !== '' ? `pds-align-items-lg-${this.alignItemsLg}` : ''}\n ${this.alignItemsXl !== undefined && this.alignItemsXl.trim() !== '' ? `pds-align-items-xl-${this.alignItemsXl}` : ''}\n ${this.alignSelf !== undefined && this.alignSelf.trim() !== '' ? `pds-align-self-${this.alignSelf}` : ''}\n ${this.alignSelfXs !== undefined && this.alignSelfXs.trim() !== '' ? `pds-align-self-xs-${this.alignSelfXs}` : ''}\n ${this.alignSelfSm !== undefined && this.alignSelfSm.trim() !== '' ? `pds-align-self-sm-${this.alignSelfSm}` : ''}\n ${this.alignSelfMd !== undefined && this.alignSelfMd.trim() !== '' ? `pds-align-self-md-${this.alignSelfMd}` : ''}\n ${this.alignSelfLg !== undefined && this.alignSelfLg.trim() !== '' ? `pds-align-self-lg-${this.alignSelfLg}` : ''}\n ${this.alignSelfXl !== undefined && this.alignSelfXl.trim() !== '' ? `pds-align-self-xl-${this.alignSelfXl}` : ''}\n ${this.auto ? 'pds-box--auto' : ''}\n ${this.autoXs ? 'pds-box--auto-xs' : ''}\n ${this.autoSm ? 'pds-box--auto-sm' : ''}\n ${this.autoMd ? 'pds-box--auto-md' : ''}\n ${this.autoLg ? 'pds-box--auto-lg' : ''}\n ${this.autoXl ? 'pds-box--auto-xl' : ''}\n ${this.border ? 'pds-box--border' : ''}\n ${this.borderRadius !== undefined && this.borderRadius.trim() !== '' ? `pds-border-radius-${this.borderRadius}` : ''}\n ${this.direction !== undefined && this.direction.trim() !== '' ? `pds-box-direction-${this.direction}` : ''}\n ${this.display !== undefined && this.display.trim() !== '' ? `pds-box--display-${this.display}` : ''}\n ${this.fit ? 'pds-box--fit' : ''}\n ${this.fitXs ? 'pds-box--fit-xs' : ''}\n ${this.fitSm ? 'pds-box--fit-sm' : ''}\n ${this.fitMd ? 'pds-box--fit-md' : ''}\n ${this.fitLg ? 'pds-box--fit-lg' : ''}\n ${this.fitXl ? 'pds-box--fit-xl' : ''}\n ${this.gap !== undefined && this.gap.trim() !== '' ? `pds-box-gap-${this.gap}` : ''}\n ${this.gapXs !== undefined && this.gapXs.trim() !== '' ? `pds-box-gap-xs-${this.gapXs}` : ''}\n ${this.gapSm !== undefined && this.gapSm.trim() !== '' ? `pds-box-gap-sm-${this.gapSm}` : ''}\n ${this.gapMd !== undefined && this.gapMd.trim() !== '' ? `pds-box-gap-md-${this.gapMd}` : ''}\n ${this.gapLg !== undefined && this.gapLg.trim() !== '' ? `pds-box-gap-lg-${this.gapLg}` : ''}\n ${this.gapXl !== undefined && this.gapXl.trim() !== '' ? `pds-box-gap-xl-${this.gapXl}` : ''}\n ${this.wrap ? 'pds-box--wrap' : ''}\n ${this.wrapXs ? 'pds-box--wrap-xs' : ''}\n ${this.wrapSm ? 'pds-box--wrap-sm' : ''}\n ${this.wrapMd ? 'pds-box--wrap-md' : ''}\n ${this.wrapLg ? 'pds-box--wrap-lg' : ''}\n ${this.wrapXl ? 'pds-box--wrap-xl' : ''}\n ${this.flex !== undefined && this.flex.trim() !== '' && ['none', 'grow', 'shrink'].includes(this.flex) ? `pds-box--flex-${this.flex}` : ''}\n ${this.justifyContent !== undefined && this.justifyContent.trim() !== '' ? `pds-justify-content-${this.justifyContent}` : ''}\n ${this.justifyContentXs !== undefined && this.justifyContentXs.trim() !== '' ? `pds-justify-content-xs-${this.justifyContentXs}` : ''}\n ${this.justifyContentSm !== undefined && this.justifyContentSm.trim() !== '' ? `pds-justify-content-sm-${this.justifyContentSm}` : ''}\n ${this.justifyContentMd !== undefined && this.justifyContentMd.trim() !== '' ? `pds-justify-content-md-${this.justifyContentMd}` : ''}\n ${this.justifyContentLg !== undefined && this.justifyContentLg.trim() !== '' ? `pds-justify-content-lg-${this.justifyContentLg}` : ''}\n ${this.justifyContentXl !== undefined && this.justifyContentXl.trim() !== '' ? `pds-justify-content-xl-${this.justifyContentXl}` : ''}\n ${this.marginBlockStart !== undefined && this.marginBlockStart.trim() !== '' ? `pds-margin-block-start-${this.marginBlockStart}` : ''}\n ${this.marginBlockStartXs !== undefined && this.marginBlockStartXs.trim() !== '' ? `pds-margin-block-start-xs-${this.marginBlockStartXs}` : ''}\n ${this.marginBlockStartSm !== undefined && this.marginBlockStartSm.trim() !== '' ? `pds-margin-block-start-sm-${this.marginBlockStartSm}` : ''}\n ${this.marginBlockStartMd !== undefined && this.marginBlockStartMd.trim() !== '' ? `pds-margin-block-start-md-${this.marginBlockStartMd}` : ''}\n ${this.marginBlockStartLg !== undefined && this.marginBlockStartLg.trim() !== '' ? `pds-margin-block-start-lg-${this.marginBlockStartLg}` : ''}\n ${this.marginBlockStartXl !== undefined && this.marginBlockStartXl.trim() !== '' ? `pds-margin-block-start-xl-${this.marginBlockStartXl}` : ''}\n ${this.marginInlineStart !== undefined && this.marginInlineStart.trim() !== '' ? `pds-margin-inline-start-${this.marginInlineStart}` : ''}\n ${this.marginInlineStartXs !== undefined && this.marginInlineStartXs.trim() !== '' ? `pds-margin-inline-start-xs-${this.marginInlineStartXs}` : ''}\n ${this.marginInlineStartSm !== undefined && this.marginInlineStartSm.trim() !== '' ? `pds-margin-inline-start-sm-${this.marginInlineStartSm}` : ''}\n ${this.marginInlineStartMd !== undefined && this.marginInlineStartMd.trim() !== '' ? `pds-margin-inline-start-md-${this.marginInlineStartMd}` : ''}\n ${this.marginInlineStartLg !== undefined && this.marginInlineStartLg.trim() !== '' ? `pds-margin-inline-start-lg-${this.marginInlineStartLg}` : ''}\n ${this.marginInlineStartXl !== undefined && this.marginInlineStartXl.trim() !== '' ? `pds-margin-inline-start-xl-${this.marginInlineStartXl}` : ''}\n ${this.marginInlineEnd !== undefined && this.marginInlineEnd.trim() !== '' ? `pds-margin-inline-end-${this.marginInlineEnd}` : ''}\n ${this.marginInlineEndXs !== undefined && this.marginInlineEndXs.trim() !== '' ? `pds-margin-inline-end-xs-${this.marginInlineEndXs}` : ''}\n ${this.marginInlineEndSm !== undefined && this.marginInlineEndSm.trim() !== '' ? `pds-margin-inline-end-sm-${this.marginInlineEndSm}` : ''}\n ${this.marginInlineEndMd !== undefined && this.marginInlineEndMd.trim() !== '' ? `pds-margin-inline-end-md-${this.marginInlineEndMd}` : ''}\n ${this.marginInlineEndLg !== undefined && this.marginInlineEndLg.trim() !== '' ? `pds-margin-inline-end-lg-${this.marginInlineEndLg}` : ''}\n ${this.marginInlineEndXl !== undefined && this.marginInlineEndXl.trim() !== '' ? `pds-margin-inline-end-xl-${this.marginInlineEndXl}` : ''}\n ${this.marginBlockEnd !== undefined && this.marginBlockEnd.trim() !== '' ? `pds-margin-block-end-${this.marginBlockEnd}` : ''}\n ${this.marginBlockEndXs !== undefined && this.marginBlockEndXs.trim() !== '' ? `pds-margin-block-end-xs-${this.marginBlockEndXs}` : ''}\n ${this.marginBlockEndSm !== undefined && this.marginBlockEndSm.trim() !== '' ? `pds-margin-block-end-sm-${this.marginBlockEndSm}` : ''}\n ${this.marginBlockEndMd !== undefined && this.marginBlockEndMd.trim() !== '' ? `pds-margin-block-end-md-${this.marginBlockEndMd}` : ''}\n ${this.marginBlockEndLg !== undefined && this.marginBlockEndLg.trim() !== '' ? `pds-margin-block-end-lg-${this.marginBlockEndLg}` : ''}\n ${this.marginBlockEndXl !== undefined && this.marginBlockEndXl.trim() !== '' ? `pds-margin-block-end-xl-${this.marginBlockEndXl}` : ''}\n ${this.offset !== undefined && this.offset.trim() !== '' ? `pds-box-offset-${this.offset}` : ''}\n ${this.offsetXs !== undefined && this.offsetXs.trim() !== '' ? `pds-box-offset-xs-${this.offsetXs}` : ''}\n ${this.offsetSm !== undefined && this.offsetSm.trim() !== '' ? `pds-box-offset-sm-${this.offsetSm}` : ''}\n ${this.offsetMd !== undefined && this.offsetMd.trim() !== '' ? `pds-box-offset-md-${this.offsetMd}` : ''}\n ${this.offsetLg !== undefined && this.offsetLg.trim() !== '' ? `pds-box-offset-lg-${this.offsetLg}` : ''}\n ${this.offsetXl !== undefined && this.offsetXl.trim() !== '' ? `pds-box-offset-xl-${this.offsetXl}` : ''}\n ${this.padding !== undefined && this.padding.trim() !== '' ? `pds-padding-${this.padding}` : ''}\n ${this.paddingXs !== undefined && this.paddingXs.trim() !== '' ? `pds-padding-xs-${this.paddingXs}` : ''}\n ${this.paddingSm !== undefined && this.paddingSm.trim() !== '' ? `pds-padding-sm-${this.paddingSm}` : ''}\n ${this.paddingMd !== undefined && this.paddingMd.trim() !== '' ? `pds-padding-md-${this.paddingMd}` : ''}\n ${this.paddingLg !== undefined && this.paddingLg.trim() !== '' ? `pds-padding-lg-${this.paddingLg}` : ''}\n ${this.paddingXl !== undefined && this.paddingXl.trim() !== '' ? `pds-padding-xl-${this.paddingXl}` : ''}\n ${this.paddingBlockStart !== undefined && this.paddingBlockStart.trim() !== '' ? `pds-padding-block-start-${this.paddingBlockStart}` : ''}\n ${this.paddingBlockStartXs !== undefined && this.paddingBlockStartXs.trim() !== '' ? `pds-padding-block-start-xs-${this.paddingBlockStartXs}` : ''}\n ${this.paddingBlockStartSm !== undefined && this.paddingBlockStartSm.trim() !== '' ? `pds-padding-block-start-sm-${this.paddingBlockStartSm}` : ''}\n ${this.paddingBlockStartMd !== undefined && this.paddingBlockStartMd.trim() !== '' ? `pds-padding-block-start-md-${this.paddingBlockStartMd}` : ''}\n ${this.paddingBlockStartLg !== undefined && this.paddingBlockStartLg.trim() !== '' ? `pds-padding-block-start-lg-${this.paddingBlockStartLg}` : ''}\n ${this.paddingBlockStartXl !== undefined && this.paddingBlockStartXl.trim() !== '' ? `pds-padding-block-start-xl-${this.paddingBlockStartXl}` : ''}\n ${this.paddingBlockEnd !== undefined && this.paddingBlockEnd.trim() !== '' ? `pds-padding-block-end-${this.paddingBlockEnd}` : ''}\n ${this.paddingBlockEndXs !== undefined && this.paddingBlockEndXs.trim() !== '' ? `pds-padding-block-end-xs-${this.paddingBlockEndXs}` : ''}\n ${this.paddingBlockEndSm !== undefined && this.paddingBlockEndSm.trim() !== '' ? `pds-padding-block-end-sm-${this.paddingBlockEndSm}` : ''}\n ${this.paddingBlockEndMd !== undefined && this.paddingBlockEndMd.trim() !== '' ? `pds-padding-block-end-md-${this.paddingBlockEndMd}` : ''}\n ${this.paddingBlockEndLg !== undefined && this.paddingBlockEndLg.trim() !== '' ? `pds-padding-block-end-lg-${this.paddingBlockEndLg}` : ''}\n ${this.paddingBlockEndXl !== undefined && this.paddingBlockEndXl.trim() !== '' ? `pds-padding-block-end-xl-${this.paddingBlockEndXl}` : ''}\n ${this.paddingInlineStart !== undefined && this.paddingInlineStart.trim() !== '' ? `pds-padding-inline-start-${this.paddingInlineStart}` : ''}\n ${this.paddingInlineStartXs !== undefined && this.paddingInlineStartXs.trim() !== '' ? `pds-padding-inline-start-xs-${this.paddingInlineStartXs}` : ''}\n ${this.paddingInlineStartSm !== undefined && this.paddingInlineStartSm.trim() !== '' ? `pds-padding-inline-start-sm-${this.paddingInlineStartSm}` : ''}\n ${this.paddingInlineStartMd !== undefined && this.paddingInlineStartMd.trim() !== '' ? `pds-padding-inline-start-md-${this.paddingInlineStartMd}` : ''}\n ${this.paddingInlineStartLg !== undefined && this.paddingInlineStartLg.trim() !== '' ? `pds-padding-inline-start-lg-${this.paddingInlineStartLg}` : ''}\n ${this.paddingInlineStartXl !== undefined && this.paddingInlineStartXl.trim() !== '' ? `pds-padding-inline-start-xl-${this.paddingInlineStartXl}` : ''}\n ${this.paddingInlineEnd !== undefined && this.paddingInlineEnd.trim() !== '' ? `pds-padding-inline-end-${this.paddingInlineEnd}` : ''}\n ${this.paddingInlineEndXs !== undefined && this.paddingInlineEndXs.trim() !== '' ? `pds-padding-inline-end-xs-${this.paddingInlineEndXs}` : ''}\n ${this.paddingInlineEndSm !== undefined && this.paddingInlineEndSm.trim() !== '' ? `pds-padding-inline-end-sm-${this.paddingInlineEndSm}` : ''}\n ${this.paddingInlineEndMd !== undefined && this.paddingInlineEndMd.trim() !== '' ? `pds-padding-inline-end-md-${this.paddingInlineEndMd}` : ''}\n ${this.paddingInlineEndLg !== undefined && this.paddingInlineEndLg.trim() !== '' ? `pds-padding-inline-end-lg-${this.paddingInlineEndLg}` : ''}\n ${this.paddingInlineEndXl !== undefined && this.paddingInlineEndXl.trim() !== '' ? `pds-padding-inline-end-xl-${this.paddingInlineEndXl}` : ''}\n ${this.shadow !== undefined && this.shadow.trim() !== '' ? `pds-shadow-${this.shadow}` : ''}\n ${this.size !== undefined && this.size.trim() !== '' ? `pds-box pds-box-${this.size}` : ''}\n ${this.sizeXs !== undefined && this.sizeXs.trim() !== '' ? `pds-box-xs-${this.sizeXs}` : ''}\n ${this.sizeSm !== undefined && this.sizeSm.trim() !== '' ? `pds-box-sm-${this.sizeSm}` : ''}\n ${this.sizeMd !== undefined && this.sizeMd.trim() !== '' ? `pds-box-md-${this.sizeMd}` : ''}\n ${this.sizeLg !== undefined && this.sizeLg.trim() !== '' ? `pds-box-lg-${this.sizeLg}` : ''}\n ${this.sizeXl !== undefined && this.sizeXl.trim() !== '' ? `pds-box-xl-${this.sizeXl}` : ''}\n ${this.size == undefined &&\n this.sizeSm == undefined &&\n this.sizeMd == undefined &&\n this.sizeLg == undefined &&\n this.sizeXl == undefined ? 'pds-box' : ''}\n `;\n\n // Normalize so pds-box accepts --token, var(--token), or literals (no semantic names)\n const normalizedBackground = normalizeColorValue(this.backgroundColor);\n const normalizedBorder = normalizeColorValue(this.borderColor);\n\n const boxInlineStyles = {\n ...(normalizedBackground && { '--color-background-box': normalizedBackground }),\n ...(normalizedBorder && { '--color-border-box': normalizedBorder }),\n ...(this.minHeight && { '--sizing-min-height-box': this.minHeight }),\n ...(this.minWidth && { '--sizing-min-width-box': this.minWidth }),\n ...(this.flex && !['none', 'grow', 'shrink'].includes(this.flex) && { 'flex': this.flex }),\n };\n\n return (\n <Host class={boxClasses} style={boxInlineStyles}>\n </Host>\n );\n }\n}\n"]}
@@ -55,8 +55,13 @@ export class PdsButton {
55
55
  ev.preventDefault();
56
56
  return;
57
57
  }
58
+ // Prevent form submission for disabled buttons
59
+ if (this.disabled) {
60
+ ev.preventDefault();
61
+ return;
62
+ }
58
63
  if (!this.href && this.type != 'button') {
59
- // If button clicked IS NOT associated with a form
64
+ // Handle form submission for Shadow DOM buttons
60
65
  if (hasShadowDom(this.el)) {
61
66
  const form = this.el.closest('form');
62
67
  if (form) {
@@ -73,6 +78,50 @@ export class PdsButton {
73
78
  this.pdsClick.emit(ev);
74
79
  };
75
80
  }
81
+ /**
82
+ * Listen for Enter key presses on form inputs to trigger submit
83
+ */
84
+ handleFormKeyDown(event) {
85
+ // Only handle Enter key for submit buttons that are not disabled
86
+ if (event.key !== 'Enter' || this.type !== 'submit' || this.href || this.disabled) {
87
+ return;
88
+ }
89
+ const target = event.target;
90
+ // Ensure event.target is an Element with matches method before proceeding
91
+ if (!target || typeof target.matches !== 'function') {
92
+ return;
93
+ }
94
+ const form = this.el.closest('form');
95
+ // Check if the Enter key was pressed in a form input within the same form
96
+ if (!form || !target || !form.contains(target)) {
97
+ return;
98
+ }
99
+ // Check if target is a form input element (exclude reset buttons)
100
+ const isFormInput = target.matches('input:not([type="submit"]):not([type="button"]):not([type="reset"])') ||
101
+ target.matches('pds-input') ||
102
+ target.matches('pds-select') ||
103
+ target.matches('pds-switch') ||
104
+ target.matches('pds-checkbox') ||
105
+ target.matches('pds-radio');
106
+ if (isFormInput) {
107
+ // Find all submit buttons in the form and check their actual properties
108
+ const allSubmitButtons = Array.from(form.querySelectorAll('pds-button, button[type="submit"], input[type="submit"]'));
109
+ const enabledSubmitButtons = allSubmitButtons.filter(button => {
110
+ if (button.tagName.toLowerCase() === 'pds-button') {
111
+ const pdsButton = button;
112
+ return pdsButton.type === 'submit' && !pdsButton.disabled;
113
+ }
114
+ else {
115
+ return !button.hasAttribute('disabled');
116
+ }
117
+ });
118
+ // Only synthesize click if this button is strictly the first enabled submit button
119
+ if (enabledSubmitButtons.length > 0 && enabledSubmitButtons[0] === this.el) {
120
+ event.preventDefault();
121
+ this.el.click();
122
+ }
123
+ }
124
+ }
76
125
  classNames() {
77
126
  const classNames = ['pds-button'];
78
127
  if (this.variant) {
@@ -422,5 +471,14 @@ export class PdsButton {
422
471
  }];
423
472
  }
424
473
  static get elementRef() { return "el"; }
474
+ static get listeners() {
475
+ return [{
476
+ "name": "keydown",
477
+ "method": "handleFormKeyDown",
478
+ "target": "body",
479
+ "capture": false,
480
+ "passive": false
481
+ }];
482
+ }
425
483
  }
426
484
  //# sourceMappingURL=pds-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;;;;;;;EAUE;AAOF,MAAM,OAAO,SAAS;IALtB;QAaE;;;WAGG;QACK,aAAQ,GAAI,KAAK,CAAC;QAE1B;;;WAGG;QACK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Prop } from '@stencil/core';\nimport { hasShadowDom } from '../../utils/utils';\n\nimport { caretDown } from '@pine-ds/icons/icons';\n\n/**\n * @part button - Exposes the button element for styling.\n * @part button-content - Exposes the button content for styling.\n * @part button-text - Exposes the button text for styling.\n * @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.\n * @part icon - Exposes the icon component for styling.\n * @part loader-svg - Exposes the loader SVG element for color customization. Appears only when loading.\n * @slot (default) - Button text.\n * @slot start - Content to display before the button text.\n * @slot end - Content to display after the button text.\n*/\n\n@Component({\n tag: 'pds-button',\n styleUrls: ['pds-button.scss'],\n shadow: true,\n})\nexport class PdsButton {\n @Element() el: HTMLPdsButtonElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines the button's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Determines if the button should take up the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth? = false;\n\n /**\n * If provided, renders the component as an anchor (`<a>`) element instead of a button.\n * When using href, button-specific props (type, name, value, loading) will be ignored.\n */\n @Prop() href?: string;\n\n /**\n * Displays a leading icon in the button. DEPRECATED.\n * @defaultValue null\n * @deprecated Use `start` slot instead.\n */\n @Prop() icon?: string = null;\n\n /**\n * When true, displays only the icon and visually hides the text (keeping it accessible).\n */\n @Prop() iconOnly? = false;\n\n /**\n * Determines if the button is in a loading state.\n * When true, displays a loader and hides the button text.\n * @defaultValue false\n */\n @Prop() loading? = false;\n\n /**\n * Provides the button with a submittable name.\n */\n @Prop() name?: string;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Only applies when href is set.\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Provides button with a type.\n * @defaultValue button\n */\n @Prop() type?: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Provides button with a submittable value\n */\n @Prop() value?: string;\n\n /**\n * Sets the style variant of the button.\n * @defaultValue primary\n */\n @Prop() variant: 'primary' | 'secondary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' = 'primary';\n\n @Event() pdsClick: EventEmitter;\n\n private handleClick = (ev: Event) => {\n if (this.loading) {\n ev.preventDefault();\n return;\n }\n\n if (!this.href && this.type != 'button') {\n // If button clicked IS NOT associated with a form\n if (hasShadowDom(this.el)) {\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n this.pdsClick.emit(ev);\n };\n\n private classNames() {\n const classNames = ['pds-button'];\n\n if (this.variant) {\n classNames.push('pds-button--' + this.variant);\n }\n\n if (this.iconOnly) {\n classNames.push('pds-button--icon-only');\n }\n\n if (this.loading) {\n classNames.push('pds-button--loading');\n }\n\n return classNames.join(' ');\n }\n\n private hasSlotContent(slotName: string): boolean {\n const elements = this.el.querySelectorAll(`[slot=\"${slotName}\"]`);\n return elements.length > 0;\n }\n\n private renderStartContent() {\n const hasIcon = this.icon && this.variant !== 'disclosure';\n const hasStartSlot = this.hasSlotContent('start');\n\n if (Boolean(hasIcon)) {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} name={this.icon} part=\"icon\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (Boolean(hasStartSlot)) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"start\" /></span>;\n }\n\n return null;\n }\n\n private renderEndContent() {\n if (this.iconOnly) {\n return null;\n }\n\n if (this.variant === 'disclosure') {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} icon={caretDown} part=\"caret\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (this.hasSlotContent('end')) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"end\" /></span>;\n }\n\n return null;\n }\n\n render() {\n // Common props for both button and anchor elements\n const commonProps = {\n class: this.classNames(),\n part: 'button',\n };\n\n const attributes = () => {\n if (this.href) {\n return {\n // Anchor element props\n ...commonProps,\n href: this.disabled ? null : this.href,\n target: this.target,\n };\n }\n\n return {\n // Button element props\n ...commonProps,\n 'aria-busy': this.loading ? 'true' : null,\n 'aria-live': this.loading ? 'polite' : null,\n 'disabled': this.disabled,\n 'name': this.name,\n 'type': this.type,\n 'value': this.value,\n };\n };\n\n const ContentElement = this.href ? 'a' : 'button';\n\n // Hide text when loading or iconOnly is true\n const hideText = this.loading || this.iconOnly;\n\n const content = (\n <div class=\"pds-button__content\" part=\"button-content\">\n {this.renderStartContent()}\n\n <span class={`pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`} part=\"button-text\">\n <slot />\n </span>\n\n {this.loading && (\n <span class=\"pds-button__loader\">\n <pds-loader is-loading={true} size=\"var(--pine-font-size-body-2xl)\" variant=\"spinner\" exportparts=\"loader-svg\">\n Loading...\n </pds-loader>\n </span>\n )}\n\n {this.renderEndContent()}\n </div>\n );\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n id={this.componentId}\n onClick={this.handleClick}\n variant={this.variant}\n >\n <ContentElement {...attributes()}>\n {content}\n </ContentElement>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pds-button.js","sourceRoot":"","sources":["../../../src/components/pds-button/pds-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,YAAY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AQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAC,aAAa;gBAC/F,eAAQ,CACH;YAEN,IAAI,CAAC,OAAO,IAAI,CACf,YAAM,KAAK,EAAC,oBAAoB;gBAC9B,gCAAwB,IAAI,EAAE,IAAI,EAAC,gCAAgC,EAAC,OAAO,EAAC,SAAS,EAAC,WAAW,EAAC,YAAY,iBAEjG,CACR,CACR;YAEA,IAAI,CAAC,gBAAgB,EAAE,CACpB,CACP,CAAC;QAEF,OAAO,CACL,EAAC,IAAI,qBACY,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAC5C,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YAErB,EAAC,cAAc,oBAAK,UAAU,EAAE,GAC7B,OAAO,CACO,CACZ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, h, Listen, Prop } from '@stencil/core';\nimport { hasShadowDom } from '../../utils/utils';\n\nimport { caretDown } from '@pine-ds/icons/icons';\n\n/**\n * @part button - Exposes the button element for styling.\n * @part button-content - Exposes the button content for styling.\n * @part button-text - Exposes the button text for styling.\n * @part caret - Exposes the caret icon component for styling. Appears only on the disclosure variant.\n * @part icon - Exposes the icon component for styling.\n * @part loader-svg - Exposes the loader SVG element for color customization. Appears only when loading.\n * @slot (default) - Button text.\n * @slot start - Content to display before the button text.\n * @slot end - Content to display after the button text.\n*/\n\n@Component({\n tag: 'pds-button',\n styleUrls: ['pds-button.scss'],\n shadow: true,\n})\nexport class PdsButton {\n @Element() el: HTMLPdsButtonElement;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId: string;\n\n /**\n * Determines the button's disabled state.\n * @defaultValue false\n */\n @Prop() disabled? = false;\n\n /**\n * Determines if the button should take up the full width of its container.\n * @defaultValue false\n */\n @Prop() fullWidth? = false;\n\n /**\n * If provided, renders the component as an anchor (`<a>`) element instead of a button.\n * When using href, button-specific props (type, name, value, loading) will be ignored.\n */\n @Prop() href?: string;\n\n /**\n * Displays a leading icon in the button. DEPRECATED.\n * @defaultValue null\n * @deprecated Use `start` slot instead.\n */\n @Prop() icon?: string = null;\n\n /**\n * When true, displays only the icon and visually hides the text (keeping it accessible).\n */\n @Prop() iconOnly? = false;\n\n /**\n * Determines if the button is in a loading state.\n * When true, displays a loader and hides the button text.\n * @defaultValue false\n */\n @Prop() loading? = false;\n\n /**\n * Provides the button with a submittable name.\n */\n @Prop() name?: string;\n\n /**\n * Specifies where to open the linked document when href is provided.\n * Only applies when href is set.\n */\n @Prop() target?: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Provides button with a type.\n * @defaultValue button\n */\n @Prop() type?: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Provides button with a submittable value\n */\n @Prop() value?: string;\n\n /**\n * Sets the style variant of the button.\n * @defaultValue primary\n */\n @Prop() variant: 'primary' | 'secondary' | 'accent' | 'disclosure' | 'destructive' | 'unstyled' = 'primary';\n\n @Event() pdsClick: EventEmitter;\n\n /**\n * Listen for Enter key presses on form inputs to trigger submit\n */\n @Listen('keydown', { target: 'body' })\n\n handleFormKeyDown(event: KeyboardEvent) {\n // Only handle Enter key for submit buttons that are not disabled\n if (event.key !== 'Enter' || this.type !== 'submit' || this.href || this.disabled) {\n return;\n }\n\n const target = event.target as Element;\n\n // Ensure event.target is an Element with matches method before proceeding\n if (!target || typeof target.matches !== 'function') {\n return;\n }\n const form = this.el.closest('form');\n\n // Check if the Enter key was pressed in a form input within the same form\n if (!form || !target || !form.contains(target)) {\n return;\n }\n\n // Check if target is a form input element (exclude reset buttons)\n const isFormInput = target.matches('input:not([type=\"submit\"]):not([type=\"button\"]):not([type=\"reset\"])') ||\n target.matches('pds-input') ||\n target.matches('pds-select') ||\n target.matches('pds-switch') ||\n target.matches('pds-checkbox') ||\n target.matches('pds-radio');\n\n if (isFormInput) {\n // Find all submit buttons in the form and check their actual properties\n const allSubmitButtons = Array.from(form.querySelectorAll('pds-button, button[type=\"submit\"], input[type=\"submit\"]'));\n const enabledSubmitButtons = allSubmitButtons.filter(button => {\n if (button.tagName.toLowerCase() === 'pds-button') {\n const pdsButton = button as HTMLPdsButtonElement;\n return pdsButton.type === 'submit' && !pdsButton.disabled;\n } else {\n return !button.hasAttribute('disabled');\n }\n });\n\n // Only synthesize click if this button is strictly the first enabled submit button\n if (enabledSubmitButtons.length > 0 && enabledSubmitButtons[0] === this.el) {\n event.preventDefault();\n this.el.click();\n }\n }\n }\n\n\n private handleClick = (ev: Event) => {\n if (this.loading) {\n ev.preventDefault();\n return;\n }\n\n // Prevent form submission for disabled buttons\n if (this.disabled) {\n ev.preventDefault();\n return;\n }\n\n if (!this.href && this.type != 'button') {\n // Handle form submission for Shadow DOM buttons\n if (hasShadowDom(this.el)) {\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n }\n this.pdsClick.emit(ev);\n };\n\n private classNames() {\n const classNames = ['pds-button'];\n\n if (this.variant) {\n classNames.push('pds-button--' + this.variant);\n }\n\n if (this.iconOnly) {\n classNames.push('pds-button--icon-only');\n }\n\n if (this.loading) {\n classNames.push('pds-button--loading');\n }\n\n return classNames.join(' ');\n }\n\n private hasSlotContent(slotName: string): boolean {\n const elements = this.el.querySelectorAll(`[slot=\"${slotName}\"]`);\n return elements.length > 0;\n }\n\n private renderStartContent() {\n const hasIcon = this.icon && this.variant !== 'disclosure';\n const hasStartSlot = this.hasSlotContent('start');\n\n if (Boolean(hasIcon)) {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} name={this.icon} part=\"icon\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (Boolean(hasStartSlot)) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"start\" /></span>;\n }\n\n return null;\n }\n\n private renderEndContent() {\n if (this.iconOnly) {\n return null;\n }\n\n if (this.variant === 'disclosure') {\n return (\n <pds-icon class={this.loading ? 'pds-button__icon--hidden' : ''} icon={caretDown} part=\"caret\" aria-hidden=\"true\"></pds-icon>\n );\n } else if (this.hasSlotContent('end')) {\n return <span class={`pds-button__icon ${this.loading ? 'pds-button__icon--hidden' : ''}`}><slot name=\"end\" /></span>;\n }\n\n return null;\n }\n\n render() {\n // Common props for both button and anchor elements\n const commonProps = {\n class: this.classNames(),\n part: 'button',\n };\n\n const attributes = () => {\n if (this.href) {\n return {\n // Anchor element props\n ...commonProps,\n href: this.disabled ? null : this.href,\n target: this.target,\n };\n }\n\n return {\n // Button element props\n ...commonProps,\n 'aria-busy': this.loading ? 'true' : null,\n 'aria-live': this.loading ? 'polite' : null,\n 'disabled': this.disabled,\n 'name': this.name,\n 'type': this.type,\n 'value': this.value,\n };\n };\n\n const ContentElement = this.href ? 'a' : 'button';\n\n // Hide text when loading or iconOnly is true\n const hideText = this.loading || this.iconOnly;\n\n const content = (\n <div class=\"pds-button__content\" part=\"button-content\">\n {this.renderStartContent()}\n\n <span class={`pds-button__text ${hideText ? 'pds-button__text--hidden' : ''}`} part=\"button-text\">\n <slot />\n </span>\n\n {this.loading && (\n <span class=\"pds-button__loader\">\n <pds-loader is-loading={true} size=\"var(--pine-font-size-body-2xl)\" variant=\"spinner\" exportparts=\"loader-svg\">\n Loading...\n </pds-loader>\n </span>\n )}\n\n {this.renderEndContent()}\n </div>\n );\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n id={this.componentId}\n onClick={this.handleClick}\n variant={this.variant}\n >\n <ContentElement {...attributes()}>\n {content}\n </ContentElement>\n </Host>\n );\n }\n}\n"]}
@@ -1,20 +1,19 @@
1
1
  pds-modal-content {
2
2
  display: block;
3
3
  flex: 1 1 auto;
4
- overflow-y: auto;
5
4
  width: 100%;
6
5
  }
7
- pds-modal-content:has(.pds-modal-content--border-none) {
6
+ pds-modal-content:has(.pds-modal-content.pds-modal-content--border-none) {
8
7
  border: 0;
9
8
  }
10
- pds-modal-content:has(.pds-modal-content--border-both) {
9
+ pds-modal-content:has(.pds-modal-content.pds-modal-content--border-both) {
11
10
  border-block-end: 1px solid var(--pine-color-grey-200);
12
11
  border-block-start: 1px solid var(--pine-color-grey-200);
13
12
  }
14
- pds-modal-content:has(.pds-modal-content--border-top) {
13
+ pds-modal-content:has(.pds-modal-content.pds-modal-content--border-top) {
15
14
  border-block-start: 1px solid var(--pine-color-grey-200);
16
15
  }
17
- pds-modal-content:has(.pds-modal-content--border-bottom) {
16
+ pds-modal-content:has(.pds-modal-content.pds-modal-content--border-bottom) {
18
17
  border-block-end: 1px solid var(--pine-color-grey-200);
19
18
  }
20
19
 
@@ -22,6 +21,5 @@ pds-modal-content:has(.pds-modal-content--border-bottom) {
22
21
  display: block;
23
22
  flex: 1 1 auto;
24
23
  min-height: 0;
25
- overflow-y: auto;
26
24
  width: 100%;
27
25
  }
@@ -2,25 +2,127 @@ import { h, Host } from "@stencil/core";
2
2
  export class PdsModalContent {
3
3
  constructor() {
4
4
  /**
5
- * The border style for the content area. Automatically set based on available space of the modal content.
5
+ * The border style for the content area. When not explicitly set, automatically determined based on scroll state.
6
6
  * @default 'none'
7
7
  */
8
8
  this.border = 'none';
9
- this.contentMaxHeight = '60vh';
9
+ this.contentMaxHeight = 'none';
10
+ /**
11
+ * Tracks whether the border prop was explicitly set by the user
12
+ */
13
+ this.userSetBorder = false;
14
+ }
15
+ componentWillLoad() {
16
+ // Check if border was explicitly set via attribute or property
17
+ const borderAttr = this.el.getAttribute('border');
18
+ const hasBorderAttribute = borderAttr !== null;
19
+ // If border attribute exists or border prop is not the default, user set it
20
+ this.userSetBorder = hasBorderAttribute || this.border !== 'none';
10
21
  }
11
22
  componentDidLoad() {
12
- const slotContent = this.el.firstElementChild;
13
- const isScrollable = slotContent.scrollHeight > slotContent.clientHeight;
14
- this.border = isScrollable ? 'both' : 'none';
15
23
  this.calculateMaxHeight();
16
- window.addEventListener('resize', this.calculateMaxHeight.bind(this));
24
+ // Set up resize listener
25
+ window.addEventListener('resize', this.handleResize.bind(this));
26
+ // Only set up scroll listener for border updates if borders are managed automatically
27
+ if (!this.userSetBorder) {
28
+ setTimeout(() => {
29
+ // The scroll happens on the component element itself (this.el), not the inner div
30
+ console.log('Setting up scroll listener on component element:', this.el);
31
+ this.el.addEventListener('scroll', this.handleScroll.bind(this));
32
+ // Initial border update after everything is set up
33
+ setTimeout(() => this.updateBorders(), 100);
34
+ }, 100);
35
+ }
17
36
  }
18
37
  disconnectedCallback() {
19
- window.removeEventListener('resize', this.calculateMaxHeight.bind(this));
38
+ window.removeEventListener('resize', this.handleResize.bind(this));
39
+ // Clean up scroll listener only if it was set up
40
+ if (!this.userSetBorder) {
41
+ this.el.removeEventListener('scroll', this.handleScroll.bind(this));
42
+ }
20
43
  if (this.mutationObserver) {
21
44
  this.mutationObserver.disconnect();
22
45
  }
23
46
  }
47
+ /**
48
+ * Handle scroll events
49
+ */
50
+ handleScroll() {
51
+ console.log('Scroll event fired!');
52
+ this.updateBorders();
53
+ }
54
+ /**
55
+ * Handle resize events
56
+ */
57
+ handleResize() {
58
+ this.calculateMaxHeight();
59
+ // Update borders after resize as content scrollability might change
60
+ setTimeout(() => this.updateBorders(), 50);
61
+ }
62
+ /**
63
+ * Updates border visibility based on scroll state (only if not user-defined)
64
+ */
65
+ updateBorders() {
66
+ // If user explicitly set a border value, don't override it
67
+ if (this.userSetBorder) {
68
+ return;
69
+ }
70
+ // Find the modal element (parent of this component)
71
+ const modalElement = this.el.closest('pds-modal');
72
+ if (!modalElement)
73
+ return;
74
+ // Only apply border logic if modal is scrollable
75
+ const isModalScrollable = modalElement.scrollable !== false;
76
+ if (!isModalScrollable) {
77
+ this.border = 'none';
78
+ return;
79
+ }
80
+ // The scrollable element is the component itself (this.el), not the inner div
81
+ const scrollableElement = this.el;
82
+ // Check if content is actually scrollable
83
+ const isContentScrollable = scrollableElement.scrollHeight > scrollableElement.clientHeight;
84
+ if (!isContentScrollable) {
85
+ this.border = 'none';
86
+ return;
87
+ }
88
+ // Determine border position based on scroll position
89
+ const { scrollTop, scrollHeight, clientHeight } = scrollableElement;
90
+ const scrollBottom = scrollTop + clientHeight;
91
+ // More generous tolerance for scroll detection (3px instead of 1px)
92
+ const tolerance = 3;
93
+ const isAtTop = scrollTop <= tolerance;
94
+ const isAtBottom = scrollBottom >= scrollHeight - tolerance;
95
+ // Debug logging (can be removed later)
96
+ console.log('Border Debug:', {
97
+ scrollTop,
98
+ scrollHeight,
99
+ clientHeight,
100
+ scrollBottom,
101
+ isAtTop,
102
+ isAtBottom,
103
+ currentBorder: this.border
104
+ });
105
+ if (isAtTop && isAtBottom) {
106
+ // Content fits exactly, no borders needed
107
+ this.border = 'none';
108
+ console.log('Content fits exactly, no borders needed');
109
+ }
110
+ else if (isAtTop && !isAtBottom) {
111
+ // At top, show bottom border only
112
+ this.border = 'bottom';
113
+ console.log('At top, show bottom border only');
114
+ }
115
+ else if (!isAtTop && isAtBottom) {
116
+ // At bottom, show top border only
117
+ this.border = 'top';
118
+ console.log('At bottom, show top border only');
119
+ }
120
+ else {
121
+ // In middle, show both borders
122
+ this.border = 'both';
123
+ console.log('In middle, show both borders');
124
+ }
125
+ }
24
126
  /**
25
127
  * Calculates the max-height based on header and footer heights
26
128
  */
@@ -29,7 +131,18 @@ export class PdsModalContent {
29
131
  const modalElement = this.el.closest('pds-modal');
30
132
  if (!modalElement)
31
133
  return;
134
+ // Check if the parent modal is scrollable
135
+ const isScrollable = modalElement.scrollable !== false;
32
136
  setTimeout(() => {
137
+ // If modal is not scrollable, don't apply max-height constraints
138
+ if (!isScrollable) {
139
+ this.contentMaxHeight = 'none';
140
+ const contentElement = this.el.querySelector('.pds-modal-content');
141
+ if (contentElement) {
142
+ contentElement.style.maxHeight = 'none';
143
+ }
144
+ return;
145
+ }
33
146
  // Find header and footer elements
34
147
  const headerElement = modalElement.querySelector('pds-modal-header');
35
148
  const footerElement = modalElement.querySelector('pds-modal-footer');
@@ -54,8 +167,10 @@ export class PdsModalContent {
54
167
  }
55
168
  }
56
169
  else {
57
- this.contentMaxHeight = '60vh'; // Default fallback
170
+ this.contentMaxHeight = 'none'; // Default fallback
58
171
  }
172
+ // Update borders after height calculations with longer delay
173
+ setTimeout(() => this.updateBorders(), 150);
59
174
  }, 100); // Delay to ensure DOM is fully rendered
60
175
  // Set up mutation observer if not already done
61
176
  if (!this.mutationObserver && modalElement) {
@@ -72,10 +187,12 @@ export class PdsModalContent {
72
187
  }
73
188
  }
74
189
  render() {
75
- return (h(Host, { key: '7fcd0c2d15c40fcb64137a36f056965f20c8edac' }, h("div", { key: '477bf82a379f1a6a0411b0bf9d740cef4b43fab6', class: {
190
+ // Only apply max-height style if it's not 'none'
191
+ const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};
192
+ return (h(Host, { key: '545e18de51a427ac59a33dece5054ec700163ae5' }, h("div", { key: '3e418670869f63d0251348f7787bca60e0057c91', class: {
76
193
  'pds-modal-content': true,
77
194
  [`pds-modal-content--border-${this.border}`]: true
78
- }, style: { maxHeight: this.contentMaxHeight }, tabindex: "-1" }, h("slot", { key: '0f7b29d85da0a61614725051fee71df1964a91fa' }))));
195
+ }, style: styleObj, tabindex: "-1" }, h("slot", { key: 'f312a2ff4b3249637d50536e12cf8ad94db5eff2' }))));
79
196
  }
80
197
  static get is() { return "pds-modal-content"; }
81
198
  static get originalStyleUrls() {
@@ -105,7 +222,7 @@ export class PdsModalContent {
105
222
  "name": "default",
106
223
  "text": "'none'"
107
224
  }],
108
- "text": "The border style for the content area. Automatically set based on available space of the modal content."
225
+ "text": "The border style for the content area. When not explicitly set, automatically determined based on scroll state."
109
226
  },
110
227
  "getter": false,
111
228
  "setter": false,
@@ -1 +1 @@
1
- {"version":3,"file":"pds-modal-content.js","sourceRoot":"","sources":["../../../../src/components/pds-modal/pds-modal-content/pds-modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAYzE,MAAM,OAAO,eAAe;IAJ5B;QAQE;;;WAGG;QACsB,WAAM,GAAuC,MAAM,CAAC;QAEpE,qBAAgB,GAAW,MAAM,CAAC;KAgG5C;IA9FC,gBAAgB;QACd,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,iBAAgC,CAAC;QAC7D,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;QACzE,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QAE7C,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAEzE,IAAI,IAAI,CAAC,gBAA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,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;gBACzD,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,CAAC,mBAAmB;YACrD,CAAC;QACH,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,wCAAwC;QAEjD,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,YAAY,EAAE,CAAC;YAC3C,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE;gBAChD,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5B,CAAC,CAAC,CAAC;YAEH,0CAA0C;YAC1C,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC1C,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DACE,KAAK,EAAE;oBACL,mBAAmB,EAAE,IAAI;oBACzB,CAAC,6BAA6B,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI;iBACnD,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAC3C,QAAQ,EAAC,IAAI;gBAEb,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, Element, State } from '@stencil/core';\n\ndeclare global {\n interface HTMLPdsModalContentElement extends HTMLElement {\n border: 'none' | 'both';\n }\n}\n\n@Component({\n tag: 'pds-modal-content',\n styleUrl: 'pds-modal-content.scss',\n})\nexport class PdsModalContent {\n\n @Element() el: HTMLPdsModalContentElement;\n\n /**\n * The border style for the content area. Automatically set based on available space of the modal content.\n * @default 'none'\n */\n @Prop({ reflect: true }) border: 'none' | 'both' | 'top' | 'bottom' = 'none';\n\n @State() contentMaxHeight: string = '60vh';\n\n componentDidLoad() {\n const slotContent = this.el.firstElementChild as HTMLElement;\n const isScrollable = slotContent.scrollHeight > slotContent.clientHeight;\n this.border = isScrollable ? 'both' : 'none';\n\n this.calculateMaxHeight();\n\n window.addEventListener('resize', this.calculateMaxHeight.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.calculateMaxHeight.bind(this));\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private mutationObserver: MutationObserver;\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private calculateMaxHeight() {\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n setTimeout(() => {\n // Find header and footer elements\n const headerElement = modalElement.querySelector('pds-modal-header');\n const footerElement = modalElement.querySelector('pds-modal-footer');\n\n // Get header and footer heights\n const headerHeight = headerElement ? headerElement.offsetHeight : 0;\n const footerHeight = footerElement ? footerElement.offsetHeight : 0;\n\n // Set the max-height as a calculation\n if (headerHeight > 0 || footerHeight > 0) {\n // Calculate the available height by subtracting:\n // 1. Header and footer heights\n // 2. Modal padding (48px)\n // 3. Additional space for modal positioning (6vh)\n // 4. Extra adjustment for perfect fit (50px)\n const viewportAdjustment = Math.round(window.innerHeight * 0.06); // 6vh approximation\n const totalReduction = headerHeight + footerHeight + 48 + viewportAdjustment + 50;\n\n // Set the content max height\n this.contentMaxHeight = `calc(100vh - ${totalReduction}px)`;\n\n // Apply the style directly to ensure it takes effect\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = this.contentMaxHeight;\n }\n } else {\n this.contentMaxHeight = '60vh'; // Default fallback\n }\n }, 100); // Delay to ensure DOM is fully rendered\n\n // Set up mutation observer if not already done\n if (!this.mutationObserver && modalElement) {\n this.mutationObserver = new MutationObserver(() => {\n this.calculateMaxHeight();\n });\n\n // Observe changes to the modal's children\n this.mutationObserver.observe(modalElement, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n }\n render() {\n return (\n <Host>\n <div\n class={{\n 'pds-modal-content': true,\n [`pds-modal-content--border-${this.border}`]: true\n }}\n style={{ maxHeight: this.contentMaxHeight }}\n tabindex=\"-1\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}"]}
1
+ {"version":3,"file":"pds-modal-content.js","sourceRoot":"","sources":["../../../../src/components/pds-modal/pds-modal-content/pds-modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAYzE,MAAM,OAAO,eAAe;IAJ5B;QAQE;;;WAGG;QACsB,WAAM,GAAuC,MAAM,CAAC;QAEpE,qBAAgB,GAAW,MAAM,CAAC;QAE3C;;WAEG;QACK,kBAAa,GAAG,KAAK,CAAC;KAgO/B;IA9NC,iBAAiB;QACf,+DAA+D;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,kBAAkB,GAAG,UAAU,KAAK,IAAI,CAAC;QAE/C,4EAA4E;QAC5E,IAAI,CAAC,aAAa,GAAG,kBAAkB,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC;IACpE,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,yBAAyB;QACzB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAEhE,sFAAsF;QACtF,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,UAAU,CAAC,GAAG,EAAE;g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EH,0CAA0C;YAC1C,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC1C,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,MAAM;QACJ,iDAAiD;QACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAE9F,OAAO,CACL,EAAC,IAAI;YACH,4DACE,KAAK,EAAE;oBACL,mBAAmB,EAAE,IAAI;oBACzB,CAAC,6BAA6B,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI;iBACnD,EACD,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAC,IAAI;gBAEb,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, Element, State } from '@stencil/core';\n\ndeclare global {\n interface HTMLPdsModalContentElement extends HTMLElement {\n border: 'none' | 'both';\n }\n}\n\n@Component({\n tag: 'pds-modal-content',\n styleUrl: 'pds-modal-content.scss',\n})\nexport class PdsModalContent {\n\n @Element() el: HTMLPdsModalContentElement;\n\n /**\n * The border style for the content area. When not explicitly set, automatically determined based on scroll state.\n * @default 'none'\n */\n @Prop({ reflect: true }) border: 'none' | 'both' | 'top' | 'bottom' = 'none';\n\n @State() contentMaxHeight: string = 'none';\n\n /**\n * Tracks whether the border prop was explicitly set by the user\n */\n private userSetBorder = false;\n\n componentWillLoad() {\n // Check if border was explicitly set via attribute or property\n const borderAttr = this.el.getAttribute('border');\n const hasBorderAttribute = borderAttr !== null;\n\n // If border attribute exists or border prop is not the default, user set it\n this.userSetBorder = hasBorderAttribute || this.border !== 'none';\n }\n\n componentDidLoad() {\n this.calculateMaxHeight();\n\n // Set up resize listener\n window.addEventListener('resize', this.handleResize.bind(this));\n\n // Only set up scroll listener for border updates if borders are managed automatically\n if (!this.userSetBorder) {\n setTimeout(() => {\n // The scroll happens on the component element itself (this.el), not the inner div\n console.log('Setting up scroll listener on component element:', this.el);\n this.el.addEventListener('scroll', this.handleScroll.bind(this));\n // Initial border update after everything is set up\n setTimeout(() => this.updateBorders(), 100);\n }, 100);\n }\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize.bind(this));\n\n // Clean up scroll listener only if it was set up\n if (!this.userSetBorder) {\n this.el.removeEventListener('scroll', this.handleScroll.bind(this));\n }\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n /**\n * Handle scroll events\n */\n private handleScroll() {\n console.log('Scroll event fired!');\n this.updateBorders();\n }\n\n /**\n * Handle resize events\n */\n private handleResize() {\n this.calculateMaxHeight();\n // Update borders after resize as content scrollability might change\n setTimeout(() => this.updateBorders(), 50);\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private mutationObserver: MutationObserver;\n\n /**\n * Updates border visibility based on scroll state (only if not user-defined)\n */\n private updateBorders() {\n // If user explicitly set a border value, don't override it\n if (this.userSetBorder) {\n return;\n }\n\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n // Only apply border logic if modal is scrollable\n const isModalScrollable = modalElement.scrollable !== false;\n if (!isModalScrollable) {\n this.border = 'none';\n return;\n }\n\n // The scrollable element is the component itself (this.el), not the inner div\n const scrollableElement = this.el;\n\n // Check if content is actually scrollable\n const isContentScrollable = scrollableElement.scrollHeight > scrollableElement.clientHeight;\n\n if (!isContentScrollable) {\n this.border = 'none';\n return;\n }\n\n // Determine border position based on scroll position\n const { scrollTop, scrollHeight, clientHeight } = scrollableElement;\n const scrollBottom = scrollTop + clientHeight;\n\n // More generous tolerance for scroll detection (3px instead of 1px)\n const tolerance = 3;\n const isAtTop = scrollTop <= tolerance;\n const isAtBottom = scrollBottom >= scrollHeight - tolerance;\n\n // Debug logging (can be removed later)\n console.log('Border Debug:', {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollBottom,\n isAtTop,\n isAtBottom,\n currentBorder: this.border\n });\n\n if (isAtTop && isAtBottom) {\n // Content fits exactly, no borders needed\n this.border = 'none';\n console.log('Content fits exactly, no borders needed');\n } else if (isAtTop && !isAtBottom) {\n // At top, show bottom border only\n this.border = 'bottom';\n console.log('At top, show bottom border only');\n } else if (!isAtTop && isAtBottom) {\n // At bottom, show top border only\n this.border = 'top';\n console.log('At bottom, show top border only');\n } else {\n // In middle, show both borders\n this.border = 'both';\n console.log('In middle, show both borders');\n }\n }\n\n /**\n * Calculates the max-height based on header and footer heights\n */\n private calculateMaxHeight() {\n // Find the modal element (parent of this component)\n const modalElement = this.el.closest('pds-modal');\n if (!modalElement) return;\n\n // Check if the parent modal is scrollable\n const isScrollable = modalElement.scrollable !== false;\n\n setTimeout(() => {\n // If modal is not scrollable, don't apply max-height constraints\n if (!isScrollable) {\n this.contentMaxHeight = 'none';\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = 'none';\n }\n return;\n }\n\n // Find header and footer elements\n const headerElement = modalElement.querySelector('pds-modal-header');\n const footerElement = modalElement.querySelector('pds-modal-footer');\n\n // Get header and footer heights\n const headerHeight = headerElement ? headerElement.offsetHeight : 0;\n const footerHeight = footerElement ? footerElement.offsetHeight : 0;\n\n // Set the max-height as a calculation\n if (headerHeight > 0 || footerHeight > 0) {\n // Calculate the available height by subtracting:\n // 1. Header and footer heights\n // 2. Modal padding (48px)\n // 3. Additional space for modal positioning (6vh)\n // 4. Extra adjustment for perfect fit (50px)\n const viewportAdjustment = Math.round(window.innerHeight * 0.06); // 6vh approximation\n const totalReduction = headerHeight + footerHeight + 48 + viewportAdjustment + 50;\n\n // Set the content max height\n this.contentMaxHeight = `calc(100vh - ${totalReduction}px)`;\n\n // Apply the style directly to ensure it takes effect\n const contentElement = this.el.querySelector('.pds-modal-content') as HTMLElement;\n if (contentElement) {\n contentElement.style.maxHeight = this.contentMaxHeight;\n }\n } else {\n this.contentMaxHeight = 'none'; // Default fallback\n }\n\n // Update borders after height calculations with longer delay\n setTimeout(() => this.updateBorders(), 150);\n }, 100); // Delay to ensure DOM is fully rendered\n\n // Set up mutation observer if not already done\n if (!this.mutationObserver && modalElement) {\n this.mutationObserver = new MutationObserver(() => {\n this.calculateMaxHeight();\n });\n\n // Observe changes to the modal's children\n this.mutationObserver.observe(modalElement, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n }\n render() {\n // Only apply max-height style if it's not 'none'\n const styleObj = this.contentMaxHeight !== 'none' ? { maxHeight: this.contentMaxHeight } : {};\n\n return (\n <Host>\n <div\n class={{\n 'pds-modal-content': true,\n [`pds-modal-content--border-${this.border}`]: true\n }}\n style={styleObj}\n tabindex=\"-1\"\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}"]}