@artsy/palette 28.1.1 → 29.0.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.
@@ -41,7 +41,6 @@ export * from "./PasswordInput";
41
41
  export * from "./Pill";
42
42
  export * from "./Popover";
43
43
  export * from "./ProgressBar";
44
- export * from "./ProgressBarTimer";
45
44
  export * from "./ProgressDots";
46
45
  export * from "./Radio";
47
46
  export * from "./RadioGroup";
@@ -57,14 +56,12 @@ export * from "./Skip";
57
56
  export * from "./Spacer";
58
57
  export * from "./Spinner";
59
58
  export * from "./StackableBorderBox";
60
- export * from "./StaticCountdownTimer";
61
59
  export * from "./Stepper";
62
60
  export * from "./Sup";
63
61
  export * from "./Swiper";
64
62
  export * from "./Tabs";
65
63
  export * from "./Text";
66
64
  export * from "./TextArea";
67
- export * from "./TimeRemaining";
68
65
  export * from "./Toasts";
69
66
  export * from "./Tooltip";
70
67
  export * from "./VisuallyHidden";
@@ -563,19 +563,6 @@ Object.keys(_ProgressBar).forEach(function (key) {
563
563
  });
564
564
  });
565
565
 
566
- var _ProgressBarTimer = require("./ProgressBarTimer");
567
-
568
- Object.keys(_ProgressBarTimer).forEach(function (key) {
569
- if (key === "default" || key === "__esModule") return;
570
- if (key in exports && exports[key] === _ProgressBarTimer[key]) return;
571
- Object.defineProperty(exports, key, {
572
- enumerable: true,
573
- get: function get() {
574
- return _ProgressBarTimer[key];
575
- }
576
- });
577
- });
578
-
579
566
  var _ProgressDots = require("./ProgressDots");
580
567
 
581
568
  Object.keys(_ProgressDots).forEach(function (key) {
@@ -771,19 +758,6 @@ Object.keys(_StackableBorderBox).forEach(function (key) {
771
758
  });
772
759
  });
773
760
 
774
- var _StaticCountdownTimer = require("./StaticCountdownTimer");
775
-
776
- Object.keys(_StaticCountdownTimer).forEach(function (key) {
777
- if (key === "default" || key === "__esModule") return;
778
- if (key in exports && exports[key] === _StaticCountdownTimer[key]) return;
779
- Object.defineProperty(exports, key, {
780
- enumerable: true,
781
- get: function get() {
782
- return _StaticCountdownTimer[key];
783
- }
784
- });
785
- });
786
-
787
761
  var _Stepper = require("./Stepper");
788
762
 
789
763
  Object.keys(_Stepper).forEach(function (key) {
@@ -862,19 +836,6 @@ Object.keys(_TextArea).forEach(function (key) {
862
836
  });
863
837
  });
864
838
 
865
- var _TimeRemaining = require("./TimeRemaining");
866
-
867
- Object.keys(_TimeRemaining).forEach(function (key) {
868
- if (key === "default" || key === "__esModule") return;
869
- if (key in exports && exports[key] === _TimeRemaining[key]) return;
870
- Object.defineProperty(exports, key, {
871
- enumerable: true,
872
- get: function get() {
873
- return _TimeRemaining[key];
874
- }
875
- });
876
- });
877
-
878
839
  var _Toasts = require("./Toasts");
879
840
 
