@lightsparkdev/ui 0.0.1 → 0.0.3

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 (164) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{chunk-ACZDUWPH.js → chunk-2VBDEO6M.js} +2 -2
  3. package/dist/{chunk-FETTWCK3.js → chunk-3PB5DNAL.js} +1 -1
  4. package/dist/chunk-3XSQV5U4.js +26 -0
  5. package/dist/chunk-4I2ABBID.js +38 -0
  6. package/dist/{chunk-W4GDCWKZ.js → chunk-4K2KAYVH.js} +3 -3
  7. package/dist/{chunk-2RF46PE5.js → chunk-4ZZHBSW4.js} +48 -30
  8. package/dist/{chunk-XTEEADPV.js → chunk-6R6A5H4I.js} +34 -13
  9. package/dist/{chunk-LJYASIJC.js → chunk-6RXFA73Z.js} +19 -3
  10. package/dist/{chunk-DE24BV2C.js → chunk-ANJDI74G.js} +2 -2
  11. package/dist/{chunk-RUVXOYBL.js → chunk-BCFRW7CV.js} +5 -4
  12. package/dist/{chunk-X6BI4STY.js → chunk-DHNWT2E5.js} +1 -1
  13. package/dist/chunk-E4EXM4SY.js +921 -0
  14. package/dist/chunk-EZ4RHFY7.js +57 -0
  15. package/dist/{chunk-CQDQFIWT.js → chunk-FHNYQLMF.js} +10 -4
  16. package/dist/{chunk-K7MPHJNG.js → chunk-FRIQXHPR.js} +3 -3
  17. package/dist/{chunk-7NQH4LBZ.js → chunk-LD5LZXUP.js} +2 -2
  18. package/dist/chunk-LN7MMOXE.js +29 -0
  19. package/dist/{chunk-L7XFJWMY.js → chunk-MYG24ZWT.js} +1 -1
  20. package/dist/{chunk-I4PO6FQP.js → chunk-MYKMYG6H.js} +2 -2
  21. package/dist/{chunk-BZ5MKMI2.js → chunk-OLAFBUE5.js} +1 -1
  22. package/dist/{chunk-6RDG2DE3.js → chunk-OO5UJRAW.js} +2 -2
  23. package/dist/{chunk-Y4RJ7WS4.js → chunk-PVUPVJ3F.js} +1 -1
  24. package/dist/chunk-RBYRXBPI.js +29 -0
  25. package/dist/{chunk-4X3K3VRC.js → chunk-SUD5NOKE.js} +6 -6
  26. package/dist/{chunk-LZHLWOXG.js → chunk-SV5QPU7N.js} +1 -1
  27. package/dist/{chunk-LWTUQB7O.js → chunk-SW6ZA7W2.js} +2 -2
  28. package/dist/{chunk-O27TAUAS.js → chunk-U6LQLAWI.js} +3 -3
  29. package/dist/{chunk-6AV4TE6I.js → chunk-VV7F7VVL.js} +2 -2
  30. package/dist/{chunk-7ENCWBAN.js → chunk-WB6FFT7Y.js} +21 -7
  31. package/dist/{chunk-BKOTW3CK.js → chunk-WEPQ7LRL.js} +1 -1
  32. package/dist/{chunk-QR7BKTM6.js → chunk-XUGLVWSH.js} +4 -4
  33. package/dist/{chunk-WVEK4LFA.js → chunk-YHSFWCFN.js} +3 -3
  34. package/dist/chunk-ZQTE53SK.js +78 -0
  35. package/dist/components/Button.cjs +429 -236
  36. package/dist/components/Button.js +9 -9
  37. package/dist/components/ButtonRow.cjs +431 -236
  38. package/dist/components/ButtonRow.js +11 -11
  39. package/dist/components/Collapsible.cjs +428 -232
  40. package/dist/components/Collapsible.d.cts +10 -1
  41. package/dist/components/Collapsible.d.ts +10 -1
  42. package/dist/components/Collapsible.js +8 -7
  43. package/dist/components/ContentTable.cjs +1498 -0
  44. package/dist/components/ContentTable.d.cts +26 -0
  45. package/dist/components/ContentTable.d.ts +26 -0
  46. package/dist/components/ContentTable.js +16 -0
  47. package/dist/components/CopyToClipboardButton.cjs +409 -227
  48. package/dist/components/CopyToClipboardButton.js +7 -7
  49. package/dist/components/CurrencyAmount.cjs +409 -227
  50. package/dist/components/CurrencyAmount.js +6 -6
  51. package/dist/components/Icon.cjs +409 -227
  52. package/dist/components/Icon.js +5 -5
  53. package/dist/components/LightsparkProvider.cjs +410 -228
  54. package/dist/components/LightsparkProvider.js +6 -6
  55. package/dist/components/Loading.cjs +409 -227
  56. package/dist/components/Loading.js +6 -6
  57. package/dist/components/Modal.cjs +559 -275
  58. package/dist/components/Modal.d.cts +5 -10
  59. package/dist/components/Modal.d.ts +5 -10
  60. package/dist/components/Modal.js +12 -11
  61. package/dist/components/ProgressBar.cjs +1238 -0
  62. package/dist/components/ProgressBar.d.cts +17 -0
  63. package/dist/components/ProgressBar.d.ts +17 -0
  64. package/dist/components/ProgressBar.js +10 -0
  65. package/dist/components/SecretContainer.cjs +409 -227
  66. package/dist/components/SecretContainer.js +8 -8
  67. package/dist/components/TextIconAligner.cjs +409 -227
  68. package/dist/components/TextIconAligner.js +6 -6
  69. package/dist/components/UnstyledButton.cjs +409 -227
  70. package/dist/components/UnstyledButton.js +5 -5
  71. package/dist/components/documentation/AnchorLinkHeader.cjs +409 -229
  72. package/dist/components/documentation/AnchorLinkHeader.js +7 -7
  73. package/dist/components/documentation/index.cjs +409 -229
  74. package/dist/components/documentation/index.js +7 -7
  75. package/dist/components/index.cjs +590 -292
  76. package/dist/components/index.d.cts +1 -0
  77. package/dist/components/index.d.ts +1 -0
  78. package/dist/components/index.js +24 -19
  79. package/dist/hooks/useWhatChanged.cjs +30 -0
  80. package/dist/hooks/useWhatChanged.d.cts +1 -0
  81. package/dist/hooks/useWhatChanged.d.ts +1 -0
  82. package/dist/hooks/useWhatChanged.js +7 -0
  83. package/dist/icons/ApiConnection.cjs +44 -0
  84. package/dist/icons/ApiConnection.d.cts +5 -0
  85. package/dist/icons/ApiConnection.d.ts +5 -0
  86. package/dist/icons/ApiConnection.js +25 -0
  87. package/dist/icons/CentralArrowShareRight.cjs +53 -0
  88. package/dist/icons/CentralArrowShareRight.d.cts +5 -0
  89. package/dist/icons/CentralArrowShareRight.d.ts +5 -0
  90. package/dist/icons/CentralArrowShareRight.js +30 -0
  91. package/dist/icons/Restart.cjs +1 -1
  92. package/dist/icons/Restart.js +1 -1
  93. package/dist/icons/Uma.cjs +57 -0
  94. package/dist/icons/Uma.d.cts +5 -0
  95. package/dist/icons/Uma.d.ts +5 -0
  96. package/dist/icons/Uma.js +38 -0
  97. package/dist/icons/index.cjs +409 -227
  98. package/dist/icons/index.js +5 -5
  99. package/dist/index.d.cts +1 -2
  100. package/dist/index.d.ts +1 -2
  101. package/dist/router.cjs +429 -229
  102. package/dist/router.d.cts +8 -5
  103. package/dist/router.d.ts +8 -5
  104. package/dist/router.js +4 -3
  105. package/dist/styles/colors.cjs +409 -227
  106. package/dist/styles/colors.js +2 -2
  107. package/dist/styles/common.cjs +409 -227
  108. package/dist/styles/common.d.cts +1 -1
  109. package/dist/styles/common.d.ts +1 -1
  110. package/dist/styles/common.js +4 -4
  111. package/dist/styles/fields.cjs +409 -227
  112. package/dist/styles/fields.js +6 -6
  113. package/dist/styles/fonts/typography/Article.cjs +514 -274
  114. package/dist/styles/fonts/typography/Article.js +15 -9
  115. package/dist/styles/fonts/typography/Body.cjs +409 -229
  116. package/dist/styles/fonts/typography/Body.js +3 -3
  117. package/dist/styles/fonts/typography/BodyStrong.cjs +1196 -0
  118. package/dist/styles/fonts/typography/BodyStrong.d.cts +23 -0
  119. package/dist/styles/fonts/typography/BodyStrong.d.ts +23 -0
  120. package/dist/styles/fonts/typography/BodyStrong.js +13 -0
  121. package/dist/styles/fonts/typography/Code.cjs +6 -6
  122. package/dist/styles/fonts/typography/Code.d.cts +8 -1
  123. package/dist/styles/fonts/typography/Code.d.ts +8 -1
  124. package/dist/styles/fonts/typography/Code.js +6 -4
  125. package/dist/styles/fonts/typography/Display.cjs +409 -229
  126. package/dist/styles/fonts/typography/Display.js +3 -3
  127. package/dist/styles/fonts/typography/Headline.cjs +410 -230
  128. package/dist/styles/fonts/typography/Headline.js +3 -3
  129. package/dist/styles/fonts/typography/Label.cjs +409 -229
  130. package/dist/styles/fonts/typography/Label.js +3 -3
  131. package/dist/styles/fonts/typography/LabelModerate.cjs +1205 -0
  132. package/dist/styles/fonts/typography/LabelModerate.d.cts +18 -0
  133. package/dist/styles/fonts/typography/LabelModerate.d.ts +18 -0
  134. package/dist/styles/fonts/typography/LabelModerate.js +13 -0
  135. package/dist/styles/fonts/typography/LabelStrong.cjs +409 -229
  136. package/dist/styles/fonts/typography/LabelStrong.js +3 -3
  137. package/dist/styles/fonts/typography/Overline.cjs +1196 -0
  138. package/dist/styles/fonts/typography/Overline.d.cts +18 -0
  139. package/dist/styles/fonts/typography/Overline.d.ts +18 -0
  140. package/dist/styles/fonts/typography/Overline.js +13 -0
  141. package/dist/styles/fonts/typography/Title.cjs +417 -231
  142. package/dist/styles/fonts/typography/Title.d.cts +2 -1
  143. package/dist/styles/fonts/typography/Title.d.ts +2 -1
  144. package/dist/styles/fonts/typography/Title.js +3 -3
  145. package/dist/styles/fonts/typography/index.cjs +594 -299
  146. package/dist/styles/fonts/typography/index.d.cts +3 -0
  147. package/dist/styles/fonts/typography/index.d.ts +3 -0
  148. package/dist/styles/fonts/typography/index.js +31 -15
  149. package/dist/styles/fonts/typographyTokens.cjs +413 -233
  150. package/dist/styles/fonts/typographyTokens.d.cts +210 -28
  151. package/dist/styles/fonts/typographyTokens.d.ts +210 -28
  152. package/dist/styles/fonts/typographyTokens.js +1 -1
  153. package/dist/styles/global.cjs +410 -228
  154. package/dist/styles/global.js +5 -5
  155. package/dist/styles/tokens/spacing.cjs +50 -0
  156. package/dist/styles/tokens/spacing.d.cts +22 -0
  157. package/dist/styles/tokens/spacing.d.ts +22 -0
  158. package/dist/styles/tokens/spacing.js +7 -0
  159. package/dist/styles/type.cjs +409 -227
  160. package/dist/styles/type.js +5 -5
  161. package/dist/styles/utils.cjs +409 -227
  162. package/dist/styles/utils.js +5 -5
  163. package/package.json +7 -4
  164. package/dist/chunk-WVJNZRKF.js +0 -741
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @lightsparkdev/ui
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - e77aa92: - Add spacing tokens for every component in Article
8
+ - Fix modal focus on previous focused element when closed
9
+
10
+ ## 0.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 35513da: Upgrade dependencies
15
+ - 35513da: [ui] Fix getHeadlineText return
16
+ - Updated dependencies [35513da]
17
+ - @lightsparkdev/core@1.0.12
18
+
3
19
  ## 0.0.1
