@appquality/unguess-design-system 2.12.64 → 2.12.66

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,3 +1,29 @@
1
+ # v2.12.66 (Mon Jan 30 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Fix dropdowns [#197](https://github.com/AppQuality/unguess-design-system/pull/197) ([@d-beezee](https://github.com/d-beezee) [@marcbon](https://github.com/marcbon))
6
+ - Fix dropdowns 2 [#196](https://github.com/AppQuality/unguess-design-system/pull/196) ([@d-beezee](https://github.com/d-beezee))
7
+
8
+ #### Authors: 2
9
+
10
+ - [@d-beezee](https://github.com/d-beezee)
11
+ - Marco Bonomo ([@marcbon](https://github.com/marcbon))
12
+
13
+ ---
14
+
15
+ # v2.12.65 (Mon Jan 30 2023)
16
+
17
+ #### 🐛 Bug Fix
18
+
19
+ - Player fixes [#194](https://github.com/AppQuality/unguess-design-system/pull/194) ([@cannarocks](https://github.com/cannarocks))
20
+
21
+ #### Authors: 1
22
+
23
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
24
+
25
+ ---
26
+
1
27
  # v2.12.64 (Mon Jan 30 2023)
2
28
 
3
29
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -25,12 +25,12 @@ var sunburst = require('@nivo/sunburst');
25
25
  var waffle = require('@nivo/waffle');
26
26
  var reactModals = require('@zendeskgarden/react-modals');
27
27
  var reactDropdowns = require('@zendeskgarden/react-dropdowns');
28
+ var reactForms = require('@zendeskgarden/react-forms');
28
29
  var react = require('@tiptap/react');
29
30
  var Typography = require('@tiptap/extension-typography');
30
31
  var StarterKit = require('@tiptap/starter-kit');
31
32
  var Placeholder = require('@tiptap/extension-placeholder');
32
33
  var CharacterCount = require('@tiptap/extension-character-count');
33
- var reactForms = require('@zendeskgarden/react-forms');
34
34
  var reactGrid = require('@zendeskgarden/react-grid');
35
35
  var reactChrome = require('@zendeskgarden/react-chrome');
36
36
  var formik = require('formik');
@@ -991,14 +991,14 @@ const StyledTagNew$1 = styled__default["default"](Tag) `
991
991
  ${({ theme }) => theme.space.base * 2}px;
992
992
  color: ${({ theme }) => theme.palette.white};
993
993
  `;
994
- const StyledLabel$2 = styled__default["default"](SM) `
994
+ const StyledLabel$3 = styled__default["default"](SM) `
995
995
  color: ${({ theme }) => theme.palette.grey["500"]};
996
996
  `;
997
997
  const CampaignCard = (_a) => {
998
998
  var { isNew, date, projectTitle, campaignTitle, status, type, labelNew } = _a, props = __rest(_a, ["isNew", "date", "projectTitle", "campaignTitle", "status", "type", "labelNew"]);
999
999
  const StatusIcon = getStatusIcon(status !== null && status !== void 0 ? status : "PROGRESS");
1000
1000
  const PillIcon = getTypeDataIcon(type);
1001
- return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$2, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$3, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, Object.assign({ style: { maxWidth: "180px" } }, { children: props.pillText }))] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
1001
+ return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$3, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$3, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, Object.assign({ style: { maxWidth: "180px" } }, { children: props.pillText }))] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
1002
1002
  };
1003
1003
 
1004
1004
  const StyledTagNew = styled__default["default"](Tag) `
@@ -1831,20 +1831,73 @@ const ItemContent = (props) => {
1831
1831
  return (jsxRuntime.jsxs(Container$1, { children: [thumbSrc && (jsxRuntime.jsx(ThumbContainer, { children: jsxRuntime.jsx(Image$1, { src: thumbSrc }) })), jsxRuntime.jsxs(MetaContainer$1, { children: [label && jsxRuntime.jsx(Label$1, Object.assign({ isBold: true }, { children: label })), description && jsxRuntime.jsx(Description$1, { children: description })] })] }));
1832
1832
  };
1833
1833
 
1834
+ const StyledMenu = styled__default["default"](reactDropdowns.Menu) `
1835
+ width: auto !important;
1836
+ `;
1834
1837
  /**
1835
- * A Menu is a wrapper for items elements
1836
- **/
1837
- const Menu = (props) => jsxRuntime.jsx(reactDropdowns.Menu, Object.assign({}, props));
1838
+ * A Menu is a wrapper for items elements
1839
+ **/
1840
+ const Menu = (props) => jsxRuntime.jsx(StyledMenu, Object.assign({}, props));
1838
1841
  // Extras
1839
- const PreviousItem = (props) => jsxRuntime.jsx(reactDropdowns.PreviousItem, Object.assign({}, props));
1840
- const Separator = (props) => jsxRuntime.jsx(reactDropdowns.Separator, Object.assign({}, props));
1842
+ const PreviousItem = (props) => (jsxRuntime.jsx(reactDropdowns.PreviousItem, Object.assign({}, props)));
1843
+ const Separator = (props) => (jsxRuntime.jsx(reactDropdowns.Separator, Object.assign({}, props)));
1841
1844
  const NextItem = (props) => jsxRuntime.jsx(reactDropdowns.NextItem, Object.assign({}, props));
1842
- const ItemMeta = (props) => jsxRuntime.jsx(reactDropdowns.ItemMeta, Object.assign({}, props));
1843
- const MediaBody = (props) => jsxRuntime.jsx(reactDropdowns.MediaBody, Object.assign({}, props));
1844
- const MediaFigure = (props) => jsxRuntime.jsx(reactDropdowns.MediaFigure, Object.assign({}, props));
1845
- const MediaItem = (props) => jsxRuntime.jsx(reactDropdowns.MediaItem, Object.assign({}, props));
1845
+ const ItemMeta = (props) => (jsxRuntime.jsx(reactDropdowns.ItemMeta, Object.assign({}, props)));
1846
+ const MediaBody = (props) => (jsxRuntime.jsx(reactDropdowns.MediaBody, Object.assign({}, props)));
1847
+ const MediaFigure = (props) => (jsxRuntime.jsx(reactDropdowns.MediaFigure, Object.assign({}, props)));
1848
+ const MediaItem = (props) => (jsxRuntime.jsx(reactDropdowns.MediaItem, Object.assign({}, props)));
1849
+
1850
+ const StyledAutocomplete$1 = styled__default["default"](reactDropdowns.Autocomplete) `
1851
+ width: 100%;
1852
+ `;
1853
+ /**
1854
+ * Autocomplete is an input field that filters results as users type. This helps users find something quickly in a large list of options.
1855
+ * <hr>
1856
+ * Used for this:
1857
+ - To filter down a large list of options
1858
+ - To quickly find a known option
1859
+ * Not for this:
1860
+ - To make more than one selection, use Multiselect instead
1861
+ */
1862
+ const Autocomplete = (props) => (jsxRuntime.jsx(StyledAutocomplete$1, Object.assign({}, props)));
1863
+
1864
+ const StyledLabel$2 = styled__default["default"](reactForms.Label) ``;
1865
+ /**
1866
+ * A Label is used to specify a title for an input.
1867
+ * <hr>
1868
+ **/
1869
+ const Label = (props) => jsxRuntime.jsx(StyledLabel$2, Object.assign({}, props));
1870
+
1871
+ const UgSelect = styled__default["default"](reactDropdowns.Select) `
1872
+ ${(props) => props.isPrimary &&
1873
+ `
1874
+ background-color: ${props.theme.palette.blue[600]};
1875
+ color: white;
1876
+ & svg[data-garden-id="forms.media_figure"] {
1877
+ color: white;
1878
+ }
1879
+ `}
1880
+ `;
1881
+ /**
1882
+ * Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
1883
+ * <hr>
1884
+ * Used for this:
1885
+ - To make a selection from a list of options
1886
+ * Not for this:
1887
+ - To filter a large list of options, use Autocomplete instead
1888
+ - To make multiple selections from a list, use Multiselect instead
1889
+ - To select from a list on mobile, use a native Select instead
1890
+ */
1891
+ const Select = (props) => jsxRuntime.jsx(UgSelect, Object.assign({}, props));
1892
+ const StyledDropdown = styled__default["default"].div `
1893
+ ${StyledLabel$2} {
1894
+ display: block;
1895
+ }
1896
+ `;
1897
+ const Dropdown = (props) => (jsxRuntime.jsx(StyledDropdown, { children: jsxRuntime.jsx(reactDropdowns.Dropdown, Object.assign({}, props)) }));
1898
+ const Message = (props) => jsxRuntime.jsx(reactDropdowns.Message, Object.assign({}, props));
1846
1899
 
1847
- const StyledAutocomplete = styled__default["default"](reactDropdowns.Autocomplete) `
1900
+ const StyledAutocomplete = styled__default["default"](Autocomplete) `
1848
1901
  ${(props) => props.hasSelectedItems &&
1849
1902
  `
1850
1903
  border-color: ${props.theme.colors.primaryHue};
@@ -1870,7 +1923,7 @@ const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
1870
1923
  setSelectedItems(options.filter((o) => o.selected));
1871
1924
  }, [options]);
1872
1925
  const hasSelectedItems = selectedItems.length > 0;
1873
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(reactDropdowns.Dropdown, Object.assign({ inputValue: inputValue, selectedItems: selectedItems, onSelect: (items) => {
1926
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Dropdown, Object.assign({ inputValue: inputValue, selectedItems: selectedItems, onSelect: (items) => {
1874
1927
  if (items) {
1875
1928
  setSelectedItems(items);
1876
1929
  if (onChange)
@@ -1878,48 +1931,13 @@ const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
1878
1931
  }
1879
1932
  }, downshiftProps: {
1880
1933
  itemToString: (item) => item && item.id,
1881
- }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(reactDropdowns.Field, { children: [label && jsxRuntime.jsx(reactDropdowns.Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ isCompact: isCompact, hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
1934
+ }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(Field$1, { children: [label && jsxRuntime.jsx(Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ isCompact: isCompact, hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
1882
1935
  ? (i18n === null || i18n === void 0 ? void 0 : i18n.counterText)
1883
1936
  ? i18n.counterText(selectedItems.length)
1884
1937
  : `Items (${selectedItems.length})`
1885
- : (_a = i18n === null || i18n === void 0 ? void 0 : i18n.noItems) !== null && _a !== void 0 ? _a : "No items" }))] }), jsxRuntime.jsx(reactDropdowns.Menu, Object.assign({ isCompact: isCompact }, { children: matchingOptions.length === 0 ? (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ disabled: true }, { children: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.noMatches) !== null && _b !== void 0 ? _b : "No matches found" }))) : (matchingOptions.map((option) => (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ value: option }, { children: jsxRuntime.jsx("span", { children: option.label }) }), option.id)))) }))] })) }));
1938
+ : (_a = i18n === null || i18n === void 0 ? void 0 : i18n.noItems) !== null && _a !== void 0 ? _a : "No items" }))] }), jsxRuntime.jsx(Menu, Object.assign({ isCompact: isCompact }, { children: matchingOptions.length === 0 ? (jsxRuntime.jsx(Item$1, Object.assign({ disabled: true }, { children: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.noMatches) !== null && _b !== void 0 ? _b : "No matches found" }))) : (matchingOptions.map((option) => (jsxRuntime.jsx(Item$1, Object.assign({ value: option }, { children: jsxRuntime.jsx("span", { children: option.label }) }), option.id)))) }))] })) }));
1886
1939
  };
1887
1940
 
1888
- const UgSelect = styled__default["default"](reactDropdowns.Select) `
1889
- ${(props) => props.isPrimary &&
1890
- `
1891
- background-color: ${props.theme.palette.blue[600]};
1892
- color: white;
1893
- & svg[data-garden-id="forms.media_figure"] {
1894
- color: white;
1895
- }
1896
- `}
1897
- `;
1898
- /**
1899
- * Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
1900
- * <hr>
1901
- * Used for this:
1902
- - To make a selection from a list of options
1903
- * Not for this:
1904
- - To filter a large list of options, use Autocomplete instead
1905
- - To make multiple selections from a list, use Multiselect instead
1906
- - To select from a list on mobile, use a native Select instead
1907
- */
1908
- const Select = (props) => jsxRuntime.jsx(UgSelect, Object.assign({}, props));
1909
- const Dropdown = (props) => (jsxRuntime.jsx(reactDropdowns.Dropdown, Object.assign({}, props)));
1910
- const Message = (props) => jsxRuntime.jsx(reactDropdowns.Message, Object.assign({}, props));
1911
-
1912
- /**
1913
- * Autocomplete is an input field that filters results as users type. This helps users find something quickly in a large list of options.
1914
- * <hr>
1915
- * Used for this:
1916
- - To filter down a large list of options
1917
- - To quickly find a known option
1918
- * Not for this:
1919
- - To make more than one selection, use Multiselect instead
1920
- */
1921
- const Autocomplete = (props) => jsxRuntime.jsx(reactDropdowns.Autocomplete, Object.assign({}, props));
1922
-
1923
1941
  const MenuHeaderItem = (props) => (jsxRuntime.jsx(reactDropdowns.HeaderItem, Object.assign({}, props)));
1924
1942
 
1925
1943
  const editorStyle = styled.css `
@@ -2498,13 +2516,6 @@ const UgCheckbox = styled__default["default"](reactForms.Checkbox) ``;
2498
2516
  **/
2499
2517
  const Checkbox = (props) => jsxRuntime.jsx(UgCheckbox, Object.assign({}, props));
2500
2518
 
2501
- const UgLabel$1 = styled__default["default"](reactForms.Label) ``;
2502
- /**
2503
- * A Label is used to specify a title for an input.
2504
- * <hr>
2505
- **/
2506
- const Label = (props) => jsxRuntime.jsx(UgLabel$1, Object.assign({}, props));
2507
-
2508
2519
  const StyledLabel$1 = styled__default["default"](Label) `
2509
2520
  margin: ${({ theme }) => theme.space.base}px auto;
2510
2521
  `;
@@ -3622,7 +3633,7 @@ const Item = ({ option, checked, }) => {
3622
3633
  return (jsxRuntime.jsx(CustomItem, Object.assign({ value: option, checked: checked }, { children: jsxRuntime.jsx("span", { children: option.label }) }), `${option.label}-${option.id}`));
3623
3634
  };
3624
3635
 
3625
- const DisabledItem = ({ label }) => (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ disabled: true }, { children: label })));
3636
+ const DisabledItem = ({ label }) => (jsxRuntime.jsx(Item$1, Object.assign({ disabled: true }, { children: label })));
3626
3637
  const MultiSelect = ({ options, onChange, creatable, i18n, maxItems, size, menuHeight, }) => {
3627
3638
  var _a, _b, _c;
3628
3639
  const [inputValue, setInputValue] = React.useState("");
@@ -3635,9 +3646,9 @@ const MultiSelect = ({ options, onChange, creatable, i18n, maxItems, size, menuH
3635
3646
  .indexOf(inputValue.trim().toLowerCase()) !== -1);
3636
3647
  setMatchingOptions(matchedOptions);
3637
3648
  }, [inputValue, options]);
3638
- return (jsxRuntime.jsxs(reactDropdowns.Dropdown, Object.assign({ inputValue: inputValue, selectedItems: options.filter((option) => option.selected), onSelect: (items) => onChange &&
3639
- onChange(options.map((o) => (Object.assign(Object.assign({}, o), { selected: items.some((i) => i.id === o.id) })))), downshiftProps: { itemToString }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(reactDropdowns.Field, { children: [jsxRuntime.jsx(reactDropdowns.Label, Object.assign({ hidden: true }, { children: (_a = i18n === null || i18n === void 0 ? void 0 : i18n.label) !== null && _a !== void 0 ? _a : "Multiselect" })), jsxRuntime.jsx(reactDropdowns.Multiselect, { placeholder: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.placeholder) !== null && _b !== void 0 ? _b : "Select Items", isCompact: size !== "medium", maxItems: maxItems, renderItem: ({ value }) => (jsxRuntime.jsxs(reactTags.Tag, Object.assign({ isPill: true }, { children: [jsxRuntime.jsx("span", { children: value.label }), jsxRuntime.jsx(reactTags.Tag.Close, { onClick: () => onChange &&
3640
- onChange(options.map((o) => (Object.assign(Object.assign({}, o), { selected: o.selected && o.id !== value.id })))) })] }))) })] }), jsxRuntime.jsxs(reactDropdowns.Menu, { children: [jsxRuntime.jsxs("div", Object.assign({ style: { maxHeight: menuHeight !== null && menuHeight !== void 0 ? menuHeight : "200px" } }, { children: [matchingOptions.map((option) => {
3649
+ return (jsxRuntime.jsxs(Dropdown, Object.assign({ inputValue: inputValue, selectedItems: options.filter((option) => option.selected), onSelect: (items) => onChange &&
3650
+ onChange(options.map((o) => (Object.assign(Object.assign({}, o), { selected: items.some((i) => i.id === o.id) })))), downshiftProps: { itemToString }, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(Field$1, { children: [jsxRuntime.jsx(Label, Object.assign({ hidden: true }, { children: (_a = i18n === null || i18n === void 0 ? void 0 : i18n.label) !== null && _a !== void 0 ? _a : "Multiselect" })), jsxRuntime.jsx(reactDropdowns.Multiselect, { placeholder: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.placeholder) !== null && _b !== void 0 ? _b : "Select Items", isCompact: size !== "medium", maxItems: maxItems, renderItem: ({ value }) => (jsxRuntime.jsxs(reactTags.Tag, Object.assign({ isPill: true }, { children: [jsxRuntime.jsx("span", { children: value.label }), jsxRuntime.jsx(reactTags.Tag.Close, { onClick: () => onChange &&
3651
+ onChange(options.map((o) => (Object.assign(Object.assign({}, o), { selected: o.selected && o.id !== value.id })))) })] }))) })] }), jsxRuntime.jsxs(Menu, { children: [jsxRuntime.jsxs("div", Object.assign({ style: { maxHeight: menuHeight !== null && menuHeight !== void 0 ? menuHeight : "200px" } }, { children: [matchingOptions.map((option) => {
3641
3652
  const items = options
3642
3653
  .filter((o) => o.selected)
3643
3654
  .map((item) => itemToString(item));
@@ -4079,9 +4090,7 @@ const StyledDiv$2 = styled__default["default"].div `
4079
4090
  color: ${({ theme }) => theme.palette.grey[300]};
4080
4091
  }
4081
4092
  `;
4082
- const TimeLabel = ({ current, duration, }) => {
4083
- return (jsxRuntime.jsx(StyledDiv$2, { children: jsxRuntime.jsxs(SM, Object.assign({ tag: "span" }, { children: [current, "/", duration] })) }));
4084
- };
4093
+ const TimeLabel = ({ current, duration, }) => (jsxRuntime.jsx(StyledDiv$2, { children: jsxRuntime.jsxs(SM, Object.assign({ tag: "span" }, { children: [current, "/", duration] })) }));
4085
4094
 
4086
4095
  var _path$8, _path2$1;
4087
4096
  function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
@@ -4124,24 +4133,25 @@ var SvgVolumeUnmutedFill = function SvgVolumeUnmutedFill(props) {
4124
4133
 
4125
4134
  const AudioButton = (props) => {
4126
4135
  const [isMuted, setIsMuted] = React.useState(false);
4136
+ const { videoRef } = props;
4127
4137
  const hasAudio = (video) => {
4128
4138
  if (!video) {
4129
4139
  return false;
4130
4140
  }
4131
- const _hasAudio = video.mozHasAudio ||
4141
+ const videohasAudio = video.mozHasAudio ||
4132
4142
  Boolean(video.webkitAudioDecodedByteCount) ||
4133
4143
  Boolean(video.audioTracks && video.audioTracks.length);
4134
- return _hasAudio;
4144
+ return videohasAudio;
4135
4145
  };
4136
4146
  React.useEffect(() => {
4137
- if (props.videoRef) {
4138
- setIsMuted(!hasAudio(props.videoRef) || props.videoRef.muted);
4147
+ if (videoRef) {
4148
+ setIsMuted(!hasAudio(videoRef) || videoRef.muted);
4139
4149
  }
4140
- }, [props.videoRef]);
4141
- return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, disabled: !props.videoRef || !hasAudio(props.videoRef), onClick: (e) => {
4142
- if (props.videoRef) {
4143
- props.videoRef.muted = !props.videoRef.muted;
4144
- setIsMuted(props.videoRef.muted);
4150
+ }, [videoRef]);
4151
+ return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, disabled: !videoRef || !hasAudio(videoRef), onClick: (e) => {
4152
+ if (videoRef) {
4153
+ videoRef.muted = !videoRef.muted;
4154
+ setIsMuted(videoRef.muted);
4145
4155
  }
4146
4156
  e.stopPropagation();
4147
4157
  } }, { children: isMuted ? jsxRuntime.jsx(SvgVolumeMutedFill, {}) : jsxRuntime.jsx(SvgVolumeUnmutedFill, {}) })));
@@ -4166,34 +4176,35 @@ const FullScreenButton = (props) => {
4166
4176
  const { videoRef } = props;
4167
4177
  const { requestFullscreen, webkitRequestFullscreen, mozRequestFullScreen, webkitEnterFullscreen, msRequestFullscreen, } = videoRef || {};
4168
4178
  const handleFullScreen = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
4169
- if (props.videoRef) {
4170
- if (props.videoRef.requestFullscreen) {
4171
- yield props.videoRef.requestFullscreen();
4179
+ if (videoRef) {
4180
+ if (videoRef.requestFullscreen) {
4181
+ yield videoRef.requestFullscreen();
4172
4182
  }
4173
- else if (props.videoRef.webkitRequestFullscreen) {
4174
- yield props.videoRef.webkitRequestFullscreen();
4183
+ else if (videoRef.webkitRequestFullscreen) {
4184
+ yield videoRef.webkitRequestFullscreen();
4175
4185
  }
4176
- else if (props.videoRef.mozRequestFullScreen) {
4177
- yield props.videoRef.mozRequestFullScreen();
4186
+ else if (videoRef.mozRequestFullScreen) {
4187
+ yield videoRef.mozRequestFullScreen();
4178
4188
  }
4179
- else if (props.videoRef.webkitEnterFullscreen) {
4189
+ else if (videoRef.webkitEnterFullscreen) {
4180
4190
  // iOS
4181
- yield props.videoRef.webkitEnterFullscreen();
4191
+ yield videoRef.webkitEnterFullscreen();
4182
4192
  }
4183
- else if (props.videoRef.msRequestFullscreen) {
4184
- yield props.videoRef.msRequestFullscreen();
4193
+ else if (videoRef.msRequestFullscreen) {
4194
+ yield videoRef.msRequestFullscreen();
4185
4195
  }
4186
4196
  }
4187
- }), [props.videoRef]);
4197
+ }), [videoRef]);
4188
4198
  const canGoFullScreen = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
4189
- if (props.videoRef) {
4199
+ if (videoRef) {
4190
4200
  return (requestFullscreen ||
4191
4201
  webkitRequestFullscreen ||
4192
4202
  mozRequestFullScreen ||
4193
4203
  webkitEnterFullscreen ||
4194
4204
  msRequestFullscreen);
4195
4205
  }
4196
- }), [props.videoRef]);
4206
+ return false;
4207
+ }), [videoRef]);
4197
4208
  return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, onClick: (e) => {
4198
4209
  handleFullScreen();
4199
4210
  e.stopPropagation();
@@ -4240,17 +4251,19 @@ const Controls = (props) => {
4240
4251
  const [tooltipLabel, setTooltipLabel] = React.useState("00:00");
4241
4252
  const progressRef = React.useRef(null);
4242
4253
  const getVideoPositionFromEvent = (clientX) => {
4243
- if (progressRef && progressRef.current && duration) {
4254
+ const totalTime = (videoRef === null || videoRef === void 0 ? void 0 : videoRef.duration) || duration || 0;
4255
+ if (progressRef && progressRef.current && totalTime) {
4244
4256
  const bounds = progressRef.current.getBoundingClientRect();
4245
4257
  const x = clientX - bounds.left;
4246
- const videoPositionSecs = (x / progressRef.current.clientWidth) * duration;
4258
+ const videoPositionSecs = (x / progressRef.current.clientWidth) * totalTime;
4247
4259
  return videoPositionSecs;
4248
4260
  }
4249
4261
  return 0;
4250
4262
  };
4251
4263
  const handleProgressUpdate = React.useCallback(() => {
4264
+ const totalTime = (videoRef === null || videoRef === void 0 ? void 0 : videoRef.duration) || duration || 0;
4252
4265
  const currentTime = (videoRef === null || videoRef === void 0 ? void 0 : videoRef.currentTime) || 0;
4253
- setProgress((currentTime / duration) * 100);
4266
+ setProgress((currentTime / totalTime) * 100);
4254
4267
  }, [duration, videoRef]);
4255
4268
  const handleSkipAhead = React.useCallback((pageX) => {
4256
4269
  if (videoRef) {
@@ -4267,9 +4280,9 @@ const Controls = (props) => {
4267
4280
  const maxMargin = progressRef.current.clientWidth - tooltipWidth;
4268
4281
  const bounds = progressRef.current.getBoundingClientRect();
4269
4282
  const marginX = e.clientX - bounds.left;
4270
- const tooltipMargin = marginX >= maxMargin ? maxMargin : marginX;
4283
+ const newTooltipMargin = marginX >= maxMargin ? maxMargin : marginX;
4271
4284
  const videoTargetDuration = getVideoPositionFromEvent(e.clientX);
4272
- setTooltipMargin(tooltipMargin);
4285
+ setTooltipMargin(newTooltipMargin);
4273
4286
  setTooltipLabel(formatDuration(videoTargetDuration));
4274
4287
  }
4275
4288
  };
@@ -4283,7 +4296,7 @@ const Controls = (props) => {
4283
4296
  }
4284
4297
  };
4285
4298
  }, [videoRef]);
4286
- return (jsxRuntime.jsxs(ControlsWrapper, Object.assign({ isPlaying: isPlaying }, { children: [jsxRuntime.jsxs(ProgressContainer, Object.assign({ onMouseEnter: onMouseEvent, onMouseMove: onMouseEvent, onMouseLeave: onMouseEvent }, { children: [jsxRuntime.jsx(StyledTooltip, Object.assign({ style: { marginLeft: tooltipMargin + "px" } }, { children: tooltipLabel })), jsxRuntime.jsx(TimeLabel, { current: formatDuration((videoRef === null || videoRef === void 0 ? void 0 : videoRef.currentTime) || 0), duration: formatDuration(duration) }), jsxRuntime.jsx(StyledProgress, { ref: progressRef, value: progress, onClick: (e) => handleSkipAhead(e.clientX) })] })), jsxRuntime.jsxs(ControlsBar, { children: [jsxRuntime.jsx(StyledDiv, { children: jsxRuntime.jsx(AudioButton, { videoRef: videoRef }) }), jsxRuntime.jsx(ControlsGroupCenter, { videoRef: videoRef, onPlayChange: onPlayChange, isPlaying: isPlaying }), jsxRuntime.jsx(StyledDiv, { children: jsxRuntime.jsx(FullScreenButton, { videoRef: videoRef }) })] })] })));
4299
+ return (jsxRuntime.jsxs(ControlsWrapper, Object.assign({ isPlaying: isPlaying }, { children: [jsxRuntime.jsxs(ProgressContainer, Object.assign({ onMouseEnter: onMouseEvent, onMouseMove: onMouseEvent, onMouseLeave: onMouseEvent }, { children: [jsxRuntime.jsx(StyledTooltip, Object.assign({ style: { marginLeft: `${tooltipMargin}px` } }, { children: tooltipLabel })), jsxRuntime.jsx(TimeLabel, { current: formatDuration((videoRef === null || videoRef === void 0 ? void 0 : videoRef.currentTime) || 0), duration: formatDuration(duration) }), jsxRuntime.jsx(StyledProgress, { ref: progressRef, value: progress, onClick: (e) => handleSkipAhead(e.clientX) })] })), jsxRuntime.jsxs(ControlsBar, { children: [jsxRuntime.jsx(StyledDiv, { children: jsxRuntime.jsx(AudioButton, { videoRef: videoRef }) }), jsxRuntime.jsx(ControlsGroupCenter, { videoRef: videoRef, onPlayChange: onPlayChange, isPlaying: isPlaying }), jsxRuntime.jsx(StyledDiv, { children: jsxRuntime.jsx(FullScreenButton, { videoRef: videoRef }) })] })] })));
4287
4300
  };
4288
4301
 
4289
4302
  const FloatingContainer = styled__default["default"].div `
@@ -4313,8 +4326,8 @@ const ButtonsContainer = styled__default["default"].div `
4313
4326
  height: 100%;
4314
4327
  `;
4315
4328
  const FloatingControls = (props) => {
4316
- const { isPlaying } = props;
4317
- return (jsxRuntime.jsx(FloatingContainer, Object.assign({ isPlaying: isPlaying }, { children: jsxRuntime.jsx(ButtonsContainer, { children: !isPlaying && (jsxRuntime.jsx(BigButton, Object.assign({ isBright: true }, { children: jsxRuntime.jsx(PlayIcon, {}) }))) }) })));
4329
+ const { isPlaying, onClick } = props;
4330
+ return (jsxRuntime.jsx(FloatingContainer, Object.assign({ isPlaying: isPlaying, onClick: onClick }, { children: jsxRuntime.jsx(ButtonsContainer, { children: !isPlaying && (jsxRuntime.jsx(BigButton, Object.assign({ isBright: true }, { children: jsxRuntime.jsx(PlayIcon, {}) }))) }) })));
4318
4331
  };
4319
4332
 
4320
4333
  const Container = styled__default["default"].div `
@@ -4425,10 +4438,7 @@ const Player = React.forwardRef((props, forwardRef) => {
4425
4438
  }
4426
4439
  };
4427
4440
  }, [videoRef.current]);
4428
- return (jsxRuntime.jsxs(Container, Object.assign({ isLoaded: isLoaded, isPlaying: isPlaying, onClick: (e) => {
4429
- e.stopPropagation();
4430
- handlePlayPause();
4431
- } }, { children: [!isLoaded ? (jsxRuntime.jsx(VideoSpinner, {})) : (jsxRuntime.jsx(FloatingControls, { isPlaying: isPlaying })), jsxRuntime.jsx(Video, Object.assign({ ref: videoRef, onLoadedMetadata: handleLoad, onLoad: handleDuration, preload: "auto", playsInline: true }, { children: props.children })), jsxRuntime.jsx(Controls, { videoRef: videoRef.current, duration: duration, isPlaying: isPlaying, onPlayChange: (isPlaying) => setIsPlaying(isPlaying) })] })));
4441
+ return (jsxRuntime.jsxs(Container, Object.assign({ isLoaded: isLoaded, isPlaying: isPlaying }, { children: [!isLoaded ? (jsxRuntime.jsx(VideoSpinner, {})) : (jsxRuntime.jsx(FloatingControls, { isPlaying: isPlaying, onClick: handlePlayPause })), jsxRuntime.jsx(Video, Object.assign({ ref: videoRef, onLoadedMetadata: handleLoad, onLoad: handleDuration, preload: "auto", playsInline: true, onClick: handlePlayPause }, { children: props.children })), jsxRuntime.jsx(Controls, { videoRef: videoRef.current, duration: duration, isPlaying: isPlaying, onPlayChange: (playing) => setIsPlaying(playing) })] })));
4432
4442
  });
4433
4443
 
4434
4444
  var _path$5;
@@ -5494,6 +5504,7 @@ exports.SpecialCard = SpecialCard;
5494
5504
  exports.Spinner = Spinner;
5495
5505
  exports.SplitButton = SplitButton;
5496
5506
  exports.Stepper = Stepper;
5507
+ exports.StyledLabel = StyledLabel$2;
5497
5508
  exports.SunburstChart = SunburstChart;
5498
5509
  exports.Table = Table;
5499
5510
  exports.TableBody = Body;
@@ -1,8 +1,8 @@
1
1
  import { MenuArgs, NextItemArgs, PreviousItemArgs } from "./_types";
2
2
  import { HTMLAttributes, LiHTMLAttributes } from "react";
3
3
  /**
4
- * A Menu is a wrapper for items elements
5
- **/
4
+ * A Menu is a wrapper for items elements
5
+ **/
6
6
  declare const Menu: (props: MenuArgs) => JSX.Element;
7
7
  declare const PreviousItem: (props: PreviousItemArgs) => JSX.Element;
8
8
  declare const Separator: (props: LiHTMLAttributes<HTMLLIElement>) => JSX.Element;
@@ -11,4 +11,4 @@ declare const ItemMeta: (props: HTMLAttributes<HTMLSpanElement>) => JSX.Element;
11
11
  declare const MediaBody: (props: HTMLAttributes<HTMLDivElement>) => JSX.Element;
12
12
  declare const MediaFigure: (props: HTMLAttributes<Element>) => JSX.Element;
13
13
  declare const MediaItem: (props: LiHTMLAttributes<HTMLLIElement>) => JSX.Element;
14
- export { Menu, PreviousItem, Separator, NextItem, ItemMeta, MediaBody, MediaFigure, MediaItem };
14
+ export { Menu, PreviousItem, Separator, NextItem, ItemMeta, MediaBody, MediaFigure, MediaItem, };
@@ -1,7 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import { LabelArgs } from "./_types";
3
+ export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-forms").ILabelProps & import("react").RefAttributes<HTMLLabelElement>>, any, {}, never>;
2
4
  /**
3
- * A Label is used to specify a title for an input.
4
- * <hr>
5
- **/
5
+ * A Label is used to specify a title for an input.
6
+ * <hr>
7
+ **/
6
8
  declare const Label: (props: LabelArgs) => JSX.Element;
7
9
  export { Label };
@@ -1,5 +1,5 @@
1
1
  export declare const ControlsGroupCenter: ({ videoRef, isPlaying, onPlayChange, }: {
2
2
  videoRef: HTMLVideoElement | null;
3
3
  isPlaying?: boolean | undefined;
4
- onPlayChange?: ((isPlaying: boolean) => void) | undefined;
4
+ onPlayChange?: ((playing: boolean) => void) | undefined;
5
5
  }) => JSX.Element;
@@ -2,4 +2,5 @@ import { WrapperProps } from "../_types";
2
2
  export declare const FloatingContainer: import("styled-components").StyledComponent<"div", any, WrapperProps, never>;
3
3
  export declare const FloatingControls: (props: {
4
4
  isPlaying?: boolean;
5
+ onClick?: () => void;
5
6
  }) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.64",
3
+ "version": "2.12.66",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",