@ulu/frontend 0.1.0-beta.23 → 0.1.0-beta.25

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 (155) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ulu-frontend.min.css +1 -1
  3. package/docs-dev/changelog/index.html +49 -0
  4. package/docs-dev/demos/accordion/index.html +30 -0
  5. package/docs-dev/demos/button/index.html +30 -0
  6. package/docs-dev/demos/callout/index.html +30 -0
  7. package/docs-dev/demos/captioned-figure/index.html +30 -0
  8. package/docs-dev/demos/card/index.html +456 -429
  9. package/docs-dev/demos/card-grid/index.html +5165 -0
  10. package/docs-dev/demos/css-icons/index.html +30 -0
  11. package/docs-dev/demos/data-grid/index.html +30 -0
  12. package/docs-dev/demos/data-table/index.html +55 -25
  13. package/docs-dev/demos/details-group/index.html +30 -0
  14. package/docs-dev/demos/file-save/index.html +30 -0
  15. package/docs-dev/demos/flipcard/index.html +30 -0
  16. package/docs-dev/demos/form-theme/index.html +30 -0
  17. package/docs-dev/demos/index.html +30 -0
  18. package/docs-dev/demos/list-inline/index.html +30 -0
  19. package/docs-dev/demos/list-lines/index.html +30 -0
  20. package/docs-dev/demos/menu-stack/index.html +30 -0
  21. package/docs-dev/demos/modals/index.html +30 -0
  22. package/docs-dev/demos/nav-strip/index.html +30 -0
  23. package/docs-dev/demos/overlay-section/index.html +30 -0
  24. package/docs-dev/demos/popovers/index.html +30 -0
  25. package/docs-dev/demos/print/index.html +30 -0
  26. package/docs-dev/demos/pull-quote/index.html +30 -0
  27. package/docs-dev/demos/rule/index.html +30 -0
  28. package/docs-dev/demos/scroll-slider/index.html +60 -102
  29. package/docs-dev/demos/scrollpoints/index.html +30 -0
  30. package/docs-dev/demos/spoke-spinner/index.html +30 -0
  31. package/docs-dev/demos/sticky-list/index.html +30 -0
  32. package/docs-dev/demos/tabs/index.html +30 -0
  33. package/docs-dev/demos/tag/index.html +30 -0
  34. package/docs-dev/demos/theme-toggle/index.html +30 -0
  35. package/docs-dev/demos/tiles/index.html +30 -0
  36. package/docs-dev/demos/tooltip/index.html +30 -0
  37. package/docs-dev/guide/building-stylesheet/index.html +30 -0
  38. package/docs-dev/guide/developing-ulu-scss-module/index.html +30 -0
  39. package/docs-dev/guide/index.html +30 -0
  40. package/docs-dev/index.html +30 -0
  41. package/docs-dev/javascript/events/index.html +30 -0
  42. package/docs-dev/javascript/index.html +30 -0
  43. package/docs-dev/javascript/settings/index.html +30 -0
  44. package/docs-dev/javascript/ui-breakpoints/index.html +30 -0
  45. package/docs-dev/javascript/ui-collapsible/index.html +30 -0
  46. package/docs-dev/javascript/ui-details-group/index.html +30 -0
  47. package/docs-dev/javascript/ui-dialog/index.html +30 -0
  48. package/docs-dev/javascript/ui-flipcard/index.html +30 -0
  49. package/docs-dev/javascript/ui-grid/index.html +30 -0
  50. package/docs-dev/javascript/ui-modal-builder/index.html +30 -0
  51. package/docs-dev/javascript/ui-overflow-scroller/index.html +30 -0
  52. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +30 -0
  53. package/docs-dev/javascript/ui-page/index.html +30 -0
  54. package/docs-dev/javascript/ui-popover/index.html +30 -0
  55. package/docs-dev/javascript/ui-print/index.html +30 -0
  56. package/docs-dev/javascript/ui-print-details/index.html +30 -0
  57. package/docs-dev/javascript/ui-programmatic-modal/index.html +30 -0
  58. package/docs-dev/javascript/ui-proxy-click/index.html +30 -0
  59. package/docs-dev/javascript/ui-resizer/index.html +30 -0
  60. package/docs-dev/javascript/ui-scroll-slider/index.html +30 -0
  61. package/docs-dev/javascript/ui-scrollpoint/index.html +30 -0
  62. package/docs-dev/javascript/ui-slider/index.html +30 -0
  63. package/docs-dev/javascript/ui-tabs/index.html +30 -0
  64. package/docs-dev/javascript/ui-theme-toggle/index.html +30 -0
  65. package/docs-dev/javascript/ui-tooltip/index.html +30 -0
  66. package/docs-dev/javascript/utils-class-logger/index.html +30 -0
  67. package/docs-dev/javascript/utils-dom/index.html +30 -0
  68. package/docs-dev/javascript/utils-file-save/index.html +30 -0
  69. package/docs-dev/javascript/utils-floating-ui/index.html +30 -0
  70. package/docs-dev/javascript/utils-id/index.html +30 -0
  71. package/docs-dev/javascript/utils-pause-youtube-video/index.html +30 -0
  72. package/docs-dev/sass/base/color/index.html +30 -0
  73. package/docs-dev/sass/base/elements/index.html +30 -0
  74. package/docs-dev/sass/base/index/index.html +30 -0
  75. package/docs-dev/sass/base/index.html +30 -0
  76. package/docs-dev/sass/base/keyframes/index.html +30 -0
  77. package/docs-dev/sass/base/layout/index.html +30 -0
  78. package/docs-dev/sass/base/normalize/index.html +30 -0
  79. package/docs-dev/sass/base/print/index.html +30 -0
  80. package/docs-dev/sass/base/root/index.html +30 -0
  81. package/docs-dev/sass/base/typography/index.html +30 -0
  82. package/docs-dev/sass/components/accordion/index.html +31 -1
  83. package/docs-dev/sass/components/adaptive-spacing/index.html +30 -0
  84. package/docs-dev/sass/components/badge/index.html +30 -0
  85. package/docs-dev/sass/components/basic-hero/index.html +30 -0
  86. package/docs-dev/sass/components/button/index.html +30 -0
  87. package/docs-dev/sass/components/button-verbose/index.html +30 -0
  88. package/docs-dev/sass/components/callout/index.html +30 -0
  89. package/docs-dev/sass/components/captioned-figure/index.html +30 -0
  90. package/docs-dev/sass/components/card/index.html +70 -12
  91. package/docs-dev/sass/components/card-grid/index.html +30 -0
  92. package/docs-dev/sass/components/css-icon/index.html +30 -0
  93. package/docs-dev/sass/components/data-grid/index.html +30 -0
  94. package/docs-dev/sass/components/data-table/index.html +30 -0
  95. package/docs-dev/sass/components/fill-context/index.html +30 -0
  96. package/docs-dev/sass/components/flipcard/index.html +30 -0
  97. package/docs-dev/sass/components/flipcard-grid/index.html +30 -0
  98. package/docs-dev/sass/components/form-theme/index.html +30 -0
  99. package/docs-dev/sass/components/hero/index.html +30 -0
  100. package/docs-dev/sass/components/horizontal-rule/index.html +30 -0
  101. package/docs-dev/sass/components/image-grid/index.html +30 -0
  102. package/docs-dev/sass/components/index/index.html +30 -0
  103. package/docs-dev/sass/components/index.html +30 -0
  104. package/docs-dev/sass/components/links/index.html +30 -0
  105. package/docs-dev/sass/components/list-inline/index.html +30 -0
  106. package/docs-dev/sass/components/list-lines/index.html +30 -0
  107. package/docs-dev/sass/components/list-ordered/index.html +30 -0
  108. package/docs-dev/sass/components/list-unordered/index.html +30 -0
  109. package/docs-dev/sass/components/menu-stack/index.html +30 -0
  110. package/docs-dev/sass/components/modal/index.html +30 -0
  111. package/docs-dev/sass/components/nav-strip/index.html +30 -0
  112. package/docs-dev/sass/components/overlay-section/index.html +30 -0
  113. package/docs-dev/sass/components/pager/index.html +30 -0
  114. package/docs-dev/sass/components/placeholder-block/index.html +30 -0
  115. package/docs-dev/sass/components/popover/index.html +30 -0
  116. package/docs-dev/sass/components/pull-quote/index.html +30 -0
  117. package/docs-dev/sass/components/ratio-box/index.html +30 -0
  118. package/docs-dev/sass/components/rule/index.html +30 -0
  119. package/docs-dev/sass/components/scroll-slider/index.html +30 -0
  120. package/docs-dev/sass/components/skip-link/index.html +30 -0
  121. package/docs-dev/sass/components/slider/index.html +30 -0
  122. package/docs-dev/sass/components/spoke-spinner/index.html +30 -0
  123. package/docs-dev/sass/components/sticky-list/index.html +33 -3
  124. package/docs-dev/sass/components/tabs/index.html +30 -0
  125. package/docs-dev/sass/components/tag/index.html +30 -0
  126. package/docs-dev/sass/components/tile-button/index.html +30 -0
  127. package/docs-dev/sass/components/tile-grid/index.html +30 -0
  128. package/docs-dev/sass/components/tile-grid-overlay/index.html +30 -0
  129. package/docs-dev/sass/components/vignette/index.html +30 -0
  130. package/docs-dev/sass/components/wysiwyg/index.html +30 -0
  131. package/docs-dev/sass/core/breakpoint/index.html +30 -0
  132. package/docs-dev/sass/core/button/index.html +30 -0
  133. package/docs-dev/sass/core/color/index.html +30 -0
  134. package/docs-dev/sass/core/cssvar/index.html +30 -0
  135. package/docs-dev/sass/core/element/index.html +30 -0
  136. package/docs-dev/sass/core/index.html +30 -0
  137. package/docs-dev/sass/core/layout/index.html +30 -0
  138. package/docs-dev/sass/core/path/index.html +30 -0
  139. package/docs-dev/sass/core/selector/index.html +30 -0
  140. package/docs-dev/sass/core/typography/index.html +30 -0
  141. package/docs-dev/sass/core/units/index.html +30 -0
  142. package/docs-dev/sass/core/utils/index.html +30 -0
  143. package/docs-dev/sass/helpers/color/index.html +30 -0
  144. package/docs-dev/sass/helpers/display/index.html +30 -0
  145. package/docs-dev/sass/helpers/index/index.html +30 -0
  146. package/docs-dev/sass/helpers/index.html +30 -0
  147. package/docs-dev/sass/helpers/print/index.html +30 -0
  148. package/docs-dev/sass/helpers/typography/index.html +30 -0
  149. package/docs-dev/sass/helpers/units/index.html +30 -0
  150. package/docs-dev/sass/helpers/utilities/index.html +30 -0
  151. package/docs-dev/sass/index.html +30 -0
  152. package/package.json +1 -1
  153. package/scss/components/_accordion.scss +4 -5
  154. package/scss/components/_card.scss +101 -22
  155. package/scss/components/_sticky-list.scss +0 -1
