@hero-design/rn 8.98.0-alpha.0 → 8.98.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.
@@ -0,0 +1,18 @@
1
+ (node:3005) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
+ (Use `node --trace-warnings ...` to show where the warning was created)
3
+ 
4
+ src/index.ts → lib/index.js, es/index.js...
5
+ (!) [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`.
6
+ (!) [plugin typescript] src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx (61:35): @rollup/plugin-typescript TS2307: Cannot find module '../../../../types' or its corresponding type declarations.
7
+ /home/runner/work/hero-design/hero-design/packages/rn/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx:61:35
8
+ 
9
+ 61 import { RichTextEditorRef } from "../../../../types";
10
+    ~~~~~~~~~~~~~~~~~~~
11
+ 
12
+ (!) [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.
13
+ created lib/index.js, es/index.js in 56.1s
14
+ 
15
+ /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/types.ts → ., ....
16
+ (!) Generated empty chunks
17
+ "locales/types" and "locales/types"
18
+ created ., . in 22.9s
package/es/index.js CHANGED
@@ -20956,14 +20956,13 @@ var HeaderTabItemOutline = index$b(Animated.View)(function (_ref4) {
20956
20956
  });
20957
20957
  var HeaderTabItemWrapper = index$b(View)(function (_ref5) {
20958
20958
  var theme = _ref5.theme;
20959
- return _objectSpread2({
20959
+ return {
20960
20960
  paddingHorizontal: theme.__hd__.tabs.space.outlineHorizontalPadding,
20961
20961
  paddingVertical: theme.__hd__.tabs.space.outlineVerticalPadding,
20962
20962
  position: 'relative',
20963
- justifyContent: 'center'
20964
- }, Platform.OS === 'android' && Platform.Version !== 26 && Platform.Version !== 27 && {
20963
+ justifyContent: 'center',
20965
20964
  alignItems: 'center'
20966
- });
20965
+ };
20967
20966
  });
20968
20967
  var HeaderTabItemIndicator = index$b(Animated.View)(function (_ref6) {
20969
20968
  var theme = _ref6.theme;
package/lib/index.js CHANGED
@@ -20985,14 +20985,13 @@ var HeaderTabItemOutline = index$b(reactNative.Animated.View)(function (_ref4) {
20985
20985
  });
20986
20986
  var HeaderTabItemWrapper = index$b(reactNative.View)(function (_ref5) {
20987
20987
  var theme = _ref5.theme;
20988
- return _objectSpread2({
20988
+ return {
20989
20989
  paddingHorizontal: theme.__hd__.tabs.space.outlineHorizontalPadding,
20990
20990
  paddingVertical: theme.__hd__.tabs.space.outlineVerticalPadding,
20991
20991
  position: 'relative',
20992
- justifyContent: 'center'
20993
- }, reactNative.Platform.OS === 'android' && reactNative.Platform.Version !== 26 && reactNative.Platform.Version !== 27 && {
20992
+ justifyContent: 'center',
20994
20993
  alignItems: 'center'
20995
- });
20994
+ };
20996
20995
  });
20997
20996
  var HeaderTabItemIndicator = index$b(reactNative.Animated.View)(function (_ref6) {
20998
20997
  var theme = _ref6.theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.98.0-alpha.0",
3
+ "version": "8.98.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- import { Animated, Platform, StyleSheet, View } from 'react-native';
1
+ import { Animated, StyleSheet, View } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
 
4
4
  const TabScreen = styled(View)({
@@ -43,11 +43,7 @@ const HeaderTabItemWrapper = styled(View)(({ theme }) => ({
43
43
  paddingVertical: theme.__hd__.tabs.space.outlineVerticalPadding,
44
44
  position: 'relative',
45
45
  justifyContent: 'center',
46
- ...(Platform.OS === 'android' &&
47
- Platform.Version !== 26 &&
48
- Platform.Version !== 27 && {
49
- alignItems: 'center',
50
- }),
46
+ alignItems: 'center',
51
47
  }));
52
48
 
53
49
  const HeaderTabItemIndicator = styled(Animated.View)(({ theme }) => ({
@@ -1,3 +0,0 @@
1
- import { LocaleValues } from './types';
2
- declare const locale: LocaleValues;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { LocaleValues } from './types';
2
- declare const locale: LocaleValues;
3
- export default locale;
@@ -1,5 +0,0 @@
1
- declare const _default: {
2
- 'en-AU': import("./types").LocaleValues;
3
- 'en-CA': import("./types").LocaleValues;
4
- };
5
- export default _default;
@@ -1,10 +0,0 @@
1
- declare const LOCALES: readonly ["en-AU", "en-CA"];
2
- export type LocaleCode = typeof LOCALES[number];
3
- export type DateTimeFormats = {
4
- fullDate: string;
5
- };
6
- export type LocaleValues = {
7
- lang: LocaleCode;
8
- dateTimeFormats: DateTimeFormats;
9
- };
10
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { DatePickerDialogProps } from './type';
3
- declare const AndroidDatePickerDialog: ({ open, value, minDate, maxDate, onChange, onClose, testID, }: DatePickerDialogProps) => React.JSX.Element | null;
4
- export default AndroidDatePickerDialog;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { DatePickerDialogProps } from './type';
3
- declare const IOSDatePickerDialog: ({ label, open, onClose, confirmLabel, locale, value, minDate, maxDate, onChange, testID, variant, supportedOrientations, }: DatePickerDialogProps) => React.JSX.Element | null;
4
- export default IOSDatePickerDialog;
@@ -1,50 +0,0 @@
1
- export interface DatePickerDialogProps {
2
- /**
3
- * The value of the date picker.
4
- */
5
- value: Date;
6
- /**
7
- * The minimum date of the date picker.
8
- */
9
- minDate?: Date;
10
- /**
11
- * The maximum date of the date picker.
12
- */
13
- maxDate?: Date;
14
- /**
15
- * The function to call when the date is changed.
16
- */
17
- onChange: (date: Date) => void;
18
- /**
19
- * The test ID of the date picker.
20
- */
21
- testID?: string;
22
- /**
23
- * The locale of the date picker. iOS only.
24
- */
25
- locale?: string;
26
- /**
27
- * Whether the dialog is open, Android only.
28
- */
29
- open: boolean;
30
- /**
31
- * The function to call when the dialog is closed. Android only.
32
- */
33
- onClose: () => void;
34
- /**
35
- * The variant of the date picker.
36
- */
37
- variant?: 'default' | 'month-year';
38
- /**
39
- * The label of the date picker.
40
- */
41
- label?: string;
42
- /**
43
- * The confirm label of the date picker. iOS only.
44
- */
45
- confirmLabel: string;
46
- /**
47
- * The supported orientations of the date picker.
48
- */
49
- supportedOrientations?: ('portrait' | 'landscape')[];
50
- }
@@ -1,4 +0,0 @@
1
- import { DatePickerProps } from './types';
2
- export declare const getDateValue: (value: Date, minDate?: Date | undefined, maxDate?: Date | undefined) => Date;
3
- declare const useCalculateDate: ({ maxDate, minDate, onChange, value, }: Pick<DatePickerProps, "maxDate" | "minDate" | "onChange" | "value">) => void;
4
- export default useCalculateDate;
@@ -1,12 +0,0 @@
1
- import { LocaleCode } from '../../types';
2
- type UseFormatDateProps = {
3
- displayFormat?: string;
4
- locale?: LocaleCode;
5
- value?: Date;
6
- };
7
- declare const useFormatDate: ({ displayFormat, locale, value, }: UseFormatDateProps) => {
8
- displayValue: string;
9
- pickerInitValue: Date;
10
- format: string;
11
- };
12
- export default useFormatDate;
@@ -1,21 +0,0 @@
1
- import { View } from 'react-native';
2
- type ThemeVariant = 'light' | 'dark';
3
- declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
- theme?: import("@emotion/react").Theme;
5
- as?: React.ElementType;
6
- }, {}, {
7
- ref?: import("react").Ref<View> | undefined;
8
- }>;
9
- declare const StyledTitle: import("@emotion/native").StyledComponent<import("../Typography/Title").TitleProps & {
10
- theme?: import("@emotion/react").Theme;
11
- as?: React.ElementType;
12
- } & {
13
- themeVariant: ThemeVariant;
14
- }, {}, {}>;
15
- declare const StyledDescription: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
16
- theme?: import("@emotion/react").Theme;
17
- as?: React.ElementType;
18
- } & {
19
- themeVariant: ThemeVariant;
20
- }, {}, {}>;
21
- export { StyledWrapper, StyledTitle, StyledDescription };
@@ -1,31 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { StyleProp, ViewStyle, ImageProps as RNImageProps } from 'react-native';
3
- import { ImageProps } from '../Image';
4
- interface EmptyProps {
5
- /**
6
- * Image to be displayed.
7
- */
8
- image?: ReactElement<ImageProps | RNImageProps>;
9
- /**
10
- * Empty's title.
11
- */
12
- title: string;
13
- /**
14
- * Empty's description.
15
- */
16
- description?: string;
17
- /**
18
- * Empty's variant.
19
- */
20
- variant?: 'light' | 'dark';
21
- /**
22
- * Additional style.
23
- */
24
- style?: StyleProp<ViewStyle>;
25
- /**
26
- * Testing id of the component.
27
- */
28
- testID?: string;
29
- }
30
- declare const Empty: ({ image, title, description, style, testID, variant, }: EmptyProps) => JSX.Element;
31
- export default Empty;
@@ -1,53 +0,0 @@
1
- import { View } from 'react-native';
2
- type ErrorVariant = 'full-screen' | 'in-page';
3
- declare const StyledErrorModal: import("@emotion/native").StyledComponent<import("../Modal").ModalProps & {
4
- theme?: import("@emotion/react").Theme;
5
- as?: React.ElementType;
6
- }, {}, {}>;
7
- declare const StyledErrorContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
8
- theme?: import("@emotion/react").Theme;
9
- as?: React.ElementType;
10
- } & {
11
- themeVariant: ErrorVariant;
12
- }, {}, {
13
- ref?: import("react").Ref<View> | undefined;
14
- }>;
15
- declare const StyledErrorContent: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
16
- theme?: import("@emotion/react").Theme;
17
- as?: React.ElementType;
18
- }, {}, {
19
- ref?: import("react").Ref<View> | undefined;
20
- }>;
21
- declare const StyledErrorButtonContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
22
- theme?: import("@emotion/react").Theme;
23
- as?: React.ElementType;
24
- }, {}, {
25
- ref?: import("react").Ref<View> | undefined;
26
- }>;
27
- declare const StyledErrorButtonPrimary: import("@emotion/native").StyledComponent<import("../Button/Button").ButtonProps & {
28
- theme?: import("@emotion/react").Theme;
29
- as?: React.ElementType;
30
- }, {}, {}>;
31
- declare const StyledErrorButtonSecondary: import("@emotion/native").StyledComponent<import("../Button/Button").ButtonProps & {
32
- theme?: import("@emotion/react").Theme;
33
- as?: React.ElementType;
34
- }, {}, {}>;
35
- declare const StyledErrorImageContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
36
- theme?: import("@emotion/react").Theme;
37
- as?: React.ElementType;
38
- }, {}, {
39
- ref?: import("react").Ref<View> | undefined;
40
- }>;
41
- declare const StyledErrorImage: import("@emotion/native").StyledComponent<import("../Image").ImageProps & {
42
- theme?: import("@emotion/react").Theme;
43
- as?: React.ElementType;
44
- }, {}, {}>;
45
- declare const StyledErrorTitle: import("@emotion/native").StyledComponent<import("../Typography/Title").TitleProps & {
46
- theme?: import("@emotion/react").Theme;
47
- as?: React.ElementType;
48
- }, {}, {}>;
49
- declare const StyledErrorDescription: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
50
- theme?: import("@emotion/react").Theme;
51
- as?: React.ElementType;
52
- }, {}, {}>;
53
- export { ErrorVariant, StyledErrorModal, StyledErrorImage, StyledErrorContainer, StyledErrorButtonContainer, StyledErrorButtonPrimary, StyledErrorButtonSecondary, StyledErrorContent, StyledErrorTitle, StyledErrorDescription, StyledErrorImageContainer, };
@@ -1,56 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import type { ImageSourcePropType, ViewProps, ImageProps as RNImageProps } from 'react-native';
3
- import { ErrorVariant } from './StyledError';
4
- import { ImageProps } from '../Image/index';
5
- interface ErrorProps extends ViewProps {
6
- /**
7
- * @deprecated use conditional rendering instead
8
- *
9
- * Visibility of the error
10
- */
11
- visible?: boolean;
12
- /**
13
- * Variant of the error
14
- */
15
- variant?: ErrorVariant;
16
- /**
17
- * Title of the error
18
- */
19
- title: string;
20
- /**
21
- * Description of the error
22
- */
23
- description?: string;
24
- /**
25
- * Image of the error
26
- */
27
- image?: ReactElement<ImageProps | RNImageProps> | ImageSourcePropType | string;
28
- /**
29
- * Testing id of the component.
30
- */
31
- testID?: string;
32
- /**
33
- * Action button text
34
- */
35
- ctaText?: string;
36
- /**
37
- * Callback when the action button is pressed.
38
- */
39
- onCtaPress?: () => void;
40
- /**
41
- * Secondary button text
42
- */
43
- secondaryCtaText?: string;
44
- /**
45
- * Callback when the secondary button is pressed.
46
- */
47
- onSecondaryCtaPress?: () => void;
48
- }
49
- /**
50
- * Renders error page
51
- *
52
- * @param {ErrorProps}
53
- * @return {*} {ReactElement}
54
- */
55
- declare const ErrorComponent: ({ visible, variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
56
- export default ErrorComponent;
@@ -1,49 +0,0 @@
1
- import { View } from 'react-native';
2
- type SuccessVariant = 'full-screen' | 'in-page';
3
- declare const StyledSuccessContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
- theme?: import("@emotion/react").Theme;
5
- as?: React.ElementType;
6
- } & {
7
- themeVariant: SuccessVariant;
8
- }, {}, {
9
- ref?: import("react").Ref<View> | undefined;
10
- }>;
11
- declare const StyledSuccessImage: import("@emotion/native").StyledComponent<import("../Image").ImageProps & {
12
- theme?: import("@emotion/react").Theme;
13
- as?: React.ElementType;
14
- }, {}, {}>;
15
- declare const StyledSuccessContent: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
16
- theme?: import("@emotion/react").Theme;
17
- as?: React.ElementType;
18
- }, {}, {
19
- ref?: import("react").Ref<View> | undefined;
20
- }>;
21
- declare const StyledSuccessImageContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
22
- theme?: import("@emotion/react").Theme;
23
- as?: React.ElementType;
24
- }, {}, {
25
- ref?: import("react").Ref<View> | undefined;
26
- }>;
27
- declare const StyledSuccessTitle: import("@emotion/native").StyledComponent<import("../Typography/Title").TitleProps & {
28
- theme?: import("@emotion/react").Theme;
29
- as?: React.ElementType;
30
- }, {}, {}>;
31
- declare const StyledSuccessDescription: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
32
- theme?: import("@emotion/react").Theme;
33
- as?: React.ElementType;
34
- }, {}, {}>;
35
- declare const StyledSuccessButtonContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
36
- theme?: import("@emotion/react").Theme;
37
- as?: React.ElementType;
38
- }, {}, {
39
- ref?: import("react").Ref<View> | undefined;
40
- }>;
41
- declare const StyledSuccessButtonPrimary: import("@emotion/native").StyledComponent<import("../Button/Button").ButtonProps & {
42
- theme?: import("@emotion/react").Theme;
43
- as?: React.ElementType;
44
- }, {}, {}>;
45
- declare const StyledSuccessModal: import("@emotion/native").StyledComponent<import("../Modal").ModalProps & {
46
- theme?: import("@emotion/react").Theme;
47
- as?: React.ElementType;
48
- }, {}, {}>;
49
- export { SuccessVariant, StyledSuccessImage, StyledSuccessContainer, StyledSuccessContent, StyledSuccessImageContainer, StyledSuccessTitle, StyledSuccessDescription, StyledSuccessButtonContainer, StyledSuccessButtonPrimary, StyledSuccessModal, };
@@ -1,50 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import type { ViewProps, ImageSourcePropType, ImageProps as RNImageProps } from 'react-native';
3
- import { SuccessVariant } from './StyledSuccess';
4
- import { ImageProps } from '../Image';
5
- export interface SuccessProps extends ViewProps {
6
- /**
7
- * Image to be displayed.
8
- */
9
- image?: ReactElement<ImageProps | RNImageProps> | ImageSourcePropType | string;
10
- /**
11
- * Success's title.
12
- */
13
- title: string;
14
- /**
15
- * Success's description.
16
- */
17
- description?: string | ReactElement;
18
- /**
19
- * Success's variant.
20
- */
21
- variant?: SuccessVariant;
22
- /**
23
- * Action button text
24
- */
25
- ctaText?: string;
26
- /**
27
- * Callback when the action button is pressed.
28
- */
29
- onCtaPress?: () => void;
30
- /**
31
- * Secondary button text.
32
- */
33
- secondaryCtaText?: string;
34
- /**
35
- * Callback when the secondary button is pressed.
36
- */
37
- onSecondaryCtaPress?: () => void;
38
- /**
39
- * Testing id of the component.
40
- */
41
- testID?: string;
42
- }
43
- /**
44
- * Renders success page
45
- *
46
- * @param {SuccessProps} props
47
- * @return {*} {ReactElement}
48
- */
49
- declare const Success: (props: SuccessProps) => ReactElement;
50
- export default Success;
@@ -1,9 +0,0 @@
1
- import type { ShadowPalette } from './types';
2
- declare const getShadows: (shadowPalette: ShadowPalette) => {
3
- default: import("./types").ShadowStyles;
4
- cardDrawer: import("./types").ShadowStyles;
5
- tabBar: import("./types").ShadowStyles;
6
- };
7
- type Shadows = ReturnType<typeof getShadows>;
8
- export { getShadows };
9
- export type { Shadows };
@@ -1,3 +0,0 @@
1
- import type { ShadowPalette } from './types';
2
- declare const swagLightShadowPalette: ShadowPalette;
3
- export default swagLightShadowPalette;
@@ -1,3 +0,0 @@
1
- import type { ShadowPalette } from './types';
2
- declare const swagLightJobsShadowPalette: ShadowPalette;
3
- export default swagLightJobsShadowPalette;
@@ -1,16 +0,0 @@
1
- import type { SystemPalette } from '.';
2
- declare const getShadows: (systemPalette: SystemPalette) => {
3
- default: {
4
- shadowOffset: {
5
- width: number;
6
- height: number;
7
- };
8
- shadowColor: string;
9
- shadowOpacity: number;
10
- shadowRadius: number;
11
- elevation: number;
12
- };
13
- };
14
- type Shadows = ReturnType<typeof getShadows>;
15
- export { getShadows };
16
- export type { Shadows };