@stackframe/stack 2.1.1 → 2.1.2

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 (44) hide show
  1. package/dist/components/card-frame.js +1 -1
  2. package/dist/components/centered-card-header.d.ts +6 -0
  3. package/dist/components/centered-card-header.d.ts.map +1 -0
  4. package/dist/components/centered-card-header.js +5 -0
  5. package/dist/components/divider-with-text.js +1 -1
  6. package/dist/components/oauth-button.js +2 -2
  7. package/dist/components/password-reset-inner.d.ts.map +1 -1
  8. package/dist/components/password-reset-inner.js +1 -2
  9. package/dist/components-core/button.js +3 -3
  10. package/dist/components-core/card.d.ts +5 -0
  11. package/dist/components-core/card.d.ts.map +1 -0
  12. package/dist/components-core/card.js +18 -0
  13. package/dist/components-core/divider.d.ts +4 -5
  14. package/dist/components-core/divider.d.ts.map +1 -1
  15. package/dist/components-core/divider.js +15 -12
  16. package/dist/components-core/index.d.ts +4 -2
  17. package/dist/components-core/index.d.ts.map +1 -1
  18. package/dist/components-core/index.js +4 -0
  19. package/dist/components-core/label.d.ts +1 -1
  20. package/dist/components-core/label.d.ts.map +1 -1
  21. package/dist/components-core/label.js +1 -1
  22. package/dist/components-core-joy/card.d.ts +3 -0
  23. package/dist/components-core-joy/card.d.ts.map +1 -0
  24. package/dist/components-core-joy/card.js +7 -0
  25. package/dist/components-core-joy/divider.js +2 -2
  26. package/dist/components-page/forgot-password.d.ts.map +1 -1
  27. package/dist/components-page/forgot-password.js +1 -2
  28. package/dist/components-page/sign-in.d.ts.map +1 -1
  29. package/dist/components-page/sign-in.js +1 -2
  30. package/dist/components-page/sign-up.d.ts.map +1 -1
  31. package/dist/components-page/sign-up.js +1 -2
  32. package/dist/providers/component-provider.d.ts +2 -0
  33. package/dist/providers/component-provider.d.ts.map +1 -1
  34. package/dist/providers/component-provider.js +2 -0
  35. package/dist/providers/design-provider.d.ts +1 -2
  36. package/dist/providers/design-provider.d.ts.map +1 -1
  37. package/dist/providers/design-provider.js +2 -2
  38. package/dist/providers/joy-provider.d.ts +2 -0
  39. package/dist/providers/joy-provider.d.ts.map +1 -1
  40. package/dist/providers/joy-provider.js +5 -3
  41. package/dist/utils/constants.d.ts +2 -4
  42. package/dist/utils/constants.d.ts.map +1 -1
  43. package/dist/utils/constants.js +2 -4
  44. package/package.json +1 -1
@@ -16,7 +16,7 @@ export default function CardFrame({ children, fullPage = true }) {
16
16
  display: 'flex',
17
17
  alignItems: 'center',
18
18
  justifyContent: 'center'
19
- }, children: _jsx(Container, { size: 360, children: children }) }));
19
+ }, children: _jsx(Container, { size: 350, children: children }) }));
20
20
  }
