@alfalab/core-components-tabs 5.2.3 → 6.0.1
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/CHANGELOG.md +70 -0
- package/dist/components/primary-tablist/Component.desktop.js +2 -2
- package/dist/components/primary-tablist/Component.js +18 -19
- package/dist/components/primary-tablist/Component.mobile.js +3 -3
- package/dist/components/primary-tablist/Component.responsive.js +2 -2
- package/dist/components/primary-tablist/index.css +19 -23
- package/dist/components/primary-tablist/mobile.css +25 -25
- package/dist/components/scrollable-container/Component.js +2 -3
- package/dist/components/scrollable-container/index.css +6 -12
- package/dist/components/secondary-tablist/Component.d.ts +1 -1
- package/dist/components/secondary-tablist/Component.desktop.js +2 -2
- package/dist/components/secondary-tablist/Component.js +1 -1
- package/dist/components/secondary-tablist/Component.mobile.js +3 -3
- package/dist/components/secondary-tablist/Component.responsive.js +2 -2
- package/dist/components/secondary-tablist/index.css +12 -12
- package/dist/components/secondary-tablist/mobile.css +19 -16
- package/dist/components/tab/Component.js +1 -1
- package/dist/components/tab/index.css +3 -3
- package/dist/components/tabs/Component.desktop.js +3 -3
- package/dist/components/tabs/Component.mobile.js +3 -3
- package/dist/components/tabs/Component.responsive.js +3 -3
- package/dist/cssm/components/primary-tablist/Component.js +17 -18
- package/dist/cssm/components/primary-tablist/index.module.css +0 -4
- package/dist/cssm/components/scrollable-container/Component.js +1 -2
- package/dist/cssm/components/scrollable-container/index.module.css +4 -10
- package/dist/cssm/components/secondary-tablist/Component.d.ts +1 -1
- package/dist/cssm/useTabs.d.ts +1 -1
- package/dist/cssm/useTabs.js +3 -2
- package/dist/desktop.js +3 -3
- package/dist/esm/components/primary-tablist/Component.desktop.js +2 -2
- package/dist/esm/components/primary-tablist/Component.js +18 -19
- package/dist/esm/components/primary-tablist/Component.mobile.js +3 -3
- package/dist/esm/components/primary-tablist/Component.responsive.js +2 -2
- package/dist/esm/components/primary-tablist/index.css +19 -23
- package/dist/esm/components/primary-tablist/mobile.css +25 -25
- package/dist/esm/components/scrollable-container/Component.js +2 -3
- package/dist/esm/components/scrollable-container/index.css +6 -12
- package/dist/esm/components/secondary-tablist/Component.d.ts +1 -1
- package/dist/esm/components/secondary-tablist/Component.desktop.js +2 -2
- package/dist/esm/components/secondary-tablist/Component.js +1 -1
- package/dist/esm/components/secondary-tablist/Component.mobile.js +3 -3
- package/dist/esm/components/secondary-tablist/Component.responsive.js +2 -2
- package/dist/esm/components/secondary-tablist/index.css +12 -12
- package/dist/esm/components/secondary-tablist/mobile.css +19 -16
- package/dist/esm/components/tab/Component.js +1 -1
- package/dist/esm/components/tab/index.css +3 -3
- package/dist/esm/components/tabs/Component.desktop.js +3 -3
- package/dist/esm/components/tabs/Component.mobile.js +3 -3
- package/dist/esm/components/tabs/Component.responsive.js +3 -3
- package/dist/esm/desktop.js +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.module-5f8ab866.js +4 -0
- package/dist/esm/index.module-79dd2b67.js +4 -0
- package/dist/esm/mobile.js +3 -3
- package/dist/esm/responsive.js +3 -3
- package/dist/esm/{tslib.es6-4c8e5e12.d.ts → tslib.es6-f32a8b0b.d.ts} +0 -0
- package/dist/esm/{tslib.es6-4c8e5e12.js → tslib.es6-f32a8b0b.js} +0 -0
- package/dist/esm/useTabs.d.ts +1 -1
- package/dist/esm/useTabs.js +3 -2
- package/dist/index.js +3 -3
- package/dist/index.module-09355c68.js +6 -0
- package/dist/index.module-313ebd46.js +6 -0
- package/dist/mobile.js +3 -3
- package/dist/modern/components/primary-tablist/Component.desktop.js +1 -1
- package/dist/modern/components/primary-tablist/Component.js +11 -11
- package/dist/modern/components/primary-tablist/Component.mobile.js +2 -2
- package/dist/modern/components/primary-tablist/Component.responsive.js +1 -1
- package/dist/modern/components/primary-tablist/index.css +19 -23
- package/dist/modern/components/primary-tablist/mobile.css +25 -25
- package/dist/modern/components/scrollable-container/Component.js +2 -3
- package/dist/modern/components/scrollable-container/index.css +6 -12
- package/dist/modern/components/secondary-tablist/Component.d.ts +1 -1
- package/dist/modern/components/secondary-tablist/Component.desktop.js +1 -1
- package/dist/modern/components/secondary-tablist/Component.mobile.js +2 -2
- package/dist/modern/components/secondary-tablist/Component.responsive.js +1 -1
- package/dist/modern/components/secondary-tablist/index.css +12 -12
- package/dist/modern/components/secondary-tablist/mobile.css +19 -16
- package/dist/modern/components/tab/Component.js +1 -1
- package/dist/modern/components/tab/index.css +3 -3
- package/dist/modern/components/tabs/Component.desktop.js +2 -2
- package/dist/modern/components/tabs/Component.mobile.js +2 -2
- package/dist/modern/components/tabs/Component.responsive.js +2 -2
- package/dist/modern/desktop.js +2 -2
- package/dist/modern/index.js +2 -2
- package/dist/modern/index.module-5f8ab866.js +4 -0
- package/dist/modern/index.module-79dd2b67.js +4 -0
- package/dist/modern/mobile.js +2 -2
- package/dist/modern/responsive.js +2 -2
- package/dist/modern/useTabs.d.ts +1 -1
- package/dist/modern/useTabs.js +3 -2
- package/dist/responsive.js +3 -3
- package/dist/{tslib.es6-32178775.d.ts → tslib.es6-a945f620.d.ts} +0 -0
- package/dist/{tslib.es6-32178775.js → tslib.es6-a945f620.js} +0 -0
- package/dist/useTabs.d.ts +1 -1
- package/dist/useTabs.js +3 -2
- package/package.json +4 -4
- package/dist/esm/index.module-4dc6bbaa.js +0 -4
- package/dist/esm/index.module-936763a2.js +0 -4
- package/dist/index.module-c431d803.js +0 -6
- package/dist/index.module-c4eddd2e.js +0 -6
- package/dist/modern/index.module-4dc6bbaa.js +0 -4
- package/dist/modern/index.module-936763a2.js +0 -4
|
@@ -5,7 +5,7 @@ import '../scrollable-container/Component.js';
|
|
|
5
5
|
import '../../useTabs.js';
|
|
6
6
|
import '@alfalab/core-components-tag/dist/modern';
|
|
7
7
|
import './Component.js';
|
|
8
|
-
import '../../index.module-
|
|
8
|
+
import '../../index.module-79dd2b67.js';
|
|
9
9
|
import { SecondaryTabListDesktop } from './Component.desktop.js';
|
|
10
10
|
import { useMedia } from '@alfalab/hooks';
|
|
11
11
|
import { SecondaryTabListMobile } from './Component.mobile.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: rryiu */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -42,40 +42,40 @@
|
|
|
42
42
|
/* size xl */
|
|
43
43
|
--secondary-tablist-xl-gaps: var(--gap-s);
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.tabs__component_16m8j {
|
|
46
46
|
position: relative;
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.tabs__container_16m8j {
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
.tabs__title_16m8j {
|
|
55
55
|
white-space: nowrap;
|
|
56
56
|
}
|
|
57
57
|
/* sizes */
|
|
58
|
-
.
|
|
58
|
+
.tabs__s_16m8j {
|
|
59
59
|
height: var(--size-s-height)
|
|
60
60
|
}
|
|
61
|
-
.
|
|
61
|
+
.tabs__s_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
62
62
|
margin-left: var(--secondary-tablist-s-gaps);
|
|
63
63
|
}
|
|
64
|
-
.
|
|
64
|
+
.tabs__m_16m8j {
|
|
65
65
|
height: var(--size-m-height)
|
|
66
66
|
}
|
|
67
|
-
.
|
|
67
|
+
.tabs__m_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
68
68
|
margin-left: var(--secondary-tablist-m-gaps);
|
|
69
69
|
}
|
|
70
|
-
.
|
|
70
|
+
.tabs__l_16m8j {
|
|
71
71
|
height: var(--size-l-height)
|
|
72
72
|
}
|
|
73
|
-
.
|
|
73
|
+
.tabs__l_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
74
74
|
margin-left: var(--secondary-tablist-l-gaps);
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.tabs__xl_16m8j {
|
|
77
77
|
height: var(--size-xl-height)
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
.tabs__xl_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
80
80
|
margin-left: var(--secondary-tablist-xl-gaps);
|
|
81
81
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ymbos */
|
|
2
2
|
:root {
|
|
3
3
|
}:root {
|
|
4
4
|
}:root {
|
|
@@ -46,30 +46,30 @@
|
|
|
46
46
|
|
|
47
47
|
/* size xl */
|
|
48
48
|
--secondary-tablist-xl-gaps: var(--gap-s);
|
|
49
|
-
}.
|
|
49
|
+
}.tabs__component_16m8j {
|
|
50
50
|
position: relative;
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
53
|
-
}.
|
|
53
|
+
}.tabs__container_16m8j {
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
56
|
-
}.
|
|
56
|
+
}.tabs__title_16m8j {
|
|
57
57
|
white-space: nowrap;
|
|
58
|
-
}/* sizes */.
|
|
58
|
+
}/* sizes */.tabs__s_16m8j {
|
|
59
59
|
height: var(--size-s-height)
|
|
60
|
-
}.
|
|
60
|
+
}.tabs__s_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
61
61
|
margin-left: var(--secondary-tablist-s-gaps);
|
|
62
|
-
}.
|
|
62
|
+
}.tabs__m_16m8j {
|
|
63
63
|
height: var(--size-m-height)
|
|
64
|
-
}.
|
|
64
|
+
}.tabs__m_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
65
65
|
margin-left: var(--secondary-tablist-m-gaps);
|
|
66
|
-
}.
|
|
66
|
+
}.tabs__l_16m8j {
|
|
67
67
|
height: var(--size-l-height)
|
|
68
|
-
}.
|
|
68
|
+
}.tabs__l_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
69
69
|
margin-left: var(--secondary-tablist-l-gaps);
|
|
70
|
-
}.
|
|
70
|
+
}.tabs__xl_16m8j {
|
|
71
71
|
height: var(--size-xl-height)
|
|
72
|
-
}.
|
|
72
|
+
}.tabs__xl_16m8j .tabs__title_16m8j + .tabs__title_16m8j {
|
|
73
73
|
margin-left: var(--secondary-tablist-xl-gaps);
|
|
74
74
|
}
|
|
75
75
|
:root {
|
|
@@ -347,6 +347,7 @@
|
|
|
347
347
|
--color-dark-bg-neutral-tint-10: rgb(90, 104, 118);
|
|
348
348
|
--color-dark-bg-neutral-tint-15: rgb(99, 112, 126);
|
|
349
349
|
--color-dark-bg-neutral-tint-30: rgb(127, 137, 149);
|
|
350
|
+
--color-dark-bg-neutral-shade-15: rgb(61, 74, 88);
|
|
350
351
|
--color-dark-bg-primary-alpha-8: rgba(11, 31, 53, 0.08);
|
|
351
352
|
--color-dark-bg-primary-inverted-alpha-3: rgba(255, 255, 255, 0.03);
|
|
352
353
|
--color-dark-bg-primary-inverted-alpha-7: rgba(255, 255, 255, 0.07);
|
|
@@ -354,6 +355,7 @@
|
|
|
354
355
|
--color-dark-bg-primary-inverted-alpha-15: rgba(255, 255, 255, 0.15);
|
|
355
356
|
--color-dark-bg-primary-inverted-alpha-20: rgba(255, 255, 255, 0.2);
|
|
356
357
|
--color-dark-bg-primary-inverted-alpha-40: rgba(255, 255, 255, 0.4);
|
|
358
|
+
--color-dark-bg-primary-inverted-alpha-50: rgba(255, 255, 255, 0.5);
|
|
357
359
|
--color-dark-bg-secondary-inverted-alpha-7: rgba(182, 188, 195, 0.07);
|
|
358
360
|
--color-dark-bg-secondary-inverted-alpha-15: rgba(182, 188, 195, 0.15);
|
|
359
361
|
--color-dark-bg-tertiary-tint-7: rgb(74, 89, 104);
|
|
@@ -408,6 +410,7 @@
|
|
|
408
410
|
--color-light-bg-neutral-shade-10: rgb(197, 200, 203);
|
|
409
411
|
--color-light-bg-neutral-shade-15: rgb(186, 189, 191);
|
|
410
412
|
--color-light-bg-neutral-shade-30: rgb(153, 155, 157);
|
|
413
|
+
--color-light-bg-neutral-tint-15: rgb(224, 227, 230);
|
|
411
414
|
--color-light-bg-primary-alpha-8: rgba(255, 255, 255, 0.08);
|
|
412
415
|
--color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
|
|
413
416
|
--color-light-bg-primary-inverted-alpha-7: rgba(11, 31, 53, 0.07);
|
|
@@ -415,6 +418,7 @@
|
|
|
415
418
|
--color-light-bg-primary-inverted-alpha-15: rgba(11, 31, 53, 0.15);
|
|
416
419
|
--color-light-bg-primary-inverted-alpha-20: rgba(11, 31, 53, 0.2);
|
|
417
420
|
--color-light-bg-primary-inverted-alpha-40: rgba(11, 31, 53, 0.4);
|
|
421
|
+
--color-light-bg-primary-inverted-alpha-50: rgba(11, 31, 53, 0.5);
|
|
418
422
|
--color-light-bg-secondary-inverted-alpha-7: rgba(35, 53, 73, 0.07);
|
|
419
423
|
--color-light-bg-secondary-inverted-alpha-15: rgba(35, 53, 73, 0.15);
|
|
420
424
|
--color-light-bg-tertiary-shade-7: rgb(215, 217, 219);
|
|
@@ -583,7 +587,6 @@
|
|
|
583
587
|
--size-xl-height: 72px;
|
|
584
588
|
}
|
|
585
589
|
:root {
|
|
586
|
-
--tablist-hidden-scrollbar-height: 20px;
|
|
587
590
|
--primary-tablist-color: var(--color-light-text-secondary);
|
|
588
591
|
--primary-tablist-hover-color: var(--color-light-text-primary);
|
|
589
592
|
--primary-tablist-selected-color: var(--color-light-text-primary);
|
|
@@ -641,11 +644,11 @@
|
|
|
641
644
|
/* size xl */
|
|
642
645
|
--secondary-tablist-xl-gaps: var(--gap-s);
|
|
643
646
|
}
|
|
644
|
-
.
|
|
647
|
+
.tabs__title_6w2ss {
|
|
645
648
|
}
|
|
646
|
-
.
|
|
649
|
+
.tabs__title_6w2ss + .tabs__title_6w2ss {
|
|
647
650
|
margin-left: var(--secondary-tablist-mobile-gaps);
|
|
648
651
|
}
|
|
649
|
-
.
|
|
652
|
+
.tabs__mobile_6w2ss {
|
|
650
653
|
height: 48px;
|
|
651
654
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
var styles = {"component":"
|
|
4
|
+
var styles = {"component":"tabs__component_1tze2","hidden":"tabs__hidden_1tze2"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Tab = ({ children, hidden, className, disabled }) => children ? (React.createElement("div", { className: cn(styles.component, {
|
|
@@ -5,11 +5,11 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
import '../scrollable-container/Component.js';
|
|
6
6
|
import '../../useTabs.js';
|
|
7
7
|
import '../primary-tablist/Component.js';
|
|
8
|
-
import '../../index.module-
|
|
8
|
+
import '../../index.module-5f8ab866.js';
|
|
9
9
|
import { PrimaryTabListDesktop } from '../primary-tablist/Component.desktop.js';
|
|
10
10
|
import '@alfalab/core-components-tag/dist/modern';
|
|
11
11
|
import '../secondary-tablist/Component.js';
|
|
12
|
-
import '../../index.module-
|
|
12
|
+
import '../../index.module-79dd2b67.js';
|
|
13
13
|
import { SecondaryTabListDesktop } from '../secondary-tablist/Component.desktop.js';
|
|
14
14
|
import { Tabs } from './Component.js';
|
|
15
15
|
|
|
@@ -5,10 +5,10 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
import '../scrollable-container/Component.js';
|
|
6
6
|
import '../../useTabs.js';
|
|
7
7
|
import '../primary-tablist/Component.js';
|
|
8
|
-
import '../../index.module-
|
|
8
|
+
import '../../index.module-5f8ab866.js';
|
|
9
9
|
import '@alfalab/core-components-tag/dist/modern';
|
|
10
10
|
import '../secondary-tablist/Component.js';
|
|
11
|
-
import '../../index.module-
|
|
11
|
+
import '../../index.module-79dd2b67.js';
|
|
12
12
|
import { Tabs } from './Component.js';
|
|
13
13
|
import { PrimaryTabListMobile } from '../primary-tablist/Component.mobile.js';
|
|
14
14
|
import { SecondaryTabListMobile } from '../secondary-tablist/Component.mobile.js';
|
|
@@ -5,11 +5,11 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
import '../scrollable-container/Component.js';
|
|
6
6
|
import '../../useTabs.js';
|
|
7
7
|
import '../primary-tablist/Component.js';
|
|
8
|
-
import '../../index.module-
|
|
8
|
+
import '../../index.module-5f8ab866.js';
|
|
9
9
|
import '../primary-tablist/Component.desktop.js';
|
|
10
10
|
import '@alfalab/core-components-tag/dist/modern';
|
|
11
11
|
import '../secondary-tablist/Component.js';
|
|
12
|
-
import '../../index.module-
|
|
12
|
+
import '../../index.module-79dd2b67.js';
|
|
13
13
|
import '../secondary-tablist/Component.desktop.js';
|
|
14
14
|
import { Tabs } from './Component.js';
|
|
15
15
|
import '@alfalab/hooks';
|
package/dist/modern/desktop.js
CHANGED
|
@@ -5,11 +5,11 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
export { ScrollableContainer } from './components/scrollable-container/Component.js';
|
|
6
6
|
export { useTabs } from './useTabs.js';
|
|
7
7
|
import './components/primary-tablist/Component.js';
|
|
8
|
-
import './index.module-
|
|
8
|
+
import './index.module-5f8ab866.js';
|
|
9
9
|
export { PrimaryTabListDesktop } from './components/primary-tablist/Component.desktop.js';
|
|
10
10
|
import '@alfalab/core-components-tag/dist/modern';
|
|
11
11
|
import './components/secondary-tablist/Component.js';
|
|
12
|
-
import './index.module-
|
|
12
|
+
import './index.module-79dd2b67.js';
|
|
13
13
|
export { SecondaryTabListDesktop } from './components/secondary-tablist/Component.desktop.js';
|
|
14
14
|
export { Tab } from './components/tab/Component.js';
|
|
15
15
|
import './components/tabs/Component.js';
|
package/dist/modern/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
export { ScrollableContainer } from './components/scrollable-container/Component.js';
|
|
6
6
|
export { useTabs } from './useTabs.js';
|
|
7
7
|
import './components/primary-tablist/Component.js';
|
|
8
|
-
import './index.module-
|
|
8
|
+
import './index.module-5f8ab866.js';
|
|
9
9
|
import './components/primary-tablist/Component.desktop.js';
|
|
10
10
|
import '@alfalab/core-components-tag/dist/modern';
|
|
11
11
|
import './components/secondary-tablist/Component.js';
|
|
12
|
-
import './index.module-
|
|
12
|
+
import './index.module-79dd2b67.js';
|
|
13
13
|
import './components/secondary-tablist/Component.desktop.js';
|
|
14
14
|
export { Tab } from './components/tab/Component.js';
|
|
15
15
|
import './components/tabs/Component.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var commonStyles = {"component":"tabs__component_18h98","container":"tabs__container_18h98","title":"tabs__title_18h98","disabled":"tabs__disabled_18h98","focused":"tabs__focused_18h98","selected":"tabs__selected_18h98","line":"tabs__line_18h98","s":"tabs__s_18h98","m":"tabs__m_18h98","l":"tabs__l_18h98","xl":"tabs__xl_18h98","rightAddons":"tabs__rightAddons_18h98"};
|
|
2
|
+
require('./components/primary-tablist/index.css')
|
|
3
|
+
|
|
4
|
+
export { commonStyles as c };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var commonStyles = {"component":"tabs__component_16m8j","container":"tabs__container_16m8j","title":"tabs__title_16m8j","s":"tabs__s_16m8j","m":"tabs__m_16m8j","l":"tabs__l_16m8j","xl":"tabs__xl_16m8j"};
|
|
2
|
+
require('./components/secondary-tablist/index.css')
|
|
3
|
+
|
|
4
|
+
export { commonStyles as c };
|
package/dist/modern/mobile.js
CHANGED
|
@@ -5,10 +5,10 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
export { ScrollableContainer } from './components/scrollable-container/Component.js';
|
|
6
6
|
export { useTabs } from './useTabs.js';
|
|
7
7
|
import './components/primary-tablist/Component.js';
|
|
8
|
-
import './index.module-
|
|
8
|
+
import './index.module-5f8ab866.js';
|
|
9
9
|
import '@alfalab/core-components-tag/dist/modern';
|
|
10
10
|
import './components/secondary-tablist/Component.js';
|
|
11
|
-
import './index.module-
|
|
11
|
+
import './index.module-79dd2b67.js';
|
|
12
12
|
export { Tab } from './components/tab/Component.js';
|
|
13
13
|
import './components/tabs/Component.js';
|
|
14
14
|
export { PrimaryTabListMobile } from './components/primary-tablist/Component.mobile.js';
|
|
@@ -5,11 +5,11 @@ import 'compute-scroll-into-view';
|
|
|
5
5
|
export { ScrollableContainer } from './components/scrollable-container/Component.js';
|
|
6
6
|
export { useTabs } from './useTabs.js';
|
|
7
7
|
import './components/primary-tablist/Component.js';
|
|
8
|
-
import './index.module-
|
|
8
|
+
import './index.module-5f8ab866.js';
|
|
9
9
|
import './components/primary-tablist/Component.desktop.js';
|
|
10
10
|
import '@alfalab/core-components-tag/dist/modern';
|
|
11
11
|
import './components/secondary-tablist/Component.js';
|
|
12
|
-
import './index.module-
|
|
12
|
+
import './index.module-79dd2b67.js';
|
|
13
13
|
import './components/secondary-tablist/Component.desktop.js';
|
|
14
14
|
export { Tab } from './components/tab/Component.js';
|
|
15
15
|
import './components/tabs/Component.js';
|
package/dist/modern/useTabs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEvent, MouseEvent, MutableRefObject } from 'react';
|
|
2
2
|
import { UseTabsProps } from "./typings";
|
|
3
3
|
declare function useTabs({ titles, selectedId, onChange }: UseTabsProps): {
|
|
4
4
|
getTabListItemProps: (index: number, outerRef?: MutableRefObject<HTMLElement> | undefined) => {
|
package/dist/modern/useTabs.js
CHANGED
|
@@ -16,7 +16,8 @@ function useTabs({ titles = [], selectedId, onChange }) {
|
|
|
16
16
|
}, [onChange, selectedId]);
|
|
17
17
|
const focusTab = useCallback((position) => {
|
|
18
18
|
const refs = itemRefs.current;
|
|
19
|
-
|
|
19
|
+
const tabAvailable = (ref) => ref && !ref.disabled;
|
|
20
|
+
if (refs.every(ref => !tabAvailable(ref)))
|
|
20
21
|
return;
|
|
21
22
|
let focusedTabIndex = refs.findIndex(node => document.activeElement === node);
|
|
22
23
|
if (focusedTabIndex === -1) {
|
|
@@ -38,7 +39,7 @@ function useTabs({ titles = [], selectedId, onChange }) {
|
|
|
38
39
|
break;
|
|
39
40
|
}
|
|
40
41
|
const shift = ['prev', 'end'].includes(position) ? -1 : 1;
|
|
41
|
-
while (refs[newFocusIndex]
|
|
42
|
+
while (!tabAvailable(refs[newFocusIndex])) {
|
|
42
43
|
newFocusIndex = (refs.length + newFocusIndex + shift) % refs.length;
|
|
43
44
|
}
|
|
44
45
|
refs[newFocusIndex].focus();
|
package/dist/responsive.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./tslib.es6-
|
|
5
|
+
require('./tslib.es6-a945f620.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('@alfalab/core-components-keyboard-focusable');
|
|
8
8
|
require('classnames');
|
|
@@ -10,11 +10,11 @@ require('compute-scroll-into-view');
|
|
|
10
10
|
var components_scrollableContainer_Component = require('./components/scrollable-container/Component.js');
|
|
11
11
|
var useTabs = require('./useTabs.js');
|
|
12
12
|
require('./components/primary-tablist/Component.js');
|
|
13
|
-
require('./index.module-
|
|
13
|
+
require('./index.module-313ebd46.js');
|
|
14
14
|
require('./components/primary-tablist/Component.desktop.js');
|
|
15
15
|
require('@alfalab/core-components-tag');
|
|
16
16
|
require('./components/secondary-tablist/Component.js');
|
|
17
|
-
require('./index.module-
|
|
17
|
+
require('./index.module-09355c68.js');
|
|
18
18
|
require('./components/secondary-tablist/Component.desktop.js');
|
|
19
19
|
var components_tab_Component = require('./components/tab/Component.js');
|
|
20
20
|
require('./components/tabs/Component.js');
|
|
File without changes
|
|
File without changes
|
package/dist/useTabs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEvent, MouseEvent, MutableRefObject } from 'react';
|
|
2
2
|
import { UseTabsProps } from "./typings";
|
|
3
3
|
declare function useTabs({ titles, selectedId, onChange }: UseTabsProps): {
|
|
4
4
|
getTabListItemProps: (index: number, outerRef?: MutableRefObject<HTMLElement> | undefined) => {
|
package/dist/useTabs.js
CHANGED
|
@@ -21,7 +21,8 @@ function useTabs(_a) {
|
|
|
21
21
|
}, [onChange, selectedId]);
|
|
22
22
|
var focusTab = React.useCallback(function (position) {
|
|
23
23
|
var refs = itemRefs.current;
|
|
24
|
-
|
|
24
|
+
var tabAvailable = function (ref) { return ref && !ref.disabled; };
|
|
25
|
+
if (refs.every(function (ref) { return !tabAvailable(ref); }))
|
|
25
26
|
return;
|
|
26
27
|
var focusedTabIndex = refs.findIndex(function (node) { return document.activeElement === node; });
|
|
27
28
|
if (focusedTabIndex === -1) {
|
|
@@ -43,7 +44,7 @@ function useTabs(_a) {
|
|
|
43
44
|
break;
|
|
44
45
|
}
|
|
45
46
|
var shift = ['prev', 'end'].includes(position) ? -1 : 1;
|
|
46
|
-
while (refs[newFocusIndex]
|
|
47
|
+
while (!tabAvailable(refs[newFocusIndex])) {
|
|
47
48
|
newFocusIndex = (refs.length + newFocusIndex + shift) % refs.length;
|
|
48
49
|
}
|
|
49
50
|
refs[newFocusIndex].focus();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-tabs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Tabs components",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@types/lodash.debounce": "^4.0.6"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@alfalab/core-components-keyboard-focusable": "^
|
|
23
|
-
"@alfalab/core-components-tag": "^
|
|
22
|
+
"@alfalab/core-components-keyboard-focusable": "^3.0.1",
|
|
23
|
+
"@alfalab/core-components-tag": "^4.0.1",
|
|
24
24
|
"classnames": "^2.2.6",
|
|
25
25
|
"compute-scroll-into-view": "^1.0.13",
|
|
26
26
|
"lodash.debounce": "^4.0.8"
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"react": "^16.9.0 || ^17.0.1",
|
|
30
30
|
"react-dom": "^16.9.0 || ^17.0.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "19a2d088b6c18a127940199cfd6e6fc4e8639ec5"
|
|
33
33
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var commonStyles = {"component":"tabs__component_1mapd","container":"tabs__container_1mapd","title":"tabs__title_1mapd","s":"tabs__s_1mapd","m":"tabs__m_1mapd","l":"tabs__l_1mapd","xl":"tabs__xl_1mapd"};
|
|
2
|
-
require('./components/secondary-tablist/index.css')
|
|
3
|
-
|
|
4
|
-
export { commonStyles as c };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var commonStyles = {"component":"tabs__component_lmuj2","container":"tabs__container_lmuj2","title":"tabs__title_lmuj2","disabled":"tabs__disabled_lmuj2","focused":"tabs__focused_lmuj2","selected":"tabs__selected_lmuj2","line":"tabs__line_lmuj2","scrollable":"tabs__scrollable_lmuj2","s":"tabs__s_lmuj2","m":"tabs__m_lmuj2","l":"tabs__l_lmuj2","xl":"tabs__xl_lmuj2","rightAddons":"tabs__rightAddons_lmuj2"};
|
|
2
|
-
require('./components/primary-tablist/index.css')
|
|
3
|
-
|
|
4
|
-
export { commonStyles as c };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var commonStyles = {"component":"tabs__component_lmuj2","container":"tabs__container_lmuj2","title":"tabs__title_lmuj2","disabled":"tabs__disabled_lmuj2","focused":"tabs__focused_lmuj2","selected":"tabs__selected_lmuj2","line":"tabs__line_lmuj2","scrollable":"tabs__scrollable_lmuj2","s":"tabs__s_lmuj2","m":"tabs__m_lmuj2","l":"tabs__l_lmuj2","xl":"tabs__xl_lmuj2","rightAddons":"tabs__rightAddons_lmuj2"};
|
|
4
|
-
require('./components/primary-tablist/index.css')
|
|
5
|
-
|
|
6
|
-
exports.commonStyles = commonStyles;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var commonStyles = {"component":"tabs__component_1mapd","container":"tabs__container_1mapd","title":"tabs__title_1mapd","s":"tabs__s_1mapd","m":"tabs__m_1mapd","l":"tabs__l_1mapd","xl":"tabs__xl_1mapd"};
|
|
4
|
-
require('./components/secondary-tablist/index.css')
|
|
5
|
-
|
|
6
|
-
exports.commonStyles = commonStyles;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var commonStyles = {"component":"tabs__component_1mapd","container":"tabs__container_1mapd","title":"tabs__title_1mapd","s":"tabs__s_1mapd","m":"tabs__m_1mapd","l":"tabs__l_1mapd","xl":"tabs__xl_1mapd"};
|
|
2
|
-
require('./components/secondary-tablist/index.css')
|
|
3
|
-
|
|
4
|
-
export { commonStyles as c };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var commonStyles = {"component":"tabs__component_lmuj2","container":"tabs__container_lmuj2","title":"tabs__title_lmuj2","disabled":"tabs__disabled_lmuj2","focused":"tabs__focused_lmuj2","selected":"tabs__selected_lmuj2","line":"tabs__line_lmuj2","scrollable":"tabs__scrollable_lmuj2","s":"tabs__s_lmuj2","m":"tabs__m_lmuj2","l":"tabs__l_lmuj2","xl":"tabs__xl_lmuj2","rightAddons":"tabs__rightAddons_lmuj2"};
|
|
2
|
-
require('./components/primary-tablist/index.css')
|
|
3
|
-
|
|
4
|
-
export { commonStyles as c };
|