@kubex/zinc 1.1.97 → 1.1.98
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/dist/chunks/zn.R2EAU6OS.js +1 -0
- package/dist/custom-elements.json +1422 -61
- package/dist/vscode.html-custom-data.json +188 -2
- package/dist/web-types.json +462 -5
- package/dist/zn.d.ts +326 -2
- package/dist/zn.min.js +582 -457
- package/docs/pages/components/button.md +11 -1
- package/docs/pages/components/chart.md +165 -3
- package/docs/pages/components/icon-picker.md +8 -0
- package/docs/pages/components/thumbnail-group.md +216 -0
- package/docs/pages/components/thumbnail.md +349 -0
- package/docs/pages/components/well.md +34 -0
- package/package.json +1 -1
- package/src/components/button/button.component.ts +8 -0
- package/src/components/chart/builders.test.ts +190 -1
- package/src/components/chart/builders.ts +246 -4
- package/src/components/chart/chart.component.ts +33 -1
- package/src/components/chart/chart.test.ts +66 -1
- package/src/components/chart/echarts-loader.ts +10 -0
- package/src/components/collapsible/collapsible.component.ts +49 -4
- package/src/components/collapsible/collapsible.scss +33 -14
- package/src/components/header/header.scss +1 -1
- package/src/components/icon-picker/icon-picker.component.ts +3 -0
- package/src/components/icon-picker/lucide-icons.ts +1756 -0
- package/src/components/page/page.scss +1 -1
- package/src/components/remarkd-editor/remarkd-editor.test.ts +39 -0
- package/src/components/split-pane/split-pane.scss +21 -15
- package/src/components/thumbnail/index.ts +12 -0
- package/src/components/thumbnail/thumbnail.component.ts +460 -0
- package/src/components/thumbnail/thumbnail.scss +360 -0
- package/src/components/thumbnail/thumbnail.test.ts +379 -0
- package/src/components/thumbnail-group/index.ts +12 -0
- package/src/components/thumbnail-group/thumbnail-group.component.ts +268 -0
- package/src/components/thumbnail-group/thumbnail-group.scss +87 -0
- package/src/components/thumbnail-group/thumbnail-group.test.ts +151 -0
- package/src/components/well/well.component.ts +22 -4
- package/src/components/well/well.scss +24 -0
- package/src/components/well/well.test.ts +43 -0
- package/src/zinc.ts +2 -0
package/dist/zn.d.ts
CHANGED
|
@@ -1215,6 +1215,8 @@ declare module "components/button/button.component" {
|
|
|
1215
1215
|
dataTarget: 'modal' | 'slide' | string;
|
|
1216
1216
|
rel: string;
|
|
1217
1217
|
tooltip: string;
|
|
1218
|
+
/** Accessible name for the button. Icon-only buttons fall back to `tooltip`. */
|
|
1219
|
+
label: string;
|
|
1218
1220
|
autoClick: boolean;
|
|
1219
1221
|
autoClickDelay: number;
|
|
1220
1222
|
loadingText: string;
|
|
@@ -1409,13 +1411,19 @@ declare module "components/collapsible/collapsible.component" {
|
|
|
1409
1411
|
storeTtl: number;
|
|
1410
1412
|
flush: boolean;
|
|
1411
1413
|
numberOfItems: number;
|
|
1414
|
+
private animating;
|
|
1415
|
+
private animatingTimer?;
|
|
1412
1416
|
protected _store: Store;
|
|
1413
1417
|
private readonly hasSlotController;
|
|
1414
1418
|
private readonly observer;
|
|
1415
1419
|
private showArrow;
|
|
1416
1420
|
connectedCallback(): Promise<void>;
|
|
1421
|
+
disconnectedCallback(): void;
|
|
1417
1422
|
handleCaptionToggle: (e: ZnInputEvent) => void;
|
|
1418
1423
|
protected updated(changedProperties: PropertyValues): void;
|
|
1424
|
+
private startAnimating;
|
|
1425
|
+
private stopAnimating;
|
|
1426
|
+
private handleTransitionEnd;
|
|
1419
1427
|
handleCollapse: (e: MouseEvent) => void;
|
|
1420
1428
|
recalculateNumberOfItems: () => void;
|
|
1421
1429
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1716,11 +1724,16 @@ declare module "components/well/well.component" {
|
|
|
1716
1724
|
* @since 1.0
|
|
1717
1725
|
*
|
|
1718
1726
|
* @slot - The default slot.
|
|
1727
|
+
* @slot action - Content displayed on the right hand side of the well.
|
|
1719
1728
|
*/
|
|
1720
1729
|
export default class ZnWell extends ZincElement {
|
|
1721
1730
|
static styles: CSSResultGroup;
|
|
1722
1731
|
icon: string;
|
|
1723
1732
|
inline: boolean;
|
|
1733
|
+
/** Renders the default slot inside a `pre` element, preserving whitespace using a monospace font. */
|
|
1734
|
+
pre: boolean;
|
|
1735
|
+
/** Breaks long unbroken words, so they wrap instead of forcing the well wider. */
|
|
1736
|
+
breakLong: boolean;
|
|
1724
1737
|
private readonly hasSlotController;
|
|
1725
1738
|
render(): import("lit-html").TemplateResult<1>;
|
|
1726
1739
|
}
|
|
@@ -4477,7 +4490,7 @@ declare module "components/channel-tile/index" {
|
|
|
4477
4490
|
}
|
|
4478
4491
|
declare module "components/chart/builders" {
|
|
4479
4492
|
import type { EChartsOption } from 'echarts';
|
|
4480
|
-
export type ChartType = 'area' | 'bar' | 'line' | 'sankey';
|
|
4493
|
+
export type ChartType = 'area' | 'bar' | 'donut' | 'funnel' | 'gauge' | 'heatmap' | 'line' | 'pie' | 'radar' | 'sankey' | 'scatter' | 'sunburst' | 'treemap';
|
|
4481
4494
|
export interface SeriesItem {
|
|
4482
4495
|
name: string;
|
|
4483
4496
|
data: any[];
|
|
@@ -4488,6 +4501,18 @@ declare module "components/chart/builders" {
|
|
|
4488
4501
|
target: string;
|
|
4489
4502
|
value: number;
|
|
4490
4503
|
}
|
|
4504
|
+
export interface PieDataItem {
|
|
4505
|
+
name?: string;
|
|
4506
|
+
value: number;
|
|
4507
|
+
color?: string;
|
|
4508
|
+
itemStyle?: Record<string, unknown>;
|
|
4509
|
+
}
|
|
4510
|
+
export interface RadarIndicator {
|
|
4511
|
+
name: string;
|
|
4512
|
+
max?: number;
|
|
4513
|
+
min?: number;
|
|
4514
|
+
color?: string;
|
|
4515
|
+
}
|
|
4491
4516
|
export interface BuilderProps {
|
|
4492
4517
|
type: ChartType;
|
|
4493
4518
|
data: SeriesItem[];
|
|
@@ -4503,10 +4528,25 @@ declare module "components/chart/builders" {
|
|
|
4503
4528
|
scale?: boolean | number;
|
|
4504
4529
|
textColor?: string;
|
|
4505
4530
|
borderColor?: string;
|
|
4531
|
+
innerRadius?: number | string;
|
|
4532
|
+
outerRadius?: number | string;
|
|
4533
|
+
showLabels?: boolean;
|
|
4534
|
+
yCategories?: string[];
|
|
4535
|
+
indicators?: RadarIndicator[];
|
|
4536
|
+
minValue?: number;
|
|
4537
|
+
maxValue?: number;
|
|
4506
4538
|
}
|
|
4507
4539
|
export function buildBarOption(props: BuilderProps): EChartsOption;
|
|
4508
4540
|
export function buildLineOption(props: BuilderProps): EChartsOption;
|
|
4509
4541
|
export function buildAreaOption(props: BuilderProps): EChartsOption;
|
|
4542
|
+
export function buildScatterOption(props: BuilderProps): EChartsOption;
|
|
4543
|
+
export function buildPieOption(props: BuilderProps): EChartsOption;
|
|
4544
|
+
export function buildRadarOption(props: BuilderProps): EChartsOption;
|
|
4545
|
+
export function buildGaugeOption(props: BuilderProps): EChartsOption;
|
|
4546
|
+
export function buildFunnelOption(props: BuilderProps): EChartsOption;
|
|
4547
|
+
export function buildHeatmapOption(props: BuilderProps): EChartsOption;
|
|
4548
|
+
export function buildTreemapOption(props: BuilderProps): EChartsOption;
|
|
4549
|
+
export function buildSunburstOption(props: BuilderProps): EChartsOption;
|
|
4510
4550
|
export function buildSankeyOption(props: BuilderProps): EChartsOption;
|
|
4511
4551
|
}
|
|
4512
4552
|
declare module "components/chart/echarts-loader" {
|
|
@@ -4515,7 +4555,7 @@ declare module "components/chart/echarts-loader" {
|
|
|
4515
4555
|
export function loadECharts(): Promise<EChartsModule>;
|
|
4516
4556
|
}
|
|
4517
4557
|
declare module "components/chart/chart.component" {
|
|
4518
|
-
import { type ChartType, type SeriesItem } from "components/chart/builders";
|
|
4558
|
+
import { type ChartType, type RadarIndicator, type SeriesItem } from "components/chart/builders";
|
|
4519
4559
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
4520
4560
|
import ZincElement from "internal/zinc-element";
|
|
4521
4561
|
/**
|
|
@@ -4531,6 +4571,8 @@ declare module "components/chart/chart.component" {
|
|
|
4531
4571
|
type: ChartType;
|
|
4532
4572
|
data: SeriesItem[];
|
|
4533
4573
|
categories: string[];
|
|
4574
|
+
yCategories: string[];
|
|
4575
|
+
indicators: RadarIndicator[];
|
|
4534
4576
|
xAxis: 'datetime' | 'category' | 'numeric';
|
|
4535
4577
|
datapointSize: number;
|
|
4536
4578
|
stacked: boolean;
|
|
@@ -4543,6 +4585,11 @@ declare module "components/chart/chart.component" {
|
|
|
4543
4585
|
colors?: string[];
|
|
4544
4586
|
syncGroup?: string;
|
|
4545
4587
|
smooth: boolean;
|
|
4588
|
+
innerRadius?: number | string;
|
|
4589
|
+
outerRadius?: number | string;
|
|
4590
|
+
showLabels?: boolean;
|
|
4591
|
+
minValue?: number;
|
|
4592
|
+
maxValue?: number;
|
|
4546
4593
|
scale: boolean | number;
|
|
4547
4594
|
private chart?;
|
|
4548
4595
|
private echarts?;
|
|
@@ -5109,6 +5156,9 @@ declare module "components/icon-picker/brand-icons" {
|
|
|
5109
5156
|
declare module "components/icon-picker/line-icons" {
|
|
5110
5157
|
export const lineIcons: string[];
|
|
5111
5158
|
}
|
|
5159
|
+
declare module "components/icon-picker/lucide-icons" {
|
|
5160
|
+
export const lucideIcons: string[];
|
|
5161
|
+
}
|
|
5112
5162
|
declare module "components/icon-picker/material-icons" {
|
|
5113
5163
|
export const materialIcons: string[];
|
|
5114
5164
|
export const material_outlinedIcons: string[];
|
|
@@ -11822,6 +11872,278 @@ declare module "components/schedule-builder/index" {
|
|
|
11822
11872
|
}
|
|
11823
11873
|
}
|
|
11824
11874
|
}
|
|
11875
|
+
declare module "components/thumbnail/thumbnail.component" {
|
|
11876
|
+
import { type CSSResultGroup } from 'lit';
|
|
11877
|
+
import ZincElement from "internal/zinc-element";
|
|
11878
|
+
import ZnIcon from "components/icon/index";
|
|
11879
|
+
/**
|
|
11880
|
+
* @summary A captioned image tile — a fixed aspect-ratio preview with a title beneath it, optional
|
|
11881
|
+
* corner badges and actions, and an optional full-screen preview that grows out of the thumbnail.
|
|
11882
|
+
* @documentation https://zinc.style/components/thumbnail
|
|
11883
|
+
* @status experimental
|
|
11884
|
+
* @since 1.0
|
|
11885
|
+
*
|
|
11886
|
+
* @dependency zn-icon
|
|
11887
|
+
*
|
|
11888
|
+
* @event zn-select - Emitted when an enabled thumbnail is activated by click or keyboard. Cancelable —
|
|
11889
|
+
* call `preventDefault()` to stop the preview from opening and to stop a parent
|
|
11890
|
+
* `zn-thumbnail-group` from changing its selection.
|
|
11891
|
+
* @event zn-show - Emitted when the preview overlay starts opening.
|
|
11892
|
+
* @event zn-close - Emitted once the preview overlay has finished closing.
|
|
11893
|
+
*
|
|
11894
|
+
* @slot - Fallback content rendered in place of the media when no `src` is set.
|
|
11895
|
+
* @slot image - Replaces the built-in `<img>` (e.g. a video, canvas or `zn-icon`).
|
|
11896
|
+
* @slot caption - Replaces the caption text.
|
|
11897
|
+
* @slot badge - Content pinned to the bottom-left of the media (e.g. a play indicator). Badges take
|
|
11898
|
+
* no pointer events and are held back on opacity, so they read as information about the asset
|
|
11899
|
+
* rather than as something to click.
|
|
11900
|
+
* @slot actions - Controls pinned to the bottom-right of the media (e.g. a download button). Each
|
|
11901
|
+
* slotted element becomes its own chip, so several actions read as separate icons on the thumbnail
|
|
11902
|
+
* rather than one grouped pill. This sits outside the thumbnail's link, so buttons and links here
|
|
11903
|
+
* behave normally and never select the thumbnail or follow its `href`.
|
|
11904
|
+
* @slot preview - Replaces the preview media (e.g. a `<video>` for the full-size asset).
|
|
11905
|
+
*
|
|
11906
|
+
* @csspart base - The component's base wrapper.
|
|
11907
|
+
* @csspart link - The anchor (or div) covering the media and caption.
|
|
11908
|
+
* @csspart media - The fixed aspect-ratio media frame.
|
|
11909
|
+
* @csspart image - The built-in image element.
|
|
11910
|
+
* @csspart overlay - The layer holding the badge, actions and preview button.
|
|
11911
|
+
* @csspart badge - The bottom-left badge container.
|
|
11912
|
+
* @csspart actions - The bottom-right actions container.
|
|
11913
|
+
* @csspart preview-button - The built-in preview trigger, when `preview-trigger="button"`.
|
|
11914
|
+
* @csspart caption - The caption beneath the media.
|
|
11915
|
+
* @csspart preview - The preview `<dialog>`.
|
|
11916
|
+
* @csspart preview-backdrop - The full-screen backdrop behind the preview.
|
|
11917
|
+
* @csspart preview-frame - The rounded panel the preview media sits in.
|
|
11918
|
+
* @csspart preview-image - The full-size image inside the preview.
|
|
11919
|
+
* @csspart preview-close - The preview's close button.
|
|
11920
|
+
*
|
|
11921
|
+
* @cssproperty --zn-thumbnail-aspect-ratio - Aspect ratio of the media frame. Defaults to 16 / 9. The
|
|
11922
|
+
* `aspect-ratio` attribute sets this on the thumbnail itself; set the property on any ancestor
|
|
11923
|
+
* (including a `zn-thumbnail-group`) to apply it to every thumbnail beneath it.
|
|
11924
|
+
* @cssproperty --zn-thumbnail-radius - Corner radius of the media frame.
|
|
11925
|
+
* @cssproperty --zn-thumbnail-preview-aspect-ratio - Overrides the measured aspect ratio of the preview
|
|
11926
|
+
* panel. By default the panel takes the asset's own ratio so it wraps the image exactly.
|
|
11927
|
+
* @cssproperty --zn-thumbnail-preview-max-width - Largest width the preview may take. Defaults to 70vw.
|
|
11928
|
+
* @cssproperty --zn-thumbnail-preview-max-height - Largest height the preview may take. Defaults to 70vh.
|
|
11929
|
+
* @cssproperty --zn-thumbnail-preview-radius - Corner radius of the preview panel.
|
|
11930
|
+
* @cssproperty --zn-thumbnail-chip-radius - Corner radius of a badge, action or preview chip.
|
|
11931
|
+
* @cssproperty --zn-thumbnail-chip-background - Background of a badge, action or preview chip.
|
|
11932
|
+
* @cssproperty --zn-thumbnail-chip-background-hover - Hover background of an action or preview chip.
|
|
11933
|
+
* @cssproperty --zn-thumbnail-chip-color - Foreground colour of a badge, action or preview chip.
|
|
11934
|
+
* @cssproperty --zn-thumbnail-chip-gap - Gap between adjacent chips.
|
|
11935
|
+
* @cssproperty --zn-thumbnail-badge-opacity - Opacity of a badge, holding it back from the action
|
|
11936
|
+
* chips beside it. Defaults to 0.65.
|
|
11937
|
+
* @cssproperty --zn-thumbnail-selected-color - Ring colour for the selected state.
|
|
11938
|
+
* @cssproperty --zn-thumbnail-active-color - Ring colour for the active state.
|
|
11939
|
+
*/
|
|
11940
|
+
export default class ZnThumbnail extends ZincElement {
|
|
11941
|
+
static styles: CSSResultGroup;
|
|
11942
|
+
static dependencies: {
|
|
11943
|
+
'zn-icon': typeof ZnIcon;
|
|
11944
|
+
};
|
|
11945
|
+
private readonly hasSlotController;
|
|
11946
|
+
/** Image URL for the built-in `<img>`. */
|
|
11947
|
+
src: string;
|
|
11948
|
+
/** Alternative text for the built-in image. Falls back to the caption. */
|
|
11949
|
+
alt: string;
|
|
11950
|
+
/** The title shown beneath the media. */
|
|
11951
|
+
caption: string;
|
|
11952
|
+
/**
|
|
11953
|
+
* Aspect ratio of the media frame, as any CSS `aspect-ratio` value (e.g. `1 / 1`, `4 / 3`).
|
|
11954
|
+
* Takes precedence over an inherited `--zn-thumbnail-aspect-ratio`. Defaults to `16 / 9`.
|
|
11955
|
+
*/
|
|
11956
|
+
aspectRatio: string;
|
|
11957
|
+
/** Renders the thumbnail as a link to this URL. */
|
|
11958
|
+
href: string;
|
|
11959
|
+
/** Where to open `href` (e.g. `_blank`). */
|
|
11960
|
+
target: string;
|
|
11961
|
+
/**
|
|
11962
|
+
* URL of the full-size asset. Setting this enables the preview overlay, which grows out of the
|
|
11963
|
+
* thumbnail's position over a full-screen backdrop.
|
|
11964
|
+
*/
|
|
11965
|
+
fullUri: string;
|
|
11966
|
+
/**
|
|
11967
|
+
* How the preview opens. `click` (the default) opens it when the thumbnail is activated; `button`
|
|
11968
|
+
* adds a dedicated expand control to the media instead, leaving clicks for selection or the link.
|
|
11969
|
+
*/
|
|
11970
|
+
previewTrigger: 'click' | 'button';
|
|
11971
|
+
/** Accessible label for the built-in preview trigger and the preview overlay. */
|
|
11972
|
+
previewLabel: string;
|
|
11973
|
+
/** Identifier reported in the `zn-select` event detail and used for group selection. */
|
|
11974
|
+
value: string;
|
|
11975
|
+
/** Draws the selected ring. Managed automatically inside a `selectable` `zn-thumbnail-group`. */
|
|
11976
|
+
selected: boolean;
|
|
11977
|
+
/**
|
|
11978
|
+
* Draws the active ring — for the thumbnail currently in use (playing, open, being edited), as
|
|
11979
|
+
* distinct from the user's selection. Takes the ring colour when a thumbnail is both active and
|
|
11980
|
+
* selected. Recolour it with `--zn-thumbnail-active-color`.
|
|
11981
|
+
*/
|
|
11982
|
+
active: boolean;
|
|
11983
|
+
/** Set by `zn-thumbnail-group` when it manages selection, so the thumbnail reads as clickable. */
|
|
11984
|
+
selectable: boolean;
|
|
11985
|
+
/** Dims the thumbnail and blocks selection, navigation and preview. */
|
|
11986
|
+
disabled: boolean;
|
|
11987
|
+
/** Icon rendered in the bottom-left badge when the `badge` slot is empty. */
|
|
11988
|
+
icon: string;
|
|
11989
|
+
/** Hides the caption row, leaving just the media frame. */
|
|
11990
|
+
hideCaption: boolean;
|
|
11991
|
+
private _previewOpen;
|
|
11992
|
+
/** Aspect ratio (width / height) measured from the asset, so the preview wraps it exactly. */
|
|
11993
|
+
private _previewRatio;
|
|
11994
|
+
private _media;
|
|
11995
|
+
private _image;
|
|
11996
|
+
private _previewImage;
|
|
11997
|
+
private _preview;
|
|
11998
|
+
private _previewFrame;
|
|
11999
|
+
private _previewBackdrop;
|
|
12000
|
+
private _previewClose;
|
|
12001
|
+
/** The media rect captured when the preview opened, so the grow animation starts from the thumbnail. */
|
|
12002
|
+
private _origin;
|
|
12003
|
+
private _animating;
|
|
12004
|
+
disconnectedCallback(): void;
|
|
12005
|
+
private _isLink;
|
|
12006
|
+
private get _previewable();
|
|
12007
|
+
/** True when activating the thumbnail itself should open the preview. */
|
|
12008
|
+
private get _previewOnActivate();
|
|
12009
|
+
/**
|
|
12010
|
+
* The asset's real aspect ratio, so the preview panel wraps the image instead of letterboxing it
|
|
12011
|
+
* inside a fixed-ratio box. The full-size image is preferred, but it usually hasn't loaded when
|
|
12012
|
+
* the preview opens — the already-loaded thumbnail shares the asset's ratio, and the rendered
|
|
12013
|
+
* media box is the last resort for slotted media that can't be measured.
|
|
12014
|
+
*/
|
|
12015
|
+
private _resolveRatio;
|
|
12016
|
+
/** Opens the preview overlay. */
|
|
12017
|
+
showPreview(): Promise<void>;
|
|
12018
|
+
/** Closes the preview overlay. */
|
|
12019
|
+
hidePreview(): Promise<void>;
|
|
12020
|
+
private _animatePreview;
|
|
12021
|
+
/** Maps the preview panel onto the thumbnail's box, so the panel appears to grow out of it. */
|
|
12022
|
+
private _collapsedTransform;
|
|
12023
|
+
private _activate;
|
|
12024
|
+
private _handleClick;
|
|
12025
|
+
private _handleKeyDown;
|
|
12026
|
+
private _handlePreviewButtonClick;
|
|
12027
|
+
private _handlePreviewCancel;
|
|
12028
|
+
private _handleBackdropClick;
|
|
12029
|
+
private _handlePreviewImageLoad;
|
|
12030
|
+
render(): import("lit-html").TemplateResult;
|
|
12031
|
+
}
|
|
12032
|
+
}
|
|
12033
|
+
declare module "components/thumbnail/index" {
|
|
12034
|
+
import ZnThumbnail from "components/thumbnail/thumbnail.component";
|
|
12035
|
+
export * from "components/thumbnail/thumbnail.component";
|
|
12036
|
+
export default ZnThumbnail;
|
|
12037
|
+
global {
|
|
12038
|
+
interface HTMLElementTagNameMap {
|
|
12039
|
+
'zn-thumbnail': ZnThumbnail;
|
|
12040
|
+
}
|
|
12041
|
+
}
|
|
12042
|
+
}
|
|
12043
|
+
declare module "components/thumbnail-group/thumbnail-group.component" {
|
|
12044
|
+
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
12045
|
+
import ZincElement from "internal/zinc-element";
|
|
12046
|
+
/**
|
|
12047
|
+
* @summary Lays a set of `zn-thumbnail` elements out as a single scrollable row, with a
|
|
12048
|
+
* "Show All" toggle that expands them into a wrapping grid.
|
|
12049
|
+
* @documentation https://zinc.style/components/thumbnail-group
|
|
12050
|
+
* @status experimental
|
|
12051
|
+
* @since 1.0
|
|
12052
|
+
*
|
|
12053
|
+
* @dependency zn-thumbnail
|
|
12054
|
+
*
|
|
12055
|
+
* @event zn-expand - Emitted when the group expands into the full grid.
|
|
12056
|
+
* @event zn-collapse - Emitted when the group collapses back to a single row.
|
|
12057
|
+
* @event zn-change - Emitted when the selected thumbnail changes (`selectable` groups only).
|
|
12058
|
+
*
|
|
12059
|
+
* @slot - One or more `zn-thumbnail` elements.
|
|
12060
|
+
* @slot caption - Replaces the heading text.
|
|
12061
|
+
* @slot actions - Extra content in the header, before the toggle.
|
|
12062
|
+
*
|
|
12063
|
+
* @csspart base - The component's base wrapper.
|
|
12064
|
+
* @csspart header - The header row holding the caption and toggle.
|
|
12065
|
+
* @csspart caption - The heading text.
|
|
12066
|
+
* @csspart toggle - The show all / show less button.
|
|
12067
|
+
* @csspart items - The scrolling row / expanded grid that holds the thumbnails.
|
|
12068
|
+
*
|
|
12069
|
+
* @cssproperty --zn-thumbnail-width - Track width of a thumbnail. Defaults to 180px. Also settable
|
|
12070
|
+
* with the `thumbnail-width` attribute.
|
|
12071
|
+
* @cssproperty --zn-thumbnail-gap - Gap between thumbnails. Also settable with the `gap` attribute.
|
|
12072
|
+
* @cssproperty --zn-thumbnail-aspect-ratio - Aspect ratio of every thumbnail in the group. Also
|
|
12073
|
+
* settable with the `aspect-ratio` attribute. Any `zn-thumbnail` custom property set here is
|
|
12074
|
+
* inherited by the slotted thumbnails.
|
|
12075
|
+
*/
|
|
12076
|
+
export default class ZnThumbnailGroup extends ZincElement {
|
|
12077
|
+
static styles: CSSResultGroup;
|
|
12078
|
+
/** The heading shown at the top left of the group. */
|
|
12079
|
+
caption: string;
|
|
12080
|
+
/** Expands the group into the full wrapping grid. */
|
|
12081
|
+
expanded: boolean;
|
|
12082
|
+
/**
|
|
12083
|
+
* Total number of thumbnails in the underlying set, shown in the "Show All (n)" label. Set this when
|
|
12084
|
+
* the row only holds the first page of a larger set; otherwise the slotted thumbnails are counted.
|
|
12085
|
+
*/
|
|
12086
|
+
total: number;
|
|
12087
|
+
/** Label of the expand toggle. The count is appended in brackets. */
|
|
12088
|
+
showAllLabel: string;
|
|
12089
|
+
/** Label of the collapse toggle. */
|
|
12090
|
+
showLessLabel: string;
|
|
12091
|
+
/** Never render the toggle, even when the row overflows. */
|
|
12092
|
+
hideToggle: boolean;
|
|
12093
|
+
/** Always render the toggle, even when every thumbnail already fits on the row. */
|
|
12094
|
+
alwaysToggle: boolean;
|
|
12095
|
+
/** Manages single selection across the slotted thumbnails. */
|
|
12096
|
+
selectable: boolean;
|
|
12097
|
+
/**
|
|
12098
|
+
* Aspect ratio for every thumbnail in the group, as any CSS `aspect-ratio` value (e.g. `1 / 1`).
|
|
12099
|
+
* Shorthand for setting `--zn-thumbnail-aspect-ratio` on the group. A thumbnail's own
|
|
12100
|
+
* `aspect-ratio` attribute still wins.
|
|
12101
|
+
*/
|
|
12102
|
+
aspectRatio: string;
|
|
12103
|
+
/** Track width of each thumbnail (e.g. `140px`). Shorthand for `--zn-thumbnail-width`. */
|
|
12104
|
+
thumbnailWidth: string;
|
|
12105
|
+
/** Gap between thumbnails (e.g. `8px`). Shorthand for `--zn-thumbnail-gap`. */
|
|
12106
|
+
gap: string;
|
|
12107
|
+
/** The `value` of the selected thumbnail (`selectable` groups only). */
|
|
12108
|
+
value: string;
|
|
12109
|
+
private _overflowing;
|
|
12110
|
+
private _count;
|
|
12111
|
+
private _items;
|
|
12112
|
+
private _resizeObserver;
|
|
12113
|
+
connectedCallback(): void;
|
|
12114
|
+
disconnectedCallback(): void;
|
|
12115
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
12116
|
+
private _observe;
|
|
12117
|
+
protected updated(changed: PropertyValues): void;
|
|
12118
|
+
/**
|
|
12119
|
+
* Mirrors the shorthand attributes onto host custom properties. They go on the host rather than
|
|
12120
|
+
* anywhere in the shadow root because the thumbnails are light-DOM children — inheriting from the
|
|
12121
|
+
* host is the only way the values reach them.
|
|
12122
|
+
*/
|
|
12123
|
+
private _syncCustomProperties;
|
|
12124
|
+
/** Expands the group into the full grid. */
|
|
12125
|
+
show(): void;
|
|
12126
|
+
/** Collapses the group back to a single row. */
|
|
12127
|
+
hide(): void;
|
|
12128
|
+
private get _thumbnails();
|
|
12129
|
+
private _handleSlotChange;
|
|
12130
|
+
private _sync;
|
|
12131
|
+
private _measure;
|
|
12132
|
+
private _handleSelect;
|
|
12133
|
+
private _handleToggle;
|
|
12134
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12135
|
+
}
|
|
12136
|
+
}
|
|
12137
|
+
declare module "components/thumbnail-group/index" {
|
|
12138
|
+
import ZnThumbnailGroup from "components/thumbnail-group/thumbnail-group.component";
|
|
12139
|
+
export * from "components/thumbnail-group/thumbnail-group.component";
|
|
12140
|
+
export default ZnThumbnailGroup;
|
|
12141
|
+
global {
|
|
12142
|
+
interface HTMLElementTagNameMap {
|
|
12143
|
+
'zn-thumbnail-group': ZnThumbnailGroup;
|
|
12144
|
+
}
|
|
12145
|
+
}
|
|
12146
|
+
}
|
|
11825
12147
|
declare module "utilities/form" {
|
|
11826
12148
|
export { clearFormStoreValues } from "internal/form";
|
|
11827
12149
|
}
|
|
@@ -12183,6 +12505,8 @@ declare module "zinc" {
|
|
|
12183
12505
|
export { default as SlashMenu } from "components/slash-menu/index";
|
|
12184
12506
|
export { default as SlashItem } from "components/slash-item/index";
|
|
12185
12507
|
export { default as ScheduleBuilder } from "components/schedule-builder/index";
|
|
12508
|
+
export { default as Thumbnail } from "components/thumbnail/index";
|
|
12509
|
+
export { default as ThumbnailGroup } from "components/thumbnail-group/index";
|
|
12186
12510
|
export { default as ZincElement } from "internal/zinc-element";
|
|
12187
12511
|
export * from "utilities/on";
|
|
12188
12512
|
export * from "utilities/query";
|