@porsche-design-system/components-react 2.20.0 → 3.0.0-alpha.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 (402) hide show
  1. package/CHANGELOG.md +401 -3
  2. package/esm/lib/components/accordion.wrapper.js +1 -1
  3. package/esm/lib/components/banner.wrapper.js +1 -1
  4. package/esm/lib/components/button-group.wrapper.js +1 -1
  5. package/esm/lib/components/button-pure.wrapper.js +3 -3
  6. package/esm/lib/components/button.wrapper.js +3 -3
  7. package/esm/lib/components/carousel.wrapper.js +1 -1
  8. package/esm/lib/components/checkbox-wrapper.wrapper.js +3 -3
  9. package/esm/lib/components/content-wrapper.wrapper.js +2 -1
  10. package/esm/lib/components/display.wrapper.js +22 -0
  11. package/esm/lib/components/divider.wrapper.js +1 -1
  12. package/esm/lib/components/fieldset-wrapper.wrapper.js +3 -3
  13. package/esm/lib/components/flex-item.wrapper.js +2 -1
  14. package/esm/lib/components/flex.wrapper.js +2 -1
  15. package/esm/lib/components/grid-item.wrapper.js +2 -1
  16. package/esm/lib/components/grid.wrapper.js +2 -1
  17. package/esm/lib/components/heading.wrapper.js +22 -0
  18. package/esm/lib/components/headline.wrapper.js +2 -1
  19. package/esm/lib/components/icon.wrapper.js +1 -1
  20. package/esm/lib/components/inline-notification.wrapper.js +1 -1
  21. package/esm/lib/components/link-pure.wrapper.js +3 -3
  22. package/esm/lib/components/link-social.wrapper.js +2 -1
  23. package/esm/lib/components/link-tile.wrapper.js +1 -1
  24. package/esm/lib/components/link.wrapper.js +1 -1
  25. package/esm/lib/components/marque.wrapper.js +1 -1
  26. package/esm/lib/components/modal.wrapper.js +1 -1
  27. package/esm/lib/components/pagination.wrapper.js +1 -1
  28. package/esm/lib/components/popover.wrapper.js +3 -3
  29. package/esm/lib/components/radio-button-wrapper.wrapper.js +3 -3
  30. package/esm/lib/components/scroller.wrapper.js +1 -1
  31. package/esm/lib/components/segmented-control-item.wrapper.js +1 -1
  32. package/esm/lib/components/segmented-control.wrapper.js +1 -1
  33. package/esm/lib/components/select-wrapper.wrapper.js +1 -1
  34. package/esm/lib/components/spinner.wrapper.js +1 -1
  35. package/esm/lib/components/stepper-horizontal-item.wrapper.js +1 -1
  36. package/esm/lib/components/stepper-horizontal.wrapper.js +1 -1
  37. package/esm/lib/components/switch.wrapper.js +3 -3
  38. package/esm/lib/components/table-body.wrapper.js +1 -1
  39. package/esm/lib/components/table-cell.wrapper.js +1 -1
  40. package/esm/lib/components/table-head-cell.wrapper.js +1 -1
  41. package/esm/lib/components/table-head-row.wrapper.js +1 -1
  42. package/esm/lib/components/table-head.wrapper.js +1 -1
  43. package/esm/lib/components/table-row.wrapper.js +1 -1
  44. package/esm/lib/components/table.wrapper.js +1 -1
  45. package/esm/lib/components/tabs-bar.wrapper.js +1 -1
  46. package/esm/lib/components/tabs-item.wrapper.js +1 -1
  47. package/esm/lib/components/tabs.wrapper.js +1 -1
  48. package/esm/lib/components/tag-dismissible.wrapper.js +3 -3
  49. package/esm/lib/components/tag.wrapper.js +1 -1
  50. package/esm/lib/components/text-field-wrapper.wrapper.js +3 -3
  51. package/esm/lib/components/text-list-item.wrapper.js +1 -1
  52. package/esm/lib/components/text-list.wrapper.js +1 -1
  53. package/esm/lib/components/text.wrapper.js +1 -1
  54. package/esm/lib/components/textarea-wrapper.wrapper.js +3 -3
  55. package/esm/lib/components/toast.wrapper.js +1 -1
  56. package/esm/public-api.js +2 -0
  57. package/{jsdom-polyfill.d.ts → jsdom-polyfill/index.d.ts} +0 -0
  58. package/lib/components/accordion.wrapper.d.ts +5 -5
  59. package/lib/components/accordion.wrapper.js +1 -1
  60. package/lib/components/banner.wrapper.js +1 -1
  61. package/lib/components/button-group.wrapper.js +1 -1
  62. package/lib/components/button-pure.wrapper.d.ts +9 -17
  63. package/lib/components/button-pure.wrapper.js +3 -3
  64. package/lib/components/button.wrapper.d.ts +9 -19
  65. package/lib/components/button.wrapper.js +3 -3
  66. package/lib/components/carousel.wrapper.js +1 -1
  67. package/lib/components/checkbox-wrapper.wrapper.d.ts +9 -1
  68. package/lib/components/checkbox-wrapper.wrapper.js +3 -3
  69. package/lib/components/content-wrapper.wrapper.d.ts +9 -4
  70. package/lib/components/content-wrapper.wrapper.js +2 -1
  71. package/lib/components/display.wrapper.d.ts +56 -0
  72. package/lib/components/display.wrapper.js +24 -0
  73. package/lib/components/divider.wrapper.js +1 -1
  74. package/lib/components/fieldset-wrapper.wrapper.d.ts +9 -1
  75. package/lib/components/fieldset-wrapper.wrapper.js +3 -3
  76. package/lib/components/flex-item.wrapper.d.ts +1 -0
  77. package/lib/components/flex-item.wrapper.js +2 -1
  78. package/lib/components/flex.wrapper.d.ts +1 -0
  79. package/lib/components/flex.wrapper.js +2 -1
  80. package/lib/components/grid-item.wrapper.d.ts +1 -0
  81. package/lib/components/grid-item.wrapper.js +2 -1
  82. package/lib/components/grid.wrapper.d.ts +5 -2
  83. package/lib/components/grid.wrapper.js +2 -1
  84. package/lib/components/heading.wrapper.d.ts +56 -0
  85. package/lib/components/heading.wrapper.js +24 -0
  86. package/lib/components/headline.wrapper.d.ts +8 -7
  87. package/lib/components/headline.wrapper.js +2 -1
  88. package/lib/components/icon.wrapper.d.ts +11 -9
  89. package/lib/components/icon.wrapper.js +1 -1
  90. package/lib/components/index.d.ts +2 -0
  91. package/lib/components/inline-notification.wrapper.js +1 -1
  92. package/lib/components/link-pure.wrapper.d.ts +15 -5
  93. package/lib/components/link-pure.wrapper.js +3 -3
  94. package/lib/components/link-social.wrapper.d.ts +1 -0
  95. package/lib/components/link-social.wrapper.js +2 -1
  96. package/lib/components/link-tile.wrapper.js +1 -1
  97. package/lib/components/link.wrapper.d.ts +7 -7
  98. package/lib/components/link.wrapper.js +1 -1
  99. package/lib/components/marque.wrapper.js +1 -1
  100. package/lib/components/modal.wrapper.js +1 -1
  101. package/lib/components/pagination.wrapper.js +1 -1
  102. package/lib/components/popover.wrapper.d.ts +9 -1
  103. package/lib/components/popover.wrapper.js +3 -3
  104. package/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
  105. package/lib/components/radio-button-wrapper.wrapper.js +3 -3
  106. package/lib/components/scroller.wrapper.d.ts +3 -3
  107. package/lib/components/scroller.wrapper.js +1 -1
  108. package/lib/components/segmented-control-item.wrapper.js +1 -1
  109. package/lib/components/segmented-control.wrapper.d.ts +2 -2
  110. package/lib/components/segmented-control.wrapper.js +1 -1
  111. package/lib/components/select-wrapper.wrapper.js +1 -1
  112. package/lib/components/spinner.wrapper.d.ts +3 -3
  113. package/lib/components/spinner.wrapper.js +1 -1
  114. package/lib/components/stepper-horizontal-item.wrapper.js +1 -1
  115. package/lib/components/stepper-horizontal.wrapper.js +1 -1
  116. package/lib/components/switch.wrapper.d.ts +3 -13
  117. package/lib/components/switch.wrapper.js +3 -3
  118. package/lib/components/table-body.wrapper.js +1 -1
  119. package/lib/components/table-cell.wrapper.js +1 -1
  120. package/lib/components/table-head-cell.wrapper.js +1 -1
  121. package/lib/components/table-head-row.wrapper.js +1 -1
  122. package/lib/components/table-head.wrapper.js +1 -1
  123. package/lib/components/table-row.wrapper.js +1 -1
  124. package/lib/components/table.wrapper.js +1 -1
  125. package/lib/components/tabs-bar.wrapper.d.ts +3 -3
  126. package/lib/components/tabs-bar.wrapper.js +1 -1
  127. package/lib/components/tabs-item.wrapper.js +1 -1
  128. package/lib/components/tabs.wrapper.d.ts +3 -3
  129. package/lib/components/tabs.wrapper.js +1 -1
  130. package/lib/components/tag-dismissible.wrapper.d.ts +9 -1
  131. package/lib/components/tag-dismissible.wrapper.js +3 -3
  132. package/lib/components/tag.wrapper.js +1 -1
  133. package/lib/components/text-field-wrapper.wrapper.d.ts +9 -1
  134. package/lib/components/text-field-wrapper.wrapper.js +3 -3
  135. package/lib/components/text-list-item.wrapper.js +1 -1
  136. package/lib/components/text-list.wrapper.js +1 -1
  137. package/lib/components/text.wrapper.d.ts +2 -2
  138. package/lib/components/text.wrapper.js +1 -1
  139. package/lib/components/textarea-wrapper.wrapper.d.ts +9 -1
  140. package/lib/components/textarea-wrapper.wrapper.js +3 -3
  141. package/lib/components/toast.wrapper.js +1 -1
  142. package/lib/types.d.ts +275 -42
  143. package/package.json +2 -2
  144. package/{partials.d.ts → partials/index.d.ts} +0 -0
  145. package/partials/package.json +1 -0
  146. package/public-api.js +4 -0
  147. package/ssr/components/dist/styles/esm/styles-entry.js +1585 -1723
  148. package/ssr/components/dist/utils/esm/utils-entry.js +330 -272
  149. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +1 -1
  150. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +1 -1
  151. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.js +1 -1
  152. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.js +4 -4
  153. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.js +4 -4
  154. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +1 -1
  155. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
  156. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.js +2 -1
  157. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.js +38 -0
  158. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +1 -1
  159. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.js +4 -4
  160. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.js +2 -1
  161. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.js +2 -1
  162. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.js +3 -4
  163. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.js +2 -1
  164. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.js +38 -0
  165. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.js +2 -1
  166. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
  167. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +1 -1
  168. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.js +4 -4
  169. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +2 -1
  170. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
  171. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.js +1 -1
  172. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/marque.wrapper.js +1 -1
  173. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +1 -1
  174. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +1 -1
  175. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.js +4 -4
  176. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.js +4 -4
  177. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +1 -1
  178. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.js +3 -3
  179. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +1 -1
  180. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.js +1 -1
  181. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.js +1 -1
  182. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal-item.wrapper.js +1 -1
  183. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +1 -1
  184. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +4 -4
  185. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-body.wrapper.js +1 -1
  186. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-cell.wrapper.js +1 -1
  187. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-cell.wrapper.js +1 -1
  188. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-row.wrapper.js +1 -1
  189. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head.wrapper.js +1 -1
  190. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-row.wrapper.js +1 -1
  191. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +1 -1
  192. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +1 -1
  193. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-item.wrapper.js +1 -1
  194. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +1 -1
  195. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.js +4 -4
  196. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.js +1 -1
  197. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
  198. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list-item.wrapper.js +1 -1
  199. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +1 -1
  200. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.js +1 -1
  201. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
  202. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.js +1 -1
  203. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +57 -4
  204. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +57 -6
  205. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +59 -10
  206. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +57 -17
  207. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +55 -3
  208. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +2 -2
  209. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.js +2 -1
  210. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +20 -0
  211. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.js +2 -2
  212. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.js +1 -0
  213. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.js +1 -0
  214. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.js +2 -2
  215. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.js +2 -1
  216. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +20 -0
  217. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +3 -2
  218. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +3 -7
  219. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +56 -5
  220. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.js +65 -14
  221. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +59 -5
  222. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +54 -3
  223. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.js +57 -9
  224. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +61 -4
  225. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +56 -4
  226. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.js +59 -9
  227. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.js +2 -2
  228. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +57 -4
  229. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.js +58 -6
  230. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +56 -4
  231. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.js +0 -1
  232. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.js +57 -5
  233. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +55 -3
  234. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +55 -3
  235. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.js +57 -8
  236. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.js +55 -3
  237. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.js +55 -3
  238. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +55 -3
  239. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +55 -3
  240. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +57 -5
  241. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +56 -4
  242. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +63 -17
  243. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +1 -3
  244. package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.js +2 -2
  245. package/ssr/components-react/projects/react-ssr-wrapper/src/public-api.js +4 -0
  246. package/ssr/esm/components/dist/styles/esm/styles-entry.js +1567 -1707
  247. package/ssr/esm/components/dist/utils/esm/utils-entry.js +317 -265
  248. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +1 -1
  249. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +1 -1
  250. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.js +1 -1
  251. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.js +4 -4
  252. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.js +4 -4
  253. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +1 -1
  254. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
  255. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.js +2 -1
  256. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.js +36 -0
  257. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +1 -1
  258. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.js +4 -4
  259. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.js +2 -1
  260. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.js +2 -1
  261. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.js +3 -4
  262. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.js +2 -1
  263. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.js +36 -0
  264. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.js +2 -1
  265. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
  266. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +1 -1
  267. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.js +4 -4
  268. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +2 -1
  269. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
  270. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.js +1 -1
  271. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/marque.wrapper.js +1 -1
  272. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +1 -1
  273. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +1 -1
  274. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.js +4 -4
  275. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.js +4 -4
  276. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +1 -1
  277. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.js +3 -3
  278. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +1 -1
  279. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.js +1 -1
  280. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.js +1 -1
  281. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal-item.wrapper.js +1 -1
  282. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +1 -1
  283. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +4 -4
  284. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-body.wrapper.js +1 -1
  285. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-cell.wrapper.js +1 -1
  286. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-cell.wrapper.js +1 -1
  287. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-row.wrapper.js +1 -1
  288. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head.wrapper.js +1 -1
  289. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-row.wrapper.js +1 -1
  290. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +1 -1
  291. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +1 -1
  292. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-item.wrapper.js +1 -1
  293. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +1 -1
  294. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.js +4 -4
  295. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.js +1 -1
  296. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
  297. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list-item.wrapper.js +1 -1
  298. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +1 -1
  299. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.js +1 -1
  300. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
  301. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.js +1 -1
  302. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +59 -6
  303. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +58 -7
  304. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.js +2 -2
  305. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +60 -11
  306. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +59 -19
  307. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +57 -5
  308. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +3 -3
  309. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.js +3 -2
  310. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +18 -0
  311. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.js +2 -2
  312. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.js +1 -0
  313. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.js +1 -0
  314. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.js +2 -2
  315. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.js +2 -1
  316. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +18 -0
  317. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +6 -5
  318. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +6 -10
  319. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +58 -7
  320. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.js +67 -16
  321. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +60 -6
  322. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +56 -5
  323. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.js +59 -11
  324. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +61 -4
  325. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +56 -4
  326. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.js +59 -9
  327. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.js +2 -2
  328. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +57 -4
  329. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.js +59 -7
  330. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +56 -4
  331. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.js +1 -2
  332. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.js +57 -5
  333. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +55 -3
  334. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +55 -3
  335. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.js +58 -9
  336. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.js +55 -3
  337. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.js +55 -3
  338. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +55 -3
  339. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +55 -3
  340. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +58 -6
  341. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +59 -7
  342. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +63 -17
  343. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +2 -4
  344. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.js +2 -2
  345. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.js +2 -0
  346. package/ssr/lib/components/accordion.wrapper.d.ts +5 -5
  347. package/ssr/lib/components/button-pure.wrapper.d.ts +9 -17
  348. package/ssr/lib/components/button.wrapper.d.ts +9 -19
  349. package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +9 -1
  350. package/ssr/lib/components/content-wrapper.wrapper.d.ts +9 -4
  351. package/ssr/lib/components/display.wrapper.d.ts +56 -0
  352. package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +9 -1
  353. package/ssr/lib/components/flex-item.wrapper.d.ts +1 -0
  354. package/ssr/lib/components/flex.wrapper.d.ts +1 -0
  355. package/ssr/lib/components/grid-item.wrapper.d.ts +1 -0
  356. package/ssr/lib/components/grid.wrapper.d.ts +5 -2
  357. package/ssr/lib/components/heading.wrapper.d.ts +56 -0
  358. package/ssr/lib/components/headline.wrapper.d.ts +8 -7
  359. package/ssr/lib/components/icon.wrapper.d.ts +11 -9
  360. package/ssr/lib/components/index.d.ts +2 -0
  361. package/ssr/lib/components/link-pure.wrapper.d.ts +15 -5
  362. package/ssr/lib/components/link-social.wrapper.d.ts +1 -0
  363. package/ssr/lib/components/link.wrapper.d.ts +7 -7
  364. package/ssr/lib/components/popover.wrapper.d.ts +9 -1
  365. package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
  366. package/ssr/lib/components/scroller.wrapper.d.ts +3 -3
  367. package/ssr/lib/components/segmented-control.wrapper.d.ts +2 -2
  368. package/ssr/lib/components/spinner.wrapper.d.ts +3 -3
  369. package/ssr/lib/components/switch.wrapper.d.ts +3 -13
  370. package/ssr/lib/components/tabs-bar.wrapper.d.ts +3 -3
  371. package/ssr/lib/components/tabs.wrapper.d.ts +3 -3
  372. package/ssr/lib/components/tag-dismissible.wrapper.d.ts +9 -1
  373. package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +9 -1
  374. package/ssr/lib/components/text.wrapper.d.ts +2 -2
  375. package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +9 -1
  376. package/ssr/lib/dsr-components/button.d.ts +0 -1
  377. package/ssr/lib/dsr-components/content-wrapper.d.ts +1 -0
  378. package/ssr/lib/dsr-components/display.d.ts +5 -0
  379. package/ssr/lib/dsr-components/flex-item.d.ts +1 -0
  380. package/ssr/lib/dsr-components/flex.d.ts +1 -0
  381. package/ssr/lib/dsr-components/grid-item.d.ts +2 -2
  382. package/ssr/lib/dsr-components/grid.d.ts +1 -0
  383. package/ssr/lib/dsr-components/heading.d.ts +5 -0
  384. package/ssr/lib/dsr-components/headline.d.ts +1 -0
  385. package/ssr/lib/dsr-components/icon.d.ts +0 -3
  386. package/ssr/lib/dsr-components/link-social.d.ts +1 -0
  387. package/ssr/lib/dsr-components/state-message.d.ts +1 -0
  388. package/ssr/lib/dsr-components/switch.d.ts +0 -1
  389. package/ssr/lib/dsr-components/textarea-wrapper.d.ts +0 -1
  390. package/ssr/lib/types.d.ts +275 -42
  391. package/styles/esm/index.js +1 -0
  392. package/styles/index.d.ts +1 -0
  393. package/styles/index.js +12 -0
  394. package/{utilities/js → styles}/package.json +1 -0
  395. package/styles/scss.scss +1 -0
  396. package/{testing.d.ts → testing/index.d.ts} +0 -0
  397. package/ssr/esm/icons/dist/module/index.js +0 -3
  398. package/ssr/icons/dist/module/index.js +0 -5
  399. package/utilities/js/esm/index.js +0 -1
  400. package/utilities/js/index.js +0 -12
  401. package/utilities/js.d.ts +0 -1
  402. package/utilities/scss.scss +0 -1
@@ -1,5 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ const isDisabledOrLoading = (disabled, loading) => {
4
+ return disabled || loading;
5
+ };
6
+
3
7
  const hasWindow = typeof window !== 'undefined';
4
8
 
5
9
  const attributeMutationMap = new Map();
@@ -35,344 +39,259 @@ const parseJSON = (prop) => {
35
39
  }
36
40
  };
37
41
 
38
- const breakpoint$1 = {
39
- xxs: '0px',
40
- xs: '480px',
41
- s: '760px',
42
- m: '1000px',
43
- l: '1300px',
44
- xl: '1760px',
45
- xxl: '1920px', // TODO: xxl missing in breakpoint customizable
46
- };
42
+ const borderRadiusSmall = '4px';
47
43
 
48
- const colorExternal = {
49
- facebook: '#1877f2',
50
- google: '#4285f4',
51
- instagram: '#e1306c',
52
- kakaotalk: '#fae300',
53
- linkedin: '#0077b5',
54
- naver: '#03cf5d',
55
- pinterest: '#e60023',
56
- reddit: '#ff4500',
57
- tiktok: '#fe2c55',
58
- twitter: '#1da1f2',
59
- wechat: '#1aad19',
60
- whatsapp: '#25d366',
61
- xing: '#006567',
62
- youtube: '#ff0000',
63
- };
44
+ const borderRadiusMedium = '8px';
64
45
 
65
- const getFocus = (opts) => {
66
- return {
67
- outline: 'transparent solid 1px',
68
- outlineOffset: opts?.offset || '2px',
69
- '&::-moz-focus-inner': {
70
- border: '0', // fix for Firefox, avoid dotted outline in button on focus
71
- },
72
- '&:focus': {
73
- outlineColor: opts?.color || 'currentColor',
74
- // why? have a look at this article https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
75
- '&:not(:focus-visible)': {
76
- outlineColor: 'transparent',
77
- },
78
- },
79
- };
80
- };
46
+ const borderWidthBase = '2px';
47
+
48
+ const _dropShadowBackgroundColor = 'rgba(0, 0, 0, 0.16)';
81
49
 
