@limetech/lime-elements 38.9.5 → 38.10.0
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 +18 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +37 -0
- package/dist/cjs/limel-ai-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/{limel-badge_3.cjs.entry.js → limel-badge_2.cjs.entry.js} +1 -30
- package/dist/cjs/limel-badge_2.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/{limel-portal.cjs.entry.js → limel-portal_2.cjs.entry.js} +30 -1
- package/dist/cjs/limel-portal_2.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +21 -4
- package/dist/cjs/limel-tab-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translations-15b2de28.js → translations-1d376e48.js} +17 -1
- package/dist/cjs/translations-1d376e48.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ai-avatar/ai-avatar.css +183 -0
- package/dist/collection/components/ai-avatar/ai-avatar.js +97 -0
- package/dist/collection/components/ai-avatar/ai-avatar.js.map +1 -0
- package/dist/collection/components/tab-bar/tab-bar.css +129 -12
- package/dist/collection/components/tab-bar/tab-bar.js +20 -3
- package/dist/collection/components/tab-bar/tab-bar.js.map +1 -1
- package/dist/collection/translations/da.js +2 -0
- package/dist/collection/translations/da.js.map +1 -1
- package/dist/collection/translations/de.js +2 -0
- package/dist/collection/translations/de.js.map +1 -1
- package/dist/collection/translations/en.js +2 -0
- package/dist/collection/translations/en.js.map +1 -1
- package/dist/collection/translations/fi.js +2 -0
- package/dist/collection/translations/fi.js.map +1 -1
- package/dist/collection/translations/fr.js +2 -0
- package/dist/collection/translations/fr.js.map +1 -1
- package/dist/collection/translations/nl.js +2 -0
- package/dist/collection/translations/nl.js.map +1 -1
- package/dist/collection/translations/no.js +2 -0
- package/dist/collection/translations/no.js.map +1 -1
- package/dist/collection/translations/sv.js +2 -0
- package/dist/collection/translations/sv.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar_2.entry.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js +33 -0
- package/dist/esm/limel-ai-avatar.entry.js.map +1 -0
- package/dist/esm/{limel-badge_3.entry.js → limel-badge_2.entry.js} +2 -30
- package/dist/esm/limel-badge_2.entry.js.map +1 -0
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-file-viewer.entry.js +1 -1
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-linear-progress.entry.js +1 -1
- package/dist/esm/{limel-portal.entry.js → limel-portal_2.entry.js} +30 -2
- package/dist/esm/limel-portal_2.entry.js.map +1 -0
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +21 -4
- package/dist/esm/limel-tab-bar.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translations-e90e82a6.js → translations-489f20b3.js} +17 -1
- package/dist/esm/translations-489f20b3.js.map +1 -0
- 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-aabeba98.entry.js → p-0a74386f.entry.js} +2 -2
- package/dist/lime-elements/p-0a74386f.entry.js.map +1 -0
- package/dist/lime-elements/{p-e9d11321.entry.js → p-23e6cba5.entry.js} +2 -2
- package/dist/lime-elements/{p-e655e6a1.entry.js → p-2f0863da.entry.js} +2 -2
- package/dist/lime-elements/{p-54ff8dcb.entry.js → p-3a87b175.entry.js} +2 -2
- package/dist/lime-elements/{p-3cd846eb.entry.js → p-62f2d7fe.entry.js} +2 -2
- package/dist/lime-elements/{p-28e5fef5.entry.js → p-635d0886.entry.js} +2 -2
- package/dist/lime-elements/{p-14cbd0d0.entry.js → p-7006fafe.entry.js} +2 -2
- package/dist/lime-elements/{p-74a15b9e.entry.js → p-a0a02fb7.entry.js} +2 -2
- package/dist/lime-elements/p-a0a02fb7.entry.js.map +1 -0
- package/dist/lime-elements/{p-26e06ef4.entry.js → p-b1f26714.entry.js} +2 -2
- package/dist/lime-elements/p-b7c52564.entry.js +2 -0
- package/dist/lime-elements/p-b7c52564.entry.js.map +1 -0
- package/dist/lime-elements/{p-0960ca61.entry.js → p-d16aef41.entry.js} +5 -5
- package/dist/lime-elements/p-d16aef41.entry.js.map +1 -0
- package/dist/lime-elements/{p-5f39d366.entry.js → p-dae7344a.entry.js} +2 -2
- package/dist/lime-elements/{p-13680113.entry.js → p-ec079338.entry.js} +2 -2
- package/dist/lime-elements/{p-bd278c51.entry.js → p-f4760cdd.entry.js} +2 -2
- package/dist/lime-elements/p-f753013d.js +2 -0
- package/dist/lime-elements/p-f753013d.js.map +1 -0
- package/dist/types/components/ai-avatar/ai-avatar.d.ts +32 -0
- package/dist/types/components/tab-bar/tab-bar.d.ts +6 -0
- package/dist/types/components.d.ts +77 -0
- package/dist/types/translations/da.d.ts +2 -0
- package/dist/types/translations/de.d.ts +2 -0
- package/dist/types/translations/en.d.ts +2 -0
- package/dist/types/translations/fi.d.ts +2 -0
- package/dist/types/translations/fr.d.ts +2 -0
- package/dist/types/translations/nl.d.ts +2 -0
- package/dist/types/translations/no.d.ts +2 -0
- package/dist/types/translations/sv.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/limel-badge_3.cjs.entry.js.map +0 -1
- package/dist/cjs/limel-portal.cjs.entry.js.map +0 -1
- package/dist/cjs/translations-15b2de28.js.map +0 -1
- package/dist/esm/limel-badge_3.entry.js.map +0 -1
- package/dist/esm/limel-portal.entry.js.map +0 -1
- package/dist/esm/translations-e90e82a6.js.map +0 -1
- package/dist/lime-elements/p-0960ca61.entry.js.map +0 -1
- package/dist/lime-elements/p-74a15b9e.entry.js.map +0 -1
- package/dist/lime-elements/p-aabeba98.entry.js.map +0 -1
- package/dist/lime-elements/p-bf55e816.js +0 -2
- package/dist/lime-elements/p-bf55e816.js.map +0 -1
- /package/dist/lime-elements/{p-e9d11321.entry.js.map → p-23e6cba5.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-e655e6a1.entry.js.map → p-2f0863da.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-54ff8dcb.entry.js.map → p-3a87b175.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-3cd846eb.entry.js.map → p-62f2d7fe.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-28e5fef5.entry.js.map → p-635d0886.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-14cbd0d0.entry.js.map → p-7006fafe.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-26e06ef4.entry.js.map → p-b1f26714.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-5f39d366.entry.js.map → p-dae7344a.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-13680113.entry.js.map → p-ec079338.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-bd278c51.entry.js.map → p-f4760cdd.entry.js.map} +0 -0
|
@@ -187,6 +187,28 @@ export namespace Components {
|
|
|
187
187
|
*/
|
|
188
188
|
"overFlowIcon"?: Icon;
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* This component displays an avatar, representing Lime AI assistants.
|
|
192
|
+
* :::warning
|
|
193
|
+
* This is a private component used internally in the Lime's various applications,
|
|
194
|
+
* which is the reason for having it in Lime Elements —to ease the distribution
|
|
195
|
+
* of the component across all our apps.
|
|
196
|
+
* 3rd party developers are not allowed use this component directly.
|
|
197
|
+
* :::
|
|
198
|
+
* @private
|
|
199
|
+
* @exampleComponent limel-example-ai-avatar-basic
|
|
200
|
+
* @exampleComponent limel-example-ai-avatar-colors
|
|
201
|
+
*/
|
|
202
|
+
interface LimelAiAvatar {
|
|
203
|
+
/**
|
|
204
|
+
* Set to `true` to trigger animations that indicate that the AI is "thinking" or processing something.
|
|
205
|
+
*/
|
|
206
|
+
"isThinking": boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Defines the language for translations.
|
|
209
|
+
*/
|
|
210
|
+
"language": Languages;
|
|
211
|
+
}
|
|
190
212
|
/**
|
|
191
213
|
* The Badge component can be used to display a notification badge,
|
|
192
214
|
* optionally with a number or a text label.
|
|
@@ -3213,6 +3235,24 @@ declare global {
|
|
|
3213
3235
|
prototype: HTMLLimelActionBarOverflowMenuElement;
|
|
3214
3236
|
new (): HTMLLimelActionBarOverflowMenuElement;
|
|
3215
3237
|
};
|
|
3238
|
+
/**
|
|
3239
|
+
* This component displays an avatar, representing Lime AI assistants.
|
|
3240
|
+
* :::warning
|
|
3241
|
+
* This is a private component used internally in the Lime's various applications,
|
|
3242
|
+
* which is the reason for having it in Lime Elements —to ease the distribution
|
|
3243
|
+
* of the component across all our apps.
|
|
3244
|
+
* 3rd party developers are not allowed use this component directly.
|
|
3245
|
+
* :::
|
|
3246
|
+
* @private
|
|
3247
|
+
* @exampleComponent limel-example-ai-avatar-basic
|
|
3248
|
+
* @exampleComponent limel-example-ai-avatar-colors
|
|
3249
|
+
*/
|
|
3250
|
+
interface HTMLLimelAiAvatarElement extends Components.LimelAiAvatar, HTMLStencilElement {
|
|
3251
|
+
}
|
|
3252
|
+
var HTMLLimelAiAvatarElement: {
|
|
3253
|
+
prototype: HTMLLimelAiAvatarElement;
|
|
3254
|
+
new (): HTMLLimelAiAvatarElement;
|
|
3255
|
+
};
|
|
3216
3256
|
/**
|
|
3217
3257
|
* The Badge component can be used to display a notification badge,
|
|
3218
3258
|
* optionally with a number or a text label.
|
|
@@ -4626,6 +4666,7 @@ declare global {
|
|
|
4626
4666
|
"limel-action-bar": HTMLLimelActionBarElement;
|
|
4627
4667
|
"limel-action-bar-item": HTMLLimelActionBarItemElement;
|
|
4628
4668
|
"limel-action-bar-overflow-menu": HTMLLimelActionBarOverflowMenuElement;
|
|
4669
|
+
"limel-ai-avatar": HTMLLimelAiAvatarElement;
|
|
4629
4670
|
"limel-badge": HTMLLimelBadgeElement;
|
|
4630
4671
|
"limel-banner": HTMLLimelBannerElement;
|
|
4631
4672
|
"limel-breadcrumbs": HTMLLimelBreadcrumbsElement;
|
|
@@ -4807,6 +4848,28 @@ declare namespace LocalJSX {
|
|
|
4807
4848
|
*/
|
|
4808
4849
|
"overFlowIcon"?: Icon;
|
|
4809
4850
|
}
|
|
4851
|
+
/**
|
|
4852
|
+
* This component displays an avatar, representing Lime AI assistants.
|
|
4853
|
+
* :::warning
|
|
4854
|
+
* This is a private component used internally in the Lime's various applications,
|
|
4855
|
+
* which is the reason for having it in Lime Elements —to ease the distribution
|
|
4856
|
+
* of the component across all our apps.
|
|
4857
|
+
* 3rd party developers are not allowed use this component directly.
|
|
4858
|
+
* :::
|
|
4859
|
+
* @private
|
|
4860
|
+
* @exampleComponent limel-example-ai-avatar-basic
|
|
4861
|
+
* @exampleComponent limel-example-ai-avatar-colors
|
|
4862
|
+
*/
|
|
4863
|
+
interface LimelAiAvatar {
|
|
4864
|
+
/**
|
|
4865
|
+
* Set to `true` to trigger animations that indicate that the AI is "thinking" or processing something.
|
|
4866
|
+
*/
|
|
4867
|
+
"isThinking"?: boolean;
|
|
4868
|
+
/**
|
|
4869
|
+
* Defines the language for translations.
|
|
4870
|
+
*/
|
|
4871
|
+
"language"?: Languages;
|
|
4872
|
+
}
|
|
4810
4873
|
/**
|
|
4811
4874
|
* The Badge component can be used to display a notification badge,
|
|
4812
4875
|
* optionally with a number or a text label.
|
|
@@ -7897,6 +7960,7 @@ declare namespace LocalJSX {
|
|
|
7897
7960
|
"limel-action-bar": LimelActionBar;
|
|
7898
7961
|
"limel-action-bar-item": LimelActionBarItem;
|
|
7899
7962
|
"limel-action-bar-overflow-menu": LimelActionBarOverflowMenu;
|
|
7963
|
+
"limel-ai-avatar": LimelAiAvatar;
|
|
7900
7964
|
"limel-badge": LimelBadge;
|
|
7901
7965
|
"limel-banner": LimelBanner;
|
|
7902
7966
|
"limel-breadcrumbs": LimelBreadcrumbs;
|
|
@@ -8014,6 +8078,19 @@ declare module "@stencil/core" {
|
|
|
8014
8078
|
* @private
|
|
8015
8079
|
*/
|
|
8016
8080
|
"limel-action-bar-overflow-menu": LocalJSX.LimelActionBarOverflowMenu & JSXBase.HTMLAttributes<HTMLLimelActionBarOverflowMenuElement>;
|
|
8081
|
+
/**
|
|
8082
|
+
* This component displays an avatar, representing Lime AI assistants.
|
|
8083
|
+
* :::warning
|
|
8084
|
+
* This is a private component used internally in the Lime's various applications,
|
|
8085
|
+
* which is the reason for having it in Lime Elements —to ease the distribution
|
|
8086
|
+
* of the component across all our apps.
|
|
8087
|
+
* 3rd party developers are not allowed use this component directly.
|
|
8088
|
+
* :::
|
|
8089
|
+
* @private
|
|
8090
|
+
* @exampleComponent limel-example-ai-avatar-basic
|
|
8091
|
+
* @exampleComponent limel-example-ai-avatar-colors
|
|
8092
|
+
*/
|
|
8093
|
+
"limel-ai-avatar": LocalJSX.LimelAiAvatar & JSXBase.HTMLAttributes<HTMLLimelAiAvatarElement>;
|
|
8017
8094
|
/**
|
|
8018
8095
|
* The Badge component can be used to display a notification badge,
|
|
8019
8096
|
* optionally with a number or a text label.
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=da.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=de.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=en.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=fi.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=fr.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=nl.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.resize-handle': string;
|
|
44
44
|
'progress-bar': string;
|
|
45
45
|
'snackbar.dismiss': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=no.d.ts.map
|
|
@@ -43,6 +43,8 @@ declare const _default: {
|
|
|
43
43
|
'editor-image-view.success': string;
|
|
44
44
|
'editor-image-view.resize-handle': string;
|
|
45
45
|
'progress-bar': string;
|
|
46
|
+
'ai-avatar.label': string;
|
|
47
|
+
'ai-avatar.thinking': string;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
48
50
|
//# sourceMappingURL=sv.d.ts.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"limel-badge.limel-tooltip.limel-tooltip-content.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,g9DAAg9D;;MCgBp9D,KAAK;;;;;EAUP,MAAM;IACT,QACIA,QAACC,UAAI,IACD,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,EAC5C,KAAK,EAAE;QACH,iBAAiB,EAAE,IAAI,CAAC,YAAY,EAAE;OACzC,IAEDD,sBAAO,IAAI,CAAC,WAAW,EAAE,CAAQ,CAC9B,EACT;GACL;EAEO,WAAW;IACf,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,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;GACpE;;;;;AC1KL,MAAM,iBAAiB,GAAG,kkBAAkkB;;MCY/kB,cAAc;;;;;;;EAmBhB,MAAM;IACT,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,SAAS,EAAE;MACpC,gBAAgB;QACZ,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;KACpE;IAED,MAAM,KAAK,GAAQ,EAAE,CAAC;IACtB,IAAI,IAAI,CAAC,SAAS,EAAE;MAChB,KAAK,CAAC,KAAK,GAAG;QACV,6BAA6B,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI;OAC5D,CAAC;KACL;IAED,OAAO;MACHA,gCAAM,KAAK,EAAE,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,IAAM,KAAK,GAC7DA,iBAAK,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAO,EACrCA,iBAAK,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,WAAW,CAAO,CAC/C;KACV,CAAC;GACL;;;;;;;;","names":["h","Host","abbreviate","createRandomString"],"sources":["./src/components/badge/badge.scss?tag=limel-badge&encapsulation=shadow","./src/components/badge/badge.tsx","./src/components/tooltip/getOwnerElement.tsx","./src/components/tooltip/tooltipTimer.ts","./src/components/tooltip/tooltip.scss?tag=limel-tooltip&encapsulation=shadow","./src/components/tooltip/tooltip.tsx","./src/components/tooltip/tooltip-content.scss?tag=limel-tooltip-content&encapsulation=shadow","./src/components/tooltip/tooltip-content.tsx"],"sourcesContent":["@use '../../style/functions';\n@use '../../style/internal/lime-theme';\n@use '../../style/mixins';\n\n/**\n * @prop --badge-background-color: badge background color\n * @prop --badge-text-color: badge text color\n * @prop --badge-max-width: maximum width of the badge, before its text gets truncated\n */\n\n:host([hidden]) {\n display: none;\n}\n\n:host(limel-badge) {\n --limel-min-badge-size: 1rem;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n min-height: var(--limel-min-badge-size);\n min-width: var(--limel-min-badge-size);\n}\n\nspan {\n cursor: default;\n box-sizing: border-box;\n\n @include mixins.truncate-text;\n text-align: center;\n font-size: functions.pxToRem(11);\n line-height: var(--limel-min-badge-size);\n\n color: var(--badge-text-color, rgb(var(--contrast-1200)));\n\n border-radius: var(--limel-min-badge-size);\n max-height: var(--limel-min-badge-size);\n min-width: 0.5rem;\n min-height: 0.5rem;\n\n background-color: var(--badge-background-color, rgb(var(--contrast-500)));\n\n &:not(:empty) {\n min-width: var(\n --limel-min-badge-size\n ); // ensures that a badge with only one character rendered as perfect circle\n max-width: var(--badge-max-width, 2.75rem);\n padding: 0 functions.pxToRem(4.5);\n }\n}\n\n:host(.has-large-label) {\n span {\n cursor: help;\n }\n}\n","import { Component, Prop, h, Host } from '@stencil/core';\nimport { abbreviate } from './format';\n\n/**\n * The Badge component can be used to display a notification badge,\n * optionally with a number or a text label.\n *\n * @exampleComponent limel-example-badge\n * @exampleComponent limel-example-badge-number\n * @exampleComponent limel-example-badge-string\n */\n@Component({\n tag: 'limel-badge',\n styleUrl: 'badge.scss',\n shadow: true,\n})\nexport class Badge {\n /**\n * Label to display in the badge.\n * Numeric labels larger than 999 will be rounded and abbreviated.\n * String labels get truncated if their length is longer than\n * six characters.\n */\n @Prop({ reflect: true })\n public label?: number | string;\n\n public render() {\n return (\n <Host\n title={this.labelIsLarge() ? this.label : ''}\n class={{\n 'has-large-label': this.labelIsLarge(),\n }}\n >\n <span>{this.renderLabel()}</span>\n </Host>\n );\n }\n\n private renderLabel() {\n if (typeof this.label === 'number') {\n return abbreviate(this.label);\n }\n\n return this.label;\n }\n\n private labelIsLarge() {\n const largeNumericLabel = 999;\n const largeStringLabel = 6;\n if (\n (typeof this.label === 'number' &&\n this.label > largeNumericLabel) ||\n (typeof this.label === 'string' &&\n this.label.length > largeStringLabel)\n ) {\n return true;\n }\n }\n}\n","export function getOwnerElement(\n id: string,\n startingPoint: Node,\n): HTMLElement | undefined {\n let element: Node = startingPoint;\n\n do {\n element = element.parentNode;\n } while (\n element &&\n element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE &&\n element.nodeType !== Node.DOCUMENT_NODE\n );\n\n return (element as ShadowRoot)?.getElementById(id);\n}\n","const DEFAULT_DELAY_FOR_SHOWING = 500;\n\nexport class TooltipTimer {\n private timerHandle: number | null = null;\n private showCallback: Function;\n private hideCallback: Function;\n private delayForShowing: number;\n\n constructor(\n showCallback: Function,\n hideCallback: Function,\n delayForShowing: number = DEFAULT_DELAY_FOR_SHOWING,\n ) {\n this.showCallback = showCallback;\n this.hideCallback = hideCallback;\n this.delayForShowing = delayForShowing;\n }\n\n showAfterDelay(): void {\n if (!this.timerHandle) {\n this.timerHandle = setTimeout(\n this.showCallback,\n this.delayForShowing,\n );\n }\n }\n\n hide(): void {\n clearTimeout(this.timerHandle);\n this.timerHandle = null;\n this.hideCallback();\n }\n}\n","/**\n * @prop --tooltip-z-index: z-index of the tooltip.\n */\n\n:host(limel-tooltip) {\n // Absolutely positioning ensures that this invisible element\n // does not occupy visible space in the UI.\n // Without this, `limel-tooltip` could in many cases\n // mess up the layout, where it is used.\n // For example, inside a `grid` or `flex` section,\n // every instance of the tooltip would take some space,\n // creating gaps and empty holes.\n position: absolute;\n pointer-events: none;\n}\n","import { Component, h, Prop, Element, State } from '@stencil/core';\nimport { JSX } from 'react';\nimport { createRandomString } from '../../util/random-string';\nimport { OpenDirection } from '../menu/menu.types';\nimport { getOwnerElement } from './getOwnerElement';\nimport { TooltipTimer } from './tooltipTimer';\n\nconst DEFAULT_MAX_LENGTH = 50;\n\n/**\n * A tooltip can be used to display a descriptive text for any element.\n * The displayed content must be a brief and supplemental string of text,\n * identifying the element or describing its function for the user,\n * helping them better understand unfamiliar objects that aren't described\n * directly in the UI.\n *\n * ## Interaction\n * The tooltip appears after a slight delay, when the element is hovered;\n * and disappears as soon as the cursor leaves the element.\n * Therefore, users cannot interact with the tip, but if the trigger element\n * itself is interactive, it will remain interactible even with a tooltip bound\n * to it.\n *\n * :::note\n * In order to display the tooltip, the tooltip element and its trigger element\n * must be within the same document or document fragment (the same shadowRoot).\n * Often, it's easiest to just place them next to each other like in the example\n * below, but if you need to, you can place them differently.\n *\n * ```html\n * <limel-button icon=\"search\" id=\"tooltip-example\" />\n * <limel-tooltip label=\"Search\" elementId=\"tooltip-example\" />\n * ```\n * :::\n *\n * ## Usage\n * - Keep in mind that tooltips can be distracting, and can be perceived as an interruption.\n * Use them only when they add significant value.\n * - A good tip is concise, helpful, and informative.\n * Don't explain the obvious or simply repeat what is already on the screen.\n * When used correctly, supplemental info of a tooltip helps to [declutter the UI](/#/DesignGuidelines/decluttering.md/).\n * - If the tip is essential to the primary tasks that the user is performing,\n * such as warnings or important notes, include the information directly in the\n * interface instead.\n * - When a component offers a helper text (e.g. [Input field](/#/component/limel-input-field/)),\n * use that, not a tooltip.\n * - Make sure to use the tooltip on an element that users naturally and\n * effortlessly recognize can be hovered.\n *\n * @exampleComponent limel-example-tooltip-basic\n * @exampleComponent limel-example-tooltip-max-character\n * @exampleComponent limel-example-tooltip-composite\n */\n@Component({\n tag: 'limel-tooltip',\n shadow: true,\n styleUrl: 'tooltip.scss',\n})\nexport class Tooltip {\n /**\n * ID of the owner element that the tooltip should describe.\n * Must be a child within the same document fragment as the tooltip element\n * itself.\n */\n @Prop({ reflect: true })\n public elementId!: string;\n\n /**\n * Short descriptive text of the owner element.\n */\n @Prop({ reflect: true })\n public label!: string;\n\n /**\n * Additional helper text for the element.\n * Example usage can be a keyboard shortcut to activate the function of the\n * owner element.\n */\n @Prop({ reflect: true })\n public helperLabel?: string;\n\n /**\n * The maximum amount of characters before rendering 'label' and\n * 'helperLabel' in two rows.\n */\n @Prop({ reflect: true })\n public maxlength?: number = DEFAULT_MAX_LENGTH;\n\n /**\n * Decides the tooltip's location in relation to its trigger.\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection = 'top';\n\n @Element()\n private host: HTMLLimelTooltipElement;\n\n @State()\n private open: boolean;\n\n private portalId: string;\n private tooltipId: string;\n private ownerElement: HTMLElement;\n private tooltipTimer: TooltipTimer;\n\n public constructor() {\n this.portalId = createRandomString();\n this.tooltipId = createRandomString();\n this.tooltipTimer = new TooltipTimer(\n () => (this.open = true),\n () => (this.open = false),\n );\n }\n\n public connectedCallback() {\n this.ownerElement = getOwnerElement(this.elementId, this.host);\n this.setOwnerAriaLabel();\n this.addListeners();\n }\n\n public disconnectedCallback() {\n this.removeListeners();\n }\n\n public render(): JSX.Element {\n const tooltipZIndex = getComputedStyle(this.host).getPropertyValue(\n '--tooltip-z-index',\n );\n\n return (\n <div class=\"trigger-anchor\">\n <limel-portal\n openDirection={this.openDirection}\n visible={this.open}\n containerId={this.portalId}\n containerStyle={{\n 'z-index': tooltipZIndex,\n 'pointer-events': 'none',\n }}\n anchor={this.ownerElement}\n >\n <limel-tooltip-content\n label={this.label}\n helperLabel={this.helperLabel}\n maxlength={this.maxlength}\n role=\"tooltip\"\n aria-hidden={!this.open}\n id={this.tooltipId}\n />\n </limel-portal>\n </div>\n );\n }\n\n private setOwnerAriaLabel() {\n this.ownerElement?.setAttribute('aria-describedby', this.tooltipId);\n }\n\n private addListeners() {\n this.ownerElement?.addEventListener('mouseover', this.showTooltip);\n this.ownerElement?.addEventListener('mouseout', this.hideTooltip);\n this.ownerElement?.addEventListener('focus', this.showTooltip);\n this.ownerElement?.addEventListener('blur', this.hideTooltip);\n }\n\n private removeListeners() {\n this.ownerElement?.removeEventListener('mouseover', this.showTooltip);\n this.ownerElement?.removeEventListener('mouseout', this.hideTooltip);\n this.ownerElement?.removeEventListener('focus', this.showTooltip);\n this.ownerElement?.removeEventListener('blur', this.hideTooltip);\n }\n\n private showTooltip = () => {\n this.tooltipTimer.showAfterDelay();\n };\n\n private hideTooltip = () => {\n this.tooltipTimer.hide();\n };\n}\n",":host(limel-tooltip-content) {\n display: flex;\n\n border-radius: 0.25rem;\n padding: 0.25rem 0.5rem;\n background-color: rgb(var(--contrast-1300));\n box-shadow: var(--shadow-depth-16);\n}\n\ntext {\n font-size: 0.875rem; // 14px\n line-height: 1.25;\n display: flex;\n column-gap: 1rem;\n\n &.has-column-layout {\n display: table-cell;\n width: fit-content;\n max-width: min(var(--tooltip-max-width-of-text), 80vw);\n .label {\n padding-bottom: 0.5rem;\n }\n .helper-label {\n padding-bottom: 0.25rem;\n }\n }\n}\n\n.label {\n color: rgb(var(--contrast-200));\n}\n\n.helper-label {\n color: rgb(var(--contrast-800));\n\n &:empty {\n display: none;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * This component is used internally by `limel-tooltip`.\n *\n * @private\n */\n@Component({\n tag: 'limel-tooltip-content',\n shadow: true,\n styleUrl: 'tooltip-content.scss',\n})\nexport class TooltipContent {\n /**\n * Read more in tooltip.tsx\n */\n @Prop({ reflect: true })\n label!: string;\n\n /**\n * Read more in tooltip.tsx\n */\n @Prop({ reflect: true })\n helperLabel?: string;\n\n /**\n * Read more in tooltip.tsx\n */\n @Prop({ reflect: true })\n maxlength?: number;\n\n public render() {\n let isLabelsTextLong = false;\n if (this.helperLabel && this.maxlength) {\n isLabelsTextLong =\n this.label.length + this.helperLabel.length > this.maxlength;\n }\n\n const props: any = {};\n if (this.maxlength) {\n props.style = {\n '--tooltip-max-width-of-text': `${this.maxlength}` + 'ch',\n };\n }\n\n return [\n <text class={{ 'has-column-layout': isLabelsTextLong }} {...props}>\n <div class=\"label\">{this.label}</div>\n <div class=\"helper-label\">{this.helperLabel}</div>\n </text>,\n ];\n }\n}\n"],"version":3}
|