@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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [1.1.0](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@1.0.2...@ornikar/kitt-universal@1.1.0) (2021-12-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add down right icon [no issue] ([#1168](https://github.com/ornikar/kitt/issues/1168)) ([ee8b2c4](https://github.com/ornikar/kitt/commit/ee8b2c434c7c19ca5d4cb5236d57e2403d9134d8))
|
|
12
|
+
* kitt universal - add icon button [no issue] ([#1156](https://github.com/ornikar/kitt/issues/1156)) ([72fdc8b](https://github.com/ornikar/kitt/commit/72fdc8b4fee12b14b7c53bda692e4dfa78a91a71))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.0.2](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@1.0.1...@ornikar/kitt-universal@1.0.2) (2021-12-20)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @ornikar/kitt-universal
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [1.0.1](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@1.0.0...@ornikar/kitt-universal@1.0.1) (2021-12-09)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* downgrade node minimum required version [no issue] ([#1141](https://github.com/ornikar/kitt/issues/1141)) ([637dd07](https://github.com/ornikar/kitt/commit/637dd0768a1dba3e5577770f80bfe56dee7dad38))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# 1.0.0 (2021-12-08)
|
|
38
|
+
|
|
39
|
+
**Note:** Version bump only for package @ornikar/kitt-universal
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import type { TypographyColor } from '../typography/Typography';
|
|
3
|
+
export declare type TagType = 'primary' | 'default' | 'danger';
|
|
4
|
+
export declare type TagVariant = 'outline' | 'fill';
|
|
3
5
|
export interface TagProps {
|
|
4
6
|
label: ReactNode;
|
|
5
7
|
type?: TagType;
|
|
8
|
+
variant?: TagVariant;
|
|
6
9
|
}
|
|
7
|
-
export declare
|
|
8
|
-
export {};
|
|
10
|
+
export declare const getLabelColor: (type: TagType, variant: TagVariant) => TypographyColor;
|
|
11
|
+
export declare function Tag({ label, type, variant }: TagProps): ReactElement;
|
|
9
12
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,oBAAY,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEvD,oBAAY,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAgBD,eAAO,MAAM,aAAa,SAAU,OAAO,WAAW,UAAU,KAAG,eAelE,CAAC;AAEF,wBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAgB,EAAE,OAAgB,EAAE,EAAE,QAAQ,GAAG,YAAY,CAQzF"}
|
|
@@ -239,13 +239,40 @@ export declare const theme: {
|
|
|
239
239
|
borderRadius: string;
|
|
240
240
|
padding: string;
|
|
241
241
|
primary: {
|
|
242
|
-
|
|
242
|
+
fill: {
|
|
243
|
+
backgroundColor: string;
|
|
244
|
+
borderWidth: string;
|
|
245
|
+
borderColor: string;
|
|
246
|
+
};
|
|
247
|
+
outline: {
|
|
248
|
+
backgroundColor: string;
|
|
249
|
+
borderWidth: string;
|
|
250
|
+
borderColor: string;
|
|
251
|
+
};
|
|
243
252
|
};
|
|
244
253
|
default: {
|
|
245
|
-
|
|
254
|
+
fill: {
|
|
255
|
+
backgroundColor: string;
|
|
256
|
+
borderWidth: string;
|
|
257
|
+
borderColor: string;
|
|
258
|
+
};
|
|
259
|
+
outline: {
|
|
260
|
+
backgroundColor: string;
|
|
261
|
+
borderWidth: string;
|
|
262
|
+
borderColor: string;
|
|
263
|
+
};
|
|
246
264
|
};
|
|
247
265
|
danger: {
|
|
248
|
-
|
|
266
|
+
fill: {
|
|
267
|
+
backgroundColor: string;
|
|
268
|
+
borderWidth: string;
|
|
269
|
+
borderColor: string;
|
|
270
|
+
};
|
|
271
|
+
outline: {
|
|
272
|
+
backgroundColor: string;
|
|
273
|
+
borderWidth: string;
|
|
274
|
+
borderColor: string;
|
|
275
|
+
};
|
|
249
276
|
};
|
|
250
277
|
};
|
|
251
278
|
shadows: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/themes/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAenF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAoBvB,CAAC;AAEF,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/themes/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAenF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAoBvB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAejB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,OAAO,KAAK,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,WAAW,EAAE,OAAO,WAAW,CAAC;CACjC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -2,13 +2,40 @@ export declare const tagLateOceanTheme: {
|
|
|
2
2
|
borderRadius: string;
|
|
3
3
|
padding: string;
|
|
4
4
|
primary: {
|
|
5
|
-
|
|
5
|
+
fill: {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
borderWidth: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
};
|
|
10
|
+
outline: {
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
borderWidth: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
};
|
|
6
15
|
};
|
|
7
16
|
default: {
|
|
8
|
-
|
|
17
|
+
fill: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
borderWidth: string;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
};
|
|
22
|
+
outline: {
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
borderWidth: string;
|
|
25
|
+
borderColor: string;
|
|
26
|
+
};
|
|
9
27
|
};
|
|
10
28
|
danger: {
|
|
11
|
-
|
|
29
|
+
fill: {
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
borderWidth: string;
|
|
32
|
+
borderColor: string;
|
|
33
|
+
};
|
|
34
|
+
outline: {
|
|
35
|
+
backgroundColor: string;
|
|
36
|
+
borderWidth: string;
|
|
37
|
+
borderColor: string;
|
|
38
|
+
};
|
|
12
39
|
};
|
|
13
40
|
};
|
|
14
41
|
//# sourceMappingURL=tagLateOceanTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagLateOceanTheme.d.ts","sourceRoot":"","sources":["../../../../src/themes/late-ocean/tagLateOceanTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tagLateOceanTheme.d.ts","sourceRoot":"","sources":["../../../../src/themes/late-ocean/tagLateOceanTheme.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7B,CAAC"}
|
|
@@ -1105,7 +1105,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1105
1105
|
};
|
|
1106
1106
|
_f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
|
|
1107
1107
|
_f.__workletHash = 10645190329247;
|
|
1108
|
-
_f.__location = "/home/
|
|
1108
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (64:41)";
|
|
1109
1109
|
_f.__optimalization = 2;
|
|
1110
1110
|
|
|
1111
1111
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1139,7 +1139,7 @@ function NativeAnimatedContainer(_ref6) {
|
|
|
1139
1139
|
};
|
|
1140
1140
|
_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
1141
|
_f.__workletHash = 13861998831411;
|
|
1142
|
-
_f.__location = "/home/
|
|
1142
|
+
_f.__location = "/home/chris/ornikar/kitt/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (70:39)";
|
|
1143
1143
|
_f.__optimalization = 2;
|
|
1144
1144
|
|
|
1145
1145
|
global.__reanimatedWorkletInit(_f);
|
|
@@ -1889,26 +1889,63 @@ var StoryGrid = {
|
|
|
1889
1889
|
};
|
|
1890
1890
|
|
|
1891
1891
|
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) {
|
|
1892
|
+
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
1893
|
var theme = _ref.theme,
|
|
1894
|
-
type = _ref.type
|
|
1895
|
-
|
|
1894
|
+
type = _ref.type,
|
|
1895
|
+
variant = _ref.variant;
|
|
1896
|
+
return theme.kitt.tag[type][variant].backgroundColor;
|
|
1896
1897
|
}, function (_ref2) {
|
|
1897
|
-
var theme = _ref2.theme
|
|
1898
|
-
|
|
1898
|
+
var theme = _ref2.theme,
|
|
1899
|
+
type = _ref2.type,
|
|
1900
|
+
variant = _ref2.variant;
|
|
1901
|
+
return theme.kitt.tag[type][variant].borderWidth;
|
|
1899
1902
|
}, function (_ref3) {
|
|
1900
|
-
var theme = _ref3.theme
|
|
1903
|
+
var theme = _ref3.theme,
|
|
1904
|
+
type = _ref3.type,
|
|
1905
|
+
variant = _ref3.variant;
|
|
1906
|
+
return theme.kitt.tag[type][variant].borderColor;
|
|
1907
|
+
}, function (_ref4) {
|
|
1908
|
+
var theme = _ref4.theme;
|
|
1909
|
+
return theme.kitt.tag.padding;
|
|
1910
|
+
}, function (_ref5) {
|
|
1911
|
+
var theme = _ref5.theme;
|
|
1901
1912
|
return theme.kitt.tag.borderRadius;
|
|
1902
1913
|
});
|
|
1903
|
-
function
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1914
|
+
var getLabelColor = function (type, variant) {
|
|
1915
|
+
switch (type) {
|
|
1916
|
+
case 'danger':
|
|
1917
|
+
{
|
|
1918
|
+
return variant === 'outline' ? 'danger' : 'black';
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
case 'primary':
|
|
1922
|
+
{
|
|
1923
|
+
return 'primary';
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
case 'default':
|
|
1927
|
+
{
|
|
1928
|
+
return 'black';
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
default:
|
|
1932
|
+
{
|
|
1933
|
+
return 'black';
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
function Tag(_ref6) {
|
|
1938
|
+
var label = _ref6.label,
|
|
1939
|
+
_ref6$type = _ref6.type,
|
|
1940
|
+
type = _ref6$type === void 0 ? 'default' : _ref6$type,
|
|
1941
|
+
_ref6$variant = _ref6.variant,
|
|
1942
|
+
variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
|
|
1907
1943
|
return /*#__PURE__*/React.createElement(Container, {
|
|
1908
|
-
type: type
|
|
1944
|
+
type: type,
|
|
1945
|
+
variant: variant
|
|
1909
1946
|
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
1910
1947
|
base: "body-xsmall",
|
|
1911
|
-
color: type
|
|
1948
|
+
color: getLabelColor(type, variant)
|
|
1912
1949
|
}, label));
|
|
1913
1950
|
}
|
|
1914
1951
|
|
|
@@ -1961,9 +1998,9 @@ var buttonLateOceanTheme = {
|
|
|
1961
1998
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1962
1999
|
},
|
|
1963
2000
|
secondary: {
|
|
1964
|
-
backgroundColor:
|
|
2001
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
1965
2002
|
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
1966
|
-
pressedBackgroundColor:
|
|
2003
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
1967
2004
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1968
2005
|
},
|
|
1969
2006
|
subtle: {
|
|
@@ -2163,15 +2200,40 @@ var tagLateOceanTheme = {
|
|
|
2163
2200
|
borderRadius: '10px',
|
|
2164
2201
|
padding: '2px 12px',
|
|
2165
2202
|
primary: {
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2203
|
+
fill: {
|
|
2204
|
+
backgroundColor: '#EDEBFC',
|
|
2205
|
+
borderWidth: '0',
|
|
2206
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2207
|
+
},
|
|
2208
|
+
outline: {
|
|
2209
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2210
|
+
borderWidth: '1px',
|
|
2211
|
+
borderColor: lateOceanColorPalette.lateOcean
|
|
2212
|
+
}
|
|
2169
2213
|
},
|
|
2170
2214
|
"default": {
|
|
2171
|
-
|
|
2215
|
+
fill: {
|
|
2216
|
+
backgroundColor: lateOceanColorPalette.black50,
|
|
2217
|
+
borderWidth: '0',
|
|
2218
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2219
|
+
},
|
|
2220
|
+
outline: {
|
|
2221
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2222
|
+
borderWidth: '1px',
|
|
2223
|
+
borderColor: lateOceanColorPalette.black1000
|
|
2224
|
+
}
|
|
2172
2225
|
},
|
|
2173
2226
|
danger: {
|
|
2174
|
-
|
|
2227
|
+
fill: {
|
|
2228
|
+
backgroundColor: lateOceanColorPalette.warmEmbrace,
|
|
2229
|
+
borderWidth: '0',
|
|
2230
|
+
borderColor: lateOceanColorPalette.transparent
|
|
2231
|
+
},
|
|
2232
|
+
outline: {
|
|
2233
|
+
backgroundColor: lateOceanColorPalette.transparent,
|
|
2234
|
+
borderWidth: '1px',
|
|
2235
|
+
borderColor: colorsLateOceanTheme.danger
|
|
2236
|
+
}
|
|
2175
2237
|
}
|
|
2176
2238
|
};
|
|
2177
2239
|
|