82
- const fontBehavior = {
83
- textSizeAdjust: 'none',
84
- WebkitTextSizeAdjust: 'none', // stop iOS safari from adjusting font size when screen rotation is changing
50
+ const dropShadowLowStyle = {
51
+ filter: `drop-shadow(0px 3px 8px ${_dropShadowBackgroundColor})`,
85
52
  };
86
53
 
87
54
  const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
88
55
 
89
- const fontHyphenation = {
56
+ const fontHyphenationStyle = {
90
57
  overflowWrap: 'break-word',
91
58
  hyphens: 'auto',
92
59
  };
93
60
 
94
- const fontLineHeight = 'calc(6px + 2.125ex)'; // float px values may render differently on different browsers
61
+ const fontLineHeight = 'calc(6px + 2.125ex)';
95
62
 
96
- const fontSize = {
97
- xSmall: {
98
- fontSize: '0.75rem',
99
- lineHeight: fontLineHeight,
100
- },
101
- small: {
102
- fontSize: '1rem',
103
- lineHeight: fontLineHeight,
104
- },
105
- medium: {
106
- fontSize: '1.5rem',
107
- lineHeight: fontLineHeight,
108
- },
109
- large: {
110
- fontSize: '2.25rem',
111
- lineHeight: fontLineHeight,
112
- },
113
- xLarge: {
114
- fontSize: '3.25rem',
115
- lineHeight: fontLineHeight,
116
- },
63
+ const fontSizeTextXSmall = '.875rem';
64
+
65
+ const fontSizeTextSmall = '1rem';
66
+
67
+ const fontSizeTextMedium = 'clamp(1.2rem, .12vw + 1.18rem, 1.31rem)';
68
+
69
+ const fontSizeTextLarge = 'clamp(1.44rem, .3vw + 1.38rem, 1.71rem)';
70
+
71
+ const fontSizeTextXLarge = 'clamp(1.73rem, .57vw + 1.61rem, 2.24rem)';
72
+
73
+ const fontSizeText = {
74
+ xSmall: fontSizeTextXSmall,
75
+ small: fontSizeTextSmall,
76
+ medium: fontSizeTextMedium,
77
+ large: fontSizeTextLarge,
78
+ xLarge: fontSizeTextXLarge,
117
79
  };
118
80
 
81
+ const fontSizeHeadingSmall = fontSizeTextSmall;
82
+
83
+ const fontSizeHeadingMedium = fontSizeTextMedium;
84
+
85
+ const fontSizeHeadingLarge = fontSizeTextLarge;
86
+
87
+ const fontSizeHeadingXLarge = fontSizeTextXLarge;
88
+
89
+ const fontSizeHeadingXXLarge = 'clamp(2.07rem, .96vw + 1.88rem, 2.94rem)';
90
+
91
+ const fontSizeHeadingXXXLarge = 'clamp(2.49rem, 1.51vw + 2.19rem, 3.84rem)';
92
+
93
+ const fontSizeDisplayMedium = 'clamp(2.07rem, 3.32vw + 1.41rem, 5.06rem)';
94
+
95
+ const fontSizeDisplayLarge = 'clamp(2.49rem, 5.67vw + 1.35rem, 7.59rem)';
96
+
97
+ const fontWeightRegular = 400;
98
+
99
+ const fontWeightSemiBold$1 = 600;
100
+
101
+ const fontWeightBold = 700;
102
+
119
103
  const fontWeight = {
120
- thin: 100,
121
- regular: 400,
122
- semiBold: 600,
123
- bold: 700,
104
+ regular: fontWeightRegular,
105
+ semiBold: fontWeightSemiBold$1,
106
+ bold: fontWeightBold,
124
107
  };
125
108
 
126
- const fontStyle = 'normal';
109
+ const fontStyleNormal = 'normal';
127
110
 
128
- const fontVariant = 'normal';
111
+ const fontStyleItalic = 'italic';
129
112
 
130
- const gridMaxWidth = '120rem';
113
+ const fontVariant = 'normal';
131
114
 
132
- // TODO: reduce to one const by using clamp() + pow() as soon as browser support is given
133
- // Read this article on how to apply and calculate poly fluid sizing: https://www.smashingmagazine.com/2017/05/fluid-responsive-typography-css-poly-fluid-sizing/
134
- const gridSafeZone = {
135
- base: 'max(1rem, 7vw)',
136
- xl: 'min(calc(43vw - 39.6rem), 12rem)',
115
+ const backdropFilter = 'blur(32px)';
116
+ const frostedGlassStyle = {
117
+ WebkitBackdropFilter: backdropFilter,
118
+ backdropFilter,
137
119
  };
138
120
 
139
- /* Auto Generated Start */
121
+ const breakpointBase = '0px';
122
+
123
+ const breakpointXS = '480px';
124
+
125
+ const breakpointS = '760px';
126
+
127
+ const breakpointM = '1000px';
128
+
129
+ const breakpointL = '1300px';
130
+
131
+ const breakpointXL = '1760px';
132
+
133
+ const breakpointXXL = '1920px';
134
+
140
135
  const breakpoint = {
141
- "xxs": 0,
142
- "xs": 480,
143
- "s": 760,
144
- "m": 1000,
145
- "l": 1300,
146
- "xl": 1760,
147
- "xxl": 1920
148
- };
149
- function mediaQueryMin(min) {
150
- return `@media(min-width:${breakpoint[min]}px)`;
151
- }
152
- function mediaQueryMinMax(min, max) {
153
- return `${mediaQueryMin(min)} and (max-width:${breakpoint[max] - 1}px)`;
136
+ base: breakpointBase,
137
+ xs: breakpointXS,
138
+ s: breakpointS,
139
+ m: breakpointM,
140
+ l: breakpointL,
141
+ xl: breakpointXL,
142
+ xxl: breakpointXXL,
143
+ };
144
+
145
+ function getMediaQueryMin(min) {
146
+ return `@media(min-width:${breakpoint[min]})`;
154
147
  }
155
148
 
156
- const spacing = {
157
- xSmall: '0.25rem',
158
- small: '0.5rem',
159
- medium: '1rem',
160
- large: '2rem',
161
- xLarge: '3rem',
162
- xxLarge: '5rem',
163
- };
149
+ const gridGap = 'clamp(16px, 3.6vw, 36px)';
164
150
 
165
- const headingXXLarge = {
166
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 2rem/${fontLineHeight} ${fontFamily}`,
167
- ...fontBehavior,
168
- [mediaQueryMinMax('s', 'm')]: {
169
- fontSize: '2.625rem',
170
- },
171
- [mediaQueryMinMax('m', 'l')]: {
172
- fontSize: '3.25rem',
173
- },
174
- [mediaQueryMinMax('l', 'xl')]: {
175
- fontSize: '3.875rem',
176
- },
177
- [mediaQueryMin('xl')]: {
178
- fontSize: '4.5rem',
179
- },
180
- };
151
+ const gridWidthMin = '320px';
181
152
 
182
- const headingXLarge = {
183
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1.75rem/${fontLineHeight} ${fontFamily}`,
184
- ...fontBehavior,
185
- [mediaQueryMinMax('s', 'm')]: {
186
- fontSize: '2.25rem',
187
- },
188
- [mediaQueryMinMax('m', 'l')]: {
189
- fontSize: '2.75rem',
190
- },
191
- [mediaQueryMinMax('l', 'xl')]: {
192
- fontSize: '3.25rem',
193
- },
194
- [mediaQueryMin('xl')]: {
195
- fontSize: '3.75rem',
196
- },
197
- };
153
+ const gridWidthMax = '2560px';
198
154
 
199
- const headingLarge = {
200
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1.5rem/${fontLineHeight} ${fontFamily}`,
201
- ...fontBehavior,
202
- [mediaQueryMinMax('s', 'm')]: {
203
- fontSize: '1.875rem',
204
- },
205
- [mediaQueryMinMax('m', 'l')]: {
206
- fontSize: '2.25rem',
207
- },
208
- [mediaQueryMinMax('l', 'xl')]: {
209
- fontSize: '2.625rem',
210
- },
211
- [mediaQueryMin('xl')]: {
212
- fontSize: '3rem',
213
- },
214
- };
155
+ // fluid sizing calculated by https://fluidtypography.com/#app-get-started
156
+ // gridSafeZoneBase: Viewport Width Range = 320 - 1920px / Size Range = 22 - 192px
157
+ const gridSafeZoneBase = 'clamp(22px, 10.625vw - 12px, 192px)';
215
158
 
216
- const headingMedium = {
217
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1.25rem/${fontLineHeight} ${fontFamily}`,
218
- ...fontBehavior,
219
- [mediaQueryMinMax('s', 'm')]: {
220
- fontSize: '1.5rem',
221
- },
222
- [mediaQueryMinMax('m', 'l')]: {
223
- fontSize: '1.75rem',
224
- },
225
- [mediaQueryMinMax('l', 'xl')]: {
226
- fontSize: '2rem',
227
- },
228
- [mediaQueryMin('xl')]: {
229
- fontSize: '2.25rem',
230
- },
231
- };
159
+ // fluid sizing calculated by https://fluidtypography.com/#app-get-started
160
+ // gridSafeZoneXXL: Viewport Width Range = 1920 - 2560px / Size Range = 192 - 512px
161
+ const gridSafeZoneXXL = 'clamp(192px, 50vw - 768px, 512px)';
232
162
 
233
- const headingSmall = {
234
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1rem/${fontLineHeight} ${fontFamily}`,
235
- ...fontBehavior,
236
- [mediaQueryMinMax('s', 'm')]: {
237
- fontSize: '1.125rem',
238
- },
239
- [mediaQueryMinMax('m', 'l')]: {
240
- fontSize: '1.25rem',
241
- },
242
- [mediaQueryMinMax('l', 'xl')]: {
243
- fontSize: '1.375rem',
163
+ const gridFullColumnStart = 'full-start';
164
+
165
+ const gridExtendedColumnStart = 'extended-start';
166
+
167
+ const gridBasicColumnStart = 'basic-start';
168
+
169
+ const gridNarrowColumnStart = 'narrow-start';
170
+
171
+ const gridNarrowColumnEnd = 'narrow-end';
172
+
173
+ const gridBasicColumnEnd = 'basic-end';
174
+
175
+ const gridExtendedColumnEnd = 'extended-end';
176
+
177
+ const gridFullColumnEnd = 'full-end';
178
+
179
+ const _cssVariableGridExtendedSpanOneHalf = '--pds-grid-extended-span-one-half';
180
+ const _cssVariableGridBasicSpanOneHalf = '--pds-grid-basic-span-one-half';
181
+ const _cssVariableGridBasicSpanOneThird = '--pds-grid-basic-span-one-third';
182
+ const _cssVariableGridBasicSpanTwoThirds = '--pds-grid-basic-span-two-thirds';
183
+ const _cssVariableGridNarrowSpanOneHalf = '--pds-grid-narrow-span-one-half';
184
+
185
+ const _gridColumnSpan = 'span';
186
+ const _cssVariableInternalGridSafeZone = '--pds-internal-grid-safe-zone';
187
+ const getColumns = (repeat) => `repeat(${repeat}, minmax(0, 1fr))`;
188
+ const getOuterColumn = () => `minmax(0, calc(var(${_cssVariableInternalGridSafeZone}) - ${gridGap}))`;
189
+ const getGridTemplateColumns = (layout) => layout === 'mobile'
190
+ ? `[${gridFullColumnStart}] ${getOuterColumn()} [${gridExtendedColumnStart} ${gridBasicColumnStart} ${gridNarrowColumnStart}] ${getColumns(6)} [${gridNarrowColumnEnd} ${gridBasicColumnEnd} ${gridExtendedColumnEnd}] ${getOuterColumn()} [${gridFullColumnEnd}]`
191
+ : `[${gridFullColumnStart}] ${getOuterColumn()} [${gridExtendedColumnStart}] ${getColumns(1)} [${gridBasicColumnStart}] ${getColumns(2)} [${gridNarrowColumnStart}] ${getColumns(8)} [${gridNarrowColumnEnd}] ${getColumns(2)} [${gridBasicColumnEnd}] ${getColumns(1)} [${gridExtendedColumnEnd}] ${getOuterColumn()} [${gridFullColumnEnd}]`;
192
+ ({
193
+ [_cssVariableInternalGridSafeZone]: gridSafeZoneBase,
194
+ [_cssVariableGridExtendedSpanOneHalf]: `${_gridColumnSpan} 3`,
195
+ [_cssVariableGridBasicSpanOneHalf]: `${_gridColumnSpan} 3`,
196
+ [_cssVariableGridBasicSpanOneThird]: `${_gridColumnSpan} 2`,
197
+ [_cssVariableGridBasicSpanTwoThirds]: `${_gridColumnSpan} 4`,
198
+ [_cssVariableGridNarrowSpanOneHalf]: `${_gridColumnSpan} 3`,
199
+ display: 'grid',
200
+ gridGap,
201
+ gridTemplateColumns: getGridTemplateColumns('mobile'),
202
+ minWidth: gridWidthMin,
203
+ maxWidth: gridWidthMax,
204
+ margin: 0,
205
+ padding: `0 max(0px, (100% - ${gridWidthMax}) / 2)`,
206
+ boxSizing: 'content-box',
207
+ [getMediaQueryMin('s')]: {
208
+ // TODO: we should define those css variables in global scope by getInitialStyles() partial to reduce repetitive css declaration,
209
+ // on the other hand, it's not necessary anymore as soon as CSS Subgrid is supported in all major browsers.
210
+ // In addition, it wouldn't work in case only utilities are used without getInitialStyles() partials.
211
+ // So maybe, keep it as is.
212
+ [_cssVariableGridExtendedSpanOneHalf]: `${_gridColumnSpan} 7`,
213
+ [_cssVariableGridBasicSpanOneHalf]: `${_gridColumnSpan} 6`,
214
+ [_cssVariableGridBasicSpanOneThird]: `${_gridColumnSpan} 4`,
215
+ [_cssVariableGridBasicSpanTwoThirds]: `${_gridColumnSpan} 8`,
216
+ [_cssVariableGridNarrowSpanOneHalf]: `${_gridColumnSpan} 4`,
217
+ gridTemplateColumns: getGridTemplateColumns('desktop'),
244
218
  },
245
- [mediaQueryMin('xl')]: {
246
- fontSize: '1.5rem',
219
+ [getMediaQueryMin('xxl')]: {
220
+ [_cssVariableInternalGridSafeZone]: gridSafeZoneXXL,
247
221
  },
248
- };
222
+ });
249
223
 
250
- const headingXSmall = {
251
- font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1rem/${fontLineHeight} ${fontFamily}`,
252
- ...fontBehavior,
253
- };
224
+ function getMediaQueryMax(max) {
225
+ return `@media(max-width:${breakpoint[max].slice(0, -2) - 1}px)`;
226
+ }
227
+
228
+ function getMediaQueryMinMax(min, max) {
229
+ return `@media(min-width:${breakpoint[min]}) and (max-width:${breakpoint[max].slice(0, -2) - 1}px)`;
230
+ }
254
231
 
255
- const textXSmall = {
256
- font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 0.75rem/${fontLineHeight} ${fontFamily}`,
257
- ...fontBehavior,
258
- ...fontHyphenation,
232
+ const spacingStaticXSmall = '4px';
233
+
234
+ const spacingStaticSmall = '8px';
235
+
236
+ const spacingStaticMedium = '16px';
237
+
238
+ const spacingStaticLarge = '32px';
239
+
240
+ const themeDarkBackgroundShading = 'rgba(1, 2, 5, 0.67)';
241
+
242
+ const _displayFontPartA = `${fontStyleItalic} ${fontVariant} ${fontWeightSemiBold$1} `;
243
+ const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
244
+
245
+ const displayMediumStyle = {
246
+ font: `${_displayFontPartA}${fontSizeDisplayMedium}${_displayFontPartB}`,
259
247
  };
260
248
 
261
- const textSmall = {
262
- font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 1rem/${fontLineHeight} ${fontFamily}`,
263
- ...fontBehavior,
264
- ...fontHyphenation,
249
+ const displayLargeStyle = {
250
+ font: `${_displayFontPartA}${fontSizeDisplayLarge}${_displayFontPartB}`,
265
251
  };
266
252
 
267
- const textMedium = {
268
- font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 1.5rem/${fontLineHeight} ${fontFamily}`,
269
- ...fontBehavior,
270
- ...fontHyphenation,
253
+ const _headingFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightSemiBold$1} `;
254
+ const _headingFontPartB = `/${fontLineHeight} ${fontFamily}`;
255
+
256
+ const headingSmallStyle = {
257
+ font: `${_headingFontPartA}${fontSizeHeadingSmall}${_headingFontPartB}`,
271
258
  };
272
259
 
273
- const textLarge = {
274
- font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 2.25rem/${fontLineHeight} ${fontFamily}`,
275
- ...fontBehavior,
276
- ...fontHyphenation,
260
+ const headingMediumStyle = {
261
+ font: `${_headingFontPartA}${fontSizeHeadingMedium}${_headingFontPartB}`,
277
262
  };
278
263
 
279
- const textXLarge = {
280
- font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 3.25rem/${fontLineHeight} ${fontFamily}`,
281
- ...fontBehavior,
282
- ...fontHyphenation,
264
+ const headingLargeStyle = {
265
+ font: `${_headingFontPartA}${fontSizeHeadingLarge}${_headingFontPartB}`,
283
266
  };
284
267
 
285
- const themeLight$1 = {
286
- brand: '#d5001c',
287
- base: '#000',
288
- background: {
289
- base: '#fff',
290
- surface: '#f2f2f2',
291
- shading: 'rgba(14, 20, 24, 0.9)',
292
- },
293
- contrast: {
294
- high: '#323639',
295
- medium: '#626669',
296
- low: '#e3e4e5',
297
- },
298
- notification: {
299
- success: '#018a16',
300
- successSoft: '#e5f3e7',
301
- warning: '#ff9b00',
302
- warningSoft: '#fff5e5',
303
- error: '#e00000',
304
- errorSoft: '#fae6e6',
305
- neutral: '#0061bd',
306
- neutralSoft: '#e5eff8',
307
- },
308
- state: {
309
- hover: '#d5001c',
310
- active: '#d5001c',
311
- focus: 'currentColor',
312
- disabled: '#96989a',
313
- },
268
+ const headingXXLargeStyle = {
269
+ font: `${_headingFontPartA}${fontSizeHeadingXXLarge}${_headingFontPartB}`,
314
270
  };
315
271
 
316
- ({
317
- ...themeLight$1,
318
- brand: '#00b0f4',
319
- state: {
320
- ...themeLight$1.state,
321
- hover: '#00b0f4',
322
- active: '#00b0f4',
323
- },
324
- });
272
+ const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
273
+ const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
325
274
 
326
- const themeDark$1 = {
327
- brand: '#d5001c',
328
- base: '#fff',
329
- background: {
330
- base: '#0e1418',
331
- surface: '#262b2e',
332
- shading: 'rgba(14, 20, 24, 0.9)',
333
- },
334
- contrast: {
335
- high: '#e3e4e5',
336
- medium: '#b0b1b2',
337
- low: '#4a4e51',
338
- },
339
- notification: {
340
- success: '#01ba1d',
341
- successSoft: '#bfeec6',
342
- warning: '#ff9b00',
343
- warningSoft: '#ffe6bf',
344
- error: '#fc1717',
345
- errorSoft: '#fec5c5',
346
- neutral: '#2193ff',
347
- neutralSoft: '#c7e4ff',
348
- },
349
- state: {
350
- hover: '#ff0223',
351
- active: '#ff0223',
352
- focus: 'currentColor',
353
- disabled: '#7c7f81',
354
- },
275
+ const textXSmallStyle = {
276
+ font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
277
+ ...fontHyphenationStyle,
355
278
  };
356
279
 
357
- ({
358
- ...themeDark$1,
359
- brand: '#00b0f4',
360
- state: {
361
- ...themeDark$1.state,
362
- hover: '#00b0f4',
363
- active: '#00b0f4',
364
- },
365
- });
280
+ const textSmallStyle = {
281
+ font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
282
+ ...fontHyphenationStyle,
283
+ };
366
284
 
367
- const mediaQueries = Object.entries(breakpoint$1)
285
+ // TODO: we shouldn't exclude xxl breakpoint
286
+ const mediaQueries = Object.entries(breakpoint)
368
287
  .filter(([key]) => key !== 'xxl')
369
288
  .map(([, val]) => `(min-width:${val})`);
370
289
  hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
371
290
 
372
- Object.entries(breakpoint$1).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [val]: key })), {});
291
+ Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [val]: key })), {});
373
292
 
374
- const hasVisibleIcon = (iconName) => {
375
- return iconName !== 'none';
293
+ const hasVisibleIcon = (iconName, iconSource) => {
294
+ return iconName !== 'none' || !!iconSource;
376
295
  };
377
296
 
378
297
  const childrenMutationMap = new Map();
@@ -560,8 +479,6 @@ debounce(800, (el, ariaElement) => {
560
479
  ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
561
480
  });
562
481
 
563
- const isVisibleFormState = (state) => state === 'success' || state === 'error';
564
-
565
482
  function _extends() {
566
483
  _extends = Object.assign ? Object.assign.bind() : function (target) {
567
484
  for (var i = 1; i < arguments.length; i++) {
@@ -3768,64 +3685,84 @@ var dist = jssCombineAndSortMQ;
3768
3685
 
3769
3686
  /* Auto Generated Start */
3770
3687
  const themeLight = {
3771
- baseColor: '#000',
3772
- baseColorDarken: '#000000',
3773
- brandColor: '#d5001c',
3774
- backgroundColor: '#fff',
3775
- backgroundSurfaceColor: '#f2f2f2',
3776
- contrastLowColor: '#e3e4e5',
3777
- contrastMediumColor: '#626669',
3778
- contrastHighColor: '#323639',
3779
- contrastHighColorDarken: '#151718',
3780
- hoverColor: '#d5001c',
3781
- hoverColorDarken: '#980014',
3782
- activeColor: '#d5001c',
3783
- focusColor: 'currentColor',
3784
- disabledColor: '#96989a',
3785
- errorColor: '#e00000',
3786
- errorColorDarken: '#a30000',
3787
- errorSoftColor: '#fae6e6',
3788
- successColor: '#018a16',
3789
- successColorDarken: '#014d0c',
3790
- successSoftColor: '#e5f3e7',
3791
- warningColor: '#ff9b00',
3792
- warningSoftColor: '#fff5e5',
3793
- neutralColor: '#0061bd',
3794
- neutralSoftColor: '#e5eff8'
3688
+ primaryColor: '#010205',
3689
+ primaryColorDarken: '#000000',
3690
+ backgroundColor: '#FFF',
3691
+ backgroundColorDarken: '#E0E0E0',
3692
+ backgroundColorLighten: '#FFFFFF',
3693
+ backgroundSurfaceColor: '#EEEFF2',
3694
+ backgroundSurfaceColorDarken: '#CBCED7',
3695
+ backgroundSurfaceColorLighten: '#FFFFFF',
3696
+ contrastLowColor: '#D8D8DB',
3697
+ contrastMediumColor: '#949598',
3698
+ contrastHighColor: '#535457',
3699
+ contrastHighColorDarken: '#353638',
3700
+ contrastHighColorLighten: '#717276',
3701
+ hoverColor: 'rgba(148, 149, 152, 0.20)',
3702
+ hoverColorDarken: '#75767A',
3703
+ activeColor: 'rgba(148, 149, 152, 0.20)',
3704
+ focusColor: '#0A0AFF',
3705
+ disabledColor: '#949598',
3706
+ errorColor: '#E7323B',
3707
+ errorColorDarken: '#C51720',
3708
+ errorSoftColor: '#FCE8E9',
3709
+ errorSoftColorDarken: '#EED7D9',
3710
+ errorSoftColorLighten: '#FFFFFF',
3711
+ successColor: '#32B85B',
3712
+ successColorDarken: '#258843',
3713
+ successSoftColor: '#EBFAF0',
3714
+ successSoftColorDarken: '#DDEAE1',
3715
+ successSoftColorLighten: '#FFFFFF',
3716
+ warningColor: '#FECC1B',
3717
+ warningSoftColor: '#FFF9E6',
3718
+ warningSoftColorDarken: '#F5ECD2',
3719
+ warningSoftColorLighten: '#FFFFFF',
3720
+ infoColor: '#1E5BEB',
3721
+ infoSoftColor: '#E8EEFD',
3722
+ infoSoftColorDarken: '#D6DEF0',
3723
+ infoSoftColorLighten: '#FFFFFF'
3795
3724
  };
3796
3725
  const themeDark = {
3797
- baseColor: '#fff',
3798
- baseColorDarken: '#e0e0e0',
3799
- brandColor: '#d5001c',
3800
- backgroundColor: '#0e1418',
3801
- backgroundSurfaceColor: '#262b2e',
3802
- contrastLowColor: '#4a4e51',
3803
- contrastMediumColor: '#b0b1b2',
3804
- contrastHighColor: '#e3e4e5',
3805
- contrastHighColorDarken: '#c3c5c8',
3806
- hoverColor: '#ff0223',
3807
- hoverColorDarken: '#c4001a',
3808
- activeColor: '#ff0223',
3809
- focusColor: 'currentColor',
3810
- disabledColor: '#7c7f81',
3811
- errorColor: '#fc1717',
3812
- errorColorDarken: '#d30303',
3813
- errorSoftColor: '#fec5c5',
3814
- successColor: '#01ba1d',
3815
- successColorDarken: '#017d14',
3816
- successSoftColor: '#bfeec6',
3817
- warningColor: '#ff9b00',
3818
- warningSoftColor: '#ffe6bf',
3819
- neutralColor: '#2193ff',
3820
- neutralSoftColor: '#c7e4ff'
3821
- };
3822
- const themeLightElectric = Object.assign(Object.assign({}, themeLight), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
3823
- const themeDarkElectric = Object.assign(Object.assign({}, themeDark), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
3726
+ primaryColor: '#FBFCFF',
3727
+ primaryColorDarken: '#BECEFF',
3728
+ backgroundColor: '#0E0E12',
3729
+ backgroundColorDarken: '#000000',
3730
+ backgroundColorLighten: '#292934',
3731
+ backgroundSurfaceColor: '#212225',
3732
+ backgroundSurfaceColorDarken: '#040405',
3733
+ backgroundSurfaceColorLighten: '#3E4045',
3734
+ contrastLowColor: '#404044',
3735
+ contrastMediumColor: '#7E7F82',
3736
+ contrastHighColor: '#AFB0B3',
3737
+ contrastHighColorDarken: '#909195',
3738
+ contrastHighColorLighten: '#CECFD1',
3739
+ hoverColor: 'rgba(126, 127, 130, 0.20)',
3740
+ hoverColorDarken: '#606163',
3741
+ activeColor: 'rgba(126, 127, 130, 0.20)',
3742
+ focusColor: '#0A0AFF',
3743
+ disabledColor: '#7E7F82',
3744
+ errorColor: '#CB3333',
3745
+ errorColorDarken: '#9A2727',
3746
+ errorSoftColor: '#290A0A',
3747
+ errorSoftColorDarken: '#0D0808',
3748
+ errorSoftColorLighten: '#331F1F',
3749
+ successColor: '#00C77E',
3750
+ successColorDarken: '#008A57',
3751
+ successSoftColor: '#003320',
3752
+ successSoftColorDarken: '#04110C',
3753
+ successSoftColorLighten: '#0F432F',
3754
+ warningColor: '#DDB84B',
3755
+ warningSoftColor: '#2B2208',
3756
+ warningSoftColorDarken: '#0D0C07',
3757
+ warningSoftColorLighten: '#362F1C',
3758
+ infoColor: '#027FFC',
3759
+ infoSoftColor: '#001A33',
3760
+ infoSoftColorDarken: '#040A11',
3761
+ infoSoftColorLighten: '#0F2943'
3762
+ };
3824
3763
  const themes = {
3825
3764
  'light': themeLight,
3826
- 'dark': themeDark,
3827
- 'light-electric': themeLightElectric,
3828
- 'dark-electric': themeDarkElectric
3765
+ 'dark': themeDark
3829
3766
  };
3830
3767
  /* Auto Generated End */
3831
3768
  const getThemedColors = (theme) => {
@@ -3835,16 +3772,6 @@ const getInvertedThemedColors = (theme) => {
3835
3772
  return getThemedColors(isThemeDark(theme) ? 'light' : 'dark');
3836
3773
  };
3837
3774
 
3838
- /**
3839
- * utility to wrap jss styles parameter in `@media (hover: hover)`
3840
- * which is used to not have hover styles on touch devices
3841
- */
3842
- const hoverMediaQuery = (style) =>
3843
- // puppeteer/chromium does not support `@media (hover: hover)` in headless mode
3844
- // see https://github.com/puppeteer/puppeteer/issues/5096 and https://github.com/puppeteer/puppeteer/issues/4820
3845
- ({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
3846
- ; // used for staging build in e2e and vrt tests
3847
-
3848
3775
  const transitionDuration = 'var(--p-transition-duration, .24s)';
3849
3776
  const transitionTimingFunction$1 = 'ease';
3850
3777
  const getTransition = (cssProperty) => `${cssProperty} ${transitionDuration} ${transitionTimingFunction$1}`;
@@ -3916,8 +3843,8 @@ const getTextHiddenJssStyle = (isHidden) => isHidden
3916
3843
  clipPath: 'none',
3917
3844
  whiteSpace: 'normal',
3918
3845
  };
3919
- const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content', padding: `0 0 ${pxToRemWithUnit(4)}` }));
3920
- const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `0 0 0 ${pxToRemWithUnit(8)}` }));
3846
+ const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content' }));
3847
+ const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `2px 0 0 ${spacingStaticSmall}` }));
3921
3848
  /**
3922
3849
  * Screen reader only styles to hide (text-)contents visually in the browser but grant access for screen readers
3923
3850
  */
@@ -3939,6 +3866,22 @@ const getBackfaceVisibilityJssStyle = () => ({
3939
3866
  WebkitBackfaceVisibility: 'hidden',
3940
3867
  });
3941
3868
 
3869
+ const hostHiddenStyles = {
3870
+ '&([hidden])': {
3871
+ display: 'none',
3872
+ },
3873
+ };
3874
+
3875
+ /**
3876
+ * utility to wrap jss styles parameter in `@media (hover: hover)`
3877
+ * which is used to not have hover styles on touch devices
3878
+ */
3879
+ const hoverMediaQuery = (style) =>
3880
+ // puppeteer/chromium does not support `@media (hover: hover)` in headless mode
3881
+ // see https://github.com/puppeteer/puppeteer/issues/5096 and https://github.com/puppeteer/puppeteer/issues/4820
3882
+ ({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
3883
+ ; // used for staging build in e2e and vrt tests
3884
+
3942
3885
  // NOTE: handpicked selection of plugins from jss-preset-default
3943
3886
  const jss = createJss({
3944
3887
  plugins: [
@@ -3973,7 +3916,7 @@ const buildResponsiveStyles = (rawValue, getJssStyle) => {
3973
3916
  .filter((key) => key !== 'base')
3974
3917
  .reduce((result, breakpointValue) => (Object.assign(Object.assign({}, result), {
3975
3918
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
3976
- [mediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]) })), getJssStyle(value.base))
3919
+ [getMediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]) })), getJssStyle(value.base))
3977
3920
  : getJssStyle(value);
3978
3921
  };
3979
3922
  const isObject$1 = (obj) => typeof obj === 'object' && !Array.isArray(obj);
@@ -3994,18 +3937,6 @@ const mergeDeep = (...objects) => {
3994
3937
  }, {});
3995
3938
  };
3996
3939
 
