@hero-design/rn 7.23.0 → 7.24.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 +2 -2
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +857 -8825
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +858 -8824
- package/package.json +6 -4
- package/rollup.config.js +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
- package/src/components/Empty/index.tsx +1 -2
- package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -0
- package/src/components/Icon/HeroIcon/index.tsx +3 -7
- package/src/components/Icon/IconList.ts +8 -5
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -4
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Spinner/AnimatedSpinner.tsx +22 -7
- package/src/components/Spinner/StyledSpinner.tsx +16 -11
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +3 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +42 -31
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +532 -72
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Spinner/index.tsx +6 -1
- package/src/components/Swipeable/StyledSwipeable.tsx +11 -0
- package/src/components/Swipeable/SwipeableAction.tsx +45 -0
- package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +37 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +130 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
- package/src/components/Swipeable/__tests__/index.spec.tsx +34 -0
- package/src/components/Swipeable/index.tsx +148 -0
- package/src/components/TextInput/StyledTextInput.tsx +6 -12
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +12 -6
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -138
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -124
- package/src/components/TextInput/index.tsx +7 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
- package/src/index.ts +4 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +11 -6
- package/src/theme/components/spinner.ts +4 -1
- package/src/theme/components/swipeable.ts +13 -0
- package/src/theme/components/textInput.ts +0 -5
- package/src/theme/getTheme.ts +3 -0
- package/src/theme/global/colors/jobs.ts +0 -1
- package/src/theme/global/colors/work.ts +0 -2
- package/src/types.ts +2 -0
- package/testUtils/setup.tsx +13 -0
- package/types/components/Empty/index.d.ts +1 -2
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +4 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
- package/types/components/Spinner/StyledSpinner.d.ts +1 -0
- package/types/components/Spinner/index.d.ts +5 -1
- package/types/components/Swipeable/StyledSwipeable.d.ts +10 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +27 -0
- package/types/components/Swipeable/index.d.ts +41 -0
- package/types/components/TextInput/StyledTextInput.d.ts +2 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.d.ts +3 -2
- package/types/theme/components/spinner.d.ts +4 -1
- package/types/theme/components/swipeable.d.ts +9 -0
- package/types/theme/components/textInput.d.ts +0 -5
- package/types/theme/getTheme.d.ts +2 -0
- package/types/types.d.ts +2 -1
- package/src/components/Icon/HeroIcon/selection.json +0 -7029
package/src/theme/getTheme.ts
CHANGED
|
@@ -28,6 +28,7 @@ import getSectionHeadingTheme from './components/sectionHeading';
|
|
|
28
28
|
import getSelectTheme from './components/select';
|
|
29
29
|
import getSliderTheme from './components/slider';
|
|
30
30
|
import getSpinnerTheme from './components/spinner';
|
|
31
|
+
import getSwipeableTheme from './components/swipeable';
|
|
31
32
|
import getSwitchTheme from './components/switch';
|
|
32
33
|
import getTabsTheme from './components/tabs';
|
|
33
34
|
import getTagTheme from './components/tag';
|
|
@@ -69,6 +70,7 @@ type Theme = GlobalTheme & {
|
|
|
69
70
|
select: ReturnType<typeof getSelectTheme>;
|
|
70
71
|
slider: ReturnType<typeof getSliderTheme>;
|
|
71
72
|
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
73
|
+
swipeable: ReturnType<typeof getSwipeableTheme>;
|
|
72
74
|
switch: ReturnType<typeof getSwitchTheme>;
|
|
73
75
|
tabs: ReturnType<typeof getTabsTheme>;
|
|
74
76
|
tag: ReturnType<typeof getTagTheme>;
|
|
@@ -116,6 +118,7 @@ const getTheme = (
|
|
|
116
118
|
select: getSelectTheme(globalTheme),
|
|
117
119
|
slider: getSliderTheme(globalTheme),
|
|
118
120
|
spinner: getSpinnerTheme(globalTheme),
|
|
121
|
+
swipeable: getSwipeableTheme(globalTheme),
|
|
119
122
|
switch: getSwitchTheme(globalTheme),
|
|
120
123
|
tabs: getTabsTheme(globalTheme),
|
|
121
124
|
tag: getTagTheme(globalTheme),
|
|
@@ -7,7 +7,6 @@ const jobsSystemPalette: SystemPalette = {
|
|
|
7
7
|
|
|
8
8
|
primary: palette.hitPink,
|
|
9
9
|
mutedPrimary: palette.hitPinkLight90,
|
|
10
|
-
onPrimary: palette.maasstrichtBlue,
|
|
11
10
|
secondary: palette.apple,
|
|
12
11
|
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
13
12
|
disabledSecondary: palette.hitPinkLight50,
|
|
@@ -7,9 +7,7 @@ const workSystemPalette: SystemPalette = {
|
|
|
7
7
|
|
|
8
8
|
primary: palette.gold,
|
|
9
9
|
mutedPrimary: palette.goldLight90,
|
|
10
|
-
onPrimary: palette.maasstrichtBlue,
|
|
11
10
|
secondary: palette.violet,
|
|
12
|
-
onSecondary: palette.white,
|
|
13
11
|
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
14
12
|
disabledSecondary: palette.violetLight50,
|
|
15
13
|
highlightedSurface: palette.violetLight80,
|
package/src/types.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
ListRenderOptionInfo,
|
|
13
13
|
SectionListRenderOptionInfo,
|
|
14
14
|
} from './components/Select/types';
|
|
15
|
+
import { SwipeableProps } from './components/Swipeable';
|
|
15
16
|
|
|
16
17
|
export type {
|
|
17
18
|
BottomNavigationTabType,
|
|
@@ -20,6 +21,7 @@ export type {
|
|
|
20
21
|
MultiSelectProps,
|
|
21
22
|
ListRenderOptionInfo,
|
|
22
23
|
SectionListRenderOptionInfo,
|
|
24
|
+
SwipeableProps,
|
|
23
25
|
RichTextEditorProps,
|
|
24
26
|
RichTextEditorRef,
|
|
25
27
|
TabType,
|
package/testUtils/setup.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* eslint-disable react/prefer-stateless-function */
|
|
4
4
|
/* eslint-disable max-classes-per-file */
|
|
5
5
|
jest.mock('react-native-vector-icons', () => ({
|
|
6
|
+
createIconSet: jest.fn(() => 'HeroIcon'),
|
|
6
7
|
createIconSetFromIcoMoon: jest.fn(() => 'HeroIcon'),
|
|
7
8
|
}));
|
|
8
9
|
|
|
@@ -83,4 +84,16 @@ jest.mock('react-native-webview', () => {
|
|
|
83
84
|
|
|
84
85
|
jest.mock('hero-editor/dist/app.js', () => ({ default: '' }));
|
|
85
86
|
|
|
87
|
+
jest.mock('react-native-gesture-handler', () => {
|
|
88
|
+
const ReactNative = jest.requireActual('react-native');
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
Swipeable: ReactNative.View,
|
|
92
|
+
GestureHandlerRootView: ReactNative.View,
|
|
93
|
+
FlatList: ReactNative.FlatList,
|
|
94
|
+
RectButton: ReactNative.Button,
|
|
95
|
+
TouchableOpacity: ReactNative.TouchableOpacity,
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
|
|
86
99
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const IconList: readonly ["activate", "add-emoji", "add-person", "adjustment", "alignment", "archive", "bank", "bell", "billing", "bookmark", "box-check", "box", "buildings", "cake", "calendar-clock", "calendar", "candy-box-menu", "carat-down-small", "carat-down", "carat-left", "carat-right", "carat-up", "circle-add", "circle-cancel", "circle-check", "circle-down", "circle-info", "circle-left", "circle-ok", "circle-pencil", "circle-question", "circle-remove", "circle-right", "circle-up", "circle-warning", "clock", "clock
|
|
1
|
+
declare const IconList: readonly ["activate", "add-emoji", "add-person", "adjustment", "alignment", "archive", "bank", "bell", "billing", "bookmark", "box-check", "box", "buildings", "cake", "calendar-clock", "calendar", "candy-box-menu", "carat-down-small", "carat-down", "carat-left", "carat-right", "carat-up", "circle-add", "circle-cancel", "circle-check", "circle-down", "circle-info", "circle-left", "circle-ok", "circle-pencil", "circle-question", "circle-remove", "circle-right", "circle-up", "circle-warning", "clock-3", "clock", "cloud-download", "cloud-upload", "cog", "coin", "contacts", "credit-card", "diamond", "direction-arrows", "directory", "document", "dollar-coin-shine", "double-buildings", "edit-template", "envelope", "expense", "eye-circle", "eye-invisible", "eye", "face-meh", "face-sad", "face-smiley", "feed", "feedbacks", "file-certified", "file-clone", "file-copy", "file-csv", "file-dispose", "file-doc", "file-excel", "file-export", "file-lock", "file-pdf", "file-powerpoint", "file-search", "file-secured", "file-sheets", "file-slide", "file-verified", "file-word", "file", "folder-user", "folder", "format-bold", "format-heading1", "format-heading2", "format-italic", "format-list-bulleted", "format-list-numbered", "format-underlined", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading-2", "loading", "location", "lock", "looks-one", "looks-two", "mandatory", "media-content", "menu", "moneybag", "moon", "multiple-stars", "multiple-users", "node", "open-folder", "paperclip", "payment-summary", "pencil", "phone", "piggy-bank", "plane", "play-circle", "print", "raising-hands", "rectangle-mandatory", "reply-arrow", "reply", "reschedule", "rostering", "save", "schedule-send", "schedule", "search-person", "send", "speaker", "star-award", "star-badge", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "warning", "activate-outlined", "add-person-outlined", "add-section-outlined", "add-time-outlined", "add", "adjustment-outlined", "alignment-2-outlined", "alignment-outlined", "all-caps", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "at-sign", "bell-outlined", "billing-outlined", "body-outlined", "bold", "bookmark-outlined", "box-check-outlined", "box-outlined", "bullet-points", "cake-outlined", "calendar-dates-outlined", "calendar-star-outlined", "camera-outlined", "cancel", "checkmark", "circle-add-outlined", "circle-cancel-outlined", "circle-down-outlined", "circle-info-outlined", "circle-left-outlined", "circle-ok-outlined", "circle-question-outlined", "circle-remove-outlined", "circle-right-outlined", "circle-up-outlined", "circle-warning-outlined", "clock-2-outlined", "clock-outlined", "cog-outlined", "coin-outlined", "comment-outlined", "contacts-outlined", "credit-card-outlined", "direction-arrows-outlined", "directory-outlined", "document-outlined", "dollar-coin-shine-outlined", "dollar-sign", "double-buildings-outlined", "double-left-arrows", "double-right-arrows", "download-outlined", "edit-template-outlined", "email-outlined", "enter-arrow", "envelope-outlined", "expense-outlined", "external-link", "eye-invisible-outlined", "eye-outlined", "face-id", "face-meh-outlined", "face-open-smiley-outlined", "face-sad-outlined", "face-smiley-outlined", "feed-outlined", "file-certified-outlined", "file-clone-outlined", "file-copy-outlined", "file-dispose-outlined", "file-download-outlined", "file-export-outlined", "file-lock-outlined", "file-outlined", "file-search-outlined", "file-secured-outlined", "file-verified-outlined", "filter-outlined", "folder-outlined", "folder-user-outlined", "funnel-filter-outline", "graph-outlined", "happy-sun-outlined", "health-bag-outlined", "heart-outlined", "home-outlined", "image-outlined", "import-outlined", "instapay-outlined", "italic", "link-1", "link-2", "list-outlined", "location-outlined", "lock-outlined", "locked-file-outlined", "log-out", "media-content-outlined", "menu-close", "menu-expand", "menu-fold-outlined", "menu-unfold-outlined", "moneybag-outlined", "moon-outlined", "more-horizontal", "more-vertical", "multiple-folders-outlined", "multiple-users-outlined", "node-outlined", "number-points", "number", "payment-summary-outlined", "payslip-outlined", "pencil-outlined", "percentage", "phone-outlined", "piggy-bank-outlined", "plane-outlined", "play-circle-outlined", "print-outlined", "qr-code-outlined", "re-assign", "redeem", "refresh", "remove", "reply-outlined", "restart", "return-arrow", "rostering-outlined", "save-outlined", "schedule-outlined", "search-outlined", "send-outlined", "share-1", "share-2", "single-down-arrow", "single-left-arrow", "single-right-arrow", "single-up-arrow", "speaker-outlined", "star-outlined", "stopwatch-outlined", "strikethrough", "suitcase-outlined", "survey-outlined", "switch-outlined", "sync", "target-outlined", "timesheet-outlined", "transfer", "trash-bin-outlined", "trash-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined"];
|
|
2
2
|
export default IconList;
|
|
@@ -27,5 +27,8 @@ export interface IconProps {
|
|
|
27
27
|
*/
|
|
28
28
|
testID?: string;
|
|
29
29
|
}
|
|
30
|
-
declare const Icon:
|
|
30
|
+
declare const Icon: {
|
|
31
|
+
({ icon, style, size, intent, testID, spin, }: IconProps): JSX.Element;
|
|
32
|
+
List: readonly ["activate", "add-emoji", "add-person", "adjustment", "alignment", "archive", "bank", "bell", "billing", "bookmark", "box-check", "box", "buildings", "cake", "calendar-clock", "calendar", "candy-box-menu", "carat-down-small", "carat-down", "carat-left", "carat-right", "carat-up", "circle-add", "circle-cancel", "circle-check", "circle-down", "circle-info", "circle-left", "circle-ok", "circle-pencil", "circle-question", "circle-remove", "circle-right", "circle-up", "circle-warning", "clock-3", "clock", "cloud-download", "cloud-upload", "cog", "coin", "contacts", "credit-card", "diamond", "direction-arrows", "directory", "document", "dollar-coin-shine", "double-buildings", "edit-template", "envelope", "expense", "eye-circle", "eye-invisible", "eye", "face-meh", "face-sad", "face-smiley", "feed", "feedbacks", "file-certified", "file-clone", "file-copy", "file-csv", "file-dispose", "file-doc", "file-excel", "file-export", "file-lock", "file-pdf", "file-powerpoint", "file-search", "file-secured", "file-sheets", "file-slide", "file-verified", "file-word", "file", "folder-user", "folder", "format-bold", "format-heading1", "format-heading2", "format-italic", "format-list-bulleted", "format-list-numbered", "format-underlined", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading-2", "loading", "location", "lock", "looks-one", "looks-two", "mandatory", "media-content", "menu", "moneybag", "moon", "multiple-stars", "multiple-users", "node", "open-folder", "paperclip", "payment-summary", "pencil", "phone", "piggy-bank", "plane", "play-circle", "print", "raising-hands", "rectangle-mandatory", "reply-arrow", "reply", "reschedule", "rostering", "save", "schedule-send", "schedule", "search-person", "send", "speaker", "star-award", "star-badge", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "warning", "activate-outlined", "add-person-outlined", "add-section-outlined", "add-time-outlined", "add", "adjustment-outlined", "alignment-2-outlined", "alignment-outlined", "all-caps", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "at-sign", "bell-outlined", "billing-outlined", "body-outlined", "bold", "bookmark-outlined", "box-check-outlined", "box-outlined", "bullet-points", "cake-outlined", "calendar-dates-outlined", "calendar-star-outlined", "camera-outlined", "cancel", "checkmark", "circle-add-outlined", "circle-cancel-outlined", "circle-down-outlined", "circle-info-outlined", "circle-left-outlined", "circle-ok-outlined", "circle-question-outlined", "circle-remove-outlined", "circle-right-outlined", "circle-up-outlined", "circle-warning-outlined", "clock-2-outlined", "clock-outlined", "cog-outlined", "coin-outlined", "comment-outlined", "contacts-outlined", "credit-card-outlined", "direction-arrows-outlined", "directory-outlined", "document-outlined", "dollar-coin-shine-outlined", "dollar-sign", "double-buildings-outlined", "double-left-arrows", "double-right-arrows", "download-outlined", "edit-template-outlined", "email-outlined", "enter-arrow", "envelope-outlined", "expense-outlined", "external-link", "eye-invisible-outlined", "eye-outlined", "face-id", "face-meh-outlined", "face-open-smiley-outlined", "face-sad-outlined", "face-smiley-outlined", "feed-outlined", "file-certified-outlined", "file-clone-outlined", "file-copy-outlined", "file-dispose-outlined", "file-download-outlined", "file-export-outlined", "file-lock-outlined", "file-outlined", "file-search-outlined", "file-secured-outlined", "file-verified-outlined", "filter-outlined", "folder-outlined", "folder-user-outlined", "funnel-filter-outline", "graph-outlined", "happy-sun-outlined", "health-bag-outlined", "heart-outlined", "home-outlined", "image-outlined", "import-outlined", "instapay-outlined", "italic", "link-1", "link-2", "list-outlined", "location-outlined", "lock-outlined", "locked-file-outlined", "log-out", "media-content-outlined", "menu-close", "menu-expand", "menu-fold-outlined", "menu-unfold-outlined", "moneybag-outlined", "moon-outlined", "more-horizontal", "more-vertical", "multiple-folders-outlined", "multiple-users-outlined", "node-outlined", "number-points", "number", "payment-summary-outlined", "payslip-outlined", "pencil-outlined", "percentage", "phone-outlined", "piggy-bank-outlined", "plane-outlined", "play-circle-outlined", "print-outlined", "qr-code-outlined", "re-assign", "redeem", "refresh", "remove", "reply-outlined", "restart", "return-arrow", "rostering-outlined", "save-outlined", "schedule-outlined", "search-outlined", "send-outlined", "share-1", "share-2", "single-down-arrow", "single-left-arrow", "single-right-arrow", "single-up-arrow", "speaker-outlined", "star-outlined", "stopwatch-outlined", "strikethrough", "suitcase-outlined", "survey-outlined", "switch-outlined", "sync", "target-outlined", "timesheet-outlined", "transfer", "trash-bin-outlined", "trash-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined"];
|
|
33
|
+
};
|
|
31
34
|
export default Icon;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const isHeroIcon: (x: any) => x is "number" | "swag" | "bold" | "menu" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "archive" | "bank" | "bell" | "billing" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "carat-down-small" | "carat-down" | "carat-left" | "carat-right" | "carat-up" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock" | "clock
|
|
1
|
+
declare const isHeroIcon: (x: any) => x is "number" | "swag" | "bold" | "menu" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "archive" | "bank" | "bell" | "billing" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "carat-down-small" | "carat-down" | "carat-left" | "carat-right" | "carat-up" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock-3" | "clock" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "directory" | "document" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "feed" | "feedbacks" | "file-certified" | "file-clone" | "file-copy" | "file-csv" | "file-dispose" | "file-doc" | "file-excel" | "file-export" | "file-lock" | "file-pdf" | "file-powerpoint" | "file-search" | "file-secured" | "file-sheets" | "file-slide" | "file-verified" | "file-word" | "file" | "folder-user" | "folder" | "format-bold" | "format-heading1" | "format-heading2" | "format-italic" | "format-list-bulleted" | "format-list-numbered" | "format-underlined" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading-2" | "loading" | "location" | "lock" | "looks-one" | "looks-two" | "mandatory" | "media-content" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "rectangle-mandatory" | "reply-arrow" | "reply" | "reschedule" | "rostering" | "save" | "schedule-send" | "schedule" | "search-person" | "send" | "speaker" | "star-award" | "star-badge" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "tag" | "target" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "user" | "video-1" | "video-2" | "activate-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell-outlined" | "billing-outlined" | "body-outlined" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "camera-outlined" | "cancel" | "checkmark" | "circle-add-outlined" | "circle-cancel-outlined" | "circle-down-outlined" | "circle-info-outlined" | "circle-left-outlined" | "circle-ok-outlined" | "circle-question-outlined" | "circle-remove-outlined" | "circle-right-outlined" | "circle-up-outlined" | "circle-warning-outlined" | "clock-2-outlined" | "clock-outlined" | "cog-outlined" | "coin-outlined" | "comment-outlined" | "contacts-outlined" | "credit-card-outlined" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-coin-shine-outlined" | "dollar-sign" | "double-buildings-outlined" | "double-left-arrows" | "double-right-arrows" | "download-outlined" | "edit-template-outlined" | "email-outlined" | "enter-arrow" | "envelope-outlined" | "expense-outlined" | "external-link" | "eye-invisible-outlined" | "eye-outlined" | "face-id" | "face-meh-outlined" | "face-open-smiley-outlined" | "face-sad-outlined" | "face-smiley-outlined" | "feed-outlined" | "file-certified-outlined" | "file-clone-outlined" | "file-copy-outlined" | "file-dispose-outlined" | "file-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-verified-outlined" | "filter-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-outlined" | "location-outlined" | "lock-outlined" | "locked-file-outlined" | "log-out" | "media-content-outlined" | "menu-close" | "menu-expand" | "menu-fold-outlined" | "menu-unfold-outlined" | "moneybag-outlined" | "moon-outlined" | "more-horizontal" | "more-vertical" | "multiple-folders-outlined" | "multiple-users-outlined" | "node-outlined" | "number-points" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "re-assign" | "redeem" | "refresh" | "remove" | "reply-outlined" | "restart" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "send-outlined" | "share-1" | "share-2" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "suitcase-outlined" | "survey-outlined" | "switch-outlined" | "sync" | "target-outlined" | "timesheet-outlined" | "transfer" | "trash-bin-outlined" | "trash-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined";
|
|
2
2
|
export { isHeroIcon };
|
|
@@ -27,6 +27,7 @@ declare const StyledSpinnerDot: import("@emotion/native").StyledComponent<ViewPr
|
|
|
27
27
|
} & {
|
|
28
28
|
themePosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
29
29
|
themeSize: 'small' | 'medium';
|
|
30
|
+
themeIntent: 'primary' | 'inverted';
|
|
30
31
|
}, {}, {
|
|
31
32
|
ref?: import("react").Ref<View>;
|
|
32
33
|
}>;
|
|
@@ -5,10 +5,14 @@ interface SpinnerProps extends ViewProps {
|
|
|
5
5
|
* Size of Spinner.
|
|
6
6
|
*/
|
|
7
7
|
size?: 'small' | 'medium';
|
|
8
|
+
/**
|
|
9
|
+
* Spinner's variant.
|
|
10
|
+
*/
|
|
11
|
+
intent?: 'primary' | 'inverted';
|
|
8
12
|
/**
|
|
9
13
|
* Testing id of the component.
|
|
10
14
|
*/
|
|
11
15
|
testID?: string;
|
|
12
16
|
}
|
|
13
|
-
declare const Spinner: ({ testID, size, ...nativeProps }: SpinnerProps) => ReactElement;
|
|
17
|
+
declare const Spinner: ({ testID, size, intent, ...nativeProps }: SpinnerProps) => ReactElement;
|
|
14
18
|
export default Spinner;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TouchableOpacity } from 'react-native';
|
|
2
|
+
export declare type ActionIntent = 'primary' | 'success' | 'danger';
|
|
3
|
+
export declare const StyledRectButton: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: import("react").ElementType<any>;
|
|
6
|
+
} & {
|
|
7
|
+
themeIntent: ActionIntent;
|
|
8
|
+
}, {}, {
|
|
9
|
+
ref?: import("react").Ref<TouchableOpacity>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { ActionIntent } from './StyledSwipeable';
|
|
4
|
+
export interface SwipeableActionProps {
|
|
5
|
+
/**
|
|
6
|
+
* Visual intent color applied to action.
|
|
7
|
+
*/
|
|
8
|
+
intent?: ActionIntent;
|
|
9
|
+
/**
|
|
10
|
+
* Callback when the action button is pressed.
|
|
11
|
+
*/
|
|
12
|
+
onPress?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Action button's content
|
|
15
|
+
*/
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Additional style.
|
|
19
|
+
*/
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
/**
|
|
22
|
+
* Testing id of the component.
|
|
23
|
+
*/
|
|
24
|
+
testID?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const SwipeableAction: ({ intent, onPress, style, children, testID, }: SwipeableActionProps) => JSX.Element;
|
|
27
|
+
export default SwipeableAction;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { SwipeableProps as RnghSwipeableProps } from 'react-native-gesture-handler/Swipeable';
|
|
3
|
+
import { RectButton } from 'react-native-gesture-handler';
|
|
4
|
+
declare type State = 'closed' | 'leftOpen' | 'rightOpen';
|
|
5
|
+
export interface SwipeableProps extends Pick<RnghSwipeableProps, 'enableTrackpadTwoFingerGesture' | 'friction' | 'leftThreshold' | 'rightThreshold' | 'overshootLeft' | 'overshootRight' | 'overshootFriction' | 'useNativeAnimations' | 'containerStyle' | 'childrenContainerStyle'> {
|
|
6
|
+
/**
|
|
7
|
+
* React node that is swipeable.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* State of the component.
|
|
12
|
+
*/
|
|
13
|
+
state?: 'closed' | 'leftOpen' | 'rightOpen';
|
|
14
|
+
/**
|
|
15
|
+
* Callback when the state of the component changes.
|
|
16
|
+
*/
|
|
17
|
+
onStateChange?: (state: State) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Action panel that is going to be revealed from the left side when user swipes right.
|
|
20
|
+
*/
|
|
21
|
+
leftActions?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Width of the left action panel.
|
|
24
|
+
* By default, it will take up the whole width of the device.
|
|
25
|
+
*/
|
|
26
|
+
leftActionsWidth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Action panel that is going to be revealed from the right side when user swipes left.
|
|
29
|
+
*/
|
|
30
|
+
rightActions?: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Width of the right action panel.
|
|
33
|
+
* By default, it will take up the whole width of the device.
|
|
34
|
+
*/
|
|
35
|
+
rightActionsWidth?: number;
|
|
36
|
+
}
|
|
37
|
+
declare const _default: (({ children, state, onStateChange, leftActions, leftActionsWidth, rightActions, rightActionsWidth, ...swipeableProps }: SwipeableProps) => JSX.Element) & {
|
|
38
|
+
Action: ({ intent, onPress, style, children, testID, }: import("./SwipeableAction").SwipeableActionProps) => JSX.Element;
|
|
39
|
+
Content: typeof RectButton;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextInput, View } from 'react-native';
|
|
2
|
-
export declare type Variant = 'default' | 'filled' | '
|
|
2
|
+
export declare type Variant = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
|
|
3
3
|
declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
@@ -73,6 +73,7 @@ declare const StyledBorderBackDrop: import("@emotion/native").StyledComponent<im
|
|
|
73
73
|
as?: import("react").ElementType<any>;
|
|
74
74
|
} & {
|
|
75
75
|
themeVariant: Variant;
|
|
76
|
+
themeFocused: boolean;
|
|
76
77
|
}, {}, {
|
|
77
78
|
ref?: import("react").Ref<View>;
|
|
78
79
|
}>;
|
|
@@ -53,7 +53,7 @@ export interface TextInputProps extends NativeTextInputProps {
|
|
|
53
53
|
helpText?: string;
|
|
54
54
|
renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
|
|
55
55
|
}
|
|
56
|
-
export declare const getVariant: ({ disabled, error, editable, loading,
|
|
56
|
+
export declare const getVariant: ({ disabled, error, editable, loading, isEmptyValue, }: {
|
|
57
57
|
disabled?: boolean;
|
|
58
58
|
error?: string;
|
|
59
59
|
editable?: boolean;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette } from './theme';
|
|
1
|
+
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette, ThemeSwitcher } from './theme';
|
|
2
2
|
import { scale } from './utils/scale';
|
|
3
3
|
import Accordion from './components/Accordion';
|
|
4
4
|
import Alert from './components/Alert';
|
|
@@ -25,6 +25,7 @@ import PinInput from './components/PinInput';
|
|
|
25
25
|
import Progress from './components/Progress';
|
|
26
26
|
import Slider from './components/Slider';
|
|
27
27
|
import Spinner from './components/Spinner';
|
|
28
|
+
import Swipeable from './components/Swipeable';
|
|
28
29
|
import Radio from './components/Radio';
|
|
29
30
|
import SectionHeading from './components/SectionHeading';
|
|
30
31
|
import Select from './components/Select';
|
|
@@ -38,5 +39,5 @@ import Toolbar from './components/Toolbar';
|
|
|
38
39
|
import Typography from './components/Typography';
|
|
39
40
|
import RefreshControl from './components/RefreshControl';
|
|
40
41
|
import RichTextEditor from './components/RichTextEditor';
|
|
41
|
-
export { theme, getTheme, useTheme, scale, ThemeProvider, swagSystemPalette, workSystemPalette, jobsSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
|
|
42
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
|
|
42
43
|
export * from './types';
|
|
@@ -8,7 +8,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
8
8
|
disabled: string;
|
|
9
9
|
readonly: string;
|
|
10
10
|
filled: string;
|
|
11
|
-
focused: string;
|
|
12
11
|
};
|
|
13
12
|
error: string;
|
|
14
13
|
placeholderIfNotFocused: string;
|
|
@@ -23,7 +22,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
23
22
|
disabled: string;
|
|
24
23
|
readonly: string;
|
|
25
24
|
filled: string;
|
|
26
|
-
focused: string;
|
|
27
25
|
};
|
|
28
26
|
labels: {
|
|
29
27
|
default: string;
|
|
@@ -31,7 +29,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
31
29
|
disabled: string;
|
|
32
30
|
readonly: string;
|
|
33
31
|
filled: string;
|
|
34
|
-
focused: string;
|
|
35
32
|
};
|
|
36
33
|
labelsInsideTextInput: {
|
|
37
34
|
default: string;
|
|
@@ -39,7 +36,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
39
36
|
disabled: string;
|
|
40
37
|
readonly: string;
|
|
41
38
|
filled: string;
|
|
42
|
-
focused: string;
|
|
43
39
|
};
|
|
44
40
|
maxLengthLabels: {
|
|
45
41
|
default: string;
|
|
@@ -47,7 +43,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
|
|
|
47
43
|
disabled: string;
|
|
48
44
|
readonly: string;
|
|
49
45
|
filled: string;
|
|
50
|
-
focused: string;
|
|
51
46
|
};
|
|
52
47
|
};
|
|
53
48
|
space: {
|
|
@@ -26,6 +26,7 @@ import getSectionHeadingTheme from './components/sectionHeading';
|
|
|
26
26
|
import getSelectTheme from './components/select';
|
|
27
27
|
import getSliderTheme from './components/slider';
|
|
28
28
|
import getSpinnerTheme from './components/spinner';
|
|
29
|
+
import getSwipeableTheme from './components/swipeable';
|
|
29
30
|
import getSwitchTheme from './components/switch';
|
|
30
31
|
import getTabsTheme from './components/tabs';
|
|
31
32
|
import getTagTheme from './components/tag';
|
|
@@ -65,6 +66,7 @@ declare type Theme = GlobalTheme & {
|
|
|
65
66
|
select: ReturnType<typeof getSelectTheme>;
|
|
66
67
|
slider: ReturnType<typeof getSliderTheme>;
|
|
67
68
|
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
69
|
+
swipeable: ReturnType<typeof getSwipeableTheme>;
|
|
68
70
|
switch: ReturnType<typeof getSwitchTheme>;
|
|
69
71
|
tabs: ReturnType<typeof getTabsTheme>;
|
|
70
72
|
tag: ReturnType<typeof getTagTheme>;
|
package/types/types.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ import type { TextInputProps } from './components/TextInput';
|
|
|
6
6
|
import type { RichTextEditorRef, RichTextEditorProps } from './components/RichTextEditor';
|
|
7
7
|
import type { Theme } from './theme';
|
|
8
8
|
import type { ListRenderOptionInfo, SectionListRenderOptionInfo } from './components/Select/types';
|
|
9
|
-
|
|
9
|
+
import { SwipeableProps } from './components/Swipeable';
|
|
10
|
+
export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, Theme, };
|