@gooddata/sdk-ui-theme-provider 10.17.0-alpha.6 → 10.17.0-alpha.8

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 (185) hide show
  1. package/esm/ThemeProvider/ScopedThemeProvider.d.ts +67 -0
  2. package/esm/ThemeProvider/ScopedThemeProvider.d.ts.map +1 -0
  3. package/esm/ThemeProvider/ScopedThemeProvider.js +77 -0
  4. package/esm/ThemeProvider/ScopedThemeProvider.js.map +1 -0
  5. package/esm/cssProperties.d.ts +4 -4
  6. package/esm/cssProperties.d.ts.map +1 -1
  7. package/esm/cssProperties.js +79 -23
  8. package/esm/cssProperties.js.map +1 -1
  9. package/esm/defaultThemes/blueLight.d.ts +6 -0
  10. package/esm/defaultThemes/blueLight.d.ts.map +1 -0
  11. package/esm/defaultThemes/blueLight.js +112 -0
  12. package/esm/defaultThemes/blueLight.js.map +1 -0
  13. package/esm/defaultThemes/greenDark.d.ts +6 -0
  14. package/esm/defaultThemes/greenDark.d.ts.map +1 -0
  15. package/esm/defaultThemes/greenDark.js +42 -0
  16. package/esm/defaultThemes/greenDark.js.map +1 -0
  17. package/esm/defaultThemes/indigo.d.ts +9 -0
  18. package/esm/defaultThemes/indigo.d.ts.map +1 -0
  19. package/esm/defaultThemes/indigo.js +161 -0
  20. package/esm/defaultThemes/indigo.js.map +1 -0
  21. package/esm/defaultThemes/indigoDark.d.ts +6 -0
  22. package/esm/defaultThemes/indigoDark.d.ts.map +1 -0
  23. package/esm/defaultThemes/indigoDark.js +28 -0
  24. package/esm/defaultThemes/indigoDark.js.map +1 -0
  25. package/esm/defaultThemes/pinkLight.d.ts +6 -0
  26. package/esm/defaultThemes/pinkLight.d.ts.map +1 -0
  27. package/esm/defaultThemes/pinkLight.js +85 -0
  28. package/esm/defaultThemes/pinkLight.js.map +1 -0
  29. package/esm/defaultThemes/pompelmoLight.d.ts +6 -0
  30. package/esm/defaultThemes/pompelmoLight.d.ts.map +1 -0
  31. package/esm/defaultThemes/pompelmoLight.js +117 -0
  32. package/esm/defaultThemes/pompelmoLight.js.map +1 -0
  33. package/esm/defaultThemes/redLightTheme.d.ts +6 -0
  34. package/esm/defaultThemes/redLightTheme.d.ts.map +1 -0
  35. package/esm/defaultThemes/redLightTheme.js +114 -0
  36. package/esm/defaultThemes/redLightTheme.js.map +1 -0
  37. package/esm/derivedColors.d.ts.map +1 -1
  38. package/esm/derivedColors.js +6 -1
  39. package/esm/derivedColors.js.map +1 -1
  40. package/esm/index.d.ts +2 -0
  41. package/esm/index.d.ts.map +1 -1
  42. package/esm/index.js +1 -0
  43. package/esm/index.js.map +1 -1
  44. package/esm/internal.d.ts +9 -0
  45. package/esm/internal.d.ts.map +1 -0
  46. package/esm/internal.js +10 -0
  47. package/esm/internal.js.map +1 -0
  48. package/esm/node.d.ts +17 -0
  49. package/esm/node.d.ts.map +1 -0
  50. package/esm/node.js +52 -0
  51. package/esm/node.js.map +1 -0
  52. package/esm/sdk-ui-theme-provider.d.ts +64 -0
  53. package/esm/variablesSpec/DefaultThemePreview.d.ts +7 -0
  54. package/esm/variablesSpec/DefaultThemePreview.d.ts.map +1 -0
  55. package/esm/variablesSpec/DefaultThemePreview.js +116 -0
  56. package/esm/variablesSpec/DefaultThemePreview.js.map +1 -0
  57. package/esm/variablesSpec/allThemeCssVariables.d.ts +6 -0
  58. package/esm/variablesSpec/allThemeCssVariables.d.ts.map +1 -0
  59. package/esm/variablesSpec/allThemeCssVariables.js +72 -0
  60. package/esm/variablesSpec/allThemeCssVariables.js.map +1 -0
  61. package/esm/variablesSpec/deprecated/palette-base.d.ts +3 -0
  62. package/esm/variablesSpec/deprecated/palette-base.d.ts.map +1 -0
  63. package/esm/variablesSpec/deprecated/palette-base.js +78 -0
  64. package/esm/variablesSpec/deprecated/palette-base.js.map +1 -0
  65. package/esm/variablesSpec/generate/generateDefaultScssThemeContent.d.ts +7 -0
  66. package/esm/variablesSpec/generate/generateDefaultScssThemeContent.d.ts.map +1 -0
  67. package/esm/variablesSpec/generate/generateDefaultScssThemeContent.js +56 -0
  68. package/esm/variablesSpec/generate/generateDefaultScssThemeContent.js.map +1 -0
  69. package/esm/variablesSpec/generate/generateDefaultTypeScriptThemeContent.d.ts +7 -0
  70. package/esm/variablesSpec/generate/generateDefaultTypeScriptThemeContent.d.ts.map +1 -0
  71. package/esm/variablesSpec/generate/generateDefaultTypeScriptThemeContent.js +28 -0
  72. package/esm/variablesSpec/generate/generateDefaultTypeScriptThemeContent.js.map +1 -0
  73. package/esm/variablesSpec/inconsistent/inconsistent.d.ts +3 -0
  74. package/esm/variablesSpec/inconsistent/inconsistent.d.ts.map +1 -0
  75. package/esm/variablesSpec/inconsistent/inconsistent.js +275 -0
  76. package/esm/variablesSpec/inconsistent/inconsistent.js.map +1 -0
  77. package/esm/variablesSpec/internal/button.d.ts +3 -0
  78. package/esm/variablesSpec/internal/button.d.ts.map +1 -0
  79. package/esm/variablesSpec/internal/button.js +18 -0
  80. package/esm/variablesSpec/internal/button.js.map +1 -0
  81. package/esm/variablesSpec/internal/font.d.ts +3 -0
  82. package/esm/variablesSpec/internal/font.d.ts.map +1 -0
  83. package/esm/variablesSpec/internal/font.js +8 -0
  84. package/esm/variablesSpec/internal/font.js.map +1 -0
  85. package/esm/variablesSpec/internal/icon.d.ts +3 -0
  86. package/esm/variablesSpec/internal/icon.d.ts.map +1 -0
  87. package/esm/variablesSpec/internal/icon.js +8 -0
  88. package/esm/variablesSpec/internal/icon.js.map +1 -0
  89. package/esm/variablesSpec/internal/modeler.d.ts +3 -0
  90. package/esm/variablesSpec/internal/modeler.d.ts.map +1 -0
  91. package/esm/variablesSpec/internal/modeler.js +13 -0
  92. package/esm/variablesSpec/internal/modeler.js.map +1 -0
  93. package/esm/variablesSpec/internal/spacing.d.ts +3 -0
  94. package/esm/variablesSpec/internal/spacing.d.ts.map +1 -0
  95. package/esm/variablesSpec/internal/spacing.js +33 -0
  96. package/esm/variablesSpec/internal/spacing.js.map +1 -0
  97. package/esm/variablesSpec/internal/transition.d.ts +3 -0
  98. package/esm/variablesSpec/internal/transition.d.ts.map +1 -0
  99. package/esm/variablesSpec/internal/transition.js +8 -0
  100. package/esm/variablesSpec/internal/transition.js.map +1 -0
  101. package/esm/variablesSpec/theme/analytical-designer.d.ts +3 -0
  102. package/esm/variablesSpec/theme/analytical-designer.d.ts.map +1 -0
  103. package/esm/variablesSpec/theme/analytical-designer.js +9 -0
  104. package/esm/variablesSpec/theme/analytical-designer.js.map +1 -0
  105. package/esm/variablesSpec/theme/button.d.ts +3 -0
  106. package/esm/variablesSpec/theme/button.d.ts.map +1 -0
  107. package/esm/variablesSpec/theme/button.js +24 -0
  108. package/esm/variablesSpec/theme/button.js.map +1 -0
  109. package/esm/variablesSpec/theme/chart.d.ts +3 -0
  110. package/esm/variablesSpec/theme/chart.d.ts.map +1 -0
  111. package/esm/variablesSpec/theme/chart.js +70 -0
  112. package/esm/variablesSpec/theme/chart.js.map +1 -0
  113. package/esm/variablesSpec/theme/dashboard.d.ts +3 -0
  114. package/esm/variablesSpec/theme/dashboard.d.ts.map +1 -0
  115. package/esm/variablesSpec/theme/dashboard.js +243 -0
  116. package/esm/variablesSpec/theme/dashboard.js.map +1 -0
  117. package/esm/variablesSpec/theme/kpi.d.ts +3 -0
  118. package/esm/variablesSpec/theme/kpi.d.ts.map +1 -0
  119. package/esm/variablesSpec/theme/kpi.js +33 -0
  120. package/esm/variablesSpec/theme/kpi.js.map +1 -0
  121. package/esm/variablesSpec/theme/modal.d.ts +3 -0
  122. package/esm/variablesSpec/theme/modal.d.ts.map +1 -0
  123. package/esm/variablesSpec/theme/modal.js +47 -0
  124. package/esm/variablesSpec/theme/modal.js.map +1 -0
  125. package/esm/variablesSpec/theme/palette-base.d.ts +3 -0
  126. package/esm/variablesSpec/theme/palette-base.d.ts.map +1 -0
  127. package/esm/variablesSpec/theme/palette-base.js +33 -0
  128. package/esm/variablesSpec/theme/palette-base.js.map +1 -0
  129. package/esm/variablesSpec/theme/palette-complementary.d.ts +3 -0
  130. package/esm/variablesSpec/theme/palette-complementary.d.ts.map +1 -0
  131. package/esm/variablesSpec/theme/palette-complementary.js +63 -0
  132. package/esm/variablesSpec/theme/palette-complementary.js.map +1 -0
  133. package/esm/variablesSpec/theme/table.d.ts +3 -0
  134. package/esm/variablesSpec/theme/table.d.ts.map +1 -0
  135. package/esm/variablesSpec/theme/table.js +69 -0
  136. package/esm/variablesSpec/theme/table.js.map +1 -0
  137. package/esm/variablesSpec/theme/tooltip.d.ts +3 -0
  138. package/esm/variablesSpec/theme/tooltip.d.ts.map +1 -0
  139. package/esm/variablesSpec/theme/tooltip.js +15 -0
  140. package/esm/variablesSpec/theme/tooltip.js.map +1 -0
  141. package/esm/variablesSpec/theme/typography.d.ts +3 -0
  142. package/esm/variablesSpec/theme/typography.d.ts.map +1 -0
  143. package/esm/variablesSpec/theme/typography.js +15 -0
  144. package/esm/variablesSpec/theme/typography.js.map +1 -0
  145. package/esm/variablesSpec/theme-derived/palette-base-derived.d.ts +3 -0
  146. package/esm/variablesSpec/theme-derived/palette-base-derived.d.ts.map +1 -0
  147. package/esm/variablesSpec/theme-derived/palette-base-derived.js +275 -0
  148. package/esm/variablesSpec/theme-derived/palette-base-derived.js.map +1 -0
  149. package/esm/variablesSpec/theme-derived/palette-complementary-derived.d.ts +3 -0
  150. package/esm/variablesSpec/theme-derived/palette-complementary-derived.d.ts.map +1 -0
  151. package/esm/variablesSpec/theme-derived/palette-complementary-derived.js +36 -0
  152. package/esm/variablesSpec/theme-derived/palette-complementary-derived.js.map +1 -0
  153. package/esm/variablesSpec/theme-derived/shadow-derived.d.ts +3 -0
  154. package/esm/variablesSpec/theme-derived/shadow-derived.d.ts.map +1 -0
  155. package/esm/variablesSpec/theme-derived/shadow-derived.js +11 -0
  156. package/esm/variablesSpec/theme-derived/shadow-derived.js.map +1 -0
  157. package/esm/variablesSpec/types.d.ts +104 -0
  158. package/esm/variablesSpec/types.d.ts.map +1 -0
  159. package/esm/variablesSpec/types.js +3 -0
  160. package/esm/variablesSpec/types.js.map +1 -0
  161. package/esm/variablesSpec/validate/log.d.ts +17 -0
  162. package/esm/variablesSpec/validate/log.d.ts.map +1 -0
  163. package/esm/variablesSpec/validate/log.js +30 -0
  164. package/esm/variablesSpec/validate/log.js.map +1 -0
  165. package/esm/variablesSpec/validate/main.d.ts +7 -0
  166. package/esm/variablesSpec/validate/main.d.ts.map +1 -0
  167. package/esm/variablesSpec/validate/main.js +41 -0
  168. package/esm/variablesSpec/validate/main.js.map +1 -0
  169. package/esm/variablesSpec/validate/parse.d.ts +7 -0
  170. package/esm/variablesSpec/validate/parse.d.ts.map +1 -0
  171. package/esm/variablesSpec/validate/parse.js +61 -0
  172. package/esm/variablesSpec/validate/parse.js.map +1 -0
  173. package/esm/variablesSpec/validate/types.d.ts +25 -0
  174. package/esm/variablesSpec/validate/types.d.ts.map +1 -0
  175. package/esm/variablesSpec/validate/types.js +3 -0
  176. package/esm/variablesSpec/validate/types.js.map +1 -0
  177. package/esm/variablesSpec/validate/utils.d.ts +6 -0
  178. package/esm/variablesSpec/validate/utils.d.ts.map +1 -0
  179. package/esm/variablesSpec/validate/utils.js +21 -0
  180. package/esm/variablesSpec/validate/utils.js.map +1 -0
  181. package/esm/variablesSpec/validate/validate.d.ts +42 -0
  182. package/esm/variablesSpec/validate/validate.d.ts.map +1 -0
  183. package/esm/variablesSpec/validate/validate.js +133 -0
  184. package/esm/variablesSpec/validate/validate.js.map +1 -0
  185. package/package.json +15 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AACH,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC9E,YAAY,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EACH,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACvB,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AACH,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,YAAY,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,YAAY,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EACH,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACvB,MAAM,4BAA4B,CAAC"}