@@ -57,12 +57,15 @@
57
57
  /// @prop {Boolean} image-transition-enabled [true] Enable or disable the image transition.
58
58
  /// @prop {Time} image-transition-duration [350ms] The duration of the image transition.
59
59
  /// @prop {CssValue} image-transition-timing-function [ease-in-out] The timing function for the image transition.
60
+ /// @prop {Number} image-fit-padding [1rem] Padding on inside of image when using image fit modifier
61
+ /// @prop {CssValue} image-fit-filter [drop-shadow(0 0px 8px rgba(0, 0, 0, 0.2))] Filter to use on image when using image fit modifier
60
62
  /// @prop {List} image-icon-max-width [30rem] Max width for image when using the modifier on the .card__image--icon
61
63
  /// @prop {List} image-transition-properties [(transform, filter)] The properties for the image transitions.
62
64
  /// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
65
+ /// @prop {Unit} horizontal-min-height [10rem] Minimum height when horizontal
66
+ /// @prop {Unit} horizontal-max-width [40rem] Maximum width when horizontal
63
67
  /// @prop {Unit} horizontal-body-max-width [80rem] The max-width of body when horizontal
64
68
 
65
-
66
69
  $config: (
67
70
  "background-color" : white,
68
71
  "background-color-hover" : rgb(242, 244, 246),
@@ -80,12 +83,14 @@ $config: (
80
83
  "footer-padding-y" : 0.25rem,
81
84
  "footer-min-height" : 2.5rem,
82
85
  "horizontal-breakpoint" : "small",
83
- "horizontal-image-width" : 33%,
86
+ "horizontal-image-width" : min(33%, 20rem),
84
87
  "horizontal-body-max-width" : 80rem,
88
+ "horizontal-min-height" : 10rem,
89
+ "horizontal-max-width" : 40rem,
85
90
  "header-margin" : 0.75em,
86
91
  "image-ratio" : 56.25%,
87
92
  "image-aspect-ratio": list.slash(5, 3),
88
- "image-background-color" : rgb(197, 197, 197),
93
+ "image-background-color" : rgb(238, 238, 238),
89
94
  "image-border" : null, // For when you have a margin
90
95
  "image-filter-hover" : null,
91
96
  "image-margin" : null,
@@ -95,6 +100,8 @@ $config: (
95
100
  "image-transition-enabled" : true,
96
101
  "image-transition-properties" : (transform, filter),
97
102
  "image-transition-timing-function" : ease-in-out,
103
+ "image-fit-padding" : 1rem,
104
+ "image-fit-filter" : drop-shadow(0 0px 8px rgba(0, 0, 0, 0.3)),
98
105
  "margin-y" : 3rem,
99
106
  "max-width" : 28rem,
100
107
  "padding" : 2rem,
@@ -183,6 +190,9 @@ $config: (
183
190
  flex-direction: column;
184
191
  justify-content: flex-end;
185
192
  max-width: get("max-width");
193
+ // Not absolutely necessary, incase we want to remove in future
194
+ overflow: hidden;
195
+
186
196
  // Border is on pseudo so that it's on top of image/etc
187
197
  &:after {
188
198
  position: absolute;
@@ -411,28 +421,97 @@ $config: (
411
421
  }
412
422
  }
413
423
 
424
+ #{ $prefix }--image-fit {
425
+ #{ $prefix }__image {
426
+ img {
427
+ padding: get("image-fit-padding");
428
+ object-fit: contain;
429
+ object-position: top center;
430
+ filter: get("image-fit-filter");
431
+ }
432
+ }
433
+ }
434
+
414
435
  @if (get("horizontal-breakpoint")) {
415
436
  @include breakpoint.min(get("horizontal-breakpoint")) {
416
- #{ $prefix }--horizontal {
417
- display: flex;
418
- justify-content: center;
419
- align-items: center;
420
- #{ $prefix }__image {
421
- width: get("horizontal-image-width");
422
- flex: 0 1 get("horizontal-image-width");
423
- // max-width: 30rem;
424
- min-height: 28rem;
425
- // padding-top: 0;
426
- }
427
- #{ $prefix }__body {
428
- display: flex;
429
- flex: 1;
430
- flex-direction: column;
431
- justify-content: center;
432
- max-width: get("horizontal-body-max-width");
433
- }
434
- }
437
+ @include -horizontal-card-styles();
438
+ }
439
+ } @else {
440
+ @include -horizontal-card-styles();
441
+ }
442
+ }
443
+
444
+ @mixin -horizontal-card-styles() {
445
+ $prefix: selector.class("card");
446
+
447
+ #{ $prefix }--horizontal {
448
+ display: grid;
449
+ grid-template-columns: get("horizontal-image-width") 1fr;
450
+ // Creating the two rows (body and footer), if one is missing it's height will be 0
451
+ // Cannot use gap with the grid as it will create space when a row isn't needed
452
+ grid-template-rows: auto auto;
453
+ min-height: get("horizontal-min-height");
454
+ max-width: get("horizontal-max-width");
455
+ #{ $prefix }__image {
456
+ grid-column: 1 / 2;
457
+ grid-row: 1 / -1;
458
+ aspect-ratio: auto;
459
+ border-top-right-radius: 0;
460
+ border-bottom-left-radius: get("border-radius");
461
+ }
462
+ #{ $prefix }__body,
463
+ #{ $prefix }__footer {
464
+ grid-column: 2 / 3;
465
+ }
466
+ #{ $prefix }__body {
467
+ display: flex;
468
+ flex-direction: column;
469
+ justify-content: center;
470
+ max-width: get("horizontal-body-max-width");
471
+ }
472
+
473
+ // For modern browsers
474
+ // Optionally use no-image modifier for older browser support
475
+ &:not(:has(#{ $prefix }__image)) {
476
+ @include -card-horizontal-no-image-styles();
435
477
  }
478
+ &#{ $prefix }--no-image {
479
+ @include -card-horizontal-no-image-styles();
480
+ }
481
+ }
482
+ }
483
+
484
+ @mixin -card-horizontal-no-image-styles() {
485
+ $prefix: selector.class("card");
486
+ grid-template-columns: 1fr;
487
+ #{ $prefix }__body,
488
+ #{ $prefix }__footer {
489
+ grid-column: 1 / 2;
436
490
  }