880
841
  Object.keys(_Toasts).forEach(function (key) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/elements/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;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AA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./AutocompleteInput\"\nexport * from \"./Avatar\"\nexport * from \"./Banner\"\nexport * from \"./BaseTabs\"\nexport * from \"./BorderBox\"\nexport * from \"./BorderedRadio\"\nexport * from \"./Box\"\nexport * from \"./Breadcrumbs\"\nexport * from \"./Button\"\nexport * from \"./Cards\"\nexport * from \"./Carousel\"\nexport * from \"./CarouselBar\"\nexport * from \"./Checkbox\"\nexport * from \"./CleanTag\"\nexport * from \"./Clickable\"\nexport * from \"./Collapse\"\nexport * from \"./CSSGrid\"\nexport * from \"./Dialog\"\nexport * from \"./Dropdown\"\nexport * from \"./EntityHeader\"\nexport * from \"./Expandable\"\nexport * from \"./FilterSelect\"\nexport * from \"./Flex\"\nexport * from \"./FullBleed\"\nexport * from \"./GridColumns\"\nexport * from \"./HorizontalOverflow\"\nexport * from \"./HTML\"\nexport * from \"./Image\"\nexport * from \"./Input\"\nexport * from \"./Join\"\nexport * from \"./Label\"\nexport * from \"./LabeledInput\"\nexport * from \"./Link\"\nexport * from \"./Marquee\"\nexport * from \"./Message\"\nexport * from \"./Modal\"\nexport * from \"./ModalDialog\"\nexport * from \"./MultiSelect\"\nexport * from \"./Pagination\"\nexport * from \"./PasswordInput\"\nexport * from \"./Pill\"\nexport * from \"./Popover\"\nexport * from \"./ProgressBar\"\nexport * from \"./ProgressBarTimer\"\nexport * from \"./ProgressDots\"\nexport * from \"./Radio\"\nexport * from \"./RadioGroup\"\nexport * from \"./Range\"\nexport * from \"./ReadMore\"\nexport * from \"./ResponsiveBox\"\nexport * from \"./Select\"\nexport * from \"./Separator\"\nexport * from \"./Shelf\"\nexport * from \"./ShowMore\"\nexport * from \"./Skeleton\"\nexport * from \"./Skip\"\nexport * from \"./Spacer\"\nexport * from \"./Spinner\"\nexport * from \"./StackableBorderBox\"\nexport * from \"./StaticCountdownTimer\"\nexport * from \"./Stepper\"\nexport * from \"./Sup\"\nexport * from \"./Swiper\"\nexport * from \"./Tabs\"\nexport * from \"./Text\"\nexport * from \"./TextArea\"\nexport * from \"./TimeRemaining\"\nexport * from \"./Toasts\"\nexport * from \"./Tooltip\"\nexport * from \"./VisuallyHidden\"\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/elements/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./AutocompleteInput\"\nexport * from \"./Avatar\"\nexport * from \"./Banner\"\nexport * from \"./BaseTabs\"\nexport * from \"./BorderBox\"\nexport * from \"./BorderedRadio\"\nexport * from \"./Box\"\nexport * from \"./Breadcrumbs\"\nexport * from \"./Button\"\nexport * from \"./Cards\"\nexport * from \"./Carousel\"\nexport * from \"./CarouselBar\"\nexport * from \"./Checkbox\"\nexport * from \"./CleanTag\"\nexport * from \"./Clickable\"\nexport * from \"./Collapse\"\nexport * from \"./CSSGrid\"\nexport * from \"./Dialog\"\nexport * from \"./Dropdown\"\nexport * from \"./EntityHeader\"\nexport * from \"./Expandable\"\nexport * from \"./FilterSelect\"\nexport * from \"./Flex\"\nexport * from \"./FullBleed\"\nexport * from \"./GridColumns\"\nexport * from \"./HorizontalOverflow\"\nexport * from \"./HTML\"\nexport * from \"./Image\"\nexport * from \"./Input\"\nexport * from \"./Join\"\nexport * from \"./Label\"\nexport * from \"./LabeledInput\"\nexport * from \"./Link\"\nexport * from \"./Marquee\"\nexport * from \"./Message\"\nexport * from \"./Modal\"\nexport * from \"./ModalDialog\"\nexport * from \"./MultiSelect\"\nexport * from \"./Pagination\"\nexport * from \"./PasswordInput\"\nexport * from \"./Pill\"\nexport * from \"./Popover\"\nexport * from \"./ProgressBar\"\nexport * from \"./ProgressDots\"\nexport * from \"./Radio\"\nexport * from \"./RadioGroup\"\nexport * from \"./Range\"\nexport * from \"./ReadMore\"\nexport * from \"./ResponsiveBox\"\nexport * from \"./Select\"\nexport * from \"./Separator\"\nexport * from \"./Shelf\"\nexport * from \"./ShowMore\"\nexport * from \"./Skeleton\"\nexport * from \"./Skip\"\nexport * from \"./Spacer\"\nexport * from \"./Spinner\"\nexport * from \"./StackableBorderBox\"\nexport * from \"./Stepper\"\nexport * from \"./Sup\"\nexport * from \"./Swiper\"\nexport * from \"./Tabs\"\nexport * from \"./Text\"\nexport * from \"./TextArea\"\nexport * from \"./Toasts\"\nexport * from \"./Tooltip\"\nexport * from \"./VisuallyHidden\"\n"],"file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette",
3
- "version": "28.1.1",
3
+ "version": "29.0.0",
4
4
  "description": "Design system library for react components",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -64,7 +64,6 @@
64
64
  "@types/debounce": "1.2.0",
65
65
  "@types/enzyme": "3.10.8",
66
66
  "@types/jest": "26.0.20",