package/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { ThemeProvider, isDarkTheme } from "./ThemeProvider/ThemeProvider.js";
2
+ export { ScopedThemeProvider } from "./ThemeProvider/ScopedThemeProvider.js";
2
3
  export { withTheme, useTheme, useThemeIsLoading, useThemeStatus, ThemeContextProvider, } from "./ThemeProvider/Context.js";
3
4
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EACH,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACvB,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAG7E,OAAO,EACH,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,oBAAoB,GACvB,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { blueLightTheme } from "./defaultThemes/blueLight.js";
2
+ export { greenDarkTheme } from "./defaultThemes/greenDark.js";
3
+ export { indigoTheme } from "./defaultThemes/indigo.js";
4
+ export { indigoDarkTheme } from "./defaultThemes/indigoDark.js";
5
+ export { pinkLightTheme } from "./defaultThemes/pinkLight.js";
6
+ export { pompelmoLightTheme } from "./defaultThemes/pompelmoLight.js";
7
+ export { redLightTheme } from "./defaultThemes/redLightTheme.js";
8
+ export { DefaultThemePreview } from "./variablesSpec/DefaultThemePreview.js";
9
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,10 @@
1
+ // (C) 2024 GoodData Corporation
2
+ export { blueLightTheme } from "./defaultThemes/blueLight.js";
3
+ export { greenDarkTheme } from "./defaultThemes/greenDark.js";
4
+ export { indigoTheme } from "./defaultThemes/indigo.js";
5
+ export { indigoDarkTheme } from "./defaultThemes/indigoDark.js";
6
+ export { pinkLightTheme } from "./defaultThemes/pinkLight.js";
7
+ export { pompelmoLightTheme } from "./defaultThemes/pompelmoLight.js";
8
+ export { redLightTheme } from "./defaultThemes/redLightTheme.js";
9
+ export { DefaultThemePreview } from "./variablesSpec/DefaultThemePreview.js";
10
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC"}
package/esm/node.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare function validateThemingInCssFolder(folderToValidate: string): void;
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare function validateThemingInCssFile(filePath: string): void;
9
+ /**
10
+ * @internal
11
+ */
12
+ export declare function generateDefaultScssThemeFile(scssFileToGenerate: string): void;
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare function generateDefaultTypeScriptThemeFile(tsFileToGenerate: string): void;
17
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,gBAAgB,EAAE,MAAM,QAMlE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,QAGxD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,kBAAkB,EAAE,MAAM,QAStE;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,gBAAgB,EAAE,MAAM,QAS1E"}
package/esm/node.js ADDED
@@ -0,0 +1,52 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import { validateCss } from "./variablesSpec/validate/main.js";
3
+ import { generateDefaultScssThemeContent } from "./variablesSpec/generate/generateDefaultScssThemeContent.js";
4
+ import { generateDefaultTypeScriptThemeContent } from "./variablesSpec/generate/generateDefaultTypeScriptThemeContent.js";
5
+ import { logInfo, logSuccess, logError } from "./variablesSpec/validate/log.js";
6
+ import { sync } from "glob";
7
+ import fs from "fs";
8
+ /**
9
+ * @internal
10
+ */
11
+ export function validateThemingInCssFolder(folderToValidate) {
12
+ const allCssFiles = sync(`${folderToValidate}/**/*.css`);
13
+ for (const filePath of allCssFiles) {
14
+ validateThemingInCssFile(filePath);
15
+ }
16
+ }
17
+ /**
18
+ * @internal
19
+ */
20
+ export function validateThemingInCssFile(filePath) {
21
+ const fileContent = fs.readFileSync(filePath, "utf8");
22
+ validateCss(filePath, fileContent);
23
+ }
24
+ /**
25
+ * @internal
26
+ */
27
+ export function generateDefaultScssThemeFile(scssFileToGenerate) {
28
+ logInfo(`Generating default theme scss to ${scssFileToGenerate}`);
29
+ try {
30
+ const content = generateDefaultScssThemeContent();
31
+ fs.writeFileSync(scssFileToGenerate, content);
32
+ logSuccess(`Default theme scss successfully generated.`);
33
+ }
34
+ catch (error) {
35
+ logError(`Error generating default theme scss to ${scssFileToGenerate}: ${error}`);
36
+ }
37
+ }
38
+ /**
39
+ * @internal
40
+ */
41
+ export function generateDefaultTypeScriptThemeFile(tsFileToGenerate) {
42
+ logInfo(`Generating default theme to ${tsFileToGenerate}`);
43
+ try {
44
+ const content = generateDefaultTypeScriptThemeContent();
45
+ fs.writeFileSync(tsFileToGenerate, content);
46
+ logSuccess(`Default theme successfully generated.`);
47
+ }
48
+ catch (error) {
49
+ logError(`Error generating default theme to ${tsFileToGenerate}: ${error}`);
50
+ }
51
+ }
52
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6DAA6D,CAAC;AAC9G,OAAO,EAAE,qCAAqC,EAAE,MAAM,mEAAmE,CAAC;AAC1H,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,gBAAwB;IAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,gBAAgB,WAAW,CAAC,CAAC;IAEzD,KAAK,MAAM,QAAQ,IAAI,WAAW,EAAE,CAAC;QACjC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACrD,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACtD,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,kBAA0B;IACnE,OAAO,CAAC,oCAAoC,kBAAkB,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,+BAA+B,EAAE,CAAC;QAClD,EAAE,CAAC,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAC9C,UAAU,CAAC,4CAA4C,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,QAAQ,CAAC,0CAA0C,kBAAkB,KAAK,KAAK,EAAE,CAAC,CAAC;IACvF,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kCAAkC,CAAC,gBAAwB;IACvE,OAAO,CAAC,+BAA+B,gBAAgB,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,qCAAqC,EAAE,CAAC;QACxD,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC5C,UAAU,CAAC,uCAAuC,CAAC,CAAC;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,QAAQ,CAAC,qCAAqC,gBAAgB,KAAK,KAAK,EAAE,CAAC,CAAC;IAChF,CAAC;AACL,CAAC"}
@@ -13,6 +13,59 @@ import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
13
13
  import { ITheme } from '@gooddata/sdk-model';
