@kyndryl-design-system/shidoka-applications 1.2.4 → 1.3.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.
@@ -0,0 +1,4 @@
1
+ export { Tabs } from './tabs';
2
+ export { Tab } from './tab';
3
+ export { TabPanel } from './tabPanel';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export{Tabs}from"./tabs.js";export{Tab}from"./tab.js";export{TabPanel}from"./tabPanel.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * Tabs.
4
+ * @slot unnamed - Slot for tab button text.
5
+ */
6
+ export declare class Tab extends LitElement {
7
+ static styles: import("lit").CSSResultGroup;
8
+ /** Tab ID, required. */
9
+ id: string;
10
+ /** Tab selected state. Must match Tab Panel visible state. */
11
+ selected: boolean;
12
+ /** Tab disabled state. */
13
+ disabled: boolean;
14
+ /** Size of the tab buttons. Inherited.
15
+ * @internal
16
+ */
17
+ private _size;
18
+ /** Vertical orientation. Inherited.
19
+ * @internal
20
+ */
21
+ private _vertical;
22
+ /** Tab style. Inherited.
23
+ * @internal
24
+ */
25
+ private _tabStyle;
26
+ /** aria role.
27
+ * @internal
28
+ */
29
+ role: string;
30
+ /** Make host tabbable.
31
+ * @internal
32
+ */
33
+ tabIndex: number;
34
+ /** aria-controls.
35
+ * @internal
36
+ */
37
+ 'aria-selected': string;
38
+ /** aria-controls.
39
+ * @internal
40
+ */
41
+ 'aria-controls': string;
42
+ render(): import("lit-html").TemplateResult<1>;
43
+ connectedCallback(): void;
44
+ disconnectedCallback(): void;
45
+ /**
46
+ * Updates the 'aria-controls' and 'aria-selected' attributes based on changes to the
47
+ * 'id' and 'selected' properties, respectively.
48
+ * @param {any} changedProps - The `changedProps` parameter is an object that contains the properties
49
+ * that have changed in the component. It is used to determine which properties have been updated and
50
+ * perform specific actions based on those changes.
51
+ */
52
+ willUpdate(changedProps: any): void;
53
+ /**
54
+ * Dispatches a custom event called 'tab-activated' with the original event and tabId as details,
55
+ * if the tab is not selected.
56
+ * @param {any} e - The parameter "e" is an event object that represents the event that triggered the
57
+ * click event handler.
58
+ */
59
+ private _handleClick;
60
+ }
61
+ declare global {
62
+ interface HTMLElementTagNameMap {
63
+ 'kyn-tab': Tab;
64
+ }
65
+ }
66
+ //# sourceMappingURL=tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/tabs/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;GAGG;AACH,qBACa,GAAI,SAAQ,UAAU;IACjC,OAAgB,MAAM,+BAAW;IAEjC,wBAAwB;IAEf,EAAE,SAAM;IAEjB,8DAA8D;IAE9D,QAAQ,UAAS;IAEjB,0BAA0B;IAE1B,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,CAAC,KAAK,CAAQ;IAErB;;OAEG;IAEH,OAAO,CAAC,SAAS,CAAS;IAE1B;;OAEG;IAEH,OAAO,CAAC,SAAS,CAAe;IAEhC;;OAEG;IAEM,IAAI,SAAS;IAEtB;;OAEG;IAEM,QAAQ,SAAK;IAEtB;;OAEG;IAEH,eAAe,SAAW;IAE1B;;OAEG;IAEH,eAAe,SAAM;IAEZ,MAAM;IAgBN,iBAAiB;IAKjB,oBAAoB;IAK7B;;;;;;OAMG;IACM,UAAU,CAAC,YAAY,EAAE,GAAG;IAWrC;;;;;OAKG;IACH,OAAO,CAAC,YAAY;CAUrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,GAAG,CAAC;KAChB;CACF"}
@@ -0,0 +1,2 @@
1
+ import{__decorate as e}from"../../../_virtual/_tslib.js";import'./../../../external/@lit/reactive-element/reactive-element.js';import{html as t}from'./../../../external/lit-html/lit-html.js';import{LitElement as s}from'./../../../external/lit-element/lit-element.js';import{customElement as i}from'./../../../external/@lit/reactive-element/decorators/custom-element.js';import{property as o}from'./../../../external/@lit/reactive-element/decorators/property.js';import{state as l}from'./../../../external/@lit/reactive-element/decorators/state.js';import'./../../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import{classMap as r}from'./../../../external/lit-html/directives/class-map.js';import d from"./tab.scss.js";let a=class extends s{constructor(){super(...arguments),this.id="",this.selected=!1,this.disabled=!1,this._size="md",this._vertical=!1,this._tabStyle="contained",this.role="tab",this.tabIndex=0,this["aria-selected"]="false",this["aria-controls"]=""}render(){const e={tab:!0,contained:"contained"===this._tabStyle,line:"line"===this._tabStyle,"size--sm":"sm"===this._size,"size--md":"md"===this._size,vertical:this._vertical,selected:this.selected,disabled:this.disabled};return t` <div class=${r(e)}><slot></slot></div> `}connectedCallback(){super.connectedCallback(),this.addEventListener("click",(e=>this._handleClick(e)))}disconnectedCallback(){this.removeEventListener("click",(e=>this._handleClick(e))),super.disconnectedCallback()}willUpdate(e){e.has("id")&&(this["aria-controls"]=this.id+"-panel"),e.has("selected")&&(this["aria-selected"]=this.selected.toString(),this.tabIndex=this.selected?0:-1)}_handleClick(e){if(!this.selected&&!this.disabled){const t=new CustomEvent("tab-activated",{bubbles:!0,composed:!0,detail:{origEvent:e,tabId:this.id}});this.dispatchEvent(t)}}};a.styles=d,e([o({type:String,reflect:!0})],a.prototype,"id",void 0),e([o({type:Boolean,reflect:!0})],a.prototype,"selected",void 0),e([o({type:Boolean})],a.prototype,"disabled",void 0),e([l()],a.prototype,"_size",void 0),e([l()],a.prototype,"_vertical",void 0),e([l()],a.prototype,"_tabStyle",void 0),e([o({type:String,reflect:!0})],a.prototype,"role",void 0),e([o({type:Number,reflect:!0})],a.prototype,"tabIndex",void 0),e([o({type:String,reflect:!0})],a.prototype,"aria-selected",void 0),e([o({type:String,reflect:!0})],a.prototype,"aria-controls",void 0),a=e([i("kyn-tab")],a);export{a as Tab};
2
+ //# sourceMappingURL=tab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab.js","sources":["../../../../src/components/reusable/tabs/tab.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport TabScss from './tab.scss';\n\n/**\n * Tabs.\n * @slot unnamed - Slot for tab button text.\n */\n@customElement('kyn-tab')\nexport class Tab extends LitElement {\n static override styles = TabScss;\n\n /** Tab ID, required. */\n @property({ type: String, reflect: true })\n override id = '';\n\n /** Tab selected state. Must match Tab Panel visible state. */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /** Tab disabled state. */\n @property({ type: Boolean })\n disabled = false;\n\n /** Size of the tab buttons. Inherited.\n * @internal\n */\n @state()\n private _size = 'md';\n\n /** Vertical orientation. Inherited.\n * @internal\n */\n @state()\n private _vertical = false;\n\n /** Tab style. Inherited.\n * @internal\n */\n @state()\n private _tabStyle = 'contained';\n\n /** aria role.\n * @internal\n */\n @property({ type: String, reflect: true })\n override role = 'tab';\n\n /** Make host tabbable.\n * @internal\n */\n @property({ type: Number, reflect: true })\n override tabIndex = 0;\n\n /** aria-controls.\n * @internal\n */\n @property({ type: String, reflect: true })\n 'aria-selected' = 'false';\n\n /** aria-controls.\n * @internal\n */\n @property({ type: String, reflect: true })\n 'aria-controls' = '';\n\n override render() {\n const classes = {\n tab: true,\n contained: this._tabStyle === 'contained',\n line: this._tabStyle === 'line',\n 'size--sm': this._size === 'sm',\n 'size--md': this._size === 'md',\n // 'size--lg': this._size === 'lg',\n vertical: this._vertical,\n selected: this.selected,\n disabled: this.disabled,\n };\n\n return html` <div class=${classMap(classes)}><slot></slot></div> `;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', (e) => this._handleClick(e));\n }\n\n override disconnectedCallback() {\n this.removeEventListener('click', (e) => this._handleClick(e));\n super.disconnectedCallback();\n }\n\n /**\n * Updates the 'aria-controls' and 'aria-selected' attributes based on changes to the\n * 'id' and 'selected' properties, respectively.\n * @param {any} changedProps - The `changedProps` parameter is an object that contains the properties\n * that have changed in the component. It is used to determine which properties have been updated and\n * perform specific actions based on those changes.\n */\n override willUpdate(changedProps: any) {\n if (changedProps.has('id')) {\n this['aria-controls'] = this.id + '-panel';\n }\n\n if (changedProps.has('selected')) {\n this['aria-selected'] = this.selected.toString();\n this.tabIndex = this.selected ? 0 : -1;\n }\n }\n\n /**\n * Dispatches a custom event called 'tab-activated' with the original event and tabId as details,\n * if the tab is not selected.\n * @param {any} e - The parameter \"e\" is an event object that represents the event that triggered the\n * click event handler.\n */\n private _handleClick(e: any) {\n if (!this.selected && !this.disabled) {\n const event = new CustomEvent('tab-activated', {\n bubbles: true,\n composed: true,\n detail: { origEvent: e, tabId: this.id },\n });\n this.dispatchEvent(event);\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-tab': Tab;\n }\n}\n"],"names":["Tab","LitElement","constructor","this","id","selected","disabled","_size","_vertical","_tabStyle","role","tabIndex","render","classes","tab","contained","line","vertical","html","classMap","connectedCallback","super","addEventListener","e","_handleClick","disconnectedCallback","removeEventListener","willUpdate","changedProps","has","toString","event","CustomEvent","bubbles","composed","detail","origEvent","tabId","dispatchEvent","styles","TabScss","__decorate","property","type","String","reflect","prototype","Boolean","state","Number","customElement"],"mappings":"yvBAUO,IAAMA,EAAN,cAAkBC,EAAlBC,kCAKIC,KAAEC,GAAG,GAIdD,KAAQE,UAAG,EAIXF,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A8C,UAAA,gBAAA,GAMjBL,EAAA,CADCO,KACoBhD,EAAA8C,UAAA,aAAA,GAMrBL,EAAA,CADCO,KACyBhD,EAAA8C,UAAA,iBAAA,GAM1BL,EAAA,CADCO,KAC+BhD,EAAA8C,UAAA,iBAAA,GAMhCL,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQC,SAAS,KACb7C,EAAA8C,UAAA,YAAA,GAMtBL,EAAA,CADCC,EAAS,CAAEC,KAAMM,OAAQJ,SAAS,KACb7C,EAAA8C,UAAA,gBAAA,GAMtBL,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQC,SAAS,KACT7C,EAAA8C,UAAA,qBAAA,GAM1BL,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQC,SAAS,KACd7C,EAAA8C,UAAA,qBAAA,GAvDV9C,EAAGyC,EAAA,CADfS,EAAc,YACFlD"}
@@ -0,0 +1,190 @@
1
+ import'./../../../external/@lit/reactive-element/reactive-element.js';import'./../../../external/lit-html/lit-html.js';import'./../../../external/lit-element/lit-element.js';import{css as e}from'./../../../external/@lit/reactive-element/css-tag.js';var r=e`*,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ :root {
8
+ --kd-current-breakpoint: sm;
9
+ }
10
+ @media (min-width: 42rem) {
11
+ :root {
12
+ --kd-current-breakpoint: md;
13
+ }
14
+ }
15
+ @media (min-width: 74rem) {
16
+ :root {
17
+ --kd-current-breakpoint: lg;
18
+ }
19
+ }
20
+ @media (min-width: 82rem) {
21
+ :root {
22
+ --kd-current-breakpoint: xl;
23
+ }
24
+ }
25
+ @media (min-width: 99rem) {
26
+ :root {
27
+ --kd-current-breakpoint: max;
28
+ }
29
+ }
30
+
31
+ :host {
32
+ display: block;
33
+ outline: 2px solid transparent;
34
+ outline-offset: -2px;
35
+ transition: outline-color 150ms ease-out;
36
+ }
37
+
38
+ :host(:focus) {
39
+ outline-color: var(--kd-color-border-focus);
40
+ }
41
+
42
+ :host([disabled]:focus) {
43
+ outline-color: transparent;
44
+ }
45
+
46
+ .tab {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: 8px;
50
+ cursor: pointer;
51
+ white-space: nowrap;
52
+ text-align: center;
53
+ border-bottom: 2px solid var(--kd-color-border-default);
54
+ background: var(--kd-color-background-ui-default);
55
+ transition: border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
56
+ }
57
+ .tab.size--sm {
58
+ font-family: var(--kd-font-family-secondary);
59
+ font-size: var(--kd-font-size-utility-2-sm);
60
+ line-height: var(--kd-line-height-utility-2-sm);
61
+ font-weight: var(--kd-font-weight-regular);
62
+ letter-spacing: var(--kd-letter-spacing-5);
63
+ height: 32px;
64
+ padding: 7px 16px;
65
+ }
66
+ @media (min-width: 42rem) {
67
+ .tab.size--sm {
68
+ font-size: var(--kd-font-size-utility-2-md);
69
+ line-height: var(--kd-line-height-utility-2-md);
70
+ }
71
+ }
72
+ @media (min-width: 74rem) {
73
+ .tab.size--sm {
74
+ font-size: var(--kd-font-size-utility-2-lg);
75
+ line-height: var(--kd-line-height-utility-2-lg);
76
+ }
77
+ }
78
+ @media (min-width: 82rem) {
79
+ .tab.size--sm {
80
+ font-size: var(--kd-font-size-utility-2-xlg);
81
+ line-height: var(--kd-line-height-utility-2-xlg);
82
+ }
83
+ }
84
+ @media (min-width: 99rem) {
85
+ .tab.size--sm {
86
+ font-size: var(--kd-font-size-utility-2-max);
87
+ line-height: var(--kd-line-height-utility-2-max);
88
+ }
89
+ }
90
+ .tab.size--md {
91
+ height: 48px;
92
+ padding: 12px;
93
+ }
94
+ .tab.size--lg {
95
+ font-family: var(--kd-font-family-primary);
96
+ font-size: var(--kd-font-size-headline-8-sm);
97
+ line-height: var(--kd-line-height-headline-8-sm);
98
+ font-weight: var(--kd-font-weight-regular);
99
+ letter-spacing: var(--kd-letter-spacing-3);
100
+ font-weight: 300;
101
+ height: 56px;
102
+ padding: 14px 12px;
103
+ }
104
+ @media (min-width: 42rem) {
105
+ .tab.size--lg {
106
+ font-size: var(--kd-font-size-headline-8-md);
107
+ line-height: var(--kd-line-height-headline-8-md);
108
+ }
109
+ }
110
+ @media (min-width: 74rem) {
111
+ .tab.size--lg {
112
+ font-size: var(--kd-font-size-headline-8-lg);
113
+ line-height: var(--kd-line-height-headline-8-lg);
114
+ }
115
+ }
116
+ @media (min-width: 82rem) {
117
+ .tab.size--lg {
118
+ font-size: var(--kd-font-size-headline-8-xlg);
119
+ line-height: var(--kd-line-height-headline-8-xlg);
120
+ }
121
+ }
122
+ @media (min-width: 99rem) {
123
+ .tab.size--lg {
124
+ font-size: var(--kd-font-size-headline-8-max);
125
+ line-height: var(--kd-line-height-headline-8-max);
126
+ }
127
+ }
128
+ @media (min-width: 42rem) {
129
+ .tab.vertical {
130
+ border-bottom: none;
131
+ border-left: 2px solid var(--kd-color-border-default);
132
+ white-space: initial;
133
+ text-align: left;
134
+ }
135
+ }
136
+ .tab.contained {
137
+ border-bottom: none;
138
+ border-top: 2px solid transparent;
139
+ background: var(--kd-color-background-ui-soft);
140
+ }
141
+ @media (min-width: 42rem) {
142
+ .tab.contained.vertical {
143
+ border-top: none;
144
+ border-color: transparent;
145
+ }
146
+ }
147
+ .tab:hover {
148
+ color: var(--kd-color-text-link-hover);
149
+ border-color: var(--kd-color-border-ui-hover);
150
+ background-color: var(--kd-color-background-inverse-hover);
151
+ }
152
+ .tab:hover.contained {
153
+ border-color: transparent;
154
+ }
155
+ .tab:active {
156
+ color: var(--kd-color-text-pressed);
157
+ border-color: var(--kd-color-border-ui-hover);
158
+ background-color: var(--kd-color-background-inverse-hover);
159
+ }
160
+ .tab:active.contained {
161
+ border-color: transparent;
162
+ }
163
+ .tab.selected {
164
+ font-weight: 500;
165
+ color: var(--kd-color-text-link);
166
+ border-color: var(--kd-color-border-tertiary);
167
+ }
168
+ .tab.selected.size--lg {
169
+ font-weight: 400;
170
+ }
171
+ .tab.selected.contained {
172
+ background: var(--kd-color-background-ui-default);
173
+ border-color: var(--kd-color-border-tertiary);
174
+ }
175
+ .tab.selected.contained:hover {
176
+ background: var(--kd-color-background-inverse-hover);
177
+ }
178
+ .tab.disabled {
179
+ color: var(--kd-color-text-disabled);
180
+ cursor: not-allowed;
181
+ border-color: var(--kd-color-border-ui-disabled);
182
+ }
183
+ .tab.disabled:hover {
184
+ background: var(--kd-color-background-ui-default);
185
+ }
186
+ .tab.disabled.contained {
187
+ background: var(--kd-color-background-disabled);
188
+ border-color: transparent;
189
+ }`;export{r as default};
190
+ //# sourceMappingURL=tab.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,44 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * Tabs.
4
+ * @slot unnamed - Slot for tab content.
5
+ */
6
+ export declare class TabPanel extends LitElement {
7
+ static styles: import("lit").CSSResultGroup;
8
+ /** Matching Tab ID, required. */
9
+ tabId: string;
10
+ /** Tab Panel visible state. Must match Tab selected state. */
11
+ visible: boolean;
12
+ /** Remove side padding (left/right) on tab panel. */
13
+ noPadding: boolean;
14
+ /** Vertical orientation. Inherited.
15
+ * @internal
16
+ */
17
+ private _vertical;
18
+ /** Tab Panel ID.
19
+ * @internal
20
+ */
21
+ id: string;
22
+ /** aria role.
23
+ * @internal
24
+ */
25
+ role: string;
26
+ /** aria-labelledby, derived from tabId.
27
+ * @internal
28
+ */
29
+ 'aria-labelledby': string;
30
+ render(): import("lit-html").TemplateResult<1>;
31
+ /**
32
+ * Updates the id and aria-labelledby properties based on the changed tabId property.
33
+ * @param {any} changedProps - The `changedProps` parameter is an object that contains the properties
34
+ * that have changed in the component. It is used to determine which properties have been updated and
35
+ * perform specific actions based on those changes.
36
+ */
37
+ willUpdate(changedProps: any): void;
38
+ }
39
+ declare global {
40
+ interface HTMLElementTagNameMap {
41
+ 'kyn-tab-panel': TabPanel;
42
+ }
43
+ }
44
+ //# sourceMappingURL=tabPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/tabs/tabPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;GAGG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,OAAgB,MAAM,+BAAgB;IAEtC,iCAAiC;IAEjC,KAAK,SAAM;IAEX,+DAA+D;IAE/D,OAAO,UAAS;IAEhB,qDAAqD;IAErD,SAAS,UAAS;IAElB;;OAEG;IAEH,OAAO,CAAC,SAAS,CAAS;IAE1B;;OAEG;IAEM,EAAE,SAAM;IAEjB;;OAEG;IAEM,IAAI,SAAc;IAE3B;;OAEG;IAEH,iBAAiB,SAAM;IAEd,MAAM;IAUf;;;;;OAKG;IACM,UAAU,CAAC,YAAY,EAAE,GAAG;CAMtC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,QAAQ,CAAC;KAC3B;CACF"}
@@ -0,0 +1,2 @@
1
+ import{__decorate as e}from"../../../_virtual/_tslib.js";import'./../../../external/@lit/reactive-element/reactive-element.js';import{html as t}from'./../../../external/lit-html/lit-html.js';import{LitElement as o}from'./../../../external/lit-element/lit-element.js';import{customElement as i}from'./../../../external/@lit/reactive-element/decorators/custom-element.js';import{property as l}from'./../../../external/@lit/reactive-element/decorators/property.js';import{state as s}from'./../../../external/@lit/reactive-element/decorators/state.js';import'./../../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import{classMap as r}from'./../../../external/lit-html/directives/class-map.js';import a from"./tabPanel.scss.js";let d=class extends o{constructor(){super(...arguments),this.tabId="",this.visible=!1,this.noPadding=!1,this._vertical=!1,this.id="",this.role="tabpanel",this["aria-labelledby"]=""}render(){const e={"tab-panel":!0,vertical:this._vertical,"no-padding":this.noPadding};return t` <div class=${r(e)}><slot></slot></div> `}willUpdate(e){e.has("tabId")&&(this.id=this.tabId+"-panel",this["aria-labelledby"]=this.tabId)}};d.styles=a,e([l({type:String})],d.prototype,"tabId",void 0),e([l({type:Boolean,reflect:!0})],d.prototype,"visible",void 0),e([l({type:Boolean})],d.prototype,"noPadding",void 0),e([s()],d.prototype,"_vertical",void 0),e([l({type:String,reflect:!0})],d.prototype,"id",void 0),e([l({type:String,reflect:!0})],d.prototype,"role",void 0),e([l({type:String,reflect:!0})],d.prototype,"aria-labelledby",void 0),d=e([i("kyn-tab-panel")],d);export{d as TabPanel};
2
+ //# sourceMappingURL=tabPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabPanel.js","sources":["../../../../src/components/reusable/tabs/tabPanel.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport TabPanelScss from './tabPanel.scss';\n\n/**\n * Tabs.\n * @slot unnamed - Slot for tab content.\n */\n@customElement('kyn-tab-panel')\nexport class TabPanel extends LitElement {\n static override styles = TabPanelScss;\n\n /** Matching Tab ID, required. */\n @property({ type: String })\n tabId = '';\n\n /** Tab Panel visible state. Must match Tab selected state. */\n @property({ type: Boolean, reflect: true })\n visible = false;\n\n /** Remove side padding (left/right) on tab panel. */\n @property({ type: Boolean })\n noPadding = false;\n\n /** Vertical orientation. Inherited.\n * @internal\n */\n @state()\n private _vertical = false;\n\n /** Tab Panel ID.\n * @internal\n */\n @property({ type: String, reflect: true })\n override id = '';\n\n /** aria role.\n * @internal\n */\n @property({ type: String, reflect: true })\n override role = 'tabpanel';\n\n /** aria-labelledby, derived from tabId.\n * @internal\n */\n @property({ type: String, reflect: true })\n 'aria-labelledby' = '';\n\n override render() {\n const classes = {\n 'tab-panel': true,\n vertical: this._vertical,\n 'no-padding': this.noPadding,\n };\n\n return html` <div class=${classMap(classes)}><slot></slot></div> `;\n }\n\n /**\n * Updates the id and aria-labelledby properties based on the changed tabId property.\n * @param {any} changedProps - The `changedProps` parameter is an object that contains the properties\n * that have changed in the component. It is used to determine which properties have been updated and\n * perform specific actions based on those changes.\n */\n override willUpdate(changedProps: any) {\n if (changedProps.has('tabId')) {\n this.id = this.tabId + '-panel';\n this['aria-labelledby'] = this.tabId;\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-tab-panel': TabPanel;\n }\n}\n"],"names":["TabPanel","LitElement","constructor","this","tabId","visible","noPadding","_vertical","id","role","render","classes","vertical","html","classMap","willUpdate","changedProps","has","styles","TabPanelScss","__decorate","property","type","String","prototype","Boolean","reflect","state","customElement"],"mappings":"8vBAUO,IAAMA,EAAN,cAAuBC,EAAvBC,kCAKLC,KAAKC,MAAG,GAIRD,KAAOE,SAAG,EAIVF,KAASG,WAAG,EAMJH,KAASI,WAAG,EAMXJ,KAAEK,GAAG,GAMLL,KAAIM,KAAG,WAMhBN,KAAiB,mBAAG,EAwBrB,CAtBUO,SACP,MAAMC,EAAU,CACd,aAAa,EACbC,SAAUT,KAAKI,UACf,aAAcJ,KAAKG,WAGrB,OAAOO,CAAI,eAAeC,EAASH,yBACpC,CAQQI,WAAWC,GACdA,EAAaC,IAAI,WACnBd,KAAKK,GAAKL,KAAKC,MAAQ,SACvBD,KAAK,mBAAqBA,KAAKC,MAElC,GA3DeJ,EAAMkB,OAAGC,EAIzBC,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACPvB,EAAAwB,UAAA,aAAA,GAIXJ,EAAA,CADCC,EAAS,CAAEC,KAAMG,QAASC,SAAS,KACpB1B,EAAAwB,UAAA,eAAA,GAIhBJ,EAAA,CADCC,EAAS,CAAEC,KAAMG,WACAzB,EAAAwB,UAAA,iBAAA,GAMlBJ,EAAA,CADCO,KACyB3B,EAAAwB,UAAA,iBAAA,GAM1BJ,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQG,SAAS,KAClB1B,EAAAwB,UAAA,UAAA,GAMjBJ,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQG,SAAS,KACR1B,EAAAwB,UAAA,YAAA,GAM3BJ,EAAA,CADCC,EAAS,CAAEC,KAAMC,OAAQG,SAAS,KACZ1B,EAAAwB,UAAA,uBAAA,GArCZxB,EAAQoB,EAAA,CADpBQ,EAAc,kBACF5B"}
@@ -0,0 +1,27 @@
1
+ import'./../../../external/@lit/reactive-element/reactive-element.js';import'./../../../external/lit-html/lit-html.js';import'./../../../external/lit-element/lit-element.js';import{css as e}from'./../../../external/@lit/reactive-element/css-tag.js';var t=e`*,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ :host {
8
+ display: none;
9
+ }
10
+
11
+ :host([visible]) {
12
+ display: block;
13
+ }
14
+
15
+ .tab-panel {
16
+ padding: 24px 12px;
17
+ }
18
+ .tab-panel.no-padding {
19
+ padding: 24px 0;
20
+ }
21
+ .tab-panel.vertical {
22
+ padding: 12px 24px;
23
+ }
24
+ .tab-panel.vertical.no-padding {
25
+ padding: 12px 24px;
26
+ }`;export{t as default};
27
+ //# sourceMappingURL=tabPanel.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabPanel.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,67 @@
1
+ import { LitElement } from 'lit';
2
+ /**
3
+ * Tabs.
4
+ * @slot unnamed - Slot for kyn-tab-panel components.
5
+ * @slot tabs - Slot for kyn-tab components.
6
+ * @fires on-change - Emits the new selected Tab ID when switching tabs.
7
+ */
8
+ export declare class Tabs extends LitElement {
9
+ static styles: import("lit").CSSResultGroup;
10
+ /** Tab style. `'contained'` or `'line'`. */
11
+ tabStyle: string;
12
+ /** Size of the tab buttons, `'sm'` or `'md'`. Icon size: 16px. */
13
+ tabSize: string;
14
+ /** Vertical orientation. */
15
+ vertical: boolean;
16
+ /** Queries for slotted tabs.
17
+ * @internal
18
+ */
19
+ _tabs: any;
20
+ /** Queries for slotted tab panels.
21
+ * @internal
22
+ */
23
+ _tabPanels: any;
24
+ render(): import("lit-html").TemplateResult<1>;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ willUpdate(changedProps: any): void;
28
+ private _handleSlotChangeTabs;
29
+ private _updateChildren;
30
+ /**
31
+ * Updates children and emits a change event based on the provided
32
+ * event details when a child kyn-tab is clicked.
33
+ * @param {any} e - The parameter "e" is an event object that contains information about the event
34
+ * that triggered the handleChange function.
35
+ */
36
+ private _handleChange;
37
+ /**
38
+ * Updates the selected property of tabs and the visible property of tab panels based on
39
+ * the selected tab ID.
40
+ * @param {string} selectedTabId - The selectedTabId parameter is a string that represents the ID of
41
+ * the tab that is currently selected.
42
+ */
43
+ private _updateChildrenSelection;
44
+ /**
45
+ * Creates and dispatches a custom event called 'on-change' with the provided original event and
46
+ * selected tab ID as details.
47
+ * @param {any} origEvent - The origEvent parameter is the original event object that triggered the
48
+ * change event. It could be any type of event object, such as a click event or a keydown event.
49
+ * @param {string} selectedTabId - The selectedTabId parameter is a string that represents the ID of
50
+ * the selected tab.
51
+ */
52
+ private _emitChangeEvent;
53
+ /**
54
+ * Handles keyboard events for navigating between tabs.
55
+ * @param {any} e - The parameter `e` is an event object that represents the keyboard event. It
56
+ * contains information about the keyboard event, such as the key code of the pressed key.
57
+ * @returns In this code, the function `_handleKeyboard` returns nothing in all cases
58
+ * except when the `keyCode` matches the left or right arrow key codes.
59
+ */
60
+ private _handleKeyboard;
61
+ }
62
+ declare global {
63
+ interface HTMLElementTagNameMap {
64
+ 'kyn-tabs': Tabs;
65
+ }
66
+ }
67
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/reusable/tabs/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AASvC;;;;;GAKG;AACH,qBACa,IAAK,SAAQ,UAAU;IAClC,OAAgB,MAAM,+BAAY;IAElC,4CAA4C;IAE5C,QAAQ,SAAe;IAEvB,kEAAkE;IAElE,OAAO,SAAQ;IAEf,4BAA4B;IAE5B,QAAQ,UAAS;IAEjB;;OAEG;IAEH,KAAK,EAAG,GAAG,CAAC;IAEZ;;OAEG;IAEH,UAAU,EAAG,GAAG,CAAC;IAER,MAAM;IA6BN,iBAAiB;IAKjB,oBAAoB;IAKpB,UAAU,CAAC,YAAY,EAAE,GAAG;IAUrC,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,eAAe;IAYvB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAYhC;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;CAoDxB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,IAAI,CAAC;KAClB;CACF"}
@@ -0,0 +1,16 @@
1
+ import{__decorate as e}from"../../../_virtual/_tslib.js";import'./../../../external/@lit/reactive-element/reactive-element.js';import{html as t}from'./../../../external/lit-html/lit-html.js';import{LitElement as s}from'./../../../external/lit-element/lit-element.js';import{customElement as a}from'./../../../external/@lit/reactive-element/decorators/custom-element.js';import{property as i}from'./../../../external/@lit/reactive-element/decorators/property.js';import{queryAssignedElements as l}from'./../../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import{classMap as n}from'./../../../external/lit-html/directives/class-map.js';import o from"./tabs.scss.js";let d=class extends s{constructor(){super(...arguments),this.tabStyle="contained",this.tabSize="md",this.vertical=!1}render(){const e={wrapper:!0,vertical:this.vertical},s={tabs:!0,contained:"contained"===this.tabStyle,line:"line"===this.tabStyle};return t`
2
+ <div class=${n(e)}>
3
+ <div
4
+ class=${n(s)}
5
+ role="tablist"
6
+ @keydown=${e=>this._handleKeyboard(e)}
7
+ >
8
+ <slot name="tabs" @slotchange=${this._handleSlotChangeTabs}></slot>
9
+ </div>
10
+
11
+ <div class="panels">
12
+ <slot></slot>
13
+ </div>
14
+ </div>
15
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener("tab-activated",(e=>this._handleChange(e)))}disconnectedCallback(){this.removeEventListener("tab-activated",(e=>this._handleChange(e))),super.disconnectedCallback()}willUpdate(e){(e.has("tabSize")||e.has("vertical")||e.has("tabStyle"))&&this._updateChildren()}_handleSlotChangeTabs(){this._updateChildren()}_updateChildren(){this._tabs.forEach((e=>{e._size=this.tabSize,e._vertical=this.vertical,e._tabStyle=this.tabStyle})),this._tabPanels.forEach((e=>{e._vertical=this.vertical}))}_handleChange(e){e.stopPropagation(),this._updateChildrenSelection(e.detail.tabId),this._emitChangeEvent(e.detail.origEvent,e.detail.tabId)}_updateChildrenSelection(e){this._tabs.forEach((t=>{t.selected=t.id===e})),this._tabPanels.forEach((t=>{t.visible=t.tabId===e}))}_emitChangeEvent(e,t){const s=new CustomEvent("on-change",{detail:{origEvent:e,selectedTabId:t}});this.dispatchEvent(s)}_handleKeyboard(e){const t=this._tabs.length,s=this._tabs.findIndex((e=>e.selected));switch(e.keyCode){case 37:case 38:{let a=0===s?t-1:s-1,i=this._tabs[a];return i.disabled&&(a=0===a?t-1:a-1,i=this._tabs[a]),i.focus(),this._updateChildrenSelection(i.id),void this._emitChangeEvent(e,i.id)}case 39:case 40:{let a=s===t-1?0:s+1,i=this._tabs[a];return i.disabled&&(a=a===t-1?0:a+1,i=this._tabs[a]),i.focus(),this._updateChildrenSelection(i.id),void this._emitChangeEvent(e,i.id)}default:return}}};d.styles=o,e([i({type:String})],d.prototype,"tabStyle",void 0),e([i({type:String})],d.prototype,"tabSize",void 0),e([i({type:Boolean})],d.prototype,"vertical",void 0),e([l({slot:"tabs",selector:"kyn-tab"})],d.prototype,"_tabs",void 0),e([l({selector:"kyn-tab-panel"})],d.prototype,"_tabPanels",void 0),d=e([a("kyn-tabs")],d);export{d as Tabs};
16
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["../../../../src/components/reusable/tabs/tabs.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport {\n customElement,\n property,\n queryAssignedElements,\n} from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport TabsScss from './tabs.scss';\n\n/**\n * Tabs.\n * @slot unnamed - Slot for kyn-tab-panel components.\n * @slot tabs - Slot for kyn-tab components.\n * @fires on-change - Emits the new selected Tab ID when switching tabs.\n */\n@customElement('kyn-tabs')\nexport class Tabs extends LitElement {\n static override styles = TabsScss;\n\n /** Tab style. `'contained'` or `'line'`. */\n @property({ type: String })\n tabStyle = 'contained';\n\n /** Size of the tab buttons, `'sm'` or `'md'`. Icon size: 16px. */\n @property({ type: String })\n tabSize = 'md';\n\n /** Vertical orientation. */\n @property({ type: Boolean })\n vertical = false;\n\n /** Queries for slotted tabs.\n * @internal\n */\n @queryAssignedElements({ slot: 'tabs', selector: 'kyn-tab' })\n _tabs!: any;\n\n /** Queries for slotted tab panels.\n * @internal\n */\n @queryAssignedElements({ selector: 'kyn-tab-panel' })\n _tabPanels!: any;\n\n override render() {\n const wrapperClasses = {\n wrapper: true,\n vertical: this.vertical,\n };\n\n const tabsClasses = {\n tabs: true,\n contained: this.tabStyle === 'contained',\n line: this.tabStyle === 'line',\n };\n\n return html`\n <div class=${classMap(wrapperClasses)}>\n <div\n class=${classMap(tabsClasses)}\n role=\"tablist\"\n @keydown=${(e: any) => this._handleKeyboard(e)}\n >\n <slot name=\"tabs\" @slotchange=${this._handleSlotChangeTabs}></slot>\n </div>\n\n <div class=\"panels\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('tab-activated', (e) => this._handleChange(e));\n }\n\n override disconnectedCallback() {\n this.removeEventListener('tab-activated', (e) => this._handleChange(e));\n super.disconnectedCallback();\n }\n\n override willUpdate(changedProps: any) {\n if (\n changedProps.has('tabSize') ||\n changedProps.has('vertical') ||\n changedProps.has('tabStyle')\n ) {\n this._updateChildren();\n }\n }\n\n private _handleSlotChangeTabs() {\n this._updateChildren();\n }\n\n private _updateChildren() {\n this._tabs.forEach((tab: any) => {\n tab._size = this.tabSize;\n tab._vertical = this.vertical;\n tab._tabStyle = this.tabStyle;\n });\n\n this._tabPanels.forEach((tabPanel: any) => {\n tabPanel._vertical = this.vertical;\n });\n }\n\n /**\n * Updates children and emits a change event based on the provided\n * event details when a child kyn-tab is clicked.\n * @param {any} e - The parameter \"e\" is an event object that contains information about the event\n * that triggered the handleChange function.\n */\n private _handleChange(e: any) {\n e.stopPropagation();\n this._updateChildrenSelection(e.detail.tabId);\n this._emitChangeEvent(e.detail.origEvent, e.detail.tabId);\n }\n\n /**\n * Updates the selected property of tabs and the visible property of tab panels based on\n * the selected tab ID.\n * @param {string} selectedTabId - The selectedTabId parameter is a string that represents the ID of\n * the tab that is currently selected.\n */\n private _updateChildrenSelection(selectedTabId: string) {\n // update tabs selected prop\n this._tabs.forEach((tab: any) => {\n tab.selected = tab.id === selectedTabId;\n });\n\n // update tab-panels visible prop\n this._tabPanels.forEach((tabPanel: any) => {\n tabPanel.visible = tabPanel.tabId === selectedTabId;\n });\n }\n\n /**\n * Creates and dispatches a custom event called 'on-change' with the provided original event and\n * selected tab ID as details.\n * @param {any} origEvent - The origEvent parameter is the original event object that triggered the\n * change event. It could be any type of event object, such as a click event or a keydown event.\n * @param {string} selectedTabId - The selectedTabId parameter is a string that represents the ID of\n * the selected tab.\n */\n private _emitChangeEvent(origEvent: any, selectedTabId: string) {\n const event = new CustomEvent('on-change', {\n detail: { origEvent: origEvent, selectedTabId: selectedTabId },\n });\n this.dispatchEvent(event);\n }\n\n /**\n * Handles keyboard events for navigating between tabs.\n * @param {any} e - The parameter `e` is an event object that represents the keyboard event. It\n * contains information about the keyboard event, such as the key code of the pressed key.\n * @returns In this code, the function `_handleKeyboard` returns nothing in all cases\n * except when the `keyCode` matches the left or right arrow key codes.\n */\n private _handleKeyboard(e: any) {\n const LEFT_ARROW_KEY_CODE = 37;\n const UP_ARROW_KEY_CODE = 38;\n const RIGHT_ARROW_KEY_CODE = 39;\n const DOWN_ARROW_KEY_CODE = 40;\n const TabCount = this._tabs.length;\n const SelectedTabIndex = this._tabs.findIndex((tab: any) => tab.selected);\n\n switch (e.keyCode) {\n case LEFT_ARROW_KEY_CODE:\n case UP_ARROW_KEY_CODE: {\n // activate previous tab\n let prevIndex =\n SelectedTabIndex === 0 ? TabCount - 1 : SelectedTabIndex - 1;\n let prevTab = this._tabs[prevIndex];\n\n if (prevTab.disabled) {\n prevIndex = prevIndex === 0 ? TabCount - 1 : prevIndex - 1;\n prevTab = this._tabs[prevIndex];\n }\n\n prevTab.focus();\n\n this._updateChildrenSelection(prevTab.id);\n this._emitChangeEvent(e, prevTab.id);\n\n return;\n }\n case RIGHT_ARROW_KEY_CODE:\n case DOWN_ARROW_KEY_CODE: {\n // activate next tab\n let nextIndex =\n SelectedTabIndex === TabCount - 1 ? 0 : SelectedTabIndex + 1;\n let nextTab = this._tabs[nextIndex];\n\n if (nextTab.disabled) {\n nextIndex = nextIndex === TabCount - 1 ? 0 : nextIndex + 1;\n nextTab = this._tabs[nextIndex];\n }\n\n nextTab.focus();\n\n this._updateChildrenSelection(nextTab.id);\n this._emitChangeEvent(e, nextTab.id);\n\n return;\n }\n default: {\n return;\n }\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kyn-tabs': Tabs;\n }\n}\n"],"names":["Tabs","LitElement","constructor","this","tabStyle","tabSize","vertical","render","wrapperClasses","wrapper","tabsClasses","tabs","contained","line","html","classMap","e","_handleKeyboard","_handleSlotChangeTabs","connectedCallback","super","addEventListener","_handleChange","disconnectedCallback","removeEventListener","willUpdate","changedProps","has","_updateChildren","_tabs","forEach","tab","_size","_vertical","_tabStyle","_tabPanels","tabPanel","stopPropagation","_updateChildrenSelection","detail","tabId","_emitChangeEvent","origEvent","selectedTabId","selected","id","visible","event","CustomEvent","dispatchEvent","TabCount","length","SelectedTabIndex","findIndex","keyCode","prevIndex","prevTab","disabled","focus","nextIndex","nextTab","styles","TabsScss","__decorate","property","type","String","prototype","Boolean","queryAssignedElements","slot","selector","customElement"],"mappings":"ksBAgBO,IAAMA,EAAN,cAAmBC,EAAnBC,kCAKLC,KAAQC,SAAG,YAIXD,KAAOE,QAAG,KAIVF,KAAQG,UAAG,CAuLZ,CAzKUC,SACP,MAAMC,EAAiB,CACrBC,SAAS,EACTH,SAAUH,KAAKG,UAGXI,EAAc,CAClBC,MAAM,EACNC,UAA6B,cAAlBT,KAAKC,SAChBS,KAAwB,SAAlBV,KAAKC,UAGb,OAAOU,CAAI;mBACIC,EAASP;;kBAEVO,EAASL;;qBAELM,GAAWb,KAAKc,gBAAgBD;;0CAEZb,KAAKe;;;;;;;KAQ5C,CAEQC,oBACPC,MAAMD,oBACNhB,KAAKkB,iBAAiB,iBAAkBL,GAAMb,KAAKmB,cAAcN,IAClE,CAEQO,uBACPpB,KAAKqB,oBAAoB,iBAAkBR,GAAMb,KAAKmB,cAAcN,KACpEI,MAAMG,sBACP,CAEQE,WAAWC,IAEhBA,EAAaC,IAAI,YACjBD,EAAaC,IAAI,aACjBD,EAAaC,IAAI,cAEjBxB,KAAKyB,iBAER,CAEOV,wBACNf,KAAKyB,iBACN,CAEOA,kBACNzB,KAAK0B,MAAMC,SAASC,IAClBA,EAAIC,MAAQ7B,KAAKE,QACjB0B,EAAIE,UAAY9B,KAAKG,SACrByB,EAAIG,UAAY/B,KAAKC,QAAQ,IAG/BD,KAAKgC,WAAWL,SAASM,IACvBA,EAASH,UAAY9B,KAAKG,QAAQ,GAErC,CAQOgB,cAAcN,GACpBA,EAAEqB,kBACFl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AM6D,OAAGC,EAIzBC,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACKlE,EAAAmE,UAAA,gBAAA,GAIvBJ,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACHlE,EAAAmE,UAAA,eAAA,GAIfJ,EAAA,CADCC,EAAS,CAAEC,KAAMG,WACDpE,EAAAmE,UAAA,gBAAA,GAMjBJ,EAAA,CADCM,EAAsB,CAAEC,KAAM,OAAQC,SAAU,aACrCvE,EAAAmE,UAAA,aAAA,GAMZJ,EAAA,CADCM,EAAsB,CAAEE,SAAU,mBAClBvE,EAAAmE,UAAA,kBAAA,GAzBNnE,EAAI+D,EAAA,CADhBS,EAAc,aACFxE"}
@@ -0,0 +1,74 @@
1
+ import'./../../../external/@lit/reactive-element/reactive-element.js';import'./../../../external/lit-html/lit-html.js';import'./../../../external/lit-element/lit-element.js';import{css as e}from'./../../../external/@lit/reactive-element/css-tag.js';var t=e`*,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ :root {
8
+ --kd-current-breakpoint: sm;
9
+ }
10
+ @media (min-width: 42rem) {
11
+ :root {
12
+ --kd-current-breakpoint: md;
13
+ }
14
+ }
15
+ @media (min-width: 74rem) {
16
+ :root {
17
+ --kd-current-breakpoint: lg;
18
+ }
19
+ }
20
+ @media (min-width: 82rem) {
21
+ :root {
22
+ --kd-current-breakpoint: xl;
23
+ }
24
+ }
25
+ @media (min-width: 99rem) {
26
+ :root {
27
+ --kd-current-breakpoint: max;
28
+ }
29
+ }
30
+
31
+ :host {
32
+ display: block;
33
+ }
34
+
35
+ .wrapper {
36
+ display: flex;
37
+ flex-direction: column;
38
+ }
39
+ @media (min-width: 42rem) {
40
+ .wrapper.vertical {
41
+ flex-direction: row;
42
+ align-items: flex-start;
43
+ }
44
+ }
45
+
46
+ .tabs {
47
+ display: flex;
48
+ gap: 2px;
49
+ overflow-x: auto;
50
+ }
51
+ .tabs.contained::after {
52
+ content: "";
53
+ background: var(--kd-color-background-ui-soft);
54
+ flex-grow: 1;
55
+ }
56
+ .tabs.line::after {
57
+ content: "";
58
+ border-bottom: 2px solid var(--kd-color-border-default);
59
+ flex-grow: 1;
60
+ }
61
+ @media (min-width: 42rem) {
62
+ .vertical .tabs {
63
+ flex-direction: column;
64
+ overflow-x: initial;
65
+ }
66
+ .vertical .tabs.line::after {
67
+ content: none;
68
+ }
69
+ }
70
+
71
+ .panels {
72
+ flex-grow: 1;
73
+ }`;export{t as default};
74
+ //# sourceMappingURL=tabs.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { Table } from './components/reusable/table';
16
16
  export { DataTable } from './components/reusable/table/data-table';
