@redvars/peacock 3.3.0 → 3.3.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 (159) hide show
  1. package/dist/{IndividualComponent-tDnXrOLV.js → IndividualComponent-Dt5xirYG.js} +2 -2
  2. package/dist/{IndividualComponent-tDnXrOLV.js.map → IndividualComponent-Dt5xirYG.js.map} +1 -1
  3. package/dist/array-D5vjT2Xm.js +14 -0
  4. package/dist/array-D5vjT2Xm.js.map +1 -0
  5. package/dist/assets/components.css +1 -1
  6. package/dist/assets/components.css.map +1 -1
  7. package/dist/assets/styles.css +1 -1
  8. package/dist/assets/styles.css.map +1 -1
  9. package/dist/{button-BGFJfbT2.js → button-ClzS8JLq.js} +3 -4
  10. package/dist/{button-BGFJfbT2.js.map → button-ClzS8JLq.js.map} +1 -1
  11. package/dist/button-group-BMS5WvaF.js +292 -0
  12. package/dist/button-group-BMS5WvaF.js.map +1 -0
  13. package/dist/button-group.js +6 -107
  14. package/dist/button-group.js.map +1 -1
  15. package/dist/button.js +3 -4
  16. package/dist/button.js.map +1 -1
  17. package/dist/card.js +104 -0
  18. package/dist/card.js.map +1 -0
  19. package/dist/chart-bar-DbnXQgvS.js +1121 -0
  20. package/dist/chart-bar-DbnXQgvS.js.map +1 -0
  21. package/dist/chart-bar.js +259 -0
  22. package/dist/chart-bar.js.map +1 -0
  23. package/dist/chart-donut.js +4 -2
  24. package/dist/chart-donut.js.map +1 -1
  25. package/dist/chart-doughnut.js +4 -2
  26. package/dist/chart-doughnut.js.map +1 -1
  27. package/dist/chart-pie.js +4 -2
  28. package/dist/chart-pie.js.map +1 -1
  29. package/dist/chart-stacked-bar.js +401 -0
  30. package/dist/chart-stacked-bar.js.map +1 -0
  31. package/dist/{class-map-DpeNtqCn.js → class-map-59YGWLnx.js} +9 -3
  32. package/dist/class-map-59YGWLnx.js.map +1 -0
  33. package/dist/clock.js +1 -1
  34. package/dist/code-editor.js +7 -7
  35. package/dist/code-editor.js.map +1 -1
  36. package/dist/code-highlighter.js +7 -25
  37. package/dist/code-highlighter.js.map +1 -1
  38. package/dist/custom-elements-jsdocs.json +8824 -5047
  39. package/dist/custom-elements.json +7468 -4147
  40. package/dist/index.js +16 -10
  41. package/dist/index.js.map +1 -1
  42. package/dist/number-counter.js +2 -2
  43. package/dist/{observe-theme-change-BISF-Gl5.js → observe-theme-change-pALI5fmV.js} +2 -2
  44. package/dist/{observe-theme-change-BISF-Gl5.js.map → observe-theme-change-pALI5fmV.js.map} +1 -1
  45. package/dist/peacock-loader.js +42 -1016
  46. package/dist/peacock-loader.js.map +1 -1
  47. package/dist/pie-Dz0IDiPt.js +537 -0
  48. package/dist/pie-Dz0IDiPt.js.map +1 -0
  49. package/dist/{slider-Dk9CFWTG.js → snackbar-74YCdMPL.js} +6205 -3206
  50. package/dist/snackbar-74YCdMPL.js.map +1 -0
  51. package/dist/src/accordion/accordion-item.d.ts +1 -0
  52. package/dist/src/breadcrumb/breadcrumb/breadcrumb.d.ts +2 -0
  53. package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +1 -0
  54. package/dist/src/button/button-group/button-group.d.ts +4 -0
  55. package/dist/src/card/card.d.ts +27 -0
  56. package/dist/src/card/index.d.ts +1 -0
  57. package/dist/src/chart-bar/chart-bar.d.ts +53 -0
  58. package/dist/src/chart-bar/chart-stacked-bar.d.ts +78 -0
  59. package/dist/src/chart-bar/index.d.ts +2 -0
  60. package/dist/src/code-editor/code-editor.d.ts +4 -3
  61. package/dist/src/code-highlighter/code-highlighter.d.ts +4 -7
  62. package/dist/src/index.d.ts +9 -0
  63. package/dist/src/menu/index.d.ts +3 -0
  64. package/dist/src/menu/menu/MenuSurfaceController.d.ts +18 -0
  65. package/dist/src/menu/menu/menu.d.ts +54 -12
  66. package/dist/src/menu/menu-item/menu-item.d.ts +12 -5
  67. package/dist/src/menu/sub-menu/sub-menu.d.ts +36 -0
  68. package/dist/src/pagination/index.d.ts +1 -0
  69. package/dist/src/pagination/pagination.d.ts +38 -0
  70. package/dist/src/popover/PopoverController.d.ts +4 -1
  71. package/dist/src/snackbar/index.d.ts +1 -0
  72. package/dist/src/snackbar/snackbar.d.ts +40 -0
  73. package/dist/src/table/index.d.ts +1 -0
  74. package/dist/src/table/table.d.ts +110 -0
  75. package/dist/src/tabs/tab-group.d.ts +5 -1
  76. package/dist/src/tabs/tab-panel.d.ts +2 -0
  77. package/dist/src/tabs/tab.d.ts +3 -1
  78. package/dist/src/tabs/tabs.d.ts +2 -0
  79. package/dist/src/tooltip/tooltip.d.ts +1 -3
  80. package/dist/src/tree-view/index.d.ts +2 -0
  81. package/dist/src/tree-view/tree-node.d.ts +69 -0
  82. package/dist/src/tree-view/tree-view.d.ts +40 -0
  83. package/dist/src/tree-view/wc-tree-view.d.ts +6 -0
  84. package/dist/{style-map-CfNHEkQp.js → style-map-DcB52w-l.js} +2 -2
  85. package/dist/{style-map-CfNHEkQp.js.map → style-map-DcB52w-l.js.map} +1 -1
  86. package/dist/test/card.test.d.ts +1 -0
  87. package/dist/test/chart-bar.test.d.ts +1 -0
  88. package/dist/test/icon.test.d.ts +1 -1
  89. package/dist/test/menu.test.d.ts +1 -0
  90. package/dist/test/snackbar.test.d.ts +1 -0
  91. package/dist/test/sub-menu.test.d.ts +1 -0
  92. package/dist/test/tree-view.test.d.ts +1 -0
  93. package/dist/{transform-DRuHEvar.js → transform-DSwFSqzD.js} +13 -558
  94. package/dist/transform-DSwFSqzD.js.map +1 -0
  95. package/dist/tsconfig.tsbuildinfo +1 -1
  96. package/dist/{unsafe-html-CV6Je6HL.js → unsafe-html-C2r3PyzF.js} +2 -2
  97. package/dist/{unsafe-html-CV6Je6HL.js.map → unsafe-html-C2r3PyzF.js.map} +1 -1
  98. package/package.json +1 -1
  99. package/readme.md +40 -40
  100. package/src/accordion/accordion-item.ts +2 -1
  101. package/src/breadcrumb/breadcrumb/breadcrumb.ts +3 -0
  102. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +1 -0
  103. package/src/button/button-group/button-group.ts +6 -0
  104. package/src/card/card.scss +61 -0
  105. package/src/card/card.ts +38 -0
  106. package/src/card/index.ts +1 -0
  107. package/src/chart-bar/chart-bar.scss +58 -0
  108. package/src/chart-bar/chart-bar.ts +306 -0
  109. package/src/chart-bar/chart-stacked-bar.ts +402 -0
  110. package/src/chart-bar/index.ts +2 -0
  111. package/src/code-editor/code-editor.ts +4 -3
  112. package/src/code-highlighter/code-highlighter.ts +4 -22
  113. package/src/divider/divider.scss +2 -2
  114. package/src/empty-state/empty-state.scss +1 -1
  115. package/src/empty-state/empty-state.ts +1 -1
  116. package/src/index.ts +11 -2
  117. package/src/menu/index.ts +3 -0
  118. package/src/menu/menu/MenuSurfaceController.ts +61 -0
  119. package/src/menu/{menu-list/menu-list.scss → menu/menu.scss} +19 -4
  120. package/src/menu/menu/menu.ts +389 -81
  121. package/src/menu/menu-item/menu-item.ts +115 -36
  122. package/src/menu/sub-menu/sub-menu.scss +7 -0
  123. package/src/menu/sub-menu/sub-menu.ts +243 -0
  124. package/src/pagination/index.ts +1 -0
  125. package/src/pagination/pagination.scss +59 -0
  126. package/src/pagination/pagination.ts +135 -0
  127. package/src/peacock-loader.ts +39 -11
  128. package/src/popover/PopoverController.ts +13 -7
  129. package/src/snackbar/demo/index.html +29 -0
  130. package/src/snackbar/index.ts +1 -0
  131. package/src/snackbar/snackbar.scss +73 -0
  132. package/src/snackbar/snackbar.ts +151 -0
  133. package/src/table/index.ts +1 -0
  134. package/src/table/table.scss +174 -0
  135. package/src/table/table.ts +475 -0
  136. package/src/tabs/tab-group.ts +63 -28
  137. package/src/tabs/tab-panel.scss +3 -3
  138. package/src/tabs/tab-panel.ts +3 -0
  139. package/src/tabs/tab.scss +76 -2
  140. package/src/tabs/tab.ts +29 -6
  141. package/src/tabs/tabs.scss +6 -5
  142. package/src/tabs/tabs.ts +19 -5
  143. package/src/text/text.css-component.scss +6 -3
  144. package/src/tooltip/tooltip.scss +16 -13
  145. package/src/tooltip/tooltip.ts +7 -9
  146. package/src/tree-view/demo/index.html +57 -0
  147. package/src/tree-view/index.ts +2 -0
  148. package/src/tree-view/tree-node.scss +101 -0
  149. package/src/tree-view/tree-node.ts +268 -0
  150. package/src/tree-view/tree-view.scss +12 -0
  151. package/src/tree-view/tree-view.ts +182 -0
  152. package/src/tree-view/wc-tree-view.ts +9 -0
  153. package/dist/class-map-DpeNtqCn.js.map +0 -1
  154. package/dist/slider-Dk9CFWTG.js.map +0 -1
  155. package/dist/src/menu/menu-list/menu-list.d.ts +0 -22
  156. package/dist/state-8v48Exzh.js +0 -10
  157. package/dist/state-8v48Exzh.js.map +0 -1
  158. package/dist/transform-DRuHEvar.js.map +0 -1
  159. package/src/menu/menu-list/menu-list.ts +0 -48
