@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
@@ -0,0 +1,29 @@
1
+ import "../chunk-CIGAQ47A.js";
2
+
3
+ // src/icons/Home.tsx
4
+ import { jsx } from "@emotion/react/jsx-runtime";
5
+ function Home() {
6
+ return /* @__PURE__ */ jsx(
7
+ "svg",
8
+ {
9
+ width: "100%",
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ children: /* @__PURE__ */ jsx(
14
+ "path",
15
+ {
16
+ d: "M3.75 9.2582C3.75 8.97962 3.75 8.84033 3.78504 8.71146C3.81609 8.59729 3.86716 8.48953 3.93586 8.39321C4.0134 8.28448 4.12121 8.19628 4.33682 8.01987L10.9868 2.57896C11.3478 2.28362 11.5283 2.13596 11.7291 2.07944C11.9063 2.02959 12.0937 2.02959 12.2709 2.07944C12.4717 2.13596 12.6522 2.28362 13.0132 2.57896L19.6632 8.01987C19.8788 8.19628 19.9866 8.28448 20.0641 8.39321C20.1328 8.48953 20.1839 8.59729 20.215 8.71146C20.25 8.84033 20.25 8.97962 20.25 9.2582V18.65C20.25 19.21 20.25 19.4901 20.141 19.704C20.0451 19.8921 19.8922 20.0451 19.704 20.141C19.4901 20.25 19.2101 20.25 18.65 20.25H5.35C4.78995 20.25 4.50992 20.25 4.29601 20.141C4.10785 20.0451 3.95487 19.8921 3.85899 19.704C3.75 19.4901 3.75 19.21 3.75 18.65V9.2582Z",
17
+ stroke: "currentColor",
18
+ strokeWidth: "1.5",
19
+ strokeLinejoin: "round"
20
+ }
21
+ )
22
+ }
23
+ );
24
+ }
25
+ var Home_default = Home;
26
+ export {
27
+ Home,
28
+ Home_default as default
29
+ };
@@ -25,23 +25,33 @@ __export(Person_exports, {
25
25
  module.exports = __toCommonJS(Person_exports);
26
26
  var import_jsx_runtime = require("@emotion/react/jsx-runtime");
27
27
  var Person = () => {
28
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
29
29
  "svg",
30
30
  {
31
31
  width: "100%",
32
- viewBox: "0 0 13 14",
32
+ viewBox: "0 0 24 24",
33
33
  fill: "none",
34
34
  xmlns: "http://www.w3.org/2000/svg",
35
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
36
- "path",
37
- {
38
- d: "M1 13.25V11.5C1 10.0503 2.17525 8.875 3.625 8.875H8.875C10.3247 8.875 11.5 10.0503 11.5 11.5V13.25M6.25 1C4.91293 1 3.625 2.04153 3.625 3.625C3.625 4.96207 4.66653 6.25 6.25 6.25C7.83347 6.25 8.875 4.96207 8.875 3.625C8.875 2.04153 7.58707 1 6.25 1Z",
39
- stroke: "currentColor",
40
- strokeWidth: "1.5",
41
- strokeLinecap: "round",
42
- strokeLinejoin: "round"
43
- }
44
- )
35
+ children: [
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
+ "path",
38
+ {
39
+ d: "M15.7485 6.5C15.7485 8.57107 14.0696 10.25 11.9985 10.25C9.92747 10.25 8.24854 8.57107 8.24854 6.5C8.24854 4.42893 9.92747 2.75 11.9985 2.75C14.0696 2.75 15.7485 4.42893 15.7485 6.5Z",
40
+ stroke: "currentColor",
41
+ strokeWidth: "1.5",
42
+ strokeLinejoin: "round"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ "path",
47
+ {
48
+ d: "M11.9985 13.25C8.20293 13.25 5.43245 15.7735 4.67009 19.1657C4.54089 19.7406 5.0077 20.25 5.59696 20.25H18.4001C18.9894 20.25 19.4562 19.7406 19.327 19.1657C18.5646 15.7735 15.7941 13.25 11.9985 13.25Z",
49
+ stroke: "currentColor",
50
+ strokeWidth: "1.5",
51
+ strokeLinejoin: "round"
52
+ }
53
+ )
54
+ ]
45
55
  }
46
56
  );
47
57
  };
@@ -1,25 +1,35 @@
1
1
  import "../chunk-CIGAQ47A.js";
2
2
 
3
3
  // src/icons/Person.tsx
