Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dd3301c
feat: rename js to jsx to get rolldown-vite support working
matthewgallo Jul 24, 2025
b09ee3d
feat: rename js to jsx to get rolldown-vite support working
matthewgallo Jul 24, 2025
c71e2e8
refactor(rolldown): add jsx ext to imports, fix unsupported css syntax
matthewgallo Jul 31, 2025
6206f86
fix(lightning-css): add error recovery option
matthewgallo Jul 31, 2025
8714469
chore: merge main, fix conflicts
matthewgallo Aug 1, 2025
8f97191
Merge branch 'main' into 7953-rolldown-vite-integration
matthewgallo Aug 1, 2025
937bed5
chore: format
matthewgallo Aug 1, 2025
11881d5
Merge branch '7953-rolldown-vite-integration' of github.com:matthewga…
matthewgallo Aug 1, 2025
d73486f
fix: update import in add select
matthewgallo Aug 1, 2025
704244b
chore: merge main
matthewgallo Aug 4, 2025
5fd6849
chore: resolve conflicts
matthewgallo Aug 5, 2025
332c683
Merge branch 'main' into 7953-rolldown-vite-integration
matthewgallo Aug 6, 2025
3ff39e2
chore: resolve conflicts
matthewgallo Aug 8, 2025
774f3f7
chore: resolve conflicts
matthewgallo Aug 8, 2025
f008b27
refactor(sb): use experimental native plugins
matthewgallo Aug 11, 2025
9663707
chore: sb and vite/plugin-react bump
matthewgallo Aug 11, 2025
95a68e1
chore: update lock
matthewgallo Aug 11, 2025
3a6e1cd
Merge branch 'main' into 7953-rolldown-vite-integration
matthewgallo Aug 11, 2025
f4c5212
chore: resolve conflicts
matthewgallo Aug 14, 2025
466534b
chore: resolve conflicts
matthewgallo Aug 26, 2025
6709db8
chore: update lock file
matthewgallo Aug 26, 2025
42d88bf
Merge branch 'main' into 7953-rolldown-vite-integration
jlongshore Aug 26, 2025
ef0d0fc
Merge branch 'main' into 7953-rolldown-vite-integration
jlongshore Aug 26, 2025
7f81e13
Merge branch 'main' into 7953-rolldown-vite-integration
jlongshore Aug 27, 2025
083f196
fix(build): add jsx extension for rolldown build
matthewgallo Aug 27, 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 cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"interstitialscreenview",
"interstitialscreenviewmodule",
"jsnext",
"lightningcss",
"listbox",
"loglevel",
"Menlo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
initial-value: 320px;
syntax: '<length>';
}

$block-class-component: #{$block-class}-filter-panel;

.#{$block-class-component} {
Expand Down Expand Up @@ -171,6 +172,7 @@ $block-class-component: #{$block-class}-filter-panel;
margin-block-start: auto;

opacity: 1;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateY(64px) translateZ(0);

&.#{$block-class-component}__animationComplete {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
inline-size: 0;
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(calc(var(--panel-transform) * -1));
transform: translateX(calc(var(--panel-transform, 320px) * -1));
}

100% {
inline-size: var(--panel-transform);
inline-size: var(--panel-transform, 320px);
opacity: 1;
transform: translateX(0);
}
}

