@lightsparkdev/ui 0.0.8 → 0.0.11

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 (110) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{chunk-NRXJA2PM.js → chunk-3EVAP5JT.js} +1 -1
  3. package/dist/{chunk-4KWTXZRY.js → chunk-3GS5EFXV.js} +1 -1
  4. package/dist/{chunk-WTO7C7WA.js → chunk-5POPBNPS.js} +1 -1
  5. package/dist/{chunk-UWN53KLJ.js → chunk-7C4MHI6Q.js} +3 -3
  6. package/dist/{chunk-6FHLZM6N.js → chunk-7T36JGTC.js} +2 -2
  7. package/dist/{chunk-YPB5SA65.js → chunk-A4FQBEYU.js} +6 -6
  8. package/dist/{chunk-SZVMKB4E.js → chunk-ATUH6SXK.js} +19 -8
  9. package/dist/{chunk-U6XT5JKC.js → chunk-DQRN4E5G.js} +1 -1
  10. package/dist/{chunk-36C653MV.js → chunk-E3AOYBY5.js} +1 -1
  11. package/dist/{chunk-MAMSU2XB.js → chunk-EEFNW7NS.js} +3 -3
  12. package/dist/{chunk-2YB7653N.js → chunk-FCZJILMW.js} +1 -1
  13. package/dist/{chunk-ZYHA6MJC.js → chunk-H3RW6JSU.js} +1 -1
  14. package/dist/chunk-IPAXAP6K.js +119 -0
  15. package/dist/{chunk-BAO4T4G5.js → chunk-J4FJQ3FN.js} +1 -1
  16. package/dist/{chunk-HNVQIY5U.js → chunk-JK4BP73A.js} +39 -30
  17. package/dist/{chunk-ZSUX6RLD.js → chunk-KMR5C25B.js} +1 -1
  18. package/dist/{chunk-2JM7UTAZ.js → chunk-NFSAJ5GJ.js} +8 -8
  19. package/dist/{chunk-DAVVD7YE.js → chunk-NM7UW54G.js} +18 -21
  20. package/dist/chunk-P3EUPXFA.js +150 -0
  21. package/dist/chunk-PBRN7MJY.js +315 -0
  22. package/dist/{chunk-CW3W2VTZ.js → chunk-PVQCLQNA.js} +1 -1
  23. package/dist/{chunk-VHW2KROZ.js → chunk-RWIZ7Q74.js} +1 -1
  24. package/dist/{chunk-744FBGRP.js → chunk-XP2MX2AA.js} +1 -1
  25. package/dist/{chunk-XAZ6NZ6I.js → chunk-XZR237JJ.js} +1 -1
  26. package/dist/{chunk-FN5PM3HQ.js → chunk-Y37DCY7Y.js} +6 -6
  27. package/dist/{chunk-76Q4BK35.js → chunk-ZANLDY2W.js} +5 -5
  28. package/dist/components/Badge.cjs +38 -24
  29. package/dist/components/Badge.js +2 -2
  30. package/dist/components/Button.cjs +38 -24
  31. package/dist/components/Button.js +6 -6
  32. package/dist/components/ButtonRow.cjs +42 -28
  33. package/dist/components/ButtonRow.js +8 -8
  34. package/dist/components/CardPage.cjs +1921 -0
  35. package/dist/components/CardPage.d.cts +54 -0
  36. package/dist/components/CardPage.d.ts +54 -0
  37. package/dist/components/CardPage.js +33 -0
  38. package/dist/components/Collapsible.cjs +38 -24
  39. package/dist/components/Collapsible.js +4 -4
  40. package/dist/components/ContentTable.cjs +38 -24
  41. package/dist/components/ContentTable.js +3 -3
  42. package/dist/components/CopyToClipboardButton.cjs +38 -24
  43. package/dist/components/CopyToClipboardButton.js +5 -5
  44. package/dist/components/CurrencyAmount.cjs +38 -24
  45. package/dist/components/CurrencyAmount.js +3 -3
  46. package/dist/components/FileInput.cjs +38 -24
  47. package/dist/components/FileInput.js +7 -7
  48. package/dist/components/GradientCardHeader.cjs +177 -0
  49. package/dist/components/GradientCardHeader.d.cts +10 -0
  50. package/dist/components/GradientCardHeader.d.ts +10 -0
  51. package/dist/components/GradientCardHeader.js +8 -0
  52. package/dist/components/Icon.cjs +38 -24
  53. package/dist/components/Icon.js +2 -2
  54. package/dist/components/LightTooltip.cjs +38 -24
  55. package/dist/components/LightTooltip.js +2 -2
  56. package/dist/components/LightsparkProvider.cjs +38 -24
  57. package/dist/components/LightsparkProvider.js +3 -3
  58. package/dist/components/Loading.cjs +38 -24
  59. package/dist/components/Loading.js +3 -3
  60. package/dist/components/Modal.cjs +46 -34
  61. package/dist/components/Modal.js +9 -9
  62. package/dist/components/Pill.cjs +38 -24
  63. package/dist/components/Pill.js +6 -6
  64. package/dist/components/ProgressBar.cjs +38 -24
  65. package/dist/components/ProgressBar.js +2 -2
  66. package/dist/components/SecretContainer.cjs +38 -24
  67. package/dist/components/SecretContainer.js +6 -6
  68. package/dist/components/TextIconAligner.cjs +38 -24
  69. package/dist/components/TextIconAligner.js +3 -3
  70. package/dist/components/UnstyledButton.cjs +38 -24
  71. package/dist/components/UnstyledButton.js +2 -2
  72. package/dist/components/documentation/AnchorLinkHeader.cjs +38 -24
  73. package/dist/components/documentation/AnchorLinkHeader.js +3 -3
  74. package/dist/components/documentation/index.cjs +38 -24
  75. package/dist/components/documentation/index.js +3 -3
  76. package/dist/components/index.cjs +737 -185
  77. package/dist/components/index.d.cts +2 -0
  78. package/dist/components/index.d.ts +2 -0
  79. package/dist/components/index.js +51 -32
  80. package/dist/icons/ArrowCornerDownRight.cjs +49 -0
  81. package/dist/icons/ArrowCornerDownRight.d.cts +5 -0
  82. package/dist/icons/ArrowCornerDownRight.d.ts +5 -0
  83. package/dist/icons/ArrowCornerDownRight.js +30 -0
  84. package/dist/icons/Sort.cjs +48 -0
  85. package/dist/icons/Sort.d.cts +5 -0
  86. package/dist/icons/Sort.d.ts +5 -0
  87. package/dist/icons/Sort.js +29 -0
  88. package/dist/icons/index.cjs +38 -24
  89. package/dist/icons/index.js +2 -2
  90. package/dist/styles/common.cjs +38 -34
  91. package/dist/styles/common.d.cts +10 -7
  92. package/dist/styles/common.d.ts +10 -7
  93. package/dist/styles/common.js +1 -11
  94. package/dist/styles/fields.cjs +56 -31
  95. package/dist/styles/fields.d.cts +4 -3
  96. package/dist/styles/fields.d.ts +4 -3
  97. package/dist/styles/fields.js +2 -2
  98. package/dist/styles/fonts/typography/Article.cjs +38 -24
  99. package/dist/styles/fonts/typography/Article.js +6 -6
  100. package/dist/styles/fonts/typography/index.cjs +38 -24
  101. package/dist/styles/fonts/typography/index.js +11 -11
  102. package/dist/styles/fonts/typographyTokens.d.cts +1 -4
  103. package/dist/styles/fonts/typographyTokens.d.ts +1 -4
  104. package/dist/styles/global.cjs +38 -24
  105. package/dist/styles/global.js +2 -2
  106. package/dist/styles/type.cjs +38 -24
  107. package/dist/styles/type.js +8 -144
  108. package/dist/styles/utils.cjs +38 -24
  109. package/dist/styles/utils.js +2 -2
  110. package/package.json +7 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @lightsparkdev/ui
