@streamlayer/react-ui 0.66.0 → 0.67.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/LeaderBoard_16p26hz-4ed993c7.js +1 -0
  2. package/lib/assets/style.css +1 -0
  3. package/lib/index.js +4 -5
  4. package/lib/index_4nhkck-4ed993c7.js +1 -0
  5. package/lib/masters_k70xsy-4ed993c7.js +1 -0
  6. package/lib/ui/app/Features/FeatureProvider.js +1 -1
  7. package/lib/ui/app/Features/Gamification/Question.js +47 -34
  8. package/lib/ui/app/Features/Gamification/gamification-feature.d.ts +2 -0
  9. package/lib/ui/app/Features/Gamification/gamification-feature.js +66 -0
  10. package/lib/ui/app/Features/Gamification/index.d.ts +0 -1
  11. package/lib/ui/app/Features/Gamification/index.js +51 -38
  12. package/lib/ui/app/Features/index.js +1 -1
  13. package/lib/ui/app/Navigation/MastersNavigation/index.js +13 -10
  14. package/lib/ui/app/Navigation/index.js +13 -12
  15. package/lib/ui/app/Notifications/Onboarding/Notification/index.d.ts +8 -0
  16. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +21 -0
  17. package/lib/ui/app/Notifications/Onboarding/Notification/styles.d.ts +10 -0
  18. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +52 -0
  19. package/lib/ui/app/Notifications/Onboarding/index.js +95 -73
  20. package/lib/ui/app/Notifications/index.js +37 -13
  21. package/lib/ui/app/Notifications/styles.js +8 -13
  22. package/lib/ui/app/masters.js +49 -28
  23. package/lib/ui/app/styles.js +20 -35
  24. package/lib/ui/app/useMastersApp.js +52 -36
  25. package/lib/ui/button/styles.js +12 -42
  26. package/lib/ui/gamification/detail/header/styles.js +33 -55
  27. package/lib/ui/gamification/detail/sponsor/index.js +18 -11
  28. package/lib/ui/gamification/insight/styles.js +40 -61
  29. package/lib/ui/gamification/insight-list/styles.js +11 -17
  30. package/lib/ui/gamification/invite-link/styles.js +31 -45
  31. package/lib/ui/gamification/leaderboard/list-item/styles.js +42 -64
  32. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +31 -44
  33. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +72 -99
  34. package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.js +41 -80
  35. package/lib/ui/gamification/onboarding/styles.js +38 -48
  36. package/lib/ui/gamification/points/index.d.ts +1 -1
  37. package/lib/ui/gamification/points/index.js +4 -6
  38. package/lib/ui/gamification/points/styles.js +32 -81
  39. package/lib/ui/gamification/question/insight/styles.js +11 -51
  40. package/lib/ui/gamification/question/list/styles.js +7 -9
  41. package/lib/ui/gamification/question/notification/insight/styles.js +27 -64
  42. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.js +82 -163
  43. package/lib/ui/gamification/question/notification/prediction-result/styles.js +53 -128
  44. package/lib/ui/gamification/question/notification/styles.js +43 -83
  45. package/lib/ui/gamification/question/notification/tweet/styles.js +35 -64
  46. package/lib/ui/gamification/question/styles.js +68 -94
  47. package/lib/ui/gamification/question/twitter/styles.js +13 -23
  48. package/lib/ui/gamification/tabs/styles.js +22 -65
  49. package/lib/ui/gamification/user-statistics/components/rank/styles.js +17 -23
  50. package/lib/ui/gamification/user-statistics/components/statistic/styles.js +17 -21
  51. package/lib/ui/gamification/user-statistics/styles.js +85 -120
  52. package/lib/ui/gamification/vote/expired-alert/styles.js +17 -27
  53. package/lib/ui/gamification/vote/feedback/styles.js +36 -64
  54. package/lib/ui/gamification/vote/insight-details/styles.js +12 -23
  55. package/lib/ui/gamification/vote/styles.js +22 -31
  56. package/lib/ui/gamification/vote/twitter-details/styles.js +7 -9
  57. package/lib/ui/gamification/vote/vote-option/styles.js +63 -147
  58. package/lib/ui/gamification/vote/win-bar/styles.js +37 -45
  59. package/lib/ui/icons/index.js +29 -14
  60. package/lib/ui/login/styles.js +37 -69
  61. package/lib/ui/navigation/button/Channels.js +19 -27
  62. package/lib/ui/navigation/button/FeaturedGroups.js +18 -26
  63. package/lib/ui/navigation/button/LeaderBoard.js +20 -21
  64. package/lib/ui/navigation/button/styles.js +16 -56
  65. package/lib/ui/navigation/index.js +13 -7
  66. package/lib/ui/navigation/masters.js +8 -32
  67. package/lib/ui/questions/insight/styles.js +26 -30
  68. package/lib/ui/questions/twitter/account/styles.js +30 -35
  69. package/lib/ui/questions/twitter/styles.js +31 -42
  70. package/lib/ui/show-in/index.js +18 -63
  71. package/lib/ui/theme/index.js +3 -4
  72. package/lib/ui/theme/masters.js +2 -9
  73. package/lib/ui/theme/theme.js +36 -32
  74. package/lib/ui/timer/index.js +36 -32
  75. package/lib/ui/video-player/styles.js +22 -27
  76. package/lib/utils/debug/components/bypassLogin.js +44 -60
  77. package/lib/utils/debug/components/developer.js +54 -86
  78. package/lib/utils/debug/components/envToggle.js +33 -58
  79. package/lib/utils/debug/components/eventInput.js +4 -4
  80. package/lib/utils/debug/components/styles.js +7 -49
  81. package/lib/utils/decorators/container.js +3 -4
  82. package/lib/utils/decorators/styles.js +7 -21
  83. package/package.json +13 -9
