@ttoss/react-auth 1.3.38 → 1.4.0

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/esm/index.js CHANGED
@@ -81,7 +81,7 @@ import { Auth as AmplifyAuth } from "aws-amplify";
81
81
 
82
82
  // src/AuthCard.tsx
83
83
  import * as React2 from "react";
84
- import { Button, Card, Flex, Link, Text } from "@ttoss/ui";
84
+ import { Box, Button, Flex, Link, Text } from "@ttoss/ui";
85
85
  import { useNotifications } from "@ttoss/react-notifications";
86
86
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
87
87
  var LogoContext = /*#__PURE__*/React2.createContext({});
@@ -106,14 +106,14 @@ var AuthCard = ({
106
106
  const {
107
107
  isLoading
108
108
  } = useNotifications();
109
- return /* @__PURE__ */jsx2(Card, {
109
+ return /* @__PURE__ */jsx2(Box, {
110
110
  sx: {
111
111
  maxWidth: "564px"
112
112
  },
113
113
  children: /* @__PURE__ */jsxs(Flex, {
114
114
  sx: {
115
115
  flexDirection: "column",
116
- gap: 3
116
+ gap: "md"
117
117
  },
118
118
  children: [logo && /* @__PURE__ */jsx2(Flex, {
119
119
  sx: {
@@ -122,17 +122,16 @@ var AuthCard = ({
122
122
  },
123
123
  children: logo
124
124
  }), /* @__PURE__ */jsx2(Text, {
125
- variant: "title",
126
125
  sx: {
127
126
  alignSelf: "center",
128
- marginY: 4,
129
- fontSize: 5
127
+ marginY: "md",
128
+ fontSize: "xl"
130
129
  },
131
130
  children: title
132
131
  }), children, /* @__PURE__ */jsx2(Flex, {
133
132
  sx: {
134
133
  justifyContent: "space-between",
135
- marginTop: 3
134
+ marginTop: "md"
136
135
  },
137
136
  children: /* @__PURE__ */jsx2(Button, {
138
137
  type: "submit",
@@ -148,8 +147,8 @@ var AuthCard = ({
148
147
  sx: {
149
148
  justifyContent: "space-between",
150
149
  flexDirection: "column",
151
- gap: 3,
152
- marginTop: 4,
150
+ gap: "sm",
151
+ marginTop: "md",
153
152
  color: "text"
154
153
  },
155
154
  children: links.map(link => {
@@ -287,7 +286,6 @@ var createAuthTemplate = ({
287
286
  Resources: {
288
287
  [CognitoUserPoolLogicalId]: {
289
288
  Type: "AWS::Cognito::UserPool",
290
- DeletionPolicy: "Retain",
291
289
  Properties: {
292
290
  AutoVerifiedAttributes,
293
291
  Policies: {
package/dist/index.js CHANGED
@@ -150,14 +150,14 @@ var AuthCard = ({
150
150
  const {
151
151
  isLoading
152
152
  } = (0, import_react_notifications.useNotifications)();
153
- return /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Card, {
153
+ return /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Box, {
154
154
  sx: {
155
155
  maxWidth: "564px"
156
156
  },
157
157
  children: /* @__PURE__ */(0, import_jsx_runtime2.jsxs)(import_ui.Flex, {
158
158
  sx: {
159
159
  flexDirection: "column",
160
- gap: 3
160
+ gap: "md"
161
161
  },
162
162
  children: [logo && /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Flex, {
163
163
  sx: {
@@ -166,17 +166,16 @@ var AuthCard = ({
166
166
  },
167
167
  children: logo
168
168
  }), /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Text, {
169
- variant: "title",
170
169
  sx: {
171
170
  alignSelf: "center",
172
- marginY: 4,
173
- fontSize: 5
171
+ marginY: "md",
172
+ fontSize: "xl"
174
173
  },
175
174
  children: title
176
175
  }), children, /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Flex, {
177
176
  sx: {
178
177
  justifyContent: "space-between",
179
- marginTop: 3
178
+ marginTop: "md"
180
179
  },
181
180
  children: /* @__PURE__ */(0, import_jsx_runtime2.jsx)(import_ui.Button, {
182
181
  type: "submit",
@@ -192,8 +191,8 @@ var AuthCard = ({
192
191
  sx: {
193
192
  justifyContent: "space-between",
194
193
  flexDirection: "column",
195
- gap: 3,
196
- marginTop: 4,
194
+ gap: "sm",
195
+ marginTop: "md",
197
196
  color: "text"
198
197
  },
199
198
  children: links.map(link => {
@@ -331,7 +330,6 @@ var createAuthTemplate = ({
331
330
  Resources: {
332
331
  [CognitoUserPoolLogicalId]: {
333
332
  Type: "AWS::Cognito::UserPool",
334
- DeletionPolicy: "Retain",
335
333
  Properties: {
336
334
  AutoVerifiedAttributes,
337
335
  Policies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-auth",
3
- "version": "1.3.38",
3
+ "version": "1.4.0",
4
4
  "description": "ttoss authentication module for React apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -23,9 +23,9 @@
23
23
  "sideEffects": false,
24
24
  "typings": "./dist/index.d.ts",
25
25
  "dependencies": {
26
- "@ttoss/forms": "^0.15.15",
27
- "@xstate/react": "^3.0.1",
28
- "xstate": "^4.35.0"
26
+ "@ttoss/forms": "^0.16.0",
27
+ "@xstate/react": "^3.2.2",
28
+ "xstate": "^4.37.2"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@ttoss/react-i18n": "^",
@@ -35,14 +35,14 @@
35
35
  "react": ">=16.8.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@ttoss/cloud-auth": "^0.8.10",
39
- "@ttoss/config": "^1.29.5",
40
- "@ttoss/i18n-cli": "^0.4.6",
41
- "@ttoss/react-i18n": "^1.20.0",
42
- "@ttoss/react-notifications": "^1.20.44",
43
- "@ttoss/test-utils": "^1.21.5",
44
- "@ttoss/ui": "^1.34.2",
45
- "@types/react": "^18.0.37",
38
+ "@ttoss/cloud-auth": "^0.9.0",
39
+ "@ttoss/config": "^1.30.0",
40
+ "@ttoss/i18n-cli": "^0.5.0",
41
+ "@ttoss/react-i18n": "^1.21.0",
42
+ "@ttoss/react-notifications": "^1.21.0",
43
+ "@ttoss/test-utils": "^1.22.0",
44
+ "@ttoss/ui": "^1.35.0",
45
+ "@types/react": "^18.2.0",
46
46
  "aws-amplify": "^5.0.25",
47
47
  "jest": "^29.5.0",
48
48
  "tsup": "^6.7.0"
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "a07424c53959642b5b1aedd07994091e79d63ecc"
57
+ "gitHead": "33dbd7f434af69ce6e6bac1b618cb9dc1103f387"
58
58
  }
package/src/AuthCard.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Button, Card, Flex, Link, Text } from '@ttoss/ui';
2
+ import { Box, Button, Flex, Link, Text } from '@ttoss/ui';
3
3
  import { useNotifications } from '@ttoss/react-notifications';
4
4
 
5
5
  export type LogoContextProps = {
@@ -36,19 +36,16 @@ export const AuthCard = ({
36
36
  const { isLoading } = useNotifications();
37
37
 
38
38
  return (
39
- <Card sx={{ maxWidth: '564px' }}>
40
- <Flex sx={{ flexDirection: 'column', gap: 3 }}>
39
+ <Box sx={{ maxWidth: '564px' }}>
40
+ <Flex sx={{ flexDirection: 'column', gap: 'md' }}>
41
41
  {logo && (
42
42
  <Flex sx={{ width: '100%', justifyContent: 'center' }}>{logo}</Flex>
43
43
  )}
44
- <Text
45
- variant="title"
46
- sx={{ alignSelf: 'center', marginY: 4, fontSize: 5 }}
47
- >
44
+ <Text sx={{ alignSelf: 'center', marginY: 'md', fontSize: 'xl' }}>
48
45
  {title}
49
46
  </Text>
50
47
  {children}
51
- <Flex sx={{ justifyContent: 'space-between', marginTop: 3 }}>
48
+ <Flex sx={{ justifyContent: 'space-between', marginTop: 'md' }}>
52
49
  <Button
53
50
  type="submit"
54
51
  aria-label="submit-login"
@@ -64,8 +61,8 @@ export const AuthCard = ({
64
61
  sx={{
65
62
  justifyContent: 'space-between',
66
63
  flexDirection: 'column',
67
- gap: 3,
68
- marginTop: 4,
64
+ gap: 'sm',
65
+ marginTop: 'md',
69
66
  color: 'text',
70
67
  }}
71
68
  >
@@ -80,6 +77,6 @@ export const AuthCard = ({
80
77
  })}
81
78
  </Flex>
82
79
  </Flex>
83
- </Card>
80
+ </Box>
84
81
  );
85
82
  };