@aquera/nile-elements 0.1.35-beta-1.2 → 0.1.35-beta-1.3
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 +10 -28
- package/demo/index.css +4 -7
- package/demo/index.html +39 -20
- package/dist/{fixture-df8b52d7.esm.js → fixture-2b5b3aba.esm.js} +1 -1
- package/dist/{fixture-d5b55278.cjs.js → fixture-7bfb866e.cjs.js} +3 -3
- package/dist/fixture-7bfb866e.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/animate.esm.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.esm.js +4 -6
- package/dist/nile-error-message/nile-error-message.esm.js +4 -4
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +6 -6
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +12 -12
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- 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/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-table/nile-table.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/index.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +45 -78
- package/dist/nile-tooltip/nile-tooltip.esm.js +28 -23
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
- package/dist/src/nile-bob/index.d.ts +1 -0
- package/dist/src/nile-bob/index.js +2 -0
- package/dist/src/nile-bob/index.js.map +1 -0
- package/dist/src/nile-bob/nile-bob.css.d.ts +12 -0
- package/dist/src/nile-bob/nile-bob.css.js +17 -0
- package/dist/src/nile-bob/nile-bob.css.js.map +1 -0
- package/dist/src/nile-bob/nile-bob.d.ts +32 -0
- package/dist/src/nile-bob/nile-bob.js +43 -0
- package/dist/src/nile-bob/nile-bob.js.map +1 -0
- package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +275 -0
- package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
- package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
- package/dist/src/nile-error-message/nile-error-message.css.js +4 -6
- package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.d.ts +0 -4
- package/dist/src/nile-error-message/nile-error-message.js +0 -20
- package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
- package/dist/src/nile-fileupload/index.d.ts +1 -0
- package/dist/src/nile-fileupload/index.js +2 -0
- package/dist/src/nile-fileupload/index.js.map +1 -0
- package/dist/src/nile-fileupload/nile-fileupload.css.d.ts +12 -0
- package/dist/src/nile-fileupload/nile-fileupload.css.js +17 -0
- package/dist/src/nile-fileupload/nile-fileupload.css.js.map +1 -0
- package/dist/src/nile-fileupload/nile-fileupload.d.ts +32 -0
- package/dist/src/nile-fileupload/nile-fileupload.js +43 -0
- package/dist/src/nile-fileupload/nile-fileupload.js.map +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +2 -2
- package/dist/src/nile-filter-chip/nile-filter-chip.js +8 -8
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js +7 -7
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
- package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
- package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
- package/dist/src/nile-icon/icons/svg/new-calendar.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/new-calendar.js +5 -0
- package/dist/src/nile-icon/icons/svg/new-calendar.js.map +1 -0
- package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
- package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js +0 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
- package/dist/src/nile-revan/index.d.ts +1 -0
- package/dist/src/nile-revan/index.js +2 -0
- package/dist/src/nile-revan/index.js.map +1 -0
- package/dist/src/nile-revan/nile-revan.css.d.ts +12 -0
- package/dist/src/nile-revan/nile-revan.css.js +17 -0
- package/dist/src/nile-revan/nile-revan.css.js.map +1 -0
- package/dist/src/nile-revan/nile-revan.d.ts +32 -0
- package/dist/src/nile-revan/nile-revan.js +43 -0
- package/dist/src/nile-revan/nile-revan.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/src/nile-table/nile-table.js.map +1 -1
- package/dist/src/nile-test/index.d.ts +1 -0
- package/dist/src/nile-test/index.js +2 -0
- package/dist/src/nile-test/index.js.map +1 -0
- package/dist/src/nile-test/nile-test.css.d.ts +12 -0
- package/dist/src/nile-test/nile-test.css.js +17 -0
- package/dist/src/nile-test/nile-test.css.js.map +1 -0
- package/dist/src/nile-test/nile-test.d.ts +34 -0
- package/dist/src/nile-test/nile-test.js +179 -0
- package/dist/src/nile-test/nile-test.js.map +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.css.js +43 -76
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +46 -24
- package/dist/src/nile-tooltip/nile-tooltip.js +232 -235
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/index.ts +1 -1
- package/src/nile-error-message/nile-error-message.css.ts +4 -6
- package/src/nile-error-message/nile-error-message.ts +0 -18
- package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
- package/src/nile-filter-chip/nile-filter-chip.css.ts +1 -1
- package/src/nile-filter-chip/nile-filter-chip.test.ts +7 -7
- package/src/nile-filter-chip/nile-filter-chip.ts +7 -7
- package/src/nile-progress-bar/nile-progress-bar.css.ts +0 -1
- package/src/nile-select/nile-select.ts +1 -1
- package/src/nile-table/nile-table.ts +2 -2
- package/src/nile-tooltip/nile-tooltip.css.ts +44 -77
- package/src/nile-tooltip/nile-tooltip.ts +230 -268
- package/vscode-html-custom-data.json +100 -100
- package/dist/fixture-d5b55278.cjs.js.map +0 -1
- package/dist/nile-tooltip/nile-tooltip-utils.cjs.js +0 -2
- package/dist/nile-tooltip/nile-tooltip-utils.cjs.js.map +0 -1
- package/dist/nile-tooltip/nile-tooltip-utils.esm.js +0 -1
- package/dist/nile-tooltip/nile-tooltip.test.cjs.js +0 -2
- package/dist/nile-tooltip/nile-tooltip.test.cjs.js.map +0 -1
- package/dist/nile-tooltip/nile-tooltip.test.esm.js +0 -47
- package/src/nile-tooltip/nile-tooltip-utils.ts +0 -271
- package/src/nile-tooltip/nile-tooltip.test.ts +0 -168
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.3",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -37,7 +37,6 @@
|
|
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",
|
41
40
|
"./nile-form-error-message": "./dist/src/nile-form-error-message/index.js",
|
42
41
|
"./nile-form-help-text": "./dist/src/nile-form-help-text/index.js",
|
43
42
|
"./nile-calendar": "./dist/src/nile-calendar/index.js",
|
@@ -85,7 +84,9 @@
|
|
85
84
|
"./nile-section-message": "./dist/src/nile-section-message/index.js",
|
86
85
|
"./nile-toolbar": "./dist/src/nile-toolbar/index.js",
|
87
86
|
"./nile-inline-edit": "./dist/src/nile-inline-edit/index.js",
|
88
|
-
"./nile-
|
87
|
+
"./nile-tour": "./dist/src/nile-tour/index.js",
|
88
|
+
"./nile-table": "./dist/src/nile-table/index.js",
|
89
|
+
"./nile-filter-chip": "./dist/src/nile-filter-chip/index.js"
|
89
90
|
},
|
90
91
|
"scripts": {
|
91
92
|
"analyze": "cem analyze --litelement",
|
@@ -189,4 +190,4 @@
|
|
189
190
|
"prettier --write"
|
190
191
|
]
|
191
192
|
}
|
192
|
-
}
|
193
|
+
}
|
package/src/index.ts
CHANGED
@@ -76,4 +76,4 @@ export { NileSectionMessage } from './nile-section-message';
|
|
76
76
|
export { NileToolbar } from './nile-toolbar';
|
77
77
|
export { NileInlineEdit } from './nile-inline-edit';
|
78
78
|
export { NileTable } from './nile-table';
|
79
|
-
export { NileFilterChip } from './nile-filter-chip';
|
79
|
+
export { NileFilterChip } from './nile-filter-chip';
|
@@ -16,11 +16,11 @@ export const styles = css`
|
|
16
16
|
|
17
17
|
.nile-error-message {
|
18
18
|
width: 100%;
|
19
|
+
word-break: break-all;
|
19
20
|
font-size: var(--nile-font-size-small);
|
20
21
|
letter-spacing: 0.2px;
|
21
22
|
font-weight: var(--nile-font-weight-regular);
|
22
23
|
line-height: var(--nile-font-size-small);
|
23
|
-
max-width: var(--nile-error-max-width, 535px);
|
24
24
|
}
|
25
25
|
|
26
26
|
.nile-error-message__error {
|
@@ -32,8 +32,6 @@ export const styles = css`
|
|
32
32
|
color: var(--nile-colors-dark-500);
|
33
33
|
margin-top:6px;
|
34
34
|
line-height: 16px;
|
35
|
-
max-height: var(--nile-error-max-height, 48px);
|
36
|
-
overflow-x: auto;
|
37
35
|
}
|
38
36
|
|
39
37
|
.nile-error-message__icon {
|
@@ -56,7 +54,7 @@ export const styles = css`
|
|
56
54
|
border: 1px solid var(--nile-colors-red-500);
|
57
55
|
border-left: 6px solid var(--nile-colors-red-500);
|
58
56
|
border-radius: 4px;
|
59
|
-
margin-top:
|
57
|
+
margin-top: 12px;
|
60
58
|
padding: 12px;
|
61
59
|
background: var(--nile-colors-neutral-100);
|
62
60
|
}
|
@@ -83,10 +81,10 @@ export const styles = css`
|
|
83
81
|
}
|
84
82
|
|
85
83
|
.nile-error-message__response-expanded.expanded {
|
86
|
-
max-height:
|
84
|
+
max-height: 100px;
|
87
85
|
transition: max-height 0.3s ease-in-out;
|
88
86
|
visibility: visible;
|
89
|
-
padding:
|
87
|
+
padding: 12px;
|
90
88
|
}
|
91
89
|
`;
|
92
90
|
|
@@ -32,12 +32,6 @@ export class NileErrorMessage extends LitElement {
|
|
32
32
|
@property({ type: Boolean })
|
33
33
|
isExpanded: boolean = false;
|
34
34
|
|
35
|
-
@property({ type: String }) maxWidth: string;
|
36
|
-
|
37
|
-
@property({ type: String }) maxHeight: string;
|
38
|
-
|
39
|
-
@property({ type: String }) maxDialogHeight: string;
|
40
|
-
|
41
35
|
// The maximum length before truncation.
|
42
36
|
private readonly MAX_LENGTH: number = 100;
|
43
37
|
|
@@ -52,18 +46,6 @@ export class NileErrorMessage extends LitElement {
|
|
52
46
|
return this.errorResponse;
|
53
47
|
}
|
54
48
|
|
55
|
-
updated(changedProperties: Map<string, any>) {
|
56
|
-
if (changedProperties.has('maxWidth')) {
|
57
|
-
this.style.setProperty('--nile-error-max-width', this.maxWidth);
|
58
|
-
}
|
59
|
-
if (changedProperties.has('maxHeight')) {
|
60
|
-
this.style.setProperty('--nile-error-max-height', this.maxHeight);
|
61
|
-
}
|
62
|
-
if (changedProperties.has('maxDialogHeight')) {
|
63
|
-
this.style.setProperty('--nile-error-max-dialog-height', this.maxDialogHeight);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
49
|
/**
|
68
50
|
* Toggle the expanded state of the error response.
|
69
51
|
*/
|
@@ -49,16 +49,16 @@ describe('<nile-filter-chip>', () => {
|
|
49
49
|
expect(iconSpan.textContent).to.equal('★');
|
50
50
|
});
|
51
51
|
|
52
|
-
it('does not render a badge when
|
52
|
+
it('does not render a badge when viewMoreCount is zero', async () => {
|
53
53
|
const el = await fixture<NileFilterChip>(html`
|
54
|
-
<nile-filter-chip
|
54
|
+
<nile-filter-chip viewMoreCount="0" label="L" text="T"></nile-filter-chip>
|
55
55
|
`);
|
56
56
|
expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;
|
57
57
|
});
|
58
58
|
|
59
|
-
it('renders a +badge when
|
59
|
+
it('renders a +badge when viewMoreCount > 0', async () => {
|
60
60
|
const el = await fixture<NileFilterChip>(html`
|
61
|
-
<nile-filter-chip
|
61
|
+
<nile-filter-chip viewMoreCount="5" label="L" text="T"></nile-filter-chip>
|
62
62
|
`);
|
63
63
|
const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;
|
64
64
|
expect(badge).to.exist;
|
@@ -74,17 +74,17 @@ describe('<nile-filter-chip>', () => {
|
|
74
74
|
const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;
|
75
75
|
setTimeout(() => chip.click());
|
76
76
|
const ev = await oneEvent(el, 'nile-click');
|
77
|
-
expect(ev.detail).to.deep.equal({ text: 'T',
|
77
|
+
expect(ev.detail).to.deep.equal({ text: 'T', viewMoreCount: 0 });
|
78
78
|
});
|
79
79
|
|
80
80
|
it('dispatches `nile-close` on close icon click and removes itself', async () => {
|
81
81
|
const el = await fixture<NileFilterChip>(html`
|
82
|
-
<nile-filter-chip closable
|
82
|
+
<nile-filter-chip closable viewMoreCount="2" text="TT"></nile-filter-chip>
|
83
83
|
`);
|
84
84
|
const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;
|
85
85
|
setTimeout(() => closeIcon.click());
|
86
86
|
const ev = await oneEvent(el, 'nile-close');
|
87
|
-
expect(ev.detail).to.deep.equal({ text: 'TT',
|
87
|
+
expect(ev.detail).to.deep.equal({ text: 'TT', viewMoreCount: 2 });
|
88
88
|
expect(document.body.contains(el)).to.be.false;
|
89
89
|
});
|
90
90
|
|
@@ -12,7 +12,7 @@ import { styles } from './nile-filter-chip.css';
|
|
12
12
|
export class NileFilterChip extends NileElement {
|
13
13
|
@property({ type: String }) label = '';
|
14
14
|
@property({ type: String }) text = '';
|
15
|
-
@property({ type: Number })
|
15
|
+
@property({ type: Number }) viewMoreCount: number = 0;
|
16
16
|
@property({ type: Boolean }) editable = false;
|
17
17
|
@property({ type: Boolean }) closable = false;
|
18
18
|
@property({ type: String }) icon = '';
|
@@ -47,14 +47,14 @@ export class NileFilterChip extends NileElement {
|
|
47
47
|
private handleClose(event: Event) {
|
48
48
|
event.stopPropagation();
|
49
49
|
this.dispatchEvent(
|
50
|
-
new CustomEvent('nile-close', { detail: { text: this.text,
|
50
|
+
new CustomEvent('nile-close', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })
|
51
51
|
);
|
52
52
|
this.remove();
|
53
53
|
}
|
54
54
|
|
55
55
|
private handleClick() {
|
56
56
|
this.dispatchEvent(
|
57
|
-
new CustomEvent('nile-click', { detail: { text: this.text,
|
57
|
+
new CustomEvent('nile-click', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })
|
58
58
|
);
|
59
59
|
}
|
60
60
|
|
@@ -74,13 +74,13 @@ export class NileFilterChip extends NileElement {
|
|
74
74
|
`;
|
75
75
|
}
|
76
76
|
|
77
|
-
private
|
77
|
+
private getviewMoreCountSlot(): TemplateResult {
|
78
78
|
return html`
|
79
79
|
<slot name="suffix">
|
80
|
-
${this.
|
80
|
+
${this.viewMoreCount
|
81
81
|
? html`
|
82
82
|
<nile-badge variant="primary" pilltype="pill-color">
|
83
|
-
+${this.
|
83
|
+
+${this.viewMoreCount}
|
84
84
|
</nile-badge>
|
85
85
|
`
|
86
86
|
: html``}
|
@@ -109,7 +109,7 @@ export class NileFilterChip extends NileElement {
|
|
109
109
|
${this.getLabelSlot()}
|
110
110
|
<slot name="content"></slot>
|
111
111
|
${this.getValueSlot()}
|
112
|
-
${this.
|
112
|
+
${this.getviewMoreCountSlot()}
|
113
113
|
${this.getCloseIconSlot()}
|
114
114
|
</div>
|
115
115
|
`;
|
@@ -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: 'help-text', reflect: true }) helpText = '';
|
165
165
|
|
166
166
|
@property({ attribute: 'error-message', reflect: true }) errorMessage = '';
|
167
167
|
|
@@ -74,7 +74,7 @@ export class NileTable extends NileElement {
|
|
74
74
|
handleBodyCssUpdate(){
|
75
75
|
if (this.rows.length<2) return;
|
76
76
|
const tableBodies = this.rows;
|
77
|
-
const firstEl=tableBodies[0].shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
77
|
+
const firstEl=tableBodies[0].shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
78
78
|
if(firstEl) {
|
79
79
|
firstEl.style.borderTopRightRadius="var(--nile-radius-radius-xl)";
|
80
80
|
firstEl.style.borderTopLeftRadius = 'var(--nile-radius-radius-xl)';
|
@@ -84,7 +84,7 @@ export class NileTable extends NileElement {
|
|
84
84
|
}
|
85
85
|
tableBodies.forEach((tb,i)=>{
|
86
86
|
if(i>0 && i<tableBodies.length-1){
|
87
|
-
const el=tb.shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
87
|
+
const el=tb.shadowRoot?.querySelector<HTMLDivElement>('div.base')
|
88
88
|
if(el) {
|
89
89
|
el.style.borderTopRightRadius="0px";
|
90
90
|
el.style.borderTopLeftRadius = "0px";
|
@@ -11,93 +11,60 @@ import { css } from 'lit';
|
|
11
11
|
* Tooltip CSS
|
12
12
|
*/
|
13
13
|
export const styles = css`
|
14
|
+
:host {
|
15
|
+
--max-width: 20rem;
|
16
|
+
--hide-delay: 0ms;
|
17
|
+
--show-delay: 150ms;
|
14
18
|
|
15
|
-
|
16
|
-
:host {
|
17
|
-
position: relative;
|
18
|
-
display: inline-block;
|
19
|
-
}
|
20
|
-
.tooltip {
|
21
|
-
position: fixed;
|
22
|
-
z-index: 1000;
|
23
|
-
background-color: var(--nile-tooltip-color-background, #333);
|
24
|
-
color: var(--nile-colors-white-base, #fff);
|
25
|
-
padding: 6px 10px;
|
26
|
-
border-radius: 4px;
|
27
|
-
font-size: var(--nile-tooltip-font-size-sm, 14px);
|
28
|
-
line-height: var(--nile-tooltip-line-height-sm, 1.5);
|
29
|
-
opacity: 0;
|
30
|
-
transition: opacity 0.2s, transform 0.2s;
|
31
|
-
pointer-events: none;
|
32
|
-
white-space: normal;
|
33
|
-
visibility: hidden;
|
34
|
-
overflow: visible;
|
35
|
-
|
36
|
-
}
|
37
|
-
:host([open]) .tooltip {
|
38
|
-
opacity: 1;
|
39
|
-
visibility: visible;
|
40
|
-
pointer-events: auto;
|
41
|
-
}
|
42
|
-
.tooltip-content {
|
43
|
-
overflow: auto;
|
44
|
-
max-width: 250px;
|
45
|
-
max-height: 116px;
|
46
|
-
}
|
47
|
-
.tooltip-caret {
|
48
|
-
position: absolute;
|
49
|
-
width: calc(2 * var(--caret-size, 6px));
|
50
|
-
height: calc(2 * var(--caret-size, 6px));
|
51
|
-
background-color: inherit;
|
52
|
-
transform: rotate(45deg);
|
53
|
-
z-index: -1;
|
54
|
-
}
|
55
|
-
.trigger-container {
|
56
|
-
display: inline-block;
|
57
|
-
}
|
58
|
-
|
59
|
-
|
60
|
-
:host([open]) .tooltip {
|
61
|
-
visibility: visible;
|
62
|
-
pointer-events: auto;
|
63
|
-
animation: fadeIn 150ms forwards;
|
64
|
-
}
|
65
|
-
|
66
|
-
|
67
|
-
.tooltip.hide {
|
68
|
-
animation: fadeOut 100ms forwards;
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
@keyframes fadeIn {
|
73
|
-
from {
|
74
|
-
opacity: 0;
|
75
|
-
transform: translateY(5px);
|
19
|
+
display: contents;
|
76
20
|
}
|
77
|
-
to {
|
78
|
-
opacity: 1;
|
79
|
-
transform: translateY(0);
|
80
|
-
}
|
81
|
-
}
|
82
21
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
opacity: 1;
|
87
|
-
transform: translateY(0);
|
22
|
+
.tooltip {
|
23
|
+
--arrow-size: 6px;
|
24
|
+
--arrow-color: var(--nile-tooltip-color-background);
|
88
25
|
}
|
89
|
-
|
90
|
-
|
91
|
-
|
26
|
+
|
27
|
+
.tooltip::part(popup) {
|
28
|
+
pointer-events: none;
|
29
|
+
z-index: 1000;
|
92
30
|
}
|
93
|
-
}
|
94
31
|
|
32
|
+
.tooltip[placement^='top']::part(popup) {
|
33
|
+
transform-origin: bottom;
|
34
|
+
}
|
95
35
|
|
36
|
+
.tooltip[placement^='bottom']::part(popup) {
|
37
|
+
transform-origin: top;
|
38
|
+
}
|
96
39
|
|
40
|
+
.tooltip[placement^='left']::part(popup) {
|
41
|
+
transform-origin: right;
|
42
|
+
}
|
97
43
|
|
44
|
+
.tooltip[placement^='right']::part(popup) {
|
45
|
+
transform-origin: left;
|
46
|
+
}
|
98
47
|
|
48
|
+
.tooltip__body {
|
49
|
+
display: block;
|
50
|
+
width: max-content;
|
51
|
+
max-width: var(--max-width);
|
52
|
+
border-radius: 4px;
|
53
|
+
background-color: var(--nile-tooltip-color-background);
|
54
|
+
font-size: var(--nile-tooltip-font-size-sm);
|
55
|
+
font-weight: var(--nile-tooltip-font-weight-sm);
|
56
|
+
line-height: var(--nile-tooltip-line-height-sm);
|
57
|
+
padding: var(--nile-tooltip-padding-y) var(--nile-tooltip-padding-x);
|
58
|
+
color: var(--nile-colors-white-base);
|
59
|
+
pointer-events: none;
|
60
|
+
word-break: break-word;
|
61
|
+
}
|
99
62
|
|
100
|
-
|
63
|
+
.tooltip__body--large {
|
64
|
+
font-size: var(--nile-tooltip-font-size-lg);
|
65
|
+
line-height: var(--nile-tooltip-line-height-lg);
|
66
|
+
font-weight: var(--nile-tooltip-font-weight-lg);
|
67
|
+
}
|
101
68
|
`;
|
102
69
|
|
103
|
-
export default [styles];
|
70
|
+
export default [styles];
|