Skip to content

Commit

Permalink
fix: patch theme (#5469)
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio authored Oct 23, 2023
2 parents 3aa261b + 31ee9f6 commit 1c0bcc5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 49 deletions.
3 changes: 2 additions & 1 deletion packages/components/src/utils/prop.validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import rgba from 'rgba-convert';
import { Subject } from 'rxjs';
import { hex, score } from 'wcag-contrast';

import { Generic, patchTheme } from '@a11y-ui/core';
import { Generic, patchTheme, patchThemeTag } from '@a11y-ui/core';

import { Stringified } from '../types/common';
import { AriaCurrentPropType } from '../types/props/aria-current';
Expand Down Expand Up @@ -486,6 +486,7 @@ export const ariaCurrentSubject = new Subject<AriaCurrentEventType>();

export class KoliBriDevHelper {
public static readonly patchTheme = patchTheme;
public static readonly patchThemeTag = patchThemeTag;
public static readonly querySelector = koliBriQuerySelector;
public static readonly querySelectorAll = koliBriQuerySelectorAll;
public static readonly stringifyJson = stringifyJson;
Expand Down
6 changes: 4 additions & 2 deletions packages/designer/src/components/editor/css-style.editor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { editor, KeyCode } from 'monaco-editor';
import { format } from 'prettier';
import parserCss from 'prettier/esm/parser-postcss.mjs';
import { KoliBriDevHelper } from '@public-ui/components';
// import { KoliBriDevHelper } from '@public-ui/components';
import { Generic, patchThemeTag } from '@a11y-ui/core';
import { storeThemes } from '../../shares/theme';

/**
Expand Down Expand Up @@ -39,7 +40,8 @@ export const createCssEditor = (model: editor.ITextModel, ref: HTMLElement, tagN
model.updateOptions({
tabSize: 2,
});
KoliBriDevHelper.patchThemeTag(theme, tagName, css);
// KoliBriDevHelper.patchThemeTag(theme, tagName, css);
patchThemeTag(theme, tagName as Generic.Theming.Props<string, string>, css);
storeThemes();
setSignal(() => false);
const timeout = setTimeout(() => {
Expand Down
92 changes: 46 additions & 46 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c0bcc5

Please sign in to comment.