@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
|
@@ -537,7 +537,7 @@ const getColorFromState = state => {
|
|
|
537
537
|
return 'danger';
|
|
538
538
|
|
|
539
539
|
default:
|
|
540
|
-
return '
|
|
540
|
+
return 'black-light';
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
|
|
@@ -1087,20 +1087,6 @@ const PressableIconButton = /*#__PURE__*/styled__default(PrimitivePressable).wit
|
|
|
1087
1087
|
`;
|
|
1088
1088
|
});
|
|
1089
1089
|
|
|
1090
|
-
function WebAnimatedContainer({
|
|
1091
|
-
children,
|
|
1092
|
-
color,
|
|
1093
|
-
disabled,
|
|
1094
|
-
onPress
|
|
1095
|
-
}) {
|
|
1096
|
-
return /*#__PURE__*/React__default.createElement(PressableIconButton, {
|
|
1097
|
-
accessibilityRole: "button",
|
|
1098
|
-
color: color,
|
|
1099
|
-
disabled: disabled,
|
|
1100
|
-
onPress: onPress
|
|
1101
|
-
}, children);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
1090
|
const AnimatedIconButtonBackground = /*#__PURE__*/styled__default(Animated__default.View).withConfig({
|
|
1105
1091
|
displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground",
|
|
1106
1092
|
componentId: "kitt-universal__sc-xl9ll5-0"
|
|
@@ -1126,8 +1112,7 @@ const AnimatedViewContainer = /*#__PURE__*/styled__default(Animated__default.Vie
|
|
|
1126
1112
|
displayName: "PressableAnimatedContainer__AnimatedViewContainer",
|
|
1127
1113
|
componentId: "kitt-universal__sc-xl9ll5-1"
|
|
1128
1114
|
})(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
1129
|
-
|
|
1130
|
-
function NativeAnimatedContainer({
|
|
1115
|
+
function PressableAnimatedContainer({
|
|
1131
1116
|
disabled,
|
|
1132
1117
|
color = 'black',
|
|
1133
1118
|
children,
|
|
@@ -1148,7 +1133,7 @@ function NativeAnimatedContainer({
|
|
|
1148
1133
|
};
|
|
1149
1134
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1150
1135
|
_f.__workletHash = 10645190329247;
|
|
1151
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1136
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (55:41)";
|
|
1152
1137
|
_f.__optimalization = 2;
|
|
1153
1138
|
|
|
1154
1139
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1182,7 +1167,7 @@ function NativeAnimatedContainer({
|
|
|
1182
1167
|
};
|
|
1183
1168
|
_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)}]};}}";
|
|
1184
1169
|
_f.__workletHash = 13861998831411;
|
|
1185
|
-
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (
|
|
1170
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (61:39)";
|
|
1186
1171
|
_f.__optimalization = 2;
|
|
1187
1172
|
|
|
1188
1173
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1215,8 +1200,6 @@ function NativeAnimatedContainer({
|
|
|
1215
1200
|
}), children));
|
|
1216
1201
|
}
|
|
1217
1202
|
|
|
1218
|
-
const PressableAnimatedContainer = reactNative.Platform.OS === 'web' ? WebAnimatedContainer : NativeAnimatedContainer;
|
|
1219
|
-
|
|
1220
1203
|
const IconButtonContentBorder = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1221
1204
|
displayName: "IconButton__IconButtonContentBorder",
|
|
1222
1205
|
componentId: "kitt-universal__sc-swelbf-0"
|
|
@@ -1959,23 +1942,57 @@ const StoryGrid = {
|
|
|
1959
1942
|
const Container = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1960
1943
|
displayName: "Tag__Container",
|
|
1961
1944
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
1962
|
-
})(["background-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
|
|
1945
|
+
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
|
|
1963
1946
|
theme,
|
|
1964
|
-
type
|
|
1965
|
-
|
|
1947
|
+
type,
|
|
1948
|
+
variant
|
|
1949
|
+
}) => theme.kitt.tag[type][variant].backgroundColor, ({
|
|
1950
|
+
theme,
|
|
1951
|
+
type,
|
|
1952
|
+
variant
|
|
1953
|
+
}) => theme.kitt.tag[type][variant].borderWidth, ({
|
|
1954
|
+
theme,
|
|
1955
|
+
type,
|
|
1956
|
+
variant
|
|
1957
|
+
}) => theme.kitt.tag[type][variant].borderColor, ({
|
|
1966
1958
|
theme
|
|
1967
1959
|
}) => theme.kitt.tag.padding, ({
|
|
1968
1960
|
theme
|
|
1969
1961
|
}) => theme.kitt.tag.borderRadius);
|
|
1962
|
+
const getLabelColor = (type, variant) => {
|
|
1963
|
+
switch (type) {
|
|
1964
|
+
case 'danger':
|
|
1965
|
+
{
|
|
1966
|
+
return variant === 'outline' ? 'danger' : 'black';
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
case 'primary':
|
|
1970
|
+
{
|
|
1971
|
+
return 'primary';
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
case 'default':
|
|
1975
|
+
{
|
|
1976
|
+
return 'black';
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
default:
|
|
1980
|
+
{
|
|
1981
|
+
return 'black';
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1970
1985
|
function Tag({
|
|
1971
1986
|
label,
|
|
1972
|
-
type = 'default'
|
|
1987
|
+
type = 'default',
|
|
1988
|
+
variant = 'fill'
|
|
1973
1989
|
}) {
|
|
1974
1990
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
1975
|
-
type: type
|
|
1991
|
+
type: type,
|
|
1992
|
+
variant: variant
|
|
1976
1993
|
}, /*#__PURE__*/React__default.createElement(Typography.Text, {
|
|
1977
1994
|
base: "body-xsmall",
|
|
1978
|
-
color: type
|
|
1995
|
+
color: getLabelColor(type, variant)
|
|
1979
1996
|
}, label));
|
|
1980
1997
|
}
|
|
1981
1998
|
|
|
@@ -1997,7 +2014,9 @@ const lateOceanColorPalette = {
|
|
|
1997
2014
|
englishVermillon: '#D44148',
|
|
1998
2015
|
goldCrayola: '#F8C583',
|
|
1999
2016
|
aero: '#89BDDD',
|
|
2000
|
-
transparent: 'transparent'
|
|
2017
|
+
transparent: 'transparent',
|
|
2018
|
+
moonPurple: '#DBD6F9',
|
|
2019
|
+
moonPurpleLight1: '#EDEBFC'
|
|
2001
2020
|
};
|
|
2002
2021
|
|
|
2003
2022
|
const avatarLateOceanTheme = {
|
|
@@ -2028,9 +2047,9 @@ const buttonLateOceanTheme = {
|
|
|
2028
2047
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
2029
2048
|
},
|
|
2030
2049
|
secondary: {
|
|
2031
|
-
backgroundColor:
|
|
2050
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
2032
2051
|
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
2033
|
-
pressedBackgroundColor:
|
|
2052
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
2034
2053
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
2035
2054
|
},
|
|
2036
2055
|
subtle: {
|
|
@@ -2075,6 +2094,7 @@ const cardLateOceanTheme = {
|
|
|
2075
2094
|
|
|
2076
2095
|
const colorsLateOceanTheme = {
|
|
2077
2096
|
primary: lateOceanColorPalette.lateOcean,
|
|
2097
|
+
primaryLight: lateOceanColorPalette.lateOceanLight1,
|
|
2078
2098
|
accent: lateOceanColorPalette.warmEmbrace,
|
|
2079
2099
|
accentLight: lateOceanColorPalette.warmEmbraceLight1,
|
|
2080
2100
|
success: lateOceanColorPalette.viride,
|
|
@@ -2230,15 +2250,40 @@ const tagLateOceanTheme = {
|
|
|
2230
2250
|
borderRadius: '10px',
|
|
2231
2251
|
padding: '2px 12px',
|
|
2232
2252
|
primary: {
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2253
|
+
fill: {
|
|
2254
|
+
backgroundColor: lateOceanColorPalette.moonPurpleLight1,
|
|
2255
|
+
borderWidth: '0',
|
|
2256
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2257
|
+
},
|
|
2258
|
+
outline: {
|
|
2259
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2260
|
+
borderWidth: '1px',
|
|
2261
|
+
borderColor: lateOceanColorPalette.lateOcean
|
|
2262
|
+
}
|
|
2236
2263
|
},
|
|
2237
2264
|
default: {
|
|
2238
|
-
|
|
2265
|
+
fill: {
|
|
2266
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
2267
|
+
borderWidth: '0',
|
|
2268
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2269
|
+
},
|
|
2270
|
+
outline: {
|
|
2271
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2272
|
+
borderWidth: '1px',
|
|
2273
|
+
borderColor: lateOceanColorPalette.black1000
|
|
2274
|
+
}
|
|
2239
2275
|
},
|
|
2240
2276
|
danger: {
|
|
2241
|
-
|
|
2277
|
+
fill: {
|
|
2278
|
+
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
2279
|
+
borderWidth: '0',
|
|
2280
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2281
|
+
},
|
|
2282
|
+
outline: {
|
|
2283
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2284
|
+
borderWidth: '1px',
|
|
2285
|
+
borderColor: colorsLateOceanTheme.danger
|
|
2286
|
+
}
|
|
2242
2287
|
}
|
|
2243
2288
|
};
|
|
2244
2289
|
|
|
@@ -2259,8 +2304,6 @@ const typographyLateOceanTheme = {
|
|
|
2259
2304
|
colors: {
|
|
2260
2305
|
black: lateOceanColorPalette.black1000,
|
|
2261
2306
|
'black-light': lateOceanColorPalette.black555,
|
|
2262
|
-
grey: lateOceanColorPalette.black555,
|
|
2263
|
-
'grey-light': lateOceanColorPalette.black200,
|
|
2264
2307
|
white: lateOceanColorPalette.white,
|
|
2265
2308
|
'white-light': lateOceanColorPalette.white,
|
|
2266
2309
|
primary: lateOceanColorPalette.lateOcean,
|
|
@@ -2273,8 +2316,7 @@ const typographyLateOceanTheme = {
|
|
|
2273
2316
|
headers: {
|
|
2274
2317
|
fontFamily: {
|
|
2275
2318
|
regular: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
|
|
2276
|
-
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2277
|
-
italic: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2319
|
+
bold: reactNative.Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
|
|
2278
2320
|
},
|
|
2279
2321
|
fontWeight: 400,
|
|
2280
2322
|
fontStyle: 'normal',
|
|
@@ -2294,18 +2336,15 @@ const typographyLateOceanTheme = {
|
|
|
2294
2336
|
bodies: {
|
|
2295
2337
|
fontFamily: {
|
|
2296
2338
|
regular: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
|
|
2297
|
-
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2298
|
-
italic: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Italic'
|
|
2339
|
+
bold: reactNative.Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold'
|
|
2299
2340
|
},
|
|
2300
2341
|
fontWeight: {
|
|
2301
2342
|
regular: 400,
|
|
2302
|
-
bold: 700
|
|
2303
|
-
italic: 400
|
|
2343
|
+
bold: 700
|
|
2304
2344
|
},
|
|
2305
2345
|
fontStyle: {
|
|
2306
2346
|
regular: 'normal',
|
|
2307
|
-
bold: 'normal'
|
|
2308
|
-
italic: 'italic'
|
|
2347
|
+
bold: 'normal'
|
|
2309
2348
|
},
|
|
2310
2349
|
configs: {
|
|
2311
2350
|
'body-large': createTypographyTypeConfig(1.6, 18, 24),
|
|
@@ -2341,7 +2380,9 @@ const breakpoints = {
|
|
|
2341
2380
|
largeBreakpoint: 'max-width: 1023px',
|
|
2342
2381
|
wideBreakpoint: 'max-width: 1279px'
|
|
2343
2382
|
}
|
|
2344
|
-
};
|
|
2383
|
+
}; // eslint-disable-next-line unicorn/expiring-todo-comments
|
|
2384
|
+
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2385
|
+
|
|
2345
2386
|
const theme = {
|
|
2346
2387
|
spacing: 4,
|
|
2347
2388
|
colors: colorsLateOceanTheme,
|