@websolutespa/bom-mixer-ui 1.5.5 → 1.5.7

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.
package/CHANGELOG.md CHANGED
@@ -1,176 +1,193 @@
1
- # @websolutespa/bom-mixer-ui
2
-
3
- ## 1.5.5
4
-
5
- ### Patch Changes
6
-
7
- - Added: ErrorHandler, Reversable
8
- - Modified: pickChild, IFeatureType
9
- - Updated dependencies
10
- - @websolutespa/bom-mixer-models@1.5.4
11
- - @websolutespa/bom-mixer-hooks@1.4.2
12
- - @websolutespa/bom-mixer-store@1.4.3
13
- - @websolutespa/bom-core@0.6.5
14
-
15
- ## 1.5.4
16
-
17
- ### Patch Changes
18
-
19
- - Modified: Meta
20
- - Updated dependencies
21
- - @websolutespa/bom-mixer-models@1.5.4
22
- - @websolutespa/bom-mixer-store@1.4.3
23
-
24
- ## 1.5.3
25
-
26
- ### Patch Changes
27
-
28
- - Modified: Pagination
29
-
30
- ## 1.5.2
31
-
32
- ### Patch Changes
33
-
34
- - Modified: AccordionGroup, Media, Meta, Pagination, PopoverCollections, Popover, Tabs, utils
35
- - Updated dependencies
36
- - @websolutespa/bom-mixer-models@1.5.2
37
- - @websolutespa/bom-mixer-hooks@1.4.1
38
- - @websolutespa/bom-core@0.6.2
39
-
40
- ## 1.5.1
41
-
42
- ### Patch Changes
43
-
44
- - Added: default href to Link
45
-
46
- ## 1.5.0
47
-
48
- ### Minor Changes
49
-
50
- - Modified LazyLoader
51
-
52
- ## 1.4.0
53
-
54
- ### Minor Changes
55
-
56
- - Added: Main
57
- - Modified: Pagination
58
-
59
- ## 1.3.0
60
-
61
- ### Minor Changes
62
-
63
- - Added: accessibility
64
- - Modified: IThemeForm, form fields, LazyComponents, Media
65
-
66
- ## 1.2.2
67
-
68
- ### Patch Changes
69
-
70
- - Modified: MediaImage
71
-
72
- ## 1.2.1
73
-
74
- ### Patch Changes
75
-
76
- - Added: LayoutDefault
77
- - Modified: GlobalStyle, toKebabCase
78
-
79
- ## 1.2.0
80
-
81
- ### Minor Changes
82
-
83
- - Fixing: circular references
84
- - Added: Link wrapper for next/link
85
- - Updating: next 13
86
-
87
- ## 1.1.0
88
-
89
- ### Minor Changes
90
-
91
- - Modified: useApi
92
-
93
- ## 1.0.1
94
-
95
- ### Patch Changes
96
-
97
- - Fixing: types
98
-
99
- ## 1.0.0
100
-
101
- ### Minor Changes
102
-
103
- - Added: useFormTester
104
-
105
- ## 0.5.1
106
-
107
- ### Patch Changes
108
-
109
- - Fixing: useVariant
110
-
111
- ## 0.5.0
112
-
113
- ### Minor Changes
114
-
115
- - Modified: ui variants Forms, theme.json
116
-
117
- ## 0.4.3
118
-
119
- ### Patch Changes
120
-
121
- - Modified: Text added getFontVariantResponsive
122
-
123
- ## 0.4.2
124
-
125
- ### Patch Changes
126
-
127
- - Modified: ui variants Grid, Container, Text
128
-
129
- ## 0.4.1
130
-
131
- ### Patch Changes
132
-
133
- - Added: source files
134
-
135
- ## 0.4.0
136
-
137
- ### Minor Changes
138
-
139
- - Added: splat routes
140
- - Added: variants
141
-
142
- ## 0.3.0
143
-
144
- ### Minor Changes
145
-
146
- - Added: @websolutespa/bom-core
147
-
148
- ## 0.2.0
149
-
150
- ### Minor Changes
151
-
152
- - Modified: ITheme, LazyLoader
153
-
154
- ## 0.1.0
155
-
156
- ### Minor Changes
157
-
158
- - mock refactor
159
-
160
- ## 0.0.3
161
-
162
- ### Patch Changes
163
-
164
- - Modified: assets
165
-
166
- ## 0.0.2
167
-
168
- ### Patch Changes
169
-
170
- - Modified: assets
171
-
172
- ## 0.0.1
173
-
174
- ### Patch Changes
175
-
176
- - Added: first release
1
+ # @websolutespa/bom-mixer-ui
2
+
3
+ ## 1.5.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: Media added muted video caption support
8
+ - Updated dependencies
9
+ - @websolutespa/bom-mixer-models@1.5.10
10
+
11
+ ## 1.5.6
12
+
13
+ ### Patch Changes
14
+
15
+ - Modified: PaginationItem, Text
16
+ - Fixing: MediaItem
17
+ - Updated dependencies
18
+ - @websolutespa/bom-mixer-models@1.5.9
19
+
20
+ ## 1.5.5
21
+
22
+ ### Patch Changes
23
+
24
+ - Added: ErrorHandler, Reversable
25
+ - Modified: pickChild, IFeatureType
26
+ - Updated dependencies
27
+ - @websolutespa/bom-mixer-models@1.5.4
28
+ - @websolutespa/bom-mixer-hooks@1.4.2
29
+ - @websolutespa/bom-mixer-store@1.4.3
30
+ - @websolutespa/bom-core@0.6.5
31
+
32
+ ## 1.5.4
33
+
34
+ ### Patch Changes
35
+
36
+ - Modified: Meta
37
+ - Updated dependencies
38
+ - @websolutespa/bom-mixer-models@1.5.4
39
+ - @websolutespa/bom-mixer-store@1.4.3
40
+
41
+ ## 1.5.3
42
+
43
+ ### Patch Changes
44
+
45
+ - Modified: Pagination
46
+
47
+ ## 1.5.2
48
+
49
+ ### Patch Changes
50
+
51
+ - Modified: AccordionGroup, Media, Meta, Pagination, PopoverCollections, Popover, Tabs, utils
52
+ - Updated dependencies
53
+ - @websolutespa/bom-mixer-models@1.5.2
54
+ - @websolutespa/bom-mixer-hooks@1.4.1
55
+ - @websolutespa/bom-core@0.6.2
56
+
57
+ ## 1.5.1
58
+
59
+ ### Patch Changes
60
+
61
+ - Added: default href to Link
62
+
63
+ ## 1.5.0
64
+
65
+ ### Minor Changes
66
+
67
+ - Modified LazyLoader
68
+
69
+ ## 1.4.0
70
+
71
+ ### Minor Changes
72
+
73
+ - Added: Main
74
+ - Modified: Pagination
75
+
76
+ ## 1.3.0
77
+
78
+ ### Minor Changes
79
+
80
+ - Added: accessibility
81
+ - Modified: IThemeForm, form fields, LazyComponents, Media
82
+
83
+ ## 1.2.2
84
+
85
+ ### Patch Changes
86
+
87
+ - Modified: MediaImage
88
+
89
+ ## 1.2.1
90
+
91
+ ### Patch Changes
92
+
93
+ - Added: LayoutDefault
94
+ - Modified: GlobalStyle, toKebabCase
95
+
96
+ ## 1.2.0
97
+
98
+ ### Minor Changes
99
+
100
+ - Fixing: circular references
101
+ - Added: Link wrapper for next/link
102
+ - Updating: next 13
103
+
104
+ ## 1.1.0
105
+
106
+ ### Minor Changes
107
+
108
+ - Modified: useApi
109
+
110
+ ## 1.0.1
111
+
112
+ ### Patch Changes
113
+
114
+ - Fixing: types
115
+
116
+ ## 1.0.0
117
+
118
+ ### Minor Changes
119
+
120
+ - Added: useFormTester
121
+
122
+ ## 0.5.1
123
+
124
+ ### Patch Changes
125
+
126
+ - Fixing: useVariant
127
+
128
+ ## 0.5.0
129
+
130
+ ### Minor Changes
131
+
132
+ - Modified: ui variants Forms, theme.json
133
+
134
+ ## 0.4.3
135
+
136
+ ### Patch Changes
137
+
138
+ - Modified: Text added getFontVariantResponsive
139
+
140
+ ## 0.4.2
141
+
142
+ ### Patch Changes
143
+
144
+ - Modified: ui variants Grid, Container, Text
145
+
146
+ ## 0.4.1
147
+
148
+ ### Patch Changes
149
+
150
+ - Added: source files
151
+
152
+ ## 0.4.0
153
+
154
+ ### Minor Changes
155
+
156
+ - Added: splat routes
157
+ - Added: variants
158
+
159
+ ## 0.3.0
160
+
161
+ ### Minor Changes
162
+
163
+ - Added: @websolutespa/bom-core
164
+
165
+ ## 0.2.0
166
+
167
+ ### Minor Changes
168
+
169
+ - Modified: ITheme, LazyLoader
170
+
171
+ ## 0.1.0
172
+
173
+ ### Minor Changes
174
+
175
+ - mock refactor
176
+
177
+ ## 0.0.3
178
+
179
+ ### Patch Changes
180
+
181
+ - Modified: assets
182
+
183
+ ## 0.0.2
184
+
185
+ ### Patch Changes
186
+
187
+ - Modified: assets
188
+
189
+ ## 0.0.1
190
+
191
+ ### Patch Changes
192
+
193
+ - Added: first release
package/dist/cjs/index.js CHANGED
@@ -3910,27 +3910,27 @@ function hasBackground(props) {
3910
3910
  return hasChildOfType(props.children, Background);
3911
3911
  }