2
2
 
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b47bc60]
8
+ - @lightsparkdev/core@1.0.20
9
+
10
+ ## 0.0.10
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [330f913]
15
+ - @lightsparkdev/core@1.0.19
16
+
17
+ ## 0.0.9
18
+
19
+ ### Patch Changes
20
+
21
+ - 79f9f9f: - Fix ButtonRow inset
22
+ - Add CardPage
23
+ - Add GradientCardHeader
24
+ - Default cancelText value for Modal and simplify inset refs
25
+ - 062bf8a: - Add active prop to textInputStyle for indicating active style in response to external factors
26
+ - 062bf8a: [js] Add engines field to all packages to indicate supported NodeJS versions
27
+ - Updated dependencies [062bf8a]
28
+ - @lightsparkdev/core@1.0.18
29
+
3
30
  ## 0.0.8
4
31
 
5
32
  ### Patch Changes
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-55OQPFLF.js";
4
4
  import {
5
5
  overlaySurface
6
- } from "./chunk-HNVQIY5U.js";
6
+ } from "./chunk-JK4BP73A.js";
7
7
  import {
8
8
  __spreadProps,
9
9
  __spreadValues
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardFocusOutline
3
- } from "./chunk-HNVQIY5U.js";
3
+ } from "./chunk-JK4BP73A.js";
4
4
 
