@kyndryl-design-system/shidoka-applications 2.36.2 → 2.36.3
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.
|
@@ -46,7 +46,7 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{e}from"../../../ven
|
|
|
46
46
|
line-height: var(--kd-line-height-utility-2-sm);
|
|
47
47
|
font-weight: var(--kd-font-weight-regular);
|
|
48
48
|
letter-spacing: var(--kd-letter-spacing-5);
|
|
49
|
-
font-weight:
|
|
49
|
+
font-weight: 400;
|
|
50
50
|
}
|
|
51
51
|
@media (min-width: 42rem) {
|
|
52
52
|
.breadcrumbs ::slotted(strong) {
|
|
@@ -22,6 +22,8 @@ export declare class Link extends LitElement {
|
|
|
22
22
|
standalone: boolean;
|
|
23
23
|
/** Positions icon on the left. */
|
|
24
24
|
iconLeft: boolean;
|
|
25
|
+
/** Sets font-weight between default heavier and lighter font-weight. */
|
|
26
|
+
linkFontWeight: 'lighter' | 'default';
|
|
25
27
|
render(): import("lit").TemplateResult<1>;
|
|
26
28
|
private returnClassMap;
|
|
27
29
|
private handleClick;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/link/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAIlD;;;;;GAKG;AAEH,qBACa,IAAK,SAAQ,UAAU;IAClC,OAAgB,MAAM,QAAgB;IAEtC,gBAAgB;IAEhB,IAAI,SAAM;IAEV,oIAAoI;IAEpI,MAAM,EAAE,YAAY,CAAqB;IAEzC,oDAAoD;IAEpD,IAAI,EAAE,UAAU,CAAsB;IAEtC,oIAAoI;IAEpI,GAAG,SAAM;IAET,yCAAyC;IAIzC,QAAQ,UAAS;IAEjB,iHAAiH;IAEjH,UAAU,UAAS;IAEnB,kCAAkC;IAElC,QAAQ,UAAS;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/link/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAIlD;;;;;GAKG;AAEH,qBACa,IAAK,SAAQ,UAAU;IAClC,OAAgB,MAAM,QAAgB;IAEtC,gBAAgB;IAEhB,IAAI,SAAM;IAEV,oIAAoI;IAEpI,MAAM,EAAE,YAAY,CAAqB;IAEzC,oDAAoD;IAEpD,IAAI,EAAE,UAAU,CAAsB;IAEtC,oIAAoI;IAEpI,GAAG,SAAM;IAET,yCAAyC;IAIzC,QAAQ,UAAS;IAEjB,iHAAiH;IAEjH,UAAU,UAAS;IAEnB,kCAAkC;IAElC,QAAQ,UAAS;IAEjB,wEAAwE;IAExE,cAAc,EAAE,SAAS,GAAG,SAAS,CAAa;IAEzC,MAAM;IAsBf,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,WAAW;CAWpB;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,IAAI,CAAC;KAClB;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as e,e as n}from"../../../vendor/lit-461e78e6.js";import{i as o,s as i,x as l}from"../../../vendor/lit-element-c6c02f24.js";import{e as r}from"../../../vendor/lit-html-29220869.js";import{LINK_TARGETS as a,LINK_TYPES as s}from"./defs.js";var
|
|
1
|
+
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as e,e as n}from"../../../vendor/lit-461e78e6.js";import{i as o,s as i,x as l}from"../../../vendor/lit-element-c6c02f24.js";import{e as r}from"../../../vendor/lit-html-29220869.js";import{LINK_TARGETS as a,LINK_TYPES as s}from"./defs.js";var k=o`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -51,6 +51,9 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as e,e as n}from"
|
|
|
51
51
|
.kyn-link-text-secondary:active {
|
|
52
52
|
color: var(--kd-color-text-link-level-pressed);
|
|
53
53
|
}
|
|
54
|
+
.kyn-link-text-font-lighter {
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
}
|
|
54
57
|
.kyn-link-text-disabled {
|
|
55
58
|
cursor: not-allowed;
|
|
56
59
|
color: var(--kd-color-text-link-level-disabled);
|
|
@@ -111,7 +114,7 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as e,e as n}from"
|
|
|
111
114
|
}
|
|
112
115
|
.kyn-link-text-secondary-ai.kyn-link-text-disabled {
|
|
113
116
|
color: var(--kd-color-background-link-ai-disabled);
|
|
114
|
-
}`;let
|
|
117
|
+
}`;let d=class extends i{constructor(){super(...arguments),this.href="",this.target=a.SELF,this.kind=s.PRIMARY,this.rel="",this.disabled=!1,this.standalone=!1,this.iconLeft=!1,this.linkFontWeight="default"}render(){const t=this.returnClassMap();return l`
|
|
115
118
|
<a
|
|
116
119
|
class="kyn-link-text ${t}"
|
|
117
120
|
target=${this.target}
|
|
@@ -127,5 +130,5 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as e,e as n}from"
|
|
|
127
130
|
<slot name="icon"></slot>
|
|
128
131
|
</span>
|
|
129
132
|
</a>
|
|
130
|
-
`}returnClassMap(){const t={"kyn-link-text-disabled":this.disabled,"icon-left":this.iconLeft,"kyn-link-text-ai":this.kind===s.AI_CONNECTED};return this.disabled?r(t):r({...t,"kyn-link-text-primary":this.kind===s.PRIMARY||!this.kind,"kyn-link-text-secondary":this.kind===s.SECONDARY,"kyn-link-text-secondary-ai":this.kind===s.SECONDARY_AI,"kyn-link-text-inline":!this.standalone,"kyn-link-text-standalone":this.standalone})}handleClick(t){if(this.disabled)return void t.preventDefault();const e=new CustomEvent("on-click",{detail:{href:this.href,origEvent:t}});this.dispatchEvent(e)}};
|
|
133
|
+
`}returnClassMap(){const t={"kyn-link-text-disabled":this.disabled,"icon-left":this.iconLeft,"kyn-link-text-ai":this.kind===s.AI_CONNECTED,"kyn-link-text-font-lighter":"lighter"===this.linkFontWeight};return this.disabled?r(t):r({...t,"kyn-link-text-primary":this.kind===s.PRIMARY||!this.kind,"kyn-link-text-secondary":this.kind===s.SECONDARY,"kyn-link-text-secondary-ai":this.kind===s.SECONDARY_AI,"kyn-link-text-inline":!this.standalone,"kyn-link-text-standalone":this.standalone})}handleClick(t){if(this.disabled)return void t.preventDefault();const e=new CustomEvent("on-click",{detail:{href:this.href,origEvent:t}});this.dispatchEvent(e)}};d.styles=[k],t([e({type:String})],d.prototype,"href",void 0),t([e({type:String})],d.prototype,"target",void 0),t([e({type:String})],d.prototype,"kind",void 0),t([e({type:String})],d.prototype,"rel",void 0),t([e({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),t([e({type:Boolean})],d.prototype,"standalone",void 0),t([e({type:Boolean})],d.prototype,"iconLeft",void 0),t([e({type:String})],d.prototype,"linkFontWeight",void 0),d=t([n("kyn-link")],d);export{d as Link};
|
|
131
134
|
//# sourceMappingURL=link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["../../../../src/components/reusable/link/link.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { LINK_TYPES, LINK_TARGETS } from './defs';\n\nimport LinkStyles from './link.scss';\n\n/**\n * Component for navigation links.\n * @fires on-click - Captures the click event and emits the original event details.\n * @slot unnamed - Slot for link text.\n * @slot icon - Slot for an icon.\n */\n\n@customElement('kyn-link')\nexport class Link extends LitElement {\n static override styles = [LinkStyles];\n\n /** Link url. */\n @property({ type: String })\n href = '';\n\n /** Defines a target attribute for where to load the URL. Possible options include \"_self\" (default), \"_blank\", \"_parent\", \"_top\" */\n @property({ type: String })\n target: LINK_TARGETS = LINK_TARGETS.SELF;\n\n /** The Link type. Primary(App) or Secondary(Web).*/\n @property({ type: String })\n kind: LINK_TYPES = LINK_TYPES.PRIMARY;\n\n /** Defines a relationship between a linked resource and the document. An empty string (default) means no particular relationship */\n @property({ type: String })\n rel = '';\n\n /** Determines if the link is disabled.*/\n // Reference for disabled links:\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Whether you want the standalone Link. By default false. Use this prop. (true) with icon with link variant. */\n @property({ type: Boolean })\n standalone = false;\n\n /** Positions icon on the left. */\n @property({ type: Boolean })\n iconLeft = false;\n\n override render() {\n const classes = this.returnClassMap();\n\n return html`\n <a\n class=\"kyn-link-text ${classes}\"\n target=${this.target}\n part=\"link\"\n rel=${this.rel}\n href=${this.href ? this.href : 'javascript:void(0)'}\n ?disabled=${this.disabled}\n aria-disabled=${this.disabled}\n @click=${(e: Event) => this.handleClick(e)}\n >\n <span class=\"kyn-link-text-span-flex\">\n <slot></slot>\n <slot name=\"icon\"></slot>\n </span>\n </a>\n `;\n }\n // -- Apply classes according to states, kind etc. -- //\n private returnClassMap() {\n const baseClasses = {\n 'kyn-link-text-disabled': this.disabled,\n 'icon-left': this.iconLeft,\n 'kyn-link-text-ai': this.kind === LINK_TYPES.AI_CONNECTED,\n };\n\n if (this.disabled) {\n return classMap(baseClasses);\n } else {\n return classMap({\n ...baseClasses,\n 'kyn-link-text-primary': this.kind === LINK_TYPES.PRIMARY || !this.kind,\n 'kyn-link-text-secondary': this.kind === LINK_TYPES.SECONDARY,\n 'kyn-link-text-secondary-ai': this.kind === LINK_TYPES.SECONDARY_AI,\n 'kyn-link-text-inline': !this.standalone,\n 'kyn-link-text-standalone': this.standalone,\n });\n }\n }\n\n private handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n const event = new CustomEvent('on-click', {\n detail: { href: this.href, origEvent: e },\n });\n this.dispatchEvent(event);\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-link': Link;\n }\n}\n"],"names":["Link","LitElement","constructor","this","href","target","LINK_TARGETS","SELF","kind","LINK_TYPES","PRIMARY","rel","disabled","standalone","iconLeft","render","classes","returnClassMap","html","e","handleClick","baseClasses","AI_CONNECTED","classMap","SECONDARY","SECONDARY_AI","preventDefault","event","CustomEvent","detail","origEvent","dispatchEvent","styles","LinkStyles","__decorate","property","type","String","prototype","Boolean","reflect","customElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../../../../src/components/reusable/link/link.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { LINK_TYPES, LINK_TARGETS } from './defs';\n\nimport LinkStyles from './link.scss';\n\n/**\n * Component for navigation links.\n * @fires on-click - Captures the click event and emits the original event details.\n * @slot unnamed - Slot for link text.\n * @slot icon - Slot for an icon.\n */\n\n@customElement('kyn-link')\nexport class Link extends LitElement {\n static override styles = [LinkStyles];\n\n /** Link url. */\n @property({ type: String })\n href = '';\n\n /** Defines a target attribute for where to load the URL. Possible options include \"_self\" (default), \"_blank\", \"_parent\", \"_top\" */\n @property({ type: String })\n target: LINK_TARGETS = LINK_TARGETS.SELF;\n\n /** The Link type. Primary(App) or Secondary(Web).*/\n @property({ type: String })\n kind: LINK_TYPES = LINK_TYPES.PRIMARY;\n\n /** Defines a relationship between a linked resource and the document. An empty string (default) means no particular relationship */\n @property({ type: String })\n rel = '';\n\n /** Determines if the link is disabled.*/\n // Reference for disabled links:\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Whether you want the standalone Link. By default false. Use this prop. (true) with icon with link variant. */\n @property({ type: Boolean })\n standalone = false;\n\n /** Positions icon on the left. */\n @property({ type: Boolean })\n iconLeft = false;\n\n /** Sets font-weight between default heavier and lighter font-weight. */\n @property({ type: String })\n linkFontWeight: 'lighter' | 'default' = 'default';\n\n override render() {\n const classes = this.returnClassMap();\n\n return html`\n <a\n class=\"kyn-link-text ${classes}\"\n target=${this.target}\n part=\"link\"\n rel=${this.rel}\n href=${this.href ? this.href : 'javascript:void(0)'}\n ?disabled=${this.disabled}\n aria-disabled=${this.disabled}\n @click=${(e: Event) => this.handleClick(e)}\n >\n <span class=\"kyn-link-text-span-flex\">\n <slot></slot>\n <slot name=\"icon\"></slot>\n </span>\n </a>\n `;\n }\n // -- Apply classes according to states, kind etc. -- //\n private returnClassMap() {\n const baseClasses = {\n 'kyn-link-text-disabled': this.disabled,\n 'icon-left': this.iconLeft,\n 'kyn-link-text-ai': this.kind === LINK_TYPES.AI_CONNECTED,\n 'kyn-link-text-font-lighter': this.linkFontWeight === 'lighter',\n };\n\n if (this.disabled) {\n return classMap(baseClasses);\n } else {\n return classMap({\n ...baseClasses,\n 'kyn-link-text-primary': this.kind === LINK_TYPES.PRIMARY || !this.kind,\n 'kyn-link-text-secondary': this.kind === LINK_TYPES.SECONDARY,\n 'kyn-link-text-secondary-ai': this.kind === LINK_TYPES.SECONDARY_AI,\n 'kyn-link-text-inline': !this.standalone,\n 'kyn-link-text-standalone': this.standalone,\n });\n }\n }\n\n private handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n const event = new CustomEvent('on-click', {\n detail: { href: this.href, origEvent: e },\n });\n this.dispatchEvent(event);\n }\n}\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-link': Link;\n }\n}\n"],"names":["Link","LitElement","constructor","this","href","target","LINK_TARGETS","SELF","kind","LINK_TYPES","PRIMARY","rel","disabled","standalone","iconLeft","linkFontWeight","render","classes","returnClassMap","html","e","handleClick","baseClasses","AI_CONNECTED","classMap","SECONDARY","SECONDARY_AI","preventDefault","event","CustomEvent","detail","origEvent","dispatchEvent","styles","LinkStyles","__decorate","property","type","String","prototype","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