@aquera/nile-elements 1.7.3 → 1.7.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 +7 -0
- package/dist/index-199b0eac.esm.js +1 -0
- package/dist/index-f5e587e2.cjs.js +2 -0
- package/dist/index-f5e587e2.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +994 -681
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/index.esm.js +1 -1
- 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.esm.js +28 -28
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js.map +1 -1
- package/dist/nile-detail/nile-detail.css.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.css.cjs.js.map +1 -1
- package/dist/nile-detail/nile-detail.css.esm.js +230 -0
- package/dist/nile-detail/nile-detail.esm.js +89 -7
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +1 -1
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.esm.js +2 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-otp-input/nile-otp-input.css.cjs.js +1 -1
- package/dist/nile-otp-input/nile-otp-input.css.cjs.js.map +1 -1
- package/dist/nile-otp-input/nile-otp-input.css.esm.js +1 -1
- package/dist/src/nile-detail/nile-detail.css.js +230 -0
- package/dist/src/nile-detail/nile-detail.css.js.map +1 -1
- package/dist/src/nile-detail/nile-detail.d.ts +151 -0
- package/dist/src/nile-detail/nile-detail.js +829 -4
- package/dist/src/nile-detail/nile-detail.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js +2 -1
- package/dist/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.js.map +1 -1
- package/dist/src/nile-otp-input/nile-otp-input.css.js +1 -1
- package/dist/src/nile-otp-input/nile-otp-input.css.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-detail/nile-detail.css.ts +230 -0
- package/src/nile-detail/nile-detail.ts +876 -4
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +1 -1
- package/src/nile-inline-sidebar-item-header/nile-inline-sidebar-item-header.css.ts +2 -1
- package/src/nile-otp-input/nile-otp-input.css.ts +1 -1
- package/vscode-html-custom-data.json +120 -1
|
@@ -147,6 +147,236 @@ export const styles = css `
|
|
|
147
147
|
display: block;
|
|
148
148
|
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
/* ── Selection variant ──────────────────────────────────────────────────── */
|
|
152
|
+
|
|
153
|
+
.detail__selection-label {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
157
|
+
flex: 1;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.detail__select-all {
|
|
162
|
+
flex: 0 0 auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.detail__selection-title {
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
line-height: 1.3;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.detail__selection-count {
|
|
173
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
174
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
175
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));
|
|
176
|
+
margin-top: 2px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.detail__selection-content {
|
|
180
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.detail__selection-toolbar {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
187
|
+
margin-bottom: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.detail__selection-search {
|
|
191
|
+
flex: 1;
|
|
192
|
+
min-width: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.detail__selection-actions {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
199
|
+
flex: 0 0 auto;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.detail__selection-grid {
|
|
203
|
+
display: grid;
|
|
204
|
+
grid-auto-flow: column;
|
|
205
|
+
gap: 8px 24px;
|
|
206
|
+
overflow-x: auto;
|
|
207
|
+
overflow-y: hidden;
|
|
208
|
+
padding-bottom: 8px;
|
|
209
|
+
scroll-snap-type: x proximity;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.detail__selection-grid--virtual {
|
|
213
|
+
display: block;
|
|
214
|
+
position: relative;
|
|
215
|
+
width: 100%;
|
|
216
|
+
contain: layout paint;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.detail__selection-grid--virtual.detail__selection-grid--vertical {
|
|
220
|
+
overflow-x: hidden;
|
|
221
|
+
overflow-y: auto;
|
|
222
|
+
scroll-snap-type: y proximity;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.detail__selection-grid--virtual.detail__selection-grid--vertical::-webkit-scrollbar {
|
|
226
|
+
width: 8px;
|
|
227
|
+
height: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.detail__selection-grid--virtual.detail__selection-grid--both {
|
|
231
|
+
overflow: auto;
|
|
232
|
+
scroll-snap-type: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.detail__selection-grid--virtual.detail__selection-grid--both::-webkit-scrollbar {
|
|
236
|
+
width: 8px;
|
|
237
|
+
height: 8px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.detail__selection-grid--virtual .detail__selection-track {
|
|
241
|
+
position: relative;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.detail__selection-tooltip--virtual {
|
|
245
|
+
box-sizing: border-box;
|
|
246
|
+
padding-right: 24px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.detail__selection-grid > nile-checkbox,
|
|
250
|
+
.detail__selection-grid > .detail__selection-tooltip {
|
|
251
|
+
scroll-snap-align: start;
|
|
252
|
+
min-width: 0;
|
|
253
|
+
display: block;
|
|
254
|
+
max-width: 100%;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.detail__selection-checkbox {
|
|
259
|
+
display: block;
|
|
260
|
+
width: 100%;
|
|
261
|
+
min-width: 0;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.detail__selection-checkbox::part(base) {
|
|
265
|
+
display: flex;
|
|
266
|
+
width: 100%;
|
|
267
|
+
min-width: 0;
|
|
268
|
+
align-items: center;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.detail__selection-checkbox::part(label) {
|
|
272
|
+
flex: 1 1 auto;
|
|
273
|
+
min-width: 0;
|
|
274
|
+
max-width: 100%;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
text-overflow: ellipsis;
|
|
277
|
+
white-space: nowrap;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.detail__selection-checkbox--disabled {
|
|
281
|
+
opacity: 0.5;
|
|
282
|
+
pointer-events: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.detail__selection-text {
|
|
286
|
+
display: inline-flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
min-width: 0;
|
|
289
|
+
flex: 1 1 auto;
|
|
290
|
+
line-height: 1.25;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.detail__selection-item-label {
|
|
294
|
+
display: block;
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
text-overflow: ellipsis;
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.detail__selection-desc {
|
|
301
|
+
display: block;
|
|
302
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
303
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));
|
|
304
|
+
margin-top: 2px;
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
text-overflow: ellipsis;
|
|
307
|
+
white-space: nowrap;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.detail__selection-prefix,
|
|
311
|
+
.detail__selection-suffix {
|
|
312
|
+
display: inline-flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
flex: 0 0 auto;
|
|
315
|
+
margin: 0 6px;
|
|
316
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.detail__selection-prefix { margin-left: 0; }
|
|
320
|
+
.detail__selection-suffix { margin-right: 0; }
|
|
321
|
+
|
|
322
|
+
.detail__selection-placeholder {
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
gap: 10px;
|
|
326
|
+
padding: 4px 8px;
|
|
327
|
+
box-sizing: border-box;
|
|
328
|
+
opacity: 0.6;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.detail__selection-placeholder-bar {
|
|
332
|
+
width: 16px;
|
|
333
|
+
height: 16px;
|
|
334
|
+
border-radius: 4px;
|
|
335
|
+
background: linear-gradient(
|
|
336
|
+
90deg,
|
|
337
|
+
rgba(0,0,0,0.06) 0%,
|
|
338
|
+
rgba(0,0,0,0.12) 50%,
|
|
339
|
+
rgba(0,0,0,0.06) 100%
|
|
340
|
+
);
|
|
341
|
+
background-size: 200% 100%;
|
|
342
|
+
animation: nile-detail-shimmer 1.4s linear infinite;
|
|
343
|
+
flex: 0 0 auto;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.detail__selection-placeholder-label {
|
|
347
|
+
flex: 1 1 auto;
|
|
348
|
+
min-width: 0;
|
|
349
|
+
overflow: hidden;
|
|
350
|
+
text-overflow: ellipsis;
|
|
351
|
+
white-space: nowrap;
|
|
352
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
353
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));
|
|
354
|
+
background: linear-gradient(
|
|
355
|
+
90deg,
|
|
356
|
+
rgba(0,0,0,0.06) 0%,
|
|
357
|
+
rgba(0,0,0,0.12) 50%,
|
|
358
|
+
rgba(0,0,0,0.06) 100%
|
|
359
|
+
);
|
|
360
|
+
background-size: 200% 100%;
|
|
361
|
+
background-clip: text;
|
|
362
|
+
-webkit-background-clip: text;
|
|
363
|
+
color: transparent;
|
|
364
|
+
animation: nile-detail-shimmer 1.4s linear infinite;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@keyframes nile-detail-shimmer {
|
|
368
|
+
0% { background-position: 200% 0; }
|
|
369
|
+
100% { background-position: -200% 0; }
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.detail__selection-grid::-webkit-scrollbar {
|
|
373
|
+
height: 8px;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.detail__selection-grid::-webkit-scrollbar-thumb {
|
|
377
|
+
background: rgba(0, 0, 0, 0.2);
|
|
378
|
+
border-radius: 4px;
|
|
379
|
+
}
|
|
150
380
|
`;
|
|
151
381
|
export default [styles];
|
|
152
382
|
//# sourceMappingURL=nile-detail.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-detail.css.js","sourceRoot":"","sources":["../../../src/nile-detail/nile-detail.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none;\n }\n\n :host {\n display: block;\n width: 100%;\n }\n\n .detail {\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-md, var(--ng-radius-xl));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-xs));\n overflow: hidden;\n width: 100%;\n line-height: var(--nile-line-height-inherit, var(--ng-line-height-text-sm));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n }\n\n .detail--disabled {\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n }\n\n .detail__header {\n display: flex;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n align-items: center;\n border-radius: inherit;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-neutral-900, var(--ng-colors-text-primary));\n user-select: none;\n cursor: pointer;\n list-style: none;\n }\n\n .detail__header::-webkit-details-marker {\n display: none;\n }\n\n .detail__header::marker {\n content: '';\n }\n\n .detail__header--icon-left {\n flex-direction: row-reverse;\n }\n\n .detail__header:focus {\n outline: none;\n }\n\n .detail__header:focus-visible {\n outline: solid 3px var(--nile-colors-blue-500, var(--ng-colors-fg-brand-primary-600));\n outline-offset: calc(1px + 1px);\n }\n\n .detail--disabled .detail__header {\n cursor: not-allowed;\n }\n\n .detail--disabled .detail__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .detail__label {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .detail__header-actions {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__heading-text {\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n font-family: var(--nile-font-family-medium, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n }\n\n .detail__description {\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n }\n\n .detail__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms transform ease;\n color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary));\n transform: rotate(90deg);\n }\n\n .detail--open .detail__summary-icon {\n transform: rotate(-90deg);\n }\n\n .detail__body {\n overflow: hidden;\n }\n\n .detail__body[hidden] {\n display: none;\n }\n\n .detail__content {\n display: block;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n`;\n\nexport default [styles];\n"]}
|
|
1
|
+
{"version":3,"file":"nile-detail.css.js","sourceRoot":"","sources":["../../../src/nile-detail/nile-detail.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0XxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none;\n }\n\n :host {\n display: block;\n width: 100%;\n }\n\n .detail {\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-md, var(--ng-radius-xl));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-xs));\n overflow: hidden;\n width: 100%;\n line-height: var(--nile-line-height-inherit, var(--ng-line-height-text-sm));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n }\n\n .detail--disabled {\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n }\n\n .detail__header {\n display: flex;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n align-items: center;\n border-radius: inherit;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-neutral-900, var(--ng-colors-text-primary));\n user-select: none;\n cursor: pointer;\n list-style: none;\n }\n\n .detail__header::-webkit-details-marker {\n display: none;\n }\n\n .detail__header::marker {\n content: '';\n }\n\n .detail__header--icon-left {\n flex-direction: row-reverse;\n }\n\n .detail__header:focus {\n outline: none;\n }\n\n .detail__header:focus-visible {\n outline: solid 3px var(--nile-colors-blue-500, var(--ng-colors-fg-brand-primary-600));\n outline-offset: calc(1px + 1px);\n }\n\n .detail--disabled .detail__header {\n cursor: not-allowed;\n }\n\n .detail--disabled .detail__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .detail__label {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .detail__header-actions {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__heading-text {\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n font-family: var(--nile-font-family-medium, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n }\n\n .detail__description {\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n }\n\n .detail__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms transform ease;\n color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary));\n transform: rotate(90deg);\n }\n\n .detail--open .detail__summary-icon {\n transform: rotate(-90deg);\n }\n\n .detail__body {\n overflow: hidden;\n }\n\n .detail__body[hidden] {\n display: none;\n }\n\n .detail__content {\n display: block;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n /* ── Selection variant ──────────────────────────────────────────────────── */\n\n .detail__selection-label {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n flex: 1;\n min-width: 0;\n }\n\n .detail__select-all {\n flex: 0 0 auto;\n }\n\n .detail__selection-title {\n display: flex;\n flex-direction: column;\n line-height: 1.3;\n min-width: 0;\n }\n\n .detail__selection-count {\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n }\n\n .detail__selection-content {\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .detail__selection-toolbar {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n margin-bottom: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .detail__selection-search {\n flex: 1;\n min-width: 0;\n }\n\n .detail__selection-actions {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n flex: 0 0 auto;\n }\n\n .detail__selection-grid {\n display: grid;\n grid-auto-flow: column;\n gap: 8px 24px;\n overflow-x: auto;\n overflow-y: hidden;\n padding-bottom: 8px;\n scroll-snap-type: x proximity;\n }\n\n .detail__selection-grid--virtual {\n display: block;\n position: relative;\n width: 100%;\n contain: layout paint;\n }\n\n .detail__selection-grid--virtual.detail__selection-grid--vertical {\n overflow-x: hidden;\n overflow-y: auto;\n scroll-snap-type: y proximity;\n }\n\n .detail__selection-grid--virtual.detail__selection-grid--vertical::-webkit-scrollbar {\n width: 8px;\n height: 0;\n }\n\n .detail__selection-grid--virtual.detail__selection-grid--both {\n overflow: auto;\n scroll-snap-type: none;\n }\n\n .detail__selection-grid--virtual.detail__selection-grid--both::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n .detail__selection-grid--virtual .detail__selection-track {\n position: relative;\n }\n\n .detail__selection-tooltip--virtual {\n box-sizing: border-box;\n padding-right: 24px;\n }\n\n .detail__selection-grid > nile-checkbox,\n .detail__selection-grid > .detail__selection-tooltip {\n scroll-snap-align: start;\n min-width: 0;\n display: block;\n max-width: 100%;\n overflow: hidden;\n }\n\n .detail__selection-checkbox {\n display: block;\n width: 100%;\n min-width: 0;\n }\n\n .detail__selection-checkbox::part(base) {\n display: flex;\n width: 100%;\n min-width: 0;\n align-items: center;\n }\n\n .detail__selection-checkbox::part(label) {\n flex: 1 1 auto;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .detail__selection-checkbox--disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .detail__selection-text {\n display: inline-flex;\n flex-direction: column;\n min-width: 0;\n flex: 1 1 auto;\n line-height: 1.25;\n }\n\n .detail__selection-item-label {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .detail__selection-desc {\n display: block;\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .detail__selection-prefix,\n .detail__selection-suffix {\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n margin: 0 6px;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n }\n\n .detail__selection-prefix { margin-left: 0; }\n .detail__selection-suffix { margin-right: 0; }\n\n .detail__selection-placeholder {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 4px 8px;\n box-sizing: border-box;\n opacity: 0.6;\n }\n\n .detail__selection-placeholder-bar {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n background: linear-gradient(\n 90deg,\n rgba(0,0,0,0.06) 0%,\n rgba(0,0,0,0.12) 50%,\n rgba(0,0,0,0.06) 100%\n );\n background-size: 200% 100%;\n animation: nile-detail-shimmer 1.4s linear infinite;\n flex: 0 0 auto;\n }\n\n .detail__selection-placeholder-label {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n background: linear-gradient(\n 90deg,\n rgba(0,0,0,0.06) 0%,\n rgba(0,0,0,0.12) 50%,\n rgba(0,0,0,0.06) 100%\n );\n background-size: 200% 100%;\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n animation: nile-detail-shimmer 1.4s linear infinite;\n }\n\n @keyframes nile-detail-shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n\n .detail__selection-grid::-webkit-scrollbar {\n height: 8px;\n }\n\n .detail__selection-grid::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import NileElement from '../internal/nile-element';
|
|
3
|
+
import '../nile-checkbox/index';
|
|
4
|
+
import '../nile-input/index';
|
|
5
|
+
import '../nile-link/index';
|
|
6
|
+
import '../nile-icon/index';
|
|
7
|
+
import '../nile-lite-tooltip/index';
|
|
3
8
|
import type { CSSResultGroup } from 'lit';
|
|
9
|
+
export type NileDetailVariant = 'default' | 'selection';
|
|
10
|
+
export interface NileDetailSelectionItem {
|
|
11
|
+
value: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
prefix?: string;
|
|
15
|
+
suffix?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NileDetailRenderItemConfig {
|
|
20
|
+
getDisplayText: (item: any) => string;
|
|
21
|
+
getValue?: (item: any) => string;
|
|
22
|
+
getSearchText?: (item: any) => string;
|
|
23
|
+
getDescription?: (item: any) => string;
|
|
24
|
+
getPrefix?: (item: any) => string;
|
|
25
|
+
getSuffix?: (item: any) => string;
|
|
26
|
+
getDisabled?: (item: any) => boolean;
|
|
27
|
+
getClassName?: (item: any) => string;
|
|
28
|
+
}
|
|
29
|
+
type SelectionItem = string | NileDetailSelectionItem | Record<string, any>;
|
|
30
|
+
export interface NileDetailSelectionConfig {
|
|
31
|
+
variant?: NileDetailVariant;
|
|
32
|
+
heading?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
itemsLabel?: string;
|
|
35
|
+
items?: SelectionItem[];
|
|
36
|
+
selected?: string[];
|
|
37
|
+
renderItemConfig?: NileDetailRenderItemConfig;
|
|
38
|
+
allowHtmlLabel?: boolean;
|
|
39
|
+
layout?: {
|
|
40
|
+
orientation?: 'horizontal' | 'vertical' | 'both';
|
|
41
|
+
gridRows?: number;
|
|
42
|
+
gridColumns?: number;
|
|
43
|
+
matrixColumns?: number;
|
|
44
|
+
minColumnWidth?: string;
|
|
45
|
+
laneHeight?: number;
|
|
46
|
+
maxHeight?: string;
|
|
47
|
+
expandIconPlacement?: 'left' | 'right';
|
|
48
|
+
};
|
|
49
|
+
search?: {
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
disableLocal?: boolean;
|
|
52
|
+
};
|
|
53
|
+
virtualization?: {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
threshold?: number;
|
|
56
|
+
overscan?: number;
|
|
57
|
+
};
|
|
58
|
+
pagination?: {
|
|
59
|
+
totalCount?: number;
|
|
60
|
+
pageSize?: number;
|
|
61
|
+
fetchPage?: (offset: number, limit: number) => Promise<SelectionItem[]>;
|
|
62
|
+
placeholderLabel?: string;
|
|
63
|
+
};
|
|
64
|
+
labels?: {
|
|
65
|
+
restore?: string;
|
|
66
|
+
clear?: string;
|
|
67
|
+
};
|
|
68
|
+
open?: boolean;
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
}
|
|
4
71
|
export declare class NileDetail extends NileElement {
|
|
5
72
|
static styles: CSSResultGroup;
|
|
6
73
|
detail: HTMLDetailsElement;
|
|
@@ -11,14 +78,98 @@ export declare class NileDetail extends NileElement {
|
|
|
11
78
|
description: string;
|
|
12
79
|
expandIconPlacement: 'left' | 'right';
|
|
13
80
|
disabled: boolean;
|
|
81
|
+
variant: NileDetailVariant;
|
|
82
|
+
items: SelectionItem[];
|
|
83
|
+
selected: string[];
|
|
84
|
+
renderItemConfig?: NileDetailRenderItemConfig;
|
|
85
|
+
allowHtmlLabel: boolean;
|
|
86
|
+
disableLocalSearch: boolean;
|
|
87
|
+
totalCount?: number;
|
|
88
|
+
pageSize: number;
|
|
89
|
+
fetchPage?: (offset: number, limit: number) => Promise<SelectionItem[]>;
|
|
90
|
+
placeholderLabel: string;
|
|
91
|
+
config?: NileDetailSelectionConfig;
|
|
92
|
+
searchPlaceholder: string;
|
|
93
|
+
itemsLabel: string;
|
|
94
|
+
restoreLabel: string;
|
|
95
|
+
clearLabel: string;
|
|
96
|
+
gridRows: number;
|
|
97
|
+
gridColumns: number;
|
|
98
|
+
minColumnWidth: string;
|
|
99
|
+
laneHeight: number;
|
|
100
|
+
orientation: 'horizontal' | 'vertical' | 'both';
|
|
101
|
+
maxHeight: string;
|
|
102
|
+
matrixColumns: number;
|
|
103
|
+
virtualize: boolean;
|
|
104
|
+
virtualizeThreshold: number;
|
|
105
|
+
overscan: number;
|
|
14
106
|
private _detailOpen;
|
|
107
|
+
private _searchTerm;
|
|
108
|
+
private _selectedSet;
|
|
109
|
+
private _restoreDefaults;
|
|
110
|
+
private _gridResizeObserver;
|
|
111
|
+
private _virtCtrl;
|
|
112
|
+
private _rowVirtCtrl;
|
|
113
|
+
private _colVirtCtrl;
|
|
114
|
+
private _pageCache;
|
|
115
|
+
private _pendingPages;
|
|
116
|
+
private get _isInfiniteMode();
|
|
117
|
+
private _effectiveTotalCount;
|
|
118
|
+
private _getItemAt;
|
|
119
|
+
private _scheduleFetchForRange;
|
|
120
|
+
private _loadPage;
|
|
121
|
+
/** Public: clear the page cache (use after a query change to refetch). */
|
|
122
|
+
resetPages(): void;
|
|
123
|
+
private get _isVirtualized();
|
|
124
|
+
private get _columnWidthPx();
|
|
15
125
|
firstUpdated(): void;
|
|
126
|
+
disconnectedCallback(): void;
|
|
127
|
+
updated(_changed: Map<string, unknown>): void;
|
|
128
|
+
private _syncVirtualizer;
|
|
129
|
+
private _syncBothVirtualizers;
|
|
130
|
+
private _setupGridResizeObserver;
|
|
131
|
+
private _scheduleTooltipOverflowCheck;
|
|
132
|
+
private _updateTooltipOverflowStates;
|
|
133
|
+
_onSelectedPropertyChange(): void;
|
|
134
|
+
_onConfigChange(): void;
|
|
135
|
+
private _applyConfig;
|
|
136
|
+
private _syncSelectedFromProperty;
|
|
137
|
+
private _getItemValue;
|
|
138
|
+
private _getItemLabel;
|
|
139
|
+
private _getItemSearchText;
|
|
140
|
+
private _getItemDescription;
|
|
141
|
+
private _getItemPrefix;
|
|
142
|
+
private _getItemSuffix;
|
|
143
|
+
private _getItemDisabled;
|
|
144
|
+
private _getItemClassName;
|
|
145
|
+
private get _filteredItems();
|
|
146
|
+
private _selectableValues;
|
|
147
|
+
private get _allChecked();
|
|
148
|
+
private get _indeterminate();
|
|
149
|
+
private get _countLabel();
|
|
150
|
+
private _emitSelectionChange;
|
|
151
|
+
private _onItemChange;
|
|
152
|
+
private _onSelectAllChange;
|
|
153
|
+
private _emitSearch;
|
|
154
|
+
private _onSearchInput;
|
|
155
|
+
private _onSearchClear;
|
|
156
|
+
private _onRestore;
|
|
157
|
+
private _onClear;
|
|
158
|
+
private _stopHeaderToggle;
|
|
16
159
|
private _handleSummaryClick;
|
|
17
160
|
private _handleSummaryKeyDown;
|
|
18
161
|
handleOpenChange(): Promise<void>;
|
|
19
162
|
show(): Promise<unknown>;
|
|
20
163
|
hide(): Promise<unknown>;
|
|
21
164
|
private get _summaryLabel();
|
|
165
|
+
private _renderSelectionLabel;
|
|
166
|
+
private _renderSelectionBody;
|
|
167
|
+
private _renderItemContent;
|
|
168
|
+
private _renderItemTooltip;
|
|
169
|
+
private _renderStaticGrid;
|
|
170
|
+
private _renderBothVirtualGrid;
|
|
171
|
+
private _renderVirtualGrid;
|
|
172
|
+
private _renderPlaceholder;
|
|
22
173
|
render(): TemplateResult;
|
|
23
174
|
}
|
|
24
175
|
export default NileDetail;
|