@hero-design/rn 8.91.8 → 8.92.1-alpha.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/CHANGELOG.md +11 -0
- package/es/index.js +264 -192
- package/lib/index.js +267 -193
- package/package.json +4 -3
- package/src/components/Calendar/helpers.ts +16 -18
- package/src/components/Select/SingleSelect/OptionList.tsx +6 -5
- package/src/components/Select/SingleSelect/__tests__/OptionList.spec.tsx +24 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +594 -0
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +26 -0
- package/src/components/Select/SingleSelect/index.tsx +5 -1
- package/src/components/Select/__tests__/helpers.spec.tsx +36 -0
- package/src/components/Select/helpers.tsx +45 -0
- package/src/index.ts +4 -0
- package/src/theme/ThemeSwitcher.tsx +7 -2
- package/src/theme/global/colors/__tests__/__snapshots__/ehJobs.spec.ts.snap +54 -0
- package/src/theme/global/colors/__tests__/__snapshots__/ehWork.spec.js.snap +53 -0
- package/src/theme/global/colors/__tests__/ehJobs.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/ehWork.spec.js +7 -0
- package/src/theme/global/colors/ehJobs.ts +14 -0
- package/src/theme/global/colors/ehWork.ts +27 -0
- package/src/theme/global/colors/swagLight.ts +6 -21
- package/src/theme/global/colors/swagLightJobs.ts +5 -7
- package/src/theme/global/colors/swagSystemPalette.ts +9 -0
- package/src/theme/global/colors/types.ts +6 -1
- package/src/theme/global/index.ts +4 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/{swagLightJobs.spec.ts.snap → ehJobs.spec.ts.snap} +1 -1
- package/src/theme/global/shadows/__tests__/ehJobs.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/ehWork.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/index.spec.ts +11 -7
- package/src/theme/global/shadows/{swagLightJobs.ts → ehJobs.ts} +4 -4
- package/src/theme/global/shadows/{swagLight.ts → ehWork.ts} +2 -2
- package/src/theme/global/shadows/index.ts +9 -5
- package/src/theme/index.ts +4 -0
- package/stats/8.92.0/rn-stats.html +4842 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +1 -0
- package/types/index.d.ts +2 -2
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/global/colors/__tests__/ehWork.spec.d.ts +1 -0
- package/types/theme/global/colors/ehJobs.d.ts +3 -0
- package/types/theme/global/colors/ehWork.d.ts +3 -0
- package/types/theme/global/colors/swagLight.d.ts +4 -1
- package/types/theme/global/colors/swagLightJobs.d.ts +3 -0
- package/types/theme/global/colors/swagSystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +1 -1
- package/types/theme/global/index.d.ts +3 -1
- package/types/theme/global/shadows/ehJobs.d.ts +3 -0
- package/types/theme/global/shadows/ehWork.d.ts +3 -0
- package/types/theme/global/shadows/shadows.d.ts +9 -0
- package/types/theme/global/shadows.d.ts +16 -0
- package/types/theme/index.d.ts +2 -2
- package/.turbo/turbo-build.log +0 -13
- package/src/theme/global/shadows/__tests__/swagLight.spec.ts +0 -7
- package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +0 -7
- /package/src/theme/global/shadows/__tests__/__snapshots__/{swagLight.spec.ts.snap → ehWork.spec.ts.snap} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SectionList } from 'react-native';
|
|
3
3
|
import type { SingleSelectProps } from '.';
|
|
4
|
-
import type { OptionType, SectionType } from '../types';
|
|
5
4
|
import { BaseOptionListProps } from '../BaseOptionList';
|
|
5
|
+
import type { OptionType, SectionType } from '../types';
|
|
6
6
|
type OptionListProps<V, T extends OptionType<V>> = Pick<SingleSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
|
|
7
7
|
onPress: (value: V | null) => void;
|
|
8
8
|
sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ThemeSwitcher, withTheme } from './theme';
|
|
1
|
+
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ThemeSwitcher, withTheme, ehWorkSystemPalette, ehJobsSystemPalette } from './theme';
|
|
2
2
|
import { scale } from './utils/scale';
|
|
3
3
|
import Accordion from './components/Accordion';
|
|
4
4
|
import Alert from './components/Alert';
|
|
@@ -54,5 +54,5 @@ import Portal from './components/Portal';
|
|
|
54
54
|
import { ScrollViewWithFAB, SectionListWithFAB, FlatListWithFAB } from './components/AnimatedScroller';
|
|
55
55
|
import Search from './components/Search';
|
|
56
56
|
import FloatingIsland from './components/FloatingIsland';
|
|
57
|
-
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, Accordion, Alert, AppCue, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, FlatListWithFAB, Icon, Image, HeroDesignProvider, MapPin, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, Search, ScrollViewWithFAB, SectionHeading, SectionListWithFAB, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, FloatingIsland, };
|
|
57
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette, Accordion, Alert, AppCue, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, FlatListWithFAB, Icon, Image, HeroDesignProvider, MapPin, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, Search, ScrollViewWithFAB, SectionHeading, SectionListWithFAB, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, FloatingIsland, };
|
|
58
58
|
export * from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
type ThemeName = 'swag' | 'swagDark' | 'swagLight' | 'work' | 'jobs' | 'wallet' | 'eBens' | 'ehWorkDark';
|
|
2
|
+
type ThemeName = 'swag' | 'swagDark' | 'swagLight' | 'work' | 'jobs' | 'wallet' | 'eBens' | 'ehWorkDark' | 'ehWork' | 'ehJobs';
|
|
3
3
|
declare const ThemeSwitcher: ({ name, children, }: {
|
|
4
4
|
name?: ThemeName;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SystemPalette } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated This palette is deprecated and will be removed in the next major release.
|
|
4
|
+
*/
|
|
2
5
|
declare const swagSystemPalette: SystemPalette;
|
|
3
6
|
export default swagSystemPalette;
|
|
@@ -50,7 +50,7 @@ export type BrandSystemPalette = {
|
|
|
50
50
|
decorativeSecondarySurface?: string;
|
|
51
51
|
};
|
|
52
52
|
export type ThemeMode = 'light' | 'dark';
|
|
53
|
-
export type ThemeName = 'swagLight' | 'swagLightJobs' | 'ehWorkDark';
|
|
53
|
+
export type ThemeName = 'swagLight' | 'swagLightJobs' | 'ehWorkDark' | 'ehWork' | 'ehJobs';
|
|
54
54
|
export type SystemPalette = GlobalSystemPalette & BrandSystemPalette & {
|
|
55
55
|
themeMode?: ThemeMode;
|
|
56
56
|
name?: ThemeName;
|
|
@@ -8,6 +8,8 @@ import jobsSystemPalette from './colors/jobs';
|
|
|
8
8
|
import walletSystemPalette from './colors/wallet';
|
|
9
9
|
import eBensSystemPalette from './colors/eBens';
|
|
10
10
|
import ehWorkDarkSystemPalette from './colors/ehWorkDark';
|
|
11
|
+
import ehWorkSystemPalette from './colors/ehWork';
|
|
12
|
+
import ehJobsSystemPalette from './colors/ehJobs';
|
|
11
13
|
import type { Scale } from './scale';
|
|
12
14
|
import type { SystemPalette } from './colors/types';
|
|
13
15
|
declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
@@ -73,4 +75,4 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
73
75
|
};
|
|
74
76
|
type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
75
77
|
export type { GlobalTheme, Scale, SystemPalette };
|
|
76
|
-
export { getGlobalTheme, defaultScale, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, };
|
|
78
|
+
export { getGlobalTheme, defaultScale, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette, };
|
|
@@ -0,0 +1,9 @@
|
|
|
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 };
|
|
@@ -0,0 +1,16 @@
|
|
|
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 };
|
package/types/theme/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import getTheme from './getTheme';
|
|
2
2
|
import ThemeProvider, { useTheme } from './ThemeProvider';
|
|
3
3
|
import ThemeSwitcher, { withTheme } from './ThemeSwitcher';
|
|
4
|
-
import { swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette } from './global';
|
|
4
|
+
import { swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette } from './global';
|
|
5
5
|
import type { Theme } from './getTheme';
|
|
6
6
|
declare const defaultTheme: Theme;
|
|
7
7
|
export type { Theme };
|
|
8
|
-
export { withTheme, getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, };
|
|
8
|
+
export { withTheme, getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette, };
|
|
9
9
|
export default defaultTheme;
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
(node:3034) 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
|
-
[36m
|
|
4
|
-
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
5
|
-
[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
|
|
6
|
-
[1m[33m(!) [plugin typescript] src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx (61:35): @rollup/plugin-typescript TS2307: Cannot find module '../../../../types' or its corresponding type declarations.[39m[22m
|
|
7
|
-
[1m/home/runner/work/hero-design/hero-design/packages/rn/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx:61:35[22m
|
|
8
|
-
[90m
|
|
9
|
-
[7m61[0m import { RichTextEditorRef } from "../../../../types";
|
|
10
|
-
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~[0m
|
|
11
|
-
[39m
|
|
12
|
-
[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
|
|
13
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [1m52.7s[22m[39m
|
|
File without changes
|