@desynova-digital/components 9.2.52 → 9.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.
- package/atoms/cardV2/cardV2.js +21 -9
- package/atoms/cardV2/content.js +94 -150
- package/atoms/cardV2/contentV2.js +330 -0
- package/atoms/cardV2/thumbnail.js +58 -61
- package/atoms/cardV2/thumbnailV2.js +598 -0
- package/atoms/icon/icon.js +2 -1
- package/atoms/icon/icon.story.js +230 -203
- package/atoms/icon/icons.json +105 -5
- package/atoms/pageSearchCard/index.js +9 -0
- package/atoms/pageSearchCard/pageSearchCard.js +109 -0
- package/atoms/popup/popup.js +3 -2
- package/atoms/sideBar/sidebar.js +16 -11
- package/atoms/sideBar/sidebar.jsx +154 -165
- package/atoms/timeCodeInput/timeCodeMSInput.js +6 -4
- package/atoms/timeCodeInput/timeCodeMainInput.js +6 -4
- package/atoms/timeCodeInput/timeCodeStandardInput.js +7 -4
- package/components.js +7 -0
- package/index.js +6 -0
- package/molecules/richTextInputV2/RichTextInputV2.js +32 -6
- package/package.json +2 -2
package/atoms/icon/icons.json
CHANGED
|
@@ -146,6 +146,21 @@
|
|
|
146
146
|
],
|
|
147
147
|
"width": 16,
|
|
148
148
|
"height": 16
|
|
149
|
+
},
|
|
150
|
+
"search_filter": {
|
|
151
|
+
"paths": [
|
|
152
|
+
"M9.6224 2.33594H6.41406",
|
|
153
|
+
"M4.58333 2.33594H1.375",
|
|
154
|
+
"M9.625 6H5.5",
|
|
155
|
+
"M3.66667 6H1.375",
|
|
156
|
+
"M9.6276 9.66406H7.33594",
|
|
157
|
+
"M5.5 9.66406H1.375",
|
|
158
|
+
"M6.41406 1.41406V3.2474",
|
|
159
|
+
"M3.66406 5.08594V6.91927",
|
|
160
|
+
"M7.33594 8.75V10.5833"
|
|
161
|
+
],
|
|
162
|
+
"width": 11,
|
|
163
|
+
"height": 11
|
|
149
164
|
},
|
|
150
165
|
"dashboard": {
|
|
151
166
|
"paths": [
|
|
@@ -1551,7 +1566,7 @@
|
|
|
1551
1566
|
},
|
|
1552
1567
|
"document-icon": {
|
|
1553
1568
|
"paths": [
|
|
1554
|
-
"M3.
|
|
1569
|
+
"M3 8.25H9V6.75H3V8.25ZM3 10.5H9V9H3V10.5ZM3 12.75H6.75V11.25H3V12.75ZM1.5 15C1.0875 15 0.734375 14.8531 0.440625 14.5594C0.146875 14.2656 0 13.9125 0 13.5V1.5C0 1.0875 0.146875 0.734375 0.440625 0.440625C0.734375 0.146875 1.0875 0 1.5 0H7.5L12 4.5V13.5C12 13.9125 11.8531 14.2656 11.5594 14.5594C11.2656 14.8531 10.9125 15 10.5 15H1.5ZM6.75 5.25H10.5L6.75 1.5V5.25Z"
|
|
1555
1570
|
],
|
|
1556
1571
|
"width": 14,
|
|
1557
1572
|
"height": 18
|
|
@@ -1565,10 +1580,10 @@
|
|
|
1565
1580
|
},
|
|
1566
1581
|
"video-icon": {
|
|
1567
1582
|
"paths": [
|
|
1568
|
-
"
|
|
1583
|
+
"M7.125 9.375L12.375 6L7.125 2.625V9.375ZM4.5 12C4.0875 12 3.73438 11.8531 3.44063 11.5594C3.14688 11.2656 3 10.9125 3 10.5V1.5C3 1.0875 3.14688 0.734375 3.44063 0.440625C3.73438 0.146875 4.0875 0 4.5 0H13.5C13.9125 0 14.2656 0.146875 14.5594 0.440625C14.8531 0.734375 15 1.0875 15 1.5V10.5C15 10.9125 14.8531 11.2656 14.5594 11.5594C14.2656 11.8531 13.9125 12 13.5 12H4.5ZM1.5 15C1.0875 15 0.734375 14.8531 0.440625 14.5594C0.146875 14.2656 0 13.9125 0 13.5V3H1.5V13.5H12V15H1.5Z"
|
|
1569
1584
|
],
|
|
1570
|
-
"width":
|
|
1571
|
-
"height":
|
|
1585
|
+
"width": 15,
|
|
1586
|
+
"height": 15
|
|
1572
1587
|
},
|
|
1573
1588
|
"enhance": {
|
|
1574
1589
|
"paths": [
|
|
@@ -1919,6 +1934,91 @@
|
|
|
1919
1934
|
],
|
|
1920
1935
|
"width": 12,
|
|
1921
1936
|
"height": 14
|
|
1937
|
+
},
|
|
1938
|
+
"hamburger": {
|
|
1939
|
+
"paths": [
|
|
1940
|
+
"M0 6.66536V5.33203H12V6.66536H0ZM0 3.9987V2.66536H12V3.9987H0ZM0 1.33203V-0.00130224H12V1.33203H0Z"
|
|
1941
|
+
],
|
|
1942
|
+
"width": 12,
|
|
1943
|
+
"height": 7
|
|
1944
|
+
},
|
|
1945
|
+
"display-list": {
|
|
1946
|
+
"paths": [
|
|
1947
|
+
"M0 5.33333H1.77778V3.55556H0V5.33333ZM0 8.88889H1.77778V7.11111H0V8.88889ZM0 1.77778H1.77778V0H0V1.77778ZM3.55556 5.33333H16V3.55556H3.55556V5.33333ZM3.55556 8.88889H16V7.11111H3.55556V8.88889ZM3.55556 0V1.77778H16V0H3.55556ZM0 5.33333H1.77778V3.55556H0V5.33333ZM0 8.88889H1.77778V7.11111H0V8.88889ZM0 1.77778H1.77778V0H0V1.77778ZM3.55556 5.33333H16V3.55556H3.55556V5.33333ZM3.55556 8.88889H16V7.11111H3.55556V8.88889ZM3.55556 0V1.77778H16V0H3.55556Z"
|
|
1948
|
+
],
|
|
1949
|
+
"width": 14,
|
|
1950
|
+
"height": 14
|
|
1951
|
+
},
|
|
1952
|
+
"display-folder": {
|
|
1953
|
+
"paths": [
|
|
1954
|
+
"M0 0V5.33333H5.33333V0H0ZM4 4H1.33333V1.33333H4V4ZM0 6.66667V12H5.33333V6.66667H0ZM4 10.6667H1.33333V8H4V10.6667ZM6.66667 0V5.33333H12V0H6.66667ZM10.6667 4H8V1.33333H10.6667V4ZM6.66667 6.66667V12H12V6.66667H6.66667ZM10.6667 10.6667H8V8H10.6667V10.6667Z"
|
|
1955
|
+
],
|
|
1956
|
+
"width": 14,
|
|
1957
|
+
"height": 14
|
|
1958
|
+
},
|
|
1959
|
+
"music-icon": {
|
|
1960
|
+
"paths": [
|
|
1961
|
+
"M4.6875 0V8.24219C4.22656 7.97656 3.69531 7.8125 3.125 7.8125C1.39844 7.8125 0 9.21094 0 10.9375C0 12.6641 1.39844 14.0625 3.125 14.0625C4.85156 14.0625 6.25 12.6641 6.25 10.9375V3.125H9.375V0H4.6875Z"
|
|
1962
|
+
],
|
|
1963
|
+
"width": 10,
|
|
1964
|
+
"height": 15
|
|
1965
|
+
},
|
|
1966
|
+
"image-icon": {
|
|
1967
|
+
"paths": [
|
|
1968
|
+
"M1.66667 15C1.20833 15 0.815972 14.8368 0.489583 14.5104C0.163194 14.184 0 13.7917 0 13.3333V1.66667C0 1.20833 0.163194 0.815972 0.489583 0.489583C0.815972 0.163194 1.20833 0 1.66667 0H13.3333C13.7917 0 14.184 0.163194 14.5104 0.489583C14.8368 0.815972 15 1.20833 15 1.66667V13.3333C15 13.7917 14.8368 14.184 14.5104 14.5104C14.184 14.8368 13.7917 15 13.3333 15H1.66667ZM2.5 11.6667H12.5L9.375 7.5L6.875 10.8333L5 8.33333L2.5 11.6667Z"
|
|
1969
|
+
],
|
|
1970
|
+
"width": 15,
|
|
1971
|
+
"height": 15
|
|
1972
|
+
},
|
|
1973
|
+
"file-icon": {
|
|
1974
|
+
"paths": [
|
|
1975
|
+
"M3.2 11.2H9.6V12.8H3.2V11.2ZM3.2 8H9.6V9.6H3.2V8ZM8 0H1.6C0.72 0 0 0.72 0 1.6V14.4C0 15.28 0.712 16 1.592 16H11.2C12.08 16 12.8 15.28 12.8 14.4V4.8L8 0ZM11.2 14.4H1.6V1.6H7.2V5.6H11.2V14.4Z"
|
|
1976
|
+
],
|
|
1977
|
+
"width": 14,
|
|
1978
|
+
"height": 14
|
|
1979
|
+
},
|
|
1980
|
+
"folder-icon": {
|
|
1981
|
+
"paths": [
|
|
1982
|
+
"M16.441 5.33442L4.69276 5.76392C4.30397 5.76392 4.07727 5.90716 3.97018 6.27505L1.53146 14.4859C1.43063 14.8349 0.947272 14.9982 0.61102 14.9982C0.274993 14.9982 0 14.7275 0 14.3968V12.0957V2.66853V2.21813V0.837876C0 0.375152 0.381189 0 0.85136 0H6.9003C7.12611 0 7.34253 0.0882322 7.50216 0.245334L9.25719 1.97257C9.41682 2.12967 9.63346 2.21791 9.85905 2.21791H15.5896C16.0598 2.21791 16.441 2.59306 16.441 3.05578V3.34204V5.33442Z",
|
|
1983
|
+
"M0.611328 14.9995C0.947356 14.9995 1.12152 14.7471 1.22235 14.3981L3.68074 5.9573C3.78783 5.58941 4.12967 5.33594 4.51868 5.33594H19.5827C19.9424 5.33594 20.2009 5.6761 20.0994 6.01583L17.6633 14.1627C17.5533 14.548 17.3121 15.0028 16.8131 14.9995H0.611328Z"
|
|
1984
|
+
],
|
|
1985
|
+
"width": 21,
|
|
1986
|
+
"height": 15
|
|
1987
|
+
},
|
|
1988
|
+
"error-circle": {
|
|
1989
|
+
"paths": [
|
|
1990
|
+
"M6.4275 8.8275C6.5425 8.7125 6.6 8.57 6.6 8.4C6.6 8.23 6.5425 8.0875 6.4275 7.9725C6.3125 7.8575 6.17 7.8 6 7.8C5.83 7.8 5.6875 7.8575 5.5725 7.9725C5.4575 8.0875 5.4 8.23 5.4 8.4C5.4 8.57 5.4575 8.7125 5.5725 8.8275C5.6875 8.9425 5.83 9 6 9C6.17 9 6.3125 8.9425 6.4275 8.8275ZM5.4 6.6H6.6V3H5.4V6.6ZM6 12C5.17 12 4.39 11.8425 3.66 11.5275C2.93 11.2125 2.295 10.785 1.755 10.245C1.215 9.705 0.7875 9.07 0.4725 8.34C0.1575 7.61 0 6.83 0 6C0 5.17 0.1575 4.39 0.4725 3.66C0.7875 2.93 1.215 2.295 1.755 1.755C2.295 1.215 2.93 0.7875 3.66 0.4725C4.39 0.1575 5.17 0 6 0C6.83 0 7.61 0.1575 8.34 0.4725C9.07 0.7875 9.705 1.215 10.245 1.755C10.785 2.295 11.2125 2.93 11.5275 3.66C11.8425 4.39 12 5.17 12 6C12 6.83 11.8425 7.61 11.5275 8.34C11.2125 9.07 10.785 9.705 10.245 10.245C9.705 10.785 9.07 11.2125 8.34 11.5275C7.61 11.8425 6.83 12 6 12ZM6 10.8C7.34 10.8 8.475 10.335 9.405 9.405C10.335 8.475 10.8 7.34 10.8 6C10.8 4.66 10.335 3.525 9.405 2.595C8.475 1.665 7.34 1.2 6 1.2C4.66 1.2 3.525 1.665 2.595 2.595C1.665 3.525 1.2 4.66 1.2 6C1.2 7.34 1.665 8.475 2.595 9.405C3.525 10.335 4.66 10.8 6 10.8Z"
|
|
1991
|
+
],
|
|
1992
|
+
"width": 12,
|
|
1993
|
+
"height": 12
|
|
1994
|
+
},
|
|
1995
|
+
"jhs_delivery_curate": {
|
|
1996
|
+
"paths": ["M.006 10.286L12 5.143.006 0 0 4l8.571 1.143L0 6.286z"],
|
|
1997
|
+
"width": 12,
|
|
1998
|
+
"height": 11
|
|
1999
|
+
},
|
|
2000
|
+
"notes-comment":{
|
|
2001
|
+
"paths": [
|
|
2002
|
+
"M0 10V1C0 0.725 0.0979167 0.489583 0.29375 0.29375C0.489583 0.0979167 0.725 0 1 0H9C9.275 0 9.51042 0.0979167 9.70625 0.29375C9.90208 0.489583 10 0.725 10 1V7C10 7.275 9.90208 7.51042 9.70625 7.70625C9.51042 7.90208 9.275 8 9 8H2L0 10ZM2 6H6V5H2V6ZM2 4.5H8V3.5H2V4.5ZM2 3H8V2H2V3Z"
|
|
2003
|
+
],
|
|
2004
|
+
"width": 10,
|
|
2005
|
+
"height": 10
|
|
2006
|
+
},
|
|
2007
|
+
"check-circle": {
|
|
2008
|
+
"viewBox": "0 -960 960 960",
|
|
2009
|
+
"paths": [
|
|
2010
|
+
"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"
|
|
2011
|
+
],
|
|
2012
|
+
"width": 14,
|
|
2013
|
+
"height": 14
|
|
2014
|
+
},
|
|
2015
|
+
"valid_error-circle": {
|
|
2016
|
+
"viewBox": "0 -960 960 960",
|
|
2017
|
+
"paths": [
|
|
2018
|
+
"M508.5-291.5Q520-303 520-320t-11.5-28.5Q497-360 480-360t-28.5 11.5Q440-337 440-320t11.5 28.5Q463-280 480-280t28.5-11.5ZM440-440h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"
|
|
2019
|
+
],
|
|
2020
|
+
"width": 14,
|
|
2021
|
+
"height": 14
|
|
1922
2022
|
}
|
|
1923
2023
|
}
|
|
1924
|
-
}
|
|
2024
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _pageSearchCard = _interopRequireDefault(require("./pageSearchCard"));
|
|
9
|
+
var _default = exports["default"] = _pageSearchCard["default"];
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
|
+
var _tokens = require("@desynova-digital/tokens");
|
|
15
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
+
var getSearchAccent = function getSearchAccent(theme) {
|
|
19
|
+
var _colors$theme, _colors$theme$searchH, _colors$dark, _colors$dark$searchHe;
|
|
20
|
+
return ((_colors$theme = _tokens.colors[theme]) === null || _colors$theme === void 0 ? void 0 : (_colors$theme$searchH = _colors$theme.searchHeader) === null || _colors$theme$searchH === void 0 ? void 0 : _colors$theme$searchH.mainColor) || ((_colors$dark = _tokens.colors.dark) === null || _colors$dark === void 0 ? void 0 : (_colors$dark$searchHe = _colors$dark.searchHeader) === null || _colors$dark$searchHe === void 0 ? void 0 : _colors$dark$searchHe.mainColor);
|
|
21
|
+
};
|
|
22
|
+
var FALLBACK_IMAGE = 'https://ctngcthumbnailprod.contido.io/showpage_fallback.png';
|
|
23
|
+
var capitalizeFirstLetter = function capitalizeFirstLetter(value) {
|
|
24
|
+
if (typeof value !== 'string' || !value) return value;
|
|
25
|
+
return "".concat(value.charAt(0).toUpperCase()).concat(value.slice(1));
|
|
26
|
+
};
|
|
27
|
+
var Card = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: 10px;\n overflow: visible;\n cursor: pointer;\n background: #0c141d;\n flex-shrink: 0;\n box-sizing: border-box;\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);\n transform: scale(1);\n transform-origin: center;\n z-index: 0;\n isolation: isolate;\n transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1);\n will-change: transform;\n\n &:hover {\n transform: scale(1.035);\n z-index: 5;\n box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);\n }\n"])), function (_ref) {
|
|
28
|
+
var width = _ref.width;
|
|
29
|
+
return width || '178px';
|
|
30
|
+
}, function (_ref2) {
|
|
31
|
+
var height = _ref2.height;
|
|
32
|
+
return height || '258px';
|
|
33
|
+
});
|
|
34
|
+
var Poster = _styledComponents["default"].img(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center;\n display: block;\n background: #0c141d;\n border-radius: inherit;\n\n &.fallback-image {\n object-fit: cover;\n object-position: center;\n }\n"])));
|
|
35
|
+
var Gradient = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(12, 20, 29, 0.7) 60%, rgba(12, 20, 29, 0.97) 100%);\n"])));
|
|
36
|
+
var Badge = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 12px;\n left: 12px;\n display: inline-flex;\n height: 16.75px;\n padding: 2px 6px;\n align-items: center;\n justify-content: center;\n font-family: 'SFUIText-Medium';\n border-radius: 4px;\n background: ", ";\n color: #0c141d;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0.6px;\n text-transform: uppercase;\n z-index: 2;\n"])), function (_ref3) {
|
|
37
|
+
var theme = _ref3.theme;
|
|
38
|
+
return getSearchAccent(theme);
|
|
39
|
+
});
|
|
40
|
+
var Content = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n left: 16px;\n right: 16px;\n bottom: 16px;\n z-index: 2;\n"])));
|
|
41
|
+
var Title = _styledComponents["default"].h3(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0;\n color: #fff;\n font-family: 'SFUIText-Medium';\n font-size: 13px;\n font-style: normal;\n font-weight: 700;\n line-height: 18px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
42
|
+
var Subtitle = _styledComponents["default"].p(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n margin: 2px 0 0;\n color: #5b7088;\n font-family: 'SFUIText-Medium';\n font-size: 10px;\n font-style: normal;\n font-weight: 400;\n line-height: 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
43
|
+
var PageSearchCard = function PageSearchCard(_ref4) {
|
|
44
|
+
var thumbnail = _ref4.thumbnail,
|
|
45
|
+
show_name = _ref4.show_name,
|
|
46
|
+
asset_language = _ref4.asset_language,
|
|
47
|
+
asset_type = _ref4.asset_type,
|
|
48
|
+
channel_name = _ref4.channel_name,
|
|
49
|
+
_ref4$title = _ref4.title,
|
|
50
|
+
title = _ref4$title === void 0 ? 'Ghazi Attack' : _ref4$title,
|
|
51
|
+
_ref4$subtitle = _ref4.subtitle,
|
|
52
|
+
subtitle = _ref4$subtitle === void 0 ? 'Star Plus' : _ref4$subtitle,
|
|
53
|
+
_ref4$tag = _ref4.tag,
|
|
54
|
+
tag = _ref4$tag === void 0 ? 'MOVIE' : _ref4$tag,
|
|
55
|
+
_ref4$theme = _ref4.theme,
|
|
56
|
+
theme = _ref4$theme === void 0 ? 'dark' : _ref4$theme,
|
|
57
|
+
_ref4$width = _ref4.width,
|
|
58
|
+
width = _ref4$width === void 0 ? '220px' : _ref4$width,
|
|
59
|
+
_ref4$height = _ref4.height,
|
|
60
|
+
height = _ref4$height === void 0 ? '292px' : _ref4$height,
|
|
61
|
+
onClick = _ref4.onClick;
|
|
62
|
+
var effectiveTitle = show_name || title;
|
|
63
|
+
var effectiveTag = asset_type || tag;
|
|
64
|
+
var normalizedAssetType = String(effectiveTag).toLowerCase();
|
|
65
|
+
var effectiveSubtitle = subtitle;
|
|
66
|
+
if (normalizedAssetType === 'movie') {
|
|
67
|
+
effectiveSubtitle = capitalizeFirstLetter(asset_language || '');
|
|
68
|
+
} else if (normalizedAssetType === 'show') {
|
|
69
|
+
effectiveSubtitle = channel_name || '';
|
|
70
|
+
}
|
|
71
|
+
var _useState = (0, _react.useState)(!thumbnail),
|
|
72
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
73
|
+
hasImageError = _useState2[0],
|
|
74
|
+
setHasImageError = _useState2[1];
|
|
75
|
+
(0, _react.useEffect)(function () {
|
|
76
|
+
setHasImageError(!thumbnail);
|
|
77
|
+
}, [thumbnail]);
|
|
78
|
+
var imageSource = hasImageError ? FALLBACK_IMAGE : thumbnail;
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement(Card, {
|
|
80
|
+
width: width,
|
|
81
|
+
height: height,
|
|
82
|
+
theme: theme,
|
|
83
|
+
onClick: onClick
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement(Poster, {
|
|
85
|
+
src: imageSource,
|
|
86
|
+
alt: effectiveTitle,
|
|
87
|
+
className: hasImageError ? 'fallback-image' : undefined,
|
|
88
|
+
onError: function onError() {
|
|
89
|
+
if (!hasImageError) setHasImageError(true);
|
|
90
|
+
}
|
|
91
|
+
}), /*#__PURE__*/_react["default"].createElement(Gradient, null), /*#__PURE__*/_react["default"].createElement(Badge, {
|
|
92
|
+
theme: theme
|
|
93
|
+
}, effectiveTag), /*#__PURE__*/_react["default"].createElement(Content, null, /*#__PURE__*/_react["default"].createElement(Title, null, effectiveTitle), effectiveSubtitle ? /*#__PURE__*/_react["default"].createElement(Subtitle, null, effectiveSubtitle) : null));
|
|
94
|
+
};
|
|
95
|
+
PageSearchCard.propTypes = {
|
|
96
|
+
thumbnail: _propTypes["default"].string,
|
|
97
|
+
show_name: _propTypes["default"].string,
|
|
98
|
+
asset_language: _propTypes["default"].string,
|
|
99
|
+
asset_type: _propTypes["default"].string,
|
|
100
|
+
channel_name: _propTypes["default"].string,
|
|
101
|
+
title: _propTypes["default"].string,
|
|
102
|
+
subtitle: _propTypes["default"].string,
|
|
103
|
+
tag: _propTypes["default"].string,
|
|
104
|
+
theme: _propTypes["default"].string,
|
|
105
|
+
width: _propTypes["default"].string,
|
|
106
|
+
height: _propTypes["default"].string,
|
|
107
|
+
onClick: _propTypes["default"].func
|
|
108
|
+
};
|
|
109
|
+
var _default = exports["default"] = PageSearchCard;
|
package/atoms/popup/popup.js
CHANGED
|
@@ -50,7 +50,7 @@ var PopupBlock = _styledComponents["default"].div(_templateObject3 || (_template
|
|
|
50
50
|
var PopupOverlay = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n background: ", ";\n width: 100%;\n height: 100%;\n"])), function (props) {
|
|
51
51
|
return _tokens.colors[props.theme].popup.overlayColor;
|
|
52
52
|
});
|
|
53
|
-
var PopupBox = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n z-index: 3;\n max-width: 650px;\n min-width: 440px;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n\n width: ", ";\n border-radius: 10px;\n background: ", ";\n\n .popup-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n box-sizing: border-box;\n padding: 40px;\n\n .header-title {\n font-family: SFUIText-Light;\n font-size: 18px;\n line-height: 1;\n color: ", ";\n }\n .display-flex {\n display: flex;\n .pr-20 {\n padding-right: 20px;\n }\n }\n .cursor-p {\n cursor: pointer;\n }\n\n .count-wrapper {\n font-size: 14px;\n line-height: 24px;\n color: #afb2ba;\n font-family: 'SFUIText-Light';\n }\n ", " {\n margin: 0;\n background: transparent;\n border-color: transparent;\n padding: 0;\n path {\n fill: ", ";\n }\n &:hover {\n background: transparent;\n border-color: transparent;\n }\n }\n }\n .popup-body {\n padding: 0 40px 40px 40px;\n .popup-action-block {\n margin: 0 auto;\n display: flex;\n justify-content: center;\n\n button {\n padding: 10px 0;\n margin: 0 10px;\n min-width: 150px;\n }\n }\n .popup-message {\n font-family: SFUIText-Light;\n font-size: 14px;\n line-height: 1.5;\n text-align: center;\n color: ", ";\n margin-bottom: 40px;\n }\n }\n\n .loading-box {\n position: absolute;\n top: 0px;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0px;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: wait;\n background-color: rgb(21 21 21 / 60%);\n border-radius: 10px;\n }\n"])), function (props) {
|
|
53
|
+
var PopupBox = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n z-index: 3;\n max-width: 650px;\n min-width: 440px;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n\n width: ", ";\n border-radius: 10px;\n background: ", ";\n\n .popup-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n box-sizing: border-box;\n padding: 40px;\n\n .header-title {\n font-family: SFUIText-Light;\n font-size: 18px;\n line-height: 1;\n color: ", ";\n }\n .display-flex {\n display: flex;\n .pr-20 {\n padding-right: 20px;\n }\n }\n .cursor-p {\n cursor: pointer;\n }\n\n .count-wrapper {\n font-size: 14px;\n line-height: 24px;\n color: #afb2ba;\n font-family: 'SFUIText-Light';\n }\n ", " {\n margin: 0;\n background: transparent;\n border-color: transparent;\n padding: 0;\n path {\n fill: ", ";\n }\n &:hover {\n background: transparent;\n border-color: transparent;\n }\n }\n }\n .popup-body {\n padding: 0 40px 40px 40px;\n .popup-action-block {\n margin: 0 auto;\n display: flex;\n justify-content: center;\n\n button {\n padding: 10px 0;\n margin: 0 10px;\n min-width: 150px;\n }\n }\n .popup-message {\n font-family: SFUIText-Light;\n font-size: 14px;\n line-height: 1.5;\n text-align: center;\n color: ", ";\n margin-bottom: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .loading-box {\n position: absolute;\n top: 0px;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0px;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: wait;\n background-color: rgb(21 21 21 / 60%);\n border-radius: 10px;\n }\n"])), function (props) {
|
|
54
54
|
return props.width ? props.width : "440px";
|
|
55
55
|
}, function (props) {
|
|
56
56
|
return _tokens.colors[props.theme].popup.popupBoxBackground;
|
|
@@ -135,7 +135,8 @@ var Popup = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
136
|
className: "popup-body"
|
|
137
137
|
}, messageBody ? /*#__PURE__*/_react["default"].createElement("p", {
|
|
138
|
-
className: "popup-message"
|
|
138
|
+
className: "popup-message",
|
|
139
|
+
title: messageBody
|
|
139
140
|
}, messageBody) : null, popupContent ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
140
141
|
className: "popup-content"
|
|
141
142
|
}, popupContent) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
package/atoms/sideBar/sidebar.js
CHANGED
|
@@ -26,11 +26,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
26
26
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
27
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
28
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
|
-
var SideBarOverlay = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(0,
|
|
30
|
-
return props.open ?
|
|
29
|
+
var SideBarOverlay = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(0,0,0,0.5);\n z-index: 100;\n visibility: ", ";\n"])), function (props) {
|
|
30
|
+
return props.open ? 'visible' : 'hidden';
|
|
31
31
|
});
|
|
32
|
-
var SideBarBlock = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n
|
|
33
|
-
|
|
32
|
+
var SideBarBlock = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n height: 100%;\n position: fixed;\n z-index: 101;\n top: 0;\n right: 0px;\n background-color: #121D29;\n box-shadow: 0px 2px 44px rgba(0, 0, 0, 0.5);\n overflow: hidden;\n width:0px;\n\n transition: width 250ms ease-in-out;\n\n .ball{\n background-color:#151717\n }\n\n .circle{\n border:4px solid #1d2020;\n height:10px;\n width:10px\n }\n\n div.loader-holder > div{\n height:20px;\n margin-left:5px;\n }\n\n .parentBox{\n width:18px;\n height:18px;\n }\n\n &.open{\n width: ", ";\n .sidebar-header, .bodyContainer, .button-container {\n opacity: 1;\n }\n }\n\n .sidebar-header {\n transition: opacity 50ms ease-in-out 250ms;\n opacity:0;\n padding:20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n \n .header-title {\n font-family: SFUIText-Light;\n line-height: 14px;\n font-size: 16px;\n line-height: 14px;\n color: #FFFFFF;\n }\n ", " {\n margin: 0;\n background: transparent;\n border-color: transparent;\n padding: 0;\n &:hover {\n background: transparent;\n border-color: transparent;\n }\n }\n }\n\n .bodyContainer {\n opacity:0;\n transition: opacity 50ms ease-in-out 250ms;\n color:white;\n font-family: SFUIText-Regular;\n overflow-y: scroll;\n overflow-x: hidden;\n height: calc(100% - 110px);\n padding:0px 20px 0px 20px;\n overflow-x: hidden;\n }\n\n .bodyContainer-without-footer {\n height: calc(100% - 70px) !important;\n }\n\n"])), function (props) {
|
|
33
|
+
return props.width || '400px';
|
|
34
|
+
}, _index["default"].Element);
|
|
35
|
+
var ButtonContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: SFUIText-Regular;\n display: flex;\n justify-content:center;\n padding: 10px 0;\n background: #182738;\n box-shadow: 0px -12px 24px rgb(0 0 0 / 20%);\n width: 100%;\n bottom:0;\n position: absolute;\n opacity:0;\n transition: opacity 50ms ease-in-out 250ms;\n \n .btn{\n border-radius: 22px;\n color: #FFFFFF;\n font-size: 12px;\n line-height: 12px;\n text-align: center;\n min-width: 150px;\n text-transform: uppercase;\n padding: 10px 0;\n margin: 0 10px;\n max-width: 150px;\n cursor: pointer;\n display:flex;\n justify-content:center;\n align-items:center;\n \n :hover{\n color: ", ";\n }\n }\n\n .default{\n background: #303F51;\n\n :hover{\n color:", ";\n }\n }\n \n .primary {\n color: rgb(12, 20, 29);\n background: ", ";\n\n :hover{\n color: rgb(12, 20, 29);\n transition: all 0.2s ease-in-out 0s;\n box-shadow: rgb(7 213 205 / 20%) 0px 12px 24px 0px;\n }\n }\n"])), function (props) {
|
|
34
36
|
return _tokens.colors[props.theme].sideBar.themeColor;
|
|
35
37
|
}, function (props) {
|
|
36
38
|
return _tokens.colors[props.theme].sideBar.lightthemeColor;
|
|
@@ -82,12 +84,14 @@ var SideBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
82
84
|
sideBarButtonObject = _this$props.sideBarButtonObject,
|
|
83
85
|
showSideBar = _this$props.showSideBar,
|
|
84
86
|
loadingBtn = _this$props.loadingBtn,
|
|
85
|
-
theme = _this$props.theme
|
|
87
|
+
theme = _this$props.theme,
|
|
88
|
+
width = _this$props.width;
|
|
86
89
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(SideBarOverlay, {
|
|
87
90
|
open: showSideBar
|
|
88
91
|
}), /*#__PURE__*/_react["default"].createElement(SideBarBlock, {
|
|
89
92
|
theme: theme,
|
|
90
|
-
|
|
93
|
+
width: width,
|
|
94
|
+
className: showSideBar ? 'open' : 'close'
|
|
91
95
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
92
96
|
className: "sidebar-header"
|
|
93
97
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
@@ -100,17 +104,17 @@ var SideBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
100
104
|
icon: "cross",
|
|
101
105
|
iconBackground: false,
|
|
102
106
|
onClick: function onClick() {
|
|
103
|
-
_this2.buttonClick(
|
|
107
|
+
_this2.buttonClick('cancel');
|
|
104
108
|
}
|
|
105
109
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
-
className: "bodyContainer ".concat(!sideBarButtonObject.length &&
|
|
110
|
+
className: "bodyContainer ".concat(!sideBarButtonObject.length && 'bodyContainer-without-footer')
|
|
107
111
|
}, content), sideBarButtonObject && sideBarButtonObject.length ? /*#__PURE__*/_react["default"].createElement(ButtonContainer, {
|
|
108
112
|
theme: theme,
|
|
109
113
|
className: "button-container"
|
|
110
114
|
}, sideBarButtonObject.map(function (object) {
|
|
111
115
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
116
|
key: object.field,
|
|
113
|
-
className: "btn ".concat(object.type ||
|
|
117
|
+
className: "btn ".concat(object.type || 'default'),
|
|
114
118
|
onClick: function onClick() {
|
|
115
119
|
_this2.buttonClick(object.field);
|
|
116
120
|
}
|
|
@@ -123,7 +127,7 @@ var SideBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
123
127
|
}]);
|
|
124
128
|
}(_react.Component);
|
|
125
129
|
SideBar.propTypes = {
|
|
126
|
-
theme: _propTypes["default"].oneOf([
|
|
130
|
+
theme: _propTypes["default"].oneOf(['light', 'dark', 'nexc']),
|
|
127
131
|
showSideBar: _propTypes["default"].bool,
|
|
128
132
|
title: _propTypes["default"].string,
|
|
129
133
|
content: _propTypes["default"].object,
|
|
@@ -132,5 +136,6 @@ SideBar.propTypes = {
|
|
|
132
136
|
onButtonClick: _propTypes["default"].func
|
|
133
137
|
};
|
|
134
138
|
SideBar.defaultProps = {
|
|
135
|
-
theme:
|
|
139
|
+
theme: 'dark',
|
|
140
|
+
width: '400px'
|
|
136
141
|
};
|