@getflip/swirl-components 0.387.0 → 0.389.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.
@@ -8,6 +8,7 @@ export class SwirlShellNavigationItem {
8
8
  this.hideLabel = false;
9
9
  this.inlineLabelColor = "default";
10
10
  this.markAsNewLabel = "New";
11
+ this.useCustomIconSize = false;
11
12
  this.variant = "default";
12
13
  }
13
14
  componentWillLoad() {
@@ -17,6 +18,9 @@ export class SwirlShellNavigationItem {
17
18
  this.forceIconProps();
18
19
  }
19
20
  forceIconProps() {
21
+ if (this.useCustomIconSize) {
22
+ return;
23
+ }
20
24
  const iconEl = this.el.querySelector("[slot='icon']");
21
25
  const smallIcon = (this.hideLabel && this.variant === "app-icon") ||
22
26
  this.variant === "default";
@@ -57,9 +61,9 @@ export class SwirlShellNavigationItem {
57
61
  const tooltipContent = this.description
58
62
  ? `${this.label} ${this.description}`
59
63
  : this.label;
60
- return (h(Host, { key: 'eb3cc38916a4a868d447c631b65d2ebfb3c158e5' }, h("swirl-tooltip", { key: '5d38b0bf756b0a845d0ddff0aa6fe2a955da44f8', active: this.hideLabel, content: tooltipContent, delay: 100, position: "right", positioning: "fixed" }, h(Tag, { key: '852f4913ae1c9e90f0ecccf32f14d857321c5694', class: tagClassNames, href: this.href, target: this.target, type: isLink ? undefined : "button", title: !this.hideLabel ? this.label : undefined }, h("span", { key: 'f9de6d6dc253563b0397fbbc42d4bdb5260015fb', class: "shell-navigation-item__icon" }, h("slot", { key: 'e1a0fc498c658f9094c906b8319971af9025883e', name: "icon" })), !this.hideLabel ? (this.variant !== "default" ? (h("span", { class: labelClassNames }, this.label)) : (h("div", { class: "shell-navigation-item__text-wrapper" }, h("span", { class: labelClassNames }, this.label), this.description && (h("span", { class: "shell-navigation-item__description" }, this.description))))) : (h("swirl-visually-hidden", null, h("span", { class: labelClassNames }, this.label))), hasBadge && (h("span", { key: '6697baa3fdc919e7a2b7c8595b871566a6b8eaa2', class: "shell-navigation-item__badge-wrapper" }, h("swirl-badge", { key: 'feadd39faef80c53f72a77e16a5def012d77c53b', "aria-label": this.badgeLabel, class: classnames("shell-navigation-item__badge", {
64
+ return (h(Host, { key: '5f8337a6e328f4b70794c5df34bea4ce004cdbfc' }, h("swirl-tooltip", { key: 'de803be5c5e466daed55cf67c6127f897425e10d', active: this.hideLabel, content: tooltipContent, delay: 100, position: "right", positioning: "fixed" }, h(Tag, { key: '56b42a124385745a2048c1fac11abd75c5f5ea47', class: tagClassNames, href: this.href, target: this.target, type: isLink ? undefined : "button", title: !this.hideLabel ? this.label : undefined }, h("span", { key: 'fe342b65d7beef54084c3fecd2f448bf2cf8e5c8', class: "shell-navigation-item__icon" }, h("slot", { key: '9c1b2a2476fc0235e3241ed57b458a97809ad50a', name: "icon" })), !this.hideLabel ? (this.variant !== "default" ? (h("span", { class: labelClassNames }, this.label)) : (h("div", { class: "shell-navigation-item__text-wrapper" }, h("span", { class: labelClassNames }, this.label), this.description && (h("span", { class: "shell-navigation-item__description" }, this.description))))) : (h("swirl-visually-hidden", null, h("span", { class: labelClassNames }, this.label))), hasBadge && (h("span", { key: '89bb559959dae885912f6af1311c22755cd14af2', class: "shell-navigation-item__badge-wrapper" }, h("swirl-badge", { key: 'b9015202651b5c205849113fcc0e8ce783d18412', "aria-label": this.badgeLabel, class: classnames("shell-navigation-item__badge", {
61
65
  "shell-navigation-item__badge--dot": this.badgeLabel === "",
62
- }), label: this.badgeLabel, size: "xs", variant: this.badgeLabel === "" ? "dot" : "default" }))), showIsNewTag && (h("swirl-tag", { key: 'dd8f48f9940c328b8fae2676e9a3b773a70e12d1', class: "shell-navigation-item__is-new-tag", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "s", variant: "strong" })), showIsNewBadge && (h("swirl-badge", { key: 'ffbfa549236b20fc6fff35a96865386ea7b7517f', class: "shell-navigation-item__is-new-badge", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "xs", variant: "dot" }))))));
66
+ }), label: this.badgeLabel, size: "xs", variant: this.badgeLabel === "" ? "dot" : "default" }))), showIsNewTag && (h("swirl-tag", { key: '9e05640b202bd785e50ae6741804b64c3e1e276a', class: "shell-navigation-item__is-new-tag", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "s", variant: "strong" })), showIsNewBadge && (h("swirl-badge", { key: '30aa107e83bc07394bd7de154109097d0ccf51c4', class: "shell-navigation-item__is-new-badge", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "xs", variant: "dot" }))))));
63
67
  }
64
68
  static get is() { return "swirl-shell-navigation-item"; }
65
69
  static get encapsulation() { return "shadow"; }
@@ -312,6 +316,26 @@ export class SwirlShellNavigationItem {
312
316
  "reflect": false,
313
317
  "defaultValue": "\"New\""
314
318
  },
319
+ "useCustomIconSize": {
320
+ "type": "boolean",
321
+ "attribute": "use-custom-icon-size",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "boolean",
325
+ "resolved": "boolean",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": true,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": ""
333
+ },
334
+ "getter": false,
335
+ "setter": false,
336
+ "reflect": false,
337
+ "defaultValue": "false"
338
+ },
315
339
  "target": {
316
340
  "type": "string",
317
341
  "attribute": "target",
@@ -19,6 +19,9 @@
19
19
  line-height: var(--s-line-height-sm);
20
20
  white-space: nowrap;
21
21
  gap: var(--s-space-4);
22
+ border-style: solid;
23
+ border-width: var(--s-border-width-default);
24
+ border-color: transparent;
22
25
  }
23
26
 
24
27
  .tag--size-s {
@@ -30,8 +33,6 @@
30
33
  }
31
34
 
32
35
  .tag--variant-outline {
33
- border-style: solid;
34
- border-width: var(--s-border-width-default);
35
36
  border-color: var(--s-border-strong);
36
37
  }
37
38