67
- "@types/luxon": "1.15.1",
68
67
  "@types/node": "14.14.27",
69
68
  "@types/react": "17.0.2",
70
69
  "@types/react-dom": "17.0.1",
@@ -119,7 +118,6 @@
119
118
  "@seznam/compose-react-refs": "^1.0.6",
120
119
  "@styled-system/theme-get": "^5.1.2",
121
120
  "lodash": "^4.17.21",
122
- "luxon": "^1.15",
123
121
  "proportional-scale": "^4.0.0",
124
122
  "react-lazy-load-image-component": "1.5.5",
125
123
  "react-remove-scroll": "2.5.5",
@@ -176,5 +174,5 @@
176
174
  "<rootDir>/www/"
177
175
  ]
178
176
  },
179
- "gitHead": "e57cefcda538d82a8a9f02f5a2be6dc86b5aa86b"
177
+ "gitHead": "0d4b6ee3bf0c253329829f022fa66d70bb2da3a0"
180
178
  }
@@ -1,10 +0,0 @@
1
- import { DateTime } from "luxon";
2
- import React from "react";
3
- import { color } from "../../helpers";
4
- /** ProgressBarTimer */
5
- export declare const ProgressBarTimer: React.FC<{
6
- currentTime: string | DateTime;
7
- countdownStart: string;
8
- countdownEnd: string;
9
- highlight: Parameters<typeof color>[0];
10
- }>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ProgressBarTimer = void 0;
7
-
8
- var _luxon = require("luxon");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _ProgressBar = require("../ProgressBar");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- /** ProgressBarTimer */
17
- var ProgressBarTimer = function ProgressBarTimer(_ref) {
18
- var currentTime = _ref.currentTime,
19
- countdownStart = _ref.countdownStart,
20
- countdownEnd = _ref.countdownEnd,
21
- _ref$highlight = _ref.highlight,
22
- highlight = _ref$highlight === void 0 ? "purple100" : _ref$highlight;
23
-
24
- var secondsRemaining = _luxon.DateTime.fromISO(countdownEnd).diff(_luxon.DateTime.fromISO(currentTime.toString()), "seconds").seconds;
25
-
26
- var totalSeconds = _luxon.DateTime.fromISO(countdownEnd).diff(_luxon.DateTime.fromISO(countdownStart), "seconds").seconds;
27
-
28
- var progress = Math.max(0, secondsRemaining * 100 / totalSeconds);
29
- return /*#__PURE__*/_react.default.createElement(_ProgressBar.ProgressBar, {
30
- percentComplete: progress,
31
- highlight: highlight
32
- });
33
- };
34
-
35
- exports.ProgressBarTimer = ProgressBarTimer;
36
- ProgressBarTimer.displayName = "ProgressBarTimer";
37
- //# sourceMappingURL=ProgressBarTimer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/ProgressBarTimer/ProgressBarTimer.tsx"],"names":["ProgressBarTimer","currentTime","countdownStart","countdownEnd","highlight","secondsRemaining","DateTime","fromISO","diff","toString","seconds","totalSeconds","progress","Math","max"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA;AACO,IAAMA,gBAKX,GAAG,SALQA,gBAKR,OAKC;AAAA,MAJJC,WAII,QAJJA,WAII;AAAA,MAHJC,cAGI,QAHJA,cAGI;AAAA,MAFJC,YAEI,QAFJA,YAEI;AAAA,4BADJC,SACI;AAAA,MADJA,SACI,+BADQ,WACR;;AACJ,MAAMC,gBAAgB,GAAGC,gBAASC,OAAT,CAAiBJ,YAAjB,EAA+BK,IAA/B,CACvBF,gBAASC,OAAT,CAAiBN,WAAW,CAACQ,QAAZ,EAAjB,CADuB,EAEvB,SAFuB,EAGvBC,OAHF;;AAIA,MAAMC,YAAY,GAAGL,gBAASC,OAAT,CAAiBJ,YAAjB,EAA+BK,IAA/B,CACnBF,gBAASC,OAAT,CAAiBL,cAAjB,CADmB,EAEnB,SAFmB,EAGnBQ,OAHF;;AAIA,MAAME,QAAQ,GAAGC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAaT,gBAAgB,GAAG,GAApB,GAA2BM,YAAvC,CAAjB;AAEA,sBAAO,6BAAC,wBAAD;AAAa,IAAA,eAAe,EAAEC,QAA9B;AAAwC,IAAA,SAAS,EAAER;AAAnD,IAAP;AACD,CAtBM;;;AAAMJ,gB","sourcesContent":["import { DateTime } from \"luxon\"\nimport React from \"react\"\nimport { color } from \"../../helpers\"\nimport { ProgressBar } from \"../ProgressBar\"\n\n/** ProgressBarTimer */\nexport const ProgressBarTimer: React.FC<{\n currentTime: string | DateTime\n countdownStart: string\n countdownEnd: string\n highlight: Parameters<typeof color>[0]\n}> = ({\n currentTime,\n countdownStart,\n countdownEnd,\n highlight = \"purple100\",\n}) => {\n const secondsRemaining = DateTime.fromISO(countdownEnd).diff(\n DateTime.fromISO(currentTime.toString()),\n \"seconds\"\n ).seconds\n const totalSeconds = DateTime.fromISO(countdownEnd).diff(\n DateTime.fromISO(countdownStart),\n \"seconds\"\n ).seconds\n const progress = Math.max(0, (secondsRemaining * 100) / totalSeconds)\n\n return <ProgressBar percentComplete={progress} highlight={highlight as any} />\n}\n"],"file":"ProgressBarTimer.js"}
@@ -1 +0,0 @@
1
- export * from "./ProgressBarTimer";
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _ProgressBarTimer = require("./ProgressBarTimer");
8
-
9
- Object.keys(_ProgressBarTimer).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _ProgressBarTimer[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return _ProgressBarTimer[key];
16
- }
17
- });
18
- });
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/ProgressBarTimer/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./ProgressBarTimer\"\n"],"file":"index.js"}
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- /**
3
- * StaticCountdownTimer
4
- * @deprecated
5
- */
6
- export declare const StaticCountdownTimer: React.FC<{
7
- action: string;
8
- note: string;
9
- countdownStart: string;
10
- countdownEnd: string;
11
- currentTime?: string;
12
- }>;
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.StaticCountdownTimer = void 0;
7
-
8
- var _luxon = require("luxon");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _TimerIcon = require("../../svgs/TimerIcon");
13
-
14
- var _useCurrentTime = require("../../utils/useCurrentTime");
15
-
16
- var _Flex = require("../Flex");
17
-
18
- var _ProgressBarTimer = require("../ProgressBarTimer");
19
-
20
- var _Spacer = require("../Spacer");
21
-
22
- var _StackableBorderBox = require("../StackableBorderBox");
23
-
24
- var _Text = require("../Text");
25
-
26
- var _TimeRemaining = require("../TimeRemaining");
27
-
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
- var FIVE_HOURS_IN_SECONDS = 60 * 60 * 5;
31
- /**
32
- * StaticCountdownTimer
33
- * @deprecated
34
- */
35
-
36
- var StaticCountdownTimer = function StaticCountdownTimer(_ref) {
37
- var action = _ref.action,
38
- note = _ref.note,
39
- countdownEnd = _ref.countdownEnd,
40
- countdownStart = _ref.countdownStart,
41
- currentTime = _ref.currentTime;
42
-
43
- var endDateTime = _luxon.DateTime.fromISO(countdownEnd).toLocal();
44
-
45
- var minutes = endDateTime.minute < 10 ? "0" + endDateTime.minute : endDateTime.minute;
46
- var amPm = endDateTime.hour >= 12 ? "pm" : "am";
47
- var hour;
48
-
49
- if (endDateTime.hour > 12) {
50
- hour = endDateTime.hour - 12;
51
- } else if (endDateTime.hour === 0) {
52
- hour = 12;
53
- } else {
54
- hour = endDateTime.hour;
55
- }
56
-
57
- var time = "".concat(hour, ":").concat(minutes).concat(amPm);
58
- var actionDeadline = "".concat(endDateTime.monthShort, " ").concat(endDateTime.day, ", ").concat(time, " ").concat(endDateTime.offsetNameShort);
59
- var highlight = endDateTime.diff(_luxon.DateTime.fromISO((0, _useCurrentTime.useCurrentTime)(currentTime).toString()), "seconds").seconds < FIVE_HOURS_IN_SECONDS ? "red100" : "brand";
60
- return /*#__PURE__*/_react.default.createElement(_StackableBorderBox.StackableBorderBox, {
61
- flexDirection: "column"
62
- }, /*#__PURE__*/_react.default.createElement(_Flex.Flex, {
63
- justifyContent: "flex-start"
64
- }, /*#__PURE__*/_react.default.createElement(_TimerIcon.TimerIcon, {
65
- width: "14",
66
- height: "17",
67
- fill: highlight,
68
- style: {
69
- marginTop: "1.5px"
70
- }
71
- }), /*#__PURE__*/_react.default.createElement(_Spacer.Spacer, {
72
- x: "7px"
73
- }), /*#__PURE__*/_react.default.createElement(_TimeRemaining.TimeRemaining, {
74
- countdownEnd: countdownEnd,
75
- highlight: highlight,
76
- currentTime: (0, _useCurrentTime.useCurrentTime)(currentTime),
77
- timeEndedDisplayText: "0 days left",
78
- trailingText: "left"
79
- })), /*#__PURE__*/_react.default.createElement(_ProgressBarTimer.ProgressBarTimer, {
80
- countdownStart: countdownStart,
81
- countdownEnd: countdownEnd,
82
- currentTime: (0, _useCurrentTime.useCurrentTime)(currentTime),
83
- highlight: highlight
84
- }), /*#__PURE__*/_react.default.createElement(_Text.Text, {
85
- variant: "xs",
86
- fontWeight: "bold",
87
- color: "black100"
88
- }, action, " by ", actionDeadline), /*#__PURE__*/_react.default.createElement(_Text.Text, {
89
- variant: "xs",
90
- color: "black60"
91
- }, note));
92
- };
93
-
94
- exports.StaticCountdownTimer = StaticCountdownTimer;
95
- StaticCountdownTimer.displayName = "StaticCountdownTimer";
96
- //# sourceMappingURL=StaticCountdownTimer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/StaticCountdownTimer/StaticCountdownTimer.tsx"],"names":["FIVE_HOURS_IN_SECONDS","StaticCountdownTimer","action","note","countdownEnd","countdownStart","currentTime","endDateTime","DateTime","fromISO","toLocal","minutes","minute","amPm","hour","time","actionDeadline","monthShort","day","offsetNameShort","highlight","diff","toString","seconds","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,qBAAqB,GAAG,KAAK,EAAL,GAAU,CAAxC;AAEA;AACA;AACA;AACA;;AACO,IAAMC,oBAMX,GAAG,SANQA,oBAMR,OAAiE;AAAA,MAA9DC,MAA8D,QAA9DA,MAA8D;AAAA,MAAtDC,IAAsD,QAAtDA,IAAsD;AAAA,MAAhDC,YAAgD,QAAhDA,YAAgD;AAAA,MAAlCC,cAAkC,QAAlCA,cAAkC;AAAA,MAAlBC,WAAkB,QAAlBA,WAAkB;;AACpE,MAAMC,WAAW,GAAGC,gBAASC,OAAT,CAAiBL,YAAjB,EAA+BM,OAA/B,EAApB;;AACA,MAAMC,OAAO,GACXJ,WAAW,CAACK,MAAZ,GAAqB,EAArB,GAA0B,MAAML,WAAW,CAACK,MAA5C,GAAqDL,WAAW,CAACK,MADnE;AAEA,MAAMC,IAAI,GAAGN,WAAW,CAACO,IAAZ,IAAoB,EAApB,GAAyB,IAAzB,GAAgC,IAA7C;AACA,MAAIA,IAAJ;;AACA,MAAIP,WAAW,CAACO,IAAZ,GAAmB,EAAvB,EAA2B;AACzBA,IAAAA,IAAI,GAAGP,WAAW,CAACO,IAAZ,GAAmB,EAA1B;AACD,GAFD,MAEO,IAAIP,WAAW,CAACO,IAAZ,KAAqB,CAA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Ad;AAAmB,IAAA,UAAU,EAAC,MAA9B;AAAqC,IAAA,KAAK,EAAC;AAA3C,KACGlB,MADH,UACec,cADf,CAvBF,eA0BE,6BAAC,UAAD;AAAM,IAAA,OAAO,EAAC,IAAd;AAAmB,IAAA,KAAK,EAAC;AAAzB,KACGb,IADH,CA1BF,CADF;AAgCD,CA/DM;;;AAAMF,oB","sourcesContent":["import { DateTime } from \"luxon\"\nimport React from \"react\"\nimport { TimerIcon } from \"../../svgs/TimerIcon\"\nimport { useCurrentTime } from \"../../utils/useCurrentTime\"\nimport { Flex } from \"../Flex\"\nimport { ProgressBarTimer } from \"../ProgressBarTimer\"\nimport { Spacer } from \"../Spacer\"\nimport { StackableBorderBox } from \"../StackableBorderBox\"\nimport { Text } from \"../Text\"\nimport { TimeRemaining } from \"../TimeRemaining\"\n\nconst FIVE_HOURS_IN_SECONDS = 60 * 60 * 5\n\n/**\n * StaticCountdownTimer\n * @deprecated\n */\nexport const StaticCountdownTimer: React.FC<{\n action: string\n note: string\n countdownStart: string\n countdownEnd: string\n currentTime?: string\n}> = ({ action, note, countdownEnd, countdownStart, currentTime }) => {\n const endDateTime = DateTime.fromISO(countdownEnd).toLocal()\n const minutes =\n endDateTime.minute < 10 ? \"0\" + endDateTime.minute : endDateTime.minute\n const amPm = endDateTime.hour >= 12 ? \"pm\" : \"am\"\n let hour\n if (endDateTime.hour > 12) {\n hour = endDateTime.hour - 12\n } else if (endDateTime.hour === 0) {\n hour = 12\n } else {\n hour = endDateTime.hour\n }\n\n const time = `${hour}:${minutes}${amPm}`\n const actionDeadline = `${endDateTime.monthShort} ${endDateTime.day}, ${time} ${endDateTime.offsetNameShort}`\n\n const highlight =\n endDateTime.diff(\n DateTime.fromISO(useCurrentTime(currentTime).toString()),\n \"seconds\"\n ).seconds < FIVE_HOURS_IN_SECONDS\n ? \"red100\"\n : \"brand\"\n\n return (\n <StackableBorderBox flexDirection=\"column\">\n <Flex justifyContent=\"flex-start\">\n <TimerIcon\n width=\"14\"\n height=\"17\"\n fill={highlight}\n style={{ marginTop: \"1.5px\" }}\n />\n <Spacer x=\"7px\" />\n <TimeRemaining\n countdownEnd={countdownEnd}\n highlight={highlight}\n currentTime={useCurrentTime(currentTime)}\n timeEndedDisplayText=\"0 days left\"\n trailingText=\"left\"\n />\n </Flex>\n <ProgressBarTimer\n countdownStart={countdownStart}\n countdownEnd={countdownEnd}\n currentTime={useCurrentTime(currentTime)}\n highlight={highlight}\n />\n <Text variant=\"xs\" fontWeight=\"bold\" color=\"black100\">\n {action} by {actionDeadline}\n </Text>\n <Text variant=\"xs\" color=\"black60\">\n {note}\n </Text>\n </StackableBorderBox>\n )\n}\n"],"file":"StaticCountdownTimer.js"}
@@ -1 +0,0 @@
1
- export * from "./StaticCountdownTimer";
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _StaticCountdownTimer = require("./StaticCountdownTimer");
8
-
9
- Object.keys(_StaticCountdownTimer).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _StaticCountdownTimer[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return _StaticCountdownTimer[key];
16
- }
17
- });
18
- });
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/StaticCountdownTimer/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./StaticCountdownTimer\"\n"],"file":"index.js"}
@@ -1,15 +0,0 @@
1
- import { DateTime } from "luxon";
2
- import React from "react";
3
- /**
4
- * TimeRemaining
5
- * @deprecated
6
- */
7
- export declare const TimeRemaining: React.FC<{
8
- countdownEnd: string;
9
- currentTime?: string | DateTime;
10
- highlight: string;
11
- labelWithoutTimeRemaining?: string;
12
- labelWithTimeRemaining?: string;
13
- timeEndedDisplayText?: string;
14
- trailingText?: string;
15
- }>;
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TimeRemaining = void 0;
7
-
8
- var _luxon = require("luxon");
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _useCurrentTime = require("../../utils/useCurrentTime");
13
-
14
- var _Flex = require("../Flex");
15
-
16
- var _Text = require("../Text");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function padWithZero(num) {
21
- return num.toString().padStart(2, "0");
22
- }
23
- /**
24
- * TimeRemaining
25
- * @deprecated
26
- */
27
-
28
-
29
- var TimeRemaining = function TimeRemaining(_ref) {
30
- var countdownEnd = _ref.countdownEnd,
31
- currentTime = _ref.currentTime,
32
- _ref$highlight = _ref.highlight,
33
- highlight = _ref$highlight === void 0 ? "brand" : _ref$highlight,
34
- labelWithoutTimeRemaining = _ref.labelWithoutTimeRemaining,
35
- labelWithTimeRemaining = _ref.labelWithTimeRemaining,
36
- timeEndedDisplayText = _ref.timeEndedDisplayText,
37
- trailingText = _ref.trailingText;
38
-
39
- var duration = _luxon.Duration.fromISO(_luxon.DateTime.fromISO(countdownEnd).diff((0, _useCurrentTime.useCurrentTime)(currentTime)).toString());
40
-
41
- var hasEnded = Math.floor(duration.seconds) <= 0;
42
- var days = "".concat(padWithZero(Math.max(0, Math.floor(duration.as("days")))), "d ");
43
- var hours = "".concat(padWithZero(Math.max(0, Math.floor(duration.as("hours") % 24))), "h ");
44
- var minutes = "".concat(padWithZero(Math.max(0, Math.floor(duration.as("minutes") % 60))), "m ");
45
- var seconds = "".concat(padWithZero(Math.max(0, Math.floor(duration.as("seconds") % 60))), "s");
46
- return /*#__PURE__*/_react.default.createElement(_Flex.Flex, {
47
- flexDirection: "column",
48
- alignItems: "center"
49
- }, /*#__PURE__*/_react.default.createElement(_Text.Text, {
50
- variant: "sm",
51
- color: highlight,
52
- fontWeight: "bold"
53
- }, hasEnded && timeEndedDisplayText ? timeEndedDisplayText : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, days, hours, minutes, seconds, trailingText && " ".concat(trailingText))), (labelWithTimeRemaining || labelWithoutTimeRemaining) && /*#__PURE__*/_react.default.createElement(_Text.Text, {
54
- variant: "sm",
55
- fontWeight: "bold"
56
- }, hasEnded ? labelWithoutTimeRemaining : labelWithTimeRemaining));
57
- };
58
-
59
- exports.TimeRemaining = TimeRemaining;
60
- TimeRemaining.displayName = "TimeRemaining";
61
- //# sourceMappingURL=TimeRemaining.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/TimeRemaining/TimeRemaining.tsx"],"names":["padWithZero","num","toString","padStart","TimeRemaining","countdownEnd","currentTime","highlight","labelWithoutTimeRemaining","labelWithTimeRemaining","timeEndedDisplayText","trailingText","duration","Duration","fromISO","DateTime","diff","hasEnded","Math","floor","seconds","days","max","as","hours","minutes"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,SAASA,WAAT,CAAqBC,GAArB,EAAkC;AAChC,SAAOA,GAAG,CAACC,QAAJ,GAAeC,QAAf,CAAwB,CAAxB,EAA2B,GAA3B,CAAP;AACD;AAED;AACA;AACA;AACA;;;AACO,IAAMC,aAQX,GAAG,SARQA,aAQR,OAQC;AAAA,MAPJC,YAOI,QAPJA,YAOI;AAAA,MANJC,WAMI,QANJA,WAMI;AAAA,4BALJC,SAKI;AAAA,MALJA,SAKI,+BALQ,OAKR;AAAA,MAJJC,yBAII,QAJJA,yBAII;AAAA,MAHJC,sBAGI,QAHJA,sBAGI;AAAA,MAFJC,oBAEI,QAFJA,oBAEI;AAAA,MADJC,YACI,QADJA,YACI;;AACJ,MAAMC,QAAQ,GAAGC,gBAASC,OAAT,CACfC,gBAASD,OAAT,CAAiBT,YAAjB,EAA+BW,IAA/B,CAAoC,oCAAeV,WAAf,CAApC,EAAiEJ,QAAjE,E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AC,IAAd;AAAmB,IAAA,UAAU,EAAC;AAA9B,KACGS,QAAQ,GAAGT,yBAAH,GAA+BC,sBAD1C,CAhBJ,CADF;AAuBD,CAzDM;;;AAAML,a","sourcesContent":["import { DateTime, Duration } from \"luxon\"\nimport React from \"react\"\nimport { useCurrentTime } from \"../../utils/useCurrentTime\"\nimport { Flex } from \"../Flex\"\nimport { Text } from \"../Text\"\n\nfunction padWithZero(num: number) {\n return num.toString().padStart(2, \"0\")\n}\n\n/**\n * TimeRemaining\n * @deprecated\n */\nexport const TimeRemaining: React.FC<{\n countdownEnd: string\n currentTime?: string | DateTime\n highlight: string\n labelWithoutTimeRemaining?: string\n labelWithTimeRemaining?: string\n timeEndedDisplayText?: string\n trailingText?: string\n}> = ({\n countdownEnd,\n currentTime,\n highlight = \"brand\",\n labelWithoutTimeRemaining,\n labelWithTimeRemaining,\n timeEndedDisplayText,\n trailingText,\n}) => {\n const duration = Duration.fromISO(\n DateTime.fromISO(countdownEnd).diff(useCurrentTime(currentTime)).toString()\n )\n\n const hasEnded = Math.floor(duration.seconds) <= 0\n\n const days = `${padWithZero(Math.max(0, Math.floor(duration.as(\"days\"))))}d `\n const hours = `${padWithZero(\n Math.max(0, Math.floor(duration.as(\"hours\") % 24))\n )}h `\n const minutes = `${padWithZero(\n Math.max(0, Math.floor(duration.as(\"minutes\") % 60))\n )}m `\n const seconds = `${padWithZero(\n Math.max(0, Math.floor(duration.as(\"seconds\") % 60))\n )}s`\n\n return (\n <Flex flexDirection=\"column\" alignItems=\"center\">\n <Text variant=\"sm\" color={highlight} fontWeight=\"bold\">\n {hasEnded && timeEndedDisplayText ? (\n timeEndedDisplayText\n ) : (\n <>\n {days}\n {hours}\n {minutes}\n {seconds}\n {trailingText && ` ${trailingText}`}\n </>\n )}\n </Text>\n\n {(labelWithTimeRemaining || labelWithoutTimeRemaining) && (\n <Text variant=\"sm\" fontWeight=\"bold\">\n {hasEnded ? labelWithoutTimeRemaining : labelWithTimeRemaining}\n </Text>\n )}\n </Flex>\n )\n}\n"],"file":"TimeRemaining.js"}
@@ -1 +0,0 @@
1
- export * from "./TimeRemaining";
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _TimeRemaining = require("./TimeRemaining");
8
-
9
- Object.keys(_TimeRemaining).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _TimeRemaining[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return _TimeRemaining[key];
16
- }
17
- });
18
- });
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/elements/TimeRemaining/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./TimeRemaining\"\n"],"file":"index.js"}
@@ -1,5 +0,0 @@
1
- import { DateTime } from "luxon";
2
- /**
3
- * useCurrentTime
4
- */
5
- export declare function useCurrentTime(currentTime: any): DateTime;
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCurrentTime = useCurrentTime;
7
-
8
- var _luxon = require("luxon");
9
-
10
- var _react = require("react");
11
-
12
- var _useInterval = require("./useInterval");
13
-
14
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
-
16
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
-
18
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
-
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
-
22
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
23
-
24
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
-
26
- /**
27
- * useCurrentTime
28
- */
29
- function useCurrentTime(currentTime) {
30
- var _useState = (0, _react.useState)(currentTime ? _luxon.DateTime.fromISO(currentTime.toString()) : _luxon.DateTime.local()),
31
- _useState2 = _slicedToArray(_useState, 2),
32
- now = _useState2[0],
33
- setNow = _useState2[1];
34
-
35
- (0, _useInterval.useInterval)(function () {
36
- setNow(currentTime ? _luxon.DateTime.fromISO(currentTime.toString()) : _luxon.DateTime.local());
37
- }, 1000);
38
- return now;
39
- }
40
- //# sourceMappingURL=useCurrentTime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/useCurrentTime.ts"],"names":["useCurrentTime","currentTime","DateTime","fromISO","toString","local","now","setNow"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;AAEA;AACA;AACA;AACO,SAASA,cAAT,CAAwBC,WAAxB,EAAqC;AAC1C,kBAAsB,qBACpBA,WAAW,GAAGC,gBAASC,OAAT,CAAiBF,WAAW,CAACG,QAAZ,EAAjB,CAAH,GAA8CF,gBAASG,KAAT,EADrC,CAAtB;AAAA;AAAA,MAAOC,GAAP;AAAA,MAAYC,MAAZ;;AAIA,gCAAY,YAAM;AAChBA,IAAAA,MAAM,CACJN,WAAW,GAAGC,gBAASC,OAAT,CAAiBF,WAAW,CAACG,QAAZ,EAAjB,CAAH,GAA8CF,gBAASG,KAAT,EADrD,CAAN;AAGD,GAJD,EAIG,IAJH;AAMA,SAAOC,GAAP;AACD","sourcesContent":["import { DateTime } from \"luxon\"\nimport { useState } from \"react\"\nimport { useInterval } from \"./useInterval\"\n\n/**\n * useCurrentTime\n */\nexport function useCurrentTime(currentTime) {\n const [now, setNow] = useState(\n currentTime ? DateTime.fromISO(currentTime.toString()) : DateTime.local()\n )\n\n useInterval(() => {\n setNow(\n currentTime ? DateTime.fromISO(currentTime.toString()) : DateTime.local()\n )\n }, 1000)\n\n return now\n}\n"],"file":"useCurrentTime.js"}