@lightsparkdev/ui 0.0.6 → 0.0.8

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 (125) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{chunk-JYWYEOM6.js → chunk-2JM7UTAZ.js} +18 -5
  3. package/dist/{chunk-UO6U7AYM.js → chunk-2YB7653N.js} +1 -1
  4. package/dist/{chunk-RTUZVKPK.js → chunk-36C653MV.js} +1 -1
  5. package/dist/{chunk-IQFU7CM5.js → chunk-4KWTXZRY.js} +1 -1
  6. package/dist/{chunk-CLU2FRJZ.js → chunk-55OQPFLF.js} +1 -1
  7. package/dist/{chunk-3CZOYF3X.js → chunk-6FHLZM6N.js} +2 -2
  8. package/dist/{chunk-K7D7A34K.js → chunk-744FBGRP.js} +1 -1
  9. package/dist/{chunk-FKETYVPP.js → chunk-76Q4BK35.js} +87 -43
  10. package/dist/{chunk-NGS4OSWT.js → chunk-BAO4T4G5.js} +1 -1
  11. package/dist/{chunk-NH25O7PC.js → chunk-CW3W2VTZ.js} +1 -1
  12. package/dist/{chunk-G2PZZFJL.js → chunk-DAVVD7YE.js} +10 -10
  13. package/dist/{chunk-VBWTKANQ.js → chunk-FN5PM3HQ.js} +6 -6
  14. package/dist/{chunk-RFGKH3R6.js → chunk-HNVQIY5U.js} +0 -8
  15. package/dist/{chunk-I74XQIVV.js → chunk-MAMSU2XB.js} +3 -3
  16. package/dist/chunk-NRXJA2PM.js +67 -0
  17. package/dist/{chunk-M56R3RJ7.js → chunk-OGSDZTHM.js} +7 -3
  18. package/dist/chunk-SZVMKB4E.js +222 -0
  19. package/dist/chunk-U6XT5JKC.js +25 -0
  20. package/dist/{chunk-WWFDI534.js → chunk-UWN53KLJ.js} +13 -6
  21. package/dist/{chunk-TAI352I3.js → chunk-VE7J2N47.js} +1 -1
  22. package/dist/{chunk-NZJCJJH5.js → chunk-VHW2KROZ.js} +1 -1
  23. package/dist/{chunk-N2RDQJQ5.js → chunk-WTO7C7WA.js} +1 -1
  24. package/dist/{chunk-23SR7TFO.js → chunk-XAZ6NZ6I.js} +1 -1
  25. package/dist/chunk-YPB5SA65.js +163 -0
  26. package/dist/{chunk-SVQELXFK.js → chunk-Z5TPS2BO.js} +1 -1
  27. package/dist/{chunk-T33SBHYI.js → chunk-ZSUX6RLD.js} +3 -1
  28. package/dist/{chunk-2WYVO6B2.js → chunk-ZYHA6MJC.js} +1 -1
  29. package/dist/components/Badge.cjs +1332 -0
  30. package/dist/components/Badge.d.cts +10 -0
  31. package/dist/components/Badge.d.ts +10 -0
  32. package/dist/components/Badge.js +13 -0
  33. package/dist/components/Button.cjs +197 -83
  34. package/dist/components/Button.d.cts +3 -1
  35. package/dist/components/Button.d.ts +3 -1
  36. package/dist/components/Button.js +8 -7
  37. package/dist/components/ButtonRow.cjs +212 -82
  38. package/dist/components/ButtonRow.d.cts +6 -2
  39. package/dist/components/ButtonRow.d.ts +6 -2
  40. package/dist/components/ButtonRow.js +14 -11
  41. package/dist/components/Collapsible.cjs +0 -30
  42. package/dist/components/Collapsible.js +4 -5
  43. package/dist/components/ContentTable.cjs +0 -30
  44. package/dist/components/ContentTable.js +3 -4
  45. package/dist/components/CopyToClipboardButton.cjs +123 -41
  46. package/dist/components/CopyToClipboardButton.js +6 -5
  47. package/dist/components/CurrencyAmount.cjs +0 -30
  48. package/dist/components/CurrencyAmount.js +3 -4
  49. package/dist/components/FileInput.cjs +1945 -0
  50. package/dist/components/FileInput.d.cts +21 -0
  51. package/dist/components/FileInput.d.ts +21 -0
  52. package/dist/components/FileInput.js +113 -0
  53. package/dist/components/Icon.cjs +0 -30
  54. package/dist/components/Icon.js +2 -3
  55. package/dist/components/LightTooltip.cjs +1414 -0
  56. package/dist/components/LightTooltip.d.cts +9 -0
  57. package/dist/components/LightTooltip.d.ts +9 -0
  58. package/dist/components/LightTooltip.js +12 -0
  59. package/dist/components/LightboxImage.cjs +1 -1
  60. package/dist/components/LightboxImage.js +2 -2
  61. package/dist/components/LightsparkProvider.cjs +3 -33
  62. package/dist/components/LightsparkProvider.js +3 -4
  63. package/dist/components/Loading.cjs +0 -30
  64. package/dist/components/Loading.js +3 -4
  65. package/dist/components/Modal.cjs +208 -114
  66. package/dist/components/Modal.js +12 -11
  67. package/dist/components/Pill.cjs +1703 -0
  68. package/dist/components/Pill.d.cts +19 -0
  69. package/dist/components/Pill.d.ts +19 -0
  70. package/dist/components/Pill.js +16 -0
  71. package/dist/components/ProgressBar.cjs +0 -32
  72. package/dist/components/ProgressBar.js +2 -3
  73. package/dist/components/SecretContainer.cjs +124 -42
  74. package/dist/components/SecretContainer.js +7 -6
  75. package/dist/components/TextIconAligner.cjs +0 -30
  76. package/dist/components/TextIconAligner.js +3 -4
  77. package/dist/components/UnstyledButton.cjs +0 -30
  78. package/dist/components/UnstyledButton.js +2 -3
  79. package/dist/components/documentation/AnchorLinkHeader.cjs +0 -32
  80. package/dist/components/documentation/AnchorLinkHeader.js +3 -4
  81. package/dist/components/documentation/index.cjs +0 -32
  82. package/dist/components/documentation/index.js +3 -4
  83. package/dist/components/index.cjs +608 -327
  84. package/dist/components/index.d.cts +5 -1
  85. package/dist/components/index.d.ts +5 -1
  86. package/dist/components/index.js +37 -25
  87. package/dist/icons/Copy.cjs +4 -3
  88. package/dist/icons/Copy.js +4 -3
  89. package/dist/icons/Download.cjs +22 -11
  90. package/dist/icons/Download.js +23 -12
  91. package/dist/icons/Upload.cjs +22 -11
  92. package/dist/icons/Upload.js +23 -12
  93. package/dist/icons/index.cjs +0 -30
  94. package/dist/icons/index.js +2 -3
  95. package/dist/router.cjs +7 -3
  96. package/dist/router.js +1 -1
  97. package/dist/styles/common.cjs +0 -32
  98. package/dist/styles/common.d.cts +1 -5
  99. package/dist/styles/common.d.ts +1 -5
  100. package/dist/styles/common.js +1 -4
  101. package/dist/styles/fields.cjs +65 -34
  102. package/dist/styles/fields.d.cts +8 -2
  103. package/dist/styles/fields.d.ts +8 -2
  104. package/dist/styles/fields.js +28 -164
  105. package/dist/styles/fonts/typography/Article.cjs +0 -30
  106. package/dist/styles/fonts/typography/Article.js +6 -7
  107. package/dist/styles/fonts/typography/index.cjs +0 -30
  108. package/dist/styles/fonts/typography/index.js +11 -12
  109. package/dist/styles/fonts/typographyTokens.d.cts +4 -1
  110. package/dist/styles/fonts/typographyTokens.d.ts +4 -1
  111. package/dist/styles/global.cjs +3 -33
  112. package/dist/styles/global.js +2 -3
  113. package/dist/styles/type.cjs +0 -30
  114. package/dist/styles/type.js +2 -3
  115. package/dist/styles/utils.cjs +0 -30
  116. package/dist/styles/utils.js +2 -3
  117. package/dist/styles/z-index.cjs +1 -1
  118. package/dist/styles/z-index.d.cts +1 -1
  119. package/dist/styles/z-index.d.ts +1 -1
  120. package/dist/styles/z-index.js +1 -1
  121. package/dist/types/index.d.cts +2 -0
  122. package/dist/types/index.d.ts +2 -0
  123. package/dist/utils/toReactNodes.cjs +7 -3
  124. package/dist/utils/toReactNodes.js +2 -2
  125. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @lightsparkdev/ui
