@aquera/nile-elements 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.js +185 -93
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +8 -0
- package/dist/nile-card/nile-card.cjs.js +1 -1
- package/dist/nile-card/nile-card.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.css.cjs.js +1 -1
- package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.css.esm.js +63 -2
- package/dist/nile-card/nile-card.esm.js +10 -4
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/index.esm.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js.map +1 -1
- package/dist/nile-color-picker/nile-color-picker.esm.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/index.esm.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js.map +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.esm.js +1 -1
- package/dist/nile-menu/nile-menu.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.esm.js +1 -1
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.esm.js +8 -0
- package/dist/nile-menu-item/nile-menu-item.esm.js +11 -2
- package/dist/src/nile-calendar/nile-calendar.css.js +8 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-card/nile-card.css.js +61 -0
- package/dist/src/nile-card/nile-card.css.js.map +1 -1
- package/dist/src/nile-card/nile-card.d.ts +17 -1
- package/dist/src/nile-card/nile-card.js +92 -4
- package/dist/src/nile-card/nile-card.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.js +1 -1
- package/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.css.js +8 -0
- package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.d.ts +5 -2
- package/dist/src/nile-menu-item/nile-menu-item.js +25 -9
- package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +8 -0
- package/src/nile-card/nile-card.css.ts +61 -0
- package/src/nile-card/nile-card.ts +87 -4
- package/src/nile-menu/nile-menu.ts +1 -1
- package/src/nile-menu-item/nile-menu-item.css.ts +8 -0
- package/src/nile-menu-item/nile-menu-item.ts +26 -9
- package/vscode-html-custom-data.json +26 -7
package/package.json
CHANGED
|
@@ -99,6 +99,7 @@ export const styles = css`
|
|
|
99
99
|
font-style: normal;
|
|
100
100
|
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-sm));
|
|
101
101
|
line-height: var(--nile-line-height-20px, var(--ng-line-height-text-sm));
|
|
102
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
102
103
|
text-align: center;
|
|
103
104
|
width: 100%;
|
|
104
105
|
height: var(--nile-width-32px, var(--ng-width-10));
|
|
@@ -432,6 +433,12 @@ export const styles = css`
|
|
|
432
433
|
width: 125px;
|
|
433
434
|
}
|
|
434
435
|
|
|
436
|
+
.time-input::part(input),
|
|
437
|
+
.manual-input::part(input) {
|
|
438
|
+
padding: var(--nile-spacing-lg, var(--ng-spacing-md))
|
|
439
|
+
var(--nile-spacing-lg, var(--ng-spacing-md));
|
|
440
|
+
}
|
|
441
|
+
|
|
435
442
|
/* New Styles */
|
|
436
443
|
|
|
437
444
|
nile-dropdown[open] > span[slot='trigger'] .calendar-header__caret {
|
|
@@ -453,6 +460,7 @@ export const styles = css`
|
|
|
453
460
|
display: flex;
|
|
454
461
|
align-items: center;
|
|
455
462
|
gap: 6px;
|
|
463
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
456
464
|
font-family: var(
|
|
457
465
|
--nile-font-family-serif-colfax-medium,
|
|
458
466
|
var(--ng-font-family-body)
|
|
@@ -91,6 +91,32 @@ export const styles = css`
|
|
|
91
91
|
box-shadow: var(--ng-shadow-xs);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/* on a skipOn element, hover appearance - grey */
|
|
95
|
+
.card--skip-active:active {
|
|
96
|
+
background-color: var(--ng-colors-bg-primary-hover);
|
|
97
|
+
box-shadow: var(--nile-box-shadow-7, var(--ng-shadow-sm));
|
|
98
|
+
outline: solid 1px var(--border-color);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* skipOn element */
|
|
102
|
+
.card--skip-active:active .card__footer {
|
|
103
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));
|
|
104
|
+
box-shadow: var(--ng-shadow-sm);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* On active card, the skipOn elements will show active card color(blue) on card body*/
|
|
108
|
+
.card--active.card--skip-active:active {
|
|
109
|
+
background: var(--ng-colors-bg-brand-primary);
|
|
110
|
+
box-shadow: var(--ng-shadow-xs);
|
|
111
|
+
outline: solid var(--nile-outline-0-5px) var(--border-color);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* On active card, the skipOn elements will show active card color(blue) card footer*/
|
|
115
|
+
.card--active.card--skip-active:active .card__footer {
|
|
116
|
+
background: var(--ng-colors-bg-brand-primary);
|
|
117
|
+
box-shadow: var(--ng-shadow-xs);
|
|
118
|
+
}
|
|
119
|
+
|
|
94
120
|
|
|
95
121
|
.card:not(.card--has-footer) .card__footer {
|
|
96
122
|
display: none;
|
|
@@ -128,6 +154,41 @@ export const styles = css`
|
|
|
128
154
|
pointer-events: none;
|
|
129
155
|
}
|
|
130
156
|
|
|
157
|
+
|
|
158
|
+
.card--container {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
justify-items: stretch;
|
|
162
|
+
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
163
|
+
outline: solid var(--nile-outline-0-5px, var(--ng-outline-0-5px)) var(--nile-card-color-border, var(--ng-colors-border-secondary));
|
|
164
|
+
border: solid var(--nile-outline-1px, var(--ng-outline-1px)) var(--nile-card-color-border, var(--ng-colors-border-secondary));
|
|
165
|
+
border-radius: var(--border-radius);
|
|
166
|
+
min-width: 273px;
|
|
167
|
+
max-width: 350px;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-xs));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.container--hover {
|
|
173
|
+
box-shadow: var(--nile-box-shadow-7, var(--ng-shadow-sm));
|
|
174
|
+
outline: solid 1px var(--nile-card-color-border, var(--ng-colors-border-secondary));
|
|
175
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.container--hover .card__footer {
|
|
179
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));
|
|
180
|
+
box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-sm));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.container--disabled {
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
opacity: 0.5;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.container--disabled .card__footer {
|
|
189
|
+
pointer-events: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
131
192
|
`;
|
|
132
193
|
|
|
133
194
|
export default [styles];
|
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
html,
|
|
11
11
|
CSSResultArray,
|
|
12
12
|
TemplateResult,
|
|
13
|
+
PropertyValues,
|
|
13
14
|
} from 'lit';
|
|
14
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
15
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
15
16
|
import { styles } from './nile-card.css';
|
|
16
17
|
import { classMap } from 'lit/directives/class-map.js';
|
|
17
18
|
import { HasSlotController } from '../internal/slot';
|
|
@@ -30,18 +31,100 @@ export class NileCard extends NileElements {
|
|
|
30
31
|
|
|
31
32
|
private readonly hasSlotController = new HasSlotController(this, 'footer');
|
|
32
33
|
|
|
34
|
+
private readonly _internals: ElementInternals = this.attachInternals();
|
|
35
|
+
|
|
33
36
|
@property({ type: Boolean, reflect: true })active = false;
|
|
34
37
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
38
|
+
@property({ type: String, reflect: true }) variant: 'default' | 'container' = 'default';
|
|
39
|
+
@property({ type: String, attribute: true, reflect: true }) skipOn = '';
|
|
40
|
+
|
|
41
|
+
/** Reactive states used by the `container` variant. */
|
|
42
|
+
@state() private _hover = false;
|
|
43
|
+
@state() private _active = false;
|
|
44
|
+
@state() private _disabled = false;
|
|
45
|
+
|
|
46
|
+
/** Set the `hover` state on pointer enter (container variant only). */
|
|
47
|
+
private handlePointerEnter = () => {
|
|
48
|
+
if (this.variant === 'container') {
|
|
49
|
+
this._hover = true;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
private handlePointerLeave = () => {
|
|
54
|
+
this._hover = false;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
private setCustomState(name: string, on: boolean) {
|
|
58
|
+
if (on) {
|
|
59
|
+
this._internals.states.add(name);
|
|
60
|
+
} else {
|
|
61
|
+
this._internals.states.delete(name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private syncCustomStates() {
|
|
66
|
+
this.setCustomState('hover', this._hover);
|
|
67
|
+
this.setCustomState('active', this._active);
|
|
68
|
+
this.setCustomState('disabled', this._disabled);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
updated(changedProperties: PropertyValues) {
|
|
72
|
+
super.updated(changedProperties);
|
|
73
|
+
if (
|
|
74
|
+
changedProperties.has('variant') ||
|
|
75
|
+
changedProperties.has('active') ||
|
|
76
|
+
changedProperties.has('disabled')
|
|
77
|
+
) {
|
|
78
|
+
const isContainer = this.variant === 'container';
|
|
79
|
+
this._active = isContainer && this.active;
|
|
80
|
+
this._disabled = isContainer && this.disabled;
|
|
81
|
+
if (!isContainer) {
|
|
82
|
+
this._hover = false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
this.syncCustomStates();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private get base(): HTMLElement | null {
|
|
89
|
+
return this.renderRoot?.querySelector('.card') ?? null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private handlePointerDown = (event: PointerEvent) => {
|
|
93
|
+
if (!this.skipOn) return;
|
|
94
|
+
let skip = false;
|
|
95
|
+
try {
|
|
96
|
+
skip = event
|
|
97
|
+
.composedPath()
|
|
98
|
+
.some(node => node instanceof Element && node.matches(this.skipOn));
|
|
99
|
+
} catch {
|
|
100
|
+
skip = false;
|
|
101
|
+
}
|
|
102
|
+
this.base?.classList.toggle('card--skip-active', skip);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
private handlePointerEnd = () => {
|
|
106
|
+
this.base?.classList.remove('card--skip-active');
|
|
107
|
+
};
|
|
35
108
|
|
|
36
109
|
render() {
|
|
37
110
|
return html`
|
|
38
111
|
<div
|
|
39
112
|
part="base"
|
|
113
|
+
@mouseenter=${this.handlePointerEnter}
|
|
114
|
+
@mouseleave=${this.handlePointerLeave}
|
|
115
|
+
@pointerdown=${this.handlePointerDown}
|
|
116
|
+
@pointerup=${this.handlePointerEnd}
|
|
117
|
+
@pointerleave=${this.handlePointerEnd}
|
|
118
|
+
@pointercancel=${this.handlePointerEnd}
|
|
40
119
|
class=${classMap({
|
|
41
|
-
card:
|
|
120
|
+
card: this.variant !== 'container',
|
|
42
121
|
'card--has-footer': this.hasSlotController.test('footer'),
|
|
43
|
-
'card--active': this.active,
|
|
44
|
-
'card--disabled': this.disabled,
|
|
122
|
+
'card--active': this.variant !== 'container' && this.active,
|
|
123
|
+
'card--disabled': this.variant !== 'container' && this.disabled,
|
|
124
|
+
'card--container': this.variant === 'container',
|
|
125
|
+
'container--hover': this._hover,
|
|
126
|
+
'container--active': this._active,
|
|
127
|
+
'container--disabled': this._disabled,
|
|
45
128
|
})}
|
|
46
129
|
>
|
|
47
130
|
<div class="body__wrapper" part="body__wrapper"
|
|
@@ -125,6 +125,14 @@ export const styles = css`
|
|
|
125
125
|
visibility: visible;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
.menu-item .menu-item__checkbox {
|
|
129
|
+
flex: 0 0 auto;
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
margin-inline-end: var(--nile-font-size-rem-xsmall, var(--ng-spacing-md));
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
128
136
|
@media (forced-colors: active) {
|
|
129
137
|
:host(:hover:not([aria-disabled='true'])) .menu-item,
|
|
130
138
|
:host(:focus-visible) .menu-item {
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { customElement, property } from 'lit/decorators.js';
|
|
15
15
|
import { styles } from './nile-menu-item.css';
|
|
16
16
|
import '../nile-icon';
|
|
17
|
+
import '../nile-checkbox';
|
|
17
18
|
import { classMap } from 'lit/directives/class-map.js';
|
|
18
19
|
import { query } from 'lit/decorators.js';
|
|
19
20
|
import { getTextContent } from '../internal/slot';
|
|
@@ -53,8 +54,13 @@ export class NileMenuItem extends NileElement {
|
|
|
53
54
|
|
|
54
55
|
@query('.menu-item') menuItem: HTMLElement;
|
|
55
56
|
|
|
56
|
-
/** The type of menu item to render. To use `checked`, this value must be set to `checkbox
|
|
57
|
-
@property() type: 'normal' | 'checkbox' = 'normal';
|
|
57
|
+
/** The type of menu item to render. To use `checked`, this value must be set to `checkbox` or `multiple` (both render a checkbox and behave identically). */
|
|
58
|
+
@property() type: 'normal' | 'checkbox' | 'multiple' = 'normal';
|
|
59
|
+
|
|
60
|
+
/** Whether this item renders as a checkbox (true for both `checkbox` and `multiple` types). */
|
|
61
|
+
private get isCheckable(): boolean {
|
|
62
|
+
return this.type === 'checkbox' || this.type === 'multiple';
|
|
63
|
+
}
|
|
58
64
|
|
|
59
65
|
/** Draws the item in a checked state. */
|
|
60
66
|
@property({ type: Boolean, reflect: true }) checked = false;
|
|
@@ -108,18 +114,18 @@ export class NileMenuItem extends NileElement {
|
|
|
108
114
|
|
|
109
115
|
@watch('checked')
|
|
110
116
|
handleCheckedChange() {
|
|
111
|
-
// For proper accessibility, users have to use type="checkbox" to use the checked attribute
|
|
112
|
-
if (this.checked && this.
|
|
117
|
+
// For proper accessibility, users have to use type="checkbox" or type="multiple" to use the checked attribute
|
|
118
|
+
if (this.checked && !this.isCheckable) {
|
|
113
119
|
this.checked = false;
|
|
114
120
|
console.error(
|
|
115
|
-
'The checked attribute can only be used on menu items with type="checkbox"',
|
|
121
|
+
'The checked attribute can only be used on menu items with type="checkbox" or type="multiple"',
|
|
116
122
|
this
|
|
117
123
|
);
|
|
118
124
|
return;
|
|
119
125
|
}
|
|
120
126
|
|
|
121
|
-
// Only
|
|
122
|
-
if (this.
|
|
127
|
+
// Only checkable types can receive the aria-checked attribute
|
|
128
|
+
if (this.isCheckable) {
|
|
123
129
|
this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
|
124
130
|
} else {
|
|
125
131
|
this.removeAttribute('aria-checked');
|
|
@@ -133,7 +139,7 @@ export class NileMenuItem extends NileElement {
|
|
|
133
139
|
|
|
134
140
|
@watch('type')
|
|
135
141
|
handleTypeChange() {
|
|
136
|
-
if (this.
|
|
142
|
+
if (this.isCheckable) {
|
|
137
143
|
this.setAttribute('role', 'menuitemcheckbox');
|
|
138
144
|
this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
|
139
145
|
} else {
|
|
@@ -159,7 +165,18 @@ export class NileMenuItem extends NileElement {
|
|
|
159
165
|
'menu-item--has-submenu': this.hasSubMenu,
|
|
160
166
|
})}
|
|
161
167
|
>
|
|
162
|
-
|
|
168
|
+
${this.isCheckable
|
|
169
|
+
? html`
|
|
170
|
+
<nile-checkbox
|
|
171
|
+
part="checkbox"
|
|
172
|
+
class="menu-item__checkbox"
|
|
173
|
+
.checked=${this.checked}
|
|
174
|
+
.disabled=${this.disabled}
|
|
175
|
+
aria-hidden="true"
|
|
176
|
+
tabindex="-1"
|
|
177
|
+
></nile-checkbox>
|
|
178
|
+
`
|
|
179
|
+
: this.checked
|
|
163
180
|
? html`
|
|
164
181
|
<span part="checked-icon" class="menu-item__check">
|
|
165
182
|
<nile-icon
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
},
|
|
687
687
|
{
|
|
688
688
|
"name": "nile-card",
|
|
689
|
-
"description": "Nile icon component.\n\nAttributes:\n\n * `active` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\nProperties:\n\n * `styles` - \n\n * `hasSlotController` - \n\n * `active` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
689
|
+
"description": "Nile icon component.\n\nAttributes:\n\n * `active` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `variant` {`\"default\" | \"container\"`} - \n\n * `skipOn` {`string`} - \n\nProperties:\n\n * `styles` - \n\n * `hasSlotController` - \n\n * `_internals` - \n\n * `active` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `variant` {`\"default\" | \"container\"`} - \n\n * `skipOn` {`string`} - \n\n * `_hover` {`boolean`} - Reactive states used by the `container` variant.\n\n * `_active` {`boolean`} - \n\n * `_disabled` {`boolean`} - \n\n * `handlePointerEnter` - Set the `hover` state on pointer enter (container variant only).\n\n * `handlePointerLeave` - \n\n * `base` {`HTMLElement | null`} - \n\n * `handlePointerDown` - \n\n * `handlePointerEnd` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
690
690
|
"attributes": [
|
|
691
691
|
{
|
|
692
692
|
"name": "active",
|
|
@@ -697,6 +697,22 @@
|
|
|
697
697
|
"name": "disabled",
|
|
698
698
|
"description": "`disabled` {`boolean`} - \n\nProperty: disabled\n\nDefault: false",
|
|
699
699
|
"valueSet": "v"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "variant",
|
|
703
|
+
"description": "`variant` {`\"default\" | \"container\"`} - \n\nProperty: variant\n\nDefault: default",
|
|
704
|
+
"values": [
|
|
705
|
+
{
|
|
706
|
+
"name": "default"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"name": "container"
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "skipOn",
|
|
715
|
+
"description": "`skipOn` {`string`} - \n\nProperty: skipOn\n\nDefault: "
|
|
700
716
|
}
|
|
701
717
|
]
|
|
702
718
|
},
|
|
@@ -4378,17 +4394,20 @@
|
|
|
4378
4394
|
},
|
|
4379
4395
|
{
|
|
4380
4396
|
"name": "nile-menu-item",
|
|
4381
|
-
"description": "Nile icon component.\n\nSlots:\n\n * ` ` {} - The menu item's label.\n\n * `prefix` {} - Used to prepend an icon or similar element to the menu item.\n\n * `suffix` {} - Used to append an icon or similar element to the menu item.\n\nAttributes:\n\n * `type` {`\"normal\" | \"checkbox\"`} - The type of menu item to render. To use `checked`, this value must be set to `checkbox
|
|
4397
|
+
"description": "Nile icon component.\n\nSlots:\n\n * ` ` {} - The menu item's label.\n\n * `prefix` {} - Used to prepend an icon or similar element to the menu item.\n\n * `suffix` {} - Used to append an icon or similar element to the menu item.\n\nAttributes:\n\n * `type` {`\"normal\" | \"checkbox\" | \"multiple\"`} - The type of menu item to render. To use `checked`, this value must be set to `checkbox` or `multiple` (both render a checkbox and behave identically).\n\n * `checked` {`boolean`} - Draws the item in a checked state.\n\n * `value` {`string`} - A unique value to store in the menu item. This can be used as a way to identify menu items when selected.\n\n * `disabled` {`boolean`} - Draws the menu item in a disabled state, preventing selection.\n\n * `active` {`boolean`} - Draws the menu item in an active/selected state.\n\n * `hasSubMenu` {`boolean`} - Draws the item in a checked state.\n\nProperties:\n\n * `styles` - \n\n * `cachedTextLabel` {`string`} - \n\n * `defaultSlot` {`HTMLSlotElement`} - \n\n * `menuItem` {`HTMLElement`} - \n\n * `type` {`\"normal\" | \"checkbox\" | \"multiple\"`} - The type of menu item to render. To use `checked`, this value must be set to `checkbox` or `multiple` (both render a checkbox and behave identically).\n\n * `isCheckable` {`boolean`} - Whether this item renders as a checkbox (true for both `checkbox` and `multiple` types).\n\n * `checked` {`boolean`} - Draws the item in a checked state.\n\n * `value` {`string`} - A unique value to store in the menu item. This can be used as a way to identify menu items when selected.\n\n * `disabled` {`boolean`} - Draws the menu item in a disabled state, preventing selection.\n\n * `active` {`boolean`} - Draws the menu item in an active/selected state.\n\n * `hasSubMenu` {`boolean`} - Draws the item in a checked state.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
4382
4398
|
"attributes": [
|
|
4383
4399
|
{
|
|
4384
4400
|
"name": "type",
|
|
4385
|
-
"description": "`type` {`\"normal\" | \"checkbox\"`} - The type of menu item to render. To use `checked`, this value must be set to `checkbox
|
|
4401
|
+
"description": "`type` {`\"normal\" | \"checkbox\" | \"multiple\"`} - The type of menu item to render. To use `checked`, this value must be set to `checkbox` or `multiple` (both render a checkbox and behave identically).\n\nProperty: type\n\nDefault: normal",
|
|
4386
4402
|
"values": [
|
|
4387
4403
|
{
|
|
4388
4404
|
"name": "normal"
|
|
4389
4405
|
},
|
|
4390
4406
|
{
|
|
4391
4407
|
"name": "checkbox"
|
|
4408
|
+
},
|
|
4409
|
+
{
|
|
4410
|
+
"name": "multiple"
|
|
4392
4411
|
}
|
|
4393
4412
|
]
|
|
4394
4413
|
},
|
|
@@ -7553,17 +7572,17 @@
|
|
|
7553
7572
|
},
|
|
7554
7573
|
{
|
|
7555
7574
|
"name": "nile-tree",
|
|
7556
|
-
"description": "Events:\n\n * `nile-selection-change` - Emitted when a tree item is selected or deselected.\n\nSlots:\n\n * ` ` {} - The default slot.\n\n * `expand-icon` {} - The icon to show when the tree item is expanded. Works best with `<nile-icon>`.\n\n * `collapse-icon` {} - The icon to show when the tree item is collapsed. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `selection` {`\"
|
|
7575
|
+
"description": "Events:\n\n * `nile-selection-change` - Emitted when a tree item is selected or deselected.\n\nSlots:\n\n * ` ` {} - The default slot.\n\n * `expand-icon` {} - The icon to show when the tree item is expanded. Works best with `<nile-icon>`.\n\n * `collapse-icon` {} - The icon to show when the tree item is collapsed. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `selection` {`\"multiple\" | \"single\" | \"leaf\"`} - The selection behavior of the tree. Single selection allows only one node to be selected at a time. Multiple\ndisplays checkboxes and allows more than one node to be selected. Leaf allows only leaf nodes to be selected.\n\nProperties:\n\n * `styles` - \n\n * `defaultSlot` {`HTMLSlotElement`} - \n\n * `expandedIconSlot` {`HTMLSlotElement`} - \n\n * `collapsedIconSlot` {`HTMLSlotElement`} - \n\n * `selection` {`\"multiple\" | \"single\" | \"leaf\"`} - The selection behavior of the tree. Single selection allows only one node to be selected at a time. Multiple\ndisplays checkboxes and allows more than one node to be selected. Leaf allows only leaf nodes to be selected.\n\n * `lastFocusedItem` - \n\n * `mutationObserver` {`MutationObserver`} - \n\n * `clickTarget` - \n\n * `initTreeItem` - \n\n * `selectedItems` {`NileTreeItem[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
7557
7576
|
"attributes": [
|
|
7558
7577
|
{
|
|
7559
7578
|
"name": "selection",
|
|
7560
|
-
"description": "`selection` {`\"
|
|
7579
|
+
"description": "`selection` {`\"multiple\" | \"single\" | \"leaf\"`} - The selection behavior of the tree. Single selection allows only one node to be selected at a time. Multiple\ndisplays checkboxes and allows more than one node to be selected. Leaf allows only leaf nodes to be selected.\n\nProperty: selection\n\nDefault: leaf",
|
|
7561
7580
|
"values": [
|
|
7562
7581
|
{
|
|
7563
|
-
"name": "
|
|
7582
|
+
"name": "multiple"
|
|
7564
7583
|
},
|
|
7565
7584
|
{
|
|
7566
|
-
"name": "
|
|
7585
|
+
"name": "single"
|
|
7567
7586
|
},
|
|
7568
7587
|
{
|
|
7569
7588
|
"name": "leaf"
|