@ornikar/kitt-universal 1.1.0 → 1.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/CHANGELOG.md +39 -0
- package/dist/definitions/Tag/Tag.d.ts +6 -3
- package/dist/definitions/Tag/Tag.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +30 -3
- package/dist/definitions/themes/default.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/index-browser-all.es.android.js +83 -21
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +83 -21
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +83 -21
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +81 -19
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +74 -15
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -3
|
@@ -1148,7 +1148,7 @@ function NativeAnimatedContainer({
|
|
|
1148
1148
|
};
|
|
1149
1149
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1150
1150
|
_f.__workletHash = 10645190329247;
|
|
1151
|
-
_f.__location = "/home/
|
|
1151
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (64:41)";
|
|
1152
1152
|
_f.__optimalization = 2;
|
|
1153
1153
|
|
|
1154
1154
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1182,7 +1182,7 @@ function NativeAnimatedContainer({
|
|
|
1182
1182
|
};
|
|
1183
1183
|
_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
1184
|
_f.__workletHash = 13861998831411;
|
|
1185
|
-
_f.__location = "/home/
|
|
1185
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (70:39)";
|
|
1186
1186
|
_f.__optimalization = 2;
|
|
1187
1187
|
|
|
1188
1188
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1959,23 +1959,57 @@ const StoryGrid = {
|
|
|
1959
1959
|
const Container = /*#__PURE__*/styled__default(PrimitiveView).withConfig({
|
|
1960
1960
|
displayName: "Tag__Container",
|
|
1961
1961
|
componentId: "kitt-universal__sc-19jmowi-0"
|
|
1962
|
-
})(["background-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
|
|
1962
|
+
})(["background-color:", ";border-width:", ";border-color:", ";padding:", ";border-radius:", ";align-self:flex-start;"], ({
|
|
1963
1963
|
theme,
|
|
1964
|
-
type
|
|
1965
|
-
|
|
1964
|
+
type,
|
|
1965
|
+
variant
|
|
1966
|
+
}) => theme.kitt.tag[type][variant].backgroundColor, ({
|
|
1967
|
+
theme,
|
|
1968
|
+
type,
|
|
1969
|
+
variant
|
|
1970
|
+
}) => theme.kitt.tag[type][variant].borderWidth, ({
|
|
1971
|
+
theme,
|
|
1972
|
+
type,
|
|
1973
|
+
variant
|
|
1974
|
+
}) => theme.kitt.tag[type][variant].borderColor, ({
|
|
1966
1975
|
theme
|
|
1967
1976
|
}) => theme.kitt.tag.padding, ({
|
|
1968
1977
|
theme
|
|
1969
1978
|
}) => theme.kitt.tag.borderRadius);
|
|
1979
|
+
const getLabelColor = (type, variant) => {
|
|
1980
|
+
switch (type) {
|
|
1981
|
+
case 'danger':
|
|
1982
|
+
{
|
|
1983
|
+
return variant === 'outline' ? 'danger' : 'black';
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
case 'primary':
|
|
1987
|
+
{
|
|
1988
|
+
return 'primary';
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
case 'default':
|
|
1992
|
+
{
|
|
1993
|
+
return 'black';
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
default:
|
|
1997
|
+
{
|
|
1998
|
+
return 'black';
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
1970
2002
|
function Tag({
|
|
1971
2003
|
label,
|
|
1972
|
-
type = 'default'
|
|
2004
|
+
type = 'default',
|
|
2005
|
+
variant = 'fill'
|
|
1973
2006
|
}) {
|
|
1974
2007
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
1975
|
-
type: type
|
|
2008
|
+
type: type,
|
|
2009
|
+
variant: variant
|
|
1976
2010
|
}, /*#__PURE__*/React__default.createElement(Typography.Text, {
|
|
1977
2011
|
base: "body-xsmall",
|
|
1978
|
-
color: type
|
|
2012
|
+
color: getLabelColor(type, variant)
|
|
1979
2013
|
}, label));
|
|
1980
2014
|
}
|
|
1981
2015
|
|
|
@@ -2028,9 +2062,9 @@ const buttonLateOceanTheme = {
|
|
|
2028
2062
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
2029
2063
|
},
|
|
2030
2064
|
secondary: {
|
|
2031
|
-
backgroundColor:
|
|
2065
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
2032
2066
|
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
2033
|
-
pressedBackgroundColor:
|
|
2067
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
2034
2068
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
2035
2069
|
},
|
|
2036
2070
|
subtle: {
|
|
@@ -2230,15 +2264,40 @@ const tagLateOceanTheme = {
|
|
|
2230
2264
|
borderRadius: '10px',
|
|
2231
2265
|
padding: '2px 12px',
|
|
2232
2266
|
primary: {
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2267
|
+
fill: {
|
|
2268
|
+
backgroundColor: '#EDEBFC',
|
|
2269
|
+
borderWidth: '0',
|
|
2270
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2271
|
+
},
|
|
2272
|
+
outline: {
|
|
2273
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2274
|
+
borderWidth: '1px',
|
|
2275
|
+
borderColor: lateOceanColorPalette.lateOcean
|
|
2276
|
+
}
|
|
2236
2277
|
},
|
|
2237
2278
|
default: {
|
|
2238
|
-
|
|
2279
|
+
fill: {
|
|
2280
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
2281
|
+
borderWidth: '0',
|
|
2282
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2283
|
+
},
|
|
2284
|
+
outline: {
|
|
2285
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2286
|
+
borderWidth: '1px',
|
|
2287
|
+
borderColor: lateOceanColorPalette.black1000
|
|
2288
|
+
}
|
|
2239
2289
|
},
|
|
2240
2290
|
danger: {
|
|
2241
|
-
|
|
2291
|
+
fill: {
|
|
2292
|
+
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
2293
|
+
borderWidth: '0',
|
|
2294
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2295
|
+
},
|
|
2296
|
+
outline: {
|
|
2297
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2298
|
+
borderWidth: '1px',
|
|
2299
|
+
borderColor: colorsLateOceanTheme.danger
|
|
2300
|
+
}
|
|
2242
2301
|
}
|
|
2243
2302
|
};
|
|
2244
2303
|
|