3997
- const paramCaseToCamelCase = (str) => {
3998
- return str.replace(/-(\w)/g, (_, group) => group.toUpperCase());
3999
- };
4000
-
4001
- const hasDocument = typeof document !== 'undefined';
4002
-
4003
- hasDocument && 'scrollBehavior' in document.documentElement.style;
4004
- const win = typeof window !== 'undefined' ? window : {};
4005
- win.document || { head: {} };
4006
- (win.HTMLElement || class {
4007
- });
4008
-
4009
3940
  [
4010
3941
  { name: 'Model', id: 'model' },
4011
3942
  { name: 'Interest', id: 'interest' },
@@ -5832,28 +5763,16 @@ index.setup({
5832
5763
  plugins: [...create().plugins, dist({ combineMediaQueries: true })],
5833
5764
  });
5834
5765
 
5835
- const isThemeDark = (theme) => {
5836
- return theme === 'dark';
5837
- };
5838
-
5839
- const isThemeDarkElectric = (theme) => {
5840
- return theme === 'dark-electric';
5841
- };
5842
-
5843
- const isThemeLightElectric = (theme) => {
5844
- return theme === 'light-electric';
5845
- };
5766
+ const hasDocument = typeof document !== 'undefined';
5846
5767
 
5847
- const isSizeInherit = (size) => {
5848
- return JSON.stringify(size).includes('inherit');
5849
- };
5768
+ hasDocument && 'scrollBehavior' in document.documentElement.style;
5769
+ const win = typeof window !== 'undefined' ? window : {};
5770
+ win.document || { head: {} };
5771
+ (win.HTMLElement || class {
5772
+ });
5850
5773
 
5851
- const textMap = {
5852
- 'x-small': textXSmall,
5853
- small: textSmall,
5854
- medium: textMedium,
5855
- large: textLarge,
5856
- 'x-large': textXLarge,
5774
+ const isThemeDark = (theme) => {
5775
+ return theme === 'dark';
5857
5776
  };
5858
5777
 
5859
5778
  const formatObjectOutput = (value) => {
@@ -5866,34 +5785,40 @@ const formatObjectOutput = (value) => {
5866
5785
  'value, ' +
5867
5786
  formatObjectOutput(BREAKPOINTS.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
5868
5787
 
5869
- const HEADLINE_VARIANTS = [
5870
- 'large-title',
5871
- 'headline-1',
5872
- 'headline-2',
5873
- 'headline-3',
5874
- 'headline-4',
5875
- 'headline-5',
5876
- ];
5877
- const isVariantType = (variant) => {
5878
- return HEADLINE_VARIANTS.includes(variant);
5879
- };
5788
+ const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
5880
5789
 
5881
- const getComponentCss$R = (size, compact, open, theme) => {
5882
- const { baseColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
5790
+ const getComponentCss$S = (size, compact, open, theme) => {
5791
+ const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
5883
5792
  const border = `1px solid ${contrastLowColor}`;
5884
5793
  return getCss(Object.assign(Object.assign({ '@global': {
5885
- ':host': Object.assign({ display: 'block' }, (!compact && {
5886
- '&(:first-of-type) .root': {
5887
- borderTop: border,
5794
+ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
5795
+ button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', justifyContent: 'space-between', margin: '2px 0', width: '100%', textDecoration: 'none', border: 0, outline: 0, gap: '24px', background: 'transparent', cursor: 'pointer', textAlign: 'left', color: primaryColor }, textSmallStyle), { fontWeight: fontWeight.semiBold }), buildResponsiveStyles(size, (s) => ({
5796
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5797
+ // @ts-ignore
5798
+ fontSize: fontSizeText[s],
5799
+ padding: compact ? '4px 0' : `${s === 'medium' ? '20px' : '12px'} 0`,
5800
+ }))), mergeDeep({
5801
+ '&::before': Object.assign({ content: '""', position: 'absolute', borderRadius: borderRadiusSmall, left: '-4px', right: '-4px' }, (compact
5802
+ ? {
5803
+ top: '2px',
5804
+ bottom: '2px',
5805
+ }
5806
+ : {
5807
+ top: '6px',
5808
+ bottom: '6px',
5809
+ })),
5810
+ }, hoverMediaQuery({
5811
+ '&::before': {
5812
+ transition: getTransition('background-color'),
5888
5813
  },
5889
- })),
5890
- button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', justifyContent: 'space-between', margin: `${pxToRemWithUnit(4)} 0`, width: '100%', textDecoration: 'none', border: 0, background: 'transparent', cursor: 'pointer', transition: getTransition('color'), overflow: 'hidden', textAlign: 'left', color: baseColor }, textSmall), { fontWeight: fontWeight.semiBold }), (compact
5891
- ? { padding: `${pxToRemWithUnit(4)} 0` }
5892
- : buildResponsiveStyles(size, (s) => (Object.assign(Object.assign({}, fontSize[s]), { padding: `${pxToRemWithUnit(s === 'medium' ? 20 : 12)} 0` }))))), getFocusJssStyle({ color: focusColor })), hoverMediaQuery({
5893
- '&:hover': {
5894
- color: hoverColor,
5814
+ '&:hover::before': {
5815
+ background: hoverColor,
5895
5816
  },
5896
- })),
5817
+ }))), { '&:focus::before': {
5818
+ border: `${borderWidthBase} solid ${focusColor}`,
5819
+ }, '&:not(:focus-visible)::before': {
5820
+ border: 0,
5821
+ } }),
5897
5822
  } }, (!compact && {
5898
5823
  root: {
5899
5824
  borderBottom: border,
@@ -5904,14 +5829,13 @@ const getComponentCss$R = (size, compact, open, theme) => {
5904
5829
  }, icon: {
5905
5830
  width: fontLineHeight,
5906
5831
  height: fontLineHeight,
5907
- marginLeft: '1.5rem',
5908
5832
  transformOrigin: '50% 50%',
5909
- transform: open ? 'rotate3d(0,0,1,180deg)' : 'rotate3d(0,0,1,0.0001deg)',
5833
+ transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
5910
5834
  transition: getTransition('transform'),
5911
5835
  }, collapsible: Object.assign({ padding: 0, overflow: 'hidden' }, (open
5912
5836
  ? {
5913
5837
  height: 'auto',
5914
- paddingBottom: compact ? spacing.small : '2.5rem',
5838
+ paddingBottom: compact ? spacingStaticSmall : '24px',
5915
5839
  visibility: 'visible',
5916
5840
  transition: getTransition('height') + `,visibility ${transitionDuration}`,
5917
5841
  animation: `$open ${transitionDuration} ease forwards`,
@@ -5937,19 +5861,44 @@ const MODAL_Z_INDEX = 99999;
5937
5861
  const POPOVER_Z_INDEX = 9999;
5938
5862
  const BANNER_Z_INDEX = 99;
5939
5863
 
5940
- const bannerPositionTypeVar = '--p-banner-position-type';
5941
- const bannerPositionTopVar = '--p-banner-position-top';
5942
- const bannerPositionBottomVar = '--p-banner-position-bottom';
5943
- const bannerZIndexVar = '--p-banner-z-index';
5944
- const bannerAnimationDurationVar = '--p-animation-duration__banner';
5864
+ const oneColumnWidthS = `calc((100% - ${gridSafeZoneBase} * 2 - ${gridGap} * 13) / 14)`;
5865
+ const oneColumnWidthXXL = `calc((min(100%, ${gridWidthMax}) - ${gridSafeZoneXXL} * 2 - ${gridGap} * 13) / 14)`;
5866
+ const offsetHorizontalXXL = `max(0px, (100% - ${gridWidthMax}) / 2)`;
5867
+ const widthMap$1 = {
5868
+ narrow: {
5869
+ padding: `0 ${gridSafeZoneBase}`,
5870
+ [getMediaQueryMin('s')]: {
5871
+ padding: `0 calc(${gridSafeZoneBase} + ${gridGap} * 3 + ${oneColumnWidthS} * 3)`,
5872
+ },
5873
+ [getMediaQueryMin('xxl')]: {
5874
+ padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} * 3 + ${oneColumnWidthXXL} * 3)`,
5875
+ },
5876
+ },
5877
+ basic: {
5878
+ padding: `0 ${gridSafeZoneBase}`,
5879
+ [getMediaQueryMin('s')]: {
5880
+ padding: `0 calc(${gridSafeZoneBase} + ${gridGap} + ${oneColumnWidthS})`,
5881
+ },
5882
+ [getMediaQueryMin('xxl')]: {
5883
+ padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} + ${oneColumnWidthXXL})`,
5884
+ },
5885
+ },
5886
+ extended: {
5887
+ padding: `0 ${gridSafeZoneBase}`,
5888
+ [getMediaQueryMin('xxl')]: {
5889
+ padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL})`,
5890
+ },
5891
+ },
5892
+ };
5893
+ const getContentWrapperStyle = (width) => {
5894
+ return Object.assign({ display: 'block', margin: 0, padding: `0 ${offsetHorizontalXXL}`, width: 'auto', minWidth: 0, maxWidth: gridWidthMax }, widthMap$1[width]);
5895
+ };
5896
+
5945
5897
  const easeInQuad = 'cubic-bezier(0.45,0,0.55,1)';
5946
5898
  const easeOutQuad = 'cubic-bezier(0.5,1,0.89,1)';
5947
5899
  const ANIMATION_DURATION = 600;
5948
- const mediaQueryS$2 = mediaQueryMin('s');
5949
- const mediaQueryXxs = mediaQueryMinMax('xxs', 's');
5950
5900
  const getBoxShadow = () => ({
5951
- boxShadow: `0 ${pxToRemWithUnit(2)} ${pxToRemWithUnit(4)} 0 rgba(0,0,0,0.05),` +
5952
- `0 ${pxToRemWithUnit(15)} ${pxToRemWithUnit(20)} 0 rgba(0,0,0,0.2)`,
5901
+ boxShadow: '0 2px 4px 0 rgba(0,0,0,0.05),0 15px 20px 0 rgba(0,0,0,0.2)',
5953
5902
  });
5954
5903
  const getAnimationIn = (keyframesName, durationVar) => {
5955
5904
  const duration = durationVar ? `var(${durationVar},${ANIMATION_DURATION}ms)` : `${ANIMATION_DURATION}ms`;
@@ -5976,39 +5925,43 @@ const getKeyframesMobile = (direction, bottomVar) => getKeyframes(direction, {
5976
5925
  opacity: 0,
5977
5926
  transform: `translate3d(0,calc(var(${bottomVar}) + 100%),0)`, // space before and after "+" is crucial
5978
5927
  });
5928
+
5929
+ const bannerPositionTypeVar = '--p-banner-position-type';
5930
+ const bannerPositionTopVar = '--p-banner-position-top';
5931
+ const bannerPositionBottomVar = '--p-banner-position-bottom';
5932
+ const bannerZIndexVar = '--p-internal-banner-z-index';
5933
+ const bannerAnimationDurationVar = '--p-animation-duration';
5934
+ const bannerOffset = '56px';
5935
+ const mediaQueryBase = getMediaQueryMinMax('base', 's');
5936
+ const mediaQueryS$1 = getMediaQueryMin('s');
5979
5937
  const getKeyframesDesktop = (direction, topVar) => getKeyframes(direction, {
5980
5938
  opacity: 0,
5981
5939
  transform: `translate3d(0,calc(-100% - var(${topVar})),0)`, // space before and after "-" is crucial
5982
5940
  });
5983
- const getComponentCss$Q = () => {
5941
+ const widthMap = {
5942
+ fluid: 'extended',
5943
+ extended: 'extended',
5944
+ basic: 'basic',
5945
+ };
5946
+ const getComponentCss$R = (width) => {
5984
5947
  return getCss({
5985
5948
  '@global': {
5986
- ':host': {
5949
+ ':host': Object.assign(Object.assign({
5987
5950
  // TODO: Why is nothing set as important here?
5988
- [bannerPositionTopVar]: pxToRemWithUnit(56),
5989
- [bannerPositionBottomVar]: pxToRemWithUnit(56),
5990
- display: 'block',
5991
- position: `var(${bannerPositionTypeVar},fixed)`,
5992
- zIndex: `var(${bannerZIndexVar},${BANNER_Z_INDEX})`,
5993
- opacity: 0,
5994
- left: 0,
5995
- right: 0,
5996
- willChange: 'opacity,transform',
5997
- [mediaQueryXxs]: {
5951
+ [bannerPositionTopVar]: bannerOffset, [bannerPositionBottomVar]: bannerOffset, display: 'block', position: `var(${bannerPositionTypeVar},fixed)`, zIndex: `var(${bannerZIndexVar},${BANNER_Z_INDEX})`, opacity: 0, left: 0, right: 0, willChange: 'opacity,transform' }, mergeDeep(addImportantToEachRule(Object.assign(Object.assign({}, getContentWrapperStyle(widthMap[width])), hostHiddenStyles)), {
5952
+ [mediaQueryBase]: {
5998
5953
  bottom: `var(${bannerPositionBottomVar})`,
5999
5954
  },
6000
- [mediaQueryS$2]: {
5955
+ [mediaQueryS$1]: {
6001
5956
  top: `var(${bannerPositionTopVar})`,
6002
5957
  },
6003
- '&(.hydrated),&(.ssr)': {
6004
- [mediaQueryXxs]: getAnimationIn('mobileIn', bannerAnimationDurationVar),
6005
- [mediaQueryS$2]: getAnimationIn('desktopIn', bannerAnimationDurationVar),
6006
- },
6007
- '&(.banner--close)': {
6008
- [mediaQueryXxs]: getAnimationOut('mobileOut'),
6009
- [mediaQueryS$2]: getAnimationOut('desktopOut'),
6010
- },
6011
- },
5958
+ })), { '&(.hydrated),&(.ssr)': {
5959
+ [mediaQueryBase]: getAnimationIn('mobileIn', bannerAnimationDurationVar),
5960
+ [mediaQueryS$1]: getAnimationIn('desktopIn', bannerAnimationDurationVar),
5961
+ }, '&(.banner--close)': {
5962
+ [mediaQueryBase]: getAnimationOut('mobileOut'),
5963
+ [mediaQueryS$1]: getAnimationOut('desktopOut'),
5964
+ } }),
6012
5965
  '@keyframes mobileIn': getKeyframesMobile('in', bannerPositionBottomVar),
6013
5966
  '@keyframes mobileOut': getKeyframesMobile('out', bannerPositionBottomVar),
6014
5967
  '@keyframes desktopIn': getKeyframesDesktop('in', bannerPositionTopVar),
@@ -6018,7 +5971,6 @@ const getComponentCss$Q = () => {
6018
5971
  });
6019
5972
  };
6020
5973
 
6021
- const { medium: spacingMedium$2, small: spacingSmall$2 } = spacing;
6022
5974
  const getDirectionJssStyle = (direction) => {
6023
5975
  const style = {
6024
5976
  column: {
@@ -6030,8 +5982,8 @@ const getDirectionJssStyle = (direction) => {
6030
5982
  row: {
6031
5983
  flexFlow: 'row wrap',
6032
5984
  alignItems: 'center',
6033
- marginRight: `-${spacingSmall$2}`,
6034
- marginLeft: `-${spacingSmall$2}`,
5985
+ marginRight: `-${spacingStaticSmall}`,
5986
+ marginLeft: `-${spacingStaticSmall}`,
6035
5987
  },
6036
5988
  };
6037
5989
  return style[direction];
@@ -6043,301 +5995,222 @@ const getDirectionSlottedJssStyle = (direction) => {
6043
5995
  marginLeft: 0,
6044
5996
  },
6045
5997
  row: {
6046
- marginRight: spacingSmall$2,
6047
- marginLeft: spacingSmall$2,
5998
+ marginRight: spacingStaticSmall,
5999
+ marginLeft: spacingStaticSmall,
6048
6000
  },
6049
6001
  };
6050
6002
  return style[direction];
6051
6003
  };
6052
- const getComponentCss$P = (direction) => {
6004
+ const getComponentCss$Q = (direction) => {
6053
6005
  return getCss({
6054
6006
  '@global': {
6055
- ':host': {
6056
- display: 'block',
6057
- },
6058
- div: Object.assign({ display: 'flex', marginTop: `-${spacingMedium$2}` }, buildResponsiveStyles(direction, getDirectionJssStyle)),
6059
- '::slotted(*)': addImportantToEachRule(Object.assign({ marginTop: spacingMedium$2 }, buildResponsiveStyles(direction, getDirectionSlottedJssStyle))),
6007
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6008
+ div: Object.assign({ display: 'flex', marginTop: `-${spacingStaticMedium}` }, buildResponsiveStyles(direction, getDirectionJssStyle)),
6009
+ '::slotted(*)': addImportantToEachRule(Object.assign({ marginTop: spacingStaticMedium }, buildResponsiveStyles(direction, getDirectionSlottedJssStyle))),
6060
6010
  },
6061
6011
  });
6062
6012
  };
6063
6013
 
6064
- const getFontWeight = (weight) => {
6065
- return fontWeight[weight === 'semibold' ? 'semiBold' : weight];
6014
+ const fontSizeTextMap = {
6015
+ 'x-small': fontSizeTextXSmall,
6016
+ small: fontSizeTextSmall,
6017
+ medium: fontSizeTextMedium,
6018
+ large: fontSizeTextLarge,
6019
+ 'x-large': fontSizeTextXLarge,
6020
+ inherit: 'inherit',
6066
6021
  };
6067
-
6068
- const getSizeJssStyle$1 = (textSize) => {
6069
- if (isSizeInherit(textSize)) {
6070
- return {
6071
- fontSize: 'inherit',
6072
- };
6073
- }
6074
- else {
6075
- const { fontSize: size } = fontSize[paramCaseToCamelCase(textSize)];
6076
- const sublineSize = {
6077
- 'x-small': fontSize.xSmall,
6078
- small: fontSize.small,
6079
- medium: { fontSize: '1.25rem', lineHeight: fontLineHeight },
6080
- large: { fontSize: '1.875rem', lineHeight: fontLineHeight },
6081
- 'x-large': fontSize.large,
6082
- };
6083
- return {
6084
- fontSize: size,
6085
- '& ~ .subline': Object.assign(Object.assign({}, sublineSize[textSize]), { '&::before': {
6086
- fontSize: size,
6087
- marginLeft: fontLineHeight,
6088
- } }),
6089
- };
6090
- }
6022
+ const getFontSizeText = (size) => {
6023
+ return fontSizeTextMap[size];
6091
6024
  };
6025
+
6026
+ // Needed for slotted anchor and hidden label, which then enlarges the hidden label to equal host size and indents the text to be visually hidden.
6092
6027
  const getVisibilityJssStyle = (hideLabel) => {
6093
6028
  return hideLabel
6094
- ? getScreenReaderOnlyJssStyle()
6095
- : {
6096
- position: 'static',
6097
- width: 'auto',
6098
- height: 'auto',
6099
- border: 'medium none color',
6100
- margin: 0,
6101
- whiteSpace: 'inherit',
6102
- overflow: 'visible',
6103
- clip: 'auto',
6104
- clipPath: 'none',
6105
- };
6106
- };
6107
- const getLabelAlignmentJssStyle = (alignLabel) => {
6108
- return alignLabel === 'left'
6109
- ? {
6110
- padding: `0 ${pxToRemWithUnit(4)} 0 0`,
6111
- order: -1,
6112
- }
6113
- : {
6114
- padding: `0 0 0 ${pxToRemWithUnit(4)}`,
6115
- order: 0,
6116
- };
6117
- };
6118
- /* Needed for slotted anchor and hidden label, which then enlarges the hidden label to equal host size and indents the text to be visually hidden. */
6119
- const getSlottedAnchorVisibilityJssStyle = (hideLabel) => {
6120
- return hideLabel
6121
- ? Object.assign(Object.assign({ position: 'absolute' }, getInsetJssStyle()), { whiteSpace: 'nowrap', textIndent: '-999999px' }) : Object.assign(Object.assign({ position: 'static' }, getInsetJssStyle('auto')), { whiteSpace: 'inherit', textIndent: 0 });
6122
- };
6123
- const getLinkButtonPureStyles = (icon, active, isDisabledOrLoading, stretch, size, weight, hideLabel, alignLabel, hasSubline, hasSlottedAnchor, theme) => {
6124
- const { baseColor, hoverColor, activeColor, disabledColor } = getThemedColors(theme);
6125
- const hasIcon = hasVisibleIcon(icon);
6126
- return Object.assign(Object.assign({ '@global': {
6127
- ':host': Object.assign({ position: 'relative', outline: addImportantToRule(0) }, buildResponsiveStyles(hasSubline ? false : stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
6128
- },
6129
- // TODO: reduce to only necessary styles (e.g. why boxSizing?)
6130
- // TODO: overhead in link styles when slotted anchor is used
6131
- // TODO: overhead due that link does not need same "reset" styles as button
6132
- root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', width: '100%', margin: 0, padding: 0, boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', textDecoration: 'none', textAlign: 'left', border: 'none', background: 'transparent', color: isDisabledOrLoading ? disabledColor : active ? activeColor : baseColor, transition: getTransition('color') }, (!hasSlottedAnchor && getFocusJssStyle({ offset: 1, pseudo: '::before' }))), (!isDisabledOrLoading && Object.assign(Object.assign({}, hoverMediaQuery({
6133
- '&:hover': Object.assign({ color: hoverColor }, (hasSubline && {
6134
- '& + $subline': {
6135
- color: hoverColor,
6136
- },
6137
- })),
6138
- })), { '&:active': Object.assign({ color: activeColor }, (hasSubline && {
6139
- '& + $subline': {
6140
- color: activeColor,
6141
- },
6142
- })) }))), textSmall), { fontWeight: getFontWeight(weight) }), mergeDeep(!hasSubline &&
6143
- buildResponsiveStyles(stretch, (stretched) => ({
6144
- justifyContent: stretched ? 'space-between' : 'flex-start',
6145
- })), buildResponsiveStyles(size, getSizeJssStyle$1))) }, (hasIcon && {
6029
+ ? Object.assign(Object.assign({ position: 'absolute' }, getInsetJssStyle(0)), { whiteSpace: 'nowrap', textIndent: '-999999px' }) : Object.assign(Object.assign({ position: 'relative' }, getInsetJssStyle('auto')), { whiteSpace: 'inherit', textIndent: 0 });
6030
+ };
6031
+ const offsetVertical = '-2px';
6032
+ const offsetHorizontal = '-4px';
6033
+ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme) => {
6034
+ const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
6035
+ const hasIcon = hasVisibleIcon(icon, iconSource);
6036
+ return Object.assign({ '@global': {
6037
+ ':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ transform: 'translate3d(0,0,0)', outline: 0 }, hostHiddenStyles))), buildResponsiveStyles(stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
6038
+ }, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', gap: spacingStaticXSmall, width: '100%', margin: 0, padding: 0, color: isDisabledOrLoading ? disabledColor : primaryColor, outline: 0 }, textSmallStyle), mergeDeep(buildResponsiveStyles(stretch, (stretchValue) => ({
6039
+ justifyContent: stretchValue ? 'space-between' : 'flex-start',
6040
+ alignItems: stretchValue ? 'center' : 'flex-start',
6041
+ })), buildResponsiveStyles(size, (sizeValue) => ({
6042
+ fontSize: getFontSizeText(sizeValue),
6043
+ })))), { '&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
6044
+ right: hideLabelValue ? offsetVertical : offsetHorizontal,
6045
+ left: hideLabelValue || hasIcon ? offsetVertical : offsetHorizontal,
6046
+ }))), { borderRadius: borderRadiusSmall, transition: getTransition('background-color') }), (active && Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }))) }), (!isDisabledOrLoading &&
6047
+ hoverMediaQuery({
6048
+ '&:hover::before': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
6049
+ }))), (!hasSlottedAnchor && {
6050
+ '&:focus::before': {
6051
+ border: `${borderWidthBase} solid ${focusColor}`,
6052
+ },
6053
+ '&:not(:focus-visible)::before': {
6054
+ border: 0,
6055
+ },
6056
+ })), label: {
6057
+ position: 'relative', // needed for hover state when icon="none" is set
6058
+ } }, (hasIcon && {
6146
6059
  icon: {
6060
+ position: 'relative',
6147
6061
  flexShrink: '0',
6148
6062
  width: fontLineHeight,
6149
6063
  height: fontLineHeight,
6150
6064
  },
6151
- label: mergeDeep(buildResponsiveStyles(hideLabel, !hasSlottedAnchor ? getVisibilityJssStyle : getSlottedAnchorVisibilityJssStyle), hasSubline ? { paddingLeft: pxToRemWithUnit(4) } : buildResponsiveStyles(alignLabel, getLabelAlignmentJssStyle)),
6152
- })), (hasSubline && {
6153
- subline: Object.assign(Object.assign(Object.assign({ display: 'flex', marginTop: addImportantToRule('4px') }, textSmall), { color: isDisabledOrLoading ? disabledColor : active ? activeColor : baseColor, transition: getTransition('color') }), (hasIcon && Object.assign(Object.assign({}, buildResponsiveStyles(hideLabel, getVisibilityJssStyle)), { paddingLeft: pxToRemWithUnit(4), '&::before': {
6154
- content: '""',
6155
- } }))),
6065
+ label: mergeDeep(buildResponsiveStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
6066
+ order: alignLabelValue === 'left' ? -1 : 0,
6067
+ }))),
6156
6068
  }));
6157
6069
  };
6158
6070
 
6159
- const getComponentCss$O = (icon, active, isDisabledOrLoading, stretch, size, weight, hideLabel, alignLabel, hasSubline, theme) => {
6160
- return getCss(mergeDeep(getLinkButtonPureStyles(icon, active, isDisabledOrLoading, stretch, size, weight, hideLabel, alignLabel, hasSubline, false, theme), {
6161
- '@global': {
6162
- '::slotted(p)': {
6163
- margin: 0,
6164
- },
6071
+ const getComponentCss$P = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, theme) => {
6072
+ const hasIcon = hasVisibleIcon(icon, iconSource);
6073
+ return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), Object.assign({ root: {
6074
+ appearance: 'none',
6075
+ background: 'transparent',
6076
+ textAlign: 'left',
6077
+ border: 0,
6078
+ cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
6079
+ } }, (!hasIcon &&
6080
+ isLoading && {
6081
+ label: {
6082
+ visibility: 'hidden',
6165
6083
  },
6166
- }));
6167
- };
6168
-
6169
- const { baseColor: darkThemeBaseColor } = getThemedColors('dark');
6170
- const { baseColor: lightThemeBaseColor } = getThemedColors('light');
6171
- const getVariantColors = (variant, theme) => {
6172
- const { brandColor, baseColor, contrastHighColor, hoverColorDarken, contrastHighColorDarken, baseColorDarken } = getThemedColors(theme);
6173
- const colors = {
6174
- light: {
6175
- primary: {
6176
- primaryColor: brandColor,
6177
- primaryColorHover: hoverColorDarken,
6178
- baseColor: darkThemeBaseColor,
6179
- },
6180
- secondary: {
6181
- primaryColor: contrastHighColor,
6182
- primaryColorHover: contrastHighColorDarken,
6183
- baseColor: darkThemeBaseColor,
6184
- },
6185
- tertiary: {
6186
- primaryColor: contrastHighColor,
6187
- primaryColorHover: contrastHighColorDarken,
6188
- baseColor,
6189
- },
6084
+ icon: {
6085
+ position: 'absolute',
6086
+ top: 0,
6087
+ left: `calc(50% - ${fontLineHeight} / 2)`,
6088
+ width: fontLineHeight,
6089
+ height: fontLineHeight,
6190
6090
  },
6191
- dark: {
6192
- primary: {
6193
- primaryColor: brandColor,
6194
- primaryColorHover: hoverColorDarken,
6195
- baseColor: darkThemeBaseColor,
6196
- },
6197
- secondary: {
6198
- primaryColor: darkThemeBaseColor,
6199
- primaryColorHover: baseColorDarken,
6200
- baseColor: lightThemeBaseColor,
6201
- },
6202
- tertiary: {
6203
- primaryColor: darkThemeBaseColor,
6204
- primaryColorHover: darkThemeBaseColor,
6205
- baseColor,
6206
- },
6091
+ }))));
6092
+ };
6093
+
6094
+ const { primaryColor: darkThemePrimaryColor$1 } = getThemedColors('dark');
6095
+ const { primaryColor: lightThemePrimaryColor$1 } = getThemedColors('light');
6096
+ const getVariantColors = (variant, theme) => {
6097
+ const { primaryColor, contrastHighColor, contrastMediumColor, hoverColor } = getThemedColors(theme);
6098
+ const colors = {
6099
+ primary: {
6100
+ textColor: theme === 'dark' ? lightThemePrimaryColor$1 : darkThemePrimaryColor$1,
6101
+ borderColor: primaryColor,
6102
+ borderColorHover: contrastHighColor,
6103
+ backgroundColor: primaryColor,
6104
+ backgroundColorHover: contrastHighColor,
6207
6105
  },
6208
- 'light-electric': {
6209
- primary: {
6210
- primaryColor: brandColor,
6211
- primaryColorHover: hoverColorDarken,
6212
- baseColor: darkThemeBaseColor,
6213
- },
6214
- secondary: {
6215
- primaryColor: contrastHighColor,
6216
- primaryColorHover: contrastHighColorDarken,
6217
- baseColor: darkThemeBaseColor,
6218
- },
6219
- tertiary: {
6220
- primaryColor: contrastHighColor,
6221
- primaryColorHover: contrastHighColorDarken,
6222
- baseColor,
6223
- },
6106
+ secondary: {
6107
+ textColor: primaryColor,
6108
+ borderColor: primaryColor,
6109
+ borderColorHover: contrastMediumColor,
6110
+ backgroundColor: 'transparent',
6111
+ backgroundColorHover: hoverColor,
6224
6112
  },
6225
6113
  };
6226
- return colors[theme][variant];
6114
+ return colors[variant === 'tertiary' ? 'secondary' : variant];
6115
+ };
6116
+ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
6117
+ const isPrimary = variant === 'primary';
6118
+ const { textColor, borderColor, borderColorHover, backgroundColor, backgroundColorHover } = getVariantColors(variant, theme);
6119
+ const { focusColor } = getThemedColors(theme);
6120
+ const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
6121
+ return Object.assign({ '@global': {
6122
+ ':host': addImportantToEachRule(Object.assign({ display: 'inline-block', verticalAlign: 'top', outline: 0 }, hostHiddenStyles)),
6123
+ }, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', justifyContent: 'center', width: '100%', minWidth: '54px', minHeight: '54px', boxSizing: 'border-box', outline: 0, textAlign: 'left', appearance: 'none', textDecoration: 'none', border: `2px solid ${borderColor}`, borderRadius: borderRadiusSmall, transform: 'translate3d(0,0,0)', // creates new stacking context (for slotted anchor + focus)
6124
+ backgroundColor, color: textColor }, textSmallStyle), { transition: ['background-color', 'border-color', 'color'].map(getTransition).join() }), buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
6125
+ padding: hideLabelValue ? '13px' : hasIcon ? '13px 26px 13px 18px' : '13px 26px',
6126
+ gap: hideLabelValue ? 0 : spacingStaticSmall,
6127
+ }))), (!hasSlottedAnchor && {
6128
+ '&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid ${focusColor}`, borderRadius: borderRadiusMedium }, getInsetJssStyle(-6)),
6129
+ '&:not(:focus-visible)::before': {
6130
+ border: 0,
6131
+ },
6132
+ })), (!isDisabledOrLoading &&
6133
+ hoverMediaQuery({
6134
+ '&:hover': Object.assign({ backgroundColor: backgroundColorHover, borderColor: borderColorHover }, (!isPrimary && frostedGlassStyle)),
6135
+ }))), label: Object.assign({}, buildResponsiveStyles(hideLabel, (hideLabelValue) => hideLabelValue
6136
+ ? {
6137
+ width: 0,
6138
+ height: '1px',
6139
+ textIndent: '-999999px',
6140
+ }
6141
+ : {
6142
+ width: 'auto',
6143
+ height: 'auto',
6144
+ textIndent: 0,
6145
+ })) }, (hasIcon && {
6146
+ icon: {
6147
+ width: fontLineHeight,
6148
+ height: fontLineHeight,
6149
+ },
6150
+ }));
6227
6151
  };
6228
- const linkButtonPadding = `${pxToRemWithUnit(11)} ${pxToRemWithUnit(15)} ${pxToRemWithUnit(11)} ${pxToRemWithUnit(39)}`;
6229
- const getRootJssStyle = (hideLabel) => {
6230
- return {
6231
- padding: hideLabel ? 0 : linkButtonPadding,
6152
+
6153
+ const getDisabledColors = (variant, loading, theme) => {
6154
+ const { contrastMediumColor, contrastHighColor, disabledColor, hoverColor } = getThemedColors(theme);
6155
+ const colors = {
6156
+ primary: {
6157
+ textColor: contrastHighColor,
6158
+ borderColor: loading ? contrastHighColor : disabledColor,
6159
+ backgroundColor: loading ? contrastHighColor : disabledColor,
6160
+ },
6161
+ secondary: {
6162
+ textColor: disabledColor,
6163
+ borderColor: loading ? contrastMediumColor : disabledColor,
6164
+ backgroundColor: loading ? hoverColor : 'transparent',
6165
+ },
6232
6166
  };
6167
+ return colors[variant === 'tertiary' ? 'secondary' : variant];
6233
6168
  };
6234
- const getIconJssStyle = (hideLabel) => {
6235
- return hideLabel
6236
- ? {
6237
- left: '50%',
6169
+ const getComponentCss$O = (icon, iconSource, variant, hideLabel, disabled, loading, theme) => {
6170
+ const disabledOrLoading = isDisabledOrLoading(disabled, loading);
6171
+ const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
6172
+ const isPrimary = variant === 'primary';
6173
+ return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, disabledOrLoading, false, theme), Object.assign(Object.assign({ root: Object.assign(Object.assign({ cursor: disabledOrLoading ? 'not-allowed' : 'pointer' }, (disabledOrLoading && {
6174
+ backgroundColor,
6175
+ borderColor,
6176
+ color: textColor,
6177
+ })), ((loading && !isPrimary) && frostedGlassStyle)) }, (loading && {
6178
+ spinner: {
6179
+ width: fontLineHeight,
6180
+ height: fontLineHeight,
6181
+ pointerEvents: 'none',
6182
+ position: 'absolute',
6238
6183
  top: '50%',
6239
- transform: 'translate3d(-50%, -50%, 0)',
6240
- }
6241
- : {
6242
- left: pxToRemWithUnit(11),
6243
- top: pxToRemWithUnit(11),
6244
- transform: 'translate3d(0,0,0)',
6245
- };
6246
- };
6247
- const getLabelJssStyle = (hideLabel) => {
6248
- return hideLabel
6249
- ? {
6250
- width: '1px',
6251
- height: '1px',
6252
- margin: '0 0 0 -1px',
6253
- overflow: 'hidden',
6254
- textIndent: '-1px',
6255
- }
6256
- : {
6257
- width: '100%',
6258
- height: 'auto',
6259
- margin: 0,
6260
- overflow: 'visible',
6261
- textIndent: 0,
6262
- };
6263
- };
6264
- const getSlottedLinkJssStyle = (hideLabel) => {
6265
- return hideLabel
6266
- ? Object.assign(Object.assign({ position: 'absolute' }, getInsetJssStyle()), { padding: 0, overflow: 'hidden', whiteSpace: 'nowrap', textIndent: '99999px' }) : Object.assign(Object.assign({ position: 'static' }, getInsetJssStyle('auto')), { padding: linkButtonPadding, overflow: 'visible', whiteSpace: 'normal', textIndent: 0 });
6267
- };
6268
- const getLinkButtonStyles = (variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
6269
- const isDarkTheme = isThemeDark(theme);
6270
- const isTertiary = variant === 'tertiary';
6271
- const { primaryColor, primaryColorHover, baseColor } = getVariantColors(variant, theme);
6272
- const { disabledColor } = getThemedColors(theme);
6273
- const iconLabelColor = isDisabledOrLoading ? (isTertiary ? disabledColor : 'rgba(255,255,255,0.55)') : baseColor;
6274
- return {
6275
- '@global': Object.assign(Object.assign({ ':host': {
6276
- display: 'inline-flex',
6277
- verticalAlign: 'top',
6278
- outline: addImportantToRule(0),
6279
- } }, (hasSlottedAnchor && {
6280
- '::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a)': Object.assign({ display: 'block', textDecoration: 'none', color: 'inherit', lineHeight: 'inherit', outline: 'transparent solid 1px', outlineOffset: '3px' }, buildResponsiveStyles(hideLabel, getSlottedLinkJssStyle)),
6281
- // TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
6282
- '&(a::-moz-focus-inner)': {
6283
- border: 0,
6284
- }, '&(a:focus)': {
6285
- outlineColor: primaryColor,
6286
- } }, hoverMediaQuery({
6287
- '&(a:hover:focus)': {
6288
- outlineColor: primaryColorHover,
6289
- },
6290
- })), { '&(a:focus:not(:focus-visible))': {
6291
- outlineColor: 'transparent',
6292
- } })),
6293
- })), { span: Object.assign(Object.assign({ display: 'block', width: '100%', color: iconLabelColor }, textSmall), (!hasSlottedAnchor && buildResponsiveStyles(hideLabel, getLabelJssStyle))) }),
6294
- // TODO: reduce to only necessary styles (e.g. why boxSizing?)
6295
- // TODO: overhead in link styles when slotted anchor is used
6296
- // TODO: overhead due that link does not need same "reset" styles as button
6297
- root: Object.assign(Object.assign({ display: 'flex', width: '100%', minWidth: pxToRemWithUnit(48), minHeight: pxToRemWithUnit(48), position: 'relative', margin: 0, padding: 0, boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', textDecoration: 'none', textAlign: 'left', border: '1px solid currentColor', backgroundColor: isTertiary ? 'transparent' : 'currentColor', color: isDisabledOrLoading ? disabledColor : primaryColor, transition: ['background-color', 'border-color', 'color'].map(getTransition).join() }, (!hasSlottedAnchor && Object.assign(Object.assign({}, buildResponsiveStyles(hideLabel, getRootJssStyle)), getFocusJssStyle()))), (!isDisabledOrLoading &&
6298
- hoverMediaQuery({
6299
- '&:hover, &:active': Object.assign({ color: primaryColorHover }, (isTertiary && {
6300
- backgroundColor: 'currentColor',
6301
- '& > span, & > $icon': {
6302
- color: isDarkTheme ? lightThemeBaseColor : darkThemeBaseColor,
6303
- },
6304
- })),
6305
- }))),
6306
- icon: Object.assign({ position: 'absolute', width: pxToRemWithUnit(24), height: pxToRemWithUnit(24), color: iconLabelColor, pointerEvents: 'none' }, buildResponsiveStyles(hideLabel, getIconJssStyle)),
6307
- };
6308
- };
6309
-
6310
- const getComponentCss$N = (variant, hideLabel, isDisabledOrLoading, theme) => {
6311
- return getCss(getLinkButtonStyles(variant, hideLabel, isDisabledOrLoading, false, theme));
6184
+ left: '50%',
6185
+ transform: 'translate(-50%, -50%)',
6186
+ },
6187
+ })), { label: Object.assign({ transition: getTransition('opacity') }, (loading && {
6188
+ opacity: 0, // use opacity for smooth transition between states
6189
+ })), icon: Object.assign({ transition: getTransition('opacity') }, (loading && {
6190
+ opacity: 0, // use opacity for smooth transition between states
6191
+ })) })));
6312
6192
  };
6313
6193
 
6314
6194
  const bulletActiveClass = 'bullet--active';
