blip-ds 1.153.0 → 1.154.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/blip-ds/bds-accordion-body.entry.js +36 -0
  2. package/dist/blip-ds/bds-accordion-body.system.entry.js +1 -0
  3. package/dist/blip-ds/bds-accordion-group.entry.js +38 -0
  4. package/dist/blip-ds/bds-accordion-group.system.entry.js +1 -0
  5. package/dist/blip-ds/bds-accordion-header.entry.js +55 -0
  6. package/dist/blip-ds/bds-accordion-header.system.entry.js +1 -0
  7. package/dist/blip-ds/bds-chip-clickable.entry.js +15 -9
  8. package/dist/blip-ds/bds-chip-clickable.system.entry.js +1 -1
  9. package/dist/blip-ds/bds-chip-selected.entry.js +12 -7
  10. package/dist/blip-ds/bds-chip-selected.system.entry.js +1 -1
  11. package/dist/blip-ds/blip-ds.esm.js +1 -1
  12. package/dist/blip-ds/blip-ds.system.js +1 -1
  13. package/dist/blip-ds/p-12c80fd5.entry.js +1 -0
  14. package/dist/blip-ds/p-1db518de.system.entry.js +1 -0
  15. package/dist/blip-ds/p-28436a00.entry.js +1 -0
  16. package/dist/blip-ds/p-2e8ba5a6.entry.js +1 -0
  17. package/dist/blip-ds/{p-28a290f0.system.entry.js → p-49279986.system.entry.js} +1 -1
  18. package/dist/blip-ds/p-6be564b6.system.entry.js +1 -0
  19. package/dist/blip-ds/p-9a98b63f.system.js +1 -1
  20. package/dist/blip-ds/p-9ef77f22.system.entry.js +1 -0
  21. package/dist/blip-ds/{p-7557f3f5.system.entry.js → p-a35b1dde.system.entry.js} +1 -1
  22. package/dist/blip-ds/p-c6fdb2bf.entry.js +1 -0
  23. package/dist/blip-ds/p-d9d948ba.entry.js +1 -0
  24. package/dist/blip-ds/p-e620f23e.system.entry.js +1 -0
  25. package/dist/blip-ds/{p-ae72e820.entry.js → p-fa174276.entry.js} +1 -1
  26. package/dist/cjs/bds-accordion-body.cjs.entry.js +40 -0
  27. package/dist/cjs/bds-accordion-group.cjs.entry.js +42 -0
  28. package/dist/cjs/bds-accordion-header.cjs.entry.js +59 -0
  29. package/dist/cjs/bds-chip-clickable.cjs.entry.js +15 -9
  30. package/dist/cjs/bds-chip-selected.cjs.entry.js +12 -7
  31. package/dist/cjs/bds-icon_2.cjs.entry.js +769 -0
  32. package/dist/cjs/blip-ds.cjs.js +1 -1
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/collection/collection-manifest.json +3 -0
  35. package/dist/collection/components/accordion/accordion-body.js +98 -0
  36. package/dist/collection/components/accordion/accordion-group.js +85 -0
  37. package/dist/collection/components/accordion/accordion-header.js +175 -0
  38. package/dist/collection/components/accordion/accordion.css +77 -0
  39. package/dist/collection/components/chip-clickable/chip-clickable.js +16 -10
  40. package/dist/collection/components/chip-selected/chip-selected.css +8 -8
  41. package/dist/collection/components/chip-selected/chip-selected.js +14 -14
  42. package/dist/esm/bds-accordion-body.entry.js +36 -0
  43. package/dist/esm/bds-accordion-group.entry.js +38 -0
  44. package/dist/esm/bds-accordion-header.entry.js +55 -0
  45. package/dist/esm/bds-chip-clickable.entry.js +15 -9
  46. package/dist/esm/bds-chip-selected.entry.js +12 -7
  47. package/dist/esm/bds-icon_2.entry.js +764 -0
  48. package/dist/esm/blip-ds.js +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm-es5/bds-accordion-body.entry.js +1 -0
  51. package/dist/esm-es5/bds-accordion-group.entry.js +1 -0
  52. package/dist/esm-es5/bds-accordion-header.entry.js +1 -0
  53. package/dist/esm-es5/bds-chip-clickable.entry.js +1 -1
  54. package/dist/esm-es5/bds-chip-selected.entry.js +1 -1
  55. package/dist/esm-es5/{bds-icon.entry.js → bds-icon_2.entry.js} +1 -1
  56. package/dist/esm-es5/blip-ds.js +1 -1
  57. package/dist/esm-es5/loader.js +1 -1
  58. package/dist/types/components/accordion/accordion-body.d.ts +12 -0
  59. package/dist/types/components/accordion/accordion-group.d.ts +13 -0
  60. package/dist/types/components/accordion/accordion-header.d.ts +28 -0
  61. package/dist/types/components/chip-clickable/chip-clickable.d.ts +2 -0
  62. package/dist/types/components/chip-selected/chip-selected.d.ts +2 -1
  63. package/dist/types/components.d.ts +86 -0
  64. package/package.json +1 -1
  65. package/dist/blip-ds/p-049c0be1.entry.js +0 -1
  66. package/dist/blip-ds/p-5a1d3dd3.system.entry.js +0 -1
  67. package/dist/blip-ds/p-9fd518dc.system.entry.js +0 -1
  68. package/dist/blip-ds/p-c9f19ec5.entry.js +0 -1
  69. package/dist/blip-ds/p-cf2e73cd.entry.js +0 -1
  70. package/dist/esm-es5/bds-typo.entry.js +0 -1