21
21
  else {
22
22
  return children;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export default function CenteredCardHeader({ children, title }: {
3
+ children?: React.ReactNode;
4
+ title: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=centered-card-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"centered-card-header.d.ts","sourceRoot":"","sources":["../../src/components/centered-card-header.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,EAAE,QAAQ,EAAE,KAAK,EAAE,EACnB;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,2CAQ9C"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CardHeader, Text } from "../components-core";
3
+ export default function CenteredCardHeader({ children, title }) {
4
+ return (_jsxs(CardHeader, { style: { textAlign: 'center' }, children: [_jsx(Text, { size: "xl", as: 'h2', style: { marginBottom: '5px' }, children: title }), children] }));
5
+ }
@@ -2,5 +2,5 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Divider, Text } from "../components-core";
4
4
  export default function DividerWithText({ text }) {
5
- return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: '16px', marginBottom: '16px' }, children: [_jsx("div", { style: { flex: 1 }, children: _jsx(Divider, {}) }), _jsx(Text, { style: { padding: '0 16px' }, variant: "secondary", children: text }), _jsx("div", { style: { flex: 1 }, children: _jsx(Divider, {}) })] }));
5
+ return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop: '16px', marginBottom: '16px' }, children: [_jsx("div", { style: { flex: 1 }, children: _jsx(Divider, {}) }), _jsx(Text, { style: { padding: '0 16px' }, variant: "secondary", size: 'sm', children: text }), _jsx("div", { style: { flex: 1 }, children: _jsx(Divider, {}) })] }));
6
6
  }
