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