@@ -23,23 +23,29 @@ export class ChipClickable {
23
23
  */
24
24
  this.disabled = false;
25
25
  }
26
- handleClick(event) {
27
- if (event.key === 'Enter' && !this.disabled) {
26
+ handleClickKey(event) {
27
+ if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
28
28
  event.preventDefault();
29
29
  this.chipClickableClick.emit();
30
30
  }
31
31
  }
32
- handleCloseChip(event) {
33
- const key = 'Enter';
34
- if (event.key === key && !this.disabled) {
32
+ handleClick(event) {
33
+ if (!this.disabled) {
35
34
  event.preventDefault();
36
- this.chipClickableClose.emit({ id: this.element.id });
35
+ this.chipClickableClick.emit();
37
36
  }
38
- else {
37
+ }
38
+ handleCloseChip(event) {
39
+ event.preventDefault();
40
+ this.chipClickableClose.emit({ id: this.element.id });
41
+ this.visible = false;
42
+ }
43
+ handleCloseKey(event) {
44
+ if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
39
45
  event.preventDefault();
40
46
  this.chipClickableClose.emit({ id: this.element.id });
47
+ this.visible = false;
41
48
  }
42
- this.visible = false;
43
49
  }
44
50
  getSizeAvatarChip() {
45
51
  if (this.size === 'tall') {
@@ -65,7 +71,7 @@ export class ChipClickable {
65
71
  'chip_clickable--click': this.clickable,
66
72
  'chip_clickable--disabled': this.disabled,
67
73
  }, onClick: this.handleClick.bind(this) },
68
- this.clickable && !this.disabled && (h("div", { class: "chip_focus", onKeyDown: this.handleClick.bind(this), tabindex: "0" })),
74
+ this.clickable && !this.disabled && (h("div", { class: "chip_focus", onKeyDown: this.handleClickKey.bind(this), tabindex: "0" })),
69
75
  this.clickable && !this.disabled && h("div", { class: "chip_darker" }),
70
76
  this.icon && !this.avatar && (h("div", { class: "chip_clickable--icon" },
71
77
  h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))),
@@ -74,7 +80,7 @@ export class ChipClickable {
74
80
  h("bds-typo", { class: "chip_clickable--text", variant: "fs-12", bold: "bold" },
75
81
  h("slot", null)),
76
82
  this.close && (h("div", { class: "chip_clickable--close", onClick: this.handleCloseChip.bind(this) },
77
- !this.disabled && (h("div", { class: "close_focus", onKeyDown: this.handleCloseChip.bind(this), tabindex: "0" })),
83
+ !this.disabled && (h("div", { class: "close_focus", onKeyDown: this.handleCloseKey.bind(this), tabindex: "0" })),
78
84
  h("bds-icon", { size: "x-small", theme: "solid", name: "error" }))))));
79
85
  }
80
86
  static get is() { return "bds-chip-clickable"; }
@@ -24,16 +24,10 @@
24
24
  /*
25
25
  Font sizes have been converted to rem considering a base size of 16px.
26
26
  */