14
14
  import { default as React_2 } from 'react';
15
15
 
16
+ /**
17
+ * @internal
18
+ */
19
+ export declare interface IScopedThemeProviderProps {
20
+ /**
21
+ * Theme that will be used if defined.
22
+ *
23
+ * @remarks
24
+ * If not defined here, the theme will be obtained from the backend.
25
+ *
26
+ * Note: either the theme or both backend and workspace MUST be provided (either directly or via their contexts).
27
+ */
28
+ theme?: ITheme;
29
+ /**
30
+ * Analytical backend, from which the ThemeProvider will obtain selected theme object.
31
+ *
32
+ * @remarks
33
+ * If you do not specify instance of analytical backend using this prop, then you MUST have
34
+ * BackendProvider up in the component tree.
35
+ */
36
+ backend?: IAnalyticalBackend;
37
+ /**
38
+ * Identifier of analytical workspace, from which the ThemeProvider will obtain the selected theme identifier
39
+ *
40
+ * @remarks
41
+ * If you do not specify workspace identifier, then you MUST have WorkspaceProvider up in the
42
+ * component tree.
43
+ */
44
+ workspace?: string;
45
+ /**
46
+ * If provided it is called with loaded theme to allow its modification according to the app needs.
47
+ */
48
+ modifier?: ThemeModifier;
49
+ /**
50
+ * Flag determining whether the complementary palette is enabled or not.
51
+ *
52
+ * @remarks
53
+ * If set to false, complementary palette is discarded.
54
+ * Useful for applications not yet fully supporting dark-based themes achievable with the complementary palette.
55
+ */
56
+ enableComplementaryPalette?: boolean;
57
+ /**
58
+ * Should ThemeProvider remove global styles during the unmount phase?
59
+ *
60
+ * Default: true
61
+ */
62
+ removeGlobalStylesOnUnmout?: boolean;
63
+ /**
64
+ * React children
65
+ */
66
+ children?: React_2.ReactNode;
67
+ }
68
+
16
69
  /**
17
70
  * @internal
18
71
  */
