@neko-os/ui 0.5.3 → 0.5.4

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.
@@ -1,7 +1,7 @@
1
1
  var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/Image.native.js";var _excluded = ["src", "source", "resizeMode"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}import { Image as RNImage } from "react-native-web";import { jsx as _jsx } from "react/jsx-runtime";
2
2
 
3
3
  export function AbsImage(_ref) {var src = _ref.src,source = _ref.source,_ref$resizeMode = _ref.resizeMode,resizeMode = _ref$resizeMode === void 0 ? 'cover' : _ref$resizeMode,props = _objectWithoutProperties(_ref, _excluded);
4
- if (!source && !!src) source = { uri: src };
4
+ if (!source && src != null) source = typeof src === 'string' ? { uri: src } : src;
5
5
 
6
6
  return _jsx(RNImage, Object.assign({ source: source, resizeMode: resizeMode }, props));
7
7
  }
@@ -1,7 +1,7 @@
1
1
  var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/abstractions/Image.web.js";var _excluded = ["src", "source", "resizeMode"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}import { Image as RNImage } from "react-native-web";import { jsx as _jsx } from "react/jsx-runtime";
2
2
 
3
3
  export function AbsImage(_ref) {var src = _ref.src,source = _ref.source,_ref$resizeMode = _ref.resizeMode,resizeMode = _ref$resizeMode === void 0 ? 'cover' : _ref$resizeMode,props = _objectWithoutProperties(_ref, _excluded);
4
- if (!source && !!src) source = { uri: src };
4
+ if (!source && src != null) source = typeof src === 'string' ? { uri: src } : src;
5
5
 
6
6
  return _jsx(RNImage, Object.assign({ source: source, resizeMode: resizeMode }, props));
7
7
  }
