@redvars/peacock 3.6.0 → 3.6.2

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.
Files changed (105) hide show
  1. package/dist/assets/styles.css +1 -1
  2. package/dist/assets/styles.css.map +1 -1
  3. package/dist/assets/tokens.css +1 -1
  4. package/dist/assets/tokens.css.map +1 -1
  5. package/dist/{button-colors-Ccys3hvS.js → button-colors-AvGh22Zn.js} +18 -18
  6. package/dist/{button-colors-Ccys3hvS.js.map → button-colors-AvGh22Zn.js.map} +1 -1
  7. package/dist/button-group.js +2 -2
  8. package/dist/button.js +2 -3
  9. package/dist/button.js.map +1 -1
  10. package/dist/card.js +1 -1
  11. package/dist/card.js.map +1 -1
  12. package/dist/code-highlighter.js +34 -9
  13. package/dist/code-highlighter.js.map +1 -1
  14. package/dist/custom-elements-jsdocs.json +4973 -3553
  15. package/dist/custom-elements.json +7899 -6346
  16. package/dist/{flow-designer-node-XMe-jlKg.js → flow-designer-node-BWrPuxAR.js} +2 -2
  17. package/dist/flow-designer-node-BWrPuxAR.js.map +1 -0
  18. package/dist/flow-designer-node.js +1 -1
  19. package/dist/flow-designer.js +1402 -8
  20. package/dist/flow-designer.js.map +1 -1
  21. package/dist/html-editor.js +27245 -87
  22. package/dist/html-editor.js.map +1 -1
  23. package/dist/icon-CueRR7wx.js +260 -0
  24. package/dist/icon-CueRR7wx.js.map +1 -0
  25. package/dist/{icon-button-CK1ZuE-2.js → icon-button-ohxHhy4t.js} +2 -2
  26. package/dist/{icon-button-CK1ZuE-2.js.map → icon-button-ohxHhy4t.js.map} +1 -1
  27. package/dist/index.js +10 -9
  28. package/dist/index.js.map +1 -1
  29. package/dist/modal.js +12 -18
  30. package/dist/modal.js.map +1 -1
  31. package/dist/{navigation-rail-DyO0oAZU.js → navigation-rail-CD7IrqbN.js} +952 -279
  32. package/dist/navigation-rail-CD7IrqbN.js.map +1 -0
  33. package/dist/peacock-loader.js +39 -30
  34. package/dist/peacock-loader.js.map +1 -1
  35. package/dist/{popover-NC7b1lTq.js → popover-DUPmMVWS.js} +9 -4
  36. package/dist/{popover-NC7b1lTq.js.map → popover-DUPmMVWS.js.map} +1 -1
  37. package/dist/popover.js +1 -1
  38. package/dist/src/__controllers/floating-controller.d.ts +1 -0
  39. package/dist/src/avatar/avatar.d.ts +1 -1
  40. package/dist/src/breadcrumb/breadcrumb/breadcrumb.d.ts +0 -1
  41. package/dist/src/chip/chip/chip.d.ts +14 -11
  42. package/dist/src/chip/chip-set/chip-set.d.ts +20 -0
  43. package/dist/src/chip/chip-set/index.d.ts +1 -0
  44. package/dist/src/code-highlighter/code-highlighter.d.ts +4 -0
  45. package/dist/src/html-editor/html-editor.d.ts +44 -11
  46. package/dist/src/index.d.ts +3 -0
  47. package/dist/src/list/index.d.ts +2 -0
  48. package/dist/src/list/list-item.d.ts +35 -0
  49. package/dist/src/list/list.d.ts +28 -0
  50. package/dist/src/menu/menu/menu.d.ts +1 -0
  51. package/dist/src/modal/modal.d.ts +2 -8
  52. package/dist/src/navigation-rail/navigation-rail.d.ts +3 -7
  53. package/dist/src/number-field/number-field.d.ts +2 -2
  54. package/dist/src/svg/index.d.ts +1 -0
  55. package/dist/src/svg/svg.d.ts +38 -0
  56. package/dist/src/toolbar/toolbar.d.ts +3 -3
  57. package/dist/test/chip.test.d.ts +1 -0
  58. package/dist/toolbar.js +3 -3
  59. package/dist/toolbar.js.map +1 -1
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +7 -1
  62. package/readme.md +3 -3
  63. package/scss/styles.scss +3 -3
  64. package/scss/tokens.css +1 -1
  65. package/src/__controllers/floating-controller.ts +9 -3
  66. package/src/avatar/avatar.scss +4 -4
  67. package/src/avatar/avatar.ts +1 -1
  68. package/src/breadcrumb/breadcrumb/breadcrumb.ts +0 -1
  69. package/src/button/button/button.scss +17 -17
  70. package/src/button/button/button.ts +1 -2
  71. package/src/card/card.ts +1 -1
  72. package/src/chip/chip/chip.scss +119 -45
  73. package/src/chip/chip/chip.ts +97 -38
  74. package/src/chip/chip-set/chip-set.scss +13 -0
  75. package/src/chip/chip-set/chip-set.ts +25 -0
  76. package/src/chip/chip-set/index.ts +1 -0
  77. package/src/code-highlighter/code-highlighter.ts +33 -6
  78. package/src/field/field.scss +1 -1
  79. package/src/flow-designer/flow-designer-node.ts +1 -1
  80. package/src/html-editor/html-editor.scss +44 -2
  81. package/src/html-editor/html-editor.ts +309 -94
  82. package/src/index.ts +3 -1
  83. package/src/list/index.ts +2 -0
  84. package/src/list/list-item.scss +111 -0
  85. package/src/list/list-item.ts +175 -0
  86. package/src/list/list.scss +24 -0
  87. package/src/list/list.ts +51 -0
  88. package/src/menu/menu/menu.ts +11 -0
  89. package/src/modal/modal.scss +10 -10
  90. package/src/modal/modal.ts +2 -8
  91. package/src/navigation-rail/navigation-rail-item.scss +7 -38
  92. package/src/navigation-rail/navigation-rail-item.ts +1 -2
  93. package/src/navigation-rail/navigation-rail.scss +17 -21
  94. package/src/navigation-rail/navigation-rail.ts +6 -9
  95. package/src/number-field/number-field.ts +2 -2
  96. package/src/peacock-loader.ts +36 -22
  97. package/src/svg/index.ts +1 -0
  98. package/src/svg/svg.scss +91 -0
  99. package/src/svg/svg.ts +160 -0
  100. package/src/toolbar/toolbar.ts +3 -3
  101. package/dist/flow-designer-dZnLJOQT.js +0 -1656
  102. package/dist/flow-designer-dZnLJOQT.js.map +0 -1
  103. package/dist/flow-designer-node-XMe-jlKg.js.map +0 -1
  104. package/dist/navigation-rail-DyO0oAZU.js.map +0 -1
  105. package/src/chip/chip/chip-colors.scss +0 -31