437
491
  }
438
492
 
493
+ // OLD CSS FOR HORIZONTAL
494
+ // #{ $prefix }--horizontal {
495
+ // display: flex;
496
+ // flex-direction: row;
497
+ // justify-content: center;
498
+ // align-items: center;
499
+ // #{ $prefix }__image {
500
+ // align-self: stretch;
501
+ // border-top-right-radius: 0;
502
+ // border-bottom-left-radius: get("border-radius");
503
+ // width: get("horizontal-image-width");
504
+ // flex: 0 0 get("horizontal-image-width");
505
+ // // max-width: 30rem;
506
+ // // min-height: 28rem;
507
+ // // padding-top: 0;
508
+ // }
509
+ // #{ $prefix }__body {
510
+ // display: flex;
511
+ // flex: 1;
512
+ // flex-direction: column;
513
+ // justify-content: center;
514
+ // max-width: get("horizontal-body-max-width");
515
+ // }
516
+ // }
517
+
@@ -178,7 +178,6 @@ $config: (
178
178
 
179
179
  // Print out any contextual background styles
180
180
  @each $props in get("background-contexts") {
181
- @debug $props;
182
181
  $selector: map.get($props, "selector");
183
182
  $item-padding-x: map.get($props, "item-padding-x");
184
183
  @include breakpoint.min(get("breakpoint")) {