@@ -1,59 +1,19 @@
1
- import { styled as r } from "@linaria/react";
2
- const e = r.button`
3
- display: flex;
4
- align-items: center;
5
- justify-content: center;
6
- min-height: 36px;
7
- max-height: 36px;
8
- background-color: var(--color-white);
9
- border-radius: 100px;
10
- border: 1px solid var(--color-neutrals-gray3);
11
- color: var(--color-primary-green1);
12
- padding: 0px 8px;
13
- font-size: 12px;
14
- font-weight: var(--font-weight-default);
15
- letter-spacing: -0.5px;
16
- cursor: pointer;
17
-
18
- &:hover {
19
- border-color: var(--color-primary-green1);
20
- }
21
-
22
- &[data-selected='true'] {
23
- color: var(--color-white);
24
- background-color: var(--color-primary-green1);
25
- border-color: var(--color-primary-green1);
26
-
27
- &:hover {
28
- cursor: default;
29
- }
30
-
31
- &:disabled {
32
- &:hover {
33
- border-color: var(--color-primary-green1);
34
- }
35
- }
36
- }
37
-
38
- &:disabled {
39
- opacity: 0.5;
40
- cursor: default;
41
-
42
- &:hover {
43
- cursor: default;
44
- border-color: var(--color-neutrals-gray3);
45
- }
46
- }
47
- `, t = r.span`
48
- display: flex;
49
- width: 22px;
50
- height: 22px;
51
- justify-content: center;
52
- align-items: center;
53
- margin-right: 5px;
54
- `, a = r.span``;
1
+ import { styled as s } from "@linaria/react";
2
+ const o = /* @__PURE__ */ s("button")({
3
+ name: "SButton",
4
+ class: "sxxa0c",
5
+ propsAsIs: !1
6
+ }), n = /* @__PURE__ */ s("span")({
7
+ name: "ButtonIcon",
8
+ class: "b193dcyu",
9
+ propsAsIs: !1
10
+ }), a = /* @__PURE__ */ s("span")({
11
+ name: "ButtonLabel",
12
+ class: "b40tuix",
13
+ propsAsIs: !1
14
+ });
55
15
  export {
56
- t as ButtonIcon,
16
+ n as ButtonIcon,
57
17
  a as ButtonLabel,
58
- e as SButton
18
+ o as SButton
59
19
  };
@@ -1,11 +1,17 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import { styled as r } from "@linaria/react";
3
- const n = r.div`
4
- display: flex;
5
- align-items: center;
6
- justify-content: space-between;
7
- background-color: var(--color-neutrals-white);
8
- `, a = ({ children: t, className: o }) => /* @__PURE__ */ e(n, { className: o, children: t });
3
+ import "../../index_4nhkck-4ed993c7.js";
4
+ const n = /* @__PURE__ */ r("div")({
5
+ name: "Buttons",
6
+ class: "b6tbwuy",
7
+ propsAsIs: !1
8
+ }), a = ({
9
+ children: t,
10
+ className: o
11
+ }) => /* @__PURE__ */ s(n, {
12
+ className: o,
13
+ children: t
14
+ });
9
15
  export {
10
16
  a as Navigation
11
17
  };
