Skip to content

Commit 2c2d1dd

Browse files
committed
docs: add descriptions to interfaces
1 parent 6f45a02 commit 2c2d1dd

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

packages/uui-base/lib/mixins/ActiveMixin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import { property } from 'lit/decorators.js';
44
type Constructor<T = {}> = new (...args: any[]) => T;
55

66
export declare class ActiveMixinInterface {
7+
/**
8+
* Set this boolean to true for then the related composition is sorted.
9+
* @type {boolean}
10+
* @attr
11+
* @prop
12+
*/
713
active: boolean;
814
}
915

packages/uui-base/lib/mixins/SelectableMixin.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,21 @@ import { UUISelectableEvent } from '../events/UUISelectableEvent';
66
type Constructor<T = {}> = new (...args: any[]) => T;
77

88
export declare class SelectableMixinInterface extends LitElement {
9+
/**
10+
* Enable the ability to select this element.
11+
* @attr
12+
* @prop
13+
* @type boolean
14+
*/
915
selectable: boolean;
1016
deselectable: boolean;
17+
18+
/**
19+
* Attribute applied when the element is selected.
20+
* @attr
21+
* @prop
22+
* @type boolean
23+
*/
1124
selected: boolean;
1225
selectableTarget: EventTarget;
1326
}

packages/uui-button/lib/uui-button.element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export type UUIButtonType = 'submit' | 'button' | 'reset';
3131
* @slot - for default content
3232
* @slot label - for label content
3333
* @slot extra - for extra
34+
* @property {string} label - label to be used for aria-label and potentially as visual label for some components
35+
* @attribute label - label to be used for aria-label and potentially as visual label for some components
3436
* @description - All-around button
3537
* @cssprop --uui-button-height - overwrite the button height
3638
* @cssprop --uui-button-border-width - overwrite the border width
@@ -52,7 +54,6 @@ export type UUIButtonType = 'submit' | 'button' | 'reset';
5254
@defineElement('uui-button')
5355
export class UUIButtonElement extends UUIFormControlMixin(
5456
LabelMixin('', PopoverTargetMixin(LitElement)),
55-
undefined,
5657
) {
5758
/**
5859
* Specifies the type of button

packages/uui-input/lib/uui-input.element.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export type InputType =
3131
* @slot append - for components to render to the right of the input.
3232
* @property {boolean} spellcheck - get/set native spellcheck attribute
3333
* @attribute spellcheck - native spellcheck attribute
34+
* @property {string} value - get/set the value of the input
35+
* @attribute value - get/set the value of the input
36+
* @property {string} name - get/set the name of the input
37+
* @attribute name - get/set the name of the input
3438
* @fires UUIInputEvent#change on change
3539
* @fires InputEvent#input on input
3640
* @fires KeyboardEvent#keyup on keyup
@@ -77,7 +81,7 @@ export class UUIInputElement extends UUIFormControlMixin(
7781

7882
/**
7983
* Minlength validation message.
80-
* @attr
84+
* @attr minlength-message
8185
* @default
8286
*/
8387
@property({ type: String, attribute: 'minlength-message' })
@@ -104,7 +108,7 @@ export class UUIInputElement extends UUIFormControlMixin(
104108

105109
/**
106110
* Maxlength validation message.
107-
* @attr
111+
* @attr maxlength-message
108112
* @default
109113
*/
110114
@property({ type: String, attribute: 'maxlength-message' })
@@ -158,7 +162,7 @@ export class UUIInputElement extends UUIFormControlMixin(
158162
/**
159163
* Sets the input width to fit the value or placeholder if empty
160164
* @type {boolean}
161-
* @attr
165+
* @attr auto-width
162166
*/
163167
@property({ type: Boolean, reflect: true, attribute: 'auto-width' })
164168
autoWidth = false;

packages/uui-menu-item/lib/uui-menu-item.element.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ import { UUIMenuItemEvent } from './UUIMenuItemEvent';
2323
* @cssprop --uui-menu-item-color-active - text color when active
2424
* @cssprop --uui-menu-item-background-color-disabled - background color when disabled
2525
* @cssprop --uui-menu-item-color-disabled - text color when disabled
26-
* @cssprop --uui-menu-item-background-color-selected - background color when selected
26+
* @cssprop --uui-menu-item-background-color-selected - background color when selected
2727
* @cssprop --uui-menu-item-color-selected - text color when selected
2828
* @cssprop --uui-menu-item-color-background-selected-hover - text color when selected
2929
* @fires {UUIMenuItemEvent} show-children - fires when the expand icon is clicked to show nested menu items
3030
* @fires {UUIMenuItemEvent} hide-children - fires when the expend icon is clicked to hide nested menu items
3131
* @fires {UUIMenuItemEvent} click-label - fires when the label is clicked
32+
* @fires {UUISelectableEvent} selected - fires when the media card is selected
33+
* @fires {UUISelectableEvent} deselected - fires when the media card is deselected
3234
* @slot - nested menu items go here
3335
* @slot icon - icon area
3436
* @slot actions - actions area
@@ -50,7 +52,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
5052
/**
5153
* Controls if nested items should be shown.
5254
* @type {boolean}
53-
* @attr
55+
* @attr show-children
5456
* @default false
5557
*/
5658
@property({ type: Boolean, reflect: true, attribute: 'show-children' })
@@ -60,7 +62,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
6062
/**
6163
* Shows/hides the caret.
6264
* @type {boolean}
63-
* @attr
65+
* @attr has-children
6466
* @default false
6567
*/
6668
@property({ type: Boolean, attribute: 'has-children' })
@@ -105,7 +107,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
105107
/**
106108
* Sets the selection mode.
107109
* @type {string}
108-
* @attr
110+
* @attr select-mode
109111
* @default undefined
110112
*/
111113
@property({ type: String, attribute: 'select-mode', reflect: true })
@@ -114,7 +116,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
114116
/**
115117
* Sets the aria-label for the caret button.
116118
* @remark Only used when the menu item has children.
117-
* @attr
119+
* @attr caret-label
118120
* @default 'Reveal the underlying items'
119121
*/
120122
@property({ type: String, attribute: 'caret-label' })

0 commit comments

Comments
 (0)