@lightsparkdev/ui 0.0.7 → 0.0.9

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 (142) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/chunk-3EVAP5JT.js +67 -0
  3. package/dist/{chunk-IQFU7CM5.js → chunk-3GS5EFXV.js} +1 -1
  4. package/dist/{chunk-CLU2FRJZ.js → chunk-55OQPFLF.js} +1 -1
  5. package/dist/{chunk-N2RDQJQ5.js → chunk-5POPBNPS.js} +1 -1
  6. package/dist/{chunk-WWFDI534.js → chunk-7C4MHI6Q.js} +13 -6
  7. package/dist/{chunk-3CZOYF3X.js → chunk-7T36JGTC.js} +2 -2
  8. package/dist/chunk-A4FQBEYU.js +163 -0
  9. package/dist/chunk-ATUH6SXK.js +233 -0
  10. package/dist/chunk-DQRN4E5G.js +25 -0
  11. package/dist/{chunk-RTUZVKPK.js → chunk-E3AOYBY5.js} +1 -1
  12. package/dist/{chunk-I74XQIVV.js → chunk-EEFNW7NS.js} +3 -3
  13. package/dist/{chunk-UO6U7AYM.js → chunk-FCZJILMW.js} +1 -1
  14. package/dist/{chunk-2WYVO6B2.js → chunk-H3RW6JSU.js} +1 -1
  15. package/dist/chunk-IPAXAP6K.js +119 -0
  16. package/dist/{chunk-NGS4OSWT.js → chunk-J4FJQ3FN.js} +1 -1
  17. package/dist/{chunk-RFGKH3R6.js → chunk-JK4BP73A.js} +39 -38
  18. package/dist/{chunk-T33SBHYI.js → chunk-KMR5C25B.js} +3 -1
  19. package/dist/{chunk-JYWYEOM6.js → chunk-NFSAJ5GJ.js} +23 -10
  20. package/dist/{chunk-G2PZZFJL.js → chunk-NM7UW54G.js} +21 -24
  21. package/dist/{chunk-M56R3RJ7.js → chunk-OGSDZTHM.js} +7 -3
  22. package/dist/chunk-P3EUPXFA.js +150 -0
  23. package/dist/chunk-PBRN7MJY.js +315 -0
  24. package/dist/{chunk-NH25O7PC.js → chunk-PVQCLQNA.js} +1 -1
  25. package/dist/{chunk-NZJCJJH5.js → chunk-RWIZ7Q74.js} +1 -1
  26. package/dist/{chunk-TAI352I3.js → chunk-VE7J2N47.js} +1 -1
  27. package/dist/{chunk-K7D7A34K.js → chunk-XP2MX2AA.js} +1 -1
  28. package/dist/{chunk-23SR7TFO.js → chunk-XZR237JJ.js} +1 -1
  29. package/dist/{chunk-VBWTKANQ.js → chunk-Y37DCY7Y.js} +3 -3
  30. package/dist/{chunk-SVQELXFK.js → chunk-Z5TPS2BO.js} +1 -1
  31. package/dist/{chunk-FKETYVPP.js → chunk-ZANLDY2W.js} +87 -43
  32. package/dist/components/Badge.cjs +1346 -0
  33. package/dist/components/Badge.d.cts +10 -0
  34. package/dist/components/Badge.d.ts +10 -0
  35. package/dist/components/Badge.js +13 -0
  36. package/dist/components/Button.cjs +235 -107
  37. package/dist/components/Button.d.cts +3 -1
  38. package/dist/components/Button.d.ts +3 -1
  39. package/dist/components/Button.js +8 -7
  40. package/dist/components/ButtonRow.cjs +254 -110
  41. package/dist/components/ButtonRow.d.cts +6 -2
  42. package/dist/components/ButtonRow.d.ts +6 -2
  43. package/dist/components/ButtonRow.js +14 -11
  44. package/dist/components/CardPage.cjs +1921 -0
  45. package/dist/components/CardPage.d.cts +54 -0
  46. package/dist/components/CardPage.d.ts +54 -0
  47. package/dist/components/CardPage.js +33 -0
  48. package/dist/components/Collapsible.cjs +38 -54
  49. package/dist/components/Collapsible.js +4 -5
  50. package/dist/components/ContentTable.cjs +38 -54
  51. package/dist/components/ContentTable.js +3 -4
  52. package/dist/components/CopyToClipboardButton.cjs +161 -65
  53. package/dist/components/CopyToClipboardButton.js +6 -5
  54. package/dist/components/CurrencyAmount.cjs +38 -54
  55. package/dist/components/CurrencyAmount.js +3 -4
  56. package/dist/components/FileInput.cjs +1959 -0
  57. package/dist/components/FileInput.d.cts +21 -0
  58. package/dist/components/FileInput.d.ts +21 -0
  59. package/dist/components/FileInput.js +113 -0
  60. package/dist/components/GradientCardHeader.cjs +177 -0
  61. package/dist/components/GradientCardHeader.d.cts +10 -0
  62. package/dist/components/GradientCardHeader.d.ts +10 -0
  63. package/dist/components/GradientCardHeader.js +8 -0
  64. package/dist/components/Icon.cjs +38 -54
  65. package/dist/components/Icon.js +2 -3
  66. package/dist/components/LightTooltip.cjs +1428 -0
  67. package/dist/components/LightTooltip.d.cts +9 -0
  68. package/dist/components/LightTooltip.d.ts +9 -0
  69. package/dist/components/LightTooltip.js +12 -0
  70. package/dist/components/LightboxImage.cjs +1 -1
  71. package/dist/components/LightboxImage.js +2 -2
  72. package/dist/components/LightsparkProvider.cjs +41 -57
  73. package/dist/components/LightsparkProvider.js +3 -4
  74. package/dist/components/Loading.cjs +38 -54
  75. package/dist/components/Loading.js +3 -4
  76. package/dist/components/Modal.cjs +251 -145
  77. package/dist/components/Modal.js +12 -11
  78. package/dist/components/Pill.cjs +1717 -0
  79. package/dist/components/Pill.d.cts +19 -0
  80. package/dist/components/Pill.d.ts +19 -0
  81. package/dist/components/Pill.js +16 -0
  82. package/dist/components/ProgressBar.cjs +38 -56
  83. package/dist/components/ProgressBar.js +2 -3
  84. package/dist/components/SecretContainer.cjs +162 -66
  85. package/dist/components/SecretContainer.js +7 -6
  86. package/dist/components/TextIconAligner.cjs +38 -54
  87. package/dist/components/TextIconAligner.js +3 -4
  88. package/dist/components/UnstyledButton.cjs +38 -54
  89. package/dist/components/UnstyledButton.js +2 -3
  90. package/dist/components/documentation/AnchorLinkHeader.cjs +38 -56
  91. package/dist/components/documentation/AnchorLinkHeader.js +3 -4
  92. package/dist/components/documentation/index.cjs +38 -56
  93. package/dist/components/documentation/index.js +3 -4
  94. package/dist/components/index.cjs +1191 -358
  95. package/dist/components/index.d.cts +7 -1
  96. package/dist/components/index.d.ts +7 -1
  97. package/dist/components/index.js +63 -32
  98. package/dist/icons/ArrowCornerDownRight.cjs +49 -0
  99. package/dist/icons/ArrowCornerDownRight.d.cts +5 -0
  100. package/dist/icons/ArrowCornerDownRight.d.ts +5 -0
  101. package/dist/icons/ArrowCornerDownRight.js +30 -0
  102. package/dist/icons/Copy.cjs +4 -3
  103. package/dist/icons/Copy.js +4 -3
  104. package/dist/icons/Download.cjs +22 -11
  105. package/dist/icons/Download.js +23 -12
  106. package/dist/icons/Sort.cjs +48 -0
  107. package/dist/icons/Sort.d.cts +5 -0
  108. package/dist/icons/Sort.d.ts +5 -0
  109. package/dist/icons/Sort.js +29 -0
  110. package/dist/icons/Upload.cjs +22 -11
  111. package/dist/icons/Upload.js +23 -12
  112. package/dist/icons/index.cjs +38 -54
  113. package/dist/icons/index.js +2 -3
  114. package/dist/router.cjs +7 -3
  115. package/dist/router.js +1 -1
  116. package/dist/styles/common.cjs +38 -66
  117. package/dist/styles/common.d.cts +10 -11
  118. package/dist/styles/common.d.ts +10 -11
  119. package/dist/styles/common.js +1 -14
  120. package/dist/styles/fields.cjs +117 -61
  121. package/dist/styles/fields.d.cts +12 -5
  122. package/dist/styles/fields.d.ts +12 -5
  123. package/dist/styles/fields.js +28 -164
  124. package/dist/styles/fonts/typography/Article.cjs +38 -54
  125. package/dist/styles/fonts/typography/Article.js +5 -6
  126. package/dist/styles/fonts/typography/index.cjs +38 -54
  127. package/dist/styles/fonts/typography/index.js +5 -6
  128. package/dist/styles/global.cjs +41 -57
  129. package/dist/styles/global.js +2 -3
  130. package/dist/styles/type.cjs +38 -54
  131. package/dist/styles/type.js +8 -145
  132. package/dist/styles/utils.cjs +38 -54
  133. package/dist/styles/utils.js +2 -3
  134. package/dist/styles/z-index.cjs +1 -1
  135. package/dist/styles/z-index.d.cts +1 -1
  136. package/dist/styles/z-index.d.ts +1 -1
  137. package/dist/styles/z-index.js +1 -1
  138. package/dist/types/index.d.cts +2 -0
  139. package/dist/types/index.d.ts +2 -0
  140. package/dist/utils/toReactNodes.cjs +7 -3
  141. package/dist/utils/toReactNodes.js +2 -2
  142. package/package.json +10 -6
