@neko-os/ui 0.0.9 → 0.0.11
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/DynamicStyleTag.js +5 -0
- package/dist/DynamicStyleTag.native.js +1 -0
- package/dist/NekoUI.js +1 -1
- package/dist/abstractions/AnimatedView.web.js +1 -0
- package/dist/abstractions/FlatList.js +1 -1
- package/dist/abstractions/FlatList.native.js +1 -1
- package/dist/abstractions/StaticList.js +1 -0
- package/dist/abstractions/helpers/useSafeAreaInsets.js +1 -0
- package/dist/abstractions/helpers/useSafeAreaInsets.native.js +1 -0
- package/dist/components/actions/Button.js +1 -1
- package/dist/components/actions/Dropdown.js +1 -1
- package/dist/components/actions/FloatingButton.js +1 -0
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/menu/VerticalMenu.js +1 -1
- package/dist/components/calendar/_helpers/calendarDays.js +1 -1
- package/dist/components/feedback/alerter.js +1 -1
- package/dist/components/feedback/confirmer.js +1 -1
- package/dist/components/helpers/ConditionalLazyRender.js +1 -0
- package/dist/components/helpers/LazyAction.js +1 -0
- package/dist/components/helpers/LazyRender.js +1 -1
- package/dist/components/helpers/LazyRender.native.js +1 -1
- package/dist/components/helpers/index.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/inputs/DateInput.js +1 -1
- package/dist/components/inputs/InputWrapper.js +1 -1
- package/dist/components/inputs/LinkInput.js +1 -1
- package/dist/components/inputs/NumberInput.js +1 -0
- package/dist/components/inputs/Picker.js +1 -1
- package/dist/components/inputs/Radio.js +1 -1
- package/dist/components/inputs/RateInput.js +1 -0
- package/dist/components/inputs/SegmentedPicker.js +1 -0
- package/dist/components/inputs/Select.js +1 -0
- package/dist/components/inputs/datePicker/DayPicker.js +1 -1
- package/dist/components/inputs/datePicker/MonthPicker.js +1 -1
- package/dist/components/inputs/datePicker/QuarterPicker.js +1 -1
- package/dist/components/inputs/datePicker/WeekPicker.js +1 -1
- package/dist/components/inputs/datePicker/YearPicker.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/list/FlatList.js +1 -1
- package/dist/components/presentation/Rate.js +1 -0
- package/dist/components/presentation/RateTag.js +1 -0
- package/dist/components/presentation/Result.js +1 -1
- package/dist/components/presentation/Tooltip.js +1 -1
- package/dist/components/presentation/index.js +1 -1
- package/dist/components/structure/Accordion.js +1 -1
- package/dist/components/structure/Row.js +1 -1
- package/dist/components/structure/Segment.js +1 -0
- package/dist/components/structure/bottomDrawer/native/BottomDrawer.js +1 -1
- package/dist/components/structure/bottomDrawer/native/utils.js +1 -1
- package/dist/components/structure/bottomDrawer/web/BottomDrawer.js +1 -1
- package/dist/components/structure/index.js +1 -1
- package/dist/components/structure/overlay/OverlayHandler.js +1 -1
- package/dist/components/structure/popover/Popover.js +1 -1
- package/dist/components/structure/popover/Popover_BU.js +1 -0
- package/dist/components/tabs/ActiveTabContent.js +1 -0
- package/dist/components/tabs/TabsHandler.js +1 -0
- package/dist/components/tabs/TabsMenu.js +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/helpers/string.js +1 -1
- package/dist/i18n/I18n.js +1 -0
- package/dist/i18n/I18nProvider.js +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/index.css +4 -0
- package/dist/index.js +1 -1
- package/dist/modifiers/animations/fadeEffect.web.js +1 -0
- package/dist/modifiers/animations/scrollEffect.web.js +1 -0
- package/dist/modifiers/animations/slideEffect.web.js +1 -0
- package/dist/modifiers/fullColor.js +1 -1
- package/dist/modifiers/overflow.js +1 -1
- package/dist/modifiers/position.js +1 -1
- package/dist/theme/default/base.js +1 -1
- package/package.json +1 -1
- package/src/DynamicStyleTag.js +21 -0
- package/src/DynamicStyleTag.native.js +3 -0
- package/src/NekoUI.js +12 -7
- package/src/abstractions/AnimatedView.web.js +3 -0
- package/src/abstractions/FlatList.js +2 -38
- package/src/abstractions/FlatList.native.js +8 -4
- package/src/abstractions/StaticList.js +51 -0
- package/src/abstractions/helpers/useSafeAreaInsets.js +3 -0
- package/src/abstractions/helpers/useSafeAreaInsets.native.js +3 -0
- package/src/components/actions/Button.js +15 -13
- package/src/components/actions/Dropdown.js +13 -9
- package/src/components/actions/FloatingButton.js +87 -0
- package/src/components/actions/index.js +1 -0
- package/src/components/actions/menu/VerticalMenu.js +29 -4
- package/src/components/calendar/_helpers/calendarDays.js +2 -0
- package/src/components/feedback/alerter.js +1 -1
- package/src/components/feedback/confirmer.js +2 -2
- package/src/components/helpers/ConditionalLazyRender.js +6 -0
- package/src/components/helpers/LazyAction.js +22 -0
- package/src/components/helpers/LazyRender.js +2 -2
- package/src/components/helpers/LazyRender.native.js +1 -1
- package/src/components/helpers/index.js +1 -0
- package/src/components/index.js +1 -0
- package/src/components/inputs/DateInput.js +11 -1
- package/src/components/inputs/InputWrapper.js +0 -1
- package/src/components/inputs/LinkInput.js +3 -3
- package/src/components/inputs/NumberInput.js +105 -0
- package/src/components/inputs/Picker.js +61 -9
- package/src/components/inputs/Radio.js +1 -1
- package/src/components/inputs/RateInput.js +62 -0
- package/src/components/inputs/SegmentedPicker.js +62 -0
- package/src/components/inputs/Select.js +189 -0
- package/src/components/inputs/datePicker/DayPicker.js +4 -5
- package/src/components/inputs/datePicker/MonthPicker.js +2 -2
- package/src/components/inputs/datePicker/QuarterPicker.js +2 -2
- package/src/components/inputs/datePicker/WeekPicker.js +2 -2
- package/src/components/inputs/datePicker/YearPicker.js +9 -6
- package/src/components/inputs/index.js +4 -0
- package/src/components/list/FlatList.js +41 -4
- package/src/components/presentation/Rate.js +58 -0
- package/src/components/presentation/RateTag.js +35 -0
- package/src/components/presentation/Result.js +2 -2
- package/src/components/presentation/Tooltip.js +1 -0
- package/src/components/presentation/index.js +2 -0
- package/src/components/structure/Accordion.js +1 -1
- package/src/components/structure/Row.js +9 -1
- package/src/components/structure/Segment.js +51 -0
- package/src/components/structure/bottomDrawer/native/BottomDrawer.js +4 -1
- package/src/components/structure/bottomDrawer/native/utils.js +29 -22
- package/src/components/structure/bottomDrawer/web/BottomDrawer.js +3 -1
- package/src/components/structure/index.js +1 -0
- package/src/components/structure/overlay/OverlayHandler.js +6 -1
- package/src/components/structure/popover/Popover.js +33 -19
- package/src/components/structure/popover/Popover_BU.js +157 -0
- package/src/components/tabs/ActiveTabContent.js +35 -0
- package/src/components/tabs/TabsHandler.js +16 -0
- package/src/components/tabs/TabsMenu.js +15 -0
- package/src/components/tabs/index.js +3 -0
- package/src/helpers/string.js +18 -1
- package/src/i18n/I18n.js +97 -0
- package/src/i18n/I18nProvider.js +40 -0
- package/src/i18n/index.js +2 -0
- package/src/index.css +4 -0
- package/src/index.js +1 -0
- package/src/modifiers/animations/fadeEffect.web.js +3 -0
- package/src/modifiers/animations/scrollEffect.web.js +3 -0
- package/src/modifiers/animations/slideEffect.web.js +3 -0
- package/src/modifiers/fullColor.js +5 -2
- package/src/modifiers/overflow.js +6 -1
- package/src/modifiers/position.js +7 -0
- package/src/theme/default/base.js +6 -2
package/src/index.css
CHANGED
package/src/index.js
CHANGED
|
@@ -3,7 +3,10 @@ import tinycolor from 'tinycolor2'
|
|
|
3
3
|
import { getContrastColor } from '../theme/helpers/contrastColor'
|
|
4
4
|
import { useGetColor } from '../theme/ThemeHandler'
|
|
5
5
|
|
|
6
|
-
export function useFullColorModifier([
|
|
6
|
+
export function useFullColorModifier([
|
|
7
|
+
{ color, ...values },
|
|
8
|
+
{ outline, contrastTolerance, fill, bg: forcedBG, ...props },
|
|
9
|
+
]) {
|
|
7
10
|
const getColor = useGetColor()
|
|
8
11
|
|
|
9
12
|
let bg = color
|
|
@@ -22,7 +25,7 @@ export function useFullColorModifier([{ color, ...values }, { outline, contrastT
|
|
|
22
25
|
{ ...values, fontColor },
|
|
23
26
|
{
|
|
24
27
|
...props,
|
|
25
|
-
bg,
|
|
28
|
+
bg: forcedBG || bg,
|
|
26
29
|
borderColor,
|
|
27
30
|
},
|
|
28
31
|
]
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { clearProps } from './_helpers'
|
|
2
2
|
|
|
3
3
|
export function useOverflowModifier([values, props]) {
|
|
4
|
-
let { hiddenOverflow, scroll, scrollY, scrollX, overflow, overflowY, overflowX, ...restProps } = props
|
|
4
|
+
let { hiddenOverflow, scroll, noScroll, scrollY, scrollX, overflow, overflowY, overflowX, ...restProps } = props
|
|
5
5
|
|
|
6
6
|
if (hiddenOverflow) overflow = 'hidden'
|
|
7
7
|
if (scroll) overflow = 'scroll'
|
|
8
8
|
if (scrollY) overflowY = 'scroll'
|
|
9
9
|
if (scrollX) overflowX = 'scroll'
|
|
10
|
+
if (noScroll) {
|
|
11
|
+
if (overflow === 'scroll') overflow = undefined
|
|
12
|
+
if (overflowY === 'scroll') overflowY = undefined
|
|
13
|
+
if (overflowX === 'scroll') overflowX = undefined
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
const style = clearProps({ overflow, overflowY, overflowX })
|
|
12
17
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Platform } from '../abstractions/Platform'
|
|
2
2
|
import { clearProps } from './_helpers'
|
|
3
|
+
import { useGetSpace } from '../theme'
|
|
3
4
|
|
|
4
5
|
export function usePositionModifier([values, props]) {
|
|
6
|
+
const getSpace = useGetSpace()
|
|
5
7
|
let {
|
|
6
8
|
position,
|
|
7
9
|
absolute,
|
|
@@ -24,6 +26,11 @@ export function usePositionModifier([values, props]) {
|
|
|
24
26
|
if (fixed || fixedFill) position = 'fixed'
|
|
25
27
|
if (sticky) position = 'sticky'
|
|
26
28
|
|
|
29
|
+
top = getSpace(top)
|
|
30
|
+
bottom = getSpace(bottom)
|
|
31
|
+
right = getSpace(right)
|
|
32
|
+
left = getSpace(left)
|
|
33
|
+
|
|
27
34
|
if (absoluteFill || fixedFill) {
|
|
28
35
|
top = 0
|
|
29
36
|
bottom = 0
|