6315
- const mediaQueryS$1 = mediaQueryMin('s');
6316
- const mediaQueryXl$1 = mediaQueryMin('xl');
6317
- const getComponentCss$M = (wrapContent, disablePagination, theme) => {
6318
- const { baseColor, disabledColor } = getThemedColors(theme);
6195
+ const mediaQueryS = getMediaQueryMin('s');
6196
+ const mediaQueryXl$1 = getMediaQueryMin('xl');
6197
+ const getComponentCss$N = (wrapContent, disablePagination, theme) => {
6198
+ const { primaryColor, disabledColor } = getThemedColors(theme);
6319
6199
  return getCss(Object.assign({ '@global': {
6320
- ':host': addImportantToEachRule({
6321
- display: 'grid',
6322
- maxWidth: gridMaxWidth,
6323
- marginLeft: 'auto',
6324
- marginRight: 'auto',
6325
- gap: pxToRemWithUnit(24),
6326
- gridAutoFlow: 'row',
6327
- [mediaQueryXl$1]: {
6200
+ ':host': addImportantToEachRule(Object.assign({ display: 'grid', maxWidth: gridWidthMax, marginLeft: 'auto', marginRight: 'auto', gap: pxToRemWithUnit(24), gridAutoFlow: 'row', [mediaQueryXl$1]: {
6328
6201
  gap: pxToRemWithUnit(32),
6329
- },
6330
- }),
6331
- 'h2,::slotted([slot=heading])': addImportantToEachRule(Object.assign(Object.assign({}, headingMedium), { margin: 0, color: baseColor, maxWidth: pxToRemWithUnit(900) })),
6332
- 'p,::slotted([slot=description])': addImportantToEachRule(Object.assign(Object.assign({}, textSmall), { margin: 0, color: baseColor, maxWidth: pxToRemWithUnit(550), gridColumn: 1 })),
6202
+ } }, hostHiddenStyles)),
6203
+ 'h2,::slotted([slot=heading])': addImportantToEachRule(Object.assign(Object.assign({}, headingMediumStyle), { margin: 0, color: primaryColor, maxWidth: pxToRemWithUnit(900) })),
6204
+ 'p,::slotted([slot=description])': addImportantToEachRule(Object.assign(Object.assign({}, textSmallStyle), { margin: 0, color: primaryColor, maxWidth: pxToRemWithUnit(550), gridColumn: 1 })),
6333
6205
  }, splide: {
6334
6206
  overflow: 'hidden',
6335
6207
  // visibility: 'hidden',
6336
6208
  '&__track': Object.assign(Object.assign({ cursor: 'grab' }, (wrapContent &&
6337
6209
  addImportantToEachRule({
6338
- padding: `0 calc(${gridSafeZone.base} + 7%) 0 ${gridSafeZone.base}`,
6210
+ // TODO: 0 calc(${gridSafeZoneBase} + ${gridGap})
6211
+ padding: `0 calc(${gridSafeZoneBase} + 7%) 0 ${gridSafeZoneBase}`,
6339
6212
  [mediaQueryXl$1]: {
6340
- padding: `0 calc(${gridSafeZone.xl} + 7%) 0 ${gridSafeZone.xl}`,
6213
+ padding: `0 calc(${gridSafeZoneBase} + 7%) 0 ${gridSafeZoneBase}`,
6341
6214
  },
6342
6215
  }))), { '&--draggable': {
6343
6216
  userSelect: 'none',
@@ -6357,28 +6230,23 @@ const getComponentCss$M = (wrapContent, disablePagination, theme) => {
6357
6230
  // }
6358
6231
  header: {
6359
6232
  display: 'grid',
6360
- gap: pxToRemWithUnit(16),
6361
- padding: wrapContent ? `0 ${gridSafeZone.base}` : null,
6362
- [mediaQueryS$1]: {
6233
+ gap: gridGap,
6234
+ padding: wrapContent ? `0 ${gridSafeZoneBase}` : null,
6235
+ [mediaQueryS]: {
6363
6236
  gridTemplateColumns: `minmax(0px, 1fr) ${pxToRemWithUnit(80)}`,
6364
6237
  position: 'relative',
6365
6238
  minHeight: pxToRemWithUnit(40), // actual height of prev/next buttons
6366
6239
  },
6367
- [mediaQueryXl$1]: {
6368
- gap: pxToRemWithUnit(24),
6369
- padding: wrapContent ? `0 ${gridSafeZone.xl}` : null,
6370
- },
6371
- }, nav: Object.assign({ display: 'none', [mediaQueryS$1]: {
6240
+ }, nav: {
6241
+ display: 'none',
6242
+ [mediaQueryS]: {
6372
6243
  display: 'grid',
6373
6244
  gridAutoFlow: 'column',
6374
6245
  position: 'absolute',
6375
- right: wrapContent ? gridSafeZone.base : 0,
6246
+ right: wrapContent ? gridSafeZoneBase : 0,
6376
6247
  bottom: 0,
6377
- } }, (wrapContent && {
6378
- [mediaQueryXl$1]: {
6379
- right: gridSafeZone.xl,
6380
6248
  },
6381
- })), btn: {
6249
+ }, btn: {
6382
6250
  padding: pxToRemWithUnit(8),
6383
6251
  } }, (disablePagination !== true && {
6384
6252
  pagination: Object.assign(Object.assign({}, buildResponsiveStyles(disablePagination, (value) => ({ display: value ? 'none' : 'grid' }))), { gridAutoColumns: pxToRemWithUnit(8), gridAutoFlow: 'column', justifyContent: 'center', gap: pxToRemWithUnit(8), height: pxToRemWithUnit(8) }),
@@ -6387,20 +6255,11 @@ const getComponentCss$M = (wrapContent, disablePagination, theme) => {
6387
6255
  background: disabledColor,
6388
6256
  },
6389
6257
  [bulletActiveClass]: {
6390
- background: baseColor,
6258
+ background: primaryColor,
6391
6259
  },
6392
6260
  })));
6393
6261
  };
6394
6262
 
6395
- const getFunctionalComponentRequiredStyles = (theme) => {
6396
- return {
6397
- required: {
6398
- userSelect: 'none',
6399
- color: getThemedColors(theme).errorColor,
6400
- },
6401
- };
6402
- };
6403
-
6404
6263
  const getThemedFormStateColors = (theme, state) => {
6405
6264
  const themedColors = getThemedColors(theme);
6406
6265
  return {
@@ -6409,101 +6268,170 @@ const getThemedFormStateColors = (theme, state) => {
6409
6268
  };
6410
6269
  };
6411
6270
 
6412
- const { xSmall: spacingXSmall } = spacing;
6413
- const getFunctionalComponentStateMessageStyles = (theme, state) => {
6271
+ const getFunctionalComponentRequiredStyles = () => {
6414
6272
  return {
6415
- message: Object.assign(Object.assign({ display: 'flex', marginTop: spacingXSmall }, textSmall), { color: getThemedFormStateColors(theme, state).formStateColor, transition: getTransition('color'), '&__icon': {
6416
- marginRight: spacingXSmall,
6417
- } }),
6273
+ required: {
6274
+ userSelect: 'none',
6275
+ },
6418
6276
  };
6419
6277
  };
6420
6278
 
6421
- const getCheckboxRadioLabelJssStyle = (isDisabled, hideLabel, theme) => {
6422
- const { baseColor, disabledColor } = getThemedColors(theme);
6423
- return Object.assign(Object.assign(Object.assign({ order: 1, display: 'inline-block', cursor: isDisabled ? 'default' : 'pointer' }, textSmall), { color: isDisabled ? disabledColor : baseColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel, getFormCheckboxRadioHiddenJssStyle));
6279
+ const getFunctionalComponentStateMessageStyles = (theme, state) => {
6280
+ return {
6281
+ message: Object.assign(Object.assign({ display: 'flex', gap: spacingStaticXSmall, marginTop: spacingStaticXSmall }, textSmallStyle), { color: getThemedFormStateColors(theme, state).formStateColor, transition: getTransition('color') }),
6282
+ };
6424
6283
  };
6425
6284
 
6426
- const getComponentCss$L = (hideLabel, state, isDisabled) => {
6427
- const theme = 'light';
6428
- const size = pxToRemWithUnit(24);
6429
- const hasVisibleState = isVisibleFormState(state);
6430
- const { baseColor, backgroundColor, contrastMediumColor, contrastHighColor, disabledColor } = getThemedColors(theme);
6285
+ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, theme) => {
6286
+ const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
6431
6287
  const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
6432
- const iconColor = backgroundColor.replace(/#/g, '%23');
6433
- return getCss(Object.assign(Object.assign({ '@global': {
6434
- ':host': {
6435
- display: 'block',
6436
- },
6437
- '::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(input)': {
6438
- position: 'static',
6439
- width: size,
6440
- height: size,
6288
+ const uncheckedColor = isDisabled ? disabledColor : formStateColor || contrastMediumColor;
6289
+ const uncheckedHoverColor = formStateHoverColor || primaryColor;
6290
+ const checkedColor = isDisabled ? disabledColor : formStateColor || primaryColor;
6291
+ const checkedHoverColor = formStateHoverColor || contrastHighColor;
6292
+ return Object.assign(Object.assign({ '@global': {
6293
+ ':host': addImportantToEachRule(Object.assign(Object.assign({}, hostHiddenStyles), { display: 'block' })),
6294
+ '::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
6295
+ position: 'relative',
6296
+ width: fontLineHeight,
6297
+ height: fontLineHeight,
6298
+ fontFamily,
6299
+ fontSize: '1rem',
6441
6300
  flexShrink: 0,
6442
6301
  display: 'block',
6443
6302
  margin: 0,
6444
6303
  padding: 0,
6445
6304
  WebkitAppearance: 'none',
6446
6305
  appearance: 'none',
6447
- boxSizing: 'border-box',
6448
- backgroundSize: size,
6449
- backgroundPosition: hasVisibleState ? '-2px -2px' : '-1px -1px',
6450
- backgroundColor,
6306
+ boxSizing: 'content-box',
6307
+ backgroundSize: fontLineHeight,
6308
+ backgroundColor: 'transparent',
6451
6309
  transition: ['border-color', 'background-color'].map(getTransition).join(),
6452
- opacity: 1,
6453
- border: hasVisibleState ? `2px solid ${formStateColor}` : `1px solid ${contrastMediumColor}`,
6454
- borderRadius: 0,
6455
- outline: '1px solid transparent',
6456
- outlineOffset: '2px',
6457
- cursor: 'pointer',
6310
+ border: `2px solid ${uncheckedColor}`,
6311
+ outline: 0,
6312
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
6458
6313
  }, '&(input:checked)': {
6459
- backgroundImage: `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${iconColor}" d="M9 19l-6-7h1.5l4.49 5.36L19.5 5H21L9 19z"/></svg>')`,
6460
- }, '&(input:indeterminate)': {
6461
- backgroundImage: `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${iconColor}" d="M3 11h18v1H3z"/></svg>')`,
6462
- }, '&(input:checked), &(input:indeterminate)': {
6463
- borderColor: formStateColor || contrastHighColor,
6464
- backgroundColor: formStateColor || contrastHighColor,
6465
- } }, hoverMediaQuery({
6466
- '&(input:not(:disabled):hover), .label:hover ~ &(input:not(:disabled))': {
6467
- borderColor: formStateHoverColor || baseColor,
6314
+ borderColor: checkedColor,
6315
+ backgroundColor: checkedColor,
6316
+ } }, (!isDisabled && Object.assign(Object.assign({}, hoverMediaQuery({
6317
+ '&(input:hover), .text:hover ~ &(input)': {
6318
+ borderColor: uncheckedHoverColor,
6468
6319
  },
6469
- })), { '&(input:indeterminate:disabled), &(input:checked:disabled)': {
6470
- backgroundColor: disabledColor,
6471
- }, '&(input:disabled)': {
6472
- borderColor: disabledColor,
6473
- cursor: 'not-allowed',
6474
- }, '&(input:focus)': {
6475
- outlineColor: formStateColor || contrastMediumColor,
6476
- }, '&(input:focus:not(:focus-visible))': {
6477
- outlineColor: 'transparent',
6478
- } })),
6320
+ '&(input:checked:hover), .text:hover ~ &(input:checked)': {
6321
+ borderColor: checkedHoverColor,
6322
+ backgroundColor: checkedHoverColor,
6323
+ },
6324
+ })), { '&(input:focus)::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-6)), { border: `${borderWidthBase} solid ${focusColor}` }), '&(input:focus:not(:focus-visible))::before': {
6325
+ borderColor: 'transparent',
6326
+ } })))),
6479
6327
  label: {
6480
6328
  position: 'relative',
6481
6329
  display: 'flex',
6330
+ alignItems: 'flex-start',
6482
6331
  },
6483
- }, label: getCheckboxRadioLabelJssStyle(isDisabled, hideLabel, theme) }, getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)));
6332
+ }, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor: isDisabled ? 'default' : 'pointer' }, textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel, getFormCheckboxRadioHiddenJssStyle)) }, getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state));
6484
6333
  };
6485
6334
 
6486
- const widthMap = {
6487
- basic: {
6488
- maxWidth: gridMaxWidth,
6489
- boxSizing: 'border-box',
6490
- padding: `0 ${gridSafeZone.base}`,
6491
- [mediaQueryMin('xl')]: {
6492
- padding: `0 ${gridSafeZone.xl}`,
6335
+ const getInlineSVGBackgroundImage = (path) => {
6336
+ return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
6337
+ };
6338
+
6339
+ const getComponentCss$M = (hideLabel, state, isDisabled, theme) => {
6340
+ const checkedIconColor = getThemedColors(theme === 'light' ? 'dark' : 'light').primaryColor.replace(/#/g, '%23');
6341
+ const indeterminateIconColor = getThemedColors(theme).primaryColor.replace(/#/g, '%23');
6342
+ return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, theme), {
6343
+ '@global': {
6344
+ '::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
6345
+ borderRadius: borderRadiusSmall,
6346
+ }, '&(input:checked)': {
6347
+ backgroundImage: getInlineSVGBackgroundImage(`<path fill="${checkedIconColor}" d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`),
6348
+ }, '&(input:indeterminate)': {
6349
+ backgroundImage: getInlineSVGBackgroundImage(`<path fill="${indeterminateIconColor}" d="m20,11v2H4v-2h16Z"/>`),
6350
+ } }, (!isDisabled && {
6351
+ '&(input:focus)::before': {
6352
+ borderRadius: borderRadiusMedium,
6353
+ },
6354
+ }))),
6493
6355
  },
6494
- },
6495
- extended: {
6496
- maxWidth: gridMaxWidth,
6497
- },
6356
+ }));
6498
6357
  };
6499
- const getComponentCss$K = (width, backgroundColor, theme) => {
6358
+
6359
+ const getComponentCss$L = (width) => {
6500
6360
  return getCss({
6501
6361
  '@global': {
6502
- ':host': {
6503
- display: 'flex',
6362
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6363
+ },
6364
+ root: getContentWrapperStyle(width),
6365
+ });
6366
+ };
6367
+
6368
+ const DISPLAY_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
6369
+
6370
+ const getThemedTypographyColor = (theme, textColor) => {
6371
+ const { primaryColor, contrastHighColor, contrastMediumColor, contrastLowColor, successColor, errorColor, warningColor, infoColor, } = getThemedColors(theme);
6372
+ const colorMap = {
6373
+ primary: primaryColor,
6374
+ brand: primaryColor,
6375
+ default: primaryColor,
6376
+ 'contrast-low': contrastLowColor,
6377
+ 'neutral-contrast-low': contrastLowColor,
6378
+ 'contrast-medium': contrastMediumColor,
6379
+ 'neutral-contrast-medium': contrastMediumColor,
6380
+ 'contrast-high': contrastHighColor,
6381
+ 'neutral-contrast-high': contrastHighColor,
6382
+ 'notification-success': successColor,
6383
+ 'notification-warning': warningColor,
6384
+ 'notification-error': errorColor,
6385
+ 'notification-info': infoColor,
6386
+ 'notification-neutral': infoColor,
6387
+ inherit: 'currentColor',
6388
+ };
6389
+ return colorMap[textColor];
6390
+ };
6391
+
6392
+ const getTypographyRootJssStyle = (baseTextStyle, responsiveStyle, align, color, ellipsis, theme) => {
6393
+ return Object.assign(Object.assign(Object.assign(Object.assign({ margin: 0, padding: 0 }, baseTextStyle), { color: getThemedTypographyColor(theme, color), textAlign: align, letterSpacing: 'normal', listStyleType: 'none', whiteSpace: 'inherit' }), (ellipsis && {
6394
+ maxWidth: '100%',
6395
+ overflow: 'hidden',
6396
+ textOverflow: 'ellipsis',
6397
+ whiteSpace: 'nowrap',
6398
+ })), responsiveStyle);
6399
+ };
6400
+ const getTypographySlottedJssStyle = () => {
6401
+ return {
6402
+ margin: 'inherit',
6403
+ padding: 'inherit',
6404
+ fontFamily: 'inherit',
6405
+ fontWeight: 'inherit',
6406
+ fontSize: 'inherit',
6407
+ lineHeight: 'inherit',
6408
+ fontStyle: 'inherit',
6409
+ fontVariant: 'inherit',
6410
+ color: 'inherit',
6411
+ textAlign: 'inherit',
6412
+ overflowWrap: 'inherit',
6413
+ wordWrap: 'inherit',
6414
+ hyphens: 'inherit',
6415
+ whiteSpace: 'inherit',
6416
+ letterSpacing: 'inherit',
6417
+ };
6418
+ };
6419
+
6420
+ const sizeMap$5 = {
6421
+ medium: fontSizeDisplayMedium,
6422
+ large: fontSizeDisplayLarge,
6423
+ };
6424
+ const getComponentCss$K = (size, align, color, ellipsis, theme) => {
6425
+ return getCss({
6426
+ '@global': {
6427
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6428
+ '::slotted': {
6429
+ [DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
6504
6430
  },
6505
6431
  },
6506
- root: Object.assign(Object.assign({ margin: '0 auto', width: '100%', minWidth: 0 }, widthMap[width]), { backgroundColor: backgroundColor === 'default' ? getThemedColors(theme).backgroundColor : 'transparent' }),
6432
+ root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
6433
+ fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$5[sizeValue],
6434
+ })), align, color, ellipsis, theme),
6507
6435
  });
6508
6436
  };
6509
6437
 
@@ -6516,28 +6444,22 @@ const getComponentCss$J = (color, orientation, theme) => {
6516
6444
  };
6517
6445
  return getCss({
6518
6446
  '@global': {
6519
- ':host': {
6520
- display: 'block',
6521
- },
6447
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6522
6448
  hr: Object.assign({ margin: 0, padding: 0, border: 'none', textAlign: 'left', background: colorMap[color] }, buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' })),
6523
6449
  },
6524
6450
  });
6525
6451
  };
6526
6452
 
6527
- const { medium: spacingMedium$1 } = spacing;
6528
- const getComponentCss$I = (state, labelSize, hasLabel) => {
6529
- const theme = 'light';
6530
- return getCss(Object.assign(Object.assign({ '@global': Object.assign({ ':host': {
6531
- display: addImportantToRule('block'),
6532
- }, fieldset: {
6453
+ const getComponentCss$I = (state, labelSize, hasLabel, theme) => {
6454
+ return getCss(Object.assign(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)), fieldset: {
6533
6455
  margin: 0,
6534
6456
  padding: 0,
6535
6457
  border: 'none',
6536
6458
  } }, (hasLabel && {
6537
- legend: Object.assign({ margin: `0 0 ${spacingMedium$1}`, padding: 0, color: getThemedColors(theme).baseColor }, (labelSize === 'small' ? headingXSmall : headingSmall)),
6538
- })) }, getFunctionalComponentRequiredStyles(theme)), mergeDeep(getFunctionalComponentStateMessageStyles(theme, state), {
6459
+ legend: Object.assign({ margin: `0 0 ${spacingStaticMedium}`, padding: 0, color: getThemedColors(theme).primaryColor }, (labelSize === 'small' ? headingSmallStyle : headingMediumStyle)),
6460
+ })) }, getFunctionalComponentRequiredStyles()), mergeDeep(getFunctionalComponentStateMessageStyles(theme, state), {
6539
6461
  message: {
6540
- marginTop: spacingMedium$1,
6462
+ marginTop: spacingStaticMedium,
6541
6463
  },
6542
6464
  })));
6543
6465
  };
