@lightsparkdev/ui 0.0.4 → 0.0.6

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 (107) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -0
  3. package/dist/{chunk-3PB5DNAL.js → chunk-23SR7TFO.js} +1 -1
  4. package/dist/{chunk-VV7F7VVL.js → chunk-2WYVO6B2.js} +1 -1
  5. package/dist/{chunk-PVUPVJ3F.js → chunk-3CZOYF3X.js} +5 -2
  6. package/dist/{chunk-4K2KAYVH.js → chunk-4TFRLWCC.js} +4 -1
  7. package/dist/{chunk-SUD5NOKE.js → chunk-FKETYVPP.js} +11 -6
  8. package/dist/{chunk-6R6A5H4I.js → chunk-G2PZZFJL.js} +20 -12
  9. package/dist/{chunk-WB6FFT7Y.js → chunk-I74XQIVV.js} +6 -3
  10. package/dist/{chunk-DHNWT2E5.js → chunk-IQFU7CM5.js} +1 -1
  11. package/dist/{chunk-U6LQLAWI.js → chunk-JYWYEOM6.js} +3 -3
  12. package/dist/{chunk-EZ4RHFY7.js → chunk-K7D7A34K.js} +1 -1
  13. package/dist/{chunk-6RXFA73Z.js → chunk-M56R3RJ7.js} +10 -1
  14. package/dist/{chunk-WEPQ7LRL.js → chunk-N2RDQJQ5.js} +1 -1
  15. package/dist/{chunk-OLAFBUE5.js → chunk-NGS4OSWT.js} +1 -1
  16. package/dist/{chunk-ANJDI74G.js → chunk-NH25O7PC.js} +6 -3
  17. package/dist/{chunk-MYG24ZWT.js → chunk-NZJCJJH5.js} +1 -1
  18. package/dist/{chunk-SW6ZA7W2.js → chunk-QGGOMPHZ.js} +4 -1
  19. package/dist/{chunk-XUGLVWSH.js → chunk-RFGKH3R6.js} +27 -7
  20. package/dist/{chunk-ZQTE53SK.js → chunk-RTUZVKPK.js} +10 -8
  21. package/dist/{chunk-YHSFWCFN.js → chunk-T33SBHYI.js} +3 -2
  22. package/dist/chunk-TAI352I3.js +30 -0
  23. package/dist/{chunk-SV5QPU7N.js → chunk-UO6U7AYM.js} +1 -1
  24. package/dist/{chunk-4ZZHBSW4.js → chunk-VBWTKANQ.js} +15 -8
  25. package/dist/{chunk-FRIQXHPR.js → chunk-WWFDI534.js} +3 -3
  26. package/dist/chunk-YMNSXZ5D.js +8 -0
  27. package/dist/components/Button.cjs +8 -1
  28. package/dist/components/Button.js +8 -7
  29. package/dist/components/ButtonRow.js +10 -9
  30. package/dist/components/Collapsible.cjs +8 -4
  31. package/dist/components/Collapsible.js +5 -5
  32. package/dist/components/ContentTable.js +4 -4
  33. package/dist/components/CopyToClipboardButton.js +5 -5
  34. package/dist/components/CurrencyAmount.js +4 -4
  35. package/dist/components/Icon.js +3 -3
  36. package/dist/components/LightsparkProvider.cjs +2 -1
  37. package/dist/components/LightsparkProvider.js +4 -4
  38. package/dist/components/Loading.js +4 -4
  39. package/dist/components/Modal.cjs +113 -66
  40. package/dist/components/Modal.d.cts +1 -1
  41. package/dist/components/Modal.d.ts +1 -1
  42. package/dist/components/Modal.js +12 -10
  43. package/dist/components/ProgressBar.cjs +200 -17
  44. package/dist/components/ProgressBar.js +3 -1
  45. package/dist/components/SecretContainer.cjs +12 -6
  46. package/dist/components/SecretContainer.js +6 -6
  47. package/dist/components/TextIconAligner.d.cts +2 -2
  48. package/dist/components/TextIconAligner.d.ts +2 -2
  49. package/dist/components/TextIconAligner.js +4 -4
  50. package/dist/components/UnstyledButton.js +3 -3
  51. package/dist/components/documentation/AnchorLinkHeader.cjs +7 -2
  52. package/dist/components/documentation/AnchorLinkHeader.js +6 -5
  53. package/dist/components/documentation/index.cjs +7 -2
  54. package/dist/components/documentation/index.js +6 -5
  55. package/dist/components/index.cjs +108 -60
  56. package/dist/components/index.js +20 -18
  57. package/dist/icons/DotGrid1x3Horizontal.cjs +60 -0
  58. package/dist/icons/DotGrid1x3Horizontal.d.cts +5 -0
  59. package/dist/icons/DotGrid1x3Horizontal.d.ts +5 -0
  60. package/dist/icons/DotGrid1x3Horizontal.js +41 -0
  61. package/dist/icons/Home.cjs +52 -0
  62. package/dist/icons/Home.d.cts +5 -0
  63. package/dist/icons/Home.d.ts +5 -0
  64. package/dist/icons/Home.js +29 -0
  65. package/dist/icons/Person.cjs +22 -12
  66. package/dist/icons/Person.js +23 -13
  67. package/dist/icons/Team.cjs +3 -3
  68. package/dist/icons/Team.js +3 -3
  69. package/dist/icons/index.js +3 -3
  70. package/dist/router.cjs +10 -0
  71. package/dist/router.d.cts +5 -2
  72. package/dist/router.d.ts +5 -2
  73. package/dist/router.js +3 -1
  74. package/dist/styles/colors.d.cts +2 -1
  75. package/dist/styles/colors.d.ts +2 -1
  76. package/dist/styles/common.cjs +26 -4
  77. package/dist/styles/common.d.cts +16 -9
  78. package/dist/styles/common.d.ts +16 -9
  79. package/dist/styles/common.js +6 -2
  80. package/dist/styles/fields.cjs +1 -1
  81. package/dist/styles/fields.d.cts +11 -15
  82. package/dist/styles/fields.d.ts +11 -15
  83. package/dist/styles/fields.js +5 -5
  84. package/dist/styles/fonts/typography/Article.cjs +18 -6
  85. package/dist/styles/fonts/typography/Article.js +9 -8
  86. package/dist/styles/fonts/typography/Display.cjs +6 -1
  87. package/dist/styles/fonts/typography/Display.js +2 -1
  88. package/dist/styles/fonts/typography/Headline.cjs +6 -1
  89. package/dist/styles/fonts/typography/Headline.js +2 -1
  90. package/dist/styles/fonts/typography/index.cjs +18 -6
  91. package/dist/styles/fonts/typography/index.js +15 -14
  92. package/dist/styles/global.cjs +2 -1
  93. package/dist/styles/global.js +3 -3
  94. package/dist/styles/type.cjs +3 -2
  95. package/dist/styles/type.d.cts +4 -0
  96. package/dist/styles/type.d.ts +4 -0
  97. package/dist/styles/type.js +6 -5
  98. package/dist/styles/utils.js +3 -3
  99. package/dist/utils/emotion.cjs +32 -0
  100. package/dist/utils/emotion.d.cts +5 -0
  101. package/dist/utils/emotion.d.ts +5 -0
  102. package/dist/utils/emotion.js +7 -0
  103. package/dist/utils/toReactNodes.cjs +1252 -0
  104. package/dist/utils/toReactNodes.d.cts +14 -0
  105. package/dist/utils/toReactNodes.d.ts +14 -0
  106. package/dist/utils/toReactNodes.js +14 -0
  107. package/package.json +12 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @lightsparkdev/ui
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 66e76d3: - Avoid requiring babel transform to process selectors - convert selectors to strings instead with new select util.
8
+ - withTheme util
9
+ - standardBorderRadius util
10
+ - Fix issue where ProgressBar state is not properly reset
11
+ - scroll-behavior: smooth applied globally
12
+ - Updated dependencies [66e76d3]
13
+ - @lightsparkdev/core@1.0.15
14
+
15
+ ## 0.0.5
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [b9dd0c2]
20
+ - @lightsparkdev/core@1.0.14
21
+
3
22
  ## 0.0.4
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -21,3 +21,5 @@ function App() {
21
21
  );