5
5
  // src/components/UnstyledButton.tsx
6
6
  import styled from "@emotion/styled";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-VHW2KROZ.js";
3
+ } from "./chunk-RWIZ7Q74.js";
4
4
 
5
5
  // src/components/TextIconAligner.tsx
6
6
  import { jsx, jsxs } from "@emotion/react/jsx-runtime";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  UnstyledButton
3
- } from "./chunk-4KWTXZRY.js";
3
+ } from "./chunk-3GS5EFXV.js";
4
4
  import {
5
5
  LightTooltip
6
- } from "./chunk-NRXJA2PM.js";
6
+ } from "./chunk-3EVAP5JT.js";
7
7
  import {
8
8
  Icon
9
- } from "./chunk-VHW2KROZ.js";
9
+ } from "./chunk-RWIZ7Q74.js";
10
10
  import {
11
11
  __async
12
12
  } from "./chunk-CIGAQ47A.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CopyToClipboardButton
3
- } from "./chunk-UWN53KLJ.js";
3
+ } from "./chunk-7C4MHI6Q.js";
4
4
  import {
5
5
  standardBorderRadius
6
- } from "./chunk-HNVQIY5U.js";
6
+ } from "./chunk-JK4BP73A.js";
7
7
 
8
8
  // src/components/SecretContainer.tsx
9
9
  import styled from "@emotion/styled";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  Loading
3
- } from "./chunk-BAO4T4G5.js";
4
- import {
5
- flexCenter
6
- } from "./chunk-2YB7653N.js";
3
+ } from "./chunk-J4FJQ3FN.js";
7
4
  import {
8
5
  UnstyledButton
9
- } from "./chunk-4KWTXZRY.js";
6
+ } from "./chunk-3GS5EFXV.js";
7
+ import {
8
+ flexCenter
9
+ } from "./chunk-FCZJILMW.js";
10
10
  import {
11
11
  Icon
12
- } from "./chunk-VHW2KROZ.js";
12
+ } from "./chunk-RWIZ7Q74.js";
13
13
  import {
14
14
  colors
15
15
  } from "./chunk-2VBDEO6M.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  standardBorderRadius,
6
6
  subtext