27
- :host(:focus) {
28
- border: 2px solid #c226fb;
29
- padding: 2px;
30
- }
31
-
32
27
  :host {
33
28
  display: flex;
34
29
  height: fit-content;
35
30
  width: max-content;
36
- padding: 4px;
37
31
  border-radius: 4px;
38
32
  box-sizing: border-box;
39
33
  }
@@ -50,6 +44,14 @@
50
44
  position: relative;
51
45
  z-index: 0;
52
46
  }
47
+ :host .chip .chip_focus:focus {
48
+ position: absolute;
49
+ width: 100%;
50
+ height: 100%;
51
+ padding: 2px;
52
+ border-radius: 4px;
53
+ outline: #c226fb solid 2px;
54
+ }
53
55
  :host .chip .chip_darker {
54
56
  position: absolute;
55
57
  width: 100%;
@@ -63,7 +65,6 @@
63
65
  display: flex;
64
66
  align-items: center;
65
67
  padding-left: 4px;
66
- width: 16px;
67
68
  height: 20px;
68
69
  color: #202c44;
69
70
  z-index: 2;
@@ -135,7 +136,6 @@
135
136
  :host .chip_selected--icon {
136
137
  display: flex;
137
138
  align-items: center;
138
- width: 16px;
139
139
  height: 20px;
140
140
  padding-left: 4px;
141
141
  color: #125ad5;
@@ -19,11 +19,9 @@ export class ChipSelected {
19
19
  */
20
20
  this.disabled = false;
21
21
  }
22
- handleKeyDown(ev) {
23
- if (ev.key === ' ') {
24
- if (this.disabled)
25
- return;
26
- ev.preventDefault();
22
+ handleKeyDown(event) {
23
+ if (event.key === ' ' && !this.disabled) {
24
+ event.preventDefault();
27
25
  if (this.isSelected) {
28
26
  return (this.isSelected = false);
29
27
  }
@@ -61,14 +59,22 @@ export class ChipSelected {
61
59
  return chipSelected;
62
60
  }
63
61
  }
62
+ getSizeIconChip() {
63
+ if (this.size === 'tall') {
64
+ return 'medium';
65
+ }
66
+ else
67
+ return 'x-small';
68
+ }
64
69
  render() {
65
70
  return (h(Host, null,
66
- h("div", { class: Object.assign(Object.assign({ chip: true }, this.getStyleChip()), this.getDisabledChip()), onClick: this.handleClick, onKeyDown: this.handleKeyDown, tabindex: "0" },
71
+ h("div", { class: Object.assign(Object.assign({ chip: true }, this.getStyleChip()), this.getDisabledChip()), onClick: this.handleClick },
72
+ !this.disabled && h("div", { class: "chip_focus", onKeyDown: this.handleKeyDown.bind(this), tabindex: "0" }),
67
73
  !this.isSelected && !this.disabled && h("div", { class: "chip_darker" }),
68
74
  this.icon && !this.isSelected && (h("div", { class: "chip--icon" },
69
- h("bds-icon", { size: "x-small", name: this.icon }))),
75
+ h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))),
70
76
  this.isSelected && (h("div", { class: "chip_selected--icon" },
71
- h("bds-icon", { size: "x-small", name: "checkball" }))),
77
+ h("bds-icon", { size: this.getSizeIconChip(), name: "checkball" }))),
72
78
  h("bds-typo", { class: Object.assign({ 'chip--text': true }, this.getStyleText()), variant: "fs-12", "no-wrap": true, bold: "bold" },
73
79
  h("slot", null)))));
74
80
  }
@@ -200,12 +206,6 @@ export class ChipSelected {
200
206
  }]; }
201
207
  static get elementRef() { return "el"; }
