Skip to content

Commit

Permalink
Merge branch 'main' into Filterable_multiselect_onFocus_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
riddhybansal authored Jun 26, 2024
2 parents cef7483 + b28d8be commit a02e0a3
Show file tree
Hide file tree
Showing 36 changed files with 1,110 additions and 142 deletions.
13 changes: 11 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1524,8 +1524,8 @@
"contributions": [
"code"
]
},
{
},
{
"login": "ychavoya",
"name": "Yael Chavoya",
"avatar_url": "https://avatars.githubusercontent.com/u/7907338?v=4",
Expand Down Expand Up @@ -1559,6 +1559,15 @@
"contributions": [
"code"
]
},
{
"login": "lluisrojass",
"name": "Luis",
"avatar_url": "https://avatars.githubusercontent.com/u/15043356?v=4",
"profile": "https://github.com/lluisrojass",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
branch: 'release/update-carbon-deps'
commit-message: 'chore(release): update carbon deps'
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
branch: 'release/update-carbon-deps'
commit-message: 'chore(release): update carbon deps'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
branch: 'release/${{ github.event.inputs.tag }}'
commit-message: 'chore(release): ${{ github.event.inputs.tag }}'
Expand Down
4 changes: 3 additions & 1 deletion .whitesource
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"settingsInheritedFrom": "ibm-mend-config/mend-config@main",
"minSeverityLevel": "NONE"
"issueSettings": {
"minSeverityLevel": "NONE"
}
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,12 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/aninaantony"><img src="https://avatars.githubusercontent.com/u/164350784?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anina Antony</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=aninaantony" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ahmedsemih"><img src="https://avatars.githubusercontent.com/u/102798814?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ahmed Semih Erkan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ahmedsemih" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ychavoya"><img src="https://avatars.githubusercontent.com/u/7907338?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yael Chavoya</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ychavoya" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/digiacomo-a"><img src="https://avatars.githubusercontent.com/u/117646602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrea DG</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=digiacomo-a" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Kilian-Collender"><img src="https://avatars.githubusercontent.com/u/37899503?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kilian Collender</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Kilian-Collender" title="Code">💻</a></td>
<td align="center"><img src="https://avatars.githubusercontent.com/u/37899503?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kilian Collender</b></sub><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Kilian-Collender" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/nandininarayanofficial"><img src="https://avatars.githubusercontent.com/u/165769075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandininarayanofficial</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=nandininarayanofficial" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/digiacomo-a"><img src="https://avatars.githubusercontent.com/u/117646602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrea DG</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=digiacomo-a" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lluisrojass"><img src="https://avatars.githubusercontent.com/u/15043356?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luis</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lluisrojass" title="Code">💻</a></td>
</tr>
</table>

Expand Down
18 changes: 2 additions & 16 deletions e2e/components/DatePicker/DatePicker-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test.describe('@avt DatePicker', () => {
},
});