7
- } from "./chunk-HNVQIY5U.js";
7
+ } from "./chunk-JK4BP73A.js";
8
8
  import {
9
9
  colors,
10
10
  themeOr
@@ -52,8 +52,21 @@ var textInputPaddingPx = 12;
52
52
  var textInputPadding = `${textInputPaddingPx}px`;
53
53
  var textInputBorderColor = ({ theme }) => themeOr(theme.c1Neutral, theme.c3Neutral)({ theme });
54
54
  var textInputBorderColorFocused = ({ theme }) => themeOr(theme.hcNeutral, theme.hcNeutral)({ theme });
55
+ var textInputActiveStyles = ({
56
+ theme,
57
+ paddingLeftPx,
58
+ paddingRightPx
59
+ }) => css`
60
+ border-color: ${textInputBorderColorFocused({ theme })};
61
+ border-width: 2px;
62
+ color: ${textInputColor({ theme })};
63
+ padding: ${textInputPaddingPx - 1}px;
64
+ ${paddingLeftPx ? `padding-left: ${paddingLeftPx - 1}px;` : ""}
65
+ ${paddingRightPx ? `padding-right: ${paddingRightPx - 1}px;` : ""}
66
+ `;
55
67
  var textInputStyle = ({
56
68
  theme,
69
+ active,
57
70
  disabled,
58
71
  hasError,
59
72
  paddingLeftPx,
@@ -87,15 +100,13 @@ var textInputStyle = ({
87
100
  max-width: ${maxFieldWidth};
88
101
  text-overflow: ellipsis;
89
102
  &:focus,
90
- &:active {
91
- border-color: ${textInputBorderColorFocused({ theme })};
92
- border-width: 2px;
93
- color: ${textInputColor({ theme })};
94
- padding: ${textInputPaddingPx - 1}px;
95
- ${paddingLeftPx ? `padding-left: ${paddingLeftPx - 1}px;` : ""}
96
- ${paddingRightPx ? `padding-right: ${paddingRightPx - 1}px;` : ""}
103
+ &:active,
104
+ &:has(:focus) {
105
+ ${textInputActiveStyles({ theme, paddingLeftPx, paddingRightPx })}
97
106
  }
98
107
 
108
+ ${active && textInputActiveStyles({ theme, paddingLeftPx, paddingRightPx })}
109
+
99
110
  &::placeholder {
100
111
  color: ${textInputPlaceholderColor({ theme })};
101
112
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardBorderRadius
3
- } from "./chunk-HNVQIY5U.js";
3
+ } from "./chunk-JK4BP73A.js";
4
4
  import {
5
5
  isLight
6
6
  } from "./chunk-2VBDEO6M.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  standardBorderRadius
3
- } from "./chunk-HNVQIY5U.js";
3
+ } from "./chunk-JK4BP73A.js";
4
4
  import {
5
5
  themeOr
6
6
  } from "./chunk-2VBDEO6M.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  overflowAutoWithoutScrollbars
3
- } from "./chunk-2YB7653N.js";
3
+ } from "./chunk-FCZJILMW.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-VHW2KROZ.js";
6
+ } from "./chunk-RWIZ7Q74.js";
7
7
  import {
8
8
  standardBorderRadius
9
- } from "./chunk-HNVQIY5U.js";
9
+ } from "./chunk-JK4BP73A.js";
10
10
 
11
11
  // src/components/Collapsible.tsx
12
12
  import styled from "@emotion/styled";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rootFontSizePx
3
- } from "./chunk-HNVQIY5U.js";
3
+ } from "./chunk-JK4BP73A.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
  GlobalStyles
3
- } from "./chunk-ZSUX6RLD.js";
3
+ } from "./chunk-KMR5C25B.js";
4
4
  import {
5
5
  themes
6
6
  } from "./chunk-2VBDEO6M.js";