2
2
 
3
+ ## 0.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - df7bd3f: - Updates to LightTooltip
8
+ - 20fb70b: - Add Badge, FileInput, LightTooltip, Pill
9
+ - Single character Button should be round
10
+ - Allow "divider" in ButtonRow
11
+ - Updated dependencies [20fb70b]
12
+ - @lightsparkdev/core@1.0.17
13
+
14
+ ## 0.0.7
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [cb28f0e]
19
+ - @lightsparkdev/core@1.0.16
20
+
3
21
  ## 0.0.6
4
22
 
5
23
  ### Patch Changes
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-FKETYVPP.js";
3
+ } from "./chunk-76Q4BK35.js";
4
4
  import {
5
5
  overflowAutoWithoutScrollbars
6
- } from "./chunk-UO6U7AYM.js";
6
+ } from "./chunk-2YB7653N.js";
7
7
  import {
8
8
  standardContentInsetSmPx
9
- } from "./chunk-RFGKH3R6.js";
9
+ } from "./chunk-HNVQIY5U.js";
10
10
  import {
11
11
  bp
12
12
  } from "./chunk-JSGRNWSB.js";
@@ -23,7 +23,9 @@ function ButtonRow({
23
23
  smSticky = true,
24
24
  headerHeight = 0
25
25
  }) {
26
- return /* @__PURE__ */ jsx(ButtonRowContainer, { smSticky, headerHeight, children: /* @__PURE__ */ jsx(StyledButtonRow, { className, children: buttons.map((button, idx) => /* @__PURE__ */ jsx(Button, __spreadValues({}, button), idx)) }) });
26
+ return /* @__PURE__ */ jsx(ButtonRowContainer, { smSticky, headerHeight, children: /* @__PURE__ */ jsx(StyledButtonRow, { className, children: buttons.map(
27
+ (button, idx) => button === "divider" ? /* @__PURE__ */ jsx(ButtonRowDivider, {}, idx) : /* @__PURE__ */ jsx(Button, __spreadValues({}, button), idx)
28
+ ) }) });
27
29
  }