4
20
 
5
21
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTypography
3
- } from "./chunk-WVJNZRKF.js";
3
+ } from "./chunk-E4EXM4SY.js";
4
4
  import {
5
5
  useBreakpoints
6
6
  } from "./chunk-JSGRNWSB.js";
@@ -162,7 +162,7 @@ var lightTheme = extend(lightBaseTheme, {
162
162
  }),
163
163
  nav: extendBase(lightBaseTheme, {
164
164
  text: colors.gray10,
165
- secondary: colors.secondary
165
+ secondary: colors.gray40
166
166
  }),
167
167
  content: extendBase(lightBaseTheme, {
168
168
  bg: colors.white,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-L7XFJWMY.js";
3
+ } from "./chunk-MYG24ZWT.js";
4
4
 
5
5
  // src/components/CurrencyAmount.tsx
6
6
  import { gql } from "@apollo/client";
@@ -0,0 +1,26 @@
1
+ // src/styles/tokens/spacing.tsx
2
+ var Spacing = /* @__PURE__ */ ((Spacing2) => {
3
+ Spacing2["4xs"] = "2px";
4
+ Spacing2["3xs"] = "4px";
5
+ Spacing2["2xs"] = "6px";
6
+ Spacing2["xs"] = "8px";
7
+ Spacing2["sm"] = "12px";
8
+ Spacing2["md"] = "16px";
9
+ Spacing2["lg"] = "24px";
10
+ Spacing2["xl"] = "32px";
11
+ Spacing2["2xl"] = "40px";
12
+ Spacing2["3xl"] = "48px";
13
+ Spacing2["4xl"] = "56px";
14
+ Spacing2["5xl"] = "64px";
15
+ Spacing2["6xl"] = "72px";
16
+ Spacing2["7xl"] = "80px";
17
+ Spacing2["8xl"] = "96px";
18
+ Spacing2["9xl"] = "112px";
19
+ Spacing2["10xl"] = "128px";
20
+ Spacing2["11xl"] = "160px";
21
+ return Spacing2;
22
+ })(Spacing || {});
23
+
24
+ export {
25
+ Spacing
26
+ };
@@ -0,0 +1,38 @@
1
+ import {
2
+ colors
3
+ } from "./chunk-2VBDEO6M.js";
4
+ import {
5
+ getTypographyString
6
+ } from "./chunk-E4EXM4SY.js";
7
+
8
+ // src/styles/fonts/typography/LabelModerate.tsx
9
+ import styled from "@emotion/styled";
10
+ import { jsx } from "@emotion/react/jsx-runtime";
11
+ var LabelModerate = ({
12
+ children,
13
+ color,
14
+ size = "Medium" /* Medium */
15
+ }) => {
16
+ return /* @__PURE__ */ jsx(StyledLabelModerate, { size, color, children });
17
+ };
18
+ var StyledLabelModerate = styled.label`
19
+ color: ${({ theme, color }) => `${color || theme.text || colors.black}`};
20
+ ${({ theme, size }) => {
21
+ return size ? getTypographyString(theme.typography[theme.app]["Label Moderate"][size]) : "";
22
+ }}
23
+ cursor: inherit;
24
+
25
+ * {
26
+ color: ${({ theme, color }) => `${color || theme.text || colors.black}`};
27
+ ${({ theme, size }) => {
28
+ return size ? getTypographyString(
29
+ theme.typography[theme.app]["Label Moderate"][size]
30
+ ) : "";
31
+ }}
32
+ }
33
+ `;
34
+
35
+ export {
36
+ LabelModerate,
37
+ StyledLabelModerate
38
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  colors
3
- } from "./chunk-ACZDUWPH.js";
3
+ } from "./chunk-2VBDEO6M.js";
4
4
  import {
5
5
  getTypographyString
6
- } from "./chunk-WVJNZRKF.js";
6
+ } from "./chunk-E4EXM4SY.js";
7
7
 