@@ -0,0 +1,119 @@
1
+ import {
2
+ z
3
+ } from "./chunk-55OQPFLF.js";
4
+
5
+ // src/components/GradientCardHeader.tsx
6
+ import styled from "@emotion/styled";
7
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
8
+ function GradientCardHeader(props) {
9
+ return /* @__PURE__ */ jsxs(CardHeaderWrapper, { children: [
10
+ /* @__PURE__ */ jsx(Gradients, {}),
11
+ /* @__PURE__ */ jsxs("div", { children: [
12
+ props.status,
13
+ /* @__PURE__ */ jsx(CardHeaderTitle, { children: props.title })
14
+ ] }),
15
+ props.children
16
+ ] });
17
+ }
18
+ var CardHeaderWrapper = styled.div`
19
+ position: relative;
20
+ display: flex;
21
+ flex-direction: column;
22
+ justify-content: space-between;
23
+ padding: 40px 32px 24px 32px;
24
+ background-color: black;
25
+ color: white;
26
+ height: 264px;
27
+ `;
28
+ var CardHeaderTitle = styled.h3`
29
+ font-size: 21px;
30
+ font-weight: 800;
31
+ color: white;
32
+ margin: 0;
33
+ z-index: ${z.headerContainer} - 1;
34
+ position: relative;
35
+ `;
36
+ var Gradients = () => {
37
+ return /* @__PURE__ */ jsxs("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [
38
+ /* @__PURE__ */ jsx(BackgroundGradients, {}),
39
+ /* @__PURE__ */ jsx(AccentGradients, {})
40
+ ] });
41
+ };
42
+ var BackgroundGradients = styled.div`
43
+ &:before,
44
+ &:after {
45
+ content: "";
46
+ position: absolute;
47
+ margin: auto;
48
+ filter: blur(38.5px);
49
+ }
50
+ &:before {
51
+ z-index: ${z.walletActionPreviewTopGradient};
52
+ right: -280px;
53
+ top: -340px;
54
+ width: 704px;
55
+ height: 619px;
56
+ background: radial-gradient(
57
+ 31.57% 32.06% at 50.1% 49.9%,
58
+ #0032ff 0%,
59
+ rgb(0 121 255 / 31%) 97%,
60
+ rgba(0, 102, 255, 0.05) 100%
61
+ );
62
+ }
63
+ &:after {
64
+ z-index: ${z.walletActionPreviewTopGradient - 1};
65
+ width: 636px;
66
+ height: 552px;
67
+ top: -400px;
68
+ right: -280px;
69
+ background: radial-gradient(
70
+ 31.57% 32.06% at 50.1% 49.9%,
71
+ rgb(255 114 104) 0%,
72
+ rgb(191 9 255 / 14%) 90%,
73
+ rgb(191 9 255 / 5%) 100%
74
+ );
75
+ }
76
+ `;
77
+ var AccentGradients = styled.div`
78
+ position: absolute;
79
+ top: 0;
80
+ left: 0;
81
+ width: 100%;
82
+ height: 100%;
83
+ right: 0;
84
+ bottom: 0;
85
+ z-index: ${z.walletActionPreviewTopGradient - 1};
86
+ &:before,
87
+ &:after {
88
+ content: "";
89
+ position: absolute;
90
+ margin: auto;
91
+ filter: blur(38.5px);
92
+ }
93
+ &:before {
94
+ right: -70px;
95
+ top: -100px;
96
+ width: 169px;
97
+ height: 323px;
98
+ background: radial-gradient(
99
+ 31.57% 32.06% at 50.1% 49.9%,
100
+ #ff8c28,
101
+ rgba(191, 9, 255, 0.1) 100%
102
+ );
103
+ }
104
+ &:after {
105
+ right: -22px;
106
+ top: -140px;
107
+ width: 225px;
108
+ height: 190px;
109
+ background: radial-gradient(
110
+ 41.57% 62.06% at 53.1% 49.9%,
111
+ rgb(255 119 0),
112
+ rgb(255 106 9 / 55%) 100%
113
+ );
114
+ }
115
+ `;
116
+
117
+ export {
118
+ GradientCardHeader
119
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Icon
3
- } from "./chunk-VHW2KROZ.js";
3
+ } from "./chunk-RWIZ7Q74.js";
4
4
 
5
5
  // src/components/Loading.tsx
6
6
  import styled from "@emotion/styled";
@@ -14,9 +14,44 @@ var rootFontSizePx = 12;
14
14
  var rootFontSizeRems = rootFontSizePx / 16;
15
15
  var standardLineHeightEms = 1.21;
16
16
  var headingContentMarginPx = 30;
17
- var standardContentInsetPx = 32;
18
- var standardContentInsetMdPx = 24;
19
- var standardContentInsetSmPx = 16;
17
+ function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
18
+ const smCSS = css`
19
+ ${bp.sm(`
20
+ margin-left: auto;
21
+ margin-right: auto;
22
+ width: calc(100% - ${smPx * 2}px);
23
+ `)}
24
+ `;
25
+ const minSmMaxLgCSS = css`
26
+ ${bp.minSmMaxLg(`
27
+ margin-left: auto;
28
+ margin-right: auto;
29
+ width: calc(100% - ${minSmMaxLgPx * 2}px);
30
+ `)}
31
+ `;
32
+ const lgCSS = css`
33
+ ${bp.lg(`
34
+ margin-left: auto;
35
+ margin-right: auto;
36
+ width: calc(100% - ${lgPx * 2}px);
37
+ max-width: 1280px;
38
+ `)}
39
+ `;
40
+ return {
41
+ smPx,
42
+ minSmMaxLgPx,
43
+ lgPx,
44
+ smCSS,
45
+ minSmMaxLgCSS,
46
+ lgCSS,
47
+ css: css`
48
+ ${lgCSS}
49
+ ${smCSS}
50
+ ${minSmMaxLgCSS}
51
+ `
52
+ };
53
+ }
54
+ var standardContentInset = buildStandardContentInset(16, 24, 32);
20
55
  var cardBorderRadiusPx = 16;
