@limetech/lime-elements 38.37.1 → 38.38.1-dev.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.
- package/CHANGELOG.md +28 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +26535 -20435
- package/dist/cjs/limel-table.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ai-avatar/ai-avatar.css +5 -3
- package/dist/collection/components/ai-avatar/ai-avatar.js +1 -0
- package/dist/collection/components/ai-avatar/ai-avatar.js.map +1 -1
- package/dist/collection/components/table/columns.js.map +1 -1
- package/dist/collection/components/table/table-selection.js +3 -0
- package/dist/collection/components/table/table-selection.js.map +1 -1
- package/dist/collection/components/table/table.css +406 -163
- package/dist/collection/components/table/table.js +94 -44
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js.map +1 -1
- package/dist/esm/limel-table.entry.js +26535 -20435
- package/dist/esm/limel-table.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-41e2238a.entry.js +2 -0
- package/dist/lime-elements/p-41e2238a.entry.js.map +1 -0
- package/dist/lime-elements/p-f6d8811f.entry.js +2 -0
- package/dist/lime-elements/p-f6d8811f.entry.js.map +1 -0
- package/dist/types/components/ai-avatar/ai-avatar.d.ts +1 -0
- package/dist/types/components/table/columns.d.ts +7 -11
- package/dist/types/components/table/table-selection.d.ts +4 -4
- package/dist/types/components/table/table.d.ts +15 -5
- package/dist/types/components.d.ts +16 -0
- package/package.json +3 -3
- package/dist/lime-elements/p-b906e1c5.entry.js +0 -2
- package/dist/lime-elements/p-b906e1c5.entry.js.map +0 -1
- package/dist/lime-elements/p-c869fbb2.entry.js +0 -2
- package/dist/lime-elements/p-c869fbb2.entry.js.map +0 -1
|
@@ -13,6 +13,7 @@ import { Languages } from './../date-picker/date.types';
|
|
|
13
13
|
* @private
|
|
14
14
|
* @exampleComponent limel-example-ai-avatar-basic
|
|
15
15
|
* @exampleComponent limel-example-ai-avatar-colors
|
|
16
|
+
* @exampleComponent limel-example-ai-avatar-white-background
|
|
16
17
|
*/
|
|
17
18
|
export declare class AiAvatar {
|
|
18
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Column, ColumnSorter } from './table.types';
|
|
2
|
-
import
|
|
2
|
+
import { CellComponent, ColumnCalc, ColumnDefinition, Formatter, SorterFromTable } from 'tabulator-tables';
|
|
3
3
|
import { ElementPool } from './element-pool';
|
|
4
4
|
export declare class ColumnDefinitionFactory {
|
|
5
5
|
private pool;
|
|
@@ -10,7 +10,7 @@ export declare class ColumnDefinitionFactory {
|
|
|
10
10
|
* @param column - config describing the column
|
|
11
11
|
* @returns Tabulator column
|
|
12
12
|
*/
|
|
13
|
-
create(column: Column<object>):
|
|
13
|
+
create(column: Column<object>): ColumnDefinition;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Formats the header of the column
|
|
@@ -26,7 +26,7 @@ export declare const formatHeader: (column: Column) => () => string | HTMLElemen
|
|
|
26
26
|
* @param pool - pool to get custom components from
|
|
27
27
|
* @returns Tabulator formatter
|
|
28
28
|
*/
|
|
29
|
-
export declare function createFormatter(column: Column, pool: ElementPool):
|
|
29
|
+
export declare function createFormatter(column: Column, pool: ElementPool): Formatter;
|
|
30
30
|
/**
|
|
31
31
|
* Format the value of a cell in the table
|
|
32
32
|
*
|
|
@@ -34,7 +34,7 @@ export declare function createFormatter(column: Column, pool: ElementPool): Tabu
|
|
|
34
34
|
* @param column - configuration for the current column
|
|
35
35
|
* @returns the formatted value
|
|
36
36
|
*/
|
|
37
|
-
export declare function formatCell(cell:
|
|
37
|
+
export declare function formatCell(cell: CellComponent, column: Column): string;
|
|
38
38
|
/**
|
|
39
39
|
* Create a custom component that renders a cell value
|
|
40
40
|
*
|
|
@@ -44,7 +44,7 @@ export declare function formatCell(cell: Tabulator.CellComponent, column: Column
|
|
|
44
44
|
* @param pool - pool to get custom components from
|
|
45
45
|
* @returns custom component that renders a value in the table
|
|
46
46
|
*/
|
|
47
|
-
export declare function createCustomComponent(cell:
|
|
47
|
+
export declare function createCustomComponent(cell: CellComponent, column: Column, value: string, pool: ElementPool): HTMLElement;
|
|
48
48
|
/**
|
|
49
49
|
* Set all properties for a custom element, including event listeners
|
|
50
50
|
*
|
|
@@ -52,20 +52,16 @@ export declare function createCustomComponent(cell: Tabulator.CellComponent, col
|
|
|
52
52
|
* @param props - object of properties and event listeners
|
|
53
53
|
*/
|
|
54
54
|
export declare function setElementProperties(element: HTMLElement, props: object): void;
|
|
55
|
-
interface TabulatorSorter extends Tabulator.Sorter {
|
|
56
|
-
field: string;
|
|
57
|
-
}
|
|
58
55
|
/**
|
|
59
56
|
* Create a column sorter from a tabulator sorter
|
|
60
57
|
*
|
|
61
58
|
* @param columns - all available columns in the table
|
|
62
59
|
* @returns function that creates a sorter from a tabulator sorter
|
|
63
60
|
*/
|
|
64
|
-
export declare const createColumnSorter: (columns: Column[]) => (sorter:
|
|
61
|
+
export declare const createColumnSorter: (columns: Column[]) => (sorter: SorterFromTable) => ColumnSorter;
|
|
65
62
|
/**
|
|
66
63
|
*
|
|
67
64
|
* @param column
|
|
68
65
|
*/
|
|
69
|
-
export declare function getColumnAggregator(column: Column):
|
|
70
|
-
export {};
|
|
66
|
+
export declare function getColumnAggregator(column: Column): ColumnCalc;
|
|
71
67
|
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import Tabulator from 'tabulator-tables';
|
|
2
|
+
import { Tabulator, ColumnDefinition as TabulatorColumnDefinition, CellComponent as TabulatorCellComponent } from 'tabulator-tables';
|
|
3
3
|
import { ElementPool } from './element-pool';
|
|
4
4
|
import { RowData } from './table.types';
|
|
5
5
|
/**
|
|
@@ -40,7 +40,7 @@ export declare class TableSelection {
|
|
|
40
40
|
* @param columnDefinitions - The column definition for the table
|
|
41
41
|
* @returns The column definitions with the checkbox column prepended to it
|
|
42
42
|
*/
|
|
43
|
-
getColumnDefinitions(columnDefinitions:
|
|
43
|
+
getColumnDefinitions(columnDefinitions: TabulatorColumnDefinition[]): TabulatorColumnDefinition[];
|
|
44
44
|
private getRowSelectorColumnDefinition;
|
|
45
45
|
private headerClick;
|
|
46
46
|
private getRowSelectorFormatter;
|
|
@@ -52,11 +52,11 @@ export declare class TableSelection {
|
|
|
52
52
|
* @param ev - The pointer event
|
|
53
53
|
* @param cell - The clicked cell component
|
|
54
54
|
*/
|
|
55
|
-
protected rowSelectorCellClick: (ev: PointerEvent, cell:
|
|
55
|
+
protected rowSelectorCellClick: (ev: PointerEvent, cell: TabulatorCellComponent) => void;
|
|
56
56
|
private getRowData;
|
|
57
57
|
private updateRowSelectors;
|
|
58
58
|
private updateRowSelector;
|
|
59
|
-
private getActiveRows;
|
|
59
|
+
private readonly getActiveRows;
|
|
60
60
|
private getRowByIndex;
|
|
61
61
|
}
|
|
62
62
|
//# sourceMappingURL=table-selection.d.ts.map
|
|
@@ -8,6 +8,7 @@ import { Languages } from '../date-picker/date.types';
|
|
|
8
8
|
* @exampleComponent limel-example-table-header-menu
|
|
9
9
|
* @exampleComponent limel-example-table-movable-columns
|
|
10
10
|
* @exampleComponent limel-example-table-sorting-disabled
|
|
11
|
+
* @exampleComponent limel-example-table-pagination
|
|
11
12
|
* @exampleComponent limel-example-table-local
|
|
12
13
|
* @exampleComponent limel-example-table-remote
|
|
13
14
|
* @exampleComponent limel-example-table-activate-row
|
|
@@ -106,6 +107,12 @@ export declare class Table {
|
|
|
106
107
|
* Defines the language for translations.
|
|
107
108
|
*/
|
|
108
109
|
language: Languages;
|
|
110
|
+
/**
|
|
111
|
+
* Location of the pagination controls.
|
|
112
|
+
* - `top`: Display pagination controls at the top of the table
|
|
113
|
+
* - `bottom`: Display pagination controls at the bottom of the table (default)
|
|
114
|
+
*/
|
|
115
|
+
paginationLocation: 'top' | 'bottom';
|
|
109
116
|
/**
|
|
110
117
|
* Emitted when `mode` is `remote` and the table is loading new data. The
|
|
111
118
|
* consumer is responsible for giving the table new data
|
|
@@ -132,7 +139,9 @@ export declare class Table {
|
|
|
132
139
|
private tabulator;
|
|
133
140
|
private pool;
|
|
134
141
|
private columnFactory;
|
|
135
|
-
private
|
|
142
|
+
private initialized;
|
|
143
|
+
private destroyed;
|
|
144
|
+
private resizeObserver;
|
|
136
145
|
private currentSorting;
|
|
137
146
|
private tableSelection;
|
|
138
147
|
private shouldSort;
|
|
@@ -159,6 +168,7 @@ export declare class Table {
|
|
|
159
168
|
private haveSameAggregateFields;
|
|
160
169
|
private init;
|
|
161
170
|
private initTabulatorComponent;
|
|
171
|
+
private createTabulator;
|
|
162
172
|
private initTableSelection;
|
|
163
173
|
private setSelection;
|
|
164
174
|
private updateMaxPage;
|
|
@@ -176,7 +186,7 @@ export declare class Table {
|
|
|
176
186
|
private handlePageLoaded;
|
|
177
187
|
private handleRenderComplete;
|
|
178
188
|
private onClickRow;
|
|
179
|
-
private getActiveRows;
|
|
189
|
+
private readonly getActiveRows;
|
|
180
190
|
private getActiveRowsData;
|
|
181
191
|
private selectAllOnChange;
|
|
182
192
|
private formatRows;
|
|
@@ -184,9 +194,9 @@ export declare class Table {
|
|
|
184
194
|
private isActiveRow;
|
|
185
195
|
private calculatePageCount;
|
|
186
196
|
private hasAggregation;
|
|
187
|
-
private getColumnOptions;
|
|
188
|
-
private handleMoveColumn;
|
|
189
|
-
private findColumn;
|
|
197
|
+
private readonly getColumnOptions;
|
|
198
|
+
private readonly handleMoveColumn;
|
|
199
|
+
private readonly findColumn;
|
|
190
200
|
render(): any;
|
|
191
201
|
private renderSelectAll;
|
|
192
202
|
private renderEmptyMessage;
|
|
@@ -202,6 +202,7 @@ export namespace Components {
|
|
|
202
202
|
* @private
|
|
203
203
|
* @exampleComponent limel-example-ai-avatar-basic
|
|
204
204
|
* @exampleComponent limel-example-ai-avatar-colors
|
|
205
|
+
* @exampleComponent limel-example-ai-avatar-white-background
|
|
205
206
|
*/
|
|
206
207
|
interface LimelAiAvatar {
|
|
207
208
|
/**
|
|
@@ -3129,6 +3130,7 @@ export namespace Components {
|
|
|
3129
3130
|
* @exampleComponent limel-example-table-header-menu
|
|
3130
3131
|
* @exampleComponent limel-example-table-movable-columns
|
|
3131
3132
|
* @exampleComponent limel-example-table-sorting-disabled
|
|
3133
|
+
* @exampleComponent limel-example-table-pagination
|
|
3132
3134
|
* @exampleComponent limel-example-table-local
|
|
3133
3135
|
* @exampleComponent limel-example-table-remote
|
|
3134
3136
|
* @exampleComponent limel-example-table-activate-row
|
|
@@ -3189,6 +3191,10 @@ export namespace Components {
|
|
|
3189
3191
|
* Number of rows per page
|
|
3190
3192
|
*/
|
|
3191
3193
|
"pageSize": number;
|
|
3194
|
+
/**
|
|
3195
|
+
* Location of the pagination controls. - `top`: Display pagination controls at the top of the table - `bottom`: Display pagination controls at the bottom of the table (default)
|
|
3196
|
+
*/
|
|
3197
|
+
"paginationLocation": 'top' | 'bottom';
|
|
3192
3198
|
/**
|
|
3193
3199
|
* Enables row selection
|
|
3194
3200
|
*/
|
|
@@ -3655,6 +3661,7 @@ declare global {
|
|
|
3655
3661
|
* @private
|
|
3656
3662
|
* @exampleComponent limel-example-ai-avatar-basic
|
|
3657
3663
|
* @exampleComponent limel-example-ai-avatar-colors
|
|
3664
|
+
* @exampleComponent limel-example-ai-avatar-white-background
|
|
3658
3665
|
*/
|
|
3659
3666
|
interface HTMLLimelAiAvatarElement extends Components.LimelAiAvatar, HTMLStencilElement {
|
|
3660
3667
|
}
|
|
@@ -5102,6 +5109,7 @@ declare global {
|
|
|
5102
5109
|
* @exampleComponent limel-example-table-header-menu
|
|
5103
5110
|
* @exampleComponent limel-example-table-movable-columns
|
|
5104
5111
|
* @exampleComponent limel-example-table-sorting-disabled
|
|
5112
|
+
* @exampleComponent limel-example-table-pagination
|
|
5105
5113
|
* @exampleComponent limel-example-table-local
|
|
5106
5114
|
* @exampleComponent limel-example-table-remote
|
|
5107
5115
|
* @exampleComponent limel-example-table-activate-row
|
|
@@ -5418,6 +5426,7 @@ declare namespace LocalJSX {
|
|
|
5418
5426
|
* @private
|
|
5419
5427
|
* @exampleComponent limel-example-ai-avatar-basic
|
|
5420
5428
|
* @exampleComponent limel-example-ai-avatar-colors
|
|
5429
|
+
* @exampleComponent limel-example-ai-avatar-white-background
|
|
5421
5430
|
*/
|
|
5422
5431
|
interface LimelAiAvatar {
|
|
5423
5432
|
/**
|
|
@@ -8591,6 +8600,7 @@ declare namespace LocalJSX {
|
|
|
8591
8600
|
* @exampleComponent limel-example-table-header-menu
|
|
8592
8601
|
* @exampleComponent limel-example-table-movable-columns
|
|
8593
8602
|
* @exampleComponent limel-example-table-sorting-disabled
|
|
8603
|
+
* @exampleComponent limel-example-table-pagination
|
|
8594
8604
|
* @exampleComponent limel-example-table-local
|
|
8595
8605
|
* @exampleComponent limel-example-table-remote
|
|
8596
8606
|
* @exampleComponent limel-example-table-activate-row
|
|
@@ -8679,6 +8689,10 @@ declare namespace LocalJSX {
|
|
|
8679
8689
|
* Number of rows per page
|
|
8680
8690
|
*/
|
|
8681
8691
|
"pageSize"?: number;
|
|
8692
|
+
/**
|
|
8693
|
+
* Location of the pagination controls. - `top`: Display pagination controls at the top of the table - `bottom`: Display pagination controls at the bottom of the table (default)
|
|
8694
|
+
*/
|
|
8695
|
+
"paginationLocation"?: 'top' | 'bottom';
|
|
8682
8696
|
/**
|
|
8683
8697
|
* Enables row selection
|
|
8684
8698
|
*/
|
|
@@ -9076,6 +9090,7 @@ declare module "@stencil/core" {
|
|
|
9076
9090
|
* @private
|
|
9077
9091
|
* @exampleComponent limel-example-ai-avatar-basic
|
|
9078
9092
|
* @exampleComponent limel-example-ai-avatar-colors
|
|
9093
|
+
* @exampleComponent limel-example-ai-avatar-white-background
|
|
9079
9094
|
*/
|
|
9080
9095
|
"limel-ai-avatar": LocalJSX.LimelAiAvatar & JSXBase.HTMLAttributes<HTMLLimelAiAvatarElement>;
|
|
9081
9096
|
/**
|
|
@@ -10183,6 +10198,7 @@ declare module "@stencil/core" {
|
|
|
10183
10198
|
* @exampleComponent limel-example-table-header-menu
|
|
10184
10199
|
* @exampleComponent limel-example-table-movable-columns
|
|
10185
10200
|
* @exampleComponent limel-example-table-sorting-disabled
|
|
10201
|
+
* @exampleComponent limel-example-table-pagination
|
|
10186
10202
|
* @exampleComponent limel-example-table-local
|
|
10187
10203
|
* @exampleComponent limel-example-table-remote
|
|
10188
10204
|
* @exampleComponent limel-example-table-activate-row
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.38.1-dev.2",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/lodash-es": "^4.17.12",
|
|
52
52
|
"@types/react": "^19.1.10",
|
|
53
53
|
"@types/react-dom": "^19.1.7",
|
|
54
|
-
"@types/tabulator-tables": "^
|
|
54
|
+
"@types/tabulator-tables": "^6.2.4",
|
|
55
55
|
"codemirror": "^5.65.9",
|
|
56
56
|
"cross-env": "^7.0.3",
|
|
57
57
|
"dayjs": "^1.11.13",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"shelljs": "0.10.0",
|
|
91
91
|
"shx": "^0.4.0",
|
|
92
92
|
"style-to-object": "^1.0.9",
|
|
93
|
-
"tabulator-tables": "^
|
|
93
|
+
"tabulator-tables": "^6.3.1",
|
|
94
94
|
"typescript": "^4.9.5",
|
|
95
95
|
"unified": "^11.0.5",
|
|
96
96
|
"unist-util-visit": "^5.0.0"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as r,H as t}from"./p-bdfa539c.js";import{t as e}from"./p-df36e1ae.js";const i=':host(limel-ai-avatar){display:flex;justify-content:center;align-self:center;position:relative;aspect-ratio:1;max-width:10rem;max-height:8rem;min-width:1.75rem;min-height:1.75rem;border-radius:0.5rem}*{box-sizing:border-box}:host(limel-ai-avatar[is-thinking]:not([is-thinking=false])){--ai-avatar-animation-play-state:running;--ai-avatar-orbitals-opacity:0.6;--ai-avatar-orbitals-animation-play-state:running}.core,.orbitals{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:50%}.core{opacity:0.3;width:70%;animation:breathe 3s ease infinite var(--ai-avatar-animation-play-state, paused);background-color:rgb(var(--color-glaucous-darker), 0.6);mix-blend-mode:plus-lighter}.orbitals{mix-blend-mode:plus-lighter;width:clamp(0.375rem, 20%, 3.5rem);animation:rotate 5s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);transition:opacity 0.2s ease;opacity:var(--ai-avatar-orbitals-opacity, 0)}.orbitals:after,.orbitals:before{content:"";display:block;position:absolute;inset:0;margin:auto;width:clamp(0.125rem, 50%, 0.75rem);aspect-ratio:1;border-radius:50%;background-color:rgb(var(--color-glaucous-lighter))}.orbitals:before{animation:orbit 1s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.6;transform-origin:-220% 0;margin-right:-70%}.orbitals:after{animation:orbit 2s linear infinite var(--ai-avatar-orbitals-animation-play-state, paused);opacity:0.8;scale:0.7;transform-origin:0% -250%;margin-bottom:-70%}@keyframes orbit{0%{transform:rotateZ(0deg) translate3d(0, 0, 0)}100%{transform:rotateZ(360deg) translate3d(0, 0, 0)}}@keyframes breathe{1%,100%{transform:scale(1)}50%{transform:scale(0.86)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}svg{position:absolute;margin:auto;mix-blend-mode:screen;animation-iteration-count:infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused)}.red{rotate:20deg;color:rgb(var(--color-red-default));animation-name:rotate, scale-circle-one;animation-duration:5s}.green{rotate:36deg;color:rgb(var(--color-green-default));animation-name:rotate, scale-circle-two;animation-duration:5.5s}.blue{rotate:100deg;color:rgb(var(--color-blue-default));animation-name:rotate, scale-circle-three;animation-duration:4.5s}.orange{rotate:165deg;color:rgb(var(--color-orange-default));animation-name:rotate, scale-circle-four;animation-duration:6.5s}@keyframes scale-circle-one{0%,100%{transform:scaleX(1) scaleY(0.8)}25%,75%{transform:scaleX(0.8) scaleY(0.9)}50%{transform:scaleX(1) scaleY(0.7)}}@keyframes scale-circle-two{0%,100%{transform:scaleX(0.8) scaleY(1)}25%,75%{transform:scaleX(0.9) scaleY(0.75)}50%{transform:scaleX(0.72) scaleY(1)}}@keyframes scale-circle-three{0%,100%{transform:scaleX(0.9) scaleY(0.8)}50%{transform:scaleX(0.75) scaleY(0.9)}}@keyframes scale-circle-four{0%,100%{transform:scaleX(0.8) scaleY(0.95)}25%,75%{transform:scaleX(0.95) scaleY(0.75)}50%{transform:scaleX(0.75) scaleY(0.95)}}';const o=class{constructor(r){a(this,r);this.getTranslation=a=>e.get(a,this.language);this.isThinking=false;this.language=document.documentElement.lang}render(){return r(t,{role:"img","aria-label":this.getHostAriaLabel()},this.renderCircle("red"),this.renderCircle("green"),this.renderCircle("blue"),this.renderCircle("orange"),r("div",{class:"core"}),r("div",{class:"orbitals"}))}getHostAriaLabel(){let a="";if(this.isThinking){a=` (${this.getTranslation("ai-avatar.thinking")})`}return`${this.getTranslation("ai-avatar.label")}${a}`}renderCircle(a){return r("svg",{class:a,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation"},r("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"currentColor","stroke-width":"6"}))}};o.style=i;export{o as limel_ai_avatar};
|
|
2
|
-
//# sourceMappingURL=p-b906e1c5.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["aiAvatarCss","AiAvatar","this","getTranslation","key","translate","get","language","document","documentElement","lang","render","h","Host","role","getHostAriaLabel","renderCircle","class","thinkingText","isThinking","className","viewBox","xmlns","cx","cy","r","fill","stroke"],"sources":["./src/components/ai-avatar/ai-avatar.scss?tag=limel-ai-avatar&encapsulation=shadow","./src/components/ai-avatar/ai-avatar.tsx"],"sourcesContent":["/**\n* @prop --ai-avatar-animation-play-state: Set it to `running` to start the animation.\n*/\n:host(limel-ai-avatar) {\n display: flex;\n justify-content: center;\n align-self: center;\n position: relative;\n\n aspect-ratio: 1;\n max-width: 10rem;\n max-height: 8rem;\n min-width: 1.75rem;\n min-height: 1.75rem;\n\n border-radius: 0.5rem;\n}\n\n* {\n box-sizing: border-box;\n}\n\n:host(limel-ai-avatar[is-thinking]:not([is-thinking='false'])) {\n --ai-avatar-animation-play-state: running;\n --ai-avatar-orbitals-opacity: 0.6;\n --ai-avatar-orbitals-animation-play-state: running;\n}\n\n.core,\n.orbitals {\n position: absolute;\n inset: 0;\n margin: auto;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n aspect-ratio: 1;\n\n border-radius: 50%;\n}\n\n.core {\n opacity: 0.3;\n width: 70%;\n animation: breathe 3s ease infinite\n var(--ai-avatar-animation-play-state, paused);\n\n background-color: rgb(var(--color-glaucous-darker), 0.6);\n mix-blend-mode: plus-lighter;\n}\n\n.orbitals {\n mix-blend-mode: plus-lighter;\n width: clamp(0.375rem, 20%, 3.5rem);\n\n animation: rotate 5s linear infinite\n var(--ai-avatar-orbitals-animation-play-state, paused);\n\n transition: opacity 0.2s ease;\n opacity: var(--ai-avatar-orbitals-opacity, 0);\n\n &:after,\n &:before {\n content: '';\n display: block;\n position: absolute;\n inset: 0;\n margin: auto;\n\n width: clamp(0.125rem, 50%, 0.75rem);\n aspect-ratio: 1;\n border-radius: 50%;\n background-color: rgb(var(--color-glaucous-lighter));\n }\n &:before {\n animation: orbit 1s linear infinite\n var(--ai-avatar-orbitals-animation-play-state, paused);\n\n opacity: 0.6;\n transform-origin: -220% 0;\n margin-right: -70%;\n }\n &:after {\n animation: orbit 2s linear infinite\n var(--ai-avatar-orbitals-animation-play-state, paused);\n\n opacity: 0.8;\n scale: 0.7;\n transform-origin: 0% -250%;\n margin-bottom: -70%;\n }\n}\n\n@keyframes orbit {\n 0% {\n transform: rotateZ(0deg) translate3d(0, 0, 0);\n }\n 100% {\n transform: rotateZ(360deg) translate3d(0, 0, 0);\n }\n}\n\n@keyframes breathe {\n 1%,\n 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(0.86);\n }\n}\n\n@keyframes rotate {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\nsvg {\n position: absolute;\n margin: auto;\n mix-blend-mode: screen;\n\n animation-iteration-count: infinite;\n animation-play-state: var(--ai-avatar-animation-play-state, paused);\n}\n\n.red {\n rotate: 20deg;\n color: rgb(var(--color-red-default));\n animation-name: rotate, scale-circle-one;\n animation-duration: 5s;\n}\n\n.green {\n rotate: 36deg;\n color: rgb(var(--color-green-default));\n animation-name: rotate, scale-circle-two;\n animation-duration: 5.5s;\n}\n\n.blue {\n rotate: 100deg;\n color: rgb(var(--color-blue-default));\n animation-name: rotate, scale-circle-three;\n animation-duration: 4.5s;\n}\n\n.orange {\n rotate: 165deg;\n color: rgb(var(--color-orange-default));\n animation-name: rotate, scale-circle-four;\n animation-duration: 6.5s;\n}\n\n@keyframes scale-circle-one {\n 0%,\n 100% {\n transform: scaleX(1) scaleY(0.8);\n }\n 25%,\n 75% {\n transform: scaleX(0.8) scaleY(0.9);\n }\n 50% {\n transform: scaleX(1) scaleY(0.7);\n }\n}\n\n@keyframes scale-circle-two {\n 0%,\n 100% {\n transform: scaleX(0.8) scaleY(1);\n }\n 25%,\n 75% {\n transform: scaleX(0.9) scaleY(0.75);\n }\n 50% {\n transform: scaleX(0.72) scaleY(1);\n }\n}\n\n@keyframes scale-circle-three {\n 0%,\n 100% {\n transform: scaleX(0.9) scaleY(0.8);\n }\n 50% {\n transform: scaleX(0.75) scaleY(0.9);\n }\n}\n\n@keyframes scale-circle-four {\n 0%,\n 100% {\n transform: scaleX(0.8) scaleY(0.95);\n }\n 25%,\n 75% {\n transform: scaleX(0.95) scaleY(0.75);\n }\n 50% {\n transform: scaleX(0.75) scaleY(0.95);\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Languages } from './../date-picker/date.types';\nimport translate from './../../global/translations';\n\n/**\n * This component displays an avatar, representing Lime AI assistants.\n *\n * :::warning\n * This is a private component used internally in the Lime's various applications,\n * which is the reason for having it in Lime Elements —to ease the distribution\n * of the component across all our apps.\n *\n * 3rd party developers are not allowed use this component directly.\n * :::\n *\n * @private\n * @exampleComponent limel-example-ai-avatar-basic\n * @exampleComponent limel-example-ai-avatar-colors\n */\n@Component({\n tag: 'limel-ai-avatar',\n shadow: true,\n styleUrl: 'ai-avatar.scss',\n})\nexport class AiAvatar {\n /**\n * Set to `true` to trigger animations that indicate that the AI is\n * \"thinking\" or processing something.\n */\n @Prop({ reflect: true })\n public isThinking = false;\n\n /**\n * Defines the language for translations.\n */\n @Prop({ reflect: true })\n public language: Languages = document.documentElement.lang as Languages;\n\n public render() {\n return (\n <Host role=\"img\" aria-label={this.getHostAriaLabel()}>\n {this.renderCircle('red')}\n {this.renderCircle('green')}\n {this.renderCircle('blue')}\n {this.renderCircle('orange')}\n <div class=\"core\" />\n <div class=\"orbitals\" />\n </Host>\n );\n }\n\n private getHostAriaLabel(): string {\n let thinkingText = '';\n if (this.isThinking) {\n thinkingText = ` (${this.getTranslation('ai-avatar.thinking')})`;\n }\n\n return `${this.getTranslation('ai-avatar.label')}${thinkingText}`;\n }\n\n private renderCircle(className: string) {\n return (\n <svg\n class={className}\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"presentation\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"6\"\n />\n </svg>\n );\n }\n\n private getTranslation = (key: string) => {\n return translate.get(key, this.language);\n };\n}\n"],"mappings":"sFAAA,MAAMA,EAAc,q8F,MCwBPC,EAAQ,M,yBAwDTC,KAAAC,eAAkBC,GACfC,EAAUC,IAAIF,EAAKF,KAAKK,U,gBAnDf,M,cAMSC,SAASC,gBAAgBC,I,CAE/CC,SACH,OACIC,EAACC,EAAI,CAACC,KAAK,MAAK,aAAaZ,KAAKa,oBAC7Bb,KAAKc,aAAa,OAClBd,KAAKc,aAAa,SAClBd,KAAKc,aAAa,QAClBd,KAAKc,aAAa,UACnBJ,EAAA,OAAKK,MAAM,SACXL,EAAA,OAAKK,MAAM,a,CAKfF,mBACJ,IAAIG,EAAe,GACnB,GAAIhB,KAAKiB,WAAY,CACjBD,EAAe,KAAKhB,KAAKC,eAAe,wB,CAG5C,MAAO,GAAGD,KAAKC,eAAe,qBAAqBe,G,CAG/CF,aAAaI,GACjB,OACIR,EAAA,OACIK,MAAOG,EACPC,QAAQ,cACRC,MAAM,6BACNR,KAAK,gBAELF,EAAA,UACIW,GAAG,KACHC,GAAG,KACHC,EAAE,KACFC,KAAK,OACLC,OAAO,eAAc,eACR,M"}
|