@ornikar/kitt-universal 1.1.0 → 2.2.0
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/definitions/Button/Button.d.ts +1 -1
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts +2 -4
- package/dist/definitions/IconButton/PressableAnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts +4 -0
- package/dist/definitions/IconButton/PressableAnimatedContainer.web.d.ts.map +1 -0
- package/dist/definitions/Tag/Tag.d.ts +6 -3
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/primitives/PrimitivePressable.d.ts +1 -1
- package/dist/definitions/primitives/PrimitivePressable.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +33 -9
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/colorsLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/tagLateOceanTheme.d.ts +30 -3
- package/dist/definitions/themes/late-ocean/tagLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts +0 -6
- package/dist/definitions/themes/late-ocean/typographyLateOceanTheme.d.ts.map +1 -1
- package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts +2 -0
- package/dist/definitions/themes/palettes/lateOceanColorPalette.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +2 -2
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +113 -56
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +113 -56
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +113 -68
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +98 -40
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +87 -46
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -544,7 +544,7 @@ var getColorFromState = function (state) {
|
|
|
544
544
|
return 'danger';
|
|
545
545
|
|
|
546
546
|
default:
|
|
547
|
-
return '
|
|
547
|
+
return 'black-light';
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
550
|
|
|
@@ -1063,33 +1063,31 @@ var PressableIconButton = styled(PrimitivePressable)(_templateObject$i || (_temp
|
|
|
1063
1063
|
});
|
|
1064
1064
|
|
|
1065
1065
|
var _templateObject$h, _templateObject2$7;
|
|
1066
|
-
|
|
1067
|
-
var
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
disabled = _ref2.disabled;
|
|
1066
|
+
var AnimatedIconButtonBackground = styled(Animated$1.View)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: ", "px;\n height: ", "px;\n position: absolute;\n bottom: 0;\n left: 0;\n"])), function (_ref) {
|
|
1067
|
+
var theme = _ref.theme,
|
|
1068
|
+
color = _ref.color,
|
|
1069
|
+
disabled = _ref.disabled;
|
|
1071
1070
|
var iconButton = theme.kitt.iconButton;
|
|
1072
1071
|
if (disabled) return iconButton.disabled.backgroundColor;
|
|
1073
1072
|
if (color === 'white') return iconButton.white.pressedBackgroundColor;
|
|
1074
1073
|
return iconButton["default"].pressedBackgroundColor;
|
|
1074
|
+
}, function (_ref2) {
|
|
1075
|
+
var theme = _ref2.theme;
|
|
1076
|
+
return theme.kitt.iconButton.borderRadius;
|
|
1075
1077
|
}, function (_ref3) {
|
|
1076
1078
|
var theme = _ref3.theme;
|
|
1077
|
-
return theme.kitt.iconButton.
|
|
1079
|
+
return theme.kitt.iconButton.width;
|
|
1078
1080
|
}, function (_ref4) {
|
|
1079
1081
|
var theme = _ref4.theme;
|
|
1080
|
-
return theme.kitt.iconButton.width;
|
|
1081
|
-
}, function (_ref5) {
|
|
1082
|
-
var theme = _ref5.theme;
|
|
1083
1082
|
return theme.kitt.iconButton.height;
|
|
1084
1083
|
});
|
|
1085
1084
|
var AnimatedViewContainer = styled(Animated$1.View)(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n"])));
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
onPress = _ref6.onPress;
|
|
1085
|
+
function PressableAnimatedContainer(_ref5) {
|
|
1086
|
+
var disabled = _ref5.disabled,
|
|
1087
|
+
_ref5$color = _ref5.color,
|
|
1088
|
+
color = _ref5$color === void 0 ? 'black' : _ref5$color,
|
|
1089
|
+
children = _ref5.children,
|
|
1090
|
+
onPress = _ref5.onPress;
|
|
1093
1091
|
var theme = useTheme();
|
|
1094
1092
|
var pressed = useSharedValue(false);
|
|
1095
1093
|
var opacityStyles = useAnimatedStyle(function () {
|
|
@@ -1105,7 +1103,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1105
1103
|
};
|
|
1106
1104
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1107
1105
|
_f.__workletHash = 10645190329247;
|
|
1108
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1106
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (55:41)";
|
|
1109
1107
|
_f.__optimalization = 2;
|
|
1110
1108
|
|
|
1111
1109
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1139,7 +1137,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1139
1137
|
};
|
|
1140
1138
|
_f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
|
|
1141
1139
|
_f.__workletHash = 13861998831411;
|
|
1142
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1140
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (61:39)";
|
|
1143
1141
|
_f.__optimalization = 2;
|
|
1144
1142
|
|
|
1145
1143
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1172,8 +1170,6 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1172
1170
|
}), children));
|
|
1173
1171
|
}
|
|
1174
1172
|
|
|
1175
|
-
var PressableAnimatedContainer = NativeAnimatedContainer;
|
|
1176
|
-
|
|
1177
1173
|
var _templateObject$g;
|
|
1178
1174
|
var IconButtonContentBorder = styled(PrimitiveView)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n border: ", ";\n border-color: ", ";\n width: ", "px;\n height: ", "px;\n align-items: center;\n justify-content: center;\n border-radius: ", "px;\n"])), function (_ref) {
|
|
1179
1175
|
var theme = _ref.theme;
|
|
@@ -1275,9 +1271,9 @@ var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPre
|
|
|
1275
1271
|
|
|
1276
1272
|
var _templateObject$d;
|
|
1277
1273
|
|
|
1278
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1274
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1279
1275
|
|
|
1280
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1276
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1281
1277
|
var ContainerView = styled(PrimitiveView)(_templateObject$d || (_templateObject$d = _taggedTemplateLiteral(["\n flex-direction: row;\n padding: ", ";\n ", ";\n border-color: ", ";\n background-color: ", ";\n"])), function (_ref) {
|
|
1282
1278
|
var withPadding = _ref.withPadding,
|
|
1283
1279
|
theme = _ref.theme;
|
|
@@ -1469,9 +1465,9 @@ function Message(_ref11) {
|
|
|
1469
1465
|
})) : null);
|
|
1470
1466
|
}
|
|
1471
1467
|
|
|
1472
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1468
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1473
1469
|
|
|
1474
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
1470
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1475
1471
|
var OverlayPressable = styled(PrimitivePressable)(function (_ref) {
|
|
1476
1472
|
var theme = _ref.theme;
|
|
1477
1473
|
return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
|
|
@@ -1889,26 +1885,63 @@ var StoryGrid = {
|
|
|
1889
1885
|
};
|
|
1890
1886
|
|
|
1891
1887
|
var _templateObject$1;
|
|
1892
|
-
var Container = styled(PrimitiveView)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n background-color: ", ";\n padding: ", ";\n border-radius: ", ";\n align-self: flex-start;\n"])), function (_ref) {
|
|
1888
|
+
var Container = styled(PrimitiveView)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-width: ", ";\n border-color: ", ";\n padding: ", ";\n border-radius: ", ";\n align-self: flex-start;\n"])), function (_ref) {
|
|
1893
1889
|
var theme = _ref.theme,
|
|
1894
|
-
type = _ref.type
|
|
1895
|
-
|
|
1890
|
+
type = _ref.type,
|
|
1891
|
+
variant = _ref.variant;
|
|
1892
|
+
return theme.kitt.tag[type][variant].backgroundColor;
|
|
1896
1893
|
}, function (_ref2) {
|
|
1897
|
-
var theme = _ref2.theme
|
|
1898
|
-
|
|
1894
|
+
var theme = _ref2.theme,
|
|
1895
|
+
type = _ref2.type,
|
|
1896
|
+
variant = _ref2.variant;
|
|
1897
|
+
return theme.kitt.tag[type][variant].borderWidth;
|
|
1899
1898
|
}, function (_ref3) {
|
|
1900
|
-
var theme = _ref3.theme
|
|
1899
|
+
var theme = _ref3.theme,
|
|
1900
|
+
type = _ref3.type,
|
|
1901
|
+
variant = _ref3.variant;
|
|
1902
|
+
return theme.kitt.tag[type][variant].borderColor;
|
|
1903
|
+
}, function (_ref4) {
|
|
1904
|
+
var theme = _ref4.theme;
|
|
1905
|
+
return theme.kitt.tag.padding;
|
|
1906
|
+
}, function (_ref5) {
|
|
1907
|
+
var theme = _ref5.theme;
|
|
1901
1908
|
return theme.kitt.tag.borderRadius;
|
|
1902
1909
|
});
|
|
1903
|
-
function
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1910
|
+
var getLabelColor = function (type, variant) {
|
|
1911
|
+
switch (type) {
|
|
1912
|
+
case 'danger':
|
|
1913
|
+
{
|
|
1914
|
+
return variant === 'outline' ? 'danger' : 'black';
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
case 'primary':
|
|
1918
|
+
{
|
|
1919
|
+
return 'primary';
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
case 'default':
|
|
1923
|
+
{
|
|
1924
|
+
return 'black';
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
default:
|
|
1928
|
+
{
|
|
1929
|
+
return 'black';
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
};
|
|
1933
|
+
function Tag(_ref6) {
|
|
1934
|
+
var label = _ref6.label,
|
|
1935
|
+
_ref6$type = _ref6.type,
|
|
1936
|
+
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
1937
|
+
_ref6$variant = _ref6.variant,
|
|
1938
|
+
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
1907
1939
|
return /*#__PURE__*/React.createElement(Container, {
|
|
1908
|
-
type: type
|
|
1940
|
+
type: type,
|
|
1941
|
+
variant: variant
|
|
1909
1942
|
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
1910
1943
|
base: "body-xsmall",
|
|
1911
|
-
color: type
|
|
1944
|
+
color: getLabelColor(type, variant)
|
|
1912
1945
|
}, label));
|
|
1913
1946
|
}
|
|
1914
1947
|
|
|
@@ -1930,7 +1963,9 @@ var lateOceanColorPalette = {
|
|
|
1930
1963
|
englishVermillon: '#D44148',
|
|
1931
1964
|
goldCrayola: '#F8C583',
|
|
1932
1965
|
aero: '#89BDDD',
|
|
1933
|
-
transparent: 'transparent'
|
|
1966
|
+
transparent: 'transparent',
|
|
1967
|
+
moonPurple: '#DBD6F9',
|
|
1968
|
+
moonPurpleLight1: '#EDEBFC'
|
|
1934
1969
|
};
|
|
1935
1970
|
|
|
1936
1971
|
var avatarLateOceanTheme = {
|
|
@@ -1961,9 +1996,9 @@ var buttonLateOceanTheme = {
|
|
|
1961
1996
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1962
1997
|
},
|
|
1963
1998
|
secondary: {
|
|
1964
|
-
backgroundColor:
|
|
1999
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
1965
2000
|
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
1966
|
-
pressedBackgroundColor:
|
|
2001
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
1967
2002
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1968
2003
|
},
|
|
1969
2004
|
subtle: {
|
|
@@ -2008,6 +2043,7 @@ var cardLateOceanTheme = {
|
|
|
2008
2043
|
|
|
2009
2044
|
var colorsLateOceanTheme = {
|
|
2010
2045
|
primary: lateOceanColorPalette.lateOcean,
|
|
2046
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
2011
2047
|
accent: lateOceanColorPalette.warmEmbrace,
|
|
2012
2048
|
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
2013
2049
|
success: lateOceanColorPalette.viride,
|
|
@@ -2163,15 +2199,40 @@ var tagLateOceanTheme = {
|
|
|
2163
2199
|
borderRadius: '10px',
|
|
2164
2200
|
padding: '2px 12px',
|
|
2165
2201
|
primary: {
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2202
|
+
fill: {
|
|
2203
|
+
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
2204
|
+
borderWidth: '0',
|
|
2205
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2206
|
+
},
|
|
2207
|
+
outline: {
|
|
2208
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2209
|
+
borderWidth: '1px',
|
|
2210
|
+
borderColor: lateOceanColorPalette.lateOcean
|
|
2211
|
+
}
|
|
2169
2212
|
},
|
|
2170
2213
|
"default": {
|
|
2171
|
-
|
|
2214
|
+
fill: {
|
|
2215
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
2216
|
+
borderWidth: '0',
|
|
2217
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2218
|
+
},
|
|
2219
|
+
outline: {
|
|
2220
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2221
|
+
borderWidth: '1px',
|
|
2222
|
+
borderColor: lateOceanColorPalette.black1000
|
|
2223
|
+
}
|
|
2172
2224
|
},
|
|
2173
2225
|
danger: {
|
|
2174
|
-
|
|
2226
|
+
fill: {
|
|
2227
|
+
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
2228
|
+
borderWidth: '0',
|
|
2229
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2230
|
+
},
|
|
2231
|
+
outline: {
|
|
2232
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2233
|
+
borderWidth: '1px',
|
|
2234
|
+
borderColor: colorsLateOceanTheme.danger
|
|
2235
|
+
}
|
|
2175
2236
|
}
|
|
2176
2237
|
};
|
|
2177
2238
|
|
|
@@ -2196,8 +2257,6 @@ var typographyLateOceanTheme = {
|
|
|
2196
2257
|
colors: {
|
|
2197
2258
|
black: lateOceanColorPalette.black1000,
|
|
2198
2259
|
'black-light': lateOceanColorPalette.black555,
|
|
2199
|
-
grey: lateOceanColorPalette.black555,
|
|
2200
|
-
'grey-light': lateOceanColorPalette.black200,
|
|
2201
2260
|
white: lateOceanColorPalette.white,
|
|
2202
2261
|
'white-light': lateOceanColorPalette.white,
|
|
2203
2262
|
primary: lateOceanColorPalette.lateOcean,
|
|
@@ -2210,8 +2269,7 @@ var typographyLateOceanTheme = {
|
|
|
2210
2269
|
headers: {
|
|
2211
2270
|
fontFamily: {
|
|
2212
2271
|
regular: 'Moderat-Extended-Bold',
|
|
2213
|
-
bold: 'Moderat-Extended-Bold'
|
|
2214
|
-
italic: 'Moderat-Extended-Bold'
|
|
2272
|
+
bold: 'Moderat-Extended-Bold'
|
|
2215
2273
|
},
|
|
2216
2274
|
fontWeight: 400,
|
|
2217
2275
|
fontStyle: 'normal',
|
|
@@ -2231,18 +2289,15 @@ var typographyLateOceanTheme = {
|
|
|
2231
2289
|
bodies: {
|
|
2232
2290
|
fontFamily: {
|
|
2233
2291
|
regular: 'NotoSans',
|
|
2234
|
-
bold: 'NotoSans-Bold'
|
|
2235
|
-
italic: 'NotoSans-Italic'
|
|
2292
|
+
bold: 'NotoSans-Bold'
|
|
2236
2293
|
},
|
|
2237
2294
|
fontWeight: {
|
|
2238
2295
|
regular: 400,
|
|
2239
|
-
bold: 700
|
|
2240
|
-
italic: 400
|
|
2296
|
+
bold: 700
|
|
2241
2297
|
},
|
|
2242
2298
|
fontStyle: {
|
|
2243
2299
|
regular: 'normal',
|
|
2244
|
-
bold: 'normal'
|
|
2245
|
-
italic: 'italic'
|
|
2300
|
+
bold: 'normal'
|
|
2246
2301
|
},
|
|
2247
2302
|
configs: {
|
|
2248
2303
|
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
@@ -2278,7 +2333,9 @@ var breakpoints = {
|
|
|
2278
2333
|
largeBreakpoint: 'max-width: 1023px',
|
|
2279
2334
|
wideBreakpoint: 'max-width: 1279px'
|
|
2280
2335
|
}
|
|
2281
|
-
};
|
|
2336
|
+
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2337
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2338
|
+
|
|
2282
2339
|
var theme = {
|
|
2283
2340
|
spacing: 4,
|
|
2284
2341
|
colors: colorsLateOceanTheme,
|