// for some reason the firs tab is not working to focus the first tabstop, so focusing manually
// for some reason the first tab is not working to focus the first tabstop, so focusing manually
await page.getByRole('textbox', { name: 'Date Picker label' }).focus();
await expect(
page.getByRole('textbox', { name: 'Date Picker label' })
Expand All @@ -96,9 +96,6 @@ test.describe('@avt DatePicker', () => {
await page.keyboard.press('ArrowDown');
await expect(page.locator('span.today')).toBeFocused();
await page.keyboard.press('Escape');
await expect(
page.getByRole('textbox', { name: 'Date Picker label' })
).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).not.toHaveClass(
/open/
);
Expand Down Expand Up @@ -126,18 +123,7 @@ test.describe('@avt DatePicker', () => {
await expect(page.locator('div.flatpickr-calendar')).toHaveClass(/open/);
await page.keyboard.press('ArrowDown');
await page.keyboard.press('Enter');
await expect(
page.locator('input#date-picker-input-id-start')
).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).not.toHaveClass(
/open/
);
await page.keyboard.press('Tab');
await expect(
page.locator('input#date-picker-input-id-finish')
).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).toHaveClass(/open/);
await page.keyboard.press('Escape');
await page.keyboard.press('Enter');
await expect(
page.locator('input#date-picker-input-id-finish')
).toBeFocused();
Expand Down
13 changes: 0 additions & 13 deletions e2e/components/FluidDatePicker/FluidDatePicker-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ test.describe('@avt FluidDatePicker', () => {
await page.keyboard.press('ArrowDown');
await expect(page.locator('span.today')).toBeFocused();
await page.keyboard.press('Escape');
await expect(page.getByRole('textbox', { name: 'Label' })).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).not.toHaveClass(
/open/
);
Expand Down Expand Up @@ -98,18 +97,6 @@ test.describe('@avt FluidDatePicker', () => {
await expect(page.locator('div.flatpickr-calendar')).toHaveClass(/open/);
await page.keyboard.press('ArrowDown');
await page.keyboard.press('Enter');
await expect(
page.locator('input#date-picker-input-id-start')
).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).not.toHaveClass(
/open/
);
await page.keyboard.press('Tab');
await expect(
page.locator('input#date-picker-input-id-finish')
).toBeFocused();
await expect(page.locator('div.flatpickr-calendar')).toHaveClass(/open/);
await page.keyboard.press('Escape');
await expect(
page.locator('input#date-picker-input-id-finish')
).toBeFocused();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/icons/src/svg/32/kubernetes--worker-node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3418,6 +3418,9 @@ Map {
"propTypes": Object {
"aria-label": [Function],
"ariaLabel": [Function],
"autoAlign": Object {
"type": "bool",
},
"clearSelectionDescription": Object {
"type": "string",
},
Expand Down Expand Up @@ -5091,6 +5094,9 @@ Map {
"propTypes": Object {
"aria-label": [Function],
"ariaLabel": [Function],
"autoAlign": Object {
"type": "bool",
},
"clearSelectionDescription": Object {
"type": "string",
},
Expand Down Expand Up @@ -5339,6 +5345,9 @@ Map {
"render": [Function],
},
"propTypes": Object {
"autoAlign": Object {
"type": "bool",
},
"className": Object {
"type": "string",
},
Expand Down
4 changes: 3 additions & 1 deletion packages/react/code-connect/Checkbox/Checkbox.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ figma.connect(
checked: figma.enum('Selection', {
Checked: true,
}),
helperText: figma.string('Helper text'),
helperText: figma.boolean('Helper message', {
true: figma.string('Helper text'),
}),
invalid: figma.enum('State', {
Invalid: true,
}),
Expand Down
5 changes: 3 additions & 2 deletions packages/react/code-connect/Checkbox/CheckboxGroup.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ figma.connect(
{
props: {
// horizontal: figma.boolean('Horizontal'), // missing in React
//helpermessage: figma.boolean('Helper message'), show/hide helper text in figma, in react if message is there it displays
// warnMessage: figma.boolean('Warning message'), // you can have a component in a warn state while hiding warning message in Figma, not supported in code
// errorMessage: figma.boolean('Error message'), // you can have a component in a error state while hiding error message in Figma, not supported in code
children: figma.children(['Checkbox']),
helperText: figma.string('Helper text'),
helperText: figma.boolean('Helper message', {
true: figma.string('Helper text'),
}),
readOnly: figma.enum('State', {
'Read-only': true,
}),
Expand Down
5 changes: 3 additions & 2 deletions packages/react/code-connect/Dropdown/Dropdown.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ figma.connect(
'https://www.figma.com/file/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?type=design&node-id=14032-290635&mode=dev',
{
props: {
helperText: figma.string('Helper text'),
helperText: figma.boolean('Show helper', {
true: figma.string('Helper text'),
}),
size: figma.enum('Size', {
Large: 'lg',
Medium: 'md',
Expand Down Expand Up @@ -45,7 +47,6 @@ figma.connect(
// Fixed: 'fixed',
Inline: 'inline',
}),
// showhelper: figma.boolean('Show helper'), // this doesn't exist in code, if helperText exists it will display
// selectedtext: figma.string('Selected text'), // what is this used for in Figma?
// unselectedtext: figma.string('Unselected text'),// what is this used for in Figma?
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ figma.connect(
disabled: figma.enum('State', {
Disabled: true,
}),
helperText: figma.string('Helper text'),
helperText: figma.boolean('Show helper', {
true: figma.string('Helper text'),
}),
hideLabel: figma.boolean('Show label', {
true: false,
false: true,
Expand All @@ -41,7 +43,6 @@ figma.connect(
}),
warnText: figma.string('Warning text'),
// value, text field in Figma
// showhelper: figma.boolean('Show helper'), // this doesn't exist in code, if helperText exists it will display
},
example: ({
disabled,
Expand Down
75 changes: 75 additions & 0 deletions packages/react/code-connect/RadioButton/RadioButton.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

// @ts-nocheck
import React from 'react';
import { RadioButton, RadioButtonSkeleton } from '@carbon/react';
import figma from '@figma/code-connect';

figma.connect(
RadioButton,
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=2930-23442&t=yFGI7EFVWv0vtqIk-4',
{
props: {
labelText: figma.string('Value text'),
labelPosition: figma.enum('Position', {
Right: 'right',
}),
hideLabel: figma.boolean('Value', {
true: false,
false: true,
}),
disabled: figma.enum('State', {
Disabled: true,
}),
defaultChecked: figma.boolean('Selected'),
// Below props are set on RadioButtonGroup only in code
//
// labeltext: figma.string('Label text'),
// warningtext: figma.string('Warning text'),
// helpermessage: figma.boolean('Helper message'),
// warningmessage: figma.boolean('Warning message'),
// errormessage: figma.boolean('Error message'),
// helpertext: figma.string('Helper text'),
// errortext: figma.string('Error text'),
// label: figma.boolean('Label'),
// state: figma.enum('State', {
// 'Read-only': 'read-only',
// Invalid: 'invalid',
// Warning: 'warning',
// }),
},
example: ({
labelText,
labelPosition,
hideLabel,
disabled,
defaultChecked,
}) => (
<RadioButton
labelText={labelText}
labelPosition={labelPosition}
hideLabel={hideLabel}
disabled={disabled}
defaultChecked={defaultChecked}
/>
),
}
);

figma.connect(
RadioButtonSkeleton,
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=2930-23442&t=yFGI7EFVWv0vtqIk-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.
<RadioButtonSkeleton />;
},
}
);
64 changes: 64 additions & 0 deletions packages/react/code-connect/RadioButton/RadioButtonGroup.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

// @ts-nocheck
import React from 'react';
import { RadioButtonGroup } from '@carbon/react';
import figma from '@figma/code-connect';

figma.connect(
RadioButtonGroup,
'https://www.figma.com/design/YAnB1jKx0yCUL29j6uSLpg/(v11)-All-themes---Carbon-Design-System?node-id=2927-28166&t=yFGI7EFVWv0vtqIk-4',
{
props: {
children: figma.children(['Radio button']),
disabled: figma.enum('State', {
Disabled: true,
}),
helperText: figma.boolean('Helper message', {
true: figma.string('Helper text'),
}),
warnText: figma.string('Warning text'),
warn: figma.enum('State', {
Warning: true,
}),
invalidText: figma.string('Error text'),
invalid: figma.enum('State', {
Invalid: true,
}),
legendText: figma.string('Label text'),
orientation: figma.boolean('Horizontal', {
false: 'vertical',
}),
},
example: ({
children,
disabled,
helperText,
warnText,
warn,
invalidText,
invalid,
orientation,
legendText,
}) => (
// Disclaimer: Code Connect is currently in beta and integration with Carbon
// React is in an exploratory phase. Code sample below may be incomplete.
<RadioButtonGroup
disabled={disabled}
helperText={helperText}
warnText={warnText}
warn={warn}
invalidText={invalidText}
invalid={invalid}
orientation={orientation}
legendText={legendText}>
{children}
</RadioButtonGroup>
),
}
);
Loading

0 comments on commit a02e0a3

Please sign in to comment.