28
30
  var ButtonRowContainer = styled.div`
29
31
  max-width: 100%;
@@ -53,6 +55,11 @@ var ButtonRowContainer = styled.div`
53
55
  `
54
56
  )}
55
57
  `;
58
+ var ButtonRowDivider = styled.div`
59
+ border-left: 1px #d9d9d9 solid;
60
+ margin-left: 16px;
61
+ padding-left: 16px;
62
+ `;
56
63
  var StyledButtonRow = styled.div`
57
64
  ${overflowAutoWithoutScrollbars}
58
65
  background: ${({ theme }) => theme.bg};
@@ -65,6 +72,11 @@ var StyledButtonRow = styled.div`
65
72
  margin-left: 8px;
66
73
  }
67
74
 
75
+ & ${ButtonRowDivider} + button,
76
+ & ${ButtonRowDivider} + a {
77
+ margin-left: 0;
78
+ }
79
+
68
80
  ${bp.sm(`
69
81
  padding: 12px;
70
82
  `)}
@@ -72,5 +84,6 @@ var StyledButtonRow = styled.div`
72
84
 
73
85
  export {
74
86
  ButtonRow,
75
- ButtonRowContainer
87
+ ButtonRowContainer,
88
+ StyledButtonRow
76
89
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rootFontSizePx
3
- } from "./chunk-RFGKH3R6.js";
3
+ } from "./chunk-HNVQIY5U.js";
4
4
 
5
5
  // src/styles/utils.tsx
6
6
  import { css } from "@emotion/react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardBorderRadius
3
- } from "./chunk-RFGKH3R6.js";
3
+ } from "./chunk-HNVQIY5U.js";
4
4
  import {
5
5
  themeOr
6
6
  } from "./chunk-2VBDEO6M.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardFocusOutline
3
- } from "./chunk-RFGKH3R6.js";
3
+ } from "./chunk-HNVQIY5U.js";
4
4
 
5
5
  // src/components/UnstyledButton.tsx
6
6
  import styled from "@emotion/styled";
@@ -14,13 +14,13 @@ var z = {
14
14
  navAction: 101,
15
15
  smNavAction: 100,
16
16
  // keep under navDropdown
17
- tooltip: 160,
18
17
  notificationBanner: 170,
19
18
  qrReaderVideo: 180,
20
19
  qrReaderOverlay: 181,
21
20
  modalOverlay: 190,
22
21
  modalContainer: 191,
23
22
  dropdown: 192,
23
+ tooltip: 193,
24
24
  toast: 200
25
25
  };
26
26
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CopyToClipboardButton
3
- } from "./chunk-WWFDI534.js";
3
+ } from "./chunk-UWN53KLJ.js";
4
4
  import {
5
5
  standardBorderRadius
6
- } from "./chunk-RFGKH3R6.js";
6
+ } from "./chunk-HNVQIY5U.js";
7
7
 
8
8
  // src/components/SecretContainer.tsx
9
9
  import styled from "@emotion/styled";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-NZJCJJH5.js";
3
+ } from "./chunk-VHW2KROZ.js";
4
4
 
5
5
  // src/components/ContentTable.tsx
6
6
  import styled from "@emotion/styled";
@@ -1,21 +1,24 @@
1
1
  import {
2
2
  Link
3
- } from "./chunk-M56R3RJ7.js";
3
+ } from "./chunk-OGSDZTHM.js";
4
4
  import {
5
5
  select
6
6
  } from "./chunk-YMNSXZ5D.js";
7
7
  import {
8
8
  Loading
9
- } from "./chunk-NGS4OSWT.js";
9
+ } from "./chunk-BAO4T4G5.js";
10
10
  import {
11
11
  UnstyledButton
12
- } from "./chunk-IQFU7CM5.js";
12
+ } from "./chunk-4KWTXZRY.js";
13
+ import {
14
+ LightTooltip
15
+ } from "./chunk-NRXJA2PM.js";
13
16
  import {
14
17
  Icon
15
- } from "./chunk-NZJCJJH5.js";
18
+ } from "./chunk-VHW2KROZ.js";
16
19
  import {
17
20
  getFocusOutline
18
- } from "./chunk-RFGKH3R6.js";
21
+ } from "./chunk-HNVQIY5U.js";
19
22
  import {
20
23
  colors,
21
24
  themeOr
@@ -28,6 +31,8 @@ import {
28
31
  // src/components/Button.tsx
29
32
  import { css } from "@emotion/react";
30
33
  import styled from "@emotion/styled";
34
+ import { uniqueId } from "lodash-es";
35
+ import { Fragment, useRef } from "react";
31
36
  import { jsx, jsxs } from "@emotion/react/jsx-runtime";
32
37
  function getTextColor({ color, theme, primary, blue }) {
33
38
  if (color) {
@@ -63,12 +68,37 @@ function getBackgroundColor({
63
68
  }
64
69
  return themeOr(colors.white, theme.c1Neutral)({ theme });
65
70
  }
66
- function getPaddingX({ size, ghost }) {
67
- return ghost ? 0 : size === "lg" ? hPaddingPx : size === "md" ? 18 : 16;
71
+ var paddingsY = {
72
+ lg: 14,
73
+ md: 9,
74
+ sm: 6
75
+ };
76
+ var roundPaddingsX = {
77
+ lg: 19,
78
+ md: 14,
79
+ sm: 10
80
+ };
81
+ var paddingsX = {
82
+ lg: 24,
83
+ md: 18,
84
+ sm: 16
85
+ };
86
+ function getPaddingX({
87
+ size,
88
+ ghost,
89
+ isRound
90
+ }) {
91
+ return ghost ? 0 : isRound ? roundPaddingsX[size] : paddingsX[size];
68
92
  }
69
- function getPadding({ iconWidth, size, ghost, iconSide }) {
70
- const paddingY = ghost ? 0 : size === "lg" ? 14 : size === "md" ? 9 : 6;
71
- const paddingX = getPaddingX({ size, ghost });
93
+ function getPadding({
94
+ iconWidth,
95
+ size,
96
+ ghost,
97
+ iconSide,
98
+ isRound
99
+ }) {
100
+ const paddingY = ghost ? 0 : paddingsY[size];
101
+ const paddingX = getPaddingX({ size, ghost, isRound });
72
102
  const paddingForIcon = iconWidth && !ghost ? iconWidth : 0;
73
103
  return `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