22
22
  }
23
23
  ```
24
+
25
+ TODO
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-MYG24ZWT.js";
3
+ } from "./chunk-NZJCJJH5.js";
4
4
 
5
5
  // src/components/CurrencyAmount.tsx
6
6
  import { gql } from "@apollo/client";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GlobalStyles
3
- } from "./chunk-YHSFWCFN.js";
3
+ } from "./chunk-T33SBHYI.js";
4
4
  import {
5
5
  themes
6
6
  } from "./chunk-2VBDEO6M.js";
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  CopyToClipboardButton
3
- } from "./chunk-FRIQXHPR.js";
3
+ } from "./chunk-WWFDI534.js";
4
+ import {
5
+ standardBorderRadius
6
+ } from "./chunk-RFGKH3R6.js";
4
7
 
5
8
  // src/components/SecretContainer.tsx
6
9
  import styled from "@emotion/styled";
@@ -24,7 +27,7 @@ function SecretContainer(props) {
24
27
  }
25
28
  var StyledSecretContainer = styled.div`
26
29
  background-color: ${({ theme, hasSecret, success }) => hasSecret ? success ? theme.success : theme.c05Neutral : theme.bg};
27
- border-radius: 8px;
30
+ ${standardBorderRadius(8)}
28
31
  padding: 18px 20px;