@@ -4,6 +4,7 @@ import { LitElement } from 'lit';
4
4
  * @tag wc-accordion-item
5
5
  * @rawTag accordion-item
6
6
  * @summary An accordion item is single item in an accordion list. It contains a header and a content section that can be expanded or collapsed by the user.
7
+ * @parentRawTag accordion
7
8
  *
8
9
  * @example
9
10
  * ```html
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { BreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.js';
2
3
  /**
3
4
  * @label Breadcrumb
4
5
  * @tag wc-breadcrumb
@@ -21,6 +22,7 @@ import { LitElement } from 'lit';
21
22
  */
22
23
  export declare class Breadcrumb extends LitElement {
23
24
  static styles: import("lit").CSSResultGroup[];
25
+ static Item: typeof BreadcrumbItem;
24
26
  /**
25
27
  * Accessible label for the breadcrumb navigation landmark.
26
28
  * @default "Breadcrumb"
@@ -3,6 +3,7 @@ import { LitElement } from 'lit';
3
3
  * @label Breadcrumb Item
4
4
  * @tag wc-breadcrumb-item
5
5
  * @rawTag breadcrumb-item
6
+ * @parentRawTag breadcrumb
6
7
  * @summary A breadcrumb item component that represents a single item in a breadcrumb navigation.
7
8
  * @tags navigation
8
9
  *
@@ -1,4 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
+ import { Button } from '../button/button.js';
3
+ import { IconButton } from '../icon-button/icon-button.js';
2
4
  /**
3
5
  * @label Button Group
4
6
  * @tag wc-button-group
@@ -18,6 +20,8 @@ import { LitElement } from 'lit';
18
20
  */
19
21
  export declare class ButtonGroup extends LitElement {
20
22
  static styles: import("lit").CSSResultGroup[];
23
+ static Button: typeof Button;
24
+ static IconButton: typeof IconButton;
21
25
  /**
22
26
  * Button size.
23
27
  * Possible values are `"sm"`, `"md"`, `"lg"`. Defaults to `"md"`.
@@ -0,0 +1,27 @@
1
+ import { LitElement } from 'lit';
2
+ type CardVariant = 'elevated' | 'filled' | 'outlined';
3
+ type CardElevation = 0 | 1 | 2 | 3 | 4 | 5;
4
+ /**
5
+ * @label Card
6
+ * @tag wc-card
7
+ * @rawTag card
8
+ * @summary A Material 3 inspired card surface for grouping related content.
9
+ * @cssprop --card-padding - Inner padding for the card container. Defaults to 1rem.
10
+ * @cssprop --card-shape - Corner radius for the card container. Defaults to a large radius.
11
+ * @cssprop --card-gap - Gap between slotted children.
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <wc-card variant="outlined">
16
+ * <h3>Title</h3>
17
+ * <p>Supportive text</p>
18
+ * </wc-card>
19
+ * ```
20
+ */
21
+ export declare class Card extends LitElement {
22
+ static styles: import("lit").CSSResultGroup[];
23
+ variant: CardVariant;
24
+ elevation: CardElevation;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ export {};
@@ -0,0 +1 @@
1
+ export { Card } from './card.js';
@@ -0,0 +1,53 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ export type ChartBarItem = {
3
+ name: string;
4
+ value: number;
5
+ label?: string;
6
+ color?: string;
7
+ };
8
+ /**
9
+ * @label Chart Bar
10
+ * @tag wc-chart-bar
11
+ * @rawTag chart-bar
12
+ * @summary A vertical bar chart that follows Material Design 3 color and spacing tokens.
13
+ * @tags charts
14
+ *
15
+ * @example
16
+ * ```html
17
+ * <wc-chart-bar width="520" height="320"></wc-chart-bar>
18
+ * <script>
19
+ * document.querySelector('wc-chart-bar').data = [
20
+ * { name: 'apples', label: 'Apples', value: 20 },
21
+ * { name: 'bananas', label: 'Bananas', value: 35 },
22
+ * { name: 'cherries', label: 'Cherries', value: 15 },
23
+ * ];
24
+ * </script>
25
+ * ```
26
+ */
27
+ export declare class ChartBar extends LitElement {
28
+ static styles: import("lit").CSSResultGroup[];
29
+ private svgElement?;
30
+ /** Width of the chart in pixels. */
31
+ width: number;
32
+ /** Height of the chart in pixels. */
33
+ height: number;
34
+ /** Margin around the chart drawing area. */
35
+ margin: number;
36
+ /** Chart data array. Each item should have name, value, and optional label and color. */
37
+ data: ChartBarItem[];
38
+ /** Whether to render value labels above bars. */
39
+ showValues: boolean;
40
+ private _initialized;
41
+ private _debouncedRenderChart;
42
+ firstUpdated(): void;
43
+ updated(changedProperties: PropertyValues): void;
44
+ private _getPaletteScale;
45
+ private _resolveColor;
46
+ private _renderChart;
47
+ render(): import("lit-html").TemplateResult<1>;
48
+ }
49
+ declare global {
50
+ interface HTMLElementTagNameMap {
51
+ 'wc-chart-bar': ChartBar;
52
+ }
53
+ }
@@ -0,0 +1,78 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ export type ChartStackedSegment = {
3
+ name: string;
4
+ value: number;
5
+ label?: string;
6
+ color?: string;
7
+ };
8
+ export type ChartStackedBarItem = {
9
+ name: string;
10
+ label?: string;
11
+ segments: ChartStackedSegment[];
12
+ };
13
+ /**
14
+ * @label Chart Stacked Bar
15
+ * @tag wc-chart-stacked-bar
16
+ * @rawTag chart-stacked-bar
17
+ * @summary A stacked bar chart that groups series by category using Material Design 3 tokens.
18
+ * @tags charts
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <wc-chart-stacked-bar width="560" height="360"></wc-chart-stacked-bar>
23
+ * <script>
24
+ * document.querySelector('wc-chart-stacked-bar').data = [
25
+ * {
26
+ * name: 'q1',
27
+ * label: 'Q1',
28
+ * segments: [
29
+ * { name: 'mobile', label: 'Mobile', value: 40 },
30
+ * { name: 'web', label: 'Web', value: 25 },
31
+ * { name: 'store', label: 'Store', value: 15 },
32
+ * ],
33
+ * },
34
+ * {
35
+ * name: 'q2',
36
+ * label: 'Q2',
37
+ * segments: [
38
+ * { name: 'mobile', label: 'Mobile', value: 32 },
39
+ * { name: 'web', label: 'Web', value: 30 },
40
+ * { name: 'store', label: 'Store', value: 18 },
41
+ * ],
42
+ * },
43
+ * ];
44
+ * </script>
45
+ * ```
46
+ */
47
+ export declare class ChartStackedBar extends LitElement {
48
+ static styles: import("lit").CSSResultGroup[];
49
+ private svgElement?;
50
+ /** Width of the chart in pixels. */
51
+ width: number;
52
+ /** Height of the chart in pixels. */
53
+ height: number;
54
+ /** Margin around the chart drawing area. */
55
+ margin: number;
56
+ /** Chart data array. Each item holds the stacked segments for a category. */
57
+ data: ChartStackedBarItem[];
58
+ /** Whether to render total value labels above each stack. */
59
+ showValues: boolean;
60
+ /** Whether to render the legend. */
61
+ showLegend: boolean;
62
+ private _initialized;
63
+ private _debouncedRenderChart;
64
+ firstUpdated(): void;
65
+ updated(changedProperties: PropertyValues): void;
66
+ private _getSegmentKeys;
67
+ private _getColorScale;
68
+ private _getColorMap;
69
+ private _getSegmentLabel;
70
+ private _getTotals;
71
+ private _renderChart;
72
+ render(): import("lit-html").TemplateResult<1>;
73
+ }
74
+ declare global {
75
+ interface HTMLElementTagNameMap {
76
+ 'wc-chart-stacked-bar': ChartStackedBar;
77
+ }
78
+ }
@@ -0,0 +1,2 @@
1
+ export { ChartBar } from './chart-bar.js';
2
+ export { ChartStackedBar } from './chart-stacked-bar.js';
@@ -1,7 +1,7 @@
1
1
  import BaseInput from '../input/BaseInput.js';
2
2
  /**
3
3
  * @label Code Editor
4
- * @tag code-editor
4
+ * @tag wc-code-editor
5
5
  * @rawTag code-editor
6
6
  *
7
7
  * @summary A Monaco-based code editing component with syntax highlighting and theming.
@@ -12,12 +12,13 @@ import BaseInput from '../input/BaseInput.js';
12
12
  *
13
13
  * @example
14
14
  * ```html
15
- * <code-editor
15
+ * <wc-code-editor
16
16
  * language="javascript"
17
+ * style="width: 100%; --code-editor-height: 10rem;"
17
18
  * value="function hello() { console.log('Hello'); }"
18
19
  * lineNumbers="on"
19
20
  * minimap="false">
20
- * </code-editor>
21
+ * </wc-code-editor>
21
22
  * ```
22
23
  * @tags input, editor
23
24
  */
@@ -2,21 +2,18 @@ import { LitElement } from 'lit';
2
2
  import { BundledLanguage } from 'shiki';
3
3
  /**
4
4
  * @label Code Highlighter
5
- * @tag code-highlighter
5
+ * @tag wc-code-highlighter
6
6
  * @rawTag code-highlighter
7
7
  *
8
- * @summary Highlights code snippets with syntax highlighting and line numbers.
9
- * @overview
10
- * - CodeHighlighter is a component that provides syntax highlighting for code snippets.
11
- * - It supports various programming languages and can display line numbers for better readability.
8
+ * @summary A component that provides syntax highlighting for code snippets.
12
9
  *
13
10
  * @example
14
11
  * ```html
15
- * <code-highlighter language="javascript" style="height: 9rem"><pre><code>
12
+ * <wc-code-highlighter language="javascript" style="height: 9rem"><pre><code>
16
13
  * function helloWorld() {
17
14
  * console.log('Hello, world!');
18
15
  * }</code></pre>
19
- * </code-highlighter>
16
+ * </wc-code-highlighter>
20
17
  * ```
21
18
  * @tags display
22
19
  */
@@ -21,16 +21,25 @@ export { DatePicker } from './date-picker/index.js';
21
21
  export { TimePicker } from './time-picker/index.js';
22
22
  export { Textarea } from './textarea/index.js';
23
23
  export { Switch } from './switch/index.js';
24
+ export { Checkbox } from './checkbox/index.js';
24
25
  export { Spinner } from './spinner/index.js';
25
26
  export { Container } from './container/index.js';
26
27
  export { NumberCounter } from './number-counter/index.js';
27
28
  export { EmptyState } from './empty-state/index.js';
28
29
  export { Tooltip } from './popover/index.js';
29
30
  export { Breadcrumb, BreadcrumbItem } from './breadcrumb/index.js';
31
+ export { Menu, MenuItem, SubMenu } from './menu/index.js';
30
32
  export { CodeHighlighter } from './code-highlighter/index.js';
31
33
  export { CodeEditor } from './code-editor/index.js';
32
34
  export { Image } from './image/index.js';
33
35
  export { Tab, TabGroup, TabPanel, Tabs } from './tabs/index.js';
34
36
  export { Slider } from './slider/index.js';
37
+ export { ChartDonut } from './chart-donut/index.js';
35
38
  export { ChartDoughnut } from './chart-doughnut/index.js';
36
39
  export { ChartPie } from './chart-pie/index.js';
40
+ export { ChartBar, ChartStackedBar } from './chart-bar/index.js';
41
+ export { Table } from './table/index.js';
42
+ export { Pagination } from './pagination/index.js';
43
+ export { TreeView, TreeNode } from './tree-view/index.js';
44
+ export { Card } from './card/index.js';
45
+ export { Snackbar } from './snackbar/index.js';
@@ -0,0 +1,3 @@
1
+ export { Menu } from './menu/menu.js';
2
+ export { MenuItem } from './menu-item/menu-item.js';
3
+ export { SubMenu } from './sub-menu/sub-menu.js';
@@ -0,0 +1,18 @@
1
+ import { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import { type Placement, type Strategy } from '@floating-ui/dom';
3
+ type PositionOptions = {
4
+ reference: HTMLElement;
5
+ floating: HTMLElement;
6
+ placement: Placement;
7
+ offset: number;
8
+ strategy?: Strategy;
9
+ };
10
+ export declare class MenuSurfaceController implements ReactiveController {
11
+ private host;
12
+ private cleanup?;
13
+ constructor(host: ReactiveControllerHost);
14
+ start(options: PositionOptions): void;
15
+ stop(): void;
16
+ hostDisconnected(): void;
17
+ }
18
+ export {};
@@ -1,31 +1,73 @@
1
1
  import { LitElement } from 'lit';
2
+ import type { Placement } from '@floating-ui/dom';
3
+ import { MenuItem } from '../menu-item/menu-item.js';
4
+ type CloseReason = {
5
+ kind: 'click-selection';
6
+ } | {
7
+ kind: 'keydown';
8
+ key: string;
9
+ } | {
10
+ kind: 'outside-click';
11
+ } | {
12
+ kind: 'focusout';
13
+ } | {
14
+ kind: 'programmatic';
15
+ };
2
16
  /**
3
17
  * @label Menu
4
18
  * @tag wc-menu
5
19
  * @rawTag menu
6
- * @summary A dropdown menu component.
20
+ * @summary A list of menu items.
7
21
  * @tags navigation
8
22
  *
9
23
  * @example
10
24
  * ```html
11
25
  * <wc-menu>
12
- * <wc-menu-list>
13
- * <wc-menu-item>Item 1</wc-menu-item>
14
- * </wc-menu-list>
26
+ * <wc-menu-item>Item 1</wc-menu-item>
27
+ * <wc-menu-item>Item 2</wc-menu-item>
15
28
  * </wc-menu>
16
29
  * ```
17
30
  */
18
31
  export declare class Menu extends LitElement {
32
+ static styles: import("lit").CSSResultGroup[];
33
+ static Item: typeof MenuItem;
19
34
  open: boolean;
20
- align: string;
21
- menuWrapper: HTMLElement;
22
- private _boundClickOutside;
23
- constructor();
35
+ variant: 'standard' | 'vibrant';
36
+ anchor: string;
37
+ stayOpenOnOutsideClick: boolean;
38
+ stayOpenOnFocusout: boolean;
39
+ isSubmenu: boolean;
40
+ placement: Placement;
41
+ offset: number;
42
+ private activeIndex;
43
+ private readonly menuListElement;
44
+ anchorElement: HTMLElement | null;
45
+ private readonly _surfaceController;
46
+ private _lastFocusedElement;
47
+ private _closeReason;
24
48
  connectedCallback(): void;
25
49
  disconnectedCallback(): void;
26
- private _handleClickOutside;
27
- private _handleItemClick;
28
- private _toggleMenu;
29
- static styles: import("lit").CSSResult;
50
+ get items(): MenuItem[];
51
+ show(): void;
52
+ close(reason?: CloseReason): void;
53
+ focus(): void;
54
+ private _resolveAnchorElement;
55
+ private _syncAnchorAria;
56
+ private _enabledItems;
57
+ private _syncRovingTabIndex;
58
+ private _setActiveByOffset;
59
+ private _setBoundaryActive;
60
+ private _getActiveItem;
61
+ private _getFirstEnabledItem;
62
+ private _onItemActivate;
63
+ private _onItemRequestClose;
64
+ private _onKeyDown;
65
+ private _onWindowClick;
66
+ private _isWithinMenuTree;
67
+ private _onFocusOut;
68
+ private _onSlotChange;
69
+ private _applyPositioning;
70
+ protected updated(changedProperties: Map<string, unknown>): void;
30
71
  render(): import("lit-html").TemplateResult<1>;
31
72
  }
73
+ export {};
@@ -3,6 +3,7 @@ import { LitElement } from 'lit';
3
3
  * @label Menu Item
4
4
  * @tag wc-menu-item
5
5
  * @rawTag menu-item
6
+ * @parentRawTag menu
6
7
  * @summary An item in a menu list.
7
8
  * @tags navigation
8
9
  *
@@ -15,19 +16,25 @@ export declare class MenuItem extends LitElement {
15
16
  disabled: boolean;
16
17
  value: string;
17
18
  selected: boolean;
19
+ keepOpen: boolean;
20
+ hasSubmenu: boolean;
21
+ submenuOpen: boolean;
18
22
  href?: string;
19
23
  /**
20
- * Sets or retrieves the window or frame at which to target content.
21
- */
24
+ * Sets or retrieves the window or frame at which to target content.
25
+ */
22
26
  target: string;
23
27
  variant: 'standard' | 'vibrant';
24
28
  static styles: import("lit").CSSResultGroup[];
25
29
  connectedCallback(): void;
30
+ disconnectedCallback(): void;
31
+ private emitActivate;
32
+ private requestClose;
33
+ private requestSubmenuKey;
26
34
  private _handleKeyDown;
35
+ private _handleClick;
27
36
  __isLink(): boolean;
28
- private readonly menuItemElement;
29
- focus(): void;
30
- blur(): void;
37
+ get focusTarget(): this;
31
38
  render(): import("lit-html").TemplateResult<1>;
32
39
  renderContent(): import("lit-html").TemplateResult<1>;
33
40
  }
@@ -0,0 +1,36 @@
1
+ import { LitElement } from 'lit';
2
+ import { MenuItem } from '../menu-item/menu-item.js';
3
+ import { Menu } from '../menu/menu.js';
4
+ /**
5
+ * @label Sub Menu
6
+ * @tag wc-sub-menu
7
+ * @rawTag sub-menu
8
+ * @summary Connects a menu item to a nested menu.
9
+ */
10
+ export declare class SubMenu extends LitElement {
11
+ static styles: import("lit").CSSResultGroup[];
12
+ hoverOpenDelay: number;
13
+ hoverCloseDelay: number;
14
+ anchorCorner: string;
15
+ menuCorner: string;
16
+ private readonly _items;
17
+ private readonly _menus;
18
+ private _openTimeout?;
19
+ private _closeTimeout?;
20
+ private readonly _onChildMenuOpened;
21
+ private readonly _onChildMenuClosed;
22
+ get item(): MenuItem | null;
23
+ get menu(): Menu | null;
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ show(): Promise<void>;
27
+ close(): Promise<void>;
28
+ render(): import("lit-html").TemplateResult<1>;
29
+ private _onSlotChange;
30
+ private _onItemClick;
31
+ private _onItemKeyDown;
32
+ private _onMenuKeyDown;
33
+ private _onCloseMenu;
34
+ private _onMouseEnter;
35
+ private _onMouseLeave;
36
+ }
@@ -0,0 +1 @@
1
+ export { Pagination } from './pagination.js';
@@ -0,0 +1,38 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Pagination
4
+ * @tag wc-pagination
5
+ * @rawTag pagination
6
+ * @summary A pagination control with page size selector, item count display, and previous/next navigation.
7
+ * @overview
8
+ * <p>The pagination component provides controls for navigating through paged data sets.</p>
9
+ *
10
+ * @fires {CustomEvent} page - Dispatched when the page or page size changes. Detail: `{ page, pageSize }`.
11
+ *
12
+ * @example
13
+ * ```html
14
+ * <wc-pagination page="1" page-size="10" total-items="100"></wc-pagination>
15
+ * ```
16
+ * @tags navigation, data
17
+ */
18
+ export declare class Pagination extends LitElement {
19
+ static styles: import("lit").CSSResultGroup[];
20
+ /**
21
+ * The current page number (1-based). Defaults to `1`.
22
+ */
23
+ page: number;
24
+ /**
25
+ * The number of rows per page. Defaults to `10`.
26
+ */
27
+ pageSize: number;
28
+ /**
29
+ * Total number of items.
30
+ */
31
+ totalItems: number;
32
+ /**
33
+ * Supported page size options.
34
+ */
35
+ pageSizes: number[];
36
+ private dispatchPageEvent;
37
+ render(): import("lit-html").TemplateResult<1>;
38
+ }
@@ -8,6 +8,9 @@ export declare class PopoverController implements ReactiveController {
8
8
  placement: Placement;
9
9
  offset: number;
10
10
  });
11
- updatePosition(reference: HTMLElement | null, floating: HTMLElement): Promise<void>;
11
+ updatePosition(reference: HTMLElement | null, floating: HTMLElement, options?: {
12
+ placement?: Placement;
13
+ offset?: number;
14
+ }): Promise<void>;
12
15
  hostDisconnected(): void;
13
16
  }
