Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/base/package-scripts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const scripts = {
},
generateAPI: {
default: "nps generateAPI.generateCEM generateAPI.validateCEM",
generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs" --dev`,
validateCEM: `node "${LIB}/cem/validate.js" --dev`,
generateCEM: `cross-env UI5_CEM_MODE='dev' cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`,
validateCEM: `cross-env UI5_CEM_MODE='dev' node "${LIB}/cem/validate.js"`,
},
watch: {
default: 'concurrently "nps watch.src" "nps watch.styles"',
Expand Down
83 changes: 61 additions & 22 deletions packages/theming/css-vars-usage.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,46 @@
"--sapActiveColor",
"--sapAvatar_1_Background",
"--sapAvatar_1_BorderColor",
"--sapAvatar_1_Hover_Background",
"--sapAvatar_1_TextColor",
"--sapAvatar_2_Background",
"--sapAvatar_2_BorderColor",
"--sapAvatar_2_Hover_Background",
"--sapAvatar_2_TextColor",
"--sapAvatar_3_Background",
"--sapAvatar_3_BorderColor",
"--sapAvatar_3_Hover_Background",
"--sapAvatar_3_TextColor",
"--sapAvatar_4_Background",
"--sapAvatar_4_BorderColor",
"--sapAvatar_4_Hover_Background",
"--sapAvatar_4_TextColor",
"--sapAvatar_5_Background",
"--sapAvatar_5_BorderColor",
"--sapAvatar_5_Hover_Background",
"--sapAvatar_5_TextColor",
"--sapAvatar_6_Background",
"--sapAvatar_6_BorderColor",
"--sapAvatar_6_Hover_Background",
"--sapAvatar_6_TextColor",
"--sapAvatar_7_Background",
"--sapAvatar_7_BorderColor",
"--sapAvatar_7_Hover_Background",
"--sapAvatar_7_TextColor",
"--sapAvatar_8_Background",
"--sapAvatar_8_BorderColor",
"--sapAvatar_8_Hover_Background",
"--sapAvatar_8_TextColor",
"--sapAvatar_9_Background",
"--sapAvatar_9_BorderColor",
"--sapAvatar_9_Hover_Background",
"--sapAvatar_9_TextColor",
"--sapAvatar_10_Background",
"--sapAvatar_10_BorderColor",
"--sapAvatar_10_Hover_Background",
"--sapAvatar_10_TextColor",
"--sapAvatar_Lite_Background",
"--sapAvatar_Lite_BorderColor",
"--sapBackgroundColor",
"--sapBaseColor",
"--sapBlockLayer_Background",
Expand Down Expand Up @@ -91,7 +103,6 @@
"--sapButton_Emphasized_Active_TextColor",
"--sapButton_Emphasized_Background",
"--sapButton_Emphasized_BorderColor",
"--sapButton_Emphasized_FontWeight",
"--sapButton_Emphasized_Hover_Background",
"--sapButton_Emphasized_Hover_BorderColor",
"--sapButton_Emphasized_Hover_TextColor",
Expand Down Expand Up @@ -163,6 +174,7 @@
"--sapButton_Reject_Selected_Hover_BorderColor",
"--sapButton_Reject_Selected_TextColor",
"--sapButton_Reject_TextColor",
"--sapButton_Segment_BorderCornerRadius",
"--sapButton_Selected_Background",
"--sapButton_Selected_BorderColor",
"--sapButton_Selected_Hover_Background",
Expand Down Expand Up @@ -197,6 +209,7 @@
"--sapButton_Track_Selected_Hover_BorderColor",
"--sapButton_Track_Selected_TextColor",
"--sapContent_BadgeBackground",
"--sapContent_BadgeBorderColor",
"--sapContent_BadgeTextColor",
"--sapContent_BusyColor",
"--sapContent_ContentColor",
Expand All @@ -214,7 +227,6 @@
"--sapContent_FocusWidth",
"--sapContent_ForegroundBorderColor",
"--sapContent_ForegroundColor",
"--sapContent_ForegroundTextColor",
"--sapContent_HeaderShadow",
"--sapContent_HelpColor",
"--sapContent_IconColor",
Expand All @@ -232,6 +244,7 @@
"--sapContent_Informative_Shadow",
"--sapContent_Interaction_Shadow",
"--sapContent_LabelColor",
"--sapContent_Lite_Shadow",
"--sapContent_MeasureIndicatorColor",
"--sapContent_Negative_Shadow",
"--sapContent_NonInteractiveIconColor",
Expand Down Expand Up @@ -286,11 +299,17 @@
"--sapField_InvalidBorderWidth",
"--sapField_InvalidColor",
"--sapField_InvalidShadow",
"--sapField_Picker_BorderWidth",
"--sapField_PlaceholderTextColor",
"--sapField_ReadOnly_Background",
"--sapField_ReadOnly_BackgroundStyle",
"--sapField_ReadOnly_BorderColor",
"--sapField_RequiredColor",
"--sapField_Selector_Hover_Background",
"--sapField_Selector_Hover_InformationBackground",
"--sapField_Selector_Hover_InvalidBackground",
"--sapField_Selector_Hover_SuccessBackground",
"--sapField_Selector_Hover_WarningBackground",
"--sapField_Shadow",
"--sapField_SuccessBackground",
"--sapField_SuccessBackgroundStyle",
Expand All @@ -315,16 +334,17 @@
"--sapFontLargeSize",
"--sapFontMediumSize",
"--sapFontSemiboldDuplexFamily",
"--sapFontSemiboldFamily",
"--sapFontSize",
"--sapFontSmallSize",
"--sapGroup_BorderCornerRadius",
"--sapGroup_ContentBackground",
"--sapGroup_ContentBorderColor",
"--sapGroup_Title_FontSize",
"--sapGroup_TitleBackground",
"--sapGroup_TitleBorderColor",
"--sapGroup_TitleBorderWidth",
"--sapGroup_TitleTextColor",
"--sapHC_ReducedBackground",
"--sapHC_ReducedForeground",
"--sapHighlightColor",
"--sapIllus_AccentColor",
"--sapIllus_BackgroundColor",
Expand Down Expand Up @@ -454,16 +474,6 @@
"--sapLegend_CurrentDateTime",
"--sapLegend_NonWorkingBackground",
"--sapLegend_WorkingBackground",
"--sapLegendBackgroundColor1",
"--sapLegendBackgroundColor2",
"--sapLegendBackgroundColor3",
"--sapLegendBackgroundColor5",
"--sapLegendBackgroundColor6",
"--sapLegendBackgroundColor7",
"--sapLegendBackgroundColor9",
"--sapLegendBackgroundColor10",
"--sapLegendBackgroundColor18",
"--sapLegendBackgroundColor20",
"--sapLegendColor1",
"--sapLegendColor2",
"--sapLegendColor3",
Expand Down Expand Up @@ -508,10 +518,10 @@
"--sapList_Hover_SelectionBackground",
"--sapList_SelectionBackgroundColor",
"--sapList_SelectionBorderColor",
"--sapList_TableGroupHeaderBackground",
"--sapList_TableGroupHeaderBorderColor",
"--sapList_TableGroupHeaderTextColor",
"--sapList_TextColor",
"--sapMessage_BorderWidth",
"--sapMessage_Button_Hover_Background",
"--sapMessage_ErrorBorderColor",
"--sapMessage_InformationBorderColor",
"--sapMessage_SuccessBorderColor",
Expand Down Expand Up @@ -550,18 +560,13 @@
"--sapProgress_PositiveBackground",
"--sapProgress_TextColor",
"--sapProgress_Value_Background",
"--sapProgress_Value_BorderColor",
"--sapProgress_Value_CriticalBackground",
"--sapProgress_Value_CriticalBorderColor",
"--sapProgress_Value_CriticalTextColor",
"--sapProgress_Value_InformationBackground",
"--sapProgress_Value_InformationBorderColor",
"--sapProgress_Value_InformationTextColor",
"--sapProgress_Value_NegativeBackground",
"--sapProgress_Value_NegativeBorderColor",
"--sapProgress_Value_NegativeTextColor",
"--sapProgress_Value_PositiveBackground",
"--sapProgress_Value_PositiveBorderColor",
"--sapProgress_Value_PositiveTextColor",
"--sapScrollBar_Dimension",
"--sapScrollBar_FaceColor",
Expand All @@ -570,11 +575,14 @@
"--sapSelectedColor",
"--sapShell_Active_Background",
"--sapShell_Active_TextColor",
"--sapShell_Assistant_ForegroundColor",
"--sapShell_Background",
"--sapShell_Hover_Background",
"--sapShell_InteractiveBackground",
"--sapShell_InteractiveBorderColor",
"--sapShell_InteractiveTextColor",
"--sapShell_Shadow",
"--sapShell_SubBrand_TextColor",
"--sapShell_TextColor",
"--sapShellColor",
"--sapSlider_Active_RangeHandleBackground",
Expand All @@ -588,6 +596,38 @@
"--sapSlider_Selected_BorderColor",
"--sapSuccessBackground",
"--sapSuccessBorderColor",
"--sapTab_Background",
"--sapTab_Critical_ForegroundColor",
"--sapTab_Critical_IconColor",
"--sapTab_Critical_Selected_Background",
"--sapTab_Critical_Selected_IconColor",
"--sapTab_Critical_Selected_TextColor",
"--sapTab_Critical_TextColor",
"--sapTab_ForegroundColor",
"--sapTab_IconColor",
"--sapTab_Negative_ForegroundColor",
"--sapTab_Negative_IconColor",
"--sapTab_Negative_Selected_Background",
"--sapTab_Negative_Selected_IconColor",
"--sapTab_Negative_Selected_TextColor",
"--sapTab_Negative_TextColor",
"--sapTab_Neutral_ForegroundColor",
"--sapTab_Neutral_IconColor",
"--sapTab_Neutral_Selected_Background",
"--sapTab_Neutral_Selected_IconColor",
"--sapTab_Neutral_Selected_TextColor",
"--sapTab_Neutral_TextColor",
"--sapTab_Positive_ForegroundColor",
"--sapTab_Positive_IconColor",
"--sapTab_Positive_Selected_Background",
"--sapTab_Positive_Selected_IconColor",
"--sapTab_Positive_Selected_TextColor",
"--sapTab_Positive_TextColor",
"--sapTab_Selected_Background",
"--sapTab_Selected_IconColor",
"--sapTab_Selected_Indicator_Dimension",
"--sapTab_Selected_TextColor",
"--sapTab_TextColor",
"--sapTextColor",
"--sapTile_Active_Background",
"--sapTile_Background",
Expand All @@ -599,7 +639,6 @@
"--sapTile_SeparatorColor",
"--sapTile_TextColor",
"--sapTile_TitleTextColor",
"--sapToolbar_Background",
"--sapToolbar_SeparatorColor",
"--sapWarningBackground",
"--sapWarningBorderColor"
Expand Down
13 changes: 7 additions & 6 deletions packages/theming/package-scripts.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const resolve = require("resolve");
const assets = require('@ui5/webcomponents-tools/assets-meta.js');
const path = require('path');

const jsonImportsScript = resolve.sync("@ui5/webcomponents-tools/lib/generate-json-imports/themes.js");
const generateReportScript = resolve.sync("@ui5/webcomponents-theming/lib/generate-css-vars-usage-report/index.js");

const LIB = path.join(__dirname, `../tools/lib/`);
const CURRENT_LIB = path.join(__dirname, `./lib/`);
const TOOLS_LIB = path.join(__dirname, `../tools/lib/`);

const jsonImportsScript = path.join(TOOLS_LIB, "./generate-json-imports/themes.js");
const generateReportScript = path.join(CURRENT_LIB, "./generate-css-vars-usage-report/index.js");


module.exports = {
scripts: {
Expand All @@ -15,7 +16,7 @@ module.exports = {
default: `cross-env UI5_TS=true nps clean build.src build.postcss build.jsonImports build.typescript generateReport`,
src: `copy-and-watch "src/**/*.{json}" dist/`,
typescript: "tsc",
postcss: `node "${LIB}/css-processors/css-processor-themes.mjs"`,
postcss: `node "${TOOLS_LIB}/css-processors/css-processor-themes.mjs"`,
jsonImports: `node "${jsonImportsScript}" dist/generated/assets/themes src/generated/json-imports`,
},
generateReport: `node "${generateReportScript}"`,
Expand Down
3 changes: 1 addition & 2 deletions packages/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"json-beautify": "^1.1.1",
"nps": "^5.10.0",
"postcss": "^8.4.5",
"postcss-import": "^14.0.2",
"resolve": "^1.20.0"
"postcss-import": "^14.0.2"
},
"resolutions": {}
}