17
17
  export { Pagination } from './components/reusable/pagination';
18
18
  export { OverflowMenu, OverflowMenuItem, } from './components/reusable/overflowMenu';
19
+ export { Tabs, Tab, TabPanel } from './components/reusable/tabs';
19
20
  export { Modal } from './components/reusable/modal';
20
21
  export { Tooltip } from './components/reusable/tooltip';
21
22
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EACL,WAAW,EACX,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B,CAAC;AACtD,OAAO,EACL,WAAW,EACX,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{Header}from"./components/global/header/header.js";export{HeaderNav}from"./components/global/header/headerNav.js";export{HeaderLink}from"./components/global/header/headerLink.js";export{HeaderFlyouts}from"./components/global/header/headerFlyouts.js";export{HeaderFlyout}from"./components/global/header/headerFlyout.js";export{HeaderAvatar}from"./components/global/header/headerAvatar.js";export{HeaderPanel}from"./components/global/header/headerPanel.js";export{HeaderPanelLink}from"./components/global/header/headerPanelLink.js";export{LocalNav}from"./components/global/localNav/localNav.js";export{LocalNavLink}from"./components/global/localNav/localNavLink.js";export{Footer}from"./components/global/footer/footer.js";export{FooterNav}from"./components/global/footer/footerNav.js";export{FooterNavLink}from"./components/global/footer/footerLink.js";export{UiShell}from"./components/global/uiShell/uiShell.js";export{RadioButton}from"./components/reusable/radioButton/radioButton.js";export{RadioButtonGroup}from"./components/reusable/radioButton/radioButtonGroup.js";export{Checkbox}from"./components/reusable/checkbox/checkbox.js";export{CheckboxGroup}from"./components/reusable/checkbox/checkboxGroup.js";export{TextInput}from"./components/reusable/textInput/textInput.js";export{TextArea}from"./components/reusable/textArea/textArea.js";export{ToggleButton}from"./components/reusable/toggleButton/toggleButton.js";export{TimePicker}from"./components/reusable/timepicker/timepicker.js";export{Dropdown}from"./components/reusable/dropdown/dropdown.js";export{DropdownOption}from"./components/reusable/dropdown/dropdownOption.js";export{DatePicker}from"./components/reusable/datePicker/datepicker.js";export{DateRangePicker}from"./components/reusable/daterangepicker/daterangepicker.js";export{BreadcrumbItem}from"./components/reusable/breadcrumbs/breadcrumbItem.js";export{Breadcrumbs}from"./components/reusable/breadcrumbs/breadcrumbs.js";export{Table}from"./components/reusable/table/Table.js";import"./components/reusable/table/table-cell.js";import"./components/reusable/table/table-row.js";import"./components/reusable/table/table-body.js";import"./components/reusable/table/table-head.js";import"./components/reusable/table/table-header.js";import"./components/reusable/table/table-footer.js";import"./components/reusable/table/table-toolbar.js";import"./components/reusable/table/table-container.js";export{Pagination}from"./components/reusable/pagination/Pagination.js";import"./components/reusable/pagination/pagination-items-range.js";import"./components/reusable/pagination/pagination-page-size-dropdown.js";import"./components/reusable/pagination/pagination-navigation-buttons.js";export{DataTable}from"./components/reusable/table/data-table.js";export{OverflowMenu}from"./components/reusable/overflowMenu/overflowMenu.js";export{OverflowMenuItem}from"./components/reusable/overflowMenu/overflowMenuItem.js";export{Modal}from"./components/reusable/modal/modal.js";export{Tooltip}from"./components/reusable/tooltip/tooltip.js";
1
+ export{Header}from"./components/global/header/header.js";export{HeaderNav}from"./components/global/header/headerNav.js";export{HeaderLink}from"./components/global/header/headerLink.js";export{HeaderFlyouts}from"./components/global/header/headerFlyouts.js";export{HeaderFlyout}from"./components/global/header/headerFlyout.js";export{HeaderAvatar}from"./components/global/header/headerAvatar.js";export{HeaderPanel}from"./components/global/header/headerPanel.js";export{HeaderPanelLink}from"./components/global/header/headerPanelLink.js";export{LocalNav}from"./components/global/localNav/localNav.js";export{LocalNavLink}from"./components/global/localNav/localNavLink.js";export{Footer}from"./components/global/footer/footer.js";export{FooterNav}from"./components/global/footer/footerNav.js";export{FooterNavLink}from"./components/global/footer/footerLink.js";export{UiShell}from"./components/global/uiShell/uiShell.js";export{RadioButton}from"./components/reusable/radioButton/radioButton.js";export{RadioButtonGroup}from"./components/reusable/radioButton/radioButtonGroup.js";export{Checkbox}from"./components/reusable/checkbox/checkbox.js";export{CheckboxGroup}from"./components/reusable/checkbox/checkboxGroup.js";export{TextInput}from"./components/reusable/textInput/textInput.js";export{TextArea}from"./components/reusable/textArea/textArea.js";export{ToggleButton}from"./components/reusable/toggleButton/toggleButton.js";export{TimePicker}from"./components/reusable/timepicker/timepicker.js";export{Dropdown}from"./components/reusable/dropdown/dropdown.js";export{DropdownOption}from"./components/reusable/dropdown/dropdownOption.js";export{DatePicker}from"./components/reusable/datePicker/datepicker.js";export{DateRangePicker}from"./components/reusable/daterangepicker/daterangepicker.js";export{BreadcrumbItem}from"./components/reusable/breadcrumbs/breadcrumbItem.js";export{Breadcrumbs}from"./components/reusable/breadcrumbs/breadcrumbs.js";export{Table}from"./components/reusable/table/Table.js";import"./components/reusable/table/table-cell.js";import"./components/reusable/table/table-row.js";import"./components/reusable/table/table-body.js";import"./components/reusable/table/table-head.js";import"./components/reusable/table/table-header.js";import"./components/reusable/table/table-footer.js";import"./components/reusable/table/table-toolbar.js";import"./components/reusable/table/table-container.js";export{Pagination}from"./components/reusable/pagination/Pagination.js";import"./components/reusable/pagination/pagination-items-range.js";import"./components/reusable/pagination/pagination-page-size-dropdown.js";import"./components/reusable/pagination/pagination-navigation-buttons.js";export{DataTable}from"./components/reusable/table/data-table.js";export{OverflowMenu}from"./components/reusable/overflowMenu/overflowMenu.js";export{OverflowMenuItem}from"./components/reusable/overflowMenu/overflowMenuItem.js";export{Tabs}from"./components/reusable/tabs/tabs.js";export{Tab}from"./components/reusable/tabs/tab.js";export{TabPanel}from"./components/reusable/tabs/tabPanel.js";export{Modal}from"./components/reusable/modal/modal.js";export{Tooltip}from"./components/reusable/tooltip/tooltip.js";
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyndryl-design-system/shidoka-applications",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "Shidoka Web Components for Applications",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "query-selector-shadow-dom": "^1.0.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "@kyndryl-design-system/shidoka-foundation": "^1.3.4"
36
+ "@kyndryl-design-system/shidoka-foundation": "^1.3.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.20.12",
@@ -44,7 +44,7 @@
44
44
  "@commitlint/cli": "^17.4.4",
45
45
  "@commitlint/config-conventional": "^17.4.4",
46
46
  "@custom-elements-manifest/analyzer": "^0.6.8",
47
- "@kyndryl-design-system/shidoka-foundation": "^1.3.4",
47
+ "@kyndryl-design-system/shidoka-foundation": "^1.3.5",
48
48
  "@open-wc/testing": "^3.1.7",
49
49
  "@rollup/plugin-node-resolve": "^15.0.1",
50
50
  "@rollup/plugin-typescript": "^11.0.0",