Skip to content

Commit

Permalink
Unify JSDoc property descriptions (#7273)
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio authored Jan 29, 2025
2 parents 03a494c + 9cab329 commit 34351ef
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/components/accordion/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class KolAccordion implements AccordionAPI, FocusableElement {
@Prop() public _on?: AccordionCallbacksPropType<boolean>;

/**
* If set (to true) opens/expands the element, closes if not set (or set to false).
* Opens/expands the element when truthy, closes/collapses when falsy.
* @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.
*/
@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/button-link/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class KolButtonLink implements ButtonLinkProps, FocusableElement {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/button/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class KolButtonWc implements ButtonAPI, FocusableElement {
private readonly controller: AssociatedInputController;

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/button/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class KolButton implements ButtonProps, FocusableElement {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down Expand Up @@ -166,7 +166,7 @@ export class KolButton implements ButtonProps, FocusableElement {
@Prop() public _role?: AlternativeButtonLinkRolePropType;

/**
* Defines the elements short key.
* Adds a visual short key hint to the component.
*/
@Prop() public _shortKey?: ShortKeyPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/combobox/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export class KolCombobox implements ComboboxAPI {
@Prop() public _on?: InputTypeOnDefault;

/**
* Suggestions the user can choose from.
* Suggestions to provide for the input.
*/
@Prop() public _suggestions!: SuggestionsPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/details/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class KolDetails implements DetailsAPI, FocusableElement {
@Prop() public _on?: DetailsCallbacksPropType<boolean>;

/**
* If set (to true) opens/expands the element, closes if not set (or set to false).
* Opens/expands the element when truthy, closes/collapses when falsy.
* @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.
*/
@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/drawer/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ export class KolDrawer implements DrawerAPI {
}

/**
* Specifies the default open state of the drawer.
* Opens/expands the element when truthy, closes/collapses when falsy.
*/
@Prop() public _open?: OpenPropType;

/**
* Specifies the orientation of the drawer.
* Defines the visual orientation of the component.
*/
@Prop() public _align?: AlignPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/input/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class KolInputWc implements Props {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/link-button/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class KolLinkButton implements LinkButtonProps, FocusableElement {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/link/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class KolLinkWc implements LinkAPI, FocusableElement {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/link/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class KolLink implements LinkProps, FocusableElement {
}

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
*/
@Prop() public _accessKey?: AccessKeyPropType;

Expand Down Expand Up @@ -137,7 +137,7 @@ export class KolLink implements LinkProps, FocusableElement {
@Prop() public _role?: AlternativeButtonLinkRolePropType;

/**
* Defines the elements access key.
* Adds a visual short key hint to the component.
*/
@Prop() public _shortKey?: ShortKeyPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tabs/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class KolTabs implements TabsAPI {
}

/**
* Defines the position of the tab captions.
* Defines the visual orientation of the component.
*/
@Prop() public _align?: AlignPropType = 'top';

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/toolbar/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class KolToolbar implements ToolbarAPI {
}

/**
* Defines the semantic aria-label of the component.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
@Prop() public _label!: string;

Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/components/tree-item/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ export class KolTreeItemWc implements TreeItemAPI {
@Prop() _active?: OpenPropType;

/**
* Defines the label of the link.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
@Prop() _label!: LabelPropType;

/**
* If set (to true) opens/expands the element, closes if not set (or set to false).
* Opens/expands the element when truthy, closes/collapses when falsy.
*/
@Prop() _open?: OpenPropType;

/**
* This property is used for a link from a reference to the target URL.
* Defines the target URI of the link.
*/
@Prop() _href!: HrefPropType;

Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/components/tree-item/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ export class KolTreeItem implements TreeItemProps {
@Prop() _active?: OpenPropType;

/**
* Defines the label of the link.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
@Prop() _label!: LabelPropType;

/**
* If set (to true) opens/expands the element, closes if not set (or set to false).
* Opens/expands the element when truthy, closes/collapses when falsy.
*/
@Prop() _open?: OpenPropType;

/**
* This property is used for a link from a reference to the target URL.
* Defines the target URI of the link.
*/
@Prop() _href!: HrefPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tree/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class KolTreeWc implements TreeAPI {
private treeItemElements?: HTMLKolTreeItemElement[];

/**
* Defines the label of the tree.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
@Prop() _label!: LabelPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tree/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { KolTreeWcTag } from '../../core/component-names';
})
export class KolTree implements TreeProps {
/**
* Defines the label of the tree.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
@Prop() _label!: LabelPropType;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/access-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { watchString } from '../utils';
export type AccessKeyPropType = string;

/**
* Defines the elements access key.
* Defines which key combination can be used to trigger or focus the interactive element of the component.
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey
*/
export type PropAccessKey = {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/align.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const alignPropTypeOptions = [...horizontalAlignOptions, ...verticalAlign
export type AlignPropType = HorizontalAlign | VerticalAlign;

/**
* Defines where to show the element preferably: top, right, bottom or left.
* Defines the visual orientation of the component: top, right, bottom or left.
*/
export type PropAlign = {
align: AlignPropType;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/href.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { watchString } from '../utils';
export type HrefPropType = string;

/**
* This property is used for a link from a reference to the target URL.
* Defines the target URI of the link.
*/
export type PropHref = {
href: HrefPropType;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function containsOnlyNumbers(str: string): boolean {
}

/**
* Defines the type of the label property.
* Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).
*/
export type LabelPropType = string;

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { watchBoolean } from '../utils';
export type OpenPropType = boolean;

/**
* If set (to true) opens/expands the element, closes if not set (or set to false).
* Opens/expands the element when truthy, closes/collapses when falsy.
*/
export type PropOpen = {
open: OpenPropType;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/schema/props/short-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { watchString } from '../utils';
export type ShortKeyPropType = string;

/**
* Defines the elements short key.
* Adds a visual short key hint to the component.
*/
export type PropShortKey = {
shortKey: ShortKeyPropType;
Expand Down

0 comments on commit 34351ef

Please sign in to comment.