@@ -16,7 +16,7 @@ export default function OAuthButton({ provider, type, }) {
16
16
  style = {
17
17
  backgroundColor: '#fff',
18
18
  name: 'Google',
19
- border: Color(colors.primaryBgColor).isDark() ? undefined : '1px solid #ccc',
19
+ border: Color(colors.backgroundColor).isDark() ? undefined : '1px solid #ccc',
20
20
  icon: (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: iconSize, height: iconSize, viewBox: "0 0 24 24", children: [_jsx("path", { fill: "#4285F4", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), _jsx("path", { fill: "#34A853", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), _jsx("path", { fill: "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), _jsx("path", { fill: "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }), _jsx("path", { fill: "none", d: "M1 1h22v22H1z" })] })),
21
21
  };
22
22
  break;
@@ -24,7 +24,7 @@ export default function OAuthButton({ provider, type, }) {
24
24
  case 'github': {
25
25
  style = {
26
26
  backgroundColor: '#111',
27
- border: Color(colors.primaryBgColor).isDark() ? '1px solid #666' : undefined,
27
+ border: Color(colors.backgroundColor).isDark() ? '1px solid #444' : undefined,
28
28
  name: 'GitHub',
29
29
  icon: (_jsx(FaGithub, { color: "#fff", size: iconSize })),
30
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"password-reset-inner.d.ts","sourceRoot":"","sources":["../../src/components/password-reset-inner.tsx"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,EAAE,IAAI,EAAE,QAAgB,EAAE,EAC1B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CAyFrC"}
1
+ {"version":3,"file":"password-reset-inner.d.ts","sourceRoot":"","sources":["../../src/components/password-reset-inner.tsx"],"names":[],"mappings":"AAcA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,EAAE,IAAI,EAAE,QAAgB,EAAE,EAC1B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA4FrC"}
@@ -8,7 +8,6 @@ import FormWarningText from "./form-warning";
8
8
  import RedirectMessageCard from "./redirect-message-card";
9
9
  import MessageCard from "./message-card";
10
10
  import CardFrame from "./card-frame";
11
- import CardHeader from "./card-header";
12
11
  import { Button, Label, Text } from "../components-core";
13
12
  import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises";
14
13
  export default function PasswordResetInner({ code, fullPage = false }) {
@@ -51,7 +50,7 @@ export default function PasswordResetInner({ code, fullPage = false }) {
51
50
  if (resetError) {
52
51
  return (_jsx(MessageCard, { title: "Failed to reset password", fullPage: fullPage, children: _jsx(Text, { children: "Failed to reset password. Please request a new password reset link" }) }));
53
52
  }
54
- return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsx(CardHeader, { title: "Reset Your Password" }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'stretch' }, children: [_jsx(Label, { htmlFor: "password", children: "New Password" }), _jsx(PasswordField, { id: "password", name: "password", value: password, onChange: (e) => {
53
+ return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsx("div", { style: { textAlign: 'center', marginBottom: '1.5rem' }, children: _jsx(Text, { size: "xl", as: 'h2', children: "Reset Your Password" }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'stretch' }, children: [_jsx(Label, { htmlFor: "password", children: "New Password" }), _jsx(PasswordField, { id: "password", name: "password", value: password, onChange: (e) => {
55
54
  setPassword(e.target.value);
56
55
  setPasswordError('');
57
56
  setPasswordRepeatError('');
@@ -5,9 +5,9 @@ import { useDesign } from "../providers/design-provider";
5
5
  import Color from 'color';
6
6
  import styled from 'styled-components';
7
7
  import { BORDER_RADIUS, FONT_FAMILY, FONT_SIZES } from "../utils/constants";
8
- function getColors(color, primaryBgColor) {
8
+ function getColors(color, backgroundColor) {
9
9
  const c = Color(color);
10
- const pc = Color(primaryBgColor);
10
+ const pc = Color(backgroundColor);
11
11
  const changeColor = (value) => {
12
12
  return c.hsl(c.hue(), c.saturationl(), c.lightness() + value).toString();
13
13
  };
@@ -108,7 +108,7 @@ const Button = React.forwardRef(({ variant = 'primary', size = 'md', loading = f
108
108
  if (props.color) {
109
109
  bgColor = props.color;
110
110
  }
111
- const buttonColors = getColors(bgColor, colors.primaryBgColor);
111
+ const buttonColors = getColors(bgColor, colors.backgroundColor);
112
112
  return (_jsx(StyledButton, { ref: ref, "$size": size, "$bgColor": buttonColors.bgColor, "$hoverBgColor": buttonColors.hoverBgColor, "$activeBgColor": buttonColors.activeBgColor, "$textColor": buttonColors.textColor, disabled: disabled || loading, ...props, children: props.children }));
113
113
  });
114
114
  Button.displayName = 'Button';
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export type CardProps = React.HTMLProps<HTMLDivElement>;
3
+ declare const Card: React.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export default Card;
5
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components-core/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAExD,QAAA,MAAM,IAAI,+FAUT,CAAC;AAGF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { useDesign } from "../providers/design-provider";
5
+ import styled from 'styled-components';
6
+ const StyledCard = styled.div `
7
+ border-radius: 0.75rem;
8
+ border: 1px solid ${props => props.borderColor};
9
+ background-color: ${props => props.backgroundColor};
10
+ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
11
+ padding: 1.5rem;
12
+ `;
13
+ const Card = React.forwardRef((props, ref) => {
14
+ const { colors, colorMode } = useDesign();
15
+ return _jsx(StyledCard, { ref: ref, ...props, backgroundColor: colors.backgroundColor, borderColor: colors.neutralColor });
16
+ });
17
+ Card.displayName = "Card";
18
+ export default Card;
@@ -1,7 +1,6 @@
1
- import React from "react";
2
- export type DividerProps = {
3
- direction?: 'horizontal' | 'vertical';
4
- } & React.HTMLProps<HTMLHRElement>;
5
- declare const Divider: React.ForwardRefExoticComponent<Omit<DividerProps, "ref"> & React.RefAttributes<HTMLHRElement>>;
1
+ import React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ export type DividerProps = React.ComponentProps<typeof SeparatorPrimitive.Root>;
4
+ declare const Divider: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
5
  export default Divider;
7
6
  //# sourceMappingURL=divider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../src/components-core/divider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,YAAY,GAAG;IAAE,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAErG,QAAA,MAAM,OAAO,iGAcZ,CAAC;AAGF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../src/components-core/divider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAehF,QAAA,MAAM,OAAO,6JAaX,CAAC;AAIH,eAAe,OAAO,CAAC"}
@@ -1,17 +1,20 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
4
- import { useDesign } from "../providers/design-provider";
5
- const Divider = React.forwardRef(({ direction = 'horizontal' }, ref) => {
3
+ import React from 'react';
4
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
5
+ import styled from 'styled-components';
6
+ import { useDesign } from '..';
7
+ const StyledDivider = styled(SeparatorPrimitive.Root) `
8
+ flex-shrink: 0;
9
+ background-color: ${props => props.$color};
10
+
11
+ ${(props) => props.$orientation === 'horizontal'
12
+ ? 'height: 1px; width: 100%;'
13
+ : 'height: 100%; width: 1px;'}
14
+ `;
15
+ const Divider = React.forwardRef(({ orientation = 'horizontal', decorative = true, ...props }, ref) => {
6
16
  const { colors } = useDesign();
7
- return _jsx("hr", { ref: ref, style: {
8
- width: direction === 'horizontal' ? undefined : '1px',
9
- height: direction === 'horizontal' ? '1px' : undefined,
10
- border: 'none',
11
- backgroundColor: colors.neutralColor,
12
- margin: 0,
13
- padding: 0,
14
- } });
17
+ return _jsx(StyledDivider, { ref: ref, decorative: decorative, "$orientation": orientation, "$color": colors.neutralColor, ...props });
15
18
  });
16
- Divider.displayName = 'Divider';
19
+ Divider.displayName = 'Separator';
17
20
  export default Divider;
@@ -6,12 +6,14 @@ import { InputProps } from './input';
6
6
  import { LabelProps } from './label';
7
7
  import { LinkProps } from './link';
8
8
  import { TextProps } from './text';
9
- export { ButtonProps, ContainerProps, DividerProps, InputProps, LabelProps, LinkProps, TextProps, };
9
+ import { CardProps } from './card';
10
+ export { ButtonProps, ContainerProps, DividerProps, InputProps, LabelProps, LinkProps, TextProps, CardProps, };
10
11
  export declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
12
  export declare const Container: import("react").ForwardRefExoticComponent<Omit<ContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
- export declare const Divider: import("react").ForwardRefExoticComponent<Omit<DividerProps, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
13
+ export declare const Divider: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
13
14
  export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
14
15
  export declare const Label: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-label").LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
15
16
  export declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
16
17
  export declare const Text: import("react").ForwardRefExoticComponent<Omit<TextProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
18
+ export declare const Card: import("react").ForwardRefExoticComponent<Omit<CardProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components-core/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EACL,WAAW,EACX,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,GACV,CAAC;AAEF,eAAO,MAAM,MAAM,wHAGjB,CAAC;AAEH,eAAO,MAAM,SAAS,wHAGpB,CAAC;AAEH,eAAO,MAAM,OAAO,qHAGlB,CAAC;AAEH,eAAO,MAAM,KAAK,sHAGhB,CAAC;AAEH,eAAO,MAAM,KAAK,wMAGhB,CAAC;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAGpC;AAED,eAAO,MAAM,IAAI,yHAGf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components-core/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EACL,WAAW,EACX,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,GACV,CAAC;AAEF,eAAO,MAAM,MAAM,wHAGjB,CAAC;AAEH,eAAO,MAAM,SAAS,wHAGpB,CAAC;AAEH,eAAO,MAAM,OAAO,2MAGlB,CAAC;AAEH,eAAO,MAAM,KAAK,sHAGhB,CAAC;AAEH,eAAO,MAAM,KAAK,wMAGhB,CAAC;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAGpC;AAED,eAAO,MAAM,IAAI,yHAGf,CAAC;AAEH,eAAO,MAAM,IAAI,mHAGf,CAAC"}
@@ -30,3 +30,7 @@ export const Text = forwardRef((props, ref) => {
30
30
  const { Text } = useComponents();
31
31
  return _jsx(Text, { ...props, ref: ref });
32
32
  });
33
+ export const Card = forwardRef((props, ref) => {
34
+ const { Card } = useComponents();
35
+ return _jsx(Card, { ...props, ref: ref });
36
+ });
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import * as LabelPrimitive from "@radix-ui/react-label";
3
3
  export type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>;
4
4
  declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components-core/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAexD,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAE1E,QAAA,MAAM,KAAK,yJAYV,CAAC;AAGF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components-core/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAexD,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAE1E,QAAA,MAAM,KAAK,yJAYV,CAAC;AAGF,eAAe,KAAK,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
3
+ import React from "react";
4
4
  import * as LabelPrimitive from "@radix-ui/react-label";
5
5
  import styled from 'styled-components';
6
6
  import { FONT_FAMILY, FONT_SIZES, SECONDARY_FONT_COLORS } from "../utils/constants";
@@ -0,0 +1,3 @@
1
+ import { CardProps } from "../components-core";
2
+ export declare function Card(props: CardProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components-core-joy/card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,wBAAgB,IAAI,CAAC,KAAK,EAAG,SAAS,2CAOrC"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Card as JoyCard, CardContent as JoyCardContent } from '@mui/joy';
4
+ export function Card(props) {
5
+ const { color, size, ref, ...validProps } = props;
6
+ return _jsx(JoyCard, { ...validProps, children: _jsx(JoyCardContent, { children: props.children }) });
7
+ }
@@ -2,6 +2,6 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Divider as JoyDivider } from '@mui/joy';
4
4
  export default function Divider(props) {
5
- const { direction, ref, ...validProps } = props;
6
- return _jsx(JoyDivider, { ...validProps, orientation: direction });
5
+ const { orientation, ref, ...validProps } = props;
6
+ return _jsx(JoyDivider, { ...validProps, orientation: orientation });
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../src/components-page/forgot-password.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA0BhF"}
1
+ {"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../src/components-page/forgot-password.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA2BhF"}
@@ -2,7 +2,6 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import ForgotPasswordElement from "../components/forgot-password";
4
4
  import CardFrame from "../components/card-frame";
5
- import CardHeader from "../components/card-header";
6
5
  import { useUser, useStackApp } from "..";
7
6
  import RedirectMessageCard from "../components/redirect-message-card";
8
7
  import { useState } from "react";
@@ -17,6 +16,6 @@ export default function ForgotPassword({ fullPage = false }) {
17
16
  if (sent) {
18
17
  return _jsx(RedirectMessageCard, { type: 'emailSent', fullPage: fullPage });
19
18
  }
20
- return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsx(CardHeader, { title: "Reset Your Password", children: _jsxs(Text, { children: ["Don't need to reset? ", _jsx(Link, { href: stackApp.urls['signUp'], children: "Sign In" })] }) }), _jsx(ForgotPasswordElement, { onSent: () => setSent(true) })] }));
19
+ return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsxs("div", { style: { textAlign: 'center', marginBottom: '1.5rem' }, children: [_jsx(Text, { size: "xl", as: 'h2', children: "Reset Your Password" }), _jsxs(Text, { children: ["Don't need to reset? ", _jsx(Link, { href: stackApp.urls['signUp'], children: "Sign In" })] })] }), _jsx(ForgotPasswordElement, { onSent: () => setSent(true) })] }));
21
20
  }
22
21
  ;
@@ -1 +1 @@
1
- {"version":3,"file":"sign-in.d.ts","sourceRoot":"","sources":["../../src/components-page/sign-in.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA0BxE"}
1
+ {"version":3,"file":"sign-in.d.ts","sourceRoot":"","sources":["../../src/components-page/sign-in.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA2BxE"}
@@ -4,7 +4,6 @@ import CredentialSignIn from '../components/credential-sign-in';
4
4
  import DividerWithText from '../components/divider-with-text';
5
5
  import OAuthGroup from '../components/oauth-group';
6
6
  import CardFrame from '../components/card-frame';
7
- import CardHeader from '../components/card-header';
8
7
  import { useUser, useStackApp } from '..';
9
8
  import RedirectMessageCard from '../components/redirect-message-card';
10
9
  import { Link, Text } from "../components-core";
@@ -16,5 +15,5 @@ export default function SignIn({ fullPage = false }) {
16
15
  return _jsx(RedirectMessageCard, { type: 'signedIn', fullPage: fullPage });
17
16
  }
18
17
  const enableDivider = project.credentialEnabled && project.oauthProviders.filter(p => p.enabled).length > 0;
19
- return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsx(CardHeader, { title: "Sign In to Your Account", children: _jsxs(Text, { children: ["Don't have an account? ", _jsx(Link, { href: stackApp.urls['signUp'], children: "Sign up" })] }) }), _jsx(OAuthGroup, { type: 'signin' }), enableDivider && _jsx(DividerWithText, { text: 'OR' }), project.credentialEnabled && _jsx(CredentialSignIn, {})] }));
18
+ return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsxs("div", { style: { textAlign: 'center', marginBottom: '1.5rem' }, children: [_jsx(Text, { size: "xl", as: 'h2', children: "Reset Your Password" }), _jsxs(Text, { children: ["Don't have an account? ", _jsx(Link, { href: stackApp.urls['signUp'], children: "Sign up" })] })] }), _jsx(OAuthGroup, { type: 'signin' }), enableDivider && _jsx(DividerWithText, { text: 'OR' }), project.credentialEnabled && _jsx(CredentialSignIn, {})] }));
20
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../src/components-page/sign-up.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA0BxE"}
1
+ {"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../src/components-page/sign-up.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,2CA4BxE"}
@@ -4,7 +4,6 @@ import DividerWithText from '../components/divider-with-text';
4
4
  import OAuthGroup from '../components/oauth-group';
5
5
  import CardFrame from '../components/card-frame';
6
6
  import CredentialSignUp from '../components/credential-sign-up';
7
- import CardHeader from '../components/card-header';
8
7
  import { useUser, useStackApp } from '..';
9
8
  import RedirectMessageCard from '../components/redirect-message-card';
10
9
  import { Link, Text } from "../components-core";
@@ -16,5 +15,5 @@ export default function SignUp({ fullPage = false }) {
16
15
  return _jsx(RedirectMessageCard, { type: 'signedIn', fullPage: fullPage });
17
16
  }
18
17
  const enableDivider = project.credentialEnabled && project.oauthProviders.filter(p => p.enabled).length > 0;
19
- return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsx(CardHeader, { title: "Create a New Account", children: _jsxs(Text, { children: ["Already have an account? ", _jsx(Link, { href: stackApp.urls['signIn'], children: "Sign in" })] }) }), _jsx(OAuthGroup, { type: 'signup' }), enableDivider && _jsx(DividerWithText, { text: 'OR' }), project.credentialEnabled && _jsx(CredentialSignUp, {})] }));
18
+ return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsxs("div", { style: { textAlign: 'center', marginBottom: '1.5rem' }, children: [_jsx(Text, { size: "xl", as: 'h2', children: "Create a New Account" }), _jsxs(Text, { children: ["Already have an account? ", _jsx(Link, { href: stackApp.urls['signIn'], children: "Sign in" })] })] }), _jsx(OAuthGroup, { type: 'signup' }), enableDivider && _jsx(DividerWithText, { text: 'OR' }), project.credentialEnabled && _jsx(CredentialSignUp, {})] }));
20
19
  }