74
104
  }
@@ -117,8 +147,10 @@ function Button({
117
147
  type = "button",
118
148
  blue = false,
119
149
  newTab = false,
120
- zIndex = void 0
150
+ zIndex = void 0,
151
+ tooltipText
121
152
  }) {
153
+ const tooltipId = useRef(uniqueId());
122
154
  const iconMarginRight = 6;
123
155
  const iconSize = size === "lg" ? 16 : 12;
124
156
  let currentIcon = null;
@@ -127,30 +159,34 @@ function Button({
127
159
  } else if (icon) {
128
160
  currentIcon = /* @__PURE__ */ jsx(ButtonIcon, { ghost, iconSide, text, size, children: /* @__PURE__ */ jsx(Icon, { name: icon, width: iconSize }) });
129
161
  }
130
- const content = /* @__PURE__ */ jsxs(
131
- "div",
132
- {
133
- css: {
134
- display: "flex",
135
- alignItems: "center",
136
- justifyContent: "center"
137
- },
138
- children: [
139
- iconSide === "left" && currentIcon,
140
- /* @__PURE__ */ jsx(
141
- "div",
142
- {
143
- css: {
144
- textOverflow: "ellipsis",
145
- overflow: "hidden"
146
- },
147
- children: text
148
- }
149
- ),
150
- iconSide === "right" && currentIcon
151
- ]
152
- }
153
- );
162
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
163
+ /* @__PURE__ */ jsxs(
164
+ "div",
165
+ __spreadProps(__spreadValues({}, tooltipText ? { "data-tooltip-id": tooltipId.current } : {}), {
166
+ css: {
167
+ display: "flex",
168
+ alignItems: "center",
169
+ justifyContent: "center"
170
+ },
171
+ children: [
172
+ iconSide === "left" && currentIcon,
173
+ /* @__PURE__ */ jsx(
174
+ "div",
175
+ {
176
+ css: {
177
+ textOverflow: "ellipsis",
178
+ overflow: "hidden"
179
+ },
180
+ children: text
181
+ }
182
+ ),
183
+ iconSide === "right" && currentIcon
184
+ ]
185
+ })
186
+ ),
187
+ tooltipText ? /* @__PURE__ */ jsx(LightTooltip, { id: tooltipId.current, content: tooltipText }) : null
188
+ ] });
189
+ const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
154
190
  const commonProps = {
155
191
  backgroundColor,
156
192
  color,
@@ -163,6 +199,7 @@ function Button({
163
199
  fullWidth,
164
200
  blue,
165
201
  iconSide,
202
+ isRound: isSingleCharRoundButton,
166
203
  iconWidth: currentIcon ? iconSize + iconMarginRight : 0,
167
204
  isLoading: loading,
168
205
  disabled: disabled || loading,
@@ -179,7 +216,6 @@ function Button({
179
216
  }
180
217
  return href ? /* @__PURE__ */ jsx(ButtonHrefLink, __spreadProps(__spreadValues({}, commonProps), { href, target: "_blank", children: content })) : /* @__PURE__ */ jsx(StyledButton, __spreadProps(__spreadValues({}, commonProps), { children: content }));
181
218
  }
182
- var hPaddingPx = 24;
183
219
  var buttonStyle = ({
184
220
  color,
185
221
  backgroundColor,
@@ -195,7 +231,8 @@ var buttonStyle = ({
195
231
  blue,
196
232
  text,
197
233
  zIndex,
198
- iconSide
234
+ iconSide,
235
+ isRound
199
236
  }) => css`
200
237
  display: inline-flex;
201
238
  opacity: ${disabled && !isLoading ? 0.2 : 1};
@@ -232,8 +269,15 @@ var buttonStyle = ({
232
269
  primary,
233
270
  blue
234
271
  })};
235
- border-radius: 32px;
236
- padding: ${getPadding({ size, iconWidth, text, ghost, iconSide })};
272
+ border-radius: ${isRound ? "100%" : "32px"};
273
+ padding: ${getPadding({
274
+ size,
275
+ iconWidth,
276
+ text,
277
+ ghost,
278
+ iconSide,
279
+ isRound
280
+ })};
237
281
  color: ${getTextColor({ color, theme, primary, blue })};
238
282
  transition:
239
283
  background-color 0.2s ease-out,
@@ -246,7 +290,7 @@ var buttonStyle = ({
246
290
  `;
247
291
  var ButtonIcon = styled.div`
248
292
  ${(props) => props.ghost ? "" : "position: absolute;"}
249
- ${({ iconSide, ghost, text, size }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size, ghost })}px;`}
293
+ ${({ iconSide, ghost, text, size }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size, ghost, isRound: false })}px;`}
250
294
  `;
251
295
  var StyledButton = styled(UnstyledButton)`
252
296
  ${(props) => buttonStyle(props)}
@@ -257,9 +301,9 @@ var ButtonLink = styled(Link)`
257
301
  var ButtonHrefLink = styled.a`
258
302
  ${(props) => buttonStyle(props)}
259
303
  `;
260
- var ButtonSelector = (prepend = "", append = "") => `${prepend}${select(StyledButton)}${append}, ${prepend}${select(
261
- ButtonLink
262
- )}${append}, ${prepend}${select(ButtonHrefLink)}${append}`;
304
+ var ButtonSelector = (prepend = "", append = "") => `${prepend}*:is(${select(StyledButton)}, ${select(ButtonLink)}, ${select(
305
+ ButtonHrefLink
306
+ )})${append}`;
263
307
 
264
308
  export {
265
309
  Button,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-NZJCJJH5.js";
3
+ } from "./chunk-VHW2KROZ.js";
4
4
 
5
5
  // src/components/Loading.tsx
6
6
  import styled from "@emotion/styled";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-YMNSXZ5D.js";
7
7
  import {
8
8
  Icon
9
- } from "./chunk-NZJCJJH5.js";
9
+ } from "./chunk-VHW2KROZ.js";
10
10
  import {
11
11
  __spreadProps,
12
12
  __spreadValues
@@ -1,42 +1,42 @@
1
1
  import {
2
2
  toReactNodes
3
- } from "./chunk-TAI352I3.js";
3
+ } from "./chunk-VE7J2N47.js";
4
4
  import {
5
5
  useLiveRef
6
6
  } from "./chunk-NBCCPGA4.js";
7
7
  import {
8
8
  ProgressBar
9
- } from "./chunk-RTUZVKPK.js";
9
+ } from "./chunk-36C653MV.js";
10
10
  import {
11
11
  Button
12
- } from "./chunk-FKETYVPP.js";
12
+ } from "./chunk-76Q4BK35.js";
13
13
  import {
14
14
  select
15
15
  } from "./chunk-YMNSXZ5D.js";
