@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.
Files changed (143) hide show
  1. package/dist/DynamicStyleTag.js +5 -0
  2. package/dist/DynamicStyleTag.native.js +1 -0
  3. package/dist/NekoUI.js +1 -1
  4. package/dist/abstractions/AnimatedView.web.js +1 -0
  5. package/dist/abstractions/FlatList.js +1 -1
  6. package/dist/abstractions/FlatList.native.js +1 -1
  7. package/dist/abstractions/StaticList.js +1 -0
  8. package/dist/abstractions/helpers/useSafeAreaInsets.js +1 -0
  9. package/dist/abstractions/helpers/useSafeAreaInsets.native.js +1 -0
  10. package/dist/components/actions/Button.js +1 -1
  11. package/dist/components/actions/Dropdown.js +1 -1
  12. package/dist/components/actions/FloatingButton.js +1 -0
  13. package/dist/components/actions/index.js +1 -1
  14. package/dist/components/actions/menu/VerticalMenu.js +1 -1
  15. package/dist/components/calendar/_helpers/calendarDays.js +1 -1
  16. package/dist/components/feedback/alerter.js +1 -1
  17. package/dist/components/feedback/confirmer.js +1 -1
  18. package/dist/components/helpers/ConditionalLazyRender.js +1 -0
  19. package/dist/components/helpers/LazyAction.js +1 -0
  20. package/dist/components/helpers/LazyRender.js +1 -1
  21. package/dist/components/helpers/LazyRender.native.js +1 -1
  22. package/dist/components/helpers/index.js +1 -1
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/inputs/DateInput.js +1 -1
  25. package/dist/components/inputs/InputWrapper.js +1 -1
  26. package/dist/components/inputs/LinkInput.js +1 -1
  27. package/dist/components/inputs/NumberInput.js +1 -0
  28. package/dist/components/inputs/Picker.js +1 -1
  29. package/dist/components/inputs/Radio.js +1 -1
  30. package/dist/components/inputs/RateInput.js +1 -0
  31. package/dist/components/inputs/SegmentedPicker.js +1 -0
  32. package/dist/components/inputs/Select.js +1 -0
  33. package/dist/components/inputs/datePicker/DayPicker.js +1 -1
  34. package/dist/components/inputs/datePicker/MonthPicker.js +1 -1
  35. package/dist/components/inputs/datePicker/QuarterPicker.js +1 -1
  36. package/dist/components/inputs/datePicker/WeekPicker.js +1 -1
  37. package/dist/components/inputs/datePicker/YearPicker.js +1 -1
  38. package/dist/components/inputs/index.js +1 -1
  39. package/dist/components/list/FlatList.js +1 -1
  40. package/dist/components/presentation/Rate.js +1 -0
  41. package/dist/components/presentation/RateTag.js +1 -0
  42. package/dist/components/presentation/Result.js +1 -1
  43. package/dist/components/presentation/Tooltip.js +1 -1
  44. package/dist/components/presentation/index.js +1 -1
  45. package/dist/components/structure/Accordion.js +1 -1
  46. package/dist/components/structure/Row.js +1 -1
  47. package/dist/components/structure/Segment.js +1 -0
  48. package/dist/components/structure/bottomDrawer/native/BottomDrawer.js +1 -1
  49. package/dist/components/structure/bottomDrawer/native/utils.js +1 -1
  50. package/dist/components/structure/bottomDrawer/web/BottomDrawer.js +1 -1
  51. package/dist/components/structure/index.js +1 -1
  52. package/dist/components/structure/overlay/OverlayHandler.js +1 -1
  53. package/dist/components/structure/popover/Popover.js +1 -1
  54. package/dist/components/structure/popover/Popover_BU.js +1 -0
  55. package/dist/components/tabs/ActiveTabContent.js +1 -0
  56. package/dist/components/tabs/TabsHandler.js +1 -0
  57. package/dist/components/tabs/TabsMenu.js +1 -0
  58. package/dist/components/tabs/index.js +1 -0
  59. package/dist/helpers/string.js +1 -1
  60. package/dist/i18n/I18n.js +1 -0
  61. package/dist/i18n/I18nProvider.js +1 -0
  62. package/dist/i18n/index.js +1 -0
  63. package/dist/index.css +4 -0
  64. package/dist/index.js +1 -1
  65. package/dist/modifiers/animations/fadeEffect.web.js +1 -0
  66. package/dist/modifiers/animations/scrollEffect.web.js +1 -0
  67. package/dist/modifiers/animations/slideEffect.web.js +1 -0
  68. package/dist/modifiers/fullColor.js +1 -1
  69. package/dist/modifiers/overflow.js +1 -1
  70. package/dist/modifiers/position.js +1 -1
  71. package/dist/theme/default/base.js +1 -1
  72. package/package.json +1 -1
  73. package/src/DynamicStyleTag.js +21 -0
  74. package/src/DynamicStyleTag.native.js +3 -0
  75. package/src/NekoUI.js +12 -7
  76. package/src/abstractions/AnimatedView.web.js +3 -0
  77. package/src/abstractions/FlatList.js +2 -38
  78. package/src/abstractions/FlatList.native.js +8 -4
  79. package/src/abstractions/StaticList.js +51 -0
  80. package/src/abstractions/helpers/useSafeAreaInsets.js +3 -0
  81. package/src/abstractions/helpers/useSafeAreaInsets.native.js +3 -0
  82. package/src/components/actions/Button.js +15 -13
  83. package/src/components/actions/Dropdown.js +13 -9
  84. package/src/components/actions/FloatingButton.js +87 -0
  85. package/src/components/actions/index.js +1 -0
  86. package/src/components/actions/menu/VerticalMenu.js +29 -4
  87. package/src/components/calendar/_helpers/calendarDays.js +2 -0
  88. package/src/components/feedback/alerter.js +1 -1
  89. package/src/components/feedback/confirmer.js +2 -2
  90. package/src/components/helpers/ConditionalLazyRender.js +6 -0
  91. package/src/components/helpers/LazyAction.js +22 -0
  92. package/src/components/helpers/LazyRender.js +2 -2
  93. package/src/components/helpers/LazyRender.native.js +1 -1
  94. package/src/components/helpers/index.js +1 -0
  95. package/src/components/index.js +1 -0
  96. package/src/components/inputs/DateInput.js +11 -1
  97. package/src/components/inputs/InputWrapper.js +0 -1
  98. package/src/components/inputs/LinkInput.js +3 -3
  99. package/src/components/inputs/NumberInput.js +105 -0
  100. package/src/components/inputs/Picker.js +61 -9
  101. package/src/components/inputs/Radio.js +1 -1
  102. package/src/components/inputs/RateInput.js +62 -0
  103. package/src/components/inputs/SegmentedPicker.js +62 -0
  104. package/src/components/inputs/Select.js +189 -0
  105. package/src/components/inputs/datePicker/DayPicker.js +4 -5
  106. package/src/components/inputs/datePicker/MonthPicker.js +2 -2
  107. package/src/components/inputs/datePicker/QuarterPicker.js +2 -2
  108. package/src/components/inputs/datePicker/WeekPicker.js +2 -2
  109. package/src/components/inputs/datePicker/YearPicker.js +9 -6
  110. package/src/components/inputs/index.js +4 -0
  111. package/src/components/list/FlatList.js +41 -4
  112. package/src/components/presentation/Rate.js +58 -0
  113. package/src/components/presentation/RateTag.js +35 -0
  114. package/src/components/presentation/Result.js +2 -2
  115. package/src/components/presentation/Tooltip.js +1 -0
  116. package/src/components/presentation/index.js +2 -0
  117. package/src/components/structure/Accordion.js +1 -1
  118. package/src/components/structure/Row.js +9 -1
  119. package/src/components/structure/Segment.js +51 -0
  120. package/src/components/structure/bottomDrawer/native/BottomDrawer.js +4 -1
  121. package/src/components/structure/bottomDrawer/native/utils.js +29 -22
  122. package/src/components/structure/bottomDrawer/web/BottomDrawer.js +3 -1
  123. package/src/components/structure/index.js +1 -0
  124. package/src/components/structure/overlay/OverlayHandler.js +6 -1
  125. package/src/components/structure/popover/Popover.js +33 -19
  126. package/src/components/structure/popover/Popover_BU.js +157 -0
  127. package/src/components/tabs/ActiveTabContent.js +35 -0
  128. package/src/components/tabs/TabsHandler.js +16 -0
  129. package/src/components/tabs/TabsMenu.js +15 -0
  130. package/src/components/tabs/index.js +3 -0
  131. package/src/helpers/string.js +18 -1
  132. package/src/i18n/I18n.js +97 -0
  133. package/src/i18n/I18nProvider.js +40 -0
  134. package/src/i18n/index.js +2 -0
  135. package/src/index.css +4 -0
  136. package/src/index.js +1 -0
  137. package/src/modifiers/animations/fadeEffect.web.js +3 -0
  138. package/src/modifiers/animations/scrollEffect.web.js +3 -0
  139. package/src/modifiers/animations/slideEffect.web.js +3 -0
  140. package/src/modifiers/fullColor.js +5 -2
  141. package/src/modifiers/overflow.js +6 -1
  142. package/src/modifiers/position.js +7 -0
  143. package/src/theme/default/base.js +6 -2