@@ -6,6 +6,7 @@ import { InputProps } from '../components-core/input';
6
6
  import { LinkProps } from '../components-core/link';
7
7
  import { LabelProps } from '../components-core/label';
8
8
  import { TextProps } from '../components-core/text';
9
+ import { CardProps } from '../components-core/card';
9
10
  export type Components = {
10
11
  Button: React.ComponentType<ButtonProps>;
11
12
  Container: React.ComponentType<ContainerProps>;
@@ -14,6 +15,7 @@ export type Components = {
14
15
  Label: React.ComponentType<LabelProps>;
15
16
  Link: React.ComponentType<LinkProps>;
16
17
  Text: React.ComponentType<TextProps>;
18
+ Card: React.ComponentType<CardProps>;
17
19
  };
18
20
  export type ComponentConfig = {
19
21
  components?: Partial<Components>;
@@ -1 +1 @@
1
- {"version":3,"file":"component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/component-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAkB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAgB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC3C,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;CACtC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAClC,CAAA;AAID,wBAAgB,aAAa,eAM5B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,eAAe,2CAc7F"}
1
+ {"version":3,"file":"component-provider.d.ts","sourceRoot":"","sources":["../../src/providers/component-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAkB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAgB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAc,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC3C,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;CACtC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAClC,CAAA;AAID,wBAAgB,aAAa,eAM5B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,eAAe,2CAe7F"}
@@ -8,6 +8,7 @@ import Input from '../components-core/input';
8
8
  import Link from '../components-core/link';
9
9
  import Label from '../components-core/label';
10
10
  import Text from '../components-core/text';
11
+ import Card from '../components-core/card';
11
12
  const ComponentContext = createContext(undefined);
12
13
  export function useComponents() {
13
14
  const context = useContext(ComponentContext);
@@ -25,5 +26,6 @@ export function StackComponentProvider(props) {
25
26
  Label: props.components?.Label || Label,
26
27
  Link: props.components?.Link || Link,
27
28
  Text: props.components?.Text || Text,
29
+ Card: props.components?.Card || Card
28
30
  }, children: props.children }));
29
31
  }
