@aquera/nile-elements 2.0.3 → 2.0.5
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 +21 -0
- package/demo/nxtgen-classes.css +596 -2
- package/demo/nxtgen-dark.css +240 -21
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +598 -4
- package/demo/nxtgen.css +57 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +458 -317
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.esm.js +28 -15
- package/dist/nile-combobox/nile-combobox.esm.js +11 -8
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js.map +1 -1
- package/dist/nile-combobox/portal-manager.esm.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js.map +1 -1
- package/dist/nile-combobox/renderer.esm.js +31 -43
- package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.css.esm.js +129 -6
- package/dist/nile-empty-state/nile-empty-state.esm.js +45 -31
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.esm.js +25 -25
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +1 -1
- package/dist/src/nile-combobox/nile-combobox.css.js +28 -15
- package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
- package/dist/src/nile-combobox/nile-combobox.js +49 -10
- package/dist/src/nile-combobox/nile-combobox.js.map +1 -1
- package/dist/src/nile-combobox/portal-manager.js +2 -22
- package/dist/src/nile-combobox/portal-manager.js.map +1 -1
- package/dist/src/nile-combobox/renderer.d.ts +2 -3
- package/dist/src/nile-combobox/renderer.js +14 -45
- package/dist/src/nile-combobox/renderer.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.css.js +127 -4
- package/dist/src/nile-empty-state/nile-empty-state.css.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +35 -5
- package/dist/src/nile-empty-state/nile-empty-state.js +159 -42
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.test.d.ts +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.test.js +186 -15
- package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.js +5 -5
- package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +11 -3
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/dist/xml-09119317.cjs.js +2 -0
- package/dist/xml-09119317.cjs.js.map +1 -0
- package/dist/{xml-25c4108a.esm.js → xml-9bf771b3.esm.js} +1 -1
- package/package.json +2 -1
- package/scripts/replace-version.cjs +12 -10
- package/src/nile-combobox/nile-combobox.css.ts +28 -15
- package/src/nile-combobox/nile-combobox.ts +61 -12
- package/src/nile-combobox/portal-manager.ts +4 -22
- package/src/nile-combobox/renderer.ts +26 -69
- package/src/nile-empty-state/nile-empty-state.css.ts +127 -4
- package/src/nile-empty-state/nile-empty-state.test.ts +192 -15
- package/src/nile-empty-state/nile-empty-state.ts +195 -34
- package/src/nile-pagination/nile-pagination.ts +5 -5
- package/src/version.ts +11 -2
- package/vscode-html-custom-data.json +79 -16
- package/dist/xml-90fd974e.cjs.js +0 -2
- package/dist/xml-90fd974e.cjs.js.map +0 -1
|
@@ -6,11 +6,74 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { html, nothing, CSSResultArray, TemplateResult } from 'lit';
|
|
9
|
-
import { customElement, property
|
|
9
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
10
10
|
import { classMap } from 'lit/directives/class-map.js';
|
|
11
11
|
import { styles } from './nile-empty-state.css';
|
|
12
12
|
import NileElement from '../internal/nile-element';
|
|
13
13
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
14
|
+
|
|
15
|
+
/** What happened. Selects an icon, tone, default copy and ARIA role. */
|
|
16
|
+
export type NileEmptyStateStatus =
|
|
17
|
+
| 'empty'
|
|
18
|
+
| 'no-results'
|
|
19
|
+
| 'not-found'
|
|
20
|
+
| 'no-access'
|
|
21
|
+
| 'error'
|
|
22
|
+
| 'offline';
|
|
23
|
+
|
|
24
|
+
/** How loud the state looks. Defaults from `status`, always overridable. */
|
|
25
|
+
export type NileEmptyStateTone = 'neutral' | 'info' | 'warning' | 'error';
|
|
26
|
+
|
|
27
|
+
/** What shape the state occupies. */
|
|
28
|
+
export type NileEmptyStateLayout = 'stack' | 'inline' | 'page';
|
|
29
|
+
|
|
30
|
+
interface StatusPreset {
|
|
31
|
+
icon: string;
|
|
32
|
+
tone: NileEmptyStateTone;
|
|
33
|
+
text: string;
|
|
34
|
+
subText: string;
|
|
35
|
+
role: 'status' | 'alert';
|
|
36
|
+
live: 'polite' | 'assertive';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const STATUS_PRESETS: Record<NileEmptyStateStatus, StatusPreset> = {
|
|
40
|
+
'empty': {
|
|
41
|
+
icon: 'ng-database', tone: 'neutral', role: 'status', live: 'polite',
|
|
42
|
+
text: 'No data yet', subText: `Rows appear here once there's something to show.`,
|
|
43
|
+
},
|
|
44
|
+
'no-results': {
|
|
45
|
+
icon: 'ng-search-lg', tone: 'neutral', role: 'status', live: 'polite',
|
|
46
|
+
text: 'No matches', subText: 'Try removing a filter or broadening your search.',
|
|
47
|
+
},
|
|
48
|
+
'not-found': {
|
|
49
|
+
icon: 'ng-file-06', tone: 'warning', role: 'status', live: 'polite',
|
|
50
|
+
text: `We couldn't find that`, subText: 'It may have been moved or deleted.',
|
|
51
|
+
},
|
|
52
|
+
'no-access': {
|
|
53
|
+
icon: 'ng-lock', tone: 'warning', role: 'status', live: 'polite',
|
|
54
|
+
text: `You don't have access`, subText: 'Ask an admin to grant you access to this resource.',
|
|
55
|
+
},
|
|
56
|
+
'error': {
|
|
57
|
+
icon: 'ng-alert-circle', tone: 'error', role: 'alert', live: 'assertive',
|
|
58
|
+
text: 'Something went wrong', subText: `We couldn't load this. Try again.`,
|
|
59
|
+
},
|
|
60
|
+
'offline': {
|
|
61
|
+
icon: 'ng-cloud-off', tone: 'error', role: 'alert', live: 'assertive',
|
|
62
|
+
text: 'Connection lost', subText: 'Check your connection and try again.',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const TONE_GLYPH_COLOR: Record<NileEmptyStateTone, string | undefined> = {
|
|
67
|
+
neutral: undefined,
|
|
68
|
+
info: 'var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600))',
|
|
69
|
+
warning: 'var(--nile-colors-yellow-700, var(--ng-colors-fg-warning-primary))',
|
|
70
|
+
error: 'var(--nile-colors-red-700, var(--ng-colors-fg-error-primary))',
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const DEFAULT_ICON = 'ng-x-circle';
|
|
74
|
+
const DEFAULT_TEXT = 'Empty State';
|
|
75
|
+
const DEFAULT_SUB_TEXT = 'No Data';
|
|
76
|
+
|
|
14
77
|
/**
|
|
15
78
|
* Nile empty-state component.
|
|
16
79
|
*
|
|
@@ -28,78 +91,175 @@ export class NileEmptyState extends NileElement {
|
|
|
28
91
|
return [styles];
|
|
29
92
|
}
|
|
30
93
|
|
|
31
|
-
@property() size: 'sm' | 'md' | 'lg'
|
|
94
|
+
@property({ type: String, attribute: true }) size: 'sm' | 'md' | 'lg' = 'md';
|
|
32
95
|
|
|
33
|
-
@property() variant:
|
|
96
|
+
@property({ type: String, attribute: true }) variant:
|
|
34
97
|
| 'flat'
|
|
35
98
|
| 'content'
|
|
36
99
|
| 'tonal' = 'tonal';
|
|
37
100
|
|
|
38
|
-
@property(
|
|
39
|
-
@property({type:
|
|
101
|
+
@property({ type: String, attribute: true, reflect: true }) status?: NileEmptyStateStatus;
|
|
102
|
+
@property({ type: String, attribute: true, reflect: true }) layout: NileEmptyStateLayout = 'stack';
|
|
103
|
+
@property({ type: String, attribute: true }) code?: string;
|
|
104
|
+
@property({ type: Boolean, attribute: true, reflect: true }) bordered: boolean = false;
|
|
105
|
+
@property({ type: String, attribute: true }) svgIconUrl: string;
|
|
106
|
+
/**
|
|
107
|
+
* Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,
|
|
108
|
+
* the SVG matches whatever size the current variant/layout draws at.
|
|
109
|
+
*/
|
|
110
|
+
@property({ type: Number, attribute: true }) svgIconSize?: number;
|
|
111
|
+
@property({ type: String, attribute: true }) svgIconColor: string;
|
|
112
|
+
|
|
113
|
+
private _icon?: string;
|
|
114
|
+
private _text?: string;
|
|
115
|
+
private _subText?: string;
|
|
116
|
+
private _tone?: NileEmptyStateTone;
|
|
117
|
+
@property({ type: String, attribute: true })
|
|
118
|
+
get icon(): string {
|
|
119
|
+
return this._icon ?? this.preset?.icon ?? DEFAULT_ICON;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
set icon(value: string | null) {
|
|
123
|
+
const old = this.icon;
|
|
124
|
+
this._icon = value ?? undefined;
|
|
125
|
+
this.requestUpdate('icon', old);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Headline. Resolves through the `status` preset to `DEFAULT_TEXT`. */
|
|
129
|
+
@property({ type: String, attribute: true })
|
|
130
|
+
get text(): string {
|
|
131
|
+
return this._text ?? this.preset?.text ?? DEFAULT_TEXT;
|
|
132
|
+
}
|
|
40
133
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
134
|
+
set text(value: string | null) {
|
|
135
|
+
const old = this.text;
|
|
136
|
+
this._text = value ?? undefined;
|
|
137
|
+
this.requestUpdate('text', old);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`. */
|
|
141
|
+
@property({ type: String, attribute: 'sub-text' })
|
|
142
|
+
get subText(): string {
|
|
143
|
+
return this._subText ?? this.preset?.subText ?? DEFAULT_SUB_TEXT;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
set subText(value: string | null) {
|
|
147
|
+
const old = this.subText;
|
|
148
|
+
this._subText = value ?? undefined;
|
|
149
|
+
this.requestUpdate('subText', old);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@property({ type: String, attribute: true, reflect: true })
|
|
153
|
+
get tone(): NileEmptyStateTone {
|
|
154
|
+
return this._tone ?? this.preset?.tone ?? 'neutral';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
set tone(value: NileEmptyStateTone | null) {
|
|
158
|
+
const old = this.tone;
|
|
159
|
+
this._tone = value ?? undefined;
|
|
160
|
+
this.requestUpdate('tone', old);
|
|
161
|
+
}
|
|
46
162
|
|
|
47
163
|
/* #endregion */
|
|
48
164
|
|
|
49
165
|
/* #region Methods */
|
|
50
166
|
|
|
167
|
+
/** The preset backing the current `status`, or undefined when none is set. */
|
|
168
|
+
private get preset(): StatusPreset | undefined {
|
|
169
|
+
return this.status ? STATUS_PRESETS[this.status] : undefined;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
private get glyphColor(): string | undefined {
|
|
173
|
+
return this.svgIconColor ?? TONE_GLYPH_COLOR[this.tone];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** ARIA wiring */
|
|
177
|
+
private get liveRegion(): { role: string; live: string } | undefined {
|
|
178
|
+
const preset = this.preset;
|
|
179
|
+
if (!preset) return undefined;
|
|
180
|
+
return { role: preset.role, live: preset.live };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
private renderGlyph(size: number | string): TemplateResult {
|
|
184
|
+
const color = this.glyphColor;
|
|
185
|
+
return this.svgIconUrl ? html`
|
|
186
|
+
<nile-glyph
|
|
187
|
+
customSvgPath="${this.svgIconUrl}"
|
|
188
|
+
size="${this.svgIconSize ?? size}"
|
|
189
|
+
method="stroke"
|
|
190
|
+
color="${ifDefined(color)}"
|
|
191
|
+
noFill
|
|
192
|
+
></nile-glyph>
|
|
193
|
+
` : html`
|
|
194
|
+
<nile-glyph
|
|
195
|
+
name="${this.icon}"
|
|
196
|
+
method="stroke"
|
|
197
|
+
size="${size}"
|
|
198
|
+
color="${ifDefined(color)}"
|
|
199
|
+
></nile-glyph>
|
|
200
|
+
`;
|
|
201
|
+
}
|
|
202
|
+
|
|
51
203
|
/**
|
|
52
204
|
* Render method
|
|
53
205
|
* @slot This is a slot test
|
|
54
206
|
*/
|
|
55
207
|
public render(): TemplateResult {
|
|
208
|
+
const live = this.liveRegion;
|
|
209
|
+
const inline = this.layout === 'inline';
|
|
210
|
+
|
|
56
211
|
return html`
|
|
57
212
|
<div part="container" class="${classMap({
|
|
58
213
|
'empty-state': true,
|
|
59
214
|
'empty-state--sm': this.size == 'sm',
|
|
60
215
|
'empty-state--md': this.size == 'md',
|
|
61
|
-
'empty-state--lg': this.size == 'lg'
|
|
62
|
-
|
|
216
|
+
'empty-state--lg': this.size == 'lg',
|
|
217
|
+
'empty-state--stack': this.layout === 'stack',
|
|
218
|
+
'empty-state--inline': inline,
|
|
219
|
+
'empty-state--page': this.layout === 'page',
|
|
220
|
+
'empty-state--bordered': this.bordered,
|
|
221
|
+
[`empty-state--tone-${this.tone}`]: true,
|
|
222
|
+
})}"
|
|
223
|
+
role="${ifDefined(live?.role)}"
|
|
224
|
+
aria-live="${ifDefined(live?.live)}"
|
|
225
|
+
>
|
|
63
226
|
<div part="body" class="${classMap({ 'empty-state__body': true })}">
|
|
64
227
|
|
|
65
|
-
${
|
|
228
|
+
${inline ? html`
|
|
229
|
+
<span part="inline-icon icon-chrome" class="empty-state__body--inline">
|
|
230
|
+
${this.renderGlyph(20)}
|
|
231
|
+
</span>` : nothing
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
${!inline && this.variant == 'content' ? html`
|
|
66
235
|
<div part="content-image" class="empty-state__body--content">
|
|
67
236
|
${!this.icon && !this.svgIconUrl ? nothing : html`
|
|
68
|
-
<div part="icon-wrapper" class="empty-state__img__icon">
|
|
69
|
-
${
|
|
70
|
-
|
|
71
|
-
<!-- <nile-icon customSvgPath="${this.svgIconUrl}" size="${this.svgIconSize}" color="${this.svgIconColor ? this.svgIconColor : '#ddd'}"></nile-icon> -->
|
|
72
|
-
` : html`
|
|
73
|
-
<nile-icon name="${this.icon}" color="white" size="${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}"></nile-icon>
|
|
74
|
-
`}
|
|
237
|
+
<div part="icon-wrapper icon-chrome" class="empty-state__img__icon">
|
|
238
|
+
${
|
|
239
|
+
this.renderGlyph(this.size == 'lg' ? 28 : 24)}
|
|
75
240
|
</div>`
|
|
76
241
|
}
|
|
77
242
|
</div>`: nothing
|
|
78
243
|
}
|
|
79
244
|
|
|
80
|
-
${this.variant == 'tonal' ? html`
|
|
81
|
-
<div part="tonal-body" class="empty-state__body--tonal">
|
|
82
|
-
${this.
|
|
83
|
-
<nile-icon customSvgPath="${this.svgIconUrl}" size="${this.svgIconSize}" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" color="${ifDefined(this.svgIconColor)}" noFill></nile-icon>
|
|
84
|
-
` : html`
|
|
85
|
-
<nile-icon name="${this.icon}" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="40"></nile-icon>
|
|
86
|
-
`}
|
|
245
|
+
${!inline && this.variant == 'tonal' ? html`
|
|
246
|
+
<div part="tonal-body icon-chrome" class="empty-state__body--tonal">
|
|
247
|
+
${this.renderGlyph(40)}
|
|
87
248
|
</div>`: nothing
|
|
88
249
|
}
|
|
89
250
|
|
|
90
|
-
${this.variant == 'flat' ? html`
|
|
251
|
+
${!inline && this.variant == 'flat' ? html`
|
|
91
252
|
<div part="flat-body" class="empty-state__body--flat">
|
|
92
|
-
<span class="nile-flat-type-icon">
|
|
93
|
-
${this.
|
|
94
|
-
<nile-icon customSvgPath="${this.svgIconUrl}" size="${this.svgIconSize}" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" variant="secondary" color="${ifDefined(this.svgIconColor)}" noFill></nile-icon>
|
|
95
|
-
` : html`
|
|
96
|
-
<nile-icon name="${this.icon}" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}" variant="secondary"></nile-icon>
|
|
97
|
-
`}
|
|
253
|
+
<span part="icon-chrome" class="nile-flat-type-icon">
|
|
254
|
+
${this.renderGlyph(this.size == 'lg' ? 28 : 24)}
|
|
98
255
|
</span>
|
|
99
256
|
</div>`: nothing
|
|
100
257
|
}
|
|
101
258
|
|
|
102
259
|
<div part="text-section" class="empty__state__text-section">
|
|
260
|
+
${this.code ? html`
|
|
261
|
+
<div part="code" class="empty-state__code">${this.code}</div>
|
|
262
|
+
` : nothing}
|
|
103
263
|
<div part="text" class="empty-state__text">${this.text}</div>
|
|
104
264
|
<div part="subtitle" class="empty-state__subtext">${this.subText}</div>
|
|
105
265
|
</div>
|
|
@@ -108,6 +268,7 @@ export class NileEmptyState extends NileElement {
|
|
|
108
268
|
<div part="actions" class="empty-state-actions">
|
|
109
269
|
<slot></slot>
|
|
110
270
|
</div>
|
|
271
|
+
|
|
111
272
|
</div>
|
|
112
273
|
`;
|
|
113
274
|
}
|
|
@@ -141,7 +141,7 @@ private renderCompactRangeText(): TemplateResult {
|
|
|
141
141
|
></nile-icon>
|
|
142
142
|
</nile-button>
|
|
143
143
|
<nile-menu>
|
|
144
|
-
<div class="down-scroll-wrapper">
|
|
144
|
+
<div part="dropdown-list" class="down-scroll-wrapper">
|
|
145
145
|
${this.pageSizeOptions.map(
|
|
146
146
|
size => html`
|
|
147
147
|
<nile-menu-item
|
|
@@ -185,7 +185,7 @@ private renderCompactRangeText(): TemplateResult {
|
|
|
185
185
|
></nile-icon>
|
|
186
186
|
</nile-button>
|
|
187
187
|
<nile-menu>
|
|
188
|
-
<div class="compact-scroll-wrapper">
|
|
188
|
+
<div part="dropdown-list" class="compact-scroll-wrapper">
|
|
189
189
|
${this.pageSizeOptions.map(
|
|
190
190
|
size => html`
|
|
191
191
|
<nile-menu-item
|
|
@@ -246,7 +246,7 @@ private renderCompactRangeText(): TemplateResult {
|
|
|
246
246
|
…
|
|
247
247
|
</nile-button>
|
|
248
248
|
<nile-menu>
|
|
249
|
-
<div class="ellipsis-scroll-wrapper">
|
|
249
|
+
<div part="dropdown-list" class="ellipsis-scroll-wrapper">
|
|
250
250
|
${getHiddenPages(
|
|
251
251
|
this.totalPages,
|
|
252
252
|
items,
|
|
@@ -338,7 +338,7 @@ private renderCompactRangeText(): TemplateResult {
|
|
|
338
338
|
></nile-icon>
|
|
339
339
|
</nile-button>
|
|
340
340
|
<nile-menu>
|
|
341
|
-
<div class="mini-scroll-wrapper">
|
|
341
|
+
<div part="dropdown-list" class="mini-scroll-wrapper">
|
|
342
342
|
${Array.from({ length: this.totalPages }, (_, i) => i + 1).map(
|
|
343
343
|
p => html`
|
|
344
344
|
<nile-menu-item
|
|
@@ -392,7 +392,7 @@ private renderCompactRangeText(): TemplateResult {
|
|
|
392
392
|
></nile-icon>
|
|
393
393
|
</nile-button>
|
|
394
394
|
<nile-menu>
|
|
395
|
-
<div class="compact-scroll-wrapper1">
|
|
395
|
+
<div part="dropdown-list" class="compact-scroll-wrapper1">
|
|
396
396
|
${Array.from({ length: this.totalPages }, (_, i) => i + 1).map(
|
|
397
397
|
p => html`
|
|
398
398
|
<nile-menu-item
|
package/src/version.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
// Version utility
|
|
1
|
+
// Version utility.
|
|
2
|
+
//
|
|
3
|
+
// NILE_ELEMENTS_VERSION is this package's own version and is still substituted
|
|
4
|
+
// at build time by scripts/replace-version.cjs.
|
|
5
|
+
//
|
|
6
|
+
// NILE_VERSION is read from the installed @aquera/nile at runtime, so publishing
|
|
7
|
+
// @aquera/nile on its own is enough to update window.nileVersion - consumers do
|
|
8
|
+
// not need a rebuild of this package to pick up a new tokens version.
|
|
9
|
+
import { NILE_VERSION as INSTALLED_NILE_VERSION } from '@aquera/nile/lib/version.js';
|
|
10
|
+
|
|
2
11
|
export const NILE_ELEMENTS_VERSION = '__NILE_ELEMENTS_VERSION__';
|
|
3
|
-
export const NILE_VERSION =
|
|
12
|
+
export const NILE_VERSION = INSTALLED_NILE_VERSION;
|
|
4
13
|
|
|
5
14
|
// Set global versions for runtime access
|
|
6
15
|
if (typeof window !== 'undefined') {
|
|
@@ -2537,7 +2537,7 @@
|
|
|
2537
2537
|
},
|
|
2538
2538
|
{
|
|
2539
2539
|
"name": "nile-empty-state",
|
|
2540
|
-
"description": "Nile empty-state component.\n\nAttributes:\n\n * `size` {`\"sm\" | \"md\" | \"lg\"`} - \n\n * `variant` {`\"flat\" | \"content\" | \"tonal\"`} - \n\n * `
|
|
2540
|
+
"description": "Nile empty-state component.\n\nAttributes:\n\n * `size` {`\"sm\" | \"md\" | \"lg\"`} - \n\n * `variant` {`\"flat\" | \"content\" | \"tonal\"`} - \n\n * `status` {`\"error\" | \"empty\" | \"no-results\" | \"not-found\" | \"no-access\" | \"offline\" | undefined`} - \n\n * `layout` {`NileEmptyStateLayout`} - \n\n * `code` {`string | undefined`} - \n\n * `bordered` {`boolean`} - \n\n * `svgIconUrl` {`string`} - \n\n * `svgIconSize` {`number | undefined`} - Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\nthe SVG matches whatever size the current variant/layout draws at.\n\n * `svgIconColor` {`string`} - \n\n * `icon` {`string`} - \n\n * `text` {`string`} - Headline. Resolves through the `status` preset to `DEFAULT_TEXT`.\n\n * `sub-text` {`string`} - Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`.\n\n * `tone` {`NileEmptyStateTone`} - \n\nProperties:\n\n * `size` {`\"sm\" | \"md\" | \"lg\"`} - \n\n * `variant` {`\"flat\" | \"content\" | \"tonal\"`} - \n\n * `status` {`\"error\" | \"empty\" | \"no-results\" | \"not-found\" | \"no-access\" | \"offline\" | undefined`} - \n\n * `layout` {`NileEmptyStateLayout`} - \n\n * `code` {`string | undefined`} - \n\n * `bordered` {`boolean`} - \n\n * `svgIconUrl` {`string`} - \n\n * `svgIconSize` {`number | undefined`} - Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\nthe SVG matches whatever size the current variant/layout draws at.\n\n * `svgIconColor` {`string`} - \n\n * `_icon` {`string | undefined`} - \n\n * `_text` {`string | undefined`} - \n\n * `_subText` {`string | undefined`} - \n\n * `_tone` {`\"warning\" | \"error\" | \"info\" | \"neutral\" | undefined`} - \n\n * `icon` {`string`} - \n\n * `text` {`string`} - Headline. Resolves through the `status` preset to `DEFAULT_TEXT`.\n\n * `subText` {`string`} - Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`.\n\n * `tone` {`NileEmptyStateTone`} - \n\n * `preset` {`StatusPreset | undefined`} - The preset backing the current `status`, or undefined when none is set.\n\n * `glyphColor` {`string | undefined`} - \n\n * `liveRegion` {`{ role: string; live: string; } | undefined`} - ARIA wiring\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
2541
2541
|
"attributes": [
|
|
2542
2542
|
{
|
|
2543
2543
|
"name": "size",
|
|
@@ -2570,21 +2570,53 @@
|
|
|
2570
2570
|
]
|
|
2571
2571
|
},
|
|
2572
2572
|
{
|
|
2573
|
-
"name": "
|
|
2574
|
-
"description": "`
|
|
2573
|
+
"name": "status",
|
|
2574
|
+
"description": "`status` {`\"error\" | \"empty\" | \"no-results\" | \"not-found\" | \"no-access\" | \"offline\" | undefined`} - \n\nProperty: status",
|
|
2575
|
+
"values": [
|
|
2576
|
+
{
|
|
2577
|
+
"name": "error"
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
"name": "empty"
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
"name": "no-results"
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"name": "not-found"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"name": "no-access"
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
"name": "offline"
|
|
2593
|
+
}
|
|
2594
|
+
]
|
|
2575
2595
|
},
|
|
2576
2596
|
{
|
|
2577
|
-
"name": "
|
|
2578
|
-
"description": "`
|
|
2579
|
-
"
|
|
2597
|
+
"name": "layout",
|
|
2598
|
+
"description": "`layout` {`NileEmptyStateLayout`} - \n\nProperty: layout\n\nDefault: stack",
|
|
2599
|
+
"values": [
|
|
2600
|
+
{
|
|
2601
|
+
"name": "inline"
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
"name": "stack"
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
"name": "page"
|
|
2608
|
+
}
|
|
2609
|
+
]
|
|
2580
2610
|
},
|
|
2581
2611
|
{
|
|
2582
|
-
"name": "
|
|
2583
|
-
"description": "`
|
|
2612
|
+
"name": "code",
|
|
2613
|
+
"description": "`code` {`string | undefined`} - \n\nProperty: code",
|
|
2614
|
+
"values": []
|
|
2584
2615
|
},
|
|
2585
2616
|
{
|
|
2586
|
-
"name": "
|
|
2587
|
-
"description": "`
|
|
2617
|
+
"name": "bordered",
|
|
2618
|
+
"description": "`bordered` {`boolean`} - \n\nProperty: bordered\n\nDefault: false",
|
|
2619
|
+
"valueSet": "v"
|
|
2588
2620
|
},
|
|
2589
2621
|
{
|
|
2590
2622
|
"name": "svgIconUrl",
|
|
@@ -2592,11 +2624,42 @@
|
|
|
2592
2624
|
},
|
|
2593
2625
|
{
|
|
2594
2626
|
"name": "svgIconSize",
|
|
2595
|
-
"description": "`svgIconSize` {`number`} -
|
|
2627
|
+
"description": "`svgIconSize` {`number | undefined`} - Overrides the layout-driven glyph size for a custom `svgIconUrl`. Left unset,\nthe SVG matches whatever size the current variant/layout draws at.\n\nProperty: svgIconSize",
|
|
2628
|
+
"values": []
|
|
2596
2629
|
},
|
|
2597
2630
|
{
|
|
2598
2631
|
"name": "svgIconColor",
|
|
2599
2632
|
"description": "`svgIconColor` {`string`} - \n\nProperty: svgIconColor"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"name": "icon",
|
|
2636
|
+
"description": "`icon` {`string`} - \n\nProperty: icon"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"name": "text",
|
|
2640
|
+
"description": "`text` {`string`} - Headline. Resolves through the `status` preset to `DEFAULT_TEXT`.\n\nProperty: text"
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"name": "sub-text",
|
|
2644
|
+
"description": "`sub-text` {`string`} - Supporting line. Resolves through the `status` preset to `DEFAULT_SUB_TEXT`.\n\nProperty: subText"
|
|
2645
|
+
},
|
|
2646
|
+
{
|
|
2647
|
+
"name": "tone",
|
|
2648
|
+
"description": "`tone` {`NileEmptyStateTone`} - \n\nProperty: tone",
|
|
2649
|
+
"values": [
|
|
2650
|
+
{
|
|
2651
|
+
"name": "warning"
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
"name": "error"
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"name": "info"
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
"name": "neutral"
|
|
2661
|
+
}
|
|
2662
|
+
]
|
|
2600
2663
|
}
|
|
2601
2664
|
]
|
|
2602
2665
|
},
|
|
@@ -7017,12 +7080,15 @@
|
|
|
7017
7080
|
},
|
|
7018
7081
|
{
|
|
7019
7082
|
"name": "nile-status-light",
|
|
7020
|
-
"description": "Nile status light component.\n\nSlots:\n\n * ` ` {} - The status light's text label.\n\nAttributes:\n\n * `variant` {`\"
|
|
7083
|
+
"description": "Nile status light component.\n\nSlots:\n\n * ` ` {} - The status light's text label.\n\nAttributes:\n\n * `variant` {`\"neutral\" | \"positive\" | \"negative\" | \"notice\" | \"informative\" | \"inactive\"`} - The status light's color variant.\n\n * `size` {`\"small\" | \"medium\" | \"large\" | \"x-large\"`} - The status light's size.\n\n * `disabled` {`boolean`} - Disables the status light, muting its colors.\n\n * `pulse` {boolean} - Draws attention to an active status with a pulsing animation around the dot.\n\nProperties:\n\n * `styles` - \n\n * `variant` {`\"neutral\" | \"positive\" | \"negative\" | \"notice\" | \"informative\" | \"inactive\"`} - The status light's color variant.\n\n * `size` {`\"small\" | \"medium\" | \"large\" | \"x-large\"`} - The status light's size.\n\n * `disabled` {`boolean`} - Disables the status light, muting its colors.\n\n * `pulse` {boolean} - Draws attention to an active status with a pulsing animation around the dot.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
7021
7084
|
"attributes": [
|
|
7022
7085
|
{
|
|
7023
7086
|
"name": "variant",
|
|
7024
|
-
"description": "`variant` {`\"
|
|
7087
|
+
"description": "`variant` {`\"neutral\" | \"positive\" | \"negative\" | \"notice\" | \"informative\" | \"inactive\"`} - The status light's color variant.\n\nProperty: variant\n\nDefault: neutral",
|
|
7025
7088
|
"values": [
|
|
7089
|
+
{
|
|
7090
|
+
"name": "neutral"
|
|
7091
|
+
},
|
|
7026
7092
|
{
|
|
7027
7093
|
"name": "positive"
|
|
7028
7094
|
},
|
|
@@ -7035,9 +7101,6 @@
|
|
|
7035
7101
|
{
|
|
7036
7102
|
"name": "informative"
|
|
7037
7103
|
},
|
|
7038
|
-
{
|
|
7039
|
-
"name": "neutral"
|
|
7040
|
-
},
|
|
7041
7104
|
{
|
|
7042
7105
|
"name": "inactive"
|
|
7043
7106
|
}
|