16
16
  import {
17
17
  overflowAutoWithoutScrollbars,
18
18
  pxToRems
19
- } from "./chunk-UO6U7AYM.js";
19
+ } from "./chunk-2YB7653N.js";
20
20
  import {
21
21
  UnstyledButton
22
- } from "./chunk-IQFU7CM5.js";
22
+ } from "./chunk-4KWTXZRY.js";
23
+ import {
24
+ z
25
+ } from "./chunk-55OQPFLF.js";
23
26
  import {
24
27
  Icon
25
- } from "./chunk-NZJCJJH5.js";
28
+ } from "./chunk-VHW2KROZ.js";
26
29
  import {
27
30
  overlaySurface,
28
31
  smContentInset,
29
32
  standardBorderRadius,
30
33
  standardContentInsetSmPx,
31
34
  standardFocusOutline
32
- } from "./chunk-RFGKH3R6.js";
35
+ } from "./chunk-HNVQIY5U.js";
33
36
  import {
34
37
  bp,
35
38
  useBreakpoints
36
39
  } from "./chunk-JSGRNWSB.js";
37
- import {
38
- z
39
- } from "./chunk-CLU2FRJZ.js";
40
40
 
41
41
  // src/components/Modal.tsx
42
42
  import styled from "@emotion/styled";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  StyledTitle
