@neko-os/ui 0.0.7 → 0.0.9
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/NekoUI.js +1 -1
- package/dist/abstractions/ActivityIndicator.native.js +1 -1
- package/dist/abstractions/ActivityIndicator.web.js +1 -0
- package/dist/abstractions/AnimatedView.js +1 -1
- package/dist/abstractions/BlurView.js +1 -0
- package/dist/abstractions/BlurView.native.js +1 -0
- package/dist/abstractions/BlurView.web.js +1 -0
- package/dist/abstractions/FlatList.js +1 -0
- package/dist/abstractions/FlatList.native.js +1 -0
- package/dist/abstractions/FlatList.web.js +1 -0
- package/dist/abstractions/GradientView.js +1 -0
- package/dist/abstractions/GradientView.native.js +1 -0
- package/dist/abstractions/Icon.native.js +1 -1
- package/dist/abstractions/ImageBackground.js +1 -0
- package/dist/abstractions/ImageBackground.native.js +1 -0
- package/dist/abstractions/ImageBackground.web.js +1 -0
- package/dist/abstractions/Pressable.js +1 -0
- package/dist/abstractions/Pressable.native.js +1 -0
- package/dist/abstractions/Pressable.web.js +1 -0
- package/dist/abstractions/ScrollView.js +1 -0
- package/dist/abstractions/ScrollView.native.js +1 -0
- package/dist/abstractions/ScrollView.web.js +1 -0
- package/dist/abstractions/TextInput.js +1 -1
- package/dist/abstractions/helpers/storage.js +1 -0
- package/dist/abstractions/helpers/storage.native.js +1 -0
- package/dist/components/actions/Button.js +1 -1
- package/dist/components/actions/Dropdown.js +1 -1
- package/dist/components/actions/Link.js +1 -1
- package/dist/components/actions/Pressable.js +1 -0
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/menu/HorizontalMenu.js +1 -1
- package/dist/components/actions/menu/VerticalMenu.js +1 -1
- package/dist/components/animations/ReanimatedView.js +1 -0
- package/dist/components/calendar/CalendarNav.js +1 -0
- package/dist/components/calendar/WeekDaysBar.js +1 -0
- package/dist/components/calendar/_helpers/calendarDays.js +1 -1
- package/dist/components/calendar/_helpers/dateDisabled.js +1 -0
- package/dist/components/calendar/index.js +0 -1
- package/dist/components/feedback/alerter.js +1 -0
- package/dist/components/feedback/confirmer.js +1 -0
- package/dist/components/feedback/index.js +1 -1
- package/dist/components/feedback/notifications/Notification.js +1 -1
- package/dist/components/feedback/notifications/NotificationsHandler.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/inputs/DateInput.js +1 -0
- package/dist/components/inputs/InputWrapper.js +1 -1
- package/dist/components/inputs/LinkInput.js +1 -0
- package/dist/components/inputs/MaskInput.js +1 -0
- package/dist/components/inputs/TextInput.js +1 -1
- package/dist/components/inputs/_DateInput.native.js +1 -0
- package/dist/components/inputs/datePicker/DatePicker.js +1 -0
- package/dist/components/inputs/datePicker/DayPicker.js +1 -0
- package/dist/components/inputs/datePicker/MonthPicker.js +1 -0
- package/dist/components/inputs/datePicker/QuarterPicker.js +1 -0
- package/dist/components/inputs/datePicker/WeekPicker.js +1 -0
- package/dist/components/inputs/datePicker/YearPicker.js +1 -0
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/layout/Layout.js +1 -1
- package/dist/components/list/FlatList.js +1 -0
- package/dist/components/list/ScrollView.js +1 -0
- package/dist/components/list/index.js +1 -0
- package/dist/components/presentation/ImageBackground.js +1 -0
- package/dist/components/presentation/Result.js +1 -1
- package/dist/components/presentation/index.js +1 -1
- package/dist/components/state/LoadingView.js +1 -1
- package/dist/components/structure/Accordion.js +1 -1
- package/dist/components/structure/BlurView.js +1 -0
- package/dist/components/structure/GradientView.js +1 -0
- package/dist/components/structure/View.js +1 -1
- package/dist/components/structure/bottomDrawer/index.js +1 -0
- package/dist/components/structure/bottomDrawer/index.native.js +1 -0
- package/dist/components/structure/bottomDrawer/index.web.js +1 -0
- package/dist/components/structure/bottomDrawer/native/BottomDrawer.js +1 -0
- package/dist/components/structure/bottomDrawer/native/DrawerContext.js +1 -0
- package/dist/components/structure/bottomDrawer/native/DrawerHandle.js +1 -0
- package/dist/components/structure/bottomDrawer/native/DrawerScrollView.js +1 -0
- package/dist/components/structure/bottomDrawer/native/utils.js +1 -0
- package/dist/components/structure/bottomDrawer/web/BottomDrawer.js +1 -0
- package/dist/components/structure/drawer/Drawer.js +1 -0
- package/dist/components/structure/drawer/Drawer.native.js +1 -0
- package/dist/components/structure/drawer/index.js +1 -0
- package/dist/components/structure/index.js +1 -1
- package/dist/components/structure/modal/Modal.js +1 -0
- package/dist/components/structure/modal/Modal.native.js +1 -0
- package/dist/components/structure/modal/ModalBackdrop.js +1 -0
- package/dist/components/structure/modal/ModalContent.js +1 -0
- package/dist/components/structure/modal/ModalFooter.js +1 -0
- package/dist/components/structure/modal/ModalHeader.js +1 -0
- package/dist/components/structure/modal/handler/ModalsHandler.js +1 -0
- package/dist/components/structure/modal/index.js +1 -0
- package/dist/components/structure/overlay/OverlayWrapper.js +1 -1
- package/dist/components/structure/popover/Popover.js +1 -1
- package/dist/components/structure/popover/Popover.native.js +1 -1
- package/dist/components/theme/ThemePicker.js +1 -0
- package/dist/components/theme/ThemePickerDrawer.js +1 -0
- package/dist/components/theme/ThemeStatusBar.js +1 -0
- package/dist/components/theme/ThemeStatusBar.native.js +1 -0
- package/dist/components/theme/ThemeThumb.js +1 -0
- package/dist/components/theme/index.js +1 -0
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/storage.js +1 -0
- package/dist/modifiers/animations/animatedEffects.js +1 -1
- package/dist/modifiers/animations/animatedEffects.native.js +1 -1
- package/dist/modifiers/animations/fadeEffect.js +1 -1
- package/dist/modifiers/animations/scaleEffect.js +1 -0
- package/dist/modifiers/animations/scaleEffect.native.js +1 -0
- package/dist/modifiers/animations/slideEffect.js +1 -1
- package/dist/modifiers/background.js +1 -1
- package/dist/modifiers/cursor.js +1 -0
- package/dist/modifiers/display.js +1 -1
- package/dist/modifiers/fullColor.js +1 -1
- package/dist/modifiers/hover.js +1 -0
- package/dist/modifiers/position.js +1 -1
- package/dist/modifiers/size.js +1 -1
- package/dist/modifiers/state.js +1 -1
- package/dist/responsive/responsiveHooks.js +1 -1
- package/dist/theme/ThemeHandler.js +1 -1
- package/dist/theme/default/base.js +1 -1
- package/dist/theme/default/blackTheme.js +1 -0
- package/dist/theme/default/cyberpunkTheme.js +1 -1
- package/dist/theme/default/darkTheme.js +1 -1
- package/dist/theme/default/deepWoodsTheme.js +1 -1
- package/dist/theme/default/forestTheme.js +1 -1
- package/dist/theme/default/hackerTheme.js +1 -1
- package/dist/theme/default/lightTheme.js +1 -1
- package/dist/theme/default/midnightTheme.js +1 -1
- package/dist/theme/default/msdosTheme.js +1 -1
- package/dist/theme/default/oceanTheme.js +1 -1
- package/dist/theme/default/paperTheme.js +1 -0
- package/dist/theme/default/pastelTheme.js +1 -1
- package/dist/theme/default/sunsetTheme.js +1 -1
- package/dist/theme/default/themes.js +1 -1
- package/dist/theme/format/formatTheme.js +1 -1
- package/dist/theme/helpers/contrastColor.js +1 -1
- package/package.json +8 -3
- package/src/NekoUI.js +18 -3
- package/src/abstractions/ActivityIndicator.native.js +3 -4
- package/src/abstractions/ActivityIndicator.web.js +43 -0
- package/src/abstractions/AnimatedView.js +3 -3
- package/src/abstractions/BlurView.js +43 -0
- package/src/abstractions/BlurView.native.js +39 -0
- package/src/abstractions/BlurView.web.js +39 -0
- package/src/abstractions/FlatList.js +39 -0
- package/src/abstractions/FlatList.native.js +32 -0
- package/src/abstractions/FlatList.web.js +3 -0
- package/src/abstractions/GradientView.js +5 -0
- package/src/abstractions/GradientView.native.js +32 -0
- package/src/abstractions/Icon.native.js +4 -2
- package/src/abstractions/ImageBackground.js +17 -0
- package/src/abstractions/ImageBackground.native.js +27 -0
- package/src/abstractions/ImageBackground.web.js +7 -0
- package/src/abstractions/Pressable.js +4 -0
- package/src/abstractions/Pressable.native.js +3 -0
- package/src/abstractions/Pressable.web.js +3 -0
- package/src/abstractions/ScrollView.js +3 -0
- package/src/abstractions/ScrollView.native.js +5 -0
- package/src/abstractions/ScrollView.web.js +3 -0
- package/src/abstractions/Text.web.js +15 -0
- package/src/abstractions/TextInput.js +2 -2
- package/src/abstractions/helpers/storage.js +32 -0
- package/src/abstractions/helpers/storage.native.js +34 -0
- package/src/components/actions/Button.js +8 -0
- package/src/components/actions/Dropdown.js +18 -2
- package/src/components/actions/Link.js +16 -2
- package/src/components/actions/Pressable.js +38 -0
- package/src/components/actions/index.js +1 -0
- package/src/components/actions/menu/HorizontalMenu.js +2 -1
- package/src/components/actions/menu/VerticalMenu.js +5 -4
- package/src/components/animations/ReanimatedView.js +40 -0
- package/src/components/calendar/CalendarNav.js +67 -0
- package/src/components/calendar/WeekDaysBar.js +18 -0
- package/src/components/calendar/_helpers/calendarDays.js +1 -3
- package/src/components/calendar/_helpers/dateDisabled.js +24 -0
- package/src/components/calendar/index.js +1 -1
- package/src/components/feedback/alerter.js +31 -0
- package/src/components/feedback/confirmer.js +70 -0
- package/src/components/feedback/index.js +2 -0
- package/src/components/feedback/notifications/Notification.js +1 -1
- package/src/components/feedback/notifications/NotificationsHandler.js +3 -3
- package/src/components/index.js +2 -0
- package/src/components/inputs/DateInput.js +111 -0
- package/src/components/inputs/InputWrapper.js +18 -6
- package/src/components/inputs/LinkInput.js +17 -0
- package/src/components/inputs/MaskInput.js +67 -0
- package/src/components/inputs/TextInput.js +2 -2
- package/src/components/inputs/_DateInput.native.js +89 -0
- package/src/components/inputs/datePicker/DatePicker.js +24 -0
- package/src/components/inputs/datePicker/DayPicker.js +65 -0
- package/src/components/inputs/datePicker/MonthPicker.js +62 -0
- package/src/components/inputs/datePicker/QuarterPicker.js +65 -0
- package/src/components/inputs/datePicker/WeekPicker.js +74 -0
- package/src/components/inputs/datePicker/YearPicker.js +67 -0
- package/src/components/inputs/index.js +4 -0
- package/src/components/layout/Layout.js +1 -1
- package/src/components/list/FlatList.js +54 -0
- package/src/components/list/ScrollView.js +58 -0
- package/src/components/list/index.js +2 -0
- package/src/components/presentation/ImageBackground.js +38 -0
- package/src/components/presentation/Result.js +2 -2
- package/src/components/presentation/index.js +1 -0
- package/src/components/state/LoadingView.js +10 -1
- package/src/components/structure/Accordion.js +1 -1
- package/src/components/structure/BlurView.js +58 -0
- package/src/components/structure/GradientView.js +42 -0
- package/src/components/structure/View.js +2 -0
- package/src/components/structure/bottomDrawer/index.js +1 -0
- package/src/components/structure/bottomDrawer/index.native.js +4 -0
- package/src/components/structure/bottomDrawer/index.web.js +4 -0
- package/src/components/structure/bottomDrawer/native/BottomDrawer.js +242 -0
- package/src/components/structure/bottomDrawer/native/DrawerContext.js +21 -0
- package/src/components/structure/bottomDrawer/native/DrawerHandle.js +12 -0
- package/src/components/structure/bottomDrawer/native/DrawerScrollView.js +83 -0
- package/src/components/structure/bottomDrawer/native/utils.js +58 -0
- package/src/components/structure/bottomDrawer/web/BottomDrawer.js +3 -0
- package/src/components/structure/drawer/Drawer.js +5 -0
- package/src/components/structure/drawer/Drawer.native.js +3 -0
- package/src/components/structure/drawer/index.js +1 -0
- package/src/components/structure/index.js +5 -0
- package/src/components/structure/modal/Modal.js +84 -0
- package/src/components/structure/modal/Modal.native.js +83 -0
- package/src/components/structure/modal/ModalBackdrop.js +58 -0
- package/src/components/structure/modal/ModalContent.js +28 -0
- package/src/components/structure/modal/ModalFooter.js +31 -0
- package/src/components/structure/modal/ModalHeader.js +50 -0
- package/src/components/structure/modal/handler/ModalsHandler.js +61 -0
- package/src/components/structure/modal/index.js +6 -0
- package/src/components/structure/overlay/OverlayWrapper.js +1 -1
- package/src/components/structure/popover/Popover.js +37 -2
- package/src/components/structure/popover/Popover.native.js +46 -16
- package/src/components/theme/ThemePicker.js +49 -0
- package/src/components/theme/ThemePickerDrawer.js +13 -0
- package/src/components/theme/ThemeStatusBar.js +3 -0
- package/src/components/theme/ThemeStatusBar.native.js +9 -0
- package/src/components/theme/ThemeThumb.js +98 -0
- package/src/components/theme/index.js +3 -0
- package/src/helpers/index.js +1 -0
- package/src/helpers/storage.js +54 -0
- package/src/modifiers/animations/animatedEffects.js +2 -0
- package/src/modifiers/animations/animatedEffects.native.js +3 -1
- package/src/modifiers/animations/fadeEffect.js +4 -2
- package/src/modifiers/animations/scaleEffect.js +45 -0
- package/src/modifiers/animations/scaleEffect.native.js +33 -0
- package/src/modifiers/animations/slideEffect.js +3 -1
- package/src/modifiers/background.js +16 -4
- package/src/modifiers/cursor.js +21 -0
- package/src/modifiers/display.js +2 -2
- package/src/modifiers/fullColor.js +2 -2
- package/src/modifiers/hover.js +28 -0
- package/src/modifiers/position.js +24 -3
- package/src/modifiers/size.js +2 -1
- package/src/modifiers/state.js +1 -1
- package/src/responsive/responsiveHooks.js +7 -0
- package/src/theme/ThemeHandler.js +18 -2
- package/src/theme/default/base.js +6 -6
- package/src/theme/default/blackTheme.js +35 -0
- package/src/theme/default/cyberpunkTheme.js +4 -1
- package/src/theme/default/darkTheme.js +4 -1
- package/src/theme/default/deepWoodsTheme.js +5 -2
- package/src/theme/default/forestTheme.js +4 -1
- package/src/theme/default/hackerTheme.js +4 -1
- package/src/theme/default/lightTheme.js +4 -1
- package/src/theme/default/midnightTheme.js +4 -1
- package/src/theme/default/msdosTheme.js +19 -4
- package/src/theme/default/oceanTheme.js +5 -2
- package/src/theme/default/paperTheme.js +35 -0
- package/src/theme/default/pastelTheme.js +5 -2
- package/src/theme/default/sunsetTheme.js +7 -4
- package/src/theme/default/themes.js +9 -10
- package/src/theme/format/formatTheme.js +9 -3
- package/src/theme/helpers/contrastColor.js +49 -11
- package/dist/abstractions/TouchableOpacity.web.js +0 -1
- package/dist/components/calendar/DayPicker.js +0 -1
- package/src/abstractions/TouchableOpacity.web.js +0 -3
- package/src/components/calendar/DayPicker.js +0 -94
|
@@ -2,6 +2,8 @@ import { mergeDeepRight } from 'ramda'
|
|
|
2
2
|
import { BASE_THEME } from './base'
|
|
3
3
|
|
|
4
4
|
export const FOREST_MIST_THEME = mergeDeepRight(BASE_THEME, {
|
|
5
|
+
label: 'Forest Mist',
|
|
6
|
+
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#4CAF50',
|
|
7
9
|
text: '#0B2414',
|
|
@@ -9,8 +11,9 @@ export const FOREST_MIST_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
9
11
|
text3: '#1B5E20',
|
|
10
12
|
text4: '#388E3C',
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
mainBG: '#E9F5EC',
|
|
13
15
|
overlayBG: '#FFFFFF',
|
|
16
|
+
backdrop: '#E9F5EC',
|
|
14
17
|
shadow: 'rgba(39, 45, 52, 0.15)',
|
|
15
18
|
divider: 'rgba(0,0,0, 0.1)',
|
|
16
19
|
|
|
@@ -3,6 +3,8 @@ import { mergeDeepRight } from 'ramda'
|
|
|
3
3
|
import { BASE_THEME } from './base'
|
|
4
4
|
|
|
5
5
|
export const DEFAULT_MATRIX_THEME = mergeDeepRight(BASE_THEME, {
|
|
6
|
+
label: 'Hacker',
|
|
7
|
+
|
|
6
8
|
colors: {
|
|
7
9
|
primary: '#00FF41',
|
|
8
10
|
text: '#00FF41',
|
|
@@ -10,8 +12,9 @@ export const DEFAULT_MATRIX_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
10
12
|
text3: '#009926',
|
|
11
13
|
text4: '#00661A',
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
mainBG: '#000000',
|
|
14
16
|
overlayBG: '#0A0A0A',
|
|
17
|
+
backdrop: '#000000',
|
|
15
18
|
shadow: 'rgba(0, 255, 65, 0.2)',
|
|
16
19
|
divider: 'rgba(0,255,65, 0.3)',
|
|
17
20
|
|
|
@@ -2,6 +2,8 @@ import { mergeDeepRight } from 'ramda'
|
|
|
2
2
|
import { BASE_THEME } from './base'
|
|
3
3
|
|
|
4
4
|
export const DEFAULT_LIGHT_THEME = mergeDeepRight(BASE_THEME, {
|
|
5
|
+
label: 'Light',
|
|
6
|
+
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#818DF9',
|
|
7
9
|
text: '#272D34',
|
|
@@ -9,8 +11,9 @@ export const DEFAULT_LIGHT_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
9
11
|
text3: '#6E7680',
|
|
10
12
|
text4: '#9AA1AC',
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
mainBG: '#F4F5FE',
|
|
13
15
|
overlayBG: '#FFFFFF',
|
|
16
|
+
backdrop: '#383E44',
|
|
14
17
|
shadow: 'rgba(39, 45, 52, 0.15)',
|
|
15
18
|
divider: '#e0e0e0',
|
|
16
19
|
|
|
@@ -2,6 +2,8 @@ import { mergeDeepRight } from 'ramda'
|
|
|
2
2
|
import { BASE_THEME } from './base'
|
|
3
3
|
|
|
4
4
|
export const MIDNIGHT_NEON_THEME = mergeDeepRight(BASE_THEME, {
|
|
5
|
+
label: 'Midnight',
|
|
6
|
+
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#FF00FF',
|
|
7
9
|
text: '#F0F0F0',
|
|
@@ -9,8 +11,9 @@ export const MIDNIGHT_NEON_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
9
11
|
text3: '#A3A3A3',
|
|
10
12
|
text4: '#7A7A7A',
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
mainBG: '#0D0D0D',
|
|
13
15
|
overlayBG: '#1A1A1A',
|
|
16
|
+
backdrop: '#0D0D0D',
|
|
14
17
|
shadow: 'rgba(39, 45, 52, 0.6)',
|
|
15
18
|
divider: 'rgba(255,255,255, 0.2)',
|
|
16
19
|
|
|
@@ -3,15 +3,18 @@ import { mergeDeepRight } from 'ramda'
|
|
|
3
3
|
import { BASE_THEME } from './base'
|
|
4
4
|
|
|
5
5
|
export const DEFAULT_MSDOS_THEME = mergeDeepRight(BASE_THEME, {
|
|
6
|
+
label: 'MSDOS',
|
|
7
|
+
|
|
6
8
|
colors: {
|
|
7
9
|
primary: '#FFFF00',
|
|
8
10
|
text: '#FFFFFF',
|
|
9
|
-
text2: '#
|
|
10
|
-
text3: '#
|
|
11
|
-
text4: '#
|
|
11
|
+
text2: '#E0E0E0',
|
|
12
|
+
text3: '#B0B0B0',
|
|
13
|
+
text4: '#8A8A8A',
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
mainBG: '#0000AA',
|
|
14
16
|
overlayBG: '#000088',
|
|
17
|
+
backdrop: '#0000AA',
|
|
15
18
|
shadow: 'rgba(0, 0, 0, 0.6)',
|
|
16
19
|
divider: 'rgba(255,255,255,0.3)',
|
|
17
20
|
|
|
@@ -30,6 +33,18 @@ export const DEFAULT_MSDOS_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
30
33
|
pink: '#FF69B4',
|
|
31
34
|
},
|
|
32
35
|
|
|
36
|
+
radius: {
|
|
37
|
+
xxxs: 1,
|
|
38
|
+
xxs: 2,
|
|
39
|
+
xs: 3,
|
|
40
|
+
sm: 4,
|
|
41
|
+
md: 6,
|
|
42
|
+
lg: 8,
|
|
43
|
+
xl: 10,
|
|
44
|
+
xxl: 12,
|
|
45
|
+
xxxl: 14,
|
|
46
|
+
},
|
|
47
|
+
|
|
33
48
|
components: {
|
|
34
49
|
Card: {
|
|
35
50
|
border: 1,
|
|
@@ -2,15 +2,18 @@ import { mergeDeepRight } from 'ramda'
|
|
|
2
2
|
import { BASE_THEME } from './base'
|
|
3
3
|
|
|
4
4
|
export const OCEAN_BREEZE_THEME = mergeDeepRight(BASE_THEME, {
|
|
5
|
+
label: 'Ocean Breeze',
|
|
6
|
+
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#2B90D9',
|
|
7
|
-
text: '#
|
|
9
|
+
text: '#065277',
|
|
8
10
|
text2: '#065A82',
|
|
9
11
|
text3: '#0B84B4',
|
|
10
12
|
text4: '#3ABEFF',
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
mainBG: '#E6F7FF',
|
|
13
15
|
overlayBG: '#FFFFFF',
|
|
16
|
+
backdrop: '#04364A',
|
|
14
17
|
shadow: 'rgba(39, 45, 52, 0.15)',
|
|
15
18
|
divider: 'rgba(0,0,0, 0.1)',
|
|
16
19
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { mergeDeepRight } from 'ramda'
|
|
2
|
+
|
|
3
|
+
import { BASE_THEME } from './base'
|
|
4
|
+
|
|
5
|
+
export const DEFAULT_PAPER_THEME = mergeDeepRight(BASE_THEME, {
|
|
6
|
+
label: 'Paper',
|
|
7
|
+
|
|
8
|
+
colors: {
|
|
9
|
+
primary: '#5A5A5A',
|
|
10
|
+
text: '#000000',
|
|
11
|
+
text2: '#333333',
|
|
12
|
+
text3: '#555555',
|
|
13
|
+
text4: '#777777',
|
|
14
|
+
|
|
15
|
+
mainBG: '#F8F1E3',
|
|
16
|
+
overlayBG: '#F8F1E3',
|
|
17
|
+
backdrop: '#383E44',
|
|
18
|
+
shadow: 'rgba(0, 0, 0, 0.04)',
|
|
19
|
+
divider: '#E3D9C9',
|
|
20
|
+
|
|
21
|
+
blue: '#6B8EAE',
|
|
22
|
+
yellow: '#EADCA6',
|
|
23
|
+
green: '#88A288',
|
|
24
|
+
purple: '#A391B8',
|
|
25
|
+
orange: '#D9A066',
|
|
26
|
+
cyan: '#9CC9C2',
|
|
27
|
+
red: '#B85C5C',
|
|
28
|
+
navy: '#4A4A4A',
|
|
29
|
+
indigo: '#70788C',
|
|
30
|
+
gray: '#B8B8B8',
|
|
31
|
+
brown: '#8B7355',
|
|
32
|
+
lylac: '#C7B7D4',
|
|
33
|
+
pink: '#E4A1B2',
|
|
34
|
+
},
|
|
35
|
+
})
|
|
@@ -2,6 +2,8 @@ import { mergeDeepRight } from 'ramda'
|
|
|
2
2
|
import { BASE_THEME } from './base'
|
|
3
3
|
|
|
4
4
|
export const PASTEL_DREAM_THEME = mergeDeepRight(BASE_THEME, {
|
|
5
|
+
label: 'Pastel Dream',
|
|
6
|
+
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#FFB6C1',
|
|
7
9
|
text: '#4B4453',
|
|
@@ -9,10 +11,11 @@ export const PASTEL_DREAM_THEME = mergeDeepRight(BASE_THEME, {
|
|
|
9
11
|
text3: '#A093A6',
|
|
10
12
|
text4: '#C9BBCF',
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
mainBG: '#FFF7FA',
|
|
13
15
|
overlayBG: '#FFFFFF',
|
|
16
|
+
backdrop: '#4B4453',
|
|
14
17
|
shadow: 'rgba(39, 45, 52, 0.15)',
|
|
15
|
-
divider: '
|
|
18
|
+
divider: '#f0f0f0',
|
|
16
19
|
|
|
17
20
|
blue: '#A5B4FC',
|
|
18
21
|
yellow: '#FDE68A',
|
|
@@ -3,17 +3,20 @@ import { mergeDeepRight } from 'ramda'
|
|
|
3
3
|
import { BASE_THEME } from './base'
|
|
4
4
|
|
|
5
5
|
export const SUNSET_GLOW_THEME = mergeDeepRight(BASE_THEME, {
|
|
6
|
+
label: 'Sunset',
|
|
7
|
+
|
|
6
8
|
colors: {
|
|
7
9
|
primary: '#FF6B6B',
|
|
8
|
-
text: '#
|
|
10
|
+
text: '#4B372E',
|
|
9
11
|
text2: '#5C4033',
|
|
10
12
|
text3: '#8C5A43',
|
|
11
13
|
text4: '#B97A57',
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
overlayBG: '#
|
|
15
|
+
mainBG: '#FFF5E6',
|
|
16
|
+
overlayBG: '#FFFAF1',
|
|
17
|
+
backdrop: '#331E0A',
|
|
15
18
|
shadow: 'rgba(39, 45, 52, 0.15)',
|
|
16
|
-
divider: '
|
|
19
|
+
divider: '#f0f0f0',
|
|
17
20
|
|
|
18
21
|
blue: '#3B82F6',
|
|
19
22
|
yellow: '#FBBF24',
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { CYBERPUNK_DARK_THEME } from './cyberpunkTheme'
|
|
2
|
-
import {
|
|
2
|
+
import { DEFAULT_BLACK_THEME } from './blackTheme'
|
|
3
3
|
import { DEFAULT_DARK_THEME } from './darkTheme'
|
|
4
4
|
import { DEFAULT_LIGHT_THEME } from './lightTheme'
|
|
5
5
|
import { DEFAULT_MATRIX_THEME } from './hackerTheme'
|
|
6
6
|
import { DEFAULT_MSDOS_THEME } from './msdosTheme'
|
|
7
|
-
import {
|
|
7
|
+
import { DEFAULT_PAPER_THEME } from './paperTheme'
|
|
8
8
|
import { MIDNIGHT_NEON_THEME } from './midnightTheme'
|
|
9
|
-
import { OCEAN_BREEZE_THEME } from './oceanTheme'
|
|
10
|
-
import { PASTEL_DREAM_THEME } from './pastelTheme'
|
|
11
|
-
import { SUNSET_GLOW_THEME } from './sunsetTheme'
|
|
12
9
|
|
|
13
10
|
export const DEFAULT_THEMES = {
|
|
14
11
|
light: DEFAULT_LIGHT_THEME,
|
|
15
12
|
dark: DEFAULT_DARK_THEME,
|
|
16
|
-
|
|
13
|
+
paper: DEFAULT_PAPER_THEME,
|
|
14
|
+
black: DEFAULT_BLACK_THEME,
|
|
15
|
+
// pastel: PASTEL_DREAM_THEME,
|
|
17
16
|
midnight: MIDNIGHT_NEON_THEME,
|
|
18
|
-
sunset: SUNSET_GLOW_THEME,
|
|
19
|
-
ocean: OCEAN_BREEZE_THEME,
|
|
20
|
-
forest: FOREST_MIST_THEME,
|
|
17
|
+
// sunset: SUNSET_GLOW_THEME,
|
|
18
|
+
// ocean: OCEAN_BREEZE_THEME,
|
|
19
|
+
// forest: FOREST_MIST_THEME,
|
|
21
20
|
cyberpunk: CYBERPUNK_DARK_THEME,
|
|
22
|
-
deepWoods: DEEP_WOODS_DARK_THEME,
|
|
21
|
+
// deepWoods: DEEP_WOODS_DARK_THEME,
|
|
23
22
|
hacker: DEFAULT_MATRIX_THEME,
|
|
24
23
|
msdos: DEFAULT_MSDOS_THEME,
|
|
25
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { mergeDeepRight, pipe } from 'ramda'
|
|
1
|
+
import { mergeDeepRight, mergeDeepLeft, pipe } from 'ramda'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import tinycolor from 'tinycolor2'
|
|
3
4
|
|
|
4
5
|
import { DEFAULT_LIGHT_THEME } from '../default/lightTheme'
|
|
5
6
|
import { DEFAULT_THEMES } from '../default/themes'
|
|
@@ -15,8 +16,13 @@ export function formatTheme(themes, key) {
|
|
|
15
16
|
const theme = themes[key] || DEFAULT_THEMES[key] || DEFAULT_LIGHT_THEME
|
|
16
17
|
const baseDefaultTheme = DEFAULT_THEMES[theme.base] || DEFAULT_THEMES[key] || DEFAULT_LIGHT_THEME
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
const formattedTheme = pipe(
|
|
19
20
|
mergeDeepRight(baseDefaultTheme), //
|
|
20
|
-
applyColorVariantsOnTheme
|
|
21
|
+
applyColorVariantsOnTheme,
|
|
22
|
+
mergeDeepLeft(themes._all || {}) //
|
|
21
23
|
)({ ...theme })
|
|
24
|
+
|
|
25
|
+
const isDark = tinycolor(formattedTheme?.colors?.overlayBG || formattedTheme?.colors?.bg).isDark()
|
|
26
|
+
|
|
27
|
+
return { ...formattedTheme, isDark, isLight: !isDark }
|
|
22
28
|
}
|
|
@@ -3,18 +3,56 @@ import tinycolor from 'tinycolor2'
|
|
|
3
3
|
export function getContrastColor(bg, options = ['#FFFFFF', '#666666'], tolerance = 2.5) {
|
|
4
4
|
if (!options.length) return '#666666'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const contrasts = options.map((color) => ({
|
|
7
|
+
color,
|
|
8
|
+
contrast: tinycolor.readability(bg, color),
|
|
9
|
+
}))
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
// color,
|
|
10
|
-
// contrast: tinycolor.readability(bg, color),
|
|
11
|
-
// }))
|
|
11
|
+
contrasts.sort((a, b) => b.contrast - a.contrast)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
if (contrasts.length > 1 && Math.abs(contrasts[0].contrast - contrasts[1].contrast) < tolerance) {
|
|
14
|
+
return options[0]
|
|
15
|
+
}
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
// return options[0]
|
|
17
|
-
// }
|
|
18
|
-
|
|
19
|
-
// return contrasts[0].color
|
|
17
|
+
return contrasts[0].color
|
|
20
18
|
}
|
|
19
|
+
|
|
20
|
+
// export function getContrastColor(bg, options = ['#FFFFFF', '#666666'], tolerance = 2.5) {
|
|
21
|
+
// if (!options.length) return '#666666'
|
|
22
|
+
|
|
23
|
+
// return tinycolor.mostReadable(bg, options).toHexString()
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
// export function getContrastColor(bg, options = ['#FFFFFF', '#666666'], tolerance = 2.5) {
|
|
27
|
+
// const background = tinycolor(bg)
|
|
28
|
+
|
|
29
|
+
// function scoreColor(color) {
|
|
30
|
+
// const c = tinycolor(color)
|
|
31
|
+
// const contrast = tinycolor.readability(background, c)
|
|
32
|
+
// const { h: bh, s: bs, l: bl } = background.toHsl()
|
|
33
|
+
// const { h, s, l } = c.toHsl()
|
|
34
|
+
|
|
35
|
+
// const hueDiff = Math.abs(bh - h)
|
|
36
|
+
// const harmony = hueDiff > 180 ? 360 - hueDiff : hueDiff
|
|
37
|
+
|
|
38
|
+
// return (
|
|
39
|
+
// (contrast > tolerance ? contrast * 2 : contrast) +
|
|
40
|
+
// (100 - harmony) / 10 +
|
|
41
|
+
// (s > 0.1 && s < 0.8 ? 2 : 0) +
|
|
42
|
+
// (l > 0.2 && l < 0.8 ? 1 : 0)
|
|
43
|
+
// )
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// let bestColor = options[0]
|
|
47
|
+
// let bestScore = scoreColor(bestColor)
|
|
48
|
+
|
|
49
|
+
// for (let i = 1; i < options.length; i++) {
|
|
50
|
+
// const score = scoreColor(options[i])
|
|
51
|
+
// if (score > bestScore) {
|
|
52
|
+
// bestColor = options[i]
|
|
53
|
+
// bestScore = score
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// return bestColor
|
|
58
|
+
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{TouchableOpacity as RNTouchableOpacity}from"react-native-web";export var AbsTouchableOpacity=RNTouchableOpacity;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/calendar/DayPicker.js";var _excluded=["initialValue","value","onChange","min","max","onCheckDisabled"];import React from'react';import dayjs from'dayjs';import{Col}from"../structure/Col";import{Grid}from"../structure/Row";import{Icon}from"../presentation/Icon";import{Link}from"../actions/Link";import{Text}from"../text/Text";import{View}from"../structure/View";import{useCalendarDays}from"./_helpers/calendarDays";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function DayPicker(_ref){var _this=this;var initialValue=_ref.initialValue,value=_ref.value,onChange=_ref.onChange,min=_ref.min,max=_ref.max,onCheckDisabled=_ref.onCheckDisabled,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(dayjs(initialValue)),_React$useState2=_slicedToArray(_React$useState,2),localValue=_React$useState2[0],setLocalValue=_React$useState2[1];value=value===undefined?localValue:value;var handleChange=function handleChange(v){setLocalValue(v);onChange==null?void 0:onChange(v);};var _React$useState3=React.useState(function(){return initialValue?dayjs(initialValue).startOf('month'):dayjs().startOf('month');}),_React$useState4=_slicedToArray(_React$useState3,2),currentMonth=_React$useState4[0],setCurrentMonth=_React$useState4[1];var prevMonth=function prevMonth(){return setCurrentMonth(function(m){return m.subtract(1,'month');});};var nextMonth=function nextMonth(){return setCurrentMonth(function(m){return m.add(1,'month');});};var prevYear=function prevYear(){return setCurrentMonth(function(m){return m.subtract(1,'year');});};var nextYear=function nextYear(){return setCurrentMonth(function(m){return m.add(1,'year');});};var _useCalendarDays=useCalendarDays(currentMonth),weekdayLabels=_useCalendarDays.weekdayLabels,cells=_useCalendarDays.cells;return _jsxs(View,Object.assign({className:"neko-day-picker",width:250},props,{children:[_jsxs(View,{className:"neko-date-picker-header",row:true,centerV:true,gap:"xxs",height:30,children:[_jsx(Link,{onPress:prevYear,"aria-label":"Previous year",padding:"xxs",paddingL:0,children:_jsx(Icon,{name:"arrow-left-double-line"})}),_jsx(Link,{onPress:prevMonth,"aria-label":"Previous month",padding:"xxs",children:_jsx(Icon,{name:"arrow-left-s-line"})}),_jsx(Text,{center:true,flex:true,children:currentMonth.format('MMM YYYY')}),_jsx(Link,{onPress:nextMonth,"aria-label":"Next month",padding:"xxs",children:_jsx(Icon,{name:"arrow-right-s-line"})}),_jsx(Link,{onPress:nextYear,"aria-label":"Next year",padding:"xxs",paddingR:0,children:_jsx(Icon,{name:"arrow-right-double-line"})})]}),_jsx(View,{className:"neko-day-picker-week",row:true,center:true,gap:"sm",children:weekdayLabels.map(function(w){return _jsx(View,{flex:true,height:30,center:true,children:_jsx(Text,{center:true,sm:true,text4:true,children:w})},w);})}),_jsx(Grid,{className:"neko-day-picker-days",colSpan:24/7,gap:"sm",children:cells.map(function(day,i){var dateVal=currentMonth.date(day);var isActive=!!day&&dateVal.isSame(value,'day');var disabled=!!min&&dateVal.isBefore(min)||!!max&&dateVal.isAfter(max)||(onCheckDisabled==null?void 0:onCheckDisabled(dateVal));return _jsx(Col,{className:"day-cell",center:true,children:_jsx(Link,{ratio:1,width:30,center:true,br:"md",onPress:function onPress(){return!!day&&handleChange(dateVal);},bg:isActive&&'primary',disabled:disabled,children:_jsx(Text,{sm:true,text2:true,center:true,strong:isActive,children:day||''})})},day?dateVal.format('YYYYMMDD'):i);})})]}));}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import dayjs from 'dayjs'
|
|
3
|
-
|
|
4
|
-
import { Col } from '../structure/Col'
|
|
5
|
-
import { Grid } from '../structure/Row'
|
|
6
|
-
import { Icon } from '../presentation/Icon'
|
|
7
|
-
import { Link } from '../actions/Link'
|
|
8
|
-
import { Text } from '../text/Text'
|
|
9
|
-
import { View } from '../structure/View'
|
|
10
|
-
import { useCalendarDays } from './_helpers/calendarDays'
|
|
11
|
-
|
|
12
|
-
export function DayPicker({ initialValue, value, onChange, min, max, onCheckDisabled, ...props }) {
|
|
13
|
-
const [localValue, setLocalValue] = React.useState(dayjs(initialValue))
|
|
14
|
-
value = value === undefined ? localValue : value
|
|
15
|
-
const handleChange = (v) => {
|
|
16
|
-
setLocalValue(v)
|
|
17
|
-
onChange?.(v)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const [currentMonth, setCurrentMonth] = React.useState(() =>
|
|
21
|
-
initialValue ? dayjs(initialValue).startOf('month') : dayjs().startOf('month')
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
const prevMonth = () => setCurrentMonth((m) => m.subtract(1, 'month'))
|
|
25
|
-
const nextMonth = () => setCurrentMonth((m) => m.add(1, 'month'))
|
|
26
|
-
|
|
27
|
-
const prevYear = () => setCurrentMonth((m) => m.subtract(1, 'year'))
|
|
28
|
-
const nextYear = () => setCurrentMonth((m) => m.add(1, 'year'))
|
|
29
|
-
|
|
30
|
-
const { weekdayLabels, cells } = useCalendarDays(currentMonth)
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<View className="neko-day-picker" width={250} {...props}>
|
|
34
|
-
<View className="neko-date-picker-header" row centerV gap="xxs" height={30}>
|
|
35
|
-
<Link onPress={prevYear} aria-label="Previous year" padding="xxs" paddingL={0}>
|
|
36
|
-
<Icon name="arrow-left-double-line" />
|
|
37
|
-
</Link>
|
|
38
|
-
|
|
39
|
-
<Link onPress={prevMonth} aria-label="Previous month" padding="xxs">
|
|
40
|
-
<Icon name="arrow-left-s-line" />
|
|
41
|
-
</Link>
|
|
42
|
-
|
|
43
|
-
<Text center flex>
|
|
44
|
-
{currentMonth.format('MMM YYYY')}
|
|
45
|
-
</Text>
|
|
46
|
-
|
|
47
|
-
<Link onPress={nextMonth} aria-label="Next month" padding="xxs">
|
|
48
|
-
<Icon name="arrow-right-s-line" />
|
|
49
|
-
</Link>
|
|
50
|
-
|
|
51
|
-
<Link onPress={nextYear} aria-label="Next year" padding="xxs" paddingR={0}>
|
|
52
|
-
<Icon name="arrow-right-double-line" />
|
|
53
|
-
</Link>
|
|
54
|
-
</View>
|
|
55
|
-
|
|
56
|
-
<View className="neko-day-picker-week" row center gap="sm">
|
|
57
|
-
{weekdayLabels.map((w) => (
|
|
58
|
-
<View key={w} flex height={30} center>
|
|
59
|
-
<Text center sm text4>
|
|
60
|
-
{w}
|
|
61
|
-
</Text>
|
|
62
|
-
</View>
|
|
63
|
-
))}
|
|
64
|
-
</View>
|
|
65
|
-
|
|
66
|
-
<Grid className="neko-day-picker-days" colSpan={24 / 7} gap="sm">
|
|
67
|
-
{cells.map((day, i) => {
|
|
68
|
-
const dateVal = currentMonth.date(day)
|
|
69
|
-
const isActive = !!day && dateVal.isSame(value, 'day')
|
|
70
|
-
const disabled =
|
|
71
|
-
(!!min && dateVal.isBefore(min)) || (!!max && dateVal.isAfter(max)) || onCheckDisabled?.(dateVal)
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<Col key={day ? dateVal.format('YYYYMMDD') : i} className="day-cell" center>
|
|
75
|
-
<Link
|
|
76
|
-
ratio={1}
|
|
77
|
-
width={30}
|
|
78
|
-
center
|
|
79
|
-
br="md"
|
|
80
|
-
onPress={() => !!day && handleChange(dateVal)}
|
|
81
|
-
bg={isActive && 'primary'}
|
|
82
|
-
disabled={disabled}
|
|
83
|
-
>
|
|
84
|
-
<Text sm text2 center strong={isActive}>
|
|
85
|
-
{day || ''}
|
|
86
|
-
</Text>
|
|
87
|
-
</Link>
|
|
88
|
-
</Col>
|
|
89
|
-
)
|
|
90
|
-
})}
|
|
91
|
-
</Grid>
|
|
92
|
-
</View>
|
|
93
|
-
)
|
|
94
|
-
}
|