@@ -6555,7 +6477,7 @@ const flexItemWidths = {
6555
6477
  const getComponentCss$H = (width, offset, alignSelf, grow, shrink, flex) => {
6556
6478
  return getCss({
6557
6479
  '@global': {
6558
- ':host': addImportantToEachRule(Object.assign({ boxSizing: 'border-box' }, mergeDeep(buildResponsiveStyles(width, (widthResponsive) => ({
6480
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ boxSizing: 'border-box' }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(width, (widthResponsive) => ({
6559
6481
  width: `${flexItemWidths[widthResponsive]}%`,
6560
6482
  })), buildResponsiveStyles(offset, (offsetResponsive) => ({
6561
6483
  marginLeft: `${flexItemWidths[offsetResponsive]}%`,
@@ -6573,7 +6495,7 @@ const getComponentCss$H = (width, offset, alignSelf, grow, shrink, flex) => {
6573
6495
  const getComponentCss$G = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
6574
6496
  return getCss({
6575
6497
  '@global': {
6576
- ':host': addImportantToEachRule(mergeDeep(buildResponsiveStyles(inline, (inlineResponsive) => ({
6498
+ ':host': addImportantToEachRule(mergeDeep(hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
6577
6499
  display: inlineResponsive ? 'inline-flex' : 'flex',
6578
6500
  })), buildResponsiveStyles(wrap, (flexWrapResponsive) => ({ flexWrap: flexWrapResponsive })), buildResponsiveStyles(direction, (flexDirectionResponsive) => ({
6579
6501
  flexDirection: flexDirectionResponsive,
@@ -6588,295 +6510,331 @@ const getComponentCss$G = (inline, wrap, direction, justifyContent, alignItems,
6588
6510
  });
6589
6511
  };
6590
6512
 
6513
+ const gutter$1 = `calc(${gridGap} / 2)`;
6591
6514
  const gridItemWidths = [
6592
6515
  0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
6593
6516
  ];
6594
- const getComponentCss$F = (size, offset, gutter) => {
6517
+ const getComponentCss$F = (size, offset) => {
6595
6518
  return getCss({
6596
6519
  '@global': {
6597
- ':host': addImportantToEachRule(Object.assign({ boxSizing: 'border-box' }, mergeDeep(buildResponsiveStyles(size, (sizeResponsive) => ({
6520
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ paddingLeft: gutter$1, paddingRight: gutter$1, boxSizing: 'border-box' }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(size, (sizeResponsive) => ({
6598
6521
  width: `${gridItemWidths[sizeResponsive]}%`,
6599
6522
  minWidth: `${gridItemWidths[sizeResponsive]}%`,
6600
6523
  })), buildResponsiveStyles(offset, (offsetResponsive) => ({
6601
6524
  marginLeft: `${gridItemWidths[offsetResponsive]}%`,
6602
- })), buildResponsiveStyles(gutter, (gutterResponsive) => {
6603
- const gutterRem = pxToRemWithUnit(gutterResponsive / 2);
6604
- return {
6605
- paddingLeft: gutterRem,
6606
- paddingRight: gutterRem,
6607
- };
6608
- })))),
6525
+ }))))),
6609
6526
  },
6610
6527
  });
6611
6528
  };
6612
6529
 
6613
- const getGutterJssStyle = (gutter) => {
6614
- const gutterRem = `-${pxToRemWithUnit(gutter / 2)}`;
6615
- return {
6616
- marginLeft: gutterRem,
6617
- marginRight: gutterRem,
6618
- };
6619
- };
6620
- const getComponentCss$E = (direction, wrap, gutter) => {
6530
+ const gutter = `calc(${gridGap} / -2)`;
6531
+ const getComponentCss$E = (direction, wrap) => {
6621
6532
  return getCss({
6622
6533
  '@global': {
6623
- ':host': addImportantToEachRule(Object.assign({ display: 'flex', flex: 'auto', width: 'auto' }, mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap })), buildResponsiveStyles(gutter, getGutterJssStyle)))),
6534
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'flex', flex: 'auto', width: 'auto', marginLeft: gutter, marginRight: gutter }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))))),
6624
6535
  },
6625
6536
  });
6626
6537
  };
6627
6538
 
6628
- const getSlottedTypographyJssStyle = () => {
6629
- return {
6630
- margin: 'inherit',
6631
- padding: 'inherit',
6632
- fontFamily: 'inherit',
6633
- fontWeight: 'inherit',
6634
- fontSize: 'inherit',
6635
- lineHeight: 'inherit',
6636
- fontStyle: 'inherit',
6637
- fontVariant: 'inherit',
6638
- color: 'inherit',
6639
- textAlign: 'inherit',
6640
- overflowWrap: 'inherit',
6641
- wordWrap: 'inherit',
6642
- hyphens: 'inherit',
6643
- whiteSpace: 'inherit',
6644
- };
6539
+ const sizeMap$4 = {
6540
+ small: fontSizeHeadingSmall,
6541
+ medium: fontSizeHeadingMedium,
6542
+ large: fontSizeHeadingLarge,
6543
+ 'x-large': fontSizeHeadingXLarge,
6544
+ 'xx-large': fontSizeHeadingXXLarge,
6545
+ 'xxx-large': fontSizeHeadingXXXLarge,
6645
6546
  };
6646
- const getEllipsisJssStyle = () => {
6647
- return {
6648
- maxWidth: '100%',
6649
- overflow: 'hidden',
6650
- textOverflow: 'ellipsis',
6651
- whiteSpace: 'nowrap',
6652
- };
6547
+ const getComponentCss$D = (size, align, color, ellipsis, theme) => {
6548
+ return getCss({
6549
+ '@global': {
6550
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6551
+ '::slotted': {
6552
+ [HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
6553
+ },
6554
+ },
6555
+ root: getTypographyRootJssStyle(headingXXLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
6556
+ fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$4[sizeValue],
6557
+ })), align, color, ellipsis, theme),
6558
+ });
6653
6559
  };
6654
6560
 
6655
- const headingMap = {
6656
- 'large-title': headingXXLarge,
6657
- 'headline-1': headingXLarge,
6658
- 'headline-2': headingLarge,
6659
- 'headline-3': headingMedium,
6660
- 'headline-4': headingSmall,
6661
- 'headline-5': headingXSmall,
6561
+ const HEADLINE_VARIANTS = [
6562
+ 'large-title',
6563
+ 'headline-1',
6564
+ 'headline-2',
6565
+ 'headline-3',
6566
+ 'headline-4',
6567
+ 'headline-5',
6568
+ ];
6569
+ const HEADLINE_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
6570
+ const isValidVariantType = (variant) => {
6571
+ return HEADLINE_VARIANTS.includes(variant);
6662
6572
  };
6663
- const getVariantJssStyle = (variant) => {
6664
- return headingMap[variant];
6573
+
6574
+ const headlineSizeMap = {
6575
+ 'headline-1': fontSizeHeadingXXLarge,
6576
+ 'headline-2': fontSizeHeadingXLarge,
6577
+ 'headline-3': fontSizeHeadingLarge,
6578
+ 'headline-4': fontSizeHeadingMedium,
6579
+ 'headline-5': fontSizeHeadingSmall,
6665
6580
  };
6666
- const getSizeJssStyle = (textSize) => {
6667
- const { semiBold: fontWeightSemiBold } = fontWeight;
6668
- return textSize === 'inherit'
6669
- ? {
6670
- fontSize: textSize,
6671
- fontWeight: fontWeightSemiBold,
6672
- }
6581
+ const getHeadlineVariantJssStyle = (variant) => {
6582
+ return Object.assign({}, (variant === 'large-title'
6583
+ ? displayMediumStyle
6673
6584
  : {
6674
- font: textMap[textSize].font.replace('400', fontWeightSemiBold),
6675
- };
6585
+ fontSize: headlineSizeMap[variant],
6586
+ }));
6587
+ };
6588
+ const textSizeMap = {
6589
+ 'x-small': fontSizeTextXSmall,
6590
+ small: fontSizeTextSmall,
6591
+ medium: fontSizeTextMedium,
6592
+ large: fontSizeTextLarge,
6593
+ 'x-large': fontSizeTextXLarge,
6594
+ };
6595
+ const getTextSizeJssStyle = (textSize) => {
6596
+ return {
6597
+ fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
6598
+ };
6676
6599
  };
6677
- const getComponentCss$D = (variant, align, color, ellipsis, theme) => {
6600
+ const getComponentCss$C = (variant, align, color, ellipsis, theme) => {
6678
6601
  return getCss({
6679
6602
  '@global': {
6680
- ':host': {
6681
- display: 'block',
6682
- },
6603
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
6683
6604
  '::slotted': {
6684
- '&(h1),&(h2),&(h3),&(h4),&(h5),&(h6)': addImportantToEachRule(getSlottedTypographyJssStyle()),
6605
+ [HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
6685
6606
  },
6686
6607
  },
6687
- root: Object.assign(Object.assign({ padding: 0, margin: 0, textAlign: align, color: color !== 'default' ? 'inherit' : getThemedColors(theme).baseColor, whiteSpace: 'inherit' }, (isVariantType(variant)
6688
- ? getVariantJssStyle(variant)
6689
- : Object.assign(Object.assign(Object.assign({}, textSmall), buildResponsiveStyles(variant, getSizeJssStyle)), { overflowWrap: null, hyphens: null }))), (ellipsis && getEllipsisJssStyle())),
6608
+ root: getTypographyRootJssStyle(headingXXLargeStyle, isValidVariantType(variant)
6609
+ ? getHeadlineVariantJssStyle(variant)
6610
+ : buildResponsiveStyles(variant, getTextSizeJssStyle), align, color, ellipsis, theme),
6690
6611
  });
6691
6612
  };
6692
6613
 
6693
- const getThemedTextColor = (theme, textColor) => {
6694
- const { baseColor, brandColor, contrastHighColor, contrastMediumColor, contrastLowColor, successColor, errorColor, warningColor, neutralColor, } = getThemedColors(theme);
6695
- const colorMap = {
6696
- brand: brandColor,
6697
- default: baseColor,
6698
- 'neutral-contrast-high': contrastHighColor,
6699
- 'neutral-contrast-medium': contrastMediumColor,
6700
- 'neutral-contrast-low': contrastLowColor,
6701
- 'notification-success': successColor,
6702
- 'notification-warning': warningColor,
6703
- 'notification-error': errorColor,
6704
- 'notification-neutral': neutralColor,
6705
- inherit: 'currentColor',
6706
- };
6707
- return colorMap[textColor];
6614
+ const sizeMap$3 = {
6615
+ 'x-small': fontSizeTextXSmall,
6616
+ small: fontSizeTextSmall,
6617
+ medium: fontSizeTextMedium,
6618
+ large: fontSizeTextLarge,
6619
+ 'x-large': fontSizeTextXLarge,
6620
+ };
6621
+ // TODO, use Tuple to reduce chunk size
6622
+ // TODO: shall icon component support 'disabled' color too? For e.g. button-pure disabled state?
6623
+ const filterLightPrimary = 'invert(3%) sepia(7%) saturate(2930%) hue-rotate(188deg) brightness(91%) contrast(103%)';
6624
+ const filterLightContrastLow = 'invert(93%) sepia(11%) saturate(36%) hue-rotate(201deg) brightness(89%) contrast(102%)';
6625
+ const filterLightContrastMedium = 'invert(65%) sepia(6%) saturate(119%) hue-rotate(187deg) brightness(90%) contrast(92%)';
6626
+ const filterLightContrastHigh = 'invert(40%) sepia(2%) saturate(686%) hue-rotate(187deg) brightness(80%) contrast(94%)';
6627
+ const filterLightNotificationSuccess = 'invert(62%) sepia(61%) saturate(551%) hue-rotate(86deg) brightness(86%) contrast(80%)';
6628
+ const filterLightNotificationWarning = 'invert(74%) sepia(91%) saturate(343%) hue-rotate(348deg) brightness(92%) contrast(86%)';
6629
+ const filterLightNotificationError = 'invert(25%) sepia(62%) saturate(2003%) hue-rotate(335deg) brightness(100%) contrast(97%)';
6630
+ const filterLightNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
6631
+ const filterDarkPrimary = 'invert(97%) sepia(55%) saturate(2840%) hue-rotate(180deg) brightness(114%) contrast(103%)';
6632
+ const filterDarkContrastLow = 'invert(20%) sepia(7%) saturate(421%) hue-rotate(202deg) brightness(97%) contrast(82%)';
6633
+ const filterDarkContrastMedium = 'invert(54%) sepia(4%) saturate(229%) hue-rotate(187deg) brightness(91%) contrast(84%)';
6634
+ const filterDarkContrastHigh = 'invert(68%) sepia(6%) saturate(108%) hue-rotate(187deg) brightness(104%) contrast(88%)';
6635
+ const filterDarkNotificationSuccess = 'invert(59%) sepia(22%) saturate(1342%) hue-rotate(86deg) brightness(96%) contrast(88%)';
6636
+ const filterDarkNotificationWarning = 'invert(72%) sepia(94%) saturate(303%) hue-rotate(354deg) brightness(89%) contrast(94%)';
6637
+ const filterDarkNotificationError = 'invert(28%) sepia(34%) saturate(3133%) hue-rotate(333deg) brightness(95%) contrast(100%)';
6638
+ const filterDarkNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
6639
+ const filter = {
6640
+ light: {
6641
+ primary: filterLightPrimary,
6642
+ brand: filterLightPrimary,
6643
+ default: filterLightPrimary,
6644
+ 'contrast-low': filterLightContrastLow,
6645
+ 'neutral-contrast-low': filterLightContrastLow,
6646
+ 'contrast-medium': filterLightContrastMedium,
6647
+ 'neutral-contrast-medium': filterLightContrastMedium,
6648
+ 'contrast-high': filterLightContrastHigh,
6649
+ 'neutral-contrast-high': filterLightContrastHigh,
6650
+ 'notification-success': filterLightNotificationSuccess,
6651
+ 'notification-warning': filterLightNotificationWarning,
6652
+ 'notification-error': filterLightNotificationError,
6653
+ 'notification-info': filterLightNotificationInfo,
6654
+ 'notification-neutral': filterLightNotificationInfo, // deprecated
6655
+ },
6656
+ dark: {
6657
+ primary: filterDarkPrimary,
6658
+ brand: filterDarkPrimary,
6659
+ default: filterDarkPrimary,
6660
+ 'contrast-low': filterDarkContrastLow,
6661
+ 'neutral-contrast-low': filterDarkContrastLow,
6662
+ 'contrast-medium': filterDarkContrastMedium,
6663
+ 'neutral-contrast-medium': filterDarkContrastMedium,
6664
+ 'contrast-high': filterDarkContrastHigh,
6665
+ 'neutral-contrast-high': filterDarkContrastHigh,
6666
+ 'notification-success': filterDarkNotificationSuccess,
6667
+ 'notification-warning': filterDarkNotificationWarning,
6668
+ 'notification-error': filterDarkNotificationError,
6669
+ 'notification-info': filterDarkNotificationInfo,
6670
+ 'notification-neutral': filterDarkNotificationInfo, // deprecated
6671
+ },
6708
6672
  };
6709
-
6710
- const sizeMap$2 = {
6711
- small: pxToRemWithUnit(24),
6712
- medium: pxToRemWithUnit(36),
6713
- large: pxToRemWithUnit(48),
6714
- inherit: 'inherit',
6673
+ const forceRerenderAnimationStyle = {
6674
+ '0%': {
6675
+ transform: 'rotateZ(0)',
6676
+ },
6677
+ '100%': {
6678
+ transform: 'rotateZ(0)',
6679
+ },
6715
6680
  };
6716
- const getComponentCss$C = (color, size, theme) => {
6717
- const dimension = sizeMap$2[size];
6681
+ const keyFramesLight = 'rerender-light';
6682
+ const keyFramesDark = 'rerender-dark';
6683
+ const getComponentCss$B = (color, size, theme) => {
6684
+ const isColorInherit = color === 'inherit';
6685
+ const isSizeInherit = size === 'inherit';
6718
6686
  return getCss({
6719
- '@global': {
6720
- ':host': {
6721
- display: 'inline-flex',
6722
- verticalAlign: 'top',
6723
- },
6724
- img: {
6725
- filter: ['dark', 'dark-electric'].includes(theme) ? 'invert(100%)' : 'none',
6726
- },
6727
- svg: {
6728
- fill: 'currentColor',
6729
- // TODO: This is a temporary fallback for Chromium and should be removed if this bug is resolved: https://bugs.chromium.org/p/chromium/issues/detail?id=1242706
6730
- // further information: https://melanie-richards.com/blog/currentcolor-svg-hcm/
6731
- '@media (forced-colors: active)': {
6732
- fill: 'canvasText',
6733
- },
6734
- },
6735
- },
6736
- root: {
6737
- display: 'flex',
6738
- flexShrink: 0,
6739
- margin: 0,
6740
- padding: 0,
6741
- boxSizing: 'border-box',
6742
- width: dimension,
6743
- height: dimension,
6744
- color: getThemedTextColor(theme, color),
6745
- },
6687
+ '@global': Object.assign({ ':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)), img: Object.assign(Object.assign({ display: 'block', margin: 0, padding: 0 }, (!isColorInherit && {
6688
+ filter: filter[theme][color],
6689
+ WebkitAnimation: `${theme === 'light' ? keyFramesLight : keyFramesDark} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
6690
+ })), (isSizeInherit
6691
+ ? {
6692
+ width: size,
6693
+ height: size,
6694
+ }
6695
+ : {
6696
+ width: fontLineHeight,
6697
+ height: fontLineHeight,
6698
+ font: `${sizeMap$3[size]} ${fontFamily}`,
6699
+ })) }, (!isColorInherit && {
6700
+ [`@keyframes ${isThemeDark(theme) ? keyFramesDark : keyFramesLight}`]: forceRerenderAnimationStyle,
6701
+ })),
6746
6702
  });
6747
6703
  };
6748
6704
 
6749
- const mediaQueryS = mediaQueryMin('s');
6750
- const getComponentCss$B = (state, hasAction, hasClose, theme) => {
6751
- const textColor = getThemedColors('light').baseColor;
6752
- return getCss(Object.assign(Object.assign({ '@global': {
6753
- ':host': addImportantToEachRule(getNotificationRootJssStyle(state, theme)),
6754
- h5: Object.assign(Object.assign({}, headingXSmall), { margin: 0, color: textColor }),
6755
- p: Object.assign(Object.assign({}, textSmall), { margin: 0, color: textColor }),
6756
- }, icon: getNotificationIconJssStyle(state), content: getNotificationContentJssStyle() }, (hasAction && {
6757
- action: {
6758
- gridColumnStart: 1,
6759
- gridRowStart: 2,
6760
- [mediaQueryS]: {
6761
- gridColumnStart: 3,
6762
- gridRowStart: 1,
6763
- marginLeft: pxToRemWithUnit(16),
6764
- },
6765
- },
6766
- })), (hasClose && { close: getCloseIconJssStyle() })));
6705
+ const mediaQueryMinS$1 = getMediaQueryMin('s');
6706
+ const mediaQueryMaxS$1 = getMediaQueryMax('s');
6707
+ const getBackgroundColor = (state, theme) => {
6708
+ const { infoSoftColor, successSoftColor, errorSoftColor, warningSoftColor } = getThemedColors(theme);
6709
+ const colorMap = {
6710
+ neutral: infoSoftColor,
6711
+ info: infoSoftColor,
6712
+ warning: warningSoftColor,
6713
+ success: successSoftColor,
6714
+ error: errorSoftColor,
6715
+ };
6716
+ return colorMap[state];
6767
6717
  };
6768
- const getNotificationRootJssStyle = (state, theme) => {
6769
- const themedColors = getThemedColors(theme);
6718
+ const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
6770
6719
  return {
6771
6720
  display: 'grid',
6772
- gridTemplateColumns: '1fr auto',
6773
- gridTemplateRows: 'auto',
6774
- gridRowGap: pxToRemWithUnit(16),
6775
- alignItems: 'start',
6776
- justifyItems: 'start',
6777
- padding: pxToRemWithUnit(16),
6778
- background: themedColors[`${state}SoftColor`],
6779
- borderLeft: `${pxToRemWithUnit(4)} solid ${themedColors[`${state}Color`]}`,
6780
- [mediaQueryS]: {
6781
- // 4 columns are for icon, content, action button and close button
6782
- gridTemplateColumns: '2rem 1fr auto auto',
6721
+ // 2 columns for content and optional close button
6722
+ gridTemplateColumns: `minmax(auto, 1fr)${hasClose ? ' auto' : ''}`,
6723
+ gap: spacingStaticMedium,
6724
+ placeItems: 'start',
6725
+ padding: spacingStaticMedium,
6726
+ background: getBackgroundColor(state, theme),
6727
+ borderRadius: borderRadiusSmall,
6728
+ [mediaQueryMinS$1]: {
6729
+ // 4 columns are for icon, content, optional action button and optional close button
6730
+ gridTemplateColumns: `auto minmax(auto, 1fr)${hasAction ? ' auto' : ''}${hasClose ? ' auto' : ''}`,
6783
6731
  },
6784
6732
  };
6785
6733
  };
6786
- const getNotificationIconJssStyle = (state) => ({
6787
- display: 'none',
6788
- [mediaQueryS]: {
6789
- display: 'inline-flex',
6790
- color: getThemedColors('light')[`${state}Color`],
6734
+ const getNotificationIconJssStyle = () => ({
6735
+ [mediaQueryMaxS$1]: {
6736
+ display: 'none',
6791
6737
  },
6792
6738
  });
6793
6739
  const getNotificationContentJssStyle = () => ({
6794
6740
  display: 'grid',
6795
- gridGap: pxToRemWithUnit(4),
6796
- maxWidth: pxToRemWithUnit(800),
6797
- });
6798
- const getCloseIconJssStyle = () => ({
6799
- marginLeft: pxToRemWithUnit(16),
6741
+ gap: spacingStaticXSmall,
6742
+ maxWidth: '50rem',
6743
+ [mediaQueryMinS$1]: {
6744
+ marginLeft: `-${spacingStaticSmall}`,
6745
+ },
6800
6746
  });
6801
6747
 
6802
- const getComponentCss$A = (icon, active, stretch, size, weight, hideLabel, alignLabel, hasSubline, hasSlottedAnchor, theme) => {
6803
- return getCss(mergeDeep(getLinkButtonPureStyles(icon, active, false, stretch, size, weight, hideLabel, alignLabel, hasSubline, hasSlottedAnchor, theme), {
6804
- '@global': {
6805
- '::slotted': addImportantToEachRule({
6748
+ const mediaQueryMaxS = getMediaQueryMax('s');
6749
+ const getComponentCss$A = (state, hasAction, hasClose, theme) => {
6750
+ return getCss(Object.assign({ '@global': {
6751
+ ':host': addImportantToEachRule(Object.assign(Object.assign({}, getNotificationRootJssStyle(state, hasAction, hasClose, theme)), hostHiddenStyles)),
6752
+ h5: headingSmallStyle,
6753
+ p: textSmallStyle,
6754
+ 'h5,p': {
6755
+ margin: 0,
6756
+ color: getThemedColors(theme).primaryColor,
6757
+ },
6758
+ }, icon: getNotificationIconJssStyle(), content: getNotificationContentJssStyle() }, (hasAction && {
6759
+ action: {
6760
+ [mediaQueryMaxS]: {
6761
+ gridRowStart: 2,
6762
+ },
6763
+ },
6764
+ })));
6765
+ };
6766
+
6767
+ const getComponentCss$z = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
6768
+ const { focusColor } = getThemedColors(theme);
6769
+ const hasIcon = hasVisibleIcon(icon, iconSource);
6770
+ return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), Object.assign(Object.assign({}, (hasSlottedAnchor && {
6771
+ '@global': addImportantToEachRule({
6772
+ '::slotted': {
6806
6773
  '&(a)': {
6807
- display: 'block',
6808
- position: 'static',
6809
- textDecoration: 'none',
6774
+ outline: 0,
6775
+ textDecoration: underline ? 'underline' : 'none',
6810
6776
  font: 'inherit',
6811
6777
  color: 'inherit',
6812
- outline: 0,
6813
6778
  },
6814
6779
  // The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
6815
6780
  // since Safari prior to this major release does not support pseudo-elements in the slotted context
6816
6781
  // (https://bugs.webkit.org/show_bug.cgi?id=178237)
6817
- '&(a)::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle()), { outline: '1px solid transparent', outlineOffset: '1px' }),
6818
- // The focusable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself
6819
- // and uses the browser's default style, since Safari prior to this major version does not support
6820
- // pseudo-elements in the slotted context (https://bugs.webkit.org/show_bug.cgi?id=178237)
6782
+ '&(a)::before': Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical, borderRadius: borderRadiusSmall }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
6783
+ right: hideLabelValue ? offsetVertical : offsetHorizontal,
6784
+ left: hideLabelValue || hasIcon ? offsetVertical : offsetHorizontal,
6785
+ }))),
6821
6786
  '&(a:focus)::before': {
6822
- outlineColor: 'currentColor',
6787
+ border: `${borderWidthBase} solid ${focusColor}`,
6823
6788
  },
6824
6789
  '&(a:focus:not(:focus-visible))::before': {
6825
- outlineColor: 'transparent',
6790
+ border: 0,
6826
6791
  },
6827
- }),
6828
- 'slot[name=subline]::slotted(*)': {
6829
- margin: 0,
6830
6792
  },
6831
- },
6832
- }));
6793
+ }),
6794
+ })), { root: {
6795
+ textDecoration: underline ? 'underline' : 'none',
6796
+ } })));
6833
6797
  };
6834
6798
 
6835
- const { contrastHighColor: themeLightContrastHighColor, baseColor: themeLightBaseColor$2 } = getThemedColors('light');
6836
- const { baseColor: themeDarkBaseColor } = getThemedColors('dark');
6837
- const getColors$4 = (icon, theme) => {
6838
- const isDarkTheme = isThemeDark(theme);
6839
- const { contrastHighColorDarken, baseColorDarken } = getThemedColors(theme);
6840
- const externalBrandColor = colorExternal[icon === null || icon === void 0 ? void 0 : icon.split('-')[1]];
6841
- return {
6842
- baseColor: isDarkTheme ? themeDarkBaseColor : themeLightContrastHighColor,
6843
- baseColorHover: externalBrandColor || (isDarkTheme ? baseColorDarken : contrastHighColorDarken),
6844
- textColor: isDarkTheme ? themeLightBaseColor$2 : themeDarkBaseColor,
6845
- textColorHover: icon === 'logo-kakaotalk' ? themeLightBaseColor$2 : externalBrandColor ? themeDarkBaseColor : undefined,
6846
- };
6847
- };
6848
- const getComponentCss$z = (icon, hideLabel, hasHref, theme) => {
6849
- const { baseColor, baseColorHover, textColor, textColorHover } = getColors$4(icon, theme);
6850
- return getCss({
6851
- '@global': Object.assign(Object.assign({ ':host': {
6852
- display: 'inline-flex',
6853
- verticalAlign: 'top',
6854
- outline: addImportantToRule(0),
6855
- } }, (!hasHref && {
6856
- '::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a)': Object.assign({ display: 'block', textDecoration: 'none', color: 'inherit', lineHeight: 'inherit', outline: 'transparent solid 1px', outlineOffset: '3px' }, buildResponsiveStyles(hideLabel, getSlottedLinkJssStyle)),
6799
+ const getComponentCss$y = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
6800
+ const { focusColor } = getThemedColors(theme);
6801
+ return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), Object.assign({}, (hasSlottedAnchor && {
6802
+ '@global': addImportantToEachRule({
6803
+ '::slotted': {
6804
+ '&(a)': {
6805
+ outline: 0,
6806
+ textDecoration: 'none',
6807
+ font: 'inherit',
6808
+ color: 'inherit',
6809
+ },
6810
+ // The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
6811
+ // since Safari prior to this major release does not support pseudo-elements in the slotted context
6812
+ // (https://bugs.webkit.org/show_bug.cgi?id=178237)
6813
+ '&(a)::before': Object.assign({ content: '""', position: 'fixed', borderRadius: borderRadiusMedium }, getInsetJssStyle(-6)),
6857
6814
  // TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
6858
6815
  '&(a::-moz-focus-inner)': {
6859
6816
  border: 0,
6860
- }, '&(a:focus)': {
6861
- outlineColor: baseColor,
6862
- } }, hoverMediaQuery({
6863
- '&(a:hover:focus)': {
6864
- outlineColor: baseColorHover,
6865
6817
  },
6866
- })), { '&(a:focus:not(:focus-visible))': {
6867
- outlineColor: 'transparent',
6868
- } })),
6869
- })), { span: Object.assign(Object.assign({ display: 'block', width: '100%', color: textColor }, textSmall), (hasHref && buildResponsiveStyles(hideLabel, getLabelJssStyle))) }),
6870
- root: Object.assign(Object.assign({ display: 'flex', width: '100%', minWidth: pxToRemWithUnit(48), minHeight: pxToRemWithUnit(48), position: 'relative', margin: 0, padding: 0, boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', cursor: 'pointer', textDecoration: 'none', textAlign: 'left', border: '1px solid currentColor', backgroundColor: 'currentColor', color: baseColor, transition: getTransition('background-color') + ',' + getTransition('border-color') + ',' + getTransition('color') }, hoverMediaQuery({
6871
- '&:hover, &:active': {
6872
- color: baseColorHover,
6873
- '& span, & $icon': {
6874
- color: textColorHover,
6818
+ '&(a:focus)::before': {
6819
+ border: `${borderWidthBase} solid ${focusColor}`,
6820
+ },
6821
+ '&(a:focus:not(:focus-visible))::before': {
6822
+ border: 0,
6875
6823
  },
6876
6824
  },
6877
- })), (hasHref && Object.assign(Object.assign({}, buildResponsiveStyles(hideLabel, getRootJssStyle)), getFocusJssStyle()))),
6878
- icon: Object.assign({ position: 'absolute', width: pxToRemWithUnit(24), height: pxToRemWithUnit(24), color: textColor, pointerEvents: 'none' }, buildResponsiveStyles(hideLabel, getIconJssStyle)),
6879
- });
6825
+ }),
6826
+ }))));
6827
+ };
6828
+
6829
+ const fontWeightMap = {
6830
+ thin: fontWeightRegular,
6831
+ regular: fontWeightRegular,
6832
+ semibold: fontWeightSemiBold$1,
6833
+ 'semi-bold': fontWeightSemiBold$1,
6834
+ bold: fontWeightBold,
6835
+ };
6836
+ const getFontWeight = (weight) => {
6837
+ return fontWeightMap[weight];
6880
6838
  };
6881
6839
 
6882
6840
  const aspectRatioPaddingTop = {
@@ -6905,31 +6863,26 @@ const getGradientBackground = (isCompact, isTopAligned) => {
6905
6863
  ? `linear-gradient(${gradient} 100%);`
6906
6864
  : `linear-gradient(to top, ${gradient} 100%);`;
6907
6865
  };
6908
- const sizeMap$1 = {
6866
+ const sizeMap$2 = {
6909
6867
  inherit: {
6910
6868
  fontSize: 'inherit',
6911
6869
  },
6912
6870
  default: { fontSize: '1.25rem' },
6913
6871
  };
6914
- const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradient) => {
6872
+ const getComponentCss$x = (aspectRatio, size, weight, align, compact, hasGradient) => {
6915
6873
  const isTopAligned = align === 'top';
6916
6874
  const paddingSizeXS = pxToRemWithUnit(24);
6917
6875
  const gradientPadding = pxToRemWithUnit(72);
6918
6876
  return getCss({
6919
- '@global': {
6920
- ':host': {
6921
- display: 'block',
6922
- height: addImportantToRule('fit-content'),
6923
- '& ::slotted(picture),::slotted(img)': addImportantToEachRule(Object.assign({ transition: getTransition('transform') }, getBackfaceVisibilityJssStyle())),
6924
- '& ::slotted(picture)': addImportantToEachRule(Object.assign({ position: 'absolute' }, getInsetJssStyle())),
6925
- '& ::slotted(img)': addImportantToEachRule({
6926
- height: '100%',
6927
- width: '100%',
6928
- objectFit: 'cover',
6929
- }),
6877
+ '@global': Object.assign(Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ height: 'fit-content' }, hostHiddenStyles))) }, addImportantToEachRule({
6878
+ '::slotted(picture),::slotted(img)': Object.assign({ transition: getTransition('transform') }, getBackfaceVisibilityJssStyle()),
6879
+ '::slotted(picture)': Object.assign({ position: 'absolute' }, getInsetJssStyle()),
6880
+ '::slotted(img)': {
6881
+ height: '100%',
6882
+ width: '100%',
6883
+ objectFit: 'cover',
6930
6884
  },
6931
- p: Object.assign(Object.assign(Object.assign({ color: getThemedTextColor('dark', 'default') }, textSmall), { maxWidth: pxToRemWithUnit(550), margin: 0 }), mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$1[s]), buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })))),
6932
- },
6885
+ })), { p: Object.assign(Object.assign(Object.assign({ color: getThemedTypographyColor('dark', 'primary') }, textSmallStyle), { maxWidth: pxToRemWithUnit(550), margin: 0 }), mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$2[s]), buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })))) }),
6933
6886
  root: Object.assign(Object.assign({ height: 0, position: 'relative', transform: 'translate3d(0,0,0)' }, hoverMediaQuery({
6934
6887
  '&:hover': {
6935
6888
  '& ::slotted(picture),::slotted(img)': addImportantToEachRule({
@@ -6943,7 +6896,7 @@ const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradien
6943
6896
  content: Object.assign(Object.assign(Object.assign({ position: 'absolute' }, (isTopAligned ? { top: 0 } : { bottom: 0 })), { left: 0, right: 0, display: 'grid', justifyItems: 'start', padding: align === 'bottom'
6944
6897
  ? `${gradientPadding} ${paddingSizeXS} ${paddingSizeXS}`
6945
6898
  : `${paddingSizeXS} ${paddingSizeXS} ${gradientPadding}`, gap: pxToRemWithUnit(24) }), mergeDeep({
6946
- [mediaQueryMin('s')]: Object.assign({ paddingLeft: pxToRemWithUnit(32), paddingRight: pxToRemWithUnit(32) }, (align === 'bottom' ? { paddingBottom: pxToRemWithUnit(32) } : { paddingTop: pxToRemWithUnit(32) })),
6899
+ [getMediaQueryMin('s')]: Object.assign({ paddingLeft: pxToRemWithUnit(32), paddingRight: pxToRemWithUnit(32) }, (align === 'bottom' ? { paddingBottom: pxToRemWithUnit(32) } : { paddingTop: pxToRemWithUnit(32) })),
6947
6900
  }, hasGradient &&
6948
6901
  buildResponsiveStyles(compact, (isCompact) => ({
6949
6902
  background: getGradientBackground(isCompact, isTopAligned),
@@ -6960,10 +6913,6 @@ const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradien
6960
6913
  });
6961
6914
  };
6962
6915
 
6963
- const getComponentCss$x = (variant, hideLabel, hasSlottedAnchor, theme) => {
6964
- return getCss(getLinkButtonStyles(variant, hideLabel, false, hasSlottedAnchor, theme));
6965
- };
6966
-
6967
6916
  const baseSizes = {
6968
6917
  small: {
6969
6918
  width: '100px',
@@ -6977,15 +6926,14 @@ const baseSizes = {
6977
6926
  const getComponentCss$w = (size) => {
6978
6927
  return getCss({
6979
6928
  '@global': {
6980
- ':host': {
6981
- position: 'relative',
6982
- display: 'inline-flex',
6983
- verticalAlign: 'top',
6984
- outline: addImportantToRule(0),
6985
- },
6986
- a: Object.assign({ display: 'block', textDecoration: 'none' }, getFocusJssStyle({ color: getThemedColors('light').baseColor, offset: 0, pseudo: '::before' })),
6929
+ ':host': Object.assign({ position: 'relative', display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(Object.assign({ outline: 0 }, hostHiddenStyles))),
6930
+ a: Object.assign({ display: 'block', textDecoration: 'none' }, getFocusJssStyle({
6931
+ color: getThemedColors('light').primaryColor,
6932
+ offset: 0,
6933
+ pseudo: '::before',
6934
+ })),
6987
6935
  picture: Object.assign({ display: 'block' }, (size === 'responsive'
6988
- ? Object.assign(Object.assign({}, baseSizes.small), { [mediaQueryMin('l')]: baseSizes.medium }) : baseSizes[size])),
6936
+ ? Object.assign(Object.assign({}, baseSizes.small), { [getMediaQueryMin('l')]: baseSizes.medium }) : baseSizes[size])),
6989
6937
  img: {
6990
6938
  display: 'block',
6991
6939
  width: '100%',
@@ -6995,33 +6943,9 @@ const getComponentCss$w = (size) => {
6995
6943
  });
6996
6944
  };
6997
6945
 
6998
- // inspired by https://www.abeautifulsite.net/posts/testing-support-for-focus-visible/
6999
- const supportsFocusVisible = () => {
7000
- let isSupported = true;
7001
- const style = document.createElement('style');
7002
- document.head.appendChild(style);
7003
- try {
7004
- style.sheet.insertRule(':focus-visible{}');
7005
- }
7006
- catch (e) {
7007
- isSupported = false;
7008
- }
7009
- finally {
7010
- style.remove();
7011
- }
7012
- return isSupported;
7013
- };
7014
- const hasFocusVisibleSupport = hasDocument && supportsFocusVisible();
7015
- // getter for easy mocking
7016
- const getHasFocusVisibleSupport = () => hasFocusVisibleSupport;
7017
- // TODO: remove fallback once :focus-visible is supported by safari
7018
- const getFocusVisibleFallback = (style) => getHasFocusVisibleSupport() ? style : { outline: 0 };
7019
-
7020
- const mediaQueryM = mediaQueryMin('m');
7021
- const mediaQueryXl = mediaQueryMin('xl');
7022
- const mediaQueryXxl = mediaQueryMin('xxl');
7023
- const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
7024
- const { backgroundColor: darkThemeBackgroundColor } = getThemedColors('dark');
6946
+ const mediaQueryXl = getMediaQueryMin('xl');
6947
+ const { backgroundColor, primaryColor: lightThemePrimaryColor } = getThemedColors('light');
6948
+ const { primaryColor: darkThemePrimaryColor } = getThemedColors('dark');
7025
6949
  const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
7026
6950
  const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
7027
6951
  const getFullscreenJssStyles = (fullscreen) => {
@@ -7031,12 +6955,14 @@ const getFullscreenJssStyles = (fullscreen) => {
7031
6955
  maxWidth: 'none',
7032
6956
  minHeight: '100%',
7033
6957
  margin: 0,
6958
+ borderRadius: 0,
7034
6959
  }
7035
6960
  : {
7036
6961
  minWidth: pxToRemWithUnit(275.2),
7037
6962
  maxWidth: pxToRemWithUnit(1536),
7038
6963
  minHeight: 'auto',
7039
- margin: `max(1rem, 7vh) ${gridSafeZone.base}`,
6964
+ margin: `max(16px, 7vh) ${gridSafeZoneBase}`,
6965
+ borderRadius: borderRadiusMedium,
7040
6966
  };
7041
6967
  };
7042
6968
  const isFullscreenForXl = (fullscreen) => {
@@ -7051,118 +6977,133 @@ const isFullscreenForXl = (fullscreen) => {
7051
6977
  return BREAKPOINTS.indexOf(lastTrueBreakpoint) > BREAKPOINTS.indexOf(lastFalseBreakpoint);
7052
6978
  }
7053
6979
  };
7054
- const getSlottedJssStyle = (marginValue, hasHeader) => {
6980
+ const getSlottedJssStyle = (marginValue, hasHeader, disableCloseButton) => {
6981
+ const marginPx = `${-marginValue}px`;
7055
6982
  const marginRem = pxToRemWithUnit(-marginValue);
7056
6983
  return Object.assign(Object.assign({ [`&(.${stretchToFullModalWidthClassName})`]: {
7057
- width: `calc(100% + ${pxToRemWithUnit(marginValue * 2)})`,
7058
- margin: `0 ${marginRem}`,
6984
+ width: `calc(100% + ${marginValue * 2}px)`,
6985
+ margin: `0 ${marginPx}`,
7059
6986
  } }, (!hasHeader && {
7060
6987
  [`&(.${stretchToFullModalWidthClassName}:first-child)`]: {
7061
- marginTop: marginRem,
6988
+ marginTop: !disableCloseButton ? marginRem : marginPx,
7062
6989
  },
7063
6990
  })), { [`&(.${stretchToFullModalWidthClassName}:last-child)`]: {
7064
- marginBottom: marginRem,
6991
+ marginBottom: marginPx,
7065
6992
  } });
7066
6993
  };
7067
6994
  const getComponentCss$v = (open, fullscreen, disableCloseButton, hasHeader) => {
7068
6995
  const isFullscreenForXlAndXxl = isFullscreenForXl(fullscreen);
7069
- const { baseColor } = getThemedColors('light');
7070
6996
  return getCss(Object.assign(Object.assign({ '@global': {
7071
- ':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (open
6997
+ ':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (open
7072
6998
  ? {
7073
- transition: `opacity .6s ${transitionTimingFunction}`,
7074
6999
  opacity: 1,
7075
7000
  visibility: 'inherit',
7076
7001
  }
7077
7002
  : {
7078
- transition: `opacity .2s ${transitionTimingFunction},visibility 0s linear .2s`,
7079
7003
  opacity: 0,
7080
7004
  visibility: 'hidden',
7081
- })), {
7005
+ })), hostHiddenStyles), {
7082
7006
  // workaround via pseudo element to fix stacking (black) background in safari
7083
- '&::before': Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: `${darkThemeBackgroundColor}e6` }) }))), { overflowY: 'auto' }),
7084
- '::slotted': addImportantToEachRule(Object.assign(Object.assign({}, getSlottedJssStyle(32, hasHeader)), { [mediaQueryM]: getSlottedJssStyle(40, hasHeader), [mediaQueryXxl]: getSlottedJssStyle(64, hasHeader) })),
7085
- h1: Object.assign(Object.assign({}, textMedium), { fontWeight: fontWeight.semiBold, margin: 0, color: baseColor, [mediaQueryMin('m')]: Object.assign(Object.assign({}, textLarge), { fontWeight: fontWeight.semiBold }) }),
7086
- }, root: mergeDeep(Object.assign(Object.assign({ position: 'relative', boxSizing: 'border-box', transition: `transform .6s ${transitionTimingFunction}`, transform: open ? 'scale3d(1,1,1)' : 'scale3d(.9,.9,1)', padding: pxToRemWithUnit(32), backgroundColor: lightThemeBackgroundColor }, getFocusVisibleFallback(getFocusJssStyle({ color: lightThemeBackgroundColor }))), { [mediaQueryM]: {
7087
- padding: pxToRemWithUnit(40),
7088
- }, [mediaQueryXl]: {
7089
- margin: isFullscreenForXlAndXxl ? 0 : `min(12rem, 10vh) ${gridSafeZone.xl}`,
7090
- }, [mediaQueryXxl]: {
7091
- padding: pxToRemWithUnit(64),
7092
- margin: isFullscreenForXlAndXxl ? 0 : `min(12rem, 10vh) ${gridSafeZone.xl}`,
7093
- } }), buildResponsiveStyles(fullscreen, getFullscreenJssStyles)) }, (hasHeader && {
7094
- header: Object.assign(Object.assign({ padding: `0 0 ${pxToRemWithUnit(16)}` }, (!disableCloseButton && { margin: `0 ${pxToRemWithUnit(32)} 0 0` })), { [mediaQueryM]: {
7095
- padding: `0 0 ${pxToRemWithUnit(24)}`,
7096
- }, [mediaQueryXxl]: Object.assign({ padding: `0 0 ${pxToRemWithUnit(32)}` }, (!disableCloseButton && { margin: 0 })) }),
7007
+ '&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading }), frostedGlassStyle) }))), { overflowY: 'auto' }),
7008
+ '::slotted': addImportantToEachRule(Object.assign({}, mergeDeep(getSlottedJssStyle(32, hasHeader, disableCloseButton), buildResponsiveStyles(fullscreen, (fullscreenValue) => ({
7009
+ [`&(.${stretchToFullModalWidthClassName}`]: {
7010
+ '&:first-child)': {
7011
+ borderRadius: fullscreenValue ? 0 : '8px 8px 0 0',
7012
+ },
7013
+ '&:last-child)': {
7014
+ borderRadius: fullscreenValue ? 0 : '0 0 8px 8px',
7015
+ },
7016
+ },
7017
+ }))))),
7018
+ h2: Object.assign(Object.assign({}, headingLargeStyle), { margin: 0, color: lightThemePrimaryColor }),
7019
+ }, root: mergeDeep({
7020
+ position: 'relative',
7021
+ boxSizing: 'border-box',
7022
+ transition: `transform .6s ${transitionTimingFunction}`,
7023
+ transform: open ? 'scale3d(1,1,1)' : 'scale3d(.9,.9,1)',
7024
+ padding: !disableCloseButton ? `${pxToRemWithUnit(32)} 32px 32px 32px` : '32px',
7025
+ backgroundColor,
7026
+ outline: 0,
7027
+ '&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid` }, buildResponsiveStyles(fullscreen, (fullscreenValue) => (Object.assign({ borderRadius: fullscreenValue ? 0 : '12px', borderColor: fullscreenValue ? lightThemePrimaryColor : darkThemePrimaryColor }, getInsetJssStyle(fullscreenValue ? 0 : -4))))),
7028
+ '&:not(:focus-visible)::before': {
7029
+ border: 0,
7030
+ },
7031
+ [mediaQueryXl]: {
7032
+ margin: isFullscreenForXlAndXxl ? 0 : `min(192px, 10vh) ${gridSafeZoneBase}`,
7033
+ },
7034
+ }, buildResponsiveStyles(fullscreen, getFullscreenJssStyles)) }, (hasHeader && {
7035
+ header: {
7036
+ padding: '0 0 8px',
7037
+ },
7097
7038
  })), { close: {
7098
7039
  position: 'absolute',
7099
- top: 0,
7100
- right: 0,
7101
- padding: pxToRemWithUnit(8),
7102
- border: `${pxToRemWithUnit(6)} solid ${lightThemeBackgroundColor}`,
7103
- background: lightThemeBackgroundColor,
7040
+ top: '8px',
7041
+ right: '8px',
7042
+ border: `2px solid ${backgroundColor}`,
7043
+ borderRadius: '4px',
7044
+ backgroundColor,
7045
+ '&:hover': {
7046
+ backgroundColor: 'transparent',
7047
+ borderColor: 'transparent',
7048
+ },
7104
7049
  } }));
7105
7050
  };
7106
7051
 
7052
+ const mediaQueryMinS = getMediaQueryMin('s');
7053
+ // button size needs to be fluid between 320px and 360px viewport width, so that the pagination fits into 320px viewport
7054
+ // and text scale 200% works (almost) on mobile viewports too
7055
+ const buttonSize = `clamp(36px, calc(${fontLineHeight} + 10vw - 20px), 40px)`;
7056
+ const disabledCursorStyle = {
7057
+ cursor: 'default',
7058
+ pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
7059
+ };
7107
7060
  const getComponentCss$u = (maxNumberOfPageLinks, theme) => {
7108
- const { baseColor, brandColor, disabledColor, hoverColor, activeColor, focusColor } = getThemedColors(theme);
7061
+ const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
7109
7062
  return getCss({
7110
7063
  '@global': {
7111
- ':host': {
7112
- display: 'block',
7113
- outline: addImportantToRule(0),
7114
- },
7115
- nav: Object.assign({ display: 'flex', justifyContent: 'center', margin: 0, padding: 0 }, buildResponsiveStyles(maxNumberOfPageLinks, (n) => ({
7064
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
7065
+ nav: Object.assign({ display: 'flex', justifyContent: 'center' }, buildResponsiveStyles(maxNumberOfPageLinks, (n) => ({
7116
7066
  counterReset: `size ${n}`,
7117
7067
  }))),
7118
7068
  ul: {
7119
7069
  display: 'flex',
7070
+ gap: spacingStaticXSmall,
7120
7071
  margin: 0,
7121
7072
  padding: 0,
7073
+ [mediaQueryMinS]: {
7074
+ gap: spacingStaticSmall,
7075
+ },
7122
7076
  },
7123
7077
  li: {
7124
7078
  listStyleType: 'none',
7125
- margin: 0,
7126
- padding: 0,
7127
- },
7128
- span: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', transition: getTransition('color'), position: 'relative', width: pxToRemWithUnit(40), height: pxToRemWithUnit(40), boxSizing: 'border-box', textDecoration: 'none' }, textSmall), { whiteSpace: 'nowrap', cursor: 'pointer', color: baseColor }), getFocusJssStyle({ color: focusColor, offset: 1 })), hoverMediaQuery({
7129
- '&:hover': {
7130
- color: hoverColor,
7131
- },
7132
- })), { '&:active': {
7133
- outline: 'none',
7134
- color: activeColor,
7135
- }, '&[aria-disabled]': {
7136
- cursor: 'default',
7137
- pointerEvents: 'none',
7138
- color: disabledColor,
7139
- }, '&[aria-current]': Object.assign(Object.assign({ cursor: 'default' }, hoverMediaQuery({
7140
- '&:hover': {
7141
- color: baseColor,
7079
+ [mediaQueryMinS]: {
7080
+ '&:first-child': {
7081
+ marginRight: spacingStaticSmall,
7142
7082
  },
7143
- })), { '&::after': {
7144
- content: '""',
7145
- display: 'block',
7146
- position: 'absolute',
7147
- bottom: 0,
7148
- left: pxToRemWithUnit(6),
7149
- right: pxToRemWithUnit(6),
7150
- height: pxToRemWithUnit(4),
7151
- background: brandColor,
7152
- } }) }),
7153
- },
7154
- ellipsis: {
7155
- cursor: 'default',
7156
- pointerEvents: 'none',
7157
- '&::after': {
7158
- content: '"…"',
7083
+ '&:last-child': {
7084
+ marginLeft: spacingStaticSmall,
7085
+ },
7086
+ },
7159
7087
  },
7088
+ span: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', transition: ['color', 'border-color', 'background-color'].map(getTransition).join(), position: 'relative', width: buttonSize, height: buttonSize, boxSizing: 'border-box' }, textSmallStyle), { whiteSpace: 'nowrap', cursor: 'pointer', color: primaryColor, outline: 0, borderRadius: borderRadiusSmall, borderColor: 'transparent' }), hoverMediaQuery({
7089
+ '&:not([aria-disabled]):not(.ellipsis):hover': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
7090
+ })), { '&:not(.ellipsis):focus::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid ${focusColor}`, borderRadius: borderRadiusMedium }), '&:focus:not(:focus-visible)::before': {
7091
+ borderColor: 'transparent',
7092
+ }, '&[aria-current]': {
7093
+ disabledCursorStyle,
7094
+ color: primaryColor,
7095
+ border: `${borderWidthBase} solid ${primaryColor}`,
7096
+ borderRadius: borderRadiusSmall,
7097
+ '&:not(.ellipsis):focus::before': Object.assign({}, getInsetJssStyle(-6)),
7098
+ }, '&[aria-disabled]': Object.assign(Object.assign({}, disabledCursorStyle), { color: disabledColor }) }),
7160
7099
  },
7100
+ ellipsis: Object.assign(Object.assign({}, disabledCursorStyle), { '&::after': {
7101
+ content: '"…"',
7102
+ } }),
7161
7103
  });
7162
7104
  };
7163
7105
 
7164
- const { backgroundColor, baseColor: baseColor$2 } = getThemedColors('light');
7165
- const mediaQueryXS = mediaQueryMin('xs');
7106
+ const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
7166
7107
  const mediaQueryForcedColors = '@media (forced-colors: active)';
7167
7108
  const directionPositionMap = {
7168
7109
  top: {
@@ -7186,7 +7127,7 @@ const directionPositionMap = {
7186
7127
  transform: 'translate3d(0, -50%, 0)',
7187
7128
  },
7188
7129
  };
7189
- const borderWidth = '.75rem';
7130
+ const borderWidth = '12px';
7190
7131
  const transparentColor = 'transparent';
7191
7132
  const canvas = 'canvas';
7192
7133
  const canvasText = 'canvastext';
@@ -7197,7 +7138,7 @@ const directionArrowMap = {
7197
7138
  left: '50%',
7198
7139
  transform: 'translateX(-50%)',
7199
7140
  borderWidth: join(borderWidth, borderWidth, 0),
7200
- borderColor: join(backgroundColor, transparentColor, transparentColor),
7141
+ borderColor: join(backgroundColorThemeLight, transparentColor, transparentColor),
7201
7142
  [mediaQueryForcedColors]: {
7202
7143
  borderColor: join(canvasText, canvas, canvas),
7203
7144
  },
@@ -7207,7 +7148,7 @@ const directionArrowMap = {
7207
7148
  right: 0,
7208
7149
  transform: 'translateY(-50%)',
7209
7150
  borderWidth: join(borderWidth, borderWidth, borderWidth, 0),
7210
- borderColor: join(transparentColor, backgroundColor, transparentColor, transparentColor),
7151
+ borderColor: join(transparentColor, backgroundColorThemeLight, transparentColor, transparentColor),
7211
7152
  [mediaQueryForcedColors]: {
7212
7153
  borderColor: join(canvas, canvasText, canvas, canvas),
7213
7154
  },
@@ -7217,7 +7158,7 @@ const directionArrowMap = {
7217
7158
  left: '50%',
7218
7159
  transform: 'translateX(-50%)',
7219
7160
  borderWidth: join(0, borderWidth, borderWidth),
7220
- borderColor: join(transparentColor, transparentColor, backgroundColor),
7161
+ borderColor: join(transparentColor, transparentColor, backgroundColorThemeLight),
7221
7162
  [mediaQueryForcedColors]: {
7222
7163
  borderColor: join(canvas, canvas, canvasText),
7223
7164
  },
@@ -7227,23 +7168,32 @@ const directionArrowMap = {
7227
7168
  left: 0,
7228
7169
  transform: 'translateY(-50%)',
7229
7170
  borderWidth: join(borderWidth, 0, borderWidth, borderWidth),
7230
- borderColor: join(transparentColor, transparentColor, transparentColor, backgroundColor),
7171
+ borderColor: join(transparentColor, transparentColor, transparentColor, backgroundColorThemeLight),
7231
7172
  [mediaQueryForcedColors]: {
7232
7173
  borderColor: join(canvas, canvas, canvas, canvasText),
7233
7174
  },
7234
7175
  },
7235
7176
  };
7236
- const getComponentCss$t = (direction) => {
7237
- const spacerBox = '-1rem';
7177
+ const getComponentCss$t = (direction, theme) => {
7178
+ const spacerBox = '-16px';
7179
+ const { hoverColor, focusColor } = getThemedColors(theme);
7238
7180
  return getCss({
7239
7181
  '@global': {
7240
- ':host': Object.assign(Object.assign({}, addImportantToEachRule({
7241
- position: 'relative',
7242
- display: 'inline-block',
7243
- width: '1.5rem',
7244
- height: '1.5rem', // height of icon (to improve ssr support)
7245
- })), { verticalAlign: 'top' }),
7246
- p: Object.assign(Object.assign({}, textSmall), { margin: 0 }),
7182
+ ':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ position: 'relative', display: 'inline-block' }, hostHiddenStyles))), { verticalAlign: 'top' }),
7183
+ p: Object.assign(Object.assign({}, textSmallStyle), { margin: 0 }),
7184
+ button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'relative', appearance: 'none', background: 'transparent', border: 0, padding: 0, outline: 0, cursor: 'pointer' }, textSmallStyle), { width: fontLineHeight, height: fontLineHeight, borderRadius: '50%' }), hoverMediaQuery({
7185
+ transition: getTransition('background-color'),
7186
+ '&:hover': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
7187
+ })), { '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-2)), { border: `${borderWidthBase} solid transparent`, borderRadius: '50%' }), '&:focus::before': {
7188
+ borderColor: focusColor,
7189
+ }, '&:focus:not(:focus-visible)::before': {
7190
+ borderColor: 'transparent',
7191
+ } }),
7192
+ },
7193
+ label: getTextHiddenJssStyle(true),
7194
+ icon: {
7195
+ display: 'inline-block',
7196
+ transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
7247
7197
  },
7248
7198
  spacer: {
7249
7199
  position: 'absolute',
@@ -7252,18 +7202,14 @@ const getComponentCss$t = (direction) => {
7252
7202
  left: spacerBox,
7253
7203
  right: spacerBox,
7254
7204
  bottom: spacerBox,
7255
- filter: 'drop-shadow(0 0 1rem rgba(0,0,0,.3))',
7205
+ filter: 'drop-shadow(0 0 16px rgba(0,0,0,.3))',
7256
7206
  backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
7257
7207
  pointerEvents: 'none',
7258
7208
  animation: '240ms $fadeIn ease forwards'
7259
7209
  ,
7260
7210
  '&::before': Object.assign({ content: '""', position: 'absolute', borderStyle: 'solid' }, directionArrowMap[direction]),
7261
7211
  },
7262
- popover: Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: '90vw', width: 'max-content', boxSizing: 'border-box', background: backgroundColor, padding: '.5rem 1rem', pointerEvents: 'auto' }, directionPositionMap[direction]), textSmall), { listStyleType: 'none',
7263
- // TODO: The styles above are our text styles should be extracted as soon as p-text is refactored with JSS
7264
- color: baseColor$2, whiteSpace: 'inherit', [mediaQueryXS]: {
7265
- maxWidth: pxToRemWithUnit(432),
7266
- }, [mediaQueryForcedColors]: {
7212
+ popover: Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: 'min(90vw, 27rem)', width: 'max-content', boxSizing: 'border-box', background: backgroundColorThemeLight, padding: '8px 16px', pointerEvents: 'auto' }, directionPositionMap[direction]), textSmallStyle), { listStyleType: 'none', color: primaryColorThemeLight, whiteSpace: 'inherit', borderRadius: borderRadiusSmall, [mediaQueryForcedColors]: {
7267
7213
  outline: `1px solid ${canvasText}`,
7268
7214
  } }),
7269
7215
  '@keyframes fadeIn': {
@@ -7277,69 +7223,72 @@ const getComponentCss$t = (direction) => {
7277
7223
  });
7278
7224
  };
7279
7225
 
7280
- const theme = 'light';
7281
- const getBackgroundImageStyles = (hasVisibleState, innerCircleColor, outerCircleColor) => {
7282
- const maskColor = getThemedColors(theme).backgroundColor.replace(/#/g, '%23');
7283
- return {
7284
- backgroundImage: `url(${
7285
- // SVG images act like a mask to smooth the circle radius
7286
- hasVisibleState
7287
- ? `'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g fill="${maskColor}" fill-rule="nonzero"><path d="M14 26c6.627 0 12-5.373 12-12S20.627 2 14 2 2 7.373 2 14s5.373 12 12 12zm0 2C6.268 28 0 21.732 0 14S6.268 0 14 0s14 6.268 14 14-6.268 14-14 14z"/><path d="M14 21.273a7.273 7.273 0 1 0 0-14.546 7.273 7.273 0 0 0 0 14.546zM14 24C8.477 24 4 19.523 4 14S8.477 4 14 4s10 4.477 10 10-4.477 10-10 10z"/></g></svg>'`
7288
- : `'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><g fill="${maskColor}" fill-rule="nonzero"><path d="M14 26c6.627 0 12-5.373 12-12S20.627 2 14 2 2 7.373 2 14s5.373 12 12 12zm0 2C6.268 28 0 21.732 0 14S6.268 0 14 0s14 6.268 14 14-6.268 14-14 14z"/><path d="M14 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0 3C7.925 25 3 20.075 3 14S7.925 3 14 3s11 4.925 11 11-4.925 11-11 11z"/></g></svg>'`}), radial-gradient(circle, ${innerCircleColor} ${pxToRemWithUnit(9)}, ${outerCircleColor} ${pxToRemWithUnit(9)})`,
7289
- };
7290
- };
7291
- const getComponentCss$s = (hideLabel, state, isDisabled) => {
7292
- const size = pxToRemWithUnit(28);
7293
- const hasVisibleState = isVisibleFormState(state);
7294
- const { baseColor, backgroundColor, contrastMediumColor, contrastHighColor, disabledColor } = getThemedColors(theme);
7295
- const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
7296
- return getCss(Object.assign(Object.assign({ '@global': {
7297
- ':host': {
7298
- display: 'block',
7299
- },
7300
- '::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(input)': Object.assign({ position: 'static', width: size, height: size, flexShrink: 0, display: 'block', margin: pxToRemWithUnit(-2), padding: 0, WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', backgroundSize: size, backgroundPosition: 'center', backgroundColor: 'transparent', transition: getTransition('background-image'), opacity: 1, border: `2px solid ${backgroundColor}`, borderRadius: '50%', outline: 'none', cursor: 'pointer' }, getBackgroundImageStyles(hasVisibleState, backgroundColor, formStateColor || contrastMediumColor)), '&(input:checked)': getBackgroundImageStyles(hasVisibleState, formStateColor || contrastHighColor, formStateColor || contrastHighColor) }, hoverMediaQuery({
7301
- '&(input:not(:disabled):not(:checked):hover), .label:hover ~ &(input:not(:disabled):not(:checked))': getBackgroundImageStyles(hasVisibleState, backgroundColor, formStateHoverColor || baseColor),
7302
- '&(input:not(:disabled):checked:hover), .label:hover ~ &(input:not(:disabled):checked)': getBackgroundImageStyles(hasVisibleState, formStateColor || contrastHighColor, formStateHoverColor || baseColor),
7303
- })), { '&(input:disabled)': Object.assign({ cursor: 'not-allowed' }, getBackgroundImageStyles(hasVisibleState, backgroundColor, disabledColor)), '&(input:checked:disabled)': getBackgroundImageStyles(hasVisibleState, disabledColor, disabledColor), '&(input:focus)': {
7304
- boxShadow: `0 0 0 1px ${formStateColor || contrastMediumColor}`,
7305
- }, '&(input:focus:not(:focus-visible))': {
7306
- boxShadow: 'none',
7307
- } })),
7308
- label: {
7309
- position: 'relative',
7310
- display: 'flex',
7311
- },
7312
- }, label: getCheckboxRadioLabelJssStyle(isDisabled, hideLabel, theme) }, getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)));
7226
+ const getComponentCss$s = (hideLabel, state, isDisabled, theme) => {
7227
+ const checkedIconColor = getThemedColors(theme === 'light' ? 'dark' : 'light').primaryColor.replace(/#/g, '%23');
7228
+ return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, theme), {
7229
+ '@global': {
7230
+ '::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
7231
+ borderRadius: '50%',
7232
+ }, '&(input:checked)': {
7233
+ backgroundImage: getInlineSVGBackgroundImage(`<circle fill="${checkedIconColor}" cx="12" cy="12" r="6"/>`),
7234
+ } }, (!isDisabled && {
7235
+ '&(input:focus)::before': {
7236
+ borderRadius: '50%',
7237
+ },
7238
+ }))),
7239
+ },
7240
+ }));
7313
7241
  };
