@hero-design/rn 8.65.1 → 8.66.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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/es/index.js +2 -1
- package/lib/index.js +2 -1
- package/package.json +1 -1
- package/src/components/Card/StyledCard.tsx +7 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +64 -0
- package/src/components/Card/__tests__/index.spec.tsx +1 -0
- package/src/components/Card/index.tsx +7 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -0
- package/src/theme/components/card.ts +1 -0
- package/stats/8.66.0/rn-stats.html +4842 -0
- package/types/components/Card/StyledCard.d.ts +1 -1
- package/types/components/Card/index.d.ts +1 -1
- package/types/theme/components/card.d.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:2991) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
|
-
(node:
|
|
3
|
+
(node:2991) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
4
4
|
[36m
|
|
5
5
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
6
|
[1m[33m(!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
7
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
8
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
8
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m50.1s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.66.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#3385](https://github.com/Thinkei/hero-design/pull/3385) [`e056fd3ba0867e2879153306e5b9d10a935a590f`](https://github.com/Thinkei/hero-design/commit/e056fd3ba0867e2879153306e5b9d10a935a590f) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Card] Add neutral intent
|
|
8
|
+
|
|
3
9
|
## 8.65.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -2466,7 +2466,8 @@ var getCardTheme = function getCardTheme(theme) {
|
|
|
2466
2466
|
success: theme.colors.success,
|
|
2467
2467
|
warning: theme.colors.warning,
|
|
2468
2468
|
danger: theme.colors.error,
|
|
2469
|
-
archived: theme.colors.archived
|
|
2469
|
+
archived: theme.colors.archived,
|
|
2470
|
+
neutral: theme.colors.neutralGlobalSurface
|
|
2470
2471
|
};
|
|
2471
2472
|
var sizes = {
|
|
2472
2473
|
indicatorWidth: theme.sizes.medium
|
package/lib/index.js
CHANGED
|
@@ -2493,7 +2493,8 @@ var getCardTheme = function getCardTheme(theme) {
|
|
|
2493
2493
|
success: theme.colors.success,
|
|
2494
2494
|
warning: theme.colors.warning,
|
|
2495
2495
|
danger: theme.colors.error,
|
|
2496
|
-
archived: theme.colors.archived
|
|
2496
|
+
archived: theme.colors.archived,
|
|
2497
|
+
neutral: theme.colors.neutralGlobalSurface
|
|
2497
2498
|
};
|
|
2498
2499
|
var sizes = {
|
|
2499
2500
|
indicatorWidth: theme.sizes.medium
|
package/package.json
CHANGED
|
@@ -2,7 +2,13 @@ import { View } from 'react-native';
|
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
|
|
4
4
|
const StyledCard = styled(View)<{
|
|
5
|
-
themeIntent?:
|
|
5
|
+
themeIntent?:
|
|
6
|
+
| 'primary'
|
|
7
|
+
| 'success'
|
|
8
|
+
| 'warning'
|
|
9
|
+
| 'danger'
|
|
10
|
+
| 'archived'
|
|
11
|
+
| 'neutral';
|
|
6
12
|
}>(({ theme, themeIntent }) => ({
|
|
7
13
|
...(themeIntent !== undefined && {
|
|
8
14
|
backgroundColor: theme.__hd__.card.colors[themeIntent],
|
|
@@ -260,6 +260,70 @@ exports[`Card renders correctly when intent is primary 1`] = `
|
|
|
260
260
|
</View>
|
|
261
261
|
`;
|
|
262
262
|
|
|
263
|
+
exports[`Card renders correctly when intent is subdued 1`] = `
|
|
264
|
+
<View
|
|
265
|
+
style={
|
|
266
|
+
{
|
|
267
|
+
"flex": 1,
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
>
|
|
271
|
+
<View
|
|
272
|
+
style={
|
|
273
|
+
[
|
|
274
|
+
{
|
|
275
|
+
"borderRadius": 12,
|
|
276
|
+
"overflow": "hidden",
|
|
277
|
+
},
|
|
278
|
+
undefined,
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
themeIntent="subdued"
|
|
282
|
+
>
|
|
283
|
+
<Text
|
|
284
|
+
allowFontScaling={false}
|
|
285
|
+
style={
|
|
286
|
+
[
|
|
287
|
+
{
|
|
288
|
+
"color": "#001f23",
|
|
289
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
290
|
+
"fontSize": 14,
|
|
291
|
+
"letterSpacing": 0.48,
|
|
292
|
+
"lineHeight": 22,
|
|
293
|
+
},
|
|
294
|
+
undefined,
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
themeIntent="body"
|
|
298
|
+
themeTypeface="neutral"
|
|
299
|
+
themeVariant="small"
|
|
300
|
+
>
|
|
301
|
+
Card Content
|
|
302
|
+
</Text>
|
|
303
|
+
</View>
|
|
304
|
+
<View
|
|
305
|
+
pointerEvents="box-none"
|
|
306
|
+
position="bottom"
|
|
307
|
+
style={
|
|
308
|
+
[
|
|
309
|
+
{
|
|
310
|
+
"bottom": 0,
|
|
311
|
+
"elevation": 9999,
|
|
312
|
+
"flexDirection": "column-reverse",
|
|
313
|
+
"left": 0,
|
|
314
|
+
"paddingHorizontal": 24,
|
|
315
|
+
"paddingVertical": 16,
|
|
316
|
+
"position": "absolute",
|
|
317
|
+
"right": 0,
|
|
318
|
+
"top": 0,
|
|
319
|
+
},
|
|
320
|
+
undefined,
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
/>
|
|
324
|
+
</View>
|
|
325
|
+
`;
|
|
326
|
+
|
|
263
327
|
exports[`Card renders correctly when intent is success 1`] = `
|
|
264
328
|
<View
|
|
265
329
|
style={
|
|
@@ -12,7 +12,13 @@ export interface CardProps extends ViewProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* Visual intent color to apply to card.
|
|
14
14
|
*/
|
|
15
|
-
intent?:
|
|
15
|
+
intent?:
|
|
16
|
+
| 'primary'
|
|
17
|
+
| 'success'
|
|
18
|
+
| 'warning'
|
|
19
|
+
| 'danger'
|
|
20
|
+
| 'archived'
|
|
21
|
+
| 'neutral';
|
|
16
22
|
/**
|
|
17
23
|
* Additional style.
|
|
18
24
|
*/
|