202
208
  static get listeners() { return [{
203
- "name": "keydown",
204
- "method": "handleKeyDown",
205
- "target": undefined,
206
- "capture": false,
207
- "passive": false
208
- }, {
209
209
  "name": "click",
210
210
  "method": "handleClick",
211
211
  "target": undefined,
@@ -0,0 +1,36 @@
1
+ import { r as registerInstance, h } from './index-a2cd05b6.js';
2
+
3
+ const accordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .accordion_header{display:grid;grid-auto-flow:column;gap:24px;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;padding:24px;padding-right:56px;position:relative;color:#202c44;cursor:pointer}.accordion_header .accButton{position:absolute;right:24px;top:calc(50% - 16px);border-radius:8px;contain:inherit;-webkit-transition:height 0.5s, all 0.3s;-moz-transition:height 0.5s, all 0.3s;transition:height 0.5s, all 0.3s}.accordion_header .accButton__isopen{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.accordion_header .accButton::before{content:\"\";position:absolute;inset:-4px;border:2px solid transparent;border-radius:4px}.accordion_header .accButton:focus{outline:none}.accordion_header .accButton:focus::before{border-color:#c226fb}.accordion_header .accButton:hover{background-color:#f2f2f2}.accordion_header .accButton:active{background-color:#e6e6e6}.accordion_body{height:0;overflow:hidden;border-bottom:1px solid #b9cbd3;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.accordion_body .container{padding:0 24px 48px;position:relative;color:#202c44}";
4
+
5
+ const AccordionBody = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.container = null;
9
+ this.isOpen = false;
10
+ this.numberElement = null;
11
+ this.refContainer = (el) => {
12
+ this.container = el;
13
+ };
14
+ }
15
+ async toggle() {
16
+ this.isOpen = !this.isOpen;
17
+ }
18
+ async close() {
19
+ this.isOpen = false;
20
+ }
21
+ async reciveNumber(number) {
22
+ this.numberElement = number;
23
+ }
24
+ isOpenChanged() {
25
+ this.heightContainer = this.isOpen ? this.container.offsetHeight : 0;
26
+ }
27
+ render() {
28
+ return (h("div", { class: "accordion_body", style: { height: `${this.heightContainer}px` } }, h("div", { class: "container", ref: (el) => this.refContainer(el) }, h("slot", null))));
29
+ }
30
+ static get watchers() { return {
31
+ "isOpen": ["isOpenChanged"]
32
+ }; }
33
+ };
34
+ AccordionBody.style = accordionCss;
35
+
36
+ export { AccordionBody as bds_accordion_body };
@@ -0,0 +1,38 @@
1
+ import { r as registerInstance, h, g as getElement } from './index-a2cd05b6.js';
2
+
3
+ const accordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .accordion_header{display:grid;grid-auto-flow:column;gap:24px;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;padding:24px;padding-right:56px;position:relative;color:#202c44;cursor:pointer}.accordion_header .accButton{position:absolute;right:24px;top:calc(50% - 16px);border-radius:8px;contain:inherit;-webkit-transition:height 0.5s, all 0.3s;-moz-transition:height 0.5s, all 0.3s;transition:height 0.5s, all 0.3s}.accordion_header .accButton__isopen{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.accordion_header .accButton::before{content:\"\";position:absolute;inset:-4px;border:2px solid transparent;border-radius:4px}.accordion_header .accButton:focus{outline:none}.accordion_header .accButton:focus::before{border-color:#c226fb}.accordion_header .accButton:hover{background-color:#f2f2f2}.accordion_header .accButton:active{background-color:#e6e6e6}.accordion_body{height:0;overflow:hidden;border-bottom:1px solid #b9cbd3;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.accordion_body .container{padding:0 24px 48px;position:relative;color:#202c44}";
4
+
5
+ const AccordionGroup = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.accheaders = null;
9
+ this.accBodies = null;
10
+ /**
11
+ * Focus Selected. Used to add title in header accordion.
12
+ */
13
+ this.collapse = 'default';
14
+ }
15
+ async closeAll(actNumber) {
16
+ if (this.collapse == 'default') {
17
+ for (let i = 0; i < this.accBodies.length; i++) {
18
+ if (actNumber != i)
19
+ this.accBodies[i].close() && this.accheaders[i].close();
20
+ }
21
+ }
22
+ }
23
+ componentWillRender() {
24
+ this.accheaders = this.element.getElementsByTagName('bds-accordion-header');
25
+ this.accBodies = this.element.getElementsByTagName('bds-accordion-body');
26
+ for (let i = 0; i < this.accheaders.length; i++) {
27
+ this.accheaders[i].reciveNumber(i);
28
+ this.accBodies[i].reciveNumber(i);
29
+ }
30
+ }
31
+ render() {
32
+ return (h("div", { class: "accordion_group" }, h("slot", null)));
33
+ }
34
+ get element() { return getElement(this); }
35
+ };
36
+ AccordionGroup.style = accordionCss;
37
+
38
+ export { AccordionGroup as bds_accordion_group };
@@ -0,0 +1,55 @@
1
+ import { r as registerInstance, h, g as getElement } from './index-a2cd05b6.js';
2
+
3
+ const accordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .accordion_header{display:grid;grid-auto-flow:column;gap:24px;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;padding:24px;padding-right:56px;position:relative;color:#202c44;cursor:pointer}.accordion_header .accButton{position:absolute;right:24px;top:calc(50% - 16px);border-radius:8px;contain:inherit;-webkit-transition:height 0.5s, all 0.3s;-moz-transition:height 0.5s, all 0.3s;transition:height 0.5s, all 0.3s}.accordion_header .accButton__isopen{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.accordion_header .accButton::before{content:\"\";position:absolute;inset:-4px;border:2px solid transparent;border-radius:4px}.accordion_header .accButton:focus{outline:none}.accordion_header .accButton:focus::before{border-color:#c226fb}.accordion_header .accButton:hover{background-color:#f2f2f2}.accordion_header .accButton:active{background-color:#e6e6e6}.accordion_body{height:0;overflow:hidden;border-bottom:1px solid #b9cbd3;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.accordion_body .container{padding:0 24px 48px;position:relative;color:#202c44}";
4
+
5
+ const AccordionHeader = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.accGroup = null;
9
+ this.accNextBody = null;
10
+ this.isOpen = false;
11
+ this.numberElement = null;
12
+ /**
13
+ * Accordion Title. Used to add title in header accordion.
14
+ */
15
+ this.accordionTitle = null;
16
+ /**
17
+ * Icon. Used to add icon in header accordion.
18
+ */
19
+ this.icon = null;
20
+ /**
21
+ * Avatar Name. Used to add avatar in header accordion.
22
+ */
23
+ this.avatarName = null;
24
+ /**
25
+ * Avatar Thumb. Used to add avatar in header accordion.
26
+ */
27
+ this.avatarThumb = null;
28
+ this.toggle = () => {
29
+ var _a, _b;
30
+ this.isOpen = !this.isOpen;
31
+ (_a = this.accNextBody) === null || _a === void 0 ? void 0 : _a.toggle();
32
+ (_b = this.accGroup) === null || _b === void 0 ? void 0 : _b.closeAll(this.numberElement);
33
+ };
34
+ }
35
+ async close() {
36
+ this.isOpen = false;
37
+ }
38
+ async reciveNumber(number) {
39
+ this.numberElement = number;
40
+ }
41
+ componentWillRender() {
42
+ this.accGroup = this.element.parentElement;
43
+ this.accNextBody = this.element.nextElementSibling;
44
+ }
45
+ render() {
46
+ return (h("div", { onClick: this.toggle, class: { accordion_header: true } }, this.avatarName || this.avatarThumb ? (h("bds-avatar", { name: this.avatarName, thumbnail: this.avatarThumb, size: "extra-small" })) : (this.icon && h("bds-icon", { size: "x-large", name: "tag", color: "inherit" })), this.accordionTitle && (h("bds-typo", { bold: "bold", variant: "fs-16" }, this.accordionTitle)), h("slot", null), this.accNextBody && (h("bds-icon", { class: {
47
+ accButton: true,
48
+ accButton__isopen: this.isOpen,
49
+ }, size: "x-large", name: "arrow-down", color: "inherit", tabindex: "0", onKeyPress: this.toggle }))));
50
+ }
51
+ get element() { return getElement(this); }
52
+ };
53
+ AccordionHeader.style = accordionCss;
54
+
55
+ export { AccordionHeader as bds_accordion_header };
@@ -29,23 +29,29 @@ const ChipClickable = class {
29
29
  */
30
30
  this.disabled = false;
31
31
  }