@@ -1,37 +1,13 @@
1
1
  import { styled as o } from "@linaria/react";
2
- import { Navigation as i } from "./index.js";
2
+ import { Navigation as t } from "./index.js";
3
+ import "../../masters_k70xsy-4ed993c7.js";
3
4
  import "react/jsx-runtime";
4
- const n = o(i)`
5
- position: absolute;
6
- top: 0;
7
- left: 0;
8
- right: 0;
9
-
10
- box-sizing: border-box;
11
- overflow: hidden;
12
- opacity: 0;
13
-
14
- animation: show-nav 0.5s ease;
15
- animation-fill-mode: forwards;
16
-
17
- padding: var(--container-padding);
18
- border-bottom: 1px solid var(--color-neutrals-gray3);
19
-
20
- & > button:not(:last-child) {
21
- margin-right: 8px;
22
- }
23
-
24
- @keyframes show-nav {
25
- 90% {
26
- opacity: 0;
27
- }
28
-
29
- 100% {
30
- height: 68px;
31
- opacity: 1;
32
- }
33
- }
34
- `;
5
+ import "../../index_4nhkck-4ed993c7.js";
6
+ const i = () => t, n = /* @__PURE__ */ o(i())({
7
+ name: "Navigation",
8
+ class: "n19lpak2",
9
+ propsAsIs: !0
10
+ });
35
11
  export {
36
12
  n as Navigation
37
13
  };
@@ -1,33 +1,29 @@
1
- import { styled as t } from "@linaria/react";
2
- const e = t.div`
3
- display: flex;
4
- flex-direction: column;
5
- row-gap: 16px;
6
- `, i = t.div`
7
- display: flex;
8
- flex-direction: column;
9
- row-gap: 12px;
10
- `, n = t.h3`
11
- color: var(--color-primary-green1);
12
- font-size: 16px;
13
- line-height: 26px;
14
- font-family: var(--font-serif);
15
- font-weight: var(--font-weight-default);
16
- `, r = t.div`
17
- color: var(--color-neutrals-gray9);
18
- font-size: 14px;
19
- line-height: 24px;
20
- font-weight: var(--font-weight-default);
21
- `, l = t.div`
22
- color: var(--color-neutrals-gray7);
23
- font-size: 12px;
24
- font-weight: var(--font-weight-default);
25
- line-height: 18px;
26
- `;
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "cgn5uen",
5
+ propsAsIs: !1
6
+ }), n = /* @__PURE__ */ s("div")({
7
+ name: "Content",
8
+ class: "c1px8nt6",
9
+ propsAsIs: !1
10
+ }), a = /* @__PURE__ */ s("h3")({
11
+ name: "Title",
12
+ class: "t5et2jt",
13
+ propsAsIs: !1
14
+ }), o = /* @__PURE__ */ s("div")({
15
+ name: "Description",
16
+ class: "d1i2kpk2",
17
+ propsAsIs: !1
18
+ }), p = /* @__PURE__ */ s("div")({
19
+ name: "DateWrap",
20
+ class: "dd3lh3p",
21
+ propsAsIs: !1
22
+ });
27
23
  export {
28
24
  e as Container,
29
- i as Content,
30
- l as DateWrap,
31
- r as Description,
32
- n as Title
25
+ n as Content,
26
+ p as DateWrap,
27
+ o as Description,
28
+ a as Title
33
29
  };