@@ -64,11 +64,13 @@ export function useNewForm() {var _ref = arguments.length > 0 && arguments[0] !=
64
64
 
65
65
  var isTouched = function isTouched(name) {
66
66
  if (!name) return touchedRef.current.size > 0;
67
+ if (Array.isArray(name)) return name.some(function (n) {return touchedRef.current.has(toKey(n));});
67
68
  return touchedRef.current.has(toKey(name));
68
69
  };
69
70
 
70
71
  var isDirty = function isDirty(name) {
71
72
  if (!name) return dirtyRef.current.size > 0;
73
+ if (Array.isArray(name)) return name.some(function (n) {return dirtyRef.current.has(toKey(n));});
72
74
  return dirtyRef.current.has(toKey(name));
73
75
  };
74
76
 
@@ -1,4 +1,4 @@
1
- var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/InputWrapper.js";var _excluded = ["prefix", "suffix", "prefixIcon", "prefixIconColor", "suffixIcon", "suffixIconColor", "loading", "error", "multiline", "children", "ref"];function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}import { pipe, is } from 'ramda';
1
+ var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/inputs/InputWrapper.js";var _excluded = ["prefix", "suffix", "prefixIcon", "prefixIconColor", "suffixIcon", "suffixIconColor", "loading", "error", "multiline", "children", "ref"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { pipe, is } from 'ramda';
2
2
  import React from 'react';
3
3
 
4
4
  import { Icon } from "../presentation/Icon";
@@ -9,16 +9,17 @@ import { useDefaultModifier } from "../../modifiers/default";
9
9
  import { useSizeConverter } from "../../modifiers/sizeConverter";
10
10
  import { useThemeComponentModifier } from "../../modifiers/themeComponent";import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
 
12
- var DEFAULT_PROPS = {
13
- paddingH: 'sm',
14
- bg: 'overlayBG',
15
- border: true,
16
- br: 'md',
17
- row: true,
18
- gap: 'sm'
19
- };
12
+ var DEFAULT_PROPS = function DEFAULT_PROPS(_ref) {var _ref2 = _slicedToArray(_ref, 1),sizeCode = _ref2[0].sizeCode;return {
13
+ paddingH: 'sm',
14
+ bg: 'overlayBG',
15
+ border: true,
16
+ br: 'md',
17
+ row: true,
18
+ gap: 'sm',
19
+ br: sizeCode
20
+ };};
20
21
 
21
- export function InputWrapper(_ref)
22
+ export function InputWrapper(_ref3)
22
23
 
23
24
 
24
25
 
@@ -31,7 +32,7 @@ export function InputWrapper(_ref)
31
32
 
32
33
 
33
34
 
34
- {var prefix = _ref.prefix,suffix = _ref.suffix,prefixIcon = _ref.prefixIcon,prefixIconColor = _ref.prefixIconColor,suffixIcon = _ref.suffixIcon,suffixIconColor = _ref.suffixIconColor,loading = _ref.loading,error = _ref.error,multiline = _ref.multiline,children = _ref.children,ref = _ref.ref,rootProps = _objectWithoutProperties(_ref, _excluded);
35
+ {var prefix = _ref3.prefix,suffix = _ref3.suffix,prefixIcon = _ref3.prefixIcon,prefixIconColor = _ref3.prefixIconColor,suffixIcon = _ref3.suffixIcon,suffixIconColor = _ref3.suffixIconColor,loading = _ref3.loading,error = _ref3.error,multiline = _ref3.multiline,children = _ref3.children,ref = _ref3.ref,rootProps = _objectWithoutProperties(_ref3, _excluded);
35
36
  var _React$useState = React.useState(false),_React$useState2 = _slicedToArray(_React$useState, 2),hover = _React$useState2[0],setHover = _React$useState2[1];
36
37
  var fallbackInputRef = React.useRef();
37
38
  var inputRef = ref || fallbackInputRef;
@@ -18,8 +18,9 @@ var DEFAULT_PROPS = function DEFAULT_PROPS(_ref) {var _ref2 = _slicedToArray(_re
18
18
  row: true,
19
19
  border: true,
20
20
  buttonProps: {
21
- fullH: true,
22
- size: sizeCode
21
+ size: sizeCode,
22
+ height: null,
23
+ flex: true
23
24
  }
24
25
  };};
25
26
 
@@ -1,4 +1,4 @@
1
- var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/presentation/Avatar.js";var _excluded = ["initials", "name", "icon", "src", "invert", "textProps", "iconProps", "iconSize"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { pipe } from 'ramda';
1
+ var _jsxFileName = "/Users/christianstorch/Apps/nekoapps/libs/neko-ui/src/components/presentation/Avatar.js";var _excluded = ["initials", "name", "icon", "src", "invert", "textProps", "iconProps", "iconSize", "imageProps"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { pipe } from 'ramda';
2
2
 
3
3
  import { AbsView } from "../../abstractions/View";
4
4
  import { IconLabel } from "./IconLabel";
@@ -54,7 +54,7 @@ export function Avatar(rootProps) {
54
54
  useOverflowModifier
55
55
  )([{}, rootProps]),_pipe2 = _slicedToArray(_pipe, 2),_pipe2$ = _pipe2[0],fontColor = _pipe2$.fontColor,sizeCode = _pipe2$.sizeCode,formattedProps = _pipe2[1];
56
56
 
57
- var initials = formattedProps.initials,name = formattedProps.name,icon = formattedProps.icon,src = formattedProps.src,invert = formattedProps.invert,textProps = formattedProps.textProps,iconProps = formattedProps.iconProps,iconSize = formattedProps.iconSize,props = _objectWithoutProperties(formattedProps, _excluded);
57
+ var initials = formattedProps.initials,name = formattedProps.name,icon = formattedProps.icon,src = formattedProps.src,invert = formattedProps.invert,textProps = formattedProps.textProps,iconProps = formattedProps.iconProps,iconSize = formattedProps.iconSize,imageProps = formattedProps.imageProps,props = _objectWithoutProperties(formattedProps, _excluded);
58
58
  initials = initials || getInitials(name);
59
59
 
60
60
  var content =
@@ -69,7 +69,7 @@ export function Avatar(rootProps) {
69
69
  iconProps: Object.assign({ size: iconSize }, iconProps) }
70
70
  );
71
71
 
72
- if (!!src) content = _jsx(Image, { br: 0, src: src, width: sizeCode, height: sizeCode });
72
+ if (!!src) content = _jsx(Image, Object.assign({ br: 0, src: src, width: sizeCode, height: sizeCode }, imageProps));
73
73
 
74
74
  return (
75
75
  _jsx(AbsView, Object.assign({ className: "neko-avatar" }, props, { children:
@@ -1,11 +1,16 @@
1
- var _excluded = ["flex"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { clearProps, flattenStyle } from "./_helpers";
1
+ var _excluded = ["flex", "alignSelf", "selfStretch", "selfCenter", "selfStart", "selfEnd"];function _objectWithoutProperties(e, t) {if (null == e) return {};var o,r,i = _objectWithoutPropertiesLoose(e, t);if (Object.getOwnPropertySymbols) {var n = Object.getOwnPropertySymbols(e);for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);}return i;}function _objectWithoutPropertiesLoose(r, e) {if (null == r) return {};var t = {};for (var n in r) if ({}.hasOwnProperty.call(r, n)) {if (-1 !== e.indexOf(n)) continue;t[n] = r[n];}return t;}function _slicedToArray(r, e) {return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r, a) {if (r) {if ("string" == typeof r) return _arrayLikeToArray(r, a);var t = {}.toString.call(r).slice(8, -1);return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;}}function _arrayLikeToArray(r, a) {(null == a || a > r.length) && (a = r.length);for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];return n;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(r) {if (Array.isArray(r)) return r;}import { clearProps, flattenStyle } from "./_helpers";
2
2
 
3
3
  export function useFlexModifier(_ref) {var _ref2 = _slicedToArray(_ref, 2),values = _ref2[0],props = _ref2[1];
4
- var flex = props.flex,restProps = _objectWithoutProperties(props, _excluded);
4
+ var flex = props.flex,alignSelf = props.alignSelf,selfStretch = props.selfStretch,selfCenter = props.selfCenter,selfStart = props.selfStart,selfEnd = props.selfEnd,restProps = _objectWithoutProperties(props, _excluded);
5
5
 
6
6
  if (flex === true) flex = 1;
7
7
 
8
- var style = clearProps({ flex: flex, minWidth: 0 });
8
+ if (selfStretch) alignSelf = 'stretch';
9
+ if (selfCenter) alignSelf = 'center';
10
+ if (selfStart) alignSelf = 'flex-start';
11
+ if (selfEnd) alignSelf = 'flex-end';
12
+
13
+ var style = clearProps({ flex: flex, minWidth: 0, alignSelf: alignSelf });
9
14
 
10
15
  return [
11
16
  values, Object.assign({},
@@ -32,7 +32,9 @@ export var DEFAULT_BLACK_THEME = mergeDeepRight(BASE_THEME, {
32
32
  gray: '#8E8E93',
33
33
  brown: '#8B5E3C',
34
34
  lylac: '#C77DFF',
35
- pink: '#FF6FAE'
35
+ pink: '#FF6FAE',
36
+ white: '#FFFFFF',
37
+ black: '#000000'
36
38
  }
37
39
 
38
40
 
@@ -31,6 +31,8 @@ export var CYBERPUNK_DARK_THEME = mergeDeepRight(BASE_THEME, {
31
31
  gray: '#8E8EAA',
32
32
  brown: '#8B5CF6',
33
33
  lylac: '#C77DFF',
34
- pink: '#FF4FD8'
34
+ pink: '#FF4FD8',
35
+ white: '#FFFFFF',
36
+ black: '#000000'
35
37
  }
36
38
  });
@@ -30,6 +30,8 @@ export var DEFAULT_DARK_THEME = mergeDeepRight(BASE_THEME, {
30
30
  gray: '#9E9E9E',
31
31
  brown: '#8D6E63',
32
32
  lylac: '#B39DDB',
33
- pink: '#F48FB1'
33
+ pink: '#F48FB1',
34
+ white: '#FFFFFF',
35
+ black: '#000000'
34
36
  }
35
37
  });
@@ -38,7 +38,9 @@ export var DEFAULT_MATRIX_THEME = mergeDeepRight(BASE_THEME, {
38
38
  gray: '#2E2E2E',
39
39
  brown: '#5C4033',
40
40
  lylac: '#C084FC',
41
- pink: '#FF4FD8'
41
+ pink: '#FF4FD8',
42
+ white: '#FFFFFF',
43
+ black: '#000000'
42
44
  },
43
45
 
44
46
  radius: {
@@ -30,6 +30,8 @@ export var DEFAULT_LIGHT_THEME = mergeDeepRight(BASE_THEME, {
30
30
  gray: '#B0BEC5',
31
31
  brown: '#8D6E63',
32
32
  lylac: '#B39DDB',
33
- pink: '#F48FB1'
33
+ pink: '#F48FB1',
34
+ white: '#FFFFFF',
35
+ black: '#000000'
34
36
  }
35
37
  });
@@ -31,6 +31,8 @@ export var DEFAULT_PAPER_THEME = mergeDeepRight(BASE_THEME, {
31
31
  gray: '#B8B8B8',
32
32
  brown: '#8B7355',
33
33
  lylac: '#C7B7D4',
34
- pink: '#E4A1B2'
34
+ pink: '#E4A1B2',
35
+ white: '#FFFFFF',
36
+ black: '#000000'
35
37
  }
36
38
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neko-os/ui",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "author": "Christian Storch <ccstorch@gmail.com>",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  import { Image as RNImage } from 'react-native'
2
2
 
3
3
  export function AbsImage({ src, source, resizeMode = 'cover', ...props }) {
4
- if (!source && !!src) source = { uri: src }
4
+ if (!source && src != null) source = typeof src === 'string' ? { uri: src } : src
5
5
 
6
6
  return <RNImage source={source} resizeMode={resizeMode} {...props} />
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { Image as RNImage } from 'react-native'
2
2
 
3
3
  export function AbsImage({ src, source, resizeMode = 'cover', ...props }) {
4
- if (!source && !!src) source = { uri: src }
4
+ if (!source && src != null) source = typeof src === 'string' ? { uri: src } : src
5
5
 
6
6
  return <RNImage source={source} resizeMode={resizeMode} {...props} />
7
7
  }
@@ -64,11 +64,13 @@ export function useNewForm({ initialValues = {}, validate, onSubmit, onValuesCha
64
64
 
65
65
  const isTouched = (name) => {
66
66
  if (!name) return touchedRef.current.size > 0
67
+ if (Array.isArray(name)) return name.some((n) => touchedRef.current.has(toKey(n)))
67
68
  return touchedRef.current.has(toKey(name))
68
69
  }
69
70
 
70
71
  const isDirty = (name) => {
71
72
  if (!name) return dirtyRef.current.size > 0
73
+ if (Array.isArray(name)) return name.some((n) => dirtyRef.current.has(toKey(n)))
72
74
  return dirtyRef.current.has(toKey(name))
73
75
  }
74
76
 
@@ -9,14 +9,15 @@ import { useDefaultModifier } from '../../modifiers/default'
9
9
  import { useSizeConverter } from '../../modifiers/sizeConverter'
10
10
  import { useThemeComponentModifier } from '../../modifiers/themeComponent'
11
11
 
12
- const DEFAULT_PROPS = {
12
+ const DEFAULT_PROPS = ([{ sizeCode }]) => ({
13
13
  paddingH: 'sm',
14
14
  bg: 'overlayBG',
15
15
  border: true,
16
16
  br: 'md',
17
17
  row: true,
18
18
  gap: 'sm',
19
- }
19
+ br: sizeCode,
20
+ })
20
21
 
21
22
  export function InputWrapper({
22
23
  prefix,
@@ -18,8 +18,9 @@ const DEFAULT_PROPS = ([{ sizeCode }]) => ({
18
18
  row: true,
19
19
  border: true,
20
20
  buttonProps: {
21
- fullH: true,
22
21
  size: sizeCode,
22
+ height: null,
23
+ flex: true,
23
24
  },
24
25
  })
25
26
 
@@ -54,7 +54,7 @@ export function Avatar(rootProps) {
54
54
  useOverflowModifier
55
55
  )([{}, rootProps])
56
56
 
57
- let { initials, name, icon, src, invert, textProps, iconProps, iconSize, ...props } = formattedProps
57
+ let { initials, name, icon, src, invert, textProps, iconProps, iconSize, imageProps, ...props } = formattedProps
58
58
  initials = initials || getInitials(name)
59
59
 
60
60
  let content = (
@@ -69,7 +69,7 @@ export function Avatar(rootProps) {
69
69
  iconProps={{ size: iconSize, ...iconProps }}
70
70
  />
71
71
  )
72
- if (!!src) content = <Image br={0} src={src} width={sizeCode} height={sizeCode} />
72
+ if (!!src) content = <Image br={0} src={src} width={sizeCode} height={sizeCode} {...imageProps} />
73
73
 
74
74
  return (
75
75
  <AbsView className="neko-avatar" {...props}>
@@ -1,11 +1,16 @@
1
1
  import { clearProps, flattenStyle } from './_helpers'
2
2
 
3
3
  export function useFlexModifier([values, props]) {
4
- let { flex, ...restProps } = props
4
+ let { flex, alignSelf, selfStretch, selfCenter, selfStart, selfEnd, ...restProps } = props
5
5
 
6
6
  if (flex === true) flex = 1
7
7
 
8
- const style = clearProps({ flex, minWidth: 0 })
8
+ if (selfStretch) alignSelf = 'stretch'
9
+ if (selfCenter) alignSelf = 'center'
10
+ if (selfStart) alignSelf = 'flex-start'
11
+ if (selfEnd) alignSelf = 'flex-end'
12
+
13
+ const style = clearProps({ flex, minWidth: 0, alignSelf })
9
14
 
10
15
  return [
11
16
  values,
@@ -33,6 +33,8 @@ export const DEFAULT_BLACK_THEME = mergeDeepRight(BASE_THEME, {
33
33
  brown: '#8B5E3C',
34
34
  lylac: '#C77DFF',
35
35
  pink: '#FF6FAE',
36
+ white: '#FFFFFF',
37
+ black: '#000000',
36
38
  },
37
39
 
38
40
  // components: {
@@ -32,5 +32,7 @@ export const CYBERPUNK_DARK_THEME = mergeDeepRight(BASE_THEME, {
32
32
  brown: '#8B5CF6',
33
33
  lylac: '#C77DFF',
34
34
  pink: '#FF4FD8',
35
+ white: '#FFFFFF',
36
+ black: '#000000',
35
37
  },
36
38
  })
@@ -31,5 +31,7 @@ export const DEFAULT_DARK_THEME = mergeDeepRight(BASE_THEME, {
31
31
  brown: '#8D6E63',
32
32
  lylac: '#B39DDB',
33
33
  pink: '#F48FB1',
34
+ white: '#FFFFFF',
35
+ black: '#000000',
34
36
  },
35
37
  })
@@ -39,6 +39,8 @@ export const DEFAULT_MATRIX_THEME = mergeDeepRight(BASE_THEME, {
39
39
  brown: '#5C4033',
40
40
  lylac: '#C084FC',
41
41
  pink: '#FF4FD8',
42
+ white: '#FFFFFF',
43
+ black: '#000000',
42
44
  },
43
45
 
44
46
  radius: {
@@ -31,5 +31,7 @@ export const DEFAULT_LIGHT_THEME = mergeDeepRight(BASE_THEME, {
31
31
  brown: '#8D6E63',
32
32
  lylac: '#B39DDB',
33
33
  pink: '#F48FB1',
34
+ white: '#FFFFFF',
35
+ black: '#000000',
34
36
  },
35
37
  })
@@ -32,5 +32,7 @@ export const DEFAULT_PAPER_THEME = mergeDeepRight(BASE_THEME, {
32
32
  brown: '#8B7355',
33
33
  lylac: '#C7B7D4',
34
34
  pink: '#E4A1B2',
35
+ white: '#FFFFFF',
36
+ black: '#000000',
35
37
  },
36
38
  })