3912
3912
 
3913
- const CssH = styled.css`
3913
+ styled.css`
3914
3914
  h1, h2, h3, h4, h5, h6 {
3915
- color: var(--color-neutral-500);
3915
+ // color: var(--color-neutral-500);
3916
3916
  margin-bottom: 3rem;
3917
3917
  }
3918
3918
  h4 {
3919
3919
  font-size: 1.2em;
3920
3920
  }
3921
3921
  `;
3922
- const CssA = styled.css`
3922
+ styled.css`
3923
3923
  a[href] {
3924
3924
  ${CssDefault}
3925
3925
  ${CssButtonNavInverted}
3926
3926
  }
3927
3927
  `;
3928
- const CssP = styled.css`
3928
+ styled.css`
3929
3929
  p:not(:last-child) {
3930
3930
  margin-bottom: 1.25em;
3931
3931
  }
3932
3932
  `;
3933
- const CssUl = styled.css`
3933
+ styled.css`
3934
3934
  ul {
3935
3935
  list-style: initial;
3936
3936
  margin: 0 0 2em 1.1em;
@@ -3953,12 +3953,14 @@ const StyledText$1 = styled__default.default.div`
3953
3953
  -webkit-background-clip: text;
3954
3954
  -webkit-text-fill-color: transparent;
