@fairmint/ui 0.3.9 → 0.3.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.
- package/dist/_virtual/index3.cjs +3 -5
- package/dist/_virtual/index3.cjs.map +1 -1
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.cjs +5 -3
- package/dist/_virtual/index4.cjs.map +1 -1
- package/dist/_virtual/index4.js +5 -2
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.cjs +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.cjs.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.js +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.js.map +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.cjs +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.js +2 -2
- package/dist/components/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.cjs +2 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.cjs.map +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js.map +1 -1
- package/dist/components/form/SignatureNameField/SignatureNameField.cjs +56 -0
- package/dist/components/form/SignatureNameField/SignatureNameField.cjs.map +1 -0
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts +18 -0
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts.map +1 -0
- package/dist/components/form/SignatureNameField/SignatureNameField.js +56 -0
- package/dist/components/form/SignatureNameField/SignatureNameField.js.map +1 -0
- package/dist/components/generic/Banner/Banner.cjs +46 -11
- package/dist/components/generic/Banner/Banner.cjs.map +1 -1
- package/dist/components/generic/Banner/Banner.d.ts.map +1 -1
- package/dist/components/generic/Banner/Banner.js +47 -12
- package/dist/components/generic/Banner/Banner.js.map +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.cjs +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.cjs.map +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.js +2 -2
- package/dist/components/generic/CompanyBanner/CompanyBanner.js.map +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.cjs +3 -3
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.cjs.map +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.js +4 -4
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.js.map +1 -1
- package/dist/components/generic/DataRow/DataRow.cjs +4 -5
- package/dist/components/generic/DataRow/DataRow.cjs.map +1 -1
- package/dist/components/generic/DataRow/DataRow.d.ts.map +1 -1
- package/dist/components/generic/DataRow/DataRow.js +5 -6
- package/dist/components/generic/DataRow/DataRow.js.map +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.cjs +97 -28
- package/dist/components/generic/DocumentRow/DocumentRow.cjs.map +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.js +98 -29
- package/dist/components/generic/DocumentRow/DocumentRow.js.map +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.cjs +6 -1
- package/dist/components/generic/Eyebrow/Eyebrow.cjs.map +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts +2 -2
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts.map +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.js +7 -2
- package/dist/components/generic/Eyebrow/Eyebrow.js.map +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.cjs +38 -20
- package/dist/components/generic/FileDropzone/FileDropzone.cjs.map +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.js +39 -21
- package/dist/components/generic/FileDropzone/FileDropzone.js.map +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.cjs +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.cjs.map +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.js +2 -2
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.js.map +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.cjs +11 -2
- package/dist/components/generic/ProcessingState/ProcessingState.cjs.map +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.d.ts.map +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.js +12 -3
- package/dist/components/generic/ProcessingState/ProcessingState.js.map +1 -1
- package/dist/components/generic/RadioCard/RadioCard.cjs +7 -7
- package/dist/components/generic/RadioCard/RadioCard.cjs.map +1 -1
- package/dist/components/generic/RadioCard/RadioCard.js +8 -8
- package/dist/components/generic/RadioCard/RadioCard.js.map +1 -1
- package/dist/components/generic/StatCard/StatCard.cjs +27 -18
- package/dist/components/generic/StatCard/StatCard.cjs.map +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/generic/StatCard/StatCard.js +27 -18
- package/dist/components/generic/StatCard/StatCard.js.map +1 -1
- package/dist/components/generic/StepCard/StepCard.cjs +2 -2
- package/dist/components/generic/StepCard/StepCard.cjs.map +1 -1
- package/dist/components/generic/StepCard/StepCard.d.ts.map +1 -1
- package/dist/components/generic/StepCard/StepCard.js +3 -3
- package/dist/components/generic/StepCard/StepCard.js.map +1 -1
- package/dist/components/layout/SideNav/SideNav.cjs +2 -2
- package/dist/components/layout/SideNav/SideNav.cjs.map +1 -1
- package/dist/components/layout/SideNav/SideNav.js +3 -3
- package/dist/components/layout/SideNav/SideNav.js.map +1 -1
- package/dist/components/primitives/Badge/Badge.cjs +11 -3
- package/dist/components/primitives/Badge/Badge.cjs.map +1 -1
- package/dist/components/primitives/Badge/Badge.d.ts.map +1 -1
- package/dist/components/primitives/Badge/Badge.js +12 -4
- package/dist/components/primitives/Badge/Badge.js.map +1 -1
- package/dist/components/primitives/muiCompat.cjs +41 -44
- package/dist/components/primitives/muiCompat.cjs.map +1 -1
- package/dist/components/primitives/muiCompat.d.ts +21 -21
- package/dist/components/primitives/muiCompat.d.ts.map +1 -1
- package/dist/components/primitives/muiCompat.js +42 -45
- package/dist/components/primitives/muiCompat.js.map +1 -1
- package/dist/components/primitives/sx.cjs +21 -25
- package/dist/components/primitives/sx.cjs.map +1 -1
- package/dist/components/primitives/sx.d.ts.map +1 -1
- package/dist/components/primitives/sx.js +22 -26
- package/dist/components/primitives/sx.js.map +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.cjs +14 -1
- package/dist/components/specific/DocumentRow/DocumentRow.cjs.map +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.js +14 -1
- package/dist/components/specific/DocumentRow/DocumentRow.js.map +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.cjs +2 -2
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.cjs.map +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.js +3 -3
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.js.map +1 -1
- package/dist/fairmint-ui.cjs +3 -0
- package/dist/fairmint-ui.cjs.map +1 -1
- package/dist/fairmint-ui.js +4 -1
- package/dist/fairmint-ui.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/mui-icons.cjs +7 -7
- package/dist/mui-icons.cjs.map +1 -1
- package/dist/mui-icons.js +8 -8
- package/dist/mui-icons.js.map +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.cjs +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.js +1 -1
- package/dist/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/styles.css +35 -0
- package/dist/theme/index.cjs +329 -28
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.ts +85 -17
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +329 -28
- package/dist/theme/index.js.map +1 -1
- package/package.json +1 -1
package/dist/_virtual/index3.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const isEqual = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
|
|
6
|
-
module.exports = isEqual;
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var propTypes = { exports: {} };
|
|
4
|
+
exports.__module = propTypes;
|
|
7
5
|
//# sourceMappingURL=index3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
|
|
3
|
-
var fastDeepEqualExports = requireFastDeepEqual();
|
|
4
|
-
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
|
|
1
|
+
var propTypes = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
propTypes as __module
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index4.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
3
|
+
const index = require("../node_modules/fast-deep-equal/index.cjs");
|
|
4
|
+
var fastDeepEqualExports = index.__require();
|
|
5
|
+
const isEqual = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
|
|
6
|
+
module.exports = isEqual;
|
|
5
7
|
//# sourceMappingURL=index4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index4.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index4.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
|
|
3
|
+
var fastDeepEqualExports = requireFastDeepEqual();
|
|
4
|
+
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
isEqual as default
|
|
4
7
|
};
|
|
5
8
|
//# sourceMappingURL=index4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -19,7 +19,7 @@ function FairmintProvider({
|
|
|
19
19
|
...colorSchemeProps,
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ jsxRuntime.jsx(Notifications.Notifications, { position: notificationPosition }),
|
|
22
|
-
/* @__PURE__ */ jsxRuntime.jsx(DatesProvider.DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0 }, children })
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(DatesProvider.DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0, weekendDays: [] }, children })
|
|
23
23
|
]
|
|
24
24
|
}
|
|
25
25
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FairmintProvider.cjs","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0 }}
|
|
1
|
+
{"version":3,"file":"FairmintProvider.cjs","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":["jsxs","MantineProvider","theme","fairmintCssVariables","jsx","Notifications","DatesProvider"],"mappings":";;;;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACEA,2BAAAA;AAAAA,IAACC,gBAAAA;AAAAA,IAAA;AAAA,MAAA,OACCC,MAAAA;AAAAA,MACA,sBAAsBC,MAAAA;AAAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAAA,IAACC,cAAAA,eAAA,EAAc,UAAU,sBAAsB;AAAA,QAG/CD,2BAAAA,IAACE,cAAAA,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FairmintProvider.d.ts","sourceRoot":"","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EACjB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,WAAqB,EACrB,oBAAkC,GACnC,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"FairmintProvider.d.ts","sourceRoot":"","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,oBAAoB,CAAC,EACjB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,WAAqB,EACrB,oBAAkC,GACnC,EAAE,qBAAqB,2CAwBvB"}
|
|
@@ -17,7 +17,7 @@ function FairmintProvider({
|
|
|
17
17
|
...colorSchemeProps,
|
|
18
18
|
children: [
|
|
19
19
|
/* @__PURE__ */ jsx(Notifications, { position: notificationPosition }),
|
|
20
|
-
/* @__PURE__ */ jsx(DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0 }, children })
|
|
20
|
+
/* @__PURE__ */ jsx(DatesProvider, { settings: { locale: "en", firstDayOfWeek: 0, weekendDays: [] }, children })
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FairmintProvider.js","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0 }}
|
|
1
|
+
{"version":3,"file":"FairmintProvider.js","sources":["../../../src/components/FairmintProvider/FairmintProvider.tsx"],"sourcesContent":["import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport { DatesProvider } from \"@mantine/dates\";\nimport { Notifications } from \"@mantine/notifications\";\nimport type { ReactNode } from \"react\";\nimport { fairmintCssVariables, theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. When `light` or `dark`, Mantine is locked to this value. @default \"light\" */\n colorScheme?: MantineColorScheme;\n /**\n * Notification position.\n * @default \"top-right\"\n */\n notificationPosition?:\n | \"top-left\"\n | \"top-right\"\n | \"top-center\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"bottom-center\";\n}\n\nexport function FairmintProvider({\n children,\n colorScheme = \"light\",\n notificationPosition = \"top-right\",\n}: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n const colorSchemeProps =\n colorScheme === \"light\" || colorScheme === \"dark\"\n ? { forceColorScheme: colorScheme }\n : { defaultColorScheme: colorScheme };\n\n return (\n <MantineProvider\n theme={theme}\n cssVariablesResolver={fairmintCssVariables}\n {...colorSchemeProps}\n >\n <Notifications position={notificationPosition} />\n {/* weekendDays: [] disables Mantine's default red weekend-day styling — red is our\n error/destructive semantic color elsewhere, so it reads as disabled/invalid here. */}\n <DatesProvider settings={{ locale: \"en\", firstDayOfWeek: 0, weekendDays: [] }}>\n {children}\n </DatesProvider>\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n if (\n (typeof process !== \"undefined\" && process.env?.NODE_ENV === \"test\") ||\n import.meta.env?.MODE === \"test\"\n )\n return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n"],"names":[],"mappings":";;;;;AAwBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,uBAAuB;AACzB,GAA0B;AAKxB,QAAM,mBACJ,gBAAgB,WAAW,gBAAgB,SACvC,EAAE,kBAAkB,YAAA,IACpB,EAAE,oBAAoB,YAAA;AAE5B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,sBAAsB;AAAA,MACrB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAAC,eAAA,EAAc,UAAU,sBAAsB;AAAA,QAG/C,oBAAC,eAAA,EAAc,UAAU,EAAE,QAAQ,MAAM,gBAAgB,GAAG,aAAa,CAAA,EAAC,GACvE,UACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -8,7 +8,7 @@ function LoadingOverlay({
|
|
|
8
8
|
contained = false,
|
|
9
9
|
zIndex = 1301,
|
|
10
10
|
spinnerSize = 36,
|
|
11
|
-
backgroundColor =
|
|
11
|
+
backgroundColor = `color-mix(in srgb, ${index.fairmintVars.colorBrandPrimary} 20%, transparent)`,
|
|
12
12
|
style
|
|
13
13
|
}) {
|
|
14
14
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingOverlay.cjs","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"LoadingOverlay.cjs","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { fairmintVars } from \"../../theme\";\nimport { LoadingSpinner } from \"../LoadingSpinner/LoadingSpinner\";\nimport { Box } from \"../primitives/layout\";\n\nexport interface LoadingOverlayProps {\n contained?: boolean;\n zIndex?: number;\n spinnerSize?: number;\n backgroundColor?: string;\n style?: CSSProperties;\n}\n\nexport function LoadingOverlay({\n contained = false,\n zIndex = 1301,\n spinnerSize = 36,\n backgroundColor = `color-mix(in srgb, ${fairmintVars.colorBrandPrimary} 20%, transparent)`,\n style,\n}: LoadingOverlayProps) {\n return (\n <Box\n style={{\n alignItems: \"center\",\n backgroundColor,\n display: \"flex\",\n height: contained ? \"100%\" : \"100vh\",\n justifyContent: \"center\",\n left: 0,\n position: contained ? \"absolute\" : \"fixed\",\n top: 0,\n width: contained ? \"100%\" : \"100vw\",\n zIndex,\n ...style,\n }}\n >\n <LoadingSpinner size={spinnerSize} />\n </Box>\n );\n}\n"],"names":["fairmintVars","jsx","Box","LoadingSpinner"],"mappings":";;;;;;AAaO,SAAS,eAAe;AAAA,EAC7B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,cAAc;AAAA,EACd,kBAAkB,sBAAsBA,mBAAa,iBAAiB;AAAA,EACtE;AACF,GAAwB;AACtB,SACEC,2BAAAA;AAAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAAY;AAAA,QACZ;AAAA,QACA,SAAS;AAAA,QACT,QAAQ,YAAY,SAAS;AAAA,QAC7B,gBAAgB;AAAA,QAChB,MAAM;AAAA,QACN,UAAU,YAAY,aAAa;AAAA,QACnC,KAAK;AAAA,QACL,OAAO,YAAY,SAAS;AAAA,QAC5B;AAAA,QACA,GAAG;AAAA,MAAA;AAAA,MAGL,UAAAD,2BAAAA,IAACE,eAAAA,gBAAA,EAAe,MAAM,YAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AAGzC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAiB,EACjB,MAAa,EACb,WAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"LoadingOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAiB,EACjB,MAAa,EACb,WAAgB,EAChB,eAA0F,EAC1F,KAAK,GACN,EAAE,mBAAmB,2CAoBrB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { fairmintVars } from "../../theme/index.js";
|
|
3
3
|
import { LoadingSpinner } from "../LoadingSpinner/LoadingSpinner.js";
|
|
4
4
|
import { Box } from "../primitives/layout.js";
|
|
5
5
|
function LoadingOverlay({
|
|
6
6
|
contained = false,
|
|
7
7
|
zIndex = 1301,
|
|
8
8
|
spinnerSize = 36,
|
|
9
|
-
backgroundColor =
|
|
9
|
+
backgroundColor = `color-mix(in srgb, ${fairmintVars.colorBrandPrimary} 20%, transparent)`,
|
|
10
10
|
style
|
|
11
11
|
}) {
|
|
12
12
|
return /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingOverlay.js","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"file":"LoadingOverlay.js","sources":["../../../src/components/LoadingOverlay/LoadingOverlay.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { fairmintVars } from \"../../theme\";\nimport { LoadingSpinner } from \"../LoadingSpinner/LoadingSpinner\";\nimport { Box } from \"../primitives/layout\";\n\nexport interface LoadingOverlayProps {\n contained?: boolean;\n zIndex?: number;\n spinnerSize?: number;\n backgroundColor?: string;\n style?: CSSProperties;\n}\n\nexport function LoadingOverlay({\n contained = false,\n zIndex = 1301,\n spinnerSize = 36,\n backgroundColor = `color-mix(in srgb, ${fairmintVars.colorBrandPrimary} 20%, transparent)`,\n style,\n}: LoadingOverlayProps) {\n return (\n <Box\n style={{\n alignItems: \"center\",\n backgroundColor,\n display: \"flex\",\n height: contained ? \"100%\" : \"100vh\",\n justifyContent: \"center\",\n left: 0,\n position: contained ? \"absolute\" : \"fixed\",\n top: 0,\n width: contained ? \"100%\" : \"100vw\",\n zIndex,\n ...style,\n }}\n >\n <LoadingSpinner size={spinnerSize} />\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;AAaO,SAAS,eAAe;AAAA,EAC7B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,cAAc;AAAA,EACd,kBAAkB,sBAAsB,aAAa,iBAAiB;AAAA,EACtE;AACF,GAAwB;AACtB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAAY;AAAA,QACZ;AAAA,QACA,SAAS;AAAA,QACT,QAAQ,YAAY,SAAS;AAAA,QAC7B,gBAAgB;AAAA,QAChB,MAAM;AAAA,QACN,UAAU,YAAY,aAAa;AAAA,QACnC,KAAK;AAAA,QACL,OAAO,YAAY,SAAS;AAAA,QAC5B;AAAA,QACA,GAAG;AAAA,MAAA;AAAA,MAGL,UAAA,oBAAC,gBAAA,EAAe,MAAM,YAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AAGzC;"}
|
|
@@ -27,7 +27,7 @@ function LoadingSpinner({ size = 32 }) {
|
|
|
27
27
|
"svg",
|
|
28
28
|
{
|
|
29
29
|
...iconProps,
|
|
30
|
-
stroke: index.
|
|
30
|
+
stroke: index.fairmintVars.colorBorderDefault,
|
|
31
31
|
style: { position: "absolute", inset: 0 },
|
|
32
32
|
"aria-hidden": "true",
|
|
33
33
|
children: paths
|
|
@@ -37,7 +37,7 @@ function LoadingSpinner({ size = 32 }) {
|
|
|
37
37
|
"svg",
|
|
38
38
|
{
|
|
39
39
|
...iconProps,
|
|
40
|
-
stroke: index.
|
|
40
|
+
stroke: index.fairmintVars.colorBrandPrimary,
|
|
41
41
|
style: { position: "absolute", inset: 0, animation: "fillUp 1.4s ease-in-out infinite" },
|
|
42
42
|
"aria-hidden": "true",
|
|
43
43
|
children: paths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.cjs","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.cjs","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"sourcesContent":["import { fairmintVars } from \"../../theme\";\nimport { Box } from \"../primitives/layout\";\n\nexport interface LoadingSpinnerProps {\n /** Icon size in pixels. @default 32 */\n size?: number;\n}\n\n/**\n * Animated certificate icon that fills from bottom to top.\n * Requires the consumer to import `@fairmint/ui/styles.css` for the keyframe animation.\n */\nexport function LoadingSpinner({ size = 32 }: LoadingSpinnerProps) {\n const iconProps = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n };\n\n const paths = (\n <>\n <path d=\"M15 15m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\" />\n <path d=\"M13 17.5v4.5l2 -1.5l2 1.5v-4.5\" />\n <path d=\"M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-1\" />\n <path d=\"M6 9h12\" />\n <path d=\"M6 12h3\" />\n <path d=\"M6 15h2\" />\n </>\n );\n\n return (\n <Box pos=\"relative\" style={{ width: size, height: size }} role=\"status\" aria-label=\"Loading\">\n <svg\n {...iconProps}\n stroke={fairmintVars.colorBorderDefault}\n style={{ position: \"absolute\", inset: 0 }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n <svg\n {...iconProps}\n stroke={fairmintVars.colorBrandPrimary}\n style={{ position: \"absolute\", inset: 0, animation: \"fillUp 1.4s ease-in-out infinite\" }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n </Box>\n );\n}\n"],"names":["jsxs","Fragment","jsx","Box","fairmintVars"],"mappings":";;;;;AAYO,SAAS,eAAe,EAAE,OAAO,MAA2B;AACjE,QAAM,YAAY;AAAA,IAChB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,eAAe;AAAA,IACf,gBAAgB;AAAA,EAAA;AAGlB,QAAM,QACJA,2BAAAA,KAAAC,WAAAA,UAAA,EACE,UAAA;AAAA,IAAAC,2BAAAA,IAAC,QAAA,EAAK,GAAE,2CAAA,CAA2C;AAAA,IACnDA,2BAAAA,IAAC,QAAA,EAAK,GAAE,iCAAA,CAAiC;AAAA,IACzCA,2BAAAA,IAAC,QAAA,EAAK,GAAE,wFAAA,CAAwF;AAAA,IAChGA,2BAAAA,IAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,IAClBA,2BAAAA,IAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,IAClBA,2BAAAA,IAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,EAAA,GACpB;AAGF,SACEF,2BAAAA,KAACG,OAAAA,KAAA,EAAI,KAAI,YAAW,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAA,GAAQ,MAAK,UAAS,cAAW,WACjF,UAAA;AAAA,IAAAD,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,QAAQE,MAAAA,aAAa;AAAA,QACrB,OAAO,EAAE,UAAU,YAAY,OAAO,EAAA;AAAA,QACtC,eAAY;AAAA,QAEX,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEHF,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,QAAQE,MAAAA,aAAa;AAAA,QACrB,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,WAAW,mCAAA;AAAA,QACpD,eAAY;AAAA,QAEX,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { fairmintVars } from "../../theme/index.js";
|
|
3
3
|
import { Box } from "../primitives/layout.js";
|
|
4
4
|
function LoadingSpinner({ size = 32 }) {
|
|
5
5
|
const iconProps = {
|
|
@@ -25,7 +25,7 @@ function LoadingSpinner({ size = 32 }) {
|
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
...iconProps,
|
|
28
|
-
stroke:
|
|
28
|
+
stroke: fairmintVars.colorBorderDefault,
|
|
29
29
|
style: { position: "absolute", inset: 0 },
|
|
30
30
|
"aria-hidden": "true",
|
|
31
31
|
children: paths
|
|
@@ -35,7 +35,7 @@ function LoadingSpinner({ size = 32 }) {
|
|
|
35
35
|
"svg",
|
|
36
36
|
{
|
|
37
37
|
...iconProps,
|
|
38
|
-
stroke:
|
|
38
|
+
stroke: fairmintVars.colorBrandPrimary,
|
|
39
39
|
style: { position: "absolute", inset: 0, animation: "fillUp 1.4s ease-in-out infinite" },
|
|
40
40
|
"aria-hidden": "true",
|
|
41
41
|
children: paths
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.js","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.js","sources":["../../../src/components/LoadingSpinner/LoadingSpinner.tsx"],"sourcesContent":["import { fairmintVars } from \"../../theme\";\nimport { Box } from \"../primitives/layout\";\n\nexport interface LoadingSpinnerProps {\n /** Icon size in pixels. @default 32 */\n size?: number;\n}\n\n/**\n * Animated certificate icon that fills from bottom to top.\n * Requires the consumer to import `@fairmint/ui/styles.css` for the keyframe animation.\n */\nexport function LoadingSpinner({ size = 32 }: LoadingSpinnerProps) {\n const iconProps = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n };\n\n const paths = (\n <>\n <path d=\"M15 15m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\" />\n <path d=\"M13 17.5v4.5l2 -1.5l2 1.5v-4.5\" />\n <path d=\"M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-1\" />\n <path d=\"M6 9h12\" />\n <path d=\"M6 12h3\" />\n <path d=\"M6 15h2\" />\n </>\n );\n\n return (\n <Box pos=\"relative\" style={{ width: size, height: size }} role=\"status\" aria-label=\"Loading\">\n <svg\n {...iconProps}\n stroke={fairmintVars.colorBorderDefault}\n style={{ position: \"absolute\", inset: 0 }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n <svg\n {...iconProps}\n stroke={fairmintVars.colorBrandPrimary}\n style={{ position: \"absolute\", inset: 0, animation: \"fillUp 1.4s ease-in-out infinite\" }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n </Box>\n );\n}\n"],"names":[],"mappings":";;;AAYO,SAAS,eAAe,EAAE,OAAO,MAA2B;AACjE,QAAM,YAAY;AAAA,IAChB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,eAAe;AAAA,IACf,gBAAgB;AAAA,EAAA;AAGlB,QAAM,QACJ,qBAAA,UAAA,EACE,UAAA;AAAA,IAAA,oBAAC,QAAA,EAAK,GAAE,2CAAA,CAA2C;AAAA,IACnD,oBAAC,QAAA,EAAK,GAAE,iCAAA,CAAiC;AAAA,IACzC,oBAAC,QAAA,EAAK,GAAE,wFAAA,CAAwF;AAAA,IAChG,oBAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,IAClB,oBAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,IAClB,oBAAC,QAAA,EAAK,GAAE,UAAA,CAAU;AAAA,EAAA,GACpB;AAGF,SACE,qBAAC,KAAA,EAAI,KAAI,YAAW,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAA,GAAQ,MAAK,UAAS,cAAW,WACjF,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,QAAQ,aAAa;AAAA,QACrB,OAAO,EAAE,UAAU,YAAY,OAAO,EAAA;AAAA,QACtC,eAAY;AAAA,QAEX,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,QAAQ,aAAa;AAAA,QACrB,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,WAAW,mCAAA;AAAA,QACpD,eAAY;AAAA,QAEX,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const TextInput = require("../../primitives/TextInput/TextInput.cjs");
|
|
6
|
+
const SIGNATURE_FONT_STACK = '"Meddon", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive';
|
|
7
|
+
const SIGNATURE_FONT_HREF = "https://fonts.googleapis.com/css2?family=Meddon&subset=latin&display=swap";
|
|
8
|
+
const SIGNATURE_FONT_MARKER = "data-signature-font";
|
|
9
|
+
const SIGNATURE_FONT_MARKER_VALUE = "meddon";
|
|
10
|
+
function useSignatureFont() {
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (typeof document === "undefined") return;
|
|
13
|
+
if (document.head.querySelector(`link[${SIGNATURE_FONT_MARKER}="${SIGNATURE_FONT_MARKER_VALUE}"]`))
|
|
14
|
+
return;
|
|
15
|
+
const link = document.createElement("link");
|
|
16
|
+
link.rel = "stylesheet";
|
|
17
|
+
link.href = SIGNATURE_FONT_HREF;
|
|
18
|
+
link.setAttribute(SIGNATURE_FONT_MARKER, SIGNATURE_FONT_MARKER_VALUE);
|
|
19
|
+
document.head.appendChild(link);
|
|
20
|
+
}, []);
|
|
21
|
+
}
|
|
22
|
+
function SignatureNameField({
|
|
23
|
+
label,
|
|
24
|
+
placeholder,
|
|
25
|
+
error,
|
|
26
|
+
scale = "md",
|
|
27
|
+
...rest
|
|
28
|
+
}) {
|
|
29
|
+
useSignatureFont();
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
TextInput.TextInput,
|
|
32
|
+
{
|
|
33
|
+
type: "text",
|
|
34
|
+
label: label ?? "Type your full legal name to sign",
|
|
35
|
+
placeholder,
|
|
36
|
+
autoComplete: "name",
|
|
37
|
+
error,
|
|
38
|
+
size: scale,
|
|
39
|
+
radius: "md",
|
|
40
|
+
styles: {
|
|
41
|
+
input: {
|
|
42
|
+
fontFamily: SIGNATURE_FONT_STACK,
|
|
43
|
+
// Meddon ships only as a single normal-weight, non-italic face —
|
|
44
|
+
// requesting bold/italic here would trigger the browser's faux
|
|
45
|
+
// bold/oblique synthesis, which distorts a connected script font.
|
|
46
|
+
fontWeight: 400,
|
|
47
|
+
fontStyle: "normal",
|
|
48
|
+
letterSpacing: "-0.01em"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
...rest
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
exports.SignatureNameField = SignatureNameField;
|
|
56
|
+
//# sourceMappingURL=SignatureNameField.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureNameField.cjs","sources":["../../../../src/components/form/SignatureNameField/SignatureNameField.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport type { TextInputProps } from \"../../primitives/TextInput/TextInput\";\nimport { TextInput } from \"../../primitives/TextInput/TextInput\";\n\nconst SIGNATURE_FONT_STACK =\n '\"Meddon\", \"Snell Roundhand\", \"Apple Chancery\", \"Brush Script MT\", cursive';\nconst SIGNATURE_FONT_HREF =\n \"https://fonts.googleapis.com/css2?family=Meddon&subset=latin&display=swap\";\n\n/**\n * Marker attribute used for de-duplication instead of a `link[href=\"<url>\"]`\n * selector — CSS attribute selectors are unreliable across jsdom/happy-dom\n * when the URL contains `:`, `;`, `@`, `&`, `+`.\n */\nconst SIGNATURE_FONT_MARKER = \"data-signature-font\";\nconst SIGNATURE_FONT_MARKER_VALUE = \"meddon\";\n\n/**\n * Lazily injects the Meddon stylesheet on mount instead of loading it\n * globally — it's only used by signature surfaces, not every route. Never\n * removed on unmount: the browser caches it, and removing the link would\n * force a re-fetch on remount.\n */\nfunction useSignatureFont(): void {\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n if (\n document.head.querySelector(`link[${SIGNATURE_FONT_MARKER}=\"${SIGNATURE_FONT_MARKER_VALUE}\"]`)\n )\n return;\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = SIGNATURE_FONT_HREF;\n link.setAttribute(SIGNATURE_FONT_MARKER, SIGNATURE_FONT_MARKER_VALUE);\n document.head.appendChild(link);\n }, []);\n}\n\nexport interface SignatureNameFieldProps extends Omit<TextInputProps, \"type\" | \"size\"> {\n error?: string;\n /**\n * Maps directly to `TextInput`'s own `size` prop, so the field renders at\n * exactly the same height/font-size as any other field of that size — the\n * signature look comes from the typeface, not from an oversized box.\n */\n scale?: \"lg\" | \"md\";\n}\n\n/**\n * Typed-name e-signature input: a `TextInput` styled in a handwriting face so\n * the field reads as \"this is a signature,\" not a form field, while matching\n * the size/proportions of every other field on the page. Consumers own the\n * surrounding attestation copy, validation, and submit/commit action.\n */\nexport function SignatureNameField({\n label,\n placeholder,\n error,\n scale = \"md\",\n ...rest\n}: SignatureNameFieldProps) {\n useSignatureFont();\n return (\n <TextInput\n type=\"text\"\n label={label ?? \"Type your full legal name to sign\"}\n placeholder={placeholder}\n autoComplete=\"name\"\n error={error}\n size={scale}\n radius=\"md\"\n styles={{\n input: {\n fontFamily: SIGNATURE_FONT_STACK,\n // Meddon ships only as a single normal-weight, non-italic face —\n // requesting bold/italic here would trigger the browser's faux\n // bold/oblique synthesis, which distorts a connected script font.\n fontWeight: 400,\n fontStyle: \"normal\",\n letterSpacing: \"-0.01em\",\n },\n }}\n {...rest}\n />\n );\n}\n"],"names":["useEffect","jsx","TextInput"],"mappings":";;;;;AAIA,MAAM,uBACJ;AACF,MAAM,sBACJ;AAOF,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAQpC,SAAS,mBAAyB;AAChCA,QAAAA,UAAU,MAAM;AACd,QAAI,OAAO,aAAa,YAAa;AACrC,QACE,SAAS,KAAK,cAAc,QAAQ,qBAAqB,KAAK,2BAA2B,IAAI;AAE7F;AACF,UAAM,OAAO,SAAS,cAAc,MAAM;AAC1C,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,aAAa,uBAAuB,2BAA2B;AACpE,aAAS,KAAK,YAAY,IAAI;AAAA,EAChC,GAAG,CAAA,CAAE;AACP;AAkBO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAA4B;AAC1B,mBAAA;AACA,SACEC,2BAAAA;AAAAA,IAACC,UAAAA;AAAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO,SAAS;AAAA,MAChB;AAAA,MACA,cAAa;AAAA,MACb;AAAA,MACA,MAAM;AAAA,MACN,QAAO;AAAA,MACP,QAAQ;AAAA,QACN,OAAO;AAAA,UACL,YAAY;AAAA;AAAA;AAAA;AAAA,UAIZ,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TextInputProps } from '../../primitives/TextInput/TextInput';
|
|
2
|
+
export interface SignatureNameFieldProps extends Omit<TextInputProps, "type" | "size"> {
|
|
3
|
+
error?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Maps directly to `TextInput`'s own `size` prop, so the field renders at
|
|
6
|
+
* exactly the same height/font-size as any other field of that size — the
|
|
7
|
+
* signature look comes from the typeface, not from an oversized box.
|
|
8
|
+
*/
|
|
9
|
+
scale?: "lg" | "md";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Typed-name e-signature input: a `TextInput` styled in a handwriting face so
|
|
13
|
+
* the field reads as "this is a signature," not a form field, while matching
|
|
14
|
+
* the size/proportions of every other field on the page. Consumers own the
|
|
15
|
+
* surrounding attestation copy, validation, and submit/commit action.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SignatureNameField({ label, placeholder, error, scale, ...rest }: SignatureNameFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=SignatureNameField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureNameField.d.ts","sourceRoot":"","sources":["../../../../src/components/form/SignatureNameField/SignatureNameField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAqC3E,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,WAAW,EACX,KAAK,EACL,KAAY,EACZ,GAAG,IAAI,EACR,EAAE,uBAAuB,2CAyBzB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { TextInput } from "../../primitives/TextInput/TextInput.js";
|
|
4
|
+
const SIGNATURE_FONT_STACK = '"Meddon", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive';
|
|
5
|
+
const SIGNATURE_FONT_HREF = "https://fonts.googleapis.com/css2?family=Meddon&subset=latin&display=swap";
|
|
6
|
+
const SIGNATURE_FONT_MARKER = "data-signature-font";
|
|
7
|
+
const SIGNATURE_FONT_MARKER_VALUE = "meddon";
|
|
8
|
+
function useSignatureFont() {
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (typeof document === "undefined") return;
|
|
11
|
+
if (document.head.querySelector(`link[${SIGNATURE_FONT_MARKER}="${SIGNATURE_FONT_MARKER_VALUE}"]`))
|
|
12
|
+
return;
|
|
13
|
+
const link = document.createElement("link");
|
|
14
|
+
link.rel = "stylesheet";
|
|
15
|
+
link.href = SIGNATURE_FONT_HREF;
|
|
16
|
+
link.setAttribute(SIGNATURE_FONT_MARKER, SIGNATURE_FONT_MARKER_VALUE);
|
|
17
|
+
document.head.appendChild(link);
|
|
18
|
+
}, []);
|
|
19
|
+
}
|
|
20
|
+
function SignatureNameField({
|
|
21
|
+
label,
|
|
22
|
+
placeholder,
|
|
23
|
+
error,
|
|
24
|
+
scale = "md",
|
|
25
|
+
...rest
|
|
26
|
+
}) {
|
|
27
|
+
useSignatureFont();
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
TextInput,
|
|
30
|
+
{
|
|
31
|
+
type: "text",
|
|
32
|
+
label: label ?? "Type your full legal name to sign",
|
|
33
|
+
placeholder,
|
|
34
|
+
autoComplete: "name",
|
|
35
|
+
error,
|
|
36
|
+
size: scale,
|
|
37
|
+
radius: "md",
|
|
38
|
+
styles: {
|
|
39
|
+
input: {
|
|
40
|
+
fontFamily: SIGNATURE_FONT_STACK,
|
|
41
|
+
// Meddon ships only as a single normal-weight, non-italic face —
|
|
42
|
+
// requesting bold/italic here would trigger the browser's faux
|
|
43
|
+
// bold/oblique synthesis, which distorts a connected script font.
|
|
44
|
+
fontWeight: 400,
|
|
45
|
+
fontStyle: "normal",
|
|
46
|
+
letterSpacing: "-0.01em"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
...rest
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
SignatureNameField
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=SignatureNameField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignatureNameField.js","sources":["../../../../src/components/form/SignatureNameField/SignatureNameField.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport type { TextInputProps } from \"../../primitives/TextInput/TextInput\";\nimport { TextInput } from \"../../primitives/TextInput/TextInput\";\n\nconst SIGNATURE_FONT_STACK =\n '\"Meddon\", \"Snell Roundhand\", \"Apple Chancery\", \"Brush Script MT\", cursive';\nconst SIGNATURE_FONT_HREF =\n \"https://fonts.googleapis.com/css2?family=Meddon&subset=latin&display=swap\";\n\n/**\n * Marker attribute used for de-duplication instead of a `link[href=\"<url>\"]`\n * selector — CSS attribute selectors are unreliable across jsdom/happy-dom\n * when the URL contains `:`, `;`, `@`, `&`, `+`.\n */\nconst SIGNATURE_FONT_MARKER = \"data-signature-font\";\nconst SIGNATURE_FONT_MARKER_VALUE = \"meddon\";\n\n/**\n * Lazily injects the Meddon stylesheet on mount instead of loading it\n * globally — it's only used by signature surfaces, not every route. Never\n * removed on unmount: the browser caches it, and removing the link would\n * force a re-fetch on remount.\n */\nfunction useSignatureFont(): void {\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n if (\n document.head.querySelector(`link[${SIGNATURE_FONT_MARKER}=\"${SIGNATURE_FONT_MARKER_VALUE}\"]`)\n )\n return;\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = SIGNATURE_FONT_HREF;\n link.setAttribute(SIGNATURE_FONT_MARKER, SIGNATURE_FONT_MARKER_VALUE);\n document.head.appendChild(link);\n }, []);\n}\n\nexport interface SignatureNameFieldProps extends Omit<TextInputProps, \"type\" | \"size\"> {\n error?: string;\n /**\n * Maps directly to `TextInput`'s own `size` prop, so the field renders at\n * exactly the same height/font-size as any other field of that size — the\n * signature look comes from the typeface, not from an oversized box.\n */\n scale?: \"lg\" | \"md\";\n}\n\n/**\n * Typed-name e-signature input: a `TextInput` styled in a handwriting face so\n * the field reads as \"this is a signature,\" not a form field, while matching\n * the size/proportions of every other field on the page. Consumers own the\n * surrounding attestation copy, validation, and submit/commit action.\n */\nexport function SignatureNameField({\n label,\n placeholder,\n error,\n scale = \"md\",\n ...rest\n}: SignatureNameFieldProps) {\n useSignatureFont();\n return (\n <TextInput\n type=\"text\"\n label={label ?? \"Type your full legal name to sign\"}\n placeholder={placeholder}\n autoComplete=\"name\"\n error={error}\n size={scale}\n radius=\"md\"\n styles={{\n input: {\n fontFamily: SIGNATURE_FONT_STACK,\n // Meddon ships only as a single normal-weight, non-italic face —\n // requesting bold/italic here would trigger the browser's faux\n // bold/oblique synthesis, which distorts a connected script font.\n fontWeight: 400,\n fontStyle: \"normal\",\n letterSpacing: \"-0.01em\",\n },\n }}\n {...rest}\n />\n );\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,uBACJ;AACF,MAAM,sBACJ;AAOF,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAQpC,SAAS,mBAAyB;AAChC,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,YAAa;AACrC,QACE,SAAS,KAAK,cAAc,QAAQ,qBAAqB,KAAK,2BAA2B,IAAI;AAE7F;AACF,UAAM,OAAO,SAAS,cAAc,MAAM;AAC1C,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,aAAa,uBAAuB,2BAA2B;AACpE,aAAS,KAAK,YAAY,IAAI;AAAA,EAChC,GAAG,CAAA,CAAE;AACP;AAkBO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAA4B;AAC1B,mBAAA;AACA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO,SAAS;AAAA,MAChB;AAAA,MACA,cAAa;AAAA,MACb;AAAA,MACA,MAAM;AAAA,MACN,QAAO;AAAA,MACP,QAAQ;AAAA,QACN,OAAO;AAAA,UACL,YAAY;AAAA;AAAA;AAAA;AAAA,UAIZ,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,eAAe;AAAA,QAAA;AAAA,MACjB;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -19,6 +19,38 @@ const TONE_COLORS = {
|
|
|
19
19
|
warning: colors.colors.warning,
|
|
20
20
|
error: colors.colors.error
|
|
21
21
|
};
|
|
22
|
+
const TONE_TOKENS = {
|
|
23
|
+
brand: {
|
|
24
|
+
background: index.fairmintVars.colorBgBrandSubtle,
|
|
25
|
+
border: index.fairmintVars.colorBorderFocus,
|
|
26
|
+
icon: index.fairmintVars.colorBrandPrimary
|
|
27
|
+
},
|
|
28
|
+
neutral: {
|
|
29
|
+
background: index.fairmintVars.colorBgSurfaceSecondary,
|
|
30
|
+
border: index.fairmintVars.colorBorderDefault,
|
|
31
|
+
icon: index.fairmintVars.colorIconSecondary
|
|
32
|
+
},
|
|
33
|
+
info: {
|
|
34
|
+
background: index.fairmintVars.colorInfoBg,
|
|
35
|
+
border: index.fairmintVars.colorInfoBorder,
|
|
36
|
+
icon: index.fairmintVars.colorInfoText
|
|
37
|
+
},
|
|
38
|
+
success: {
|
|
39
|
+
background: index.fairmintVars.colorSuccessBg,
|
|
40
|
+
border: index.fairmintVars.colorSuccessBorder,
|
|
41
|
+
icon: index.fairmintVars.colorSuccessText
|
|
42
|
+
},
|
|
43
|
+
warning: {
|
|
44
|
+
background: index.fairmintVars.colorWarningBg,
|
|
45
|
+
border: index.fairmintVars.colorWarningBorder,
|
|
46
|
+
icon: index.fairmintVars.colorWarningText
|
|
47
|
+
},
|
|
48
|
+
error: {
|
|
49
|
+
background: index.fairmintVars.colorErrorBg,
|
|
50
|
+
border: index.fairmintVars.colorErrorBorder,
|
|
51
|
+
icon: index.fairmintVars.colorErrorText
|
|
52
|
+
}
|
|
53
|
+
};
|
|
22
54
|
const DefaultStatusIcon = ({ tone }) => {
|
|
23
55
|
const commonProps = {
|
|
24
56
|
width: 20,
|
|
@@ -62,25 +94,24 @@ const DefaultStatusIcon = ({ tone }) => {
|
|
|
62
94
|
] });
|
|
63
95
|
};
|
|
64
96
|
const surfaceProps = (tone, presentation) => {
|
|
65
|
-
const
|
|
97
|
+
const tokens = TONE_TOKENS[tone];
|
|
66
98
|
if (presentation === "page-level") {
|
|
67
99
|
return {
|
|
68
|
-
bg: `${color}.1`,
|
|
69
100
|
style: {
|
|
101
|
+
backgroundColor: tokens.background,
|
|
70
102
|
borderRadius: 0
|
|
71
103
|
}
|
|
72
104
|
};
|
|
73
105
|
}
|
|
74
|
-
const borderShade = tone === "brand" ? 1 : tone === "neutral" ? 3 : 2;
|
|
75
106
|
return {
|
|
76
|
-
bg: `${color}.0`,
|
|
77
|
-
bd: `1px solid ${color}.${borderShade}`,
|
|
78
107
|
style: {
|
|
108
|
+
backgroundColor: tokens.background,
|
|
109
|
+
border: `1px solid ${tokens.border}`,
|
|
79
110
|
borderRadius: index.radii.lg
|
|
80
111
|
}
|
|
81
112
|
};
|
|
82
113
|
};
|
|
83
|
-
const titleColor = () => index.
|
|
114
|
+
const titleColor = () => index.fairmintVars.colorTextPrimary;
|
|
84
115
|
const actionVariant = (tone, isSecondary) => {
|
|
85
116
|
if (isSecondary) return "outline";
|
|
86
117
|
if (tone === "brand") return "light";
|
|
@@ -139,7 +170,7 @@ const getBannerLayout = ({
|
|
|
139
170
|
};
|
|
140
171
|
const descriptionTextProps = {
|
|
141
172
|
size: "sm",
|
|
142
|
-
c: index.
|
|
173
|
+
c: index.fairmintVars.colorTextSecondary,
|
|
143
174
|
style: { lineHeight: 1.4 }
|
|
144
175
|
};
|
|
145
176
|
function BannerDescription({ children }) {
|
|
@@ -149,7 +180,7 @@ function BannerDescription({ children }) {
|
|
|
149
180
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
181
|
layout.Box,
|
|
151
182
|
{
|
|
152
|
-
c: index.
|
|
183
|
+
c: index.fairmintVars.colorTextSecondary,
|
|
153
184
|
style: {
|
|
154
185
|
fontSize: fontSizes.fontSizes.sm,
|
|
155
186
|
lineHeight: 1.4
|
|
@@ -173,6 +204,7 @@ function Banner({
|
|
|
173
204
|
tone = "brand"
|
|
174
205
|
}) {
|
|
175
206
|
const color = TONE_COLORS[tone];
|
|
207
|
+
const tokens = TONE_TOKENS[tone];
|
|
176
208
|
const iconNode = icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(DefaultStatusIcon, { tone }) : icon;
|
|
177
209
|
const resolvedActions = actions ?? (action === void 0 ? [] : [action]);
|
|
178
210
|
const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
|
|
@@ -194,8 +226,6 @@ function Banner({
|
|
|
194
226
|
role: resolvedRole,
|
|
195
227
|
px: "md",
|
|
196
228
|
py: "md",
|
|
197
|
-
bg: surface.bg,
|
|
198
|
-
bd: "bd" in surface ? surface.bd : void 0,
|
|
199
229
|
style: {
|
|
200
230
|
boxSizing: "border-box",
|
|
201
231
|
width: "100%",
|
|
@@ -217,7 +247,12 @@ function Banner({
|
|
|
217
247
|
radius: "sm",
|
|
218
248
|
size: 40,
|
|
219
249
|
variant: "light",
|
|
220
|
-
style: {
|
|
250
|
+
style: {
|
|
251
|
+
backgroundColor: tokens.background,
|
|
252
|
+
color: tokens.icon,
|
|
253
|
+
gridArea: "icon",
|
|
254
|
+
alignSelf: "center"
|
|
255
|
+
},
|
|
221
256
|
children: iconNode
|
|
222
257
|
}
|
|
223
258
|
),
|