@apify/ui-library 0.76.1 → 0.76.2-featcolortokens-178953.21

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 (76) hide show
  1. package/README.md +18 -5
  2. package/dist/src/design_system/colors/generated/colors_theme.dark.d.ts +110 -0
  3. package/dist/src/design_system/colors/generated/colors_theme.dark.d.ts.map +1 -0
  4. package/dist/src/design_system/colors/generated/colors_theme.dark.js +110 -0
  5. package/dist/src/design_system/colors/generated/colors_theme.dark.js.map +1 -0
  6. package/dist/src/design_system/colors/generated/colors_theme.light.d.ts +110 -0
  7. package/dist/src/design_system/colors/generated/colors_theme.light.d.ts.map +1 -0
  8. package/dist/src/design_system/colors/generated/colors_theme.light.js +110 -0
  9. package/dist/src/design_system/colors/generated/colors_theme.light.js.map +1 -0
  10. package/dist/src/design_system/colors/generated/css_variables.dark.d.ts +5 -0
  11. package/dist/src/design_system/colors/generated/css_variables.dark.d.ts.map +1 -0
  12. package/dist/src/design_system/colors/generated/css_variables.dark.js +147 -0
  13. package/dist/src/design_system/colors/generated/css_variables.dark.js.map +1 -0
  14. package/dist/src/design_system/colors/generated/css_variables.light.d.ts +5 -0
  15. package/dist/src/design_system/colors/generated/css_variables.light.d.ts.map +1 -0
  16. package/dist/src/design_system/colors/generated/css_variables.light.js +147 -0
  17. package/dist/src/design_system/colors/generated/css_variables.light.js.map +1 -0
  18. package/dist/src/design_system/colors/generated/css_variables_palette.dark.d.ts +5 -0
  19. package/dist/src/design_system/colors/generated/css_variables_palette.dark.d.ts.map +1 -0
  20. package/dist/src/design_system/colors/generated/css_variables_palette.dark.js +74 -0
  21. package/dist/src/design_system/colors/generated/css_variables_palette.dark.js.map +1 -0
  22. package/dist/src/design_system/colors/generated/css_variables_palette.light.d.ts +5 -0
  23. package/dist/src/design_system/colors/generated/css_variables_palette.light.d.ts.map +1 -0
  24. package/dist/src/design_system/colors/generated/css_variables_palette.light.js +74 -0
  25. package/dist/src/design_system/colors/generated/css_variables_palette.light.js.map +1 -0
  26. package/dist/src/design_system/{properties_theme.d.ts → colors/generated/properties_theme.d.ts} +18 -14
  27. package/dist/src/design_system/colors/generated/properties_theme.d.ts.map +1 -0
  28. package/dist/src/design_system/{properties_theme.js → colors/generated/properties_theme.js} +18 -154
  29. package/dist/src/design_system/colors/generated/properties_theme.js.map +1 -0
  30. package/dist/src/design_system/colors/index.d.ts +8 -0
  31. package/dist/src/design_system/colors/index.d.ts.map +1 -0
  32. package/dist/src/design_system/colors/index.js +8 -0
  33. package/dist/src/design_system/colors/index.js.map +1 -0
  34. package/dist/src/design_system/theme.d.ts +88 -87
  35. package/dist/src/design_system/theme.d.ts.map +1 -1
  36. package/dist/src/design_system/theme.js +1 -2
  37. package/dist/src/design_system/theme.js.map +1 -1
  38. package/dist/src/index.d.ts +1 -0
  39. package/dist/src/index.d.ts.map +1 -1
  40. package/dist/src/index.js +1 -0
  41. package/dist/src/index.js.map +1 -1
  42. package/dist/tsconfig.build.tsbuildinfo +1 -1
  43. package/package.json +10 -4
  44. package/src/design_system/colors/build_color_tokens.js +183 -0
  45. package/src/design_system/colors/figma_color_tokens.dark.json +886 -0
  46. package/src/design_system/colors/figma_color_tokens.light.json +886 -0
  47. package/src/design_system/colors/generated/colors_theme.dark.ts +110 -0
  48. package/src/design_system/{colors_theme.ts → colors/generated/colors_theme.light.ts} +40 -143
  49. package/src/design_system/colors/generated/css_variables.dark.ts +147 -0
  50. package/src/design_system/colors/generated/css_variables.light.ts +147 -0
  51. package/src/design_system/colors/generated/css_variables_palette.dark.ts +74 -0
  52. package/src/design_system/colors/generated/css_variables_palette.light.ts +74 -0
  53. package/src/design_system/{properties_theme.ts → colors/generated/properties_theme.ts} +19 -293
  54. package/src/design_system/colors/index.ts +7 -0
  55. package/src/design_system/theme.ts +1 -2
  56. package/src/index.ts +1 -0
  57. package/style/colors/dark.scss +148 -0
  58. package/style/colors/light.scss +148 -0
  59. package/style/colors/palette.dark.scss +75 -0
  60. package/style/colors/palette.light.scss +75 -0
  61. package/.stylelintrc +0 -12
  62. package/CHANGELOG.md +0 -3438
  63. package/CODEOWNERS +0 -7
  64. package/dist/src/design_system/colors_theme.d.ts +0 -213
  65. package/dist/src/design_system/colors_theme.d.ts.map +0 -1
  66. package/dist/src/design_system/colors_theme.js +0 -213
  67. package/dist/src/design_system/colors_theme.js.map +0 -1
  68. package/dist/src/design_system/properties_theme.d.ts.map +0 -1
  69. package/dist/src/design_system/properties_theme.js.map +0 -1
  70. package/eslint.config.mjs +0 -44
  71. package/src/codemods/generate_color_property_tokens.mjs +0 -98
  72. package/src/codemods/generate_color_theme_files.mjs +0 -47
  73. package/src/design_system/generate_color_definitions.js +0 -44
  74. package/src/design_system/supernova_color_tokens.json +0 -1766
  75. package/tsconfig.build.json +0 -17
  76. package/tsconfig.json +0 -10
