@limetech/lime-elements 39.17.3 → 39.18.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 +7 -0
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-card.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/collection/components/banner/banner.js +10 -3
- package/dist/collection/components/button/button.js +9 -3
- package/dist/collection/components/card/card.js +8 -2
- package/dist/collection/components/chip/chip.js +8 -2
- package/dist/collection/components/chip-set/chip-set.js +10 -3
- package/dist/collection/components/collapsible-section/collapsible-section.js +8 -2
- package/dist/collection/components/header/header.js +8 -2
- package/dist/collection/components/icon-button/icon-button.js +8 -2
- package/dist/collection/components/input-field/input-field.js +19 -5
- package/dist/collection/components/picker/picker.js +10 -3
- package/dist/collection/components/profile-picture/profile-picture.js +7 -1
- package/dist/collection/components/shortcut/shortcut.js +10 -3
- package/dist/collection/components/split-button/split-button.js +11 -4
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +1 -1
- package/dist/esm/limel-button.entry.js +2 -2
- package/dist/esm/limel-card.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-collapsible-section.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-icon-button.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +1 -1
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-b91b1aed.entry.js → p-19d0861e.entry.js} +1 -1
- package/dist/lime-elements/p-51734986.entry.js +1 -0
- package/dist/lime-elements/p-56cc6800.entry.js +1 -0
- package/dist/lime-elements/{p-585b0a3a.entry.js → p-a435d1c3.entry.js} +1 -1
- package/dist/lime-elements/p-aa43c751.entry.js +1 -0
- package/dist/lime-elements/{p-923126cb.entry.js → p-cae35eb0.entry.js} +1 -1
- package/dist/lime-elements/{p-268d2a30.entry.js → p-cc17846b.entry.js} +1 -1
- package/dist/lime-elements/{p-25ae3a55.entry.js → p-cfe85e59.entry.js} +1 -1
- package/dist/lime-elements/{p-7e584d40.entry.js → p-d227f4df.entry.js} +1 -1
- package/dist/lime-elements/{p-c41c839c.entry.js → p-eff0a330.entry.js} +1 -1
- package/dist/lime-elements/{p-e5b03d42.entry.js → p-f2f01f2a.entry.js} +1 -1
- package/dist/types/components/action-bar/action-bar.types.d.ts +2 -2
- package/dist/types/components/banner/banner.d.ts +2 -1
- package/dist/types/components/button/button.d.ts +2 -2
- package/dist/types/components/card/card.d.ts +2 -2
- package/dist/types/components/chip/chip.d.ts +2 -2
- package/dist/types/components/chip-set/chip-set.d.ts +2 -1
- package/dist/types/components/chip-set/chip.types.d.ts +2 -2
- package/dist/types/components/collapsible-section/collapsible-section.d.ts +2 -2
- package/dist/types/components/dialog/dialog.types.d.ts +2 -2
- package/dist/types/components/dock/dock.types.d.ts +2 -1
- package/dist/types/components/dynamic-label/label.types.d.ts +2 -2
- package/dist/types/components/header/header.d.ts +2 -2
- package/dist/types/components/icon-button/icon-button.d.ts +2 -2
- package/dist/types/components/input-field/input-field.d.ts +3 -2
- package/dist/types/components/list-item/list-item.types.d.ts +2 -2
- package/dist/types/components/menu/menu.types.d.ts +2 -2
- package/dist/types/components/picker/picker.d.ts +2 -1
- package/dist/types/components/profile-picture/profile-picture.d.ts +2 -2
- package/dist/types/components/select/option.types.d.ts +2 -2
- package/dist/types/components/shortcut/shortcut.d.ts +2 -1
- package/dist/types/components/split-button/split-button.d.ts +2 -1
- package/dist/types/components/tab-bar/tab.types.d.ts +2 -2
- package/dist/types/components.d.ts +44 -44
- package/dist/types/global/shared-types/file.types.d.ts +2 -2
- package/dist/types/global/shared-types/icon.types.d.ts +30 -1
- package/package.json +1 -1
- package/dist/lime-elements/p-6b956d6d.entry.js +0 -1
- package/dist/lime-elements/p-8a6721f9.entry.js +0 -1
- package/dist/lime-elements/p-c5d8079b.entry.js +0 -1
|
@@ -9,8 +9,8 @@ import { ActionBarItem } from "./components/action-bar/action-bar.types";
|
|
|
9
9
|
import { ListItem, ListSeparator } from "./components/list-item/list-item.types";
|
|
10
10
|
import { DateType, Languages } from "./components/date-picker/date.types";
|
|
11
11
|
import { MenuItem, MenuSearcher, OpenDirection, SurfaceWidth } from "./components/menu/menu.types";
|
|
12
|
+
import { Icon, IconName } from "./global/shared-types/icon.types";
|
|
12
13
|
import { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types";
|
|
13
|
-
import { Icon } from "./global/shared-types/icon.types";
|
|
14
14
|
import { Button } from "./components/button/button.types";
|
|
15
15
|
import { CalloutType } from "./components/callout/callout.types";
|
|
16
16
|
import { Image } from "./global/shared-types/image.types";
|
|
@@ -53,8 +53,8 @@ export { ActionBarItem } from "./components/action-bar/action-bar.types";
|
|
|
53
53
|
export { ListItem, ListSeparator } from "./components/list-item/list-item.types";
|
|
54
54
|
export { DateType, Languages } from "./components/date-picker/date.types";
|
|
55
55
|
export { MenuItem, MenuSearcher, OpenDirection, SurfaceWidth } from "./components/menu/menu.types";
|
|
56
|
+
export { Icon, IconName } from "./global/shared-types/icon.types";
|
|
56
57
|
export { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types";
|
|
57
|
-
export { Icon } from "./global/shared-types/icon.types";
|
|
58
58
|
export { Button } from "./components/button/button.types";
|
|
59
59
|
export { CalloutType } from "./components/callout/callout.types";
|
|
60
60
|
export { Image } from "./global/shared-types/image.types";
|
|
@@ -242,7 +242,7 @@ export namespace Components {
|
|
|
242
242
|
/**
|
|
243
243
|
* Set icon for the banner
|
|
244
244
|
*/
|
|
245
|
-
"icon":
|
|
245
|
+
"icon": IconName;
|
|
246
246
|
/**
|
|
247
247
|
* The text to show on the banner.
|
|
248
248
|
*/
|
|
@@ -318,7 +318,7 @@ export namespace Components {
|
|
|
318
318
|
/**
|
|
319
319
|
* Set icon for the button
|
|
320
320
|
*/
|
|
321
|
-
"icon":
|
|
321
|
+
"icon": IconName | Icon;
|
|
322
322
|
/**
|
|
323
323
|
* The text to show on the button.
|
|
324
324
|
*/
|
|
@@ -463,7 +463,7 @@ export namespace Components {
|
|
|
463
463
|
/**
|
|
464
464
|
* An icon, to display along with the heading and subheading.
|
|
465
465
|
*/
|
|
466
|
-
"icon"?:
|
|
466
|
+
"icon"?: IconName | Icon;
|
|
467
467
|
/**
|
|
468
468
|
* A hero image to display in the card, to enrich the content with visual information.
|
|
469
469
|
*/
|
|
@@ -706,7 +706,7 @@ export namespace Components {
|
|
|
706
706
|
/**
|
|
707
707
|
* Icon of the chip.
|
|
708
708
|
*/
|
|
709
|
-
"icon"?:
|
|
709
|
+
"icon"?: IconName | Icon;
|
|
710
710
|
/**
|
|
711
711
|
* Identifier for the chip. Must be unique.
|
|
712
712
|
* @default crypto.randomUUID()
|
|
@@ -875,7 +875,7 @@ export namespace Components {
|
|
|
875
875
|
* For chip-sets of type `input`. When the value is null, no leading icon is used. Leading icon to show to the far left in the text field
|
|
876
876
|
* @default null
|
|
877
877
|
*/
|
|
878
|
-
"leadingIcon":
|
|
878
|
+
"leadingIcon": IconName;
|
|
879
879
|
/**
|
|
880
880
|
* For chip-sets of type `input`. Limits the maximum number of chips. When the value is `0` or not set, no limit is applied.
|
|
881
881
|
*/
|
|
@@ -1134,7 +1134,7 @@ export namespace Components {
|
|
|
1134
1134
|
/**
|
|
1135
1135
|
* Icon to display in the header of the section
|
|
1136
1136
|
*/
|
|
1137
|
-
"icon"?:
|
|
1137
|
+
"icon"?: IconName | Icon;
|
|
1138
1138
|
/**
|
|
1139
1139
|
* `true` if the section is invalid, `false` if valid. This can be used to indicate that the content inside the section is invalid.
|
|
1140
1140
|
* @default false
|
|
@@ -1913,7 +1913,7 @@ export namespace Components {
|
|
|
1913
1913
|
/**
|
|
1914
1914
|
* Icon to display
|
|
1915
1915
|
*/
|
|
1916
|
-
"icon"?:
|
|
1916
|
+
"icon"?: IconName | Icon;
|
|
1917
1917
|
/**
|
|
1918
1918
|
* Subheading to display
|
|
1919
1919
|
*/
|
|
@@ -2091,7 +2091,7 @@ export namespace Components {
|
|
|
2091
2091
|
/**
|
|
2092
2092
|
* The icon to display.
|
|
2093
2093
|
*/
|
|
2094
|
-
"icon":
|
|
2094
|
+
"icon": IconName | Icon;
|
|
2095
2095
|
/**
|
|
2096
2096
|
* The text to show to screenreaders and other assistive tech. It is also displayed as a tooltip when the user hovers or focuses the button.
|
|
2097
2097
|
*/
|
|
@@ -2219,7 +2219,7 @@ export namespace Components {
|
|
|
2219
2219
|
/**
|
|
2220
2220
|
* Leading icon to show to the far left in the field.
|
|
2221
2221
|
*/
|
|
2222
|
-
"leadingIcon":
|
|
2222
|
+
"leadingIcon": IconName;
|
|
2223
2223
|
/**
|
|
2224
2224
|
* The locale to use for formatting numbers.
|
|
2225
2225
|
* @default globalConfig.defaultLocale
|
|
@@ -2280,7 +2280,7 @@ export namespace Components {
|
|
|
2280
2280
|
/**
|
|
2281
2281
|
* Trailing icon to show to the far right in the field.
|
|
2282
2282
|
*/
|
|
2283
|
-
"trailingIcon":
|
|
2283
|
+
"trailingIcon": IconName;
|
|
2284
2284
|
/**
|
|
2285
2285
|
* Type of input. Note** regarding type `url`: `limel-input` uses the native validation built into the browser for many types of input fields. The native validation for `url` is very strict, and does not allow relative urls, nor any other formats that are not a "fully qualified" url. To allow such urls, use the type `urlAsText` instead. `urlAsText` works exactly like `text` in all regards, except that it enables use of the `showLink` property.
|
|
2286
2286
|
* @default 'text'
|
|
@@ -2808,7 +2808,7 @@ export namespace Components {
|
|
|
2808
2808
|
/**
|
|
2809
2809
|
* Leading icon to show to the far left in the text field
|
|
2810
2810
|
*/
|
|
2811
|
-
"leadingIcon":
|
|
2811
|
+
"leadingIcon": IconName;
|
|
2812
2812
|
/**
|
|
2813
2813
|
* True if multiple values are allowed
|
|
2814
2814
|
* @default false
|
|
@@ -2997,7 +2997,7 @@ export namespace Components {
|
|
|
2997
2997
|
* Placeholder icon of the component, displayed when no image is present.
|
|
2998
2998
|
* @default 'user'
|
|
2999
2999
|
*/
|
|
3000
|
-
"icon":
|
|
3000
|
+
"icon": IconName | Icon;
|
|
3001
3001
|
/**
|
|
3002
3002
|
* How the image should fit within the container. - `cover` will fill the container and crop excess parts. - `contain` will scale the image to fit within the container without cropping.
|
|
3003
3003
|
* @default 'cover'
|
|
@@ -3301,7 +3301,7 @@ export namespace Components {
|
|
|
3301
3301
|
/**
|
|
3302
3302
|
* Name of icon for the shortcut.
|
|
3303
3303
|
*/
|
|
3304
|
-
"icon":
|
|
3304
|
+
"icon": IconName;
|
|
3305
3305
|
/**
|
|
3306
3306
|
* The text to show below the shortcut. Long label will be truncated.
|
|
3307
3307
|
* @default null
|
|
@@ -3488,7 +3488,7 @@ export namespace Components {
|
|
|
3488
3488
|
/**
|
|
3489
3489
|
* Set icon for the button
|
|
3490
3490
|
*/
|
|
3491
|
-
"icon":
|
|
3491
|
+
"icon": IconName;
|
|
3492
3492
|
/**
|
|
3493
3493
|
* A list of items and separators to show in the menu.
|
|
3494
3494
|
* @default []
|
|
@@ -6645,7 +6645,7 @@ declare namespace LocalJSX {
|
|
|
6645
6645
|
/**
|
|
6646
6646
|
* Set icon for the banner
|
|
6647
6647
|
*/
|
|
6648
|
-
"icon"?:
|
|
6648
|
+
"icon"?: IconName;
|
|
6649
6649
|
/**
|
|
6650
6650
|
* The text to show on the banner.
|
|
6651
6651
|
*/
|
|
@@ -6721,7 +6721,7 @@ declare namespace LocalJSX {
|
|
|
6721
6721
|
/**
|
|
6722
6722
|
* Set icon for the button
|
|
6723
6723
|
*/
|
|
6724
|
-
"icon"?:
|
|
6724
|
+
"icon"?: IconName | Icon;
|
|
6725
6725
|
/**
|
|
6726
6726
|
* The text to show on the button.
|
|
6727
6727
|
*/
|
|
@@ -6870,7 +6870,7 @@ declare namespace LocalJSX {
|
|
|
6870
6870
|
/**
|
|
6871
6871
|
* An icon, to display along with the heading and subheading.
|
|
6872
6872
|
*/
|
|
6873
|
-
"icon"?:
|
|
6873
|
+
"icon"?: IconName | Icon;
|
|
6874
6874
|
/**
|
|
6875
6875
|
* A hero image to display in the card, to enrich the content with visual information.
|
|
6876
6876
|
*/
|
|
@@ -7125,7 +7125,7 @@ declare namespace LocalJSX {
|
|
|
7125
7125
|
/**
|
|
7126
7126
|
* Icon of the chip.
|
|
7127
7127
|
*/
|
|
7128
|
-
"icon"?:
|
|
7128
|
+
"icon"?: IconName | Icon;
|
|
7129
7129
|
/**
|
|
7130
7130
|
* Identifier for the chip. Must be unique.
|
|
7131
7131
|
* @default crypto.randomUUID()
|
|
@@ -7292,7 +7292,7 @@ declare namespace LocalJSX {
|
|
|
7292
7292
|
* For chip-sets of type `input`. When the value is null, no leading icon is used. Leading icon to show to the far left in the text field
|
|
7293
7293
|
* @default null
|
|
7294
7294
|
*/
|
|
7295
|
-
"leadingIcon"?:
|
|
7295
|
+
"leadingIcon"?: IconName;
|
|
7296
7296
|
/**
|
|
7297
7297
|
* For chip-sets of type `input`. Limits the maximum number of chips. When the value is `0` or not set, no limit is applied.
|
|
7298
7298
|
*/
|
|
@@ -7569,7 +7569,7 @@ declare namespace LocalJSX {
|
|
|
7569
7569
|
/**
|
|
7570
7570
|
* Icon to display in the header of the section
|
|
7571
7571
|
*/
|
|
7572
|
-
"icon"?:
|
|
7572
|
+
"icon"?: IconName | Icon;
|
|
7573
7573
|
/**
|
|
7574
7574
|
* `true` if the section is invalid, `false` if valid. This can be used to indicate that the content inside the section is invalid.
|
|
7575
7575
|
* @default false
|
|
@@ -8445,7 +8445,7 @@ declare namespace LocalJSX {
|
|
|
8445
8445
|
/**
|
|
8446
8446
|
* Icon to display
|
|
8447
8447
|
*/
|
|
8448
|
-
"icon"?:
|
|
8448
|
+
"icon"?: IconName | Icon;
|
|
8449
8449
|
/**
|
|
8450
8450
|
* Subheading to display
|
|
8451
8451
|
*/
|
|
@@ -8623,7 +8623,7 @@ declare namespace LocalJSX {
|
|
|
8623
8623
|
/**
|
|
8624
8624
|
* The icon to display.
|
|
8625
8625
|
*/
|
|
8626
|
-
"icon"?:
|
|
8626
|
+
"icon"?: IconName | Icon;
|
|
8627
8627
|
/**
|
|
8628
8628
|
* The text to show to screenreaders and other assistive tech. It is also displayed as a tooltip when the user hovers or focuses the button.
|
|
8629
8629
|
*/
|
|
@@ -8739,7 +8739,7 @@ declare namespace LocalJSX {
|
|
|
8739
8739
|
/**
|
|
8740
8740
|
* Leading icon to show to the far left in the field.
|
|
8741
8741
|
*/
|
|
8742
|
-
"leadingIcon"?:
|
|
8742
|
+
"leadingIcon"?: IconName;
|
|
8743
8743
|
/**
|
|
8744
8744
|
* The locale to use for formatting numbers.
|
|
8745
8745
|
* @default globalConfig.defaultLocale
|
|
@@ -8808,7 +8808,7 @@ declare namespace LocalJSX {
|
|
|
8808
8808
|
/**
|
|
8809
8809
|
* Trailing icon to show to the far right in the field.
|
|
8810
8810
|
*/
|
|
8811
|
-
"trailingIcon"?:
|
|
8811
|
+
"trailingIcon"?: IconName;
|
|
8812
8812
|
/**
|
|
8813
8813
|
* Type of input. Note** regarding type `url`: `limel-input` uses the native validation built into the browser for many types of input fields. The native validation for `url` is very strict, and does not allow relative urls, nor any other formats that are not a "fully qualified" url. To allow such urls, use the type `urlAsText` instead. `urlAsText` works exactly like `text` in all regards, except that it enables use of the `showLink` property.
|
|
8814
8814
|
* @default 'text'
|
|
@@ -9363,7 +9363,7 @@ declare namespace LocalJSX {
|
|
|
9363
9363
|
/**
|
|
9364
9364
|
* Leading icon to show to the far left in the text field
|
|
9365
9365
|
*/
|
|
9366
|
-
"leadingIcon"?:
|
|
9366
|
+
"leadingIcon"?: IconName;
|
|
9367
9367
|
/**
|
|
9368
9368
|
* True if multiple values are allowed
|
|
9369
9369
|
* @default false
|
|
@@ -9568,7 +9568,7 @@ declare namespace LocalJSX {
|
|
|
9568
9568
|
* Placeholder icon of the component, displayed when no image is present.
|
|
9569
9569
|
* @default 'user'
|
|
9570
9570
|
*/
|
|
9571
|
-
"icon"?:
|
|
9571
|
+
"icon"?: IconName | Icon;
|
|
9572
9572
|
/**
|
|
9573
9573
|
* How the image should fit within the container. - `cover` will fill the container and crop excess parts. - `contain` will scale the image to fit within the container without cropping.
|
|
9574
9574
|
* @default 'cover'
|
|
@@ -9918,7 +9918,7 @@ declare namespace LocalJSX {
|
|
|
9918
9918
|
/**
|
|
9919
9919
|
* Name of icon for the shortcut.
|
|
9920
9920
|
*/
|
|
9921
|
-
"icon"?:
|
|
9921
|
+
"icon"?: IconName;
|
|
9922
9922
|
/**
|
|
9923
9923
|
* The text to show below the shortcut. Long label will be truncated.
|
|
9924
9924
|
* @default null
|
|
@@ -10112,7 +10112,7 @@ declare namespace LocalJSX {
|
|
|
10112
10112
|
/**
|
|
10113
10113
|
* Set icon for the button
|
|
10114
10114
|
*/
|
|
10115
|
-
"icon"?:
|
|
10115
|
+
"icon"?: IconName;
|
|
10116
10116
|
/**
|
|
10117
10117
|
* A list of items and separators to show in the menu.
|
|
10118
10118
|
* @default []
|
|
@@ -10653,7 +10653,7 @@ declare namespace LocalJSX {
|
|
|
10653
10653
|
}
|
|
10654
10654
|
interface LimelBannerAttributes {
|
|
10655
10655
|
"message": string;
|
|
10656
|
-
"icon":
|
|
10656
|
+
"icon": IconName;
|
|
10657
10657
|
}
|
|
10658
10658
|
interface LimelBreadcrumbsAttributes {
|
|
10659
10659
|
"divider": string;
|
|
@@ -10662,7 +10662,7 @@ declare namespace LocalJSX {
|
|
|
10662
10662
|
"label": string;
|
|
10663
10663
|
"primary": boolean;
|
|
10664
10664
|
"outlined": boolean;
|
|
10665
|
-
"icon":
|
|
10665
|
+
"icon": IconName | Icon;
|
|
10666
10666
|
"disabled": boolean;
|
|
10667
10667
|
"loading": boolean;
|
|
10668
10668
|
"loadingFailed": boolean;
|
|
@@ -10679,7 +10679,7 @@ declare namespace LocalJSX {
|
|
|
10679
10679
|
interface LimelCardAttributes {
|
|
10680
10680
|
"heading": string;
|
|
10681
10681
|
"subheading": string;
|
|
10682
|
-
"icon":
|
|
10682
|
+
"icon": IconName | Icon;
|
|
10683
10683
|
"value": string;
|
|
10684
10684
|
"clickable": boolean;
|
|
10685
10685
|
"orientation": 'landscape' | 'portrait';
|
|
@@ -10721,7 +10721,7 @@ declare namespace LocalJSX {
|
|
|
10721
10721
|
interface LimelChipAttributes {
|
|
10722
10722
|
"language": Languages;
|
|
10723
10723
|
"text": string;
|
|
10724
|
-
"icon":
|
|
10724
|
+
"icon": IconName | Icon;
|
|
10725
10725
|
"badge": string;
|
|
10726
10726
|
"disabled": boolean;
|
|
10727
10727
|
"readonly": boolean;
|
|
@@ -10747,7 +10747,7 @@ declare namespace LocalJSX {
|
|
|
10747
10747
|
"searchLabel": string;
|
|
10748
10748
|
"emptyInputOnBlur": boolean;
|
|
10749
10749
|
"clearAllButton": boolean;
|
|
10750
|
-
"leadingIcon":
|
|
10750
|
+
"leadingIcon": IconName;
|
|
10751
10751
|
"delimiter": string;
|
|
10752
10752
|
"autocomplete": string;
|
|
10753
10753
|
"language": Languages;
|
|
@@ -10792,7 +10792,7 @@ declare namespace LocalJSX {
|
|
|
10792
10792
|
interface LimelCollapsibleSectionAttributes {
|
|
10793
10793
|
"isOpen": boolean;
|
|
10794
10794
|
"header": string;
|
|
10795
|
-
"icon":
|
|
10795
|
+
"icon": IconName | Icon;
|
|
10796
10796
|
"invalid": boolean;
|
|
10797
10797
|
"language": Languages;
|
|
10798
10798
|
}
|
|
@@ -10905,7 +10905,7 @@ declare namespace LocalJSX {
|
|
|
10905
10905
|
"disabled": boolean;
|
|
10906
10906
|
}
|
|
10907
10907
|
interface LimelHeaderAttributes {
|
|
10908
|
-
"icon":
|
|
10908
|
+
"icon": IconName | Icon;
|
|
10909
10909
|
"heading": string;
|
|
10910
10910
|
"subheading": string;
|
|
10911
10911
|
"supportingText": string;
|
|
@@ -10936,7 +10936,7 @@ declare namespace LocalJSX {
|
|
|
10936
10936
|
"badge": boolean;
|
|
10937
10937
|
}
|
|
10938
10938
|
interface LimelIconButtonAttributes {
|
|
10939
|
-
"icon":
|
|
10939
|
+
"icon": IconName | Icon;
|
|
10940
10940
|
"elevated": boolean;
|
|
10941
10941
|
"label": string;
|
|
10942
10942
|
"helperLabel": string;
|
|
@@ -10963,8 +10963,8 @@ declare namespace LocalJSX {
|
|
|
10963
10963
|
"suffix": string;
|
|
10964
10964
|
"required": boolean;
|
|
10965
10965
|
"value": string;
|
|
10966
|
-
"trailingIcon":
|
|
10967
|
-
"leadingIcon":
|
|
10966
|
+
"trailingIcon": IconName;
|
|
10967
|
+
"leadingIcon": IconName;
|
|
10968
10968
|
"pattern": string;
|
|
10969
10969
|
"type": InputType;
|
|
10970
10970
|
"formatNumber": boolean;
|
|
@@ -11050,7 +11050,7 @@ declare namespace LocalJSX {
|
|
|
11050
11050
|
"label": string;
|
|
11051
11051
|
"searchLabel": string;
|
|
11052
11052
|
"helperText": string;
|
|
11053
|
-
"leadingIcon":
|
|
11053
|
+
"leadingIcon": IconName;
|
|
11054
11054
|
"emptyResultMessage": string;
|
|
11055
11055
|
"required": boolean;
|
|
11056
11056
|
"invalid": boolean;
|
|
@@ -11074,7 +11074,7 @@ declare namespace LocalJSX {
|
|
|
11074
11074
|
interface LimelProfilePictureAttributes {
|
|
11075
11075
|
"language": Languages;
|
|
11076
11076
|
"label": string;
|
|
11077
|
-
"icon":
|
|
11077
|
+
"icon": IconName | Icon;
|
|
11078
11078
|
"helperText": string;
|
|
11079
11079
|
"disabled": boolean;
|
|
11080
11080
|
"readonly": boolean;
|
|
@@ -11122,7 +11122,7 @@ declare namespace LocalJSX {
|
|
|
11122
11122
|
"multiple": boolean;
|
|
11123
11123
|
}
|
|
11124
11124
|
interface LimelShortcutAttributes {
|
|
11125
|
-
"icon":
|
|
11125
|
+
"icon": IconName;
|
|
11126
11126
|
"label": string;
|
|
11127
11127
|
"disabled": boolean;
|
|
11128
11128
|
"badge": string;
|
|
@@ -11158,7 +11158,7 @@ declare namespace LocalJSX {
|
|
|
11158
11158
|
interface LimelSplitButtonAttributes {
|
|
11159
11159
|
"label": string;
|
|
11160
11160
|
"primary": boolean;
|
|
11161
|
-
"icon":
|
|
11161
|
+
"icon": IconName;
|
|
11162
11162
|
"disabled": boolean;
|
|
11163
11163
|
"loading": boolean;
|
|
11164
11164
|
"loadingFailed": boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MenuItem } from '../../components';
|
|
2
|
-
import { Icon } from '
|
|
2
|
+
import { Icon, IconName } from './icon.types';
|
|
3
3
|
import { Color } from './color.types';
|
|
4
4
|
import { ListSeparator } from './separator.types';
|
|
5
5
|
/**
|
|
@@ -37,7 +37,7 @@ export interface FileInfo {
|
|
|
37
37
|
/**
|
|
38
38
|
* Name of the icon to use.
|
|
39
39
|
*/
|
|
40
|
-
icon?:
|
|
40
|
+
icon?: IconName | Icon;
|
|
41
41
|
/**
|
|
42
42
|
* Icon color. Overrides `--icon-color`.
|
|
43
43
|
*
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { Color } from './color.types';
|
|
2
|
+
/**
|
|
3
|
+
* An empty interface intended for module augmentation by consuming packages.
|
|
4
|
+
*
|
|
5
|
+
* Packages can extend this interface to register their own icon names,
|
|
6
|
+
* enabling type-safe autocompletion for custom icon sets.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* declare module '@limetech/lime-elements' {
|
|
11
|
+
* interface IconNameRegistry {
|
|
12
|
+
* 'my-custom-icon': string;
|
|
13
|
+
* 'another-icon': string;
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface IconNameRegistry {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents a valid icon name.
|
|
24
|
+
*
|
|
25
|
+
* When `IconNameRegistry` is augmented, this type provides autocompletion
|
|
26
|
+
* for registered icon names while still accepting any string value.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type IconName = keyof IconNameRegistry extends never ? string : keyof IconNameRegistry | (string & {});
|
|
2
31
|
/**
|
|
3
32
|
* This interface is used to specify which icon to use in many components,
|
|
4
33
|
* along with related properties, like color.
|
|
@@ -8,7 +37,7 @@ export interface Icon {
|
|
|
8
37
|
/**
|
|
9
38
|
* Name of the icon, refers to the icon's filename in lime-icons8 repository.
|
|
10
39
|
*/
|
|
11
|
-
name:
|
|
40
|
+
name: IconName;
|
|
12
41
|
/**
|
|
13
42
|
* Color of the icon.
|
|
14
43
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as e,a as n}from"./p-DBTJNfo7.js";import{m as a,r as i}from"./p-BgTwPGeH.js";import{c as s}from"./p-JbKhhoXs.js";import{d as r,g as l}from"./p-CgNJbSP4.js";const d=class{constructor(t){o(this,t),this.elevated=!1,this.disabled=!1,this.tooltipId=s(),this.filterClickWhenDisabled=o=>{this.disabled&&o.preventDefault()}}connectedCallback(){this.initialize()}componentWillLoad(){a(this.host)}disconnectedCallback(){i(this.host)}componentDidLoad(){this.initialize()}initialize(){this.host.shadowRoot.querySelector(".mdc-icon-button")}render(){const o={};return this.host.hasAttribute("tabindex")&&(o.tabindex=this.host.getAttribute("tabindex")),t(e,{key:"0df3febef19dcdb72c7c7f3740090414b313be51",onClick:this.filterClickWhenDisabled},t("button",Object.assign({key:"119641239ebd336ca5af28ce3452c940a552eccb","aria-label":this.label,disabled:this.disabled,id:this.tooltipId},o),this.renderIcon(),this.renderTooltip(this.tooltipId)))}renderIcon(){var o,e;const n=l(this.icon),a=r(this.icon);return t("limel-icon",{name:n,"aria-label":a,"aria-hidden":a?null:"true",style:{color:`${null===(o=this.icon)||void 0===o?void 0:o.color}`,"--icon-background-color":`${null===(e=this.icon)||void 0===e?void 0:e.backgroundColor}`}})}renderTooltip(o){if(this.label)return t("limel-tooltip",{elementId:o,label:this.label,helperLabel:this.helperLabel})}static get delegatesFocus(){return!0}get host(){return n(this)}};d.style='@charset "UTF-8";:host([hidden]){display:none}:host([aria-expanded=true]) button,:host([aria-expanded]:not([aria-expanded=false])) button{box-shadow:var(--button-shadow-inset-pressed) !important}button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--icon-background-color, transparent)}button:not(:disabled):hover,button:not(:disabled):focus,button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}button:not(:disabled):hover,button:not(:disabled):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button:not(:disabled):hover{box-shadow:var(--button-shadow-hovered)}button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button:not(:disabled):hover,button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not(:disabled):focus{outline:none}button:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button{display:inline-flex;align-items:center;justify-content:center;height:2.25rem;width:2.25rem;border-radius:50%}button:disabled{cursor:not-allowed;color:var(--limel-theme-text-disabled-on-background-color)}:host([elevated]) button:not(:hover):not(:active):not(:disabled):not(:focus-visible){box-shadow:var(--button-shadow-normal)}:host([elevated]) button:disabled{box-shadow:var(--button-shadow-normal)}limel-icon{padding:0.25rem;width:1.75rem}';export{d as limel_icon_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as o,a}from"./p-DBTJNfo7.js";import{m as i,r}from"./p-BgTwPGeH.js";import{d as n,g as s}from"./p-CgNJbSP4.js";const l=class{constructor(t){e(this,t),this.primary=!1,this.outlined=!1,this.disabled=!1,this.loading=!1,this.loadingFailed=!1,this.justLoaded=!1,this.filterClickWhenDisabled=e=>{this.disabled&&e.preventDefault()}}componentWillLoad(){i(this.host)}disconnectedCallback(){r(this.host)}render(){return t(o,{key:"4d575a67e902fe7e6af291ea9b6df5aa9d83ba29",onClick:this.filterClickWhenDisabled},t("button",{key:"887b9453b5a707db5239f499118d2bb27cc65c1a",class:{loading:this.loading,"just-loaded":this.justLoaded&&!this.loadingFailed,"just-failed":this.justLoaded&&this.loadingFailed,outlined:this.outlined},disabled:this.disabled||this.loading,"aria-busy":this.loading?"true":"false","aria-live":"polite"},this.renderIcon(this.icon),this.renderLabel(),this.renderSpinner(),t("svg",{key:"d2b52f207f0d6c6af0c55ee7585f3b12a0ee4832",viewBox:"0 0 30 30"},this.renderLoadingIcons())))}loadingWatcher(e,t){this.hasFinishedLoading(e,t)?this.handleLoadingFinished():e&&this.handleLoadingStarted()}hasFinishedLoading(e,t){return t&&!e}handleLoadingFinished(){this.justLoaded=!0,this.justLoadedTimeout=window.setTimeout((()=>{this.justLoaded=!1}),2e3)}handleLoadingStarted(){this.justLoaded=!1,window.clearTimeout(this.justLoadedTimeout)}renderLoadingIcons(){return this.loadingFailed?[t("line",{x1:"9",y1:"9",x2:"21",y2:"21"}),t("line",{x1:"21",y1:"9",x2:"9",y2:"21"})]:[t("line",{x1:"8",y1:"14",x2:"15",y2:"20"}),t("line",{x1:"23",y1:"9",x2:"14",y2:"20"})]}renderIcon(e){const o=s(e);if(!o)return;const a=n(e);let i;return this.label||a||console.warn("⚠️ Accessibility warning: `limel-button` has no `label` and its `icon` has no `title`. This creates an inaccessible button for screen reader users. Please add either a `label`, a `title` to the `icon`, or use a `limel-tooltip`. See https://lundalogik.github.io/lime-elements/versions/latest/#/component/limel-button/ for more information."),"object"==typeof e&&(i=e.color),t("limel-icon",Object.assign({},{role:"presentation",name:o,"aria-label":a,"aria-hidden":a?null:"true",style:{color:i}}))}renderLabel(){if(this.label)return t("span",{class:"label"},this.label)}renderSpinner(){if(this.loading)return t("limel-spinner",{limeBranded:!1})}static get delegatesFocus(){return!0}get host(){return a(this)}static get watchers(){return{loading:[{loadingWatcher:0}]}}};l.style='@charset "UTF-8";@keyframes reduced-presence{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.7)}}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded){animation:reduced-presence 0.3s ease forwards;transition:padding 0.3s ease, min-width 0.3s ease;transition-delay:0.3s;padding:0;min-width:0}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) .label{transition:font-size 0.8s ease;transition-delay:0.3s;font-size:0;opacity:0}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) limel-icon,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) limel-spinner,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) svg,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) .icon{transition:all 0.3s ease;transition-delay:0.3s;opacity:0;width:0;height:0}:host{display:inline-block}:host([hidden]){display:none}:host([aria-expanded=true]) button,:host([aria-expanded]:not([aria-expanded=false])) button{box-shadow:var(--button-shadow-inset-pressed) !important}button.mdc-button{font-family:inherit}button{--_primary-color:var( --lime-primary-color, var(--limel-theme-primary-color) );display:flex;align-items:center;justify-content:center;gap:0.125rem;border:none;border-radius:0.4rem;padding-top:0;padding-right:var(--button-padding-right, 0.5rem);padding-bottom:0;padding-left:var(--button-padding-left, 0.5rem);min-height:2.25rem;width:100%}button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}button:not(:disabled):hover,button:not(:disabled):focus,button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}button:not(:disabled):hover,button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button:not(:disabled):hover,button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not(:disabled):focus{outline:none}button:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:disabled{cursor:not-allowed}:host(limel-button[primary]) button:not(:disabled){color:var(--lime-on-primary-color, var(--limel-theme-on-primary-color));background-color:var(--_primary-color)}:host(limel-button[primary]) button:disabled{background-color:color-mix(in srgb, var(--_primary-color), transparent 80%)}:host(limel-button:not([primary])) button:not(:disabled){color:var(--_primary-color)}:host(limel-button:not([primary])) button:disabled.outlined{color:color-mix(in srgb, var(--_primary-color), transparent 60%);border-color:color-mix(in srgb, var(--_primary-color), transparent 70%)}:host(limel-button:not([primary])) button:disabled:not(.outlined){color:rgba(var(--contrast-1100), 0.37);background-color:rgba(var(--contrast-900), 0.1)}.label{font-size:var(--limel-theme-default-font-size);font-weight:600;letter-spacing:0.03125rem;padding:0 0.25rem}limel-spinner{position:absolute}limel-icon{width:1.25rem;flex-shrink:0;vertical-align:top}svg{height:1.875rem;opacity:0;pointer-events:none;position:absolute;width:1.875rem}svg line{stroke:rgb(var(--contrast-600));stroke-width:2}limel-icon,.label,limel-spinner,svg{transition:opacity 300ms ease-in-out}.loading limel-icon,.loading .label{opacity:0}.loading limel-spinner{opacity:1}.just-loaded limel-icon,.just-loaded .label,.just-failed limel-icon,.just-failed .label{opacity:0}.just-loaded svg,.just-failed svg{opacity:1}.just-failed{background-color:var(--limel-theme-error-color) !important;animation:shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both}.outlined{border:1px solid;border-color:var(--_primary-color)}@keyframes shake{10%,90%{transform:translate3d(-0.0625rem, 0, 0)}20%,80%{transform:translate3d(0.125rem, 0, 0)}30%,50%,70%{transform:translate3d(-0.1875rem, 0, 0)}40%,60%{transform:translate3d(0.1875rem, 0, 0)}}';export{l as limel_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,a as h}from"./p-DBTJNfo7.js";import{i as e}from"./p-B9Ofc5RB.js";import{T as n,E as o,a as r,A as l,b as a}from"./p-rI0IeKpx.js";import{c as d}from"./p-JbKhhoXs.js";import{a as c,g as p}from"./p-CgNJbSP4.js";import{d as u}from"./p-BviYUVSD.js";import"./p-BJQylLSL.js";import"./p-D6dCQvwl.js";import"./p-BOEi1C7r.js";import"./p-oiMYqRQ0.js";const m=class{constructor(s){t(this,s),this.change=i(this,"change"),this.interact=i(this,"interact"),this.action=i(this,"action"),this.disabled=!1,this.readonly=!1,this.required=!1,this.invalid=!1,this.allItems=[],this.multiple=!1,this.delimiter=null,this.actions=[],this.actionPosition="bottom",this.actionScrollBehavior="sticky",this.badgeIcons=!1,this.textValue="",this.loading=!1,this.chips=[],this.chipSetEditMode=!1,this.getValueId=t=>{const i=t.value;return i&&"object"==typeof i?i.id:i},this.createChips=t=>t?this.multiple?t.map(this.createChip):[this.createChip(t)]:[],this.createChip=t=>{const i=p(t.icon),s=c(t.icon,t.iconColor);return{id:`${this.getValueId(t)}`,text:t.text,removable:!0,icon:i?{name:i,color:s}:void 0,image:t.image,value:t,menuItems:t.actions}},this.search=async t=>{const i=setTimeout((()=>{this.loading=!0})),s=this.searcher||this.defaultSearcher,h=await s(this.textValue);clearTimeout(i),this.handleSearchResult(t,h)},this.defaultSearcher=async t=>""===t?this.allItems.slice(0,20):this.allItems.filter((i=>{let s=i.text.toLowerCase();return i.secondaryText&&(s=s+" "+i.secondaryText.toLowerCase()),s.includes(t.toLowerCase())})).slice(0,20),this.handleTextInput=this.handleTextInput.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleDropdownKeyDown=this.handleDropdownKeyDown.bind(this),this.handleInputFieldFocus=this.handleInputFieldFocus.bind(this),this.handleChange=this.handleChange.bind(this),this.handleInteract=this.handleInteract.bind(this),this.handleListChange=this.handleListChange.bind(this),this.handleActionListChange=this.handleActionListChange.bind(this),this.handleStopEditAndBlur=this.handleStopEditAndBlur.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.onListKeyDown=this.onListKeyDown.bind(this),this.portalId=d(),this.debouncedSearch=u(this.search,300)}componentWillLoad(){this.chips=this.createChips(this.value)}componentDidLoad(){this.chipSet=this.host.shadowRoot.querySelector("limel-chip-set"),this.updateTabIndex()}disconnectedCallback(){this.debouncedSearch.cancel()}onDisabledChange(){this.updateTabIndex()}updateTabIndex(){this.host.setAttribute("tabindex",this.disabled||this.readonly?"-1":"0")}async componentWillUpdate(){this.chipSetEditMode=!1,this.chipSet&&(this.chipSetEditMode=await this.chipSet.getEditMode())}render(){const t={};return this.multiple||(t.maxItems=1),[s("limel-chip-set",Object.assign({key:"d7928164dfd143478fb1b4ed248fdfa6c7c55f68",type:"input",inputType:"search",label:this.label,helperText:this.helperText,leadingIcon:this.leadingIcon,value:this.chips,disabled:this.disabled,invalid:this.invalid,delimiter:this.renderDelimiter(),readonly:this.readonly,required:this.required,searchLabel:this.searchLabel,onInput:this.handleTextInput,onKeyDown:this.handleInputKeyDown,onChange:this.handleChange,onInteract:this.handleInteract,onStartEdit:this.handleInputFieldFocus,onStopEdit:this.handleStopEditAndBlur,emptyInputOnBlur:!1,clearAllButton:this.multiple&&!this.chipSetEditMode},t)),this.renderDropdown()]}onChangeValue(){this.chips=this.createChips(this.value)}renderDelimiter(){return this.multiple?this.delimiter:null}renderDropdown(){const t=this.getDropdownContent(),i=[];if(this.shouldShowDropDownContent()){const s=this.getActionContent();"top"===this.actionPosition&&i.push(s),t&&i.push(t),"bottom"===this.actionPosition&&i.push(s)}return this.renderPortal(i)}getActionContent(){var t,i;return 0===(null!==(i=null===(t=this.actions)||void 0===t?void 0:t.length)&&void 0!==i?i:0)?null:[s("limel-list",{class:{"static-actions-list":!0,"is-on-top":"top"===this.actionPosition,"is-at-bottom":"bottom"===this.actionPosition,"has-position-sticky":"sticky"===this.actionScrollBehavior},badgeIcons:!0,type:"selectable",onChange:this.handleActionListChange,items:this.actions.map(this.removeUnusedPropertiesOnAction)})]}removeUnusedPropertiesOnAction(t){return Object.assign(Object.assign({},t),{actions:[]})}shouldShowDropDownContent(){return!this.isFull()&&!!this.chipSetEditMode}getDropdownContent(){var t;if(this.shouldShowDropDownContent())return this.loading?this.renderSpinner():(null===(t=this.items)||void 0===t?void 0:t.length)?this.renderListResult():this.renderEmptyMessage()}isFull(){return!this.multiple&&!!this.value}renderSpinner(){return s("div",{style:{width:"100%",display:"flex","align-items":"center","justify-content":"center",padding:"1rem 0"}},s("limel-spinner",{limeBranded:!1}))}renderEmptyMessage(){if(this.emptyResultMessage)return s("p",{style:{color:"rgb(var(--contrast-1100))","text-align":"center",margin:"0.5rem 1rem"}},this.emptyResultMessage)}renderListResult(){return s("limel-list",{badgeIcons:this.badgeIcons,onChange:this.handleListChange,onKeyDown:this.onListKeyDown,type:"selectable",items:this.items})}onListKeyDown(t){[n,o,r].includes(t.key)&&this.chipSet.setFocus()}renderPortal(t=[]){const i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");return s("limel-portal",{visible:t.length>0,containerId:this.portalId,inheritParentWidth:!0,containerStyle:{"z-index":i}},s("limel-menu-surface",{open:t.length>0,allowClicksElement:this.host,style:{"--menu-surface-width":"100%","max-height":"inherit",display:"flex"},onDismiss:this.handleCloseMenu},t))}handleStopEditAndBlur(){const t=this.host.shadowRoot.activeElement||document.activeElement,i=document.querySelector(`#${this.portalId}`);e(t,this.host)||e(t,i)||this.clearInputField()}async handleTextInput(t){t.stopPropagation();const i=t.detail;this.textValue=i,this.debouncedSearch(i),""===i&&this.debouncedSearch.flush()}handleListChange(t){var i;if(t.stopPropagation(),!this.value||this.value!==t.detail){let i=t.detail;this.multiple&&(i=[...this.value,t.detail]),this.change.emit(i),this.items=[]}this.multiple&&(this.textValue="",null===(i=this.chipSet)||void 0===i||i.setFocus(!0))}handleActionListChange(t){t.stopPropagation(),t.detail&&(this.action.emit(t.detail.value),this.items=[])}handleInputFieldFocus(){this.debouncedSearch(this.textValue)}handleChange(t){t.stopPropagation(),this.textValue="";let i=null;this.multiple&&(i=t.detail.map((t=>this.value.find((i=>`${this.getValueId(i)}`===t.id))))),this.change.emit(i)}handleInteract(t){t.stopPropagation(),this.interact.emit(t.detail?t.detail.value:t.detail)}handleInputKeyDown(t){const i=t.key===n&&!t.altKey&&!t.metaKey&&!t.shiftKey,s=t.key===l,h=t.key===a;if(!i&&!s&&!h)return;const e=document.querySelector(` #${this.portalId} limel-list`);if(e){if(i||h){const i=e.shadowRoot.querySelector(".mdc-deprecated-list-item");if(!i)return;return t.preventDefault(),void i.focus()}if(s){const i=[...e.shadowRoot.querySelectorAll(".mdc-deprecated-list-item")].at(-1);if(!i)return;t.preventDefault(),i.focus()}}}handleDropdownKeyDown(t){t.key===o&&(t.preventDefault(),this.textValue="",this.chipSet.setFocus(!0))}handleSearchResult(t,i){if(t===this.textValue){if(this.items=i,this.multiple){const t=this.value;this.items=i.filter((i=>!t.includes(i)))}this.loading=!1}}handleCloseMenu(){this.items.length>0||this.clearInputField()}clearInputField(){this.chipSet.emptyInput(),this.textValue="",this.handleSearchResult("",[]),this.debouncedSearch.cancel()}static get delegatesFocus(){return!0}get host(){return h(this)}static get watchers(){return{disabled:[{onDisabledChange:0}],value:[{onChangeValue:0}]}}};m.style=":host{position:relative;display:block}:host([hidden]){display:none}";export{m as limel_picker}
|