29
32
  color: ${({ theme, success }) => success ? theme.hcNeutral : theme.text};
30
33
  border: solid 1px
@@ -1,3 +1,6 @@
1
+ import {
2
+ select
3
+ } from "./chunk-YMNSXZ5D.js";
1
4
  import {
2
5
  colors
3
6
  } from "./chunk-2VBDEO6M.js";
@@ -73,7 +76,7 @@ var StyledHeadline = styled.span`
73
76
  }
74
77
  `;
75
78
  function headlineSelector(heading) {
76
- return `${heading}${StyledHeadline.toString()}`;
79
+ return `${heading}${select(StyledHeadline)}`;
77
80
  }
78
81
  var ALL_HEADLINE_SELECTORS = HEADINGS.map(headlineSelector).join(",");
79
82
 
@@ -1,18 +1,21 @@
1
1
  import {
2
2
  Link
3
- } from "./chunk-6RXFA73Z.js";
3
+ } from "./chunk-M56R3RJ7.js";
4
+ import {
5
+ select
6
+ } from "./chunk-YMNSXZ5D.js";
4
7
  import {
5
8
  Loading
6
- } from "./chunk-OLAFBUE5.js";
9
+ } from "./chunk-NGS4OSWT.js";
7
10
  import {
8
11
  UnstyledButton
9
- } from "./chunk-DHNWT2E5.js";
12
+ } from "./chunk-IQFU7CM5.js";
10
13
  import {
11
14
  Icon
12
- } from "./chunk-MYG24ZWT.js";
15
+ } from "./chunk-NZJCJJH5.js";
13
16
  import {
14
17
  getFocusOutline
15
- } from "./chunk-XUGLVWSH.js";
18
+ } from "./chunk-RFGKH3R6.js";
16
19
  import {
17
20
  colors,
18
21
  themeOr
@@ -254,7 +257,9 @@ var ButtonLink = styled(Link)`
254
257
  var ButtonHrefLink = styled.a`
255
258
  ${(props) => buttonStyle(props)}
256
259
  `;
257
- var ButtonSelector = (prepend = "", append = "") => `${prepend}${StyledButton.toString()}${append}, ${prepend}${ButtonLink.toString()}${append}, ${prepend}${ButtonHrefLink.toString()}${append}`;
260
+ var ButtonSelector = (prepend = "", append = "") => `${prepend}${select(StyledButton)}${append}, ${prepend}${select(
261
+ ButtonLink
262
+ )}${append}, ${prepend}${select(ButtonHrefLink)}${append}`;
258
263
 
259
264
  export {
260
265
  Button,
@@ -1,35 +1,42 @@
1
+ import {
2
+ toReactNodes
3
+ } from "./chunk-TAI352I3.js";
1
4
  import {
2
5
  useLiveRef
3
6
  } from "./chunk-NBCCPGA4.js";
4
7
  import {
5
8
  ProgressBar
6
- } from "./chunk-ZQTE53SK.js";
9
+ } from "./chunk-RTUZVKPK.js";
7
10
  import {
8
11
  Button
9
- } from "./chunk-SUD5NOKE.js";
12
+ } from "./chunk-FKETYVPP.js";
13
+ import {
14
+ select
15
+ } from "./chunk-YMNSXZ5D.js";
10
16
  import {
11
17
  overflowAutoWithoutScrollbars,
12
18
  pxToRems
13
- } from "./chunk-SV5QPU7N.js";
19
+ } from "./chunk-UO6U7AYM.js";
14
20
  import {
15
21
  UnstyledButton
16
- } from "./chunk-DHNWT2E5.js";
22
+ } from "./chunk-IQFU7CM5.js";
17
23
  import {
18
24
  Icon
19
- } from "./chunk-MYG24ZWT.js";
25
+ } from "./chunk-NZJCJJH5.js";
20
26
  import {
21
27
  overlaySurface,
22
28
  smContentInset,
29
+ standardBorderRadius,
23
30
  standardContentInsetSmPx,
24
31
  standardFocusOutline
25
- } from "./chunk-XUGLVWSH.js";
26
- import {
27
- z
28
- } from "./chunk-CLU2FRJZ.js";
32
+ } from "./chunk-RFGKH3R6.js";
29
33
  import {
30
34
  bp,
31
35
  useBreakpoints
32
36
  } from "./chunk-JSGRNWSB.js";
37
+ import {
38
+ z
39
+ } from "./chunk-CLU2FRJZ.js";
33
40
 
34
41
  // src/components/Modal.tsx
35
42
  import styled from "@emotion/styled";
@@ -67,6 +74,7 @@ function Modal({
67
74
  const modalContainerRef = useRef(null);
68
75
  const bp2 = useBreakpoints();
69
76
  const isSm = bp2.current("sm" /* sm */);
77
+ const formattedDescription = description ? toReactNodes(description) : null;
70
78
  useEffect(() => {
71
79
  if (visible !== visibleChangedRef.current) {
72
80
  visibleChangedRef.current = visible;
@@ -175,7 +183,7 @@ function Modal({
175
183
  }
176
184
  ) }) : null,
177
185
  title ? /* @__PURE__ */ jsx("h4", { children: title }) : null,
178
- description ? /* @__PURE__ */ jsx(Description, { children: description }) : null,
186
+ formattedDescription ? /* @__PURE__ */ jsx(Description, { children: formattedDescription }) : null,
179
187
  /* @__PURE__ */ jsx("div", { children }),
180
188
  onSubmit ? /* @__PURE__ */ jsxs(ModalButtonRow, { children: [
181
189
  !isSm && !cancelHidden && /* @__PURE__ */ jsx(
@@ -272,13 +280,13 @@ var ModalButtonRow = styled.div`
272
280
  var ModalContent = styled.div`
273
281
  ${overflowAutoWithoutScrollbars}
274
282
  ${smContentInset}
283
+ ${standardBorderRadius(16)}
275
284
  ${(props) => props.ghost ? "" : overlaySurface}
276
285
  pointer-events: auto;
277
286
  transition: width 0.25s ease-in;
278
287
  width: ${(props) => props.width}px;
279
288
  max-width: 100%;
280
289
  max-height: 100%;
281
- border-radius: 16px;
282
290
  position: absolute;
283
291
  ${(props) => props.ghost ? "" : "padding: 16px 16px 40px;"}
284
292
 
@@ -286,7 +294,7 @@ var ModalContent = styled.div`
286
294
  margin: 0;
287
295
  font-weight: 800;
288
296
  font-size: ${pxToRems(21)};
289
- & + *:not(${Description}) {
297
+ & + *:not(${select(Description)}) {
290
298
  margin-top: ${contentTopMarginPx}px;
291
299
  }
292
300
  }
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  overflowAutoWithoutScrollbars
3
- } from "./chunk-SV5QPU7N.js";
3
+ } from "./chunk-UO6U7AYM.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-MYG24ZWT.js";
6
+ } from "./chunk-NZJCJJH5.js";
7
+ import {
8
+ standardBorderRadius
9
+ } from "./chunk-RFGKH3R6.js";
7
10
 