21
56
  var standardBorderRadius = (radius) => {
22
57
  const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
@@ -24,27 +59,6 @@ var standardBorderRadius = (radius) => {
24
59
  border-radius: ${borderRadiusPx};
25
60
  `;
26
61
  };
27
- var smContentInset = css`
28
- ${bp.sm(`
29
- margin-left: auto;
30
- margin-right: auto;
31
- width: calc(100% - ${standardContentInsetSmPx * 2}px);
32
- `)}
33
- `;
34
- var minSmMaxLgContentInset = css`
35
- ${bp.minSmMaxLg(`
36
- width: calc(100% - ${standardContentInsetMdPx * 2}px);
37
- `)}
38
- `;
39
- var standardContentInset = css`
40
- margin-left: auto;
41
- margin-right: auto;
42
- width: calc(100% - ${standardContentInsetPx * 2}px);
43
- max-width: 1280px;
44
-
45
- ${smContentInset}
46
- ${minSmMaxLgContentInset}
47
- `;
48
62
  var standardCardShadow = css`
49
63
  box-shadow:
50
64
  0px 4px 10px 0px rgba(0, 0, 0, 0.08),
@@ -118,14 +132,9 @@ export {
118
132
  rootFontSizeRems,
119
133
  standardLineHeightEms,
120
134
  headingContentMarginPx,
121
- standardContentInsetPx,
122
- standardContentInsetMdPx,
123
- standardContentInsetSmPx,
135
+ standardContentInset,
124
136
  cardBorderRadiusPx,
125
137
  standardBorderRadius,
126
- smContentInset,
127
- minSmMaxLgContentInset,
128
- standardContentInset,
129
138
  standardCardShadow,
130
139
  pageBorderRadiusPx,
131
140
  pageBorderRadius,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  rootFontSizeRems,
6
6
  standardLineHeightEms
7
- } from "./chunk-HNVQIY5U.js";
7
+ } from "./chunk-JK4BP73A.js";
8
8
  import {
9
9
  useThemeBg
10
10
  } from "./chunk-2VBDEO6M.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-76Q4BK35.js";
3
+ } from "./chunk-ZANLDY2W.js";
4
4
  import {
5
5
  overflowAutoWithoutScrollbars
6
- } from "./chunk-2YB7653N.js";
6
+ } from "./chunk-FCZJILMW.js";
7
7
  import {
8
- standardContentInsetSmPx
9
- } from "./chunk-HNVQIY5U.js";
8
+ standardContentInset
9
+ } from "./chunk-JK4BP73A.js";
10
10
  import {
11
11
  bp
12
12
  } from "./chunk-JSGRNWSB.js";
@@ -37,9 +37,9 @@ var ButtonRowContainer = styled.div`
37
37
  position: sticky;
38
38
  top: ${headerHeight}px;
39
39
  margin-top: 24px;
40
- margin-left: -${standardContentInsetSmPx}px;
41
- width: calc(100% + ${standardContentInsetSmPx * 2}px);
42
- max-width: calc(100% + ${standardContentInsetSmPx * 2}px);
40
+ margin-left: -${standardContentInset.smPx}px;
41
+ width: calc(100% + ${standardContentInset.smPx * 2}px);
42
+ max-width: calc(100% + ${standardContentInset.smPx * 2}px);
43
43
  z-index: 2;` : `position: relative;`}
44
44
  z-index: 2;
45
45
  &:before {
@@ -78,7 +78,7 @@ var StyledButtonRow = styled.div`
78
78
  }
79
79
 
80
80
  ${bp.sm(`
81
- padding: 12px;
81
+ padding: ${standardContentInset.smPx}px;
82
82
  `)}
83
83
  `;
84
84
 
@@ -6,33 +6,32 @@ import {
6
6
  } from "./chunk-NBCCPGA4.js";
7
7
  import {
8
8
  ProgressBar
9
- } from "./chunk-36C653MV.js";
9
+ } from "./chunk-E3AOYBY5.js";
10
10
  import {
11
11
  Button
12
- } from "./chunk-76Q4BK35.js";
12
+ } from "./chunk-ZANLDY2W.js";
13
13
  import {
14
14
  select
15
15
  } from "./chunk-YMNSXZ5D.js";
