@aquera/nile-elements 0.1.35-beta-1.0 → 0.1.35-beta-1.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 +7 -0
- package/demo/variables.css +13 -0
- package/demo/variables_v2.css +13 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/nile-filter-chip/index.cjs.js +2 -0
- package/dist/nile-filter-chip/index.cjs.js.map +1 -0
- package/dist/nile-filter-chip/index.esm.js +1 -0
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +2 -0
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -0
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +2 -0
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -0
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +98 -0
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +34 -0
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +2 -0
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -0
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +20 -0
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-filter-chip/index.d.ts +1 -0
- package/dist/src/nile-filter-chip/index.js +2 -0
- package/dist/src/nile-filter-chip/index.js.map +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.d.ts +12 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +110 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +35 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.js +128 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.test.d.ts +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js +80 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.js +1 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -1
- package/src/nile-filter-chip/index.ts +1 -0
- package/src/nile-filter-chip/nile-filter-chip.css.ts +115 -0
- package/src/nile-filter-chip/nile-filter-chip.test.ts +92 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +125 -0
- package/src/nile-select/nile-select.ts +1 -1
- package/vscode-html-custom-data.json +47 -3
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.1.35-beta-1.
|
6
|
+
"version": "0.1.35-beta-1.2",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -37,6 +37,7 @@
|
|
37
37
|
"./nile-textarea": "./dist/src/nile-textarea/index.js",
|
38
38
|
"./nile-date-picker": "./dist/src/nile-date-picker/index.js",
|
39
39
|
"./nile-error-message": "./dist/src/nile-error-message/index.js",
|
40
|
+
"./nile-filter-chip": "./dist/src/nile-filter-chip/index.js",
|
40
41
|
"./nile-form-error-message": "./dist/src/nile-form-error-message/index.js",
|
41
42
|
"./nile-form-help-text": "./dist/src/nile-form-help-text/index.js",
|
42
43
|
"./nile-calendar": "./dist/src/nile-calendar/index.js",
|
@@ -84,7 +85,6 @@
|
|
84
85
|
"./nile-section-message": "./dist/src/nile-section-message/index.js",
|
85
86
|
"./nile-toolbar": "./dist/src/nile-toolbar/index.js",
|
86
87
|
"./nile-inline-edit": "./dist/src/nile-inline-edit/index.js",
|
87
|
-
"./nile-tour": "./dist/src/nile-tour/index.js",
|
88
88
|
"./nile-table": "./dist/src/nile-table/index.js"
|
89
89
|
},
|
90
90
|
"scripts": {
|
package/src/index.ts
CHANGED
@@ -75,4 +75,5 @@ export { NileTitle } from './nile-title';
|
|
75
75
|
export { NileSectionMessage } from './nile-section-message';
|
76
76
|
export { NileToolbar } from './nile-toolbar';
|
77
77
|
export { NileInlineEdit } from './nile-inline-edit';
|
78
|
-
export { NileTable } from './nile-table';
|
78
|
+
export { NileTable } from './nile-table';
|
79
|
+
export { NileFilterChip } from './nile-filter-chip';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileFilterChip } from './nile-filter-chip';
|
@@ -0,0 +1,115 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {css} from 'lit';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* FilterChip CSS
|
12
|
+
*/
|
13
|
+
|
14
|
+
export const styles = css`
|
15
|
+
|
16
|
+
|
17
|
+
.filter-chips {
|
18
|
+
display: flex;
|
19
|
+
align-items: center;
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
.chip {
|
24
|
+
display: inline-flex;
|
25
|
+
align-items: center;
|
26
|
+
padding: 4px 8px;
|
27
|
+
border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);
|
28
|
+
border-radius: 4px;
|
29
|
+
font-size: 14px;
|
30
|
+
background-color: var(--nile-filter-chip-background-default);
|
31
|
+
color: var(--nile-filter-chip-text-default);
|
32
|
+
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
33
|
+
cursor: pointer;
|
34
|
+
gap: 6px;
|
35
|
+
margin-right: 6px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.chip:hover {
|
39
|
+
background-color: var(--nile-filter-chip-hover-background);
|
40
|
+
}
|
41
|
+
|
42
|
+
.chip:active {
|
43
|
+
background-color: var(--nile-filter-chip-active-background);
|
44
|
+
border-color: var(--nile-filter-chip-active-border-color-stroke);
|
45
|
+
}
|
46
|
+
|
47
|
+
.icon {
|
48
|
+
color: var(--nile-filter-chip-icon-color-default);
|
49
|
+
display: flex;
|
50
|
+
align-items: center;
|
51
|
+
justify-content: center;
|
52
|
+
vertical-align: middle;
|
53
|
+
position: relative;
|
54
|
+
top: 12px;
|
55
|
+
}
|
56
|
+
|
57
|
+
.label {
|
58
|
+
font-weight: 500;
|
59
|
+
color: var(--nile-filter-chip-label-color-default);
|
60
|
+
}
|
61
|
+
|
62
|
+
nile-badge::part(base) {
|
63
|
+
width: auto;
|
64
|
+
height: 14px;
|
65
|
+
border-radius: 100px;
|
66
|
+
padding: 6px;
|
67
|
+
gap: 10px;
|
68
|
+
font-size: 8px;
|
69
|
+
display: inline-flex;
|
70
|
+
align-items: center;
|
71
|
+
justify-content: center;
|
72
|
+
line-height: 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
.chip-container {
|
76
|
+
display: flex;
|
77
|
+
justify-content: space-between;
|
78
|
+
align-items: center;
|
79
|
+
width: 100%;
|
80
|
+
}
|
81
|
+
|
82
|
+
.clear-all-container {
|
83
|
+
margin-left: 18px;
|
84
|
+
white-space: nowrap;
|
85
|
+
cursor: pointer;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
.value {
|
90
|
+
color: var(--nile-filter-chip-values-color-default);
|
91
|
+
overflow: hidden;
|
92
|
+
text-overflow: ellipsis;
|
93
|
+
white-space: nowrap;
|
94
|
+
max-width: 140px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.close-icon {
|
98
|
+
color: var(--nile-filter-chip-close-icon-color-default);
|
99
|
+
cursor: pointer;
|
100
|
+
display: flex;
|
101
|
+
align-items: center;
|
102
|
+
padding: 2px;
|
103
|
+
border-radius: 50%;
|
104
|
+
transition: background-color 0.2s;
|
105
|
+
}
|
106
|
+
|
107
|
+
.close-icon:hover {
|
108
|
+
background-color: var(--nile-filter-chip-close-icon-hover-background);
|
109
|
+
color: var(--nile-filter-chip-close-icon-hover-color);
|
110
|
+
}
|
111
|
+
`;
|
112
|
+
|
113
|
+
export default [styles];
|
114
|
+
|
115
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { fixture, expect, html, oneEvent } from '@open-wc/testing';
|
2
|
+
import './nile-filter-chip';
|
3
|
+
import { NileFilterChip } from './nile-filter-chip';
|
4
|
+
|
5
|
+
describe('<nile-filter-chip>', () => {
|
6
|
+
afterEach(() => {
|
7
|
+
(NileFilterChip as any).activeChips = [];
|
8
|
+
});
|
9
|
+
|
10
|
+
it('registers and unregisters itself in activeChips', async () => {
|
11
|
+
const el = await fixture<NileFilterChip>(html`
|
12
|
+
<nile-filter-chip label="L" text="T"></nile-filter-chip>
|
13
|
+
`);
|
14
|
+
expect((NileFilterChip as any).activeChips).to.include(el);
|
15
|
+
el.remove();
|
16
|
+
await el.updateComplete;
|
17
|
+
expect((NileFilterChip as any).activeChips).to.not.include(el);
|
18
|
+
});
|
19
|
+
|
20
|
+
it('renders fallback label and text', async () => {
|
21
|
+
const el = await fixture<NileFilterChip>(html`
|
22
|
+
<nile-filter-chip label="MyLabel" text="MyText"></nile-filter-chip>
|
23
|
+
`);
|
24
|
+
const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;
|
25
|
+
const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;
|
26
|
+
expect(label.textContent).to.equal('MyLabel:');
|
27
|
+
expect(value.textContent!.trim()).to.equal('MyText');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('renders slotted label and value over fallback', async () => {
|
31
|
+
const el = await fixture<NileFilterChip>(html`
|
32
|
+
<nile-filter-chip>
|
33
|
+
<span slot="label">SLOT-LBL</span>
|
34
|
+
<span slot="value">SLOT-VAL</span>
|
35
|
+
</nile-filter-chip>
|
36
|
+
`);
|
37
|
+
const slottedLabel = el.querySelector('[slot="label"]')! as HTMLElement;
|
38
|
+
const slottedValue = el.querySelector('[slot="value"]')! as HTMLElement;
|
39
|
+
expect(slottedLabel.textContent).to.equal('SLOT-LBL');
|
40
|
+
expect(slottedValue.textContent).to.equal('SLOT-VAL');
|
41
|
+
});
|
42
|
+
|
43
|
+
it('renders an icon when the `icon` property is set', async () => {
|
44
|
+
const el = await fixture<NileFilterChip>(html`
|
45
|
+
<nile-filter-chip icon="★" label="L" text="T"></nile-filter-chip>
|
46
|
+
`);
|
47
|
+
const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;
|
48
|
+
expect(iconSpan).to.exist;
|
49
|
+
expect(iconSpan.textContent).to.equal('★');
|
50
|
+
});
|
51
|
+
|
52
|
+
it('does not render a badge when extraCount is zero', async () => {
|
53
|
+
const el = await fixture<NileFilterChip>(html`
|
54
|
+
<nile-filter-chip extraCount="0" label="L" text="T"></nile-filter-chip>
|
55
|
+
`);
|
56
|
+
expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;
|
57
|
+
});
|
58
|
+
|
59
|
+
it('renders a +badge when extraCount > 0', async () => {
|
60
|
+
const el = await fixture<NileFilterChip>(html`
|
61
|
+
<nile-filter-chip extraCount="5" label="L" text="T"></nile-filter-chip>
|
62
|
+
`);
|
63
|
+
const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;
|
64
|
+
expect(badge).to.exist;
|
65
|
+
expect(badge.textContent).to.contain('+5');
|
66
|
+
});
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
it('dispatches `nile-click` on chip click', async () => {
|
71
|
+
const el = await fixture<NileFilterChip>(html`
|
72
|
+
<nile-filter-chip label="L" text="T"></nile-filter-chip>
|
73
|
+
`);
|
74
|
+
const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;
|
75
|
+
setTimeout(() => chip.click());
|
76
|
+
const ev = await oneEvent(el, 'nile-click');
|
77
|
+
expect(ev.detail).to.deep.equal({ text: 'T', extraCount: 0 });
|
78
|
+
});
|
79
|
+
|
80
|
+
it('dispatches `nile-close` on close icon click and removes itself', async () => {
|
81
|
+
const el = await fixture<NileFilterChip>(html`
|
82
|
+
<nile-filter-chip closable extraCount="2" text="TT"></nile-filter-chip>
|
83
|
+
`);
|
84
|
+
const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;
|
85
|
+
setTimeout(() => closeIcon.click());
|
86
|
+
const ev = await oneEvent(el, 'nile-close');
|
87
|
+
expect(ev.detail).to.deep.equal({ text: 'TT', extraCount: 2 });
|
88
|
+
expect(document.body.contains(el)).to.be.false;
|
89
|
+
});
|
90
|
+
|
91
|
+
|
92
|
+
});
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
3
|
+
import NileElement from '../internal/nile-element';
|
4
|
+
import { styles } from './nile-filter-chip.css';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Nile filter-chip component.
|
8
|
+
*
|
9
|
+
* @tag nile-filter-chip
|
10
|
+
*/
|
11
|
+
@customElement('nile-filter-chip')
|
12
|
+
export class NileFilterChip extends NileElement {
|
13
|
+
@property({ type: String }) label = '';
|
14
|
+
@property({ type: String }) text = '';
|
15
|
+
@property({ type: Number }) extraCount: number = 0;
|
16
|
+
@property({ type: Boolean }) editable = false;
|
17
|
+
@property({ type: Boolean }) closable = false;
|
18
|
+
@property({ type: String }) icon = '';
|
19
|
+
@property({ type: String }) removeIcon = '';
|
20
|
+
|
21
|
+
private static activeChips: NileFilterChip[] = [];
|
22
|
+
|
23
|
+
public static get styles(): CSSResultArray {
|
24
|
+
return [styles];
|
25
|
+
}
|
26
|
+
|
27
|
+
connectedCallback() {
|
28
|
+
super.connectedCallback();
|
29
|
+
this.registerChip();
|
30
|
+
}
|
31
|
+
|
32
|
+
disconnectedCallback() {
|
33
|
+
super.disconnectedCallback();
|
34
|
+
this.unregisterChip();
|
35
|
+
}
|
36
|
+
|
37
|
+
private registerChip() {
|
38
|
+
NileFilterChip.activeChips.push(this);
|
39
|
+
}
|
40
|
+
|
41
|
+
private unregisterChip() {
|
42
|
+
NileFilterChip.activeChips = NileFilterChip.activeChips.filter(
|
43
|
+
(chip) => chip !== this
|
44
|
+
);
|
45
|
+
}
|
46
|
+
|
47
|
+
private handleClose(event: Event) {
|
48
|
+
event.stopPropagation();
|
49
|
+
this.dispatchEvent(
|
50
|
+
new CustomEvent('nile-close', { detail: { text: this.text, extraCount: this.extraCount } })
|
51
|
+
);
|
52
|
+
this.remove();
|
53
|
+
}
|
54
|
+
|
55
|
+
private handleClick() {
|
56
|
+
this.dispatchEvent(
|
57
|
+
new CustomEvent('nile-click', { detail: { text: this.text, extraCount: this.extraCount } })
|
58
|
+
);
|
59
|
+
}
|
60
|
+
|
61
|
+
private getLabelSlot(): TemplateResult {
|
62
|
+
return html`
|
63
|
+
<slot name="label">
|
64
|
+
<span class="label">${this.label}:</span>
|
65
|
+
</slot>
|
66
|
+
`;
|
67
|
+
}
|
68
|
+
|
69
|
+
private getValueSlot(): TemplateResult {
|
70
|
+
return html`
|
71
|
+
<slot name="value">
|
72
|
+
<span class="value">${this.text}</span>
|
73
|
+
</slot>
|
74
|
+
`;
|
75
|
+
}
|
76
|
+
|
77
|
+
private getExtraCountSlot(): TemplateResult {
|
78
|
+
return html`
|
79
|
+
<slot name="suffix">
|
80
|
+
${this.extraCount
|
81
|
+
? html`
|
82
|
+
<nile-badge variant="primary" pilltype="pill-color">
|
83
|
+
+${this.extraCount}
|
84
|
+
</nile-badge>
|
85
|
+
`
|
86
|
+
: html``}
|
87
|
+
</slot>
|
88
|
+
`;
|
89
|
+
}
|
90
|
+
|
91
|
+
private getCloseIconSlot(): TemplateResult {
|
92
|
+
return html`
|
93
|
+
${this.closable
|
94
|
+
? html`
|
95
|
+
<span class="close-icon" @click="${this.handleClose}">
|
96
|
+
<nile-icon name="${this.removeIcon || 'close'}" size="12"></nile-icon>
|
97
|
+
</span>
|
98
|
+
`
|
99
|
+
: html``}
|
100
|
+
`;
|
101
|
+
}
|
102
|
+
|
103
|
+
public render(): TemplateResult {
|
104
|
+
return html`
|
105
|
+
<div class="chip" @click="${this.handleClick}">
|
106
|
+
<slot name="icon">
|
107
|
+
${this.icon ? html`<span class="icon">${this.icon}</span>` : html``}
|
108
|
+
</slot>
|
109
|
+
${this.getLabelSlot()}
|
110
|
+
<slot name="content"></slot>
|
111
|
+
${this.getValueSlot()}
|
112
|
+
${this.getExtraCountSlot()}
|
113
|
+
${this.getCloseIconSlot()}
|
114
|
+
</div>
|
115
|
+
`;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
export default NileFilterChip;
|
120
|
+
|
121
|
+
declare global {
|
122
|
+
interface HTMLElementTagNameMap {
|
123
|
+
'nile-filter-chip': NileFilterChip;
|
124
|
+
}
|
125
|
+
}
|
@@ -161,7 +161,7 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
161
161
|
/** Allows more than one option to be selected. */
|
162
162
|
@property({ type: Boolean, reflect: true }) multiple = false;
|
163
163
|
|
164
|
-
@property({ attribute:
|
164
|
+
@property({ attribute: true, reflect: true }) helpText = '';
|
165
165
|
|
166
166
|
@property({ attribute: 'error-message', reflect: true }) errorMessage = '';
|
167
167
|
|
@@ -1405,6 +1405,50 @@
|
|
1405
1405
|
}
|
1406
1406
|
]
|
1407
1407
|
},
|
1408
|
+
{
|
1409
|
+
"name": "nile-filter-chip",
|
1410
|
+
"description": "Nile filter-chip component.\n\nEvents:\n\n * `nile-close` {`CustomEvent<{ text: string; extraCount: number; }>`} - \n\n * `nile-click` {`CustomEvent<{ text: string; extraCount: number; }>`} - \n\nAttributes:\n\n * `label` {`string`} - \n\n * `text` {`string`} - \n\n * `extraCount` {`number`} - \n\n * `editable` {`boolean`} - \n\n * `closable` {`boolean`} - \n\n * `icon` {`string`} - \n\n * `removeIcon` {`string`} - \n\nProperties:\n\n * `label` {`string`} - \n\n * `text` {`string`} - \n\n * `extraCount` {`number`} - \n\n * `editable` {`boolean`} - \n\n * `closable` {`boolean`} - \n\n * `icon` {`string`} - \n\n * `removeIcon` {`string`} - \n\n * `activeChips` {`NileFilterChip[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
1411
|
+
"attributes": [
|
1412
|
+
{
|
1413
|
+
"name": "label",
|
1414
|
+
"description": "`label` {`string`} - \n\nProperty: label\n\nDefault: "
|
1415
|
+
},
|
1416
|
+
{
|
1417
|
+
"name": "text",
|
1418
|
+
"description": "`text` {`string`} - \n\nProperty: text\n\nDefault: "
|
1419
|
+
},
|
1420
|
+
{
|
1421
|
+
"name": "extraCount",
|
1422
|
+
"description": "`extraCount` {`number`} - \n\nProperty: extraCount\n\nDefault: 0"
|
1423
|
+
},
|
1424
|
+
{
|
1425
|
+
"name": "editable",
|
1426
|
+
"description": "`editable` {`boolean`} - \n\nProperty: editable\n\nDefault: false",
|
1427
|
+
"valueSet": "v"
|
1428
|
+
},
|
1429
|
+
{
|
1430
|
+
"name": "closable",
|
1431
|
+
"description": "`closable` {`boolean`} - \n\nProperty: closable\n\nDefault: false",
|
1432
|
+
"valueSet": "v"
|
1433
|
+
},
|
1434
|
+
{
|
1435
|
+
"name": "icon",
|
1436
|
+
"description": "`icon` {`string`} - \n\nProperty: icon\n\nDefault: "
|
1437
|
+
},
|
1438
|
+
{
|
1439
|
+
"name": "removeIcon",
|
1440
|
+
"description": "`removeIcon` {`string`} - \n\nProperty: removeIcon\n\nDefault: "
|
1441
|
+
},
|
1442
|
+
{
|
1443
|
+
"name": "onnile-close",
|
1444
|
+
"description": "`nile-close` {`CustomEvent<{ text: string; extraCount: number; }>`} - "
|
1445
|
+
},
|
1446
|
+
{
|
1447
|
+
"name": "onnile-click",
|
1448
|
+
"description": "`nile-click` {`CustomEvent<{ text: string; extraCount: number; }>`} - "
|
1449
|
+
}
|
1450
|
+
]
|
1451
|
+
},
|
1408
1452
|
{
|
1409
1453
|
"name": "nile-footer",
|
1410
1454
|
"description": "Nile icon component.\n\n",
|
@@ -2747,7 +2791,7 @@
|
|
2747
2791
|
},
|
2748
2792
|
{
|
2749
2793
|
"name": "nile-select",
|
2750
|
-
"description": "Events:\n\n * `nile-change` {} - Emitted when the control's value changes.\n\n * `nile-clear` {} - Emitted when the control's value is cleared.\n\n * `nile-input` {} - Emitted when the control receives input.\n\n * `nile-focus` {} - Emitted when the control gains focus.\n\n * `nile-blur` {} - Emitted when the control loses focus.\n\n * `nile-show` {} - Emitted when the select's menu opens.\n\n * `nile-after-show` {} - Emitted after the select's menu opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the select's menu closes.\n\n * `nile-after-hide` {} - Emitted after the select's menu closes and all animations are complete.\n\n * `nile-invalid` {} - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\nSlots:\n\n * ` ` {} - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.\n\n * `label` {} - The input's label. Alternatively, you can use the `label` attribute.\n\n * `prefix` {} - Used to prepend a presentational icon or similar element to the combobox.\n\n * `clear-icon` {} - An icon to use in lieu of the default clear icon.\n\n * `expand-icon` {} - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n\n * `help-text` {} - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\nAttributes:\n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internal-search-placeholder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`boolean`} - Allows more than one option to be selected.\n\n * `
|
2794
|
+
"description": "Events:\n\n * `nile-change` {} - Emitted when the control's value changes.\n\n * `nile-clear` {} - Emitted when the control's value is cleared.\n\n * `nile-input` {} - Emitted when the control receives input.\n\n * `nile-focus` {} - Emitted when the control gains focus.\n\n * `nile-blur` {} - Emitted when the control loses focus.\n\n * `nile-show` {} - Emitted when the select's menu opens.\n\n * `nile-after-show` {} - Emitted after the select's menu opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the select's menu closes.\n\n * `nile-after-hide` {} - Emitted after the select's menu closes and all animations are complete.\n\n * `nile-invalid` {} - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\nSlots:\n\n * ` ` {} - The listbox options. Must be `<nile-option>` elements. You can use `<nile-divider>` to group items visually.\n\n * `label` {} - The input's label. Alternatively, you can use the `label` attribute.\n\n * `prefix` {} - Used to prepend a presentational icon or similar element to the combobox.\n\n * `clear-icon` {} - An icon to use in lieu of the default clear icon.\n\n * `expand-icon` {} - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n\n * `help-text` {} - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\nAttributes:\n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internal-search-placeholder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`boolean`} - Allows more than one option to be selected.\n\n * `helpText` {`string`} - \n\n * `error-message` {`string`} - \n\n * `warning` {`boolean`} - Sets the input to a warning state, changing its visual appearance.\n\n * `error` {`boolean`} - Sets the input to an error state, changing its visual appearance.\n\n * `success` {`boolean`} - Sets the input to a success state, changing its visual appearance.\n\n * `max-options-visible` {`number`} - The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.\n\n * `clearable` {`boolean`} - Adds a clear button when the select is not empty.\n\n * `open` {`boolean`} - Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.\n\n * `hoist` {`boolean`} - Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `filled` {`boolean`} - Draws a filled select.\n\n * `pill` {`boolean`} - Draws a pill-style select with rounded edges.\n\n * `label` {`string`} - The select's label. If you need to display HTML, use the `label` slot instead.\n\n * `placement` {`\"top\" | \"bottom\"`} - The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.\n\n * `showSelected` {`boolean`} - \n\n * `showNoResults` {`boolean`} - \n\n * `noResultsMessage` {`string`} - \n\n * `name` {`string`} - The name of the select, submitted as a name/value pair with form data.\n\n * `value` {`string | string[]`} - The current value of the select, submitted as a name/value pair with form data. When `multiple` is enabled, the\nvalue will be a space-delimited list of values based on the options selected.\n\n * `disabled` {`boolean`} - Disables the select control.\n\n * `form` {`string`} - By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.\n\n * `required` {`boolean`} - The select's required attribute.\n\nProperties:\n\n * `styles` - \n\n * `formControlController` - \n\n * `hasSlotController` - \n\n * `typeToSelectString` {`string`} - \n\n * `typeToSelectTimeout` {`number`} - \n\n * `popup` - \n\n * `combobox` {`HTMLSlotElement`} - \n\n * `displayInput` {`HTMLInputElement`} - \n\n * `valueInput` {`HTMLInputElement`} - \n\n * `listbox` {`HTMLSlotElement`} - \n\n * `hasFocus` {`boolean`} - \n\n * `displayLabel` {`string`} - \n\n * `currentOption` - \n\n * `selectedOptions` {`NileOption[]`} - \n\n * `oldValue` {`string | string[]`} - \n\n * `size` {`\"medium\" | \"small\" | \"large\"`} - The select's size.\n\n * `placeholder` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchValue` {`string`} - Placeholder text to show as a hint when the select is empty.\n\n * `searchEnabled` {`boolean`} - \n\n * `internalSearchPlaceHolder` {`string`} - \n\n * `blockValueChange` {`boolean`} - \n\n * `disableLocalSearch` {`boolean`} - \n\n * `optionsLoading` {`boolean`} - \n\n * `noWidthSync` {`boolean`} - \n\n * `multiple` {`boolean`} - Allows more than one option to be selected.\n\n * `helpText` {`string`} - \n\n * `errorMessage` {`string`} - \n\n * `warning` {`boolean`} - Sets the input to a warning state, changing its visual appearance.\n\n * `error` {`boolean`} - Sets the input to an error state, changing its visual appearance.\n\n * `success` {`boolean`} - Sets the input to a success state, changing its visual appearance.\n\n * `maxOptionsVisible` {`number`} - The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.\n\n * `clearable` {`boolean`} - Adds a clear button when the select is not empty.\n\n * `open` {`boolean`} - Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.\n\n * `hoist` {`boolean`} - Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `filled` {`boolean`} - Draws a filled select.\n\n * `pill` {`boolean`} - Draws a pill-style select with rounded edges.\n\n * `label` {`string`} - The select's label. If you need to display HTML, use the `label` slot instead.\n\n * `placement` {`\"top\" | \"bottom\"`} - The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.\n\n * `showSelected` {`boolean`} - \n\n * `oldMaxOptionsVisible` {`number`} - \n\n * `showNoResults` {`boolean`} - \n\n * `noResultsMessage` {`string`} - \n\n * `name` {`string`} - The name of the select, submitted as a name/value pair with form data.\n\n * `value` {`string | string[]`} - The current value of the select, submitted as a name/value pair with form data. When `multiple` is enabled, the\nvalue will be a space-delimited list of values based on the options selected.\n\n * `disabled` {`boolean`} - Disables the select control.\n\n * `defaultValue` {`string | string[]`} - The default value of the form control. Primarily used for resetting the form control.\n\n * `defaultChecked` {`boolean | undefined`} - \n\n * `form` {`string`} - By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.\n\n * `pattern` {`string | undefined`} - \n\n * `min` {`string | number | Date | undefined`} - \n\n * `max` {`string | number | Date | undefined`} - \n\n * `step` {`number | \"any\" | undefined`} - \n\n * `required` {`boolean`} - The select's required attribute.\n\n * `minlength` {`number | undefined`} - \n\n * `maxlength` {`number | undefined`} - \n\n * `validity` {`ValidityState`} - Gets the validity state object\n\n * `validationMessage` {`string`} - Gets the validation message\n\n * `checkValidity` - \n\n * `getForm` - \n\n * `reportValidity` - \n\n * `setCustomValidity` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
2751
2795
|
"attributes": [
|
2752
2796
|
{
|
2753
2797
|
"name": "size",
|
@@ -2803,8 +2847,8 @@
|
|
2803
2847
|
"valueSet": "v"
|
2804
2848
|
},
|
2805
2849
|
{
|
2806
|
-
"name": "
|
2807
|
-
"description": "`
|
2850
|
+
"name": "helpText",
|
2851
|
+
"description": "`helpText` {`string`} - \n\nProperty: helpText\n\nDefault: "
|
2808
2852
|
},
|
2809
2853
|
{
|
2810
2854
|
"name": "error-message",
|