@@ -1,39 +1,34 @@
1
- import { styled as e } from "@linaria/react";
2
- const i = e.div`
3
- display: flex;
4
- align-items: center;
5
- column-gap: 8px;
6
- `, n = e.div`
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- `, o = e.img`
11
- width: 46px;
12
- height: 46px;
13
- object-fit: cover;
14
- object-position: center;
15
- border-radius: 50%;
16
- `, a = e.div`
17
- display: flex;
18
- flex-direction: column;
19
- row-gap: 2px;
20
- color: var(--color-neutrals-gray9);
21
- font-weight: var(--font-weight-default);
22
- `, r = e.div`
23
- display: flex;
24
- align-items: center;
25
- column-gap: 4px;
26
- font-size: 12px;
27
- font-family: var(--font-serif);
28
- `, l = e.div`
29
- font-size: 12px;
30
- line-height: 20px;
31
- `;
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "cjq447q",
5
+ propsAsIs: !1
6
+ }), n = /* @__PURE__ */ s("div")({
7
+ name: "ImageContainer",
8
+ class: "i14egogb",
9
+ propsAsIs: !1
10
+ }), o = /* @__PURE__ */ s("img")({
11
+ name: "Image",
12
+ class: "i2g9g4l",
13
+ propsAsIs: !1
14
+ }), l = /* @__PURE__ */ s("div")({
15
+ name: "Details",
16
+ class: "d1c454nm",
17
+ propsAsIs: !1
18
+ }), m = /* @__PURE__ */ s("div")({
19
+ name: "Name",
20
+ class: "n11nigc3",
21
+ propsAsIs: !1
22
+ }), t = /* @__PURE__ */ s("div")({
23
+ name: "UserName",
24
+ class: "urxa4k8",
25
+ propsAsIs: !1
26
+ });
32
27
  export {
33
- i as Container,
34
- a as Details,
28
+ e as Container,
29
+ l as Details,
35
30
  o as Image,
36
31
  n as ImageContainer,
37
- r as Name,
38
- l as UserName
32
+ m as Name,
33
+ t as UserName
39
34
  };
@@ -1,45 +1,34 @@
1
- import { styled as o } from "@linaria/react";
2
- const e = o.div`
3
- display: flex;
4
- flex-direction: column;
5
- row-gap: 8px;
6
- `, r = o.div`
7
- color: var(--color-neutrals-gray7);
8
- font-size: 12px;
9
- font-weight: var(--font-weight-default);
10
- line-height: 18px;
11
- `, i = o.blockquote`
12
- display: flex;
13
- column-gap: 12px;
14
- padding: 4px 16px 8px 0;
15
- color: var(--color-primary-green2);
16
- font-size: 12px;
17
- font-family: var(--font-serif);
18
- font-weight: var(--font-weight-default);
19
-
20
- &:before {
21
- content: '';
22
- width: 2px;
23
- background-color: var(--color-primary-green2);
24
- }
25
- `, n = o.div`
26
- display: flex;
27
- flex-direction: column;
28
- row-gap: 12px;
29
- `, a = o.div`
30
- color: var(--color-neutrals-gray9);
31
- font-size: 12px;
32
- font-weight: var(--font-weight-default);
33
- line-height: 18px;
34
- `, l = o.img`
35
- max-width: 100%;
36
- border-radius: 8px;
37
- `;
1
+ import { styled as s } from "@linaria/react";
2
+ const a = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "c1kzqw87",
5
+ propsAsIs: !1
6
+ }), o = /* @__PURE__ */ s("div")({
7
+ name: "DateTime",
8
+ class: "d9r1hf9",
9
+ propsAsIs: !1
10
+ }), t = /* @__PURE__ */ s("blockquote")({
11
+ name: "Quote",
12
+ class: "qezygt5",
13
+ propsAsIs: !1
14
+ }), n = /* @__PURE__ */ s("div")({
15
+ name: "Details",
16
+ class: "d1y8f7ym",
17
+ propsAsIs: !1
18
+ }), l = /* @__PURE__ */ s("div")({
19
+ name: "Body",
20
+ class: "b18gwonx",
21
+ propsAsIs: !1
22
+ }), c = /* @__PURE__ */ s("img")({
23
+ name: "Image",
24
+ class: "i3g0xjd",
25
+ propsAsIs: !1
26
+ });
38
27
  export {
39
- a as Body,
40
- e as Container,
41
- r as DateTime,
28
+ l as Body,
29
+ a as Container,
30
+ o as DateTime,
42
31
  n as Details,
43
- l as Image,
44
- i as Quote
32
+ c as Image,
33
+ t as Quote
45
34
  };