3
3
  } from "./chunk-FHNYQLMF.js";
4
- import {
5
- StyledBody
6
- } from "./chunk-LD5LZXUP.js";
7
4
  import {
8
5
  StyledCode
9
6
  } from "./chunk-BCFRW7CV.js";
10
7
  import {
11
8
  displaySelector
12
9
  } from "./chunk-QGGOMPHZ.js";
10
+ import {
11
+ StyledBody
12
+ } from "./chunk-LD5LZXUP.js";
13
13
  import {
14
14
  ALL_HEADLINE_SELECTORS,
15
15
  headlineSelector
@@ -19,13 +19,13 @@ import {
19
19
  } from "./chunk-YMNSXZ5D.js";
20
20
  import {
21
21
  overflowAutoWithoutScrollbars
22
- } from "./chunk-UO6U7AYM.js";
22
+ } from "./chunk-2YB7653N.js";
23
23
  import {
24
24
  StyledContentTable
25
- } from "./chunk-K7D7A34K.js";
25
+ } from "./chunk-744FBGRP.js";
26
26
  import {
27
27
  standardBorderRadius
28
- } from "./chunk-RFGKH3R6.js";
28
+ } from "./chunk-HNVQIY5U.js";
29
29
  import {
30
30
  colors
31
31
  } from "./chunk-2VBDEO6M.js";