3955
3955
  ` : ''}
3956
- ${CssH}
3957
- ${CssA}
3958
- ${CssP}
3959
- ${CssUl}
3960
3956
  ${props => getCssResponsive(props)}
3961
3957
  `;
3958
+ /*
3959
+ ${CssH}
3960
+ ${CssA}
3961
+ ${CssP}
3962
+ ${CssUl}
3963
+ */
3962
3964
  const TextBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
3963
3965
  var {
3964
3966
  children,
@@ -4502,6 +4504,9 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
4502
4504
  as = 'div'
4503
4505
  } = _a,
4504
4506
  props = __rest(_a, ["children", "item", "onClick", "className", "eager", "alt", "title", "as"]);
4507
+ const {
4508
+ locale
4509
+ } = bomMixerHooks.useLayout();
4505
4510
  const {
4506
4511
  id,
4507
4512
  open
@@ -4514,6 +4519,7 @@ const MediaBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
4514
4519
  galleryId: id,
4515
4520
  alt,
4516
4521
  title,
4522
+ locale,
4517
4523
  open
4518
4524
  }) : children;
4519
4525
  return jsxRuntime.jsx(StyledMedia$1, Object.assign({
@@ -4528,6 +4534,18 @@ MediaBase.displayName = 'Media';
4528
4534
  const Media = bomCore.withSchema(MediaBase, {
4529
4535
  Info: MediaInfo
4530
4536
  });
4537
+ const StyledVideo = styled__default.default('video')`
4538
+ &.video {
4539
+ &--muted {
4540
+ &::cue {
4541
+ background-color: transparent;
4542
+ background-image: none;
4543
+ color: transparent;
4544
+ font-size: 0;
4545
+ }
4546
+ }
4547
+ }
4548
+ `;
4531
4549
  function getMediaItems(itemOrItems, options) {
4532
4550
  if (options === void 0) {
4533
4551
  options = {};
@@ -4537,10 +4555,29 @@ function getMediaItems(itemOrItems, options) {
4537
4555
  if (typeof x['media'] === 'object') {
4538
4556
  x = x['media'];
4539
4557
  }
4540
- if (typeof x.url === 'string') {
4541
- x.src = x.url;
4558
+ const mediaItem = {
4559
+ type: x.type,
4560
+ src: typeof x.url === 'string' ? x.url : x.src
4561
+ };
4562
+ if (x.abstract) {
4563
+ mediaItem.abstract = x.abstract;
4542
4564
  }
4543
- return x;
4565
+ if (x.alt) {
4566
+ mediaItem.alt = x.alt;
4567
+ }
4568
+ if (x.height) {
4569
+ mediaItem.height = x.height;
4570
+ }
4571
+ if (x.mimeType) {
4572
+ mediaItem.mimeType = x.mimeType;
4573
+ }
4574
+ if (x.title) {
4575
+ mediaItem.title = x.title;
4576
+ }
4577
+ if (x.width) {
4578
+ mediaItem.width = x.width;
4579
+ }
4580
+ return mediaItem;
4544
4581
  });
4545
4582
  const hasGallery = options.galleryId != null && typeof options.open === 'function';
4546
4583
  const getMediaItemProps = media => {
@@ -4573,16 +4610,22 @@ function getMediaItems(itemOrItems, options) {
4573
4610
  }
4574
4611
  return props;
4575
4612
  };
4576
- return items.map((media, m) => bomCore.resolveMediaType(media) === 'video' ? jsxRuntime.jsx("video", Object.assign({
4613
+ return items.map((media, m) => bomCore.resolveMediaType(media) === 'video' ? jsxRuntime.jsxs(StyledVideo, Object.assign({
4614
+ className: "video video--muted",
4577
4615
  playsInline: true,
4578
4616
  autoPlay: true,
4579
4617
  muted: true,
4580
4618
  loop: true
4581
4619
  }, getMediaItemProps(media), {
4582
- children: jsxRuntime.jsx("source", {
4620
+ children: [jsxRuntime.jsx("source", {
4583
4621
  src: media.src,
4584
4622
  type: "video/mp4"
4585
- })
4623
+ }), options.locale && jsxRuntime.jsx("track", {
4624
+ src: `/captions.vtt?locale=${options.locale}&title=${media.title}`,
4625
+ kind: "captions",
4626
+ srcLang: options.locale,
4627
+ label: "Video Captions"
4628
+ })]
4586
4629
  }), m) : jsxRuntime.jsx(MediaImage, Object.assign({}, media, {
4587
4630
  draggable: false
4588
4631
  }, getMediaItemProps(media)), m));
@@ -5545,7 +5588,7 @@ const StyledPaginationItem$1 = styled__default.default.li`
5545
5588
  outline: none;
5546
5589
  border: none;
5547
5590
  cursor: pointer;
5548
- color: var(--color-primary-500);
5591
+ color: var(--color-primary-600);
5549
5592
  border-radius: var(--border-radius);
5550
5593
  background-color: var(--color-neutral-100);
5551
5594
  transition: all linear 200ms 0ms;
@@ -5561,7 +5604,7 @@ const StyledPaginationItem$1 = styled__default.default.li`
5561
5604
 
5562
5605
  &.active {
5563
5606
  font-weight: 700;
5564
- background-color: var(--color-primary-500);
5607
+ background-color: var(--color-primary-600);
5565
5608
  color: var(--color-neutral-100);
5566
5609
  box-shadow: var(--shadow-xs);
5567
5610
  }
@@ -7757,7 +7800,7 @@ const StyledCustomSelect = styled__default.default.div`
7757
7800
 
7758
7801
  .placeholder {
7759
7802
  color: inherit;
7760
- opacity: 0.3;
7803
+ opacity: 0.5;
7761
7804
  }
7762
7805
 
7763
7806
  .value {