16
- import {
17
- overflowAutoWithoutScrollbars,
18
- pxToRems
19
- } from "./chunk-2YB7653N.js";
20
16
  import {
21
17
  UnstyledButton
22
- } from "./chunk-4KWTXZRY.js";
18
+ } from "./chunk-3GS5EFXV.js";
23
19
  import {
24
20
  z
25
21
  } from "./chunk-55OQPFLF.js";
22
+ import {
23
+ overflowAutoWithoutScrollbars,
24
+ pxToRems
25
+ } from "./chunk-FCZJILMW.js";
26
26
  import {
27
27
  Icon
28
- } from "./chunk-VHW2KROZ.js";
28
+ } from "./chunk-RWIZ7Q74.js";
29
29
  import {
30
30
  overlaySurface,
31
- smContentInset,
32
31
  standardBorderRadius,
33
- standardContentInsetSmPx,
32
+ standardContentInset,
34
33
  standardFocusOutline
35
- } from "./chunk-HNVQIY5U.js";
34
+ } from "./chunk-JK4BP73A.js";
36
35
  import {
37
36
  bp,
38
37
  useBreakpoints
@@ -57,7 +56,7 @@ function Modal({
57
56
  submitDisabled,
58
57
  submitLoading,
59
58
  submitText,
60
- cancelText,
59
+ cancelText = "Cancel",
61
60
  firstFocusRef,
62
61
  nonDismissable = false,
63
62
  autoFocus = true,
@@ -185,16 +184,16 @@ function Modal({
185
184
  title ? /* @__PURE__ */ jsx("h4", { children: title }) : null,
186
185
  formattedDescription ? /* @__PURE__ */ jsx(Description, { children: formattedDescription }) : null,
187
186
  /* @__PURE__ */ jsx("div", { children }),
188
- onSubmit ? /* @__PURE__ */ jsxs(ModalButtonRow, { children: [
187
+ onSubmit || onCancel ? /* @__PURE__ */ jsxs(ModalButtonRow, { children: [
189
188
  !isSm && !cancelHidden && /* @__PURE__ */ jsx(
190
189
  Button,
191
190
  {
192
191
  disabled: cancelDisabled,
193
192
  onClick: onClickCancel,
194
- text: cancelText != null ? cancelText : "Cancel"
193
+ text: cancelText
195
194
  }
196
195
  ),
197
- /* @__PURE__ */ jsx(
196
+ onSubmit && /* @__PURE__ */ jsx(
198
197
  Button,
199
198
  {
200
199
  disabled: submitDisabled,
@@ -204,7 +203,7 @@ function Modal({
204
203
  type: "submit"
205
204
  }
206
205
  ),
207
- isSm && !cancelHidden && /* @__PURE__ */ jsx(Button, { onClick: onClose, text: "Cancel" })
206
+ isSm && !cancelHidden && /* @__PURE__ */ jsx(Button, { onClick: onClose, text: cancelText })
208
207
  ] }) : null
209
208
  ] })
210
209
  ] })
@@ -247,7 +246,7 @@ var ModalContainer = styled.div`
247
246
  justify-content: center;
248
247
  align-items: center;
249
248
  color: ${({ theme }) => theme.text};
250
- padding-top: ${standardContentInsetSmPx}px;
249
+ padding-top: ${standardContentInset.smPx}px;
251
250
  `;
252
251
  var contentTopMarginPx = 24;
253
252
  var Description = styled.div`
@@ -260,6 +259,7 @@ var Description = styled.div`
260
259
  var ModalButtonRow = styled.div`
261
260
  margin-top: 32px;
262
261
  ${bp.minSm(`display: flex;`)}
262
+ gap: 10px;
263
263
 
264
264
  button {
265
265
  width: 50%;
@@ -272,14 +272,11 @@ var ModalButtonRow = styled.div`
272
272
  ${bp.sm(`
273
273
  margin-top: 16px;
274
274
  `)}
275
- ${bp.minSm(`
276
- margin-left: 10px;
277
- `)}
278
275
  }
279
276
  `;
280
277
  var ModalContent = styled.div`
281
278
  ${overflowAutoWithoutScrollbars}
282
- ${smContentInset}
279
+ ${standardContentInset.smCSS}
283
280
  ${standardBorderRadius(16)}
284
281
  ${(props) => props.ghost ? "" : overlaySurface}
285
282
  pointer-events: auto;