@kubex/zinc 1.1.97 → 1.1.99
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/AGENTS.md +5 -0
- package/CLAUDE.md +5 -0
- package/dist/chunks/zn.R2EAU6OS.js +1 -0
- package/dist/custom-elements.json +14747 -12528
- package/dist/vscode.html-custom-data.json +386 -61
- package/dist/web-types.json +1232 -481
- package/dist/zn.d.ts +529 -11
- package/dist/zn.min.js +649 -478
- package/docs/pages/components/background.md +143 -0
- package/docs/pages/components/button.md +11 -1
- package/docs/pages/components/chart.md +165 -3
- package/docs/pages/components/checkbox-group.md +13 -1
- package/docs/pages/components/checkbox.md +59 -1
- package/docs/pages/components/icon-picker.md +8 -0
- package/docs/pages/components/radio-group.md +12 -0
- package/docs/pages/components/radio.md +188 -0
- package/docs/pages/components/remarkd-editor.md +22 -0
- package/docs/pages/components/scroll-container.md +14 -15
- 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/background/background.component.ts +111 -0
- package/src/components/background/background.scss +236 -0
- package/src/components/background/background.test.ts +120 -0
- package/src/components/background/index.ts +12 -0
- 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/checkbox/checkbox.component.ts +62 -6
- package/src/components/checkbox/checkbox.scss +1 -0
- package/src/components/checkbox/checkbox.test.ts +56 -0
- package/src/components/checkbox-group/checkbox-group.component.ts +15 -0
- package/src/components/checkbox-group/checkbox-group.scss +23 -5
- package/src/components/checkbox-group/checkbox-group.test.ts +15 -0
- package/src/components/collapsible/collapsible.component.ts +49 -4
- package/src/components/collapsible/collapsible.scss +33 -14
- package/src/components/confirm/confirm.component.ts +3 -3
- package/src/components/confirm/confirm.test.ts +15 -0
- package/src/components/dialog/dialog.component.ts +3 -2
- package/src/components/editor/editor.component.ts +7 -6
- package/src/components/header/header.scss +2 -2
- package/src/components/icon-picker/icon-picker.component.ts +3 -0
- package/src/components/icon-picker/lucide-icons.ts +1756 -0
- package/src/components/navbar/navbar.scss +11 -0
- package/src/components/page/page.scss +1 -1
- package/src/components/radio/radio.component.ts +63 -7
- package/src/components/radio/radio.scss +1 -0
- package/src/components/radio/radio.test.ts +56 -0
- package/src/components/radio-group/radio-group.component.ts +16 -3
- package/src/components/radio-group/radio-group.scss +23 -4
- package/src/components/radio-group/radio-group.test.ts +15 -0
- package/src/components/remarkd-editor/remarkd-editor.component.ts +118 -5
- package/src/components/remarkd-editor/remarkd-editor.scss +8 -1
- package/src/components/remarkd-editor/remarkd-editor.test.ts +135 -0
- package/src/components/scroll-container/scroll-container.component.ts +15 -1
- package/src/components/scroll-container/scroll-container.scss +4 -2
- package/src/components/scroll-container/scroll-container.test.ts +13 -0
- package/src/components/slideout/slideout.component.ts +3 -2
- 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 +86 -0
- package/src/components/thumbnail-group/thumbnail-group.test.ts +151 -0
- package/src/components/tile/tile.scss +4 -2
- package/src/components/translation-group/translation-group.test.ts +22 -0
- package/src/components/translations/translations.component.ts +18 -3
- 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/form-control.scss +3 -1
- package/src/internal/conditional.ts +2 -2
- package/src/internal/form.ts +2 -1
- package/src/internal/selection-card.ts +19 -0
- package/src/selection-card.scss +187 -0
- package/src/utilities/query.test.ts +18 -1
- package/src/utilities/query.ts +8 -0
- package/src/zinc.ts +3 -0
package/dist/zn.d.ts
CHANGED
|
@@ -124,6 +124,16 @@ declare module "internal/form-navigation" {
|
|
|
124
124
|
*/
|
|
125
125
|
export function getFormNavigationController(form: HTMLFormElement): FormNavigationController;
|
|
126
126
|
}
|
|
127
|
+
declare module "utilities/query" {
|
|
128
|
+
/**
|
|
129
|
+
* Builds a valid `#id` selector. Ids can legally contain characters that CSS treats as syntax (`&`, `.`, `:`,
|
|
130
|
+
* a leading digit), so they must be escaped before being used in `querySelector`/`matches`.
|
|
131
|
+
*/
|
|
132
|
+
export function idSelector(id: string): string;
|
|
133
|
+
export function deepQuery<T extends Element = Element>(selector: string, root?: Document | ShadowRoot | Element): T | null;
|
|
134
|
+
export function deepQueryAll<T extends Element = Element>(selector: string, root?: Document | ShadowRoot | Element, out?: T[]): T[];
|
|
135
|
+
export function deepQuerySelectorAll(selector: string, element: Element, stopSelector: string): Element[];
|
|
136
|
+
}
|
|
127
137
|
declare module "internal/storage" {
|
|
128
138
|
export class Store {
|
|
129
139
|
storage: Storage;
|
|
@@ -687,11 +697,6 @@ declare module "events/zn-select" {
|
|
|
687
697
|
}
|
|
688
698
|
}
|
|
689
699
|
}
|
|
690
|
-
declare module "utilities/query" {
|
|
691
|
-
export function deepQuery<T extends Element = Element>(selector: string, root?: Document | ShadowRoot | Element): T | null;
|
|
692
|
-
export function deepQueryAll<T extends Element = Element>(selector: string, root?: Document | ShadowRoot | Element, out?: T[]): T[];
|
|
693
|
-
export function deepQuerySelectorAll(selector: string, element: Element, stopSelector: string): Element[];
|
|
694
|
-
}
|
|
695
700
|
declare module "internal/offset" {
|
|
696
701
|
/**
|
|
697
702
|
* Returns an element's offset relative to its parent. Similar to element.offsetTop and element.offsetLeft, except the
|
|
@@ -1215,6 +1220,8 @@ declare module "components/button/button.component" {
|
|
|
1215
1220
|
dataTarget: 'modal' | 'slide' | string;
|
|
1216
1221
|
rel: string;
|
|
1217
1222
|
tooltip: string;
|
|
1223
|
+
/** Accessible name for the button. Icon-only buttons fall back to `tooltip`. */
|
|
1224
|
+
label: string;
|
|
1218
1225
|
autoClick: boolean;
|
|
1219
1226
|
autoClickDelay: number;
|
|
1220
1227
|
loadingText: string;
|
|
@@ -1409,13 +1416,19 @@ declare module "components/collapsible/collapsible.component" {
|
|
|
1409
1416
|
storeTtl: number;
|
|
1410
1417
|
flush: boolean;
|
|
1411
1418
|
numberOfItems: number;
|
|
1419
|
+
private animating;
|
|
1420
|
+
private animatingTimer?;
|
|
1412
1421
|
protected _store: Store;
|
|
1413
1422
|
private readonly hasSlotController;
|
|
1414
1423
|
private readonly observer;
|
|
1415
1424
|
private showArrow;
|
|
1416
1425
|
connectedCallback(): Promise<void>;
|
|
1426
|
+
disconnectedCallback(): void;
|
|
1417
1427
|
handleCaptionToggle: (e: ZnInputEvent) => void;
|
|
1418
1428
|
protected updated(changedProperties: PropertyValues): void;
|
|
1429
|
+
private startAnimating;
|
|
1430
|
+
private stopAnimating;
|
|
1431
|
+
private handleTransitionEnd;
|
|
1419
1432
|
handleCollapse: (e: MouseEvent) => void;
|
|
1420
1433
|
recalculateNumberOfItems: () => void;
|
|
1421
1434
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1716,11 +1729,16 @@ declare module "components/well/well.component" {
|
|
|
1716
1729
|
* @since 1.0
|
|
1717
1730
|
*
|
|
1718
1731
|
* @slot - The default slot.
|
|
1732
|
+
* @slot action - Content displayed on the right hand side of the well.
|
|
1719
1733
|
*/
|
|
1720
1734
|
export default class ZnWell extends ZincElement {
|
|
1721
1735
|
static styles: CSSResultGroup;
|
|
1722
1736
|
icon: string;
|
|
1723
1737
|
inline: boolean;
|
|
1738
|
+
/** Renders the default slot inside a `pre` element, preserving whitespace using a monospace font. */
|
|
1739
|
+
pre: boolean;
|
|
1740
|
+
/** Breaks long unbroken words, so they wrap instead of forcing the well wider. */
|
|
1741
|
+
breakLong: boolean;
|
|
1724
1742
|
private readonly hasSlotController;
|
|
1725
1743
|
render(): import("lit-html").TemplateResult<1>;
|
|
1726
1744
|
}
|
|
@@ -4477,7 +4495,7 @@ declare module "components/channel-tile/index" {
|
|
|
4477
4495
|
}
|
|
4478
4496
|
declare module "components/chart/builders" {
|
|
4479
4497
|
import type { EChartsOption } from 'echarts';
|
|
4480
|
-
export type ChartType = 'area' | 'bar' | 'line' | 'sankey';
|
|
4498
|
+
export type ChartType = 'area' | 'bar' | 'donut' | 'funnel' | 'gauge' | 'heatmap' | 'line' | 'pie' | 'radar' | 'sankey' | 'scatter' | 'sunburst' | 'treemap';
|
|
4481
4499
|
export interface SeriesItem {
|
|
4482
4500
|
name: string;
|
|
4483
4501
|
data: any[];
|
|
@@ -4488,6 +4506,18 @@ declare module "components/chart/builders" {
|
|
|
4488
4506
|
target: string;
|
|
4489
4507
|
value: number;
|
|
4490
4508
|
}
|
|
4509
|
+
export interface PieDataItem {
|
|
4510
|
+
name?: string;
|
|
4511
|
+
value: number;
|
|
4512
|
+
color?: string;
|
|
4513
|
+
itemStyle?: Record<string, unknown>;
|
|
4514
|
+
}
|
|
4515
|
+
export interface RadarIndicator {
|
|
4516
|
+
name: string;
|
|
4517
|
+
max?: number;
|
|
4518
|
+
min?: number;
|
|
4519
|
+
color?: string;
|
|
4520
|
+
}
|
|
4491
4521
|
export interface BuilderProps {
|
|
4492
4522
|
type: ChartType;
|
|
4493
4523
|
data: SeriesItem[];
|
|
@@ -4503,10 +4533,25 @@ declare module "components/chart/builders" {
|
|
|
4503
4533
|
scale?: boolean | number;
|
|
4504
4534
|
textColor?: string;
|
|
4505
4535
|
borderColor?: string;
|
|
4536
|
+
innerRadius?: number | string;
|
|
4537
|
+
outerRadius?: number | string;
|
|
4538
|
+
showLabels?: boolean;
|
|
4539
|
+
yCategories?: string[];
|
|
4540
|
+
indicators?: RadarIndicator[];
|
|
4541
|
+
minValue?: number;
|
|
4542
|
+
maxValue?: number;
|
|
4506
4543
|
}
|
|
4507
4544
|
export function buildBarOption(props: BuilderProps): EChartsOption;
|
|
4508
4545
|
export function buildLineOption(props: BuilderProps): EChartsOption;
|
|
4509
4546
|
export function buildAreaOption(props: BuilderProps): EChartsOption;
|
|
4547
|
+
export function buildScatterOption(props: BuilderProps): EChartsOption;
|
|
4548
|
+
export function buildPieOption(props: BuilderProps): EChartsOption;
|
|
4549
|
+
export function buildRadarOption(props: BuilderProps): EChartsOption;
|
|
4550
|
+
export function buildGaugeOption(props: BuilderProps): EChartsOption;
|
|
4551
|
+
export function buildFunnelOption(props: BuilderProps): EChartsOption;
|
|
4552
|
+
export function buildHeatmapOption(props: BuilderProps): EChartsOption;
|
|
4553
|
+
export function buildTreemapOption(props: BuilderProps): EChartsOption;
|
|
4554
|
+
export function buildSunburstOption(props: BuilderProps): EChartsOption;
|
|
4510
4555
|
export function buildSankeyOption(props: BuilderProps): EChartsOption;
|
|
4511
4556
|
}
|
|
4512
4557
|
declare module "components/chart/echarts-loader" {
|
|
@@ -4515,7 +4560,7 @@ declare module "components/chart/echarts-loader" {
|
|
|
4515
4560
|
export function loadECharts(): Promise<EChartsModule>;
|
|
4516
4561
|
}
|
|
4517
4562
|
declare module "components/chart/chart.component" {
|
|
4518
|
-
import { type ChartType, type SeriesItem } from "components/chart/builders";
|
|
4563
|
+
import { type ChartType, type RadarIndicator, type SeriesItem } from "components/chart/builders";
|
|
4519
4564
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
4520
4565
|
import ZincElement from "internal/zinc-element";
|
|
4521
4566
|
/**
|
|
@@ -4531,6 +4576,8 @@ declare module "components/chart/chart.component" {
|
|
|
4531
4576
|
type: ChartType;
|
|
4532
4577
|
data: SeriesItem[];
|
|
4533
4578
|
categories: string[];
|
|
4579
|
+
yCategories: string[];
|
|
4580
|
+
indicators: RadarIndicator[];
|
|
4534
4581
|
xAxis: 'datetime' | 'category' | 'numeric';
|
|
4535
4582
|
datapointSize: number;
|
|
4536
4583
|
stacked: boolean;
|
|
@@ -4543,6 +4590,11 @@ declare module "components/chart/chart.component" {
|
|
|
4543
4590
|
colors?: string[];
|
|
4544
4591
|
syncGroup?: string;
|
|
4545
4592
|
smooth: boolean;
|
|
4593
|
+
innerRadius?: number | string;
|
|
4594
|
+
outerRadius?: number | string;
|
|
4595
|
+
showLabels?: boolean;
|
|
4596
|
+
minValue?: number;
|
|
4597
|
+
maxValue?: number;
|
|
4546
4598
|
scale: boolean | number;
|
|
4547
4599
|
private chart?;
|
|
4548
4600
|
private echarts?;
|
|
@@ -5109,6 +5161,9 @@ declare module "components/icon-picker/brand-icons" {
|
|
|
5109
5161
|
declare module "components/icon-picker/line-icons" {
|
|
5110
5162
|
export const lineIcons: string[];
|
|
5111
5163
|
}
|
|
5164
|
+
declare module "components/icon-picker/lucide-icons" {
|
|
5165
|
+
export const lucideIcons: string[];
|
|
5166
|
+
}
|
|
5112
5167
|
declare module "components/icon-picker/material-icons" {
|
|
5113
5168
|
export const materialIcons: string[];
|
|
5114
5169
|
export const material_outlinedIcons: string[];
|
|
@@ -5931,16 +5986,19 @@ declare module "components/scroll-container/scroll-container.component" {
|
|
|
5931
5986
|
*
|
|
5932
5987
|
* @csspart base - The component's base wrapper.
|
|
5933
5988
|
*
|
|
5934
|
-
* @cssproperty --
|
|
5989
|
+
* @cssproperty --zn-scroll-container-height - The height and maximum height of the scroll container.
|
|
5935
5990
|
*/
|
|
5936
5991
|
export default class ZnScrollContainer extends ZincElement {
|
|
5937
5992
|
static styles: CSSResultGroup;
|
|
5993
|
+
/** The height and maximum height of the scroll container. */
|
|
5994
|
+
height: string;
|
|
5938
5995
|
startScrolled: boolean;
|
|
5939
5996
|
private container;
|
|
5940
5997
|
private footer;
|
|
5941
5998
|
private _footerObserved;
|
|
5942
5999
|
private _footerHeightFrame;
|
|
5943
6000
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
6001
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
5944
6002
|
disconnectedCallback(): void;
|
|
5945
6003
|
scrollEnd(): void;
|
|
5946
6004
|
private _syncFooterHeight;
|
|
@@ -6972,10 +7030,20 @@ declare module "components/editor/index" {
|
|
|
6972
7030
|
}
|
|
6973
7031
|
}
|
|
6974
7032
|
}
|
|
7033
|
+
declare module "internal/selection-card" {
|
|
7034
|
+
/** Where a selection card renders its image, relative to the card's text. */
|
|
7035
|
+
export type SelectionCardImagePosition = 'top' | 'right' | 'bottom' | 'left';
|
|
7036
|
+
/**
|
|
7037
|
+
* Where a selection card renders its radio/checkbox indicator. `start` keeps the standard
|
|
7038
|
+
* inline position; `none` hides the indicator so the card itself shows the selected state.
|
|
7039
|
+
*/
|
|
7040
|
+
export type SelectionCardControlPosition = 'start' | 'none' | 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
7041
|
+
}
|
|
6975
7042
|
declare module "components/checkbox/checkbox.component" {
|
|
6976
7043
|
import { type CSSResultGroup } from 'lit';
|
|
6977
7044
|
import ZincElement from "internal/zinc-element";
|
|
6978
7045
|
import ZnIcon from "components/icon/index";
|
|
7046
|
+
import type { SelectionCardControlPosition, SelectionCardImagePosition } from "internal/selection-card";
|
|
6979
7047
|
import type { ZincFormControl } from "internal/zinc-element";
|
|
6980
7048
|
type ColorOption = 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'transparent';
|
|
6981
7049
|
/**
|
|
@@ -6987,6 +7055,7 @@ declare module "components/checkbox/checkbox.component" {
|
|
|
6987
7055
|
* @dependency zn-icon
|
|
6988
7056
|
*
|
|
6989
7057
|
* @slot - The checkbox's label.
|
|
7058
|
+
* @slot image - Replaces the built-in image used by contained checkboxes.
|
|
6990
7059
|
* @slot description - A description of the checkbox's label. Serves as help text for a checkbox item. Alternatively, you can use the `description` attribute.
|
|
6991
7060
|
* @slot selected-content - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.
|
|
6992
7061
|
*
|
|
@@ -7003,9 +7072,22 @@ declare module "components/checkbox/checkbox.component" {
|
|
|
7003
7072
|
* @csspart checked-icon - The checked icon, an `<zn-icon>` element.
|
|
7004
7073
|
* @csspart unchecked-icon - The unchecked icon, an `<zn-icon>` element.
|
|
7005
7074
|
* @csspart indeterminate-icon - The indeterminate icon, an `<zn-icon>` element.
|
|
7075
|
+
* @csspart image-container - The wrapper around the built-in image or image slot.
|
|
7076
|
+
* @csspart image - The built-in image.
|
|
7077
|
+
* @csspart card-title - The title inside a selection card.
|
|
7006
7078
|
* @csspart label - The container that wraps the checkbox's label.
|
|
7007
7079
|
* @csspart description - The container that wraps the checkbox's description.
|
|
7008
7080
|
* @csspart selected-content - The container that wraps optional content that appears when a checkbox is checked.
|
|
7081
|
+
*
|
|
7082
|
+
* @cssproperty --zn-selection-card-image-width - Width of the built-in card image.
|
|
7083
|
+
* @cssproperty --zn-selection-card-image-height - Height of the built-in card image.
|
|
7084
|
+
* @cssproperty --zn-selection-card-min-height - Minimum height of a contained checkbox with an image.
|
|
7085
|
+
* @cssproperty --zn-selection-card-content-min-width - Width the card text keeps before it wraps below the image.
|
|
7086
|
+
* @cssproperty --zn-selection-card-title-font-size - Font size of a selection card title.
|
|
7087
|
+
* @cssproperty --zn-selection-card-padding - Equal inset around the contents of a selection card.
|
|
7088
|
+
* @cssproperty --zn-selection-card-gap - Space between the image, title, and indicator gutter.
|
|
7089
|
+
* @cssproperty --zn-selection-card-control-offset - Distance between a positioned control and the card edge.
|
|
7090
|
+
* @cssproperty --zn-selection-card-border-radius - Corner radius of a contained container.
|
|
7009
7091
|
*/
|
|
7010
7092
|
export default class ZnCheckbox extends ZincElement implements ZincFormControl {
|
|
7011
7093
|
static styles: CSSResultGroup;
|
|
@@ -7021,6 +7103,8 @@ declare module "components/checkbox/checkbox.component" {
|
|
|
7021
7103
|
name: string;
|
|
7022
7104
|
/** The current value of the checkbox, submitted as a name/value pair with form data. */
|
|
7023
7105
|
value: string;
|
|
7106
|
+
/** Title rendered inside the card. The default slot takes precedence when provided. */
|
|
7107
|
+
cardTitle: string;
|
|
7024
7108
|
/** The unchecked value of the checkbox, submitted as a name/value pair with form data. */
|
|
7025
7109
|
uncheckedValue: string;
|
|
7026
7110
|
/** The checkbox's size. */
|
|
@@ -7036,6 +7120,19 @@ declare module "components/checkbox/checkbox.component" {
|
|
|
7036
7120
|
indeterminate: boolean;
|
|
7037
7121
|
/** Draws a container around the checkbox. */
|
|
7038
7122
|
contained: boolean;
|
|
7123
|
+
/** Squares off the corners of the container drawn by `contained`, which is rounded by default. */
|
|
7124
|
+
square: boolean;
|
|
7125
|
+
/** URL for the image shown in a contained checkbox. */
|
|
7126
|
+
src: string;
|
|
7127
|
+
/** Accessible text for the built-in image. Leave empty when the image is decorative. */
|
|
7128
|
+
imageAlt: string;
|
|
7129
|
+
/** Places the image above, beside, or below the checkbox's text. Requires `contained`. */
|
|
7130
|
+
imagePosition: SelectionCardImagePosition;
|
|
7131
|
+
/**
|
|
7132
|
+
* Places the checkbox indicator within a contained card. Use `none` to hide the indicator so the card itself
|
|
7133
|
+
* shows the selected state. Requires `contained`.
|
|
7134
|
+
*/
|
|
7135
|
+
controlPosition: SelectionCardControlPosition;
|
|
7039
7136
|
/** Removes a container around the checkbox. */
|
|
7040
7137
|
borderless: boolean;
|
|
7041
7138
|
/** Applies styles relevant to checkboxes in a horizontal layout. */
|
|
@@ -7268,6 +7365,7 @@ declare module "components/radio/radio.component" {
|
|
|
7268
7365
|
import { type CSSResultGroup } from 'lit';
|
|
7269
7366
|
import ZincElement from "internal/zinc-element";
|
|
7270
7367
|
import ZnIcon from "components/icon/index";
|
|
7368
|
+
import type { SelectionCardControlPosition, SelectionCardImagePosition } from "internal/selection-card";
|
|
7271
7369
|
import type { ZincFormControl } from "internal/zinc-element";
|
|
7272
7370
|
/**
|
|
7273
7371
|
* @summary Short summary of the component's intended use.
|
|
@@ -7278,6 +7376,7 @@ declare module "components/radio/radio.component" {
|
|
|
7278
7376
|
* @dependency zn-icon
|
|
7279
7377
|
*
|
|
7280
7378
|
* @slot - The radio's label.
|
|
7379
|
+
* @slot image - Replaces the built-in image used by contained radios.
|
|
7281
7380
|
* @slot description - A description of the radio's label. Serves as help text for a radio item. Alternatively, you can use the `description` attribute.
|
|
7282
7381
|
* @slot selected-content - Use to nest rich content (like an input) inside a selected radio item. Use only with the contained style.
|
|
7283
7382
|
*
|
|
@@ -7291,9 +7390,22 @@ declare module "components/radio/radio.component" {
|
|
|
7291
7390
|
* @csspart control - The square container that wraps the radio's checked state.
|
|
7292
7391
|
* @csspart control--checked - Matches the control part when the radio is checked.
|
|
7293
7392
|
* @csspart checked-icon - The checked icon, an `<zn-icon>` element.
|
|
7393
|
+
* @csspart image-container - The wrapper around the built-in image or image slot.
|
|
7394
|
+
* @csspart image - The built-in image.
|
|
7395
|
+
* @csspart card-title - The title inside a selection card.
|
|
7294
7396
|
* @csspart label - The container that wraps the radio's label.
|
|
7295
7397
|
* @csspart description - The container that wraps the radio's description.
|
|
7296
7398
|
* @csspart selected-content - The container that wraps optional content that appears when a radio is checked.
|
|
7399
|
+
*
|
|
7400
|
+
* @cssproperty --zn-selection-card-image-width - Width of the built-in card image.
|
|
7401
|
+
* @cssproperty --zn-selection-card-image-height - Height of the built-in card image.
|
|
7402
|
+
* @cssproperty --zn-selection-card-min-height - Minimum height of a contained radio with an image.
|
|
7403
|
+
* @cssproperty --zn-selection-card-content-min-width - Width the card text keeps before it wraps below the image.
|
|
7404
|
+
* @cssproperty --zn-selection-card-title-font-size - Font size of a selection card title.
|
|
7405
|
+
* @cssproperty --zn-selection-card-padding - Equal inset around the contents of a selection card.
|
|
7406
|
+
* @cssproperty --zn-selection-card-gap - Space between the image, title, and indicator gutter.
|
|
7407
|
+
* @cssproperty --zn-selection-card-control-offset - Distance between a positioned control and the card edge.
|
|
7408
|
+
* @cssproperty --zn-selection-card-border-radius - Corner radius of a contained container.
|
|
7297
7409
|
*/
|
|
7298
7410
|
export default class ZnRadio extends ZincElement implements ZincFormControl {
|
|
7299
7411
|
static styles: CSSResultGroup;
|
|
@@ -7309,6 +7421,8 @@ declare module "components/radio/radio.component" {
|
|
|
7309
7421
|
name: string;
|
|
7310
7422
|
/** The current value of the radio, submitted as a name/value pair with form data. */
|
|
7311
7423
|
value: string;
|
|
7424
|
+
/** Title rendered inside the card. The default slot takes precedence when provided. */
|
|
7425
|
+
cardTitle: string;
|
|
7312
7426
|
/** The radio's size. */
|
|
7313
7427
|
size: 'small' | 'medium' | 'large';
|
|
7314
7428
|
/** Disables the radio. */
|
|
@@ -7317,6 +7431,19 @@ declare module "components/radio/radio.component" {
|
|
|
7317
7431
|
checked: boolean;
|
|
7318
7432
|
/** Draws a container around the radio. */
|
|
7319
7433
|
contained: boolean;
|
|
7434
|
+
/** Squares off the corners of the container drawn by `contained`, which is rounded by default. */
|
|
7435
|
+
square: boolean;
|
|
7436
|
+
/** URL for the image shown in a contained radio. */
|
|
7437
|
+
src: string;
|
|
7438
|
+
/** Accessible text for the built-in image. Leave empty when the image is decorative. */
|
|
7439
|
+
imageAlt: string;
|
|
7440
|
+
/** Places the image above, beside, or below the radio's text. Requires `contained`. */
|
|
7441
|
+
imagePosition: SelectionCardImagePosition;
|
|
7442
|
+
/**
|
|
7443
|
+
* Places the radio indicator within a contained card. Use `none` to hide the indicator so the card itself
|
|
7444
|
+
* shows the selected state. Requires `contained`.
|
|
7445
|
+
*/
|
|
7446
|
+
controlPosition: SelectionCardControlPosition;
|
|
7320
7447
|
/** Applies styles relevant to radios in a horizontal layout. */
|
|
7321
7448
|
horizontal: boolean;
|
|
7322
7449
|
/** The default value of the form control. Primarily used for resetting the form control. */
|
|
@@ -7482,7 +7609,7 @@ declare module "components/radio-group/radio-group.component" {
|
|
|
7482
7609
|
*
|
|
7483
7610
|
* @csspart base - The component's base wrapper.
|
|
7484
7611
|
*
|
|
7485
|
-
* @cssproperty --
|
|
7612
|
+
* @cssproperty --zn-radio-group-column-width - Minimum column width used by the horizontal contained grid, or the card basis when `wrap` is set.
|
|
7486
7613
|
*/
|
|
7487
7614
|
export default class ZnRadioGroup extends ZincElement implements ZincFormControl {
|
|
7488
7615
|
static styles: CSSResultGroup;
|
|
@@ -7509,10 +7636,17 @@ declare module "components/radio-group/radio-group.component" {
|
|
|
7509
7636
|
value: string;
|
|
7510
7637
|
/** The radio group's size. This size will be applied to all child radios */
|
|
7511
7638
|
size: 'small' | 'medium' | 'large';
|
|
7512
|
-
/** The
|
|
7639
|
+
/** The radio group's orientation. Changes the group's layout from the default (vertical) to horizontal. */
|
|
7513
7640
|
horizontal: boolean;
|
|
7514
|
-
/** The
|
|
7641
|
+
/** The radio group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child radios. */
|
|
7515
7642
|
contained: boolean;
|
|
7643
|
+
/** Squares off the corners of every contained radio in the group, which are rounded by default. */
|
|
7644
|
+
square: boolean;
|
|
7645
|
+
/**
|
|
7646
|
+
* Lays horizontal contained radios out as a wrapping row instead of an equal-width grid, so each one sizes from
|
|
7647
|
+
* `--zn-radio-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.
|
|
7648
|
+
*/
|
|
7649
|
+
wrap: boolean;
|
|
7516
7650
|
/**
|
|
7517
7651
|
* By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
|
|
7518
7652
|
* to place the form control outside a form and associate it with the form that has this `id`. The form must be in
|
|
@@ -7857,6 +7991,8 @@ declare module "components/checkbox-group/checkbox-group.component" {
|
|
|
7857
7991
|
* @csspart form-control-label - The label's wrapper.
|
|
7858
7992
|
* @csspart form-control-input - The input's wrapper.
|
|
7859
7993
|
* @csspart form-control-help-text - The help text's wrapper.
|
|
7994
|
+
*
|
|
7995
|
+
* @cssproperty --zn-checkbox-group-column-width - Minimum column width used by the horizontal contained grid, or the card basis when `wrap` is set.
|
|
7860
7996
|
*/
|
|
7861
7997
|
export default class ZnCheckboxGroup extends ZincElement implements ZincFormControl {
|
|
7862
7998
|
static styles: CSSResultGroup;
|
|
@@ -7886,6 +8022,13 @@ declare module "components/checkbox-group/checkbox-group.component" {
|
|
|
7886
8022
|
horizontal: boolean;
|
|
7887
8023
|
/** The checkbox group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child checkboxes. */
|
|
7888
8024
|
contained: boolean;
|
|
8025
|
+
/** Squares off the corners of every contained checkbox in the group, which are rounded by default. */
|
|
8026
|
+
square: boolean;
|
|
8027
|
+
/**
|
|
8028
|
+
* Lays horizontal contained checkboxes out as a wrapping row instead of an equal-width grid, so each one sizes from
|
|
8029
|
+
* `--zn-checkbox-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.
|
|
8030
|
+
*/
|
|
8031
|
+
wrap: boolean;
|
|
7889
8032
|
/**
|
|
7890
8033
|
* By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
|
|
7891
8034
|
* to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
|
|
@@ -8808,6 +8951,12 @@ declare module "components/translations/translations.component" {
|
|
|
8808
8951
|
addLanguageKey(languageCode: string): void;
|
|
8809
8952
|
/** Returns all language codes that have values. */
|
|
8810
8953
|
getValueLanguages(): string[];
|
|
8954
|
+
/**
|
|
8955
|
+
* `values`, falling back to the `value` attribute it is built from while that is still pending. A parent
|
|
8956
|
+
* zn-translation-group syncs its children from its own first update, which runs before theirs, so reading
|
|
8957
|
+
* `values` alone would see it empty and overwrite the value the server rendered.
|
|
8958
|
+
*/
|
|
8959
|
+
private pendingValues;
|
|
8811
8960
|
disconnectedCallback(): void;
|
|
8812
8961
|
protected firstUpdated(): void;
|
|
8813
8962
|
protected updated(changedProperties: PropertyValues): void;
|
|
@@ -9335,6 +9484,8 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
9335
9484
|
* @csspart image-controls - The caption / alignment / size panel shown when an image block is clicked.
|
|
9336
9485
|
* @csspart include - The chip rendered in place of an `include::` directive.
|
|
9337
9486
|
* @csspart include-picker - The inline Include picker opened from the toolbar or "/include".
|
|
9487
|
+
*
|
|
9488
|
+
* @cssproperty --remarkd-editor-max-height - The tallest the editor grows before its body scrolls. Defaults to `100dvh`.
|
|
9338
9489
|
*/
|
|
9339
9490
|
export default class ZnRemarkdEditor extends ZincElement implements ZincFormControl {
|
|
9340
9491
|
static styles: CSSResultGroup;
|
|
@@ -9373,6 +9524,8 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
9373
9524
|
private dragStartX;
|
|
9374
9525
|
private dragStartY;
|
|
9375
9526
|
private dragGhost;
|
|
9527
|
+
private dragPointerY;
|
|
9528
|
+
private autoScrollFrame;
|
|
9376
9529
|
/** The name of the control, submitted as part of form data. */
|
|
9377
9530
|
name: string;
|
|
9378
9531
|
/** The current remarkd source. */
|
|
@@ -9443,6 +9596,20 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
9443
9596
|
*/
|
|
9444
9597
|
private computeEditShell;
|
|
9445
9598
|
private focusInput;
|
|
9599
|
+
/**
|
|
9600
|
+
* Scrolls the editor's own body to bring `el` into view. Never `scrollIntoView()` and
|
|
9601
|
+
* never `focus()` without preventScroll: both walk every scrollable ancestor, and an
|
|
9602
|
+
* `overflow: hidden`/`auto` panel around the editor is scrollable too — that shifts a
|
|
9603
|
+
* container the user never asked to move.
|
|
9604
|
+
*/
|
|
9605
|
+
private reveal;
|
|
9606
|
+
private revealAfterUpdate;
|
|
9607
|
+
/**
|
|
9608
|
+
* Centres a block added without opening an editor. An image has no height until it
|
|
9609
|
+
* loads, so the first pass scrolls against a layout that is still short — the second
|
|
9610
|
+
* pass corrects it once the real dimensions are in.
|
|
9611
|
+
*/
|
|
9612
|
+
private revealBlock;
|
|
9446
9613
|
private addBlockAt;
|
|
9447
9614
|
private deleteBlock;
|
|
9448
9615
|
/** Inserts a draft block — committed (or dropped, if left empty) on blur. */
|
|
@@ -9469,6 +9636,16 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
9469
9636
|
private insertionIndexFromY;
|
|
9470
9637
|
private handleHandlePointerDown;
|
|
9471
9638
|
private handleDragPointerMove;
|
|
9639
|
+
/**
|
|
9640
|
+
* Holding the pointer near a scroll edge keeps the content moving, so a block can
|
|
9641
|
+
* be dragged past the visible slice of a long document. Runs per frame rather than
|
|
9642
|
+
* per pointermove — a pointer parked at the edge stops emitting moves.
|
|
9643
|
+
*/
|
|
9644
|
+
private stepAutoScroll;
|
|
9645
|
+
/** Scrolls the editor body, falling through to the page once the body is at its limit. */
|
|
9646
|
+
private autoScroll;
|
|
9647
|
+
/** Scroll step for this frame: nothing until the pointer is within `edge` of a boundary. */
|
|
9648
|
+
private edgeScrollDelta;
|
|
9472
9649
|
private handleDragPointerUp;
|
|
9473
9650
|
private cancelDrag;
|
|
9474
9651
|
private createDragGhost;
|
|
@@ -11822,6 +11999,344 @@ declare module "components/schedule-builder/index" {
|
|
|
11822
11999
|
}
|
|
11823
12000
|
}
|
|
11824
12001
|
}
|
|
12002
|
+
declare module "components/thumbnail/thumbnail.component" {
|
|
12003
|
+
import { type CSSResultGroup } from 'lit';
|
|
12004
|
+
import ZincElement from "internal/zinc-element";
|
|
12005
|
+
import ZnIcon from "components/icon/index";
|
|
12006
|
+
/**
|
|
12007
|
+
* @summary A captioned image tile — a fixed aspect-ratio preview with a title beneath it, optional
|
|
12008
|
+
* corner badges and actions, and an optional full-screen preview that grows out of the thumbnail.
|
|
12009
|
+
* @documentation https://zinc.style/components/thumbnail
|
|
12010
|
+
* @status experimental
|
|
12011
|
+
* @since 1.0
|
|
12012
|
+
*
|
|
12013
|
+
* @dependency zn-icon
|
|
12014
|
+
*
|
|
12015
|
+
* @event zn-select - Emitted when an enabled thumbnail is activated by click or keyboard. Cancelable —
|
|
12016
|
+
* call `preventDefault()` to stop the preview from opening and to stop a parent
|
|
12017
|
+
* `zn-thumbnail-group` from changing its selection.
|
|
12018
|
+
* @event zn-show - Emitted when the preview overlay starts opening.
|
|
12019
|
+
* @event zn-close - Emitted once the preview overlay has finished closing.
|
|
12020
|
+
*
|
|
12021
|
+
* @slot - Fallback content rendered in place of the media when no `src` is set.
|
|
12022
|
+
* @slot image - Replaces the built-in `<img>` (e.g. a video, canvas or `zn-icon`).
|
|
12023
|
+
* @slot caption - Replaces the caption text.
|
|
12024
|
+
* @slot badge - Content pinned to the bottom-left of the media (e.g. a play indicator). Badges take
|
|
12025
|
+
* no pointer events and are held back on opacity, so they read as information about the asset
|
|
12026
|
+
* rather than as something to click.
|
|
12027
|
+
* @slot actions - Controls pinned to the bottom-right of the media (e.g. a download button). Each
|
|
12028
|
+
* slotted element becomes its own chip, so several actions read as separate icons on the thumbnail
|
|
12029
|
+
* rather than one grouped pill. This sits outside the thumbnail's link, so buttons and links here
|
|
12030
|
+
* behave normally and never select the thumbnail or follow its `href`.
|
|
12031
|
+
* @slot preview - Replaces the preview media (e.g. a `<video>` for the full-size asset).
|
|
12032
|
+
*
|
|
12033
|
+
* @csspart base - The component's base wrapper.
|
|
12034
|
+
* @csspart link - The anchor (or div) covering the media and caption.
|
|
12035
|
+
* @csspart media - The fixed aspect-ratio media frame.
|
|
12036
|
+
* @csspart image - The built-in image element.
|
|
12037
|
+
* @csspart overlay - The layer holding the badge, actions and preview button.
|
|
12038
|
+
* @csspart badge - The bottom-left badge container.
|
|
12039
|
+
* @csspart actions - The bottom-right actions container.
|
|
12040
|
+
* @csspart preview-button - The built-in preview trigger, when `preview-trigger="button"`.
|
|
12041
|
+
* @csspart caption - The caption beneath the media.
|
|
12042
|
+
* @csspart preview - The preview `<dialog>`.
|
|
12043
|
+
* @csspart preview-backdrop - The full-screen backdrop behind the preview.
|
|
12044
|
+
* @csspart preview-frame - The rounded panel the preview media sits in.
|
|
12045
|
+
* @csspart preview-image - The full-size image inside the preview.
|
|
12046
|
+
* @csspart preview-close - The preview's close button.
|
|
12047
|
+
*
|
|
12048
|
+
* @cssproperty --zn-thumbnail-aspect-ratio - Aspect ratio of the media frame. Defaults to 16 / 9. The
|
|
12049
|
+
* `aspect-ratio` attribute sets this on the thumbnail itself; set the property on any ancestor
|
|
12050
|
+
* (including a `zn-thumbnail-group`) to apply it to every thumbnail beneath it.
|
|
12051
|
+
* @cssproperty --zn-thumbnail-radius - Corner radius of the media frame.
|
|
12052
|
+
* @cssproperty --zn-thumbnail-preview-aspect-ratio - Overrides the measured aspect ratio of the preview
|
|
12053
|
+
* panel. By default the panel takes the asset's own ratio so it wraps the image exactly.
|
|
12054
|
+
* @cssproperty --zn-thumbnail-preview-max-width - Largest width the preview may take. Defaults to 70vw.
|
|
12055
|
+
* @cssproperty --zn-thumbnail-preview-max-height - Largest height the preview may take. Defaults to 70vh.
|
|
12056
|
+
* @cssproperty --zn-thumbnail-preview-radius - Corner radius of the preview panel.
|
|
12057
|
+
* @cssproperty --zn-thumbnail-chip-radius - Corner radius of a badge, action or preview chip.
|
|
12058
|
+
* @cssproperty --zn-thumbnail-chip-background - Background of a badge, action or preview chip.
|
|
12059
|
+
* @cssproperty --zn-thumbnail-chip-background-hover - Hover background of an action or preview chip.
|
|
12060
|
+
* @cssproperty --zn-thumbnail-chip-color - Foreground colour of a badge, action or preview chip.
|
|
12061
|
+
* @cssproperty --zn-thumbnail-chip-gap - Gap between adjacent chips.
|
|
12062
|
+
* @cssproperty --zn-thumbnail-badge-opacity - Opacity of a badge, holding it back from the action
|
|
12063
|
+
* chips beside it. Defaults to 0.65.
|
|
12064
|
+
* @cssproperty --zn-thumbnail-selected-color - Ring colour for the selected state.
|
|
12065
|
+
* @cssproperty --zn-thumbnail-active-color - Ring colour for the active state.
|
|
12066
|
+
*/
|
|
12067
|
+
export default class ZnThumbnail extends ZincElement {
|
|
12068
|
+
static styles: CSSResultGroup;
|
|
12069
|
+
static dependencies: {
|
|
12070
|
+
'zn-icon': typeof ZnIcon;
|
|
12071
|
+
};
|
|
12072
|
+
private readonly hasSlotController;
|
|
12073
|
+
/** Image URL for the built-in `<img>`. */
|
|
12074
|
+
src: string;
|
|
12075
|
+
/** Alternative text for the built-in image. Falls back to the caption. */
|
|
12076
|
+
alt: string;
|
|
12077
|
+
/** The title shown beneath the media. */
|
|
12078
|
+
caption: string;
|
|
12079
|
+
/**
|
|
12080
|
+
* Aspect ratio of the media frame, as any CSS `aspect-ratio` value (e.g. `1 / 1`, `4 / 3`).
|
|
12081
|
+
* Takes precedence over an inherited `--zn-thumbnail-aspect-ratio`. Defaults to `16 / 9`.
|
|
12082
|
+
*/
|
|
12083
|
+
aspectRatio: string;
|
|
12084
|
+
/** Renders the thumbnail as a link to this URL. */
|
|
12085
|
+
href: string;
|
|
12086
|
+
/** Where to open `href` (e.g. `_blank`). */
|
|
12087
|
+
target: string;
|
|
12088
|
+
/**
|
|
12089
|
+
* URL of the full-size asset. Setting this enables the preview overlay, which grows out of the
|
|
12090
|
+
* thumbnail's position over a full-screen backdrop.
|
|
12091
|
+
*/
|
|
12092
|
+
fullUri: string;
|
|
12093
|
+
/**
|
|
12094
|
+
* How the preview opens. `click` (the default) opens it when the thumbnail is activated; `button`
|
|
12095
|
+
* adds a dedicated expand control to the media instead, leaving clicks for selection or the link.
|
|
12096
|
+
*/
|
|
12097
|
+
previewTrigger: 'click' | 'button';
|
|
12098
|
+
/** Accessible label for the built-in preview trigger and the preview overlay. */
|
|
12099
|
+
previewLabel: string;
|
|
12100
|
+
/** Identifier reported in the `zn-select` event detail and used for group selection. */
|
|
12101
|
+
value: string;
|
|
12102
|
+
/** Draws the selected ring. Managed automatically inside a `selectable` `zn-thumbnail-group`. */
|
|
12103
|
+
selected: boolean;
|
|
12104
|
+
/**
|
|
12105
|
+
* Draws the active ring — for the thumbnail currently in use (playing, open, being edited), as
|
|
12106
|
+
* distinct from the user's selection. Takes the ring colour when a thumbnail is both active and
|
|
12107
|
+
* selected. Recolour it with `--zn-thumbnail-active-color`.
|
|
12108
|
+
*/
|
|
12109
|
+
active: boolean;
|
|
12110
|
+
/** Set by `zn-thumbnail-group` when it manages selection, so the thumbnail reads as clickable. */
|
|
12111
|
+
selectable: boolean;
|
|
12112
|
+
/** Dims the thumbnail and blocks selection, navigation and preview. */
|
|
12113
|
+
disabled: boolean;
|
|
12114
|
+
/** Icon rendered in the bottom-left badge when the `badge` slot is empty. */
|
|
12115
|
+
icon: string;
|
|
12116
|
+
/** Hides the caption row, leaving just the media frame. */
|
|
12117
|
+
hideCaption: boolean;
|
|
12118
|
+
private _previewOpen;
|
|
12119
|
+
/** Aspect ratio (width / height) measured from the asset, so the preview wraps it exactly. */
|
|
12120
|
+
private _previewRatio;
|
|
12121
|
+
private _media;
|
|
12122
|
+
private _image;
|
|
12123
|
+
private _previewImage;
|
|
12124
|
+
private _preview;
|
|
12125
|
+
private _previewFrame;
|
|
12126
|
+
private _previewBackdrop;
|
|
12127
|
+
private _previewClose;
|
|
12128
|
+
/** The media rect captured when the preview opened, so the grow animation starts from the thumbnail. */
|
|
12129
|
+
private _origin;
|
|
12130
|
+
private _animating;
|
|
12131
|
+
disconnectedCallback(): void;
|
|
12132
|
+
private _isLink;
|
|
12133
|
+
private get _previewable();
|
|
12134
|
+
/** True when activating the thumbnail itself should open the preview. */
|
|
12135
|
+
private get _previewOnActivate();
|
|
12136
|
+
/**
|
|
12137
|
+
* The asset's real aspect ratio, so the preview panel wraps the image instead of letterboxing it
|
|
12138
|
+
* inside a fixed-ratio box. The full-size image is preferred, but it usually hasn't loaded when
|
|
12139
|
+
* the preview opens — the already-loaded thumbnail shares the asset's ratio, and the rendered
|
|
12140
|
+
* media box is the last resort for slotted media that can't be measured.
|
|
12141
|
+
*/
|
|
12142
|
+
private _resolveRatio;
|
|
12143
|
+
/** Opens the preview overlay. */
|
|
12144
|
+
showPreview(): Promise<void>;
|
|
12145
|
+
/** Closes the preview overlay. */
|
|
12146
|
+
hidePreview(): Promise<void>;
|
|
12147
|
+
private _animatePreview;
|
|
12148
|
+
/** Maps the preview panel onto the thumbnail's box, so the panel appears to grow out of it. */
|
|
12149
|
+
private _collapsedTransform;
|
|
12150
|
+
private _activate;
|
|
12151
|
+
private _handleClick;
|
|
12152
|
+
private _handleKeyDown;
|
|
12153
|
+
private _handlePreviewButtonClick;
|
|
12154
|
+
private _handlePreviewCancel;
|
|
12155
|
+
private _handleBackdropClick;
|
|
12156
|
+
private _handlePreviewImageLoad;
|
|
12157
|
+
render(): import("lit-html").TemplateResult;
|
|
12158
|
+
}
|
|
12159
|
+
}
|
|
12160
|
+
declare module "components/thumbnail/index" {
|
|
12161
|
+
import ZnThumbnail from "components/thumbnail/thumbnail.component";
|
|
12162
|
+
export * from "components/thumbnail/thumbnail.component";
|
|
12163
|
+
export default ZnThumbnail;
|
|
12164
|
+
global {
|
|
12165
|
+
interface HTMLElementTagNameMap {
|
|
12166
|
+
'zn-thumbnail': ZnThumbnail;
|
|
12167
|
+
}
|
|
12168
|
+
}
|
|
12169
|
+
}
|
|
12170
|
+
declare module "components/thumbnail-group/thumbnail-group.component" {
|
|
12171
|
+
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
12172
|
+
import ZincElement from "internal/zinc-element";
|
|
12173
|
+
/**
|
|
12174
|
+
* @summary Lays a set of `zn-thumbnail` elements out as a single scrollable row, with a
|
|
12175
|
+
* "Show All" toggle that expands them into a wrapping grid.
|
|
12176
|
+
* @documentation https://zinc.style/components/thumbnail-group
|
|
12177
|
+
* @status experimental
|
|
12178
|
+
* @since 1.0
|
|
12179
|
+
*
|
|
12180
|
+
* @dependency zn-thumbnail
|
|
12181
|
+
*
|
|
12182
|
+
* @event zn-expand - Emitted when the group expands into the full grid.
|
|
12183
|
+
* @event zn-collapse - Emitted when the group collapses back to a single row.
|
|
12184
|
+
* @event zn-change - Emitted when the selected thumbnail changes (`selectable` groups only).
|
|
12185
|
+
*
|
|
12186
|
+
* @slot - One or more `zn-thumbnail` elements.
|
|
12187
|
+
* @slot caption - Replaces the heading text.
|
|
12188
|
+
* @slot actions - Extra content in the header, before the toggle.
|
|
12189
|
+
*
|
|
12190
|
+
* @csspart base - The component's base wrapper.
|
|
12191
|
+
* @csspart header - The header row holding the caption and toggle.
|
|
12192
|
+
* @csspart caption - The heading text.
|
|
12193
|
+
* @csspart toggle - The show all / show less button.
|
|
12194
|
+
* @csspart items - The scrolling row / expanded grid that holds the thumbnails.
|
|
12195
|
+
*
|
|
12196
|
+
* @cssproperty --zn-thumbnail-width - Track width of a thumbnail. Defaults to 180px. Also settable
|
|
12197
|
+
* with the `thumbnail-width` attribute.
|
|
12198
|
+
* @cssproperty --zn-thumbnail-gap - Gap between thumbnails. Also settable with the `gap` attribute.
|
|
12199
|
+
* @cssproperty --zn-thumbnail-aspect-ratio - Aspect ratio of every thumbnail in the group. Also
|
|
12200
|
+
* settable with the `aspect-ratio` attribute. Any `zn-thumbnail` custom property set here is
|
|
12201
|
+
* inherited by the slotted thumbnails.
|
|
12202
|
+
*/
|
|
12203
|
+
export default class ZnThumbnailGroup extends ZincElement {
|
|
12204
|
+
static styles: CSSResultGroup;
|
|
12205
|
+
/** The heading shown at the top left of the group. */
|
|
12206
|
+
caption: string;
|
|
12207
|
+
/** Expands the group into the full wrapping grid. */
|
|
12208
|
+
expanded: boolean;
|
|
12209
|
+
/**
|
|
12210
|
+
* Total number of thumbnails in the underlying set, shown in the "Show All (n)" label. Set this when
|
|
12211
|
+
* the row only holds the first page of a larger set; otherwise the slotted thumbnails are counted.
|
|
12212
|
+
*/
|
|
12213
|
+
total: number;
|
|
12214
|
+
/** Label of the expand toggle. The count is appended in brackets. */
|
|
12215
|
+
showAllLabel: string;
|
|
12216
|
+
/** Label of the collapse toggle. */
|
|
12217
|
+
showLessLabel: string;
|
|
12218
|
+
/** Never render the toggle, even when the row overflows. */
|
|
12219
|
+
hideToggle: boolean;
|
|
12220
|
+
/** Always render the toggle, even when every thumbnail already fits on the row. */
|
|
12221
|
+
alwaysToggle: boolean;
|
|
12222
|
+
/** Manages single selection across the slotted thumbnails. */
|
|
12223
|
+
selectable: boolean;
|
|
12224
|
+
/**
|
|
12225
|
+
* Aspect ratio for every thumbnail in the group, as any CSS `aspect-ratio` value (e.g. `1 / 1`).
|
|
12226
|
+
* Shorthand for setting `--zn-thumbnail-aspect-ratio` on the group. A thumbnail's own
|
|
12227
|
+
* `aspect-ratio` attribute still wins.
|
|
12228
|
+
*/
|
|
12229
|
+
aspectRatio: string;
|
|
12230
|
+
/** Track width of each thumbnail (e.g. `140px`). Shorthand for `--zn-thumbnail-width`. */
|
|
12231
|
+
thumbnailWidth: string;
|
|
12232
|
+
/** Gap between thumbnails (e.g. `8px`). Shorthand for `--zn-thumbnail-gap`. */
|
|
12233
|
+
gap: string;
|
|
12234
|
+
/** The `value` of the selected thumbnail (`selectable` groups only). */
|
|
12235
|
+
value: string;
|
|
12236
|
+
private _overflowing;
|
|
12237
|
+
private _count;
|
|
12238
|
+
private _items;
|
|
12239
|
+
private _resizeObserver;
|
|
12240
|
+
connectedCallback(): void;
|
|
12241
|
+
disconnectedCallback(): void;
|
|
12242
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
12243
|
+
private _observe;
|
|
12244
|
+
protected updated(changed: PropertyValues): void;
|
|
12245
|
+
/**
|
|
12246
|
+
* Mirrors the shorthand attributes onto host custom properties. They go on the host rather than
|
|
12247
|
+
* anywhere in the shadow root because the thumbnails are light-DOM children — inheriting from the
|
|
12248
|
+
* host is the only way the values reach them.
|
|
12249
|
+
*/
|
|
12250
|
+
private _syncCustomProperties;
|
|
12251
|
+
/** Expands the group into the full grid. */
|
|
12252
|
+
show(): void;
|
|
12253
|
+
/** Collapses the group back to a single row. */
|
|
12254
|
+
hide(): void;
|
|
12255
|
+
private get _thumbnails();
|
|
12256
|
+
private _handleSlotChange;
|
|
12257
|
+
private _sync;
|
|
12258
|
+
private _measure;
|
|
12259
|
+
private _handleSelect;
|
|
12260
|
+
private _handleToggle;
|
|
12261
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12262
|
+
}
|
|
12263
|
+
}
|
|
12264
|
+
declare module "components/thumbnail-group/index" {
|
|
12265
|
+
import ZnThumbnailGroup from "components/thumbnail-group/thumbnail-group.component";
|
|
12266
|
+
export * from "components/thumbnail-group/thumbnail-group.component";
|
|
12267
|
+
export default ZnThumbnailGroup;
|
|
12268
|
+
global {
|
|
12269
|
+
interface HTMLElementTagNameMap {
|
|
12270
|
+
'zn-thumbnail-group': ZnThumbnailGroup;
|
|
12271
|
+
}
|
|
12272
|
+
}
|
|
12273
|
+
}
|
|
12274
|
+
declare module "components/background/background.component" {
|
|
12275
|
+
import { type CSSResultGroup } from 'lit';
|
|
12276
|
+
import ZincElement from "internal/zinc-element";
|
|
12277
|
+
import ZnIcon from "components/icon/index";
|
|
12278
|
+
export type BackgroundImageStrength = 'soft' | 'medium' | 'full';
|
|
12279
|
+
export type BackgroundMotion = 'none' | 'drift' | 'breathe';
|
|
12280
|
+
export type BackgroundOverlay = 'none' | 'soft' | 'strong';
|
|
12281
|
+
export type BackgroundOverlayTone = 'light' | 'dark';
|
|
12282
|
+
/**
|
|
12283
|
+
* @summary Composes a colour, decorative image, image strength, optional motion and contrast overlay behind slotted content.
|
|
12284
|
+
*
|
|
12285
|
+
* @documentation https://zinc.style/components/background
|
|
12286
|
+
* @status experimental
|
|
12287
|
+
* @since 1.0
|
|
12288
|
+
*
|
|
12289
|
+
* @dependency zn-icon
|
|
12290
|
+
*
|
|
12291
|
+
* @slot - Content displayed above the background layers.
|
|
12292
|
+
*
|
|
12293
|
+
* @csspart base - The component's full-size background canvas.
|
|
12294
|
+
* @csspart image - The decorative background image.
|
|
12295
|
+
* @csspart overlay - The contrast overlay between the image and content.
|
|
12296
|
+
* @csspart floating-icons - The non-interactive layer containing the floating icons.
|
|
12297
|
+
* @csspart floating-icon - Each floating `zn-icon`.
|
|
12298
|
+
* @csspart content - The wrapper around the default slot.
|
|
12299
|
+
*
|
|
12300
|
+
* @cssproperty --zn-background-color - Fallback colour when the `color` attribute is not set.
|
|
12301
|
+
* @cssproperty --zn-background-image-position - Position of the background image. Defaults to `center`.
|
|
12302
|
+
* @cssproperty --zn-background-overlay-angle - Direction of the overlay gradient. Defaults to `110deg`.
|
|
12303
|
+
* @cssproperty --zn-background-floating-icon-color - Colour of the floating icons. Defaults to `currentColor`.
|
|
12304
|
+
*/
|
|
12305
|
+
export default class ZnBackground extends ZincElement {
|
|
12306
|
+
static styles: CSSResultGroup;
|
|
12307
|
+
static dependencies: {
|
|
12308
|
+
'zn-icon': typeof ZnIcon;
|
|
12309
|
+
};
|
|
12310
|
+
private readonly resizeObserver;
|
|
12311
|
+
/** URL of the decorative background image. */
|
|
12312
|
+
image: string;
|
|
12313
|
+
/** CSS colour painted beneath the image. */
|
|
12314
|
+
color: string;
|
|
12315
|
+
/** Visibility of the image: `soft` (30%), `medium` (62%) or `full` (100%). */
|
|
12316
|
+
imageStrength: BackgroundImageStrength;
|
|
12317
|
+
/** Subtle animation applied to the image. Motion stops when reduced motion is requested. */
|
|
12318
|
+
motion: BackgroundMotion;
|
|
12319
|
+
/** Strength of the contrast gradient above the image. */
|
|
12320
|
+
overlay: BackgroundOverlay;
|
|
12321
|
+
/** Whether the overlay uses a light or dark contrast treatment. */
|
|
12322
|
+
overlayTone: BackgroundOverlayTone;
|
|
12323
|
+
/** Comma-separated Zinc icon names placed as ambient decoration. At most eight are rendered. */
|
|
12324
|
+
floatingIcons: string;
|
|
12325
|
+
/** Pauses background motion without changing the selected motion treatment. */
|
|
12326
|
+
paused: boolean;
|
|
12327
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12328
|
+
}
|
|
12329
|
+
}
|
|
12330
|
+
declare module "components/background/index" {
|
|
12331
|
+
import ZnBackground from "components/background/background.component";
|
|
12332
|
+
export * from "components/background/background.component";
|
|
12333
|
+
export default ZnBackground;
|
|
12334
|
+
global {
|
|
12335
|
+
interface HTMLElementTagNameMap {
|
|
12336
|
+
'zn-background': ZnBackground;
|
|
12337
|
+
}
|
|
12338
|
+
}
|
|
12339
|
+
}
|
|
11825
12340
|
declare module "utilities/form" {
|
|
11826
12341
|
export { clearFormStoreValues } from "internal/form";
|
|
11827
12342
|
}
|
|
@@ -12183,6 +12698,9 @@ declare module "zinc" {
|
|
|
12183
12698
|
export { default as SlashMenu } from "components/slash-menu/index";
|
|
12184
12699
|
export { default as SlashItem } from "components/slash-item/index";
|
|
12185
12700
|
export { default as ScheduleBuilder } from "components/schedule-builder/index";
|
|
12701
|
+
export { default as Thumbnail } from "components/thumbnail/index";
|
|
12702
|
+
export { default as ThumbnailGroup } from "components/thumbnail-group/index";
|
|
12703
|
+
export { default as Background } from "components/background/index";
|
|
12186
12704
|
export { default as ZincElement } from "internal/zinc-element";
|
|
12187
12705
|
export * from "utilities/on";
|
|
12188
12706
|
export * from "utilities/query";
|