package/src/index.css CHANGED
@@ -62,6 +62,10 @@ button {
62
62
  opacity: 0.95;
63
63
  }
64
64
 
65
+ /* ::placeholder { */
66
+ /* color: rgba(127, 127, 127, 0.4); */
67
+ /* } */
68
+
65
69
  @keyframes wave-effect {
66
70
  0% {
67
71
  opacity: 1;
package/src/index.js CHANGED
@@ -2,6 +2,7 @@ export * from './helpers'
2
2
  export * from './components'
3
3
  export * from './theme'
4
4
  export * from './responsive'
5
+ export * from './i18n'
5
6
  export * from './NekoUI'
6
7
 
7
8
  export const version = 41
@@ -0,0 +1,3 @@
1
+ import { useFadeEffect as useFadeEffectNative } from './fadeEffect.native'
2
+
3
+ export const useFadeEffect = useFadeEffectNative
@@ -0,0 +1,3 @@
1
+ import { useScrollEffect as useScrollEffectNative } from './scrollEffect.native'
2
+
3
+ export const useScrollEffect = useScrollEffectNative
@@ -0,0 +1,3 @@
1
+ import { useSlideEffect as useSlideEffectNative } from './slideEffect.native'
2
+
3
+ export const useSlideEffect = useSlideEffectNative
@@ -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([{ color, ...values }, { outline, contrastTolerance, fill, ...props }]) {
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
@@ -37,11 +37,15 @@ export const BASE_THEME = {
37
37
 
38
38
  // Buttons, inputs, etc.
39
39
  elementHeights: {
40
+ xxxs: 10,
41
+ xxs: 15,
40
42
  xs: 20,
41
43
  sm: 30,
42
44
  md: 35,
43
- lg: 50,
44
- xl: 60,
45
+ lg: 40,
46
+ xl: 50,
47
+ xxl: 60,
48
+ xxxl: 70,
45
49
  },
46
50
 
47
51
  texts: {