diff --git a/.changeset/four-bulldogs-search.md b/.changeset/four-bulldogs-search.md new file mode 100644 index 000000000..9f42d7287 --- /dev/null +++ b/.changeset/four-bulldogs-search.md @@ -0,0 +1,5 @@ +--- +'@primer/primitives': major +--- + +remove v1 tokens and build process diff --git a/.eslintignore b/.eslintignore index 659a2de0a..edb09a045 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,11 +1,7 @@ tokens-v2-private/ CHANGELOG.md - # Ignore all files relating to v1 tokens # TODO: Remove after v1 tokens have been removed -data/ dist/ src/@types/ -scripts/lib/ -scripts/build.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cb514a11..ce0fd2a6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,6 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund --ignore-scripts - - name: Build v1 tokens - run: npm run build - - name: Build v8 tokens run: npm run build:next diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 00a09c46f..854f89711 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,6 @@ jobs: with: node_version: 20 install: npm ci --legacy-peer-deps --no-audit --no-fund && npm run install:storybook - build: npm run build:tokens && npm run build && npm run build:next && cd docs/storybook && npm run build:prod + build: npm run build:tokens && npm run build:next && cd docs/storybook && npm run build:prod output_dir: docs/public diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 8876aab4b..7d22694a4 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -16,7 +16,7 @@ jobs: with: node_version: 20 install: npm ci --no-audit --no-fund --ignore-scripts && npm run install:storybook - build: npm run build:tokens && npm run build && npm run build:next && cd docs/storybook && npm run build:preview + build: npm run build:tokens && npm run build:next && cd docs/storybook && npm run build:preview output_dir: docs/public post_storybook: diff --git a/.github/workflows/diff.yml b/.github/workflows/diff.yml index 72dcf00c6..134f65974 100644 --- a/.github/workflows/diff.yml +++ b/.github/workflows/diff.yml @@ -66,18 +66,12 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund --include=dev --ignore-scripts - - name: Build tokens - run: npm run build - - name: Build experimental tokens run: npm run build:tokens - name: Install dependencies (base) run: pushd base; npm i --no-audit --no-fund --ignore-scripts; popd - - name: Build (base) - run: pushd base; npm run build; popd - - name: Build (base experimental) run: pushd base; npm run build:tokens; popd diff --git a/.github/workflows/hasChanged.yml b/.github/workflows/hasChanged.yml index 48a90ed3d..efcddbf53 100644 --- a/.github/workflows/hasChanged.yml +++ b/.github/workflows/hasChanged.yml @@ -5,13 +5,10 @@ on: outputs: outputAffected: description: "Boolean value indicating changes in any file or folder that has an effect on the output" - value: ${{ jobs.hasChanged.outputs.oldTokens || jobs.hasChanged.outputs.src || jobs.hasChanged.outputs.buildScripts }} + value: ${{ jobs.hasChanged.outputs.src || jobs.hasChanged.outputs.buildScripts }} tokens: description: "Boolean value indicating change in src/tokens folder" value: ${{ jobs.hasChanged.outputs.tokens }} - oldTokens: - description: "Boolean value indicating change in data folder" - value: ${{ jobs.hasChanged.outputs.oldTokens }} src: description: "Boolean value indicating change in src folder" value: ${{ jobs.hasChanged.outputs.src }} @@ -37,7 +34,6 @@ jobs: outputs: outputAffected: ${{ steps.filter.outputs.outputAffected }} tokens: ${{ steps.filter.outputs.tokens }} - oldTokens: ${{ steps.filter.outputs.oldTokens }} src: ${{ steps.filter.outputs.src }} scripts: ${{ steps.filter.outputs.scripts }} buildScripts: ${{ steps.filter.outputs.buildScripts }} @@ -52,8 +48,6 @@ jobs: filters: | tokens: - 'src/tokens/**' - oldTokens: - - 'data/**' src: - 'src/**/**.ts' - 'src/**/**.json' @@ -61,11 +55,9 @@ jobs: scripts: - 'scripts/**' buildScripts: - - 'scripts/build.ts' - 'scripts/buildTokens.ts' - 'scripts/themes.config.ts' - 'tsconfig.json' - - 'tsconfig.build.json' - 'package.json' dependencies: - 'package.json' @@ -73,11 +65,10 @@ jobs: docs: - 'docs/**' - name: Detecting changes that effect output - if: steps.filter.outputs.tokens == 'true' || steps.filter.outputs.oldTokens == 'true' || steps.filter.outputs.src == 'true' || steps.filter.outputs.scripts == 'true' || steps.filter.outputs.dependencies == 'true' || steps.filter.outputs.docs == 'true' + if: steps.filter.outputs.tokens == 'true' || steps.filter.outputs.src == 'true' || steps.filter.outputs.scripts == 'true' || steps.filter.outputs.dependencies == 'true' || steps.filter.outputs.docs == 'true' run: | echo Changes detected echo - tokens: ${{ steps.filter.outputs.tokens }} - echo - oldTokens: ${{ steps.filter.outputs.oldTokens }} echo - src: ${{ steps.filter.outputs.src }} echo - scripts: ${{ steps.filter.outputs.scripts }} echo - buildScripts: ${{ steps.filter.outputs.buildScripts }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fafbf91b3..d483f4fa8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,9 +27,6 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund && pushd docs; npm ci --no-audit --no-fund; popd - - name: Build tokens - run: npm run build - - name: Build experimental tokens run: npm run build:tokens diff --git a/.github/workflows/release_canary.yml b/.github/workflows/release_canary.yml index a13626c25..a8aa19a18 100644 --- a/.github/workflows/release_canary.yml +++ b/.github/workflows/release_canary.yml @@ -27,9 +27,6 @@ jobs: - name: Install dependencies run: npm ci --no-audit --no-fund --include=dev - - name: Build tokens - run: npm run build - - name: Build experimental tokens run: npm run build:tokens diff --git a/.github/workflows/release_candidate.yml b/.github/workflows/release_candidate.yml index d62647ed7..175e41a24 100644 --- a/.github/workflows/release_candidate.yml +++ b/.github/workflows/release_candidate.yml @@ -26,9 +26,6 @@ jobs: - name: Install dependencies run: npm ci --legacy-peer-deps - - name: Build tokens - run: npm run build - - name: Build experimental tokens run: npm run build:tokens diff --git a/.husky/pre-push b/.husky/pre-push index 6ae75a437..343c9070b 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,6 +1,6 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npm run build & npm run test +npm run build:next & npm run test npm run tokenJson:check if npm run lint ; then echo "Lint check passed" diff --git a/.prettierignore b/.prettierignore index 5c66df3b2..0ad79b810 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,5 +6,4 @@ storybook-static # Ignore all files relating to v1 tokens # TODO: Remove after v1 tokens have been removed -data/ tokens-v2-private/ diff --git a/data/colors/deprecated.json b/data/colors/deprecated.json deleted file mode 100644 index 22fa0cf49..000000000 --- a/data/colors/deprecated.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "mktg.btn.bg": null, - "mktg.btn.shadow.outline": null, - "mktg.btn.shadow.focus": null, - "mktg.btn.shadow.hover": null, - "mktg.btn.shadow.hoverMuted": null -} diff --git a/data/colors/index.ts b/data/colors/index.ts deleted file mode 100644 index 4ea90d6a2..000000000 --- a/data/colors/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import light from './themes/light' -import light_high_contrast from './themes/light_high_contrast' -import light_colorblind from './themes/light_colorblind' -import light_tritanopia from './themes/light_tritanopia' -import dark from './themes/dark' -import dark_dimmed from './themes/dark_dimmed' -import dark_high_contrast from './themes/dark_high_contrast' -import dark_colorblind from './themes/dark_colorblind' -import dark_tritanopia from './themes/dark_tritanopia' - -export default { - light, - light_high_contrast, - light_colorblind, - light_tritanopia, - dark, - dark_dimmed, - dark_high_contrast, - dark_colorblind, - dark_tritanopia -} diff --git a/data/colors/prefix b/data/colors/prefix deleted file mode 100644 index 9821353be..000000000 --- a/data/colors/prefix +++ /dev/null @@ -1 +0,0 @@ -color diff --git a/data/colors/removed.json b/data/colors/removed.json deleted file mode 100644 index 66a8fe405..000000000 --- a/data/colors/removed.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "auto.black": null, - "auto.white": null, - "auto.gray.0": null, - "auto.gray.1": null, - "auto.gray.2": null, - "auto.gray.3": null, - "auto.gray.4": null, - "auto.gray.5": null, - "auto.gray.6": null, - "auto.gray.7": null, - "auto.gray.8": null, - "auto.gray.9": null, - "auto.blue.0": null, - "auto.blue.1": null, - "auto.blue.2": null, - "auto.blue.3": null, - "auto.blue.4": null, - "auto.blue.5": null, - "auto.blue.6": null, - "auto.blue.7": null, - "auto.blue.8": null, - "auto.blue.9": null, - "auto.green.0": null, - "auto.green.1": null, - "auto.green.2": null, - "auto.green.3": null, - "auto.green.4": null, - "auto.green.5": null, - "auto.green.6": null, - "auto.green.7": null, - "auto.green.8": null, - "auto.green.9": null, - "auto.yellow.0": null, - "auto.yellow.1": null, - "auto.yellow.2": null, - "auto.yellow.3": null, - "auto.yellow.4": null, - "auto.yellow.5": null, - "auto.yellow.6": null, - "auto.yellow.7": null, - "auto.yellow.8": null, - "auto.yellow.9": null, - "auto.orange.0": null, - "auto.orange.1": null, - "auto.orange.2": null, - "auto.orange.3": null, - "auto.orange.4": null, - "auto.orange.5": null, - "auto.orange.6": null, - "auto.orange.7": null, - "auto.orange.8": null, - "auto.orange.9": null, - "auto.red.0": null, - "auto.red.1": null, - "auto.red.2": null, - "auto.red.3": null, - "auto.red.4": null, - "auto.red.5": null, - "auto.red.6": null, - "auto.red.7": null, - "auto.red.8": null, - "auto.red.9": null, - "auto.purple.0": null, - "auto.purple.1": null, - "auto.purple.2": null, - "auto.purple.3": null, - "auto.purple.4": null, - "auto.purple.5": null, - "auto.purple.6": null, - "auto.purple.7": null, - "auto.purple.8": null, - "auto.purple.9": null, - "auto.pink.0": null, - "auto.pink.1": null, - "auto.pink.2": null, - "auto.pink.3": null, - "auto.pink.4": null, - "auto.pink.5": null, - "auto.pink.6": null, - "auto.pink.7": null, - "auto.pink.8": null, - "auto.pink.9": null, - "text.primary": "fg.default", - "text.secondary": "fg.muted", - "text.tertiary": "fg.muted", - "text.placeholder": "fg.subtle", - "text.disabled": "fg.muted", - "text.inverse": "fg.onEmphasis", - "text.link": "accent.fg", - "text.danger": "danger.fg", - "text.success": "success.fg", - "text.warning": "attention.fg", - "text.white": null, - "icon.primary": "fg.default", - "icon.secondary": "fg.muted", - "icon.tertiary": "fg.muted", - "icon.info": "accent.fg", - "icon.danger": "danger.fg", - "icon.success": "success.fg", - "icon.warning": "attention.fg", - "border.primary": "border.default", - "border.secondary": "border.muted", - "border.tertiary": "border.default", - "border.overlay": "border.default", - "border.inverse": "fg.onEmphasis", - "border.info": "accent.emphasis", - "border.danger": "danger.emphasis", - "border.success": "success.emphasis", - "border.warning": "attention.emphasis", - "bg.canvas": "canvas.default", - "bg.canvasMobile": null, - "bg.canvasInverse": "neutral.emphasis", - "bg.canvasInset": "canvas.inset", - "bg.primary": "canvas.default", - "bg.secondary": "canvas.subtle", - "bg.tertiary": "canvas.subtle", - "bg.overlay": "canvas.overlay", - "bg.backdrop": "primer.canvas.backdrop", - "bg.info": "accent.subtle", - "bg.infoInverse": "accent.emphasis", - "bg.danger": "danger.subtle", - "bg.dangerInverse": "danger.emphasis", - "bg.success": "success.subtle", - "bg.successInverse": "success.emphasis", - "bg.warning": "attention.subtle", - "bg.warningInverse": "attention.emphasis", - "shadow.highlight": "primer.shadow.highlight", - "shadow.inset": "primer.shadow.inset", - "state.hover.primaryBg": "accent.emphasis", - "state.hover.primaryBorder": "accent.emphasis", - "state.hover.primaryText": "fg.onEmphasis", - "state.hover.primaryIcon": "fg.onEmphasis", - "state.hover.secondaryBg": "neutral.subtle", - "state.hover.secondaryBorder": "neutral.subtle", - "state.selected.primaryBg": "accent.emphasis", - "state.selected.primaryBorder": "accent.emphasis", - "state.selected.primaryText": "fg.onEmphasis", - "state.selected.primaryIcon": "fg.onEmphasis", - "state.focus.border": "accent.emphasis", - "fade.fg10": null, - "fade.fg15": null, - "fade.fg30": null, - "fade.fg50": null, - "fade.fg70": null, - "fade.fg85": null, - "fade.black10": null, - "fade.black15": null, - "fade.black30": null, - "fade.black50": null, - "fade.black70": null, - "fade.black85": null, - "fade.white10": null, - "fade.white15": null, - "fade.white30": null, - "fade.white50": null, - "fade.white70": null, - "fade.white85": null, - "alert.info.text": "fg.default", - "alert.info.icon": "accent.fg", - "alert.info.bg": "accent.subtle", - "alert.info.border": "accent.muted", - "alert.warn.text": "fg.default", - "alert.warn.icon": "attention.fg", - "alert.warn.bg": "attention.subtle", - "alert.warn.border": "attention.muted", - "alert.error.text": "fg.default", - "alert.error.icon": "danger.fg", - "alert.error.bg": "danger.subtle", - "alert.error.border": "danger.muted", - "alert.success.text": "fg.default", - "alert.success.icon": "success.fg", - "alert.success.bg": "success.subtle", - "alert.success.border": "success.muted", - "autocomplete.shadow": "shadow.medium", - "autocomplete.rowBorder": "border.muted", - "blankslate.icon": "fg.muted", - "counter.text": "fg.default", - "counter.bg": "neutral.muted", - "counter.primary.text": "fg.onEmphasis", - "counter.primary.bg": "neutral.emphasis", - "counter.secondary.text": "fg.muted", - "counter.secondary.bg": "neutral.subtle", - "box.blueBorder": "accent.muted", - "box.rowYellowBg": "attention.subtle", - "box.rowBlueBg": "accent.subtle", - "box.headerBlueBg": "accent.subtle", - "box.headerBlueBorder": "accent.muted", - "box.borderInfo": "accent.muted", - "box.bgInfo": "accent.subtle", - "box.borderWarning": "attention.muted", - "box.bgWarning": "attention.subtle", - "branchName.text": "fg.muted", - "branchName.icon": "fg.muted", - "branchName.bg": "accent.subtle", - "branchName.link.text": "accent.fg", - "branchName.link.icon": "accent.fg", - "branchName.link.bg": "accent.subtle", - "markdown.codeBg": "neutral.muted", - "markdown.frameBorder": "border.default", - "markdown.blockquoteBorder": "border.default", - "markdown.tableBorder": "border.default", - "markdown.tableTrBorder": "border.muted", - "filterItem.barBg": "neutral.subtle", - "hiddenTextExpander.bg": "neutral.muted", - "hiddenTextExpander.bgHover": "accent.muted", - "dragAndDrop.border": "border.default", - "uploadEnabled.border": "border.default", - "uploadEnabled.borderFocused": "accent.emphasis", - "previewableCommentForm.border": "border.default", - "verifiedBadge.text": "success.fg", - "verifiedBadge.bg": "canvas.default", - "verifiedBadge.border": "border.default", - "socialCount.bg": "canvas.default", - "tooltip.text": "fg.onEmphasis", - "tooltip.bg": "neutral.emphasisPlus", - "filesExplorerIcon": "accent.fg", - "hlAuthorBg": "accent.subtle", - "hlAuthorBorder": "accent.muted", - "logoSubdued": "neutral.muted", - "discussionBorder": "success.muted", - "discussionBgSuccess": "success.emphasis", - "actionsWorkflowTableStickyBg": "primer.canvas.sticky", - "repoLanguageColorBorder": "primer.border.contrast", - "codeSelectionBg": "accent.muted", - "highlight.text": "fg.default", - "highlight.bg": "attention.subtle", - "blob.lineHighlightBg": "attention.subtle", - "blob.lineHighlightBorder": "attention.muted", - "topicTag.text": "accent.fg", - "topicTag.bg": "accent.subtle", - "topicTag.hoverBg": "accent.emphasis", - "topicTag.activeBg": "accent.subtle", - "footerInvertocat.octicon": "fg.subtle", - "footerInvertocat.octiconHover": "fg.muted", - "dropdown.shadow": "shadow.large", - "label.border": "border.default", - "label.primary.text": "fg.default", - "label.primary.border": "neutral.emphasis", - "label.secondary.text": "fg.muted", - "label.secondary.border": "border.default", - "label.info.text": "accent.fg", - "label.info.border": "accent.emphasis", - "label.success.text": "success.fg", - "label.success.border": "success.emphasis", - "label.warning.text": "attention.fg", - "label.warning.border": "attention.emphasis", - "label.danger.text": "danger.fg", - "label.danger.border": "danger.emphasis", - "label.orange.text": "severe.fg", - "label.orange.border": "severe.emphasis", - "input.bg": "canvas.default", - "input.contrastBg": "canvas.inset", - "input.border": "border.default", - "input.shadow": "primer.shadow.inset", - "input.disabledBorder": "border.default", - "input.warningBorder": "attention.emphasis", - "input.errorBorder": "danger.emphasis", - "input.tooltip.success.text": "fg.default", - "input.tooltip.success.bg": "success.subtle", - "input.tooltip.success.border": "success.muted", - "input.tooltip.warning.text": "fg.default", - "input.tooltip.warning.bg": "attention.subtle", - "input.tooltip.warning.border": "attention.muted", - "input.tooltip.error.text": "fg.default", - "input.tooltip.error.bg": "danger.subtle", - "input.tooltip.error.border": "danger.muted", - "toast.text": "fg.default", - "toast.bg": "canvas.default", - "toast.border": "border.default", - "toast.shadow": "shadow.large", - "toast.icon": "fg.onEmphasis", - "toast.iconBg": "accent.emphasis", - "toast.iconBorder": null, - "toast.success.text": "fg.default", - "toast.success.border": "border.default", - "toast.success.icon": "fg.onEmphasis", - "toast.success.iconBg": "success.emphasis", - "toast.success.iconBorder": null, - "toast.warning.text": "fg.default", - "toast.warning.border": "border.default", - "toast.warning.icon": "fg.default", - "toast.warning.iconBg": "attention.emphasis", - "toast.warning.iconBorder": null, - "toast.danger.text": "fg.default", - "toast.danger.border": "border.default", - "toast.danger.icon": "fg.onEmphasis", - "toast.danger.iconBg": "danger.emphasis", - "toast.danger.iconBorder": null, - "toast.loading.text": "fg.default", - "toast.loading.border": "border.default", - "toast.loading.icon": "fg.onEmphasis", - "toast.loading.iconBg": "neutral.emphasis", - "toast.loading.iconBorder": null, - "timeline.text": "fg.muted", - "timeline.badgeSuccessBorder": null, - "timeline.targetBadgeBorder": "accent.emphasis", - "timeline.targetBadgeShadow": "accent.muted", - "diffstat.neutralBg": "neutral.muted", - "diffstat.neutralBorder": "border.subtle", - "diffstat.deletionBg": "danger.emphasis", - "diff.addition.text": "fg.default", - "diff.addition.bg": "success.subtle", - "diff.addition.border": "success.muted", - "diff.deletion.text": "fg.default", - "diff.deletion.bg": "danger.subtle", - "diff.deletion.border": "danger.muted", - "diff.change.text": "attention.fg", - "diff.change.bg": "attention.subtle", - "diff.change.border": "attention.muted", - "mergeBox.successIconBg": "success.emphasis", - "mergeBox.successIconText": "fg.onEmphasis", - "mergeBox.successIconBorder": null, - "mergeBox.successIndicatorBg": "success.emphasis", - "mergeBox.successIndicatorBorder": null, - "mergeBox.mergedIconBg": "done.emphasis", - "mergeBox.mergedIconText": "fg.onEmphasis", - "mergeBox.mergedIconBorder": null, - "mergeBox.mergedBoxBorder": "done.emphasis", - "mergeBox.neutralIconBg": "neutral.emphasis", - "mergeBox.neutralIconText": "fg.onEmphasis", - "mergeBox.neutralIconBorder": null, - "mergeBox.neutralIndicatorBg": "neutral.emphasis", - "mergeBox.neutralIndicatorBorder": null, - "mergeBox.warningIconBg": "attention.emphasis", - "mergeBox.warningIconText": "fg.onEmphasis", - "mergeBox.warningIconBorder": null, - "mergeBox.warningBoxBorder": "attention.emphasis", - "mergeBox.warningMergeHighlight": null, - "mergeBox.errorIconBg": "danger.emphasis", - "mergeBox.errorIconText": "fg.onEmphasis", - "mergeBox.errorIconBorder": null, - "mergeBox.errorIndicatorBg": "danger.emphasis", - "mergeBox.errorIndicatorBorder": null, - "underlinenav.border": null, - "underlinenav.borderActive": "primer.border.active", - "underlinenav.text": "fg.default", - "underlinenav.textHover": "fg.default", - "underlinenav.textActive": "fg.default", - "underlinenav.iconHover": "fg.subtle", - "underlinenav.iconActive": "fg.default", - "underlinenav.counterText": "fg.default", - "underlinenav.counterBg": "neutral.muted", - "selectMenu.borderSecondary": "border.muted", - "selectMenu.shadow": "shadow.large", - "selectMenu.backdropBg": "primer.canvas.backdrop", - "sidenav.borderActive": "primer.border.active", - "menu.headingText": "fg.default", - "menu.borderActive": "primer.border.active", - "project.cardBg": "canvas.overlay", - "prState.draft.text": "fg.onEmphasis", - "prState.draft.bg": "neutral.emphasis", - "prState.draft.border": null, - "prState.open.text": "fg.onEmphasis", - "prState.open.bg": "success.emphasis", - "prState.open.border": null, - "prState.merged.text": "fg.onEmphasis", - "prState.merged.bg": "done.emphasis", - "prState.merged.border": null, - "prState.closed.text": "fg.onEmphasis", - "prState.closed.bg": "danger.emphasis", - "prState.closed.border": null, - "diffBlob.numText": "fg.subtle", - "diffBlob.numHoverText": "fg.default", - "diffBlob.addition.numHoverText": "fg.default", - "diffBlob.deletion.numHoverText": "fg.default", - "diffBlob.hunk.text": "fg.muted", - "diffBlob.hunk.lineBg": "accent.subtle", - "diffBlob.emptyBlockBg": "neutral.subtle", - "diffBlob.selectedLineHighlightBg": "attention.subtle", - "diffBlob.selectedLineHighlightBorder": "attention.muted", - "diffBlob.expander.hoverIcon": "fg.onEmphasis", - "diffBlob.expander.hoverBg": "accent.emphasis", - "diffBlob.commentButton.icon": "fg.onEmphasis", - "diffBlob.commentButton.bg": "accent.emphasis", - "diffBlob.commentButton.gradientBg": null, - "globalNav.logo": null, - "globalNav.bg": null, - "globalNav.text": null, - "globalNav.icon": null, - "globalNav.inputBg": null, - "globalNav.inputBorder": null, - "globalNav.inputIcon": null, - "globalNav.inputPlaceholder": null, - "introShelf.gradientLeft": "accent.subtle", - "introShelf.gradientRight": "success.subtle", - "introShelf.gradientIn": "canvas.default", - "introShelf.gradientOut": null, - "mktg.success": null, - "mktg.info": null, - "mktg.bgShadeGradient.top": null, - "mktg.bgShadeGradient.bottom": null, - "mktg.btn.bg.top": null, - "mktg.btn.bg.bottom": null, - "mktg.btn.bgOverlay.top": null, - "mktg.btn.bgOverlay.bottom": null, - "mktg.btn.text": null, - "mktg.btn.primary.bg.top": null, - "mktg.btn.primary.bg.bottom": null, - "mktg.btn.primary.bgOverlay.top": null, - "mktg.btn.primary.bgOverlay.bottom": null, - "mktg.btn.primary.text": null, - "mktg.btn.enterprise.bg.top": null, - "mktg.btn.enterprise.bg.bottom": null, - "mktg.btn.enterprise.bgOverlay.top": null, - "mktg.btn.enterprise.bgOverlay.bottom": null, - "mktg.btn.enterprise.text": null, - "mktg.btn.outline.text": null, - "mktg.btn.outline.border": null, - "mktg.btn.outline.hover.text": null, - "mktg.btn.outline.hover.border": null, - "mktg.btn.outline.focus.border": null, - "mktg.btn.outline.focus.borderInset": null, - "mktg.btn.dark.text": null, - "mktg.btn.dark.border": null, - "mktg.btn.dark.hover.text": null, - "mktg.btn.dark.hover.border": null, - "mktg.btn.dark.focus.border": null, - "mktg.btn.dark.focus.borderInset": null, - "color.primer.shadow.focus": null, - "color.btn.danger.focus.shadow": null, - "color.btn.danger.focus.border": null, - "color.btn.outline.focus.shadow": null, - "color.btn.outline.focus.border": null, - "color.btn.primary.focus.shadow": null, - "color.btn.primary.focus.border": null, - "color.btn.primary.focus.bg": null, - "color.btn.shadow.input.focus": null, - "color.btn.focus.shadow": null, - "color.btn.focus.border": null, - "color.btn.focus.bg": null -} diff --git a/data/colors/themes/dark.ts b/data/colors/themes/dark.ts deleted file mode 100644 index bac9a7d01..000000000 --- a/data/colors/themes/dark.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {merge} from '../../../src/utils-v1' -import darkComponentVars from '../vars/component_dark' -import darkDeprecatedVars from '../vars/deprecated_dark' -import darkGlobalVars from '../vars/global_dark' -import darkMarketingVars from '../vars/marketing_dark' -import darkAppVars from '../vars/app_dark' - -const scale = { - black: '#010409', - white: '#ffffff', - gray: ['#f0f6fc', '#c9d1d9', '#b1bac4', '#8b949e', '#6e7681', '#484f58', '#30363d', '#21262d', '#161b22', '#0d1117'], - blue: ['#cae8ff', '#a5d6ff', '#79c0ff', '#58a6ff', '#388bfd', '#1f6feb', '#1158c7', '#0d419d', '#0c2d6b', '#051d4d'], - green: ['#aff5b4', '#7ee787', '#56d364', '#3fb950', '#2ea043', '#238636', '#196c2e', '#0f5323', '#033a16', '#04260f'], - yellow: [ - '#f8e3a1', - '#f2cc60', - '#e3b341', - '#d29922', - '#bb8009', - '#9e6a03', - '#845306', - '#693e00', - '#4b2900', - '#341a00' - ], - orange: [ - '#ffdfb6', - '#ffc680', - '#ffa657', - '#f0883e', - '#db6d28', - '#bd561d', - '#9b4215', - '#762d0a', - '#5a1e02', - '#3d1300' - ], - red: ['#ffdcd7', '#ffc1ba', '#ffa198', '#ff7b72', '#f85149', '#da3633', '#b62324', '#8e1519', '#67060c', '#490202'], - purple: [ - '#eddeff', - '#e2c5ff', - '#d2a8ff', - '#bc8cff', - '#a371f7', - '#8957e5', - '#6e40c9', - '#553098', - '#3c1e70', - '#271052' - ], - pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], - coral: [ - '#ffddd2', - '#ffc2b2', - '#ffa28b', - '#f78166', - '#ea6045', - '#cf462d', - '#ac3220', - '#872012', - '#640d04', - '#460701' - ] -} - -// const exceptions = { -// Please avoid adding exceptions to this base theme. -// Otherwise the exceptions will also propagate to all other extended themes. -// } - -export default merge(darkDeprecatedVars, darkAppVars, darkMarketingVars, darkComponentVars, darkGlobalVars, {scale}) diff --git a/data/colors/themes/dark_colorblind.ts b/data/colors/themes/dark_colorblind.ts deleted file mode 100644 index 39638e4b0..000000000 --- a/data/colors/themes/dark_colorblind.ts +++ /dev/null @@ -1,84 +0,0 @@ -import {alpha, get, merge} from '../../../src/utils-v1' -import dark from './dark' - -const scale = { - black: '#010409', - white: '#ffffff', - gray: ['#f0f6fc', '#c9d1d9', '#b1bac4', '#8b949e', '#6e7681', '#484f58', '#30363d', '#21262d', '#161b22', '#0d1117'], - blue: ['#cae8ff', '#a5d6ff', '#79c0ff', '#58a6ff', '#388bfd', '#1f6feb', '#1158c7', '#0d419d', '#0c2d6b', '#051d4d'], - green: ['#cae8ff', '#a5d6ff', '#79c0ff', '#58a6ff', '#388bfd', '#1f6feb', '#1158c7', '#0d419d', '#0c2d6b', '#051d4d'], - yellow: [ - '#f8e3a1', - '#f2cc60', - '#e3b341', - '#d29922', - '#bb8009', - '#9e6a03', - '#845306', - '#693e00', - '#4b2900', - '#341a00' - ], - orange: [ - '#ffe2bb', - '#ffc981', - '#fdac54', - '#ec8e2c', - '#d47616', - '#b76100', - '#914d04', - '#6c3906', - '#4e2906', - '#331c04' - ], - red: [ - '#ffe2bb', - '#ffc981', - '#fdac54', - '#ec8e2c', - '#d47616', - '#b76100', - '#914d04', - '#6c3906', - '#4e2906', - '#331c04' - ], - purple: [ - '#eddeff', - '#e2c5ff', - '#d2a8ff', - '#bc8cff', - '#a371f7', - '#8957e5', - '#6e40c9', - '#553098', - '#3c1e70', - '#271052' - ], - pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], - coral: ['#ffddd2', '#ffc2b2', '#ffa28b', '#f78166', '#ea6045', '#cf462d', '#ac3220', '#872012', '#640d04', '#460701'] -} - -const exceptions = { - fg: { - default: get('scale.gray.1'), - muted: get('scale.gray.3'), - }, - accent: { - fg: get('scale.blue.3'), - }, - open: { - fg: get('scale.orange.3'), - emphasis: get('scale.orange.5'), - muted: alpha(get('scale.orange.4'), 0.4), - subtle: alpha(get('scale.orange.4'), 0.15) - }, - closed: { - fg: get('scale.gray.3'), - emphasis: get('scale.gray.4'), - muted: alpha(get('scale.gray.4'), 0.4), - subtle: alpha(get('scale.gray.4'), 0.1) - } -} - -export default merge(dark, exceptions, {scale}) diff --git a/data/colors/themes/dark_dimmed.ts b/data/colors/themes/dark_dimmed.ts deleted file mode 100644 index 2527fbb98..000000000 --- a/data/colors/themes/dark_dimmed.ts +++ /dev/null @@ -1,77 +0,0 @@ -import {get, merge} from '../../../src/utils-v1' -import dark from './dark' - -const scale = { - black: '#1c2128', - white: '#cdd9e5', - gray: ['#cdd9e5', '#adbac7', '#909dab', '#768390', '#636e7b', '#545d68', '#444c56', '#373e47', '#2d333b', '#22272e'], - blue: ['#c6e6ff', '#96d0ff', '#6cb6ff', '#539bf5', '#4184e4', '#316dca', '#255ab2', '#1b4b91', '#143d79', '#0f2d5c'], - green: ['#b4f1b4', '#8ddb8c', '#6bc46d', '#57ab5a', '#46954a', '#347d39', '#2b6a30', '#245829', '#1b4721', '#113417'], - yellow: [ - '#fbe090', - '#eac55f', - '#daaa3f', - '#c69026', - '#ae7c14', - '#966600', - '#805400', - '#6c4400', - '#593600', - '#452700' - ], - orange: [ - '#ffddb0', - '#ffbc6f', - '#f69d50', - '#e0823d', - '#cc6b2c', - '#ae5622', - '#94471b', - '#7f3913', - '#682d0f', - '#4d210c' - ], - red: ['#ffd8d3', '#ffb8b0', '#ff938a', '#f47067', '#e5534b', '#c93c37', '#ad2e2c', '#922323', '#78191b', '#5d0f12'], - purple: [ - '#eedcff', - '#dcbdfb', - '#dcbdfb', - '#b083f0', - '#986ee2', - '#8256d0', - '#6b44bc', - '#5936a2', - '#472c82', - '#352160' - ], - pink: ['#ffd7eb', '#ffb3d8', '#fc8dc7', '#e275ad', '#c96198', '#ae4c82', '#983b6e', '#7e325a', '#69264a', '#551639'], - coral: [ - '#ffdacf', - '#ffb9a5', - '#f79981', - '#ec775c', - '#de5b41', - '#c2442d', - '#a93524', - '#8d291b', - '#771d13', - '#5d1008' - ] -} - -const exceptions = { - fg: { - default: get('scale.gray.1'), - muted: get('scale.gray.3'), - }, - accent: { - fg: get('scale.blue.3'), - }, - diffBlob: { - expander: { - icon: get('fg.default'), - } - } -} - -export default merge(dark, exceptions, {scale}) diff --git a/data/colors/themes/dark_high_contrast.ts b/data/colors/themes/dark_high_contrast.ts deleted file mode 100644 index 9d890a41a..000000000 --- a/data/colors/themes/dark_high_contrast.ts +++ /dev/null @@ -1,252 +0,0 @@ -import {alpha, get, merge, darken} from '../../../src/utils-v1' -import dark from './dark' - -const scale = { - black: '#010409', - white: '#ffffff', - gray: [ - '#ffffff', - '#f0f3f6', - '#d9dee3', - '#bdc4cc', - '#9ea7b3', - '#7a828e', - '#525964', - '#272b33', - '#272b33', - '#0a0c10' - ], - blue: [ - '#caeaff', - '#addcff', - '#91cbff', - '#71b7ff', - '#409eff', - '#409eff', - '#318bf8', - '#2672f3', - '#1e60d5', - '#194fb1' - ], - green: [ - '#acf7b6', - '#72f088', - '#4ae168', - '#26cd4d', - '#09b43a', - '#09b43a', - '#02a232', - '#008c2c', - '#007728', - '#006222' - ], - yellow: [ - '#fbe59e', - '#fbd669', - '#f7c843', - '#f0b72f', - '#e09b13', - '#e09b13', - '#c88508', - '#ae7104', - '#945d02', - '#7b4900' - ], - orange: [ - '#ffe1b4', - '#ffcf86', - '#ffb757', - '#fe9a2d', - '#e7811d', - '#e7811d', - '#d57014', - '#bf5e0a', - '#a74c00', - '#8f3c00' - ], - red: [ - '#ffdedb', - '#ffc9c7', - '#ffb1af', - '#ff9492', - '#ff6a69', - '#ff6a69', - '#ff4445', - '#e82a2f', - '#cc1421', - '#ad0116' - ], - purple: [ - '#f0dfff', - '#e6ccff', - '#dbb7ff', - '#cb9eff', - '#b780ff', - '#b87fff', - '#a66bff', - '#954ffd', - '#8031f7', - '#6921d7' - ], - pink: [ - '#ffdceb', - '#ffc7e1', - '#ffadd4', - '#ff8dc7', - '#ef6eb1', - '#ef6eb1', - '#e456a3', - '#d23d91', - '#b72c7d', - '#9c1d6a' - ], - coral: [ - '#ffded4', - '#ffcbb9', - '#ffb39b', - '#ff967d', - '#fc704f', - '#fc704f', - '#f75133', - '#e03b21', - '#c62612', - '#a91500' - ] -} - -const exceptions = { - fg: { - default: get('scale.gray.1'), - muted: get('scale.gray.1'), - onEmphasis: get('scale.gray.9') - }, - border: { - default: get('scale.gray.5'), - muted: get('scale.gray.5'), - subtle: get('scale.gray.5') - }, - neutral: { - emphasis: get('scale.gray.4'), - emphasisPlus: get('scale.gray.0') - }, - accent: { - fg: get('scale.blue.3'), - muted: get('scale.blue.4') - }, - success: { - muted: get('scale.green.4'), - }, - attention: { - muted: get('scale.yellow.4'), - }, - severe: { - muted: get('scale.orange.4'), - }, - danger: { - muted: get('scale.red.4'), - }, - done: { - muted: get('scale.purple.4'), - }, - sponsors: { - muted: get('scale.pink.4'), - }, - avatar: { - border: alpha(get('scale.white'), 0.9), - }, - diffstat: { - deletionBorder: get('scale.red.2'), - additionBorder: get('scale.green.2') - }, - underlinenav : { - icon: get('scale.gray.1'), - borderHover: get('scale.gray.3'), - }, - topicTag: { - border: get('accent.emphasis') - }, - btn: { - selectedBg: alpha(get('scale.gray.6'), 0.9), - primary: { - text: get('fg.onEmphasis'), - border: get('scale.green.2'), - hoverBg: get('scale.green.3'), - hoverBorder: get('scale.green.2'), - disabledText: alpha(get('fg.onEmphasis'), 0.5), - disabledBg: alpha(get('scale.green.5'), 0.6), - disabledBorder: alpha(get('scale.green.2'), 0.4), - icon: get('fg.onEmphasis'), - counterBg: alpha(get('scale.black'), 0.15) - }, - danger: { - hoverCounterBG: alpha(get('scale.black'), 0.15), - counterBg: alpha(get('scale.black'), 0.15) - } - }, - codemirror: { - selectionBg: alpha(get('scale.blue.4'), 0.4), - }, - diffBlob: { - addition: { - fg: get('fg.onEmphasis') - }, - deletion: { - fg: get('fg.onEmphasis'), - }, - expander: { - icon: get('fg.default'), - }, - hunk: { - numBg: alpha(get('accent.muted'), 0.4), - }, - }, - - actionListItem: { - inlineDivider: get('border.muted'), - - default: { - hoverBg: get('scale.gray.8'), - hoverBorder: get('border.default'), - activeBg: get('scale.gray.6'), - activeBorder: get('scale.gray.4'), - selectedBg: get('scale.gray.6') - }, - danger: { - hoverBg: get('danger.emphasis'), - activeBg: get('scale.red.6'), - hoverText: get('fg.onEmphasis') - } - }, - - switchTrack: { - bg: get('neutral.emphasis'), - hoverBg: darken(get('neutral.emphasis'), 0.05), - activeBg: darken(get('neutral.emphasis'), 0.08), - fg: get('fg.onEmphasis'), - - checked: { - bg: get('accent.emphasis'), - } - }, - - switchKnob: { - border: get('scale.gray.4'), - - checked: { - border: get('accent.emphasis'), - } - }, - - treeViewItem: { - chevron: { - hoverBg: get('scale.gray.6'), - } - }, - control: { - borderColor: { - emphasis: get('scale.gray.4') - } - }, -} - -export default merge(dark, exceptions, {scale}) diff --git a/data/colors/themes/dark_tritanopia.ts b/data/colors/themes/dark_tritanopia.ts deleted file mode 100644 index 70de17a41..000000000 --- a/data/colors/themes/dark_tritanopia.ts +++ /dev/null @@ -1,72 +0,0 @@ -import {get, merge} from '../../../src/utils-v1' -import dark_colorblind from './dark_colorblind' - -const scale = { - black: '#010409', - white: '#ffffff', - gray: ['#f0f6fc', '#c9d1d9', '#b1bac4', '#8b949e', '#6e7681', '#484f58', '#30363d', '#21262d', '#161b22', '#0d1117'], - blue: ['#cae8ff', '#a5d6ff', '#79c0ff', '#58a6ff', '#388bfd', '#1f6feb', '#1158c7', '#0d419d', '#0c2d6b', '#051d4d'], - green: ['#cae8ff', '#a5d6ff', '#79c0ff', '#58a6ff', '#388bfd', '#1f6feb', '#1158c7', '#0d419d', '#0c2d6b', '#051d4d'], - yellow: [ - '#f8e3a1', - '#f2cc60', - '#e3b341', - '#d29922', - '#bb8009', - '#9e6a03', - '#845306', - '#693e00', - '#4b2900', - '#341a00' - ], - orange: [ - '#ffdcd7', - '#ffc1ba', - '#ffa198', - '#ff7b72', - '#f85149', - '#da3633', - '#b62324', - '#8e1519', - '#67060c', - '#490202' - ], - red: [ - '#ffdcd7', - '#ffc1ba', - '#ffa198', - '#ff7b72', - '#f85149', - '#da3633', - '#b62324', - '#8e1519', - '#67060c', - '#490202' - ], - purple: [ - '#eddeff', - '#e2c5ff', - '#d2a8ff', - '#bc8cff', - '#a371f7', - '#8957e5', - '#6e40c9', - '#553098', - '#3c1e70', - '#271052' - ], - pink: ['#ffdaec', '#ffbedd', '#ff9bce', '#f778ba', '#db61a2', '#bf4b8a', '#9e3670', '#7d2457', '#5e103e', '#42062a'], - coral: ['#ffddd2', '#ffc2b2', '#ffa28b', '#f78166', '#ea6045', '#cf462d', '#ac3220', '#872012', '#640d04', '#460701'] -} - -const exceptions = { - fg: { - default: get('scale.gray.1'), - muted: get('scale.gray.3'), - }, - accent: { - fg: get('scale.blue.3'), - }, -} - -export default merge(dark_colorblind, exceptions, {scale}) diff --git a/data/colors/themes/light.ts b/data/colors/themes/light.ts deleted file mode 100644 index 0ccd59503..000000000 --- a/data/colors/themes/light.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {merge} from '../../../src/utils-v1' -import lightComponentVars from '../vars/component_light' -import lightDeprecatedVars from '../vars/deprecated_light' -import lightGlobalVars from '../vars/global_light' -import lightMarketingVars from '../vars/marketing_light' -import lightAppVars from '../vars/app_light' - -const scale = { - black: '#1F2328', - white: '#ffffff', - gray: ['#f6f8fa', '#eaeef2', '#d0d7de', '#afb8c1', '#8c959f', '#6e7781', '#57606a', '#424a53', '#32383f', '#24292f'], - blue: ['#ddf4ff', '#b6e3ff', '#80ccff', '#54aeff', '#218bff', '#0969da', '#0550ae', '#033d8b', '#0a3069', '#002155'], - green: ['#dafbe1', '#aceebb', '#6fdd8b', '#4ac26b', '#2da44e', '#1a7f37', '#116329', '#044f1e', '#003d16', '#002d11'], - yellow: [ - '#fff8c5', - '#fae17d', - '#eac54f', - '#d4a72c', - '#bf8700', - '#9a6700', - '#7d4e00', - '#633c01', - '#4d2d00', - '#3b2300' - ], - orange: [ - '#fff1e5', - '#ffd8b5', - '#ffb77c', - '#fb8f44', - '#e16f24', - '#bc4c00', - '#953800', - '#762c00', - '#5c2200', - '#471700' - ], - red: ['#ffebe9', '#ffcecb', '#ffaba8', '#ff8182', '#fa4549', '#cf222e', '#a40e26', '#82071e', '#660018', '#4c0014'], - purple: [ - '#fbefff', - '#ecd8ff', - '#d8b9ff', - '#c297ff', - '#a475f9', - '#8250df', - '#6639ba', - '#512a97', - '#3e1f79', - '#2e1461' - ], - pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], - coral: [ - '#fff0eb', - '#ffd6cc', - '#ffb4a1', - '#fd8c73', - '#ec6547', - '#c4432b', - '#9e2f1c', - '#801f0f', - '#691105', - '#510901' - ] -} - -// const exceptions = { -// Please avoid adding exceptions to this base theme. -// Otherwise the exceptions will also propagate to all other extended themes. -// } - -export default merge(lightDeprecatedVars, lightAppVars, lightMarketingVars, lightComponentVars, lightGlobalVars, {scale}) diff --git a/data/colors/themes/light_colorblind.ts b/data/colors/themes/light_colorblind.ts deleted file mode 100644 index fe47828ed..000000000 --- a/data/colors/themes/light_colorblind.ts +++ /dev/null @@ -1,105 +0,0 @@ -import {alpha, get, merge} from '../../../src/utils-v1' -import light from './light' - -const scale = { - black: '#1b1f24', - white: '#ffffff', - gray: ['#f6f8fa', '#eaeef2', '#d0d7de', '#afb8c1', '#8c959f', '#6e7781', '#57606a', '#424a53', '#32383f', '#24292f'], - blue: ['#ddf4ff', '#b6e3ff', '#80ccff', '#54aeff', '#218bff', '#0969da', '#0550ae', '#033d8b', '#0a3069', '#002155'], - green: ['#ddf4ff', '#b6e3ff', '#80ccff', '#54aeff', '#218bff', '#0969da', '#0550ae', '#033d8b', '#0a3069', '#002155'], - yellow: [ - '#fff8c5', - '#fae17d', - '#eac54f', - '#d4a72c', - '#bf8700', - '#9a6700', - '#7d4e00', - '#633c01', - '#4d2d00', - '#3b2300' - ], - orange: [ - '#fff5e8', - '#ffddb0', - '#ffbc6d', - '#f79939', - '#dd7815', - '#b35900', - '#8a4600', - '#6f3800', - '#572c00', - '#412000' - ], - red: [ - '#fff5e8', - '#ffddb0', - '#ffbc6d', - '#f79939', - '#dd7815', - '#b35900', - '#8a4600', - '#6f3800', - '#572c00', - '#412000' - ], - purple: [ - '#fbefff', - '#ecd8ff', - '#d8b9ff', - '#c297ff', - '#a475f9', - '#8250df', - '#6639ba', - '#512a97', - '#3e1f79', - '#2e1461' - ], - pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], - coral: ['#fff0eb', '#ffd6cc', '#ffb4a1', '#fd8c73', '#ec6547', '#c4432b', '#9e2f1c', '#801f0f', '#691105', '#510901'] -} - -const exceptions = { - fg: { - default: get('scale.gray.9'), - muted: get('scale.gray.6'), - }, - success: { - emphasis: get('scale.green.5'), - }, - open: { - fg: get('scale.orange.5'), - emphasis: get('scale.orange.4'), - muted: alpha(get('scale.orange.3'), 0.4), - subtle: get('scale.orange.0') - }, - closed: { - fg: get('scale.gray.5'), - emphasis: get('scale.gray.5'), - muted: alpha(get('scale.gray.3'), 0.4), - subtle: get('scale.gray.0') - }, - danger: { - fg: get('scale.red.5'), - }, - diffBlob: { - addition: { - numBg: get('success.muted'), - lineBg: alpha(get('scale.green.0'), 0.5), - wordBg: get('success.muted') - }, - deletion: { - numBg: get('danger.muted'), - lineBg: alpha(get('scale.red.0'), 0.5), - wordBg: alpha(get('scale.red.2'), 0.5) - } - }, - btn: { - primary: { - hoverBg: get('scale.green.5'), - disabledBg: get('scale.green.2') - } - } -} - -export default merge(light, exceptions, {scale}) diff --git a/data/colors/themes/light_high_contrast.ts b/data/colors/themes/light_high_contrast.ts deleted file mode 100644 index d9665880d..000000000 --- a/data/colors/themes/light_high_contrast.ts +++ /dev/null @@ -1,259 +0,0 @@ -import {alpha, get, merge, lighten} from '../../../src/utils-v1' -import light from './light' - -const scale = { -black: '#010409', -white: '#ffffff', -gray: [ - '#ffffff', - '#e7ecf0', - '#ced5dc', - '#acb6c0', - '#88929d', - '#66707b', - '#4b535d', - '#343b43', - '#20252c', - '#0e1116' -], -blue: [ - '#dff7ff', - '#9cd7ff', - '#67b3fd', - '#368cf9', - '#1168e3', - '#0349b4', - '#023b95', - '#022f7a', - '#032563', - '#021a4a' - ], -green: [ - '#d2fedb', - '#82e596', - '#43c663', - '#26a148', - '#117f32', - '#055d20', - '#024c1a', - '#013d14', - '#003110', - '#00230b' - ], -yellow: [ - '#fcf7be', - '#f0ce53', - '#d5a824', - '#b58407', - '#956400', - '#744500', - '#603700', - '#4e2c00', - '#3f2200', - '#2e1800' -], -orange: [ - '#fff2d5', - '#ffc67b', - '#f99636', - '#dc6d1a', - '#b45105', - '#873800', - '#702c00', - '#5b2300', - '#491b00', - '#361200' - ], -red: [ - '#fff0ee', - '#ffc1bc', - '#ff8e8a', - '#ee5a5d', - '#d5232c', - '#a0111f', - '#86061d', - '#6e011a', - '#5a0016', - '#430011' - ], -purple: [ - '#faf0fe', - '#e0c5ff', - '#c49bff', - '#a371f7', - '#844ae7', - '#622cbc', - '#512598', - '#411d7b', - '#341763', - '#260f49' - ], -pink: [ - '#feeff7', - '#ffbde0', - '#fc87ca', - '#ed4baf', - '#c9248e', - '#971368', - '#7d0c57', - '#660847', - '#53043a', - '#3e022b' - ], -coral: [ - '#fff0ed', - '#ffc2b6', - '#ff8f7e', - '#ef5b48', - '#cd3425', - '#9f1710', - '#870706', - '#6f0107', - '#5b0002', - '#430200' - ] -} - -const exceptions = { - fg: { - default: get('scale.gray.9'), - muted: get('scale.gray.9'), - }, - canvas: { - inset: get('scale.white'), - subtle: get('scale.gray.1') - }, - border: { - default: get('scale.gray.8'), - muted: get('scale.gray.4'), - subtle: alpha(get('scale.black'), 0.8) - }, - neutral: { - subtle: get('scale.gray.1') - }, - accent: { - muted: get('scale.blue.3') - }, - success: { - emphasis: get('scale.green.5'), - muted: get('scale.green.3') - }, - attention: { - emphasis: get('scale.yellow.5'), - muted: get('scale.yellow.3') - }, - severe: { - muted: get('scale.orange.3') - }, - danger: { - muted: get('scale.red.3') - }, - done: { - muted: get('scale.purple.3') - }, - sponsors: { - muted: get('scale.pink.3') - }, - topicTag: { - border: get('accent.emphasis') - }, - counter: { - border: get('border.default') - }, - btn: { - bg: get('scale.gray.1'), - border: get('border.subtle'), - HoverBg: get('scale.gray.2'), - activeBg: get('scale.gray.3'), - selectedBg: get('scale.gray.3'), - primary: { - bg: get('success.emphasis'), - border: get('scale.green.7'), - hoverBg: get('scale.green.6'), - hoverBorder: get('scale.green.7'), - }, - outline: { - text: get('scale.blue.6'), - hoverBg: get('accent.emphasis'), - hoverBorder: get('scale.blue.7'), - selectedBg: get('scale.blue.7'), - selectedBorder: get('scale.blue.7'), - disabledText: alpha(get('scale.blue.5'), 0.5), - disabledBg: get('scale.gray.1') - }, - danger: { - text: get('scale.red.6'), - hoverBg: get('danger.emphasis'), - hoverBorder: get('scale.red.7'), - selectedBg: get('scale.red.7'), - selectedBorder: get('scale.red.7'), - disabledBg: get('scale.gray.1'), - icon: get('scale.red.6') - } - }, - diffBlob: { - addition: { - fg: get('fg.onEmphasis'), - wordBg: get('success.emphasis') - }, - deletion: { - fg: get('fg.onEmphasis'), - wordBg: get('danger.emphasis') - }, - hunk: { - numBg: get('scale.blue.1') - } - }, - header: { - divider: get('scale.gray.3') - }, - actionListItem: { - inlineDivider: get('border.muted'), - default: { - hoverBg: get('scale.gray.1'), - hoverBorder: get('border.muted'), - activeBg: get('scale.gray.2'), - activeBorder: get('border.default'), - selectedBg: get('scale.gray.2') - }, - danger: { - hoverBg: get('danger.emphasis'), - activeBg: get('scale.red.7'), - hoverText: get('fg.onEmphasis') - } - }, - pageHeaderBg: get('canvas.default'), - - switchTrack: { - bg: get('neutral.emphasis'), - hoverBg: lighten(get('neutral.emphasis'), 0.03), - activeBg: lighten(get('neutral.emphasis'), 0.05), - fg: get('fg.onEmphasis'), - disabledFg: get('fg.onEmphasis'), - - checked: { - fg: get('fg.onEmphasis'), - } - }, - - switchKnob: { - border: get('border.default'), - - checked: { - border: get('accent.emphasis'), - } - }, - - treeViewItem: { - chevron: { - hoverBg: get('scale.gray.2'), - } - }, - control: { - borderColor: { - emphasis: get('border.default') - } - } -} - -export default merge(light, exceptions, {scale}) diff --git a/data/colors/themes/light_tritanopia.ts b/data/colors/themes/light_tritanopia.ts deleted file mode 100644 index ce0e8ddb9..000000000 --- a/data/colors/themes/light_tritanopia.ts +++ /dev/null @@ -1,75 +0,0 @@ -import {merge, get} from '../../../src/utils-v1' -import light_colorblind from './light_colorblind' - -const scale = { - black: '#1b1f24', - white: '#ffffff', - gray: ['#f6f8fa', '#eaeef2', '#d0d7de', '#afb8c1', '#8c959f', '#6e7781', '#57606a', '#424a53', '#32383f', '#24292f'], - blue: ['#ddf4ff', '#b6e3ff', '#80ccff', '#54aeff', '#218bff', '#0969da', '#0550ae', '#033d8b', '#0a3069', '#002155'], - green: ['#ddf4ff', '#b6e3ff', '#80ccff', '#54aeff', '#218bff', '#0969da', '#0550ae', '#033d8b', '#0a3069', '#002155'], - yellow: [ - '#fff8c5', - '#fae17d', - '#eac54f', - '#d4a72c', - '#bf8700', - '#9a6700', - '#7d4e00', - '#633c01', - '#4d2d00', - '#3b2300' - ], - orange: [ - '#ffebe9', - '#ffcecb', - '#ffaba8', - '#ff8182', - '#fa4549', - '#cf222e', - '#a40e26', - '#82071e', - '#660018', - '#4c0014' - ], - red: [ - '#ffebe9', - '#ffcecb', - '#ffaba8', - '#ff8182', - '#fa4549', - '#cf222e', - '#a40e26', - '#82071e', - '#660018', - '#4c0014' - ], - purple: [ - '#fbefff', - '#ecd8ff', - '#d8b9ff', - '#c297ff', - '#a475f9', - '#8250df', - '#6639ba', - '#512a97', - '#3e1f79', - '#2e1461' - ], - pink: ['#ffeff7', '#ffd3eb', '#ffadda', '#ff80c8', '#e85aad', '#bf3989', '#99286e', '#772057', '#611347', '#4d0336'], - coral: ['#fff0eb', '#ffd6cc', '#ffb4a1', '#fd8c73', '#ec6547', '#c4432b', '#9e2f1c', '#801f0f', '#691105', '#510901'] -} - -const exceptions = { - fg: { - default: get('scale.gray.9'), - muted: get('scale.gray.6'), - }, - success: { - emphasis: get('scale.green.5'), - }, - danger: { - fg: get('scale.red.5'), - } -} - -export default merge(light_colorblind, exceptions, {scale}) diff --git a/data/colors/utilities.json b/data/colors/utilities.json deleted file mode 100644 index 8099bcbb4..000000000 --- a/data/colors/utilities.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "fg.default": "fg.default", - "fg.muted": "fg.muted", - "fg.subtle": "fg.subtle", - "fg.accent": "accent.fg", - "fg.success": "success.fg", - "fg.attention": "attention.fg", - "fg.severe": "severe.fg", - "fg.danger": "danger.fg", - "fg.done": "done.fg", - "fg.sponsors": "sponsors.fg", - "fg.on.emphasis": "fg.onEmphasis", - "bg.default": "canvas.default", - "bg.overlay": "canvas.overlay", - "bg.inset": "canvas.inset", - "bg.subtle": "canvas.subtle", - "bg.emphasis": "neutral.emphasisPlus", - "bg.accent": "accent.subtle", - "bg.accent.emphasis": "accent.emphasis", - "bg.success": "success.subtle", - "bg.success.emphasis": "success.emphasis", - "bg.attention": "attention.subtle", - "bg.attention.emphasis": "attention.emphasis", - "bg.severe": "severe.subtle", - "bg.severe.emphasis": "severe.emphasis", - "bg.danger": "danger.subtle", - "bg.danger.emphasis": "danger.emphasis", - "bg.done": "done.subtle", - "bg.done.emphasis": "done.emphasis", - "bg.sponsors": "sponsors.subtle", - "bg.sponsors.emphasis": "sponsors.emphasis", - "border.default": "border.default", - "border.muted": "border.muted", - "border.subtle": "border.subtle", - "border.accent": "accent.muted", - "border.accent.emphasis": "accent.emphasis", - "border.success": "success.muted", - "border.success.emphasis": "success.emphasis", - "border.attention": "attention.muted", - "border.attention.emphasis": "attention.emphasis", - "border.severe": "severe.muted", - "border.severe.emphasis": "severe.emphasis", - "border.danger": "danger.muted", - "border.danger.emphasis": "danger.emphasis", - "border.done": "done.muted", - "border.done.emphasis": "done.emphasis", - "border.sponsors": "sponsors.muted", - "border.sponsors.emphasis": "sponsors.emphasis" -} diff --git a/data/colors/vars/app_dark.ts b/data/colors/vars/app_dark.ts deleted file mode 100644 index 6d3781f1e..000000000 --- a/data/colors/vars/app_dark.ts +++ /dev/null @@ -1,182 +0,0 @@ -import {get, alpha} from '../../../src/utils-v1' - -// Variables to be moved to github/github - -export default { - canvasDefaultTransparent: alpha(get('canvas.default'), 0), - pageHeaderBg: get('canvas.default'), - marketingIcon: { - primary: get('scale.blue.2'), - secondary: get('scale.blue.5') - }, - diffBlob: { - addition: { - numText: get('fg.default'), - fg: get('fg.default'), - numBg: alpha(get('scale.green.3'), 0.3), - lineBg: get('success.subtle'), - wordBg: get('success.muted') - }, - deletion: { - numText: get('fg.default'), - fg: get('fg.default'), - numBg: alpha(get('scale.red.4'), 0.3), - lineBg: get('danger.subtle'), - wordBg: get('danger.muted') - }, - hunk: { - numBg: get('accent.muted') - }, - expander: { - icon: get('fg.muted') - }, - selectedLineHighlightMixBlendMode: 'screen' - }, - diffstat: { - deletionBorder: get('border.subtle'), - additionBorder: get('border.subtle') - }, - searchKeyword: { - hl: alpha(get('scale.yellow.3'), 0.4) - }, - prettylights: { - syntax: { - comment: get('scale.gray.3'), - constant: get('scale.blue.2'), - entity: get('scale.purple.2'), - storageModifierImport: get('scale.gray.1'), - entityTag: get('scale.green.1'), - keyword: get('scale.red.3'), - string: get('scale.blue.1'), - variable: get('scale.orange.2'), - brackethighlighterUnmatched: get('scale.red.4'), - invalidIllegalText: get('scale.gray.0'), - invalidIllegalBg: get('scale.red.7'), - carriageReturnText: get('scale.gray.0'), - carriageReturnBg: get('scale.red.6'), - stringRegexp: get('scale.green.1'), - markupList: get('scale.yellow.1'), - markupHeading: get('scale.blue.5'), - markupItalic: get('scale.gray.1'), - markupBold: get('scale.gray.1'), - markupDeletedText: get('scale.red.0'), - markupDeletedBg: get('scale.red.8'), - markupInsertedText: get('scale.green.0'), - markupInsertedBg: get('scale.green.8'), - markupChangedText: get('scale.orange.0'), - markupChangedBg: get('scale.orange.8'), - markupIgnoredText: get('scale.gray.1'), - markupIgnoredBg: get('scale.blue.6'), - metaDiffRange: get('scale.purple.2'), - brackethighlighterAngle: get('scale.gray.3'), - sublimelinterGutterMark: get('scale.gray.5'), - constantOtherReferenceLink: get('scale.blue.1') - } - }, - codemirror: { - text: get('fg.default'), - bg: get('canvas.default'), - guttersBg: get('canvas.default'), - guttermarkerText: get('canvas.default'), - guttermarkerSubtleText: get('fg.subtle'), - linenumberText: get('fg.muted'), - cursor: get('fg.default'), - selectionBg: get('accent.muted'), - activelineBg: get('neutral.subtle'), - matchingbracketText: get('fg.default'), - linesBg: get('canvas.default'), - syntax: { - comment: get('scale.gray.3'), - constant: get('scale.blue.2'), - entity: get('scale.purple.2'), - keyword: get('scale.red.3'), - storage: get('scale.red.3'), - string: get('scale.blue.1'), - support: get('scale.blue.2'), - variable: get('scale.orange.2') - } - }, - checks: { - bg: get('canvas.inset'), - runBorderWidth: '1px', - containerBorderWidth: '1px', - textPrimary: get('fg.default'), - textSecondary: get('fg.muted'), - textLink: get('accent.fg'), - btnIcon: get('fg.muted'), - btnHoverIcon: get('fg.default'), - btnHoverBg: get('neutral.subtle'), - inputText: get('fg.muted'), - inputPlaceholderText: get('fg.subtle'), - inputFocusText: get('fg.default'), - inputBg: get('scale.gray.8'), - inputShadow: (theme: any) => `0 0 0 1px ${get('border.default')(theme)}`, - donutError: get('scale.red.4'), - donutPending: get('scale.yellow.3'), - donutSuccess: get('scale.green.4'), - donutNeutral: get('scale.gray.3'), - dropdownText: get('fg.default'), - dropdownBg: get('canvas.overlay'), - dropdownBorder: get('border.default'), - dropdownShadow: alpha(get('scale.black'), 0.3), - dropdownHoverText: get('fg.default'), - dropdownHoverBg: get('neutral.subtle'), - dropdownBtnHoverText: get('fg.default'), - dropdownBtnHoverBg: get('neutral.subtle'), - scrollbarThumbBg: get('neutral.muted'), - headerLabelText: get('fg.muted'), - headerLabelOpenText: get('fg.default'), - headerBorder: get('border.muted'), - headerIcon: get('fg.muted'), - lineText: get('fg.muted'), - lineNumText: get('fg.subtle'), - lineTimestampText: get('fg.subtle'), - lineHoverBg: get('neutral.subtle'), - lineSelectedBg: get('accent.subtle'), - lineSelectedNumText: get('accent.fg'), - lineDtFmText: get('fg.onEmphasis'), - lineDtFmBg: get('attention.emphasis'), - gateBg: get('attention.subtle'), - gateText: get('fg.muted'), - gateWaitingText: get('attention.fg'), - stepHeaderOpenBg: get('canvas.subtle'), - stepErrorText: get('danger.fg'), - stepWarningText: get('attention.fg'), - loglineText: get('fg.muted'), - loglineNumText: get('fg.subtle'), - loglineDebugText: get('done.fg'), - loglineErrorText: get('fg.muted'), - loglineErrorNumText: get('fg.subtle'), - loglineErrorBg: get('danger.subtle'), - loglineWarningText: get('fg.muted'), - loglineWarningNumText: get('attention.fg'), - loglineWarningBg: get('attention.subtle'), - loglineCommandText: get('accent.fg'), - loglineSectionText: get('success.fg'), - ansi: { - black: get('scale.gray.9'), - blackBright: get('scale.gray.8'), - white: get('scale.gray.2'), - whiteBright: get('scale.gray.2'), - gray: get('scale.gray.4'), - red: get('scale.red.3'), - redBright: get('scale.red.2'), - green: get('scale.green.3'), - greenBright: get('scale.green.2'), - yellow: get('scale.yellow.3'), - yellowBright: get('scale.yellow.2'), - blue: get('scale.blue.3'), - blueBright: get('scale.blue.2'), - magenta: get('scale.purple.3'), - magentaBright: get('scale.purple.2'), - cyan: '#76e3ea', - cyanBright: '#b3f0ff' - } - }, - project: { - headerBg: get('scale.gray.9'), - sidebarBg: get('scale.gray.8'), - gradientIn: get('scale.gray.8'), - gradientOut: alpha(get('scale.gray.8'), 0) - } -} diff --git a/data/colors/vars/app_light.ts b/data/colors/vars/app_light.ts deleted file mode 100644 index 6e0ffc623..000000000 --- a/data/colors/vars/app_light.ts +++ /dev/null @@ -1,182 +0,0 @@ -import {alpha, get} from '../../../src/utils-v1' - -// Variables to be moved to github/github - -export default { - canvasDefaultTransparent: alpha(get('canvas.default'), 0), - pageHeaderBg: get('canvas.subtle'), - marketingIcon: { - primary: get('scale.blue.4'), - secondary: get('scale.blue.3') - }, - diffBlob: { - addition: { - numText: get('fg.default'), - fg: get('fg.default'), - numBg: '#ccffd8', - lineBg: '#e6ffec', - wordBg: '#abf2bc' - }, - deletion: { - numText: get('fg.default'), - fg: get('fg.default'), - numBg: '#ffd7d5', - lineBg: get('danger.subtle'), - wordBg: get('danger.muted') - }, - hunk: { - numBg: get('accent.muted') - }, - expander: { - icon: get('fg.muted') - }, - selectedLineHighlightMixBlendMode: 'multiply' - }, - diffstat: { - deletionBorder: get('border.subtle'), - additionBorder: get('border.subtle') - }, - searchKeyword: { - hl: get('scale.yellow.0') - }, - prettylights: { - syntax: { - comment: get('scale.gray.6'), - constant: get('scale.blue.6'), - entity: get('scale.purple.6'), - storageModifierImport: get('scale.gray.9'), - entityTag: get('scale.green.6'), - keyword: get('scale.red.5'), - string: get('scale.blue.8'), - variable: get('scale.orange.6'), - brackethighlighterUnmatched: get('scale.red.7'), - invalidIllegalText: get('scale.gray.0'), - invalidIllegalBg: get('scale.red.7'), - carriageReturnText: get('scale.gray.0'), - carriageReturnBg: get('scale.red.5'), - stringRegexp: get('scale.green.6'), - markupList: get('scale.yellow.9'), - markupHeading: get('scale.blue.6'), - markupItalic: get('scale.gray.9'), - markupBold: get('scale.gray.9'), - markupDeletedText: get('scale.red.7'), - markupDeletedBg: get('scale.red.0'), - markupInsertedText: get('scale.green.6'), - markupInsertedBg: get('scale.green.0'), - markupChangedText: get('scale.orange.6'), - markupChangedBg: get('scale.orange.1'), - markupIgnoredText: get('scale.gray.1'), - markupIgnoredBg: get('scale.blue.6'), - metaDiffRange: get('scale.purple.5'), - brackethighlighterAngle: get('scale.gray.6'), - sublimelinterGutterMark: get('scale.gray.4'), - constantOtherReferenceLink: get('scale.blue.8') - } - }, - codemirror: { - text: get('fg.default'), - bg: get('canvas.default'), - guttersBg: get('canvas.default'), - guttermarkerText: get('canvas.default'), - guttermarkerSubtleText: get('fg.subtle'), - linenumberText: get('fg.muted'), - cursor: get('fg.default'), - selectionBg: get('accent.muted'), - activelineBg: get('neutral.subtle'), - matchingbracketText: get('fg.default'), - linesBg: get('canvas.default'), - syntax: { - comment: get('scale.gray.9'), - constant: get('scale.blue.6'), - entity: get('scale.purple.5'), - keyword: get('scale.red.5'), - storage: get('scale.red.5'), - string: get('scale.blue.8'), - support: get('scale.blue.6'), - variable: get('scale.orange.6') - } - }, - checks: { - bg: get('scale.gray.9'), - runBorderWidth: '0px', - containerBorderWidth: '0px', - textPrimary: get('scale.gray.0'), - textSecondary: get('scale.gray.4'), - textLink: get('scale.blue.3'), - btnIcon: get('scale.gray.3'), - btnHoverIcon: get('scale.gray.0'), - btnHoverBg: 'rgba(255,255,255,0.125)', - inputText: get('scale.gray.1'), - inputPlaceholderText: get('scale.gray.4'), - inputFocusText: get('scale.gray.4'), - inputBg: get('scale.gray.8'), - inputShadow: 'none', - donutError: get('scale.red.4'), - donutPending: get('scale.yellow.4'), - donutSuccess: get('success.emphasis'), - donutNeutral: get('scale.gray.3'), - dropdownText: get('scale.gray.3'), - dropdownBg: get('scale.gray.8'), - dropdownBorder: get('scale.gray.7'), - dropdownShadow: alpha(get('scale.black'), 0.3), - dropdownHoverText: get('scale.gray.0'), - dropdownHoverBg: get('scale.gray.7'), - dropdownBtnHoverText: get('scale.gray.0'), - dropdownBtnHoverBg: get('scale.gray.8'), - scrollbarThumbBg: get('scale.gray.6'), - headerLabelText: get('scale.gray.2'), - headerLabelOpenText: get('scale.gray.0'), - headerBorder: get('scale.gray.8'), - headerIcon: get('scale.gray.4'), - lineText: get('scale.gray.2'), - lineNumText: alpha(get('scale.gray.4'), 0.75), - lineTimestampText: get('scale.gray.4'), - lineHoverBg: get('scale.gray.8'), - lineSelectedBg: alpha(get('scale.blue.4'), 0.15), - lineSelectedNumText: get('scale.blue.3'), - lineDtFmText: get('scale.gray.9'), - lineDtFmBg: get('scale.yellow.5'), - gateBg: alpha(get('scale.yellow.6'), 0.15), - gateText: get('scale.gray.2'), - gateWaitingText: get('scale.yellow.3'), - stepHeaderOpenBg: get('scale.gray.8'), - stepErrorText: get('scale.red.3'), - stepWarningText: get('scale.yellow.3'), - loglineText: get('scale.gray.4'), - loglineNumText: alpha(get('scale.gray.4'), 0.75), - loglineDebugText: get('scale.purple.3'), - loglineErrorText: get('scale.gray.2'), - loglineErrorNumText: get('scale.red.3'), - loglineErrorBg: alpha(get('scale.red.6'), 0.15), - loglineWarningText: get('scale.gray.2'), - loglineWarningNumText: get('scale.yellow.3'), - loglineWarningBg: alpha(get('scale.yellow.6'), 0.15), - loglineCommandText: get('scale.blue.3'), - loglineSectionText: get('scale.green.3'), - ansi: { - black: get('scale.gray.9'), - blackBright: get('scale.gray.8'), - white: get('scale.gray.2'), - whiteBright: get('scale.gray.2'), - gray: get('scale.gray.4'), - red: get('scale.red.3'), - redBright: get('scale.red.2'), - green: get('scale.green.3'), - greenBright: get('scale.green.2'), - yellow: get('scale.yellow.3'), - yellowBright: get('scale.yellow.2'), - blue: get('scale.blue.3'), - blueBright: get('scale.blue.2'), - magenta: get('scale.purple.3'), - magentaBright: get('scale.purple.2'), - cyan: '#76e3ea', - cyanBright: '#b3f0ff' - } - }, - project: { - headerBg: get('scale.gray.9'), - sidebarBg: get('scale.white'), - gradientIn: get('scale.white'), - gradientOut: alpha(get('scale.white'), 0) - } -} diff --git a/data/colors/vars/component_dark.ts b/data/colors/vars/component_dark.ts deleted file mode 100644 index f08f901f0..000000000 --- a/data/colors/vars/component_dark.ts +++ /dev/null @@ -1,235 +0,0 @@ -import {alpha, darken, lighten, get} from '../../../src/utils-v1' - -export default { - control: { - borderColor: { - emphasis: '#606771' - } - }, - avatar: { - bg: alpha(get('scale.white'), 0.1), - border: get('border.subtle'), - stackFade: get('scale.gray.6'), - stackFadeMore: get('scale.gray.7'), - childShadow: (theme: any) => `0 0 0 2px ${get('scale.gray.9')(theme)}` - }, - topicTag: { - border: 'transparent' - }, - counter: { - border: 'transparent' - }, - selectMenu: { - backdropBorder: get('scale.gray.5'), - tapHighlight: alpha(get('scale.gray.6'), 0.5), - tapFocusBg: get('scale.blue.8') - }, - overlay: { - shadow: (theme: any) => - `0 0 0 1px ${get('scale.gray.6')(theme)}, 0 16px 32px ${alpha(get('scale.black'), 0.85)(theme)}`, - backdrop: alpha(get('scale.gray.8'), 0.4) - }, - header: { - text: alpha(get('scale.white'), 0.7), - bg: get('scale.gray.8'), - divider: get('scale.gray.3'), - logo: get('scale.gray.0') - }, - headerSearch: { - bg: get('scale.gray.9'), - border: get('scale.gray.6') - }, - sidenav: { - selectedBg: get('scale.gray.7') - }, - menu: { - bgActive: get('scale.gray.8') - }, - input: { - disabledBg: alpha(get('neutral.muted'), 0.5) - }, - diffstat: { - additionBg: get('scale.green.3') - }, - timeline: { - badgeBg: get('scale.gray.7') // needs to be opaque - }, - ansi: { - black: get('scale.gray.5'), - blackBright: get('scale.gray.4'), - white: get('scale.gray.2'), - whiteBright: get('scale.white'), - gray: get('scale.gray.4'), - red: get('scale.red.3'), - redBright: get('scale.red.2'), - green: get('scale.green.3'), - greenBright: get('scale.green.2'), - yellow: get('scale.yellow.3'), - yellowBright: get('scale.yellow.2'), - blue: get('scale.blue.3'), - blueBright: get('scale.blue.2'), - magenta: get('scale.purple.3'), - magentaBright: get('scale.purple.2'), - cyan: '#39c5cf', - cyanBright: '#56d4dd' - }, - btn: { - text: get('scale.gray.1'), - bg: get('scale.gray.7'), - border: get('border.subtle'), - shadow: '0 0 transparent', - insetShadow: '0 0 transparent', - hoverBg: get('scale.gray.6'), - hoverBorder: get('scale.gray.3'), - activeBg: darken(get('scale.gray.6'), 0.03), - activeBorder: get('scale.gray.4'), - selectedBg: get('scale.gray.8'), - counterBg: get('scale.gray.6'), - - primary: { - text: '#ffffff', - bg: get('scale.green.5'), - border: get('border.subtle'), - shadow: '0 0 transparent', - insetShadow: '0 0 transparent', - hoverBg: get('scale.green.4'), - hoverBorder: get('border.subtle'), - selectedBg: get('scale.green.5'), - selectedShadow: '0 0 transparent', - disabledText: alpha(get('scale.white'), 0.5), - disabledBg: alpha(get('scale.green.5'), 0.6), - disabledBorder: get('border.subtle'), - icon: get('scale.white'), - counterBg: alpha(get('scale.green.9'), 0.2) - }, - - outline: { - text: get('scale.blue.4'), - hoverText: get('scale.blue.3'), - hoverBg: get('scale.gray.6'), - hoverBorder: get('border.subtle'), - hoverShadow: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.1)(theme)}`, - hoverInsetShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.03)(theme)}`, - hoverCounterBg: alpha(get('scale.blue.9'), 0.2), - selectedText: get('scale.white'), - selectedBg: get('scale.blue.7'), - selectedBorder: get('border.subtle'), - selectedShadow: '0 0 transparent', - disabledText: alpha(get('scale.blue.3'), 0.5), - disabledBg: get('scale.gray.9'), - disabledCounterBg: alpha(get('scale.blue.5'), 0.05), - counterBg: alpha(get('scale.blue.9'), 0.2), - hoverCounterFg: get('scale.blue.3'), - disabledCounterFg: alpha(get('accent.fg'), 0.5), - counterFg: get('scale.blue.4'), - }, - - danger: { - text: get('scale.red.4'), - hoverText: get('fg.onEmphasis'), - hoverBg: get('scale.red.5'), - hoverBorder: get('scale.red.4'), - hoverShadow: '0 0 transparent', - hoverInsetShadow: '0 0 transparent', - hoverIcon: get('fg.onEmphasis'), - hoverCounterBg: alpha('#fff', 0.2), - selectedText: '#ffffff', - selectedBg: get('scale.red.6'), - selectedBorder: get('scale.red.3'), - selectedShadow: '0 0 transparent', - disabledText: alpha(get('scale.red.4'), 0.5), - disabledBg: get('scale.gray.9'), - disabledCounterBg: alpha(get('scale.red.5'), 0.05), - counterBg: alpha(get('scale.red.9'), 0.2), - icon: get('scale.red.4'), - counterFg: get('danger.fg'), - disabledCounterFg: alpha(get('danger.fg'), 0.5), - hoverCounterFg: get('scale.white') - }, - - inactive: { - bg: get('scale.gray.7'), - text: get('scale.gray.3'), - } - }, - underlinenav: { - icon: get('fg.subtle'), - borderHover: get('neutral.muted') - }, - - actionListItem: { - inlineDivider: alpha(get('border.default'), 0.48), - - default: { - hoverBg: alpha(get('scale.gray.2'), 0.12), - hoverBorder: 'transparent', - activeBg: alpha(get('scale.gray.2'), 0.2), - activeBorder: 'transparent', - selectedBg: alpha(get('scale.gray.2'), 0.08) - }, - danger: { - hoverBg: alpha(get('scale.red.4'), 0.16), - activeBg: alpha(get('scale.red.4'), 0.24), - hoverText: get('scale.red.3') - } - }, - - switchTrack: { - bg: get('neutral.subtle'), - hoverBg: lighten(get('neutral.subtle'), 0.25), - activeBg: get('neutral.muted'), - disabledBg: get('scale.gray.7'), - fg: get('fg.muted'), - disabledFg: get('scale.black'), - border: 'transparent', // TODO: remove this in next major release - - checked: { - bg: alpha(get('scale.blue.5'), 0.35), - hoverBg: alpha(get('scale.blue.5'), 0.5), - activeBg: alpha(get('scale.blue.5'), 0.65), - fg: get('fg.onEmphasis'), - disabledFg: get('scale.black'), - border: 'transparent', // TODO: remove this in next major release - } - }, - - switchKnob: { - bg: get('canvas.default'), - border: '#606771', // control contrast border https://github.com/primer/primitives/pull/485 - disabledBg: get('canvas.subtle'), - - checked: { - bg: get('canvas.default'), // TODO: remove this in next major release - disabledBg: get('canvas.subtle'), // TODO: remove this in next major release - border: alpha(get('scale.blue.5'), 0.35), - } - }, - - segmentedControl: { - bg: get('neutral.subtle'), - - button: { - bg: get('canvas.default'), - hover: { - bg: get('scale.gray.6'), - }, - - active: { - bg: get('scale.gray.7'), - }, - - selected: { - border: get('scale.gray.4'), - }, - }, - }, - - treeViewItem: { - chevron: { - hoverBg: alpha(get('scale.gray.2'), 0.12), - }, - directory: { - fill: get('fg.muted') - } - }, -} diff --git a/data/colors/vars/component_light.ts b/data/colors/vars/component_light.ts deleted file mode 100644 index 6c7bc45b1..000000000 --- a/data/colors/vars/component_light.ts +++ /dev/null @@ -1,236 +0,0 @@ -import {alpha, darken, get} from '../../../src/utils-v1' - -export default { - control: { - borderColor: { - emphasis: '#858F99' - } - }, - avatar: { - bg: get('scale.white'), - border: get('border.subtle'), - stackFade: get('scale.gray.3'), - stackFadeMore: get('scale.gray.2'), - childShadow: (theme: any) => `0 0 0 2px ${alpha(get('scale.white'), 0.8)(theme)}` - }, - topicTag: { - border: 'transparent' - }, - counter: { - border: 'transparent' - }, - selectMenu: { - backdropBorder: 'transparent', - tapHighlight: alpha(get('scale.gray.3'), 0.5), - tapFocusBg: get('scale.blue.1') - }, - overlay: { - shadow: (theme: any) => - `0 1px 3px ${alpha(get('scale.black'), 0.12)(theme)}, 0 8px 24px ${alpha(get('scale.gray.7'), 0.12)(theme)}`, - backdrop: alpha(get('scale.gray.4'), 0.2) - }, - header: { - text: alpha(get('scale.white'), 0.7), - bg: get('scale.gray.9'), - divider: get('scale.gray.6'), - logo: get('scale.white') - }, - headerSearch: { - bg: get('scale.gray.9'), - border: get('scale.gray.6') - }, - sidenav: { - selectedBg: get('scale.white') - }, - menu: { - bgActive: 'transparent' - }, - input: { - disabledBg: get('neutral.muted') - }, - diffstat: { - additionBg: get('success.emphasis') - }, - timeline: { - badgeBg: get('scale.gray.1') // needs to be opaque - }, - ansi: { - black: get('scale.gray.9'), - blackBright: get('scale.gray.6'), - white: get('scale.gray.5'), - whiteBright: get('scale.gray.4'), - gray: get('scale.gray.5'), - red: get('scale.red.5'), - redBright: get('scale.red.6'), - green: get('scale.green.6'), - greenBright: get('scale.green.5'), - yellow: get('scale.yellow.8'), - yellowBright: get('scale.yellow.7'), - blue: get('scale.blue.5'), - blueBright: get('scale.blue.4'), - magenta: get('scale.purple.5'), - magentaBright: get('scale.purple.4'), - cyan: '#1b7c83', - cyanBright: '#3192aa' - }, - // Do we need all these btn variables? - btn: { - text: get('scale.gray.9'), - bg: get('scale.gray.0'), - border: get('border.subtle'), - shadow: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.04)(theme)}`, - insetShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.25)(theme)}`, - hoverBg: '#f3f4f6', - hoverBorder: get('border.subtle'), - activeBg: darken(get('btn.hoverBg'), 0.03), - activeBorder: get('border.subtle'), - selectedBg: darken(get('btn.hoverBg'), 0.02), - counterBg: alpha(get('scale.black'), 0.08), - - primary: { - text: get('scale.white'), - bg: get('success.emphasis'), - border: get('border.subtle'), - shadow: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.1)(theme)}`, - insetShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.03)(theme)}`, - hoverBg: get('scale.green.5'), - hoverBorder: get('border.subtle'), - selectedBg: darken(get('btn.primary.hoverBg'), 0.02), - selectedShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.green.9'), 0.2)(theme)}`, - disabledText: alpha(get('scale.white'), 0.8), - disabledBg: '#94d3a2', - disabledBorder: get('border.subtle'), - icon: alpha(get('scale.white'), 0.8), - counterBg: alpha(get('scale.green.9'), 0.2) - }, - - outline: { - text: get('scale.blue.5'), - hoverText: get('scale.white'), - hoverBg: get('scale.blue.5'), - hoverBorder: get('border.subtle'), - hoverShadow: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.1)(theme)}`, - hoverInsetShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.03)(theme)}`, - hoverCounterBg: alpha(get('scale.white'), 0.2), - selectedText: get('scale.white'), - selectedBg: darken(get('scale.blue.5'), 0.03), - selectedBorder: get('border.subtle'), - selectedShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.blue.9'), 0.2)(theme)}`, - disabledText: alpha(get('scale.blue.5'), 0.5), - disabledBg: get('scale.gray.0'), - disabledCounterBg: alpha(get('scale.blue.5'), 0.05), - counterBg: '#0969da1a', - counterFg: get('scale.blue.6'), - hoverCounterFg: get('scale.white'), - disabledCounterFg: alpha(get('scale.blue.5'), 0.5) - }, - - danger: { - text: get('scale.red.5'), - hoverText: get('scale.white'), - hoverBg: get('scale.red.6'), - hoverBorder: get('border.subtle'), - hoverShadow: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.1)(theme)}`, - hoverInsetShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.03)(theme)}`, - hoverCounterBg: alpha(get('scale.white'), 0.2), - selectedText: get('scale.white'), - selectedBg: darken(get('scale.red.5'), 0.03), - selectedBorder: get('border.subtle'), - selectedShadow: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.red.9'), 0.2)(theme)}`, - disabledText: alpha(get('scale.red.5'), 0.5), - disabledBg: get('scale.gray.0'), - disabledCounterBg: alpha(get('scale.red.5'), 0.05), - counterBg: alpha(get('scale.red.5'), 0.1), - icon: get('scale.red.5'), - hoverIcon: get('scale.white'), - counterFg: get('scale.red.6'), - hoverCounterFg: get('scale.white'), - disabledCounterFg: alpha(get('scale.red.5'), 0.5) - }, - - inactive: { - bg: get('scale.gray.1'), - text: get('scale.gray.6'), - } - }, - underlinenav: { - icon: get('fg.subtle'), - borderHover: get('neutral.muted') - }, - - actionListItem: { - inlineDivider: alpha(get('border.default'), 0.48), - - default: { - hoverBg: alpha(get('scale.gray.2'), 0.32), - hoverBorder: 'transparent', - activeBg: alpha(get('scale.gray.2'), 0.48), - activeBorder: 'transparent', - selectedBg: alpha(get('scale.gray.2'), 0.24) - }, - danger: { - hoverBg: alpha(get('danger.subtle'), 0.64), - activeBg: get('danger.subtle'), - hoverText: get('danger.fg') - } - }, - - switchTrack: { - bg: get('scale.gray.1'), - hoverBg: darken(get('scale.gray.1'), 0.03), - activeBg: darken(get('scale.gray.1'), 0.05), - disabledBg: get('scale.gray.4'), - fg: get('fg.muted'), - disabledFg: get('fg.onEmphasis'), - border: 'transparent', // TODO: remove this in next major release - - checked: { - bg: get('accent.emphasis'), - hoverBg: '#0860CA', // accent-emphasis + scale-blue-7 @ 20% opacity - activeBg: '#0757BA', // accent-emphasis + scale-blue-7 @ 20% opacity - fg: get('fg.onEmphasis'), - disabledFg: get('fg.onEmphasis'), - border: 'transparent', // TODO: remove this in next major release - } - }, - - switchKnob: { - bg: get('canvas.default'), - disabledBg: get('canvas.subtle'), - border: '#858F99', // control contrast border https://github.com/primer/primitives/pull/485 - - checked: { - bg: get('canvas.default'), // TODO: remove this in next major release - disabledBg: get('canvas.subtle'), // TODO: remove this in next major release - border: get('accent.emphasis'), - } - }, - - segmentedControl: { - bg: get('scale.gray.1'), - - button: { - bg: get('canvas.default'), - hover: { - bg: alpha(get('scale.gray.3'), 0.2), - }, - - active: { - bg: alpha(get('scale.gray.3'), 0.4), - }, - - selected: { - border: get('scale.gray.4'), - }, - }, - }, - - treeViewItem: { - chevron: { - hoverBg: alpha(get('scale.gray.2'), 0.32), - }, - directory: { - fill: get('scale.blue.3') - } - }, -} diff --git a/data/colors/vars/deprecated_dark.ts b/data/colors/vars/deprecated_dark.ts deleted file mode 100644 index df3f3863b..000000000 --- a/data/colors/vars/deprecated_dark.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Variables to be removed in a future major release - -export default {} diff --git a/data/colors/vars/deprecated_light.ts b/data/colors/vars/deprecated_light.ts deleted file mode 100644 index 9bc61c0d1..000000000 --- a/data/colors/vars/deprecated_light.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Variables to be removed in the next major release - -export default {} diff --git a/data/colors/vars/global_dark.ts b/data/colors/vars/global_dark.ts deleted file mode 100644 index 5a15a9ebd..000000000 --- a/data/colors/vars/global_dark.ts +++ /dev/null @@ -1,108 +0,0 @@ -import {alpha, get} from '../../../src/utils-v1' - -export default { - fg: { - default: '#e6edf3', - muted: '#848d97', - subtle: get('scale.gray.4'), - onEmphasis: get('scale.white') - }, - canvas: { - default: get('scale.gray.9'), - overlay: get('scale.gray.8'), - inset: get('scale.black'), - subtle: get('scale.gray.8') - }, - border: { - default: get('scale.gray.6'), - muted: get('scale.gray.7'), - subtle: alpha(get('scale.gray.0'), 0.1) - }, - shadow: { - small: '0 0 transparent', - medium: (theme: any) => `0 3px 6px ${get('scale.black')(theme)}`, - large: (theme: any) => `0 8px 24px ${get('scale.black')(theme)}`, - extraLarge: (theme: any) => `0 12px 48px ${get('scale.black')(theme)}` - }, - - // Roles - neutral: { - emphasisPlus: get('scale.gray.4'), - emphasis: get('scale.gray.4'), - muted: alpha(get('scale.gray.4'), 0.4), - subtle: alpha(get('scale.gray.4'), 0.1) - }, - accent: { - fg: '#2f81f7', - emphasis: get('scale.blue.5'), - muted: alpha(get('scale.blue.4'), 0.4), - subtle: alpha(get('scale.blue.4'), 0.1) - }, - success: { - fg: get('scale.green.3'), - emphasis: get('scale.green.5'), - muted: alpha(get('scale.green.4'), 0.4), - subtle: alpha(get('scale.green.4'), 0.15) - }, - attention: { - fg: get('scale.yellow.3'), - emphasis: get('scale.yellow.5'), - muted: alpha(get('scale.yellow.4'), 0.4), - subtle: alpha(get('scale.yellow.4'), 0.15) - }, - severe: { - fg: get('scale.orange.4'), - emphasis: get('scale.orange.5'), - muted: alpha(get('scale.orange.4'), 0.4), - subtle: alpha(get('scale.orange.4'), 0.1) - }, - danger: { - fg: get('scale.red.4'), - emphasis: get('scale.red.5'), - muted: alpha(get('scale.red.4'), 0.4), - subtle: alpha(get('scale.red.4'), 0.1) - }, - open: { - fg: get('scale.green.3'), - emphasis: get('scale.green.5'), - muted: alpha(get('scale.green.4'), 0.4), - subtle: alpha(get('scale.green.4'), 0.15) - }, - closed: { - fg: get('scale.red.4'), - emphasis: get('scale.red.5'), - muted: alpha(get('scale.red.4'), 0.4), - subtle: alpha(get('scale.red.4'), 0.15) - }, - done: { - fg: get('scale.purple.4'), - emphasis: get('scale.purple.5'), - muted: alpha(get('scale.purple.4'), 0.4), - subtle: alpha(get('scale.purple.4'), 0.1) - }, - sponsors: { - fg: get('scale.pink.4'), - emphasis: get('scale.pink.5'), - muted: alpha(get('scale.pink.4'), 0.4), - subtle: alpha(get('scale.pink.4'), 0.1) - }, - - // Only meant for Primer components - primer: { - fg: { - disabled: get('scale.gray.5') - }, - canvas: { - backdrop: alpha(get('scale.black'), 0.8), // use for modal/dialogs - sticky: alpha(get('scale.gray.9'), 0.95) // use for sticky headers - }, - border: { - active: get('scale.coral.3'), - contrast: alpha(get('scale.white'), 0.2) // use to increase contrast - }, - shadow: { - highlight: '0 0 transparent', // top highlight - inset: '0 0 transparent', // top inner shadow - } - } -} diff --git a/data/colors/vars/global_light.ts b/data/colors/vars/global_light.ts deleted file mode 100644 index 428c418ba..000000000 --- a/data/colors/vars/global_light.ts +++ /dev/null @@ -1,108 +0,0 @@ -import {alpha, get, lighten} from '../../../src/utils-v1' - -export default { - fg: { - default: get('scale.black'), - muted: '#656d76', - subtle: get('scale.gray.5'), - onEmphasis: get('scale.white') - }, - canvas: { - default: get('scale.white'), - overlay: get('scale.white'), - inset: get('scale.gray.0'), - subtle: get('scale.gray.0') - }, - border: { - default: get('scale.gray.2'), - muted: lighten(get('scale.gray.2'), 0.03), - subtle: alpha(get('scale.black'), 0.15) - }, - shadow: { - small: (theme: any) => `0 1px 0 ${alpha(get('scale.black'), 0.04)(theme)}`, - medium: (theme: any) => `0 3px 6px ${alpha(get('scale.gray.4'), 0.15)(theme)}`, - large: (theme: any) => `0 8px 24px ${alpha(get('scale.gray.4'), 0.2)(theme)}`, - extraLarge: (theme: any) => `0 12px 28px ${alpha(get('scale.gray.4'), 0.3)(theme)}` - }, - - // Roles - neutral: { - emphasisPlus: get('scale.gray.9'), - emphasis: get('scale.gray.5'), - muted: alpha(get('scale.gray.3'), 0.2), - subtle: alpha(get('scale.gray.1'), 0.5) - }, - accent: { - fg: get('scale.blue.5'), - emphasis: get('scale.blue.5'), - muted: alpha(get('scale.blue.3'), 0.4), - subtle: get('scale.blue.0') - }, - success: { - fg: get('scale.green.5'), - emphasis: '#1f883d', - muted: alpha(get('scale.green.3'), 0.4), - subtle: get('scale.green.0') - }, - attention: { - fg: get('scale.yellow.5'), - emphasis: get('scale.yellow.5'), - muted: alpha(get('scale.yellow.3'), 0.4), - subtle: get('scale.yellow.0') - }, - severe: { - fg: get('scale.orange.5'), - emphasis: get('scale.orange.5'), - muted: alpha(get('scale.orange.3'), 0.4), - subtle: get('scale.orange.0') - }, - danger: { - fg: '#d1242f', - emphasis: get('scale.red.5'), - muted: alpha(get('scale.red.3'), 0.4), - subtle: get('scale.red.0') - }, - open: { - fg: get('scale.green.5'), - emphasis: get('success.emphasis'), - muted: alpha(get('scale.green.3'), 0.4), - subtle: get('scale.green.0') - }, - closed: { - fg: get('danger.fg'), - emphasis: get('scale.red.5'), - muted: alpha(get('scale.red.3'), 0.4), - subtle: get('scale.red.0') - }, - done: { - fg: get('scale.purple.5'), - emphasis: get('scale.purple.5'), - muted: alpha(get('scale.purple.3'), 0.4), - subtle: get('scale.purple.0') - }, - sponsors: { - fg: get('scale.pink.5'), - emphasis: get('scale.pink.5'), - muted: alpha(get('scale.pink.3'), 0.4), - subtle: get('scale.pink.0') - }, - - // Only meant to be used by Primer components - primer: { - fg: { - disabled: get('scale.gray.4') - }, - canvas: { - backdrop: alpha(get('scale.black'), 0.5), // use for modal/dialogs - sticky: alpha(get('scale.white'), 0.95) // use for sticky headers - }, - border: { - active: get('scale.coral.3'), - contrast: alpha(get('scale.black'), 0.1) // use to increase contrast - }, - shadow: { - highlight: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.white'), 0.25)(theme)}`, // top highlight - inset: (theme: any) => `inset 0 1px 0 ${alpha(get('scale.gray.2'), 0.2)(theme)}`, // top inner shadow - } - } -} diff --git a/data/colors/vars/marketing_dark.ts b/data/colors/vars/marketing_dark.ts deleted file mode 100644 index 7ca43ad58..000000000 --- a/data/colors/vars/marketing_dark.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - mktg: { - btn: { - bg: '#f6f8fa', - shadow: { - outline: 'rgb(255 255 255 / 25%) 0 0 0 1px inset', - focus: 'rgb(255 255 255 / 25%) 0 0 0 4px', - hover: '0 4px 7px rgba(0, 0, 0, 0.15), 0 100px 80px rgba(255, 255, 255, 0.02), 0 42px 33px rgba(255, 255, 255, 0.024), 0 22px 18px rgba(255, 255, 255, 0.028), 0 12px 10px rgba(255, 255, 255, 0.034), 0 7px 5px rgba(255, 255, 255, 0.04), 0 3px 2px rgba(255, 255, 255, 0.07)', - hoverMuted: 'rgb(255 255 255) 0 0 0 2px inset' - }, - } - } -} diff --git a/data/colors/vars/marketing_light.ts b/data/colors/vars/marketing_light.ts deleted file mode 100644 index 33a7d6585..000000000 --- a/data/colors/vars/marketing_light.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default { - mktg: { - btn: { - bg: '#1b1f23', - shadow: { - outline: 'rgb(0 0 0 / 15%) 0 0 0 1px inset', - focus: 'rgb(0 0 0 / 15%) 0 0 0 4px', - hover: '0 3px 2px rgba(0, 0, 0, 0.07), 0 7px 5px rgba(0, 0, 0, 0.04), 0 12px 10px rgba(0, 0, 0, 0.03), 0 22px 18px rgba(0, 0, 0, 0.03), 0 42px 33px rgba(0, 0, 0, 0.02), 0 100px 80px rgba(0, 0, 0, 0.02)', - hoverMuted: 'rgb(0 0 0 / 70%) 0 0 0 2px inset' - }, - } - } -} diff --git a/data/spacing/index.ts b/data/spacing/index.ts deleted file mode 100644 index a97d7f3f1..000000000 --- a/data/spacing/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - normal: { - spacer: ['0', '4px', '8px', '16px', '24px', '32px', '40px'] - } -} diff --git a/data/typography/index.ts b/data/typography/index.ts deleted file mode 100644 index 4d51f0818..000000000 --- a/data/typography/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default { - normal: { - fontSize: ['12px', '14px', '16px', '20px', '24px', '32px', '40px', '48px'], - lineHeight: { - condensedUltra: 1, - condensed: 1.25, - default: 1.5 - } - } -} diff --git a/package-lock.json b/package-lock.json index e396f198b..1c8b287ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,7 @@ "@changesets/cli": "^2.27.1", "@github/prettier-config": "^0.0.6", "@playwright/test": "^1.43.0", - "@types/flat": "^5.0.1", "@types/jest": "^29.5.2", - "@types/lodash": "^4.14.195", "@types/node": "^20.4.0", "@typescript-eslint/eslint-plugin": "^5.61.0", "@typescript-eslint/parser": "^5.61.0", @@ -35,13 +33,10 @@ "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.4.0", "eslint-plugin-storybook": "^0.6.15", - "flat": "^5.0.2", "husky": "^9.0.11", "jest": "^29.6.1", "json5": "^2.2.1", - "lodash": "^4.17.20", "markdown-table-ts": "^1.0.3", - "mkdirp": "^3.0.1", "prettier": "^2.7.1", "style-dictionary": "^3.9.2", "ts-jest": "^29.1.2", @@ -2455,12 +2450,6 @@ "@types/estree": "*" } }, - "node_modules/@types/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@types/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-3zsplnP2djeps5P9OyarTxwRpMLoe5Ash8aL9iprw0JxB+FAHjY+ifn4yZUuW4/9hqtnmor6uvjSRzJhiVbrEQ==", - "dev": true - }, "node_modules/@types/graceful-fs": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", @@ -2531,12 +2520,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/lodash": { - "version": "4.14.195", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", - "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", - "dev": true - }, "node_modules/@types/mdast": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", @@ -5503,15 +5486,6 @@ "pkg-dir": "^4.2.0" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -9904,21 +9878,6 @@ "node": ">= 8.0.0" } }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", diff --git a/package.json b/package.json index d1840ba90..aa5552e10 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,6 @@ "src/**/*", "!src/**/*.test.ts" ], - "main": "dist/js/index.js", - "types": "dist/js/index.d.ts", "repository": "https://github.com/primer/primitives", "keywords": [ "primitives", @@ -28,7 +26,6 @@ }, "homepage": "https://github.com/primer/primitives#readme", "scripts": { - "build": "ts-node ./scripts/build.ts && tsc --project tsconfig.build.json", "build:next": "npm run build:v8 && npm run build:fallbacks && npm run build:figma", "build:v8": "ts-node ./scripts/buildTokens.ts", "build:fallbacks": "ts-node ./scripts/buildFallbacks.ts", @@ -46,7 +43,7 @@ "prebuild": "rm -rf dist", "prebuild:tokens": "rm -rf tokens-v2-private", "prebuild:next": "rm -rf dist", - "prepack": "npm run build && npm run build:tokens && npm run build:next", + "prepack": "npm run build:tokens && npm run build:next", "prepare": "husky", "release": "changeset publish", "start:storybook": "npm run build:next && cd docs/storybook && npm run storybook", @@ -60,9 +57,7 @@ "@changesets/cli": "^2.27.1", "@github/prettier-config": "^0.0.6", "@playwright/test": "^1.43.0", - "@types/flat": "^5.0.1", "@types/jest": "^29.5.2", - "@types/lodash": "^4.14.195", "@types/node": "^20.4.0", "@typescript-eslint/eslint-plugin": "^5.61.0", "@typescript-eslint/parser": "^5.61.0", @@ -81,13 +76,10 @@ "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.4.0", "eslint-plugin-storybook": "^0.6.15", - "flat": "^5.0.2", "husky": "^9.0.11", "jest": "^29.6.1", "json5": "^2.2.1", - "lodash": "^4.17.20", "markdown-table-ts": "^1.0.3", - "mkdirp": "^3.0.1", "prettier": "^2.7.1", "style-dictionary": "^3.9.2", "ts-jest": "^29.1.2", diff --git a/scripts/build.ts b/scripts/build.ts deleted file mode 100644 index 98cf6c950..000000000 --- a/scripts/build.ts +++ /dev/null @@ -1,286 +0,0 @@ -import camelcaseKeys from 'camelcase-keys' -import fs from 'fs' -import {mkdirp} from 'mkdirp' -import path from 'path' -import ModeCollection from './lib/mode-collection' -import VariableCollection, {getFullName} from './lib/variable-collection' - -interface Skip { - type: string - name: string -} - -let SKIP: Skip[] = (process.env['PRIMER_SKIP'] || '').split(',').map(skip => { - const [type, name] = skip.split('/') - return {type, name} -}) - -const dataDir = path.join(__dirname, '..', 'data') -const outDir = path.join(__dirname, '..', 'dist') - -const scssDir = path.join(outDir, 'scss') -const tsDir = path.join(outDir, 'ts') -const jsonDir = path.join(outDir, 'json') -const deprecatedDir = path.join(outDir, 'deprecated') -const removedDir = path.join(outDir, 'removed') - -async function build() { - const modeTypes = fs.readdirSync(dataDir) - - for (const type of modeTypes) { - const toSkip = SKIP.filter(skip => skip.type === type).map(skip => skip.name) - let collection = await getModeCollectionForType(type, toSkip) - - const {isValid, errors} = collection.validate() - if (!isValid) { - logError(errors.join('\n')) - process.exit(1) - } - - await writeModeOutput(collection) - } - - await writeMainTsIndex(modeTypes) -} - -async function getModeCollectionForType(type: string, toSkip: string[]): Promise { - let prefix = type - const prefixFile = path.join(dataDir, type, 'prefix') - if (fs.existsSync(prefixFile)) { - prefix = fs.readFileSync(prefixFile, 'utf8').trim() - } - - const collection = new ModeCollection(type, prefix) - - const indexFile = path.join(dataDir, type, 'index.ts') - - // TODO: log error if file doesn't exist - if (fs.existsSync(indexFile)) { - // TODO: check that modes is an object - const {default: modes} = require(indexFile) - - for (const mode in modes) { - if (toSkip.includes(mode)) { - continue - } - - const vars = new VariableCollection(mode, prefix, null) - vars.addFromObject(modes[mode]) - collection.add(mode, vars) - } - } - - collection.finalize() - return collection -} - -async function writeModeOutput(collection: ModeCollection): Promise { - writeScssOutput(collection) - writeTsOutput(collection) - writeJsonOutput(collection) - - writeTsTypeIndex(collection) - - writeReplacements('deprecated.json', deprecatedDir, collection, validateDeprecatedVar) - writeReplacements('removed.json', removedDir, collection, validateRemovedVar) -} - -async function writeScssOutput(collection: ModeCollection): Promise { - for (const [_name, vars] of collection) { - let output = `@mixin primer-${collection.type}-${vars.name} {\n` - output += ' & {\n' - for (const variable of vars) { - output += ` --${variable.name}: ${variable.value};\n` - } - output += ' }\n}\n' - - const dir = path.join(scssDir, collection.type) - await mkdirp(dir) - fs.writeFileSync(path.join(dir, `_${vars.name}.scss`), output) - } -} - -async function writeTsOutput(collection: ModeCollection): Promise { - for (const [_name, vars] of collection) { - let output = JSON.stringify(camelcaseKeys(vars.tree(), {deep: true}), null, ' ') - output = `export default ${output}` - - const dir = path.join(tsDir, collection.type) - await mkdirp(dir) - fs.writeFileSync(path.join(dir, `${vars.name}.ts`), output) - } -} - -async function writeJsonOutput(collection: ModeCollection): Promise { - for (const [_name, vars] of collection) { - let output = JSON.stringify(camelcaseKeys(vars.tree(), {deep: true}), null, ' ') - - const dir = path.join(jsonDir, collection.type) - await mkdirp(dir) - fs.writeFileSync(path.join(dir, `${vars.name}.json`), output) - } -} - -async function writeTsTypeIndex(collection: ModeCollection) { - let output = '' - const modules = [...collection.modes.keys()] - for (const mod of modules) { - output += `import ${mod} from './${mod}'\n` - } - output += `export default { ${modules.join(', ')} }` - - const dir = path.join(tsDir, collection.type) - await mkdirp(dir) - fs.writeFileSync(path.join(dir, `index.ts`), output) -} - -async function writeMainTsIndex(types: string[]) { - let output = '' - for (const type of types) { - output += `import ${type} from './${type}'\n` - } - output += `export default { ${types.join(', ')} }` - - const dir = path.join(tsDir) - await mkdirp(dir) - fs.writeFileSync(path.join(dir, `index.ts`), output) -} - -if (require.main === module) { - build() - .then(() => console.log('✨ Built mode data 🎉')) - .catch(err => console.error(err)) -} - -/** - * Validates a deprecated variable. - * @returns Array of error messages. If the returned array is empty, the variable is valid. - */ -function validateDeprecatedVar(variable: string, collection: ModeCollection, inputFile: string) { - const errors = [] - - // Assert that deprecated variable exists - if (!existsInCollection(collection, variable)) { - errors.push(`Cannot deprecate undefined variable \x1b[1;31m"${variable}"\x1b[0m in \x1b[1;37m${inputFile}\x1b[0m`) - } - - return errors -} - -/** - * Validates a removed variable. - * @returns Array of error messages. If the returned array is empty, the variable is valid. - */ -function validateRemovedVar(variable: string, collection: ModeCollection, inputFile: string) { - const errors = [] - - // Assert that removed variable doesn't exist - if (existsInCollection(collection, variable)) { - errors.push( - `Variable \x1b[1;31m"${variable}"\x1b[0m is marked as removed in \x1b[1;37m${inputFile}\x1b[0m but is still defined`, - ) - } - - return errors -} - -async function writeReplacements( - inputFilename: string, - outputDir: string, - collection: ModeCollection, - // Function to validate a variable (e.g. deprecated variable or removed variable). - // Returns an array of error messages. If the returned array is empty, the variable is valid. - validateVar: (variable: string, collection: ModeCollection, inputFile: string) => any[], -) { - const inputFile = path.join(dataDir, collection.type, inputFilename) - - // Do nothing if deprecated file doesn't exist - if (!fs.existsSync(inputFile)) { - return - } - - try { - // Parse input file - const replacementMap = JSON.parse(fs.readFileSync(inputFile, 'utf8')) - - // Validations - const errors = [] - for (const [original, replacement] of Object.entries(replacementMap)) { - errors.push(...validateVar(original, collection, inputFile)) - - // We expect `replacement` to be a variable name, an array of variable names, or null - forEachReplacementVar(replacement, replacementVar => { - // Assert that replacement variable is a string - if (typeof replacementVar !== 'string') { - errors.push( - `Cannot replace "${original}" with invalid variable {bold.red ${JSON.stringify( - replacementVar, - )}} in {bold ${inputFile}}`, - ) - return - } - - // Assert that replacement variable exists - if (!existsInCollection(collection, replacementVar)) { - errors.push( - `Cannot replace "${original}" with undefined variable {bold.red ${JSON.stringify( - replacementVar, - )}} in {bold ${inputFile}}`, - ) - return - } - - // Assert that replacement variable is not deprecated - if (Object.keys(replacementMap).includes(replacementVar)) { - errors.push( - `Cannot replace "${original}" with deprecated variable {bold.red ${JSON.stringify( - replacementVar, - )}} in {bold ${inputFile}}`, - ) - return - } - }) - } - - if (errors.length === 0) { - // Write replacements - await mkdirp(outputDir) - fs.writeFileSync(path.join(outputDir, `${collection.type}.json`), JSON.stringify(replacementMap, null, ' ')) - } else { - throw new Error(errors.join('\n')) - } - } catch (error) { - if (error instanceof TypeError) { - logError(error.message) - } - - process.exit(1) - } -} - -/** Checks if a variable exists in a collection. Assumes variable name uses dot notation (e.g. `text.primary`) */ -function existsInCollection(collection: ModeCollection, name: string) { - const varName = getFullName(collection.prefix, name.split('.')) - return Array.from(collection.modes.values()).some(mode => Boolean(mode.getByName(varName))) -} - -function forEachReplacementVar(replacement: any, fn: (replacementVar: any) => void) { - if (replacement === null) { - return - } - - if (Array.isArray(replacement)) { - for (const replacementVar of replacement) { - fn(replacementVar) - } - } else { - fn(replacement) - } -} - -function logError(error: string) { - console.error(`\x1b[0;31m\n===============================================\x1b`) - console.error(`\x1b[0;31m[FATAL]\x1b[0m The build failed due to the following errors:`) - console.error(error) - console.error(`\x1b[0;31m===============================================\n\x1b`) -} diff --git a/scripts/lib/mode-collection.ts b/scripts/lib/mode-collection.ts deleted file mode 100644 index bf1b25732..000000000 --- a/scripts/lib/mode-collection.ts +++ /dev/null @@ -1,100 +0,0 @@ -import flatMap from 'lodash/flatMap' -import isNumber from 'lodash/isNumber' -import isString from 'lodash/isString' -import VariableCollection, {ModeVariable} from './variable-collection' - -export default class ModeCollection { - public readonly type: string - public readonly prefix: string - public readonly modes: Map = new Map() - - constructor(type: string, prefix: string) { - this.type = type - this.prefix = prefix - } - - public add(modeName: string, vars: VariableCollection) { - this.modes.set(modeName, vars) - } - - public validate(): {isValid: boolean; errors: string[]} { - const errors = [] - - // Ensure that every mode in this collection has the same variables defined - const missingVarsPerMode = this.getMissingVarsPerMode() - if (missingVarsPerMode.length > 0) { - errors.push(`\n> The following variables are missing in one or more modes:\n`) - for (const {modes, variableName} of missingVarsPerMode) { - const msg = `* Variable \x1b[1;31m${variableName}\x1b[0m is missing in modes: ${modes - .map(mode => mode.name) - .join(', ')}` - errors.push(msg) - } - } - - // Ensure that all variables variables are defined - const invalidVars = this.getInvalidVars() - if (invalidVars.length > 0) { - errors.push(`\n> The following variables are invalid:\n`) - - for (const {variable, mode} of invalidVars) { - const msg = `* \x1b[1;31m${variable.value}\x1b[0m cannot be assigned to \x1b[1;37m${variable.name}\x1b[0m in mode \x1b[1;30;47m${mode.name}\x1b[0m ` - errors.push(msg) - } - - errors.push(`\nCheck to make sure variable references do not create an infinite loop.`) - } - - return {isValid: errors.length === 0, errors} - } - - public [Symbol.iterator]() { - return this.modes[Symbol.iterator]() - } - - public finalize() { - for (const key of this.modes.keys()) { - const mode = this.modes.get(key)! - if (mode.parent) { - const parentMode = this.modes.get(mode.parent)! - mode.merge(parentMode) - } - } - } - - private getMissingVarsPerMode(): {modes: VariableCollection[]; variableName: string}[] { - if (this.modes.size === 1) { - return [] - } - - const result: {modes: VariableCollection[]; variableName: string}[] = [] - const modes = [...this.modes.values()] - - const allVarNames = flatMap(modes, mode => { - return mode.flattened().map(v => v.name) - }) - const uniqueVarNames = [...new Set(allVarNames)].sort() - - for (const v of uniqueVarNames.values()) { - const missingModes = modes.filter(mode => mode.getByName(v) === undefined) - if (missingModes.length > 0) { - result.push({modes: missingModes, variableName: v}) - } - } - - return result - } - - private getInvalidVars(): {mode: VariableCollection; variable: ModeVariable}[] { - const result: {mode: VariableCollection; variable: ModeVariable}[] = [] - - for (const [_name, mode] of this.modes) { - const invalidVars = mode.flattened().filter(v => !(isNumber(v.value) || isString(v.value))) - for (const v of invalidVars) { - result.push({mode, variable: v}) - } - } - - return result - } -} diff --git a/scripts/lib/variable-collection.ts b/scripts/lib/variable-collection.ts deleted file mode 100644 index e4b7110c8..000000000 --- a/scripts/lib/variable-collection.ts +++ /dev/null @@ -1,108 +0,0 @@ -import flatten from 'flat' -import isString from 'lodash/isString' -import kebabCase from 'lodash/kebabCase' -import set from 'lodash/set' -import {resolveValue} from '../../src/utils-v1' - -type PathItem = string | number - -export interface ModeVariable { - name: string - path: PathItem[] - value: any -} - -export function getFullName(prefix: string, path: PathItem[]) { - return [prefix, ...path].map(value => (isString(value) ? kebabCase(value) : value)).join('-') -} - -export default class VariableCollection { - public readonly name: string - public readonly prefix: string - public readonly parent: string | null - private data: Map = new Map() - - constructor(name: string, prefix: string, parent: string | null) { - this.name = name - this.prefix = prefix - this.parent = parent - } - - public addFromObject(data: Record) { - const flattened: Record = flatten(data) - - for (const [key, value] of Object.entries(flattened)) { - const path = key.split('.') - this.add(path, value) - } - } - - public add(path: PathItem[], value: any) { - if (Array.isArray(value)) { - for (const idx in value) { - const newPath = [...path, idx] - this.add(newPath, value[idx]) - } - - return - } - - const fullName = getFullName(this.prefix, path) - - if (value === 'transparent') { - value = 'rgba(0,0,0,0)' - } - - const variable: ModeVariable = {name: fullName, path, value} - - this.data.set(fullName, variable) - } - - public merge(other: VariableCollection) { - for (const modeVar of other.flattened()) { - if (!this.data.has(modeVar.name)) { - this.add(modeVar.path, modeVar.value) - } - } - } - - public flattened(): ReadonlyArray { - const tree = this.unresolvedTree() - return [...this.data.values()].map(variable => { - return { - ...variable, - value: resolveValue(variable.value, tree), - } - }) - } - - public getByName(fullName: string): ModeVariable | undefined { - return this.data.get(fullName) - } - - public tree(): Readonly> { - let output = {} as Record - - const tree = this.unresolvedTree() - for (const variable of this.data.values()) { - const value = resolveValue(variable.value, tree) - set(output, variable.path, value) - } - - return output - } - - public [Symbol.iterator]() { - return this.flattened()[Symbol.iterator]() - } - - private unresolvedTree(): Readonly> { - let output = {} as Record - - for (const variable of this.data.values()) { - set(output, variable.path, variable.value) - } - - return output - } -} diff --git a/src/utils-v1.ts b/src/utils-v1.ts deleted file mode 100644 index 0049fc306..000000000 --- a/src/utils-v1.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {lighten as _lighten, transparentize, darken as _darken} from 'color2k' -import deepmerge from 'deepmerge' -import _get from 'lodash/get' -import isFunction from 'lodash/isFunction' - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type Value = string | ((obj: any) => string) - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function resolveValue(value: Value, obj: any): string { - return isFunction(value) ? resolveValue(value(obj), obj) : value -} - -export function merge(...objects: object[]) { - return deepmerge.all(objects, {arrayMerge: (target, source) => source}) -} - -export function get(path: string) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return (obj: any) => _get(obj, path) -} - -export function alpha(value: Value, amount: number) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return (obj: any) => transparentize(resolveValue(value, obj), 1 - amount).replace(/ /g, '') -} - -export function lighten(value: Value, amount: number) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return (obj: any) => _lighten(resolveValue(value, obj), amount).replace(/ /g, '') -} - -export function darken(value: Value, amount: number) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return (obj: any) => _darken(resolveValue(value, obj), amount).replace(/ /g, '') -} diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index ed1ec6852..000000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2016", - "module": "commonjs", - "lib": ["ES2019.Array", "ES2019.Object"], - "moduleResolution": "node", - "esModuleInterop": true, - "strict": true, - "noImplicitAny": true, - "typeRoots": ["./src/@types", "./node_modules/@types"], - "rootDir": "./dist/ts", - "outDir": "./dist/js", - "declaration": true, - "resolveJsonModule": true - }, - "include": [ - "./dist/ts/" - // "./index.ts", - // "./primitives", - // "./theme", - // "./src" - ], - "exclude": ["./src/@types"] -}