@ornikar/kitt-universal 2.1.1 → 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/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 +81 -17
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +81 -17
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +81 -17
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +81 -17
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +72 -11
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ export interface ButtonProps {
|
|
|
10
10
|
iconSpin?: boolean;
|
|
11
11
|
stretch?: boolean;
|
|
12
12
|
testID?: string;
|
|
13
|
-
onPress
|
|
13
|
+
onPress?: () => void;
|
|
14
14
|
}
|
|
15
15
|
export declare function Button({ children, type, icon, iconPosition, iconSpin, stretch, disabled, onPress, testID, }: ButtonProps): ReactElement;
|
|
16
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,oBAAY,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG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Y,CA2B5B"}
|
|
@@ -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"}
|
|
@@ -236,13 +236,40 @@ export declare const theme: {
|
|
|
236
236
|
borderRadius: string;
|
|
237
237
|
padding: string;
|
|
238
238
|
primary: {
|
|
239
|
-
|
|
239
|
+
fill: {
|
|
240
|
+
backgroundColor: string;
|
|
241
|
+
borderWidth: string;
|
|
242
|
+
borderColor: string;
|
|
243
|
+
};
|
|
244
|
+
outline: {
|
|
245
|
+
backgroundColor: string;
|
|
246
|
+
borderWidth: string;
|
|
247
|
+
borderColor: string;
|
|
248
|
+
};
|
|
240
249
|
};
|
|
241
250
|
default: {
|
|
242
|
-
|
|
251
|
+
fill: {
|
|
252
|
+
backgroundColor: string;
|
|
253
|
+
borderWidth: string;
|
|
254
|
+
borderColor: string;
|
|
255
|
+
};
|
|
256
|
+
outline: {
|
|
257
|
+
backgroundColor: string;
|
|
258
|
+
borderWidth: string;
|
|
259
|
+
borderColor: string;
|
|
260
|
+
};
|
|
243
261
|
};
|
|
244
262
|
danger: {
|
|
245
|
-
|
|
263
|
+
fill: {
|
|
264
|
+
backgroundColor: string;
|
|
265
|
+
borderWidth: string;
|
|
266
|
+
borderColor: string;
|
|
267
|
+
};
|
|
268
|
+
outline: {
|
|
269
|
+
backgroundColor: string;
|
|
270
|
+
borderWidth: string;
|
|
271
|
+
borderColor: string;
|
|
272
|
+
};
|
|
246
273
|
};
|
|
247
274
|
};
|
|
248
275
|
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;AAIF,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;AAIF,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"}
|
|
@@ -1885,26 +1885,63 @@ var StoryGrid = {
|
|
|
1885
1885
|
};
|
|
1886
1886
|
|
|
1887
1887
|
var _templateObject$1;
|
|
1888
|
-
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) {
|
|
1889
1889
|
var theme = _ref.theme,
|
|
1890
|
-
type = _ref.type
|
|
1891
|
-
|
|
1890
|
+
type = _ref.type,
|
|
1891
|
+
variant = _ref.variant;
|
|
1892
|
+
return theme.kitt.tag[type][variant].backgroundColor;
|
|
1892
1893
|
}, function (_ref2) {
|
|
1893
|
-
var theme = _ref2.theme
|
|
1894
|
-
|
|
1894
|
+
var theme = _ref2.theme,
|
|
1895
|
+
type = _ref2.type,
|
|
1896
|
+
variant = _ref2.variant;
|
|
1897
|
+
return theme.kitt.tag[type][variant].borderWidth;
|
|
1895
1898
|
}, function (_ref3) {
|
|
1896
|
-
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;
|
|
1897
1908
|
return theme.kitt.tag.borderRadius;
|
|
1898
1909
|
});
|
|
1899
|
-
function
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
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;
|
|
1903
1939
|
return /*#__PURE__*/React.createElement(Container, {
|
|
1904
|
-
type: type
|
|
1940
|
+
type: type,
|
|
1941
|
+
variant: variant
|
|
1905
1942
|
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
1906
1943
|
base: "body-xsmall",
|
|
1907
|
-
color: type
|
|
1944
|
+
color: getLabelColor(type, variant)
|
|
1908
1945
|
}, label));
|
|
1909
1946
|
}
|
|
1910
1947
|
|
|
@@ -1959,9 +1996,9 @@ var buttonLateOceanTheme = {
|
|
|
1959
1996
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1960
1997
|
},
|
|
1961
1998
|
secondary: {
|
|
1962
|
-
backgroundColor:
|
|
1999
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
1963
2000
|
disabledBackgroundColor: lateOceanColorPalette.black50,
|
|
1964
|
-
pressedBackgroundColor:
|
|
2001
|
+
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
1965
2002
|
disabledBorderColor: lateOceanColorPalette.black100
|
|
1966
2003
|
},
|
|
1967
2004
|
subtle: {
|
|
@@ -2162,13 +2199,40 @@ var tagLateOceanTheme = {
|
|
|
2162
2199
|
borderRadius: '10px',
|
|
2163
2200
|
padding: '2px 12px',
|
|
2164
2201
|
primary: {
|
|
2165
|
-
|
|
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
|
+
}
|
|
2166
2212
|
},
|
|
2167
2213
|
"default": {
|
|
2168
|
-
|
|
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
|
+
}
|
|
2169
2224
|
},
|
|
2170
2225
|
danger: {
|
|
2171
|
-
|
|
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
|
+
}
|
|
2172
2236
|
}
|
|
2173
2237
|
};
|
|
2174
2238
|
|