package/dist/popover.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import './IndividualComponent-DUINtMGK.js';
2
2
  import './property-1psGvXOq.js';
3
- export { P as Popover } from './popover-NC7b1lTq.js';
3
+ export { P as Popover } from './popover-DUPmMVWS.js';
4
4
  //# sourceMappingURL=popover.js.map
@@ -28,6 +28,7 @@ export declare class FloatingController implements ReactiveController {
28
28
  private toggle;
29
29
  private handleContextMenu;
30
30
  private handleFocusOut;
31
+ private isEventInsideElement;
31
32
  private handleOutsideClick;
32
33
  open: () => void;
33
34
  close: () => void;
@@ -6,7 +6,7 @@ import { LitElement } from 'lit';
6
6
  * @summary The Avatar component is used to represent user, and displays the profile picture, initials or fallback icon.
7
7
  *
8
8
  * @cssprop --avatar-border-radius - Controls the border radius of the avatar.
9
- * @cssprop --avatar-background-color - Controls the color of the avatar.
9
+ * @cssprop --avatar-container-color - Controls the color of the avatar container.
10
10
  * @cssprop --avatar-size - Controls the size of the avatar.
11
11
  * @cssprop --avatar-text-color - Controls the color of the text inside the avatar.
12
12
  *
@@ -25,7 +25,6 @@ export declare class Breadcrumb extends LitElement {
25
25
  static Item: typeof BreadcrumbItem;
26
26
  /**
27
27
  * Accessible label for the breadcrumb navigation landmark.
28
- * @default "Breadcrumb"
29
28
  */
30
29
  label: string;
31
30
  render(): import("lit-html").TemplateResult<1>;
@@ -1,4 +1,4 @@
1
- import { LitElement } from 'lit';
1
+ import { BaseButton } from '@/button/BaseButton.js';
2
2
  /**
3
3
  * @label Chip
4
4
  * @tag wc-chip
@@ -11,20 +11,23 @@ import { LitElement } from 'lit';
11
11
  * <wc-chip>Chip content</wc-chip>
12
12
  * ```
13
13
  */
14
- export declare class Chip extends LitElement {
14
+ export declare class Chip extends BaseButton {
15
15
  static styles: import("lit").CSSResultGroup[];
16
16
  /** If true, the tag will have a close icon. */
17
17
  dismissible: boolean;
18
- /** Tag color. */
19
- color?: 'default' | 'blue' | 'green' | 'red' | 'yellow';
20
- /** Tag value. */
21
- value: string;
22
- /** If true, the tag will be selected. */
23
- selected: boolean;
24
- /** Image source. */
25
- imageSrc?: string;
18
+ /**
19
+ * Additional ARIA attributes to pass to the inner button/anchor element.
20
+ */
21
+ configAria?: {
22
+ [key: string]: any;
23
+ };
24
+ private _hasIconSlotContent;
25
+ private _isPressed;
26
+ focus(): void;
27
+ blur(): void;
28
+ firstUpdated(): void;
26
29
  private _dismissClickHandler;
27
30
  private _renderCloseButton;
28
- private _renderImage;
29
31
  render(): import("lit-html").TemplateResult<1>;
32
+ renderChipContent(): import("lit-html").TemplateResult<1>;
30
33
  }
@@ -0,0 +1,20 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Chip Set
4
+ * @tag wc-chip-set
5
+ * @rawTag chip-set
6
+ * @summary A layout container for wrapping chips.
7
+ * @tags layout
8
+ *
9
+ * @example
10
+ * ```html
11
+ * <wc-chip-set>
12
+ * <wc-chip>One</wc-chip>
13
+ * <wc-chip>Two</wc-chip>
14
+ * </wc-chip-set>
15
+ * ```
16
+ */
17
+ export declare class ChipSet extends LitElement {
18
+ static styles: import("lit").CSSResultGroup[];
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ }
@@ -0,0 +1 @@
1
+ export { ChipSet } from './chip-set.js';
@@ -19,14 +19,18 @@ import { BundledLanguage } from 'shiki';
19
19
  */
20
20
  export declare class CodeHighlighter extends LitElement {
21
21
  static styles: import("lit").CSSResultGroup[];
22
+ private static readonly COPY_FEEDBACK_DURATION;
22
23
  language: BundledLanguage;
23
24
  lineNumbers: boolean;
24
25
  value: string;
25
26
  format?: boolean;
26
27
  hideCopy: boolean;
27
28
  private compiledCode;
29
+ private _copied;
28
30
  private parsedCode;
31
+ private _copyFeedbackTimeout;
29
32
  connectedCallback(): Promise<void>;
33
+ disconnectedCallback(): void;
30
34
  firstUpdated(): void;
31
35
  private decode;
32
36
  private __highlightCode;
@@ -4,29 +4,39 @@ import BaseInput from '../input/BaseInput.js';
4
4
  * @tag wc-html-editor
5
5
  * @rawTag html-editor
6
6
  *
7
- * @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.
7
+ * @summary A Tiptap-powered HTML editor with visual and source editing modes.
8
8
  * @overview
9
- * <p>The HTML Editor provides a rich-text editing experience using the browser's built-in
10
- * <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled
11
- * <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>
9
+ * <p>The HTML Editor provides a rich-text editing experience built on Tiptap.
10
+ * It wraps the editable area in a Material 3 styled <code>wc-field</code>,
11
+ * exposes common formatting actions, and includes a segmented switch between
12
+ * <strong>Visual</strong> and <strong>HTML</strong> source modes.</p>
12
13
  *
13
14
  * <p>Get and set the HTML content via the <code>value</code> property. The component
14
- * dispatches a <code>change</code> event whenever the content is modified.</p>
15
+ * dispatches a <code>change</code> event whenever the content is modified.
16
+ * Mention suggestions are supported through the <code>mentions</code> property,
17
+ * with optional externally managed lookup via the <code>search</code> event.</p>
15
18
  *
16
19
  * @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.
17
20
  * @cssprop --html-editor-toolbar-background - Background color of the toolbar.
18
21
  * @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.
19
22
  *
20
23
  * @fires {Event} change - Fired whenever the editable content changes.
24
+ * @fires {CustomEvent} search - Fired in managed mention mode with { query, callback } detail.
21
25
  *
22
26
  * @example
23
27
  * ```html
24
- * <wc-html-editor label="Description" value="<p>Hello <strong>world</strong></p>"></wc-html-editor>
28
+ * <wc-html-editor
29
+ * label="Description"
30
+ * value="<p>Hello <strong>world</strong></p>"
31
+ * .mentions="[{ label: 'Alex', value: 'alex' }]"
32
+ * ></wc-html-editor>
25
33
  * ```
26
34
  * @tags input editor
27
35
  */
28
36
  export declare class HtmlEditor extends BaseInput {
29
37
  static styles: import("lit").CSSResultGroup[];
38
+ private _editor?;
39
+ private _changeTimeout?;
30
40
  /** Current HTML value of the editor. */
31
41
  value: string;
32
42
  /** Label displayed above the editor. */
@@ -41,16 +51,39 @@ export declare class HtmlEditor extends BaseInput {
41
51
  error: boolean;
42
52
  /** Error message text. */
43
53
  errorText: string;
54
+ /** Whether toolbar controls should be displayed in visual mode. */
55
+ showToolbar: boolean;
56
+ /** Mention suggestions used by the mention extension. */
57
+ mentions: Array<{
58
+ label: string;
59
+ value: string;
60
+ }>;
61
+ /** Mention filtering mode. */
62
+ mentionsSearch: 'contains' | 'managed';
63
+ /** Character that triggers mention suggestions. */
64
+ suggestionCharacter: string;
65
+ /** Whether to include the suggestion character in rendered mention text. */
66
+ showSuggestionCharacter: boolean;
67
+ /** Debounce in milliseconds for dispatching `change`. */
68
+ debounce: number;
44
69
  private _focused;
70
+ private _mode;
45
71
  private _editorEl;
46
72
  protected firstUpdated(): void;
73
+ disconnectedCallback(): void;
47
74
  protected updated(changed: Map<string, unknown>): void;
48
- private _execCmd;
49
- private _handleInput;
50
- private _handleFocus;
51
- private _handleBlur;
52
- private _insertLink;
75
+ private static _normalizeHtml;
76
+ private _destroyEditor;
77
+ private _initializeEditor;
78
+ private _focusEditorOnContainerClick;
79
+ private _dispatchDebouncedChange;
80
+ private _requestManagedMentions;
81
+ private _getMentionItem;
82
+ private _execCommand;
83
+ private _switchMode;
84
+ private _handleSourceChange;
53
85
  private _toolbarButton;
54
86
  private _renderToolbar;
87
+ private _renderReadonlyTag;
55
88
  render(): import("lit-html").TemplateResult<1>;
56
89
  }
@@ -15,6 +15,7 @@ export { Accordion } from './accordion/index.js';
15
15
  export { Link } from './link/index.js';
16
16
  export { Tag } from './chip/tag/index.js';
17
17
  export { Chip } from './chip/chip/index.js';
18
+ export { ChipSet } from './chip/chip-set/index.js';
18
19
  export { LinearProgress } from './progress/linear-progress/index.js';
19
20
  export { CircularProgress } from './progress/circular-progress/index.js';
20
21
  export { Skeleton } from './skeleton/index.js';
@@ -35,10 +36,12 @@ export { Tooltip } from './popover/index.js';
35
36
  export { Popover, PopoverContent } from './popover/index.js';
36
37
  export { Breadcrumb, BreadcrumbItem } from './breadcrumb/index.js';
37
38
  export { Menu, MenuItem, SubMenu } from './menu/index.js';
39
+ export { List, ListItem } from './list/index.js';
38
40
  export { CodeHighlighter } from './code-highlighter/index.js';
39
41
  export { CodeEditor } from './code-editor/index.js';
40
42
  export { HtmlEditor } from './html-editor/index.js';
41
43
  export { Image } from './image/index.js';
44
+ export { Svg } from './svg/index.js';
42
45
  export { Tab, TabGroup, TabPanel, Tabs } from './tabs/index.js';
43
46
  export { Slider } from './slider/index.js';
44
47
  export { ChartDoughnut } from './chart-doughnut/index.js';
@@ -0,0 +1,2 @@
1
+ export { List } from './list.js';
2
+ export { ListItem } from './list-item.js';
@@ -0,0 +1,35 @@
1
+ import { LitElement } from 'lit';
2
+ declare const ListItem_base: typeof LitElement & import("../__mixins/MixinConstructor.js").MixinConstructor<import("@/__mixins/BaseHyperlinkMixin.js").BaseHyperlinkInterface> & import("../__mixins/MixinConstructor.js").MixinConstructor<import("@/__mixins/BaseButtonMixin.js").BaseButtonInterface>;
3
+ /**
4
+ * @label List Item
5
+ * @tag wc-list-item
6
+ * @rawTag list-item
7
+ * @parentRawTag list
8
+ *
9
+ * @summary A Material 3 list item with leading, trailing and content slots.
10
+ *
11
+ * @example
12
+ * ```html
13
+ * <wc-list-item selected>
14
+ * <wc-icon slot="leading" name="person"></wc-icon>
15
+ * Profile
16
+ * <wc-icon slot="trailing" name="chevron_right"></wc-icon>
17
+ * </wc-list-item>
18
+ * ```
19
+ * @tags display
20
+ */
21
+ export declare class ListItem extends ListItem_base {
22
+ static styles: import("lit").CSSResultGroup[];
23
+ selected: boolean;
24
+ readonly itemElement: HTMLElement | null;
25
+ isPressed: boolean;
26
+ connectedCallback(): void;
27
+ focus(): void;
28
+ blur(): void;
29
+ __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
30
+ __handleKeyDown: (event: KeyboardEvent) => void;
31
+ __handlePress: (event: KeyboardEvent | MouseEvent) => void;
32
+ render(): import("lit-html").TemplateResult<1>;
33
+ renderContent(): import("lit-html").TemplateResult<1>;
34
+ }
35
+ export {};
@@ -0,0 +1,28 @@
1
+ import { LitElement } from 'lit';
2
+ import { ListItem } from './list-item.js';
3
+ /**
4
+ * @label List
5
+ * @tag wc-list
6
+ * @rawTag list
7
+ *
8
+ * @summary A Material 3 list container for one or more list items.
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <wc-list>
13
+ * <wc-list-item>
14
+ * <wc-icon slot="leading" name="inbox"></wc-icon>
15
+ * Inbox
16
+ * <span slot="trailing">24</span>
17
+ * </wc-list-item>
18
+ * </wc-list>
19
+ * ```
20
+ * @tags display
21
+ */
22
+ export declare class List extends LitElement {
23
+ static styles: import("lit").CSSResultGroup[];
24
+ static Item: typeof ListItem;
25
+ variant: 'standard' | 'vibrant';
26
+ connectedCallback(): void;
27
+ render(): import("lit-html").TemplateResult<1>;
28
+ }
@@ -63,6 +63,7 @@ export declare class Menu extends LitElement {
63
63
  private _isEventFromThisMenu;
64
64
  private _ownedItemFromEvent;
65
65
  private _setActiveItem;
66
+ private _dispatchItemActivate;
66
67
  private _onClick;
67
68
  private _onKeyDown;
68
69
  private _onSlotChange;
@@ -3,7 +3,7 @@ type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'fullscreen';
3
3
  /**
4
4
  * @label Modal
5
5
  * @tag wc-modal
6
- * @rawTag modal-wc
6
+ * @rawTag modal
7
7
  * @summary A Material Design 3 dialog/modal for displaying content in a layer above the page, with optional header, body, and footer slots.
8
8
  *
9
9
  * @cssprop --modal-container-color - Background color of the dialog container.
@@ -15,13 +15,7 @@ type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'fullscreen';
15
15
  *
16
16
  * @example
17
17
  * ```html
18
- * <wc-modal open heading="Confirm Action">
19
- * <p>Are you sure you want to continue?</p>
20
- * <div slot="footer">
21
- * <wc-button variant="text">Cancel</wc-button>
22
- * <wc-button>Confirm</wc-button>
23
- * </div>
24
- * </wc-modal>
18
+ * MODAL
25
19
  * ```
26
20
  * @tags overlay, dialog, feedback
27
21
  */
@@ -10,6 +10,9 @@ import { NavigationRailItem } from './navigation-rail-item.js';
10
10
  * <p>Navigation rail provides access to primary destinations in an app using icons—with or without labels—on a vertical rail.</p>
11
11
  * <p>Use navigation rail on medium-sized screens (tablets) with 3–7 destinations.</p>
12
12
  *
13
+ * @slot header - Content displayed above the rail items.
14
+ * @slot footer - Content pinned to the bottom of the rail.
15
+ *
13
16
  * @cssprop --nav-rail-width - Width of the rail container. Defaults to 5rem (80dp).
14
17
  * @cssprop --nav-rail-container-color - Background color of the rail. Defaults to surface color.
15
18
  * @cssprop --nav-rail-indicator-color - Color of the active indicator. Defaults to secondary-container.
@@ -43,13 +46,6 @@ import { NavigationRailItem } from './navigation-rail-item.js';
43
46
  export declare class NavigationRail extends LitElement {
44
47
  static styles: import("lit").CSSResultGroup[];
45
48
  static Item: typeof NavigationRailItem;
46
- /**
47
- * Vertical alignment of items within the rail.
48
- * - `"top"`: Items align to the top.
49
- * - `"center"`: Items are centered (default).
50
- * - `"bottom"`: Items align to the bottom.
51
- */
52
- alignment: 'top' | 'center' | 'bottom';
53
49
  /**
54
50
  * Display mode of the navigation rail.
55
51
  * - `"expanded"`: shows labels.
@@ -1,8 +1,8 @@
1
1
  import BaseInput from '../input/BaseInput.js';
2
2
  /**
3
3
  * @label Number Field
4
- * @tag number-field
5
- * @rawTag number
4
+ * @tag wc-number-field
5
+ * @rawTag number-field
6
6
  *
7
7
  * @summary The Number Field component is used to capture numeric user input.
8
8
  *
@@ -0,0 +1 @@
1
+ export { Svg } from './svg.js';
@@ -0,0 +1,38 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label SVG
4
+ * @tag wc-svg
5
+ * @rawTag svg
6
+ * @summary An SVG component with lazy loading and optional preview support.
7
+ * @overview Renders an inline SVG fetched from a URL, with lazy loading via IntersectionObserver and an optional click-to-preview lightbox.
8
+ *
9
+ * @cssprop --svg-color - Controls the fill color of the SVG.
10
+ * @cssprop [--svg-size=1rem] - Controls the size of the SVG. Defaults to "1rem"
11
+ *
12
+ * @example
13
+ * ```html
14
+ * <wc-svg src="/icons/my-icon.svg" image-title="My icon"></wc-svg>
15
+ * ```
16
+ */
17
+ export declare class Svg extends LitElement {
18
+ static styles: import("lit").CSSResultGroup[];
19
+ /** URL of the SVG asset to fetch and render inline. */
20
+ src: string;
21
+ /** Accessible title / alt text for the SVG. */
22
+ imageTitle: string;
23
+ /** Enable click-to-preview lightbox. */
24
+ preview: boolean;
25
+ private _loaded;
26
+ private _previewOpen;
27
+ private _svgContent;
28
+ private _fetchId;
29
+ private _intersectionObserver;
30
+ disconnectedCallback(): void;
31
+ firstUpdated(): void;
32
+ updated(changedProperties: Map<string, unknown>): void;
33
+ private _setupIntersectionObserver;
34
+ private _fetchSvg;
35
+ private _handleClick;
36
+ private _closePreview;
37
+ render(): import("lit-html").TemplateResult<1>;
38
+ }
@@ -27,10 +27,10 @@ import { LitElement } from 'lit';
27
27
  * ```html
28
28
  * <!-- Docked toolbar -->
29
29
  * <wc-toolbar>
30
- * <wc-icon-button variant="text"><wc-icon name="home"></wc-icon></wc-icon-button>
30
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="home"></wc-icon></wc-icon-button>
31
31
  * <wc-icon-button variant="tonal"><wc-icon name="search"></wc-icon></wc-icon-button>
32
- * <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
33
- * <wc-icon-button variant="text"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
32
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="favorite"></wc-icon></wc-icon-button>
33
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
34
34
  * </wc-toolbar>
35
35
  * ```
36
36
  *
@@ -0,0 +1 @@
1
+ export {};
package/dist/toolbar.js CHANGED
@@ -195,10 +195,10 @@ var Toolbar_1;
195
195
  * ```html
196
196
  * <!-- Docked toolbar -->
197
197
  * <wc-toolbar>
198
- * <wc-icon-button variant="text"><wc-icon name="home"></wc-icon></wc-icon-button>
198
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="home"></wc-icon></wc-icon-button>
199
199
  * <wc-icon-button variant="tonal"><wc-icon name="search"></wc-icon></wc-icon-button>
200
- * <wc-icon-button variant="text"><wc-icon name="favorite"></wc-icon></wc-icon-button>
201
- * <wc-icon-button variant="text"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
200
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="favorite"></wc-icon></wc-icon-button>
201
+ * <wc-icon-button variant="text" color="surface"><wc-icon name="account_circle"></wc-icon></wc-icon-button>
202
202
  * </wc-toolbar>
203
203
  * ```
204
204
  *
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.js","sources":["../../src/toolbar/toolbar.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './toolbar.scss';\nimport colorStyles from './toolbar-colors.scss';\n\n/**\n * @label Toolbar\n * @tag wc-toolbar\n * @rawTag toolbar\n *\n * @summary A Material 3 toolbar / app bar for navigation and actions.\n * @overview\n * <p>The toolbar component implements the Material 3 app bar pattern. It supports a\n * docked (attached) variant for bottom-panel navigation and a floating (detached pill-shaped)\n * variant. The floating variant supports both horizontal and vertical orientations.</p>\n *\n * <p>Render toolbar actions directly as children of the component. The docked variant is\n * optimized for a horizontal action row, while the floating variant supports both horizontal\n * and vertical layouts.</p>\n *\n * @cssprop --toolbar-container-color - Background color of the toolbar.\n * @cssprop --toolbar-container-shape - Border radius of the toolbar. Relevant for the floating variant.\n * @cssprop --toolbar-height - Height of the toolbar (docked horizontal / floating horizontal).\n * @cssprop --toolbar-padding-inline - Inline padding of the toolbar.\n * @cssprop --toolbar-gap - Gap between toolbar sections.\n * @cssprop --toolbar-icon-color - Color of icon slots.\n * @cssprop --toolbar-title-color - Color of the title (default slot) text.\n * @cssprop --toolbar-shadow - Box-shadow of the toolbar.\n *\n * @example\n * ```html\n * <!-- Docked toolbar -->\n * <wc-toolbar>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"account_circle\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n *\n * @example\n * ```html\n * <!-- Floating horizontal toolbar -->\n * <wc-toolbar variant=\"floating\" orientation=\"horizontal\">\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n *\n * @example\n * ```html\n * <!-- Floating vertical toolbar -->\n * <wc-toolbar variant=\"floating\" orientation=\"vertical\">\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n * @tags display navigation\n */\n@IndividualComponent\nexport class Toolbar extends LitElement {\n static styles = [styles, colorStyles];\n\n /**\n * Visual and layout variant of the toolbar.\n * - `\"docked\"`: A full-width bar attached to the edge of the screen (default).\n * - `\"floating\"`: A detached pill-shaped toolbar that floats over content.\n */\n @property({ type: String, reflect: true })\n variant: 'docked' | 'floating' = 'docked';\n\n /**\n * Orientation of the toolbar content.\n * - `\"horizontal\"`: Items are laid out left to right (default).\n * - `\"vertical\"`: Items are stacked top to bottom. Primarily useful for the floating variant.\n */\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size of the docked toolbar.\n * - `\"small\"`: 80dp height (default).\n * - `\"medium\"`: 96dp height.\n * - `\"large\"`: 112dp height.\n */\n @property({ type: String, reflect: true })\n size: 'small' | 'medium' | 'large' = 'small';\n\n /**\n * Whether the toolbar is visually elevated (adds a shadow).\n */\n @property({ type: Boolean, reflect: true })\n elevated: boolean = false;\n\n override render() {\n const cssClasses = {\n toolbar: true,\n [`variant-${this.variant}`]: true,\n [`orientation-${this.orientation}`]: true,\n [`size-${this.size}`]: true,\n elevated: this.elevated,\n };\n\n if (this.variant === 'floating') {\n return Toolbar.__renderFloating(cssClasses);\n }\n\n return Toolbar.__renderDocked(cssClasses);\n }\n\n private static __renderDocked(cssClasses: Record<string, boolean>) {\n return html`\n <div class=${classMap(cssClasses)} role=\"toolbar\">\n <div class=\"background\"></div>\n <div class=\"toolbar-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private static __renderFloating(cssClasses: Record<string, boolean>) {\n return html`\n <div class=${classMap(cssClasses)} role=\"toolbar\">\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"background\"></div>\n <div class=\"toolbar-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","colorStyles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDG;AAEI,IAAM,OAAO,GAAA,SAAA,GAAb,MAAM,OAAQ,SAAQA,GAAU,CAAA;AAAhC,IAAA,WAAA,GAAA;;AAGL;;;;AAIG;QAEH,IAAA,CAAA,OAAO,GAA0B,QAAQ;AAEzC;;;;AAIG;QAEH,IAAA,CAAA,WAAW,GAA8B,YAAY;AAErD;;;;;AAKG;QAEH,IAAA,CAAA,IAAI,GAAiC,OAAO;AAE5C;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAY,KAAK;IAwC3B;IAtCW,MAAM,GAAA;AACb,QAAA,MAAM,UAAU,GAAG;AACjB,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,CAAC,WA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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAhCf,OAAO,GAAA,SAAA,GAAA,UAAA,CAAA;IADnB;AACY,CAAA,EAAA,OAAO,CAwEnB;;;;"}
1
+ {"version":3,"file":"toolbar.js","sources":["../../src/toolbar/toolbar.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './toolbar.scss';\nimport colorStyles from './toolbar-colors.scss';\n\n/**\n * @label Toolbar\n * @tag wc-toolbar\n * @rawTag toolbar\n *\n * @summary A Material 3 toolbar / app bar for navigation and actions.\n * @overview\n * <p>The toolbar component implements the Material 3 app bar pattern. It supports a\n * docked (attached) variant for bottom-panel navigation and a floating (detached pill-shaped)\n * variant. The floating variant supports both horizontal and vertical orientations.</p>\n *\n * <p>Render toolbar actions directly as children of the component. The docked variant is\n * optimized for a horizontal action row, while the floating variant supports both horizontal\n * and vertical layouts.</p>\n *\n * @cssprop --toolbar-container-color - Background color of the toolbar.\n * @cssprop --toolbar-container-shape - Border radius of the toolbar. Relevant for the floating variant.\n * @cssprop --toolbar-height - Height of the toolbar (docked horizontal / floating horizontal).\n * @cssprop --toolbar-padding-inline - Inline padding of the toolbar.\n * @cssprop --toolbar-gap - Gap between toolbar sections.\n * @cssprop --toolbar-icon-color - Color of icon slots.\n * @cssprop --toolbar-title-color - Color of the title (default slot) text.\n * @cssprop --toolbar-shadow - Box-shadow of the toolbar.\n *\n * @example\n * ```html\n * <!-- Docked toolbar -->\n * <wc-toolbar>\n * <wc-icon-button variant=\"text\" color=\"surface\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\" color=\"surface\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\" color=\"surface\"><wc-icon name=\"account_circle\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n *\n * @example\n * ```html\n * <!-- Floating horizontal toolbar -->\n * <wc-toolbar variant=\"floating\" orientation=\"horizontal\">\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n *\n * @example\n * ```html\n * <!-- Floating vertical toolbar -->\n * <wc-toolbar variant=\"floating\" orientation=\"vertical\">\n * <wc-icon-button variant=\"tonal\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"search\"></wc-icon></wc-icon-button>\n * <wc-icon-button variant=\"text\"><wc-icon name=\"favorite\"></wc-icon></wc-icon-button>\n * </wc-toolbar>\n * ```\n * @tags display navigation\n */\n@IndividualComponent\nexport class Toolbar extends LitElement {\n static styles = [styles, colorStyles];\n\n /**\n * Visual and layout variant of the toolbar.\n * - `\"docked\"`: A full-width bar attached to the edge of the screen (default).\n * - `\"floating\"`: A detached pill-shaped toolbar that floats over content.\n */\n @property({ type: String, reflect: true })\n variant: 'docked' | 'floating' = 'docked';\n\n /**\n * Orientation of the toolbar content.\n * - `\"horizontal\"`: Items are laid out left to right (default).\n * - `\"vertical\"`: Items are stacked top to bottom. Primarily useful for the floating variant.\n */\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size of the docked toolbar.\n * - `\"small\"`: 80dp height (default).\n * - `\"medium\"`: 96dp height.\n * - `\"large\"`: 112dp height.\n */\n @property({ type: String, reflect: true })\n size: 'small' | 'medium' | 'large' = 'small';\n\n /**\n * Whether the toolbar is visually elevated (adds a shadow).\n */\n @property({ type: Boolean, reflect: true })\n elevated: boolean = false;\n\n override render() {\n const cssClasses = {\n toolbar: true,\n [`variant-${this.variant}`]: true,\n [`orientation-${this.orientation}`]: true,\n [`size-${this.size}`]: true,\n elevated: this.elevated,\n };\n\n if (this.variant === 'floating') {\n return Toolbar.__renderFloating(cssClasses);\n }\n\n return Toolbar.__renderDocked(cssClasses);\n }\n\n private static __renderDocked(cssClasses: Record<string, boolean>) {\n return html`\n <div class=${classMap(cssClasses)} role=\"toolbar\">\n <div class=\"background\"></div>\n <div class=\"toolbar-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n private static __renderFloating(cssClasses: Record<string, boolean>) {\n return html`\n <div class=${classMap(cssClasses)} role=\"toolbar\">\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"background\"></div>\n <div class=\"toolbar-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","colorStyles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDG;AAEI,IAAM,OAAO,GAAA,SAAA,GAAb,MAAM,OAAQ,SAAQA,GAAU,CAAA;AAAhC,IAAA,WAAA,GAAA;;AAGL;;;;AAIG;QAEH,IAAA,CAAA,OAAO,GAA0B,QAAQ;AAEzC;;;;AAIG;QAEH,IAAA,CAAA,WAAW,GAA8B,YAAY;AAErD;;;;;AAKG;QAEH,IAAA,CAAA,IAAI,GAAiC,OAAO;AAE5C;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAY,KAAK;IAwC3B;IAtCW,MAAM,GAAA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