@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.
Files changed (111) hide show
  1. package/README.md +14 -7
  2. package/dist/index.d.ts +51 -2
  3. package/dist/src/components/ActionBar/index.js +22 -37
  4. package/dist/src/components/Alert/index.js +27 -41
  5. package/dist/src/components/Avatar/index.js +48 -69
  6. package/dist/src/components/Badge/index.js +29 -49
  7. package/dist/src/components/Banner/index.js +42 -62
  8. package/dist/src/components/BarChart/Tooltip.js +35 -50
  9. package/dist/src/components/BarChart/index.js +13 -14
  10. package/dist/src/components/BarStack/index.js +100 -191
  11. package/dist/src/components/Breadcrumbs/index.js +29 -39
  12. package/dist/src/components/Bullet/index.js +42 -55
  13. package/dist/src/components/Button/index.js +73 -99
  14. package/dist/src/components/Card/index.js +39 -57
  15. package/dist/src/components/Carousel/index.js +32 -60
  16. package/dist/src/components/Checkbox/index.js +153 -341
  17. package/dist/src/components/CheckboxGroup/index.js +25 -27
  18. package/dist/src/components/CopyButton/index.js +11 -12
  19. package/dist/src/components/DateInput/index.js +141 -268
  20. package/dist/src/components/EmptyState/index.js +68 -83
  21. package/dist/src/components/Expandable/index.js +13 -20
  22. package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
  23. package/dist/src/components/GlobalAlert/index.js +19 -32
  24. package/dist/src/components/LineChart/CustomLegend.js +80 -89
  25. package/dist/src/components/LineChart/Tooltip.js +32 -47
  26. package/dist/src/components/LineChart/helpers.js +15 -50
  27. package/dist/src/components/LineChart/index.js +23 -33
  28. package/dist/src/components/Link/index.js +46 -65
  29. package/dist/src/components/List/Body.js +9 -15
  30. package/dist/src/components/List/Cell.js +6 -7
  31. package/dist/src/components/List/HeaderCell.js +28 -56
  32. package/dist/src/components/List/HeaderRow.js +9 -16
  33. package/dist/src/components/List/ListContext.js +5 -6
  34. package/dist/src/components/List/Row.js +44 -90
  35. package/dist/src/components/List/SelectBar.js +9 -13
  36. package/dist/src/components/List/SkeletonRows.js +5 -6
  37. package/dist/src/components/List/index.js +15 -25
  38. package/dist/src/components/Loader/index.js +18 -25
  39. package/dist/src/components/Menu/Item.js +39 -49
  40. package/dist/src/components/Menu/index.js +31 -56
  41. package/dist/src/components/MenuV2/Item.js +39 -49
  42. package/dist/src/components/MenuV2/index.js +28 -47
  43. package/dist/src/components/Meter/index.js +25 -47
  44. package/dist/src/components/Modal/Dialog.js +33 -58
  45. package/dist/src/components/Modal/Disclosure.js +8 -9
  46. package/dist/src/components/Modal/index.js +26 -33
  47. package/dist/src/components/Notice/index.js +21 -27
  48. package/dist/src/components/NumberInput/index.js +73 -137
  49. package/dist/src/components/Pagination/getPageNumbers.js +1 -4
  50. package/dist/src/components/Pagination/index.js +17 -27
  51. package/dist/src/components/PasswordCheck/index.js +26 -32
  52. package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
  53. package/dist/src/components/PieChart/Legends.js +71 -107
  54. package/dist/src/components/PieChart/Tooltip.js +33 -36
  55. package/dist/src/components/PieChart/index.js +13 -17
  56. package/dist/src/components/Popover/index.js +58 -75
  57. package/dist/src/components/Popup/helpers.js +13 -15
  58. package/dist/src/components/Popup/index.js +55 -98
  59. package/dist/src/components/ProgressBar/index.js +31 -49
  60. package/dist/src/components/Radio/index.js +58 -113
  61. package/dist/src/components/RadioGroup/index.js +26 -28
  62. package/dist/src/components/Row/index.js +25 -31
  63. package/dist/src/components/SelectInput/index.js +357 -410
  64. package/dist/src/components/SelectableCard/index.js +73 -115
  65. package/dist/src/components/Separator/index.js +52 -73
  66. package/dist/src/components/Skeleton/Block.js +23 -41
  67. package/dist/src/components/Skeleton/Blocks.js +23 -41
  68. package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
  69. package/dist/src/components/Skeleton/Donut.js +3 -6
  70. package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
  71. package/dist/src/components/Skeleton/Line.js +5 -11
  72. package/dist/src/components/Skeleton/List.js +22 -31
  73. package/dist/src/components/Skeleton/Slider.js +25 -46
  74. package/dist/src/components/Skeleton/Square.js +3 -6
  75. package/dist/src/components/Skeleton/index.js +17 -33
  76. package/dist/src/components/Snippet/index.js +82 -137
  77. package/dist/src/components/Stack/index.js +11 -14
  78. package/dist/src/components/Status/index.js +48 -78
  79. package/dist/src/components/StepList/index.js +45 -63
  80. package/dist/src/components/Stepper/index.js +74 -129
  81. package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
  82. package/dist/src/components/SwitchButton/index.js +36 -62
  83. package/dist/src/components/Table/Body.js +5 -8
  84. package/dist/src/components/Table/Cell.js +14 -20
  85. package/dist/src/components/Table/Header.js +8 -14
  86. package/dist/src/components/Table/HeaderCell.js +40 -56
  87. package/dist/src/components/Table/HeaderRow.js +4 -5
  88. package/dist/src/components/Table/Row.js +10 -14
  89. package/dist/src/components/Table/SelectBar.js +9 -13
  90. package/dist/src/components/Table/SkeletonRows.js +5 -6
  91. package/dist/src/components/Table/TableContext.js +6 -7
  92. package/dist/src/components/Table/index.js +44 -50
  93. package/dist/src/components/Tabs/Tab.js +57 -118
  94. package/dist/src/components/Tabs/TabMenu.js +32 -38
  95. package/dist/src/components/Tabs/TabMenuItem.js +9 -13
  96. package/dist/src/components/Tabs/index.js +24 -43
  97. package/dist/src/components/Tag/index.js +57 -74
  98. package/dist/src/components/TagInput/index.js +63 -94
  99. package/dist/src/components/TagList/index.js +22 -35
  100. package/dist/src/components/Text/index.js +29 -31
  101. package/dist/src/components/TextArea/index.js +240 -0
  102. package/dist/src/components/TextInput/index.js +166 -260
  103. package/dist/src/components/TimeInput/index.js +10 -13
  104. package/dist/src/components/Toaster/index.js +51 -67
  105. package/dist/src/components/Toggle/index.js +62 -129
  106. package/dist/src/components/ToggleGroup/index.js +21 -23
  107. package/dist/src/components/Tooltip/index.js +28 -31
  108. package/dist/src/components/VerificationCode/index.js +55 -90
  109. package/dist/src/index.js +1 -0
  110. package/dist/src/utils/ids.js +1 -6
  111. 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:", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.colors.neutral.textWeak;