@keyframes filter-panel-exit-left {
0% {
inline-size: var(--panel-transform);
inline-size: var(--panel-transform, 320px);
opacity: 1;
transform: translateX(0);
}
Expand All @@ -51,6 +51,6 @@
inline-size: 0;
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(calc(var(--panel-transform) * -1));
transform: translateX(calc(var(--panel-transform, 320px) * -1));
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2022, 2023
// Copyright IBM Corp. 2022, 2025
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
Expand All @@ -12,12 +12,6 @@

$block-class: #{$pkg-prefix}--filter-summary;

@property --panel-transform {
inherits: true;
initial-value: 16px;
syntax: '<length>';
}

.#{$block-class} {
display: flex;
align-items: flex-start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
0% {
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(var(--panel-transform));
transform: translateX(var(--panel-transform, 320px));
}

100% {
Expand All @@ -42,7 +42,7 @@
0% {
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(calc(var(--panel-transform) * -1));
transform: translateX(calc(var(--panel-transform, 320px) * -1));
}

100% {
Expand All @@ -60,7 +60,7 @@
100% {
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(var(--panel-transform));
transform: translateX(var(--panel-transform, 320px));
}
}

Expand All @@ -73,6 +73,6 @@
100% {
opacity: 0;
/* stylelint-disable-next-line carbon/layout-use */
transform: translateX(calc(var(--panel-transform) * -1));
transform: translateX(calc(var(--panel-transform, 320px) * -1));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@use '../../global/styles/project-settings' as c4p-settings;
@use '../../global/styles/mixins';
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/theme';

$block-class: #{c4p-settings.$pkg-prefix}--truncated-text;

Expand All @@ -21,7 +21,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--truncated-text;
}

&__expand-toggle {
color: $link-primary;
color: theme.$link-primary;
cursor: pointer;
}
}
8 changes: 8 additions & 0 deletions packages/ibm-products-web-components/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ const config = {
include: ['@storybook/web-components-vite'],
exclude: ['lit', 'lit-html'],
},
css: {
transformer: 'lightningcss', // Use Lightning CSS for transformations
lightningcss: {
// Allows for build to still pass even if lightning css finds invalid syntax
// Doesn't seem to parse ::slotted() pseudo selector usage well
errorRecovery: true,
},
},
});
},
docs: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ibm-products-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"dependencies": {
"@carbon-labs/wc-empty-state": "^0.5.0",
"@carbon/ibm-products-styles": "^2.69.0",
"@carbon/styles": "1.85.0",
"@carbon/styles": "1.87.0",
"@carbon/web-components": "2.33.0",
"@ibm/telemetry-js": "^1.10.0",
"@lit-labs/signals": "^0.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@use '@carbon/styles/scss/utilities' as *;
@use '@carbon/themes' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/theme';
@use '@carbon/styles/scss/motion' as *;
@use '@carbon/styles/scss/config';

Expand Down Expand Up @@ -75,7 +75,7 @@ $block-class: #{$prefix}--truncated-text;
@extend %reset-button;

padding: 0 $spacing-01;
color: $link-primary;
color: theme.$link-primary;

&.#{$block-class}_button-hide {
display: none;
Expand All @@ -84,25 +84,25 @@ $block-class: #{$prefix}--truncated-text;

.#{$block-class}_button-expand {
&.#{$block-class}_button-layered {
background-color: $layer;
background-color: theme.$layer;
}

// Gradient LTR
&:dir(ltr)::before {
@include gradient-bg(90deg, $background);
@include gradient-bg(90deg, theme.$background);
}

&.#{$block-class}_button-layered:dir(ltr)::before {
@include gradient-bg(90deg, $layer);
@include gradient-bg(90deg, theme.$layer);
}

// Gradient RTL
&:dir(rtl)::before {
@include gradient-bg(270deg, $background);
@include gradient-bg(270deg, theme.$background);
}

&.#{$block-class}_button-layered:dir(rtl)::before {
@include gradient-bg(270deg, $layer);
@include gradient-bg(270deg, theme.$layer);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { WarningHex, Layers, Chemistry } from '@carbon/react/icons';
import { pkg } from '../../../ibm-products/src';
import { pkg } from '../../src';

