diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml
index 7b8bc111..7c5a8909 100644
--- a/.github/workflows/pull_requests.yml
+++ b/.github/workflows/pull_requests.yml
@@ -177,7 +177,7 @@ jobs:
run: npm ci
- name: Build and Publish to Chromatic
- uses: chromaui/action@v1
+ uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: 'build'
diff --git a/lerna.json b/lerna.json
index c7772e76..5adf6dde 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "packages": ["system/*", "website"],
+ "packages": ["system/*"],
"version": "independent",
"command": {
"publish": {
diff --git a/package-lock.json b/package-lock.json
index ef8b0667..be5f41f8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -54907,12 +54907,12 @@
"@storybook/theming": "7.0.0-rc.4",
"@tablecheck/babel-preset": "1.1.0",
"@tablecheck/locales": "1.1.1",
- "@tablecheck/tablekit-core": "^2",
- "@tablecheck/tablekit-css": "^2",
- "@tablecheck/tablekit-react": "^2",
- "@tablecheck/tablekit-react-css": "^2",
- "@tablecheck/tablekit-react-datepicker": "^2",
- "@tablecheck/tablekit-react-select": "^2",
+ "@tablecheck/tablekit-core": "^3",
+ "@tablecheck/tablekit-css": "^3",
+ "@tablecheck/tablekit-react": "^3",
+ "@tablecheck/tablekit-react-css": "^3",
+ "@tablecheck/tablekit-react-datepicker": "^3",
+ "@tablecheck/tablekit-react-select": "^3",
"@vitejs/plugin-react": "3.1.0",
"chokidar": "3.5.3",
"concurrently": "8.2.2",
@@ -55721,84 +55721,6 @@
"url": "https://opencollective.com/storybook"
}
},
- "system/stories/node_modules/@tablecheck/tablekit-core": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-core/-/tablekit-core-2.0.1.tgz",
- "integrity": "sha512-kdofXb0wKnPNqGvfBY4zTNmR+qBKHC4yekQSwbI+AGQ8hyIigD7tXbPyTLWlDuagPmw5t4edUsWIJOCHAgJFVA==",
- "dev": true,
- "dependencies": {
- "csstype": "3.1.1"
- }
- },
- "system/stories/node_modules/@tablecheck/tablekit-css": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-css/-/tablekit-css-2.0.1.tgz",
- "integrity": "sha512-Ob0foSYbRYTwrHanUFvxMUJX7CaFC5L1jCS6W5BRNvqRKRuHZ9sc09IdOj+6Vf1mJY0ZUCjroBwQYhfColTclQ==",
- "dev": true
- },
- "system/stories/node_modules/@tablecheck/tablekit-react": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-react/-/tablekit-react-2.0.1.tgz",
- "integrity": "sha512-SeQ9ZQp1azrLeFUiImfhiWVSaRc73qtZJzo2T72Rw5On4fdSR0WHVMOMWkp1ak+ggqtkumykBC326e2jsSHyhA==",
- "dev": true,
- "dependencies": {
- "@tablecheck/tablekit-core": "^2.0.1"
- },
- "peerDependencies": {
- "@carbon/icons-react": "11",
- "@emotion/react": "11",
- "@emotion/styled": "11",
- "react": ">=17",
- "react-dom": ">=17"
- }
- },
- "system/stories/node_modules/@tablecheck/tablekit-react-css": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-react-css/-/tablekit-react-css-2.0.1.tgz",
- "integrity": "sha512-nNUEJAzv1plqRUXkmaMLQ4CFdOaXN/Cjyq40IwD52dLjELHLfzxkIX4EmZTA7CrAKb/wEtYSCxgZYllutFJKxw==",
- "dev": true,
- "dependencies": {
- "@tablecheck/tablekit-core": "^2.0.1",
- "@tablecheck/tablekit-css": "^2.0.1"
- },
- "peerDependencies": {
- "@carbon/icons-react": "11",
- "react": ">=17",
- "react-dom": ">=17"
- }
- },
- "system/stories/node_modules/@tablecheck/tablekit-react-datepicker": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-react-datepicker/-/tablekit-react-datepicker-2.0.1.tgz",
- "integrity": "sha512-m6DBSRhRvgX/uzZOfZdRfGsf1DB6ZVlNHsnF/nuvrJz2xukar/O9NIwwVvnQ+qYigQtWS+FsgsQHQmYqOnrQBw==",
- "dev": true,
- "peerDependencies": {
- "@carbon/icons-react": "^11",
- "@emotion/react": "^11",
- "@emotion/styled": "^11",
- "@tablecheck/tablekit-react": "*",
- "date-fns": "2.x.x",
- "dayzed": "3.x.x",
- "react": ">=17",
- "react-dom": ">=17"
- }
- },
- "system/stories/node_modules/@tablecheck/tablekit-react-select": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@tablecheck/tablekit-react-select/-/tablekit-react-select-2.0.1.tgz",
- "integrity": "sha512-EZYkWjZpEOgt1mOPw7m1MzkQ9NYDaeM+2fy45382/vJPNI5uBmKXWyparh2WV12+QP3wcEZU9mn5GtDe+JADyQ==",
- "dev": true,
- "peerDependencies": {
- "@carbon/icons-react": "^11",
- "@emotion/react": "^11",
- "@emotion/styled": "^11",
- "@tablecheck/tablekit-core": "*",
- "@tablecheck/tablekit-react": "*",
- "react": ">=17",
- "react-dom": ">=17",
- "react-select": "^5"
- }
- },
"system/stories/node_modules/@types/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz",
diff --git a/system/core/scripts/updateFromFigma.mjs b/system/core/scripts/updateFromFigma.mjs
index a6ed4dcd..5a0f89af 100644
--- a/system/core/scripts/updateFromFigma.mjs
+++ b/system/core/scripts/updateFromFigma.mjs
@@ -112,8 +112,23 @@ Object.keys(colorVars).forEach((groupKey) => {
groupKey === 'light' ? textSecondary[1] : text[1]
]);
}
+ if (groupKey === 'light') {
+ colorVars[groupKey].push([
+ 'surface-raised-active-text',
+ 'var(--brand-primary)'
+ ]);
+ }
+ if (groupKey === 'dark') {
+ colorVars[groupKey].push([
+ 'surface-raised-active-text',
+ 'var(--brand-primary-text)'
+ ]);
+ }
colorVars[groupKey] = _.sortBy(colorVars[groupKey], '0').map(
- ([name, value]) => [name, hexToRgba(value)]
+ ([name, value]) => [
+ name,
+ value.startsWith('var(') ? value : hexToRgba(value)
+ ]
);
});
diff --git a/system/core/src/themeVariables/theme.ts b/system/core/src/themeVariables/theme.ts
index 5a8a6bec..9032ae1b 100644
--- a/system/core/src/themeVariables/theme.ts
+++ b/system/core/src/themeVariables/theme.ts
@@ -69,6 +69,7 @@ export const lightColors = css`
--surface-low-hover-transparent: rgba(0, 0, 0, 0.03);
--surface-raised: rgba(249, 249, 249, 1);
--surface-raised-active: rgba(243, 242, 255, 1);
+ --surface-raised-active-text: var(--brand-primary);
--surface-raised-hover: rgba(247, 247, 247, 1);
--surface-raised-hover-transparent: rgba(0, 0, 0, 0.03);
--surface-secondary: rgba(41, 41, 41, 1);
@@ -139,6 +140,7 @@ export const lightColorsObject = {
'surface-low-hover-transparent': 'rgba(0, 0, 0, 0.03)',
'surface-raised': 'rgba(249, 249, 249, 1)',
'surface-raised-active': 'rgba(243, 242, 255, 1)',
+ 'surface-raised-active-text': 'var(--brand-primary)',
'surface-raised-hover': 'rgba(247, 247, 247, 1)',
'surface-raised-hover-transparent': 'rgba(0, 0, 0, 0.03)',
'surface-secondary': 'rgba(41, 41, 41, 1)',
@@ -210,6 +212,7 @@ export const darkColors = css`
--surface-low-hover-transparent: rgba(255, 255, 255, 0.05);
--surface-raised: rgba(41, 41, 41, 1);
--surface-raised-active: rgba(76, 68, 92, 1);
+ --surface-raised-active-text: var(--brand-primary-text);
--surface-raised-hover: rgba(75, 75, 75, 1);
--surface-raised-hover-transparent: rgba(255, 255, 255, 0.2);
--surface-secondary: rgba(75, 75, 75, 1);
@@ -280,6 +283,7 @@ export const darkColorsObject = {
'surface-low-hover-transparent': 'rgba(255, 255, 255, 0.05)',
'surface-raised': 'rgba(41, 41, 41, 1)',
'surface-raised-active': 'rgba(76, 68, 92, 1)',
+ 'surface-raised-active-text': 'var(--brand-primary-text)',
'surface-raised-hover': 'rgba(75, 75, 75, 1)',
'surface-raised-hover-transparent': 'rgba(255, 255, 255, 0.2)',
'surface-secondary': 'rgba(75, 75, 75, 1)',
diff --git a/system/core/src/themeVariables/types.gen.ts b/system/core/src/themeVariables/types.gen.ts
index 0e1b8000..c88a3c3c 100644
--- a/system/core/src/themeVariables/types.gen.ts
+++ b/system/core/src/themeVariables/types.gen.ts
@@ -53,6 +53,7 @@ export interface TableKitCSSProperties {
'--surface-low-hover-transparent'?: string;
'--surface-raised'?: string;
'--surface-raised-active'?: string;
+ '--surface-raised-active-text'?: string;
'--surface-raised-hover'?: string;
'--surface-raised-hover-transparent'?: string;
'--surface-secondary'?: string;
diff --git a/system/stories/package.json b/system/stories/package.json
index dcf08f44..003550af 100644
--- a/system/stories/package.json
+++ b/system/stories/package.json
@@ -27,12 +27,12 @@
"@storybook/theming": "7.0.0-rc.4",
"@tablecheck/babel-preset": "1.1.0",
"@tablecheck/locales": "1.1.1",
- "@tablecheck/tablekit-core": "^2",
- "@tablecheck/tablekit-css": "^2",
- "@tablecheck/tablekit-react": "^2",
- "@tablecheck/tablekit-react-css": "^2",
- "@tablecheck/tablekit-react-datepicker": "^2",
- "@tablecheck/tablekit-react-select": "^2",
+ "@tablecheck/tablekit-core": "^3",
+ "@tablecheck/tablekit-css": "^3",
+ "@tablecheck/tablekit-react": "^3",
+ "@tablecheck/tablekit-react-css": "^3",
+ "@tablecheck/tablekit-react-datepicker": "^3",
+ "@tablecheck/tablekit-react-select": "^3",
"@vitejs/plugin-react": "3.1.0",
"chokidar": "3.5.3",
"concurrently": "8.2.2",
diff --git a/system/stories/src/Theming.stories.tsx b/system/stories/src/Theming.stories.tsx
index 33ad4fa0..18258e1b 100644
--- a/system/stories/src/Theming.stories.tsx
+++ b/system/stories/src/Theming.stories.tsx
@@ -33,53 +33,121 @@ const PaletteWrapper = styled.button`
}
`;
-function PaletteColor({ color }: { color: string }) {
+const ColorPreview = styled.span`
+ width: 60px;
+ height: 60px;
+ border-top-left-radius: var(--border-radius-small);
+ border-bottom-left-radius: var(--border-radius-small);
+ border-right: 1px solid var(--border);
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+`;
+
+const ColorPreviewLabel = styled.span`
+ color: var(--info-text);
+ font-weight: bold;
+ display: inline-block;
+ width: 80px;
+ text-align: end;
+ padding-inline-end: var(--spacing-l2);
+`;
+
+function PaletteColor({
+ color,
+ background
+}: {
+ color: string;
+ background: string;
+}) {
+ const backgroundVar = `var(--${background})`;
+ const colorVar = `var(--${color})`;
return (
+
+