@zohodesk/components 1.0.0-temp-262 → 1.0.0-temp-262.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/es/v1/Tab/Tab.js +9 -4
- package/es/v1/Tab/__tests__/Tab.spec.js +300 -22
- package/es/v1/Tab/__tests__/__snapshots__/Tab.spec.js.snap +692 -443
- package/es/v1/Tab/constants/index.js +7 -0
- package/es/v1/Tab/constants/presets.js +25 -10
- package/es/v1/Tab/css/Tab_v1.module.css +276 -285
- package/es/v1/Tab/css/tab.cva.js +92 -50
- package/es/v1/Tab/index.js +1 -1
- package/lib/v1/Tab/Tab.js +8 -3
- package/lib/v1/Tab/__tests__/Tab.spec.js +327 -34
- package/lib/v1/Tab/__tests__/__snapshots__/Tab.spec.js.snap +692 -443
- package/lib/v1/Tab/constants/index.js +6 -2
- package/lib/v1/Tab/constants/presets.js +42 -8
- package/lib/v1/Tab/css/Tab_v1.module.css +276 -285
- package/lib/v1/Tab/css/tab.cva.js +58 -39
- package/lib/v1/Tab/index.js +18 -0
- package/package.json +1 -1
|
@@ -70,6 +70,13 @@ export const ICON_PLACEMENT_TEXT_ALIGN = Object.freeze({
|
|
|
70
70
|
[ICON_PLACEMENT.TOP]: 'center',
|
|
71
71
|
[ICON_PLACEMENT.BOTTOM]: 'center'
|
|
72
72
|
});
|
|
73
|
+
export const TEXT_ONLY_TEXT_ALIGN = 'center';
|
|
74
|
+
export const ICON_PLACEMENT_JUSTIFY = Object.freeze({
|
|
75
|
+
[ICON_PLACEMENT.LEFT]: 'start',
|
|
76
|
+
[ICON_PLACEMENT.RIGHT]: 'start',
|
|
77
|
+
[ICON_PLACEMENT.TOP]: 'center',
|
|
78
|
+
[ICON_PLACEMENT.BOTTOM]: 'center'
|
|
79
|
+
});
|
|
73
80
|
export const ICON_SPACING = Object.freeze(['2', '4', '6', '8', '10', '12', '14', '16', '18', '20']);
|
|
74
81
|
export const TEXT_TRANSFORM = Object.freeze({
|
|
75
82
|
UPPER: 'upper',
|
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
import { POSITION, SIZE, LABEL_STYLE, TEXT_TRANSFORM, TEXT_TRUNCATE, VARIANT } from "./index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const INFO_BAR_RAIL = {
|
|
1
|
+
import { POSITION, SIZE, LABEL_STYLE, ICON_PLACEMENT, TEXT_TRANSFORM, TEXT_TRUNCATE, VARIANT } from "./index";
|
|
2
|
+
const INFO_BAR_RAIL_BASE = {
|
|
5
3
|
position: POSITION.LEFT,
|
|
6
|
-
size: SIZE.MEDIUM,
|
|
7
|
-
labelStyle: LABEL_STYLE.ICON,
|
|
8
4
|
hasSurface: true,
|
|
9
5
|
hasListBorder: true,
|
|
10
6
|
textTransform: TEXT_TRANSFORM.CAPITAL,
|
|
11
7
|
textTruncate: TEXT_TRUNCATE.CLAMP
|
|
12
8
|
};
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const INFO_BAR_RAIL_LABELLED = { ...INFO_BAR_RAIL_BASE,
|
|
10
|
+
size: SIZE.SMALL,
|
|
11
|
+
iconSpacing: '4'
|
|
12
|
+
};
|
|
13
|
+
export const INFO_BAR_RAIL = { ...INFO_BAR_RAIL_BASE,
|
|
14
|
+
size: SIZE.MEDIUM,
|
|
15
|
+
labelStyle: LABEL_STYLE.ICON
|
|
16
|
+
};
|
|
17
|
+
export const INFO_BAR_RAIL_TEXT = { ...INFO_BAR_RAIL_LABELLED,
|
|
18
|
+
labelStyle: LABEL_STYLE.TEXT
|
|
19
|
+
};
|
|
20
|
+
export const INFO_BAR_RAIL_ICON_LEFT = { ...INFO_BAR_RAIL_LABELLED,
|
|
21
|
+
labelStyle: LABEL_STYLE.ICON_AND_TEXT,
|
|
22
|
+
iconPlacement: ICON_PLACEMENT.LEFT
|
|
23
|
+
};
|
|
24
|
+
export const INFO_BAR_RAIL_ICON_TOP = { ...INFO_BAR_RAIL_LABELLED,
|
|
25
|
+
labelStyle: LABEL_STYLE.ICON_AND_TEXT,
|
|
26
|
+
iconPlacement: ICON_PLACEMENT.TOP
|
|
27
|
+
};
|
|
15
28
|
export const SUBTAB_STRIP = {
|
|
16
29
|
position: POSITION.TOP,
|
|
17
|
-
size: SIZE.
|
|
18
|
-
variant: VARIANT.
|
|
30
|
+
size: SIZE.SMALL,
|
|
31
|
+
variant: VARIANT.DOTTED,
|
|
19
32
|
labelStyle: LABEL_STYLE.TEXT,
|
|
20
33
|
hasListBorder: true,
|
|
34
|
+
hasListPadding: true,
|
|
35
|
+
textTransform: TEXT_TRANSFORM.UPPER,
|
|
21
36
|
textTruncate: TEXT_TRUNCATE.ELLIPSIS
|
|
22
37
|
};
|