@ultraviolet/ui 1.28.0 → 1.29.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.
- package/README.md +14 -7
- package/dist/index.d.ts +51 -2
- package/dist/src/components/ActionBar/index.js +22 -37
- package/dist/src/components/Alert/index.js +27 -41
- package/dist/src/components/Avatar/index.js +48 -69
- package/dist/src/components/Badge/index.js +29 -49
- package/dist/src/components/Banner/index.js +42 -62
- package/dist/src/components/BarChart/Tooltip.js +35 -50
- package/dist/src/components/BarChart/index.js +13 -14
- package/dist/src/components/BarStack/index.js +100 -191
- package/dist/src/components/Breadcrumbs/index.js +29 -39
- package/dist/src/components/Bullet/index.js +42 -55
- package/dist/src/components/Button/index.js +73 -99
- package/dist/src/components/Card/index.js +39 -57
- package/dist/src/components/Carousel/index.js +32 -60
- package/dist/src/components/Checkbox/index.js +153 -341
- package/dist/src/components/CheckboxGroup/index.js +25 -27
- package/dist/src/components/CopyButton/index.js +11 -12
- package/dist/src/components/DateInput/index.js +141 -268
- package/dist/src/components/EmptyState/index.js +68 -83
- package/dist/src/components/Expandable/index.js +13 -20
- package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
- package/dist/src/components/GlobalAlert/index.js +19 -32
- package/dist/src/components/LineChart/CustomLegend.js +80 -89
- package/dist/src/components/LineChart/Tooltip.js +32 -47
- package/dist/src/components/LineChart/helpers.js +15 -50
- package/dist/src/components/LineChart/index.js +23 -33
- package/dist/src/components/Link/index.js +46 -65
- package/dist/src/components/List/Body.js +9 -15
- package/dist/src/components/List/Cell.js +6 -7
- package/dist/src/components/List/HeaderCell.js +28 -56
- package/dist/src/components/List/HeaderRow.js +9 -16
- package/dist/src/components/List/ListContext.js +5 -6
- package/dist/src/components/List/Row.js +44 -90
- package/dist/src/components/List/SelectBar.js +9 -13
- package/dist/src/components/List/SkeletonRows.js +5 -6
- package/dist/src/components/List/index.js +15 -25
- package/dist/src/components/Loader/index.js +18 -25
- package/dist/src/components/Menu/Item.js +39 -49
- package/dist/src/components/Menu/index.js +31 -56
- package/dist/src/components/MenuV2/Item.js +39 -49
- package/dist/src/components/MenuV2/index.js +28 -47
- package/dist/src/components/Meter/index.js +25 -47
- package/dist/src/components/Modal/Dialog.js +33 -58
- package/dist/src/components/Modal/Disclosure.js +8 -9
- package/dist/src/components/Modal/index.js +26 -33
- package/dist/src/components/Notice/index.js +21 -27
- package/dist/src/components/NumberInput/index.js +73 -137
- package/dist/src/components/Pagination/getPageNumbers.js +1 -4
- package/dist/src/components/Pagination/index.js +17 -27
- package/dist/src/components/PasswordCheck/index.js +26 -32
- package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
- package/dist/src/components/PieChart/Legends.js +71 -107
- package/dist/src/components/PieChart/Tooltip.js +33 -36
- package/dist/src/components/PieChart/index.js +13 -17
- package/dist/src/components/Popover/index.js +58 -75
- package/dist/src/components/Popup/helpers.js +13 -15
- package/dist/src/components/Popup/index.js +55 -98
- package/dist/src/components/ProgressBar/index.js +31 -49
- package/dist/src/components/Radio/index.js +58 -113
- package/dist/src/components/RadioGroup/index.js +26 -28
- package/dist/src/components/Row/index.js +25 -31
- package/dist/src/components/SelectInput/index.js +357 -410
- package/dist/src/components/SelectableCard/index.js +73 -115
- package/dist/src/components/Separator/index.js +52 -73
- package/dist/src/components/Skeleton/Block.js +23 -41
- package/dist/src/components/Skeleton/Blocks.js +23 -41
- package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
- package/dist/src/components/Skeleton/Donut.js +3 -6
- package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
- package/dist/src/components/Skeleton/Line.js +5 -11
- package/dist/src/components/Skeleton/List.js +22 -31
- package/dist/src/components/Skeleton/Slider.js +25 -46
- package/dist/src/components/Skeleton/Square.js +3 -6
- package/dist/src/components/Skeleton/index.js +17 -33
- package/dist/src/components/Snippet/index.js +82 -137
- package/dist/src/components/Stack/index.js +11 -14
- package/dist/src/components/Status/index.js +48 -78
- package/dist/src/components/StepList/index.js +45 -63
- package/dist/src/components/Stepper/index.js +74 -129
- package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
- package/dist/src/components/SwitchButton/index.js +36 -62
- package/dist/src/components/Table/Body.js +5 -8
- package/dist/src/components/Table/Cell.js +14 -20
- package/dist/src/components/Table/Header.js +8 -14
- package/dist/src/components/Table/HeaderCell.js +40 -56
- package/dist/src/components/Table/HeaderRow.js +4 -5
- package/dist/src/components/Table/Row.js +10 -14
- package/dist/src/components/Table/SelectBar.js +9 -13
- package/dist/src/components/Table/SkeletonRows.js +5 -6
- package/dist/src/components/Table/TableContext.js +6 -7
- package/dist/src/components/Table/index.js +44 -50
- package/dist/src/components/Tabs/Tab.js +57 -118
- package/dist/src/components/Tabs/TabMenu.js +32 -38
- package/dist/src/components/Tabs/TabMenuItem.js +9 -13
- package/dist/src/components/Tabs/index.js +24 -43
- package/dist/src/components/Tag/index.js +57 -74
- package/dist/src/components/TagInput/index.js +63 -94
- package/dist/src/components/TagList/index.js +22 -35
- package/dist/src/components/Text/index.js +29 -31
- package/dist/src/components/TextArea/index.js +240 -0
- package/dist/src/components/TextInput/index.js +166 -260
- package/dist/src/components/TimeInput/index.js +10 -13
- package/dist/src/components/Toaster/index.js +51 -67
- package/dist/src/components/Toggle/index.js +62 -129
- package/dist/src/components/ToggleGroup/index.js +21 -23
- package/dist/src/components/Tooltip/index.js +28 -31
- package/dist/src/components/VerificationCode/index.js +55 -90
- package/dist/src/index.js +1 -0
- package/dist/src/utils/ids.js +1 -6
- package/package.json +3 -3
|
@@ -7,70 +7,54 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
|
7
7
|
|
|
8
8
|
const StyledIconContainer = /*#__PURE__*/_styled(Stack, {
|
|
9
9
|
target: "ev6jkq82"
|
|
10
|
-
})("color:",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
size: 10,
|
|
29
|
-
color: order === 'descending' ? 'primary' : 'neutral',
|
|
30
|
-
prominence: "weak"
|
|
31
|
-
})]
|
|
32
|
-
});
|
|
33
|
-
};
|
|
10
|
+
})("color:", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.colors.neutral.textWeak, ";&[aria-disabled='true']{cursor:not-allowed;}&[role*='button']{cursor:pointer;user-select:none;}");
|
|
13
|
+
const SortIcon = ({
|
|
14
|
+
order
|
|
15
|
+
}) => jsxs(StyledIconContainer, {
|
|
16
|
+
children: [jsx(Icon, {
|
|
17
|
+
name: "arrow-up",
|
|
18
|
+
size: 10,
|
|
19
|
+
color: order === 'ascending' ? 'primary' : 'neutral',
|
|
20
|
+
prominence: "weak"
|
|
21
|
+
}), jsx(Icon, {
|
|
22
|
+
name: "arrow-down",
|
|
23
|
+
size: 10,
|
|
24
|
+
color: order === 'descending' ? 'primary' : 'neutral',
|
|
25
|
+
prominence: "weak"
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
34
28
|
const StyledHeaderCell = /*#__PURE__*/_styled('th', {
|
|
35
29
|
shouldForwardProp: prop => !['width', 'maxWidth', 'minWidth'].includes(prop),
|
|
36
30
|
target: "ev6jkq81"
|
|
37
|
-
})(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref3;
|
|
43
|
-
return `
|
|
31
|
+
})(({
|
|
32
|
+
width,
|
|
33
|
+
maxWidth,
|
|
34
|
+
minWidth
|
|
35
|
+
}) => `
|
|
44
36
|
${width ? `width: ${width};` : ''}
|
|
45
37
|
${maxWidth ? `max-width: ${maxWidth};` : ''}
|
|
46
38
|
${minWidth ? `min-width: ${minWidth};` : ''}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
theme
|
|
51
|
-
} = _ref4;
|
|
52
|
-
return theme.space['1'];
|
|
53
|
-
}, ";&[role*='button']{cursor:pointer;user-select:none;}");
|
|
39
|
+
`, " padding:", ({
|
|
40
|
+
theme
|
|
41
|
+
}) => theme.space['1'], ";&[role*='button']{cursor:pointer;user-select:none;}");
|
|
54
42
|
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
55
43
|
target: "ev6jkq80"
|
|
56
|
-
})("display:flex;flex-direction:row;align-items:center;gap:",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
maxWidth,
|
|
71
|
-
minWidth,
|
|
72
|
-
info
|
|
73
|
-
} = _ref6;
|
|
44
|
+
})("display:flex;flex-direction:row;align-items:center;gap:", ({
|
|
45
|
+
theme
|
|
46
|
+
}) => theme.space['1'], ";");
|
|
47
|
+
const HeaderCell = ({
|
|
48
|
+
children,
|
|
49
|
+
className,
|
|
50
|
+
isOrdered,
|
|
51
|
+
onOrder,
|
|
52
|
+
orderDirection,
|
|
53
|
+
width,
|
|
54
|
+
maxWidth,
|
|
55
|
+
minWidth,
|
|
56
|
+
info
|
|
57
|
+
}) => {
|
|
74
58
|
let order;
|
|
75
59
|
if (isOrdered && orderDirection === 'asc') {
|
|
76
60
|
order = 'ascending';
|
|
@@ -3,11 +3,10 @@ import { HeaderCell } from './HeaderCell.js';
|
|
|
3
3
|
import { useTableContext } from './TableContext.js';
|
|
4
4
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
const HeaderRow =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = _ref;
|
|
6
|
+
const HeaderRow = ({
|
|
7
|
+
children,
|
|
8
|
+
hasSelectAllColumn
|
|
9
|
+
}) => {
|
|
11
10
|
const {
|
|
12
11
|
allRowSelectValue,
|
|
13
12
|
selectAll,
|
|
@@ -8,20 +8,16 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
8
8
|
|
|
9
9
|
const StyledCheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
10
10
|
target: "e1qvrbgq0"
|
|
11
|
-
})("display:flex;background:",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
id,
|
|
22
|
-
selectDisabled,
|
|
23
|
-
'data-testid': dataTestid
|
|
24
|
-
} = _ref2;
|
|
11
|
+
})("display:flex;background:", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.colors.neutral.background, ";");
|
|
14
|
+
const Row = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
id,
|
|
18
|
+
selectDisabled,
|
|
19
|
+
'data-testid': dataTestid
|
|
20
|
+
}) => {
|
|
25
21
|
const {
|
|
26
22
|
allRowSelectValue,
|
|
27
23
|
selectable,
|
|
@@ -7,12 +7,9 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
7
7
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
8
|
const StyledActionBar = /*#__PURE__*/_styled(ActionBar, {
|
|
9
9
|
target: "esnuyll1"
|
|
10
|
-
})("display:flex;align-items:center;padding:0 ",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
14
|
-
return theme.space['1'];
|
|
15
|
-
}, ";");
|
|
10
|
+
})("display:flex;align-items:center;padding:0 ", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.space['1'], ";");
|
|
16
13
|
const FlexDiv = /*#__PURE__*/_styled("div", {
|
|
17
14
|
target: "esnuyll0"
|
|
18
15
|
})(process.env.NODE_ENV === "production" ? {
|
|
@@ -23,13 +20,12 @@ const FlexDiv = /*#__PURE__*/_styled("div", {
|
|
|
23
20
|
styles: "flex:1",
|
|
24
21
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
22
|
});
|
|
26
|
-
function SelectBar(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref2;
|
|
23
|
+
function SelectBar({
|
|
24
|
+
children,
|
|
25
|
+
data,
|
|
26
|
+
idKey,
|
|
27
|
+
className
|
|
28
|
+
}) {
|
|
33
29
|
const {
|
|
34
30
|
selectedRowIds,
|
|
35
31
|
unselectAll
|
|
@@ -24,12 +24,11 @@ const StyledSkeleton = /*#__PURE__*/_styled(Skeleton, {
|
|
|
24
24
|
styles: "width:80%;max-width:100%",
|
|
25
25
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
26
|
});
|
|
27
|
-
const SkeletonRows =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
27
|
+
const SkeletonRows = ({
|
|
28
|
+
selectable,
|
|
29
|
+
rows,
|
|
30
|
+
cols
|
|
31
|
+
}) => {
|
|
33
32
|
const rowArray = Array.from({
|
|
34
33
|
length: rows
|
|
35
34
|
}, (_, index) => index);
|
|
@@ -2,13 +2,12 @@ import { useContext, createContext, useState, useCallback, useMemo } from 'react
|
|
|
2
2
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
const TableContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
-
const TableProvider =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
5
|
+
const TableProvider = ({
|
|
6
|
+
children,
|
|
7
|
+
selectable,
|
|
8
|
+
bordered,
|
|
9
|
+
stripped
|
|
10
|
+
}) => {
|
|
12
11
|
const [selectedRowIds, setSelectedRowIds] = useState({});
|
|
13
12
|
const registerSelectableRow = useCallback(rowId => {
|
|
14
13
|
setSelectedRowIds(current => ({
|
|
@@ -14,13 +14,11 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
|
14
14
|
const StyledTable = /*#__PURE__*/_styled('table', {
|
|
15
15
|
shouldForwardProp: prop => !['bordered', 'stripped'].includes(prop),
|
|
16
16
|
target: "ert5hkm0"
|
|
17
|
-
})("width:100%;box-sizing:content-box;border-collapse:collapse;",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
23
|
-
return `
|
|
17
|
+
})("width:100%;box-sizing:content-box;border-collapse:collapse;", ({
|
|
18
|
+
theme,
|
|
19
|
+
stripped,
|
|
20
|
+
bordered
|
|
21
|
+
}) => `
|
|
24
22
|
${stripped ? `& tbody tr:nth-of-type(even) {
|
|
25
23
|
background: ${theme.colors.neutral.backgroundWeak};
|
|
26
24
|
}` : ''}
|
|
@@ -28,51 +26,47 @@ const StyledTable = /*#__PURE__*/_styled('table', {
|
|
|
28
26
|
${bordered ? `& tbody tr {
|
|
29
27
|
border-bottom: 1px solid ${theme.colors.neutral.borderWeak};
|
|
30
28
|
}` : ''}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
`, ";");
|
|
30
|
+
const BaseTable = /*#__PURE__*/forwardRef(({
|
|
31
|
+
selectable = false,
|
|
32
|
+
children,
|
|
33
|
+
columns,
|
|
34
|
+
loading,
|
|
35
|
+
bordered = false,
|
|
36
|
+
stripped = false
|
|
37
|
+
}, ref) => jsx(TableProvider, {
|
|
38
|
+
selectable: selectable,
|
|
39
|
+
stripped: stripped,
|
|
40
|
+
bordered: bordered,
|
|
41
|
+
children: jsxs(StyledTable, {
|
|
42
|
+
ref: ref,
|
|
44
43
|
stripped: stripped,
|
|
45
44
|
bordered: bordered,
|
|
46
|
-
children:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
72
|
-
}) : children]
|
|
73
|
-
})
|
|
74
|
-
});
|
|
75
|
-
});
|
|
45
|
+
children: [jsx(Header, {
|
|
46
|
+
children: jsx(HeaderRow, {
|
|
47
|
+
hasSelectAllColumn: selectable,
|
|
48
|
+
children: columns.map((column, index) => jsx(HeaderCell
|
|
49
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
50
|
+
, {
|
|
51
|
+
isOrdered: column.isOrdered,
|
|
52
|
+
orderDirection: column.orderDirection,
|
|
53
|
+
onOrder: column.onOrder,
|
|
54
|
+
width: column.width,
|
|
55
|
+
minWidth: column.minWidth,
|
|
56
|
+
maxWidth: column.maxWidth,
|
|
57
|
+
info: column.info,
|
|
58
|
+
children: column.label
|
|
59
|
+
}, `header-column-${index}`))
|
|
60
|
+
})
|
|
61
|
+
}), loading ? jsx(Body, {
|
|
62
|
+
children: jsx(SkeletonRows, {
|
|
63
|
+
selectable: selectable,
|
|
64
|
+
rows: 5,
|
|
65
|
+
cols: columns.length
|
|
66
|
+
})
|
|
67
|
+
}) : children]
|
|
68
|
+
})
|
|
69
|
+
}));
|
|
76
70
|
|
|
77
71
|
/**
|
|
78
72
|
* Table is a component that displays data in a tabular format.
|
|
@@ -9,17 +9,11 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
|
9
9
|
|
|
10
10
|
const StyledBadge = /*#__PURE__*/_styled(Badge, {
|
|
11
11
|
target: "e1hzf7cr4"
|
|
12
|
-
})("padding:0 ",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, ";margin-left:", _ref2 => {
|
|
18
|
-
let {
|
|
19
|
-
theme
|
|
20
|
-
} = _ref2;
|
|
21
|
-
return theme.space['1'];
|
|
22
|
-
}, ";");
|
|
12
|
+
})("padding:0 ", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.space['1'], ";margin-left:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.space['1'], ";");
|
|
23
17
|
const StyledText = /*#__PURE__*/_styled(Text, {
|
|
24
18
|
target: "e1hzf7cr3"
|
|
25
19
|
})();
|
|
@@ -28,115 +22,60 @@ const StyledTooltip = /*#__PURE__*/_styled(Tooltip, {
|
|
|
28
22
|
})();
|
|
29
23
|
const BadgeContainer = /*#__PURE__*/_styled("span", {
|
|
30
24
|
target: "e1hzf7cr1"
|
|
31
|
-
})("margin-left:",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = _ref3;
|
|
35
|
-
return theme.space['1'];
|
|
36
|
-
}, ";display:flex;");
|
|
25
|
+
})("margin-left:", ({
|
|
26
|
+
theme
|
|
27
|
+
}) => theme.space['1'], ";display:flex;");
|
|
37
28
|
const StyledTabButton = /*#__PURE__*/_styled('button', {
|
|
38
29
|
target: "e1hzf7cr0"
|
|
39
|
-
})("display:flex;flex-direction:row;padding:",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, ";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, ";
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, ";
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return theme.colors.primary.border;
|
|
89
|
-
}, ";", StyledText, "{color:", _ref14 => {
|
|
90
|
-
let {
|
|
91
|
-
theme
|
|
92
|
-
} = _ref14;
|
|
93
|
-
return theme.colors.primary.text;
|
|
94
|
-
}, ";}}&[aria-disabled='false']:not(:disabled){&:hover,&:focus,&:active{outline:none;color:", _ref15 => {
|
|
95
|
-
let {
|
|
96
|
-
theme
|
|
97
|
-
} = _ref15;
|
|
98
|
-
return theme.colors.primary.text;
|
|
99
|
-
}, ";border-bottom-color:", _ref16 => {
|
|
100
|
-
let {
|
|
101
|
-
theme
|
|
102
|
-
} = _ref16;
|
|
103
|
-
return theme.colors.primary.border;
|
|
104
|
-
}, ";&[data-is-selected='false']{", StyledBadge, "{background-color:", _ref17 => {
|
|
105
|
-
let {
|
|
106
|
-
theme
|
|
107
|
-
} = _ref17;
|
|
108
|
-
return theme.colors.primary.background;
|
|
109
|
-
}, ";border-color:", _ref18 => {
|
|
110
|
-
let {
|
|
111
|
-
theme
|
|
112
|
-
} = _ref18;
|
|
113
|
-
return theme.colors.primary.background;
|
|
114
|
-
}, ";color:", _ref19 => {
|
|
115
|
-
let {
|
|
116
|
-
theme
|
|
117
|
-
} = _ref19;
|
|
118
|
-
return theme.colors.primary.text;
|
|
119
|
-
}, ";}", StyledText, "{color:", _ref20 => {
|
|
120
|
-
let {
|
|
121
|
-
theme
|
|
122
|
-
} = _ref20;
|
|
123
|
-
return theme.colors.primary.text;
|
|
124
|
-
}, ";}}}}&[aria-disabled='true'],&:disabled{cursor:not-allowed;filter:grayscale(1) opacity(50%);}");
|
|
125
|
-
const Tab = /*#__PURE__*/forwardRef((_ref21, ref) => {
|
|
126
|
-
let {
|
|
127
|
-
as,
|
|
128
|
-
badge,
|
|
129
|
-
children,
|
|
130
|
-
className,
|
|
131
|
-
counter,
|
|
132
|
-
disabled = false,
|
|
133
|
-
onClick,
|
|
134
|
-
onKeyDown,
|
|
135
|
-
subtitle,
|
|
136
|
-
tooltip,
|
|
137
|
-
value,
|
|
138
|
-
...props
|
|
139
|
-
} = _ref21;
|
|
30
|
+
})("display:flex;flex-direction:row;padding:", ({
|
|
31
|
+
theme
|
|
32
|
+
}) => `${theme.space['1']} ${theme.space['2']}`, ";cursor:pointer;justify-content:center;align-items:baseline;white-space:nowrap;color:", ({
|
|
33
|
+
theme
|
|
34
|
+
}) => theme.colors.neutral.text, ";text-decoration:none;user-select:none;touch-action:manipulation;transition:color 0.2s;border:none;background:none;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:", ({
|
|
35
|
+
theme
|
|
36
|
+
}) => theme.colors.neutral.border, ";outline:none;font-size:", ({
|
|
37
|
+
theme
|
|
38
|
+
}) => theme.typography.bodyStrong.fontSize, ";font-family:", ({
|
|
39
|
+
theme
|
|
40
|
+
}) => theme.typography.bodyStrong.fontFamily, ";font-weight:", ({
|
|
41
|
+
theme
|
|
42
|
+
}) => theme.typography.bodyStrong.weight, ";letter-spacing:", ({
|
|
43
|
+
theme
|
|
44
|
+
}) => theme.typography.bodyStrong.letterSpacing, ";line-height:", ({
|
|
45
|
+
theme
|
|
46
|
+
}) => theme.typography.bodyStrong.lineHeight, ";&:hover,&:active,&:focus{text-decoration:none;outline:none;}&:focus-visible{outline:auto;}&[aria-selected='true']{color:", ({
|
|
47
|
+
theme
|
|
48
|
+
}) => theme.colors.primary.text, ";border-bottom-color:", ({
|
|
49
|
+
theme
|
|
50
|
+
}) => theme.colors.primary.border, ";", StyledText, "{color:", ({
|
|
51
|
+
theme
|
|
52
|
+
}) => theme.colors.primary.text, ";}}&[aria-disabled='false']:not(:disabled){&:hover,&:focus,&:active{outline:none;color:", ({
|
|
53
|
+
theme
|
|
54
|
+
}) => theme.colors.primary.text, ";border-bottom-color:", ({
|
|
55
|
+
theme
|
|
56
|
+
}) => theme.colors.primary.border, ";&[data-is-selected='false']{", StyledBadge, "{background-color:", ({
|
|
57
|
+
theme
|
|
58
|
+
}) => theme.colors.primary.background, ";border-color:", ({
|
|
59
|
+
theme
|
|
60
|
+
}) => theme.colors.primary.background, ";color:", ({
|
|
61
|
+
theme
|
|
62
|
+
}) => theme.colors.primary.text, ";}", StyledText, "{color:", ({
|
|
63
|
+
theme
|
|
64
|
+
}) => theme.colors.primary.text, ";}}}}&[aria-disabled='true'],&:disabled{cursor:not-allowed;filter:grayscale(1) opacity(50%);}");
|
|
65
|
+
const Tab = /*#__PURE__*/forwardRef(({
|
|
66
|
+
as,
|
|
67
|
+
badge,
|
|
68
|
+
children,
|
|
69
|
+
className,
|
|
70
|
+
counter,
|
|
71
|
+
disabled = false,
|
|
72
|
+
onClick,
|
|
73
|
+
onKeyDown,
|
|
74
|
+
subtitle,
|
|
75
|
+
tooltip,
|
|
76
|
+
value,
|
|
77
|
+
...props
|
|
78
|
+
}, ref) => {
|
|
140
79
|
const {
|
|
141
80
|
selected,
|
|
142
81
|
onChange
|
|
@@ -11,12 +11,9 @@ const ArrowIcon = /*#__PURE__*/_styled(Icon, {
|
|
|
11
11
|
})();
|
|
12
12
|
const StyledMenu = /*#__PURE__*/_styled(StyledTabButton, {
|
|
13
13
|
target: "edb1sh91"
|
|
14
|
-
})(ArrowIcon, "{color:inherit;margin-left:",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
18
|
-
return theme.space['1'];
|
|
19
|
-
}, ";transition:300ms transform ease-out;}&[aria-expanded='true'] ", ArrowIcon, "{transform:rotate(-180deg);}");
|
|
14
|
+
})(ArrowIcon, "{color:inherit;margin-left:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.space['1'], ";transition:300ms transform ease-out;}&[aria-expanded='true'] ", ArrowIcon, "{transform:rotate(-180deg);}");
|
|
20
17
|
|
|
21
18
|
// This will wrap and give the positioning to the popup div that is added onto the disclosure
|
|
22
19
|
const StyledPositioningWrapper = /*#__PURE__*/_styled("div", {
|
|
@@ -29,37 +26,34 @@ const StyledPositioningWrapper = /*#__PURE__*/_styled("div", {
|
|
|
29
26
|
styles: "display:flex;position:sticky;top:0;bottom:0;right:0",
|
|
30
27
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
28
|
});
|
|
32
|
-
const TabMenu = /*#__PURE__*/forwardRef((
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
});
|
|
29
|
+
const TabMenu = /*#__PURE__*/forwardRef(({
|
|
30
|
+
children,
|
|
31
|
+
disclosure,
|
|
32
|
+
visible,
|
|
33
|
+
id,
|
|
34
|
+
disabled,
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}, ref) => jsx(StyledPositioningWrapper, {
|
|
38
|
+
children: jsx(MenuV2, {
|
|
39
|
+
visible: visible,
|
|
40
|
+
id: id,
|
|
41
|
+
ref: ref,
|
|
42
|
+
portalTarget: document.body // We need to attach it to the body to avoid overflow issues
|
|
43
|
+
,
|
|
44
|
+
disclosure: jsxs(StyledMenu, {
|
|
45
|
+
role: "tab",
|
|
46
|
+
"aria-disabled": disabled ?? 'false',
|
|
47
|
+
disabled: disabled,
|
|
48
|
+
"aria-haspopup": "menu",
|
|
49
|
+
className: className,
|
|
50
|
+
...props,
|
|
51
|
+
children: [disclosure, jsx(ArrowIcon, {
|
|
52
|
+
name: "arrow-down"
|
|
53
|
+
})]
|
|
54
|
+
}),
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
}));
|
|
64
58
|
|
|
65
59
|
export { TabMenu };
|
|
@@ -6,19 +6,15 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
6
6
|
|
|
7
7
|
const StyledMenuItem = /*#__PURE__*/_styled(Item, {
|
|
8
8
|
target: "eeet93f0"
|
|
9
|
-
})("&[aria-selected='true']{color:",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
children,
|
|
19
|
-
onClick,
|
|
20
|
-
...props
|
|
21
|
-
} = _ref2;
|
|
9
|
+
})("&[aria-selected='true']{color:", ({
|
|
10
|
+
theme
|
|
11
|
+
}) => theme.colors.primary.text, ";}");
|
|
12
|
+
const TabMenuItem = ({
|
|
13
|
+
value,
|
|
14
|
+
children,
|
|
15
|
+
onClick,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
22
18
|
const {
|
|
23
19
|
selected,
|
|
24
20
|
onChange
|