@cds/core 5.6.2 → 5.6.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.
- package/breadcrumb/breadcrumb.element.d.ts +1 -1
- package/breadcrumb/breadcrumb.element.js +1 -1
- package/breadcrumb/breadcrumb.element.js.map +1 -1
- package/button/button.element.d.ts +4 -3
- package/button/button.element.js +1 -1
- package/button/button.element.js.map +1 -1
- package/card/card.element.d.ts +1 -1
- package/card/card.element.js +1 -1
- package/card/card.element.js.map +1 -1
- package/custom-elements.json +32949 -33003
- package/custom-elements.legacy.json +0 -60
- package/internal/motion/interfaces.d.ts +1 -1
- package/internal/utils/global.js +1 -1
- package/internal-components/overlay/overlay.element.d.ts +0 -2
- package/internal-components/overlay/overlay.element.js +1 -1
- package/internal-components/overlay/overlay.element.js.map +1 -1
- package/navigation/navigation-item.element.d.ts +0 -1
- package/navigation/navigation-item.element.js +1 -1
- package/navigation/navigation-item.element.js.map +1 -1
- package/navigation/navigation-start.element.d.ts +0 -1
- package/navigation/navigation-start.element.js +1 -1
- package/navigation/navigation-start.element.js.map +1 -1
- package/navigation/navigation.element.d.ts +0 -1
- package/navigation/navigation.element.js +1 -1
- package/navigation/navigation.element.js.map +1 -1
- package/package.json +1 -1
|
@@ -625,12 +625,6 @@
|
|
|
625
625
|
"name": "cds-breadcrumb",
|
|
626
626
|
"path": "./breadcrumb/breadcrumb.element.d.ts",
|
|
627
627
|
"description": "```typescript\nimport '@cds/core/breadcrumb/register.js';\n```\n\n```html\n<cds-breadcrumb aria-label=\"breadcrumb\">\n <a href=\"/home\" cds-text=\"link\">Home</a>\n <a href=\"/parent\" cds-text=\"link\">Parent page</a>\n <span aria-current=\"page\">Current page</span>\n</cds-breadcrumb>\n```",
|
|
628
|
-
"properties": [
|
|
629
|
-
{
|
|
630
|
-
"name": "role",
|
|
631
|
-
"type": "string"
|
|
632
|
-
}
|
|
633
|
-
],
|
|
634
628
|
"cssProperties": [
|
|
635
629
|
{
|
|
636
630
|
"name": "--font-size"
|
|
@@ -650,12 +644,6 @@
|
|
|
650
644
|
"name": "cds-breadcrumb",
|
|
651
645
|
"path": "./breadcrumb/register.d.ts",
|
|
652
646
|
"description": "```typescript\nimport '@cds/core/breadcrumb/register.js';\n```\n\n```html\n<cds-breadcrumb aria-label=\"breadcrumb\">\n <a href=\"/home\" cds-text=\"link\">Home</a>\n <a href=\"/parent\" cds-text=\"link\">Parent page</a>\n <span aria-current=\"page\">Current page</span>\n</cds-breadcrumb>\n```",
|
|
653
|
-
"properties": [
|
|
654
|
-
{
|
|
655
|
-
"name": "role",
|
|
656
|
-
"type": "string"
|
|
657
|
-
}
|
|
658
|
-
],
|
|
659
647
|
"cssProperties": [
|
|
660
648
|
{
|
|
661
649
|
"name": "--font-size"
|
|
@@ -1098,10 +1086,6 @@
|
|
|
1098
1086
|
"path": "./card/card.element.d.ts",
|
|
1099
1087
|
"description": "Web component card.\n\n```typescript\nimport '@cds/core/card/register.js';\n```\n\n```html\n<cds-card aria-labelledby=\"{label your card}\">\n <div cds-layout=\"vertical gap:md\">\n <h2 id=\"{label your card}\" cds-text=\"section\" cds-layout=\"p-y:sm\">\n <!-- Card title -->\n </h2>\n\n <cds-divider cds-card-remove-margin></cds-divider>\n\n <div cds-text=\"body light\" cds-layout=\"p-y:md\">\n <!-- Card content -->\n </div>\n\n <cds-divider cds-card-remove-margin></cds-divider>\n\n <div cds-layout=\"horizontal gap:sm p-y:sm align:vertical-center\">\n <cds-button action=\"flat-inline\">View</cds-button>\n </div>\n </div>\n</cds-card>\n```",
|
|
1100
1088
|
"properties": [
|
|
1101
|
-
{
|
|
1102
|
-
"name": "role",
|
|
1103
|
-
"type": "string"
|
|
1104
|
-
},
|
|
1105
1089
|
{
|
|
1106
1090
|
"name": "globalStyles",
|
|
1107
1091
|
"type": "CSSResultGroup"
|
|
@@ -1157,10 +1141,6 @@
|
|
|
1157
1141
|
"path": "./card/register.d.ts",
|
|
1158
1142
|
"description": "Web component card.\n\n```typescript\nimport '@cds/core/card/register.js';\n```\n\n```html\n<cds-card aria-labelledby=\"{label your card}\">\n <div cds-layout=\"vertical gap:md\">\n <h2 id=\"{label your card}\" cds-text=\"section\" cds-layout=\"p-y:sm\">\n <!-- Card title -->\n </h2>\n\n <cds-divider cds-card-remove-margin></cds-divider>\n\n <div cds-text=\"body light\" cds-layout=\"p-y:md\">\n <!-- Card content -->\n </div>\n\n <cds-divider cds-card-remove-margin></cds-divider>\n\n <div cds-layout=\"horizontal gap:sm p-y:sm align:vertical-center\">\n <cds-button action=\"flat-inline\">View</cds-button>\n </div>\n </div>\n</cds-card>\n```",
|
|
1159
1143
|
"properties": [
|
|
1160
|
-
{
|
|
1161
|
-
"name": "role",
|
|
1162
|
-
"type": "string"
|
|
1163
|
-
},
|
|
1164
1144
|
{
|
|
1165
1145
|
"name": "globalStyles",
|
|
1166
1146
|
"type": "CSSResultGroup"
|
|
@@ -2316,14 +2296,6 @@
|
|
|
2316
2296
|
},
|
|
2317
2297
|
{
|
|
2318
2298
|
"name": "cdsMotionChange"
|
|
2319
|
-
},
|
|
2320
|
-
{
|
|
2321
|
-
"name": "ariaModal",
|
|
2322
|
-
"type": "string"
|
|
2323
|
-
},
|
|
2324
|
-
{
|
|
2325
|
-
"name": "role",
|
|
2326
|
-
"type": "string"
|
|
2327
2299
|
}
|
|
2328
2300
|
],
|
|
2329
2301
|
"events": [
|
|
@@ -2365,14 +2337,6 @@
|
|
|
2365
2337
|
},
|
|
2366
2338
|
{
|
|
2367
2339
|
"name": "cdsMotionChange"
|
|
2368
|
-
},
|
|
2369
|
-
{
|
|
2370
|
-
"name": "ariaModal",
|
|
2371
|
-
"type": "string"
|
|
2372
|
-
},
|
|
2373
|
-
{
|
|
2374
|
-
"name": "role",
|
|
2375
|
-
"type": "string"
|
|
2376
2340
|
}
|
|
2377
2341
|
],
|
|
2378
2342
|
"events": [
|
|
@@ -2796,10 +2760,6 @@
|
|
|
2796
2760
|
"name": "itemText",
|
|
2797
2761
|
"type": "NodeListOf<HTMLSpanElement>"
|
|
2798
2762
|
},
|
|
2799
|
-
{
|
|
2800
|
-
"name": "role",
|
|
2801
|
-
"type": "string"
|
|
2802
|
-
},
|
|
2803
2763
|
{
|
|
2804
2764
|
"name": "hasFocus",
|
|
2805
2765
|
"type": "boolean"
|
|
@@ -2849,10 +2809,6 @@
|
|
|
2849
2809
|
"name": "isGroupStart",
|
|
2850
2810
|
"type": "boolean"
|
|
2851
2811
|
},
|
|
2852
|
-
{
|
|
2853
|
-
"name": "role",
|
|
2854
|
-
"type": "string"
|
|
2855
|
-
},
|
|
2856
2812
|
{
|
|
2857
2813
|
"name": "navigationGroupId",
|
|
2858
2814
|
"type": "string"
|
|
@@ -2914,10 +2870,6 @@
|
|
|
2914
2870
|
{
|
|
2915
2871
|
"name": "i18n",
|
|
2916
2872
|
"type": "{ [key: string]: string | undefined; }"
|
|
2917
|
-
},
|
|
2918
|
-
{
|
|
2919
|
-
"name": "role",
|
|
2920
|
-
"type": "string"
|
|
2921
2873
|
}
|
|
2922
2874
|
],
|
|
2923
2875
|
"events": [
|
|
@@ -2991,10 +2943,6 @@
|
|
|
2991
2943
|
{
|
|
2992
2944
|
"name": "i18n",
|
|
2993
2945
|
"type": "{ [key: string]: string | undefined; }"
|
|
2994
|
-
},
|
|
2995
|
-
{
|
|
2996
|
-
"name": "role",
|
|
2997
|
-
"type": "string"
|
|
2998
2946
|
}
|
|
2999
2947
|
],
|
|
3000
2948
|
"events": [
|
|
@@ -3113,10 +3061,6 @@
|
|
|
3113
3061
|
"name": "isGroupStart",
|
|
3114
3062
|
"type": "boolean"
|
|
3115
3063
|
},
|
|
3116
|
-
{
|
|
3117
|
-
"name": "role",
|
|
3118
|
-
"type": "string"
|
|
3119
|
-
},
|
|
3120
3064
|
{
|
|
3121
3065
|
"name": "navigationGroupId",
|
|
3122
3066
|
"type": "string"
|
|
@@ -3183,10 +3127,6 @@
|
|
|
3183
3127
|
"name": "itemText",
|
|
3184
3128
|
"type": "NodeListOf<HTMLSpanElement>"
|
|
3185
3129
|
},
|
|
3186
|
-
{
|
|
3187
|
-
"name": "role",
|
|
3188
|
-
"type": "string"
|
|
3189
|
-
},
|
|
3190
3130
|
{
|
|
3191
3131
|
"name": "hasFocus",
|
|
3192
3132
|
"type": "boolean"
|
package/internal/utils/global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isBrowser as e}from"./exists.js";import{getAngularVersion as o,getAngularJSVersion as n,getReactVersion as t,getVueVersion as i}from"./framework.js";import{browserFeatures as s}from"./supports.js";import{LogService as r}from"../services/log.service.js";function w(){e()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:s.supports,_isStateProxied:!1,_state:{focusTrapItems:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:a,logDetails:d},function(){var e;const o="5.6.
|
|
1
|
+
import{isBrowser as e}from"./exists.js";import{getAngularVersion as o,getAngularJSVersion as n,getReactVersion as t,getVueVersion as i}from"./framework.js";import{browserFeatures as s}from"./supports.js";import{LogService as r}from"../services/log.service.js";function w(){e()&&(window.CDS=window.CDS||{_version:[],_react:{version:void 0},_supports:s.supports,_isStateProxied:!1,_state:{focusTrapItems:[],i18nRegistry:{},elementRegistry:{},iconRegistry:{},motionRegistry:{}},environment:{production:!1},getDetails:a,logDetails:d},function(){var e;const o="5.6.3";window.CDS._version.indexOf(o)<0&&(window.CDS._version.push(o),null===(e=document.querySelector("body"))||void 0===e||e.setAttribute("cds-version",window.CDS._version.join(" "))),window.CDS._version.length>1&&r.warn("Running more than one version of Clarity can cause unexpected issues. Please ensure only one version is loaded.")}(),window.CDS._isStateProxied||(window.CDS._isStateProxied=!0,window.CDS._state=new Proxy(window.CDS._state,{set:(e,o,n)=>{const t={key:o,prev:window.CDS._state[o],current:n};return e[o]=n,document.dispatchEvent(new CustomEvent("CDS_STATE_UPDATE",{detail:t})),!0}})))}function a(){return{versions:window.CDS._version,environment:window.CDS.environment,userAgent:navigator.userAgent,supports:window.CDS._supports,angularVersion:o(!1),angularJSVersion:n(!1),reactVersion:t(!1),vueVersion:i(!1),state:{...window.CDS._state,iconRegistry:Object.keys(window.CDS._state.iconRegistry),motionRegistry:Object.keys(window.CDS._state.motionRegistry),focusTrapRegistry:Object.keys(window.CDS._state.focusTrapItems.map((e=>e.focusTrapId)))}}}function d(){r.log(JSON.stringify(a(),null,2))}export{w as setupCDSGlobal};
|
|
2
2
|
//# sourceMappingURL=global.js.map
|
|
@@ -38,8 +38,6 @@ declare type CloseChangeSources = 'backdrop-click' | 'escape-keypress' | 'close-
|
|
|
38
38
|
export declare class CdsInternalOverlay extends CdsBaseFocusTrap implements Animatable {
|
|
39
39
|
cdsMotion: string;
|
|
40
40
|
cdsMotionChange: EventEmitter<string>;
|
|
41
|
-
ariaModal: string;
|
|
42
|
-
role: string;
|
|
43
41
|
/** @private */
|
|
44
42
|
static get shadowRootOptions(): any;
|
|
45
43
|
private overlayIdPrefix;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{FocusTrapTrackerService as t,CdsBaseFocusTrap as r,onKey as o,createId as
|
|
1
|
+
import{__decorate as e}from"tslib";import{FocusTrapTrackerService as t,CdsBaseFocusTrap as r,onKey as o,createId as s,baseStyles as i,property as a,event as d,state as n,animate as c,reverseAnimation as p,AnimationModalEnterName as l}from"@cds/core/internal";import{html as v}from"lit";import{query as h}from"lit/decorators/query.js";import u from"./overlay.element.scss.js";function y(e,t,r,o){const s=r.filter((e=>e.indexOf(t)>-1));return!0===o&&r.indexOf(e)<0||s.indexOf(e)>0}function f(e,r=t){var o;return(null===(o=r.getCurrent())||void 0===o?void 0:o.focusTrapId)===e}let k=class extends r{constructor(){super(),this.cdsMotion="on",this.overlayIdPrefix="_overlay-",this.isLayered=!1,this.fireEventOnBackdropClick=()=>{f(this.focusTrapId)&&this.closeOverlay("backdrop-click")},this.fireEventOnEscape=e=>{f(this.focusTrapId)&&o("escape",e,(()=>{this.closeOverlay("escape-keypress")}))},this.focusTrapId=s(this.overlayIdPrefix)}static get shadowRootOptions(){return{...super.shadowRootOptions,delegatesFocus:!0}}firstUpdated(e){super.firstUpdated(e),this.backdrop.addEventListener("click",this.fireEventOnBackdropClick)}updated(e){super.updated(e);const r=this.isLayered,o=y(this.focusTrapId,this.overlayIdPrefix,t.getTrapElements().map((e=>e.focusTrapId)),r);r!==o&&(this.isLayered=o,this.requestUpdate("isLayered",r))}connectedCallback(){super.connectedCallback(),this.ariaModal="true",this.role="dialog",window.addEventListener("keydown",this.fireEventOnEscape)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.fireEventOnEscape),this.backdrop.removeEventListener("click",this.fireEventOnBackdropClick)}closeOverlay(e="custom"){this.closeChange.emit(e)}get backdropTemplate(){return v`<div class="${this.isLayered?"overlay-backdrop layered":"overlay-backdrop"}" aria-hidden="true"></div>`}render(){return v`${this.backdropTemplate}<div class="private-host" tabindex="-1" aria-modal="true" role="dialog"><slot></slot></div>`}static get styles(){return[i,u]}};e([a({type:String})],k.prototype,"cdsMotion",void 0),e([d()],k.prototype,"cdsMotionChange",void 0),e([d()],k.prototype,"closeChange",void 0),e([n({type:Boolean})],k.prototype,"isLayered",void 0),e([h(".overlay-backdrop")],k.prototype,"backdrop",void 0),k=e([c({hidden:{true:p(l),false:l}})],k);export{k as CdsInternalOverlay,y as isNestedOverlay,f as overlayIsActive};
|
|
2
2
|
//# sourceMappingURL=overlay.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.element.js","sources":["../../../../src/internal-components/overlay/overlay.element.ts"],"sourcesContent":null,"names":["isNestedOverlay","myId","overlayPrefix","trapIds","previousValue","overlayIds","filter","id","indexOf","overlayIsActive","overlayId","focusTrapService","FocusTrapTrackerService","_a","getCurrent","focusTrapId","CdsInternalOverlay","CdsBaseFocusTrap","[object Object]","super","this","cdsMotion","
|
|
1
|
+
{"version":3,"file":"overlay.element.js","sources":["../../../../src/internal-components/overlay/overlay.element.ts"],"sourcesContent":null,"names":["isNestedOverlay","myId","overlayPrefix","trapIds","previousValue","overlayIds","filter","id","indexOf","overlayIsActive","overlayId","focusTrapService","FocusTrapTrackerService","_a","getCurrent","focusTrapId","CdsInternalOverlay","CdsBaseFocusTrap","[object Object]","super","this","cdsMotion","overlayIdPrefix","isLayered","fireEventOnBackdropClick","closeOverlay","fireEventOnEscape","e","onKey","createId","shadowRootOptions","delegatesFocus","props","firstUpdated","backdrop","addEventListener","updated","oldLayered","newLayered","getTrapElements","map","requestUpdate","connectedCallback","ariaModal","role","window","disconnectedCallback","removeEventListener","trigger","closeChange","emit","backdropTemplate","html","styles","baseStyles","__decorate","property","type","String","prototype","event","state","Boolean","query","animate","hidden","true","reverseAnimation","AnimationModalEnterName","false"],"mappings":"uXAUO,SAASA,EAAgBC,EAAMC,EAAeC,EAASC,GAC1D,MAAMC,EAAaF,EAAQG,QAAOC,GAAMA,EAAGC,QAAQN,IAAkB,IACrE,OAAsB,IAAlBE,GAA0BD,EAAQK,QAAQP,GAAQ,GAK/CI,EAAWG,QAAQP,GAAQ,EAE/B,SAASQ,EAAgBC,EAAWC,EAAmBC,GAC1D,IAAIC,EACJ,OAAiD,QAAxCA,EAAKF,EAAiBG,oBAAiC,IAAPD,OAAgB,EAASA,EAAGE,eAAiBL,EAmCvG,IAACM,EAAqB,cAAiCC,EACtDC,cACIC,QACAC,KAAKC,UAAY,KACjBD,KAAKE,gBAAkB,YACvBF,KAAKG,WAAY,EACjBH,KAAKI,yBAA2B,KACxBf,EAAgBW,KAAKL,cACrBK,KAAKK,aAAa,mBAG1BL,KAAKM,kBAAqBC,IAClBlB,EAAgBW,KAAKL,cACrBa,EAAM,SAAUD,GAAG,KACfP,KAAKK,aAAa,uBAK9BL,KAAKL,YAAcc,EAAST,KAAKE,iBAKrCQ,+BAEI,MAAO,IAAKX,MAAMW,kBAAmBC,gBAAgB,GAEzDb,aAAac,GACTb,MAAMc,aAAaD,GACnBZ,KAAKc,SAASC,iBAAiB,QAASf,KAAKI,0BAEjDN,QAAQc,GACJb,MAAMiB,QAAQJ,GACd,MAAMK,EAAajB,KAAKG,UAClBe,EAAatC,EAAgBoB,KAAKL,YAAaK,KAAKE,gBAAiBV,EAAwB2B,kBAAkBC,KAAIb,GAAKA,EAAEZ,cAAcsB,GAC1IA,IAAeC,IACflB,KAAKG,UAAYe,EACjBlB,KAAKqB,cAAc,YAAaJ,IAGxCnB,oBACIC,MAAMuB,oBACNtB,KAAKuB,UAAY,OACjBvB,KAAKwB,KAAO,SACZC,OAAOV,iBAAiB,UAAWf,KAAKM,mBAE5CR,uBACIC,MAAM2B,uBACND,OAAOE,oBAAoB,UAAW3B,KAAKM,mBAC3CN,KAAKc,SAASa,oBAAoB,QAAS3B,KAAKI,0BAEpDN,aAAa8B,EAAU,UACnB5B,KAAK6B,YAAYC,KAAKF,GAE1BG,uBACI,OAAOC,CAAK,eACLhC,KAAKG,UAAY,2BAA6B,gDAIzDL,SACI,OAAOkC,CAAK,GACZhC,KAAK+B,8GAMTE,oBACI,MAAO,CAACC,EAAYD,KAG5BE,EAAW,CACPC,EAAS,CAAEC,KAAMC,UAClB1C,EAAmB2C,UAAW,iBAAa,GAC9CJ,EAAW,CACPK,KACD5C,EAAmB2C,UAAW,uBAAmB,GACpDJ,EAAW,CACPK,KACD5C,EAAmB2C,UAAW,mBAAe,GAChDJ,EAAW,CACPM,EAAM,CAAEJ,KAAMK,WACf9C,EAAmB2C,UAAW,iBAAa,GAC9CJ,EAAW,CACPQ,EAAM,sBACP/C,EAAmB2C,UAAW,gBAAY,GAC7C3C,EAAqBuC,EAAW,CAC5BS,EAAQ,CACJC,OAAQ,CACJC,KAAMC,EAAiBC,GACvBC,MAAOD,MAGhBpD"}
|
|
@@ -33,7 +33,6 @@ export declare class CdsNavigationItem extends LitElement implements FocusableIt
|
|
|
33
33
|
focusElement: HTMLElement;
|
|
34
34
|
protected itemIcon: CdsIcon;
|
|
35
35
|
itemText: NodeListOf<HTMLSpanElement>;
|
|
36
|
-
role: string;
|
|
37
36
|
connectedCallback(): void;
|
|
38
37
|
firstUpdated(props: PropertyValues): void;
|
|
39
38
|
private handleItemAnchorText;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{LitElement as e,html as o}from"lit";import{I18nService as i,createId as s,spanWrapper as r,baseStyles as d,i18n as n,property as p,state as a,querySlot as l,querySlotAll as c}from"@cds/core/internal";import h from"./navigation-item.element.scss.js";import{manageScreenReaderElements as m,NAVIGATION_TEXT_WRAPPER as u}from"./utils/index.js";const v="cds-navigation-item";class y extends e{constructor(){super(...arguments),this.i18n=i.keys.navigation,this.active=!1,this.disabled=!1,this.expanded=!1,this.expandedGroup=!0,this.hasFocus=!1
|
|
1
|
+
import{__decorate as t}from"tslib";import{LitElement as e,html as o}from"lit";import{I18nService as i,createId as s,spanWrapper as r,baseStyles as d,i18n as n,property as p,state as a,querySlot as l,querySlotAll as c}from"@cds/core/internal";import h from"./navigation-item.element.scss.js";import{manageScreenReaderElements as m,NAVIGATION_TEXT_WRAPPER as u}from"./utils/index.js";const v="cds-navigation-item";class y extends e{constructor(){super(...arguments),this.i18n=i.keys.navigation,this.active=!1,this.disabled=!1,this.expanded=!1,this.expandedGroup=!0,this.hasFocus=!1}connectedCallback(){super.connectedCallback(),this.role="listitem",this.id||(this.id=s())}firstUpdated(t){super.firstUpdated(t),this.handleItemAnchorText(),m(this,this.expanded)}handleItemAnchorText(){var t;const e=this.querySelector("a");e&&(r(e.childNodes),null===(t=null==e?void 0:e.querySelector("span"))||void 0===t||t.setAttribute(u,""))}render(){return o`<div class="private-host ${this.groupItem?"group-item":""}" cds-layout="horizontal align:horizontal-stretch wrap:none gap:md"><slot @slotchange="${this.handleItemAnchorText}"></slot></div>`}static get styles(){return[d,h]}updated(t){super.updated(t),m(this,this.expanded)}}t([n()],y.prototype,"i18n",void 0),t([p({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([p({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),t([a({type:Boolean})],y.prototype,"expanded",void 0),t([a({type:Boolean,reflect:!0})],y.prototype,"expandedGroup",void 0),t([a({type:Boolean,reflect:!0})],y.prototype,"groupItem",void 0),t([a({type:Boolean,reflect:!0})],y.prototype,"hasFocus",void 0),t([l("a")],y.prototype,"focusElement",void 0),t([l("cds-icon",{assign:"cds-icon-slot"})],y.prototype,"itemIcon",void 0),t([c("[cds-navigation-sr-text]")],y.prototype,"itemText",void 0);export{y as CdsNavigationItem,v as CdsNavigationItemTagName};
|
|
2
2
|
//# sourceMappingURL=navigation-item.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-item.element.js","sources":["../../../src/navigation/navigation-item.element.ts"],"sourcesContent":null,"names":["CdsNavigationItemTagName","CdsNavigationItem","LitElement","[object Object]","super","arguments","this","i18n","I18nService","keys","navigation","active","disabled","expanded","expandedGroup","hasFocus","
|
|
1
|
+
{"version":3,"file":"navigation-item.element.js","sources":["../../../src/navigation/navigation-item.element.ts"],"sourcesContent":null,"names":["CdsNavigationItemTagName","CdsNavigationItem","LitElement","[object Object]","super","arguments","this","i18n","I18nService","keys","navigation","active","disabled","expanded","expandedGroup","hasFocus","connectedCallback","role","id","createId","props","firstUpdated","handleItemAnchorText","manageScreenReaderElements","_a","anchorElement","querySelector","spanWrapper","childNodes","setAttribute","NAVIGATION_TEXT_WRAPPER","html","groupItem","styles","baseStyles","updated","__decorate","prototype","property","type","Boolean","reflect","state","querySlot","assign","querySlotAll"],"mappings":"8XAUY,MAACA,EAA2B,sBAmBjC,MAAMC,UAA0BC,EACnCC,cACIC,SAASC,WACTC,KAAKC,KAAOC,EAAYC,KAAKC,WAC7BJ,KAAKK,QAAS,EACdL,KAAKM,UAAW,EAChBN,KAAKO,UAAW,EAChBP,KAAKQ,eAAgB,EACrBR,KAAKS,UAAW,EAEpBZ,oBACIC,MAAMY,oBACNV,KAAKW,KAAO,WACP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@@ -40,7 +40,6 @@ export declare class CdsNavigationStart extends LitElement implements FocusableI
|
|
|
40
40
|
* The value is synced down from the root cds-navigation element.
|
|
41
41
|
*/
|
|
42
42
|
isGroupStart: boolean;
|
|
43
|
-
role: string;
|
|
44
43
|
navigationGroupId: string;
|
|
45
44
|
/**
|
|
46
45
|
* @desc info synced down from group element and used in css to set proper bg color if a group has an active item and is not expanded
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{LitElement as o,html as e}from"lit";import{I18nService as i,createId as s,spanWrapper as n,baseStyles as a,i18n as r,property as d,state as l,querySlot as p,querySlotAll as c}from"@cds/core/internal";import h from"./navigation-item.element.scss.js";import{NAVIGATION_TEXT_WRAPPER as u,getToggleIconDirection as g,manageScreenReaderElements as v}from"./utils/index.js";const
|
|
1
|
+
import{__decorate as t}from"tslib";import{LitElement as o,html as e}from"lit";import{I18nService as i,createId as s,spanWrapper as n,baseStyles as a,i18n as r,property as d,state as l,querySlot as p,querySlotAll as c}from"@cds/core/internal";import h from"./navigation-item.element.scss.js";import{NAVIGATION_TEXT_WRAPPER as u,getToggleIconDirection as g,manageScreenReaderElements as v}from"./utils/index.js";const x="cds-navigation-start";class y extends o{constructor(){super(...arguments),this.i18n=i.keys.navigation,this.expandedRoot=!1,this.hasFocus=!1,this.isGroupStart=!1,this.active=!1,this.expanded=!1}connectedCallback(){super.connectedCallback(),this.role="listitem",this.id||(this.id=s())}firstUpdated(t){var o;super.firstUpdated(t);const e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector("button");e&&(this.focusElement=e),this.handleStartButtonText()}handleStartButtonText(){var t;n(this.childNodes),null===(t=this.querySelector("span"))||void 0===t||t.setAttribute(u,"")}renderRootStart(){return e`<slot @slotchange="${this.handleStartButtonText}"></slot><button aria-pressed="${this.expandedRoot}" aria-label="${this.expandedRoot?this.i18n.navigationUnabridgedText:this.i18n.navigationAbridgedText}" id="${this.isGroupStart?this.navigationGroupId:""}" type="button"><div cds-layout="horizontal align:vertical-center"><span class="icon-slot" cds-layout="${this.expandedRoot?"align:right":"align:left"}"><slot name="cds-icon-slot">${this.startIcon?"":e`<cds-icon size="${!this.expandedRoot&&this.isGroupStart?"xs":"sm"}" shape="${this.isGroupStart?"angle":"angle-double"}" direction="${this.toggleIconDirection}"></cds-icon>`}</slot></span></div></button>`}renderGroupStart(){return e`<button aria-expanded="${this.expanded}" id="${this.isGroupStart?this.navigationGroupId:""}" type="button"><div cds-layout="horizontal wrap:none align:vertical-center gap:md"><slot @slotchange="${this.handleStartButtonText}"></slot><span class="icon-slot" cds-layout="${this.expandedRoot?"align:right":"align:left"}"><slot name="cds-icon-slot">${this.startIcon?"":e`<cds-icon size="${!this.expandedRoot&&this.isGroupStart?"xs":"sm"}" shape="${this.isGroupStart?"angle":"angle-double"}" direction="${this.toggleIconDirection}"></cds-icon>`}</slot></span></div></button>`}render(){return e`<div class="private-host" cds-layout="horizontal align:vertical-center align:horizontal-stretch">${this.isGroupStart?this.renderGroupStart():this.renderRootStart()}</div>`}static get styles(){return[a,h]}get toggleIconDirection(){return g(this)}updated(t){super.updated(t),v(this,this.expandedRoot)}}t([r()],y.prototype,"i18n",void 0),t([d({type:Boolean})],y.prototype,"expandedRoot",void 0),t([l({type:Boolean,reflect:!0})],y.prototype,"hasFocus",void 0),t([d({type:Boolean,reflect:!0})],y.prototype,"isGroupStart",void 0),t([d({type:String})],y.prototype,"navigationGroupId",void 0),t([l({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([l({type:Boolean,reflect:!0})],y.prototype,"expanded",void 0),t([p("[cds-navigation-start-icon]",{assign:"cds-icon-slot"})],y.prototype,"startIcon",void 0),t([c("[cds-navigation-sr-text]")],y.prototype,"itemText",void 0);export{y as CdsNavigationStart,x as CdsNavigationStartTagName};
|
|
2
2
|
//# sourceMappingURL=navigation-start.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-start.element.js","sources":["../../../src/navigation/navigation-start.element.ts"],"sourcesContent":null,"names":["CdsNavigationStartTagName","CdsNavigationStart","LitElement","[object Object]","super","arguments","this","i18n","I18nService","keys","navigation","expandedRoot","hasFocus","isGroupStart","
|
|
1
|
+
{"version":3,"file":"navigation-start.element.js","sources":["../../../src/navigation/navigation-start.element.ts"],"sourcesContent":null,"names":["CdsNavigationStartTagName","CdsNavigationStart","LitElement","[object Object]","super","arguments","this","i18n","I18nService","keys","navigation","expandedRoot","hasFocus","isGroupStart","active","expanded","connectedCallback","role","id","createId","props","_a","firstUpdated","button","shadowRoot","querySelector","focusElement","handleStartButtonText","spanWrapper","childNodes","setAttribute","NAVIGATION_TEXT_WRAPPER","html","navigationUnabridgedText","navigationAbridgedText","navigationGroupId","startIcon","toggleIconDirection","renderGroupStart","renderRootStart","styles","baseStyles","itemStyles","getToggleIconDirection","updated","manageScreenReaderElements","__decorate","prototype","property","type","Boolean","state","reflect","String","querySlot","assign","querySlotAll"],"mappings":"0ZAUY,MAACA,EAA4B,uBAoBlC,MAAMC,UAA2BC,EACpCC,cACIC,SAASC,WACTC,KAAKC,KAAOC,EAAYC,KAAKC,WAK7BJ,KAAKK,cAAe,EAKpBL,KAAKM,UAAW,EAKhBN,KAAKO,cAAe,EAMpBP,KAAKQ,QAAS,EAOdR,KAAKS,UAAW,EAEpBZ,oBACIC,MAAMY,oBACNV,KAAKW,KAAO,WACPX,KAAKY,KACNZ,KAAKY,GAAKC,KAGlBhB,aAAaiB,GACT,IAAIC,EACJjB,MAAMkB,aAAaF,GACnB,MAAMG,EAAoC,QAA1BF,EAAKf,KAAKkB,kBAA+B,IAAPH,OAAgB,EAASA,EAAGI,cAAc,UACxFF,IACAjB,KAAKoB,aAAeH,GAExBjB,KAAKqB,wBAETxB,wBACI,IAAIkB,EACJO,EAAYtB,KAAKuB,YAEqB,QAArCR,EAAKf,KAAKmB,cAAc,eAA4B,IAAPJ,GAAyBA,EAAGS,aAAaC,EAAyB,IAEpH5B,kBACI,OAAO6B,CAAK,sBACM1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M,CAAEF,KAAMC,QAASE,SAAS,KACjCnD,EAAmB8C,UAAW,gBAAY,GAC7CD,EAAW,CACPQ,EAAU,8BAA+B,CAAEC,OAAQ,mBACpDtD,EAAmB8C,UAAW,iBAAa,GAC9CD,EAAW,CACPU,EAAa,6BACdvD,EAAmB8C,UAAW,gBAAY"}
|
|
@@ -103,7 +103,6 @@ export declare class CdsNavigation extends LitElement implements Animatable {
|
|
|
103
103
|
* query for all groups (including any nested groups), used ot pass state down
|
|
104
104
|
*/
|
|
105
105
|
protected navigationGroupRefs: NodeListOf<CdsNavigationGroup>;
|
|
106
|
-
role: string;
|
|
107
106
|
private toggle;
|
|
108
107
|
private get currentActiveItem();
|
|
109
108
|
protected get endTemplate(): "" | import("lit-html").TemplateResult<1>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{LitElement as i,html as e}from"lit";import{I18nService as a,isVisible as n,setAttributes as o,onKey as s,syncPropsForAllItems as r,syncProps as d,baseStyles as v,property as c,event as l,state as h,i18n as p,querySlot as u,querySlotAll as g,animate as m,reverseAnimation as f}from"@cds/core/internal";import y from"./navigation.element.scss.js";import{removeFocus as I,setFocus as A,visibleElement as b,getNextFocusElement as E,getPreviousFocusElement as S}from"./utils/index.js";import{AnimationNavigationOpenName as x}from"../internal/motion/animations/cds-navigation-open.js";const N="cds-navigation";let R=class extends i{constructor(){super(...arguments),this.expandedRoot=!1,this.cdsMotion="on",this.groupItem=!0,this.expanded=!1,this.i18n=a.keys.navigation
|
|
1
|
+
import{__decorate as t}from"tslib";import{LitElement as i,html as e}from"lit";import{I18nService as a,isVisible as n,setAttributes as o,onKey as s,syncPropsForAllItems as r,syncProps as d,baseStyles as v,property as c,event as l,state as h,i18n as p,querySlot as u,querySlotAll as g,animate as m,reverseAnimation as f}from"@cds/core/internal";import y from"./navigation.element.scss.js";import{removeFocus as I,setFocus as A,visibleElement as b,getNextFocusElement as E,getPreviousFocusElement as S}from"./utils/index.js";import{AnimationNavigationOpenName as x}from"../internal/motion/animations/cds-navigation-open.js";const N="cds-navigation";let R=class extends i{constructor(){super(...arguments),this.expandedRoot=!1,this.cdsMotion="on",this.groupItem=!0,this.expanded=!1,this.i18n=a.keys.navigation}toggle(){this.expandedChange.emit(!this.expanded)}get currentActiveItem(){return this.visibleChildren.find((t=>t.id===this.ariaActiveDescendant))}get endTemplate(){return this.navigationEnd?e`<div class="navigation-end" cds-layout="vertical align:horizontal-stretch"><slot name="cds-navigation-end"></slot></div>`:""}get startTemplate(){let t;return t=this.rootNavigationStart?e`<div class="navigation-start" cds-layout="vertical align:horizontal-stretch"><slot @slotchange="${()=>this.addStartEventListener()}" name="navigation-start"></slot><cds-divider class="start-divider"></cds-divider></div>`:"",t}get visibleChildren(){return Array.from(this.allNavigationElements).filter((t=>n(t)))}addStartEventListener(){this.rootNavigationStart&&this.rootNavigationStart.addEventListener("click",this.toggle.bind(this))}firstUpdated(t){var i;super.firstUpdated(t),this.allNavigationElements.forEach((t=>{o(t,["tabindex","-1"])}));const e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("#item-container");null==e||e.addEventListener("focus",this.initItemKeys.bind(this)),null==e||e.addEventListener("keydown",this.handleItemKeys.bind(this)),null==e||e.addEventListener("blur",this.blurItemKeys.bind(this))}blurItemKeys(){this.currentActiveItem&&I(this.currentActiveItem)}focusRootStart(){this.rootNavigationStart&&A(this.rootNavigationStart)}blurRootStart(){this.rootNavigationStart&&I(this.rootNavigationStart)}initItemKeys(){if(this.currentActiveItem){const t=this.currentActiveItem?this.currentActiveItem:this.allNavigationElements[0];A(t),this.ariaActiveDescendant=t.id}else A(this.focusableElements[0]),this.ariaActiveDescendant=this.focusableElements[0].id}get focusableElements(){return Array.from(this.allNavigationElements).filter(b)}handleItemKeys(t){s("arrow-down",t,(()=>{if(this.currentActiveItem){I(this.currentActiveItem);const i=E(this.currentActiveItem,this.focusableElements);this.ariaActiveDescendant=i.id,A(i),t.preventDefault()}})),s("arrow-up",t,(()=>{if(this.currentActiveItem){I(this.currentActiveItem);const i=S(this.currentActiveItem,this.focusableElements);this.ariaActiveDescendant=i.id,A(i),t.preventDefault()}})),s("arrow-right",t,(()=>{var t;const i=null===(t=this.currentActiveItem)||void 0===t?void 0:t.closest("cds-navigation-group");!i||i.expanded||i.expandedChange.emit(!i.expanded)})),s("arrow-left",t,(()=>{var t,i,e;const a=null===(t=this.currentActiveItem)||void 0===t?void 0:t.closest("cds-navigation-group");if("CDS-NAVIGATION-ITEM"===(null===(i=this.currentActiveItem)||void 0===i?void 0:i.tagName)&&a){const t=null==a?void 0:a.querySelector("cds-navigation-start");return I(this.currentActiveItem),this.ariaActiveDescendant=null!==(e=null==t?void 0:t.id)&&void 0!==e?e:null,void A(t)}a&&a.expanded&&a.expandedChange.emit(!a.expanded)})),s("home",t,(()=>{if(this.currentActiveItem){I(this.currentActiveItem);const t=this.focusableElements[0];this.ariaActiveDescendant=t.id,A(t)}})),s("end",t,(()=>{if(this.currentActiveItem){I(this.currentActiveItem);const t=this.focusableElements[this.focusableElements.length-1];this.ariaActiveDescendant=t.id,A(t)}})),s("enter",t,(()=>{var t,i;(null===(t=this.currentActiveItem)||void 0===t?void 0:t.focusElement)&&(null===(i=this.currentActiveItem)||void 0===i||i.focusElement.click())})),s("space",t,(()=>{var t,i;(null===(t=this.currentActiveItem)||void 0===t?void 0:t.focusElement)&&(null===(i=this.currentActiveItem)||void 0===i||i.focusElement.click())}))}handleRootStartKeys(t){s("arrow-right",t,(()=>{this.expanded||this.toggle()})),s("arrow-left",t,(()=>{this.expanded&&this.toggle()}))}connectedCallback(){var t,i,e;super.connectedCallback(),this.role="list",null===(t=this.rootNavigationStart)||void 0===t||t.addEventListener("focus",this.focusRootStart.bind(this)),null===(i=this.rootNavigationStart)||void 0===i||i.addEventListener("blur",this.blurRootStart.bind(this)),null===(e=this.rootNavigationStart)||void 0===e||e.addEventListener("keydown",this.handleRootStartKeys.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.rootNavigationStart&&this.rootNavigationStart.removeEventListener("click",this.toggle.bind(this))}render(){return e`<div class="private-host" aria-label="${this.i18n.navigationLabel}" cds-layout="vertical wrap:none">${this.startTemplate}<slot name="cds-navigation-substart"></slot><nav class="navigation-body-wrapper"><div .ariaActiveDescendant="${this.ariaActiveDescendant}" tabindex="0" id="item-container"><div class="navigation-body" cds-layout="vertical wrap:none align:horizontal-stretch"><slot></slot></div></div></nav>${this.endTemplate}</div>`}updated(t){super.updated(t),t.has("expanded")&&(this.expandedRoot=this.expanded),this.updateChildrenProps()}updateChildrenProps(){this.navigationGroupItems&&r(Array.from(this.navigationGroupItems),this,{groupItem:!0}),this.navigationItemRefs&&r(Array.from(this.navigationItemRefs),this,{expanded:!0}),this.navigationStartRefs&&r(Array.from(this.navigationStartRefs),this,{expandedRoot:!0}),this.rootNavigationStart&&d(this.rootNavigationStart,this,{expanded:this.expanded}),this.rootNavigationItems.length>0&&r(Array.from(this.rootNavigationItems),this,{expanded:this.expanded}),this.navigationGroupRefs.length>0&&r(Array.from(this.navigationGroupRefs),this,{layout:!0})}static get styles(){return[v,y]}};t([c({type:String})],R.prototype,"cdsMotion",void 0),t([l()],R.prototype,"expandedChange",void 0),t([l()],R.prototype,"cdsMotionChange",void 0),t([h({type:Boolean})],R.prototype,"groupItem",void 0),t([c({type:Boolean})],R.prototype,"expanded",void 0),t([p()],R.prototype,"i18n",void 0),t([u('[slot="cds-navigation-end"]',{assign:"cds-navigation-end"})],R.prototype,"navigationEnd",void 0),t([g("cds-navigation-group > cds-navigation-start, cds-navigation-item:not([disabled])")],R.prototype,"allNavigationElements",void 0),t([g("cds-navigation-start")],R.prototype,"navigationStartRefs",void 0),t([g(":scope > cds-divider")],R.prototype,"rootDividers",void 0),t([g(":scope > cds-navigation-group")],R.prototype,"rootNavigationGroups",void 0),t([g(":scope > cds-navigation-item")],R.prototype,"rootNavigationItems",void 0),t([u(":scope > cds-navigation-start",{assign:"navigation-start"})],R.prototype,"rootNavigationStart",void 0),t([g(":scope > cds-navigation-group > cds-navigation-item")],R.prototype,"navigationGroupItems",void 0),t([g("cds-navigation-item")],R.prototype,"navigationItemRefs",void 0),t([g("cds-navigation-group")],R.prototype,"navigationGroupRefs",void 0),R=t([m({expanded:{true:x,false:f(x)}})],R);export{R as CdsNavigation,N as CdsNavigationTagName};
|
|
2
2
|
//# sourceMappingURL=navigation.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.element.js","sources":["../../../src/navigation/navigation.element.ts"],"sourcesContent":null,"names":["CdsNavigationTagName","CdsNavigation","LitElement","[object Object]","super","arguments","this","expandedRoot","cdsMotion","groupItem","expanded","i18n","I18nService","keys","navigation","
|
|
1
|
+
{"version":3,"file":"navigation.element.js","sources":["../../../src/navigation/navigation.element.ts"],"sourcesContent":null,"names":["CdsNavigationTagName","CdsNavigation","LitElement","[object Object]","super","arguments","this","expandedRoot","cdsMotion","groupItem","expanded","i18n","I18nService","keys","navigation","expandedChange","emit","currentActiveItem","visibleChildren","find","c","id","ariaActiveDescendant","endTemplate","navigationEnd","html","startTemplate","returnHTML","rootNavigationStart","addStartEventListener","Array","from","allNavigationElements","filter","n","isVisible","addEventListener","toggle","bind","props","_a","firstUpdated","forEach","item","setAttributes","itemWrapper","shadowRoot","querySelector","initItemKeys","handleItemKeys","blurItemKeys","removeFocus","setFocus","focusElement","focusableElements","visibleElement","event","onKey","next","getNextFocusElement","preventDefault","previous","getPreviousFocusElement","groupParent","closest","_b","_c","tagName","groupStartElement","home","end","length","click","connectedCallback","role","focusRootStart","blurRootStart","handleRootStartKeys","disconnectedCallback","removeEventListener","navigationLabel","updated","has","updateChildrenProps","navigationGroupItems","syncPropsForAllItems","navigationItemRefs","navigationStartRefs","syncProps","rootNavigationItems","navigationGroupRefs","layout","styles","baseStyles","__decorate","property","type","String","prototype","state","Boolean","querySlot","assign","querySlotAll","animate","true","AnimationNavigationOpenName","false","reverseAnimation"],"mappings":"6mBAWY,MAACA,EAAuB,iBA+Bj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