8
8
  // src/styles/fonts/typography/Headline.tsx
9
9
  import styled from "@emotion/styled";
@@ -23,7 +23,7 @@ var getHeadlineText = (element) => {
23
23
  return getHeadlineText(element[0]);
24
24
  }
25
25
  if (isReactNodeWithChildren(element)) {
26
- getHeadlineText(element.props.children);
26
+ return getHeadlineText(element.props.children);
27
27
  }
28
28
  throw new Error(
29
29
  "Could not find text in Headline element: " + (element == null ? void 0 : element.toString())
@@ -1,22 +1,31 @@
1
+ import {
2
+ StyledTitle
3
+ } from "./chunk-FHNYQLMF.js";
1
4
  import {
2
5
  StyledBody
3
- } from "./chunk-7NQH4LBZ.js";
6
+ } from "./chunk-LD5LZXUP.js";
7
+ import {
8
+ StyledCode
9
+ } from "./chunk-BCFRW7CV.js";
4
10
  import {
5
11
  displaySelector
6
- } from "./chunk-LWTUQB7O.js";
12
+ } from "./chunk-SW6ZA7W2.js";
7
13
  import {
8
14
  ALL_HEADLINE_SELECTORS,
9
15
  headlineSelector
10
- } from "./chunk-W4GDCWKZ.js";
16
+ } from "./chunk-4K2KAYVH.js";
11
17
  import {
12
18
  overflowAutoWithoutScrollbars
13
- } from "./chunk-LZHLWOXG.js";
19
+ } from "./chunk-SV5QPU7N.js";
20
+ import {
21
+ StyledContentTable
22
+ } from "./chunk-EZ4RHFY7.js";
14
23
  import {
15
24
  colors
16
- } from "./chunk-ACZDUWPH.js";
25
+ } from "./chunk-2VBDEO6M.js";
17
26
  import {
18
27
  getTypographyString
19
- } from "./chunk-WVJNZRKF.js";
28
+ } from "./chunk-E4EXM4SY.js";
20
29
 
