@wpmoo/ui 2.1.1 → 2.3.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 (41) hide show
  1. package/README.md +49 -2
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/certification.json +3 -1
  4. package/dist/assets/css/moo-ui.css +429 -1
  5. package/dist/assets/css/moo-ui.min.css +2 -2
  6. package/dist/assets/css/moo.css +349 -1
  7. package/dist/assets/css/moo.min.css +2 -2
  8. package/dist/js/chart.js +1 -1
  9. package/dist/js/chart.min.js +1 -1
  10. package/dist/js/combobox.js +1 -1
  11. package/dist/js/consent.js +342 -0
  12. package/dist/js/context-menu.js +1 -1
  13. package/dist/js/datatable.js +1 -1
  14. package/dist/js/datepicker.js +1 -1
  15. package/dist/js/datepicker.min.js +1 -1
  16. package/dist/js/floating-panel.js +1 -1
  17. package/dist/js/image-gallery.js +247 -0
  18. package/dist/js/moo-ui.js +561 -4
  19. package/dist/js/moo-ui.min.js +2 -2
  20. package/dist/js/overlay-scrollbar.js +1 -1
  21. package/dist/js/password-requirements.js +1 -1
  22. package/dist/js/sheet.js +1 -1
  23. package/dist/js/sidebar.js +1 -1
  24. package/dist/js/slider.js +1 -1
  25. package/dist/js/state.js +1 -1
  26. package/dist/js/table-of-contents.js +1 -1
  27. package/dist/js/toc.js +1 -1
  28. package/dist/release-manifest.json +4 -4
  29. package/package.json +5 -1
  30. package/scss/_components.scss +2 -0
  31. package/scss/components/_gallery.scss +73 -0
  32. package/scss/components/_item.scss +96 -0
  33. package/scss/foundations/_globals.scss +1 -0
  34. package/scss/foundations/_scope.scss +2 -0
  35. package/scss/mixins/_banner.scss +1 -1
  36. package/scss/moo-core.scss +1 -0
  37. package/scss/moo-ui.scss +2 -0
  38. package/scss/settings/_component_variables.scss +8 -0
  39. package/scss/utilities/_gallery.scss +25 -0
  40. package/scss/utilities/_motion.scss +5 -0
  41. package/scss/utilities/_motion_primitives.scss +10 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI overlay-scrollbar.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI overlay-scrollbar.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI password-requirements.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI password-requirements.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/sheet.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI sheet.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI sheet.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI sidebar.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI sidebar.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/slider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI slider.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI slider.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/state.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI state.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI state.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI table-of-contents.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI table-of-contents.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/toc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI toc.js v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI toc.js v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -3,22 +3,22 @@
3
3
  {
4
4
  "export": "./moo.css",
5
5
  "path": "dist/assets/css/moo.css",
6
- "sha256": "2c98f8a15fdd14b6749831dbe78edfeb8998f5cfc017733164efacf93b16db11"
6
+ "sha256": "4ac09fbfd732da01c9f173721cf98fc3506eb3f8074cdd1b2e9272c1a18f9943"
7
7
  },
8
8
  {
9
9
  "export": "./moo-ui.css",
10
10
  "path": "dist/assets/css/moo-ui.css",
11
- "sha256": "afca34860a8a9cb3bc3ebf4b5d22d687b26d7cadac0dace6224e44da28f24874"
11
+ "sha256": "74ace06833227d1579e40f92dd5c13c0b804416b06f62354a37e53bff26eb0eb"
12
12
  },
13
13
  {
14
14
  "export": "./state.js",
15
15
  "path": "dist/js/state.js",
16
- "sha256": "adb29ff6ee521414f8975d7b4240f7aeb39dc7c6a59349fc6c95591b5b1f109d"
16
+ "sha256": "2e69188e8ed94a4b3363498effdb9ebad0e78dd75740b323381713608b6fbdd5"
17
17
  }
18
18
  ],
19
19
  "package": {
20
20
  "name": "@wpmoo/ui",
21
- "version": "2.1.1"
21
+ "version": "2.3.0"
22
22
  },