32
- handleClick(event) {
33
- if (event.key === 'Enter' && !this.disabled) {
32
+ handleClickKey(event) {
33
+ if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
34
34
  event.preventDefault();
35
35
  this.chipClickableClick.emit();
36
36
  }
37
37
  }
38
- handleCloseChip(event) {
39
- const key = 'Enter';
40
- if (event.key === key && !this.disabled) {
38
+ handleClick(event) {
39
+ if (!this.disabled) {
41
40
  event.preventDefault();
42
- this.chipClickableClose.emit({ id: this.element.id });
41
+ this.chipClickableClick.emit();
43
42
  }
44
- else {
43
+ }
44
+ handleCloseChip(event) {
45
+ event.preventDefault();
46
+ this.chipClickableClose.emit({ id: this.element.id });
47
+ this.visible = false;
48
+ }
49
+ handleCloseKey(event) {
50
+ if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
45
51
  event.preventDefault();
46
52
  this.chipClickableClose.emit({ id: this.element.id });
53
+ this.visible = false;
47
54
  }
48
- this.visible = false;
49
55
  }
50
56
  getSizeAvatarChip() {
51
57
  if (this.size === 'tall') {
@@ -69,7 +75,7 @@ const ChipClickable = class {
69
75
  'chip_clickable--hide': !this.visible,
70
76
  'chip_clickable--click': this.clickable,
71
77
  'chip_clickable--disabled': this.disabled,
72
- }, onClick: this.handleClick.bind(this) }, this.clickable && !this.disabled && (h("div", { class: "chip_focus", onKeyDown: this.handleClick.bind(this), tabindex: "0" })), this.clickable && !this.disabled && h("div", { class: "chip_darker" }), this.icon && !this.avatar && (h("div", { class: "chip_clickable--icon" }, h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))), this.avatar && (h("div", { class: "chip_clickable--avatar" }, h("bds-avatar", { size: this.getSizeAvatarChip(), thumbnail: this.avatar }))), h("bds-typo", { class: "chip_clickable--text", variant: "fs-12", bold: "bold" }, h("slot", null)), this.close && (h("div", { class: "chip_clickable--close", onClick: this.handleCloseChip.bind(this) }, !this.disabled && (h("div", { class: "close_focus", onKeyDown: this.handleCloseChip.bind(this), tabindex: "0" })), h("bds-icon", { size: "x-small", theme: "solid", name: "error" }))))));
78
+ }, onClick: this.handleClick.bind(this) }, this.clickable && !this.disabled && (h("div", { class: "chip_focus", onKeyDown: this.handleClickKey.bind(this), tabindex: "0" })), this.clickable && !this.disabled && h("div", { class: "chip_darker" }), this.icon && !this.avatar && (h("div", { class: "chip_clickable--icon" }, h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))), this.avatar && (h("div", { class: "chip_clickable--avatar" }, h("bds-avatar", { size: this.getSizeAvatarChip(), thumbnail: this.avatar }))), h("bds-typo", { class: "chip_clickable--text", variant: "fs-12", bold: "bold" }, h("slot", null)), this.close && (h("div", { class: "chip_clickable--close", onClick: this.handleCloseChip.bind(this) }, !this.disabled && (h("div", { class: "close_focus", onKeyDown: this.handleCloseKey.bind(this), tabindex: "0" })), h("bds-icon", { size: "x-small", theme: "solid", name: "error" }))))));
73
79
  }
