@common-origin/design-system 2.23.0 → 3.1.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 (186) hide show
  1. package/README.md +2 -2
  2. package/dist/client.js +2219 -1026
  3. package/dist/client.js.map +1 -1
  4. package/dist/components/atoms/Badge/Badge.d.mts +5 -12
  5. package/dist/components/atoms/Badge/Badge.d.ts +5 -12
  6. package/dist/components/atoms/Badge/Badge.mjs +0 -7
  7. package/dist/components/atoms/Badge/index.d.mts +1 -1
  8. package/dist/components/atoms/Badge/index.d.ts +1 -1
  9. package/dist/components/atoms/Box/Box.d.mts +22 -34
  10. package/dist/components/atoms/Box/Box.d.ts +22 -34
  11. package/dist/components/atoms/Box/Box.mjs +8 -11
  12. package/dist/components/atoms/Button/Button.d.mts +1 -4
  13. package/dist/components/atoms/Button/Button.d.ts +1 -4
  14. package/dist/components/atoms/Button/Button.mjs +3 -10
  15. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.mts +4 -12
  16. package/dist/components/atoms/CategoryLabel/CategoryLabel.d.ts +4 -12
  17. package/dist/components/atoms/CategoryLabel/CategoryLabel.mjs +5 -16
  18. package/dist/components/atoms/Chip/Chip.d.mts +8 -20
  19. package/dist/components/atoms/Chip/Chip.d.ts +8 -20
  20. package/dist/components/atoms/Chip/Chip.mjs +20 -46
  21. package/dist/components/atoms/Chip/Chip.mjs.map +1 -1
  22. package/dist/components/atoms/Chip/FilterChip.d.mts +22 -10
  23. package/dist/components/atoms/Chip/FilterChip.d.ts +22 -10
  24. package/dist/components/atoms/Chip/FilterChip.mjs +66 -6
  25. package/dist/components/atoms/Chip/FilterChip.mjs.map +1 -1
  26. package/dist/components/atoms/Chip/InputChip.mjs +4 -6
  27. package/dist/components/atoms/Chip/InputChip.mjs.map +1 -1
  28. package/dist/components/atoms/Chip/index.d.mts +0 -1
  29. package/dist/components/atoms/Chip/index.d.ts +0 -1
  30. package/dist/components/atoms/Chip/shared/types.d.mts +9 -19
  31. package/dist/components/atoms/Chip/shared/types.d.ts +9 -19
  32. package/dist/components/atoms/Chip/shared/utils.d.mts +3 -3
  33. package/dist/components/atoms/Chip/shared/utils.d.ts +3 -3
  34. package/dist/components/atoms/Chip/shared/utils.mjs +4 -8
  35. package/dist/components/atoms/Chip/shared/utils.mjs.map +1 -1
  36. package/dist/components/atoms/DateFormatter/DateFormatter.d.mts +2 -5
  37. package/dist/components/atoms/DateFormatter/DateFormatter.d.ts +2 -5
  38. package/dist/components/atoms/DateFormatter/DateFormatter.mjs +0 -1
  39. package/dist/components/atoms/StatusLabel/StatusLabel.mjs +1 -4
  40. package/dist/components/atoms/StatusLabel/StatusLabel.mjs.map +1 -1
  41. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.mts +5 -7
  42. package/dist/components/atoms/StatusLabel/StatusLabelBase.d.ts +5 -7
  43. package/dist/components/atoms/StatusLabel/StatusLabelBase.mjs +10 -12
  44. package/dist/components/atoms/Tag/Tag.d.mts +2 -4
  45. package/dist/components/atoms/Tag/Tag.d.ts +2 -4
  46. package/dist/components/atoms/Tag/Tag.mjs +0 -24
  47. package/dist/components/atoms/Tooltip/Tooltip.d.mts +41 -0
  48. package/dist/components/atoms/Tooltip/Tooltip.d.ts +41 -0
  49. package/dist/components/atoms/Tooltip/Tooltip.mjs +204 -0
  50. package/dist/components/atoms/Tooltip/Tooltip.mjs.map +1 -0
  51. package/dist/components/atoms/Tooltip/index.d.mts +2 -0
  52. package/dist/components/atoms/Tooltip/index.d.ts +2 -0
  53. package/dist/components/atoms/index.d.mts +1 -2
  54. package/dist/components/atoms/index.d.ts +1 -2
  55. package/dist/components/index.d.mts +1 -0
  56. package/dist/components/index.d.ts +1 -0
  57. package/dist/components/layout/GridSystem/GridSystem.d.mts +23 -18
  58. package/dist/components/layout/GridSystem/GridSystem.d.ts +23 -18
  59. package/dist/components/layout/GridSystem/GridSystem.mjs +7 -5
  60. package/dist/components/molecules/ActionSheet/ActionSheet.mjs +1 -0
  61. package/dist/components/molecules/AgentInput/AgentInput.d.mts +5 -0
  62. package/dist/components/molecules/AgentInput/AgentInput.d.ts +5 -0
  63. package/dist/components/molecules/AgentInput/AgentInput.mjs +1 -1
  64. package/dist/components/molecules/Alert/Alert.d.mts +1 -9
  65. package/dist/components/molecules/Alert/Alert.d.ts +1 -9
  66. package/dist/components/molecules/Alert/Alert.mjs +14 -27
  67. package/dist/components/molecules/ChipGroup/ChipGroup.d.mts +0 -1
  68. package/dist/components/molecules/ChipGroup/ChipGroup.d.ts +0 -1
  69. package/dist/components/molecules/ChipGroup/ChipGroup.mjs +2 -6
  70. package/dist/components/molecules/DateGroup/DateGroup.d.mts +1 -2
  71. package/dist/components/molecules/DateGroup/DateGroup.d.ts +1 -2
  72. package/dist/components/molecules/List/List.d.mts +2 -0
  73. package/dist/components/molecules/List/List.d.ts +2 -0
  74. package/dist/components/molecules/List/ListItem.d.mts +2 -0
  75. package/dist/components/molecules/List/ListItem.d.ts +2 -0
  76. package/dist/components/molecules/List/ListItem.mjs +5 -5
  77. package/dist/components/molecules/Menu/Menu.d.mts +117 -0
  78. package/dist/components/molecules/Menu/Menu.d.ts +117 -0
  79. package/dist/components/molecules/Menu/Menu.mjs +473 -0
  80. package/dist/components/molecules/Menu/Menu.mjs.map +1 -0
  81. package/dist/components/molecules/Menu/index.d.mts +2 -0
  82. package/dist/components/molecules/Menu/index.d.ts +2 -0
  83. package/dist/components/molecules/Modal/Modal.d.mts +0 -1
  84. package/dist/components/molecules/Modal/Modal.d.ts +0 -1
  85. package/dist/components/molecules/SearchField/SearchField.mjs +2 -0
  86. package/dist/components/molecules/SidebarNavItem/SidebarNavContext.d.mts +13 -0
  87. package/dist/components/molecules/SidebarNavItem/SidebarNavContext.d.ts +13 -0
  88. package/dist/components/molecules/SidebarNavItem/SidebarNavContext.mjs +13 -0
  89. package/dist/components/molecules/SidebarNavItem/SidebarNavContext.mjs.map +1 -0
  90. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +43 -0
  91. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +43 -0
  92. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +148 -0
  93. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs.map +1 -0
  94. package/dist/components/molecules/SidebarNavItem/index.d.mts +2 -0
  95. package/dist/components/molecules/SidebarNavItem/index.d.ts +2 -0
  96. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.d.mts +36 -0
  97. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.d.ts +36 -0
  98. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +188 -0
  99. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs.map +1 -0
  100. package/dist/components/molecules/SidebarNavSection/index.d.mts +2 -0
  101. package/dist/components/molecules/SidebarNavSection/index.d.ts +2 -0
  102. package/dist/components/molecules/TabBar/TabBar.d.mts +0 -13
  103. package/dist/components/molecules/TabBar/TabBar.d.ts +0 -13
  104. package/dist/components/molecules/TabBar/TabBar.mjs +2 -4
  105. package/dist/components/molecules/TabBar/index.d.mts +1 -1
  106. package/dist/components/molecules/TabBar/index.d.ts +1 -1
  107. package/dist/components/molecules/TransactionListItem/TransactionListItem.mjs +1 -1
  108. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.d.mts +39 -0
  109. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.d.ts +39 -0
  110. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +131 -0
  111. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs.map +1 -0
  112. package/dist/components/molecules/WorkspaceSwitcher/index.d.mts +2 -0
  113. package/dist/components/molecules/WorkspaceSwitcher/index.d.ts +2 -0
  114. package/dist/components/molecules/index.d.mts +4 -1
  115. package/dist/components/molecules/index.d.ts +4 -1
  116. package/dist/components/organisms/SidebarNav/SidebarNav.d.mts +52 -0
  117. package/dist/components/organisms/SidebarNav/SidebarNav.d.ts +52 -0
  118. package/dist/components/organisms/SidebarNav/SidebarNav.mjs +235 -0
  119. package/dist/components/organisms/SidebarNav/SidebarNav.mjs.map +1 -0
  120. package/dist/components/organisms/SidebarNav/index.d.mts +2 -0
  121. package/dist/components/organisms/SidebarNav/index.d.ts +2 -0
  122. package/dist/components/organisms/index.d.mts +1 -0
  123. package/dist/components/organisms/index.d.ts +1 -0
  124. package/dist/data.js +72 -565
  125. package/dist/data.js.map +1 -1
  126. package/dist/index.js +11 -5
  127. package/dist/index.js.map +1 -1
  128. package/dist/index.mjs +7 -5
  129. package/dist/index.mjs.map +1 -1
  130. package/dist/lib/floatingPosition.d.mts +43 -0
  131. package/dist/lib/floatingPosition.d.ts +43 -0
  132. package/dist/lib/floatingPosition.mjs +86 -0
  133. package/dist/lib/floatingPosition.mjs.map +1 -0
  134. package/dist/lib/keyboardFocus.d.mts +6 -0
  135. package/dist/lib/keyboardFocus.d.ts +6 -0
  136. package/dist/lib/keyboardFocus.mjs +17 -0
  137. package/dist/lib/keyboardFocus.mjs.map +1 -0
  138. package/dist/lib/tokenAliases.d.mts +11 -11
  139. package/dist/lib/tokenAliases.d.ts +11 -11
  140. package/dist/lib/tokenAliases.mjs +13 -88
  141. package/dist/lib/tokenAliases.mjs.map +1 -1
  142. package/dist/lib/useFloatingLayer.d.mts +25 -0
  143. package/dist/lib/useFloatingLayer.d.ts +25 -0
  144. package/dist/lib/useFloatingLayer.mjs +86 -0
  145. package/dist/lib/useFloatingLayer.mjs.map +1 -0
  146. package/dist/styles/icons.json +30 -1
  147. package/dist/styles/icons.json.mjs +34 -3
  148. package/dist/styles/icons.json.mjs.map +1 -1
  149. package/dist/styles/tokens.d.mts +179 -2485
  150. package/dist/styles/tokens.d.ts +179 -2485
  151. package/dist/styles/tokens.json +39 -563
  152. package/dist/styles/tokens.json.mjs +39 -563
  153. package/dist/styles/tokens.json.mjs.map +1 -1
  154. package/dist/tokens/index.js +39 -563
  155. package/dist/tokens/index.js.map +1 -1
  156. package/dist/tokens/index.mjs +39 -563
  157. package/dist/tokens/index.mjs.map +1 -1
  158. package/dist/tokens/styles/tokens.d.mts +179 -2485
  159. package/dist/tokens/styles/tokens.d.ts +179 -2485
  160. package/dist/tokens.css +41 -493
  161. package/dist/types/icons.d.mts +1 -1
  162. package/dist/types/icons.d.ts +1 -1
  163. package/dist/types/icons.mjs.map +1 -1
  164. package/package.json +2 -2
  165. package/dist/components/atoms/CategoryBadge/CategoryBadge.d.mts +0 -29
  166. package/dist/components/atoms/CategoryBadge/CategoryBadge.d.ts +0 -29
  167. package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs +0 -29
  168. package/dist/components/atoms/CategoryBadge/CategoryBadge.mjs.map +0 -1
  169. package/dist/components/atoms/CategoryBadge/index.d.mts +0 -2
  170. package/dist/components/atoms/CategoryBadge/index.d.ts +0 -2
  171. package/dist/components/atoms/Chip/BooleanChip.d.mts +0 -28
  172. package/dist/components/atoms/Chip/BooleanChip.d.ts +0 -28
  173. package/dist/components/atoms/Chip/BooleanChip.mjs +0 -76
  174. package/dist/components/atoms/Chip/BooleanChip.mjs.map +0 -1
  175. package/dist/components/atoms/StatusBadge/StatusBadge.d.mts +0 -24
  176. package/dist/components/atoms/StatusBadge/StatusBadge.d.ts +0 -24
  177. package/dist/components/atoms/StatusBadge/StatusBadge.mjs +0 -18
  178. package/dist/components/atoms/StatusBadge/StatusBadge.mjs.map +0 -1
  179. package/dist/components/atoms/StatusBadge/index.d.mts +0 -2
  180. package/dist/components/atoms/StatusBadge/index.d.ts +0 -2
  181. package/dist/components/molecules/PageTitle/PageTitle.d.mts +0 -21
  182. package/dist/components/molecules/PageTitle/PageTitle.d.ts +0 -21
  183. package/dist/components/molecules/PageTitle/PageTitle.mjs +0 -77
  184. package/dist/components/molecules/PageTitle/PageTitle.mjs.map +0 -1
  185. package/dist/components/molecules/PageTitle/index.d.mts +0 -1
  186. package/dist/components/molecules/PageTitle/index.d.ts +0 -1
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { createContext, useContext } from 'react';
3
+
4
+ var SidebarNavContext = /*#__PURE__*/createContext({
5
+ collapsed: false,
6
+ glide: false
7
+ });
8
+ var useSidebarNav = function useSidebarNav() {
9
+ return useContext(SidebarNavContext);
10
+ };
11
+
12
+ export { SidebarNavContext, useSidebarNav };
13
+ //# sourceMappingURL=SidebarNavContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarNavContext.mjs","sources":["../../../../src/components/molecules/SidebarNavItem/SidebarNavContext.ts"],"sourcesContent":["import { createContext, useContext, type ComponentType } from 'react'\n\n// What SidebarNav (#331) tells the rows and sections inside it. Outside a SidebarNav, the\n// defaults apply: expanded, plain links, and each row's own hover colour.\nexport interface SidebarNavContextValue {\n /** The nav is the icon rail: rows show their icon only */\n collapsed: boolean\n /** A router's link component for internal URLs, set once on SidebarNav (decision 0008) */\n linkComponent?: ComponentType<any> // eslint-disable-line @typescript-eslint/no-explicit-any\n /** SidebarNav draws one gliding hover highlight, so rows don't colour their own hover (0053) */\n glide: boolean\n /** Inside a SidebarNav, whose body is one list: a section is one of its items */\n inNav?: boolean\n}\n\nexport const SidebarNavContext = createContext<SidebarNavContextValue>({ collapsed: false, glide: false })\n\nexport const useSidebarNav = () => useContext(SidebarNavContext)\n"],"names":["SidebarNavContext","createContext","collapsed","glide","useSidebarNav","useContext"],"mappings":";;;AAeaA,IAAAA,iBAAiB,gBAAGC,aAAa,CAAyB;AAAEC,EAAAA,SAAS,EAAE,KAAK;AAAEC,EAAAA,KAAK,EAAE,KAAA;AAAK,CAAE,EAAC;IAE7FC,aAAa,GAAG,SAAhBA,aAAaA,GAAS;EAAA,OAAAC,UAAU,CAACL,iBAAiB,CAAC,CAAA;AAA7B;;;;"}
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import type { IconName } from '../../../types/icons.mjs';
3
+ export interface SidebarNavItemProps {
4
+ /** The item's label. In the rail it becomes the accessible name and shows in a Tooltip. */
5
+ label: string;
6
+ /** A leading icon. Items without one are hidden in the rail. */
7
+ icon?: IconName;
8
+ /**
9
+ * Where the item goes. With a `url` the item is a link (using SidebarNav's `linkComponent`
10
+ * for internal URLs, decision 0008); without one it's a button for `onClick`.
11
+ */
12
+ url?: string;
13
+ /** Called when the item is activated. Without a `url`, the item is a button. */
14
+ onClick?: (event: React.MouseEvent) => void;
15
+ /**
16
+ * The page the user is on: `aria-current="page"` and the light-blue selected treatment
17
+ * (decisions 0016, 0030).
18
+ * @default false
19
+ */
20
+ current?: boolean;
21
+ /** Quiet text at the end of the row, such as "3/10". Hidden in the rail. */
22
+ meta?: string;
23
+ /**
24
+ * New or unread items (decision 0045): a count, or `'dot'` for "something new". Shown as an
25
+ * accent Badge on the icon, so it stays visible in the rail, and added to the item's name.
26
+ */
27
+ badge?: number | 'dot';
28
+ /**
29
+ * How the badge reads in the item's name, such as "3 unread".
30
+ * @default "{count} new", or "new" for a dot
31
+ */
32
+ badgeLabel?: string;
33
+ /** Test identifier for the item's link or button */
34
+ 'data-testid'?: string;
35
+ }
36
+ /**
37
+ * One row of a SidebarNav (#327): a link to a page, or a button for an action such as "New chat".
38
+ * Renders an `li`, so it sits in SidebarNav's or a SidebarNavSection's list.
39
+ */
40
+ export declare const SidebarNavItem: {
41
+ ({ label, icon, url, onClick, current, meta, badge, badgeLabel, "data-testid": dataTestId, }: SidebarNavItemProps): import("react/jsx-runtime").JSX.Element | null;
42
+ displayName: string;
43
+ };
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import type { IconName } from '../../../types/icons';
3
+ export interface SidebarNavItemProps {
4
+ /** The item's label. In the rail it becomes the accessible name and shows in a Tooltip. */
5
+ label: string;
6
+ /** A leading icon. Items without one are hidden in the rail. */
7
+ icon?: IconName;
8
+ /**
9
+ * Where the item goes. With a `url` the item is a link (using SidebarNav's `linkComponent`
10
+ * for internal URLs, decision 0008); without one it's a button for `onClick`.
11
+ */
12
+ url?: string;
13
+ /** Called when the item is activated. Without a `url`, the item is a button. */
14
+ onClick?: (event: React.MouseEvent) => void;
15
+ /**
16
+ * The page the user is on: `aria-current="page"` and the light-blue selected treatment
17
+ * (decisions 0016, 0030).
18
+ * @default false
19
+ */
20
+ current?: boolean;
21
+ /** Quiet text at the end of the row, such as "3/10". Hidden in the rail. */
22
+ meta?: string;
23
+ /**
24
+ * New or unread items (decision 0045): a count, or `'dot'` for "something new". Shown as an
25
+ * accent Badge on the icon, so it stays visible in the rail, and added to the item's name.
26
+ */
27
+ badge?: number | 'dot';
28
+ /**
29
+ * How the badge reads in the item's name, such as "3 unread".
30
+ * @default "{count} new", or "new" for a dot
31
+ */
32
+ badgeLabel?: string;
33
+ /** Test identifier for the item's link or button */
34
+ 'data-testid'?: string;
35
+ }
36
+ /**
37
+ * One row of a SidebarNav (#327): a link to a page, or a button for an action such as "New chat".
38
+ * Renders an `li`, so it sits in SidebarNav's or a SidebarNavSection's list.
39
+ */
40
+ export declare const SidebarNavItem: {
41
+ ({ label, icon, url, onClick, current, meta, badge, badgeLabel, "data-testid": dataTestId, }: SidebarNavItemProps): import("react/jsx-runtime").JSX.Element | null;
42
+ displayName: string;
43
+ };
@@ -0,0 +1,148 @@
1
+ 'use client';
2
+ import { __makeTemplateObject, __assign } from '../../../vendor/tslib/tslib.es6.mjs';
3
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
+ import styled$module, { css } from 'styled-components';
5
+ const styled = styled$module.default || styled$module;
6
+ import tokens from '../../../lib/cssTokens.mjs';
7
+ import { interactiveRow } from '../../../lib/styleUtils.mjs';
8
+ import { Icon } from '../../atoms/Icon/Icon.mjs';
9
+ import { Tooltip } from '../../atoms/Tooltip/Tooltip.mjs';
10
+ import { Badge } from '../../atoms/Badge/Badge.mjs';
11
+ import { useSidebarNav } from './SidebarNavContext.mjs';
12
+
13
+ var semantic = tokens.semantic;
14
+ var space = semantic.space,
15
+ color = semantic.color,
16
+ motion = semantic.motion,
17
+ radius = semantic.radius,
18
+ size = semantic.size,
19
+ border = semantic.border,
20
+ typography = semantic.typography;
21
+ // Anything without a scheme (https:, mailto:) or a protocol-relative start is the app's own URL,
22
+ // relative ones included, so it goes through the router's link
23
+ var isInternalUrl = function isInternalUrl(url) {
24
+ return !/^[a-z][a-z\d+.-]*:/i.test(url) && !url.startsWith('//');
25
+ };
26
+ var Row = /*#__PURE__*/styled.a.withConfig({
27
+ shouldForwardProp: function shouldForwardProp(prop) {
28
+ return !prop.startsWith('$');
29
+ },
30
+ displayName: "SidebarNavItem__Row",
31
+ componentId: "sc-1nfqk5n-0"
32
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n /* The row's height is its token, with the content centred (as controls, 0034): vertical\n padding would hold a compact row above its 24px (0051) */\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030); the current page takes the light-blue selected ladder */\n ", "\n\n /* Inside SidebarNav one highlight glides to the hovered row, so an unselected row stays clear\n underneath it; pressed and selected rows keep their own fills (0053) */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n box-sizing: border-box;\n width: 100%;\n /* The row's height is its token, with the content centred (as controls, 0034): vertical\n padding would hold a compact row above its 24px (0051) */\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n font: ", ";\n color: ", ";\n text-align: left;\n text-decoration: none;\n cursor: pointer;\n transition: background-color ", " ", ",\n color ", " ", ";\n\n /* The shared row states (0030); the current page takes the light-blue selected ladder */\n ", "\n\n /* Inside SidebarNav one highlight glides to the hovered row, so an unselected row stays clear\n underneath it; pressed and selected rows keep their own fills (0053) */\n ", "\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n"])), space[200], size.row.sm, space.inset.sm, radius.sm, typography.small, color.text["default"], motion.duration.fast, motion.easing.decelerate, motion.duration.fast, motion.easing.decelerate, function (_a) {
33
+ var $current = _a.$current;
34
+ return interactiveRow({
35
+ selected: $current
36
+ });
37
+ }, function (_a) {
38
+ var $glide = _a.$glide,
39
+ $current = _a.$current;
40
+ return $glide && !$current && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:hover:not(:active) {\n background-color: transparent;\n }\n "], ["\n &:hover:not(:active) {\n background-color: transparent;\n }\n "])));
41
+ }, function (_a) {
42
+ var $collapsed = _a.$collapsed;
43
+ return $collapsed && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n justify-content: center;\n padding: 0 ", ";\n "], ["\n justify-content: center;\n padding: 0 ", ";\n "])), space.inset.xs);
44
+ }, border.focus, border.focusOffset);
45
+ var Label = /*#__PURE__*/styled.span.withConfig({
46
+ displayName: "SidebarNavItem__Label",
47
+ componentId: "sc-1nfqk5n-1"
48
+ })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"], ["\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
49
+ var Meta = /*#__PURE__*/styled.span.withConfig({
50
+ displayName: "SidebarNavItem__Meta",
51
+ componentId: "sc-1nfqk5n-2"
52
+ })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n"], ["\n flex-shrink: 0;\n font: ", ";\n color: ", ";\n"
53
+ // A badge needs something to sit on: the icon, or this mark at the end of an item without one
54
+ ])), typography.caption, color.text.muted);
55
+ // A badge needs something to sit on: the icon, or this mark at the end of an item without one
56
+ var BadgeAnchor = /*#__PURE__*/styled.span.withConfig({
57
+ displayName: "SidebarNavItem__BadgeAnchor",
58
+ componentId: "sc-1nfqk5n-3"
59
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: inline-flex;\n flex-shrink: 0;\n"], ["\n display: inline-flex;\n flex-shrink: 0;\n"
60
+ /**
61
+ * One row of a SidebarNav (#327): a link to a page, or a button for an action such as "New chat".
62
+ * Renders an `li`, so it sits in SidebarNav's or a SidebarNavSection's list.
63
+ */])));
64
+ /**
65
+ * One row of a SidebarNav (#327): a link to a page, or a button for an action such as "New chat".
66
+ * Renders an `li`, so it sits in SidebarNav's or a SidebarNavSection's list.
67
+ */
68
+ var SidebarNavItem = function SidebarNavItem(_a) {
69
+ var label = _a.label,
70
+ icon = _a.icon,
71
+ url = _a.url,
72
+ onClick = _a.onClick,
73
+ _b = _a.current,
74
+ current = _b === void 0 ? false : _b,
75
+ meta = _a.meta,
76
+ badge = _a.badge,
77
+ badgeLabel = _a.badgeLabel,
78
+ dataTestId = _a["data-testid"];
79
+ var _c = useSidebarNav(),
80
+ collapsed = _c.collapsed,
81
+ linkComponent = _c.linkComponent,
82
+ glide = _c.glide;
83
+ // The rail shows icons only: an item without one has nothing to show there
84
+ if (collapsed && !icon) return null;
85
+ var hasBadge = badge === 'dot' || typeof badge === 'number' && badge > 0;
86
+ var badgeText = badgeLabel !== null && badgeLabel !== void 0 ? badgeLabel : badge === 'dot' ? 'new' : "".concat(badge, " new");
87
+ // The badge's own text would make a noisy name, so a badged item is named outright; so is an
88
+ // item in the rail, where the label isn't shown
89
+ var name = hasBadge ? "".concat(label, ", ").concat(badgeText) : collapsed ? label : undefined;
90
+ var withBadge = function withBadge(anchor) {
91
+ return hasBadge ? jsx(Badge, {
92
+ variant: "accent",
93
+ dot: badge === 'dot',
94
+ count: typeof badge === 'number' ? badge : 0,
95
+ "aria-label": badgeText,
96
+ children: anchor
97
+ }) : anchor;
98
+ };
99
+ var content = jsxs(Fragment, {
100
+ children: [icon && withBadge(jsx(Icon, {
101
+ name: icon,
102
+ size: "md",
103
+ iconColor: "inherit"
104
+ })), !collapsed && jsxs(Fragment, {
105
+ children: [jsx(Label, {
106
+ children: label
107
+ }), meta && jsx(Meta, {
108
+ children: meta
109
+ }), !icon && hasBadge && withBadge(jsx(BadgeAnchor, {}))]
110
+ })]
111
+ });
112
+ var shared = {
113
+ $current: current,
114
+ $glide: glide,
115
+ $collapsed: collapsed,
116
+ // The icon is decorative (0028)
117
+ 'aria-label': name,
118
+ 'data-testid': dataTestId,
119
+ // SidebarNav's gliding highlight finds rows by this (0053)
120
+ 'data-sidebar-row': '',
121
+ onClick: onClick
122
+ };
123
+ var row = url ? jsx(Row, __assign({}, shared, linkComponent && isInternalUrl(url) ? {
124
+ as: linkComponent
125
+ } : {}, {
126
+ href: url,
127
+ "aria-current": current ? 'page' : undefined,
128
+ children: content
129
+ })) :
130
+ // aria-current="page" marks a link to the current page; a button isn't one
131
+ jsx(Row, __assign({}, shared, {
132
+ as: "button",
133
+ type: "button",
134
+ children: content
135
+ }));
136
+ return jsx("li", {
137
+ children: collapsed ? jsx(Tooltip, {
138
+ text: label,
139
+ side: "right",
140
+ children: row
141
+ }) : row
142
+ });
143
+ };
144
+ SidebarNavItem.displayName = 'SidebarNavItem';
145
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
146
+
147
+ export { SidebarNavItem };
148
+ //# sourceMappingURL=SidebarNavItem.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarNavItem.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { SidebarNavItem } from './SidebarNavItem.mjs';
2
+ export type { SidebarNavItemProps } from './SidebarNavItem.mjs';
@@ -0,0 +1,2 @@
1
+ export { SidebarNavItem } from './SidebarNavItem';
2
+ export type { SidebarNavItemProps } from './SidebarNavItem';
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export interface SidebarNavSectionProps {
3
+ /** The section's visible label, which also names its list */
4
+ label: string;
5
+ /** The section's `SidebarNavItem`s */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Whether the label is a disclosure button that shows and hides the items.
9
+ * @default false
10
+ */
11
+ collapsible?: boolean;
12
+ /** Whether the items are shown (controlled). Use with `onExpandedChange`. */
13
+ expanded?: boolean;
14
+ /**
15
+ * Whether the items start shown (uncontrolled).
16
+ * @default true
17
+ */
18
+ defaultExpanded?: boolean;
19
+ /** Called when a collapsible section is shown or hidden */
20
+ onExpandedChange?: (expanded: boolean) => void;
21
+ /**
22
+ * One action for the section, such as an IconButton for "New chat" or "Search". Hidden in the
23
+ * rail.
24
+ */
25
+ action?: React.ReactElement;
26
+ /** Test identifier for the section */
27
+ 'data-testid'?: string;
28
+ }
29
+ /**
30
+ * A labelled group of SidebarNavItems (#328), optionally collapsible, with one optional action.
31
+ * In the rail its label and action are hidden and a rule separates it from the section above.
32
+ */
33
+ export declare const SidebarNavSection: {
34
+ ({ label, children, collapsible, expanded: expandedProp, defaultExpanded, onExpandedChange, action, "data-testid": dataTestId, }: SidebarNavSectionProps): import("react/jsx-runtime").JSX.Element;
35
+ displayName: string;
36
+ };
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export interface SidebarNavSectionProps {
3
+ /** The section's visible label, which also names its list */
4
+ label: string;
5
+ /** The section's `SidebarNavItem`s */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Whether the label is a disclosure button that shows and hides the items.
9
+ * @default false
10
+ */
11
+ collapsible?: boolean;
12
+ /** Whether the items are shown (controlled). Use with `onExpandedChange`. */
13
+ expanded?: boolean;
14
+ /**
15
+ * Whether the items start shown (uncontrolled).
16
+ * @default true
17
+ */
18
+ defaultExpanded?: boolean;
19
+ /** Called when a collapsible section is shown or hidden */
20
+ onExpandedChange?: (expanded: boolean) => void;
21
+ /**
22
+ * One action for the section, such as an IconButton for "New chat" or "Search". Hidden in the
23
+ * rail.
24
+ */
25
+ action?: React.ReactElement;
26
+ /** Test identifier for the section */
27
+ 'data-testid'?: string;
28
+ }
29
+ /**
30
+ * A labelled group of SidebarNavItems (#328), optionally collapsible, with one optional action.
31
+ * In the rail its label and action are hidden and a rule separates it from the section above.
32
+ */
33
+ export declare const SidebarNavSection: {
34
+ ({ label, children, collapsible, expanded: expandedProp, defaultExpanded, onExpandedChange, action, "data-testid": dataTestId, }: SidebarNavSectionProps): import("react/jsx-runtime").JSX.Element;
35
+ displayName: string;
36
+ };
@@ -0,0 +1,188 @@
1
+ 'use client';
2
+ import { __makeTemplateObject } from '../../../vendor/tslib/tslib.es6.mjs';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { useId, useState, useEffect } from 'react';
5
+ import styled$module, { css } from 'styled-components';
6
+ const styled = styled$module.default || styled$module;
7
+ import tokens from '../../../lib/cssTokens.mjs';
8
+ import tokensJson from '../../../styles/tokens.json.mjs';
9
+ import { visuallyHidden, interactiveRow, reducedMotion } from '../../../lib/styleUtils.mjs';
10
+ import { Icon } from '../../atoms/Icon/Icon.mjs';
11
+ import { useSidebarNav } from '../SidebarNavItem/SidebarNavContext.mjs';
12
+
13
+ // How long the items take to show or hide: the clip lifts after this even if no transition ran
14
+ // (reduced motion, or a background tab)
15
+ var COLLAPSE_MS = parseInt(tokensJson.semantic.motion.duration.moderate, 10);
16
+ var semantic = tokens.semantic;
17
+ var space = semantic.space,
18
+ color = semantic.color,
19
+ motion = semantic.motion,
20
+ radius = semantic.radius,
21
+ size = semantic.size,
22
+ border = semantic.border,
23
+ typography = semantic.typography;
24
+ var Section = /*#__PURE__*/styled.div.withConfig({
25
+ shouldForwardProp: function shouldForwardProp(prop) {
26
+ return !prop.startsWith('$');
27
+ },
28
+ displayName: "SidebarNavSection__Section",
29
+ componentId: "sc-16cbmnb-0"
30
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* In the rail there's no label, so a rule separates sections */\n ", "\n"], ["\n /* In the rail there's no label, so a rule separates sections */\n ", "\n"])), function (_a) {
31
+ var $collapsed = _a.$collapsed;
32
+ return $collapsed && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: ", ";\n padding-top: ", ";\n margin-top: ", ";\n\n /* Nothing above to separate it from */\n &:first-child {\n border-top: none;\n padding-top: 0;\n margin-top: 0;\n }\n "], ["\n border-top: ", ";\n padding-top: ", ";\n margin-top: ", ";\n\n /* Nothing above to separate it from */\n &:first-child {\n border-top: none;\n padding-top: 0;\n margin-top: 0;\n }\n "])), border["default"], space[100], space[100]);
33
+ });
34
+ var Header = /*#__PURE__*/styled.div.withConfig({
35
+ displayName: "SidebarNavSection__Header",
36
+ componentId: "sc-16cbmnb-1"
37
+ })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"], ["\n display: flex;\n align-items: center;\n gap: ", ";\n min-height: ", ";\n"
38
+ // The label's look: quiet, small and muted, so the items lead
39
+ ])), space[100], size.row.sm);
40
+ // The label's look: quiet, small and muted, so the items lead
41
+ var labelText = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography.caption, color.text.muted);
42
+ var StaticLabel = /*#__PURE__*/styled.div.withConfig({
43
+ displayName: "SidebarNavSection__StaticLabel",
44
+ componentId: "sc-16cbmnb-2"
45
+ })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n flex: 1;\n min-width: 0;\n padding: 0 ", ";\n"], ["\n ", "\n flex: 1;\n min-width: 0;\n padding: 0 ", ";\n"])), labelText, space.inset.sm);
46
+ var HiddenLabel = /*#__PURE__*/styled.div.withConfig({
47
+ displayName: "SidebarNavSection__HiddenLabel",
48
+ componentId: "sc-16cbmnb-3"
49
+ })(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), visuallyHidden);
50
+ var Disclosure = /*#__PURE__*/styled.button.withConfig({
51
+ shouldForwardProp: function shouldForwardProp(prop) {
52
+ return !prop.startsWith('$');
53
+ },
54
+ displayName: "SidebarNavSection__Disclosure",
55
+ componentId: "sc-16cbmnb-4"
56
+ })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n display: flex;\n align-items: center;\n gap: ", ";\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n\n /* The caret points down when shown and right when hidden */\n & > span:first-child {\n transition: transform ", " ", ";\n transform: rotate(", ");\n }\n\n ", " {\n & > span:first-child {\n transition: none;\n }\n }\n"], ["\n ", "\n display: flex;\n align-items: center;\n gap: ", ";\n flex: 1;\n min-width: 0;\n box-sizing: border-box;\n min-height: ", ";\n padding: 0 ", ";\n border: none;\n border-radius: ", ";\n background: none;\n text-align: left;\n cursor: pointer;\n transition: background-color ", " ", ";\n\n ", "\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: ", ";\n outline-offset: calc(-1 * ", ");\n }\n\n /* The caret points down when shown and right when hidden */\n & > span:first-child {\n transition: transform ", " ", ";\n transform: rotate(", ");\n }\n\n ", " {\n & > span:first-child {\n transition: none;\n }\n }\n"
57
+ // The items' height animates from nothing to their own height with grid rows, so no
58
+ // "no limit" max-height is needed. Once hidden, the items leave the keyboard and screen readers.
59
+ ])), labelText, space[100], size.row.sm, space.inset.sm, radius.sm, motion.duration.fast, motion.easing.decelerate, interactiveRow(), border.focus, border.focusOffset, motion.duration.fast, motion.easing.standard, function (_a) {
60
+ var $expanded = _a.$expanded;
61
+ return $expanded ? '0deg' : '-90deg';
62
+ }, reducedMotion);
63
+ // The items' height animates from nothing to their own height with grid rows, so no
64
+ // "no limit" max-height is needed. Once hidden, the items leave the keyboard and screen readers.
65
+ var Collapse = /*#__PURE__*/styled.div.withConfig({
66
+ shouldForwardProp: function shouldForwardProp(prop) {
67
+ return !prop.startsWith('$');
68
+ },
69
+ displayName: "SidebarNavSection__Collapse",
70
+ componentId: "sc-16cbmnb-5"
71
+ })(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: grid;\n grid-template-rows: ", ";\n visibility: ", ";\n transition: grid-template-rows ", " ", ",\n visibility ", " ", ";\n\n ", " {\n transition: none;\n }\n"], ["\n display: grid;\n grid-template-rows: ", ";\n visibility: ", ";\n transition: grid-template-rows ", " ", ",\n visibility ", " ", ";\n\n ", " {\n transition: none;\n }\n"
72
+ // Clipped only while hidden or moving: once shown, an item's Badge can overhang its row
73
+ ])), function (_a) {
74
+ var $expanded = _a.$expanded;
75
+ return $expanded ? '1fr' : '0fr';
76
+ }, function (_a) {
77
+ var $expanded = _a.$expanded;
78
+ return $expanded ? 'visible' : 'hidden';
79
+ }, motion.duration.moderate, motion.easing.standard, motion.duration.moderate, motion.easing.standard, reducedMotion);
80
+ // Clipped only while hidden or moving: once shown, an item's Badge can overhang its row
81
+ var List = /*#__PURE__*/styled.ul.withConfig({
82
+ shouldForwardProp: function shouldForwardProp(prop) {
83
+ return !prop.startsWith('$');
84
+ },
85
+ displayName: "SidebarNavSection__List",
86
+ componentId: "sc-16cbmnb-6"
87
+ })(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n min-height: 0;\n overflow: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"], ["\n min-height: 0;\n overflow: ", ";\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n"
88
+ /**
89
+ * A labelled group of SidebarNavItems (#328), optionally collapsible, with one optional action.
90
+ * In the rail its label and action are hidden and a rule separates it from the section above.
91
+ */])), function (_a) {
92
+ var $clip = _a.$clip;
93
+ return $clip ? 'hidden' : 'visible';
94
+ });
95
+ /**
96
+ * A labelled group of SidebarNavItems (#328), optionally collapsible, with one optional action.
97
+ * In the rail its label and action are hidden and a rule separates it from the section above.
98
+ */
99
+ var SidebarNavSection = function SidebarNavSection(_a) {
100
+ var label = _a.label,
101
+ children = _a.children,
102
+ _b = _a.collapsible,
103
+ collapsible = _b === void 0 ? false : _b,
104
+ expandedProp = _a.expanded,
105
+ _c = _a.defaultExpanded,
106
+ defaultExpanded = _c === void 0 ? true : _c,
107
+ onExpandedChange = _a.onExpandedChange,
108
+ action = _a.action,
109
+ dataTestId = _a["data-testid"];
110
+ var _d = useSidebarNav(),
111
+ collapsed = _d.collapsed,
112
+ inNav = _d.inNav;
113
+ var labelId = useId();
114
+ var listId = useId();
115
+ var _e = useState(defaultExpanded),
116
+ uncontrolledExpanded = _e[0],
117
+ setUncontrolledExpanded = _e[1];
118
+ var _f = useState(false),
119
+ animating = _f[0],
120
+ setAnimating = _f[1];
121
+ var isControlled = expandedProp !== undefined;
122
+ var userExpanded = isControlled ? expandedProp : uncontrolledExpanded;
123
+ // The rail has no disclosure button, so a section always shows its items there
124
+ var expanded = !collapsible || collapsed || userExpanded;
125
+ useEffect(function () {
126
+ if (!animating) return;
127
+ var timer = setTimeout(function () {
128
+ return setAnimating(false);
129
+ }, COLLAPSE_MS);
130
+ return function () {
131
+ return clearTimeout(timer);
132
+ };
133
+ }, [animating]);
134
+ var toggle = function toggle() {
135
+ var next = !expanded;
136
+ setAnimating(true);
137
+ if (!isControlled) setUncontrolledExpanded(next);
138
+ onExpandedChange === null || onExpandedChange === void 0 ? void 0 : onExpandedChange(next);
139
+ };
140
+ var header = collapsed ?
141
+ // The rail shows no label, but the list keeps its name
142
+ jsx(HiddenLabel, {
143
+ id: labelId,
144
+ children: label
145
+ }) : jsxs(Header, {
146
+ children: [collapsible ? jsxs(Disclosure, {
147
+ type: "button",
148
+ id: labelId,
149
+ "aria-expanded": expanded,
150
+ "aria-controls": listId,
151
+ "$expanded": expanded,
152
+ onClick: toggle,
153
+ children: [jsx(Icon, {
154
+ name: "caretDown",
155
+ size: "sm",
156
+ iconColor: "inherit"
157
+ }), label]
158
+ }) : jsx(StaticLabel, {
159
+ id: labelId,
160
+ children: label
161
+ }), action]
162
+ });
163
+ return (
164
+ // In a SidebarNav the body is one list, so the section is one of its items
165
+ jsxs(Section, {
166
+ as: inNav ? 'li' : 'div',
167
+ "$collapsed": collapsed,
168
+ "data-testid": dataTestId,
169
+ children: [header, jsx(Collapse, {
170
+ "$expanded": expanded,
171
+ onTransitionEnd: function onTransitionEnd(event) {
172
+ if (event.target === event.currentTarget && event.propertyName === 'grid-template-rows') setAnimating(false);
173
+ },
174
+ children: jsx(List, {
175
+ id: listId,
176
+ "aria-labelledby": labelId,
177
+ "$clip": !expanded || animating,
178
+ children: children
179
+ })
180
+ })]
181
+ })
182
+ );
183
+ };
184
+ SidebarNavSection.displayName = 'SidebarNavSection';
185
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
186
+
187
+ export { SidebarNavSection };
188
+ //# sourceMappingURL=SidebarNavSection.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarNavSection.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { SidebarNavSection } from './SidebarNavSection.mjs';
2
+ export type { SidebarNavSectionProps } from './SidebarNavSection.mjs';
@@ -0,0 +1,2 @@
1
+ export { SidebarNavSection } from './SidebarNavSection';
2
+ export type { SidebarNavSectionProps } from './SidebarNavSection';
@@ -1,9 +1,3 @@
1
- /**
2
- * Tab variant options for TabBar.
3
- * @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
4
- * as `underline`. The type is removed in 3.0.
5
- */
6
- export type TabVariant = 'default' | 'pills' | 'underline';
7
1
  /**
8
2
  * Individual tab configuration
9
3
  */