7314
7242
 
7315
- const getComponentCss$r = (gradientColorScheme, isNextHidden, isPrevHidden, scrollIndicatorPosition, theme) => {
7316
- const { backgroundColor, backgroundSurfaceColor, baseColor } = getThemedColors(theme);
7317
- const gradientColor = gradientColorScheme === 'surface' ? backgroundSurfaceColor : backgroundColor;
7318
- const gradientColorTransparent = gradientColor + (gradientColor.length === 4 ? '0' : '00');
7243
+ const gradientColorMap = {
7244
+ light: {
7245
+ default: '255,255,255',
7246
+ surface: '238,239,242',
7247
+ },
7248
+ dark: {
7249
+ default: '14,14,18',
7250
+ surface: '33,34,37',
7251
+ },
7252
+ };
7253
+ const getGradient = (theme, gradientColorTheme) => {
7254
+ const gradientColor = gradientColorMap[theme][gradientColorTheme];
7255
+ return (`rgba(${gradientColor},1) 0%,` +
7256
+ `rgba(${gradientColor},0.9) 10%,` +
7257
+ `rgba(${gradientColor},0.668116) 40%,` +
7258
+ `rgba(${gradientColor},0.331884) 60%,` +
7259
+ `rgba(${gradientColor},0.0816599) 80%,` +
7260
+ `rgba(${gradientColor},0)`);
7261
+ };
7262
+ const getComponentCss$r = (gradientColorTheme, isNextHidden, isPrevHidden, scrollIndicatorPosition, theme) => {
7263
+ const { backgroundColor, backgroundSurfaceColor, focusColor } = getThemedColors('light');
7264
+ const { hoverColor } = getThemedColors(theme);
7265
+ const isDarkTheme = isThemeDark(theme);
7319
7266
  const actionPrevNextStyles = {
7320
7267
  position: 'relative',
7321
- padding: `${pxToRemWithUnit(4)} 0`,
7268
+ padding: '4px 0',
7322
7269
  pointerEvents: 'none',
7323
7270
  display: 'flex',
7324
7271
  alignItems: scrollIndicatorPosition === 'center' ? 'center' : 'flex-start',
7325
7272
  };
7326
7273
  return getCss({
7327
7274
  '@global': {
7328
- ':host': {
7329
- display: 'block',
7330
- height: addImportantToRule('inherit'),
7331
- },
7332
- },
7333
- root: {
7334
- display: 'grid',
7335
- gridTemplateColumns: '2em minmax(0, 1fr) 2em',
7336
- margin: `0 ${pxToRemWithUnit(-4)}`,
7337
- height: 'inherit',
7275
+ ':host': addImportantToEachRule(Object.assign({ display: 'block', height: 'inherit' }, hostHiddenStyles)),
7276
+ button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', pointerEvents: 'auto', alignItems: 'center', justifyContent: 'center' }, textSmallStyle), { height: `calc(${fontLineHeight} + 4px)`, width: `calc(${fontLineHeight} + 4px)`, border: 0, outline: 0, cursor: 'pointer', background: gradientColorTheme === 'surface' ? backgroundSurfaceColor : backgroundColor, borderRadius: borderRadiusSmall }), frostedGlassStyle), { visibility: 'hidden' }), (!isDarkTheme && dropShadowLowStyle)), hoverMediaQuery({
7277
+ transition: getTransition('background-color'),
7278
+ '&:hover': Object.assign({ background: hoverColor }, (isDarkTheme && {
7279
+ '& > .icon': {
7280
+ filter: 'invert(97%) sepia(55%) saturate(2840%) hue-rotate(180deg) brightness(114%) contrast(103%)', // TODO: this is not shared from icon?
7281
+ },
7282
+ })),
7283
+ })),
7338
7284
  },
7285
+ root: Object.assign(Object.assign({ display: 'grid', gridTemplateColumns: '48px minmax(0, 1fr) 48px' }, hoverMediaQuery({
7286
+ // distinguish gradient width on mobile and desktop
7287
+ gridTemplateColumns: '64px minmax(0, 1fr) 64px',
7288
+ })), { margin: '0 -4px', height: 'inherit' }),
7339
7289
  'scroll-area': {
7340
- minHeight: pxToRemWithUnit(24),
7341
7290
  gridArea: '1 / 1 / 1 / -1',
7342
- padding: pxToRemWithUnit(4),
7291
+ padding: '4px',
7343
7292
  overflow: 'scroll hidden',
7344
7293
  msOverflowStyle: 'none' /* IE and Edge */,
7345
7294
  scrollbarWidth: 'none' /* Firefox */,
@@ -7347,9 +7296,23 @@ const getComponentCss$r = (gradientColorScheme, isNextHidden, isPrevHidden, scro
7347
7296
  display: 'none',
7348
7297
  },
7349
7298
  },
7350
- // Extra wrapper needed to compensate different offset parent calculation depending of browser.
7299
+ // Extra wrapper needed to compensate different offset parent calculation depending on browser.
7351
7300
  // Needed for position of status bar.
7352
- 'scroll-wrapper': Object.assign(Object.assign({}, getFocus({ color: baseColor })), { position: 'relative', display: 'inline-flex', minWidth: '100%', verticalAlign: 'top' }),
7301
+ 'scroll-wrapper': {
7302
+ position: 'relative',
7303
+ display: 'inline-flex',
7304
+ minHeight: '28px',
7305
+ minWidth: '100%',
7306
+ verticalAlign: 'top',
7307
+ outline: 0,
7308
+ '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid transparent`, borderRadius: borderRadiusSmall, pointerEvents: 'none' }),
7309
+ '&:focus::before': {
7310
+ borderColor: focusColor,
7311
+ },
7312
+ '&:focus:not(:focus-visible)::before': {
7313
+ borderColor: 'transparent',
7314
+ },
7315
+ },
7353
7316
  trigger: {
7354
7317
  position: 'absolute',
7355
7318
  top: 0,
@@ -7363,68 +7326,50 @@ const getComponentCss$r = (gradientColorScheme, isNextHidden, isPrevHidden, scro
7363
7326
  right: 0,
7364
7327
  },
7365
7328
  },
7366
- 'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(90deg, ${gradientColor} 50%, ${gradientColorTransparent} 100%)`, visibility: isPrevHidden ? 'hidden' : 'visible', '& .button::before': {
7367
- left: 0,
7368
- } }),
7369
- 'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(90deg, ${gradientColorTransparent} 0%, ${gradientColor} 50%)`, visibility: isNextHidden ? 'hidden' : 'visible', '& .button::before': {
7370
- right: 0,
7371
- } }),
7372
- button: {
7373
- pointerEvents: 'auto',
7374
- position: 'static',
7375
- // Pseudo-element to stretch the click-area to full height
7376
- '&::before': {
7377
- content: '""',
7378
- position: 'absolute',
7379
- top: 0,
7380
- bottom: 0,
7381
- width: 'max(2rem, 80%)',
7382
- },
7383
- },
7329
+ 'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(to right, ${getGradient(theme, gradientColorTheme)} 100%)`, visibility: isPrevHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginLeft: '8px' }, hoverMediaQuery({
7330
+ visibility: isPrevHidden ? 'hidden' : 'visible',
7331
+ })) }),
7332
+ 'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(to left, ${getGradient(theme, gradientColorTheme)} 100%)`, visibility: isNextHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginRight: '8px' }, hoverMediaQuery({
7333
+ visibility: isNextHidden ? 'hidden' : 'visible',
7334
+ })) }),
7384
7335
  });
7385
7336
  };
7386
7337
 
7387
- const ITEM_PADDING = pxToRemWithUnit(16);
7338
+ const ITEM_PADDING = '17px';
7388
7339
  const ICON_SIZE = pxToRemWithUnit(24);
7389
7340
  const ICON_MARGIN = pxToRemWithUnit(4);
7390
- const getColors$3 = (isDisabled, isSelected, bgColor, theme) => {
7391
- const themedColors = getThemedColors(theme);
7392
- const { baseColor, contrastMediumColor } = isSelected ? getInvertedThemedColors(theme) : themedColors;
7393
- const backgroundColor = themedColors[isSelected ? 'contrastHighColor' : bgColor === 'background-surface' ? 'backgroundColor' : 'backgroundSurfaceColor'];
7394
- return isDisabled
7395
- ? {
7396
- backgroundColor,
7397
- buttonColor: themedColors.disabledColor,
7398
- labelColor: themedColors.disabledColor,
7399
- }
7400
- : {
7401
- backgroundColor,
7402
- buttonColor: baseColor,
7403
- labelColor: contrastMediumColor,
7404
- };
7341
+ const getColors$3 = (isDisabled, isSelected, theme) => {
7342
+ const { primaryColor, contrastMediumColor, disabledColor, contrastLowColor } = getThemedColors(theme);
7343
+ return {
7344
+ buttonColor: isDisabled ? disabledColor : primaryColor,
7345
+ labelColor: isDisabled ? disabledColor : contrastMediumColor,
7346
+ borderColor: isSelected ? primaryColor : contrastLowColor,
7347
+ hoverBorderColor: primaryColor,
7348
+ };
7405
7349
  };
7406
- const getComponentCss$q = (isDisabled, isSelected, bgColor, theme) => {
7407
- const { baseColor, contrastLowColor } = getThemedColors(theme);
7408
- const { backgroundColor, buttonColor, labelColor } = getColors$3(isDisabled, isSelected, bgColor, theme);
7350
+ const getComponentCss$q = (isDisabled, isSelected, hasIcon, theme) => {
7351
+ const { focusColor } = getThemedColors(theme);
7352
+ const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$3(isDisabled, isSelected, theme);
7409
7353
  return getCss({
7410
7354
  '@global': {
7411
- ':host': addImportantToEachRule({
7412
- display: 'block',
7413
- outline: 0,
7414
- }),
7415
- button: Object.assign(Object.assign(Object.assign({ display: 'block', height: '100%', width: '100%', padding: `${pxToRemWithUnit(12)} ${ITEM_PADDING}`, margin: 0, border: 0, background: backgroundColor, color: buttonColor }, textSmall), getFocusJssStyle({ color: baseColor })), (isDisabled
7355
+ ':host': addImportantToEachRule(Object.assign({ display: 'block', outline: 0 }, hostHiddenStyles)),
7356
+ button: Object.assign(Object.assign(Object.assign({ display: 'block', height: '100%', width: '100%', padding: hasIcon ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`, margin: 0, border: `${borderWidthBase} solid ${borderColor}`, borderRadius: borderRadiusSmall, outline: 0, background: 'transparent', color: buttonColor }, textSmallStyle), { overflowWrap: 'normal', position: 'relative', '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-5)), { border: `${borderWidthBase} solid transparent`, borderRadius: '7px' }), '&:focus::before': {
7357
+ borderColor: focusColor,
7358
+ }, '&:focus:not(:focus-visible)::before': {
7359
+ borderColor: 'transparent',
7360
+ } }), (isDisabled
7416
7361
  ? {
7417
7362
  cursor: 'not-allowed',
7418
7363
  }
7419
7364
  : Object.assign({ cursor: 'pointer' }, (!isSelected &&
7420
7365
  hoverMediaQuery({
7421
- transition: getTransition('background-color'),
7366
+ transition: getTransition('border-color'),
7422
7367
  '&:hover': {
7423
- background: contrastLowColor,
7368
+ borderColor: hoverBorderColor,
7424
7369
  },
7425
7370
  }))))),
7426
7371
  // label
7427
- span: Object.assign(Object.assign({ display: 'block' }, textXSmall), { color: labelColor }),
7372
+ span: Object.assign(Object.assign({ display: 'block' }, textXSmallStyle), { overflowWrap: 'normal', color: labelColor }),
7428
7373
  },
7429
7374
  icon: {
7430
7375
  height: ICON_SIZE,
@@ -7440,192 +7385,162 @@ const getComponentCss$p = (maxWidth) => {
7440
7385
  maxWidth = (maxWidth > MAX_ITEM_WIDTH && MAX_ITEM_WIDTH) || (maxWidth < MIN_ITEM_WIDTH && MIN_ITEM_WIDTH) || maxWidth;
7441
7386
  return getCss({
7442
7387
  '@global': {
7443
- ':host': addImportantToEachRule({
7444
- display: 'grid',
7445
- gridAutoRows: '1fr',
7446
- gridTemplateColumns: `repeat(auto-fit, ${maxWidth}px)`,
7447
- gridGap: '4px',
7448
- }),
7388
+ ':host': addImportantToEachRule(Object.assign({ display: 'grid', gridAutoRows: '1fr', gridTemplateColumns: `repeat(auto-fit, ${maxWidth}px)`, gap: '6px' }, hostHiddenStyles)),
7449
7389
  },
7450
7390
  });
7451
7391
  };
7452
-
7453
- const { disabledColor: lightThemeDisabledColor } = getThemedColors('light');
7454
- const INPUT_HEIGHT = 48;
7455
7392
  const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
7456
- const { baseColor, backgroundColor, contrastHighColor, contrastMediumColor } = getThemedColors(theme);
7393
+ const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
7457
7394
  const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
7458
- const hasVisibleState = isVisibleFormState(state);
7459
- // TODO: Add readonly color to utilities package
7460
- const readonly = '#ebebeb'; // 🤷
7461
- return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'relative' }, getInsetJssStyle()), { width: '100%' }), (child !== 'textarea' && { height: pxToRemWithUnit(INPUT_HEIGHT) })), { margin: 0, outline: '1px solid transparent', outlineOffset: '2px', WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', border: hasVisibleState ? `2px solid ${formStateColor}` : `1px solid ${contrastMediumColor}`, borderRadius: 0, backgroundColor, opacity: 1 }), textSmall), { overflowWrap: null, hyphens: null, textIndent: 0, color: baseColor, transition: ['color', 'border-color', 'background-color'].map(getTransition).join() }), additionalDefaultJssStyle) }, hoverMediaQuery({
7395
+ return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign({ display: 'block', width: '100%', height: 'auto', margin: 0, outline: 0, WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall, background: 'transparent', font: textSmallStyle.font.replace('ex', 'ex + 10px'), textIndent: 0, color: primaryColor, transition: ['color', 'border-color', 'background-color'].map(getTransition).join() }, additionalDefaultJssStyle) }, hoverMediaQuery({
7462
7396
  // with the media query the selector has higher priority and overrides disabled styles
7463
- [`::slotted(${child}:not(:disabled):not([readonly]):hover)`]: {
7464
- borderColor: formStateHoverColor || (isThemeDark(theme) ? contrastHighColor : baseColor),
7397
+ [`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
7398
+ borderColor: formStateHoverColor || primaryColor,
7465
7399
  },
7466
7400
  })), { [`::slotted(${child}:focus)`]: {
7467
- outlineColor: formStateColor || contrastMediumColor,
7401
+ borderColor: primaryColor,
7468
7402
  }, [`::slotted(${child}:disabled)`]: {
7469
7403
  cursor: 'not-allowed',
7470
- color: lightThemeDisabledColor,
7471
- borderColor: lightThemeDisabledColor,
7472
- WebkitTextFillColor: lightThemeDisabledColor, // 🤷 no theming here; fix placeholder color bug in Safari
7404
+ color: disabledColor,
7405
+ borderColor: disabledColor,
7406
+ WebkitTextFillColor: disabledColor,
7473
7407
  } }), (child !== 'select' && {
7474
7408
  [`::slotted(${child}[readonly])`]: {
7475
- borderColor: readonly,
7476
- backgroundColor: readonly,
7477
- },
7478
- [`::slotted(${child}[readonly]:focus)`]: {
7479
- outlineColor: 'transparent',
7480
- },
7481
- [`::slotted(${child}[readonly]:not(:disabled))`]: {
7482
- color: contrastMediumColor,
7409
+ borderColor: contrastLowColor,
7410
+ background: contrastLowColor,
7483
7411
  },
7484
7412
  }));
7485
7413
  };
7486
7414
  const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles) => {
7487
- const { baseColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
7415
+ const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
7488
7416
  const { formStateHoverColor } = getThemedFormStateColors(theme, state);
7489
- const hasVisibleState = isVisibleFormState(state);
7490
- // jss prefers flat and simple selectors, therefore we reuse properties
7491
- const labelTextHoverJssStyle = hoverMediaQuery({
7492
- '&:hover': {
7493
- [`&~::slotted(${child}:not(:disabled):not([readonly]))` +
7494
- (hasVisibleState ? `,::slotted(${child}:not(:disabled):not([readonly]):hover)` : '')]: {
7495
- borderColor: addImportantToRule(hasVisibleState ? formStateHoverColor : baseColor),
7496
- },
7497
- },
7498
- });
7499
7417
  const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
7500
7418
  return Object.assign({ label: {
7501
- display: 'block',
7419
+ display: 'flex',
7420
+ flexDirection: 'column',
7421
+ gap: spacingStaticXSmall,
7502
7422
  position: 'relative',
7503
- '&__text': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel, getFormTextHiddenJssStyle)), textSmall), { color: isDisabled ? disabledColor : baseColor, transition: getTransition('color'), '&+&--description': Object.assign({ marginTop: pxToRemWithUnit(-4), paddingBottom: pxToRemWithUnit(8) }, textXSmall) }), (!isDisabled && {
7504
- '&--description': {
7505
- color: contrastMediumColor,
7423
+ '&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel, getFormTextHiddenJssStyle)), textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color'), '&+&': Object.assign({ marginTop: `-${spacingStaticXSmall}`, fontSize: fontSizeTextXSmall }, (!isDisabled && {
7424
+ color: contrastHighColor,
7425
+ })) }), hoverMediaQuery({
7426
+ '&:hover': {
7427
+ [`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))` +
7428
+ (formStateHoverColor ? `,::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)` : '')]: {
7429
+ borderColor: addImportantToRule(formStateHoverColor || primaryColor),
7430
+ },
7506
7431
  },
7507
- })), labelTextHoverJssStyle),
7432
+ })),
7508
7433
  } }, (counterOrUnitOrIconStyles && {
7509
- [counterOrUnitOrIconStylesKey]: Object.assign(Object.assign(Object.assign({}, counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey]), (isDisabled && {
7434
+ [counterOrUnitOrIconStylesKey]: Object.assign(Object.assign(Object.assign({}, counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey]), { pointerEvents: 'none' }), (isDisabled && {
7510
7435
  color: disabledColor,
7511
7436
  cursor: 'not-allowed',
7512
- })), labelTextHoverJssStyle),
7437
+ })),
7513
7438
  }));
7514
7439
  };
7515
-
7516
- const { baseColor: themeLightBaseColor$1 } = getThemedColors('light');
7440
+ const ICON_SPACE = `${24 + 13 * 2 + 2}px`; // 24px = icon width, 13px * 2 = padding, 2px = border
7517
7441
  const getComponentCss$o = (isDisabled, hideLabel, state, theme) => {
7518
- const isDarkTheme = isThemeDark(theme);
7519
- const { baseColor, backgroundColor } = getThemedColors(theme);
7520
- const defaultPadding = pxToRemWithUnit(isVisibleFormState(state) ? 10 : 11);
7521
- return getCss(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': {
7522
- display: 'block',
7523
- } }, addImportantToEachRule(mergeDeep(getBaseChildStyles('select', state, theme, {
7442
+ return getCss(Object.assign(Object.assign(Object.assign({ '@global': addImportantToEachRule(Object.assign({ ':host': Object.assign({ display: 'block' }, hostHiddenStyles) }, getBaseChildStyles('select', state, theme, {
7524
7443
  position: 'static',
7444
+ zIndex: 0,
7525
7445
  cursor: 'pointer',
7526
- padding: [defaultPadding, pxToRemWithUnit(47), defaultPadding, defaultPadding].join(' '),
7527
- '&@-moz-document url-prefix()': {
7528
- // fix for 3px text-indention in FF
7529
- paddingLeft: pxToRemWithUnit(8),
7530
- },
7531
- }), {
7532
- '::slotted(select:disabled)': {
7533
- background: isDarkTheme ? themeLightBaseColor$1 : backgroundColor, // 🤷
7534
- },
7446
+ padding: `8px ${ICON_SPACE} 8px ${spacingStaticMedium}`,
7535
7447
  }))), root: {
7536
7448
  display: 'block',
7537
7449
  position: 'relative',
7538
7450
  } }, getLabelStyles('select', isDisabled, hideLabel, state, theme, {
7539
7451
  icon: {
7540
7452
  position: 'absolute',
7541
- bottom: pxToRemWithUnit(12),
7542
- right: pxToRemWithUnit(12),
7543
- color: baseColor,
7544
- pointerEvents: 'none',
7453
+ bottom: '13px',
7454
+ right: '15px',
7545
7455
  transform: 'rotate3d(0,0,1,0.0001deg)',
7546
7456
  transition: getTransition('transform'),
7547
7457
  '&--open': {
7548
7458
  transform: 'rotate3d(0,0,1,180deg)',
7549
7459
  },
7550
7460
  },
7551
- })), getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)));
7461
+ })), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)));
7552
7462
  };
7553
7463
 
7554
- const sizeSmall = pxToRemWithUnit(48);
7555
- const sizeMedium = pxToRemWithUnit(72);
7556
- const sizeLarge = pxToRemWithUnit(104);
7557
- const sizeMap = {
7464
+ const sizeSmall = '48px';
7465
+ const sizeMedium = '72px';
7466
+ const sizeLarge = '104px';
7467
+ const sizeMap$1 = {
7558
7468
  small: { height: sizeSmall, width: sizeSmall },
7559
7469
  medium: { height: sizeMedium, width: sizeMedium },
7560
7470
  large: { height: sizeLarge, width: sizeLarge },
7561
7471
  inherit: { height: 'inherit', width: 'inherit' },
7562
7472
  };
7563
7473
  const getComponentCss$m = (size, theme) => {
7564
- const { contrastHighColor, baseColor } = getThemedColors(theme);
7565
- const animationDuration = 'var(--p-animation-duration__spinner, 2s)';
7474
+ const strokeDasharray = '57'; // C = 2πR
7475
+ const animationDuration = 'var(--p-animation-duration, 2s)';
7476
+ const { primaryColor, contrastMediumColor } = getThemedColors(theme);
7566
7477
  return getCss({
7567
7478
  '@global': {
7568
- ':host': {
7569
- display: 'inline-flex',
7570
- verticalAlign: 'top',
7571
- },
7479
+ ':host': addImportantToEachRule(Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, hostHiddenStyles)),
7572
7480
  svg: {
7573
7481
  display: 'block',
7574
7482
  position: 'relative',
7575
7483
  fill: 'none',
7576
7484
  transform: 'translate3d(0,0,0)',
7485
+ animation: `$rotate ${animationDuration} linear infinite`,
7577
7486
  },
7578
7487
  circle: {
7579
- stroke: isThemeDark(theme) || isThemeDarkElectric(theme) ? baseColor : contrastHighColor,
7580
7488
  '&:first-child': {
7581
- opacity: 0.4,
7489
+ stroke: contrastMediumColor,
7490
+ animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
7582
7491
  },
7583
7492
  '&:last-child': {
7584
7493
  transformOrigin: '0 0',
7585
- animation: `$rotate ${animationDuration} linear infinite,$dash ${animationDuration} ease-in-out infinite`,
7586
- strokeDasharray: '40, 200',
7587
- strokeDashoffset: 0,
7494
+ animation: `$dash ${animationDuration} ease-in-out infinite`,
7495
+ stroke: primaryColor,
7496
+ strokeDasharray: strokeDasharray
7497
+ ,
7588
7498
  strokeLinecap: 'round',
7589
7499
  },
7590
7500
  },
7591
7501
  '@keyframes rotate': {
7502
+ '0%': {
7503
+ transform: 'rotateZ(0deg)',
7504
+ },
7592
7505
  '100%': {
7593
- transform: 'rotate(360deg)',
7506
+ transform: 'rotateZ(360deg)',
7594
7507
  },
7595
7508
  },
7596
7509
  '@keyframes dash': {
7597
7510
  '0%': {
7598
- strokeDasharray: '3, 1000',
7511
+ strokeDashoffset: 57,
7512
+ transform: 'rotateZ(0)',
7599
7513
  },
7600
- '50%': {
7601
- strokeDasharray: '42, 1000',
7514
+ '50%, 75%': {
7515
+ strokeDashoffset: 20,
7516
+ transform: 'rotateZ(80deg)',
7602
7517
  },
7603
7518
  '100%': {
7604
- strokeDasharray: '30, 1000',
7605
- strokeDashoffset: '-52',
7519
+ strokeDashoffset: 57,
7520
+ transform: 'rotateZ(360deg)',
7606
7521
  },
7607
7522
  },
7608
7523
  },
7609
- root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1 }),
7524
+ root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap$1[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1.5 }),
7610
7525
  'sr-only': getScreenReaderOnlyJssStyle(),
7611
7526
  });