8
11
  // src/components/Collapsible.tsx
9
12
  import styled from "@emotion/styled";
@@ -59,7 +62,7 @@ var StyledCollapsibleButton = styled.button`
59
62
  background: none;
60
63
  border: none;
61
64
  cursor: pointer;
62
- border-radius: 8px;
65
+ ${standardBorderRadius(8)}
63
66
  padding: 0;
64
67
  `;
65
68
  var IconContainer = styled.div`
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardFocusOutline
3
- } from "./chunk-XUGLVWSH.js";
3
+ } from "./chunk-RFGKH3R6.js";
4
4
 
5
5
  // src/components/UnstyledButton.tsx
6
6
  import styled from "@emotion/styled";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-SUD5NOKE.js";
3
+ } from "./chunk-FKETYVPP.js";
4
4
  import {
5
5
  overflowAutoWithoutScrollbars
6
- } from "./chunk-SV5QPU7N.js";
6
+ } from "./chunk-UO6U7AYM.js";
7
7
  import {
8
8
  standardContentInsetSmPx
9
- } from "./chunk-XUGLVWSH.js";
9
+ } from "./chunk-RFGKH3R6.js";
10
10
  import {
11
11
  bp
12
12
  } from "./chunk-JSGRNWSB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-MYG24ZWT.js";
3
+ } from "./chunk-NZJCJJH5.js";
4
4
 
5
5
  // src/components/ContentTable.tsx
6
6
  import styled from "@emotion/styled";
@@ -120,6 +120,14 @@ function useCurrentRoute() {
120
120
  const location = useLocation();
121
121
  return location.pathname;
122
122
  }
123
+ function getRouteName(path, routes) {
124
+ for (const routeName of Object.keys(routes)) {
125
+ if (matchPath(routes[routeName], path)) {
126
+ return routeName;
127
+ }
128
+ }
129
+ return null;
130
+ }
123
131
 
124
132
  export {
125
133
  replaceParams,
@@ -129,5 +137,6 @@ export {
129
137
  useMatchRoutes,
130
138
  useFindMatchingRoute,
131
139
  useMatchRoute,
132
- useCurrentRoute
140
+ useCurrentRoute,
141
+ getRouteName
133
142
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-MYG24ZWT.js";
3
+ } from "./chunk-NZJCJJH5.js";
4
4
 
5
5
  // src/components/TextIconAligner.tsx
6
6
  import { jsx, jsxs } from "@emotion/react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-MYG24ZWT.js";
3
+ } from "./chunk-NZJCJJH5.js";
4
4
 
5
5
  // src/components/Loading.tsx
6
6
  import styled from "@emotion/styled";
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  Headline
3
- } from "./chunk-4K2KAYVH.js";
3
+ } from "./chunk-4TFRLWCC.js";
4
+ import {
5
+ select
6
+ } from "./chunk-YMNSXZ5D.js";
4
7
  import {
5
8
  Icon
6
- } from "./chunk-MYG24ZWT.js";
9
+ } from "./chunk-NZJCJJH5.js";
7
10
  import {
8
11
  __spreadProps,
9
12
  __spreadValues
@@ -50,7 +53,7 @@ var StyledAnchorLinkHeader = styled.div`
50
53
  padding-right: 24px;