23
23
  "schemaVersion": 1
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpmoo/ui",
3
- "version": "2.1.1",
3
+ "version": "2.3.0",
4
4
  "description": "Bootstrap markup. shadcn feel. A frontend-framework-free component system for server-rendered apps.",
5
5
  "license": "MIT",
6
6
  "author": "WPMoo (https://wpmoo.org)",
@@ -42,6 +42,8 @@
42
42
  "./table-of-contents.js": "./dist/js/table-of-contents.js",
43
43
  "./sheet.js": "./dist/js/sheet.js",
44
44
  "./floating-panel.js": "./dist/js/floating-panel.js",
45
+ "./image-gallery.js": "./dist/js/image-gallery.js",
46
+ "./consent.js": "./dist/js/consent.js",
45
47
  "./chart.js": "./dist/js/chart.js",
46
48
  "./chart.min.js": "./dist/js/chart.min.js",
47
49
  "./datepicker.js": "./dist/js/datepicker.js",
@@ -74,6 +76,8 @@
74
76
  "dist/js/table-of-contents.js",
75
77
  "dist/js/sheet.js",
76
78
  "dist/js/floating-panel.js",
79
+ "dist/js/image-gallery.js",
80
+ "dist/js/consent.js",
77
81
  "dist/js/chart.js",
78
82
  "dist/js/chart.min.js",
79
83
  "dist/js/datepicker.js",
@@ -38,6 +38,7 @@
38
38
  @import "components/toggle_group";
39
39
  @import "components/card";
40
40
  @import "components/empty";
41
+ @import "components/item";
41
42
  @import "components/table";
42
43
  @import "components/dropdown";
43
44
  @import "components/menubar";
@@ -70,3 +71,4 @@
70
71
  @import "components/combobox";
71
72
  @import "components/context-menu";
72
73
  @import "components/datatable";
