@aquera/nile-elements 0.0.20 → 0.0.21
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js +2 -5
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js +8 -16
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.css.js +80 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.d.ts +55 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.js +129 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.css.js +245 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.d.ts +82 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.js +392 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-group/nile-tab-group.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.css.js +32 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.d.ts +38 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.js +71 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab-panel/nile-tab-panel.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +460 -86
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +2 -5
- package/dist/nile-calendar/nile-calendar.esm.js +8 -16
- package/dist/nile-tab/index.cjs.js +2 -0
- package/dist/nile-tab/index.cjs.js.map +1 -0
- package/dist/nile-tab/index.esm.js +1 -0
- package/dist/nile-tab/nile-tab.cjs.js +2 -0
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -0
- package/dist/nile-tab/nile-tab.css.cjs.js +2 -0
- package/dist/nile-tab/nile-tab.css.cjs.js.map +1 -0
- package/dist/nile-tab/nile-tab.css.esm.js +68 -0
- package/dist/nile-tab/nile-tab.esm.js +21 -0
- package/dist/nile-tab-group/index.cjs.js +2 -0
- package/dist/nile-tab-group/index.cjs.js.map +1 -0
- package/dist/nile-tab-group/index.esm.js +1 -0
- package/dist/nile-tab-group/nile-tab-group.cjs.js +2 -0
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -0
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js +2 -0
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -0
- package/dist/nile-tab-group/nile-tab-group.css.esm.js +233 -0
- package/dist/nile-tab-group/nile-tab-group.esm.js +43 -0
- package/dist/nile-tab-panel/index.cjs.js +2 -0
- package/dist/nile-tab-panel/index.cjs.js.map +1 -0
- package/dist/nile-tab-panel/index.esm.js +1 -0
- package/dist/nile-tab-panel/nile-tab-panel.cjs.js +2 -0
- package/dist/nile-tab-panel/nile-tab-panel.cjs.js.map +1 -0
- package/dist/nile-tab-panel/nile-tab-panel.css.cjs.js +2 -0
- package/dist/nile-tab-panel/nile-tab-panel.css.cjs.js.map +1 -0
- package/dist/nile-tab-panel/nile-tab-panel.css.esm.js +20 -0
- package/dist/nile-tab-panel/nile-tab-panel.esm.js +6 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +2 -5
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +1 -0
- package/dist/src/nile-calendar/nile-calendar.js +8 -16
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-tab/index.d.ts +1 -0
- package/dist/src/nile-tab/index.js +2 -0
- package/dist/src/nile-tab/index.js.map +1 -0
- package/dist/src/nile-tab/nile-tab.css.d.ts +12 -0
- package/dist/src/nile-tab/nile-tab.css.js +80 -0
- package/dist/src/nile-tab/nile-tab.css.js.map +1 -0
- package/dist/src/nile-tab/nile-tab.d.ts +55 -0
- package/dist/src/nile-tab/nile-tab.js +129 -0
- package/dist/src/nile-tab/nile-tab.js.map +1 -0
- package/dist/src/nile-tab-group/index.d.ts +1 -0
- package/dist/src/nile-tab-group/index.js +2 -0
- package/dist/src/nile-tab-group/index.js.map +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.css.d.ts +12 -0
- package/dist/src/nile-tab-group/nile-tab-group.css.js +245 -0
- package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.d.ts +82 -0
- package/dist/src/nile-tab-group/nile-tab-group.js +392 -0
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -0
- package/dist/src/nile-tab-panel/index.d.ts +1 -0
- package/dist/src/nile-tab-panel/index.js +2 -0
- package/dist/src/nile-tab-panel/index.js.map +1 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.css.d.ts +12 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.css.js +32 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.css.js.map +1 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.d.ts +38 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.js +71 -0
- package/dist/src/nile-tab-panel/nile-tab-panel.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/nile-calendar/nile-calendar.css.ts +2 -5
- package/src/nile-calendar/nile-calendar.ts +9 -16
- package/src/nile-tab/index.ts +1 -0
- package/src/nile-tab/nile-tab.css.ts +82 -0
- package/src/nile-tab/nile-tab.ts +129 -0
- package/src/nile-tab-group/index.ts +1 -0
- package/src/nile-tab-group/nile-tab-group.css.ts +247 -0
- package/src/nile-tab-group/nile-tab-group.ts +441 -0
- package/src/nile-tab-panel/index.ts +1 -0
- package/src/nile-tab-panel/nile-tab-panel.css.ts +34 -0
- package/src/nile-tab-panel/nile-tab-panel.ts +74 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -36,3 +36,6 @@ export { NileSwitcher } from './nile-switcher';
|
|
36
36
|
export { NileContentEditor } from './nile-content-editor';
|
37
37
|
export { NileDialog } from './nile-dialog';
|
38
38
|
export { NileErrorNotification } from './nile-error-notification';
|
39
|
+
export { NileTabGroup } from './nile-tab-group';
|
40
|
+
export { NileTab } from './nile-tab';
|
41
|
+
export { NileTabPanel } from './nile-tab-panel';
|
@@ -214,11 +214,8 @@ export const styles = css`
|
|
214
214
|
}
|
215
215
|
|
216
216
|
.calendar-switcher {
|
217
|
-
|
218
|
-
|
219
|
-
gap: 24px;
|
220
|
-
justify-content: space-between;
|
221
|
-
border-bottom: 1px solid #e5e9eb;
|
217
|
+
width: 100%;
|
218
|
+
margin-right: 24px;
|
222
219
|
}
|
223
220
|
|
224
221
|
.calendar-switch {
|
@@ -620,6 +620,11 @@ export class NileCalendar extends NileElement {
|
|
620
620
|
this.requestUpdate();
|
621
621
|
}
|
622
622
|
|
623
|
+
onTypeChange(event: any) {
|
624
|
+
console.log(event);
|
625
|
+
this.type = event.detail.value;
|
626
|
+
}
|
627
|
+
|
623
628
|
/**
|
624
629
|
* Render method
|
625
630
|
*/
|
@@ -641,22 +646,10 @@ export class NileCalendar extends NileElement {
|
|
641
646
|
>
|
642
647
|
<div class="calendar-config ${!this.range ? 'hidden' : ''}">
|
643
648
|
<div class="calendar-switcher">
|
644
|
-
<
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
@click="${() => this.setType('absolute')}"
|
649
|
-
>
|
650
|
-
Absolute
|
651
|
-
</div>
|
652
|
-
<div
|
653
|
-
class="calendar-switch${this.type === 'relative'
|
654
|
-
? '__active'
|
655
|
-
: ''}"
|
656
|
-
@click="${() => this.setType('relative')}"
|
657
|
-
>
|
658
|
-
Relative
|
659
|
-
</div>
|
649
|
+
<nile-tab-group @nile-tab-show="${this.onTypeChange}">
|
650
|
+
<nile-tab slot="nav" panel="absolute">Absolute</nile-tab>
|
651
|
+
<nile-tab slot="nav" panel="relative">Relative</nile-tab>
|
652
|
+
</nile-tab-group>
|
660
653
|
</div>
|
661
654
|
|
662
655
|
<div class="calendar-timezone">
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileTab } from './nile-tab';
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {css} from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Tab CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
[hidden] {
|
15
|
+
display: none !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
:host {
|
19
|
+
display: inline-block;
|
20
|
+
}
|
21
|
+
|
22
|
+
.tab {
|
23
|
+
display: inline-flex;
|
24
|
+
align-items: center;
|
25
|
+
border-radius: 8px;
|
26
|
+
color: var(--nile-colors-dark-500);
|
27
|
+
padding: 4px 4px 12px 4px;
|
28
|
+
white-space: nowrap;
|
29
|
+
user-select: none;
|
30
|
+
cursor: pointer;
|
31
|
+
transition: 0.2s box-shadow, 0.2s color;
|
32
|
+
font-family: Colfax-regular;
|
33
|
+
font-size: 16px;
|
34
|
+
font-style: normal;
|
35
|
+
font-weight: 500;
|
36
|
+
line-height: 16px;
|
37
|
+
letter-spacing: 0.2px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.tab:hover:not(.tab--disabled) {
|
41
|
+
color: var(--nile-colors-dark-500);
|
42
|
+
}
|
43
|
+
|
44
|
+
.tab:focus {
|
45
|
+
outline: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
.tab:focus-visible:not(.tab--disabled) {
|
49
|
+
color: var(--nile-colors-primary-600);
|
50
|
+
}
|
51
|
+
|
52
|
+
.tab.tab--active:not(.tab--disabled) {
|
53
|
+
color: var(--nile-colors-primary-600);
|
54
|
+
}
|
55
|
+
|
56
|
+
.tab.tab--closable {
|
57
|
+
padding-inline-end: 4px;
|
58
|
+
}
|
59
|
+
|
60
|
+
.tab.tab--disabled {
|
61
|
+
opacity: 0.5;
|
62
|
+
cursor: not-allowed;
|
63
|
+
}
|
64
|
+
|
65
|
+
.tab__close-button {
|
66
|
+
font-size: 14px;
|
67
|
+
margin-inline-start: 4px;
|
68
|
+
}
|
69
|
+
|
70
|
+
.tab__close-button::part(base) {
|
71
|
+
padding: 3px;
|
72
|
+
}
|
73
|
+
|
74
|
+
@media (forced-colors: active) {
|
75
|
+
.tab.tab--active:not(.tab--disabled) {
|
76
|
+
outline: solid 1px transparent;
|
77
|
+
outline-offset: -3px;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
`;
|
81
|
+
|
82
|
+
export default [styles];
|
@@ -0,0 +1,129 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';
|
9
|
+
import { customElement } from 'lit/decorators.js';
|
10
|
+
import {styles} from './nile-tab.css';
|
11
|
+
|
12
|
+
import '../nile-icon-button/nile-icon-button';
|
13
|
+
import { classMap } from 'lit/directives/class-map.js';
|
14
|
+
import { query } from 'lit/decorators.js';
|
15
|
+
import { watch } from '../internal/watch';
|
16
|
+
import NileElement from '../internal/nile-element';
|
17
|
+
import type { CSSResultGroup } from 'lit';
|
18
|
+
|
19
|
+
let id = 0;
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Nile icon component.
|
23
|
+
*
|
24
|
+
* @tag nile-tab
|
25
|
+
*
|
26
|
+
*
|
27
|
+
* @dependency nile-icon-button
|
28
|
+
*
|
29
|
+
* @slot - The tab's label.
|
30
|
+
*
|
31
|
+
* @event nile-close - Emitted when the tab is closable and the close button is activated.
|
32
|
+
*
|
33
|
+
* @csspart base - The component's base wrapper.
|
34
|
+
* @csspart close-button - The close button, an `<nile-icon-button>`.
|
35
|
+
* @csspart close-button__base - The close button's exported `base` part.
|
36
|
+
*/
|
37
|
+
@customElement('nile-tab')
|
38
|
+
export class NileTab extends NileElement {
|
39
|
+
static styles: CSSResultGroup = styles;
|
40
|
+
|
41
|
+
private readonly attrId = ++id;
|
42
|
+
private readonly componentId = `nile-tab-${this.attrId}`;
|
43
|
+
|
44
|
+
@query('.tab') tab: HTMLElement;
|
45
|
+
|
46
|
+
/** The name of the tab panel this tab is associated with. The panel must be located in the same tab group. */
|
47
|
+
@property({ reflect: true }) panel = '';
|
48
|
+
|
49
|
+
/** Draws the tab in an active state. */
|
50
|
+
@property({ type: Boolean, reflect: true }) active = false;
|
51
|
+
|
52
|
+
/** Makes the tab closable and shows a close button. */
|
53
|
+
@property({ type: Boolean }) closable = false;
|
54
|
+
|
55
|
+
/** Disables the tab and prevents selection. */
|
56
|
+
@property({ type: Boolean, reflect: true }) disabled = false;
|
57
|
+
|
58
|
+
connectedCallback() {
|
59
|
+
super.connectedCallback();
|
60
|
+
this.setAttribute('role', 'tab');
|
61
|
+
}
|
62
|
+
|
63
|
+
private handleCloseClick(event: Event) {
|
64
|
+
event.stopPropagation();
|
65
|
+
this.emit('nile-close');
|
66
|
+
}
|
67
|
+
|
68
|
+
@watch('active')
|
69
|
+
handleActiveChange() {
|
70
|
+
this.setAttribute('aria-selected', this.active ? 'true' : 'false');
|
71
|
+
}
|
72
|
+
|
73
|
+
@watch('disabled')
|
74
|
+
handleDisabledChange() {
|
75
|
+
this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
|
76
|
+
}
|
77
|
+
|
78
|
+
/** Sets focus to the tab. */
|
79
|
+
focus(options?: FocusOptions) {
|
80
|
+
this.tab.focus(options);
|
81
|
+
}
|
82
|
+
|
83
|
+
/** Removes focus from the tab. */
|
84
|
+
blur() {
|
85
|
+
this.tab.blur();
|
86
|
+
}
|
87
|
+
|
88
|
+
render() {
|
89
|
+
// If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels
|
90
|
+
this.id = this.id.length > 0 ? this.id : this.componentId;
|
91
|
+
|
92
|
+
return html`
|
93
|
+
<div
|
94
|
+
part="base"
|
95
|
+
class=${classMap({
|
96
|
+
tab: true,
|
97
|
+
'tab--active': this.active,
|
98
|
+
'tab--closable': this.closable,
|
99
|
+
'tab--disabled': this.disabled
|
100
|
+
})}
|
101
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
102
|
+
>
|
103
|
+
<slot></slot>
|
104
|
+
${this.closable
|
105
|
+
? html`
|
106
|
+
<nile-icon-button
|
107
|
+
part="close-button"
|
108
|
+
exportparts="base:close-button__base"
|
109
|
+
name="x-lg"
|
110
|
+
library="system"
|
111
|
+
label="close"
|
112
|
+
class="tab__close-button"
|
113
|
+
@click=${this.handleCloseClick}
|
114
|
+
tabindex="-1"
|
115
|
+
></nile-icon-button>
|
116
|
+
`
|
117
|
+
: ''}
|
118
|
+
</div>
|
119
|
+
`;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
export default NileTab;
|
124
|
+
|
125
|
+
declare global {
|
126
|
+
interface HTMLElementTagNameMap {
|
127
|
+
'nile-tab': NileTab;
|
128
|
+
}
|
129
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileTabGroup } from './nile-tab-group';
|
@@ -0,0 +1,247 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* TabGroup CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
[hidden] {
|
15
|
+
display: none !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
:host {
|
19
|
+
--indicator-color: var(--nile-colors-primary-600);
|
20
|
+
--track-color: #e5e9eb;
|
21
|
+
--track-width: 1px;
|
22
|
+
|
23
|
+
display: block;
|
24
|
+
}
|
25
|
+
|
26
|
+
.tab-group {
|
27
|
+
display: flex;
|
28
|
+
border-radius: 0;
|
29
|
+
}
|
30
|
+
|
31
|
+
.tab-group__tabs {
|
32
|
+
display: flex;
|
33
|
+
position: relative;
|
34
|
+
gap: 24px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.tab-group__indicator {
|
38
|
+
position: absolute;
|
39
|
+
transition: 0.3s translate ease, 0.3s width ease;
|
40
|
+
}
|
41
|
+
|
42
|
+
.tab-group--has-scroll-controls .tab-group__nav-container {
|
43
|
+
position: relative;
|
44
|
+
padding: 0 10px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.tab-group__body {
|
48
|
+
display: block;
|
49
|
+
overflow: auto;
|
50
|
+
}
|
51
|
+
|
52
|
+
.tab-group__scroll-button {
|
53
|
+
display: flex;
|
54
|
+
align-items: center;
|
55
|
+
justify-content: center;
|
56
|
+
position: absolute;
|
57
|
+
top: 0;
|
58
|
+
bottom: 0;
|
59
|
+
width: 20px;
|
60
|
+
}
|
61
|
+
|
62
|
+
.tab-group__scroll-button--start {
|
63
|
+
left: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
.tab-group__scroll-button--end {
|
67
|
+
right: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.tab-group--rtl .tab-group__scroll-button--start {
|
71
|
+
left: auto;
|
72
|
+
right: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
.tab-group--rtl .tab-group__scroll-button--end {
|
76
|
+
left: 0;
|
77
|
+
right: auto;
|
78
|
+
}
|
79
|
+
|
80
|
+
/*
|
81
|
+
* Top
|
82
|
+
*/
|
83
|
+
|
84
|
+
.tab-group--top {
|
85
|
+
flex-direction: column;
|
86
|
+
}
|
87
|
+
|
88
|
+
.tab-group--top .tab-group__nav-container {
|
89
|
+
order: 1;
|
90
|
+
}
|
91
|
+
|
92
|
+
.tab-group--top .tab-group__nav {
|
93
|
+
display: flex;
|
94
|
+
overflow-x: auto;
|
95
|
+
|
96
|
+
/* Hide scrollbar in Firefox */
|
97
|
+
scrollbar-width: none;
|
98
|
+
}
|
99
|
+
|
100
|
+
/* Hide scrollbar in Chrome/Safari */
|
101
|
+
.tab-group--top .tab-group__nav::-webkit-scrollbar {
|
102
|
+
width: 0;
|
103
|
+
height: 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
.tab-group--top .tab-group__tabs {
|
107
|
+
flex: 1 1 auto;
|
108
|
+
position: relative;
|
109
|
+
flex-direction: row;
|
110
|
+
border-bottom: solid var(--track-width) var(--track-color);
|
111
|
+
}
|
112
|
+
|
113
|
+
.tab-group--top .tab-group__indicator {
|
114
|
+
bottom: calc(-1 * var(--track-width));
|
115
|
+
border-bottom: solid 3px var(--indicator-color);
|
116
|
+
}
|
117
|
+
|
118
|
+
.tab-group--top .tab-group__body {
|
119
|
+
order: 2;
|
120
|
+
}
|
121
|
+
|
122
|
+
.tab-group--top ::slotted(nile-tab-panel) {
|
123
|
+
--padding: 10px 0;
|
124
|
+
}
|
125
|
+
|
126
|
+
/*
|
127
|
+
* Bottom
|
128
|
+
*/
|
129
|
+
|
130
|
+
.tab-group--bottom {
|
131
|
+
flex-direction: column;
|
132
|
+
}
|
133
|
+
|
134
|
+
.tab-group--bottom .tab-group__nav-container {
|
135
|
+
order: 2;
|
136
|
+
}
|
137
|
+
|
138
|
+
.tab-group--bottom .tab-group__nav {
|
139
|
+
display: flex;
|
140
|
+
overflow-x: auto;
|
141
|
+
|
142
|
+
/* Hide scrollbar in Firefox */
|
143
|
+
scrollbar-width: none;
|
144
|
+
}
|
145
|
+
|
146
|
+
/* Hide scrollbar in Chrome/Safari */
|
147
|
+
.tab-group--bottom .tab-group__nav::-webkit-scrollbar {
|
148
|
+
width: 0;
|
149
|
+
height: 0;
|
150
|
+
}
|
151
|
+
|
152
|
+
.tab-group--bottom .tab-group__tabs {
|
153
|
+
flex: 1 1 auto;
|
154
|
+
position: relative;
|
155
|
+
flex-direction: row;
|
156
|
+
border-top: solid var(--track-width) var(--track-color);
|
157
|
+
}
|
158
|
+
|
159
|
+
.tab-group--bottom .tab-group__indicator {
|
160
|
+
top: calc(-1 * var(--track-width));
|
161
|
+
border-top: solid var(--track-width) var(--indicator-color);
|
162
|
+
}
|
163
|
+
|
164
|
+
.tab-group--bottom .tab-group__body {
|
165
|
+
order: 1;
|
166
|
+
}
|
167
|
+
|
168
|
+
.tab-group--bottom ::slotted(nile-tab-panel) {
|
169
|
+
--padding: 10px 0;
|
170
|
+
}
|
171
|
+
|
172
|
+
/*
|
173
|
+
* Start
|
174
|
+
*/
|
175
|
+
|
176
|
+
.tab-group--start {
|
177
|
+
flex-direction: row;
|
178
|
+
}
|
179
|
+
|
180
|
+
.tab-group--start .tab-group__nav-container {
|
181
|
+
order: 1;
|
182
|
+
}
|
183
|
+
|
184
|
+
.tab-group--start .tab-group__tabs {
|
185
|
+
flex: 0 0 auto;
|
186
|
+
flex-direction: column;
|
187
|
+
border-inline-end: solid var(--track-width) var(--track-color);
|
188
|
+
}
|
189
|
+
|
190
|
+
.tab-group--start .tab-group__indicator {
|
191
|
+
right: calc(-1 * var(--track-width));
|
192
|
+
border-right: solid var(--track-width) var(--indicator-color);
|
193
|
+
}
|
194
|
+
|
195
|
+
.tab-group--start.tab-group--rtl .tab-group__indicator {
|
196
|
+
right: auto;
|
197
|
+
left: calc(-1 * var(--track-width));
|
198
|
+
}
|
199
|
+
|
200
|
+
.tab-group--start .tab-group__body {
|
201
|
+
flex: 1 1 auto;
|
202
|
+
order: 2;
|
203
|
+
}
|
204
|
+
|
205
|
+
.tab-group--start ::slotted(nile-tab-panel) {
|
206
|
+
--padding: 0 10px;
|
207
|
+
}
|
208
|
+
|
209
|
+
/*
|
210
|
+
* End
|
211
|
+
*/
|
212
|
+
|
213
|
+
.tab-group--end {
|
214
|
+
flex-direction: row;
|
215
|
+
}
|
216
|
+
|
217
|
+
.tab-group--end .tab-group__nav-container {
|
218
|
+
order: 2;
|
219
|
+
}
|
220
|
+
|
221
|
+
.tab-group--end .tab-group__tabs {
|
222
|
+
flex: 0 0 auto;
|
223
|
+
flex-direction: column;
|
224
|
+
border-left: solid var(--track-width) var(--track-color);
|
225
|
+
}
|
226
|
+
|
227
|
+
.tab-group--end .tab-group__indicator {
|
228
|
+
left: calc(-1 * var(--track-width));
|
229
|
+
border-inline-start: solid var(--track-width) var(--indicator-color);
|
230
|
+
}
|
231
|
+
|
232
|
+
.tab-group--end.tab-group--rtl .tab-group__indicator {
|
233
|
+
right: calc(-1 * var(--track-width));
|
234
|
+
left: auto;
|
235
|
+
}
|
236
|
+
|
237
|
+
.tab-group--end .tab-group__body {
|
238
|
+
flex: 1 1 auto;
|
239
|
+
order: 1;
|
240
|
+
}
|
241
|
+
|
242
|
+
.tab-group--end ::slotted(nile-tab-panel) {
|
243
|
+
--padding: 0 10px;
|
244
|
+
}
|
245
|
+
`;
|
246
|
+
|
247
|
+
export default [styles];
|