@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.
- package/components.json +30 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-shell-navigation-item.cjs.entry.js +6 -2
- package/dist/cjs/swirl-tag.cjs.entry.js +1 -1
- package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.js +26 -2
- package/dist/collection/components/swirl-tag/swirl-tag.css +3 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/swirl-shell-navigation-item.js +7 -2
- package/dist/components/swirl-tag2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-shell-navigation-item.entry.js +6 -2
- package/dist/esm/swirl-tag.entry.js +1 -1
- package/dist/swirl-components/p-ccd7a58d.entry.js +1 -0
- package/dist/swirl-components/p-f6fd9391.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-shell-navigation-item/swirl-shell-navigation-item.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/vscode-data.json +4 -0
- package/dist/swirl-components/p-36655abe.entry.js +0 -1
- package/dist/swirl-components/p-efcb16ef.entry.js +0 -1
package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.js
CHANGED
|
@@ -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: '
|
|
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: '
|
|
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
|
|