7612
7527
  };
7613
7528
 
7614
7529
  // source for svg can be found in sprite.sketch file
7615
- // svg is created via Sketch export, then run trough ImageOptim and optimized via icons package
7530
+ // svg is created via Sketch export, then run through ImageOptim and optimized via icons package
7616
7531
  const getSvg = (color) => `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" fill="${color}" width="90" height="10" viewBox="0 0 90 10"><path d="M5.524 9h.996V.456h-.828L3.16 1.464v.912l2.364-.888zm7.006 0h5.017v-.792H13.49v-.156c0-.804.396-1.224 1.476-1.956l.924-.612c.84-.552 1.74-1.236 1.74-2.724 0-1.548-.84-2.448-2.652-2.448-1.908 0-2.604 1.056-2.664 2.832h.936c.096-1.452.624-1.92 1.728-1.92 1.056 0 1.656.444 1.656 1.536 0 1.164-.768 1.68-1.524 2.184l-.924.612c-.948.636-1.656 1.332-1.656 2.652zm9.689-2.592c.084 1.86.9 2.736 2.808 2.736 1.788 0 2.736-.924 2.736-2.424 0-1.236-.504-1.86-1.32-2.136.756-.348 1.128-1.08 1.128-1.848 0-1.524-.852-2.424-2.664-2.424-1.872 0-2.592 1.092-2.688 2.832h.948c.096-1.44.672-1.92 1.74-1.92 1.056 0 1.68.456 1.68 1.512 0 .948-.528 1.488-1.62 1.488h-.804V5.1h.864c1.26 0 1.752.564 1.752 1.62 0 1.152-.588 1.632-1.752 1.632-1.26 0-1.776-.552-1.872-1.944zm9.736.624h3.876V9h.96V7.032h1.212v-.84H36.79V.456h-1.392l-3.444 5.832zm1.044-.84 2.832-4.848v4.848zm9.411-.648h.889c.204-.732.66-1.14 1.704-1.14 1.332 0 1.8.636 1.8 1.944 0 1.344-.444 2.004-1.8 2.004-1.236 0-1.728-.552-1.788-1.656h-.948c.072 1.632.984 2.448 2.736 2.448 1.776 0 2.784-.828 2.784-2.832 0-1.86-.876-2.736-2.688-2.736-.768 0-1.368.24-1.74.66l.252-2.868h3.792V.456h-4.584L42.41 5.16zm9.809.768c0 2.004.984 2.832 2.796 2.832 1.776 0 2.784-.828 2.784-2.832 0-1.86-.9-2.736-2.688-2.736-.396 0-.744.072-1.068.228L56.25.456h-1.068l-2.16 3.312c-.516.792-.804 1.488-.804 2.544zm.996.048c0-1.332.468-1.956 1.8-1.956s1.788.624 1.788 1.956-.444 1.992-1.788 1.992c-1.356 0-1.8-.66-1.8-1.992zm9.075-4.992h4.369L63.215 9h1.02l3.48-7.824v-.72H62.29zm9.929 5.352c0 1.68.96 2.424 2.784 2.424s2.784-.744 2.784-2.424c0-1.008-.408-1.716-1.308-2.052.66-.324 1.116-.9 1.116-1.956 0-1.488-.804-2.4-2.592-2.4-1.764 0-2.592.912-2.592 2.4 0 1.056.468 1.632 1.104 1.956-.9.336-1.296 1.044-1.296 2.052zm.984-.012c0-1.068.564-1.572 1.8-1.572s1.8.504 1.8 1.572c0 1.152-.564 1.644-1.8 1.644s-1.8-.492-1.8-1.644zm1.8-2.4c-1.164 0-1.608-.588-1.608-1.56 0-1.068.54-1.524 1.608-1.524s1.608.456 1.608 1.524c0 .972-.444 1.56-1.608 1.56zm9.904 1.608c.348 0 .684-.06.984-.192L83.767 9h1.068l2.124-3.348c.504-.792.792-1.488.792-2.568 0-1.98-.996-2.772-2.748-2.772-1.764 0-2.76.804-2.76 2.784 0 1.86.888 2.82 2.664 2.82zm.096-.828c-1.284 0-1.764-.66-1.764-1.992 0-1.2.444-1.872 1.764-1.872 1.308 0 1.764.672 1.764 1.872 0 1.332-.48 1.992-1.764 1.992z"/></svg>`)}")`;
7617
7532
  const getColors$2 = (state, theme) => {
7618
- const { baseColor, hoverColor, warningColor, successColor, disabledColor } = getThemedColors(theme);
7533
+ const { primaryColor, hoverColor, warningColor, successColor, disabledColor } = getThemedColors(theme);
7619
7534
  const stateToColorMap = {
7620
7535
  current: 'inherit',
7621
7536
  complete: successColor,
7622
7537
  warning: warningColor,
7623
7538
  };
7624
7539
  return {
7625
- baseColor,
7540
+ primaryColor,
7626
7541
  hoverColor,
7627
7542
  iconColor: stateToColorMap[state],
7628
- invertedBaseColor: getInvertedThemedColors(theme).baseColor,
7543
+ invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
7629
7544
  disabledColor,
7630
7545
  };
7631
7546
  };
@@ -7640,17 +7555,17 @@ const counterCircleSize = `calc(${fontLineHeight} - ${counterCirclePosition} * 2
7640
7555
  const counterValuePosition = `calc((${fontLineHeight} - ${spriteStepSize}em) / 2)`;
7641
7556
  const counterValueSize = spriteHeight;
7642
7557
  const getComponentCss$l = (state, disabled, theme) => {
7643
- const { baseColor, hoverColor, iconColor, invertedBaseColor, disabledColor } = getColors$2(state, theme);
7558
+ const { primaryColor, hoverColor, iconColor, invertedBaseColor, disabledColor } = getColors$2(state, theme);
7644
7559
  const isStateCurrentOrUndefined = !state || state === 'current';
7645
7560
  const isDisabled = !state || disabled;
7646
7561
  return getCss(Object.assign(Object.assign({ '@global': {
7647
7562
  ':host': Object.assign(Object.assign({}, (isStateCurrentOrUndefined &&
7648
7563
  Array.from(Array(9)).reduce((result, _, i) => (Object.assign(Object.assign({}, result), { [`&(:nth-of-type(${i + 1})) $button::after`]: {
7649
7564
  backgroundPositionX: `${-i * spriteStepSize}em`,
7650
- } })), {}))), { fontSize: addImportantToRule('inherit'), '&(:not(:last-of-type))': {
7651
- marginRight: addImportantToRule('1em'),
7652
- } }),
7653
- button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative', color: isDisabled ? disabledColor : baseColor, transition: getTransition('color'), margin: 0, padding: `0 0 0 calc(${fontLineHeight} + ${pxToRemWithUnit(4)})`, background: 0, border: 0 }, textSmall), { fontSize: 'inherit', whiteSpace: 'nowrap' }), getFocusJssStyle()), (isStateCurrentOrUndefined
7565
+ } })), {}))), addImportantToEachRule(Object.assign(Object.assign({ fontSize: 'inherit' }, hostHiddenStyles), { '&(:not(:last-of-type))': {
7566
+ marginRight: '1em',
7567
+ } }))),
7568
+ button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative', color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color'), margin: 0, padding: `0 0 0 calc(${fontLineHeight} + ${pxToRemWithUnit(4)})`, background: 0, border: 0 }, textSmallStyle), { fontSize: 'inherit', whiteSpace: 'nowrap' }), getFocusJssStyle()), (isStateCurrentOrUndefined
7654
7569
  ? // counter circle icon via css
7655
7570
  {
7656
7571
  cursor: isDisabled ? 'not-allowed' : 'auto',
@@ -7663,7 +7578,7 @@ const getComponentCss$l = (state, disabled, theme) => {
7663
7578
  border: `1px solid ${disabledColor}`,
7664
7579
  }
7665
7580
  : {
7666
- background: baseColor,
7581
+ background: primaryColor,
7667
7582
  })),
7668
7583
  '&::after': {
7669
7584
  // value of counter element
@@ -7702,111 +7617,86 @@ const getComponentCss$l = (state, disabled, theme) => {
7702
7617
  const getComponentCss$k = (size) => {
7703
7618
  return getCss({
7704
7619
  '@global': {
7705
- ':host': {
7706
- display: 'block',
7707
- },
7620
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
7708
7621
  },
7709
- scroller: Object.assign(Object.assign({ display: 'flex' }, textSmall), buildResponsiveStyles(size, (s) => fontSize[s])),
7622
+ scroller: Object.assign(Object.assign({ display: 'flex' }, textSmallStyle), buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] }))),
7710
7623
  });
7711
7624
  };
7712
7625
 
7713
- const { small: spacingSmall$1 } = spacing;
7714
- const getColors$1 = (checked, isDisabledOrLoading, theme) => {
7715
- const { backgroundColor, baseColor, contrastHighColor, successColor, successColorDarken, hoverColorDarken, disabledColor, brandColor, } = getThemedColors(theme);
7626
+ const getColors$1 = (checked, disabled, loading, theme) => {
7627
+ const { primaryColor, contrastMediumColor, successColor, successColorDarken, disabledColor } = getThemedColors(theme);
7716
7628
  const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
7717
- const isLightElectricTheme = isThemeLightElectric(theme);
7718
- const checkedColor = isLightElectricTheme ? brandColor : successColor;
7719
- const disabledOrLoadingColor = isDisabledOrLoading && disabledColor;
7629
+ const checkedColor = successColor;
7630
+ const disabledOrLoadingColor = isDisabledOrLoading(disabled, loading) && disabledColor;
7720
7631
  return {
7721
- backgroundColor,
7722
- buttonBorderColor: disabledOrLoadingColor || (checked ? checkedColor : contrastHighColor),
7723
- buttonBorderColorHover: checked ? (isLightElectricTheme ? hoverColorDarken : successColorDarken) : baseColor,
7632
+ buttonBorderColor: disabledOrLoadingColor || (checked ? checkedColor : contrastMediumColor),
7633
+ buttonBorderColorHover: checked ? successColorDarken : primaryColor,
7724
7634
  buttonBackgroundColor: checked ? disabledOrLoadingColor || checkedColor : 'transparent',
7725
- buttonBackgroundColorHover: checked
7726
- ? isLightElectricTheme
7727
- ? hoverColorDarken
7728
- : successColorDarken
7729
- : 'transparent',
7730
- toggleBackgroundColor: (!checked && disabledOrLoadingColor) || (checked ? lightThemeBackgroundColor : contrastHighColor),
7731
- toggleBackgroundColorHover: checked ? lightThemeBackgroundColor : baseColor,
7732
- textColor: disabledOrLoadingColor || baseColor,
7733
- };
7734
- };
7735
- const getAlignLabelJssStyle = (alignLabel) => {
7736
- const styles = {
7737
- left: {
7738
- order: 0,
7739
- paddingLeft: 0,
7740
- paddingRight: spacingSmall$1,
7741
- },
7742
- right: {
7743
- order: 1,
7744
- paddingLeft: spacingSmall$1,
7745
- paddingRight: 0,
7746
- },
7635
+ buttonBackgroundColorHover: checked ? successColorDarken : 'transparent',
7636
+ toggleBackgroundColor: (loading && 'transparent') ||
7637
+ (disabled && !checked && disabledColor) ||
7638
+ (checked ? lightThemeBackgroundColor : primaryColor),
7639
+ toggleBackgroundColorHover: checked ? lightThemeBackgroundColor : primaryColor,
7640
+ textColor: disabledOrLoadingColor || primaryColor,
7747
7641
  };
7748
- return styles[alignLabel];
7749
- };
7750
- const getStretchJssStyle = (stretch) => {
7751
- return stretch
7752
- ? {
7753
- width: '100%',
7754
- justifyContent: 'space-between',
7755
- }
7756
- : {
7757
- width: 'auto',
7758
- justifyContent: 'flex-start',
7759
- };
7760
7642
  };
7761
- const getComponentCss$j = (alignLabel, hideLabel, stretch, checked, loading, isDisabledOrLoading, theme) => {
7762
- const { backgroundColor, buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, isDisabledOrLoading, theme);
7763
- return getCss(Object.assign({ '@global': {
7764
- ':host': addImportantToEachRule({
7765
- display: 'flex',
7766
- outline: 0,
7767
- }),
7768
- button: Object.assign(Object.assign({ position: 'relative', width: pxToRemWithUnit(48), height: pxToRemWithUnit(24), flexShrink: 0, display: 'block', margin: 0, padding: 0, appearance: 'none', boxSizing: 'border-box', color: buttonBorderColor, border: '1px solid currentColor', borderRadius: pxToRemWithUnit(12), backgroundColor: buttonBackgroundColor, outline: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}` }, (!isDisabledOrLoading &&
7769
- hoverMediaQuery({
7770
- '&:hover': {
7771
- color: buttonBorderColorHover,
7772
- backgroundColor: buttonBackgroundColorHover,
7773
- '& .toggle': {
7774
- backgroundColor: toggleBackgroundColorHover,
7775
- },
7643
+ const getComponentCss$j = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
7644
+ const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
7645
+ const { focusColor } = getThemedColors(theme);
7646
+ return getCss(Object.assign(Object.assign({ '@global': {
7647
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ outline: 0 }, hostHiddenStyles), buildResponsiveStyles(stretch, (stretchValue) => (Object.assign({ display: stretchValue ? 'block' : 'inline-block' }, (!stretchValue && { verticalAlign: 'top' })))))),
7648
+ }, root: Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', gap: spacingStaticSmall, width: '100%', padding: 0, outline: 0, border: 0, textAlign: 'left', background: 'transparent', appearance: 'none', cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer' }, buildResponsiveStyles(stretch, (stretchValue) => ({
7649
+ justifyContent: stretchValue ? 'space-between' : 'flex-start',
7650
+ }))), (!isDisabledOrLoading(disabled, loading) &&
7651
+ hoverMediaQuery({
7652
+ '&:hover .switch': {
7653
+ borderColor: buttonBorderColorHover,
7654
+ backgroundColor: buttonBackgroundColorHover,
7655
+ '& .toggle': {
7656
+ backgroundColor: toggleBackgroundColorHover,
7776
7657
  },
7777
- }))), { '&:focus': {
7778
- boxShadow: `0 0 0 2px ${backgroundColor}, 0 0 0 3px currentColor`,
7779
- }, '&:not(:focus-visible)': {
7780
- boxShadow: 'none',
7781
- } }),
7782
- }, root: Object.assign({ display: 'flex', minWidth: 0, minHeight: 0, cursor: isDisabledOrLoading ? 'auto' : 'pointer' }, buildResponsiveStyles(stretch, getStretchJssStyle)), text: Object.assign(Object.assign(Object.assign({}, textSmall), { minWidth: 0, minHeight: 0, color: textColor }), mergeDeep(buildResponsiveStyles(alignLabel, getAlignLabelJssStyle), buildResponsiveStyles(hideLabel, getTextHiddenJssStyle))), toggle: {
7658
+ },
7659
+ }))), { '&:focus .switch::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-6)), { border: `${borderWidthBase} solid ${focusColor}`, borderRadius: '18px' }), '&:not(:focus-visible) .switch::before': {
7660
+ borderColor: 'transparent',
7661
+ } }), switch: {
7662
+ position: 'relative',
7663
+ width: '48px',
7664
+ height: '28px',
7665
+ flexShrink: 0,
7666
+ boxSizing: 'border-box',
7667
+ border: `${borderWidthBase} solid ${buttonBorderColor}`,
7668
+ borderRadius: '14px',
7669
+ backgroundColor: buttonBackgroundColor,
7670
+ cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
7671
+ transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
7672
+ }, toggle: {
7783
7673
  position: 'absolute',
7784
- top: pxToRemWithUnit(2),
7785
- left: pxToRemWithUnit(2),
7786
- width: pxToRemWithUnit(18),
7787
- height: pxToRemWithUnit(18),
7674
+ top: '2px',
7675
+ left: '2px',
7676
+ width: '20px',
7677
+ height: '20px',
7788
7678
  display: 'block',
7789
7679
  borderRadius: '50%',
7790
7680
  backgroundColor: toggleBackgroundColor,
7791
- transform: `translate3d(${checked ? pxToRemWithUnit(24) : '0'}, 0, 0)`,
7681
+ transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
7792
7682
  transition: `${getTransition('background-color')},${getTransition('transform')}`,
7793
7683
  } }, (loading && {
7794
7684
  spinner: {
7795
7685
  position: 'absolute',
7796
- top: pxToRemWithUnit(-3),
7797
- left: pxToRemWithUnit(-3),
7798
- width: pxToRemWithUnit(24),
7799
- height: pxToRemWithUnit(24),
7686
+ top: '-4px',
7687
+ left: '-4px',
7688
+ width: '28px',
7689
+ height: '28px',
7800
7690
  },
7801
- })));
7691
+ })), { label: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { paddingTop: '2px', minWidth: 0, minHeight: 0, color: textColor }), mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
7692
+ order: alignLabelValue === 'left' ? -1 : 0,
7693
+ })), buildResponsiveStyles(hideLabel, getTextHiddenJssStyle))) }));
7802
7694
  };
7803
7695
 
7804
7696
  const getComponentCss$i = () => {
7805
7697
  return getCss({
7806
7698
  '@global': {
7807
- ':host': {
7808
- display: addImportantToRule('table-row-group'),
7809
- },
7699
+ ':host': addImportantToEachRule(Object.assign({ display: 'table-row-group' }, hostHiddenStyles)),
7810
7700
  },
7811
7701
  });
7812
7702
  };