51
54
  }
52
55
 
53
- &:hover ${IconWrapper} {
56
+ &:hover ${select(IconWrapper)} {
54
57
  opacity: 1;
55
58
  transform: translateX(0px);
56
59
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-LAMQKQU3.js";
4
4
  import {
5
5
  rootFontSizePx
6
- } from "./chunk-XUGLVWSH.js";
6
+ } from "./chunk-RFGKH3R6.js";
7
7
  import {
8
8
  __async
9
9
  } from "./chunk-CIGAQ47A.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ select
3
+ } from "./chunk-YMNSXZ5D.js";
1
4
  import {
2
5
  colors
3
6
  } from "./chunk-2VBDEO6M.js";
@@ -24,7 +27,7 @@ var StyledDisplay = styled.span`
24
27
  }}
25
28
  `;
26
29
  function displaySelector(element) {
27
- return `${element}${StyledDisplay.toString()}`;
30
+ return `${element}${select(StyledDisplay)}`;
28
31
  }
29
32
 
30
33
  export {
@@ -1,6 +1,3 @@
1
- import {
2
- z
3
- } from "./chunk-CLU2FRJZ.js";
4
1
  import {
5
2
  colors,
6
3
  darkGradient,
@@ -9,6 +6,9 @@ import {
9
6
  import {
10
7
  bp
11
8
  } from "./chunk-JSGRNWSB.js";
9
+ import {
10
+ z
11
+ } from "./chunk-CLU2FRJZ.js";
12
12
 
13
13
  // src/styles/common.tsx
14
14
  import { css } from "@emotion/react";
@@ -22,6 +22,12 @@ var standardContentInsetPx = 32;
22
22
  var standardContentInsetMdPx = 24;
23
23
  var standardContentInsetSmPx = 16;
24
24
  var cardBorderRadiusPx = 16;
25
+ var standardBorderRadius = (radius) => {
26
+ const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
27
+ return `
28
+ border-radius: ${borderRadiusPx};
29
+ `;
30
+ };
25
31
  var smContentInset = css`
26
32
  ${bp.sm(`
27
33
  margin-left: auto;
@@ -88,11 +94,23 @@ var darkGradientBg = css`
88
94
  var StyledTooltip = styled(Tooltip)`
89
95
  z-index: ${z.modalOverlay};
90
96
  `;
91
- var overlaySurface = ({ theme }) => css`
92
- background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })};
93
- border: 0.5px solid ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })};
97
+ var overlaySurfaceBorderColor = ({
98
+ theme,
99
+ important = false
100
+ }) => css`
101
+ border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
102
+ ${important ? "!important" : ""};
103
+ `;
104
+ var overlaySurface = ({
105
+ theme,
106
+ important = false
107
+ }) => css`
108
+ background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })}
109
+ ${important ? "!important" : ""};
110
+ border: 0.5px solid ${important ? "!important" : ""};
111
+ ${overlaySurfaceBorderColor({ theme, important })};
94
112
  ${themeOr(
95
- "box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1);",
113
+ `box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
96
114
  ""