21
30
  // src/styles/fonts/typography/Article.tsx
22
31
  import styled from "@emotion/styled";
@@ -27,65 +36,70 @@ var Article = styled.article`
27
36
 
28
37
  ${headlineSelector("h1")} {
29
38
  margin: 0;
30
- padding-bottom: 8px;
39
+ padding-bottom: ${"8px" /* xs */};
31
40
  }
32
41
 
33
42
  ${headlineSelector("h2")} {
34
- padding-top: 32px;
35
- padding-bottom: 8px;
43
+ padding-top: ${"40px" /* 2xl */};
44
+ padding-bottom: ${"8px" /* xs */};
36
45
  margin: 0;
37
46
  }
38
47
 
39
48
  ${headlineSelector("h3")} {
40
- padding-top: 32px;
41
- padding-bottom: 8px;
49
+ padding-top: ${"40px" /* 2xl */};
50
+ padding-bottom: ${"8px" /* xs */};
42
51
  margin: 0;
43
52
  }
44
53
 
45
54
  ${headlineSelector("h4")} {
46
- padding-top: 16px;
47
- padding-bottom: 8px;
55
+ padding-top: ${"40px" /* 2xl */};
56
+ padding-bottom: ${"8px" /* xs */};
48
57
  margin: 0;
49
58
  }
50
59
 
51
60
  ${headlineSelector("h5")} {
52
- padding-top: 32px;
53
- padding-bottom: 8px;
61
+ padding-top: ${"40px" /* 2xl */};
62
+ padding-bottom: ${"8px" /* xs */};
54
63
  margin: 0;
55
64
  }
56
65
 
57
66
  ${headlineSelector("h6")} {
58
- padding-top: 32px;
59
- padding-bottom: 8px;
67
+ padding-top: ${"40px" /* 2xl */};
68
+ padding-bottom: ${"8px" /* xs */};
60
69
  margin: 0;
61
70
  }
62
71
 
63
72
  ${StyledBody} {
64
- margin-top: 12px;
65
- margin-bottom: 12px;
73
+ margin-top: ${"8px" /* xs */};
74
+ margin-bottom: ${"8px" /* xs */};
75
+ }
76
+
77
+ ${StyledContentTable} {
78
+ margin: ${"40px" /* 2xl */} 0;
66
79
  }
67
80
 
68
81
  img {
69
- margin-top: 16px;
70
- margin-bottom: 16px;
82
+ margin-top: ${"16px" /* md */};
83
+ margin-bottom: ${"16px" /* md */};
71
84
  }
72
85
 
73
86
  strong {
74
87
  font-weight: 700;
75
88
  }
76
89
 
77
- *:not(${ALL_HEADLINE_SELECTORS}) > a {
90
+ *:not(${ALL_HEADLINE_SELECTORS},${StyledTitle},${StyledCode}) > a {
78
91
  ${({ theme }) => getTypographyString(
79
92
  theme.typography[theme.app]["Label Strong"]["Large" /* Large */]
80
93
  )}
94
+ font-size: inherit;
81
95
  color: ${({ theme }) => theme.link};
82
96
  }
83
97
 
84
98
  ul,
85
99
  ol {
86
- padding-left: 24px;
87
- margin-top: 8px;
88
- margin-bottom: 8px;
100
+ padding-left: ${"24px" /* lg */};
101
+ margin-top: ${"8px" /* xs */};
102
+ margin-bottom: ${"8px" /* xs */};
89
103
  *:not(a) {
90
104
  color: ${({ theme }) => theme.text};
91
105
  }
@@ -94,23 +108,23 @@ var Article = styled.article`
94
108
  li {
95
109
  ${({ theme }) => getTypographyString(theme.typography[theme.app].Body["Medium" /* Medium */])}
96
110
  :not(:last-child) {
97
- margin-bottom: 4px;
111
+ margin-bottom: ${"4px" /* 3xs */};
98
112
  }
99
113
  }