@@ -2,8 +2,7 @@ import React from 'react';
2
2
  type ColorPalette = {
3
3
  primaryColor: string;
4
4
  secondaryColor: string;
5
- primaryBgColor: string;
6
- secondaryBgColor: string;
5
+ backgroundColor: string;
7
6
  neutralColor: string;
8
7
  };
9
8
  type Breakpoints = {
@@ -1 +1 @@
1
- {"version":3,"file":"design-provider.d.ts","sourceRoot":"","sources":["../../src/providers/design-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;KAC/B,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACpC,GAAG,CACF,EAAE,GACA;IACA,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CACF,CAAA;AAYD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,YAAY,GAAG;IACjF,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CAEA;AA+BD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,YAAY,kDA6BvF;AAED,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
1
+ {"version":3,"file":"design-provider.d.ts","sourceRoot":"","sources":["../../src/providers/design-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,KAAK,YAAY,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;KAC/B,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACpC,GAAG,CACF,EAAE,GACA;IACA,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CACF,CAAA;AAYD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,YAAY,GAAG;IACjF,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACjD,CAEA;AA+BD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,YAAY,kDA6BvF;AAED,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
@@ -18,14 +18,14 @@ function getColors(theme, colors) {
18
18
  return {
19
19
  dark: { ...DEFAULT_COLORS.dark, ...colors?.dark },
20
20
  light: { ...DEFAULT_COLORS.light, ...colors?.light },
21
- }[theme];
21
+ }[theme || 'light'];
22
22
  }
23
23
  const useColorMode = (props) => {
24
24
  const { resolvedTheme: nextColorMode, setTheme: setNextColorMode } = useTheme();
25
25
  const nextColorModeValue = nextColorMode === 'dark' ? 'dark' : 'light';
26
26
  if (hasCustomColorMode(props)) {
27
27
  return [
28
- props.colorMode,
28
+ props.colorMode === 'dark' ? 'dark' : 'light',
29
29
  props.setColorMode,
30
30
  ];
31
31
  }
@@ -4,11 +4,13 @@ import Button from '../components-core-joy/button';
4
4
  import Input from '../components-core-joy/input';
5
5
  import Text from '../components-core-joy/text';
6
6
  import Divider from '../components-core-joy/divider';
7
+ import { Card } from '../components-core-joy/card';
7
8
  export declare const defaultComponents: {
8
9
  Button: typeof Button;
9
10
  Input: typeof Input;
10
11
  Text: typeof Text;
11
12
  Divider: typeof Divider;
13
+ Card: typeof Card;
12
14
  };
13
15
  export declare function StackJoyTheme(props: {
14
16
  theme?: ThemeConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"joy-provider.d.ts","sourceRoot":"","sources":["../../src/providers/joy-provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,IAAI,MAAM,6BAA6B,CAAC;AAC/C,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAErD,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAiBxF"}
1
+ {"version":3,"file":"joy-provider.d.ts","sourceRoot":"","sources":["../../src/providers/joy-provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,IAAI,MAAM,6BAA6B,CAAC;AAC/C,OAAO,OAAO,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAiBxF"}
@@ -6,20 +6,22 @@ import Button from '../components-core-joy/button';
6
6
  import Input from '../components-core-joy/input';
7
7
  import Text from '../components-core-joy/text';
8
8
  import Divider from '../components-core-joy/divider';
9
+ import { Card } from '../components-core-joy/card';
9
10
  export const defaultComponents = {
10
11
  Button,
11
12
  Input,
12
13
  Text,
13
- Divider
14
+ Divider,
15
+ Card,
14
16
  };
15
17
  export function StackJoyTheme(props) {
16
- const { mode, setMode } = useColorScheme();
18
+ const { mode, systemMode, setMode } = useColorScheme();
17
19
  const mergedTheme = {
18
20
  components: {
19
21
  ...defaultComponents,
20
22
  ...props.theme?.components,
21
23
  },
22
- colorMode: mode,
24
+ colorMode: mode === 'system' ? systemMode : mode,
23
25
  setColorMode: setMode,
24
26
  ...props.theme,
25
27
  };
@@ -26,15 +26,13 @@ export declare const DEFAULT_COLORS: {
26
26
  readonly dark: {
27
27
  readonly primaryColor: "#570df8";
28
28
  readonly secondaryColor: "#404040";
29
- readonly primaryBgColor: "black";
30
- readonly secondaryBgColor: "#1f1f1f";
29
+ readonly backgroundColor: "black";
31
30
  readonly neutralColor: "#27272a";
32
31
  };
33
32
  readonly light: {
34
33
  readonly primaryColor: "#570df8";
35
34
  readonly secondaryColor: "#e0e0e0";
36
- readonly primaryBgColor: "white";
37
- readonly secondaryBgColor: "#474747";
35
+ readonly backgroundColor: "white";
38
36
  readonly neutralColor: "#e4e4e7";
39
37
  };
40
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAAqF,CAAC;AAC7G,eAAO,MAAM,YAAY;;;;;;CAAiF,CAAC;AAC3G,eAAO,MAAM,WAAW,+HAAuH,CAAC;AAChJ,eAAO,MAAM,mBAAmB;;;CAAwC,CAAC;AACzE,eAAO,MAAM,qBAAqB;;;CAA4C,CAAC;AAC/E,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;CAehB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAAqF,CAAC;AAC7G,eAAO,MAAM,YAAY;;;;;;CAAiF,CAAC;AAC3G,eAAO,MAAM,WAAW,+HAAuH,CAAC;AAChJ,eAAO,MAAM,mBAAmB;;;CAAwC,CAAC;AACzE,eAAO,MAAM,qBAAqB;;;CAA4C,CAAC;AAC/E,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAahB,CAAC"}
@@ -8,15 +8,13 @@ export const DEFAULT_COLORS = {
8
8
  dark: {
9
9
  primaryColor: '#570df8',
10
10
  secondaryColor: '#404040',
11
- primaryBgColor: 'black',
12
- secondaryBgColor: '#1f1f1f',
11
+ backgroundColor: 'black',
13
12
  neutralColor: '#27272a',
14
13
  },
15
14
  light: {
16
15
  primaryColor: '#570df8',
17
16
  secondaryColor: '#e0e0e0',
18
- primaryBgColor: 'white',
19
- secondaryBgColor: '#474747',
17
+ backgroundColor: 'white',
20
18
  neutralColor: '#e4e4e7',
21
19
  },
22
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",