@kyndryl-design-system/shidoka-applications 2.44.1 → 2.45.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/common/helpers/popoverHelper.d.ts +25 -0
- package/common/helpers/popoverHelper.d.ts.map +1 -0
- package/common/helpers/popoverHelper.js +2 -0
- package/common/helpers/popoverHelper.js.map +1 -0
- package/components/global/footer/footer.js +2 -2
- package/components/global/header/headerNav.js +2 -2
- package/components/global/localNav/localNavDivider.js +4 -4
- package/components/reusable/blockCodeView/blockCodeView.js +4 -4
- package/components/reusable/checkbox/checkboxSubgroup.js +3 -3
- package/components/reusable/floatingContainer/floatingContainer.js +3 -3
- package/components/reusable/loaders/inline.js +3 -3
- package/components/reusable/overflowMenu/overflowMenuItem.js +1 -1
- package/components/reusable/popover/index.d.ts +2 -0
- package/components/reusable/popover/index.d.ts.map +1 -0
- package/components/reusable/popover/index.js +2 -0
- package/components/reusable/popover/index.js.map +1 -0
- package/components/reusable/popover/popover.d.ts +225 -0
- package/components/reusable/popover/popover.d.ts.map +1 -0
- package/components/reusable/popover/popover.js +503 -0
- package/components/reusable/popover/popover.js.map +1 -0
- package/components/reusable/table/index.js +1 -1
- package/components/reusable/table/table-cell.js +2 -2
- package/components/reusable/table/table-head.js +2 -2
- package/components/reusable/table/table.js +1 -1
- package/components/reusable/table/table.skeleton.js +1 -1
- package/components/reusable/tabs/tabPanel.js +2 -2
- package/components/reusable/tag/tag.skeleton.js +4 -4
- package/components/reusable/tag/tag.skeleton.js.map +1 -1
- package/components/reusable/tag/tagGroup.js +3 -3
- package/components/reusable/widget/widgetDragHandle.js +3 -3
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -1
- package/{table-46e2880a.js → table-fea5d926.js} +3 -3
- package/{table-46e2880a.js.map → table-fea5d926.js.map} +1 -1
- package/vendor/@floating-ui/core-53cddde9.js +2 -0
- package/vendor/@floating-ui/core-53cddde9.js.map +1 -0
- package/vendor/@floating-ui/dom-3403b61f.js +2 -0
- package/vendor/@floating-ui/dom-3403b61f.js.map +1 -0
- package/vendor/@floating-ui/utils-fd11b2ca.js +2 -0
- package/vendor/@floating-ui/utils-fd11b2ca.js.map +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/dom';
|
|
2
|
+
export type PositionType = 'fixed' | 'absolute';
|
|
3
|
+
export interface Coords {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const autoPosition: (anchor: HTMLElement, panel: HTMLElement, arrowEl: HTMLElement, placementOverride: Placement | undefined, opts?: {
|
|
8
|
+
offsetDistance?: number;
|
|
9
|
+
shiftPadding?: number;
|
|
10
|
+
positionType?: PositionType;
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
placement: string;
|
|
15
|
+
arrowX?: number | undefined;
|
|
16
|
+
arrowY?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const handleFocusKeyboardEvents: (panel: HTMLElement) => {
|
|
19
|
+
previouslyFocusedElement: HTMLElement | null;
|
|
20
|
+
focusableElements: NodeListOf<HTMLElement>;
|
|
21
|
+
keyboardListener: ((e: Event) => void) | null;
|
|
22
|
+
};
|
|
23
|
+
export declare const getPanelStyle: (positionType: PositionType, zIndex: number | undefined, triggerType: string, coords: Coords, top?: string, left?: string, bottom?: string, right?: string) => string;
|
|
24
|
+
export declare const removeFocusListener: (panel: HTMLElement | null, keyboardListener: ((e: Event) => void) | null, previouslyFocusedElement: HTMLElement | null) => void;
|
|
25
|
+
//# sourceMappingURL=popoverHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popoverHelper.d.ts","sourceRoot":"","sources":["../../../src/common/helpers/popoverHelper.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhD,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAID,eAAO,MAAM,YAAY,WACf,WAAW,SACZ,WAAW,WACT,WAAW,qBACD,SAAS,GAAG,SAAS,SAClC;IACJ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;OAEE,MAAM;OACN,MAAM;eACE,MAAM;;;EAiDlB,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,WAAW;8BAEQ,WAAW,GAAG,IAAI;uBACzB,WAAW,WAAW,CAAC;2BACnB,KAAK,KAAK,IAAI;CA6DtC,CAAC;AAEF,eAAO,MAAM,aAAa,iBACV,YAAY,UAClB,MAAM,GAAG,SAAS,eACb,MAAM,UACX,MAAM,QACR,MAAM,SACL,MAAM,WACJ,MAAM,UACP,MAAM,KACb,MAmBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,UACvB,WAAW,GAAG,IAAI,yBACF,KAAK,KAAK,IAAI,oCACX,WAAW,GAAG,IAAI,KAC3C,IAOF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,o as t,f as o,s as n,a,b as r}from"../../vendor/@floating-ui/dom-3403b61f.js";import"../../vendor/@floating-ui/core-53cddde9.js";import"../../vendor/@floating-ui/utils-fd11b2ca.js";const i=async(i,s,l,c,d={})=>{var f,m,p;const u=null!=c?c:"bottom",h=null!==(f=d.offsetDistance)&&void 0!==f?f:u.startsWith("bottom")?16:u.startsWith("top")?4:u.startsWith("left")?12:16,v=null!==(m=d.shiftPadding)&&void 0!==m?m:u.startsWith("bottom")||u.startsWith("top")?26:u.startsWith("left")?40:20,{x:g,y:w,placement:y,middlewareData:b}=await e(i,s,{strategy:d.positionType,placement:u,middleware:[t(h),o(),n({padding:v}),a({element:l,padding:6}),r({apply({availableWidth:e,availableHeight:t,elements:o}){Object.assign(o.floating.style,{maxWidth:`${e}px`,maxHeight:`${t}px`})}})]}),{x:x,y:$}=null!==(p=b.arrow)&&void 0!==p?p:{};return{x:g,y:w,placement:y,arrowX:x,arrowY:$}},s=e=>{const t=document.activeElement,o=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');let n=null;return o.length&&(n=e=>{const t=e;if("Tab"!==t.key){if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(t.key)){t.preventDefault();const e=Array.from(o),n=e.indexOf(document.activeElement);let a=n;switch(t.key){case"ArrowUp":case"ArrowLeft":a=n>0?n-1:e.length-1;break;case"ArrowDown":case"ArrowRight":a=n<e.length-1?n+1:0;break;case"Home":a=0;break;case"End":a=e.length-1}e[a].focus()}}else{const e=o[0],n=o[o.length-1];t.shiftKey&&document.activeElement===e?(t.preventDefault(),n.focus()):t.shiftKey||document.activeElement!==n||(t.preventDefault(),e.focus())}},e.addEventListener("keydown",n)),{previouslyFocusedElement:t,focusableElements:o,keyboardListener:n}},l=(e,t,o,n,a,r,i,s)=>{let l="";const c=e||"fixed";return void 0!==t&&(l+=`z-index: ${t};`),"none"!==o?`position: ${c}; top: ${n.top}px; left: ${n.left}px; ${l}`:(l+=`position: ${c};`,a&&(l+=`top: ${a};`),r&&(l+=`left: ${r};`),i&&(l+=`bottom: ${i};`),s&&(l+=`right: ${s};`),l)},c=(e,t,o)=>{t&&e&&e.removeEventListener("keydown",t),o&&o.focus()};export{i as autoPosition,l as getPanelStyle,s as handleFocusKeyboardEvents,c as removeFocusListener};
|
|
2
|
+
//# sourceMappingURL=popoverHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popoverHelper.js","sources":["../../../src/common/helpers/popoverHelper.ts"],"sourcesContent":["/**\n * Helper functions for positioning + managing popover panels using the `@floating-ui/dom` library.\n *\n * Provides utilities for:\n * - automatically positioning popover panels relative to anchor elements, including arrow positioning\n * - managing keyboard focus within popover panels for accessibility\n * - generating and applying CSS styles for panel positioning\n * - supporting responsive positioning rules\n * - cleaning up focus when panels are closed\n *\n * @see {@link https://floating-ui.com/}\n */\nimport {\n computePosition,\n offset,\n flip,\n shift,\n arrow,\n size,\n} from '@floating-ui/dom';\nimport type { Placement } from '@floating-ui/dom';\n\nexport type PositionType = 'fixed' | 'absolute';\n\nexport interface Coords {\n top: number;\n left: number;\n}\n\nconst DEFAULT_ARROW_PADDING = 6;\n\nexport const autoPosition = async (\n anchor: HTMLElement,\n panel: HTMLElement,\n arrowEl: HTMLElement,\n placementOverride: Placement | undefined,\n opts: {\n offsetDistance?: number;\n shiftPadding?: number;\n positionType?: PositionType;\n } = {}\n): Promise<{\n x: number;\n y: number;\n placement: string;\n arrowX?: number;\n arrowY?: number;\n}> => {\n const placement = placementOverride ?? 'bottom';\n\n const baseOffset =\n opts.offsetDistance ??\n (placement.startsWith('bottom')\n ? 16\n : placement.startsWith('top')\n ? 4\n : placement.startsWith('left')\n ? 12\n : 16);\n const baseShift =\n opts.shiftPadding ??\n (placement.startsWith('bottom') || placement.startsWith('top')\n ? 26\n : placement.startsWith('left')\n ? 40\n : 20);\n\n const {\n x,\n y,\n placement: finalPlacement,\n middlewareData,\n } = await computePosition(anchor, panel, {\n strategy: opts.positionType,\n placement,\n middleware: [\n offset(baseOffset),\n flip(),\n shift({ padding: baseShift }),\n arrow({ element: arrowEl, padding: DEFAULT_ARROW_PADDING }),\n size({\n apply({ availableWidth, availableHeight, elements }) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n maxHeight: `${availableHeight}px`,\n });\n },\n }),\n ],\n });\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow ?? {};\n return { x, y, placement: finalPlacement, arrowX, arrowY };\n};\n\nexport const handleFocusKeyboardEvents = (\n panel: HTMLElement\n): {\n previouslyFocusedElement: HTMLElement | null;\n focusableElements: NodeListOf<HTMLElement>;\n keyboardListener: ((e: Event) => void) | null;\n} => {\n const previouslyFocusedElement = document.activeElement as HTMLElement;\n const focusableElements = panel.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n let keyboardListener: ((e: Event) => void) | null = null;\n\n if (focusableElements.length) {\n keyboardListener = (e: Event) => {\n const keyEvent = e as KeyboardEvent;\n if (keyEvent.key === 'Tab') {\n const first = focusableElements[0];\n const last = focusableElements[focusableElements.length - 1];\n if (keyEvent.shiftKey && document.activeElement === first) {\n keyEvent.preventDefault();\n last.focus();\n } else if (!keyEvent.shiftKey && document.activeElement === last) {\n keyEvent.preventDefault();\n first.focus();\n }\n return;\n }\n if (\n [\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n ].includes(keyEvent.key)\n ) {\n keyEvent.preventDefault();\n const arr = Array.from(focusableElements);\n const idx = arr.indexOf(document.activeElement as HTMLElement);\n let next = idx;\n switch (keyEvent.key) {\n case 'ArrowUp':\n case 'ArrowLeft':\n next = idx > 0 ? idx - 1 : arr.length - 1;\n break;\n case 'ArrowDown':\n case 'ArrowRight':\n next = idx < arr.length - 1 ? idx + 1 : 0;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = arr.length - 1;\n break;\n }\n arr[next].focus();\n }\n };\n\n panel.addEventListener('keydown', keyboardListener);\n }\n\n return { previouslyFocusedElement, focusableElements, keyboardListener };\n};\n\nexport const getPanelStyle = (\n positionType: PositionType,\n zIndex: number | undefined,\n triggerType: string,\n coords: Coords,\n top?: string,\n left?: string,\n bottom?: string,\n right?: string\n): string => {\n let style = '';\n const pos = positionType || 'fixed';\n\n if (zIndex !== undefined) {\n style += `z-index: ${zIndex};`;\n }\n\n if (triggerType !== 'none') {\n return `position: ${pos}; top: ${coords.top}px; left: ${coords.left}px; ${style}`;\n }\n\n style += `position: ${pos};`;\n if (top) style += `top: ${top};`;\n if (left) style += `left: ${left};`;\n if (bottom) style += `bottom: ${bottom};`;\n if (right) style += `right: ${right};`;\n\n return style;\n};\n\nexport const removeFocusListener = (\n panel: HTMLElement | null,\n keyboardListener: ((e: Event) => void) | null,\n previouslyFocusedElement: HTMLElement | null\n): void => {\n if (keyboardListener && panel) {\n panel.removeEventListener('keydown', keyboardListener);\n }\n if (previouslyFocusedElement) {\n previouslyFocusedElement.focus();\n }\n};\n"],"names":["autoPosition","async","anchor","panel","arrowEl","placementOverride","opts","placement","baseOffset","_a","offsetDistance","startsWith","baseShift","_b","shiftPadding","x","y","finalPlacement","middlewareData","computePosition","strategy","positionType","middleware","offset","flip","shift","padding","arrow","element","size","apply","availableWidth","availableHeight","elements","Object","assign","floating","style","maxWidth","maxHeight","arrowX","arrowY","_c","handleFocusKeyboardEvents","previouslyFocusedElement","document","activeElement","focusableElements","querySelectorAll","keyboardListener","length","e","keyEvent","key","includes","preventDefault","arr","Array","from","idx","indexOf","next","focus","first","last","shiftKey","addEventListener","getPanelStyle","zIndex","triggerType","coords","top","left","bottom","right","pos","undefined","removeFocusListener","removeEventListener"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as t,o,e}from"../../../vendor/lit-461e78e6.js";import{i as
|
|
1
|
+
import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as t,o,e as r}from"../../../vendor/lit-461e78e6.js";import{i as e,s as n,x as l}from"../../../vendor/lit-element-c6c02f24.js";import{a}from"../../../vendor/lit-html-f7a86fe5.js";import{l as d}from"../../../vendor/@kyndryl-design-system/shidoka-foundation-2d7bab68.js";var s=e`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -120,5 +120,5 @@ import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as t,o,e}from"../
|
|
|
120
120
|
</a>
|
|
121
121
|
</div>
|
|
122
122
|
</footer>
|
|
123
|
-
`}handleRootLinkClick(i){const t=new CustomEvent("on-root-link-click",{detail:{origEvent:i}});this.dispatchEvent(t)}};m.styles=s,i([t({type:String})],m.prototype,"rootUrl",void 0),i([t({type:String})],m.prototype,"logoAriaLabel",void 0),m=i([
|
|
123
|
+
`}handleRootLinkClick(i){const t=new CustomEvent("on-root-link-click",{detail:{origEvent:i}});this.dispatchEvent(t)}};m.styles=s,i([t({type:String})],m.prototype,"rootUrl",void 0),i([t({type:String})],m.prototype,"logoAriaLabel",void 0),m=i([r("kyn-footer")],m);export{m as Footer};
|
|
124
124
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{o as t}from"../../../vendor/lit-html-f7a86fe5.js";import{t as o,n as i,o as n,e as r}from"../../../vendor/lit-461e78e6.js";import{i as a,s as d,x as l}from"../../../vendor/lit-element-c6c02f24.js";import{e as
|
|
1
|
+
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{o as t}from"../../../vendor/lit-html-f7a86fe5.js";import{t as o,n as i,o as n,e as r}from"../../../vendor/lit-461e78e6.js";import{i as a,s as d,x as l}from"../../../vendor/lit-element-c6c02f24.js";import{e as c,m as s}from"../../../vendor/@kyndryl-design-system/shidoka-icons-ffe2ac15.js";var u=a`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -258,7 +258,7 @@ import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{o as t}from"../../.
|
|
|
258
258
|
title="Toggle Menu"
|
|
259
259
|
@click=${()=>this._toggleMenuOpen()}
|
|
260
260
|
>
|
|
261
|
-
${this.menuOpen?l` <span>${t(
|
|
261
|
+
${this.menuOpen?l` <span>${t(c)}</span> `:l` <span>${t(s)}</span> `}
|
|
262
262
|
</button>
|
|
263
263
|
|
|
264
264
|
<div class="menu__content left">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as e,t,e as r}from"../../../vendor/lit-461e78e6.js";import{i as d,s as n,x as
|
|
1
|
+
import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as e,t,e as r}from"../../../vendor/lit-461e78e6.js";import{i as d,s as n,x as a}from"../../../vendor/lit-element-c6c02f24.js";var o=d`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -82,10 +82,10 @@ import{_ as i}from"../../../vendor/tslib-53a81efe.js";import{n as e,t,e as r}fro
|
|
|
82
82
|
font-size: var(--kd-font-size-utility-3-max);
|
|
83
83
|
line-height: var(--kd-line-height-utility-3-max);
|
|
84
84
|
}
|
|
85
|
-
}`;let l=class extends n{constructor(){super(...arguments),this.heading="",this._navExpanded=!1}render(){return
|
|
85
|
+
}`;let l=class extends n{constructor(){super(...arguments),this.heading="",this._navExpanded=!1}render(){return a`
|
|
86
86
|
<div class="divider ${this._navExpanded?"nav-expanded":""}">
|
|
87
|
-
${""!==this.heading?
|
|
87
|
+
${""!==this.heading?a` <div class="heading">${this.heading}</div> `:null}
|
|
88
88
|
<slot></slot>
|
|
89
89
|
</div>
|
|
90
|
-
`}};l.styles=
|
|
90
|
+
`}};l.styles=o,i([e({type:String})],l.prototype,"heading",void 0),i([t()],l.prototype,"_navExpanded",void 0),l=i([r("kyn-local-nav-divider")],l);export{l as LocalNavDivider};
|
|
91
91
|
//# sourceMappingURL=localNavDivider.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{o as t}from"../../../vendor/lit-html-f7a86fe5.js";import{n as o,t as i,b as n,o as a,e as r}from"../../../vendor/lit-461e78e6.js";import{i as s,s as l,x as d}from"../../../vendor/lit-element-c6c02f24.js";import{d as c}from"../../../vendor/deepmerge-ts-e62363e6.js";import{P as
|
|
1
|
+
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{o as t}from"../../../vendor/lit-html-f7a86fe5.js";import{n as o,t as i,b as n,o as a,e as r}from"../../../vendor/lit-461e78e6.js";import{i as s,s as l,x as d}from"../../../vendor/lit-element-c6c02f24.js";import{d as c}from"../../../vendor/deepmerge-ts-e62363e6.js";import{P as h}from"../../../vendor/prismjs-860c2ccc.js";import{M as p,N as g,f as m}from"../../../vendor/@kyndryl-design-system/shidoka-icons-ffe2ac15.js";import"../button/button.js";import"../../../vendor/flatpickr-bbd13d61.js";import"../../../common/helpers/helpers.js";import"../button/defs.js";var u=s`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -597,7 +597,7 @@ code.language-git:before {
|
|
|
597
597
|
.shidoka-syntax-theme .code-snippet-wrapper pre *::-moz-selection {
|
|
598
598
|
background-color: light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.3));
|
|
599
599
|
color: inherit;
|
|
600
|
-
}`;
|
|
600
|
+
}`;h.plugins.autoloader.languages_path="node_modules/prismjs/components/";const v={collapsed:"Collapsed",expanded:"Expanded"},y={markup:["<",">","/","div","span","class","id"],html:["<",">","/","div","span","class","id"],css:["{","}",":",";","#","."],javascript:["function","const","let","var","=>"],typescript:["interface","type",":","as"],python:["def","import","from","class"],java:["public","private","class","void"]};let b=class extends l{constructor(){super(...arguments),this.darkTheme="default",this.language="",this.lineNumbers=!1,this.startLineNumber=1,this.maxHeight=null,this.codeViewLabel="",this.copyOptionVisible=!1,this.codeViewExpandable=!1,this.copyButtonText="",this.copyButtonDescriptionAttr="",this.codeSnippet="",this.textStrings=v,this._textStrings=v,this._isSingleLine=!1,this.hasOverflow=!1,this.codeExpanded=!1,this._copyState={copied:!1,text:""},this._effectiveLanguage="",this._codeFitsContainerOnLoad=!0,this._expandedHeight=null}updated(e){e.has("darkTheme")&&this.requestUpdate();const t=e.has("codeSnippet")||e.has("language")||e.has("maxHeight");e.has("lineNumbers")?setTimeout((()=>{this.highlightCode(),this.checkOverflow()}),0):t&&(this.highlightCode(),this.checkOverflow()),e.has("copyButtonText")&&(this._copyState={...this._copyState,text:this.copyButtonText}),e.has("startLineNumber")&&(this.startLineNumber<1&&(this.startLineNumber=1),this.highlightCode()),super.updated(e)}render(){const e=`${this.getContainerStyle()};`;return d`
|
|
601
601
|
${this.codeViewLabel?d`<div class="code-view__label">
|
|
602
602
|
<label>${this.codeViewLabel}</label>
|
|
603
603
|
</div>`:null}
|
|
@@ -625,7 +625,7 @@ code.language-git:before {
|
|
|
625
625
|
@click=${this.copyCode}
|
|
626
626
|
>
|
|
627
627
|
<span slot="icon" class="copy-icon"
|
|
628
|
-
>${this._copyState.copied?t(
|
|
628
|
+
>${this._copyState.copied?t(p):t(g)}</span
|
|
629
629
|
>
|
|
630
630
|
${this._copyState.text?d`<span class="copy-text">${this._copyState.text}</span>`:null}
|
|
631
631
|
</kyn-button>
|
|
@@ -641,5 +641,5 @@ code.language-git:before {
|
|
|
641
641
|
>
|
|
642
642
|
<span slot="icon" class="expand-icon">${t(m)}</span>
|
|
643
643
|
</kyn-button>
|
|
644
|
-
`}willUpdate(e){e.has("codeExpanded")&&(this._textStrings=c(v,this.textStrings))}highlightCode(){var e;const t=this.removeLeadingWhitespace(this.codeSnippet);this._isSingleLine=1===t.trim().split("\n").length,this._effectiveLanguage=this.language||this.detectLanguage(t);const o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("pre"),i=null==o?void 0:o.querySelector("code");if(!i||!o)return;const n=o.querySelector(".line-numbers-rows");n&&n.remove(),i.className=`language-${this._effectiveLanguage}`,i.textContent=t,this.lineNumbers&&!this._isSingleLine?(o.classList.add("line-numbers"),o.setAttribute("data-start",String(this.startLineNumber))):(o.classList.remove("line-numbers"),o.removeAttribute("data-start")),setTimeout((()=>{
|
|
644
|
+
`}willUpdate(e){e.has("codeExpanded")&&(this._textStrings=c(v,this.textStrings))}highlightCode(){var e;const t=this.removeLeadingWhitespace(this.codeSnippet);this._isSingleLine=1===t.trim().split("\n").length,this._effectiveLanguage=this.language||this.detectLanguage(t);const o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("pre"),i=null==o?void 0:o.querySelector("code");if(!i||!o)return;const n=o.querySelector(".line-numbers-rows");n&&n.remove(),i.className=`language-${this._effectiveLanguage}`,i.textContent=t,this.lineNumbers&&!this._isSingleLine?(o.classList.add("line-numbers"),o.setAttribute("data-start",String(this.startLineNumber))):(o.classList.remove("line-numbers"),o.removeAttribute("data-start")),setTimeout((()=>{h.highlightElement(i),setTimeout((()=>{var e;if(this.lineNumbers)try{(null===(e=h.plugins)||void 0===e?void 0:e.lineNumbers)&&(o.querySelector(".line-numbers-rows")||(h.hooks.run("complete",{element:i}),h.plugins.lineNumbers.resize(o))),o.querySelector(".line-numbers-rows")||this.addLineNumbers(o,i)}catch(e){console.warn("Line numbers initialization error:",e),this.addLineNumbers(o,i)}this.checkOverflow()}),50)}),0)}addLineNumbers(e,t){if(e.querySelector(".line-numbers-rows"))return;const o=(t.textContent||"").split("\n").length,i=Math.max(1,parseInt(e.getAttribute("data-start")||"1",10)),n=document.createElement("span");n.className="line-numbers-rows";const a=Array(o).fill("<span></span>").join("");n.innerHTML=a,e.appendChild(n),e.style.counterReset="linenumber "+(i-1)}detectLanguage(e){if(!e.trim())return"plaintext";const t=["markup","html","xml","svg","mathml","css","javascript","typescript","python","java","c","cpp"];let o={language:"plaintext",relevance:0};for(const i of t)if(h.languages[i]){const t=h.tokenize(e,h.languages[i]),n=this.calculateRelevance(t,i);n>o.relevance&&(o={language:i,relevance:n})}return"markup"===o.language?this.determineMarkupLanguage(e):o.language}calculateRelevance(e,t){return e.reduce(((e,o)=>("string"!=typeof o&&(e+=this.getTokenRelevance(o,t)),e)),0)}getTokenRelevance(e,t){let o=1+(e.alias?Array.isArray(e.alias)?e.alias.length:1:0);return this.isLanguageSpecificToken(e,t)&&(o+=2),e.content&&(Array.isArray(e.content)?o+=e.content.reduce(((e,o)=>e+("string"==typeof o?0:this.getTokenRelevance(o,t))),0):"string"!=typeof e.content&&(o+=this.getTokenRelevance(e.content,t))),o}isLanguageSpecificToken(e,t){return(y[t]||[]).some((t=>e.content.toString().includes(t)))}determineMarkupLanguage(e){return/<\/?[a-z][\s\S]*>/i.test(e)?"html":/<\?xml/i.test(e)?"xml":/<svg/i.test(e)?"svg":/<math/i.test(e)?"mathml":"markup"}checkOverflow(){setTimeout((()=>{requestAnimationFrame((()=>{var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".code-snippet-wrapper"),o=null==t?void 0:t.querySelector("pre");if(o&&t){const e=o.scrollHeight,i=this.codeExpanded?this._expandedHeight||t.clientHeight:null!==this.maxHeight?this.maxHeight:t.clientHeight;this.hasOverflow=e>i,this._codeFitsContainerOnLoad=e<=(this.maxHeight||t.clientHeight)}}))}),100)}removeLeadingWhitespace(e){if(!e)return"";const t=e.split("\n"),o=t.reduce(((e,t)=>{const o=t.match(/^[ \t]*/),i=o?o[0].length:0;return t.trim().length?Math.min(e,i):e}),1/0);return t.map((e=>e.slice(o))).join("\n").trim()}formatExampleCode(e){return{code:e}}copyCode(e){const t=this._copyState.text;navigator.clipboard.writeText(this.codeSnippet).then((()=>{this._copyState={copied:!0,text:t.length>1?"Copied!":""},this.requestUpdate(),this.dispatchEvent(new CustomEvent("on-copy",{detail:{origEvent:e,fullSnippet:this.formatExampleCode(this.codeSnippet)}})),setTimeout((()=>{this._copyState={copied:!1,text:t},this.requestUpdate()}),5e3)})).catch((e=>console.error("Failed to copy code:",e)))}getContainerStyle(){return this.codeExpanded?this._expandedHeight?`max-height: ${this._expandedHeight}px`:"":null!==this.maxHeight?`max-height: ${this.maxHeight}px`:""}expandCodeView(){var e;if(this.codeExpanded=!this.codeExpanded,this.codeExpanded){const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("pre");this._expandedHeight=(null==t?void 0:t.scrollHeight)||null}else this._expandedHeight=null;this.requestUpdate(),setTimeout((()=>this.checkOverflow()),0)}handleKeypress(e){const t=e.currentTarget,o=t.scrollHeight>t.clientHeight,i=t.scrollWidth>t.clientWidth;"ArrowDown"===e.key||"ArrowUp"===e.key?o&&(t.scrollTop+="ArrowDown"===e.key?40:-40,e.preventDefault()):"ArrowRight"!==e.key&&"ArrowLeft"!==e.key||i&&(t.scrollLeft+="ArrowRight"===e.key?40:-40,e.preventDefault())}};b.styles=[u,k],e([o({type:String})],b.prototype,"darkTheme",void 0),e([o({type:String})],b.prototype,"language",void 0),e([o({type:Boolean})],b.prototype,"lineNumbers",void 0),e([o({type:Number})],b.prototype,"startLineNumber",void 0),e([o({type:Number})],b.prototype,"maxHeight",void 0),e([o({type:String})],b.prototype,"codeViewLabel",void 0),e([o({type:Boolean})],b.prototype,"copyOptionVisible",void 0),e([o({type:Boolean})],b.prototype,"codeViewExpandable",void 0),e([o({type:String})],b.prototype,"copyButtonText",void 0),e([o({type:String})],b.prototype,"copyButtonDescriptionAttr",void 0),e([o({type:String})],b.prototype,"codeSnippet",void 0),e([o({type:Object})],b.prototype,"textStrings",void 0),e([i()],b.prototype,"_textStrings",void 0),e([i()],b.prototype,"_isSingleLine",void 0),e([i()],b.prototype,"hasOverflow",void 0),e([i()],b.prototype,"codeExpanded",void 0),e([i()],b.prototype,"_copyState",void 0),e([i()],b.prototype,"_effectiveLanguage",void 0),e([i()],b.prototype,"_codeFitsContainerOnLoad",void 0),e([i()],b.prototype,"_expandedHeight",void 0),b=e([r("kyn-block-code-view")],b);export{b as BlockCodeView};
|
|
645
645
|
//# sourceMappingURL=blockCodeView.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{l as t,e as n}from"../../../vendor/lit-461e78e6.js";import{i as
|
|
1
|
+
import{_ as e}from"../../../vendor/tslib-53a81efe.js";import{l as t,e as n}from"../../../vendor/lit-461e78e6.js";import{i as h,s as c,x as l}from"../../../vendor/lit-element-c6c02f24.js";var a=h`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -18,12 +18,12 @@ slot[name=parent] {
|
|
|
18
18
|
|
|
19
19
|
.children {
|
|
20
20
|
padding-left: 26px;
|
|
21
|
-
}`;let o=class extends
|
|
21
|
+
}`;let o=class extends c{render(){return l`
|
|
22
22
|
<div class="toggle-button">
|
|
23
23
|
<slot name="parent" @slotchange=${this._handleSlotchange}></slot>
|
|
24
24
|
<div class="children">
|
|
25
25
|
<slot @slotchange=${this._handleSlotchange}></slot>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
`}_handleSlotchange(){const e=this._children.filter((e=>e.checked)).length;this._syncParent(e)}_syncParent(e){this._parent[0].indeterminate=e<this._children.length&&e>0}_handleCheckboxChange(e){e.stopPropagation();const t=e.composedPath().find((e=>"SLOT"===e.nodeName&&"parent"===e.getAttribute("name")));let n=this._children.filter((e=>e.checked)).length;t?n=e.detail.checked?this._children.length:0:e.detail.checked?n+=1:n-=1,this._syncParent(n);const
|
|
28
|
+
`}_handleSlotchange(){const e=this._children.filter((e=>e.checked)).length;this._syncParent(e)}_syncParent(e){this._parent[0].indeterminate=e<this._children.length&&e>0}_handleCheckboxChange(e){e.stopPropagation();const t=e.composedPath().find((e=>"SLOT"===e.nodeName&&"parent"===e.getAttribute("name")));let n=this._children.filter((e=>e.checked)).length;t?n=e.detail.checked?this._children.length:0:e.detail.checked?n+=1:n-=1,this._syncParent(n);const h=this._children.map((e=>e.value)),c=this._children.length>0&&n===this._children.length,l=new CustomEvent("on-checkbox-subgroup-change",{bubbles:!0,composed:!0,detail:{isParent:t,parentChecked:c,parentValue:this._parent[0].value,checked:e.detail.checked,value:e.detail.value,childValues:h}});this.dispatchEvent(l)}connectedCallback(){super.connectedCallback(),this.addEventListener("on-checkbox-change",(e=>this._handleCheckboxChange(e)))}disconnectedCallback(){this.removeEventListener("on-checkbox-change",(e=>this._handleCheckboxChange(e))),super.disconnectedCallback()}};o.styles=a,e([t({slot:"parent",selector:"kyn-checkbox"})],o.prototype,"_parent",void 0),e([t({selector:"kyn-checkbox"})],o.prototype,"_children",void 0),o=e([n("kyn-checkbox-subgroup")],o);export{o as CheckboxSubgroup};
|
|
29
29
|
//# sourceMappingURL=checkboxSubgroup.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{e as r}from"../../../vendor/lit-461e78e6.js";import{i as
|
|
1
|
+
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{e as r}from"../../../vendor/lit-461e78e6.js";import{i as o,s as e,x as i}from"../../../vendor/lit-element-c6c02f24.js";var a=o`:host {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -8,9 +8,9 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{e as r}from"../../.
|
|
|
8
8
|
right: var(--kd-page-gutter);
|
|
9
9
|
bottom: var(--kd-spacing-24);
|
|
10
10
|
gap: var(--kd-spacing-8);
|
|
11
|
-
}`;let
|
|
11
|
+
}`;let n=class extends e{render(){return i`
|
|
12
12
|
<div class="floating-btn-wrapper">
|
|
13
13
|
<slot></slot>
|
|
14
14
|
</div>
|
|
15
|
-
`}};
|
|
15
|
+
`}};n.styles=a,n=t([r("kyn-button-float-container")],n);export{n as FloatingContainer};
|
|
16
16
|
//# sourceMappingURL=floatingContainer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{o as i}from"../../../vendor/lit-html-f7a86fe5.js";import{n as e,t as s,i as a,o as r,e as o}from"../../../vendor/lit-461e78e6.js";import{i as n,s as d,x as p}from"../../../vendor/lit-element-c6c02f24.js";import{l as m}from"../../../vendor/lottie-web-9ccae634.js";import{l as c,g as k}from"../../../vendor/@kyndryl-design-system/shidoka-icons-ffe2ac15.js";import"../../../vendor/flatpickr-bbd13d61.js";var
|
|
1
|
+
import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{o as i}from"../../../vendor/lit-html-f7a86fe5.js";import{n as e,t as s,i as a,o as r,e as o}from"../../../vendor/lit-461e78e6.js";import{i as n,s as d,x as p}from"../../../vendor/lit-element-c6c02f24.js";import{l as m}from"../../../vendor/lottie-web-9ccae634.js";import{l as c,g as k}from"../../../vendor/@kyndryl-design-system/shidoka-icons-ffe2ac15.js";import"../../../vendor/flatpickr-bbd13d61.js";var h={v:"4.8.0",meta:{g:"LottieFiles AE 3.5.7",a:"",k:"",d:"",tc:""},fr:30,ip:0,op:60,w:500,h:500,nm:"Indeterminate Load",ddd:0,assets:[{id:"comp_0",layers:[{ddd:0,ind:1,ty:4,nm:"Loader",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[325,325,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[90,90,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[500,500],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:500,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:!1},{ty:"tm",s:{a:0,k:100,ix:1},e:{a:0,k:75,ix:2},o:{a:1,k:[{i:{x:[.833],y:[.587]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:99,s:[1440]}],ix:3,x:"var $bm_rt;\n$bm_rt = loopOut();"},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[.160784319043,.439215689898,.478431373835,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:10,s:[.215686276555,.592156887054,.643137276173,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:20,s:[.160784319043,.439215689898,.478431373835,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[.215686276555,.592156887054,.643137276173,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:40,s:[.160784319043,.439215689898,.478431373835,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:50,s:[.215686276555,.592156887054,.643137276173,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:60,s:[.160784319043,.439215689898,.478431373835,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:70,s:[.215686276555,.592156887054,.643137276173,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:80,s:[.160784319043,.439215689898,.478431373835,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:90,s:[.215686276555,.592156887054,.643137276173,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:100,s:[.160784319043,.439215689898,.478431373835,1]},{t:110,s:[.215686276555,.592156887054,.643137276173,1]}],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:50,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"gf",o:{a:0,k:100,ix:10},r:1,bm:0,g:{p:3,k:{a:0,k:[0,1,.275,.176,.5,.592,.388,.363,1,.184,.502,.549],ix:9}},s:{a:0,k:[0,0],ix:5},e:{a:0,k:[100,0],ix:6},t:1,nm:"Gradient Fill 1",mn:"ADBE Vector Graphic - G-Fill",hd:!0},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Red",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[500,500],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:500,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:!1},{ty:"tm",s:{a:0,k:100,ix:1},e:{a:0,k:0,ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!0},{ty:"st",c:{a:0,k:[.960784316063,.956862747669,.952941179276,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:50,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"gf",o:{a:0,k:100,ix:10},r:1,bm:0,g:{p:3,k:{a:0,k:[0,1,.275,.176,.5,.592,.388,.363,1,.184,.502,.549],ix:9}},s:{a:0,k:[0,0],ix:5},e:{a:0,k:[100,0],ix:6},t:1,nm:"Gradient Fill 1",mn:"ADBE Vector Graphic - G-Fill",hd:!0},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Base",np:4,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1}],ip:0,op:60,st:0,bm:0}]}],layers:[{ddd:0,ind:1,ty:0,nm:"Loader ",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[250,250,0],ix:2},a:{a:0,k:[325,325,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,w:650,h:650,ip:0,op:60,st:0,bm:0}],markers:[]},l=n`*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -111,7 +111,7 @@ svg {
|
|
|
111
111
|
}
|
|
112
112
|
.status-error .error {
|
|
113
113
|
opacity: 1;
|
|
114
|
-
}`;let
|
|
114
|
+
}`;let x=class extends d{constructor(){super(...arguments),this.status="active",this._stopped=!1,this._hidden=!1}render(){const t={wrapper:!0,stopped:this._stopped,hidden:this._hidden,"status-success":"success"===this.status,"status-error":"error"===this.status};return p`
|
|
115
115
|
<div class="${r(t)}">
|
|
116
116
|
<div class="container"></div>
|
|
117
117
|
|
|
@@ -121,5 +121,5 @@ svg {
|
|
|
121
121
|
|
|
122
122
|
<slot></slot>
|
|
123
123
|
</div>
|
|
124
|
-
`}firstUpdated(){this._stopped="active"!==this.status,this._hidden=this._stopped,m.loadAnimation({container:this._containerEl,renderer:"svg",loop:!0,autoplay:!0,animationData:
|
|
124
|
+
`}firstUpdated(){this._stopped="active"!==this.status,this._hidden=this._stopped,m.loadAnimation({container:this._containerEl,renderer:"svg",loop:!0,autoplay:!0,animationData:h}),this._containerEl.addEventListener("transitionend",(()=>{this._stopped&&(this._hidden=!0,this._emitStop())}))}updated(t){t.has("status")&&("active"===this.status?(this._stopped=!1,this._hidden=!1,this._emitStart()):this._stopped=!0)}_emitStart(){const t=new CustomEvent("on-start");this.dispatchEvent(t)}_emitStop(){const t=new CustomEvent("on-stop");this.dispatchEvent(t)}};x.styles=l,t([e({type:String})],x.prototype,"status",void 0),t([s()],x.prototype,"_stopped",void 0),t([s()],x.prototype,"_hidden",void 0),t([a(".container")],x.prototype,"_containerEl",void 0),x=t([o("kyn-loader-inline")],x);export{x as LoaderInline};
|
|
125
125
|
//# sourceMappingURL=inline.js.map
|
|
@@ -107,5 +107,5 @@ import{_ as t}from"../../../vendor/tslib-53a81efe.js";import{n as o,t as e,o as
|
|
|
107
107
|
<slot></slot>
|
|
108
108
|
${this.destructive?l`<span class="sr-only">${this.description}</span>`:null}
|
|
109
109
|
</button>
|
|
110
|
-
`}handleClick(t){const o=new CustomEvent("on-click",{detail:{origEvent:t}});this.dispatchEvent(o)}handleKeyDown(t){var o,e,i,r,n,s,l,d,a,u,
|
|
110
|
+
`}handleClick(t){const o=new CustomEvent("on-click",{detail:{origEvent:t}});this.dispatchEvent(o)}handleKeyDown(t){var o,e,i,r,n,s,l,d,a,c,u,h;const v=this._menuItems.length,p=document.activeElement,m=this._menuItems.indexOf(p);switch(t.keyCode){case 40:if(m<v-1){const t=this._menuItems[m+1];t&&((null===(o=t.shadowRoot)||void 0===o?void 0:o.querySelector("button"))?null===(i=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===i||i.focus():null===(n=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelector("a"))||void 0===n||n.focus())}return;case 38:if(m>0){const t=this._menuItems[m-1];t&&((null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector("button"))?null===(d=null===(l=t.shadowRoot)||void 0===l?void 0:l.querySelector("button"))||void 0===d||d.focus():null===(c=null===(a=t.shadowRoot)||void 0===a?void 0:a.querySelector("a"))||void 0===c||c.focus())}else 0===m&&(null===(h=null===(u=this._menu)||void 0===u?void 0:u.querySelector("button"))||void 0===h||h.focus());return;default:return}}firstUpdated(){const t=this.closest("kyn-overflow-menu");t&&(this._menuItems=t.getMenuItems(),this._menu=t.getMenu()),this.checkOverflow()}checkOverflow(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("button, a");if(e instanceof HTMLElement&&(this.isTruncated=e.scrollWidth>e.offsetWidth,this.isTruncated)){let t="";t+=null===(o=this.textContent)||void 0===o?void 0:o.trim(),this.tooltipText=t}}};a.styles=d,t([o({type:String})],a.prototype,"href",void 0),t([o({type:Boolean})],a.prototype,"destructive",void 0),t([o({type:Boolean})],a.prototype,"disabled",void 0),t([o({type:String})],a.prototype,"description",void 0),t([e()],a.prototype,"_menuItems",void 0),t([e()],a.prototype,"_menu",void 0),t([e()],a.prototype,"isTruncated",void 0),t([e()],a.prototype,"tooltipText",void 0),a=t([r("kyn-overflow-menu-item")],a);export{a as OverflowMenuItem};
|
|
111
111
|
//# sourceMappingURL=overflowMenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{Popover}from"./popover.js";import"../../../vendor/tslib-53a81efe.js";import"../../../vendor/lit-html-f7a86fe5.js";import"../../../vendor/lit-461e78e6.js";import"../../../vendor/lit-element-c6c02f24.js";import"../../../vendor/@floating-ui/dom-3403b61f.js";import"../../../vendor/@floating-ui/core-53cddde9.js";import"../../../vendor/@floating-ui/utils-fd11b2ca.js";import"../../../common/helpers/popoverHelper.js";import"../button/button.js";import"../../../common/helpers/helpers.js";import"../button/defs.js";import"../link/link.js";import"../link/defs.js";import"../../../vendor/@kyndryl-design-system/shidoka-icons-ffe2ac15.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { PositionType, Coords } from '../../../common/helpers/popoverHelper';
|
|
3
|
+
import '../button';
|
|
4
|
+
import '../link';
|
|
5
|
+
/**
|
|
6
|
+
* Popover component.
|
|
7
|
+
*
|
|
8
|
+
* Two positioning modes are available:
|
|
9
|
+
* - anchor: positioned relative to an anchor slot element
|
|
10
|
+
* - floating: manually positioned via top/left/bottom/right properties
|
|
11
|
+
*
|
|
12
|
+
* For anchor mode, the popover will be positioned relative to the anchor element
|
|
13
|
+
* based on the direction property. The position can be fixed or absolute.
|
|
14
|
+
*
|
|
15
|
+
* For floating (manual) mode, set triggerType="none" and use top/left/bottom/right
|
|
16
|
+
* properties to position the popover.
|
|
17
|
+
*
|
|
18
|
+
* @slot unnamed - The main popover slotted body content
|
|
19
|
+
* @slot anchor - The trigger element (icon, button, link, etc.)
|
|
20
|
+
* @slot footerLink - Optional link to be displayed in the footer
|
|
21
|
+
*
|
|
22
|
+
* @fires on-close - Emitted when any action closes the popover
|
|
23
|
+
* @fires on-open - Emitted when popover opens
|
|
24
|
+
*/
|
|
25
|
+
export declare class Popover extends LitElement {
|
|
26
|
+
static styles: any[];
|
|
27
|
+
/**
|
|
28
|
+
* Manual direction or auto (anchor mode only)
|
|
29
|
+
*/
|
|
30
|
+
direction: 'top' | 'right' | 'bottom' | 'left' | 'auto';
|
|
31
|
+
/**
|
|
32
|
+
* Position type: fixed (default) or absolute
|
|
33
|
+
* - fixed: positions relative to the viewport
|
|
34
|
+
* - absolute: positions relative to the nearest positioned ancestor
|
|
35
|
+
*/
|
|
36
|
+
positionType: PositionType;
|
|
37
|
+
/**
|
|
38
|
+
* Size variants for the popover.
|
|
39
|
+
*/
|
|
40
|
+
size: 'mini' | 'narrow' | 'wide';
|
|
41
|
+
/**
|
|
42
|
+
* Distance between anchor and popover (px)
|
|
43
|
+
* Controls how far the popover is positioned from its anchor element
|
|
44
|
+
*/
|
|
45
|
+
offsetDistance: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Padding from viewport edges (px)
|
|
48
|
+
*/
|
|
49
|
+
shiftPadding: number | undefined;
|
|
50
|
+
/** how we style the anchor slot */
|
|
51
|
+
triggerType: 'icon' | 'link' | 'button' | 'none';
|
|
52
|
+
/** Optional manual offset for tooltip-like triangular shaped arrow.
|
|
53
|
+
* When set, this will override the automatic arrow positioning.
|
|
54
|
+
*/
|
|
55
|
+
arrowPosition?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Controls the popover's open state.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Setting to `true`:
|
|
61
|
+
* - dispatches `on-open`
|
|
62
|
+
* - starts Floating-UI `autoUpdate` to track repositioning
|
|
63
|
+
* - saves the anchor element for focus restoration
|
|
64
|
+
*
|
|
65
|
+
* Setting to `false`:
|
|
66
|
+
* - dispatches `on-close`
|
|
67
|
+
* - stops floating-ui `autoUpdate`
|
|
68
|
+
* - restores focus to the saved anchor element
|
|
69
|
+
*/
|
|
70
|
+
get open(): boolean;
|
|
71
|
+
set open(value: boolean);
|
|
72
|
+
/**
|
|
73
|
+
* Animation duration in milliseconds
|
|
74
|
+
*/
|
|
75
|
+
animationDuration: number;
|
|
76
|
+
/** Top position value. */
|
|
77
|
+
top?: string;
|
|
78
|
+
/** Left position value. */
|
|
79
|
+
left?: string;
|
|
80
|
+
/** Bottom position value. */
|
|
81
|
+
bottom?: string;
|
|
82
|
+
/** Right position value. */
|
|
83
|
+
right?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Changes the primary button styles to indicate a destructive action
|
|
86
|
+
*/
|
|
87
|
+
destructive: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Z-index for the popover.
|
|
90
|
+
*/
|
|
91
|
+
zIndex?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Responsive breakpoints for adjusting position.
|
|
94
|
+
*/
|
|
95
|
+
responsivePosition?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Body title text
|
|
98
|
+
*/
|
|
99
|
+
titleText: string;
|
|
100
|
+
/**
|
|
101
|
+
* Body subtitle/label
|
|
102
|
+
*/
|
|
103
|
+
labelText: string;
|
|
104
|
+
/**
|
|
105
|
+
* OK button label
|
|
106
|
+
*/
|
|
107
|
+
okText: string;
|
|
108
|
+
/**
|
|
109
|
+
* Cancel button label
|
|
110
|
+
*/
|
|
111
|
+
cancelText: string;
|
|
112
|
+
/**
|
|
113
|
+
* Close button description text
|
|
114
|
+
*/
|
|
115
|
+
closeText: string;
|
|
116
|
+
/**
|
|
117
|
+
* Accessible name for the popover dialog
|
|
118
|
+
* Used as aria-label when no title is present
|
|
119
|
+
*/
|
|
120
|
+
popoverAriaLabel: string;
|
|
121
|
+
/**
|
|
122
|
+
* Secondary button text
|
|
123
|
+
*/
|
|
124
|
+
secondaryButtonText: string;
|
|
125
|
+
/**
|
|
126
|
+
* Show or hide the secondary button
|
|
127
|
+
*/
|
|
128
|
+
showSecondaryButton: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Tertiary button text
|
|
131
|
+
*/
|
|
132
|
+
tertiaryButtonText: string;
|
|
133
|
+
/**
|
|
134
|
+
* Show or hide the tertiary button
|
|
135
|
+
*/
|
|
136
|
+
showTertiaryButton: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Text to display for an optional link in the footer.
|
|
139
|
+
*/
|
|
140
|
+
footerLinkText: string;
|
|
141
|
+
/**
|
|
142
|
+
* URL for the optional footer link.
|
|
143
|
+
*/
|
|
144
|
+
footerLinkHref: string;
|
|
145
|
+
/**
|
|
146
|
+
* Target for the footer link (ex: "_blank" for new tab).
|
|
147
|
+
* If empty, defaults to same tab.
|
|
148
|
+
*/
|
|
149
|
+
footerLinkTarget: '_self' | '_blank' | '_parent' | '_top';
|
|
150
|
+
/**
|
|
151
|
+
* Hide the entire footer
|
|
152
|
+
*/
|
|
153
|
+
hideFooter: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* The computed panel coordinates for positioning.
|
|
156
|
+
* Contains `top` and `left` in pixels.
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
_panelCoords: Coords;
|
|
160
|
+
/**
|
|
161
|
+
* The computed direction of the popover panel when `direction="auto"`.
|
|
162
|
+
* 'top', 'bottom', 'left', or 'right'.
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
_calculatedDirection: string;
|
|
166
|
+
/**
|
|
167
|
+
* The computed anchor alignment relative to the trigger element.
|
|
168
|
+
* 'start', 'center', or 'end'.
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
_anchorPosition: string;
|
|
172
|
+
/**
|
|
173
|
+
* Keyboard event listener attached to trap focus within the popover.
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
private _keyboardListener;
|
|
177
|
+
/**
|
|
178
|
+
* Previously focused element before the popover opened, so it can be restored on close.
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
private _prevFocused;
|
|
182
|
+
/**
|
|
183
|
+
* Cleanup callback for any automatic update routines.
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
private _autoUpdateCleanup;
|
|
187
|
+
/**
|
|
188
|
+
* Popover open state.
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
private _open;
|
|
192
|
+
render(): TemplateResult<1>;
|
|
193
|
+
private _renderMini;
|
|
194
|
+
private _renderStandard;
|
|
195
|
+
connectedCallback(): void;
|
|
196
|
+
disconnectedCallback(): void;
|
|
197
|
+
updated(changed: Map<string, unknown>): void;
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
private _getPanelStyle;
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
private _onKeyDown;
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
private _handleAction;
|
|
210
|
+
private _toggle;
|
|
211
|
+
private _close;
|
|
212
|
+
/**
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
private _handleAnchorKeydown;
|
|
216
|
+
private _handleFocusKeyboardEvents;
|
|
217
|
+
private _removeFocusListener;
|
|
218
|
+
private _position;
|
|
219
|
+
}
|
|
220
|
+
declare global {
|
|
221
|
+
interface HTMLElementTagNameMap {
|
|
222
|
+
'kyn-popover': Popover;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/popover/popover.ts"],"names":[],"mappings":"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"}
|