74
80
  get element() { return getElement(this); }
75
81
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-a2cd05b6.js';
2
2
 
3
- const chipSelectedCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); :host(:focus){border:2px solid #c226fb;padding:2px}:host{display:-ms-flexbox;display:flex;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip .chip_darker{position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;width:16px;height:20px;color:#202c44;z-index:2}:host .chip--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#202c44;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip--tall{height:40px;border-radius:24px}:host .chip--default{background-color:#b3d4ff}:host .chip--info{background-color:#80e3eb}:host .chip--success{background-color:#90e6bc}:host .chip--warning{background-color:#fff6a8}:host .chip--danger{background-color:#ffa5a5}:host .chip--outline{background-color:#ffffff;border:1px solid #b9cbd3;padding:2px 3px}:host .chip--outline .chip_darker{height:calc(100% + 2px)}:host .chip:hover{cursor:pointer}:host .chip:hover .chip_darker{-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip:active{cursor:pointer}:host .chip:active .chip_darker{-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip:focus-visible{outline:none}:host .chip_selected{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#ffffff;border:2px solid #3f7de8}:host .chip_selected--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:16px;height:20px;padding-left:4px;color:#125ad5}:host .chip_selected--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#125ad5;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip_selected--tall{height:40px;border-radius:24px}:host .chip_selected:hover{background-color:#e8f2ff;cursor:pointer}:host .chip_selected:active{background-color:#d1e3fa}:host .chip_disabled{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0;background-color:#f3f6fa}:host .chip_disabled--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;width:16px;height:20px;color:#505f79;z-index:2}:host .chip_disabled--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#505f79;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip_disabled--tall{height:40px;border-radius:24px}:host .chip_disabled:hover{cursor:default}";
3
+ const chipSelectedCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); :host{display:-ms-flexbox;display:flex;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip .chip_focus:focus{position:absolute;width:100%;height:100%;padding:2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip .chip_darker{position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;height:20px;color:#202c44;z-index:2}:host .chip--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#202c44;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip--tall{height:40px;border-radius:24px}:host .chip--default{background-color:#b3d4ff}:host .chip--info{background-color:#80e3eb}:host .chip--success{background-color:#90e6bc}:host .chip--warning{background-color:#fff6a8}:host .chip--danger{background-color:#ffa5a5}:host .chip--outline{background-color:#ffffff;border:1px solid #b9cbd3;padding:2px 3px}:host .chip--outline .chip_darker{height:calc(100% + 2px)}:host .chip:hover{cursor:pointer}:host .chip:hover .chip_darker{-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip:active{cursor:pointer}:host .chip:active .chip_darker{-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip:focus-visible{outline:none}:host .chip_selected{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#ffffff;border:2px solid #3f7de8}:host .chip_selected--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-left:4px;color:#125ad5}:host .chip_selected--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#125ad5;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip_selected--tall{height:40px;border-radius:24px}:host .chip_selected:hover{background-color:#e8f2ff;cursor:pointer}:host .chip_selected:active{background-color:#d1e3fa}:host .chip_disabled{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0;background-color:#f3f6fa}:host .chip_disabled--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;width:16px;height:20px;color:#505f79;z-index:2}:host .chip_disabled--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#505f79;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip_disabled--tall{height:40px;border-radius:24px}:host .chip_disabled:hover{cursor:default}";
4
4
 
5
5
  const ChipSelected = class {
6
6
  constructor(hostRef) {
@@ -24,11 +24,9 @@ const ChipSelected = class {
24
24
  */
25
25
  this.disabled = false;
26
26
  }
27
- handleKeyDown(ev) {
28
- if (ev.key === ' ') {
29
- if (this.disabled)
30
- return;
31
- ev.preventDefault();
27
+ handleKeyDown(event) {
28
+ if (event.key === ' ' && !this.disabled) {
29
+ event.preventDefault();
32
30
  if (this.isSelected) {
33
31
  return (this.isSelected = false);
34
32
  }
@@ -66,8 +64,15 @@ const ChipSelected = class {
66
64
  return chipSelected;
67
65
  }
68
66
  }
67
+ getSizeIconChip() {
68
+ if (this.size === 'tall') {
69
+ return 'medium';
70
+ }
71
+ else
72
+ return 'x-small';
73
+ }
69
74
  render() {
70
- return (h(Host, null, h("div", { class: Object.assign(Object.assign({ chip: true }, this.getStyleChip()), this.getDisabledChip()), onClick: this.handleClick, onKeyDown: this.handleKeyDown, tabindex: "0" }, !this.isSelected && !this.disabled && h("div", { class: "chip_darker" }), this.icon && !this.isSelected && (h("div", { class: "chip--icon" }, h("bds-icon", { size: "x-small", name: this.icon }))), this.isSelected && (h("div", { class: "chip_selected--icon" }, h("bds-icon", { size: "x-small", name: "checkball" }))), h("bds-typo", { class: Object.assign({ 'chip--text': true }, this.getStyleText()), variant: "fs-12", "no-wrap": true, bold: "bold" }, h("slot", null)))));
75
+ return (h(Host, null, h("div", { class: Object.assign(Object.assign({ chip: true }, this.getStyleChip()), this.getDisabledChip()), onClick: this.handleClick }, !this.disabled && h("div", { class: "chip_focus", onKeyDown: this.handleKeyDown.bind(this), tabindex: "0" }), !this.isSelected && !this.disabled && h("div", { class: "chip_darker" }), this.icon && !this.isSelected && (h("div", { class: "chip--icon" }, h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))), this.isSelected && (h("div", { class: "chip_selected--icon" }, h("bds-icon", { size: this.getSizeIconChip(), name: "checkball" }))), h("bds-typo", { class: Object.assign({ 'chip--text': true }, this.getStyleText()), variant: "fs-12", "no-wrap": true, bold: "bold" }, h("slot", null)))));
71
76
  }
72
77
  get el() { return getElement(this); }
73
78
  };