@@ -98,6 +151,17 @@ export declare interface IThemeProviderProps {
98
151
  children?: React_2.ReactNode;
99
152
  }
100
153
 
154
+ /**
155
+ * ScopedThemeProvider is an experimental component that is not yet ready for production use.
156
+ *
157
+ * For full functionality, improvements are needed in how React Portals are handled.
158
+ * Currently, components like dropdowns that render through portals appear outside the themed scope
159
+ * and cannot properly access the scoped CSS variables since they exist outside the regular component tree.
160
+ *
161
+ * @internal
162
+ */
163
+ export declare const ScopedThemeProvider: React_2.FC<IScopedThemeProviderProps>;
164
+
101
165
  /**
102
166
  * Provides the theme object, themeIsLoading flag and themeStatus into context
103
167
  *
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * @internal
5
+ */
6
+ export declare const DefaultThemePreview: () => React.JSX.Element;
7
+ //# sourceMappingURL=DefaultThemePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultThemePreview.d.ts","sourceRoot":"","sources":["../../src/variablesSpec/DefaultThemePreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAE/B,CAAC"}
@@ -0,0 +1,116 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import React from "react";
3
+ import { allThemeCssVariables } from "./allThemeCssVariables.js";
4
+ /**
5
+ *
6
+ * @internal
7
+ */
8
+ export const DefaultThemePreview = () => {
9
+ return React.createElement(ThemeVariablesList, null);
10
+ };
11
+ const listStyle = {
12
+ fontFamily: "Avenir",
13
+ fontSize: 14,
14
+ };
15
+ function ThemeVariablesList() {
16
+ return (React.createElement("div", { style: listStyle }, allThemeCssVariables.map((themeVariable) => {
17
+ return React.createElement(ThemeVariablePreview, { key: themeVariable.variableName, variable: themeVariable });
18
+ })));
19
+ }
20
+ const colorPreviewStyle = {
21
+ width: 80,
22
+ height: 80,
23
+ };
24
+ function ColorPreview({ color }) {
25
+ return React.createElement("div", { style: { ...colorPreviewStyle, backgroundColor: color }, title: color });
26
+ }
27
+ const variablePreviewStyle = {
28
+ padding: 20,
29
+ display: "flex",
30
+ alignItems: "center",
31
+ gap: 20,
32
+ borderBottom: "1px solid #ddd",
33
+ };
34
+ const inconsistentVariablePreviewStyle = {
35
+ padding: 20,
36
+ display: "flex",
37
+ flexDirection: "column",
38
+ gap: 20,
39
+ borderBottom: "1px solid #ddd",
40
+ };
41
+ const inconsistentVariablePreviewColorsStyle = {
42
+ display: "flex",
43
+ alignItems: "center",
44
+ flexDirection: "row",
45
+ flexWrap: "wrap",
46
+ };
47
+ const inconsistentVariablePreviewValuesStyle = {
48
+ display: "flex",
49
+ alignItems: "flex-start",
50
+ flexDirection: "column",
51
+ gap: 10,
52
+ };
53
+ const codeStyle = {
54
+ fontFamily: "monospace",
55
+ fontSize: 12,
56
+ border: "1px solid #ddd",
57
+ backgroundColor: "#fefefe",
58
+ padding: "2px 4px",
59
+ borderRadius: 4,
60
+ };
61
+ const contentStyle = {
62
+ display: "flex",
63
+ flexDirection: "column",
64
+ gap: 10,
65
+ alignItems: "flex-start",
66
+ };
67
+ function ThemeVariablePreview({ variable }) {
68
+ switch (variable.type) {
69
+ case "theme":
70
+ return (React.createElement("div", { style: variablePreviewStyle },
71
+ React.createElement(ColorPreview, { color: variable.defaultValue }),
72
+ React.createElement("div", { style: contentStyle },
73
+ React.createElement("div", null,
74
+ React.createElement("strong", null,
75
+ variable.variableName,
76
+ " (",
77
+ variable.type,
78
+ ")")),
79
+ React.createElement("div", null, variable.defaultValue ?? "No default value"),
80
+ React.createElement("div", { style: codeStyle },
81
+ "theme.",
82
+ variable.themePath.join(".")))));
83
+ case "derived":
84
+ case "internal":
85
+ return (React.createElement("div", { style: variablePreviewStyle },
86
+ React.createElement(ColorPreview, { color: variable.defaultValue }),
87
+ React.createElement("div", { style: contentStyle },
88
+ React.createElement("div", null,
89
+ React.createElement("strong", null,
90
+ variable.variableName,
91
+ " (",
92
+ variable.type,
93
+ ")")),
94
+ React.createElement("div", null, variable.defaultValue ?? "No default value"))));
95
+ case "inconsistent":
96
+ return (React.createElement("div", { style: inconsistentVariablePreviewStyle },
97
+ React.createElement("div", { style: contentStyle },
98
+ React.createElement("div", null,
99
+ React.createElement("strong", null,
100
+ variable.variableName,
101
+ " (",
102
+ variable.type,
103
+ ")")),
104
+ React.createElement("div", null, "Unique inconsistent usage colors:"),
105
+ React.createElement("div", { style: inconsistentVariablePreviewColorsStyle }, variable.inconsistentDefaults.map((d) => (React.createElement(ColorPreview, { color: d, key: d })))),
106
+ React.createElement("div", { style: inconsistentVariablePreviewValuesStyle }, variable.inconsistentDefaults.map((d) => (React.createElement("div", { style: codeStyle, key: d }, d)))))));
107
+ case "deprecated":
108
+ return null;
109
+ default:
110
+ assertNever(variable);
111
+ }
112
+ }
113
+ function assertNever(value) {
114
+ throw new Error(`Unhandled discriminated union member: ${JSON.stringify(value)}`);
115
+ }
116
+ //# sourceMappingURL=DefaultThemePreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultThemePreview.js","sourceRoot":"","sources":["../../src/variablesSpec/DefaultThemePreview.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACpC,OAAO,oBAAC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gBACxC,6BAAK,KAAK,EAAE,YAAY;oBACpB;wBACI;4BACK,QAAQ,CAAC,YAAY;;4BAAI,QAAQ,CAAC,IAAI;gCAClC,CACP;oBACN,qEAA4C;oBAC5C,6BAAK,KAAK,EAAE,sCAAsC,IAC7C,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACtC,oBAAC,YAAY,IAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAI,CACrC,CAAC,CACA;oBACN,6BAAK,KAAK,EAAE,sCAAsC,IAC7C,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACtC,6BAAK,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IACxB,CAAC,CACA,CACT,CAAC,CACA,CACJ,CACJ,CACT,CAAC;QACN,KAAK,YAAY;YACb,OAAO,IAAI,CAAC;QAChB;YACI,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAAC,KAAY;IAC7B,MAAM,IAAI,KAAK,CAAC,yCAAyC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ThemeDefinedCssVariable, ThemeDerivedCssVariable, ThemeInternalCssVariable, ThemeCssVariable } from "./types.js";
2
+ export declare const themeDefinedCssVariables: ThemeDefinedCssVariable[];
3
+ export declare const themeDerivedCssVariables: ThemeDerivedCssVariable[];
4
+ export declare const themeInternalCssVariables: ThemeInternalCssVariable[];
5
+ export declare const allThemeCssVariables: ThemeCssVariable[];
6
+ //# sourceMappingURL=allThemeCssVariables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allThemeCssVariables.d.ts","sourceRoot":"","sources":["../../src/variablesSpec/allThemeCssVariables.ts"],"names":[],"mappings":"AACA,OAAO,EACH,uBAAuB,EAEvB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EACnB,MAAM,YAAY,CAAC;AA6BpB,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAiB7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,EAM7D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,wBAAwB,EAU/D,CAAC;AAIF,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,EAMlD,CAAC"}
@@ -0,0 +1,72 @@
1
+ // Theme
2
+ import { paletteBaseThemeVariables } from "./theme/palette-base.js";
3
+ import { paletteComplementaryThemeVariables } from "./theme/palette-complementary.js";
4
+ import { analyticalDesignerThemeVariables } from "./theme/analytical-designer.js";
5
+ import { buttonThemeVariables } from "./theme/button.js";
6
+ import { chartThemeVariables } from "./theme/chart.js";
7
+ import { dashboardThemeVariables } from "./theme/dashboard.js";
8
+ import { kpiThemeVariables } from "./theme/kpi.js";
9
+ import { modalThemeVariables } from "./theme/modal.js";
10
+ import { tableThemeVariables } from "./theme/table.js";
11
+ import { tooltipThemeVariables } from "./theme/tooltip.js";
12
+ import { typographyThemeVariables } from "./theme/typography.js";
13
+ // Derived
14
+ import { derivedPaletteBaseThemeVariables } from "./theme-derived/palette-base-derived.js";
15
+ import { derivedPaletteComplementaryThemeVariables } from "./theme-derived/palette-complementary-derived.js";
16
+ import { derivedShadowThemeVariables } from "./theme-derived/shadow-derived.js";
17
+ // Internal
18
+ import { internalButtonThemeVariables } from "./internal/button.js";
19
+ import { internalFontThemeVariables } from "./internal/font.js";
20
+ import { internalIconThemeVariables } from "./internal/icon.js";
21
+ import { internalSpacingThemeVariables } from "./internal/spacing.js";
22
+ import { internalTransitionThemeVariables } from "./internal/transition.js";
23
+ import { internalModelerThemeVariables } from "./internal/modeler.js";
24
+ // Deprecated
25
+ import { paletteBaseThemeDeprecatedVariables } from "./deprecated/palette-base.js";
26
+ // Inconsistent
27
+ import { inconsistentVariables } from "./inconsistent/inconsistent.js";
28
+ export const themeDefinedCssVariables = [
29
+ // Palette
30
+ ...paletteBaseThemeVariables,
31
+ ...paletteComplementaryThemeVariables,
32
+ // Shared
33
+ ...typographyThemeVariables,
34
+ // Components
35
+ ...buttonThemeVariables,
36
+ ...tooltipThemeVariables,
37
+ ...modalThemeVariables,
38
+ // Charts
39
+ ...chartThemeVariables,
40
+ ...tableThemeVariables,
41
+ ...kpiThemeVariables,
42
+ // Apps
43
+ ...analyticalDesignerThemeVariables,
44
+ ...dashboardThemeVariables,
45
+ ];
46
+ export const themeDerivedCssVariables = [
47
+ // Palette
48
+ ...derivedPaletteBaseThemeVariables,
49
+ ...derivedPaletteComplementaryThemeVariables,
50
+ // Shadow
51
+ ...derivedShadowThemeVariables,
52
+ ];
53
+ export const themeInternalCssVariables = [
54
+ // Shared
55
+ ...internalFontThemeVariables,
56
+ ...internalSpacingThemeVariables,
57
+ ...internalTransitionThemeVariables,
58
+ // Components
59
+ ...internalButtonThemeVariables,
60
+ ...internalIconThemeVariables,
61
+ // Modeler
62
+ ...internalModelerThemeVariables,
63
+ ];
64
+ const themeDeprecatedCssVariables = [...paletteBaseThemeDeprecatedVariables];
65
+ export const allThemeCssVariables = [
66
+ ...themeDefinedCssVariables,
67
+ ...themeDerivedCssVariables,
68
+ ...themeInternalCssVariables,
69
+ ...themeDeprecatedCssVariables,
70
+ ...inconsistentVariables,
71
+ ];
72
+ //# sourceMappingURL=allThemeCssVariables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allThemeCssVariables.js","sourceRoot":"","sources":["../../src/variablesSpec/allThemeCssVariables.ts"],"names":[],"mappings":"AAQA,QAAQ;AACR,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAA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AAmB;IACtB,GAAG,iBAAiB;IACpB,OAAO;IACP,GAAG,gCAAgC;IACnC,GAAG,uBAAuB;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAA8B;IAC/D,UAAU;IACV,GAAG,gCAAgC;IACnC,GAAG,yCAAyC;IAC5C,SAAS;IACT,GAAG,2BAA2B;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAA+B;IACjE,SAAS;IACT,GAAG,0BAA0B;IAC7B,GAAG,6BAA6B;IAChC,GAAG,gCAAgC;IACnC,aAAa;IACb,GAAG,4BAA4B;IAC/B,GAAG,0BAA0B;IAC7B,UAAU;IACV,GAAG,6BAA6B;CACnC,CAAC;AAEF,MAAM,2BAA2B,GAAiC,CAAC,GAAG,mCAAmC,CAAC,CAAC;AAE3G,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACpD,GAAG,wBAAwB;IAC3B,GAAG,wBAAwB;IAC3B,GAAG,yBAAyB;IAC5B,GAAG,2BAA2B;IAC9B,GAAG,qBAAqB;CAC3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ThemeDeprecatedCssVariable } from "../types.js";
2
+ export declare const paletteBaseThemeDeprecatedVariables: ThemeDeprecatedCssVariable[];
3
+ //# sourceMappingURL=palette-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette-base.d.ts","sourceRoot":"","sources":["../../../src/variablesSpec/deprecated/palette-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,mCAAmC,EAAE,0BAA0B,EA4E3E,CAAC"}
@@ -0,0 +1,78 @@
1
+ export const paletteBaseThemeDeprecatedVariables = [
2
+ {
3
+ type: "deprecated",
4
+ variableName: "--gd-palette-error-contrast",
5
+ themePath: ["palette", "error", "contrast"],
6
+ },
7
+ {
8
+ type: "deprecated",
9
+ variableName: "--gd-palette-error-dark",
10
+ themePath: ["palette", "error", "dark"],
11
+ },
12
+ {
13
+ type: "deprecated",
14
+ variableName: "--gd-palette-error-light",
15
+ themePath: ["palette", "error", "light"],
16
+ },
17
+ {
18
+ type: "deprecated",
19
+ variableName: "--gd-palette-info-contrast",
20
+ themePath: ["palette", "info", "contrast"],
21
+ },
22
+ {
23
+ type: "deprecated",
24
+ variableName: "--gd-palette-info-dark",
25
+ themePath: ["palette", "info", "dark"],
26
+ },
27
+ {
28
+ type: "deprecated",
29
+ variableName: "--gd-palette-info-light",
30
+ themePath: ["palette", "info", "light"],
31
+ },
32
+ {
33
+ type: "deprecated",
34
+ variableName: "--gd-palette-primary-contrast",
35
+ themePath: ["palette", "primary", "contrast"],
36
+ },
37
+ {
38
+ type: "deprecated",
39
+ variableName: "--gd-palette-primary-dark",
40
+ themePath: ["palette", "primary", "dark"],
41
+ },
42
+ {
43
+ type: "deprecated",
44
+ variableName: "--gd-palette-primary-light",
45
+ themePath: ["palette", "primary", "light"],
46
+ },
47
+ {
48
+ type: "deprecated",
49
+ variableName: "--gd-palette-success-contrast",
50
+ themePath: ["palette", "success", "contrast"],
51
+ },
52
+ {
53
+ type: "deprecated",
54
+ variableName: "--gd-palette-success-dark",
55
+ themePath: ["palette", "success", "dark"],
56
+ },
57
+ {
58
+ type: "deprecated",
59
+ variableName: "--gd-palette-success-light",
60
+ themePath: ["palette", "success", "light"],
61
+ },
62
+ {
63
+ type: "deprecated",
64
+ variableName: "--gd-palette-warning-contrast",
65
+ themePath: ["palette", "warning", "contrast"],
66
+ },
67
+ {
68
+ type: "deprecated",
69
+ variableName: "--gd-palette-warning-dark",
70
+ themePath: ["palette", "warning", "dark"],
71
+ },
72
+ {
73
+ type: "deprecated",
74
+ variableName: "--gd-palette-warning-light",
75
+ themePath: ["palette", "warning", "light"],
76
+ },
77
+ ];
78
+ //# sourceMappingURL=palette-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette-base.js","sourceRoot":"","sources":["../../../src/variablesSpec/deprecated/palette-base.ts"],"names":[],"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AE,SAAS,EAAE,UAAU,CAAC;KAChD;IACD;QACI,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;KAC5C;IACD;QACI,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,4BAA4B;QAC1C,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;KAC7C;IACD;QACI,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,+BAA+B;QAC7C,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC;KAChD;IACD;QACI,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,2BAA2B;QACzC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;KAC5C;IACD;QACI,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,4BAA4B;QAC1C,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC;KAC7C;CACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generates default SCSS theme file content.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare function generateDefaultScssThemeContent(): string;
7
+ //# sourceMappingURL=generateDefaultScssThemeContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateDefaultScssThemeContent.d.ts","sourceRoot":"","sources":["../../../src/variablesSpec/generate/generateDefaultScssThemeContent.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,+BAA+B,WAsD9C"}
@@ -0,0 +1,56 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import isEqual from "lodash/isEqual.js";
3
+ import capitalize from "lodash/capitalize.js";
4
+ import { allThemeCssVariables } from "../allThemeCssVariables.js";
5
+ function getThemingSectionSeparator(separator) {
6
+ return `\n // ${capitalize(separator)}`;
7
+ }
8
+ /**
9
+ * Generates default SCSS theme file content.
10
+ *
11
+ * @internal
12
+ */
13
+ export function generateDefaultScssThemeContent() {
14
+ const collectedLines = [];
15
+ let lastVariableType = null;
16
+ let lastVariableThemePath = null;
17
+ for (const variableSpecification of allThemeCssVariables) {
18
+ // Add comments to separate theming sections
19
+ if (lastVariableType !== variableSpecification.type || variableSpecification.type === "theme") {
20
+ // Remove theming section if is empty
21
+ if (collectedLines[collectedLines.length - 1] ===
22
+ getThemingSectionSeparator(lastVariableThemePath)) {
23
+ collectedLines.pop();
24
+ }
25
+ lastVariableType = variableSpecification.type;
26
+ // Separate theme variables by their first theme path (eg palette, dashboard, chart, etc.)
27
+ if (variableSpecification.type === "theme") {
28
+ if (!isEqual(lastVariableThemePath, variableSpecification.themePath[0])) {
29
+ lastVariableThemePath = variableSpecification.themePath[0];
30
+ collectedLines.push(getThemingSectionSeparator(lastVariableThemePath));
31
+ }
32
+ }
33
+ else if (variableSpecification.type === "derived" ||
34
+ variableSpecification.type === "internal") {
35
+ // Derived or internal variables are separated just by their type
36
+ collectedLines.push(getThemingSectionSeparator(lastVariableType));
37
+ }
38
+ }
39
+ const isThemeSpecToInclude = variableSpecification.type === "theme" ||
40
+ variableSpecification.type === "derived" ||
41
+ variableSpecification.type === "internal";
42
+ // Variable should be included in default theme only if it has set default value, and is theme, derived or internal.
43
+ if (isThemeSpecToInclude && variableSpecification.defaultValue !== null) {
44
+ collectedLines.push(`${variableSpecification.variableName}: ${variableSpecification.defaultValue};`);
45
+ }
46
+ }
47
+ const scss = collectedLines.join("\n ");
48
+ return `// (C) 2024 GoodData Corporation
49
+ // !!! This file is autogenerated and should not be edited manually. !!!
50
+ // To edit default values or add new css variables, please look into variablesSpec folder in @gooddata/sdk-ui-theme-provider package.
51
+
52
+ :root {\n ${scss}\n}
53
+
54
+ `;
55
+ }
56
+ //# sourceMappingURL=generateDefaultScssThemeContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateDefaultScssThemeContent.js","sourceRoot":"","sources":["../../../src/variablesSpec/generate/generateDefaultScssThemeContent.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C,CAAC;gBACC,iEAAiE;gBACjE,cAAc,CAAC,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACtE,CAAC;QACL,CAAC;QAED,MAAM,oBAAoB,GACtB,qBAAqB,CAAC,IAAI,KAAK,OAAO;YACtC,qBAAqB,CAAC,IAAI,KAAK,SAAS;YACxC,qBAAqB,CAAC,IAAI,KAAK,UAAU,CAAC;QAE9C,oHAAoH;QACpH,IAAI,oBAAoB,IAAI,qBAAqB,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;YACtE,cAAc,CAAC,IAAI,CACf,GAAG,qBAAqB,CAAC,YAAY,KAAK,qBAAqB,CAAC,YAAY,GAAG,CAClF,CAAC;QACN,CAAC;IACL,CAAC;IAED,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE3C,OAAO;;;;eAII,IAAI;;CAElB,CAAC;AACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generates default TypeScript theme file content.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare function generateDefaultTypeScriptThemeContent(): string;
7
+ //# sourceMappingURL=generateDefaultTypeScriptThemeContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateDefaultTypeScriptThemeContent.d.ts","sourceRoot":"","sources":["../../../src/variablesSpec/generate/generateDefaultTypeScriptThemeContent.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,qCAAqC,WAoBpD"}
@@ -0,0 +1,28 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import { allThemeCssVariables } from "../allThemeCssVariables.js";
3
+ import set from "lodash/set.js";
4
+ /**
5
+ * Generates default TypeScript theme file content.
6
+ *
7
+ * @internal
8
+ */
9
+ export function generateDefaultTypeScriptThemeContent() {
10
+ const theme = {};
11
+ allThemeCssVariables.forEach((v) => {
12
+ if (v.type === "theme" && !v.isNotTypedByTheme) {
13
+ const value = v.defaultThemeValue ?? v.defaultValue;
14
+ if (value !== null) {
15
+ set(theme, v.themePath, value);
16
+ }
17
+ }
18
+ });
19
+ // Format theme as json, but remove quotes from keys
20
+ const formattedTheme = JSON.stringify(theme, null, 4).replace(/"([^"]+)":/g, "$1:");
21
+ return `// (C) 2024 GoodData Corporation
22
+ import { ITheme } from "@gooddata/sdk-model";
23
+
24
+ export const indigoTheme: ITheme = ${formattedTheme};
25
+
26
+ `;
27
+ }
28
+ //# sourceMappingURL=generateDefaultTypeScriptThemeContent.js.map