@limetech/lime-elements 36.0.0-next.21 → 36.0.0-next.24

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.
@@ -21,11 +21,11 @@ export declare class DockButton {
21
21
  /**
22
22
  * Fired when a dock item has been selected from the dock.
23
23
  */
24
- private itemSelected;
24
+ itemSelected: EventEmitter<DockItem>;
25
25
  /**
26
26
  * Fired when a dock menu is opened.
27
27
  */
28
- private menuOpen;
28
+ menuOpen: EventEmitter<DockItem>;
29
29
  /**
30
30
  * Indicated whether the popover that renders a component is open.
31
31
  */
@@ -54,6 +54,10 @@ export declare class Dock {
54
54
  * Fired when a dock item has been selected from the dock.
55
55
  */
56
56
  itemSelected: EventEmitter<DockItem>;
57
+ /**
58
+ * Fired when a dock menu is opened.
59
+ */
60
+ menuOpen: EventEmitter<DockItem>;
57
61
  /**
58
62
  * Fired when the popover is closed.
59
63
  */
@@ -0,0 +1,2 @@
1
+ export declare type Layout = 'default' | 'stretchLastColumn' | 'stretchColumns' | 'lowDensity';
2
+ export declare function mapLayout(layout: Layout): any;
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { Column, TableParams, ColumnSorter, ColumnAggregate } from './table.types';
3
+ import { Layout } from './layout';
3
4
  /**
4
5
  * @exampleComponent limel-example-table
5
6
  * @exampleComponent limel-example-table-custom-components
@@ -10,7 +11,11 @@ import { Column, TableParams, ColumnSorter, ColumnAggregate } from './table.type
10
11
  * @exampleComponent limel-example-table-activate-row
11
12
  * @exampleComponent limel-example-table-selectable-rows
12
13
  * @exampleComponent limel-example-table-default-sorted
13
- * @exampleComponent limel-example-table-low-density
14
+ * @exampleComponent limel-example-table-layout-default
15
+ * @exampleComponent limel-example-table-layout-stretch-last-column
16
+ * @exampleComponent limel-example-table-layout-stretch-columns
17
+ * @exampleComponent limel-example-table-layout-low-density
18
+ * @exampleComponent limel-example-table-interactive-rows
14
19
  */
15
20
  export declare class Table {
16
21
  /**
@@ -28,6 +33,15 @@ export declare class Table {
28
33
  * is responsible to give the table new data when a `load` event occurs
29
34
  */
30
35
  mode: 'local' | 'remote';
36
+ /**
37
+ * Defines the layout of the table, based on how width of the columns are calculated.
38
+ *
39
+ * - `default`: makes columns as wide as their contents.
40
+ * - `stretchLastColumn`: makes columns as wide as their contents, stretch the last column to fill up the remaining table width.
41
+ * - `stretchColumns`: stretches all columns to fill the available width when possible.
42
+ * - `lowDensity`: makes columns as wide as their contents, and creates a low density and airy layout.
43
+ */
44
+ layout: Layout;
31
45
  /**
32
46
  * Number of rows per page
33
47
  */
@@ -19,6 +19,7 @@ import { OpenDirection as OpenDirection1 } from "./components/menu/menu.types";
19
19
  import { FlowItem } from "./components/progress-flow/progress-flow.types";
20
20
  import { Tab } from "./components/tab-bar/tab.types";
21
21
  import { Column, ColumnAggregate, ColumnSorter, TableParams } from "./components/table/table.types";
22
+ import { Layout } from "./components/table/layout";
22
23
  export namespace Components {
23
24
  interface LimelBadge {
24
25
  /**
@@ -1058,6 +1059,10 @@ export namespace Components {
1058
1059
  * A message to display when the table has no data
1059
1060
  */
1060
1061
  "emptyMessage": string;
1062
+ /**
1063
+ * Defines the layout of the table, based on how width of the columns are calculated. - `default`: makes columns as wide as their contents. - `stretchLastColumn`: makes columns as wide as their contents, stretch the last column to fill up the remaining table width. - `stretchColumns`: stretches all columns to fill the available width when possible. - `lowDensity`: makes columns as wide as their contents, and creates a low density and airy layout.
1064
+ */
1065
+ "layout": Layout;
1061
1066
  /**
1062
1067
  * Set to `true` to trigger loading animation
1063
1068
  */
@@ -1884,6 +1889,10 @@ declare namespace LocalJSX {
1884
1889
  * Fired when a dock item has been selected from the dock.
1885
1890
  */
1886
1891
  "onItemSelected"?: (event: CustomEvent<DockItem>) => void;
1892
+ /**
1893
+ * Fired when a dock menu is opened.
1894
+ */
1895
+ "onMenuOpen"?: (event: CustomEvent<DockItem>) => void;
1887
1896
  }
1888
1897
  interface LimelDockButton {
1889
1898
  /**
@@ -2661,6 +2670,10 @@ declare namespace LocalJSX {
2661
2670
  * A message to display when the table has no data
2662
2671
  */
2663
2672
  "emptyMessage"?: string;
2673
+ /**
2674
+ * Defines the layout of the table, based on how width of the columns are calculated. - `default`: makes columns as wide as their contents. - `stretchLastColumn`: makes columns as wide as their contents, stretch the last column to fill up the remaining table width. - `stretchColumns`: stretches all columns to fill the available width when possible. - `lowDensity`: makes columns as wide as their contents, and creates a low density and airy layout.
2675
+ */
2676
+ "layout"?: Layout;
2664
2677
  /**
2665
2678
  * Set to `true` to trigger loading animation
2666
2679
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "36.0.0-next.21",
3
+ "version": "36.0.0-next.24",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as o,H as i}from"./p-e9a95b8f.js";const s=class{constructor(i){e(this,i),this.itemSelected=t(this,"itemSelected",7),this.close=t(this,"close",7),this.dockExpanded=t(this,"dockExpanded",7),this.dockItems=[],this.dockFooterItems=[],this.expanded=!1,this.allowResize=!0,this.mobileBreakPoint=700,this.useMobileLayout=!1,this.renderSeparator=()=>this.useMobileLayout?null:o("span",{class:"footer-separator"}),this.renderDockItem=e=>o("limel-dock-button",{class:{"dock-item":!0,selected:e.selected},item:e,expanded:this.expanded&&!this.useMobileLayout,useMobileLayout:this.useMobileLayout}),this.handleResize=()=>{this.useMobileLayout=window.innerWidth<=this.mobileBreakPoint},this.toggleDockWidth=()=>{this.expanded=!this.expanded,this.dockExpanded.emit(this.expanded)}}componentDidLoad(){this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(document.body)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){return o(i,{class:{dock:!0,expanded:this.expanded,"has-mobile-layout":this.useMobileLayout}},o("nav",{"aria-label":this.accessibleLabel},this.dockItems.map(this.renderDockItem),this.renderSeparator(),this.dockFooterItems.map(this.renderDockItem)),this.renderExpandShrinkToggle())}renderExpandShrinkToggle(){if(!this.useMobileLayout&&this.allowResize)return o("button",{class:{"expand-shrink":!0,expanded:this.expanded},onClick:this.toggleDockWidth},o("limel-icon",{name:"angle_right"}))}};s.style=":host(limel-dock){--dock-item-height:2.75rem;--dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:0.1875rem 0 0.375rem -0.125rem rgba(var(--color-black), 0.15), 0.1875rem 0 0.625rem -0.125rem rgba(var(--color-black), 0.05)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}.expand-shrink{all:unset;box-sizing:border-box;transition:background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--dock-padding);border-radius:0.375rem}.expand-shrink:hover{box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink:focus-visible{box-shadow:var(--shadow-depth-8-focused)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}";export{s as limel_dock}