const types = {
'deprecation-notice': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import LinkTo from '@storybook/addon-links/react';

import { FeatureFlags } from '../../../ibm-products/src/components/FeatureFlags';
import { FeatureFlags } from '../../src/components/FeatureFlags';
import { Annotation } from '../Annotation';

function WithFeatureFlags({ flags, children, ...rest }) {
Expand Down
54 changes: 54 additions & 0 deletions packages/ibm-products/.storybook/get-auto-track-script.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

//cspell: disable
export const getAutoTrack = (source: string) => `
<script>
window._ibmAnalytics = {
settings: {
name: '${source}',
isSpa: false,
tealiumProfileName: 'in-app-usage-growth',
},
onLoad: [['ibmStats.pageview', []]],
};

window.digitalData = {
page: {
pageInfo: {
ibm: {
siteId: 'IBM_${source}',
},
segment: {
enabled: true,
env: 'test',
key: 'aWg1ug3bDNcSTnde9iwvg1OcvVRzf0JC',
coremetrics: false,
commonProperties: {
productCode: 'C4IP',
productTitle: 'Carbon for IBM Products',
},
pageProperties: {
productCode: 'C4IP',
productTitle: 'Carbon for IBM Products',
},
},
},
category: {
primaryCategory: 'PC110',
},
},
};
</script>
<script
src="//1.www.s81c.com/common/stats/ibm-common.js"
type="text/javascript"
async="async"></script>
<script
type="text/javascript"
async="async"
src="//1.www.s81c.com/common/carbon/autotrack.min.js"></script>`;
23 changes: 8 additions & 15 deletions packages/ibm-products/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import { createRequire } from 'node:module';
import { dirname, join, resolve } from 'path';
import remarkGfm from 'remark-gfm';
import { getAutoTrack } from '../../../scripts/get-auto-track-script';
import react from '@vitejs/plugin-react';
// import { getAutoTrack } from './get-auto-track-script';

const require = createRequire(import.meta.url);

Expand All @@ -16,7 +17,7 @@ const stories = [
'./ComponentPlayground/**/*.stories.*',
'./Welcome/**/*.stories.*',
'./PrebuiltPatterns/**/*.mdx',
'../../../examples/carbon-for-ibm-products/example-gallery/src/example-gallery.stories.js',
'../../../examples/carbon-for-ibm-products/example-gallery/src/example-gallery.stories.*',
];

export default {
Expand Down Expand Up @@ -59,7 +60,8 @@ export default {
${head}
${
process.env.NODE_ENV !== 'development'
? getAutoTrack('ibm-products-react-storybook')
? // ? getAutoTrack('ibm-products-react-storybook')
''
: ''
}
`;
Expand All @@ -70,18 +72,6 @@ export default {
const { mergeConfig } = await import('vite');

return mergeConfig(config, {
esbuild: {
include: /\.[jt]sx?$/,
exclude: [],
loader: 'tsx',
},
optimizeDeps: {
esbuildOptions: {
loader: {
'.js': 'jsx',
},
},
},
resolve: {
alias: {
ALIAS_STORY_STYLE_CONFIG: resolve(
Expand All @@ -104,6 +94,9 @@ export default {
},
},
},
experimental: {
enableNativePlugin: true,
},
});
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import React, { useEffect } from 'react';
import { white, g10, g90, g100 } from '@carbon/themes';
import '../../ibm-products/src/feature-flags';
import '../src/feature-flags';

import { pkg } from '../../ibm-products/src/settings';
import theme from '../.storybook/theme';
import { pkg } from '../src/settings';
import theme from './theme';
import index from './index.scss?inline';
import { StoryDocsPage } from '../../ibm-products/src/global/js/utils/StoryDocsPage';
import { StoryDocsPage } from '../src/global/js/utils/StoryDocsPage';

// Enable all components, whether released or not, for storybook purposes
pkg._silenceWarnings(true);
Expand Down
14 changes: 8 additions & 6 deletions packages/ibm-products/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,20 @@
"@babel/preset-env": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.26.0",
"@carbon/styles": "^1.87.0",
"@ibm/telemetry-js-config-generator": "^2.0.1",
"@percy/cli": "^1.31.0",
"@percy/storybook": "^9.0.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-typescript": "^12.1.2",
"@storybook/addon-docs": "^9.0.8",
"@storybook/addon-links": "^9.0.8",
"@storybook/addon-docs": "^9.1.1",
"@storybook/addon-links": "^9.1.1",
"@storybook/csf": "^0.1.13",
"@storybook/react-vite": "^9.0.13",
"@storybook/react-vite": "^9.1.1",
"@types/react-table": "^7.7.20",
"@vitejs/plugin-react": "^5.0.0",
"babel-plugin-dev-expression": "^0.2.3",
"babel-preset-ibm-cloud-cognitive": "^0.31.0",
"chalk": "^4.1.2",
Expand All @@ -100,9 +102,9 @@
"rollup": "^4.35.0",
"rollup-plugin-strip-banner": "^3.1.0",
"sass": "^1.85.1",
"storybook": "^9.0.8",
"storybook": "^9.1.1",
"typescript-config-carbon": "^0.6.0",
"vite": "^7.0.0",
"vite": "npm:rolldown-vite@latest",
"yargs": "^18.0.0"
},
"dependencies": {
Expand All @@ -125,7 +127,7 @@
"@carbon/grid": "^11.38.0",
"@carbon/layout": "^11.36.0",
"@carbon/motion": "^11.30.0",
"@carbon/react": "^1.86.0",
"@carbon/react": "^1.87.0",
"@carbon/themes": "^11.55.0",
"@carbon/type": "^11.42.0",
"react": "^16.8.6 || ^17.0.1 || ^18.2.0 || ^19.0.0",
Expand Down
Loading
Loading