@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
package/dist/data.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sources":["../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\n\n// The published types come from the generated `src/styles/tokens.ts`, which carries each token's\n// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the\n// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can\n// only resolve with `resolveJsonModule`.\nexport const tokens: Tokens = tokensJson\n\nexport type { Tokens }\nexport type TokensBase = Tokens['base']\nexport type TokensSemantic = Tokens['semantic']\nexport type TokensComponent = Tokens['component']\n","// Icon type definitions for external consumption\n// This is a self-contained type that doesn't depend on JSON imports\n// to ensure it works correctly in consuming projects\n\nimport iconsJson from '../styles/icons.json'\n\nexport type IconName =\n | 'add'\n | 'ai'\n | 'addRing'\n | 'arrowDown'\n | 'arrowLeft'\n | 'arrowRight'\n | 'arrowUp'\n | 'back'\n | 'bell'\n | 'cancel'\n | 'caret'\n | 'caretDown'\n | 'caretUp'\n | 'check'\n | 'checkRing'\n | 'close'\n | 'copy'\n | 'creditCard'\n | 'crossCircle'\n | 'directionRight'\n | 'directionUp'\n | 'edit'\n | 'export'\n | 'fileDocSearch'\n | 'filter'\n | 'info'\n | 'kebab'\n | 'lamp'\n | 'lineOut'\n | 'link'\n | 'meatballs'\n | 'menu'\n | 'message'\n | 'move'\n | 'mic'\n | 'order'\n | 'paper'\n | 'pause'\n | 'play'\n | 'playBack'\n | 'refresh'\n | 'remove'\n | 'search'\n | 'star'\n | 'starFilled'\n | 'statusCancelled'\n | 'statusError'\n | 'statusInProgress'\n | 'statusInfo'\n | 'statusNotStarted'\n | 'statusPending'\n | 'statusScheduled'\n | 'statusSerious'\n | 'statusSuccess'\n | 'statusWarning'\n | 'stop'\n | 'table'\n | 'trash'\n | 'userBox'\n | 'view'\n | 'viewHide'\n | 'wallet'\n\n/** Semantic category for grouping icons by purpose */\nexport type IconCategory =\n | 'action'\n | 'communication'\n | 'content'\n | 'feedback'\n | 'media'\n | 'navigation'\n | 'object'\n | 'status'\n | 'user'\n\n/** Enriched metadata for each icon entry in icons.json */\nexport interface IconMetadata {\n /** SVG path data */\n path: string\n /** Display name of the icon */\n name: string\n /** What the icon visually depicts */\n description: string\n /** Semantic category for grouping */\n category: IconCategory\n /** Alternative names and search terms */\n aliases: string[]\n /** When and why to use this icon */\n intent: string\n /** Whether the icon is typically decorative (true) or informative (false) */\n decorativeDefault: boolean\n /** Suggested accessible label when the icon conveys meaning */\n ariaLabelDefault: string\n}\n\n/** The full icon registry keyed by IconName */\nexport type IconRegistry = Record<IconName, IconMetadata>\n\n// Typed as IconRegistry so emitted .d.ts files don't import JSON (needs `resolveJsonModule` in consumers).\nexport const iconsData = iconsJson as IconRegistry\n"],"names":["tokens","tokensJson","iconsData","iconsJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACO,IAAMA,MAAM,GAAWC;;ACP9B;AACA;AACA;AAuGA;AACO,IAAMC,SAAS,GAAGC;;;;;;;"}
1
+ {"version":3,"file":"data.js","sources":["../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\n\n// The published types come from the generated `src/styles/tokens.ts`, which carries each token's\n// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the\n// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can\n// only resolve with `resolveJsonModule`.\nexport const tokens: Tokens = tokensJson\n\nexport type { Tokens }\nexport type TokensBase = Tokens['base']\nexport type TokensSemantic = Tokens['semantic']\nexport type TokensComponent = Tokens['component']\n","// Icon type definitions for external consumption\n// This is a self-contained type that doesn't depend on JSON imports\n// to ensure it works correctly in consuming projects\n\nimport iconsJson from '../styles/icons.json'\n\nexport type IconName =\n | 'add'\n | 'ai'\n | 'addRing'\n | 'arrowDown'\n | 'arrowLeft'\n | 'arrowRight'\n | 'arrowUp'\n | 'back'\n | 'bell'\n | 'cancel'\n | 'caret'\n | 'caretDown'\n | 'caretUp'\n | 'check'\n | 'checkRing'\n | 'close'\n | 'copy'\n | 'creditCard'\n | 'crossCircle'\n | 'directionRight'\n | 'directionUp'\n | 'edit'\n | 'export'\n | 'fileDocSearch'\n | 'filter'\n | 'home'\n | 'info'\n | 'kebab'\n | 'lamp'\n | 'lineOut'\n | 'link'\n | 'meatballs'\n | 'menu'\n | 'message'\n | 'move'\n | 'mic'\n | 'order'\n | 'paper'\n | 'pause'\n | 'play'\n | 'playBack'\n | 'refresh'\n | 'remove'\n | 'search'\n | 'sidebar'\n | 'star'\n | 'starFilled'\n | 'statusCancelled'\n | 'statusError'\n | 'statusInProgress'\n | 'statusInfo'\n | 'statusNotStarted'\n | 'statusPending'\n | 'statusScheduled'\n | 'statusSerious'\n | 'statusSuccess'\n | 'statusWarning'\n | 'stop'\n | 'table'\n | 'trash'\n | 'userBox'\n | 'view'\n | 'viewHide'\n | 'wallet'\n\n/** Semantic category for grouping icons by purpose */\nexport type IconCategory =\n | 'action'\n | 'communication'\n | 'content'\n | 'feedback'\n | 'media'\n | 'navigation'\n | 'object'\n | 'status'\n | 'user'\n\n/** Enriched metadata for each icon entry in icons.json */\nexport interface IconMetadata {\n /** SVG path data */\n path: string\n /** Display name of the icon */\n name: string\n /** What the icon visually depicts */\n description: string\n /** Semantic category for grouping */\n category: IconCategory\n /** Alternative names and search terms */\n aliases: string[]\n /** When and why to use this icon */\n intent: string\n /** Whether the icon is typically decorative (true) or informative (false) */\n decorativeDefault: boolean\n /** Suggested accessible label when the icon conveys meaning */\n ariaLabelDefault: string\n}\n\n/** The full icon registry keyed by IconName */\nexport type IconRegistry = Record<IconName, IconMetadata>\n\n// Typed as IconRegistry so emitted .d.ts files don't import JSON (needs `resolveJsonModule` in consumers).\nexport const iconsData = iconsJson as IconRegistry\n"],"names":["tokens","tokensJson","iconsData","iconsJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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client.AgentInput;
17
17
  exports.Alert = client.Alert;
18
18
  exports.Avatar = client.Avatar;
19
19
  exports.Badge = client.Badge;
20
- exports.BooleanChip = client.BooleanChip;
21
20
  exports.Box = client.Box;
22
21
  exports.Breadcrumbs = client.Breadcrumbs;
23
22
  exports.Button = client.Button;
24
23
  exports.CardLarge = client.CardLarge;
25
24
  exports.CardSmall = client.CardSmall;
26
- exports.CategoryBadge = client.CategoryBadge;
27
25
  exports.CategoryLabel = client.CategoryLabel;
28
26
  exports.Checkbox = client.Checkbox;
29
27
  exports.Chip = client.Chip;
@@ -43,22 +41,28 @@ exports.Icon = client.Icon;
43
41
  exports.IconButton = client.IconButton;
44
42
  exports.InlineAlert = client.InlineAlert;
45
43
  exports.InputChip = client.InputChip;
46
- exports.LegacyChip = client.LegacyChip;
47
44
  exports.List = client.List;
48
45
  exports.ListItem = client.ListItem;
46
+ exports.Menu = client.Menu;
47
+ exports.MenuDivider = client.MenuDivider;
48
+ exports.MenuGroup = client.MenuGroup;
49
+ exports.MenuItem = client.MenuItem;
50
+ exports.MenuItemCheckbox = client.MenuItemCheckbox;
51
+ exports.MenuItemRadio = client.MenuItemRadio;
49
52
  exports.Modal = client.Modal;
50
53
  exports.MoneyDisplay = client.MoneyDisplay;
51
54
  exports.NumberInput = client.NumberInput;
52
- exports.PageTitle = client.PageTitle;
53
55
  exports.PasswordField = client.PasswordField;
54
56
  exports.Picture = client.Picture;
55
57
  exports.ProgressBar = client.ProgressBar;
56
58
  exports.ResponsiveGrid = client.ResponsiveGrid;
57
59
  exports.SearchField = client.SearchField;
58
60
  exports.Sheet = client.Sheet;
61
+ exports.SidebarNav = client.SidebarNav;
62
+ exports.SidebarNavItem = client.SidebarNavItem;
63
+ exports.SidebarNavSection = client.SidebarNavSection;
59
64
  exports.Slider = client.Slider;
60
65
  exports.Stack = client.Stack;
61
- exports.StatusBadge = client.StatusBadge;
62
66
  exports.StatusLabel = client.StatusLabel;
63
67
  exports.StyledInputBase = client.StyledInputBase;
64
68
  exports.StyledTextAreaBase = client.StyledTextAreaBase;
@@ -66,8 +70,10 @@ exports.SuggestionChip = client.SuggestionChip;
66
70
  exports.TabBar = client.TabBar;
67
71
  exports.Tag = client.Tag;
68
72
  exports.TextField = client.TextField;
73
+ exports.Tooltip = client.Tooltip;
69
74
  exports.TransactionListItem = client.TransactionListItem;
70
75
  exports.Typography = client.Typography;
76
+ exports.WorkspaceSwitcher = client.WorkspaceSwitcher;
71
77
  exports.iconsData = data.iconsData;
72
78
  exports.tokens = data.tokens;
73
79
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.mjs CHANGED
@@ -2,12 +2,10 @@ export { Avatar } from './components/atoms/Avatar/Avatar.mjs';
2
2
  export { Badge } from './components/atoms/Badge/Badge.mjs';
3
3
  export { Box } from './components/atoms/Box/Box.mjs';
4
4
  export { Button } from './components/atoms/Button/Button.mjs';
5
- export { CategoryBadge } from './components/atoms/CategoryBadge/CategoryBadge.mjs';
6
5
  export { CategoryLabel } from './components/atoms/CategoryLabel/CategoryLabel.mjs';
7
- export { Chip, LegacyChip } from './components/atoms/Chip/Chip.mjs';
6
+ export { Chip } from './components/atoms/Chip/Chip.mjs';
8
7
  export { InputChip } from './components/atoms/Chip/InputChip.mjs';
9
8
  export { FilterChip } from './components/atoms/Chip/FilterChip.mjs';
10
- export { BooleanChip } from './components/atoms/Chip/BooleanChip.mjs';
11
9
  export { SuggestionChip } from './components/atoms/Chip/SuggestionChip.mjs';
12
10
  export { Container } from './components/atoms/Container/Container.mjs';
13
11
  export { Picture } from './components/atoms/Picture/Picture.mjs';
@@ -18,9 +16,9 @@ export { MoneyDisplay } from './components/atoms/MoneyDisplay/MoneyDisplay.mjs';
18
16
  export { ProgressBar } from './components/atoms/ProgressBar/ProgressBar.mjs';
19
17
  export { Divider } from './components/atoms/Divider/Divider.mjs';
20
18
  export { Stack } from './components/atoms/Stack/Stack.mjs';
21
- export { StatusBadge } from './components/atoms/StatusBadge/StatusBadge.mjs';
22
19
  export { StatusLabel } from './components/atoms/StatusLabel/StatusLabel.mjs';
23
20
  export { Tag } from './components/atoms/Tag/Tag.mjs';
21
+ export { Tooltip } from './components/atoms/Tooltip/Tooltip.mjs';
24
22
  export { Typography } from './components/atoms/Typography/Typography.mjs';
25
23
  export { AILabel } from './components/atoms/AILabel/AILabel.mjs';
26
24
  export { AccountCard } from './components/molecules/AccountCard/AccountCard.mjs';
@@ -40,9 +38,11 @@ export { FeatureBlock } from './components/molecules/FeatureBlock/FeatureBlock.m
40
38
  export { Dropdown } from './components/molecules/Dropdown/Dropdown.mjs';
41
39
  export { List } from './components/molecules/List/List.mjs';
42
40
  export { ListItem } from './components/molecules/List/ListItem.mjs';
41
+ export { Menu, MenuDivider, MenuGroup, MenuItem, MenuItemCheckbox, MenuItemRadio } from './components/molecules/Menu/Menu.mjs';
42
+ export { SidebarNavItem } from './components/molecules/SidebarNavItem/SidebarNavItem.mjs';
43
+ export { SidebarNavSection } from './components/molecules/SidebarNavSection/SidebarNavSection.mjs';
43
44
  export { Modal } from './components/molecules/Modal/Modal.mjs';
44
45
  export { NumberInput } from './components/molecules/NumberInput/NumberInput.mjs';
45
- export { PageTitle } from './components/molecules/PageTitle/PageTitle.mjs';
46
46
  export { PasswordField } from './components/molecules/PasswordField/PasswordField.mjs';
47
47
  export { SearchField } from './components/molecules/SearchField/SearchField.mjs';
48
48
  export { Sheet } from './components/molecules/Sheet/Sheet.mjs';
@@ -51,6 +51,8 @@ export { TabBar } from './components/molecules/TabBar/TabBar.mjs';
51
51
  export { TextField } from './components/molecules/TextField/TextField.mjs';
52
52
  export { StyledInputBase, StyledTextAreaBase } from './components/molecules/TextField/InputBase.mjs';
53
53
  export { TransactionListItem } from './components/molecules/TransactionListItem/TransactionListItem.mjs';
54
+ export { WorkspaceSwitcher } from './components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs';
55
+ export { SidebarNav } from './components/organisms/SidebarNav/SidebarNav.mjs';
54
56
  export { Grid, GridCol, ResponsiveGrid } from './components/layout/GridSystem/GridSystem.mjs';
55
57
  export { tokens } from './types/tokens.mjs';
56
58
  export { iconsData } from './types/icons.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,43 @@
1
+ export type FloatingSide = 'top' | 'right' | 'bottom' | 'left';
2
+ export type FloatingAlign = 'start' | 'center' | 'end';
3
+ export interface FloatingRect {
4
+ top: number;
5
+ left: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface FloatingOptions {
10
+ /** The anchor's box, from getBoundingClientRect */
11
+ anchor: FloatingRect;
12
+ /** The floating element's size */
13
+ floating: {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ /** The side to place it on; it flips to the opposite side when that has more room */
18
+ side: FloatingSide;
19
+ /** Where it lines up along the anchor's edge */
20
+ align: FloatingAlign;
21
+ /** The gap between the anchor and the floating element, in px */
22
+ offset: number;
23
+ /** The viewport's size */
24
+ viewport: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ /** The smallest distance kept from the viewport's edges, in px */
29
+ margin: number;
30
+ }
31
+ export interface FloatingPosition {
32
+ top: number;
33
+ left: number;
34
+ /** The side it ended up on, after any flip */
35
+ side: FloatingSide;
36
+ }
37
+ export declare function placeFloating(options: FloatingOptions): FloatingPosition;
38
+ /**
39
+ * The element that actually has a box inside a wrapper: Tooltip and Menu wrap their trigger in a
40
+ * `display: contents` span, and a trigger can be nested in more than one (a Tooltip inside a Menu's
41
+ * trigger), so this steps down until it finds an element that lays out.
42
+ */
43
+ export declare function laidOutElement(wrapper: Element | null): Element | null;
@@ -0,0 +1,43 @@
1
+ export type FloatingSide = 'top' | 'right' | 'bottom' | 'left';
2
+ export type FloatingAlign = 'start' | 'center' | 'end';
3
+ export interface FloatingRect {
4
+ top: number;
5
+ left: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface FloatingOptions {
10
+ /** The anchor's box, from getBoundingClientRect */
11
+ anchor: FloatingRect;
12
+ /** The floating element's size */
13
+ floating: {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ /** The side to place it on; it flips to the opposite side when that has more room */
18
+ side: FloatingSide;
19
+ /** Where it lines up along the anchor's edge */
20
+ align: FloatingAlign;
21
+ /** The gap between the anchor and the floating element, in px */
22
+ offset: number;
23
+ /** The viewport's size */
24
+ viewport: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ /** The smallest distance kept from the viewport's edges, in px */
29
+ margin: number;
30
+ }
31
+ export interface FloatingPosition {
32
+ top: number;
33
+ left: number;
34
+ /** The side it ended up on, after any flip */
35
+ side: FloatingSide;
36
+ }
37
+ export declare function placeFloating(options: FloatingOptions): FloatingPosition;
38
+ /**
39
+ * The element that actually has a box inside a wrapper: Tooltip and Menu wrap their trigger in a
40
+ * `display: contents` span, and a trigger can be nested in more than one (a Tooltip inside a Menu's
41
+ * trigger), so this steps down until it finds an element that lays out.
42
+ */
43
+ export declare function laidOutElement(wrapper: Element | null): Element | null;
@@ -0,0 +1,86 @@
1
+ 'use client';
2
+ // Places a floating element (Tooltip, Menu) next to its anchor, without a positioning library
3
+ // (P8). Pure geometry, so it can be tested without a browser: the caller measures both elements
4
+ // and applies the result as `top` and `left` on a `position: fixed` element.
5
+ var opposite = {
6
+ top: 'bottom',
7
+ bottom: 'top',
8
+ left: 'right',
9
+ right: 'left'
10
+ };
11
+ // The room between the anchor and the viewport edge on each side
12
+ var room = function room(side, _a) {
13
+ var anchor = _a.anchor,
14
+ viewport = _a.viewport,
15
+ margin = _a.margin;
16
+ switch (side) {
17
+ case 'top':
18
+ return anchor.top - margin;
19
+ case 'bottom':
20
+ return viewport.height - (anchor.top + anchor.height) - margin;
21
+ case 'left':
22
+ return anchor.left - margin;
23
+ case 'right':
24
+ return viewport.width - (anchor.left + anchor.width) - margin;
25
+ }
26
+ };
27
+ var clamp = function clamp(value, min, max) {
28
+ return Math.max(min, Math.min(value, max));
29
+ };
30
+ function placeFloating(options) {
31
+ var anchor = options.anchor,
32
+ floating = options.floating,
33
+ align = options.align,
34
+ offset = options.offset,
35
+ viewport = options.viewport,
36
+ margin = options.margin;
37
+ var vertical = function vertical(s) {
38
+ return s === 'top' || s === 'bottom';
39
+ };
40
+ // Flip when the preferred side is too small and the opposite side has more room
41
+ var side = options.side;
42
+ var needed = (vertical(side) ? floating.height : floating.width) + offset;
43
+ if (room(side, options) < needed && room(opposite[side], options) > room(side, options)) {
44
+ side = opposite[side];
45
+ }
46
+ // Main axis: beside the anchor, `offset` away
47
+ var top = 0;
48
+ var left = 0;
49
+ if (side === 'top') top = anchor.top - offset - floating.height;
50
+ if (side === 'bottom') top = anchor.top + anchor.height + offset;
51
+ if (side === 'left') left = anchor.left - offset - floating.width;
52
+ if (side === 'right') left = anchor.left + anchor.width + offset;
53
+ // Cross axis: aligned to the anchor's start, centre or end, then kept inside the viewport
54
+ if (vertical(side)) {
55
+ if (align === 'start') left = anchor.left;
56
+ if (align === 'center') left = anchor.left + (anchor.width - floating.width) / 2;
57
+ if (align === 'end') left = anchor.left + anchor.width - floating.width;
58
+ left = clamp(left, margin, viewport.width - floating.width - margin);
59
+ } else {
60
+ if (align === 'start') top = anchor.top;
61
+ if (align === 'center') top = anchor.top + (anchor.height - floating.height) / 2;
62
+ if (align === 'end') top = anchor.top + anchor.height - floating.height;
63
+ top = clamp(top, margin, viewport.height - floating.height - margin);
64
+ }
65
+ return {
66
+ top: Math.round(top),
67
+ left: Math.round(left),
68
+ side: side
69
+ };
70
+ }
71
+ /**
72
+ * The element that actually has a box inside a wrapper: Tooltip and Menu wrap their trigger in a
73
+ * `display: contents` span, and a trigger can be nested in more than one (a Tooltip inside a Menu's
74
+ * trigger), so this steps down until it finds an element that lays out.
75
+ */
76
+ function laidOutElement(wrapper) {
77
+ var _a;
78
+ var element = (_a = wrapper === null || wrapper === void 0 ? void 0 : wrapper.firstElementChild) !== null && _a !== void 0 ? _a : null;
79
+ while (element && typeof getComputedStyle !== 'undefined' && getComputedStyle(element).display === 'contents') {
80
+ element = element.firstElementChild;
81
+ }
82
+ return element;
83
+ }
84
+
85
+ export { laidOutElement, placeFloating };
86
+ //# sourceMappingURL=floatingPosition.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floatingPosition.mjs","sources":["../../src/lib/floatingPosition.ts"],"sourcesContent":["// Places a floating element (Tooltip, Menu) next to its anchor, without a positioning library\n// (P8). Pure geometry, so it can be tested without a browser: the caller measures both elements\n// and applies the result as `top` and `left` on a `position: fixed` element.\n\nexport type FloatingSide = 'top' | 'right' | 'bottom' | 'left'\nexport type FloatingAlign = 'start' | 'center' | 'end'\n\nexport interface FloatingRect {\n top: number\n left: number\n width: number\n height: number\n}\n\nexport interface FloatingOptions {\n /** The anchor's box, from getBoundingClientRect */\n anchor: FloatingRect\n /** The floating element's size */\n floating: { width: number; height: number }\n /** The side to place it on; it flips to the opposite side when that has more room */\n side: FloatingSide\n /** Where it lines up along the anchor's edge */\n align: FloatingAlign\n /** The gap between the anchor and the floating element, in px */\n offset: number\n /** The viewport's size */\n viewport: { width: number; height: number }\n /** The smallest distance kept from the viewport's edges, in px */\n margin: number\n}\n\nexport interface FloatingPosition {\n top: number\n left: number\n /** The side it ended up on, after any flip */\n side: FloatingSide\n}\n\nconst opposite: Record<FloatingSide, FloatingSide> = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' }\n\n// The room between the anchor and the viewport edge on each side\nconst room = (side: FloatingSide, { anchor, viewport, margin }: FloatingOptions) => {\n switch (side) {\n case 'top': return anchor.top - margin\n case 'bottom': return viewport.height - (anchor.top + anchor.height) - margin\n case 'left': return anchor.left - margin\n case 'right': return viewport.width - (anchor.left + anchor.width) - margin\n }\n}\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(value, max))\n\nexport function placeFloating(options: FloatingOptions): FloatingPosition {\n const { anchor, floating, align, offset, viewport, margin } = options\n const vertical = (s: FloatingSide) => s === 'top' || s === 'bottom'\n\n // Flip when the preferred side is too small and the opposite side has more room\n let side = options.side\n const needed = (vertical(side) ? floating.height : floating.width) + offset\n if (room(side, options) < needed && room(opposite[side], options) > room(side, options)) {\n side = opposite[side]\n }\n\n // Main axis: beside the anchor, `offset` away\n let top = 0\n let left = 0\n if (side === 'top') top = anchor.top - offset - floating.height\n if (side === 'bottom') top = anchor.top + anchor.height + offset\n if (side === 'left') left = anchor.left - offset - floating.width\n if (side === 'right') left = anchor.left + anchor.width + offset\n\n // Cross axis: aligned to the anchor's start, centre or end, then kept inside the viewport\n if (vertical(side)) {\n if (align === 'start') left = anchor.left\n if (align === 'center') left = anchor.left + (anchor.width - floating.width) / 2\n if (align === 'end') left = anchor.left + anchor.width - floating.width\n left = clamp(left, margin, viewport.width - floating.width - margin)\n } else {\n if (align === 'start') top = anchor.top\n if (align === 'center') top = anchor.top + (anchor.height - floating.height) / 2\n if (align === 'end') top = anchor.top + anchor.height - floating.height\n top = clamp(top, margin, viewport.height - floating.height - margin)\n }\n\n return { top: Math.round(top), left: Math.round(left), side }\n}\n\n/**\n * The element that actually has a box inside a wrapper: Tooltip and Menu wrap their trigger in a\n * `display: contents` span, and a trigger can be nested in more than one (a Tooltip inside a Menu's\n * trigger), so this steps down until it finds an element that lays out.\n */\nexport function laidOutElement(wrapper: Element | null): Element | null {\n let element = wrapper?.firstElementChild ?? null\n while (element && typeof getComputedStyle !== 'undefined' && getComputedStyle(element).display === 'contents') {\n element = element.firstElementChild\n }\n return element\n}\n"],"names":["opposite","top","bottom","left","right","room","side","_a","anchor","viewport","margin","height","width","clamp","value","min","max","Math","placeFloating","options","floating","align","offset","vertical","s","needed","round","laidOutElement","wrapper","element","firstElementChild","getComputedStyle","display"],"mappings":";AAAA;AACA;AACA;AAoCA,IAAMA,QAAQ,GAAuC;AAAEC,EAAAA,GAAG,EAAE,QAAQ;AAAEC,EAAAA,MAAM,EAAE,KAAK;AAAEC,EAAAA,IAAI,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE,MAAA;CAAQ,CAAA;AAEnH;AACA,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAIC,IAAkB,EAAEC,EAA6C,EAAA;AAA3C,EAAA,IAAAC,MAAM,YAAA;IAAEC,QAAQ,GAAAF,EAAA,CAAAE,QAAA;IAAEC,MAAM,GAAAH,EAAA,CAAAG,MAAA,CAAA;AAC1D,EAAA,QAAQJ,IAAI;AACV,IAAA,KAAK,KAAK;AAAE,MAAA,OAAOE,MAAM,CAACP,GAAG,GAAGS,MAAM,CAAA;AACtC,IAAA,KAAK,QAAQ;AAAE,MAAA,OAAOD,QAAQ,CAACE,MAAM,IAAIH,MAAM,CAACP,GAAG,GAAGO,MAAM,CAACG,MAAM,CAAC,GAAGD,MAAM,CAAA;AAC7E,IAAA,KAAK,MAAM;AAAE,MAAA,OAAOF,MAAM,CAACL,IAAI,GAAGO,MAAM,CAAA;AACxC,IAAA,KAAK,OAAO;AAAE,MAAA,OAAOD,QAAQ,CAACG,KAAK,IAAIJ,MAAM,CAACL,IAAI,GAAGK,MAAM,CAACI,KAAK,CAAC,GAAGF,MAAM,CAAA;AAC7E,GAAA;AACF,CAAC,CAAA;AAED,IAAMG,KAAK,GAAG,SAARA,KAAKA,CAAIC,KAAa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KAAK,KAAK,KAAK,EAAEpB,GAAG,GAAGO,MAAM,CAACP,GAAG,GAAGO,MAAM,CAACG,MAAM,GAAGS,QAAQ,CAACT,MAAM,CAAA;AACvEV,IAAAA,GAAG,GAAGY,KAAK,CAACZ,GAAG,EAAES,MAAM,EAAED,QAAQ,CAACE,MAAM,GAAGS,QAAQ,CAACT,MAAM,GAAGD,MAAM,CAAC,CAAA;AACtE,GAAA;EAEA,OAAO;AAAET,IAAAA,GAAG,EAAEgB,IAAI,CAACS,KAAK,CAACzB,GAAG,CAAC;AAAEE,IAAAA,IAAI,EAAEc,IAAI,CAACS,KAAK,CAACvB,IAAI,CAAC;AAAEG,IAAAA,IAAI,EAAAA,IAAAA;GAAE,CAAA;AAC/D,CAAA;AAEA;;;;AAIG;AACG,SAAUqB,cAAcA,CAACC,OAAuB,EAAA;;AACpD,EAAA,IAAIC,OAAO,GAAG,CAAAtB,EAAA,GAAAqB,OAAO,KAAP,IAAA,IAAAA,OAAO,KAAP,KAAA,CAAA,GAAA,KAAA,CAAA,GAAAA,OAAO,CAAEE,iBAAiB,MAAI,IAAA,IAAAvB,EAAA,KAAA,KAAA,CAAA,GAAAA,EAAA,GAAA,IAAI,CAAA;AAChD,EAAA,OAAOsB,OAAO,IAAI,OAAOE,gBAAgB,KAAK,WAAW,IAAIA,gBAAgB,CAACF,OAAO,CAAC,CAACG,OAAO,KAAK,UAAU,EAAE;IAC7GH,OAAO,GAAGA,OAAO,CAACC,iBAAiB,CAAA;AACrC,GAAA;AACA,EAAA,OAAOD,OAAO,CAAA;AAChB;;;;"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether focus arrived from the keyboard rather than a click or tap, so a component can show
3
+ * something on keyboard focus only (a Tooltip, SidebarNav's highlight). Browsers without
4
+ * `:focus-visible` treat every focus as keyboard focus.
5
+ */
6
+ export declare function isKeyboardFocus(target: EventTarget | null): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether focus arrived from the keyboard rather than a click or tap, so a component can show
3
+ * something on keyboard focus only (a Tooltip, SidebarNav's highlight). Browsers without
4
+ * `:focus-visible` treat every focus as keyboard focus.
5
+ */
6
+ export declare function isKeyboardFocus(target: EventTarget | null): boolean;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ /**
3
+ * Whether focus arrived from the keyboard rather than a click or tap, so a component can show
4
+ * something on keyboard focus only (a Tooltip, SidebarNav's highlight). Browsers without
5
+ * `:focus-visible` treat every focus as keyboard focus.
6
+ */
7
+ function isKeyboardFocus(target) {
8
+ if (!(target instanceof Element)) return false;
9
+ try {
10
+ return target.matches(':focus-visible');
11
+ } catch (_a) {
12
+ return true;
13
+ }
14
+ }
15
+
16
+ export { isKeyboardFocus };
17
+ //# sourceMappingURL=keyboardFocus.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardFocus.mjs","sources":["../../src/lib/keyboardFocus.ts"],"sourcesContent":["/**\n * Whether focus arrived from the keyboard rather than a click or tap, so a component can show\n * something on keyboard focus only (a Tooltip, SidebarNav's highlight). Browsers without\n * `:focus-visible` treat every focus as keyboard focus.\n */\nexport function isKeyboardFocus(target: EventTarget | null): boolean {\n if (!(target instanceof Element)) return false\n try {\n return target.matches(':focus-visible')\n } catch {\n return true\n }\n}\n"],"names":["isKeyboardFocus","target","Element","matches","_a"],"mappings":";AAAA;;;;AAIG;AACG,SAAUA,eAAeA,CAACC,MAA0B,EAAA;AACxD,EAAA,IAAI,EAAEA,MAAM,YAAYC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;EAC9C,IAAI;AACF,IAAA,OAAOD,MAAM,CAACE,OAAO,CAAC,gBAAgB,CAAC,CAAA;GACxC,CAAC,OAAAC,EAAA,EAAM;AACN,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;AACF;;;;"}
@@ -1,22 +1,22 @@
1
1
  import type { Tokens } from '../types/tokens.mjs';
2
2
  type Semantic = Tokens['semantic'];
3
- /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
4
- export declare const spaceByLayoutKey: Record<keyof Semantic['spacing']['layout'], string>;
5
- /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
6
- export declare const radiusByKey: Record<keyof Semantic['border']['radius'], string>;
7
- /** Fills with no value of their own: a strong fill's states mix in an overlay (decision 0048). */
8
- type StateMixedFill = 'emphasis-hover' | 'emphasis-pressed';
3
+ /** Box's spacing values (`p`, `m`, `gap`…), each a `space` step, plus `auto`. */
4
+ export type BoxSpace = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | '10xl' | '11xl' | 'auto';
5
+ /** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */
6
+ export declare const spaceByLayoutKey: Record<BoxSpace, string>;
7
+ /** Box's `borderRadius` values: the `radius` steps, with `circle` for `full`. */
8
+ export type BoxRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'circle';
9
+ /** Box's `borderRadius` prop, read from `radius`. */
10
+ export declare const radiusByKey: Record<BoxRadius, string>;
9
11
  /**
10
12
  * Box's `bg` values in the semantic grammar (decision 0031, #304): the token's path below
11
13
  * `semantic`, such as `surface.raised` or `color.fill.muted`.
12
14
  */
13
- export type BackgroundPath = `surface.${keyof Semantic['surface']}` | `color.fill.${Exclude<keyof Semantic['color']['fill'], StateMixedFill>}`;
15
+ export type BackgroundPath = `surface.${keyof Semantic['surface']}` | `color.fill.${keyof Semantic['color']['fill']}`;
14
16
  /** Box's `bg` prop: the grammar's token paths, read from the token at that path. */
15
17
  export declare const backgroundByPath: Record<BackgroundPath, string>;
16
- /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
17
- export declare const backgroundByKey: Record<keyof Semantic['color']['background'], string>;
18
- /** Box's `color` prop: text colours, old and new keys. */
18
+ /** Box's `color` prop: the text colours. */
19
19
  export declare const textColorByKey: Record<keyof Semantic['color']['text'], string>;
20
- /** Box's border props: border colours, old and new keys. */
20
+ /** Box's border props: the border colours. */
21
21
  export declare const borderColorByKey: Record<keyof Semantic['color']['border'], string>;
22
22
  export {};
@@ -1,22 +1,22 @@
1
1
  import type { Tokens } from '../types/tokens';
2
2
  type Semantic = Tokens['semantic'];
3
- /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
4
- export declare const spaceByLayoutKey: Record<keyof Semantic['spacing']['layout'], string>;
5
- /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
6
- export declare const radiusByKey: Record<keyof Semantic['border']['radius'], string>;
7
- /** Fills with no value of their own: a strong fill's states mix in an overlay (decision 0048). */
8
- type StateMixedFill = 'emphasis-hover' | 'emphasis-pressed';
3
+ /** Box's spacing values (`p`, `m`, `gap`…), each a `space` step, plus `auto`. */
4
+ export type BoxSpace = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | '10xl' | '11xl' | 'auto';
5
+ /** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */
6
+ export declare const spaceByLayoutKey: Record<BoxSpace, string>;
7
+ /** Box's `borderRadius` values: the `radius` steps, with `circle` for `full`. */
8
+ export type BoxRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'circle';
9
+ /** Box's `borderRadius` prop, read from `radius`. */
10
+ export declare const radiusByKey: Record<BoxRadius, string>;
9
11
  /**
10
12
  * Box's `bg` values in the semantic grammar (decision 0031, #304): the token's path below
11
13
  * `semantic`, such as `surface.raised` or `color.fill.muted`.
12
14
  */
13
- export type BackgroundPath = `surface.${keyof Semantic['surface']}` | `color.fill.${Exclude<keyof Semantic['color']['fill'], StateMixedFill>}`;
15
+ export type BackgroundPath = `surface.${keyof Semantic['surface']}` | `color.fill.${keyof Semantic['color']['fill']}`;
14
16
  /** Box's `bg` prop: the grammar's token paths, read from the token at that path. */
15
17
  export declare const backgroundByPath: Record<BackgroundPath, string>;
16
- /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
17
- export declare const backgroundByKey: Record<keyof Semantic['color']['background'], string>;
18
- /** Box's `color` prop: text colours, old and new keys. */
18
+ /** Box's `color` prop: the text colours. */
19
19
  export declare const textColorByKey: Record<keyof Semantic['color']['text'], string>;
20
- /** Box's border props: border colours, old and new keys. */
20
+ /** Box's border props: the border colours. */
21
21
  export declare const borderColorByKey: Record<keyof Semantic['color']['border'], string>;
22
22
  export {};
@@ -1,16 +1,16 @@
1
1
  'use client';
2
2
  import tokens from './cssTokens.mjs';
3
3
 
4
- // Props whose values are token keys keep their published vocabulary in 2.x (P7), but read the
5
- // semantic grammar's names (decision 0031, #189). Each map covers every key the prop type allows,
6
- // so TypeScript fails here if a key is added without a mapping.
4
+ // Box's spacing and radius props keep their own names, which 3.0 decoupled from the removed
5
+ // spacing.layout and border.radius tokens (P7, #99), and read the semantic grammar's tokens
6
+ // (decision 0031). Each map covers every key the prop type allows, so TypeScript fails here if a
7
+ // key is added without a mapping.
7
8
  var semantic = tokens.semantic;
8
9
  var color = semantic.color,
9
10
  space = semantic.space,
10
11
  radius = semantic.radius,
11
- surface = semantic.surface,
12
- opacity = semantic.opacity;
13
- /** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
12
+ surface = semantic.surface;
13
+ /** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */
14
14
  var spaceByLayoutKey = {
15
15
  none: space[0],
16
16
  xs: space[100],
@@ -28,10 +28,10 @@ var spaceByLayoutKey = {
28
28
  '9xl': space[1600],
29
29
  '10xl': space[2000],
30
30
  '11xl': space[2400],
31
- // A keyword, not a step: it stays until the keyword question is settled (0031)
31
+ // A keyword, not a step (0031)
32
32
  auto: semantic.spacing.layout.auto
33
33
  };
34
- /** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
34
+ /** Box's `borderRadius` prop, read from `radius`. */
35
35
  var radiusByKey = {
36
36
  none: radius.none,
37
37
  xs: radius.xs,
@@ -77,85 +77,10 @@ var backgroundByPath = {
77
77
  'color.fill.none-pressed': color.fill['none-pressed'],
78
78
  'color.fill.inverse-none-hover': color.fill['inverse-none-hover']
79
79
  };
80
- /** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
81
- var backgroundByKey = {
82
- "default": surface.base,
83
- page: surface.base,
84
- subtle: surface.raised,
85
- overlay: surface.scrim,
86
- emphasis: color.fill.emphasis,
87
- // A strong fill's states mix its content colour in at the state-layer opacity (decision 0048)
88
- 'emphasis-hover': "color-mix(in srgb, ".concat(color.fill.emphasis, ", ").concat(color.text.inverse, " calc(").concat(opacity.state.hover, " * 100%))"),
89
- 'emphasis-active': "color-mix(in srgb, ".concat(color.fill.emphasis, ", ").concat(color.text.inverse, " calc(").concat(opacity.state.pressed, " * 100%))"),
90
- surface: color.fill.muted,
91
- inverse: color.fill.inverse,
92
- interactive: color.fill.accent,
93
- 'interactive-hover': color.fill['accent-hover'],
94
- 'interactive-active': color.fill['accent-pressed'],
95
- 'interactive-subtle': color.fill['accent-muted'],
96
- 'interactive-subtle-hover': color.fill['accent-muted-hover'],
97
- 'interactive-subtle-active': color.fill['accent-muted-pressed'],
98
- error: color.fill.danger,
99
- 'error-hover': color.fill['danger-hover'],
100
- 'error-active': color.fill['danger-pressed'],
101
- 'error-subtle': color.fill['danger-muted'],
102
- success: color.fill.success,
103
- 'success-subtle': color.fill['success-muted'],
104
- warning: color.fill.warning,
105
- 'warning-subtle': color.fill['warning-muted'],
106
- disabled: color.fill.disabled,
107
- neutral: color.fill["default"],
108
- 'neutral-hover': color.fill['default-hover'],
109
- 'neutral-active': color.fill['default-pressed'],
110
- transparent: color.fill.none,
111
- 'hover-overlay': color.fill['none-hover'],
112
- 'active-overlay': color.fill['none-pressed'],
113
- 'inverse-overlay': color.fill['inverse-none-hover'],
114
- // Moved to the component tier (decision 0031 §6)
115
- progressTrack: tokens.component.track.background
116
- };
117
- /** Box's `color` prop: text colours, old and new keys. */
118
- var textColorByKey = {
119
- "default": color.text["default"],
120
- emphasis: color.text["default"],
121
- inverse: color.text.inverse,
122
- disabled: color.text.disabled,
123
- success: color.text.success,
124
- warning: color.text.warning,
125
- muted: color.text.muted,
126
- accent: color.text.accent,
127
- 'accent-hover': color.text.accent,
128
- 'accent-pressed': color.text.accent,
129
- danger: color.text.danger,
130
- serious: color.text.serious,
131
- ai: color.text.ai,
132
- subdued: color.text.muted,
133
- interactive: color.text.accent,
134
- 'interactive-hover': color.text.accent,
135
- 'interactive-active': color.text.accent,
136
- error: color.text.danger
137
- };
138
- /** Box's border props: border colours, old and new keys. */
139
- var borderColorByKey = {
140
- "default": color.border["default"],
141
- success: color.border.success,
142
- warning: color.border.warning,
143
- none: color.border.none,
144
- emphasis: color.border["default"],
145
- input: color.border.input,
146
- 'input-hover': color.border['input-hover'],
147
- focus: color.border.focus,
148
- accent: color.border.accent,
149
- danger: color.border.danger,
150
- serious: color.border.serious,
151
- ai: color.border.ai,
152
- subtle: color.border["default"],
153
- control: color.border.input,
154
- // `strong` split by use (0031); as a generic firm outline it is the hovered-input border
155
- strong: color.border['input-hover'],
156
- interactive: color.border.accent,
157
- error: color.border.danger
158
- };
80
+ /** Box's `color` prop: the text colours. */
81
+ var textColorByKey = color.text;
82
+ /** Box's border props: the border colours. */
83
+ var borderColorByKey = color.border;
159
84
 
160
- export { backgroundByKey, backgroundByPath, borderColorByKey, radiusByKey, spaceByLayoutKey, textColorByKey };
85
+ export { backgroundByPath, borderColorByKey, radiusByKey, spaceByLayoutKey, textColorByKey };
161
86
  //# sourceMappingURL=tokenAliases.mjs.map