@@ -6,14 +6,10 @@ import {
6
6
  import {
7
7
  bp
8
8
  } from "./chunk-JSGRNWSB.js";
9
- import {
10
- z
11
- } from "./chunk-CLU2FRJZ.js";
12
9
 
13
10
  // src/styles/common.tsx
14
11
  import { css } from "@emotion/react";
15
12
  import styled from "@emotion/styled";
16
- import { Tooltip } from "react-tooltip";
17
13
  var rootFontSizePx = 12;
18
14
  var rootFontSizeRems = rootFontSizePx / 16;
19
15
  var standardLineHeightEms = 1.21;
@@ -91,9 +87,6 @@ var Subtext = styled.div`
91
87
  var darkGradientBg = css`
92
88
  background: ${darkGradient};
93
89
  `;
94
- var StyledTooltip = styled(Tooltip)`
95
- z-index: ${z.modalOverlay};
96
- `;
97
90
  var overlaySurfaceBorderColor = ({
98
91
  theme,
99
92
  important = false
@@ -143,7 +136,6 @@ export {
143
136
  subtext,
144
137
  Subtext,
145
138
  darkGradientBg,
146
- StyledTooltip,
147
139
  overlaySurfaceBorderColor,
148
140
  overlaySurface,
149
141
  mcBold,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  overflowAutoWithoutScrollbars
3
- } from "./chunk-UO6U7AYM.js";
3
+ } from "./chunk-2YB7653N.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-NZJCJJH5.js";
6
+ } from "./chunk-VHW2KROZ.js";
7
7
  import {
8
8
  standardBorderRadius
9
- } from "./chunk-RFGKH3R6.js";
9
+ } from "./chunk-HNVQIY5U.js";
10
10
 
11
11
  // src/components/Collapsible.tsx
12
12
  import styled from "@emotion/styled";
@@ -0,0 +1,67 @@
1
+ import {
2
+ z
3
+ } from "./chunk-55OQPFLF.js";
4
+ import {
5
+ overlaySurface
6
+ } from "./chunk-HNVQIY5U.js";
7
+ import {
8
+ __spreadProps,
9
+ __spreadValues
10
+ } from "./chunk-CIGAQ47A.js";
11
+
12
+ // src/components/LightTooltip.tsx
13
+ import { css } from "@emotion/css";
14
+ import { useTheme } from "@emotion/react";
15
+ import React, { useEffect, useRef } from "react";
16
+ import ReactDOM from "react-dom";
17
+ import { Tooltip } from "react-tooltip";
18
+ import { jsx } from "@emotion/react/jsx-runtime";
19
+ function LightTooltip(props) {
20
+ const nodeRef = useRef(null);
21
+ const [nodeReady, setNodeReady] = React.useState(false);
22
+ useEffect(() => {
23
+ if (!nodeRef.current) {
24
+ nodeRef.current = document.createElement("div");
25
+ document.body.appendChild(nodeRef.current);
26
+ }
27
+ setNodeReady(true);
28
+ return () => {
29
+ if (nodeRef.current) {
30
+ document.body.removeChild(nodeRef.current);
31
+ nodeRef.current = null;
32
+ }
33
+ };
34
+ }, []);
35
+ const theme = useTheme();
36
+ console.log("LightTooltip.tsx: tooltipProps:", props);
37
+ return nodeReady && nodeRef.current ? ReactDOM.createPortal(
38
+ /* @__PURE__ */ jsx(
39
+ Tooltip,
40
+ __spreadProps(__spreadValues({}, props), {
41
+ id: props.id || "",
42
+ content: props.content || "",
43
+ noArrow: true,
44
+ border: "0.05rem solid rgba(0, 0, 0, 0.1)",
45
+ className: styles({ theme }),
46
+ variant: "light",
47
+ delayShow: 180
48
+ })
49
+ ),
50
+ nodeRef.current
51
+ ) : null;
52
+ }
53
+ var styles = ({ theme }) => css`
54
+ font-size: "10px",
55
+ color: ${theme.c2Neutral};
56
+ border-radius: 8px !important;
57
+ padding: 16px !important;
58
+ z-index: ${z.tooltip};
59
+ ${overlaySurface({ theme, important: true })};
60
+
61
+ max-width: 260px;
62
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10), 0px 4px 8px 0px rgba(0, 0, 0, 0.08) !important;
63
+ `;
64
+
65
+ export {
66
+ LightTooltip
67
+ };
@@ -50,19 +50,23 @@ function Link({
50
50
  blue = false,
51
51
  newTab = false
52
52
  }) {
53
- if (!isString(to) && !externalLink) {
54
- throw new Error("Link must have either `to` or `externalLink` defined");
53
+ if (!isString(to) && !externalLink && !onClick) {
54
+ throw new Error(
55
+ "Link must have either `to` or `externalLink` or `onClick` defined"
56
+ );
55
57
  }
56
58
  let toStr;
57
59
  if (isString(to)) {
58
60
  toStr = replaceParams(to, params);
59
61
  toStr += hash ? `#${hash}` : "";
60
- } else {
62
+ } else if (externalLink) {
61
63
  const definedExternalLink = externalLink;
62
64
  if (!definedExternalLink.startsWith("http")) {
63
65
  throw new Error("Link's externalLink must start with http");
64
66
  }
65
67
  toStr = definedExternalLink;
68
+ } else {
69
+ toStr = "#";
66
70
  }
67
71
  return /* @__PURE__ */ jsx(
68
72
  RLink,