@neko-os/ui 0.0.3 → 0.0.5
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/abstractions/BKTouchableOpacity.js +0 -0
- package/dist/abstractions/HiddenInput.js +1 -0
- package/dist/abstractions/HiddenInput.native.js +1 -0
- package/dist/abstractions/Icon.js +1 -1
- package/dist/abstractions/Icon.native.js +1 -1
- package/dist/abstractions/Icon.web.js +1 -0
- package/dist/abstractions/Switch.js +1 -0
- package/dist/abstractions/Switch.native.js +1 -0
- package/dist/abstractions/Text.web.js +1 -0
- package/dist/abstractions/TouchableOpacity.js +1 -1
- package/dist/abstractions/TouchableOpacity.native.js +1 -0
- package/dist/abstractions/TouchableOpacity.web.js +1 -0
- package/dist/abstractions/View.web.js +1 -0
- package/dist/abstractions/windowWidth.js +1 -0
- package/dist/abstractions/windowWidth.native.js +1 -0
- package/dist/abstractions/windowWidth.web.js +1 -0
- package/dist/components/actions/Button.js +1 -0
- package/dist/components/actions/Link.js +1 -0
- package/dist/components/actions/index.js +1 -0
- package/dist/components/form/Form.js +1 -0
- package/dist/components/form/FormGroup.js +1 -0
- package/dist/components/form/FormItem.js +1 -0
- package/dist/components/form/FormList.js +1 -0
- package/dist/components/form/FormWrapperComponent.js +1 -0
- package/dist/{form → components/form}/index.js +1 -1
- package/dist/components/form/inputs/Checkbox.js +1 -0
- package/dist/components/form/inputs/Radio.js +1 -0
- package/dist/components/form/inputs/Switch.js +1 -0
- package/dist/components/form/inputs/index.js +1 -0
- package/dist/components/helpers/Responsive.js +1 -0
- package/dist/components/helpers/Separator.js +1 -0
- package/dist/components/helpers/index.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/presentation/ContentLabel.js +1 -0
- package/dist/components/presentation/Icon.js +1 -0
- package/dist/components/presentation/IconLabel.js +1 -0
- package/dist/components/presentation/Tag.js +1 -0
- package/dist/components/presentation/index.js +1 -0
- package/dist/components/structure/Card.js +1 -0
- package/dist/components/structure/View.js +1 -0
- package/dist/components/text/Text.js +1 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/responsive.js +1 -0
- package/dist/index.css +5 -0
- package/dist/index.js +1 -1
- package/dist/modifiers/background.js +1 -1
- package/dist/modifiers/border.js +1 -1
- package/dist/modifiers/colorConverter.js +1 -0
- package/dist/modifiers/default.js +1 -0
- package/dist/modifiers/display.js +1 -0
- package/dist/modifiers/flex.js +1 -1
- package/dist/modifiers/flexWrapper.js +1 -1
- package/dist/modifiers/fullColor.js +1 -0
- package/dist/modifiers/logger.js +1 -0
- package/dist/modifiers/margin.js +1 -1
- package/dist/modifiers/padding.js +1 -1
- package/dist/modifiers/position.js +1 -1
- package/dist/modifiers/shadow.js +1 -1
- package/dist/modifiers/size.js +1 -1
- package/dist/modifiers/sizeConverter.js +1 -0
- package/dist/modifiers/text.js +1 -1
- package/dist/modifiers/textConverter.js +1 -0
- package/dist/modifiers/themeComponent.js +1 -0
- package/dist/theme/ThemeHandler.js +1 -1
- package/dist/theme/default/base.js +1 -1
- 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 -0
- package/dist/theme/default/lightTheme.js +1 -1
- package/dist/theme/default/midnightTheme.js +1 -1
- package/dist/theme/default/msdosTheme.js +1 -0
- package/dist/theme/default/oceanTheme.js +1 -1
- 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/helpers/colorScale.js +1 -0
- package/dist/theme/helpers/mergePreset.js +1 -0
- package/dist/theme/helpers/relatedScales.js +1 -0
- package/dist/theme/helpers/sizeScale.js +1 -1
- package/dist/theme/helpers/textScale.js +1 -0
- package/package.json +1 -1
- package/src/abstractions/BKTouchableOpacity.js +12 -0
- package/src/abstractions/HiddenInput.js +3 -0
- package/src/abstractions/HiddenInput.native.js +3 -0
- package/src/abstractions/Icon.js +23 -1
- package/src/abstractions/Icon.native.js +11 -2
- package/src/abstractions/Icon.web.js +11 -0
- package/src/abstractions/Switch.js +97 -0
- package/src/abstractions/Switch.native.js +12 -0
- package/src/abstractions/Text.web.js +3 -0
- package/src/abstractions/TouchableOpacity.js +3 -11
- package/src/abstractions/TouchableOpacity.native.js +3 -0
- package/src/abstractions/TouchableOpacity.web.js +3 -0
- package/src/abstractions/View.web.js +3 -0
- package/src/abstractions/windowWidth.js +13 -0
- package/src/abstractions/windowWidth.native.js +6 -0
- package/src/abstractions/windowWidth.web.js +6 -0
- package/src/components/actions/Button.js +62 -0
- package/src/components/actions/Link.js +39 -0
- package/src/{actions → components/actions}/index.js +1 -0
- package/src/{form → components/form}/FormItem.js +2 -2
- package/src/{form → components/form}/FormList.js +2 -2
- package/src/{form → components/form}/index.js +1 -0
- package/src/components/form/inputs/Checkbox.js +42 -0
- package/src/components/form/inputs/Radio.js +42 -0
- package/src/components/form/inputs/Switch.js +44 -0
- package/src/components/form/inputs/index.js +3 -0
- package/src/components/helpers/Responsive.js +18 -0
- package/src/components/helpers/Separator.js +49 -0
- package/src/components/helpers/index.js +2 -0
- package/src/components/index.js +6 -0
- package/src/components/presentation/ContentLabel.js +25 -0
- package/src/components/presentation/Icon.js +20 -0
- package/src/components/presentation/IconLabel.js +29 -0
- package/src/components/presentation/Tag.js +72 -0
- package/src/{presentation → components/presentation}/index.js +1 -0
- package/src/components/structure/Card.js +42 -0
- package/src/components/structure/View.js +36 -0
- package/src/components/text/Text.js +28 -0
- package/src/helpers/index.js +2 -0
- package/src/helpers/responsive.js +54 -0
- package/src/index.css +5 -0
- package/src/index.js +2 -5
- package/src/modifiers/background.js +10 -7
- package/src/modifiers/border.js +10 -7
- package/src/modifiers/colorConverter.js +13 -0
- package/src/modifiers/default.js +9 -0
- package/src/modifiers/display.js +24 -0
- package/src/modifiers/flex.js +10 -7
- package/src/modifiers/flexWrapper.js +12 -9
- package/src/modifiers/{fullColor.js.js → fullColor.js} +8 -9
- package/src/modifiers/logger.js +6 -0
- package/src/modifiers/margin.js +10 -7
- package/src/modifiers/padding.js +10 -7
- package/src/modifiers/position.js +10 -7
- package/src/modifiers/shadow.js +10 -7
- package/src/modifiers/size.js +8 -5
- package/src/modifiers/sizeConverter.js +12 -0
- package/src/modifiers/text.js +14 -13
- package/src/modifiers/textConverter.js +12 -0
- package/src/modifiers/themeComponent.js +11 -0
- package/src/theme/ThemeHandler.js +31 -33
- package/src/theme/default/base.js +13 -1
- package/src/theme/default/cyberpunkTheme.js +1 -0
- package/src/theme/default/darkTheme.js +1 -0
- package/src/theme/default/deepWoodsTheme.js +1 -0
- package/src/theme/default/forestTheme.js +1 -0
- package/src/theme/default/hackerTheme.js +32 -0
- package/src/theme/default/lightTheme.js +1 -0
- package/src/theme/default/midnightTheme.js +1 -0
- package/src/theme/default/msdosTheme.js +40 -0
- package/src/theme/default/oceanTheme.js +1 -0
- package/src/theme/default/pastelTheme.js +1 -0
- package/src/theme/default/sunsetTheme.js +1 -0
- package/src/theme/default/themes.js +4 -0
- package/src/theme/helpers/colorScale.js +11 -0
- package/src/theme/helpers/mergePreset.js +7 -0
- package/src/theme/helpers/relatedScales.js +34 -0
- package/src/theme/helpers/sizeScale.js +12 -4
- package/src/theme/helpers/textScale.js +15 -0
- package/dist/actions/Button.js +0 -1
- package/dist/actions/index.js +0 -1
- package/dist/form/Form.js +0 -1
- package/dist/form/FormGroup.js +0 -1
- package/dist/form/FormItem.js +0 -1
- package/dist/form/FormList.js +0 -1
- package/dist/form/FormWrapperComponent.js +0 -1
- package/dist/modifiers/fullColor.js.js +0 -1
- package/dist/presentation/Icon.js +0 -1
- package/dist/presentation/Tag.js +0 -1
- package/dist/presentation/index.js +0 -1
- package/dist/structure/Card.js +0 -1
- package/dist/structure/View.js +0 -1
- package/dist/text/Text.js +0 -1
- package/dist/theme/default/base.native.js +0 -1
- package/dist/theme/default/base.web.js +0 -1
- package/src/actions/Button.js +0 -48
- package/src/presentation/Icon.js +0 -14
- package/src/presentation/Tag.js +0 -32
- package/src/structure/Card.js +0 -36
- package/src/structure/View.js +0 -34
- package/src/text/Text.js +0 -20
- package/src/theme/default/base.native.js +0 -58
- package/src/theme/default/base.web.js +0 -3
- /package/dist/{form → components/form}/FormWrapperComponent.native.js +0 -0
- /package/dist/{form → components/form}/useForm.js +0 -0
- /package/dist/{structure → components/structure}/index.js +0 -0
- /package/dist/{text → components/text}/index.js +0 -0
- /package/src/{form → components/form}/Form.js +0 -0
- /package/src/{form → components/form}/FormGroup.js +0 -0
- /package/src/{form → components/form}/FormWrapperComponent.js +0 -0
- /package/src/{form → components/form}/FormWrapperComponent.native.js +0 -0
- /package/src/{form → components/form}/useForm.js +0 -0
- /package/src/{structure → components/structure}/index.js +0 -0
- /package/src/{text → components/text}/index.js +0 -0
package/src/presentation/Tag.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Text } from '../text/Text'
|
|
2
|
-
import { View } from '../structure/View'
|
|
3
|
-
import { moveScaleDown } from '../theme/helpers/sizeScale'
|
|
4
|
-
import { useFullColorModifier } from '../modifiers/fullColor.js'
|
|
5
|
-
import { useMergeThemeComponent } from '../theme/ThemeHandler'
|
|
6
|
-
|
|
7
|
-
export function Tag(rootProps) {
|
|
8
|
-
let { label, style, textProps, size = 'md', ...props } = useMergeThemeComponent('Button', rootProps)
|
|
9
|
-
const oneSizeDown = moveScaleDown(size, 1)
|
|
10
|
-
const twoSizeDown = moveScaleDown(size, 2)
|
|
11
|
-
const threeSizeDown = moveScaleDown(size, 3)
|
|
12
|
-
const defaultProps = {
|
|
13
|
-
paddingH: twoSizeDown,
|
|
14
|
-
padding: threeSizeDown,
|
|
15
|
-
outline: true,
|
|
16
|
-
br: threeSizeDown,
|
|
17
|
-
borderWidth: 1,
|
|
18
|
-
color: 'primary',
|
|
19
|
-
center: true,
|
|
20
|
-
}
|
|
21
|
-
const [fontColor, formattedProps] = useFullColorModifier({ ...defaultProps, ...props, style })
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<View className="neko-tag" row>
|
|
25
|
-
<View className="neko-tag-inner" {...formattedProps}>
|
|
26
|
-
<Text strong center color={fontColor} size={oneSizeDown} {...textProps}>
|
|
27
|
-
{label}
|
|
28
|
-
</Text>
|
|
29
|
-
</View>
|
|
30
|
-
</View>
|
|
31
|
-
)
|
|
32
|
-
}
|
package/src/structure/Card.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { pipe } from 'ramda'
|
|
2
|
-
|
|
3
|
-
import { AbsView } from '../abstractions/View'
|
|
4
|
-
import { useBackgroundModifier } from '../modifiers/background'
|
|
5
|
-
import { useBorderModifier } from '../modifiers/border'
|
|
6
|
-
import { useFlexModifier } from '../modifiers/flex'
|
|
7
|
-
import { useFlexWrapperModifier } from '../modifiers/flexWrapper'
|
|
8
|
-
import { useMarginModifier } from '../modifiers/margin'
|
|
9
|
-
import { useMergeThemeComponent } from '../theme/ThemeHandler'
|
|
10
|
-
import { usePaddingModifier } from '../modifiers/padding'
|
|
11
|
-
import { usePositionModifier } from '../modifiers/position'
|
|
12
|
-
import { useShadowModifier } from '../modifiers/shadow'
|
|
13
|
-
import { useSizeModifier } from '../modifiers/size'
|
|
14
|
-
|
|
15
|
-
export function Card({ children, ...rootProps }) {
|
|
16
|
-
let props = useMergeThemeComponent('Card', rootProps)
|
|
17
|
-
const defaultProps = { padding: 'md', br: 'xlg', bg: 'overlayBG' }
|
|
18
|
-
|
|
19
|
-
props = pipe(
|
|
20
|
-
useSizeModifier, //
|
|
21
|
-
usePositionModifier,
|
|
22
|
-
usePaddingModifier,
|
|
23
|
-
useMarginModifier,
|
|
24
|
-
useFlexWrapperModifier,
|
|
25
|
-
useFlexModifier,
|
|
26
|
-
useBackgroundModifier,
|
|
27
|
-
useBorderModifier,
|
|
28
|
-
useShadowModifier
|
|
29
|
-
)({ ...defaultProps, ...props })
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<AbsView className="neko-card" {...props}>
|
|
33
|
-
{children}
|
|
34
|
-
</AbsView>
|
|
35
|
-
)
|
|
36
|
-
}
|
package/src/structure/View.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { pipe } from 'ramda'
|
|
2
|
-
|
|
3
|
-
import { AbsView } from '../abstractions/View'
|
|
4
|
-
import { useBackgroundModifier } from '../modifiers/background'
|
|
5
|
-
import { useBorderModifier } from '../modifiers/border'
|
|
6
|
-
import { useFlexModifier } from '../modifiers/flex'
|
|
7
|
-
import { useFlexWrapperModifier } from '../modifiers/flexWrapper'
|
|
8
|
-
import { useMarginModifier } from '../modifiers/margin'
|
|
9
|
-
import { useMergeThemeComponent } from '../theme/ThemeHandler'
|
|
10
|
-
import { usePaddingModifier } from '../modifiers/padding'
|
|
11
|
-
import { usePositionModifier } from '../modifiers/position'
|
|
12
|
-
import { useShadowModifier } from '../modifiers/shadow'
|
|
13
|
-
import { useSizeModifier } from '../modifiers/size'
|
|
14
|
-
|
|
15
|
-
export function View({ children, ...rootProps }) {
|
|
16
|
-
let props = useMergeThemeComponent('View', rootProps)
|
|
17
|
-
props = pipe(
|
|
18
|
-
useSizeModifier, //
|
|
19
|
-
usePositionModifier,
|
|
20
|
-
usePaddingModifier,
|
|
21
|
-
useMarginModifier,
|
|
22
|
-
useFlexWrapperModifier,
|
|
23
|
-
useFlexModifier,
|
|
24
|
-
useBackgroundModifier,
|
|
25
|
-
useBorderModifier,
|
|
26
|
-
useShadowModifier
|
|
27
|
-
)(props)
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<AbsView className="neko-view" {...props}>
|
|
31
|
-
{children}
|
|
32
|
-
</AbsView>
|
|
33
|
-
)
|
|
34
|
-
}
|
package/src/text/Text.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { pipe } from 'ramda'
|
|
2
|
-
|
|
3
|
-
import { AbsText } from '../abstractions/Text'
|
|
4
|
-
import { useFlexModifier } from '../modifiers/flex'
|
|
5
|
-
import { useMarginModifier } from '../modifiers/margin'
|
|
6
|
-
import { usePaddingModifier } from '../modifiers/padding'
|
|
7
|
-
import { useSizeModifier } from '../modifiers/size'
|
|
8
|
-
import { useTextModifier } from '../modifiers/text'
|
|
9
|
-
|
|
10
|
-
export function Text({ children, ...props }) {
|
|
11
|
-
props = pipe(
|
|
12
|
-
useSizeModifier, //
|
|
13
|
-
usePaddingModifier,
|
|
14
|
-
useMarginModifier,
|
|
15
|
-
useFlexModifier,
|
|
16
|
-
useTextModifier
|
|
17
|
-
)(props)
|
|
18
|
-
|
|
19
|
-
return <AbsText {...props}>{children}</AbsText>
|
|
20
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export const BASE_THEME = {
|
|
2
|
-
spaces: {
|
|
3
|
-
xxsm: 3,
|
|
4
|
-
xsm: 5,
|
|
5
|
-
sm: 10,
|
|
6
|
-
md: 15,
|
|
7
|
-
lg: 20,
|
|
8
|
-
xlg: 30,
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
radius: {
|
|
12
|
-
xsm: 5,
|
|
13
|
-
sm: 7,
|
|
14
|
-
md: 8,
|
|
15
|
-
lg: 10,
|
|
16
|
-
xlg: 12,
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// Buttons, inputs, tags
|
|
20
|
-
elementHeights: {
|
|
21
|
-
xsm: 20,
|
|
22
|
-
sm: 30,
|
|
23
|
-
md: 35,
|
|
24
|
-
lg: 50,
|
|
25
|
-
xlg: 60,
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
texts: {
|
|
29
|
-
h1: {
|
|
30
|
-
fontSize: 32,
|
|
31
|
-
strong: true,
|
|
32
|
-
},
|
|
33
|
-
h2: {
|
|
34
|
-
fontSize: 26,
|
|
35
|
-
strong: true,
|
|
36
|
-
},
|
|
37
|
-
h3: {
|
|
38
|
-
fontSize: 22,
|
|
39
|
-
strong: true,
|
|
40
|
-
},
|
|
41
|
-
h4: {
|
|
42
|
-
fontSize: 18,
|
|
43
|
-
strong: true,
|
|
44
|
-
},
|
|
45
|
-
h5: {
|
|
46
|
-
fontSize: 16,
|
|
47
|
-
strong: true,
|
|
48
|
-
},
|
|
49
|
-
h6: {
|
|
50
|
-
fontSize: 14,
|
|
51
|
-
strong: true,
|
|
52
|
-
},
|
|
53
|
-
p: { fontSize: 14 },
|
|
54
|
-
sm: { fontSize: 12 },
|
|
55
|
-
xsm: { fontSize: 10 },
|
|
56
|
-
xxsm: { fontSize: 8 },
|
|
57
|
-
},
|
|
58
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|