100
114
 
101
115
  code:not([class|="language"]) {
102
116
  ${({ theme }) => getTypographyString(theme.typography[theme.app].Code["Medium" /* Medium */])}
103
117
  background: ${colors.uma.blue90};
104
- padding: 2px 6px;
105
- margin: 2px;
118
+ padding: ${"2px" /* 4xs */} ${"6px" /* 2xs */};
119
+ margin: ${"2px" /* 4xs */};
106
120
  border-radius: 4px;
107
121
  }
108
122
 
109
123
  pre[class|="language"] {
110
124
  border-radius: 8px;
111
125
  width: 100%;
112
- padding: 16px 24px;
113
- margin: 0;
126
+ padding: ${"16px" /* md */} ${"24px" /* lg */};
127
+ margin: ${"16px" /* md */} 0;
114
128
  }
115
129
 
116
130
  // Must match specificity of prismjs to get proper line height!
@@ -120,6 +134,10 @@ var Article = styled.article`
120
134
 
121
135
  ${overflowAutoWithoutScrollbars}
122
136
  }
137
+
138
+ blockquote {
139
+ margin: ${"8px" /* xs */} 0;
140
+ }
123
141
  `;
124
142
 
125
143
  export {
@@ -1,32 +1,35 @@
1
1
  import {
2
2
  useLiveRef
3
3
  } from "./chunk-NBCCPGA4.js";
4
+ import {
5
+ ProgressBar
6
+ } from "./chunk-ZQTE53SK.js";
4
7
  import {
5
8
  Button
6
- } from "./chunk-4X3K3VRC.js";
9
+ } from "./chunk-SUD5NOKE.js";
7
10
  import {
8
11
  overflowAutoWithoutScrollbars,
9
12
  pxToRems
10
- } from "./chunk-LZHLWOXG.js";
13
+ } from "./chunk-SV5QPU7N.js";
11
14
  import {
12
15
  UnstyledButton
13
- } from "./chunk-X6BI4STY.js";
16
+ } from "./chunk-DHNWT2E5.js";
14
17
  import {
15
18
  Icon
16
- } from "./chunk-L7XFJWMY.js";
19
+ } from "./chunk-MYG24ZWT.js";
17
20
  import {
18
21
  overlaySurface,
19
22
  smContentInset,
20
23
  standardContentInsetSmPx,
21
24
  standardFocusOutline
22
- } from "./chunk-QR7BKTM6.js";
25
+ } from "./chunk-XUGLVWSH.js";
26
+ import {
27
+ z
28
+ } from "./chunk-CLU2FRJZ.js";
23
29
  import {
24
30
  bp,
25
31
  useBreakpoints
26
32
  } from "./chunk-JSGRNWSB.js";
