Skip to content

Commit

Permalink
Merge branch 'main' into fix/ai-label-rename-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
guidari authored Nov 6, 2024
2 parents db3cb16 + 7f7d88a commit c4a7794
Show file tree
Hide file tree
Showing 69 changed files with 305 additions and 416 deletions.
3 changes: 3 additions & 0 deletions .percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ snapshot:
- 360
- 1366
minHeight: 1024
discovery:
allowed-hostnames:
- 1.www.s81c.com
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/mikdhadc"><img src="https://avatars.githubusercontent.com/u/54241506?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mohammed Mikdhad C</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=mikdhadc" title="Code">💻</a></td>
<td align="center"><a href="https://irfadkp.github.io/"><img src="https://avatars.githubusercontent.com/u/54243898?v=4?s=100" width="100px;" alt=""/><br /><sub><b>IRFAD KP</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=irfadkp" title="Code">💻</a></td>
</tr>
</tr>
<tr>
<td align="center"><a href="https://github.com/ziyadzulfikar"><img src="https://avatars.githubusercontent.com/u/56788667?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ziyadzulfikar</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ziyadzulfikar" title="Code">💻</a></td>
<td align="center"><a href="https://irfadkp.github.io/"><img src="https://avatars.githubusercontent.com/u/54243898?v=4?s=100" width="100px;" alt=""/><br /><sub><b>IRFAD KP</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=irfadkp" title="Code">💻</a></td>
Expand Down
4 changes: 2 additions & 2 deletions examples/class-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "class-prefix",
"private": true,
"version": "0.67.0-rc.0",
"version": "0.67.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/codesandbox-styles/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "codesandbox-styles",
"private": true,
"version": "0.72.0-rc.0",
"version": "0.72.0",
"type": "module",
"scripts": {
"dev": "vite"
Expand All @@ -11,6 +11,6 @@
"vite": "^4.3.8"
},
"dependencies": {
"@carbon/styles": "^1.69.0-rc.0"
"@carbon/styles": "^1.69.0"
}
}
4 changes: 2 additions & 2 deletions examples/custom-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "custom-theme",
"private": true,
"version": "0.68.0-rc.0",
"version": "0.68.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/id-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "id-prefix",
"private": true,
"version": "0.67.0-rc.0",
"version": "0.67.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/light-dark-mode/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-light-dark",
"private": true,
"version": "0.68.0-rc.0",
"version": "0.68.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-nextjs",
"private": true,
"version": "0.70.0-rc.0",
"version": "0.70.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"next": "14.1.1",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/v10-token-compat-in-v11/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "v10-token-compat-in-v11",
"private": true,
"version": "0.68.0-rc.0",
"version": "0.68.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "vite",
"private": true,
"version": "0.68.0-rc.0",
"version": "0.68.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/react": "^1.70.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "carbon-components-react",
"private": true,
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
"version": "8.70.0-rc.0",
"version": "8.70.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -43,8 +43,8 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/react": "^1.70.0-rc.0",
"@carbon/styles": "^1.69.0-rc.0",
"@carbon/react": "^1.70.0",
"@carbon/styles": "^1.69.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/carbon-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "carbon-components",
"private": true,
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences. This package reached end of support on September 30, 2024 and will not receive any more updates.",
"version": "11.69.0-rc.0",
"version": "11.69.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,7 +44,7 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/styles": "^1.69.0-rc.0",
"@carbon/styles": "^1.69.0",
"@ibm/telemetry-js": "^1.5.0",
"chalk": "1.1.3"
},
Expand Down
35 changes: 27 additions & 8 deletions packages/react/code-connect/CodeSnippet/CodeSnippet.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ figma.connect(
tooltip: figma.nestedProps('Tooltip content', {
text: figma.textContent('Tooltip text'),
}),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ codeSnippet, tooltip }) => {
example: ({ codeSnippet, tooltip, disabled }) => {
return (
<CodeSnippet type="inline" feedback={tooltip.text}>
<CodeSnippet type="inline" feedback={tooltip.text} disabled={disabled}>
{codeSnippet.text}
</CodeSnippet>
);
Expand All @@ -42,10 +45,16 @@ figma.connect(
codeSnippet: figma.nestedProps('Code snippet', {
text: figma.textContent('node -v'),
}),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ codeSnippet }) => {
example: ({ codeSnippet, disabled }) => {
return (
<CodeSnippet type="inline" feedback="Copied to clipboard">
<CodeSnippet
type="inline"
feedback="Copied to clipboard"
disabled={disabled}>
{codeSnippet.text}
</CodeSnippet>
);
Expand All @@ -60,10 +69,16 @@ figma.connect(
{
props: {
children: figma.textContent('$ npm install --save carbon-components'),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ children }) => {
example: ({ children, disabled }) => {
return (
<CodeSnippet type="single" feedback="Copied to clipboard">
<CodeSnippet
type="single"
feedback="Copied to clipboard"
disabled={disabled}>
{children}
</CodeSnippet>
);
Expand All @@ -83,12 +98,16 @@ figma.connect(
false: true,
}),
expanded: figma.boolean('Expanded'),
disabled: figma.enum('State', {
Disabled: true,
}),
},
example: ({ hideCopyButton }) => (
example: ({ hideCopyButton, disabled }) => (
<CodeSnippet
type="multi"
feedback="Copied to clipboard"
hideCopyButton={hideCopyButton}>
hideCopyButton={hideCopyButton}
disabled={disabled}>
Code sample here
</CodeSnippet>
),
Expand Down
23 changes: 9 additions & 14 deletions packages/react/code-connect/Search/FluidSearch.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import {
unstable__FluidSearch as FluidSearch,
// unstable__FluidSearchSkeleton as FluidSearchSkeleton,
unstable__FluidSearchSkeleton as FluidSearchSkeleton,
} from '@carbon/react';
import figma from '@figma/code-connect';

Expand All @@ -33,16 +33,11 @@ figma.connect(
}
);

// missing from Figma
// figma.connect(
// FluidSearchSkeleton,
// 'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=15503-270751&t=6KMXKibN414b97hv-4',
// {
// variant: { State: 'Skeleton' },
// example: () => (
// // Disclaimer: Code Connect is currently in beta and integration with Carbon
// // React is in an exploratory phase. Code sample below may be incomplete.
// <FluidSearchSkeleton />
// ),
// }
// );
figma.connect(
FluidSearchSkeleton,
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=15503-270751&t=6KMXKibN414b97hv-4',
{
variant: { State: 'Skeleton' },
example: () => <FluidSearchSkeleton />,
}
);
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/react",
"description": "React components for the Carbon Design System",
"version": "1.70.0-rc.0",
"version": "1.70.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@carbon/feature-flags": "^0.24.0",
"@carbon/icons-react": "^11.52.0",
"@carbon/layout": "^11.28.0",
"@carbon/styles": "^1.69.0-rc.0",
"@carbon/styles": "^1.69.0",
"@floating-ui/react": "^0.26.0",
"@ibm/telemetry-js": "^1.5.0",
"classnames": "2.5.1",
Expand Down Expand Up @@ -82,7 +82,7 @@
"@babel/preset-typescript": "^7.24.7",
"@carbon/test-utils": "^10.34.0",
"@carbon/themes": "^11.43.0",
"@figma/code-connect": "^1.1.4",
"@figma/code-connect": "^1.2.1",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
Expand Down
36 changes: 0 additions & 36 deletions packages/react/src/components/ComboBox/ComboBox.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,42 +65,6 @@ export default {
},
};

export const DownshiftActionsTest = () => {
const downshiftActions = useRef();

return (
<div style={{ width: 300 }}>
<ComboBox
onChange={() => {}}
id="carbon-combobox"
items={items}
itemToString={(item) => (item ? item.text : '')}
titleText="ComboBox title"
helperText="Combobox helper text"
downshiftActions={downshiftActions}
downshiftProps={{
onStateChange: (changes) => {
console.log('onStateChange changes', changes);

if (changes.selectedItem === null) {
downshiftActions?.current?.openMenu?.();
return;
}
if (changes?.isOpen && changes?.inputValue === 'Option 1') {
downshiftActions?.current?.setInputValue?.('');
return;
}
if (!changes?.isOpen && changes?.inputValue !== 'Option 1') {
downshiftActions?.current?.setInputValue?.('Option 1');
return;
}
},
}}
/>
</div>
);
};

export const Default = () => (
<div style={{ width: 300 }}>
<ComboBox
Expand Down
Loading

0 comments on commit c4a7794

Please sign in to comment.