@ulu/frontend 0.1.0-beta.12 → 0.1.0-beta.121

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 (344) hide show
  1. package/CHANGELOG.md +717 -0
  2. package/GEMINI.md +9 -0
  3. package/README.dev.md +3 -3
  4. package/README.md +14 -4
  5. package/dist/ulu-frontend.min.css +1 -1
  6. package/dist/ulu-frontend.min.js +36 -29
  7. package/docs-dev/.nojekyll +1 -0
  8. package/docs-dev/assets/main.js +832 -421
  9. package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
  10. package/docs-dev/assets/placeholder/icon-check.svg +1 -0
  11. package/docs-dev/assets/style.css +629 -233
  12. package/docs-dev/changelog/index.html +7613 -0
  13. package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
  14. package/docs-dev/demos/accordion/index.html +1496 -358
  15. package/docs-dev/demos/badge/index.html +5895 -0
  16. package/docs-dev/demos/badge-stack/index.html +5876 -0
  17. package/docs-dev/demos/basic-hero/index.html +111 -0
  18. package/docs-dev/demos/breadcrumb/index.html +5930 -0
  19. package/docs-dev/demos/breakpoints-manager/index.html +5906 -0
  20. package/docs-dev/demos/button/index.html +1537 -343
  21. package/docs-dev/demos/button-group/index.html +5892 -0
  22. package/docs-dev/demos/button-verbose/index.html +5898 -0
  23. package/docs-dev/demos/callout/index.html +1559 -379
  24. package/docs-dev/demos/captioned-figure/index.html +1492 -339
  25. package/docs-dev/demos/card/index.html +1592 -800
  26. package/docs-dev/demos/card-grid/index.html +6017 -0
  27. package/docs-dev/demos/card-new/index.html +5088 -0
  28. package/docs-dev/demos/card-old/index.html +5223 -0
  29. package/docs-dev/demos/card.1/index.html +5223 -0
  30. package/docs-dev/demos/card.TRASH/index.html +5541 -0
  31. package/docs-dev/demos/counter-list/index.html +5900 -0
  32. package/docs-dev/demos/css-icons/index.html +1556 -380
  33. package/docs-dev/demos/data-grid/index.html +1492 -339
  34. package/docs-dev/demos/data-table/index.html +1634 -348
  35. package/docs-dev/demos/definition-list/index.html +6011 -0
  36. package/docs-dev/demos/details-group/index.html +5927 -0
  37. package/docs-dev/demos/donut-chart/index.html +5874 -0
  38. package/docs-dev/demos/file-save/index.html +1492 -339
  39. package/docs-dev/demos/flipcard/index.html +1492 -339
  40. package/docs-dev/demos/form-theme/index.html +1500 -347
  41. package/docs-dev/demos/headline-label/index.html +5862 -0
  42. package/docs-dev/demos/hero/index.html +12 -4
  43. package/docs-dev/demos/image-grid/index.html +12 -4
  44. package/docs-dev/demos/index.html +1493 -340
  45. package/docs-dev/demos/list-inline/index.html +1492 -339
  46. package/docs-dev/demos/list-lines/index.html +1492 -339
  47. package/docs-dev/demos/menu-stack/index.html +1652 -378
  48. package/docs-dev/demos/modals/index.html +1642 -366
  49. package/docs-dev/demos/nav-strip/index.html +1492 -339
  50. package/docs-dev/demos/overlay-section/index.html +1611 -388
  51. package/docs-dev/demos/panel/index.html +5922 -0
  52. package/docs-dev/demos/popovers/index.html +1752 -357
  53. package/docs-dev/demos/print/index.html +1492 -339
  54. package/docs-dev/demos/progress-bar/index.html +6030 -0
  55. package/docs-dev/demos/progress-circle/index.html +6197 -0
  56. package/docs-dev/demos/progress-donut/index.html +6107 -0
  57. package/docs-dev/demos/pull-quote/index.html +1492 -339
  58. package/docs-dev/demos/rail/index.html +5970 -0
  59. package/docs-dev/demos/rule/index.html +1509 -344
  60. package/docs-dev/demos/scroll-slider/index.html +72 -106
  61. package/docs-dev/demos/scrollpoints/index.html +1493 -340
  62. package/docs-dev/demos/skeleton/index.html +5918 -0
  63. package/docs-dev/demos/slider/index.html +12 -4
  64. package/docs-dev/demos/spoke-spinner/index.html +1492 -339
  65. package/docs-dev/demos/sticky-list/index.html +5883 -0
  66. package/docs-dev/demos/tabs/index.html +1565 -376
  67. package/docs-dev/demos/tag/index.html +1510 -345
  68. package/docs-dev/demos/theme-toggle/index.html +5939 -0
  69. package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
  70. package/docs-dev/demos/tiles/index.html +1492 -339
  71. package/docs-dev/demos/tooltip/index.html +1492 -339
  72. package/docs-dev/demos/wysiwyg/index.html +5912 -0
  73. package/docs-dev/guide/building-stylesheet/index.html +1492 -339
  74. package/docs-dev/guide/developing-ulu-scss-module/index.html +1492 -339
  75. package/docs-dev/guide/index.html +1492 -339
  76. package/docs-dev/guide/updates-and-changes/index.html +5033 -0
  77. package/docs-dev/index.html +1492 -339
  78. package/docs-dev/javascript/events/index.html +1567 -376
  79. package/docs-dev/javascript/index.html +1492 -339
  80. package/docs-dev/javascript/settings/index.html +6065 -0
  81. package/docs-dev/javascript/ui-breakpoints/index.html +1506 -355
  82. package/docs-dev/javascript/ui-collapsible/index.html +1491 -340
  83. package/docs-dev/javascript/ui-details-group/index.html +5982 -0
  84. package/docs-dev/javascript/ui-dialog/index.html +1523 -357
  85. package/docs-dev/javascript/ui-flipcard/index.html +1552 -345
  86. package/docs-dev/javascript/ui-grid/index.html +1538 -413
  87. package/docs-dev/javascript/ui-modal-builder/index.html +1761 -470
  88. package/docs-dev/javascript/ui-overflow-scroller/index.html +1491 -340
  89. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +1491 -340
  90. package/docs-dev/javascript/ui-page/index.html +1491 -340
  91. package/docs-dev/javascript/ui-popover/index.html +1501 -354
  92. package/docs-dev/javascript/ui-print/index.html +1489 -346
  93. package/docs-dev/javascript/ui-print-details/index.html +1491 -340
  94. package/docs-dev/javascript/ui-programmatic-modal/index.html +1491 -340
  95. package/docs-dev/javascript/ui-proxy-click/index.html +1591 -355
  96. package/docs-dev/javascript/ui-resizer/index.html +1850 -434
  97. package/docs-dev/javascript/ui-scroll-slider/index.html +1531 -348
  98. package/docs-dev/javascript/ui-scrollpoint/index.html +1501 -357
  99. package/docs-dev/javascript/ui-slider/index.html +1708 -366
  100. package/docs-dev/javascript/ui-tabs/index.html +1523 -409
  101. package/docs-dev/javascript/ui-theme-toggle/index.html +6070 -0
  102. package/docs-dev/javascript/ui-tooltip/index.html +1501 -354
  103. package/docs-dev/javascript/utils-class-logger/index.html +1492 -341
  104. package/docs-dev/javascript/utils-css/index.html +5884 -0
  105. package/docs-dev/javascript/utils-dom/index.html +1523 -452
  106. package/docs-dev/javascript/utils-file-save/index.html +1491 -340
  107. package/docs-dev/javascript/utils-floating-ui/index.html +1491 -340
  108. package/docs-dev/javascript/utils-id/index.html +1491 -340
  109. package/docs-dev/javascript/utils-pause-youtube-video/index.html +1491 -340
  110. package/docs-dev/javascript/utils-system/index.html +6187 -0
  111. package/docs-dev/sass/base/color/index.html +1491 -340
  112. package/docs-dev/sass/base/elements/index.html +1492 -341
  113. package/docs-dev/sass/base/index/index.html +1492 -341
  114. package/docs-dev/sass/base/index.html +1492 -339
  115. package/docs-dev/sass/base/keyframes/index.html +1492 -341
  116. package/docs-dev/sass/base/layout/index.html +1492 -341
  117. package/docs-dev/sass/base/normalize/index.html +1491 -340
  118. package/docs-dev/sass/base/print/index.html +1492 -341
  119. package/docs-dev/sass/base/root/index.html +1495 -344
  120. package/docs-dev/sass/base/typography/index.html +1491 -340
  121. package/docs-dev/sass/components/accordion/index.html +1628 -436
  122. package/docs-dev/sass/components/adaptive-spacing/index.html +1491 -340
  123. package/docs-dev/sass/components/badge/index.html +1522 -353
  124. package/docs-dev/sass/components/badge-stack/index.html +6051 -0
  125. package/docs-dev/sass/components/basic-hero/index.html +6045 -0
  126. package/docs-dev/sass/components/breadcrumb/index.html +6092 -0
  127. package/docs-dev/sass/components/button/index.html +1491 -340
  128. package/docs-dev/sass/components/button-group/index.html +6043 -0
  129. package/docs-dev/sass/components/button-verbose/index.html +1613 -387
  130. package/docs-dev/sass/components/callout/index.html +1598 -388
  131. package/docs-dev/sass/components/captioned-figure/index.html +1491 -340
  132. package/docs-dev/sass/components/card/index.html +1601 -393
  133. package/docs-dev/sass/components/card-grid/index.html +1491 -340
  134. package/docs-dev/sass/components/counter-list/index.html +6127 -0
  135. package/docs-dev/sass/components/css-icon/index.html +1492 -341
  136. package/docs-dev/sass/components/data-grid/index.html +1511 -353
  137. package/docs-dev/sass/components/data-table/index.html +1510 -352
  138. package/docs-dev/sass/components/definition-list/index.html +6107 -0
  139. package/docs-dev/sass/components/fill-context/index.html +1491 -340
  140. package/docs-dev/sass/components/flipcard/index.html +1569 -387
  141. package/docs-dev/sass/components/flipcard-grid/index.html +1491 -340
  142. package/docs-dev/sass/components/form-theme/index.html +1718 -572
  143. package/docs-dev/sass/components/headline-label/index.html +6073 -0
  144. package/docs-dev/sass/components/hero/index.html +1499 -348
  145. package/docs-dev/sass/components/horizontal-rule/index.html +1491 -340
  146. package/docs-dev/sass/components/image-grid/index.html +1491 -340
  147. package/docs-dev/sass/components/index/index.html +1514 -349
  148. package/docs-dev/sass/components/index.html +1492 -339
  149. package/docs-dev/sass/components/links/index.html +1491 -340
  150. package/docs-dev/sass/components/list-inline/index.html +1491 -340
  151. package/docs-dev/sass/components/list-lines/index.html +1491 -340
  152. package/docs-dev/sass/components/list-ordered/index.html +1491 -340
  153. package/docs-dev/sass/components/list-unordered/index.html +1491 -340
  154. package/docs-dev/sass/components/menu-stack/index.html +1578 -378
  155. package/docs-dev/sass/components/modal/index.html +1576 -390
  156. package/docs-dev/sass/components/nav-strip/index.html +1499 -348
  157. package/docs-dev/sass/components/overlay-section/index.html +1499 -348
  158. package/docs-dev/sass/components/pager/index.html +1491 -340
  159. package/docs-dev/sass/components/panel/index.html +6273 -0
  160. package/docs-dev/sass/components/placeholder-block/index.html +1491 -340
  161. package/docs-dev/sass/components/popover/index.html +1561 -404
  162. package/docs-dev/sass/components/progress-bar/index.html +6252 -0
  163. package/docs-dev/sass/components/progress-circle/index.html +6144 -0
  164. package/docs-dev/sass/components/pull-quote/index.html +1491 -340
  165. package/docs-dev/sass/components/rail/index.html +6063 -0
  166. package/docs-dev/sass/components/ratio-box/index.html +1499 -348
  167. package/docs-dev/sass/components/rule/index.html +1492 -341
  168. package/docs-dev/sass/components/scroll-slider/index.html +1501 -362
  169. package/docs-dev/sass/components/skeleton/index.html +6101 -0
  170. package/docs-dev/sass/components/skip-link/index.html +1491 -340
  171. package/docs-dev/sass/components/slider/index.html +1581 -442
  172. package/docs-dev/sass/components/spoke-spinner/index.html +1493 -342
  173. package/docs-dev/sass/components/sticky-list/index.html +6263 -0
  174. package/docs-dev/sass/components/table-sticky/index.html +5707 -0
  175. package/docs-dev/sass/components/tabs/index.html +1519 -353
  176. package/docs-dev/sass/components/tag/index.html +1648 -403
  177. package/docs-dev/sass/components/tile-button/index.html +1491 -340
  178. package/docs-dev/sass/components/tile-grid/index.html +1491 -340
  179. package/docs-dev/sass/components/tile-grid-overlay/index.html +1491 -340
  180. package/docs-dev/sass/components/vignette/index.html +1499 -348
  181. package/docs-dev/sass/components/wysiwyg/index.html +1524 -355
  182. package/docs-dev/sass/core/breakpoint/index.html +1577 -374
  183. package/docs-dev/sass/core/button/index.html +1523 -370
  184. package/docs-dev/sass/core/color/index.html +1768 -485
  185. package/docs-dev/sass/core/cssvar/index.html +1491 -340
  186. package/docs-dev/sass/core/element/index.html +1837 -404
  187. package/docs-dev/sass/core/index.html +1491 -340
  188. package/docs-dev/sass/core/layout/index.html +1582 -412
  189. package/docs-dev/sass/core/path/index.html +1491 -340
  190. package/docs-dev/sass/core/selector/index.html +1491 -340
  191. package/docs-dev/sass/core/typography/index.html +1657 -448
  192. package/docs-dev/sass/core/units/index.html +1499 -342
  193. package/docs-dev/sass/core/utils/index.html +2781 -481
  194. package/docs-dev/sass/helpers/color/index.html +1491 -340
  195. package/docs-dev/sass/helpers/display/index.html +1492 -341
  196. package/docs-dev/sass/helpers/index/index.html +1491 -340
  197. package/docs-dev/sass/helpers/index.html +1492 -339
  198. package/docs-dev/sass/helpers/print/index.html +759 -298
  199. package/docs-dev/sass/helpers/typography/index.html +1491 -340
  200. package/docs-dev/sass/helpers/units/index.html +1491 -340
  201. package/docs-dev/sass/helpers/utilities/index.html +1495 -340
  202. package/docs-dev/sass/index.html +1492 -339
  203. package/js/events/index.js +17 -5
  204. package/js/index.js +1 -0
  205. package/js/settings.js +97 -0
  206. package/js/ui/breakpoints.js +19 -16
  207. package/js/ui/collapsible.js +8 -1
  208. package/js/ui/details-group.js +112 -0
  209. package/js/ui/dialog.js +103 -44
  210. package/js/ui/dialog.todo +2 -36
  211. package/js/ui/flipcard.js +37 -57
  212. package/js/ui/grid.js +15 -13
  213. package/js/ui/index.js +1 -0
  214. package/js/ui/modal-builder.js +127 -70
  215. package/js/ui/overflow-scroller.js +6 -4
  216. package/js/ui/page.js +2 -2
  217. package/js/ui/popover.js +38 -38
  218. package/js/ui/print.js +16 -25
  219. package/js/ui/programmatic-modal.js +9 -3
  220. package/js/ui/proxy-click.js +50 -36
  221. package/js/ui/resizer.js +408 -39
  222. package/js/ui/scroll-slider.js +24 -30
  223. package/js/ui/scrollpoint.js +29 -64
  224. package/js/ui/slider.js +108 -63
  225. package/js/ui/tabs.js +23 -36
  226. package/js/ui/theme-toggle.js +332 -94
  227. package/js/ui/tooltip.js +27 -32
  228. package/js/utils/class-logger.js +3 -3
  229. package/js/utils/css.js +13 -0
  230. package/js/utils/dom.js +23 -64
  231. package/js/utils/font-awesome.js +19 -0
  232. package/js/utils/index.js +2 -1
  233. package/js/utils/system.js +155 -0
  234. package/package.json +24 -9
  235. package/scss/README.md +9 -0
  236. package/scss/_breakpoint.scss +39 -5
  237. package/scss/_button.scss +7 -5
  238. package/scss/_color.scss +71 -40
  239. package/scss/_element.scss +124 -2
  240. package/scss/_layout.scss +7 -8
  241. package/scss/_typography.scss +15 -0
  242. package/scss/_units.scss +3 -2
  243. package/scss/_utils.scss +387 -16
  244. package/scss/base/_elements.scss +0 -1
  245. package/scss/base/_index.scss +1 -1
  246. package/scss/base/_keyframes.scss +15 -0
  247. package/scss/base/_layout.scss +1 -0
  248. package/scss/base/_print.scss +2 -0
  249. package/scss/base/_root.scss +2 -0
  250. package/scss/components/_accordion.scss +167 -110
  251. package/scss/components/_badge-stack.scss +84 -0
  252. package/scss/components/_badge.scss +30 -7
  253. package/scss/components/_basic-hero.scss +112 -0
  254. package/scss/components/_breadcrumb.scss +110 -0
  255. package/scss/components/_button-group.scss +90 -0
  256. package/scss/components/_button-verbose.scss +100 -18
  257. package/scss/components/_callout.scss +112 -53
  258. package/scss/components/_card-grid.scss +5 -2
  259. package/scss/components/_card.scss +216 -87
  260. package/scss/components/_counter-list.scss +151 -0
  261. package/scss/components/_css-icon.scss +27 -17
  262. package/scss/components/_data-grid.scss +55 -12
  263. package/scss/components/_data-table.scss +3 -0
  264. package/scss/components/_definition-list.scss +178 -0
  265. package/scss/components/_flipcard.scss +8 -3
  266. package/scss/components/_form-theme.scss +106 -95
  267. package/scss/components/_headline-label.scss +83 -0
  268. package/scss/components/_hero.scss +3 -10
  269. package/scss/components/_index.scss +79 -0
  270. package/scss/components/_menu-stack.scss +87 -23
  271. package/scss/components/_modal.scss +51 -23
  272. package/scss/components/_nav-strip.scss +2 -0
  273. package/scss/components/_overlay-section.scss +2 -5
  274. package/scss/components/_panel.scss +246 -0
  275. package/scss/components/_popover.scss +139 -38
  276. package/scss/components/_progress-bar.scss +260 -0
  277. package/scss/components/_progress-circle.scss +175 -0
  278. package/scss/components/_pull-quote.scss +1 -1
  279. package/scss/components/_rail.scss +127 -0
  280. package/scss/components/_ratio-box.scss +2 -5
  281. package/scss/components/_rule.scss +1 -0
  282. package/scss/components/_scroll-slider.scss +1 -5
  283. package/scss/components/_skeleton.scss +126 -0
  284. package/scss/components/_slider.scss +49 -72
  285. package/scss/components/_spoke-spinner.scss +2 -2
  286. package/scss/components/_sticky-list.scss +206 -0
  287. package/scss/components/_tabs.scss +22 -4
  288. package/scss/components/_tag.scss +49 -7
  289. package/scss/components/_vignette.scss +2 -5
  290. package/scss/components/_wysiwyg.scss +21 -13
  291. package/scss/helpers/_display.scss +15 -18
  292. package/scss/helpers/_print.scss +12 -7
  293. package/scss/helpers/_utilities.scss +62 -34
  294. package/types/events/index.d.ts +10 -1
  295. package/types/events/index.d.ts.map +1 -1
  296. package/types/index.d.ts +1 -0
  297. package/types/settings.d.ts +70 -0
  298. package/types/settings.d.ts.map +1 -0
  299. package/types/ui/breakpoints.d.ts +14 -14
  300. package/types/ui/breakpoints.d.ts.map +1 -1
  301. package/types/ui/collapsible.d.ts.map +1 -1
  302. package/types/ui/details-group.d.ts +38 -0
  303. package/types/ui/details-group.d.ts.map +1 -0
  304. package/types/ui/dialog.d.ts +20 -14
  305. package/types/ui/dialog.d.ts.map +1 -1
  306. package/types/ui/flipcard.d.ts +16 -10
  307. package/types/ui/flipcard.d.ts.map +1 -1
  308. package/types/ui/grid.d.ts +4 -6
  309. package/types/ui/grid.d.ts.map +1 -1
  310. package/types/ui/index.d.ts +1 -0
  311. package/types/ui/modal-builder.d.ts +116 -11
  312. package/types/ui/modal-builder.d.ts.map +1 -1
  313. package/types/ui/overflow-scroller.d.ts +2 -2
  314. package/types/ui/overflow-scroller.d.ts.map +1 -1
  315. package/types/ui/popover.d.ts +6 -7
  316. package/types/ui/popover.d.ts.map +1 -1
  317. package/types/ui/print.d.ts +0 -4
  318. package/types/ui/print.d.ts.map +1 -1
  319. package/types/ui/programmatic-modal.d.ts.map +1 -1
  320. package/types/ui/proxy-click.d.ts +19 -3
  321. package/types/ui/proxy-click.d.ts.map +1 -1
  322. package/types/ui/resizer.d.ts +116 -16
  323. package/types/ui/resizer.d.ts.map +1 -1
  324. package/types/ui/scroll-slider.d.ts +5 -7
  325. package/types/ui/scroll-slider.d.ts.map +1 -1
  326. package/types/ui/scrollpoint.d.ts +3 -8
  327. package/types/ui/scrollpoint.d.ts.map +1 -1
  328. package/types/ui/slider.d.ts +33 -14
  329. package/types/ui/slider.d.ts.map +1 -1
  330. package/types/ui/tabs.d.ts +6 -8
  331. package/types/ui/tabs.d.ts.map +1 -1
  332. package/types/ui/theme-toggle.d.ts +51 -7
  333. package/types/ui/theme-toggle.d.ts.map +1 -1
  334. package/types/ui/tooltip.d.ts +3 -5
  335. package/types/ui/tooltip.d.ts.map +1 -1
  336. package/types/utils/css.d.ts +11 -0
  337. package/types/utils/css.d.ts.map +1 -0
  338. package/types/utils/dom.d.ts +12 -32
  339. package/types/utils/dom.d.ts.map +1 -1
  340. package/types/utils/font-awesome.d.ts +5 -0
  341. package/types/utils/font-awesome.d.ts.map +1 -0
  342. package/types/utils/index.d.ts +1 -0
  343. package/types/utils/system.d.ts +113 -0
  344. package/types/utils/system.d.ts.map +1 -0