@@ -1,65 +1,20 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { css as r, cx as e } from "@linaria/core";
3
- import { styled as m } from "@linaria/react";
4
- const s = m.div`
5
- overflow: hidden;
6
- width: 100%;
7
- transform: scale(1);
8
- opacity: 1;
9
- max-height: 2500px;
10
-
11
- animation: containerShowIn ease-out;
12
- animation-duration: var(--animation-duration);
13
-
14
- @keyframes containerShowIn {
15
- 0% {
16
- transform: scale(0);
17
- opacity: 0;
18
- max-height: 0;
19
- }
20
- 80% {
21
- opacity: 0;
22
- transform: scale(0.9);
23
- max-height: 2500px;
24
- }
25
- 85% {
26
- transform: scale(0.9);
27
- max-height: 2500px;
28
- }
29
- 100% {
30
- transform: scale(1);
31
- opacity: 1;
32
- max-height: 2500px;
33
- }
34
- }
35
- `, c = r`
36
- animation: containerHide ease-out;
37
- animation-duration: var(--animation-duration);
38
- animation-direction: reverse;
39
- animation-fill-mode: forwards;
40
-
41
- @keyframes containerHide {
42
- 0% {
43
- transform: scale(0);
44
- opacity: 0;
45
- max-height: 0;
46
- }
47
- 80% {
48
- opacity: 0;
49
- transform: scale(0.9);
50
- max-height: 2500px;
51
- }
52
- 85% {
53
- transform: scale(0.9);
54
- max-height: 2500px;
55
- }
56
- 100% {
57
- transform: scale(1);
58
- opacity: 1;
59
- max-height: 2500px;
60
- }
61
- }
62
- `, f = ({ children: a, style: i, className: t, hiding: o }) => /* @__PURE__ */ n(s, { style: i, className: e(t, o && c), children: a });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cx as i } from "@linaria/core";
3
+ import { styled as e } from "@linaria/react";
4
+ const m = /* @__PURE__ */ e("div")({
5
+ name: "Container",
6
+ class: "c1pgyo67",
7
+ propsAsIs: !1
8
+ }), a = "hx17qu6", d = ({
9
+ children: o,
10
+ style: n,
11
+ className: s,
12
+ hiding: t
13
+ }) => /* @__PURE__ */ r(m, {
14
+ style: n,
15
+ className: i(s, t && a),
16
+ children: o
17
+ });
63
18
  export {
64
- f as ShowIn
19
+ d as ShowIn
65
20
  };
@@ -1,8 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { theme as o } from "./theme.js";
3
- import "@linaria/core";
2
+ import { theme as a } from "./theme.js";
4
3
  import "./constants.js";
5
- const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
4
+ const s = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
6
5
  export {
7
- p as StreamLayerThemeProvider
6
+ s as StreamLayerThemeProvider
8
7
  };
@@ -1,11 +1,4 @@
1
- import { css as a } from "@linaria/core";
2
- const i = a`
3
- --header-height: 68px;
4
- --question-headers-height: 117px;
5
- --animation-duration: 0.5s;
6
- --animation-function: ease;
7
- --container-padding: 16px;
8
- `;
1
+ const s = "m17a8r9z";
9
2
  export {
10
- i as mastersVariables
3
+ s as mastersVariables
11
4
  };
@@ -1,41 +1,45 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { css as d } from "@linaria/core";
3
- import { colors as l, FONT as t } from "./constants.js";
4
- const i = `
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { colors as l, FONT as e } from "./constants.js";
3
+ const h = `
5
4
  ${l}
6
- --font-family: ${t.REGULAR};
7
- --font-regular: ${t.REGULAR};
8
- --font-color: ${t.COLOR};
9
- --font-serif: ${t.SERIF};
10
- --font-weight-default: ${t.WEIGHT_DEFAULT};
5
+ --font-family: ${e.REGULAR};
6
+ --font-regular: ${e.REGULAR};
7
+ --font-color: ${e.COLOR};
8
+ --font-serif: ${e.SERIF};
9
+ --font-weight-default: ${e.WEIGHT_DEFAULT};
11
10
 
12
11
  --header-height: 68px;
13
12
  --animation-duration: 0.5s;
14
13
  --animation-function: ease;
15
14
  --container-padding: 16px;
16
15
  --border-radius: 8px;