@@ -0,0 +1 @@
1
+ export { Snackbar } from './snackbar.js';
@@ -0,0 +1,40 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * @label Snackbar
4
+ * @tag wc-snackbar
5
+ * @rawTag snackbar
6
+ * @summary Snackbars provide brief messages about app processes at the bottom of the screen.
7
+ *
8
+ * @cssprop --snackbar-container-color - Container color for the snackbar.
9
+ * @cssprop --snackbar-label-text-color - Label text color for the snackbar.
10
+ * @cssprop --snackbar-action-text-color - Action text color.
11
+ * @cssprop --snackbar-close-icon-color - Close icon color.
12
+ * @cssprop --snackbar-border-radius - Border radius of the snackbar surface.
13
+ *
14
+ * @example
15
+ * ```html
16
+ * <wc-snackbar open message="Message archived" action-label="Undo"></wc-snackbar>
17
+ * ```
18
+ * @tags display, feedback
19
+ */
20
+ export declare class Snackbar extends LitElement {
21
+ static styles: import("lit").CSSResultGroup[];
22
+ open: boolean;
23
+ message: string;
24
+ actionLabel: string;
25
+ showCloseIcon: boolean;
26
+ duration: number;
27
+ multiline: boolean;
28
+ private hideTimer;
29
+ show(): void;
30
+ hide(): void;
31
+ private close;
32
+ private dispatchActionEvent;
33
+ private handleActionClick;
34
+ private handleCloseClick;
35
+ private clearTimer;
36
+ private scheduleAutoHide;
37
+ protected updated(changedProperties: Map<string, unknown>): void;
38
+ disconnectedCallback(): void;
39
+ render(): import("lit-html").TemplateResult<1>;
40
+ }
@@ -0,0 +1 @@
1
+ export { Table } from './table.js';