74
+ @import "components/gallery";
@@ -0,0 +1,73 @@
1
+ .gallery-justified {
2
+ --moo-gallery-row-height: #{$moo-gallery-row-height};
3
+ display: flex;
4
+ flex-wrap: wrap;
5
+
6
+ @include media-breakpoint-up(md) {
7
+ --moo-gallery-row-height: #{$moo-gallery-row-height-md};
8
+ }
9
+
10
+ > * {
11
+ flex: var(--moo-gallery-ratio, 1) 1 calc(var(--moo-gallery-ratio, 1) * var(--moo-gallery-row-height));
12
+ aspect-ratio: var(--moo-gallery-ratio, 1);
13
+ }
14
+
15
+ &::after {
16
+ flex-grow: 1e9;
17
+ content: "";
18
+ }
19
+ }
20
+
21
+ .gallery-stage {
22
+ height: $moo-gallery-stage-height;
23
+ }
24
+
25
+ $moo-gallery-strip-gutter: if($moo-gallery-strip-bleed, $moo-gallery-strip-bleed, $container-padding-x * .5);
26
+
27
+ @mixin moo-gallery-strip {
28
+ --moo-gallery-strip-height: #{$moo-gallery-strip-height};
29
+ flex-wrap: nowrap;
30
+ overflow-x: auto;
31
+ scroll-snap-type: x proximity;
32
+ contain: inline-size;
33
+
34
+ > * {
35
+ flex: none;
36
+ width: calc(var(--moo-gallery-ratio, 1) * var(--moo-gallery-strip-height));
37
+ max-width: 85%;
38
+ height: var(--moo-gallery-strip-height);
39
+ scroll-snap-align: start;
40
+ }
41
+
42
+ &::after {
43
+ content: none;
44
+ }
45
+
46
+ &.gallery-strip-bleed {
47
+ margin-inline: calc(-1 * var(--moo-gallery-strip-bleed, #{$moo-gallery-strip-gutter}));
48
+ padding-inline: var(--moo-gallery-strip-bleed, #{$moo-gallery-strip-gutter});
49
+ scroll-padding-inline: var(--moo-gallery-strip-bleed, #{$moo-gallery-strip-gutter});
50
+ }
51
+ }
52
+
53
+ .gallery-strip {
54
+ display: flex;
55
+ @include moo-gallery-strip;
56
+ }
57
+
58
+ @each $breakpoint in map-keys($grid-breakpoints) {
59
+ @if $breakpoint != "xs" {
60
+ @include media-breakpoint-down($breakpoint) {
61
+ .gallery-strip-#{$breakpoint}-down {
62
+ @include moo-gallery-strip;
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ $moo-gallery-progress-size: if($moo-gallery-progress-height, $moo-gallery-progress-height, $progress-height);
69
+
70
+ .gallery-progress {
71
+ --bs-progress-height: var(--moo-gallery-progress-height, #{$moo-gallery-progress-size});
72
+ opacity: var(--moo-gallery-progress-opacity, #{$moo-gallery-progress-opacity});
73
+ }
@@ -0,0 +1,96 @@
1
+ $item-title-line-height: $line-height-sm;
2
+ $item-description-line-height: $line-height-base;
3
+ $item-content-gap: $spacer * 0.25;
4
+ $item-media-size: ($font-size-sm * $item-title-line-height) + $item-content-gap + ($font-size-sm * $item-description-line-height);
5
+
6
+ /* Item */
7
+ .item {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ align-items: center;
11
+ gap: $spacer;
12
+ min-width: 0;
13
+ padding: ($spacer * 0.75) $spacer;
14
+ color: var(--bs-body-color);
15
+ text-decoration: none;
16
+ border: var(--bs-border-width) solid transparent;
17
+ border-radius: var(--bs-border-radius-lg);
18
+ }
19
+
20
+ .item-outline {
21
+ border-color: var(--bs-border-color);
22
+ }
23
+
24
+ .item-muted {
25
+ background-color: var(--bs-tertiary-bg);
26
+ }
27
+
28
+ .item-sm {
29
+ gap: $spacer * 0.75;
30
+ padding: ($spacer * 0.5) ($spacer * 0.75);
31
+ }
32
+
33
+ a.item:hover {
34
+ color: var(--bs-body-color);
35
+ background-color: var(--bs-tertiary-bg);
36
+ }
37
+
38
+ .item-media {
39
+ display: flex;
40
+ flex-shrink: 0;
41
+ align-items: center;
42
+ justify-content: center;
43
+ align-self: flex-start;
44
+ }
45
+
46
+ .item-media-icon {
47
+ width: $item-media-size;
48
+ height: $item-media-size;
49
+ color: var(--bs-body-color);
50
+ background-color: var(--bs-tertiary-bg);
51
+ border: var(--bs-border-width) solid var(--bs-border-color);
52
+ border-radius: var(--bs-border-radius);
53
+ }
54
+
55
+ .item-media-icon > [data-icon] {
56
+ width: $spacer;
57
+ height: $spacer;
58
+ }
59
+
60
+ .item-content {
61
+ display: flex;
62
+ flex: 1 1 0;
63
+ flex-direction: column;
64
+ gap: $item-content-gap;
65
+ min-width: 0;
66
+ }
67
+
68
+ .item-title {
69
+ margin: 0;
70
+ font-size: $font-size-sm;
71
+ font-weight: $font-weight-medium;
72
+ line-height: $item-title-line-height;
73
+ }
74
+
75
+ .item-description {
76
+ margin: 0;
77
+ font-size: $font-size-sm;
78
+ line-height: $item-description-line-height;
79
+ color: var(--bs-secondary-color);
80
+ }
81
+
82
+ .item-actions {
83
+ display: flex;
84
+ flex-wrap: wrap;
85
+ align-items: center;
86
+ gap: $spacer * 0.5;
87
+ }
88
+
89
+ .item-group {
90
+ display: flex;
91
+ flex-direction: column;
92
+ gap: $spacer * 0.5;
93
+ padding: 0;
94
+ margin: 0;
95
+ list-style: none;
96
+ }
@@ -1,4 +1,5 @@
1
1
  @import "../utilities/scroll_fade_primitives";
2
+ @import "../utilities/motion_primitives";
2
3
  @include moo-overlay-scrollbar-native;
3
4
 
4
5
  @keyframes moo-spinner-rotate {
@@ -5,9 +5,11 @@
5
5
  /* Utilities */
6
6
  @import "../utilities/border";
7
7
  @include moo-text-alignment-utilities;
8
+ @include moo-gallery-utilities;
8
9
  @import "../utilities/scroll_fade";
9
10
  @include moo-overlay-scrollbar;
10
11
  @import "../utilities/scroll_smooth";
12
+ @import "../utilities/motion";
11
13
  /* Application layout */
12
14
  @import "../layouts/app";
13
15
  @import "../layouts/page_grid";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI v2.1.1 (https://wpmoo.org/)
2
+ * Moo UI v2.3.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  *
@@ -8,6 +8,7 @@
8
8
  @import "bootstrap/scss/mixins";
9
9
  @import "bootstrap/scss/utilities";
10
10
  @import "utilities/text_alignment";
11
+ @import "utilities/gallery";
11
12
  @import "utilities/overlay_scrollbar";
12
13
  @import "themes/theme";
13
14
  /* Global styles */
package/scss/moo-ui.scss CHANGED
@@ -9,6 +9,7 @@
9
9
  @import "bootstrap/scss/mixins";
10
10
  @import "bootstrap/scss/utilities";
11
11
  @import "utilities/text_alignment";
12
+ @import "utilities/gallery";
12
13
  @import "utilities/overlay_scrollbar";
13
14
  @import "themes/theme";
14
15
 
@@ -52,6 +53,7 @@
52
53
  @import "bootstrap/scss/utilities/api";
53
54
 
54
55
  @import "utilities/scroll_fade_primitives";
56
+ @import "utilities/motion_primitives";
55
57
  @import "utilities/overlay_scrollbar_native";
56
58
  @import "foundations/backdrop";
57
59
  @import "foundations/scope";
@@ -245,3 +245,11 @@ $moo-toast-stack-enter-y: 150% !default;
245
245
  $moo-toast-stack-transition-duration: .5s !default;
246
246
  $moo-toast-stack-height-transition-duration: .15s !default;
247
247
  $moo-toast-stack-transition-timing-function: cubic-bezier(.22, 1, .36, 1) !default;
248
+
249
+ $moo-gallery-row-height: 6rem !default;
250
+ $moo-gallery-row-height-md: 8rem !default;
251
+ $moo-gallery-stage-height: unquote("min(62svh, 38rem)") !default;
252
+ $moo-gallery-strip-height: 13rem !default;
253
+ $moo-gallery-strip-bleed: null !default;
254
+ $moo-gallery-progress-height: null !default;
255
+ $moo-gallery-progress-opacity: .08 !default;
@@ -0,0 +1,25 @@
1
+ $aspect-ratios: map-merge($aspect-ratios, ("3x2": calc(2 / 3 * 100%)));
2
+ $utilities: map-merge(
3
+ $utilities,
4
+ (
5
+ "column-count": (
6
+ responsive: true,
7
+ property: column-count,
8
+ class: columns,
9
+ values: (1: 1, 2: 2, 3: 3, 4: 4),
10
+ ),
11
+ )
12
+ );
13
+
14
+ @mixin moo-gallery-utilities {
15
+ .ratio-3x2 {
16
+ --#{$prefix}aspect-ratio: #{map-get($aspect-ratios, "3x2")};
17
+ }
18
+
19
+ $utility: map-get($utilities, "column-count");
20
+ @each $breakpoint in map-keys($grid-breakpoints) {
21
+ @include media-breakpoint-up($breakpoint) {
22
+ @include generate-utility($utility, breakpoint-infix($breakpoint, $grid-breakpoints));
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ @media (prefers-reduced-motion: no-preference) {
2
+ .animate-breathe {
3
+ animation: moo-breathe 2s ease-in-out infinite;
4
+ }
5
+ }
@@ -0,0 +1,10 @@
1
+ @keyframes moo-breathe {
2
+ 0%,
3
+ 100% {
4
+ transform: scale(.9);
5
+ }
6
+
7
+ 50% {
8
+ transform: scale(1);
9
+ }
10
+ }