Skip to content

Commit

Permalink
fix: generate react/picker and pass react TS checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterloftis committed May 3, 2023
1 parent e34a26b commit 101b88c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cem-react-wrapper.config.js
Expand Up @@ -30,7 +30,7 @@ export default {
packagejson: false,
plugins: [
reactWrapperPlugin({
exclude: ['PickerBase', 'StoryDecorator'],
exclude: ['StoryDecorator'],
outDir: '../../react',
prettierConfig: yaml.load(
readFileSync(resolve('../../.prettierrc.yaml'))
Expand Down
18 changes: 9 additions & 9 deletions packages/picker/src/Picker.ts
Expand Up @@ -62,15 +62,6 @@ const chevronClass = {
xl: 'spectrum-UIIcon-ChevronDown300',
};

/**
* @element sp-picker
*
* @slot label - The placeholder content for the Picker
* @slot - menu items to be listed in the Picker
* @fires change - Announces that the `value` of the element has changed
* @fires sp-opened - Announces that the overlay has been opened
* @fires sp-closed - Announces that the overlay has been closed
*/
export class PickerBase extends SizedMixin(Focusable) {
/**
* @private
Expand Down Expand Up @@ -629,6 +620,15 @@ export class PickerBase extends SizedMixin(Focusable) {
}
}

/**
* @element sp-picker
*
* @slot label - The placeholder content for the Picker
* @slot - menu items to be listed in the Picker
* @fires change - Announces that the `value` of the element has changed
* @fires sp-opened - Announces that the overlay has been opened
* @fires sp-closed - Announces that the overlay has been closed
*/
export class Picker extends PickerBase {
public static override get styles(): CSSResultArray {
return [pickerStyles, chevronStyles];
Expand Down
3 changes: 2 additions & 1 deletion packages/sidenav/src/Sidenav.ts
Expand Up @@ -63,7 +63,8 @@ export class SideNav extends Focusable {
});
},
direction: 'vertical',
elements: () => [...this.querySelectorAll('sp-sidenav-item')],
elements: () =>
[...this.querySelectorAll('sp-sidenav-item')] as SideNavItem[],
isFocusableElement: (el: SideNavItem) =>
!el.disabled && !this.isDisabledChild(el),
});
Expand Down

0 comments on commit 101b88c

Please sign in to comment.