Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
43d05d8
Migrate to SCSS modules and add build-time theming
vineethasok Oct 1, 2025
5672a32
Bump version to 0.0.234-sc-deprecation.1
vineethasok Oct 1, 2025
e1b52ab
Add "use client" directive to all interactive components for Next.js …
vineethasok Oct 9, 2025
0158aeb
Remove classic theme support and related files
vineethasok Oct 9, 2025
356293b
Add universal bundler config plugins for Click UI
vineethasok Oct 20, 2025
3851685
Refactor theme config to use 'dark' overrides and improve CSS var gen…
vineethasok Oct 20, 2025
5dc2be7
Refactor imports and add global styles import
vineethasok Oct 20, 2025
f73ca23
Update build config and tooling for SCSS module support
vineethasok Oct 20, 2025
9718489
Revamp theme config docs and add CLI/init examples
vineethasok Oct 20, 2025
99ec27b
Merge branch 'main' into migrate-styled-components
vineethasok Oct 20, 2025
4416426
Add polymorphic component utilities and tests
vineethasok Oct 22, 2025
8c71951
Add capitalize utility and tests
vineethasok Oct 22, 2025
fe27a7b
Refactor components to use polymorphic types
vineethasok Oct 22, 2025
0babc02
Support arrays in CSS variable generation
vineethasok Oct 22, 2025
c76207c
Refactor Icon sizing and add disableDefaultSize prop
vineethasok Oct 22, 2025
195aa32
Refactor FileUpload styles to use shared SCSS module
vineethasok Oct 22, 2025
b5e6dbd
Refactor button and icon styles, improve theme usage
vineethasok Oct 22, 2025
80dadae
Refactor CLI and remove bundler plugin system
vineethasok Oct 23, 2025
acc172d
Remove example integration files
vineethasok Oct 23, 2025
a2395c1
Remove vite-plugin files
vineethasok Oct 23, 2025
79dbd8c
Refactor component styles to use variant mixins
vineethasok Nov 14, 2025
a0f58c8
Add CSS theme builder and refactor theme utilities
vineethasok Nov 14, 2025
2c9595d
Refactor chart colors story and remove SCSS file
vineethasok Nov 14, 2025
3a623c0
Add cui.css entrypoint and new SCSS mixins for variants
vineethasok Nov 14, 2025
e65a3e3
Revamp theming docs and update style import instructions
vineethasok Nov 14, 2025
33c1665
Merge branch 'main' into migrate-styled-components
vineethasok Nov 15, 2025
59c7433
Add size variants to CardHorizontal component
vineethasok Nov 15, 2025
83bccdf
Fix incorrect styling when comparing to main
vineethasok Nov 15, 2025
747877f
Refactor theme tokens and types for consistency
vineethasok Nov 17, 2025
d707b26
Update color variables in ChartColorComponent styles
vineethasok Nov 17, 2025
84ddd40
Pass style prop correctly to the Container component
elizabetdev Nov 17, 2025
2d87c51
Merge branch 'main' into migrate-styled-components
vineethasok Nov 17, 2025
6d69913
Fix package after merging
vineethasok Nov 17, 2025
b4a14c7
Merge branch 'main' into migrate-styled-components
elizabetdev Nov 17, 2025
ad0d823
Merge branch 'main' into migrate-styled-components
vineethasok Nov 17, 2025
e8206b3
Refactor ChartColorComponent and add chart examples
elizabetdev Nov 17, 2025
8d08b4f
Refactor chart components to use ChartTooltip and remove unused PieCh…
elizabetdev Nov 17, 2025
4abaf51
Refine input styles, icon sizing, and theme variables
vineethasok Nov 17, 2025
98a6e09
Merge branch 'migrate-styled-components' of https://github.com/ClickH…
vineethasok Nov 17, 2025
48b63ec
Refactor SVG handling in Logo and Payments components; remove unused …
elizabetdev Nov 17, 2025
0ef7625
Remove nested <svg> elements from icon components
vineethasok Nov 18, 2025
7aa03ba
Merge branch 'main' into migrate-styled-components
vineethasok Nov 18, 2025
b156449
Fix Multi Accordion styling
vineethasok Nov 18, 2025
dce6454
Merge branch 'main' into migrate-styled-components
elizabetdev Dec 2, 2025
313144f
Fix lint errors
elizabetdev Dec 2, 2025
83483f1
Fix lint errors
elizabetdev Dec 2, 2025
afb81c2
FIx errors
elizabetdev Dec 2, 2025
148bbec
Fix pnpm-lock.yaml
elizabetdev Dec 2, 2025
43f2069
Prettier
elizabetdev Dec 2, 2025
a4396eb
Fix issue on alert story
elizabetdev Dec 2, 2025
35ef24a
Refactor imports in Alert stories and update getThemeValue to disable…
elizabetdev Dec 2, 2025
3f77006
Enhance tests for Checkbox, DatePicker, Grid, HoverCard, TextField, a…
elizabetdev Dec 2, 2025
146fb1a
No code changes detected; skipping commit.
elizabetdev Dec 2, 2025
7dd411b
Update Checkbox styles: remove hover background color and change chec…
elizabetdev Dec 2, 2025
6146be5
Remove console log from ColorSwatchesChart component
elizabetdev Dec 2, 2025
74ed8a5
Update uploadAreaError styles: change border to solid transparent
elizabetdev Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
env: {
browser: true,
es2020: true,
node: true,
},
extends: [
"eslint:recommended",
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ storybook-static
*.log
**/.DS_Store
vite.config.ts.timestamp*

# Generated TypeScript declaration files for SCSS modules
**/*.scss.d.ts
**/*.css.d.ts
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
src/styles/types.ts
29 changes: 21 additions & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
core: {
disableTelemetry: true
disableTelemetry: true,
},
stories: [
"../src/Introduction.mdx",
"../src/components/icons/Icons.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)",
],

addons: ["@storybook/addon-links", //"@storybook/addon-interactions",
"storybook-addon-pseudo-states", "@storybook/addon-a11y", "@storybook/addon-docs"],
addons: [
"@storybook/addon-links", //"@storybook/addon-interactions",
"storybook-addon-pseudo-states",
"@storybook/addon-a11y",
"@storybook/addon-docs",
],

framework: {
name: "@storybook/react-vite",
Expand All @@ -33,27 +37,36 @@ const config: StorybookConfig = {
},

async viteFinal(config, { configType }) {
if (config.css?.preprocessorOptions?.scss) {
config.css.preprocessorOptions.scss.api = "modern-compiler";
} else {
config.css = config.css || {};
config.css.preprocessorOptions = config.css.preprocessorOptions || {};
config.css.preprocessorOptions.scss = {
api: "modern-compiler",
};
}
// Workaround for Storybook 10.0.7 bug where MDX files generate file:// imports
// See: https://github.com/storybookjs/storybook/issues (mdx-react-shim resolution)
config.plugins = config.plugins || [];
config.plugins.push({
name: 'fix-storybook-mdx-shim',
name: "fix-storybook-mdx-shim",
resolveId(source) {
// Intercept the malformed file:// URL and resolve to the correct package
if (source.includes('mdx-react-shim')) {
return this.resolve('@mdx-js/react', undefined, { skipSelf: true });
if (source.includes("mdx-react-shim")) {
return this.resolve("@mdx-js/react", undefined, { skipSelf: true });
}
return null;
},
});

// Suppress Rollup warnings for production builds
if (configType === 'PRODUCTION') {
if (configType === "PRODUCTION") {
config.build = config.build || {};
config.build.rollupOptions = config.build.rollupOptions || {};
const originalOnWarn = config.build.rollupOptions.onwarn;
config.build.rollupOptions.onwarn = (warning, warn) => {
if (warning.message?.includes('mdx-react-shim')) return;
if (warning.message?.includes("mdx-react-shim")) return;
originalOnWarn ? originalOnWarn(warning, warn) : warn(warning);
};
}
Expand Down
25 changes: 25 additions & 0 deletions .storybook/preview.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.cuiThemeBlock {
position: absolute;
top: 0.5rem;
width: 96vw;
height: 100vh;
bottom: 0;
overflow: auto;
padding: 1rem;
background: var(--click-storybook-global-background);

&.cuiLeft {
left: 0;
right: 50vw;
}

&.cuiRight {
left: 50vw;
right: 0;
}

&.cuiFill {
left: 0;
right: 0;
}
}
85 changes: 58 additions & 27 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
import React from "react";
import type { Preview } from "@storybook/react-vite";
import "../src/styles/variables.css";
import "@/styles/cui-default-theme.css";
import { Decorator } from "@storybook/react-vite";
import styled from "styled-components";
import { themes } from "storybook/theming";
import ClickUIProvider from "../src/components/ClickUIProvider/ClickUIProvider";
import { ClickUIProvider } from "@/theme/ClickUIProvider";
import clsx from "clsx";
import styles from "./preview.module.scss";

const ThemeBlock = styled.div<{ $left?: boolean; $bfill?: boolean }>(
({ $left, $bfill: fill, theme }) => `
position: absolute;
top: 0.5rem;
left: ${$left || fill ? 0 : "50vw"};
right: ${$left ? "50vw" : 0};
width: 96vw;
height: 100vh;
bottom: 0;
overflow: auto;
padding: 1rem;
background: ${theme.click.storybook.global.background};
`
interface ThemeBlockProps {
left?: boolean;
fill?: boolean;
children: React.ReactNode;
}

const ThemeBlock: React.FC<ThemeBlockProps> = ({ left, fill, children }) => (
<div
className={clsx(styles.cuiThemeBlock, {
[styles.cuiLeft]: left || fill,
[styles.cuiRight]: !left && !fill,
[styles.cuiFill]: fill,
})}
>
{children}
</div>
);

export const globalTypes = {
Expand All @@ -27,28 +31,38 @@ export const globalTypes = {
description: "Global theme for components",
defaultValue: "dark",
toolbar: {
// The icon for the toolbar item
icon: "circlehollow",
// Array of options
items: [
{ value: "dark", icon: "moon", title: "dark" },
{ value: "light", icon: "sun", title: "light" },
{ value: "classic", icon: "circle", title: "classic" },
{ value: "light", icon: "sun", title: "Light" },
{ value: "dark", icon: "moon", title: "Dark" },
{ value: "system", icon: "browser", title: "System" },
],
// Property that specifies if the name of the item will be displayed
showName: true,
dynamicTitle: true,
},
},
};
const withTheme: Decorator = (StoryFn, context) => {
const parameters = context.parameters;
const theme = parameters?.theme || context.globals.theme;
const theme = parameters?.theme || context.globals.theme || "light";

return (
<ClickUIProvider
theme={theme}
config={{ tooltip: { delayDuration: 0 } }}
key={`storybook-theme-${theme}`}
theme={theme as any}
defaultTheme="light"
enableTransitions={true}
transitionDuration={200}
enableDevTools={true}
fallbackTheme="light"
config={{
tooltip: { delayDuration: 100 },
toast: { duration: 3000 },
preloadThemes: ["light", "dark"],
logThemeChanges: true,
}}
>
<ThemeBlock $left>
<ThemeBlock fill>
<StoryFn />
</ThemeBlock>
</ClickUIProvider>
Expand Down Expand Up @@ -83,7 +97,24 @@ const preview: Preview = {
},
docs: {
theme: themes.dark,
codePanel: true
codePanel: true,
},
backgrounds: {
default: "click-ui",
values: [
{
name: "click-ui",
value: "var(--click-storybook-global-background)",
},
{
name: "light",
value: "var(--click-storybook-global-background)",
},
{
name: "dark",
value: "var(--click-storybook-global-background)",
},
],
},
},
};
Expand Down
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
{
// TypeScript: Prioritize source files over declaration files
"typescript.preferences.autoImportFileExcludePatterns": [
"**/*.scss.d.ts",
"**/node_modules/**"
],

// Hide generated .scss.d.ts files from search and file explorer
"files.exclude": {
"**/*.scss.d.ts": true
},

// Search settings to exclude generated files
"search.exclude": {
"**/*.scss.d.ts": true,
"**/node_modules": true,
"**/dist": true
}
}
Loading