17
- `, f = "StreamLayerCSSReset", p = d`
18
- ${i}
19
-
20
- * {
21
- box-sizing: border-box;
22
- }
23
- `, u = () => /* @__PURE__ */ e("table", { children: /* @__PURE__ */ r("table", { children: [
24
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
25
- /* @__PURE__ */ e("th", { children: "name" }),
26
- /* @__PURE__ */ e("th", { children: "value" })
27
- ] }) }),
28
- /* @__PURE__ */ e("tbody", { children: i.split(";").map((o) => {
29
- const n = o.trim(), [a, s] = n.split(":");
30
- return /* @__PURE__ */ r("tr", { children: [
31
- /* @__PURE__ */ e("td", { children: a }),
32
- /* @__PURE__ */ e("td", { children: s })
33
- ] }, n);
34
- }) })
35
- ] }) });
16
+ `, d = "StreamLayerCSSReset", m = "ttkj0ah", f = () => /* @__PURE__ */ t("table", {
17
+ children: /* @__PURE__ */ r("table", {
18
+ children: [/* @__PURE__ */ t("thead", {
19
+ children: /* @__PURE__ */ r("tr", {
20
+ children: [/* @__PURE__ */ t("th", {
21
+ children: "name"
22
+ }), /* @__PURE__ */ t("th", {
23
+ children: "value"
24
+ })]
25
+ })
26
+ }), /* @__PURE__ */ t("tbody", {
27
+ children: h.split(";").map((i) => {
28
+ const n = i.trim(), [o, a] = n.split(":");
29
+ return /* @__PURE__ */ r("tr", {
30
+ children: [/* @__PURE__ */ t("td", {
31
+ children: o
32
+ }), /* @__PURE__ */ t("td", {
33
+ children: a
34
+ })]
35
+ }, n);
36
+ })
37
+ })]
38
+ })
39
+ });
36
40
  export {
37
- u as ThemeVariables,
38
- f as resetCss,
39
- p as theme,
40
- i as themeStr
41
+ f as ThemeVariables,
42
+ d as resetCss,
43
+ m as theme,
44
+ h as themeStr
41
45
  };
@@ -1,37 +1,41 @@
1
- import { jsx as R } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { styled as E } from "@linaria/react";
3
- import { useState as O, useCallback as n } from "react";
3
+ import { useState as O, useCallback as c } from "react";
4
4
  import { CountdownCircleTimer as S } from "react-countdown-circle-timer";
5
- import { COLORS as t } from "../theme/constants.js";
6
- const f = [t.PRIMARY_GREEN1, t.SECONDARY_RED1, t.SECONDARY_RED1], _ = [10, 10, 0], A = E.div`
7
- font-weight: var(--font-weight-default);
8
- `, D = t.SECONDARY_GREEN6, c = t.SECONDARY_RED3, N = t.NEUTRALS_GRAY3, T = ({ isPlaying: l = !0, duration: s = 30, onTimerExpired: o }) => {
9
- const [i, r] = O(s > 10 ? D : c), C = ({ remainingTime: e }) => /* @__PURE__ */ R(A, { children: e }), m = n(() => {
10
- o == null || o(), r(N);
11
- }, [o, r]), a = n(
12
- (e) => {
13
- e === 10 && r(c);
14
- },
15
- [r]
16
- );
17
- return /* @__PURE__ */ R(
18
- S,
19
- {
20
- isPlaying: l,
21
- duration: s,
22
- colors: f,
23
- colorsTime: _,
24
- size: 32,
25
- strokeWidth: 2,
26
- trailStrokeWidth: 2,
27
- trailColor: i,
28
- onComplete: m,
29
- onUpdate: a,
30
- children: C
31
- }
32
- );
5
+ import { COLORS as o } from "../theme/constants.js";
6
+ const _ = [o.PRIMARY_GREEN1, o.SECONDARY_RED1, o.SECONDARY_RED1], A = [10, 10, 0], f = /* @__PURE__ */ E("div")({
7
+ name: "RemainingTime",
8
+ class: "r165427",
9
+ propsAsIs: !1
10
+ }), D = o.SECONDARY_GREEN6, R = o.SECONDARY_RED3, N = o.NEUTRALS_GRAY3, g = ({
11
+ isPlaying: i = !0,
12
+ duration: r = 30,
13
+ onTimerExpired: t
14
+ }) => {
15
+ const [l, s] = O(r > 10 ? D : R), m = ({
16
+ remainingTime: e
17
+ }) => /* @__PURE__ */ n(f, {
18
+ children: e
19
+ }), a = c(() => {
20
+ t == null || t(), s(N);
21
+ }, [t, s]), C = c((e) => {
22
+ e === 10 && s(R);
23
+ }, [s]);
24
+ return /* @__PURE__ */ n(S, {
25
+ isPlaying: i,
26
+ duration: r,
27
+ colors: _,
28
+ colorsTime: A,
29
+ size: 32,
30
+ strokeWidth: 2,
31
+ trailStrokeWidth: 2,
32
+ trailColor: l,
33
+ onComplete: a,
34
+ onUpdate: C,
35
+ children: m
36
+ });
33
37
  };
34
38
  export {
35
- A as RemainingTime,
36
- T as Timer
39
+ f as RemainingTime,
40
+ g as Timer
37
41
  };