97
115
  )({ theme })}
98
116
  `;
@@ -111,6 +129,7 @@ export {
111
129
  standardContentInsetMdPx,
112
130
  standardContentInsetSmPx,
113
131
  cardBorderRadiusPx,
132
+ standardBorderRadius,
114
133
  smContentInset,
115
134
  minSmMaxLgContentInset,
116
135
  standardContentInset,
@@ -125,6 +144,7 @@ export {
125
144
  Subtext,
126
145
  darkGradientBg,
127
146
  StyledTooltip,
147
+ overlaySurfaceBorderColor,
128
148
  overlaySurface,
129
149
  mcBold,
130
150
  mcBoldStyled
@@ -1,3 +1,6 @@
1
+ import {
2
+ standardBorderRadius
3
+ } from "./chunk-RFGKH3R6.js";
1
4
  import {
2
5
  themeOr
3
6
  } from "./chunk-2VBDEO6M.js";
@@ -17,14 +20,13 @@ function ProgressBar({
17
20
  stepDuration = defaultProps.stepDuration
18
21
  }) {
19
22
  const [percentage, setPercentage] = useState(5);
20
- if (progressPercentage === void 0) {
21
- setTimeout(() => {
22
- setPercentage(100);
23
- }, 0);
24
- }
25
23
  useEffect(() => {
26
24
  if (progressPercentage !== void 0) {
27
25
  setPercentage(progressPercentage);
26
+ } else {
27
+ setTimeout(() => {
28
+ setPercentage(100);
29
+ }, 0);
28
30
  }
29
31
  }, [progressPercentage]);
30
32
  return /* @__PURE__ */ jsx(ProgressBarContainer, { isSm, children: /* @__PURE__ */ jsx(Bar, { isSm, percentage, stepDuration, children: /* @__PURE__ */ jsx(
@@ -39,8 +41,8 @@ function ProgressBar({
39
41
  }
40
42
  ProgressBar.defaultProps = defaultProps;
41
43
  var ProgressBarContainer = styled.div`