@@ -0,0 +1,246 @@
1
+ ////
2
+ /// @group panel
3
+ /// A structured container for content with distinct header, body, and footer sections that can bleed to the edges.
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "sass:list";
8
+ @use "sass:meta";
9
+
10
+ @use "../utils";
11
+ @use "../selector";
12
+ @use "../color";
13
+ @use "../element";
14
+ @use "../breakpoint";
15
+
16
+ // Used for function fallback
17
+ $-fallbacks: (
18
+ "box-shadow" : (
19
+ "function" : meta.get-function("get", false, "element"),
20
+ "property" : "box-shadow"
21
+ ),
22
+ "border-radius" : (
23
+ "function" : meta.get-function("get", false, "element"),
24
+ "property" : "border-radius"
25
+ ),
26
+ );
27
+
28
+ /// Module Settings
29
+ /// @type Map
30
+ /// @prop {Color} background-color [rgb(255, 255, 255)] The background color of the panel
31
+ /// @prop {Color} border [null] Set border to panel
32
+ /// @prop {Dimension} border-radius [element.$config.border-radius] The border radius of the panel
33
+ /// @prop {CssValue} box-shadow [element.$config.box-shadow] The box-shadow of the panel
34
+ /// @prop {Dimension} margin-bottom [1.5rem] The bottom margin of the panel
35
+ /// @prop {CssValue} overflow [null] Value for overflow, not included by default as it interferes with position sticky, but could be useful for cropping if that's needed (can be set on rows too)
36
+
37
+ $config: (
38
+ "background-color" : rgb(255, 255, 255),
39
+ "border" : null,
40
+ "border-radius" : true,
41
+ "box-shadow" : true,
42
+ "margin-bottom" : 1.5em,
43
+ "overflow" : null,
44
+ ) !default;
45
+
46
+ /// Styles Map (for unique variations/modifiers)
47
+ /// - Use this map to define distinct visual styles for the panel
48
+ /// - This map is two levels the first level is the name of the modifier (see default below).
49
+ /// This will become the modifier for the pane; so ("transparent" : (...)) = .panel--transparent.
50
+ /// The second level is that modifier row modifiers (ie. panel__row--header) (see row options below)
51
+ /// - Keyword "default" means without modifier for both parent and row configs
52
+ /// - For example "default" as panel container modifier name will mean
53
+ /// styles for this without any modifiers
54
+ /// - In a panels row config (second level) "default" will refer to the non-modified row (ie .panel__row)
55
+ /// - Order matters, default should be first
56
+ /// - Row Options
57
+ /// - Each row can have the following options:
58
+ /// overflow: Set overflow property if needed,
59
+ /// aspect-ratio,
60
+ /// height,
61
+ /// min-height,
62
+ /// padding,
63
+ /// margin: Can be used to create gap between container and row
64
+ /// background-color,
65
+ /// font-weight,
66
+ /// font-family,
67
+ /// color,
68
+ /// box-shadow,
69
+ /// grow: Default the panel will grow to fill the containers height, passing false disables this
70
+ /// border-top: If a string is passed it will resolved as an element rule style
71
+ /// border-bottom: If a string is passed it will resolved as an element rule style
72
+ /// @type Map
73
+
74
+ $styles: (
75
+ "default" : (
76
+ "default" : (
77
+ "padding": 1em,
78
+ ),
79
+ "header" : (
80
+ "padding" : (0.75em 1em),
81
+ "background-color" : #e7e7e7,
82
+ "border-bottom" : "default",
83
+ "font-weight" : bold,
84
+ "grow" : false,
85
+ "breakpoints" : (
86
+ "small" : (
87
+ "direction" : "max",
88
+ "padding" : (0.25em 0.5em)
89
+ )
90
+ )
91
+ ),
92
+ "footer" : (
93
+ "padding" : (0.5em 1em),
94
+ "background-color" : #f4f4f4,
95
+ "border-top" : "default",
96
+ "grow" : false
97
+ ),
98
+ "separator-top" : (
99
+ "border-top" : "light",
100
+ ),
101
+ "separator-bottom" : (
102
+ "border-bottom" : "light",
103
+ )
104
+ ),
105
+ "transparent" : (
106
+ "default" : (
107
+ "padding" : (1em 0),
108
+ "margin" : (0 1em),
109
+ ),
110
+ "header" : (
111
+ "padding" : (1em 0),
112
+ "margin" : (0 1em),
113
+ "background-color" : transparent,
114
+ "grow" : false
115
+ ),
116
+ "footer" : (
117
+ "padding" : (1em 0),
118
+ "margin" : (0 1em),
119
+ "background-color" : transparent,
120
+ "grow" : false
121
+ )
122
+ ),
123
+ "compact" : (
124
+ "default" : (
125
+ "padding" : (0.25em 0.5em)
126
+ ),
127
+ "header" : (
128
+ "padding" : (0.25em 0.5em)
129
+ ),
130
+ "body" : (
131
+ "padding" : (0.5em 1em)
132
+ )
133
+ )
134
+ ) !default;
135
+
136
+ /// Change modules $config
137
+ /// @param {Map} $changes Map of changes
138
+ /// @example scss
139
+ /// @include ulu.component-panel-set(( "property" : value ));
140
+ @mixin set($changes) {
141
+ $config: map.merge($config, $changes) !global;
142
+ }
143
+
144
+ /// Get a config option
145
+ /// @param {Map} $name Name of property
146
+ /// @example scss
147
+ /// @include ulu.component-panel-get("property");
148
+ @function get($name) {
149
+ $value: utils.require-map-get($config, $name, "panel [config]");
150
+ @return utils.function-fallback($name, $value, $-fallbacks);
151
+ }
152
+
153
+ /// Set style variations
154
+ /// - See $styles for more information on map properties/structure
155
+ /// @param {Map} $changes Map of changes (options for style include all config properties)
156
+ /// @param {String} $merge-mode Merge mode see utils.map-merge() [null|"deep"|"overwrite"]
157
+ @mixin set-styles($changes, $merge-mode: null) {
158
+ $styles: utils.map-merge($styles, $changes, $merge-mode) !global;
159
+ }
160
+
161
+ /// Output component styles
162
+ /// @example scss
163
+ /// @include ulu.component-panel-styles();
164
+ @mixin styles {
165
+ $prefix: selector.class("panel");
166
+
167
+ #{ $prefix } {
168
+ display: flex;
169
+ flex-direction: column;
170
+ overflow: get("overflow");
171
+ background-color: get("background-color");
172
+ box-shadow: get("box-shadow");
173
+ border: get("border");
174
+ border-radius: get("border-radius");
175
+ }
176
+ #{ $prefix }__row {
177
+ &:first-child {
178
+ border-top-left-radius: get("border-radius");
179
+ border-top-right-radius: get("border-radius");
180
+ }
181
+ &:last-child {
182
+ border-bottom-left-radius: get("border-radius");
183
+ border-bottom-right-radius: get("border-radius");
184
+ }
185
+ }
186
+
187
+ @each $modifier, $rows in $styles {
188
+ @if ($modifier == "default") {
189
+ @each $row-name, $props in $rows {
190
+ @if ($row-name == "default") {
191
+ #{ $prefix }__row {
192
+ @include create-row-style($props);
193
+ }
194
+ } @else {
195
+ #{ $prefix }__row--#{ $row-name } {
196
+ @include create-row-style($props);
197
+ }
198
+ }
199
+ }
200
+ } @else {
201
+ #{ $prefix }--#{ $modifier } {
202
+ @each $row-name, $props in $rows {
203
+ @if ($row-name == "default") {
204
+ #{ $prefix }__row {
205
+ @include create-row-style($props);
206
+ }
207
+ } @else {
208
+ #{ $prefix }__row--#{ $row-name } {
209
+ @include create-row-style($props);
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
216
+ }
217
+
218
+ /// Create row styles
219
+ /// @param {Map} $props - Row Options
220
+ @mixin create-row-style($props) {
221
+ overflow: map.get($props, "overflow");
222
+ aspect-ratio: map.get($props, "aspect-ratio");
223
+ height: map.get($props, "height");
224
+ min-height: map.get($props, "min-height");
225
+ padding: map.get($props, "padding");
226
+ margin: map.get($props, "margin");
227
+ background-color: color.get(map.get($props, "background-color"));
228
+ font-weight: map.get($props, "font-weight");
229
+ font-family: map.get($props, "font-family");
230
+ color: color.get(map.get($props, "color"));
231
+ box-shadow: map.get($props, "box-shadow");
232
+ flex-grow: if(map.get($props, "grow") == false, 0, 1); // Default is grow
233
+ border-top: element.get-optional-rule-style(map.get($props, "border-top"));
234
+ border-bottom: element.get-optional-rule-style(map.get($props, "border-bottom"));
235
+
236
+
237
+ // Allow passing breakpoint maps
238
+ $breakpoints: map.get($props, "breakpoints");
239
+ $b-options: ( "directionRequired" : true );
240
+
241
+ @if ($breakpoints and list.length($breakpoints)) {
242
+ @include breakpoint.from-each($breakpoints, $b-options) using ($b-props) {
243
+ @include create-row-style($b-props);
244
+ }
245
+ }
246
+ }
@@ -29,7 +29,9 @@ $-fallbacks: (
29
29
 
30
30
  /// Module Settings
31
31
  /// @type Map
32
- /// @prop {Dimension} arrow-size [16px] size of the dropdown arrow.
32
+ /// @prop {Dimension} arrow-size [16px] Size of the dropdown arrow.
33
+ /// @prop {Boolean} arrow-box-shadow [true] When true the arrow will get the popover's box shadow. Note if the box shadow is not a list (for example custom property), the mask won't be calculated from the box-shadow (use arrow-box-shadow-extent to specify manually)
34
+ /// @prop {Number} arrow-box-shadow-extent [null] If set will determine the amount of overlap added to the arrow mask, else it's calculated automatically by the box-shadow option (can be used if box-shadow is custom property)
33
35
  /// @prop {Color} background-color [white] Background color of the popover.
34
36
  /// @prop {Dimension} border-radius [6px] Border radius of the popover.
35
37
  /// @prop {Color} color [inherit] Text color of the popover.
@@ -40,13 +42,12 @@ $-fallbacks: (
40
42
  /// @prop {Dimension} type-size [null] Font size of the popover.
41
43
  /// @prop {Number} z-index [true] z-index of the popover.
42
44
  /// @prop {CssValue} box-shadow [true] Box shadow of the popover.
43
- /// @prop {CssValue} box-shadow-footer [0 0 4px] Box shadow of the popover footer.
44
- /// @prop {String} box-shadow-footer-color ["box-shadow"] Color of the footer's box shadow.
45
45
  /// @prop {Color} header-background-color [#ccc] Background color of the popover header
46
46
  /// @prop {Color} header-color [null] Text color for the header.
47
47
  /// @prop {Color} header-media-background-color [black] background color for header media.
48
48
  /// @prop {Dimension} header-padding-y [0.25rem] Vertical padding of the header.
49
49
  /// @prop {Color} footer-background-color [#ccc] Background color of the footer.
50
+ /// @prop {Color} footer-border-top [1px solid #dfdfdf] Optional border used to separate the content from footer
50
51
  /// @prop {Color} footer-color [null] Text color of the footer.
51
52
  /// @prop {Dimension} footer-padding-y [0.25rem] Vertical padding of the footer.
52
53
  /// @prop {Dimension} footer-padding-y-large [0.5rem] Vertical padding of the footer if using "--large" or "--large-x" styling.
@@ -61,6 +62,8 @@ $-fallbacks: (
61
62
 
62
63
  $config: (
63
64
  "arrow-size" : 16px,
65
+ "arrow-box-shadow" : true,
66
+ "arrow-box-shadow-extent" : null,
64
67
  "background-color" : white,
65
68
  "border-radius" : 6px,
66
69
  "color" : inherit,
@@ -70,14 +73,12 @@ $config: (
70
73
  "padding-large" : 2rem,
71
74
  "type-size" : null,
72
75
  "z-index" : true,
73
-
74
76
  "box-shadow" : true,
75
- "box-shadow-footer" : 0 0 4px,
76
- "box-shadow-footer-color" : "box-shadow",
77
77
  "header-background-color" : #ccc,
78
78
  "header-color" : null,
79
79
  "header-media-background-color": black,
80
80
  "header-padding-y" : 0.25rem,
81
+ "footer-border-top" : 1px solid #dfdfdf,
81
82
  "footer-background-color" : #ccc,
82
83
  "footer-color" : null,
83
84
  "footer-padding-y" : 0.25rem,
@@ -117,39 +118,9 @@ $config: (
117
118
 
118
119
  @mixin styles {
119
120
  $prefix: selector.class("popover");
120
- $arrow-size-half: math.div(get("arrow-size"), 2);
121
121
 
122
122
  @if (get("arrow-size")) {
123
- #{ $prefix }__arrow {
124
- display: block;
125
- visibility: hidden;
126
- z-index: 1;
127
- &,
128
- &:before {
129
- position: absolute;
130
- width: get("arrow-size");
131
- height: get("arrow-size");
132
- background: inherit;
133
- }
134
- &:before {
135
- visibility: visible;
136
- content: '';
137
- transform: rotate(45deg);
138
- // box-shadow: $box-shadow;
139
- }
140
- [data-placement^='top'] > & {
141
- bottom: -($arrow-size-half);
142
- }
143
- [data-placement^='bottom'] > & {
144
- top: -($arrow-size-half);
145
- }
146
- [data-placement^='left'] > & {
147
- right: -($arrow-size-half);
148
- }
149
- [data-placement^='right'] > & {
150
- left: -($arrow-size-half);
151
- }
152
- }
123
+ @include -arrow-styles();
153
124
  }
154
125
  // Default position is on the right of the container (Popper handles positioning)
155
126
  #{ $prefix } {
@@ -197,7 +168,7 @@ $config: (
197
168
  background-color: color.get(get("header-media-background-color"));
198
169
  }
199
170
  #{ $prefix }__footer {
200
- box-shadow: get("box-shadow-footer") color.get(get("box-shadow-footer-color"));
171
+ border-top: get("footer-border-top");
201
172
  padding: get("footer-padding-y") get("padding");
202
173
  color: color.get(get("footer-color"));
203
174
  background-color: color.get(get("footer-background-color"));
@@ -260,4 +231,134 @@ $config: (
260
231
  }
261
232
  }
262
233
  }
234
+ }
235
+
236
+ @mixin -arrow-styles() {
237
+ @if get("arrow-box-shadow") {
238
+ @include -arrow-styles-with-box-shadow();
239
+ } @else {
240
+ @include -arrow-styles-simple();
241
+ }
242
+ }
243
+
244
+ // Internal mixin for original arrow styles without box-shadow
245
+ @mixin -arrow-styles-simple() {
246
+ $prefix: selector.class("popover");
247
+ $size: get("arrow-size");
248
+ $half: math.div($size, 2);
249
+
250
+ #{ $prefix }__arrow {
251
+ visibility: hidden;
252
+ z-index: 1;
253
+ &,
254
+ &::before {
255
+ display: block;
256
+ position: absolute;
257
+ width: $size;
258
+ height: $size;
259
+ background: inherit;
260
+ }
261
+ &::before {
262
+ visibility: visible;
263
+ content: '';
264
+ transform: rotate(45deg);
265
+ }
266
+ [data-placement^="top"] > & {
267
+ bottom: -($half);
268
+ }
269
+ [data-placement^="bottom"] > & {
270
+ top: -($half);
271
+ }
272
+ [data-placement^="left"] > & {
273
+ right: -($half);
274
+ }
275
+ [data-placement^="right"] > & {
276
+ left: -($half);
277
+ }
278
+ }
279
+ // Account for footer and change arrow color when positioned next to it
280
+ #{ $prefix }__footer ~ #{ $prefix }__arrow {
281
+ [data-placement^="top"] > & {
282
+ &::before {
283
+ background-color: get("footer-background-color");
284
+ }
285
+ }
286
+ }
287
+ }
288
+
289
+ // Internal mixin for arrow styles when using the mask (extra pseudo element)
290
+ @mixin -arrow-styles-with-box-shadow() {
291
+ $prefix: selector.class("popover");
292
+ $box-shadow: get("box-shadow");
293
+ $size: get("arrow-size");
294
+ $half: math.div($size, 2);
295
+ $size-info: utils.number-info($size);
296
+ $unitless: map.get($size-info, "value");
297
+ $unit: map.get($size-info, "unit");
298
+ $hypotenuse: utils.hypotenuse($unitless, $unitless);
299
+ $hypotenuse-half: math.div($hypotenuse, 2);
300
+ $manual-extent: get("arrow-box-shadow-extent");
301
+ $shadow-extent: if(
302
+ $manual-extent,
303
+ $manual-extent,
304
+ if(utils.is-list($box-shadow), utils.box-shadow-extent($box-shadow), 5px)
305
+ );
306
+ $overlap: utils.strip-unit($shadow-extent);
307
+ $mask-height: utils.add-unit($hypotenuse-half + $overlap, $unit);
308
+ $mask-width: utils.add-unit($hypotenuse + $overlap, $unit);
309
+
310
+ #{ $prefix }__arrow {
311
+ visibility: hidden;
312
+ z-index: 1;
313
+ &,
314
+ &::before,
315
+ &::after {
316
+ display: block;
317
+ position: absolute;
318
+ width: $size;
319
+ height: $size;
320
+ background: inherit;
321
+ }
322
+ &::before,
323
+ &::after {
324
+ visibility: visible;
325
+ content: '';
326
+ }
327
+ &::before {
328
+ box-shadow: get("box-shadow");
329
+ transform: rotate(45deg);
330
+ }
331
+ // Masking shape
332
+ &::after {
333
+ top: 50%;
334
+ left: 50%;
335
+ transform: translateX(-50%);
336
+ height: $mask-height;
337
+ width: $mask-width;
338
+ }
339
+ [data-placement^="top"] > & {
340
+ bottom: -($half);
341
+ transform: rotate(180deg); // Rotate w. mask
342
+ }
343
+ [data-placement^="bottom"] > & {
344
+ top: -($half);
345
+ }
346
+ [data-placement^="left"] > & {
347
+ right: -($half);
348
+ transform: rotate(90deg); // Rotate w. mask
349
+ }
350
+ [data-placement^="right"] > & {
351
+ left: -($half);
352
+ transform: rotate(-90deg); // Rotate w. mask
353
+ }
354
+ }
355
+ // Account for footer and change arrow color when positioned next to it
356
+ #{ $prefix }__footer ~ #{ $prefix }__arrow {
357
+ [data-placement^="top"] > & {
358
+ &::before,
359
+ &::after {
360
+ background-color: get("footer-background-color");
361
+ }
362
+ }
363
+ }
263
364
  }