@bitrise/bitkit 12.105.0 → 12.106.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.
Files changed (42) hide show
  1. package/package.json +17 -14
  2. package/src/Components/Avatar/Avatar.tsx +0 -2
  3. package/src/Components/Badge/Badge.theme.ts +2 -6
  4. package/src/Components/Card/Card.tsx +0 -2
  5. package/src/Components/ColorButton/ColorButton.theme.ts +1 -1
  6. package/src/Components/ColorButton/ColorButton.tsx +1 -1
  7. package/src/Components/Dialog/Dialog.tsx +1 -1
  8. package/src/Components/Filter/Filter.theme.ts +1 -1
  9. package/src/Components/Form/Form.theme.ts +3 -6
  10. package/src/Components/Form/Input/Input.tsx +1 -1
  11. package/src/Components/Link/Link.theme.ts +2 -2
  12. package/src/Components/Link/Link.tsx +1 -1
  13. package/src/Components/Menu/MenuItem.tsx +1 -1
  14. package/src/Components/Notification/Notification.tsx +1 -1
  15. package/src/Components/Ribbon/Ribbon.tsx +1 -1
  16. package/src/Components/SegmentedControl/SegmentedControl.theme.ts +1 -1
  17. package/src/Components/Sidebar/SidebarItem.theme.ts +1 -1
  18. package/src/Components/Tabs/ContainedTab.tsx +3 -3
  19. package/src/Components/Tabs/Tabs.theme.ts +1 -3
  20. package/src/Components/Tag/Tag.theme.ts +3 -8
  21. package/src/Components/Tag/Tag.tsx +1 -1
  22. package/src/Components/Text/Text.theme.ts +45 -2
  23. package/src/Components/Text/Text.tsx +4 -17
  24. package/src/Components/components.theme.ts +103 -0
  25. package/src/Foundations/Colors/Colors.tsx +30 -4
  26. package/src/Foundations/Themes/Alert.theme.ts +3 -4
  27. package/src/Foundations/Typography/Typography.tsx +25 -0
  28. package/src/Foundations/docComponents/DocTitle.tsx +11 -0
  29. package/src/Foundations/docComponents/TokenTable.tsx +42 -13
  30. package/src/index.ts +1 -2
  31. package/src/theme.ts +13 -112
  32. package/src/tokens/tokensToTheme.json +977 -0
  33. package/src/types/bitkit.ts +37 -0
  34. package/src/utils/utils.ts +14 -0
  35. package/src/Foundations/Colors/CommonTokens.tsx +0 -21
  36. package/src/Foundations/Colors/SystemTokens.tsx +0 -27
  37. package/src/Foundations/Radii/Radii.ts +0 -10
  38. package/src/Foundations/Sizes/Sizes.ts +0 -18
  39. package/src/Foundations/Typography/Typography.ts +0 -69
  40. package/src/tokens/tokens.json +0 -3275
  41. package/src/tokens/tokens.ts +0 -49
  42. package/src/tokens/tokensUtils.ts +0 -20
@@ -1,49 +0,0 @@
1
- import tokensJson from './tokens.json';
2
- import { looper } from './tokensUtils';
3
-
4
- const legacyTokens = {
5
- brand: {
6
- primary: 'pal.purple.30',
7
- },
8
- separator: {
9
- primary: 'pal.neutral.90',
10
- },
11
- text: {
12
- body: 'pal.neutral.10',
13
- link: 'pal.purple.50',
14
- linkHover: 'pal.purple.30',
15
- secondary: 'pal.neutral.40',
16
- },
17
- };
18
-
19
- const commonColors = (({ background, border, icon, text }) => ({ background, border, icon, text }))(
20
- tokensJson.comp.color,
21
- );
22
-
23
- const paletteColors = looper(tokensJson.core.color.pal);
24
-
25
- export const colors = {
26
- pal: paletteColors,
27
- ...paletteColors,
28
- };
29
-
30
- export const semanticTokens = {
31
- colors: {
32
- ...legacyTokens,
33
- sys: looper(tokensJson.system.color.sys),
34
- ...looper(commonColors),
35
- },
36
- };
37
-
38
- export type TypeColors = `${
39
- | 'neutral'
40
- | 'purple'
41
- | 'red'
42
- | 'orange'
43
- | 'yellow'
44
- | 'green'
45
- | 'turquoise'
46
- | 'purple'
47
- | 'blue'}.${'10' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | '93' | '95' | '100'}`;
48
-
49
- export type ColorScheme = 'blue' | 'red' | 'orange' | 'yellow' | 'green' | 'purple' | 'neutral';
@@ -1,20 +0,0 @@
1
- type JsonValue = {
2
- type: string;
3
- value: string;
4
- };
5
-
6
- const valueFormatter = (obj: JsonValue) => {
7
- return obj.value.replace(/\{color\.(.*)\}/, '$1');
8
- };
9
-
10
- export const looper = (obj: any) => {
11
- const returnObject: any = {};
12
- Object.keys(obj).forEach((color) => {
13
- returnObject[color] = {};
14
- Object.keys(obj[color]).forEach((key: string) => {
15
- const valueObj: JsonValue = obj[color][key];
16
- returnObject[color][key] = valueFormatter(valueObj);
17
- });
18
- });
19
- return returnObject;
20
- };