@@ -7814,13 +7704,7 @@ const getComponentCss$i = () => {
7814
7704
  const getComponentCss$h = (multiline) => {
7815
7705
  return getCss({
7816
7706
  '@global': {
7817
- ':host': Object.assign(Object.assign({}, addImportantToEachRule({
7818
- display: 'table-cell',
7819
- padding: pxToRemWithUnit(12),
7820
- margin: 0,
7821
- borderBottom: `1px solid ${getThemedColors('light').contrastLowColor}`,
7822
- whiteSpace: multiline ? 'normal' : 'nowrap',
7823
- })), { verticalAlign: 'middle' }),
7707
+ ':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ display: 'table-cell', padding: pxToRemWithUnit(12), margin: 0, borderBottom: `1px solid ${getThemedColors('light').contrastLowColor}`, whiteSpace: multiline ? 'normal' : 'nowrap' }, hostHiddenStyles))), { verticalAlign: 'middle' }),
7824
7708
  },
7825
7709
  });
7826
7710
  };
@@ -7830,20 +7714,13 @@ const isSortable = (active, direction) => {
7830
7714
  return active !== undefined && direction !== undefined;
7831
7715
  };
7832
7716
 
7833
- const { contrastMediumColor, baseColor: baseColor$1 } = getThemedColors('light');
7717
+ const { contrastMediumColor, primaryColor: primaryColor$1 } = getThemedColors('light');
7834
7718
  const { semiBold: fontWeightSemiBold } = fontWeight;
7835
7719
  const getComponentCss$g = (active, direction, hideLabel, multiline) => {
7836
7720
  const sortable = isSortable(active, direction);
7837
- return getCss(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule({
7838
- display: 'table-cell',
7839
- padding: `${pxToRemWithUnit(2)} ${pxToRemWithUnit(12)} ${pxToRemWithUnit(8)}`,
7840
- borderBottom: `1px solid ${contrastMediumColor}`,
7841
- verticalAlign: 'bottom',
7842
- fontWeight: fontWeightSemiBold,
7843
- whiteSpace: multiline ? 'normal' : 'nowrap',
7844
- }) }, (sortable
7721
+ return getCss(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'table-cell', padding: `${pxToRemWithUnit(2)} ${pxToRemWithUnit(12)} ${pxToRemWithUnit(8)}`, borderBottom: `1px solid ${contrastMediumColor}`, verticalAlign: 'bottom', fontWeight: fontWeightSemiBold, whiteSpace: multiline ? 'normal' : 'nowrap' }, hostHiddenStyles)) }, (sortable
7845
7722
  ? {
7846
- button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-end', padding: 0, boxSizing: 'border-box', appearance: 'none', border: 'none' }, textSmall), { fontWeight: fontWeightSemiBold, color: baseColor$1, textDecoration: 'none', textAlign: 'left', background: 'transparent', cursor: 'pointer' }), getFocusJssStyle({ offset: 1 })), hoverMediaQuery(Object.assign(Object.assign({}, getHoverJssStyle()), { '&:hover, &:focus': {
7723
+ button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-end', padding: 0, boxSizing: 'border-box', appearance: 'none', border: 'none' }, textSmallStyle), { fontWeight: fontWeightSemiBold, color: primaryColor$1, textDecoration: 'none', textAlign: 'left', background: 'transparent', cursor: 'pointer' }), getFocusJssStyle({ offset: 1 })), hoverMediaQuery(Object.assign(Object.assign({}, getHoverJssStyle()), { '&:hover, &:focus': {
7847
7724
  '& .icon': {
7848
7725
  opacity: 1,
7849
7726
  },
@@ -7853,7 +7730,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
7853
7730
  span: Object.assign(Object.assign({}, getTextHiddenJssStyle(true)), { display: 'block', border: 0 }),
7854
7731
  })) }, (sortable && {
7855
7732
  icon: {
7856
- marginLeft: spacing.xSmall,
7733
+ marginLeft: spacingStaticXSmall,
7857
7734
  opacity: active ? 1 : 0,
7858
7735
  transform: `rotate3d(0,0,1,${isDirectionAsc(direction) ? 0 : 180}deg)`,
7859
7736
  transformOrigin: '50% 50%', // for iOS
@@ -7864,9 +7741,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
7864
7741
  const getComponentCss$f = () => {
7865
7742
  return getCss({
7866
7743
  '@global': {
7867
- ':host': {
7868
- display: addImportantToRule('table-row'),
7869
- },
7744
+ ':host': addImportantToEachRule(Object.assign({ display: 'table-row' }, hostHiddenStyles)),
7870
7745
  },
7871
7746
  });
7872
7747
  };
@@ -7874,9 +7749,7 @@ const getComponentCss$f = () => {
7874
7749
  const getComponentCss$e = () => {
7875
7750
  return getCss({
7876
7751
  '@global': {
7877
- ':host': {
7878
- display: addImportantToRule('table-header-group'),
7879
- },
7752
+ ':host': addImportantToEachRule(Object.assign({ display: 'table-header-group' }, hostHiddenStyles)),
7880
7753
  },
7881
7754
  });
7882
7755
  };
@@ -7884,7 +7757,8 @@ const getComponentCss$e = () => {
7884
7757
  const getComponentCss$d = () => {
7885
7758
  return getCss({
7886
7759
  '@global': {
7887
- ':host': addImportantToEachRule(Object.assign({ display: 'table-row', transition: getTransition('background-color') }, hoverMediaQuery({
7760
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'table-row' }, hostHiddenStyles), hoverMediaQuery({
7761
+ transition: getTransition('background-color'),
7888
7762
  '&(:hover)': {
7889
7763
  backgroundColor: getThemedColors('light').backgroundSurfaceColor,
7890
7764
  },
@@ -7893,26 +7767,23 @@ const getComponentCss$d = () => {
7893
7767
  });
7894
7768
  };
7895
7769
 
7896
- const { baseColor } = getThemedColors('light');
7897
- const { small: spacingSmall, medium: spacingMedium, large: spacingLarge } = spacing;
7770
+ const { primaryColor } = getThemedColors('light');
7898
7771
  const getComponentCss$c = () => {
7899
7772
  return getCss({
7900
7773
  '@global': {
7901
- ':host': {
7902
- display: addImportantToRule('block'),
7903
- },
7774
+ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
7904
7775
  },
7905
7776
  caption: {
7906
- marginBottom: spacingSmall,
7907
- [mediaQueryMin('m')]: {
7908
- marginBottom: spacingMedium,
7777
+ marginBottom: spacingStaticSmall,
7778
+ [getMediaQueryMin('m')]: {
7779
+ marginBottom: spacingStaticMedium,
7909
7780
  },
7910
7781
  },
7911
7782
  root: {
7912
7783
  position: 'relative',
7913
7784
  },
7914
7785
  'scroll-area': Object.assign({ overflow: 'auto visible' }, getFocusJssStyle({ offset: -1 })),
7915
- table: Object.assign(Object.assign({ position: 'relative', width: '100%', display: 'table' }, textSmall), { textAlign: 'left', color: baseColor, whiteSpace: 'nowrap' }),
7786
+ table: Object.assign(Object.assign({ position: 'relative', width: '100%', display: 'table' }, textSmallStyle), { textAlign: 'left', color: primaryColor, whiteSpace: 'nowrap' }),
7916
7787
  'scroll-trigger': {
7917
7788
  position: 'absolute',
7918
7789
  top: 0,
@@ -7926,7 +7797,7 @@ const getComponentCss$c = () => {
7926
7797
  top: 0,
7927
7798
  right: 0,
7928
7799
  bottom: 0,
7929
- paddingLeft: spacingLarge,
7800
+ paddingLeft: spacingStaticLarge,
7930
7801
  pointerEvents: 'none',
7931
7802
  display: 'flex',
7932
7803
  alignItems: 'center',
@@ -7951,17 +7822,15 @@ const getComponentCss$c = () => {
7951
7822
  const tabsTransitionDuration = '.4s';
7952
7823
  const transformSelector = (selector) => ['a', 'button'].map((tag) => selector.replace(/\[role]/g, tag)).join();
7953
7824
  const getComponentCss$b = (size, weight, theme) => {
7954
- const { baseColor, hoverColor, activeColor, focusColor } = getThemedColors(theme);
7825
+ const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
7955
7826
  return getCss({
7956
- '@global': Object.assign({ ':host': {
7957
- display: 'block',
7958
- position: addImportantToRule('relative'),
7959
- } }, addImportantToEachRule(Object.assign(Object.assign({
7827
+ '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ position: 'relative', transform: 'translate3d(0,0,0)' }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({
7960
7828
  // would be nice to use shared selector like '::slotted([role])'
7961
7829
  // but this doesn't work reliably when rendering in browser
7962
7830
  [transformSelector('::slotted([role])')]: {
7963
7831
  display: 'inline-block',
7964
- margin: `0 0 calc(.5em - ${pxToRemWithUnit(4)}) 0`,
7832
+ position: 'relative',
7833
+ margin: '0 0 4px 0',
7965
7834
  padding: 0,
7966
7835
  verticalAlign: 'top',
7967
7836
  fontFamily: 'inherit',
@@ -7974,39 +7843,39 @@ const getComponentCss$b = (size, weight, theme) => {
7974
7843
  boxSizing: 'border-box',
7975
7844
  WebkitAppearance: 'none',
7976
7845
  appearance: 'none',
7977
- outline: '1px solid transparent',
7846
+ outline: 0,
7978
7847
  outlineOffset: '1px',
7979
7848
  textDecoration: 'none',
7980
7849
  textAlign: 'left',
7981
7850
  border: 0,
7982
7851
  background: 'transparent',
7983
- color: baseColor,
7852
+ color: primaryColor,
7984
7853
  cursor: 'pointer',
7985
- transition: getTransition('color'),
7854
+ borderRadius: borderRadiusSmall,
7855
+ '&::before': Object.assign({ content: '""', position: 'absolute', top: '-2px', bottom: '-2px', left: '-4px', right: '-4px', borderRadius: borderRadiusSmall, zIndex: '-1' }, hoverMediaQuery({
7856
+ transition: getTransition('background'),
7857
+ })),
7986
7858
  } }, hoverMediaQuery({
7987
- [transformSelector('::slotted([role]:hover)')]: {
7988
- color: hoverColor,
7989
- },
7990
- })), { [transformSelector('::slotted([role]:active),::slotted([role][aria-selected="true"])')]: {
7991
- color: activeColor,
7992
- },
7859
+ [transformSelector('::slotted([role]:hover)::before')]: Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }),
7860
+ })), {
7993
7861
  // TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
7994
- [transformSelector('::slotted([role]:focus)')]: {
7995
- outlineColor: focusColor,
7996
- }, [transformSelector('::slotted([role]:focus:not(:focus-visible))')]: {
7997
- outlineColor: 'transparent',
7862
+ [transformSelector('::slotted([role]:focus)::before')]: {
7863
+ border: `${borderWidthBase} solid ${focusColor}`,
7864
+ borderRadius: borderRadiusSmall,
7865
+ }, [transformSelector('::slotted([role]:focus:not(:focus-visible))::before')]: {
7866
+ borderColor: 'transparent',
7998
7867
  }, [transformSelector('::slotted([role]:not(:last-child))')]: {
7999
- marginRight: '1em',
7868
+ marginRight: '16px', // No token for this spacing exists yet
8000
7869
  } }))),
8001
- scroller: Object.assign(Object.assign(Object.assign({}, textSmall), { fontWeight: getFontWeight(weight) }), buildResponsiveStyles(size, (s) => ({ fontSize: fontSize[s].fontSize }))),
7870
+ scroller: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { fontWeight: getFontWeight(weight) }), buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] }))),
8002
7871
  bar: {
8003
7872
  display: 'block',
8004
7873
  position: 'absolute',
8005
7874
  width: 0,
8006
- height: weight === 'semibold' ? '.125em' : '.09375em',
7875
+ height: weight === 'semibold' ? '2px' : '1.5px',
8007
7876
  left: 0,
8008
- bottom: `-${pxToRemWithUnit(4)}`,
8009
- background: activeColor,
7877
+ bottom: '-4px',
7878
+ background: primaryColor,
8010
7879
  '&--enable-transition': {
8011
7880
  willChange: 'width',
8012
7881
  transition: `transform ${tabsTransitionDuration},width ${tabsTransitionDuration}`,
@@ -8016,14 +7885,15 @@ const getComponentCss$b = (size, weight, theme) => {
8016
7885
  };
8017
7886
 
8018
7887
  const getComponentCss$a = (theme) => {
7888
+ const { focusColor } = getThemedColors(theme);
8019
7889
  return getCss({
8020
7890
  '@global': {
8021
- ':host': addImportantToEachRule(Object.assign({ display: 'block', '&([hidden])': {
8022
- display: 'none',
8023
- } }, getFocusVisibleFallback(Object.entries(getFocusJssStyle({ color: getThemedColors(theme).baseColor })).reduce((result, [key, val]) => {
8024
- result[key.startsWith('&') ? `&(${key.slice(1)})` : key] = val;
8025
- return result;
8026
- }, {})))),
7891
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'block', position: 'relative' }, hostHiddenStyles), { outline: 0, '&::before': Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), '&(:focus)::before': {
7892
+ border: `${borderWidthBase} solid ${focusColor}`,
7893
+ borderRadius: borderRadiusSmall,
7894
+ }, '&(:focus:not(:focus-visible))::before': {
7895
+ borderColor: 'transparent',
7896
+ } })),
8027
7897
  },
8028
7898
  });
8029
7899
  };
@@ -8031,82 +7901,120 @@ const getComponentCss$a = (theme) => {
8031
7901
  const getComponentCss$9 = () => {
8032
7902
  return getCss({
8033
7903
  '@global': {
8034
- ':host': {
8035
- display: 'block',
8036
- },
7904
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
8037
7905
  },
8038
7906
  root: {
8039
- marginBottom: pxToRemWithUnit(8),
7907
+ marginBottom: '8px',
8040
7908
  },
8041
7909
  });
8042
7910
  };
8043
7911
 
8044
- const hasInvertedThemeColor = (tagColor, theme) => {
8045
- const isDark = isThemeDark(theme);
8046
- return ((!isDark && tagColor === 'neutral-contrast-high') ||
8047
- (isDark && tagColor !== 'background-surface' && tagColor !== 'background-default'));
7912
+ const getTagFocusJssStyle = (themedColors) => {
7913
+ return {
7914
+ '&:focus::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid ${themedColors.focusColor}`, borderRadius: borderRadiusMedium }),
7915
+ '&:focus:not(:focus-visible)::before': {
7916
+ borderColor: 'transparent',
7917
+ },
7918
+ };
8048
7919
  };
8049
-
8050
7920
  const getThemedBackgroundColor = (tagColor, themedColors) => {
8051
7921
  const colorMap = {
8052
7922
  'background-default': themedColors.backgroundColor,
7923
+ 'background-base': themedColors.backgroundColor,
8053
7924
  'background-surface': themedColors.backgroundSurfaceColor,
8054
- 'neutral-contrast-high': themedColors.contrastHighColor,
8055
- 'notification-neutral': themedColors.neutralSoftColor,
7925
+ 'neutral-contrast-high': themedColors.primaryColor,
7926
+ primary: themedColors.primaryColor,
7927
+ 'notification-neutral': themedColors.infoSoftColor,
7928
+ 'notification-info': themedColors.infoSoftColor,
8056
7929
  'notification-success': themedColors.successSoftColor,
8057
7930
  'notification-error': themedColors.errorSoftColor,
8058
7931
  'notification-warning': themedColors.warningSoftColor,
8059
7932
  };
8060
7933
  return colorMap[tagColor];
8061
7934
  };
8062
- const getColors = (tagColor, theme) => {
7935
+
7936
+ const getComponentCss$8 = (color, hasLabel, theme) => {
8063
7937
  const themedColors = getThemedColors(theme);
8064
- const hasInvertedTheme = hasInvertedThemeColor(tagColor, theme);
8065
- const { baseColor, hoverColor } = hasInvertedTheme ? getInvertedThemedColors(theme) : themedColors;
8066
- const { focusColor, baseColor: themedBaseColor } = themedColors;
8067
- return {
8068
- baseColor,
8069
- hoverColor,
8070
- outlineColor: hasInvertedTheme ? themedBaseColor : focusColor,
8071
- backgroundColor: getThemedBackgroundColor(tagColor, themedColors),
8072
- };
7938
+ const { primaryColor, hoverColor, contrastHighColor } = themedColors;
7939
+ const backgroundColor = getThemedBackgroundColor(color, themedColors);
7940
+ return getCss(Object.assign(Object.assign({ '@global': {
7941
+ ':host': addImportantToEachRule(Object.assign({ display: 'inline-block', verticalAlign: 'top', outline: 0 }, hostHiddenStyles)),
7942
+ button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', alignItems: 'center', gap: '12px', minHeight: '54px', padding: '4px 0 4px 12px', borderRadius: borderRadiusSmall, border: 0, cursor: 'pointer', background: backgroundColor, color: primaryColor, textAlign: 'left' }, textSmallStyle), { outline: 0 }), getTagFocusJssStyle(themedColors)), hoverMediaQuery({
7943
+ '&:hover > .icon': {
7944
+ backgroundColor: hoverColor,
7945
+ },
7946
+ })),
7947
+ } }, (hasLabel && {
7948
+ label: {
7949
+ display: 'block',
7950
+ marginBottom: '-4px',
7951
+ color: contrastHighColor,
7952
+ fontSize: fontSizeTextXSmall,
7953
+ },
7954
+ })), { icon: {
7955
+ padding: '4px',
7956
+ marginRight: '10px',
7957
+ transition: getTransition('background-color'),
7958
+ borderRadius: borderRadiusSmall,
7959
+ }, 'sr-only': getScreenReaderOnlyJssStyle() }));
8073
7960
  };
8074
- const slottedTextJssStyle = {
8075
- '&(strong),&(b)': {
8076
- fontWeight: fontWeight.bold,
8077
- },
8078
- '&(em),&(i)': {
8079
- fontStyle,
8080
- },
7961
+
7962
+ const hasInvertedThemeColor = (tagColor, theme) => {
7963
+ const isDark = isThemeDark(theme);
7964
+ return ((!isDark && (tagColor === 'neutral-contrast-high' || tagColor === 'primary')) || // 'neutral-contrast-high' is deprecated (replaced with 'primary')
7965
+ (isDark &&
7966
+ tagColor !== 'background-surface' &&
7967
+ tagColor !== 'background-default' && // 'background-default' is deprecated (replaced with 'background-base')
7968
+ tagColor !== 'background-base' &&
7969
+ tagColor !== 'notification-neutral' && // 'notification-neutral' is deprecated (replaced with 'notification-info')
7970
+ tagColor !== 'notification-info' &&
7971
+ tagColor !== 'notification-warning' &&
7972
+ tagColor !== 'notification-success' &&
7973
+ tagColor !== 'notification-error'));
7974
+ };
7975
+ const getThemedBackgroundHoverColor = (tagColor, themedColors, theme) => {
7976
+ const isDark = isThemeDark(theme);
7977
+ const keySuffix = isDark ? 'ColorLighten' : 'ColorDarken';
7978
+ const primaryColor = isDark ? themedColors.contrastHighColorLighten : themedColors.contrastHighColor;
7979
+ const colorMap = {
7980
+ 'background-default': themedColors[`background${keySuffix}`],
7981
+ 'background-base': themedColors[`background${keySuffix}`],
7982
+ 'background-surface': themedColors[`backgroundSurface${keySuffix}`],
7983
+ 'neutral-contrast-high': primaryColor,
7984
+ primary: primaryColor,
7985
+ 'notification-neutral': themedColors[`infoSoft${keySuffix}`],
7986
+ 'notification-info': themedColors[`infoSoft${keySuffix}`],
7987
+ 'notification-success': themedColors[`successSoft${keySuffix}`],
7988
+ 'notification-error': themedColors[`errorSoft${keySuffix}`],
7989
+ 'notification-warning': themedColors[`warningSoft${keySuffix}`],
7990
+ };
7991
+ return colorMap[tagColor];
8081
7992
  };
8082
- const getTagFocusJssStyle = (focusColor, focusHoverColor) => {
7993
+
7994
+ const getColors = (themedColors, tagColor, theme) => {
7995
+ const hasInvertedTheme = hasInvertedThemeColor(tagColor, theme);
7996
+ const { primaryColor } = hasInvertedTheme ? getInvertedThemedColors(theme) : themedColors;
7997
+ const { focusColor } = themedColors;
8083
7998
  return {
8084
- '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-3)), { border: '1px solid transparent', borderRadius: pxToRemWithUnit(6), transition: getTransition('border-color') }),
8085
- '&:focus::before': {
8086
- borderColor: focusColor,
8087
- },
8088
- '&:focus:not(:focus-visible)::before': {
8089
- borderColor: 'transparent',
8090
- },
8091
- '&:hover:focus::before': hoverMediaQuery({
8092
- borderColor: focusHoverColor,
8093
- }),
7999
+ primaryColor,
8000
+ focusColor,
8001
+ backgroundColor: getThemedBackgroundColor(tagColor, themedColors),
8002
+ backgroundHoverColor: getThemedBackgroundHoverColor(tagColor, themedColors, theme),
8094
8003
  };
8095
8004
  };
8096
- const getComponentCss$8 = (tagColor, isFocusable, theme) => {
8097
- const { baseColor, hoverColor, backgroundColor, outlineColor } = getColors(tagColor, theme);
8005
+ const getComponentCss$7 = (tagColor, isFocusable, theme) => {
8006
+ const themedColors = getThemedColors(theme);
8007
+ const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
8098
8008
  return getCss({
8099
8009
  '@global': {
8100
- ':host': {
8101
- display: 'inline-flex',
8102
- verticalAlign: 'top',
8103
- },
8104
- span: Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'center', position: 'relative', height: pxToRemWithUnit(24), padding: `0 ${pxToRemWithUnit(6)}`, borderRadius: pxToRemWithUnit(4), background: backgroundColor, color: baseColor }, textXSmall), { whiteSpace: 'nowrap' }), (isFocusable && Object.assign({ transition: getTransition('color') }, hoverMediaQuery({
8010
+ ':host': Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)),
8011
+ span: Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (isFocusable && Object.assign({}, hoverMediaQuery({
8012
+ transition: getTransition('background-color'),
8105
8013
  '&:hover': {
8106
- color: hoverColor,
8014
+ background: backgroundHoverColor,
8107
8015
  },
8108
8016
  })))),
8109
- '::slotted': addImportantToEachRule(Object.assign(Object.assign(Object.assign({ '&(a),&(button)': {
8017
+ '::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a),&(button)': {
8110
8018
  display: 'inline',
8111
8019
  position: 'static',
8112
8020
  textDecoration: 'underline',
@@ -8114,121 +8022,91 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
8114
8022
  font: 'inherit',
8115
8023
  outline: 0,
8116
8024
  color: 'inherit',
8117
- } }, Object.entries(getTagFocusJssStyle(outlineColor, hoverColor)).reduce((result, [key, value]) => {
8118
- result[key.replace(/^&([a-z:\-()]*)(::[a-z\-]+)$/, '&(a$1)$2, &(button$1)$2')] = value;
8119
- return result;
8120
- }, {})), { '&(button)': {
8025
+ appearance: 'none',
8121
8026
  margin: 0,
8122
8027
  padding: 0,
8123
8028
  background: 0,
8124
8029
  border: 0,
8125
8030
  textAlign: 'left',
8126
- }, '&(br)': {
8031
+ } }, Object.entries(getTagFocusJssStyle(themedColors)).reduce((result, [key, value]) => {
8032
+ result[key.replace(/^&([a-z:\-()]*)(::[a-z\-]+)$/, '&(a$1)$2, &(button$1)$2')] = value;
8033
+ return result;
8034
+ }, {})), { '&(br)': {
8127
8035
  display: 'none',
8128
- } }), slottedTextJssStyle)),
8036
+ } })),
8129
8037
  },
8130
8038
  icon: {
8131
- margin: `0 ${pxToRemWithUnit(2)} 0 ${pxToRemWithUnit(-2)}`,
8039
+ marginLeft: '-2px', // optimize visual alignment
8132
8040
  },
8133
8041
  });
8134
8042
  };
8135
8043
 
8136
- const getComponentCss$7 = (color, hasLabel) => {
8137
- const themedColors = getThemedColors('light');
8138
- const { baseColor, hoverColor, contrastMediumColor } = themedColors;
8139
- const backgroundColor = getThemedBackgroundColor(color, themedColors);
8140
- return getCss(Object.assign(Object.assign({ '@global': {
8141
- ':host': {
8142
- display: 'inline-flex',
8143
- verticalAlign: 'top',
8144
- outline: addImportantToRule(0),
8145
- },
8146
- button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative', minHeight: pxToRemWithUnit(48), padding: `${pxToRemWithUnit(4)} ${pxToRemWithUnit(46)} ${pxToRemWithUnit(4)} ${pxToRemWithUnit(16)}`, borderRadius: pxToRemWithUnit(4), border: 0, cursor: 'pointer', background: backgroundColor, color: baseColor, textAlign: 'left' }, textSmall), { outline: 0 }), getTagFocusJssStyle(baseColor, hoverColor)), hoverMediaQuery({
8147
- '&:hover > .icon': {
8148
- color: hoverColor,
8149
- },
8150
- })),
8151
- '::slotted': addImportantToEachRule(slottedTextJssStyle),
8152
- } }, (hasLabel && {
8153
- label: {
8154
- display: 'block',
8155
- marginBottom: pxToRemWithUnit(-4),
8156
- color: contrastMediumColor,
8157
- fontSize: pxToRemWithUnit(14),
8158
- // a custom line-height is needed to have 48px height in total when label + slotted text is used
8159
- lineHeight: pxToRemWithUnit(20),
8160
- },
8161
- })), { icon: {
8162
- position: 'absolute',
8163
- top: '50%',
8164
- right: pxToRemWithUnit(12),
8165
- transform: 'translate3d(0, -50%, 0)',
8166
- transition: getTransition('color'),
8167
- }, 'sr-only': getScreenReaderOnlyJssStyle() }));
8168
- };
8169
-
8170
8044
  const isType = (inputType, typeToValidate) => inputType === typeToValidate;
8171
8045
 
8172
- const getComponentCss$6 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, isWithinForm, hasAction, hasActionLoading) => {
8173
- const theme = 'light';
8174
- const { baseColor, contrastMediumColor, activeColor, disabledColor, hoverColor } = getThemedColors(theme);
8175
- const hasVisibleState = isVisibleFormState(state);
8046
+ const cssVariableInputPaddingLeft = '--p-internal-text-field-input-padding-left';
8047
+ const cssVariableInputPaddingRight = '--p-internal-text-field-input-padding-right';
8048
+ const buttonOrIconPadding = '4px';
8049
+ const buttonOrIconSize = `calc(${fontLineHeight} + ${buttonOrIconPadding} * 2)`;
8050
+ const buttonOrIconOffset = '9px';
8051
+ const baseButtonOrIconStyles = {
8052
+ position: 'absolute',
8053
+ bottom: '11px',
8054
+ padding: buttonOrIconPadding,
8055
+ font: `1rem ${fontFamily}`,
8056
+ };
8057
+ const getInputPaddingHorizontal = (buttonOrIconAmount) => {
8058
+ return `calc(${buttonOrIconOffset} * 2 + ${buttonOrIconSize} * ${buttonOrIconAmount})`;
8059
+ };
8060
+ const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
8061
+ const multiplier = buttonOrIconAmount > 1 ? ` + ${buttonOrIconSize} * ${buttonOrIconAmount - 1}` : '';
8062
+ return `calc(${buttonOrIconOffset} + ${borderWidthBase}${multiplier})`;
8063
+ };
8064
+ const getComponentCss$6 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, isWithinForm, theme) => {
8065
+ const { contrastMediumColor } = getThemedColors(theme);
8176
8066
  const isSearch = isType(inputType, 'search');
8177
8067
  const isPassword = isType(inputType, 'password');
8068
+ const isNumber = isType(inputType, 'number');
8178
8069
  const isSearchOrPassword = isSearch || isPassword;
8179
- const disabledJssStyle = {
8180
- color: disabledColor,
8181
- cursor: 'not-allowed',
8182
- };
8183
- return getCss(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign(Object.assign({ ':host': {
8184
- display: 'block',
8185
- } }, addImportantToEachRule(Object.assign(Object.assign({}, getBaseChildStyles('input', state, theme, Object.assign(Object.assign({}, (!hasUnitOrVisibleCounter && {
8186
- // padding is set via inline style if unit is present
8187
- padding: pxToRemWithUnit(hasVisibleState ? 10 : 11),
8188
- })), (isType(inputType, 'number')
8189
- ? {
8190
- MozAppearance: 'textfield', // hides up/down spin button for Firefox
8191
- }
8192
- : isSearchOrPassword && Object.assign({ paddingRight: pxToRemWithUnit(isSearch && isWithinForm ? 88 : 48) }, (isSearch && !isWithinForm && { paddingLeft: pxToRemWithUnit(48) })))))), {
8193
- // Reset webkit autofill styles
8194
- '::slotted(input:-internal-autofill-selected),::slotted(input:-internal-autofill-previewed),::slotted(input:-webkit-autofill),::slotted(input:-webkit-autofill:focus)': {
8195
- WebkitBackgroundClip: 'padding-box',
8196
- } }))), (isSearchOrPassword && {
8197
- button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'absolute', bottom: 0, right: 0, margin: 0, width: pxToRemWithUnit(48), height: pxToRemWithUnit(48), padding: pxToRemWithUnit(12), boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', border: 'none', textDecoration: 'none', background: 'transparent', cursor: 'pointer', color: baseColor, transition: getTransition('color') }, getFocusJssStyle({ offset: hasVisibleState ? -5 : -4 })), hoverMediaQuery({
8198
- '&:not(:disabled):hover': {
8199
- color: hoverColor,
8070
+ const isSearchWithoutForm = isSearch && !isWithinForm;
8071
+ const isSearchWithForm = isSearch && isWithinForm;
8072
+ return getCss(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ [cssVariableInputPaddingLeft]: isSearchWithoutForm ? getInputPaddingHorizontal(1) : spacingStaticMedium, [cssVariableInputPaddingRight]: isSearchOrPassword
8073
+ ? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
8074
+ : spacingStaticMedium }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({}, getBaseChildStyles('input', state, theme, Object.assign({ padding: `8px var(${cssVariableInputPaddingRight}) 8px var(${cssVariableInputPaddingLeft})` }, (isNumber && {
8075
+ MozAppearance: 'textfield', // hides up/down spin button for Firefox
8076
+ })))), { '::slotted': {
8077
+ '&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
8078
+ WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
8200
8079
  },
8201
- })), { '&:active': {
8202
- color: activeColor,
8203
- }, '&:disabled': disabledJssStyle }), (isSearch &&
8204
- isWithinForm && Object.assign(Object.assign({ right: pxToRemWithUnit(40) }, (hasActionLoading && {
8205
- '&+button[type=button]': disabledJssStyle, // action button
8206
- })), { '&+button[type=submit]': {
8207
- right: 0, // submit button
8208
- } }))),
8209
- })), root: {
8080
+ } }))) }, (isSearchOrPassword && {
8081
+ button: Object.assign(Object.assign({}, baseButtonOrIconStyles), { right: getButtonOrIconOffsetHorizontal(1),
8082
+ // TODO: maybe we should render hidden button conditionally, needs to be checked if a11y compliant
8083
+ '&:not([hidden]) ~ .button': {
8084
+ right: getButtonOrIconOffsetHorizontal(2),
8085
+ } }),
8086
+ })), (isSearchWithoutForm && {
8087
+ icon: Object.assign(Object.assign({}, baseButtonOrIconStyles), { left: getButtonOrIconOffsetHorizontal(1), pointerEvents: 'none' }),
8088
+ })), { root: {
8210
8089
  display: 'block',
8211
8090
  position: 'relative',
8212
- } }, getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
8213
- unit: Object.assign(Object.assign({ position: 'absolute', bottom: 0, [unitPosition === 'suffix' ? 'right' : 'left']: 0, padding: pxToRemWithUnit(12), zIndex: 1, boxSizing: 'border-box' }, textSmall), { color: contrastMediumColor }),
8214
- })), getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)), (isSearch &&
8215
- (hasAction || !isWithinForm) && {
8216
- icon: {
8217
- // search icon on left side
8091
+ } }), getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
8092
+ unit: {
8218
8093
  position: 'absolute',
8219
- left: 0,
8220
- bottom: 0,
8094
+ bottom: '15px',
8095
+ [unitPosition === 'suffix' ? 'right' : 'left']: 0,
8096
+ zIndex: 1,
8097
+ padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
8098
+ font: textSmallStyle.font,
8221
8099
  color: contrastMediumColor,
8222
- padding: pxToRemWithUnit(12),
8223
- pointerEvents: 'none',
8224
8100
  },
8225
- })), { 'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }) }));
8101
+ })), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), {
8102
+ // TODO: could be made conditional if we had hasUnit
8103
+ 'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }) }));
8226
8104
  };
8227
8105
 
8228
- const cssVariableOrderedSuffix = '--pds-text-list-item-ordered-suffix';
8229
- const cssVariableUnorderedWidth = '--pds-text-list-item-unordered-width';
8230
- const cssVariableUnorderedHeight = '--pds-text-list-item-unordered-height';
8231
- const cssVariableUnorderedTop = '--pds-text-list-item-unordered-top';
8106
+ const cssVariableOrderedSuffix = '--p-internal-text-list-item-ordered-suffix';
8107
+ const cssVariableUnorderedWidth = '--p-internal-text-list-item-unordered-width';
8108
+ const cssVariableUnorderedHeight = '--p-internal-text-list-item-unordered-height';
8109
+ const cssVariableUnorderedTop = '--p-internal-text-list-item-unordered-top';
8232
8110
  const getComponentCss$5 = (listType, orderType) => {
8233
8111
  const isOrdered = listType === 'ordered';
8234
8112
  const beforeJssStyles = {
@@ -8237,21 +8115,14 @@ const getComponentCss$5 = (listType, orderType) => {
8237
8115
  };
8238
8116
  return getCss({
8239
8117
  '@global': {
8118
+ ':host': addImportantToEachRule(Object.assign(Object.assign({ position: 'relative', display: 'list-item', color: 'inherit', listStyleType: 'none', paddingLeft: pxToRemWithUnit(isOrdered ? 40 : 24) }, hostHiddenStyles), { '&:before': isOrdered
8119
+ ? Object.assign(Object.assign(Object.assign({}, beforeJssStyles), { content: `counters(section,".",${orderType === 'numbered' ? 'decimal' : 'lower-latin'}) var(${cssVariableOrderedSuffix},".")`, top: 0, width: pxToRemWithUnit(24), height: 'auto', counterIncrement: 'section', textAlign: 'right', backgroundColor: 'transparent' }), textSmallStyle) : Object.assign(Object.assign({}, beforeJssStyles), { content: '""', width: `var(${cssVariableUnorderedWidth},${pxToRemWithUnit(4)})`, height: `var(${cssVariableUnorderedHeight},${pxToRemWithUnit(4)})`, top: `var(${cssVariableUnorderedTop},calc(1.5em / 2 - 0.125em))`, backgroundColor: 'currentColor' }) })),
8240
8120
  '::slotted(*)': {
8241
8121
  [cssVariableOrderedSuffix]: '""',
8242
8122
  [cssVariableUnorderedWidth]: pxToRemWithUnit(8),
8243
8123
  [cssVariableUnorderedHeight]: '1px',
8244
8124
  [cssVariableUnorderedTop]: 'calc(1.5em / 2)',
8245
8125
  },
8246
- ':host': addImportantToEachRule({
8247
- position: 'relative',
8248
- display: 'list-item',
8249
- color: 'inherit',
8250
- listStyleType: 'none',
8251
- paddingLeft: pxToRemWithUnit(isOrdered ? 40 : 24),
8252
- '&:before': isOrdered
8253
- ? Object.assign(Object.assign(Object.assign({}, beforeJssStyles), { content: `counters(section,".",${orderType === 'numbered' ? 'decimal' : 'lower-latin'}) var(${cssVariableOrderedSuffix},".")`, top: 0, width: pxToRemWithUnit(24), height: 'auto', counterIncrement: 'section', textAlign: 'right', backgroundColor: 'transparent' }), textSmall) : Object.assign(Object.assign({}, beforeJssStyles), { content: '""', width: `var(${cssVariableUnorderedWidth},${pxToRemWithUnit(4)})`, height: `var(${cssVariableUnorderedHeight},${pxToRemWithUnit(4)})`, top: `var(${cssVariableUnorderedTop},calc(1.5em / 2 - 0.125em))`, backgroundColor: 'currentColor' }),
8254
- }),
8255
8126
  },
8256
8127
  });
8257
8128
  };
@@ -8259,87 +8130,76 @@ const getComponentCss$5 = (listType, orderType) => {
8259
8130
  const getComponentCss$4 = (theme) => {
8260
8131
  return getCss({
8261
8132
  '@global': {
8262
- ':host': {
8263
- display: 'block',
8264
- counterReset: addImportantToRule('section'),
8265
- },
8266
- '[role]': Object.assign({ display: 'block', padding: 0, margin: 0, color: getThemedColors(theme).baseColor }, textSmall),
8133
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ counterReset: 'section' }, hostHiddenStyles))),
8134
+ '[role]': Object.assign({ display: 'block', padding: 0, margin: 0, color: getThemedColors(theme).primaryColor }, textSmallStyle),
8267
8135
  },
8268
8136
  });
8269
8137
  };
8270
8138
 
8139
+ const TEXT_TAGS = ['p', 'span', 'div', 'address', 'blockquote', 'figcaption', 'cite', 'time', 'legend'];
8140
+
8141
+ const sizeMap = {
8142
+ 'x-small': fontSizeTextXSmall,
8143
+ small: fontSizeTextSmall,
8144
+ medium: fontSizeTextMedium,
8145
+ large: fontSizeTextLarge,
8146
+ 'x-large': fontSizeTextXLarge,
8147
+ };
8271
8148
  const getComponentCss$3 = (size, weight, align, color, ellipsis, theme) => {
8272
- // function is local to reuse `weight` parameter
8273
- // TODO: font short hand isn't really the best choice but we don't have any better alternative atm
8274
- const getSizeJssStyle = (textSize) => {
8275
- const fontWeightValue = getFontWeight(weight);
8276
- return textSize === 'inherit'
8277
- ? {
8278
- fontSize: textSize,
8279
- fontWeight: fontWeightValue,
8280
- }
8281
- : { font: textMap[textSize].font.replace('400', fontWeightValue) };
8282
- };
8283
8149
  return getCss({
8284
8150
  '@global': {
8285
- ':host': {
8286
- display: 'block',
8287
- },
8151
+ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
8288
8152
  '::slotted': {
8289
- '&(p),&(address),&(blockquote),&(figcaption),&(cite),&(time),&(legend)': addImportantToEachRule(getSlottedTypographyJssStyle()),
8153
+ [TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
8290
8154
  },
8291
8155
  },
8292
- root: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'inherit', padding: 0, margin: 0, textAlign: align }, textSmall), { color: getThemedTextColor(theme, color), listStyleType: 'none', whiteSpace: 'inherit' }), (ellipsis && getEllipsisJssStyle())), buildResponsiveStyles(size, getSizeJssStyle)),
8156
+ root: getTypographyRootJssStyle(textSmallStyle, buildResponsiveStyles(size, (sizeValue) => ({
8157
+ fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap[sizeValue],
8158
+ fontWeight: getFontWeight(weight),
8159
+ })), align, color, ellipsis, theme),
8293
8160
  });
8294
8161
  };
8295
8162
 
8296
- const getComponentCss$2 = (isDisabled, hideLabel, state, isCounterVisible, hasCounter) => {
8297
- const theme = 'light';
8298
- const hasVisibleState = isVisibleFormState(state);
8163
+ const getComponentCss$2 = (isDisabled, hideLabel, state, hasCounter, theme) => {
8299
8164
  const { contrastMediumColor } = getThemedColors(theme);
8300
- const defaultPadding = pxToRemWithUnit(hasVisibleState ? 10 : 11);
8301
- return getCss(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': {
8302
- display: 'block',
8303
- } }, mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
8304
- // 36 = 2 * 6 + 24 where 6 is the bottom distance and 24 the height of the text
8305
- padding: isCounterVisible
8306
- ? [defaultPadding, defaultPadding, pxToRemWithUnit(36)].join(' ')
8307
- : defaultPadding,
8308
- resize: 'vertical',
8165
+ return getCss(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)) }, mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
8166
+ font: textSmallStyle.font,
8167
+ padding: hasCounter ? `12px ${spacingStaticMedium} ${spacingStaticLarge}` : `12px ${spacingStaticMedium}`,
8309
8168
  })), {
8310
8169
  '::slotted(textarea)': {
8311
- minHeight: pxToRemWithUnit(192), // min-height should be overridable
8170
+ height: 'auto',
8171
+ minHeight: '200px',
8172
+ resize: 'vertical', // overridable, too
8312
8173
  },
8313
- })) }, getLabelStyles('textarea', isDisabled, hideLabel, state, theme, isCounterVisible && {
8314
- counter: Object.assign(Object.assign({ position: 'absolute', bottom: pxToRemWithUnit(6), right: pxToRemWithUnit(12), zIndex: 1 }, textSmall), { color: contrastMediumColor }),
8315
- })), getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)), (hasCounter && {
8174
+ })) }, getLabelStyles('textarea', isDisabled, hideLabel, state, theme, hasCounter && {
8175
+ counter: {
8176
+ position: 'absolute',
8177
+ bottom: '6px',
8178
+ right: '12px',
8179
+ zIndex: 1,
8180
+ font: textSmallStyle.font,
8181
+ color: contrastMediumColor,
8182
+ },
8183
+ })), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), (hasCounter && {
8316
8184
  'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }),
8317
8185
  })));
8318
8186
  };
8319
8187
 
8320
8188
  const toastPositionBottomVarPublic = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
8321
- const toastPositionBottomVarInternal = `${toastPositionBottomVarPublic}-internal`;
8189
+ const toastPositionBottomVarInternal = '--p-internal-toast-position-bottom';
8322
8190
  const toastCloseClassName = 'close';
8323
8191
  const getComponentCss = () => {
8324
8192
  return getCss({
8325
8193
  '@global': {
8326
- ':host': addImportantToEachRule({
8327
- position: 'fixed',
8328
- left: gridSafeZone.base,
8329
- right: gridSafeZone.base,
8330
- // Needs a not overwritable internal css variable to cover default position depending on viewport size and to handle animation properly.
8194
+ ':host': addImportantToEachRule(Object.assign({ position: 'fixed', left: gridSafeZoneBase, right: gridSafeZoneBase,
8195
+ // Needs a not overridable internal css variable to cover default position depending on viewport size and to handle animation properly.
8331
8196
  // In addition, a public css variable can be passed to overwrite the default position.
8332
- [toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, ${pxToRemWithUnit(56)})`,
8333
- bottom: `var(${toastPositionBottomVarInternal})`,
8334
- maxWidth: '42rem',
8335
- zIndex: TOAST_Z_INDEX,
8336
- [mediaQueryMin('s')]: {
8337
- left: pxToRemWithUnit(64),
8197
+ [toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, 56px)`, bottom: `var(${toastPositionBottomVarInternal})`, maxWidth: '42rem', zIndex: TOAST_Z_INDEX, [getMediaQueryMin('s')]: {
8198
+ left: '64px',
8338
8199
  right: 'auto',
8339
- [toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, ${pxToRemWithUnit(64)})`,
8200
+ [toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, 64px)`,
8340
8201
  bottom: `var(${toastPositionBottomVarInternal})`,
8341
- },
8342
- }),
8202
+ } }, hostHiddenStyles)),
8343
8203
  '@keyframes in': getKeyframesMobile('in', toastPositionBottomVarInternal),
8344
8204
  '@keyframes out': getKeyframesMobile('out', toastPositionBottomVarInternal),
8345
8205
  },
@@ -8348,14 +8208,15 @@ const getComponentCss = () => {
8348
8208
  });
8349
8209
  };
8350
8210
 
8351
- exports.getAccordionCss = getComponentCss$R;
8352
- exports.getBannerCss = getComponentCss$Q;
8353
- exports.getButtonCss = getComponentCss$N;
8354
- exports.getButtonGroupCss = getComponentCss$P;
8355
- exports.getButtonPureCss = getComponentCss$O;
8356
- exports.getCarouselCss = getComponentCss$M;
8357
- exports.getCheckboxWrapperCss = getComponentCss$L;
8358
- exports.getContentWrapperCss = getComponentCss$K;
8211
+ exports.getAccordionCss = getComponentCss$S;
8212
+ exports.getBannerCss = getComponentCss$R;
8213
+ exports.getButtonCss = getComponentCss$O;
8214
+ exports.getButtonGroupCss = getComponentCss$Q;
8215
+ exports.getButtonPureCss = getComponentCss$P;
8216
+ exports.getCarouselCss = getComponentCss$N;
8217
+ exports.getCheckboxWrapperCss = getComponentCss$M;
8218
+ exports.getContentWrapperCss = getComponentCss$L;
8219
+ exports.getDisplayCss = getComponentCss$K;
8359
8220
  exports.getDividerCss = getComponentCss$J;
8360
8221
  exports.getFieldsetWrapperCss = getComponentCss$I;
8361
8222
  exports.getFlexCss = getComponentCss$G;
@@ -8364,13 +8225,14 @@ exports.getFunctionalComponentRequiredStyles = getFunctionalComponentRequiredSty
8364
8225
  exports.getFunctionalComponentStateMessageStyles = getFunctionalComponentStateMessageStyles;
8365
8226
  exports.getGridCss = getComponentCss$E;
8366
8227
  exports.getGridItemCss = getComponentCss$F;
8367
- exports.getHeadlineCss = getComponentCss$D;
8368
- exports.getIconCss = getComponentCss$C;
8369
- exports.getInlineNotificationCss = getComponentCss$B;
8370
- exports.getLinkCss = getComponentCss$x;
8371
- exports.getLinkPureCss = getComponentCss$A;
8372
- exports.getLinkSocialCss = getComponentCss$z;
8373
- exports.getLinkTileCss = getComponentCss$y;
8228
+ exports.getHeadingCss = getComponentCss$D;
8229
+ exports.getHeadlineCss = getComponentCss$C;
8230
+ exports.getIconCss = getComponentCss$B;
8231
+ exports.getInlineNotificationCss = getComponentCss$A;
8232
+ exports.getLinkCss = getComponentCss$y;
8233
+ exports.getLinkPureCss = getComponentCss$z;
8234
+ exports.getLinkSocialCss = getComponentCss$y;
8235
+ exports.getLinkTileCss = getComponentCss$x;
8374
8236
  exports.getMarqueCss = getComponentCss$w;
8375
8237
  exports.getModalCss = getComponentCss$v;
8376
8238
  exports.getPaginationCss = getComponentCss$u;
@@ -8394,8 +8256,8 @@ exports.getTableRowCss = getComponentCss$d;
8394
8256
  exports.getTabsBarCss = getComponentCss$b;
8395
8257
  exports.getTabsCss = getComponentCss$9;
8396
8258
  exports.getTabsItemCss = getComponentCss$a;
8397
- exports.getTagCss = getComponentCss$8;
8398
- exports.getTagDismissibleCss = getComponentCss$7;
8259
+ exports.getTagCss = getComponentCss$7;
8260
+ exports.getTagDismissibleCss = getComponentCss$8;
8399
8261
  exports.getTextCss = getComponentCss$3;
8400
8262
  exports.getTextFieldWrapperCss = getComponentCss$6;
8401
8263
  exports.getTextListCss = getComponentCss$4;