Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
413cb85
Migrate to SCSS modules and add build-time theming
vineethasok Oct 1, 2025
d90231d
Bump version to 0.0.234-sc-deprecation.1
vineethasok Oct 1, 2025
5af30d6
Add "use client" directive to all interactive components for Next.js …
vineethasok Oct 9, 2025
f59162c
Remove classic theme support and related files
vineethasok Oct 9, 2025
6b7ccaf
Add universal bundler config plugins for Click UI
vineethasok Oct 20, 2025
adb89c1
Refactor theme config to use 'dark' overrides and improve CSS var gen…
vineethasok Oct 20, 2025
3a4f50c
Refactor imports and add global styles import
vineethasok Oct 20, 2025
ccf3c0a
Update build config and tooling for SCSS module support
vineethasok Oct 20, 2025
23d547e
Revamp theme config docs and add CLI/init examples
vineethasok Oct 20, 2025
eb9de57
Add polymorphic component utilities and tests
vineethasok Oct 22, 2025
63a4fb5
Add capitalize utility and tests
vineethasok Oct 22, 2025
b84d61d
Refactor components to use polymorphic types
vineethasok Oct 22, 2025
a18834f
Support arrays in CSS variable generation
vineethasok Oct 22, 2025
08d6390
Refactor Icon sizing and add disableDefaultSize prop
vineethasok Oct 22, 2025
fa0e32e
Refactor FileUpload styles to use shared SCSS module
vineethasok Oct 22, 2025
3756478
Refactor button and icon styles, improve theme usage
vineethasok Oct 22, 2025
ec5b7cf
Refactor CLI and remove bundler plugin system
vineethasok Oct 23, 2025
dfea9d3
Remove example integration files
vineethasok Oct 23, 2025
9784ce1
Remove vite-plugin files
vineethasok Oct 23, 2025
b911a9e
Refactor component styles to use variant mixins
vineethasok Nov 14, 2025
3c3c26e
Add CSS theme builder and refactor theme utilities
vineethasok Nov 14, 2025
67e6440
Refactor chart colors story and remove SCSS file
vineethasok Nov 14, 2025
96c2765
Add cui.css entrypoint and new SCSS mixins for variants
vineethasok Nov 14, 2025
b908740
Revamp theming docs and update style import instructions
vineethasok Nov 14, 2025
abd9fca
Add size variants to CardHorizontal component
vineethasok Nov 15, 2025
167a973
Fix incorrect styling when comparing to main
vineethasok Nov 15, 2025
36e51d6
Refactor theme tokens and types for consistency
vineethasok Nov 17, 2025
7e8996c
Update color variables in ChartColorComponent styles
vineethasok Nov 17, 2025
26e2c03
Pass style prop correctly to the Container component
elizabetdev Nov 17, 2025
43354df
Refine input styles, icon sizing, and theme variables
vineethasok Nov 17, 2025
c434271
Refactor ChartColorComponent and add chart examples
elizabetdev Nov 17, 2025
7f37e9c
Refactor chart components to use ChartTooltip and remove unused PieCh…
elizabetdev Nov 17, 2025
468a292
Refactor SVG handling in Logo and Payments components; remove unused …
elizabetdev Nov 17, 2025
7c8e377
Remove nested <svg> elements from icon components
vineethasok Nov 18, 2025
65daaa9
Fix Multi Accordion styling
vineethasok Nov 18, 2025
c755b01
Add TypeScript interfaces to chart example data
vineethasok Nov 18, 2025
68ea7a1
Fix lint errors
elizabetdev Dec 2, 2025
599c027
Fix lint errors
elizabetdev Dec 2, 2025
8165562
FIx errors
elizabetdev Dec 2, 2025
c4c80d0
Fix pnpm-lock.yaml
elizabetdev Dec 2, 2025
d77c4fa
Prettier
elizabetdev Dec 2, 2025
83006ff
Fix issue on alert story
elizabetdev Dec 2, 2025
1624f6e
Refactor imports in Alert stories and update getThemeValue to disable…
elizabetdev Dec 2, 2025
371e552
Enhance tests for Checkbox, DatePicker, Grid, HoverCard, TextField, a…
elizabetdev Dec 2, 2025
3c30526
No code changes detected; skipping commit.
elizabetdev Dec 2, 2025
c25ed0c
Update Checkbox styles: remove hover background color and change chec…
elizabetdev Dec 2, 2025
966f814
Remove console log from ColorSwatchesChart component
elizabetdev Dec 2, 2025
bb65684
Update uploadAreaError styles: change border to solid transparent
elizabetdev Dec 4, 2025
bce5edc
Package upgrades and eslint migration to flat config
vineethasok Dec 9, 2025
6b2f829
Add CSS containment to VerticalStepper
vineethasok Dec 9, 2025
a943102
Update theme tokens and component styles
vineethasok Dec 9, 2025
9c67b2a
Remove styled-components dependency and apply scss-infra improvements
vineethasok Jan 6, 2026
cc943e8
Restore system theme option in Storybook
vineethasok Jan 6, 2026
5523a82
Convert CSS variables to SCSS tokens across all components
vineethasok Jan 6, 2026
a88ca1d
Fix Alert and Button components
vineethasok Jan 6, 2026
ca56a39
Update theme imports to use TypeScript files instead of JSON
vineethasok Jan 6, 2026
18c8e31
Fix TypeScript errors in components and theme types
vineethasok Jan 6, 2026
4e600e5
Clean up codebase: remove chart-examples, fix build scripts, delete g…
vineethasok Jan 6, 2026
6cb2b2e
Convert all CSS variables to SCSS tokens
vineethasok Jan 6, 2026
be645b2
Complete CSS variable to SCSS token conversion and fix build
vineethasok Jan 6, 2026
9924d34
Remove backup file
vineethasok Jan 6, 2026
e5fc3ad
Convert static var() calls to SCSS tokens in mixins
vineethasok Jan 6, 2026
926d506
Reorganize mixins into category-based files by component
vineethasok Jan 6, 2026
cf33f59
Convert global CSS variables to SCSS tokens in module files
vineethasok Jan 6, 2026
6396151
Remove demo-only CSS files
vineethasok Jan 6, 2026
72823fe
Replace HTMLAttributes with ComponentPropsWithoutRef
vineethasok Jan 13, 2026
c8dd6a8
Fix Button loading opacity and ProgressBar orientation/direction
vineethasok Jan 13, 2026
ceed471
Remove redundant component stories
vineethasok Jan 13, 2026
bc850b0
Add stylelint configuration and fix SCSS linting errors
vineethasok Jan 13, 2026
89e4737
Auto-fix stylelint formatting errors across SCSS files
vineethasok Jan 13, 2026
87da874
Update remaining component stories structure
vineethasok Jan 13, 2026
6c86c1e
Update theme provider and build configuration
vineethasok Jan 13, 2026
f27f81c
Update useColorStyle utility for CodeBlock component
vineethasok Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ vite.config.ts.timestamp*
.yarn/*
!.yarn/releases
!.yarn/plugins
# Temporary documentation and planning files
.tmp/
tmp/
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
src/styles/types.ts
34 changes: 24 additions & 10 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 @@ -32,32 +36,42 @@ const config: StorybookConfig = {
},
},

async viteFinal(config, { configType }) {
viteFinal: async (config, { configType }) => {
// 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;
originalOnWarn ? originalOnWarn(warning, warn) : warn(warning);
if (warning.message?.includes("mdx-react-shim")) {
return;
}
if (originalOnWarn) {
originalOnWarn(warning, warn);
} else {
warn(warning);
}
};
}

// Ensure CSS modules specificity is correct
config.build = config.build || {};
config.build.cssCodeSplit = false;

return config;
},
};
Expand Down
22 changes: 22 additions & 0 deletions .storybook/preview.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.cuiThemeBlock {
position: absolute;
inset: 0;
min-height: fill-available;

overflow: auto;
padding: 1rem;
box-sizing: border-box;
background: tokens.$clickStorybookGlobalBackground;

&.cuiLeft {
left: 0;
}

&.cuiRight {
left: 50vw;
}

&.cuiFill {
left: 0;
}
}
72 changes: 44 additions & 28 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
import React from "react";
import type { Preview } from "@storybook/react-vite";
import { Decorator } from "@storybook/react-vite";
import styled from "styled-components";
import { themes } from "storybook/theming";
import ClickUIProvider from "../src/theme/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: 0;
height: fit-content;
bottom: 0;
overflow: auto;
padding: 1rem;
box-sizing: border-box;
background: ${theme.click.storybook.global.background};
`
interface ThemeBlockProps {
left?: boolean;
fill?: boolean;
children: React.ReactNode;
}

const ThemeBlock: React.FC<ThemeBlockProps & { theme?: string }> = ({
left,
fill,
theme = "light",
children,
}) => (
<div
className={clsx(styles.cuiThemeBlock, {
[styles.cuiLeft]: left || fill,
[styles.cuiRight]: !left && !fill,
[styles.cuiFill]: fill,
})}
style={{
// Set color-scheme to make light-dark() CSS function work
colorScheme: theme,
}}
>
{children}
</div>
);

export const globalTypes = {
Expand All @@ -26,27 +39,34 @@ 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: "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
key={`storybook-theme-${theme}`}
theme={theme}
config={{ tooltip: { delayDuration: 0 } }}
config={{
tooltip: { delayDuration: 100 },
toast: { duration: 3000 },
}}
>
<ThemeBlock $left>
<ThemeBlock
fill
theme={theme}
>
<StoryFn />
</ThemeBlock>
</ClickUIProvider>
Expand Down Expand Up @@ -81,13 +101,9 @@ const preview: Preview = {
},
docs: {
theme: themes.dark,
codePanel: true
codePanel: true,
},
},
argTypes: {
// Hide children prop from docs table - it doesn't serialize well as a control
children: { table: { disable: true } },
},
};

export const decorators = [withTheme];
Expand Down
10 changes: 10 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore files not yet migrated
src/App.module.scss
src/theme/

# Ignore third-party or generated files
src/styles/tokens-light-dark.scss
node_modules
dist
build
*.min.css
76 changes: 76 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"extends": ["stylelint-config-standard-scss"],
"plugins": ["stylelint-scss"],
"customSyntax": "postcss-scss",
"rules": {
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["use", "include", "mixin", "function", "return", "each", "if", "else"]
}
],
"scss/dollar-variable-pattern": null,
"scss/at-mixin-pattern": null,
"scss/at-function-pattern": null,
"scss/percent-placeholder-pattern": null,
"selector-class-pattern": null,
"custom-property-pattern": null,
"keyframes-name-pattern": null,
"scss/at-extend-no-missing-placeholder": null,
"no-descending-specificity": null,
"scss/load-no-partial-leading-underscore": null,
"color-function-notation": null,
"media-feature-range-notation": null,
"alpha-value-notation": null,
"property-no-unknown": [
true,
{
"ignoreProperties": ["composes"]
}
],
"function-no-unknown": [
true,
{
"ignoreFunctions": [
"tokens",
"var",
"calc",
"min",
"max",
"clamp",
"url",
"rgba",
"rgb",
"hsl",
"hsla",
"linear-gradient",
"radial-gradient"
]
}
],
"value-keyword-case": [
"lower",
{
"ignoreProperties": ["composes"]
}
],
"scss/operator-no-newline-after": null,
"scss/operator-no-unspaced": null,
"declaration-empty-line-before": null,
"rule-empty-line-before": null,
"at-rule-empty-line-before": null,
"comment-empty-line-before": null,
"scss/double-slash-comment-empty-line-before": null,
"scss/comment-no-empty": null,
"no-invalid-position-at-import-rule": null,
"no-duplicate-selectors": null,
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global"]
}
],
"property-no-deprecated": null,
"declaration-property-value-keyword-no-deprecated": null
}
}
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
Loading