44
+ ${standardBorderRadius(16)}
42
45
  background-color: ${({ theme }) => themeOr(theme.c05Neutral, theme.c1Neutral)({ theme })};
43
- border-radius: 16px;
44
46
  box-sizing: border-box;
45
47
  display: flex;
46
48
  height: ${({ isSm }) => isSm ? "6px" : "16px"};
@@ -49,7 +51,7 @@ var ProgressBarContainer = styled.div`
49
51
  position: relative;
50
52
  `;
51
53
  var BarBg = styled.div`
52
- border-radius: 16px;
54
+ ${standardBorderRadius(16)}
53
55
  width: ${({ percentage }) => 100 / percentage * 100}%;
54
56
  height: 100%;
55
57
 
@@ -63,8 +65,8 @@ var BarBg = styled.div`
63
65
  )`};
64
66
  `;
65
67
  var Bar = styled.div`
68
+ ${standardBorderRadius(16)}
66
69
  overflow: hidden;
67
- border-radius: ${({ isSm }) => isSm ? "6px" : "16px"};
68
70
  box-sizing: border-box;
69
71
  display: inline-block;
70
72
  height: ${({ isSm }) => isSm ? "6px" : "16px"};
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  rootFontSizeRems,
6
6
  standardLineHeightEms
7
- } from "./chunk-XUGLVWSH.js";
7
+ } from "./chunk-RFGKH3R6.js";
8
8
  import {
9
9
  useThemeBg
10
10
  } from "./chunk-2VBDEO6M.js";
@@ -28,6 +28,7 @@ var globalComponentStyles = ({ theme }) => css`
28
28
  /* required for iOS https://bit.ly/3Q8syG8 */
29
29
  -webkit-text-size-adjust: none;
30
30
  text-size-adjust: none;
31
+ scroll-behavior: smooth;
31
32
  }
32
33
 
33
34
  body {
@@ -108,7 +109,7 @@ function GlobalStyles() {
108
109
 
109
110
  :root {
110
111
  ${cssVars.docHeight}: 100vh;
111
- --rt-opacity: 1;
112
+ --rt-opacity: 1 !important;
112
113
  }
113
114
 
114
115
  html {
@@ -0,0 +1,30 @@
1
+ import {
2
+ Link
3
+ } from "./chunk-M56R3RJ7.js";
4
+
5
+ // src/utils/toReactNodes.tsx
6
+ import { Fragment } from "react";
7
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
8
+ var ToReactNodesTypes = {
9
+ Link: "link"
10
+ };
11
+ function toReactNodes(toReactNodesArg) {
12
+ const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
13
+ const reactNodes = toReactNodesArray.map((node, i) => {
14
+ if (typeof node === "string") {
15
+ return /* @__PURE__ */ jsx(Fragment, { children: node.split("\n").map((str, j, strArr) => /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ str,
17
+ j < strArr.length - 1 && /* @__PURE__ */ jsx("br", {})
18
+ ] }, `str-${i}-break-${j}`)) }, `str-${i}`);
19
+ } else if (node.type === ToReactNodesTypes.Link) {
20
+ return /* @__PURE__ */ jsx(Link, { to: node.to, children: node.text }, `link-${i}`);
21
+ }
22
+ return null;
23
+ });
24
+ return /* @__PURE__ */ jsx(Fragment, { children: reactNodes });
25
+ }
26
+
27
+ export {
28
+ ToReactNodesTypes,
29
+ toReactNodes
30
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rootFontSizePx
3
- } from "./chunk-XUGLVWSH.js";
3
+ } from "./chunk-RFGKH3R6.js";
4
4
 
5
5
  // src/styles/utils.tsx
6
6
  import { css } from "@emotion/react";
@@ -9,17 +9,23 @@ import {
9
9
  } from "./chunk-BCFRW7CV.js";