@@ -56,6 +56,7 @@ __export(fields_exports, {
56
56
  fieldWidth: () => fieldWidth,
57
57
  formButtonTopMargin: () => formButtonTopMargin,
58
58
  formButtonTopMarginStyle: () => formButtonTopMarginStyle,
59
+ inputBlockStyle: () => inputBlockStyle,
59
60
  inputSpacingPx: () => inputSpacingPx,
60
61
  labelStyle: () => labelStyle,
61
62
  maxFieldWidth: () => maxFieldWidth,
@@ -1286,7 +1287,71 @@ function hexToRGB(hex) {
1286
1287
  // src/styles/common.tsx
1287
1288
  var import_react4 = require("@emotion/react");
1288
1289
  var import_styled = __toESM(require("@emotion/styled"), 1);
1289
- var import_react_tooltip = require("react-tooltip");
1290
+ var rootFontSizePx = 12;
1291
+ var rootFontSizeRems = rootFontSizePx / 16;
1292
+ function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
1293
+ const smCSS = import_react4.css`
1294
+ ${bp.sm(`
1295
+ margin-left: auto;
1296
+ margin-right: auto;
1297
+ width: calc(100% - ${smPx * 2}px);
1298
+ `)}
1299
+ `;
1300
+ const minSmMaxLgCSS = import_react4.css`
1301
+ ${bp.minSmMaxLg(`
1302
+ margin-left: auto;
1303
+ margin-right: auto;
1304
+ width: calc(100% - ${minSmMaxLgPx * 2}px);
1305
+ `)}
1306
+ `;
1307
+ const lgCSS = import_react4.css`
1308
+ ${bp.lg(`
1309
+ margin-left: auto;
1310
+ margin-right: auto;
1311
+ width: calc(100% - ${lgPx * 2}px);
1312
+ max-width: 1280px;
1313
+ `)}
1314
+ `;
1315
+ return {
1316
+ smPx,
1317
+ minSmMaxLgPx,
1318
+ lgPx,
1319
+ smCSS,
1320
+ minSmMaxLgCSS,
1321
+ lgCSS,
1322
+ css: import_react4.css`
1323
+ ${lgCSS}
1324
+ ${smCSS}
1325
+ ${minSmMaxLgCSS}
1326
+ `
1327
+ };
1328
+ }
1329
+ var standardContentInset = buildStandardContentInset(16, 24, 32);
1330
+ var standardBorderRadius = (radius) => {
1331
+ const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
1332
+ return `
1333
+ border-radius: ${borderRadiusPx};
1334
+ `;
1335
+ };
1336
+ var standardCardShadow = import_react4.css`
1337
+ box-shadow:
1338
+ 0px 4px 10px 0px rgba(0, 0, 0, 0.08),
1339
+ 0px 8px 24px 0px rgba(0, 0, 0, 0.04);
1340
+ `;
1341
+ var pageBorderRadiusPx = 16;
1342
+ var pageBorderRadius = `
1343
+ border-radius: ${pageBorderRadiusPx}px;
1344
+ `;
1345
+ var subtext = ({ theme }) => import_react4.css`
1346
+ color: ${theme.c6Neutral};
1347
+ font-weight: 600;
1348
+ `;
1349
+ var Subtext = import_styled.default.div`
1350
+ ${subtext}
1351
+ `;
1352
+ var darkGradientBg = import_react4.css`
1353
+ background: ${darkGradient};
1354
+ `;
1290
1355
 
1291
1356
  // src/styles/z-index.tsx
1292
1357
  var z = {
@@ -1304,66 +1369,16 @@ var z = {
1304
1369
  navAction: 101,
1305
1370
  smNavAction: 100,
1306
1371
  // keep under navDropdown
1307
- tooltip: 160,
1308
1372
  notificationBanner: 170,
1309
1373
  qrReaderVideo: 180,
1310
1374
  qrReaderOverlay: 181,
1311
1375
  modalOverlay: 190,
1312
1376
  modalContainer: 191,
1313
1377
  dropdown: 192,
1378
+ tooltip: 193,
1314
1379
  toast: 200
1315
1380
  };
1316
1381
 
1317
- // src/styles/common.tsx
1318
- var rootFontSizePx = 12;
1319
- var rootFontSizeRems = rootFontSizePx / 16;
1320
- var standardContentInsetPx = 32;
1321
- var standardContentInsetMdPx = 24;
1322
- var standardContentInsetSmPx = 16;
1323
- var smContentInset = import_react4.css`
1324
- ${bp.sm(`
1325
- margin-left: auto;
1326
- margin-right: auto;
1327
- width: calc(100% - ${standardContentInsetSmPx * 2}px);
1328
- `)}
1329
- `;
1330
- var minSmMaxLgContentInset = import_react4.css`
1331
- ${bp.minSmMaxLg(`
1332
- width: calc(100% - ${standardContentInsetMdPx * 2}px);
1333
- `)}
1334
- `;
1335
- var standardContentInset = import_react4.css`
1336
- margin-left: auto;
1337
- margin-right: auto;
1338
- width: calc(100% - ${standardContentInsetPx * 2}px);
1339
- max-width: 1280px;
1340
-
1341
- ${smContentInset}
1342
- ${minSmMaxLgContentInset}
1343
- `;
1344
- var standardCardShadow = import_react4.css`
1345
- box-shadow:
1346
- 0px 4px 10px 0px rgba(0, 0, 0, 0.08),
1347
- 0px 8px 24px 0px rgba(0, 0, 0, 0.04);
1348
- `;
1349
- var pageBorderRadiusPx = 16;
1350
- var pageBorderRadius = `
1351
- border-radius: ${pageBorderRadiusPx}px;
1352
- `;
1353
- var subtext = ({ theme }) => import_react4.css`
1354
- color: ${theme.c6Neutral};
1355
- font-weight: 600;
1356
- `;
1357
- var Subtext = import_styled.default.div`
1358
- ${subtext}
1359
- `;
1360
- var darkGradientBg = import_react4.css`
1361
- background: ${darkGradient};
1362
- `;
1363
- var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
1364
- z-index: ${z.modalOverlay};
1365
- `;
1366
-
1367
1382
  // src/styles/fields.tsx
1368
1383
  var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
1369
1384
  var maxFieldWidth = "100%";
@@ -1376,6 +1391,25 @@ var formButtonTopMarginStyle = import_react5.css`
1376
1391
  var standardBorderColor = ({ theme }) => import_react5.css`
1377
1392
  border-color: ${themeOr(theme.c1Neutral, theme.mcNeutral)({ theme })};
1378
1393
  `;
1394
+ var inputBlockStyle = ({
1395
+ theme,
1396
+ hasValue,
1397
+ hasError
1398
+ }) => import_react5.css`
1399
+ ${subtext({ theme })}
1400
+ ${standardBorderColor({ theme })}
1401
+ ${standardBorderRadius(8)}
1402
+ background-color: ${theme.bg};
1403
+ border-width: 2px;
1404
+ display: flex;
1405
+ align-items: center;
1406
+ justify-content: center;
1407
+ flex-direction: column;
1408
+ position: relative;
1409
+ cursor: pointer;
1410
+ padding: 52.5px;
1411
+ ${hasError ? `border-style: solid; border-color: ${colors.danger}; border-width: 2px;` : hasValue ? `border-style: solid; border-color: ${theme.info};` : `border-style: dashed;`}
1412
+ `;
1379
1413
  var textInputPlaceholderColor = ({ theme }) => theme.c4Neutral;
1380
1414
  var textInputColor = ({ theme }) => theme.text;
1381
1415
  var textInputFontWeight = 600;
@@ -1384,8 +1418,21 @@ var textInputPaddingPx = 12;
1384
1418
  var textInputPadding = `${textInputPaddingPx}px`;
1385
1419
  var textInputBorderColor = ({ theme }) => themeOr(theme.c1Neutral, theme.c3Neutral)({ theme });
1386
1420
  var textInputBorderColorFocused = ({ theme }) => themeOr(theme.hcNeutral, theme.hcNeutral)({ theme });
1421
+ var textInputActiveStyles = ({
1422
+ theme,
1423
+ paddingLeftPx,
1424
+ paddingRightPx
1425
+ }) => import_react5.css`
1426
+ border-color: ${textInputBorderColorFocused({ theme })};
1427
+ border-width: 2px;
1428
+ color: ${textInputColor({ theme })};
1429
+ padding: ${textInputPaddingPx - 1}px;
1430
+ ${paddingLeftPx ? `padding-left: ${paddingLeftPx - 1}px;` : ""}
1431
+ ${paddingRightPx ? `padding-right: ${paddingRightPx - 1}px;` : ""}
1432
+ `;
1387
1433
  var textInputStyle = ({
1388
1434
  theme,
1435
+ active,
1389
1436
  disabled,
1390
1437
  hasError,
1391
1438
  paddingLeftPx,
@@ -1419,15 +1466,13 @@ var textInputStyle = ({
1419
1466
  max-width: ${maxFieldWidth};
1420
1467
  text-overflow: ellipsis;
1421
1468
  &:focus,
1422
- &:active {
1423
- border-color: ${textInputBorderColorFocused({ theme })};
1424
- border-width: 2px;
1425
- color: ${textInputColor({ theme })};
1426
- padding: ${textInputPaddingPx - 1}px;
1427
- ${paddingLeftPx ? `padding-left: ${paddingLeftPx - 1}px;` : ""}
1428
- ${paddingRightPx ? `padding-right: ${paddingRightPx - 1}px;` : ""}
1469
+ &:active,
1470
+ &:has(:focus) {
1471
+ ${textInputActiveStyles({ theme, paddingLeftPx, paddingRightPx })}
1429
1472
  }
1430
1473
 
1474
+ ${active && textInputActiveStyles({ theme, paddingLeftPx, paddingRightPx })}
1475
+
1431
1476
  &::placeholder {
1432
1477
  color: ${textInputPlaceholderColor({ theme })};
1433
1478
  }
@@ -1458,7 +1503,8 @@ var aboveFieldError = ({
1458
1503
  var inputSubtextSeconds = 0.25;
1459
1504
  function InputSubtext({
1460
1505
  text,
1461
- hasError = false
1506
+ hasError = false,
1507
+ tooltipId
1462
1508
  }) {
1463
1509
  const timeoutRef = (0, import_react6.useRef)(null);
1464
1510
  const [subtext2, setSubtext] = (0, import_react6.useState)(text);
@@ -1477,7 +1523,15 @@ function InputSubtext({
1477
1523
  }, inputSubtextSeconds * 1e3);
1478
1524
  }
1479
1525
  }, [text]);
1480
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledInputSubtext, { visible, hasError, children: subtext2 });
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1527
+ StyledInputSubtext,
1528
+ {
1529
+ visible,
1530
+ hasError,
1531
+ cursorPointer: Boolean(tooltipId),
1532
+ children: tooltipId ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "data-tooltip-id": tooltipId, children: subtext2 }) : subtext2
1533
+ }
1534
+ );
1481
1535
  }
1482
1536
  var StyledInputSubtext = import_styled2.default.div`
1483
1537
  margin-top: ${({ visible }) => visible ? "8px" : "0px"};
@@ -1491,6 +1545,7 @@ var StyledInputSubtext = import_styled2.default.div`
1491
1545
  opacity ${inputSubtextSeconds * 0.8}s cubic-bezier(0.25, 0.87, 0.56, 1.23),
1492
1546
  margin ${inputSubtextSeconds}s cubic-bezier(0.25, 0.87, 0.56, 1.23);
1493
1547
  color: ${({ hasError, theme }) => hasError ? theme.danger : theme.text};
1548
+ cursor: ${({ cursorPointer }) => cursorPointer ? "pointer" : "auto"};
1494
1549
  `;
1495
1550
  var labelStyle = ({
1496
1551
  theme,
@@ -1527,6 +1582,7 @@ var LabelDiv = import_styled2.default.div`
1527
1582
  fieldWidth,
1528
1583
  formButtonTopMargin,
1529
1584
  formButtonTopMarginStyle,
1585
+ inputBlockStyle,
1530
1586
  inputSpacingPx,
1531
1587
  labelStyle,
1532
1588
  maxFieldWidth,
@@ -12,6 +12,10 @@ declare const inputSpacingPx = 24;
12
12
  declare const formButtonTopMargin = "32px";
13
13
  declare const formButtonTopMarginStyle: _emotion_react.SerializedStyles;
14
14
  declare const standardBorderColor: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
15
+ declare const inputBlockStyle: ({ theme, hasValue, hasError, }: WithTheme<{
16
+ hasValue: boolean;
17
+ hasError: boolean;
18
+ }>) => _emotion_react.SerializedStyles;
15
19
  declare const textInputPlaceholderColor: ({ theme }: ThemeProp) => string;
16
20
  declare const textInputColor: ({ theme }: ThemeProp) => string;
17
21
  declare const textInputFontWeight = 600;
@@ -20,9 +24,10 @@ declare const textInputPaddingPx = 12;
20
24
  declare const textInputPadding = "12px";
21
25
  declare const textInputBorderColor: ({ theme }: ThemeProp) => string;
22
26
  declare const textInputBorderColorFocused: ({ theme }: ThemeProp) => string;
23
- declare const textInputStyle: ({ theme, disabled, hasError, paddingLeftPx, paddingRightPx, }: WithTheme<{
24
- disabled: boolean;
25
- hasError: boolean;
27
+ declare const textInputStyle: ({ theme, active, disabled, hasError, paddingLeftPx, paddingRightPx, }: WithTheme<{
28
+ active?: boolean | undefined;
29
+ disabled?: boolean | undefined;
30
+ hasError?: boolean | undefined;
26
31
  paddingLeftPx?: number | undefined;
27
32
  paddingRightPx?: number | undefined;
28
33
  }>) => _emotion_react.SerializedStyles;
@@ -33,9 +38,10 @@ declare const FieldError: _emotion_styled.StyledComponent<{
33
38
  declare const aboveFieldError: ({ theme, hasError, }: WithTheme<{
34
39
  hasError: boolean;
35
40
  }>) => _emotion_react.SerializedStyles;
36
- declare function InputSubtext({ text, hasError, }: {
41
+ declare function InputSubtext({ text, hasError, tooltipId, }: {
37
42
  text?: string | undefined;
38
43
  hasError?: boolean;
44
+ tooltipId?: string | undefined;
39
45
  }): _emotion_react_jsx_runtime.JSX.Element;
40
46
  declare const StyledInputSubtext: _emotion_styled.StyledComponent<{
41
47
  theme?: _emotion_react.Theme;
@@ -43,6 +49,7 @@ declare const StyledInputSubtext: _emotion_styled.StyledComponent<{
43
49
  } & {
44
50
  hasError: boolean;
45
51
  visible: boolean;
52
+ cursorPointer: boolean;
46
53
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
47
54
  declare const labelStyle: ({ theme, hasError, }: WithTheme<{
48
55
  hasError?: boolean;
@@ -60,4 +67,4 @@ declare const LabelDiv: _emotion_styled.StyledComponent<{
60
67
  hasError?: boolean;
61
68
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
62
69
 
63
- export { FieldError, InputSubtext, Label, LabelDiv, StyledInputSubtext, aboveFieldError, fieldWidth, formButtonTopMargin, formButtonTopMarginStyle, inputSpacingPx, labelStyle, maxFieldWidth, standardBorderColor, textInputBorderColor, textInputBorderColorFocused, textInputBorderRadiusPx, textInputColor, textInputFontWeight, textInputPadding, textInputPaddingPx, textInputPlaceholderColor, textInputStyle };
70
+ export { FieldError, InputSubtext, Label, LabelDiv, StyledInputSubtext, aboveFieldError, fieldWidth, formButtonTopMargin, formButtonTopMarginStyle, inputBlockStyle, inputSpacingPx, labelStyle, maxFieldWidth, standardBorderColor, textInputBorderColor, textInputBorderColorFocused, textInputBorderRadiusPx, textInputColor, textInputFontWeight, textInputPadding, textInputPaddingPx, textInputPlaceholderColor, textInputStyle };
@@ -12,6 +12,10 @@ declare const inputSpacingPx = 24;
12
12
  declare const formButtonTopMargin = "32px";
13
13
  declare const formButtonTopMarginStyle: _emotion_react.SerializedStyles;
14
14
  declare const standardBorderColor: ({ theme }: ThemeProp) => _emotion_react.SerializedStyles;
15
+ declare const inputBlockStyle: ({ theme, hasValue, hasError, }: WithTheme<{
16
+ hasValue: boolean;
17
+ hasError: boolean;
18
+ }>) => _emotion_react.SerializedStyles;
15
19
  declare const textInputPlaceholderColor: ({ theme }: ThemeProp) => string;
16
20
  declare const textInputColor: ({ theme }: ThemeProp) => string;
17
21
  declare const textInputFontWeight = 600;
@@ -20,9 +24,10 @@ declare const textInputPaddingPx = 12;
20
24
  declare const textInputPadding = "12px";
21
25
  declare const textInputBorderColor: ({ theme }: ThemeProp) => string;
22
26
  declare const textInputBorderColorFocused: ({ theme }: ThemeProp) => string;
23
- declare const textInputStyle: ({ theme, disabled, hasError, paddingLeftPx, paddingRightPx, }: WithTheme<{
24
- disabled: boolean;
25
- hasError: boolean;
27
+ declare const textInputStyle: ({ theme, active, disabled, hasError, paddingLeftPx, paddingRightPx, }: WithTheme<{
28
+ active?: boolean | undefined;
29
+ disabled?: boolean | undefined;
30
+ hasError?: boolean | undefined;
26
31
  paddingLeftPx?: number | undefined;
27
32
  paddingRightPx?: number | undefined;
28
33
  }>) => _emotion_react.SerializedStyles;
@@ -33,9 +38,10 @@ declare const FieldError: _emotion_styled.StyledComponent<{
33
38
  declare const aboveFieldError: ({ theme, hasError, }: WithTheme<{
34
39
  hasError: boolean;
35
40
  }>) => _emotion_react.SerializedStyles;
36
- declare function InputSubtext({ text, hasError, }: {
41
+ declare function InputSubtext({ text, hasError, tooltipId, }: {
37
42
  text?: string | undefined;
38
43
  hasError?: boolean;
44
+ tooltipId?: string | undefined;
39
45
  }): _emotion_react_jsx_runtime.JSX.Element;
40
46
  declare const StyledInputSubtext: _emotion_styled.StyledComponent<{
41
47
  theme?: _emotion_react.Theme;
@@ -43,6 +49,7 @@ declare const StyledInputSubtext: _emotion_styled.StyledComponent<{
43
49
  } & {
44
50
  hasError: boolean;
45
51
  visible: boolean;
52
+ cursorPointer: boolean;
46
53
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
47
54
  declare const labelStyle: ({ theme, hasError, }: WithTheme<{
48
55
  hasError?: boolean;
@@ -60,4 +67,4 @@ declare const LabelDiv: _emotion_styled.StyledComponent<{
60
67
  hasError?: boolean;
61
68
  }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
62
69
 
63
- export { FieldError, InputSubtext, Label, LabelDiv, StyledInputSubtext, aboveFieldError, fieldWidth, formButtonTopMargin, formButtonTopMarginStyle, inputSpacingPx, labelStyle, maxFieldWidth, standardBorderColor, textInputBorderColor, textInputBorderColorFocused, textInputBorderRadiusPx, textInputColor, textInputFontWeight, textInputPadding, textInputPaddingPx, textInputPlaceholderColor, textInputStyle };
70
+ export { FieldError, InputSubtext, Label, LabelDiv, StyledInputSubtext, aboveFieldError, fieldWidth, formButtonTopMargin, formButtonTopMarginStyle, inputBlockStyle, inputSpacingPx, labelStyle, maxFieldWidth, standardBorderColor, textInputBorderColor, textInputBorderColorFocused, textInputBorderRadiusPx, textInputColor, textInputFontWeight, textInputPadding, textInputPaddingPx, textInputPlaceholderColor, textInputStyle };
@@ -1,171 +1,34 @@
1
1
  import {
2
- subtext
3
- } from "../chunk-RFGKH3R6.js";
4
- import {
5
- themeOr
6
- } from "../chunk-2VBDEO6M.js";
2
+ FieldError,
3
+ InputSubtext,
4
+ Label,
5
+ LabelDiv,
6
+ StyledInputSubtext,
7
+ aboveFieldError,
8
+ fieldWidth,
9
+ formButtonTopMargin,
10
+ formButtonTopMarginStyle,
11
+ inputBlockStyle,
12
+ inputSpacingPx,
13
+ labelStyle,
14
+ maxFieldWidth,
15
+ standardBorderColor,
16
+ textInputBorderColor,
17
+ textInputBorderColorFocused,
18
+ textInputBorderRadiusPx,
19
+ textInputColor,
20
+ textInputFontWeight,
21
+ textInputPadding,
22
+ textInputPaddingPx,
23
+ textInputPlaceholderColor,
24
+ textInputStyle
25
+ } from "../chunk-ATUH6SXK.js";
26
+ import "../chunk-55OQPFLF.js";
27
+ import "../chunk-JK4BP73A.js";
28
+ import "../chunk-2VBDEO6M.js";
7
29
  import "../chunk-E4EXM4SY.js";
8
30
  import "../chunk-JSGRNWSB.js";
9
- import {
10
- z
11
- } from "../chunk-CLU2FRJZ.js";
12
31
  import "../chunk-CIGAQ47A.js";
13
-
14
- // src/styles/fields.tsx
15
- import { css } from "@emotion/react";
16
- import styled from "@emotion/styled";
17
- import { useLayoutEffect, useRef, useState } from "react";
18
- import { jsx } from "@emotion/react/jsx-runtime";
19
- var maxFieldWidth = "100%";
20
- var fieldWidth = "100%";
21
- var inputSpacingPx = 24;
22
- var formButtonTopMargin = "32px";
23
- var formButtonTopMarginStyle = css`
24
- margin-top: ${formButtonTopMargin};
25
- `;
26
- var standardBorderColor = ({ theme }) => css`
27
- border-color: ${themeOr(theme.c1Neutral, theme.mcNeutral)({ theme })};
28
- `;
29
- var textInputPlaceholderColor = ({ theme }) => theme.c4Neutral;
30
- var textInputColor = ({ theme }) => theme.text;
31
- var textInputFontWeight = 600;
32
- var textInputBorderRadiusPx = 8;
33
- var textInputPaddingPx = 12;
34
- var textInputPadding = `${textInputPaddingPx}px`;
35
- var textInputBorderColor = ({ theme }) => themeOr(theme.c1Neutral, theme.c3Neutral)({ theme });
36
- var textInputBorderColorFocused = ({ theme }) => themeOr(theme.hcNeutral, theme.hcNeutral)({ theme });
37
- var textInputStyle = ({
38
- theme,
39
- disabled,
40
- hasError,
41
- paddingLeftPx,
42
- paddingRightPx
43
- }) => {
44
- var _a;
45
- return css`
46
- border-radius: ${textInputBorderRadiusPx}px;
47
- background-color: ${disabled ? theme.vlcNeutral : theme.bg};
48
- cursor: ${disabled ? "not-allowed" : "auto"};
49
- box-sizing: border-box;
50
- font-weight: ${textInputFontWeight};
51
-
52
- position: relative;
53
- z-index: ${z.textInput};
54
- font-family: ${(_a = theme.typography) == null ? void 0 : _a.fontFamilies.main};
55
- padding: ${textInputPaddingPx - (hasError ? 1 : 0)}px;
56
- ${paddingLeftPx ? `padding-left: ${paddingLeftPx - (hasError ? 1 : 0)}px;` : ""}
57
- ${paddingRightPx ? `padding-right: ${paddingRightPx - (hasError ? 1 : 0)}px;` : ""}
58
- border-style: solid;
59
- border-width: ${hasError ? "2" : "1"}px;
60
- border-color: ${hasError ? theme.danger : textInputBorderColor({ theme })};
61
- line-height: 22px;
62
- outline: none;
63
- /* Use low contrast by default. Some fields, eg login, need high contrast simply
64
- because of quirks with default autofill styles. Clicking in to an autofilled value
65
- does not change the color of the text, it just uses the default field color */
66
- color: ${textInputColor({ theme })};
67
- font-size: 14px;
68
- width: ${fieldWidth};
69
- max-width: ${maxFieldWidth};
70
- text-overflow: ellipsis;
71
- &:focus,
72
- &:active {
73
- border-color: ${textInputBorderColorFocused({ theme })};
74
- border-width: 2px;
75
- color: ${textInputColor({ theme })};
76
- padding: ${textInputPaddingPx - 1}px;
77
- ${paddingLeftPx ? `padding-left: ${paddingLeftPx - 1}px;` : ""}
78
- ${paddingRightPx ? `padding-right: ${paddingRightPx - 1}px;` : ""}
79
- }
80
-
81
- &::placeholder {
82
- color: ${textInputPlaceholderColor({ theme })};
83
- }
84
-
85
- &:focus::placeholder {
86
- color: ${textInputPlaceholderColor({ theme })};
87
- }
88
- `;
89
- };
90
- var FieldError = styled.div`
91
- background-color: rgba(242, 239, 255, 1);
92
- padding: 16px 16px 8px;
93
- margin-top: -8px;
94
- border-radius: 0 0 8px 8px;
95
- position: relative;
96
- z-index: ${z.fieldError};
97
- `;
98
- var aboveFieldError = ({
99
- theme,
100
- hasError
101
- }) => css`
102
- ${hasError ? "border: none !important" : ""};
103
- background-color: ${theme.bg};
104
- position: relative;
105
- z-index: ${z.fieldError + 1};
106
- ${hasError && "box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1);"}
107
- `;
108
- var inputSubtextSeconds = 0.25;
109
- function InputSubtext({
110
- text,
111
- hasError = false
112
- }) {
113
- const timeoutRef = useRef(null);
114
- const [subtext2, setSubtext] = useState(text);
115
- const [visible, setVisible] = useState(Boolean(text));
116
- useLayoutEffect(() => {
117
- if (text) {
118
- setSubtext(text);
119
- setVisible(true);
120
- if (timeoutRef.current) {
121
- clearTimeout(timeoutRef.current);
122
- }
123
- } else {
124
- setVisible(false);
125
- timeoutRef.current = setTimeout(() => {
126
- setSubtext(void 0);
127
- }, inputSubtextSeconds * 1e3);
128
- }
129
- }, [text]);
130
- return /* @__PURE__ */ jsx(StyledInputSubtext, { visible, hasError, children: subtext2 });
131
- }
132
- var StyledInputSubtext = styled.div`
133
- margin-top: ${({ visible }) => visible ? "8px" : "0px"};
134
- margin-left: ${({ visible }) => visible ? "8px" : "0px"};
135
- font-size: 12px;
136
- font-size: ${({ visible }) => visible ? "12px" : "0px"};
137
- opacity: ${({ visible }) => visible ? "1" : "0"};
138
- overflow: hidden;
139
- transition:
140
- font-size ${inputSubtextSeconds}s cubic-bezier(0.25, 0.87, 0.56, 1.23),
141
- opacity ${inputSubtextSeconds * 0.8}s cubic-bezier(0.25, 0.87, 0.56, 1.23),
142
- margin ${inputSubtextSeconds}s cubic-bezier(0.25, 0.87, 0.56, 1.23);
143
- color: ${({ hasError, theme }) => hasError ? theme.danger : theme.text};
144
- `;
145
- var labelStyle = ({
146
- theme,
147
- hasError
148
- }) => css`
149
- color: ${hasError ? theme.danger : theme.text};
150
- font-size: 14px;
151
- display: flex;
152
- justify-content: space-between;
153
- align-items: center;
154
- & + * {
155
- margin-top: 12px;
156
- }
157
- * ~ & {
158
- margin-top: 40px;
159
- }
160
- `;
161
- var Label = styled.label`
162
- ${subtext}
163
- ${labelStyle}
164
- `;
165
- var LabelDiv = styled.div`
166
- ${subtext}
167
- ${labelStyle}
168
- `;
169
32
  export {
170
33
  FieldError,
171
34
  InputSubtext,
@@ -176,6 +39,7 @@ export {
176
39
  fieldWidth,
177
40
  formButtonTopMargin,
178
41
  formButtonTopMarginStyle,
42
+ inputBlockStyle,
179
43
  inputSpacingPx,
180
44
  labelStyle,
181
45
  maxFieldWidth,
@@ -59,7 +59,6 @@ var import_styled2 = __toESM(require("@emotion/styled"), 1);
59
59
  // src/styles/common.tsx
60
60
  var import_react4 = require("@emotion/react");
61
61
  var import_styled = __toESM(require("@emotion/styled"), 1);
62
- var import_react_tooltip = require("react-tooltip");
63
62
 
64
63
  // src/styles/breakpoints.tsx
65
64
  var import_react = require("@emotion/react");
@@ -1277,65 +1276,53 @@ function hexToRGB(hex) {
1277
1276
  ] : [0, 0, 0];
1278
1277
  }
1279
1278
 
1280
- // src/styles/z-index.tsx
1281
- var z = {
1282
- card: 1,
1283
- fieldError: 1,
1284
- textInput: 2,
1285
- select: 3,
1286
- selectFocused: 4,
1287
- walletActionPreviewTopGradient: 1,
1288
- headerContainer: 99,
1289
- smBanner: 99,
1290
- headerTop: 100,
1291
- navMenu: 100,
1292
- smNavMenu: 100,
1293
- navAction: 101,
1294
- smNavAction: 100,
1295
- // keep under navDropdown
1296
- tooltip: 160,
1297
- notificationBanner: 170,
1298
- qrReaderVideo: 180,
1299
- qrReaderOverlay: 181,
1300
- modalOverlay: 190,
1301
- modalContainer: 191,
1302
- dropdown: 192,
1303
- toast: 200
1304
- };
1305
-
1306
1279
  // src/styles/common.tsx
1307
1280
  var rootFontSizePx = 12;
1308
1281
  var rootFontSizeRems = rootFontSizePx / 16;
1309
- var standardContentInsetPx = 32;
1310
- var standardContentInsetMdPx = 24;
1311
- var standardContentInsetSmPx = 16;
1282
+ function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
1283
+ const smCSS = import_react4.css`
1284
+ ${bp.sm(`
1285
+ margin-left: auto;
1286
+ margin-right: auto;
1287
+ width: calc(100% - ${smPx * 2}px);
1288
+ `)}
1289
+ `;
1290
+ const minSmMaxLgCSS = import_react4.css`
1291
+ ${bp.minSmMaxLg(`
1292
+ margin-left: auto;
1293
+ margin-right: auto;
1294
+ width: calc(100% - ${minSmMaxLgPx * 2}px);
1295
+ `)}
1296
+ `;
1297
+ const lgCSS = import_react4.css`
1298
+ ${bp.lg(`
1299
+ margin-left: auto;
1300
+ margin-right: auto;
1301
+ width: calc(100% - ${lgPx * 2}px);
1302
+ max-width: 1280px;
1303
+ `)}
1304
+ `;
1305
+ return {
1306
+ smPx,
1307
+ minSmMaxLgPx,
1308
+ lgPx,
1309
+ smCSS,
1310
+ minSmMaxLgCSS,
1311
+ lgCSS,
1312
+ css: import_react4.css`
1313
+ ${lgCSS}
1314
+ ${smCSS}
1315
+ ${minSmMaxLgCSS}
1316
+ `
1317
+ };
1318
+ }
1319
+ var standardContentInset = buildStandardContentInset(16, 24, 32);
1312
1320
  var standardBorderRadius = (radius) => {
1313
1321
  const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
1314
1322
  return `
1315
1323
  border-radius: ${borderRadiusPx};
1316
1324
  `;
1317
1325
  };
1318
- var smContentInset = import_react4.css`
1319
- ${bp.sm(`
1320
- margin-left: auto;
1321
- margin-right: auto;
1322
- width: calc(100% - ${standardContentInsetSmPx * 2}px);
1323
- `)}
1324
- `;
1325
- var minSmMaxLgContentInset = import_react4.css`
1326
- ${bp.minSmMaxLg(`
1327
- width: calc(100% - ${standardContentInsetMdPx * 2}px);
1328
- `)}
1329
- `;
1330
- var standardContentInset = import_react4.css`
1331
- margin-left: auto;
1332
- margin-right: auto;
1333
- width: calc(100% - ${standardContentInsetPx * 2}px);
1334
- max-width: 1280px;
1335
-
1336
- ${smContentInset}
1337
- ${minSmMaxLgContentInset}
1338
- `;
1339
1326
  var standardCardShadow = import_react4.css`
1340
1327
  box-shadow:
1341
1328
  0px 4px 10px 0px rgba(0, 0, 0, 0.08),
@@ -1355,9 +1342,6 @@ var Subtext = import_styled.default.div`
1355
1342
  var darkGradientBg = import_react4.css`
1356
1343
  background: ${darkGradient};
1357
1344
  `;
1358
- var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
1359
- z-index: ${z.modalOverlay};
1360
- `;
1361
1345
 
1362
1346
  // src/components/ContentTable.tsx
1363
1347
  var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");