15
- }, ";&[aria-disabled='true']{cursor:not-allowed;}&[role*='button']{cursor:pointer;user-select:none;}");
16
- const SortIcon = _ref2 => {
17
- let {
18
- order
19
- } = _ref2;
20
- return jsxs(StyledIconContainer, {
21
- children: [jsx(Icon, {
22
- name: "arrow-up",
23
- size: 10,
24
- color: order === 'ascending' ? 'primary' : 'neutral',
25
- prominence: "weak"
26
- }), jsx(Icon, {
27
- name: "arrow-down",
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
- })(_ref3 => {
38
- let {
39
- width,
40
- maxWidth,
41
- minWidth
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
- }, " padding:", _ref4 => {
49
- let {
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:", _ref5 => {
57
- let {
58
- theme
59
- } = _ref5;
60
- return theme.space['1'];
61
- }, ";");
62
- const HeaderCell = _ref6 => {
63
- let {
64
- children,
65
- className,
66
- isOrdered,
67
- onOrder,
68
- orderDirection,
69
- width,
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 = _ref => {
7
- let {
8
- children,
9
- hasSelectAllColumn
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:", _ref => {
12
- let {
13
- theme
14
- } = _ref;
15
- return theme.colors.neutral.background;
16
- }, ";");
17
- const Row = _ref2 => {
18
- let {
19
- children,
20
- className,
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 ", _ref => {
11
- let {
12
- theme
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(_ref2) {
27
- let {
28
- children,
29
- data,
30
- idKey,
31
- className
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 = _ref => {
28
- let {
29
- selectable,
30
- rows,
31
- cols
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 = _ref => {
6
- let {
7
- children,
8
- selectable,
9
- bordered,
10
- stripped
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;", _ref => {
18
- let {
19
- theme,
20
- stripped,
21
- bordered
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
- const BaseTable = /*#__PURE__*/forwardRef((_ref2, ref) => {
34
- let {
35
- selectable = false,
36
- children,
37
- columns,
38
- loading,
39
- bordered = false,
40
- stripped = false
41
- } = _ref2;
42
- return jsx(TableProvider, {
43
- selectable: selectable,
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: jsxs(StyledTable, {
47
- ref: ref,
48
- stripped: stripped,
49
- bordered: bordered,
50
- children: [jsx(Header, {
51
- children: jsx(HeaderRow, {
52
- hasSelectAllColumn: selectable,
53
- children: columns.map((column, index) => jsx(HeaderCell
54
- // eslint-disable-next-line react/no-array-index-key
55
- , {
56
- isOrdered: column.isOrdered,
57
- orderDirection: column.orderDirection,
58
- onOrder: column.onOrder,
59
- width: column.width,
60
- minWidth: column.minWidth,
61
- maxWidth: column.maxWidth,
62
- info: column.info,
63
- children: column.label
64
- }, `header-column-${index}`))
65
- })
66
- }), loading ? jsx(Body, {
67
- children: jsx(SkeletonRows, {
68
- selectable: selectable,
69
- rows: 5,
70
- cols: columns.length
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 ", _ref => {
13
- let {
14
- theme
15
- } = _ref;
16
- return theme.space['1'];
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:", _ref3 => {
32
- let {
33
- theme
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:", _ref4 => {
40
- let {
41
- theme
42
- } = _ref4;
43
- return `${theme.space['1']} ${theme.space['2']}`;
44
- }, ";cursor:pointer;justify-content:center;align-items:baseline;white-space:nowrap;color:", _ref5 => {
45
- let {
46
- theme
47
- } = _ref5;
48
- return theme.colors.neutral.text;
49
- }, ";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:", _ref6 => {
50
- let {
51
- theme
52
- } = _ref6;
53
- return theme.colors.neutral.border;
54
- }, ";outline:none;font-size:", _ref7 => {
55
- let {
56
- theme
57
- } = _ref7;
58
- return theme.typography.bodyStrong.fontSize;
59
- }, ";font-family:", _ref8 => {
60
- let {
61
- theme
62
- } = _ref8;
63
- return theme.typography.bodyStrong.fontFamily;
64
- }, ";font-weight:", _ref9 => {
65
- let {
66
- theme
67
- } = _ref9;
68
- return theme.typography.bodyStrong.weight;
69
- }, ";letter-spacing:", _ref10 => {
70
- let {
71
- theme
72
- } = _ref10;
73
- return theme.typography.bodyStrong.letterSpacing;
74
- }, ";line-height:", _ref11 => {
75
- let {
76
- theme
77
- } = _ref11;
78
- return theme.typography.bodyStrong.lineHeight;
79
- }, ";&:hover,&:active,&:focus{text-decoration:none;outline:none;}&:focus-visible{outline:auto;}&[aria-selected='true']{color:", _ref12 => {
80
- let {
81
- theme
82
- } = _ref12;
83
- return theme.colors.primary.text;
84
- }, ";border-bottom-color:", _ref13 => {
85
- let {
86
- theme
87
- } = _ref13;
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:", _ref => {
15
- let {
16
- theme
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((_ref2, ref) => {
33
- let {
34
- children,
35
- disclosure,
36
- visible,
37
- id,
38
- disabled,
39
- className,
40
- ...props
41
- } = _ref2;
42
- return jsx(StyledPositioningWrapper, {
43
- children: jsx(MenuV2, {
44
- visible: visible,
45
- id: id,
46
- ref: ref,
47
- portalTarget: document.body // We need to attach it to the body to avoid overflow issues
48
- ,
49
- disclosure: jsxs(StyledMenu, {
50
- role: "tab",
51
- "aria-disabled": disabled ?? 'false',
52
- disabled: disabled,
53
- "aria-haspopup": "menu",
54
- className: className,
55
- ...props,
56
- children: [disclosure, jsx(ArrowIcon, {
57
- name: "arrow-down"
58
- })]
59
- }),
60
- children: children
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:", _ref => {
10
- let {
11
- theme
12
- } = _ref;
13
- return theme.colors.primary.text;
14
- }, ";}");
15
- const TabMenuItem = _ref2 => {
16
- let {
17
- value,
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