10
10
  import {
11
11
  displaySelector
12
- } from "./chunk-SW6ZA7W2.js";
12
+ } from "./chunk-QGGOMPHZ.js";
13
13
  import {
14
14
  ALL_HEADLINE_SELECTORS,
15
15
  headlineSelector
16
- } from "./chunk-4K2KAYVH.js";
16
+ } from "./chunk-4TFRLWCC.js";
17
+ import {
18
+ select
19
+ } from "./chunk-YMNSXZ5D.js";
17
20
  import {
18
21
  overflowAutoWithoutScrollbars
19
- } from "./chunk-SV5QPU7N.js";
22
+ } from "./chunk-UO6U7AYM.js";
20
23
  import {
21
24
  StyledContentTable
22
- } from "./chunk-EZ4RHFY7.js";
25
+ } from "./chunk-K7D7A34K.js";
26
+ import {
27
+ standardBorderRadius
28
+ } from "./chunk-RFGKH3R6.js";
23
29
  import {
24
30
  colors
25
31
  } from "./chunk-2VBDEO6M.js";
@@ -69,12 +75,12 @@ var Article = styled.article`
69
75
  margin: 0;
70
76
  }
71
77
 
72
- ${StyledBody} {
78
+ ${select(StyledBody)} {
73
79
  margin-top: ${"8px" /* xs */};
74
80
  margin-bottom: ${"8px" /* xs */};
75
81
  }
76
82
 
77
- ${StyledContentTable} {
83
+ ${select(StyledContentTable)} {
78
84
  margin: ${"40px" /* 2xl */} 0;
79
85
  }
80
86
 
@@ -87,7 +93,8 @@ var Article = styled.article`
87
93
  font-weight: 700;
88
94
  }
89
95
 
90
- *:not(${ALL_HEADLINE_SELECTORS},${StyledTitle},${StyledCode}) > a {
96
+ *:not(${ALL_HEADLINE_SELECTORS},${select(StyledTitle)},${select(StyledCode)})
97
+ > a {
91
98
  ${({ theme }) => getTypographyString(
92
99
  theme.typography[theme.app]["Label Strong"]["Large" /* Large */]
93
100
  )}
@@ -121,7 +128,7 @@ var Article = styled.article`
121
128
  }
122
129
 
123
130
  pre[class|="language"] {
124
- border-radius: 8px;
131
+ ${standardBorderRadius(8)}
125
132
  width: 100%;
126
133
  padding: ${"16px" /* md */} ${"24px" /* lg */};
127
134
  margin: ${"16px" /* md */} 0;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  UnstyledButton
3
- } from "./chunk-DHNWT2E5.js";
3
+ } from "./chunk-IQFU7CM5.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-MYG24ZWT.js";
6
+ } from "./chunk-NZJCJJH5.js";
7
7
  import {
8
8
  StyledTooltip
9
- } from "./chunk-XUGLVWSH.js";
9
+ } from "./chunk-RFGKH3R6.js";
10
10
  import {
11
11
  __async
12
12
  } from "./chunk-CIGAQ47A.js";
@@ -0,0 +1,8 @@
1
+ // src/utils/emotion.tsx
2
+ function select(component) {
3
+ return component.toString();
4
+ }
5
+
6
+ export {
7
+ select
8
+ };
@@ -1454,6 +1454,11 @@ var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
1454
1454
  z-index: ${z.modalOverlay};
1455
1455
  `;
1456
1456
 
1457
+ // src/utils/emotion.tsx
1458
+ function select(component) {
1459
+ return component.toString();
1460
+ }
1461
+
1457
1462
  // src/components/Icon.tsx
1458
1463
  var import_styled2 = __toESM(require("@emotion/styled"), 1);
1459
1464
  var import_react6 = require("react");
@@ -1829,7 +1834,9 @@ var ButtonLink = (0, import_styled5.default)(Link)`
1829
1834
  var ButtonHrefLink = import_styled5.default.a`
1830
1835
  ${(props) => buttonStyle(props)}
1831
1836
  `;
1832
- var ButtonSelector = (prepend = "", append = "") => `${prepend}${StyledButton.toString()}${append}, ${prepend}${ButtonLink.toString()}${append}, ${prepend}${ButtonHrefLink.toString()}${append}`;
1837
+ var ButtonSelector = (prepend = "", append = "") => `${prepend}${select(StyledButton)}${append}, ${prepend}${select(
1838
+ ButtonLink
1839
+ )}${append}, ${prepend}${select(ButtonHrefLink)}${append}`;
1833
1840
  // Annotate the CommonJS export names for ESM import in node:
1834
1841
  0 && (module.exports = {
1835
1842
  Button,