4
- import { jsx } from "@emotion/react/jsx-runtime";
4
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
5
5
  var Person = () => {
6
- return /* @__PURE__ */ jsx(
6
+ return /* @__PURE__ */ jsxs(
7
7
  "svg",
8
8
  {
9
9
  width: "100%",
10
- viewBox: "0 0 13 14",
10
+ viewBox: "0 0 24 24",
11
11
  fill: "none",
12
12
  xmlns: "http://www.w3.org/2000/svg",
13
- children: /* @__PURE__ */ jsx(
14
- "path",
15
- {
16
- d: "M1 13.25V11.5C1 10.0503 2.17525 8.875 3.625 8.875H8.875C10.3247 8.875 11.5 10.0503 11.5 11.5V13.25M6.25 1C4.91293 1 3.625 2.04153 3.625 3.625C3.625 4.96207 4.66653 6.25 6.25 6.25C7.83347 6.25 8.875 4.96207 8.875 3.625C8.875 2.04153 7.58707 1 6.25 1Z",
17
- stroke: "currentColor",
18
- strokeWidth: "1.5",
19
- strokeLinecap: "round",
20
- strokeLinejoin: "round"
21
- }
22
- )
13
+ children: [
14
+ /* @__PURE__ */ jsx(
15
+ "path",
16
+ {
17
+ d: "M15.7485 6.5C15.7485 8.57107 14.0696 10.25 11.9985 10.25C9.92747 10.25 8.24854 8.57107 8.24854 6.5C8.24854 4.42893 9.92747 2.75 11.9985 2.75C14.0696 2.75 15.7485 4.42893 15.7485 6.5Z",
18
+ stroke: "currentColor",
19
+ strokeWidth: "1.5",
20
+ strokeLinejoin: "round"
21
+ }
22
+ ),
23
+ /* @__PURE__ */ jsx(
24
+ "path",
25
+ {
26
+ d: "M11.9985 13.25C8.20293 13.25 5.43245 15.7735 4.67009 19.1657C4.54089 19.7406 5.0077 20.25 5.59696 20.25H18.4001C18.9894 20.25 19.4562 19.7406 19.327 19.1657C18.5646 15.7735 15.7941 13.25 11.9985 13.25Z",
27
+ stroke: "currentColor",
28
+ strokeWidth: "1.5",
29
+ strokeLinejoin: "round"
30
+ }
31
+ )
32
+ ]
23
33
  }
24
34
  );
25
35
  };
@@ -28,15 +28,15 @@ var Team = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
28
  "svg",
29
29
  {
30
30
  width: "100%",
31
- viewBox: "0 0 12 13",
31
+ viewBox: "0 0 24 24",
32
32
  fill: "none",
33
33
  xmlns: "http://www.w3.org/2000/svg",
34
34
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
35
  "path",
36
36
  {
37
- d: "M0.5625 11.9375V8.83036C0.5625 7.97234 1.25806 7.27679 2.11607 7.27679H4.44643C5.30444 7.27679 6 7.97234 6 8.83036V11.9375M8.33036 8.83036H9.88393C10.7419 8.83036 11.4375 9.52591 11.4375 10.3839V11.9375M3.28125 1.0625C4.29498 1.0625 5.22321 1.83929 5.22321 3.00446C5.22321 4.16964 4.29498 4.94643 3.28125 4.94643C2.26752 4.94643 1.33929 4.16964 1.33929 3.00446C1.33929 1.83929 2.26752 1.0625 3.28125 1.0625ZM9.10714 2.61607C8.31985 2.61607 7.55357 3.23591 7.55357 4.16964C7.55357 5.10337 8.31985 5.72321 9.10714 5.72321C9.89444 5.72321 10.6607 5.10337 10.6607 4.16964C10.6607 3.23591 9.89444 2.61607 9.10714 2.61607Z",
37
+ d: "M17.7498 19.25H21.4228C22.0042 19.25 22.468 18.754 22.3704 18.1808C21.8389 15.0624 20.0189 12.75 16.9998 12.75C16.5537 12.75 16.1338 12.8005 15.7404 12.8966M11.2497 7C11.2497 8.79493 9.79461 10.25 7.99969 10.25C6.20476 10.25 4.74969 8.79493 4.74969 7C4.74969 5.20507 6.20476 3.75 7.99969 3.75C9.79461 3.75 11.2497 5.20507 11.2497 7ZM19.7497 7.5C19.7497 9.01878 18.5185 10.25 16.9997 10.25C15.4809 10.25 14.2497 9.01878 14.2497 7.5C14.2497 5.98122 15.4809 4.75 16.9997 4.75C18.5185 4.75 19.7497 5.98122 19.7497 7.5ZM1.87029 19.1808C2.4382 15.4997 4.51686 12.75 7.99969 12.75C11.4825 12.75 13.5612 15.4997 14.1291 19.1808C14.2177 19.755 13.7549 20.25 13.1739 20.25H2.82547C2.24447 20.25 1.7817 19.755 1.87029 19.1808Z",
38
38
  stroke: "currentColor",
39
- strokeWidth: "1.125",
39
+ strokeWidth: "1.5",
40
40
  strokeLinecap: "round",
41
41
  strokeLinejoin: "round"
42
42
  }
@@ -6,15 +6,15 @@ var Team = () => /* @__PURE__ */ jsx(
6
6
  "svg",
7
7
  {
8
8
  width: "100%",
9
- viewBox: "0 0 12 13",
9
+ viewBox: "0 0 24 24",
10
10
  fill: "none",
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
12
  children: /* @__PURE__ */ jsx(
13
13
  "path",
14
14
  {
15
- d: "M0.5625 11.9375V8.83036C0.5625 7.97234 1.25806 7.27679 2.11607 7.27679H4.44643C5.30444 7.27679 6 7.97234 6 8.83036V11.9375M8.33036 8.83036H9.88393C10.7419 8.83036 11.4375 9.52591 11.4375 10.3839V11.9375M3.28125 1.0625C4.29498 1.0625 5.22321 1.83929 5.22321 3.00446C5.22321 4.16964 4.29498 4.94643 3.28125 4.94643C2.26752 4.94643 1.33929 4.16964 1.33929 3.00446C1.33929 1.83929 2.26752 1.0625 3.28125 1.0625ZM9.10714 2.61607C8.31985 2.61607 7.55357 3.23591 7.55357 4.16964C7.55357 5.10337 8.31985 5.72321 9.10714 5.72321C9.89444 5.72321 10.6607 5.10337 10.6607 4.16964C10.6607 3.23591 9.89444 2.61607 9.10714 2.61607Z",
15
+ d: "M17.7498 19.25H21.4228C22.0042 19.25 22.468 18.754 22.3704 18.1808C21.8389 15.0624 20.0189 12.75 16.9998 12.75C16.5537 12.75 16.1338 12.8005 15.7404 12.8966M11.2497 7C11.2497 8.79493 9.79461 10.25 7.99969 10.25C6.20476 10.25 4.74969 8.79493 4.74969 7C4.74969 5.20507 6.20476 3.75 7.99969 3.75C9.79461 3.75 11.2497 5.20507 11.2497 7ZM19.7497 7.5C19.7497 9.01878 18.5185 10.25 16.9997 10.25C15.4809 10.25 14.2497 9.01878 14.2497 7.5C14.2497 5.98122 15.4809 4.75 16.9997 4.75C18.5185 4.75 19.7497 5.98122 19.7497 7.5ZM1.87029 19.1808C2.4382 15.4997 4.51686 12.75 7.99969 12.75C11.4825 12.75 13.5612 15.4997 14.1291 19.1808C14.2177 19.755 13.7549 20.25 13.1739 20.25H2.82547C2.24447 20.25 1.7817 19.755 1.87029 19.1808Z",
16
16
  stroke: "currentColor",
17
- strokeWidth: "1.125",
17
+ strokeWidth: "1.5",
18
18
  strokeLinecap: "round",
19
19
  strokeLinejoin: "round"
20
20
  }
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Icon,
3
3
  IconContainer
4
- } from "../chunk-MYG24ZWT.js";
4
+ } from "../chunk-NZJCJJH5.js";
5
5
  import "../chunk-LAMQKQU3.js";
6
- import "../chunk-XUGLVWSH.js";
7
- import "../chunk-CLU2FRJZ.js";
6
+ import "../chunk-RFGKH3R6.js";
8
7
  import "../chunk-2VBDEO6M.js";
9
8
  import "../chunk-E4EXM4SY.js";
10
9
  import "../chunk-JSGRNWSB.js";
10
+ import "../chunk-CLU2FRJZ.js";
11
11
  import "../chunk-CIGAQ47A.js";
12
12
  export {
13
13
  Icon,
package/dist/router.cjs CHANGED
@@ -39,6 +39,7 @@ var router_exports = {};
39
39
  __export(router_exports, {
40
40
  Link: () => Link,
41
41
  Navigate: () => Navigate,
42
+ getRouteName: () => getRouteName,
42
43
  replaceParams: () => replaceParams,
43
44
  useCurrentRoute: () => useCurrentRoute,
44
45
  useFindMatchingRoute: () => useFindMatchingRoute,
@@ -1269,10 +1270,19 @@ function useCurrentRoute() {
1269
1270
  const location = (0, import_react_router_dom.useLocation)();
1270
1271
  return location.pathname;
1271
1272
  }
1273
+ function getRouteName(path, routes) {
1274
+ for (const routeName of Object.keys(routes)) {
1275
+ if ((0, import_react_router_dom.matchPath)(routes[routeName], path)) {
1276
+ return routeName;
1277
+ }
1278
+ }
1279
+ return null;
1280
+ }
1272
1281
  // Annotate the CommonJS export names for ESM import in node:
1273
1282
  0 && (module.exports = {
1274
1283
  Link,
1275
1284
  Navigate,
1285
+ getRouteName,
1276
1286
  replaceParams,
1277
1287
  useCurrentRoute,
1278
1288
  useFindMatchingRoute,
package/dist/router.d.cts CHANGED
@@ -37,6 +37,9 @@ declare function useNavigate<RoutesType extends string>(): (to: RoutesType | num
37
37
  declare function useMatchRoutes<RoutesType extends string>(routes: RoutesType[]): boolean;
38
38
  declare function useFindMatchingRoute<RoutesType extends string>(routes: RoutesType[]): RoutesType | undefined;
39
39
  declare function useMatchRoute<RoutesType extends string>(route: RoutesType): PathMatch<string> | null;
40
- declare function useCurrentRoute<RoutesType>(): RoutesType;
40
+ declare function useCurrentRoute<RoutesType extends string>(): RoutesType;
41
+ declare function getRouteName<RoutesType extends string>(path: RoutesType, routes: {
42
+ [key: string]: string;
43
+ }): string | null;
41
44
 
42
- export { ExternalLink, Link, LinkProps, Navigate, QueryParams, RouteHash, RouteParams, replaceParams, useCurrentRoute, useFindMatchingRoute, useMatchRoute, useMatchRoutes, useNavigate };
45
+ export { ExternalLink, Link, LinkProps, Navigate, QueryParams, RouteHash, RouteParams, getRouteName, replaceParams, useCurrentRoute, useFindMatchingRoute, useMatchRoute, useMatchRoutes, useNavigate };
package/dist/router.d.ts CHANGED
@@ -37,6 +37,9 @@ declare function useNavigate<RoutesType extends string>(): (to: RoutesType | num
37
37
  declare function useMatchRoutes<RoutesType extends string>(routes: RoutesType[]): boolean;
38
38
  declare function useFindMatchingRoute<RoutesType extends string>(routes: RoutesType[]): RoutesType | undefined;
39
39
  declare function useMatchRoute<RoutesType extends string>(route: RoutesType): PathMatch<string> | null;
40
- declare function useCurrentRoute<RoutesType>(): RoutesType;
40
+ declare function useCurrentRoute<RoutesType extends string>(): RoutesType;
41
+ declare function getRouteName<RoutesType extends string>(path: RoutesType, routes: {
42
+ [key: string]: string;
43
+ }): string | null;
41
44
 
42
- export { ExternalLink, Link, LinkProps, Navigate, QueryParams, RouteHash, RouteParams, replaceParams, useCurrentRoute, useFindMatchingRoute, useMatchRoute, useMatchRoutes, useNavigate };
45
+ export { ExternalLink, Link, LinkProps, Navigate, QueryParams, RouteHash, RouteParams, getRouteName, replaceParams, useCurrentRoute, useFindMatchingRoute, useMatchRoute, useMatchRoutes, useNavigate };
package/dist/router.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  Link,
3
3
  Navigate,
4
+ getRouteName,
4
5
  replaceParams,
5
6
  useCurrentRoute,
6
7
  useFindMatchingRoute,
7
8
  useMatchRoute,
8
9
  useMatchRoutes,
9
10
  useNavigate
10
- } from "./chunk-6RXFA73Z.js";
11
+ } from "./chunk-M56R3RJ7.js";
11
12
  import "./chunk-LAMQKQU3.js";
12
13
  import "./chunk-2VBDEO6M.js";
13
14
  import "./chunk-E4EXM4SY.js";
@@ -16,6 +17,7 @@ import "./chunk-CIGAQ47A.js";
16
17
  export {
17
18
  Link,
18
19
  Navigate,
20
+ getRouteName,
19
21
  replaceParams,
20
22
  useCurrentRoute,
21
23
  useFindMatchingRoute,
@@ -131,5 +131,6 @@ declare function useThemeBg(): string;
131
131
  type ThemeProp = {
132
132
  theme: Theme;
133
133
  };
134
+ type WithTheme<T extends Record<string, unknown>> = T & ThemeProp;
134
135
 
135
- export { LightsparkTheme, ThemeProp, Themes, colors, componentToHex, contrast, darkGradient, hexToRGB, hexToRGBAStr, ifDark, ifLight, isDark, isLight, luminance, rgbToHex, themeOr, themeWithTypography, themes, useThemeBg };
136
+ export { LightsparkTheme, ThemeProp, Themes, WithTheme, colors, componentToHex, contrast, darkGradient, hexToRGB, hexToRGBAStr, ifDark, ifLight, isDark, isLight, luminance, rgbToHex, themeOr, themeWithTypography, themes, useThemeBg };
@@ -131,5 +131,6 @@ declare function useThemeBg(): string;
131
131
  type ThemeProp = {
132
132
  theme: Theme;
133
133
  };
134
+ type WithTheme<T extends Record<string, unknown>> = T & ThemeProp;
134
135
 
135
- export { LightsparkTheme, ThemeProp, Themes, colors, componentToHex, contrast, darkGradient, hexToRGB, hexToRGBAStr, ifDark, ifLight, isDark, isLight, luminance, rgbToHex, themeOr, themeWithTypography, themes, useThemeBg };
136
+ export { LightsparkTheme, ThemeProp, Themes, WithTheme, colors, componentToHex, contrast, darkGradient, hexToRGB, hexToRGBAStr, ifDark, ifLight, isDark, isLight, luminance, rgbToHex, themeOr, themeWithTypography, themes, useThemeBg };
@@ -59,11 +59,13 @@ __export(common_exports, {
59
59
  minSmMaxLgContentInset: () => minSmMaxLgContentInset,
60
60
  outlineOffset: () => outlineOffset,
61
61
  overlaySurface: () => overlaySurface,
62
+ overlaySurfaceBorderColor: () => overlaySurfaceBorderColor,
62
63
  pageBorderRadius: () => pageBorderRadius,
63
64
  pageBorderRadiusPx: () => pageBorderRadiusPx,
64
65
  rootFontSizePx: () => rootFontSizePx,
65
66
  rootFontSizeRems: () => rootFontSizeRems,
66
67
  smContentInset: () => smContentInset,
68
+ standardBorderRadius: () => standardBorderRadius,
67
69
  standardCardShadow: () => standardCardShadow,
68
70
  standardContentInset: () => standardContentInset,
69
71
  standardContentInsetMdPx: () => standardContentInsetMdPx,
@@ -1321,6 +1323,12 @@ var standardContentInsetPx = 32;
1321
1323
  var standardContentInsetMdPx = 24;
1322
1324
  var standardContentInsetSmPx = 16;
1323
1325
  var cardBorderRadiusPx = 16;
1326
+ var standardBorderRadius = (radius) => {
1327
+ const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
1328
+ return `
1329
+ border-radius: ${borderRadiusPx};
1330
+ `;
1331
+ };
1324
1332
  var smContentInset = import_react4.css`
1325
1333
  ${bp.sm(`
1326
1334
  margin-left: auto;
@@ -1387,11 +1395,23 @@ var darkGradientBg = import_react4.css`
1387
1395
  var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
1388
1396
  z-index: ${z.modalOverlay};
1389
1397
  `;
1390
- var overlaySurface = ({ theme }) => import_react4.css`
1391
- background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })};
1392
- border: 0.5px solid ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })};
1398
+ var overlaySurfaceBorderColor = ({
1399
+ theme,
1400
+ important = false
1401
+ }) => import_react4.css`
1402
+ border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
1403
+ ${important ? "!important" : ""};
1404
+ `;
1405
+ var overlaySurface = ({
1406
+ theme,
1407
+ important = false
1408
+ }) => import_react4.css`
1409
+ background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })}
1410
+ ${important ? "!important" : ""};
1411
+ border: 0.5px solid ${important ? "!important" : ""};
1412
+ ${overlaySurfaceBorderColor({ theme, important })};
1393
1413
  ${themeOr(
1394
- "box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1);",
1414
+ `box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
1395
1415
  ""
1396
1416
  )({ theme })}
1397
1417
  `;
@@ -1414,11 +1434,13 @@ var mcBoldStyled = ({ theme }) => mcBold(theme);
1414
1434
  minSmMaxLgContentInset,
1415
1435
  outlineOffset,
1416
1436
  overlaySurface,
1437
+ overlaySurfaceBorderColor,
1417
1438
  pageBorderRadius,
1418
1439
  pageBorderRadiusPx,
1419
1440
  rootFontSizePx,
1420
1441
  rootFontSizeRems,
1421
1442
  smContentInset,
1443
+ standardBorderRadius,
1422
1444
  standardCardShadow,
1423
1445
  standardContentInset,
1424
1446
  standardContentInsetMdPx,
@@ -3,7 +3,7 @@ import * as _emotion_styled from '@emotion/styled';
3
3
  import * as react from 'react';
4
4
  import * as _emotion_react from '@emotion/react';
5
5
  import { Theme } from '@emotion/react';
6
- import { ThemeProp } from './colors.cjs';
6
+ import { WithTheme, ThemeProp } from './colors.cjs';
7
7
  import '@emotion/css';
8
8
  import './fonts/typographyTokens.cjs';
9
9
 
@@ -14,24 +14,26 @@ declare const headingContentMarginPx = 30;
14
14
  declare const standardContentInsetPx = 32;
15
15
  declare const standardContentInsetMdPx = 24;
16
16
  declare const standardContentInsetSmPx = 16;
17
+ declare const standardBorderRadiusPx: readonly [0, 4, 8, 12, 16];
18
+ type StandardBorderRadius = (typeof standardBorderRadiusPx)[number];
17
19
  declare const cardBorderRadiusPx = 16;
20
+ type BorderRadiusArg = StandardBorderRadius | StandardBorderRadius[];
21
+ declare const standardBorderRadius: (radius: BorderRadiusArg) => string;
18
22
  declare const smContentInset: _emotion_react.SerializedStyles;
19
23
  declare const minSmMaxLgContentInset: _emotion_react.SerializedStyles;
20
24
  declare const standardContentInset: _emotion_react.SerializedStyles;
21
25
  declare const standardCardShadow: _emotion_react.SerializedStyles;
22
26
  declare const pageBorderRadiusPx = 16;
23
27
  declare const pageBorderRadius = "\n border-radius: 16px;\n";
24
- declare const getFocusOutline: ({ theme, onBgHex, }: {
25
- theme: Theme;
28
+ declare const getFocusOutline: ({ theme, onBgHex, }: WithTheme<{
26
29
  onBgHex?: string;
27
- }) => string;
30
+ }>) => string;
28
31
  declare const outlineOffset = "-2px";
29
32
  declare const standardFocusOutline: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
30
- declare const delta: ({ theme, delta, invertSuccessColor, }: {
31
- theme: Theme;
33
+ declare const delta: ({ theme, delta, invertSuccessColor, }: WithTheme<{
32
34
  delta?: number;
33
35
  invertSuccessColor?: boolean;
34
- }) => _emotion_react.SerializedStyles;
36
+ }>) => _emotion_react.SerializedStyles;
35
37
  declare const subtext: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
36
38
  declare const Subtext: _emotion_styled.StyledComponent<{
37
39
  theme?: Theme;
@@ -41,8 +43,13 @@ declare const darkGradientBg: _emotion_react.SerializedStyles;
41
43
  declare const StyledTooltip: _emotion_styled.StyledComponent<react_tooltip.ITooltip & react.RefAttributes<react_tooltip.TooltipRefProps> & {
42
44
  theme?: Theme;
43
45
  }, {}, {}>;
44
- declare const overlaySurface: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
46
+ declare const overlaySurfaceBorderColor: ({ theme, important, }: WithTheme<{
47
+ important?: boolean;
48
+ }>) => _emotion_react.SerializedStyles;
49
+ declare const overlaySurface: ({ theme, important, }: WithTheme<{
50
+ important?: boolean;
51
+ }>) => _emotion_react.SerializedStyles;
45
52
  declare const mcBold: (theme: Theme) => _emotion_react.SerializedStyles;
46
53
  declare const mcBoldStyled: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
47
54
 
48
- export { StyledTooltip, Subtext, cardBorderRadiusPx, darkGradientBg, delta, getFocusOutline, headingContentMarginPx, mcBold, mcBoldStyled, minSmMaxLgContentInset, outlineOffset, overlaySurface, pageBorderRadius, pageBorderRadiusPx, rootFontSizePx, rootFontSizeRems, smContentInset, standardCardShadow, standardContentInset, standardContentInsetMdPx, standardContentInsetPx, standardContentInsetSmPx, standardFocusOutline, standardLineHeightEms, subtext };
55
+ export { StyledTooltip, Subtext, cardBorderRadiusPx, darkGradientBg, delta, getFocusOutline, headingContentMarginPx, mcBold, mcBoldStyled, minSmMaxLgContentInset, outlineOffset, overlaySurface, overlaySurfaceBorderColor, pageBorderRadius, pageBorderRadiusPx, rootFontSizePx, rootFontSizeRems, smContentInset, standardBorderRadius, standardCardShadow, standardContentInset, standardContentInsetMdPx, standardContentInsetPx, standardContentInsetSmPx, standardFocusOutline, standardLineHeightEms, subtext };
@@ -3,7 +3,7 @@ import * as _emotion_styled from '@emotion/styled';
3
3
  import * as react from 'react';
4
4
  import * as _emotion_react from '@emotion/react';
5
5
  import { Theme } from '@emotion/react';
6
- import { ThemeProp } from './colors.js';
6
+ import { WithTheme, ThemeProp } from './colors.js';
7
7
  import '@emotion/css';
8
8
  import './fonts/typographyTokens.js';
9
9
 
@@ -14,24 +14,26 @@ declare const headingContentMarginPx = 30;
14
14
  declare const standardContentInsetPx = 32;
15
15
  declare const standardContentInsetMdPx = 24;
16
16
  declare const standardContentInsetSmPx = 16;
17
+ declare const standardBorderRadiusPx: readonly [0, 4, 8, 12, 16];
18
+ type StandardBorderRadius = (typeof standardBorderRadiusPx)[number];
17
19
  declare const cardBorderRadiusPx = 16;
20
+ type BorderRadiusArg = StandardBorderRadius | StandardBorderRadius[];
21
+ declare const standardBorderRadius: (radius: BorderRadiusArg) => string;
18
22
  declare const smContentInset: _emotion_react.SerializedStyles;
19
23
  declare const minSmMaxLgContentInset: _emotion_react.SerializedStyles;
20
24
  declare const standardContentInset: _emotion_react.SerializedStyles;
21
25
  declare const standardCardShadow: _emotion_react.SerializedStyles;
22
26
  declare const pageBorderRadiusPx = 16;
23
27
  declare const pageBorderRadius = "\n border-radius: 16px;\n";
24
- declare const getFocusOutline: ({ theme, onBgHex, }: {
25
- theme: Theme;
28
+ declare const getFocusOutline: ({ theme, onBgHex, }: WithTheme<{
26
29
  onBgHex?: string;
27
- }) => string;
30
+ }>) => string;
28
31
  declare const outlineOffset = "-2px";
29
32
  declare const standardFocusOutline: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
30
- declare const delta: ({ theme, delta, invertSuccessColor, }: {
31
- theme: Theme;
33
+ declare const delta: ({ theme, delta, invertSuccessColor, }: WithTheme<{
32
34
  delta?: number;
33
35
  invertSuccessColor?: boolean;
34
- }) => _emotion_react.SerializedStyles;
36
+ }>) => _emotion_react.SerializedStyles;
35
37
  declare const subtext: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
36
38
  declare const Subtext: _emotion_styled.StyledComponent<{
37
39
  theme?: Theme;
@@ -41,8 +43,13 @@ declare const darkGradientBg: _emotion_react.SerializedStyles;
41
43
  declare const StyledTooltip: _emotion_styled.StyledComponent<react_tooltip.ITooltip & react.RefAttributes<react_tooltip.TooltipRefProps> & {
42
44
  theme?: Theme;
43
45
  }, {}, {}>;
44
- declare const overlaySurface: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
46
+ declare const overlaySurfaceBorderColor: ({ theme, important, }: WithTheme<{
47
+ important?: boolean;
48
+ }>) => _emotion_react.SerializedStyles;
49
+ declare const overlaySurface: ({ theme, important, }: WithTheme<{
50
+ important?: boolean;
51
+ }>) => _emotion_react.SerializedStyles;
45
52
  declare const mcBold: (theme: Theme) => _emotion_react.SerializedStyles;
46
53
  declare const mcBoldStyled: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
47
54
 
48
- export { StyledTooltip, Subtext, cardBorderRadiusPx, darkGradientBg, delta, getFocusOutline, headingContentMarginPx, mcBold, mcBoldStyled, minSmMaxLgContentInset, outlineOffset, overlaySurface, pageBorderRadius, pageBorderRadiusPx, rootFontSizePx, rootFontSizeRems, smContentInset, standardCardShadow, standardContentInset, standardContentInsetMdPx, standardContentInsetPx, standardContentInsetSmPx, standardFocusOutline, standardLineHeightEms, subtext };
55
+ export { StyledTooltip, Subtext, cardBorderRadiusPx, darkGradientBg, delta, getFocusOutline, headingContentMarginPx, mcBold, mcBoldStyled, minSmMaxLgContentInset, outlineOffset, overlaySurface, overlaySurfaceBorderColor, pageBorderRadius, pageBorderRadiusPx, rootFontSizePx, rootFontSizeRems, smContentInset, standardBorderRadius, standardCardShadow, standardContentInset, standardContentInsetMdPx, standardContentInsetPx, standardContentInsetSmPx, standardFocusOutline, standardLineHeightEms, subtext };
@@ -11,11 +11,13 @@ import {
11
11
  minSmMaxLgContentInset,
12
12
  outlineOffset,
13
13
  overlaySurface,
14
+ overlaySurfaceBorderColor,
14
15
  pageBorderRadius,
15
16
  pageBorderRadiusPx,
16
17
  rootFontSizePx,
17
18
  rootFontSizeRems,
18
19
  smContentInset,
20
+ standardBorderRadius,
19
21
  standardCardShadow,
20
22
  standardContentInset,
21
23
  standardContentInsetMdPx,
@@ -24,11 +26,11 @@ import {
24
26
  standardFocusOutline,
25
27
  standardLineHeightEms,
26
28
  subtext
27
- } from "../chunk-XUGLVWSH.js";
28
- import "../chunk-CLU2FRJZ.js";
29
+ } from "../chunk-RFGKH3R6.js";
29
30
  import "../chunk-2VBDEO6M.js";
30
31
  import "../chunk-E4EXM4SY.js";
31
32
  import "../chunk-JSGRNWSB.js";
33
+ import "../chunk-CLU2FRJZ.js";
32
34
  import "../chunk-CIGAQ47A.js";
33
35
  export {
34
36
  StyledTooltip,
@@ -43,11 +45,13 @@ export {
43
45
  minSmMaxLgContentInset,
44
46
  outlineOffset,
45
47
  overlaySurface,
48
+ overlaySurfaceBorderColor,
46
49
  pageBorderRadius,
47
50
  pageBorderRadiusPx,
48
51
  rootFontSizePx,
49
52
  rootFontSizeRems,
50
53
  smContentInset,
54
+ standardBorderRadius,
51
55
  standardCardShadow,
52
56
  standardContentInset,
53
57
  standardContentInsetMdPx,
@@ -1395,7 +1395,7 @@ var textInputStyle = ({
1395
1395
  return import_react5.css`
1396
1396
  border-radius: ${textInputBorderRadiusPx}px;
1397
1397
  background-color: ${disabled ? theme.vlcNeutral : theme.bg};
1398
- pointer-events: ${disabled ? "none" : "auto"};
1398
+ cursor: ${disabled ? "not-allowed" : "auto"};
1399
1399
  box-sizing: border-box;
1400
1400
  font-weight: ${textInputFontWeight};
1401
1401
 
@@ -2,8 +2,7 @@ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as _emotion_styled from '@emotion/styled';
3
3
  import * as react from 'react';
4
4
  import * as _emotion_react from '@emotion/react';
5
- import { Theme } from '@emotion/react';
6
- import { ThemeProp } from './colors.cjs';
5
+ import { ThemeProp, WithTheme } from './colors.cjs';
7
6
  import '@emotion/css';
8
7
  import './fonts/typographyTokens.cjs';
9
8
 
@@ -21,44 +20,41 @@ declare const textInputPaddingPx = 12;
21
20
  declare const textInputPadding = "12px";
22
21
  declare const textInputBorderColor: ({ theme }: ThemeProp) => string;
23
22
  declare const textInputBorderColorFocused: ({ theme }: ThemeProp) => string;
24
- declare const textInputStyle: ({ theme, disabled, hasError, paddingLeftPx, paddingRightPx, }: {
25
- theme: Theme;
23
+ declare const textInputStyle: ({ theme, disabled, hasError, paddingLeftPx, paddingRightPx, }: WithTheme<{
26
24
  disabled: boolean;
27
25
  hasError: boolean;
28
26
  paddingLeftPx?: number | undefined;
29
27
  paddingRightPx?: number | undefined;
30
- }) => _emotion_react.SerializedStyles;
28
+ }>) => _emotion_react.SerializedStyles;
31
29
  declare const FieldError: _emotion_styled.StyledComponent<{
32
- theme?: Theme;
30
+ theme?: _emotion_react.Theme;
33
31
  as?: react.ElementType<any>;
34
32
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
35
- declare const aboveFieldError: ({ theme, hasError, }: {
36
- theme: Theme;
33
+ declare const aboveFieldError: ({ theme, hasError, }: WithTheme<{
37
34
  hasError: boolean;
38
- }) => _emotion_react.SerializedStyles;
35
+ }>) => _emotion_react.SerializedStyles;
39
36
  declare function InputSubtext({ text, hasError, }: {
40
37
  text?: string | undefined;
41
38
  hasError?: boolean;
42
39
  }): _emotion_react_jsx_runtime.JSX.Element;
43
40
  declare const StyledInputSubtext: _emotion_styled.StyledComponent<{
44
- theme?: Theme;
41
+ theme?: _emotion_react.Theme;
45
42
  as?: react.ElementType<any>;
46
43
  } & {
47
44
  hasError: boolean;
48
45
  visible: boolean;
49
46
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
50
- declare const labelStyle: ({ theme, hasError, }: {
51
- theme: Theme;
47
+ declare const labelStyle: ({ theme, hasError, }: WithTheme<{
52
48
  hasError?: boolean;
53
- }) => _emotion_react.SerializedStyles;
49
+ }>) => _emotion_react.SerializedStyles;
54
50
  declare const Label: _emotion_styled.StyledComponent<{
55
- theme?: Theme;
51
+ theme?: _emotion_react.Theme;
56
52
  as?: react.ElementType<any>;
57
53
  } & {
58
54
  hasError?: boolean;
59
55
  }, react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
60
56
  declare const LabelDiv: _emotion_styled.StyledComponent<{
61
- theme?: Theme;
57
+ theme?: _emotion_react.Theme;
62
58
  as?: react.ElementType<any>;
63
59
  } & {
64
60
  hasError?: boolean;