@@ -1,44 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
-
3
- const code = readFileSync('./src/design_system/supernova_color_tokens.json', 'utf-8');
4
-
5
- const colorsDefinitions = JSON.parse(code);
6
-
7
- const getObjectValueByPath = (obj, path) => {
8
- return path.split('.').reduce((acc, part) => {
9
- return acc && acc[part];
10
- }, obj);
11
- };
12
-
13
- const getColorPropertyName = (semanticCategory, property) => {
14
- const semanticColorName = `${property.split(/[_ ]/).map((semanticPartName) => semanticPartName.toLowerCase()).join('-')}`;
15
-
16
- // lower case and replace spaces with dashes
17
- const semanticCategoryName = semanticCategory.toLowerCase().split(' ').join('-');
18
-
19
- return `--color-${semanticCategoryName}-${semanticColorName}`;
20
- };
21
-
22
- const generateColorDefinitions = (themeVariant) => {
23
- const mergedPalette = {
24
- ...colorsDefinitions[themeVariant].Semantic,
25
- ...colorsDefinitions[themeVariant].Decorative,
26
- };
27
-
28
- const colorDefinitions = [];
29
- for (const [semanticCategory, palette] of Object.entries(mergedPalette)) {
30
- for (const [key, { value }] of Object.entries(palette)) {
31
- colorDefinitions.push(
32
-
33
- `${getColorPropertyName(semanticCategory, key)}: ${value.startsWith('#') ? value : getObjectValueByPath(colorsDefinitions[themeVariant], value.slice(1, -1)).value};`,
34
- );
35
- }
36
- }
37
-
38
- return colorDefinitions.join('\n');
39
- };
40
-
41
- ['light', 'dark'].forEach((themeVariant) => {
42
- // eslint-disable-next-line no-console
43
- console.log(`\n*** CSS variables from ${themeVariant} mode ***\n`, generateColorDefinitions(themeVariant));
44
- });