27
- import {
28
- z
29
- } from "./chunk-CLU2FRJZ.js";
30
33
 
31
34
  // src/components/Modal.tsx
32
35
  import styled from "@emotion/styled";
@@ -51,8 +54,10 @@ function Modal({
51
54
  firstFocusRef,
52
55
  nonDismissable = false,
53
56
  autoFocus = true,
54
- width
57
+ width = 460,
58
+ progressBar
55
59
  }) {
60
+ const visibleChangedRef = useRef(false);
56
61
  const nodeRef = useRef(null);
57
62
  const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
58
63
  const ref = firstFocusRef || defaultFirstFocusRef;
@@ -62,6 +67,12 @@ function Modal({
62
67
  const modalContainerRef = useRef(null);
63
68
  const bp2 = useBreakpoints();
64
69
  const isSm = bp2.current("sm" /* sm */);
70
+ useEffect(() => {
71
+ if (visible !== visibleChangedRef.current) {
72
+ visibleChangedRef.current = visible;
73
+ }
74
+ }, [visible]);
75
+ const visibleChanged = visible !== visibleChangedRef.current;
65
76
  useEffect(() => {
66
77
  prevFocusedElement.current = document.activeElement;
67
78
  if (!nodeRef.current) {
@@ -115,14 +126,16 @@ function Modal({
115
126
  }, [onClose, visible, nonDismissable]);
116
127
  useLayoutEffect(() => {
117
128
  if (visible) {
118
- prevFocusedElement.current = document.activeElement;
129
+ if (visibleChanged) {
130
+ prevFocusedElement.current = document.activeElement;
131
+ }
119
132
  if (typeof ref === "object" && (ref == null ? void 0 : ref.current) && autoFocus) {
120
133
  ref.current.focus();
121
134
  }
122
- } else if (prevFocusedElement.current) {
135
+ } else if (visibleChanged && prevFocusedElement.current) {
123
136
  prevFocusedElement.current.focus();
124
137
  }
125
- }, [visible, ref, autoFocus]);
138
+ }, [visible, visibleChanged, ref, autoFocus]);
126
139
  function onClickCloseButton(event) {
127
140
  event.stopPropagation();
128
141
  onClose();
@@ -154,6 +167,13 @@ function Modal({
154
167
  !firstFocusRef && /* @__PURE__ */ jsx(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
155
168
  !(nonDismissable || ghost) && /* @__PURE__ */ jsx(CloseButton, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ jsx(Icon, { name: "Close", width: 9 }) }),
156
169
  /* @__PURE__ */ jsxs(ModalContentInner, { ghost, children: [
170
+ progressBar ? /* @__PURE__ */ jsx("div", { css: { marginBottom: "20px" }, children: /* @__PURE__ */ jsx(
171
+ ProgressBar,
172
+ {
173
+ progressPercentage: progressBar.progressPercentage,
174
+ isSm: progressBar.isSm
175
+ }
176
+ ) }) : null,
157
177
  title ? /* @__PURE__ */ jsx("h4", { children: title }) : null,
158
178
  description ? /* @__PURE__ */ jsx(Description, { children: description }) : null,
159
179
  /* @__PURE__ */ jsx("div", { children }),
@@ -254,7 +274,8 @@ var ModalContent = styled.div`
254
274
  ${smContentInset}
255
275
  ${(props) => props.ghost ? "" : overlaySurface}
256
276
  pointer-events: auto;
257
- width: ${(props) => props.width || 430}px;
277
+ transition: width 0.25s ease-in;
278
+ width: ${(props) => props.width}px;
258
279
  max-width: 100%;
259
280
  max-height: 100%;
260
281
  border-radius: 16px;
@@ -1,6 +1,9 @@
1
+ import {
2
+ isString
3
+ } from "./chunk-LAMQKQU3.js";
1
4
  import {
2
5
  colors
3
- } from "./chunk-ACZDUWPH.js";
6
+ } from "./chunk-2VBDEO6M.js";
4
7
 
5
8
  // src/router.tsx
6
9
  import { omit } from "lodash-es";
@@ -37,6 +40,7 @@ function replaceParams(to, params) {
37
40
  }
38
41
  function Link({
39
42
  to,
43
+ externalLink,
40
44
  params,
41
45
  children,
42
46
  css,
@@ -46,8 +50,20 @@ function Link({
46
50
  blue = false,
47
51
  newTab = false
48
52
  }) {
49
- let toStr = replaceParams(to, params);
50
- toStr += hash ? `#${hash}` : "";
53
+ if (!isString(to) && !externalLink) {
54
+ throw new Error("Link must have either `to` or `externalLink` defined");
55
+ }
56
+ let toStr;
57
+ if (isString(to)) {
58
+ toStr = replaceParams(to, params);
59
+ toStr += hash ? `#${hash}` : "";
60
+ } else {
61
+ const definedExternalLink = externalLink;
62
+ if (!definedExternalLink.startsWith("http")) {
63
+ throw new Error("Link's externalLink must start with http");
64
+ }
65
+ toStr = definedExternalLink;
66
+ }
51
67
  return /* @__PURE__ */ jsx(
52
68
  RLink,
53
69
  {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Headline
3
- } from "./chunk-W4GDCWKZ.js";
3
+ } from "./chunk-4K2KAYVH.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-L7XFJWMY.js";
6
+ } from "./chunk-MYG24ZWT.js";
7
7
  import {
8
8
  __spreadProps,
9
9
  __spreadValues
@@ -1,19 +1,20 @@
1
1
  import {
2
2
  getTypographyString
3
- } from "./chunk-WVJNZRKF.js";
3
+ } from "./chunk-E4EXM4SY.js";
4
4
 
5
5
  // src/styles/fonts/typography/Code.tsx
6
6
  import styled from "@emotion/styled";
7
7
  import { jsx } from "@emotion/react/jsx-runtime";
8
8
  var Code = ({ children, size = "Medium" /* Medium */ }) => {
9
- return /* @__PURE__ */ jsx(CodeStyles, { size, children });
9
+ return /* @__PURE__ */ jsx(StyledCode, { size, children });
10
10
  };
11
- var CodeStyles = styled.div`
11
+ var StyledCode = styled.div`
12
12
  ${({ theme, size }) => {
13
13
  return size ? getTypographyString(theme.typography[theme.app].Code[size]) : "";
14
14
  }}
15
15
  `;
16
16
 
17
17
  export {
18
- Code
18
+ Code,
19
+ StyledCode
19
20
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardFocusOutline
3
- } from "./chunk-QR7BKTM6.js";
3
+ } from "./chunk-XUGLVWSH.js";
4
4
 
5
5
  // src/components/UnstyledButton.tsx
6
6
  import styled from "@emotion/styled";