@@ -42,13 +36,6 @@ export interface TabBarProps {
42
36
  * Callback when tab changes
43
37
  */
44
38
  onTabChange: (tabId: string) => void;
45
- /**
46
- * Visual variant of the tabs.
47
- * @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
48
- * as `underline`. Remove the prop; it is removed in 3.0.
49
- * @default 'underline'
50
- */
51
- variant?: TabVariant;
52
39
  /**
53
40
  * Accessible label for the tab list
54
41
  */
@@ -1,9 +1,3 @@
1
- /**
2
- * Tab variant options for TabBar.
3
- * @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
4
- * as `underline`. The type is removed in 3.0.
5
- */
6
- export type TabVariant = 'default' | 'pills' | 'underline';
7
1
  /**
8
2
  * Individual tab configuration
9
3
  */
@@ -42,13 +36,6 @@ export interface TabBarProps {
42
36
  * Callback when tab changes
43
37
  */
44
38
  onTabChange: (tabId: string) => void;
45
- /**
46
- * Visual variant of the tabs.
47
- * @deprecated TabBar has one look, `underline` (decision 0020). `'default'` and `'pills'` render
48
- * as `underline`. Remove the prop; it is removed in 3.0.
49
- * @default 'underline'
50
- */
51
- variant?: TabVariant;
52
39
  /**
53
40
  * Accessible label for the tab list
54
41
  */
@@ -88,10 +88,8 @@ var StyledBadge = /*#__PURE__*/styled.span.withConfig({
88
88
  var TabBar = function TabBar(_a) {
89
89
  var tabs = _a.tabs,
90
90
  activeTab = _a.activeTab,
91
- onTabChange = _a.onTabChange;
92
- // Deprecated: every variant renders as underline (decision 0020)
93
- _a.variant;
94
- var _b = _a["aria-label"],
91
+ onTabChange = _a.onTabChange,
92
+ _b = _a["aria-label"],
95
93
  ariaLabel = _b === void 0 ? 'Tab navigation' : _b,
96
94
  dataTestId = _a["data-testid"];
97
95
  var tabRefs = useRef([]);
@@ -1,2 +1,2 @@
1
1
  export { TabBar } from './TabBar.mjs';
2
- export type { TabBarProps, Tab, TabVariant } from './TabBar.mjs';
2
+ export type { TabBarProps, Tab } from './TabBar.mjs';
@@ -1,2 +1,2 @@
1
1
  export { TabBar } from './TabBar';
2
- export type { TabBarProps, Tab, TabVariant } from './TabBar';
2
+ export type { TabBarProps, Tab } from './TabBar';
@@ -16,7 +16,7 @@ import { interactiveRow } from '../../../lib/styleUtils.mjs';
16
16
  var StyledContainer = /*#__PURE__*/styled.div.withConfig({
17
17
  displayName: "TransactionListItem__StyledContainer",
18
18
  componentId: "sc-7yunm0-0"
19
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n /* A clickable row uses the shared row states (decision 0030) */\n ", "\n"], ["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", " ", ";\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n /* A clickable row uses the shared row states (decision 0030) */\n ", "\n"])), tokens.component.transactionListItem.minHeight, tokens.semantic.space[300], tokens.semantic.space[300], tokens.semantic.surface.base, tokens.semantic.border.width.thin, tokens.semantic.color.border["default"], tokens.semantic.space[300], tokens.semantic.motion.duration.moderate, tokens.semantic.motion.easing.decelerate, function (_a) {
19
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", "; /* follows density with the row's height (decision 0051) */\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n /* A clickable row uses the shared row states (decision 0030) */\n ", "\n"], ["\n display: flex;\n align-items: center;\n min-height: ", ";\n padding: ", "; /* follows density with the row's height (decision 0051) */\n background-color: ", ";\n border-bottom: ", " solid ", ";\n gap: ", ";\n transition: background-color ", " ", ";\n \n /* A clickable row uses the shared row states (decision 0030) */\n ", "\n"])), tokens.semantic.size.row.lg, tokens.semantic.space.inset.md, tokens.semantic.surface.base, tokens.semantic.border.width.thin, tokens.semantic.color.border["default"], tokens.semantic.space[300], tokens.semantic.motion.duration.moderate, tokens.semantic.motion.easing.decelerate, function (_a) {
20
20
  var $clickable = _a.$clickable;
21
21
  return $clickable && "\n cursor: pointer;\n ".concat(interactiveRow(), "\n \n &:focus-visible {\n outline: ").concat(tokens.semantic.border.focus, ";\n outline-offset: calc(-1 * ").concat(tokens.semantic.border.focusOffset, ");\n }\n ");
22
22
  });