@mattermost/compass-ui 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (268) hide show
  1. package/dist/components/action-button/ActionButton.cjs.map +1 -1
  2. package/dist/components/action-button/ActionButton.d.ts +1 -0
  3. package/dist/components/action-button/ActionButton.d.ts.map +1 -1
  4. package/dist/components/action-button/ActionButton.js.map +1 -1
  5. package/dist/components/admin-panel/AdminPanel.cjs.map +1 -1
  6. package/dist/components/admin-panel/AdminPanel.d.ts +1 -0
  7. package/dist/components/admin-panel/AdminPanel.d.ts.map +1 -1
  8. package/dist/components/admin-panel/AdminPanel.js.map +1 -1
  9. package/dist/components/admin-panel-header/AdminPanelHeader.cjs.map +1 -1
  10. package/dist/components/admin-panel-header/AdminPanelHeader.d.ts +1 -0
  11. package/dist/components/admin-panel-header/AdminPanelHeader.d.ts.map +1 -1
  12. package/dist/components/admin-panel-header/AdminPanelHeader.js.map +1 -1
  13. package/dist/components/button/Button.cjs +1 -1
  14. package/dist/components/button/Button.cjs.map +1 -1
  15. package/dist/components/button/Button.d.ts +7 -5
  16. package/dist/components/button/Button.d.ts.map +1 -1
  17. package/dist/components/button/Button.js +29 -27
  18. package/dist/components/button/Button.js.map +1 -1
  19. package/dist/components/button/Button.module.css +1 -1
  20. package/dist/components/button/Button.module.scss.cjs +1 -1
  21. package/dist/components/button/Button.module.scss.js +13 -12
  22. package/dist/components/button/Button.module.scss.js.map +1 -1
  23. package/dist/components/card-button/CardButton.cjs +2 -0
  24. package/dist/components/card-button/CardButton.cjs.map +1 -0
  25. package/dist/components/card-button/CardButton.d.ts +20 -0
  26. package/dist/components/card-button/CardButton.d.ts.map +1 -0
  27. package/dist/components/card-button/CardButton.js +45 -0
  28. package/dist/components/card-button/CardButton.js.map +1 -0
  29. package/dist/components/card-button/CardButton.module.css +1 -0
  30. package/dist/components/card-button/CardButton.module.scss.cjs +2 -0
  31. package/dist/components/card-button/CardButton.module.scss.cjs.map +1 -0
  32. package/dist/components/card-button/CardButton.module.scss.js +13 -0
  33. package/dist/components/card-button/CardButton.module.scss.js.map +1 -0
  34. package/dist/components/card-button/CardButtonGroup.cjs +2 -0
  35. package/dist/components/card-button/CardButtonGroup.cjs.map +1 -0
  36. package/dist/components/card-button/CardButtonGroup.d.ts +13 -0
  37. package/dist/components/card-button/CardButtonGroup.d.ts.map +1 -0
  38. package/dist/components/card-button/CardButtonGroup.js +85 -0
  39. package/dist/components/card-button/CardButtonGroup.js.map +1 -0
  40. package/dist/components/card-button/CardButtonGroup.module.css +1 -0
  41. package/dist/components/card-button/CardButtonGroup.module.scss.cjs +2 -0
  42. package/dist/components/card-button/CardButtonGroup.module.scss.cjs.map +1 -0
  43. package/dist/components/card-button/CardButtonGroup.module.scss.js +7 -0
  44. package/dist/components/card-button/CardButtonGroup.module.scss.js.map +1 -0
  45. package/dist/components/card-button/index.cjs +2 -0
  46. package/dist/components/card-button/index.d.ts +5 -0
  47. package/dist/components/card-button/index.d.ts.map +1 -0
  48. package/dist/components/card-button/index.js +7 -0
  49. package/dist/components/card-button/index.js.map +1 -0
  50. package/dist/components/chip/Chip.cjs +1 -1
  51. package/dist/components/chip/Chip.cjs.map +1 -1
  52. package/dist/components/chip/Chip.d.ts +4 -2
  53. package/dist/components/chip/Chip.d.ts.map +1 -1
  54. package/dist/components/chip/Chip.js +66 -66
  55. package/dist/components/chip/Chip.js.map +1 -1
  56. package/dist/components/chip/Chip.module.css +1 -1
  57. package/dist/components/chip/Chip.module.scss.cjs +1 -1
  58. package/dist/components/chip/Chip.module.scss.js +12 -12
  59. package/dist/components/emoji-button/EmojiButton.cjs +2 -0
  60. package/dist/components/emoji-button/EmojiButton.cjs.map +1 -0
  61. package/dist/components/emoji-button/EmojiButton.d.ts +30 -0
  62. package/dist/components/emoji-button/EmojiButton.d.ts.map +1 -0
  63. package/dist/components/emoji-button/EmojiButton.js +35 -0
  64. package/dist/components/emoji-button/EmojiButton.js.map +1 -0
  65. package/dist/components/emoji-button/EmojiButton.module.css +1 -0
  66. package/dist/components/emoji-button/EmojiButton.module.scss.cjs +2 -0
  67. package/dist/components/emoji-button/EmojiButton.module.scss.cjs.map +1 -0
  68. package/dist/components/emoji-button/EmojiButton.module.scss.js +15 -0
  69. package/dist/components/emoji-button/EmojiButton.module.scss.js.map +1 -0
  70. package/dist/components/emoji-button/index.cjs +2 -0
  71. package/dist/components/emoji-button/index.cjs.map +1 -0
  72. package/dist/components/emoji-button/index.d.ts +3 -0
  73. package/dist/components/emoji-button/index.d.ts.map +1 -0
  74. package/dist/components/emoji-button/index.js +6 -0
  75. package/dist/components/emoji-popover/EmojiPopover.cjs +2 -0
  76. package/dist/components/emoji-popover/EmojiPopover.cjs.map +1 -0
  77. package/dist/components/emoji-popover/EmojiPopover.d.ts +34 -0
  78. package/dist/components/emoji-popover/EmojiPopover.d.ts.map +1 -0
  79. package/dist/components/emoji-popover/EmojiPopover.js +244 -0
  80. package/dist/components/emoji-popover/EmojiPopover.js.map +1 -0
  81. package/dist/components/emoji-popover/EmojiPopover.module.css +1 -0
  82. package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs +2 -0
  83. package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs.map +1 -0
  84. package/dist/components/emoji-popover/EmojiPopover.module.scss.js +27 -0
  85. package/dist/components/emoji-popover/EmojiPopover.module.scss.js.map +1 -0
  86. package/dist/components/{message-reactions → emoji-popover}/index.cjs +1 -1
  87. package/dist/components/emoji-popover/index.cjs.map +1 -0
  88. package/dist/components/emoji-popover/index.d.ts +3 -0
  89. package/dist/components/emoji-popover/index.d.ts.map +1 -0
  90. package/dist/components/emoji-popover/index.js +5 -0
  91. package/dist/components/emoji-popover/index.js.map +1 -0
  92. package/dist/components/global-banner/GlobalBanner.cjs.map +1 -1
  93. package/dist/components/global-banner/GlobalBanner.d.ts +1 -1
  94. package/dist/components/global-banner/GlobalBanner.d.ts.map +1 -1
  95. package/dist/components/global-banner/GlobalBanner.js.map +1 -1
  96. package/dist/components/global-header/GlobalHeader.module.css +1 -1
  97. package/dist/components/global-header/GlobalHeader.module.scss.cjs +1 -1
  98. package/dist/components/global-header/GlobalHeader.module.scss.js +16 -16
  99. package/dist/components/icon-button/IconButton.cjs +1 -1
  100. package/dist/components/icon-button/IconButton.cjs.map +1 -1
  101. package/dist/components/icon-button/IconButton.d.ts +3 -1
  102. package/dist/components/icon-button/IconButton.d.ts.map +1 -1
  103. package/dist/components/icon-button/IconButton.js +37 -35
  104. package/dist/components/icon-button/IconButton.js.map +1 -1
  105. package/dist/components/menu-group-heading/MenuGroupHeading.cjs +2 -0
  106. package/dist/components/menu-group-heading/MenuGroupHeading.cjs.map +1 -0
  107. package/dist/components/menu-group-heading/MenuGroupHeading.d.ts +11 -0
  108. package/dist/components/menu-group-heading/MenuGroupHeading.d.ts.map +1 -0
  109. package/dist/components/menu-group-heading/MenuGroupHeading.js +20 -0
  110. package/dist/components/menu-group-heading/MenuGroupHeading.js.map +1 -0
  111. package/dist/components/menu-group-heading/MenuGroupHeading.module.css +1 -0
  112. package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.cjs +2 -0
  113. package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.cjs.map +1 -0
  114. package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.js +8 -0
  115. package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.js.map +1 -0
  116. package/dist/components/menu-group-heading/index.cjs +2 -0
  117. package/dist/components/menu-group-heading/index.cjs.map +1 -0
  118. package/dist/components/menu-group-heading/index.d.ts +3 -0
  119. package/dist/components/menu-group-heading/index.d.ts.map +1 -0
  120. package/dist/components/menu-group-heading/index.js +5 -0
  121. package/dist/components/menu-group-heading/index.js.map +1 -0
  122. package/dist/components/menu-item/MenuItem.cjs.map +1 -1
  123. package/dist/components/menu-item/MenuItem.d.ts +2 -2
  124. package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
  125. package/dist/components/menu-item/MenuItem.js.map +1 -1
  126. package/dist/components/message-separator/MessageSeparator.cjs +1 -1
  127. package/dist/components/message-separator/MessageSeparator.cjs.map +1 -1
  128. package/dist/components/message-separator/MessageSeparator.d.ts +1 -1
  129. package/dist/components/message-separator/MessageSeparator.js +1 -1
  130. package/dist/components/message-separator/MessageSeparator.js.map +1 -1
  131. package/dist/components/modal/Modal.cjs +1 -1
  132. package/dist/components/modal/Modal.cjs.map +1 -1
  133. package/dist/components/modal/Modal.d.ts +43 -11
  134. package/dist/components/modal/Modal.d.ts.map +1 -1
  135. package/dist/components/modal/Modal.js +56 -74
  136. package/dist/components/modal/Modal.js.map +1 -1
  137. package/dist/components/modal/Modal.module.css +1 -1
  138. package/dist/components/modal/Modal.module.scss.cjs +1 -1
  139. package/dist/components/modal/Modal.module.scss.js +12 -25
  140. package/dist/components/modal/Modal.module.scss.js.map +1 -1
  141. package/dist/components/modal/index.d.ts +1 -1
  142. package/dist/components/modal/index.d.ts.map +1 -1
  143. package/dist/components/modal-footer/ModalFooter.cjs +2 -0
  144. package/dist/components/modal-footer/ModalFooter.cjs.map +1 -0
  145. package/dist/components/modal-footer/ModalFooter.d.ts +29 -0
  146. package/dist/components/modal-footer/ModalFooter.d.ts.map +1 -0
  147. package/dist/components/modal-footer/ModalFooter.js +31 -0
  148. package/dist/components/modal-footer/ModalFooter.js.map +1 -0
  149. package/dist/components/modal-footer/ModalFooter.module.css +1 -0
  150. package/dist/components/modal-footer/ModalFooter.module.scss.cjs +2 -0
  151. package/dist/components/modal-footer/ModalFooter.module.scss.cjs.map +1 -0
  152. package/dist/components/modal-footer/ModalFooter.module.scss.js +17 -0
  153. package/dist/components/modal-footer/ModalFooter.module.scss.js.map +1 -0
  154. package/dist/components/modal-footer/index.cjs +2 -0
  155. package/dist/components/modal-footer/index.cjs.map +1 -0
  156. package/dist/components/modal-footer/index.d.ts +3 -0
  157. package/dist/components/modal-footer/index.d.ts.map +1 -0
  158. package/dist/components/modal-footer/index.js +5 -0
  159. package/dist/components/modal-footer/index.js.map +1 -0
  160. package/dist/components/modal-header/ModalHeader.cjs +2 -0
  161. package/dist/components/modal-header/ModalHeader.cjs.map +1 -0
  162. package/dist/components/modal-header/ModalHeader.d.ts +38 -0
  163. package/dist/components/modal-header/ModalHeader.d.ts.map +1 -0
  164. package/dist/components/modal-header/ModalHeader.js +74 -0
  165. package/dist/components/modal-header/ModalHeader.js.map +1 -0
  166. package/dist/components/modal-header/ModalHeader.module.css +1 -0
  167. package/dist/components/modal-header/ModalHeader.module.scss.cjs +2 -0
  168. package/dist/components/modal-header/ModalHeader.module.scss.cjs.map +1 -0
  169. package/dist/components/modal-header/ModalHeader.module.scss.js +19 -0
  170. package/dist/components/modal-header/ModalHeader.module.scss.js.map +1 -0
  171. package/dist/components/modal-header/index.cjs +2 -0
  172. package/dist/components/modal-header/index.cjs.map +1 -0
  173. package/dist/components/modal-header/index.d.ts +3 -0
  174. package/dist/components/modal-header/index.d.ts.map +1 -0
  175. package/dist/components/modal-header/index.js +5 -0
  176. package/dist/components/modal-header/index.js.map +1 -0
  177. package/dist/components/popover-notice/PopoverNotice.cjs.map +1 -1
  178. package/dist/components/popover-notice/PopoverNotice.d.ts +1 -1
  179. package/dist/components/popover-notice/PopoverNotice.d.ts.map +1 -1
  180. package/dist/components/popover-notice/PopoverNotice.js.map +1 -1
  181. package/dist/components/reaction-button/ReactionButton.cjs +2 -0
  182. package/dist/components/reaction-button/ReactionButton.cjs.map +1 -0
  183. package/dist/components/reaction-button/ReactionButton.d.ts +17 -0
  184. package/dist/components/reaction-button/ReactionButton.d.ts.map +1 -0
  185. package/dist/components/reaction-button/ReactionButton.js +42 -0
  186. package/dist/components/reaction-button/ReactionButton.js.map +1 -0
  187. package/dist/components/reaction-button/ReactionButton.module.css +1 -0
  188. package/dist/components/reaction-button/ReactionButton.module.scss.cjs +2 -0
  189. package/dist/components/reaction-button/ReactionButton.module.scss.cjs.map +1 -0
  190. package/dist/components/reaction-button/ReactionButton.module.scss.js +12 -0
  191. package/dist/components/reaction-button/ReactionButton.module.scss.js.map +1 -0
  192. package/dist/components/reaction-button/index.cjs +2 -0
  193. package/dist/components/reaction-button/index.cjs.map +1 -0
  194. package/dist/components/reaction-button/index.d.ts +3 -0
  195. package/dist/components/reaction-button/index.d.ts.map +1 -0
  196. package/dist/components/reaction-button/index.js +5 -0
  197. package/dist/components/reaction-button/index.js.map +1 -0
  198. package/dist/components/reactions-row/ReactionsRow.cjs +2 -0
  199. package/dist/components/reactions-row/ReactionsRow.cjs.map +1 -0
  200. package/dist/components/{message-reactions/MessageReactions.d.ts → reactions-row/ReactionsRow.d.ts} +5 -5
  201. package/dist/components/reactions-row/ReactionsRow.d.ts.map +1 -0
  202. package/dist/components/reactions-row/ReactionsRow.js +71 -0
  203. package/dist/components/reactions-row/ReactionsRow.js.map +1 -0
  204. package/dist/components/reactions-row/ReactionsRow.module.css +1 -0
  205. package/dist/components/reactions-row/ReactionsRow.module.scss.cjs +2 -0
  206. package/dist/components/reactions-row/ReactionsRow.module.scss.cjs.map +1 -0
  207. package/dist/components/reactions-row/ReactionsRow.module.scss.js +14 -0
  208. package/dist/components/reactions-row/ReactionsRow.module.scss.js.map +1 -0
  209. package/dist/components/reactions-row/index.cjs +2 -0
  210. package/dist/components/reactions-row/index.cjs.map +1 -0
  211. package/dist/components/reactions-row/index.d.ts +3 -0
  212. package/dist/components/reactions-row/index.d.ts.map +1 -0
  213. package/dist/components/reactions-row/index.js +5 -0
  214. package/dist/components/reactions-row/index.js.map +1 -0
  215. package/dist/components/right-sidebar-header/RightSidebarHeader.cjs.map +1 -1
  216. package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts +1 -1
  217. package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts.map +1 -1
  218. package/dist/components/right-sidebar-header/RightSidebarHeader.js.map +1 -1
  219. package/dist/components/section-notice/SectionNotice.cjs.map +1 -1
  220. package/dist/components/section-notice/SectionNotice.d.ts +1 -1
  221. package/dist/components/section-notice/SectionNotice.d.ts.map +1 -1
  222. package/dist/components/section-notice/SectionNotice.js.map +1 -1
  223. package/dist/components/spinner/Spinner.cjs +1 -1
  224. package/dist/components/spinner/Spinner.cjs.map +1 -1
  225. package/dist/components/spinner/Spinner.d.ts +1 -1
  226. package/dist/components/spinner/Spinner.d.ts.map +1 -1
  227. package/dist/components/spinner/Spinner.js +17 -17
  228. package/dist/components/spinner/Spinner.js.map +1 -1
  229. package/dist/components/tag/Tag.cjs.map +1 -1
  230. package/dist/components/tag/Tag.d.ts +1 -1
  231. package/dist/components/tag/Tag.d.ts.map +1 -1
  232. package/dist/components/tag/Tag.js.map +1 -1
  233. package/dist/components/text-input/TextInput.cjs.map +1 -1
  234. package/dist/components/text-input/TextInput.d.ts +1 -1
  235. package/dist/components/text-input/TextInput.d.ts.map +1 -1
  236. package/dist/components/text-input/TextInput.js.map +1 -1
  237. package/dist/components/thread-footer/ThreadFooter.module.css +1 -1
  238. package/dist/components/thread-footer/ThreadFooter.module.scss.cjs +1 -1
  239. package/dist/components/thread-footer/ThreadFooter.module.scss.js +19 -19
  240. package/dist/components/tooltip/Tooltip.cjs.map +1 -1
  241. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  242. package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
  243. package/dist/components/tooltip/Tooltip.js.map +1 -1
  244. package/dist/components/tour-point/TourPoint.module.css +1 -1
  245. package/dist/components/tour-point/TourPoint.module.scss.cjs +1 -1
  246. package/dist/components/tour-point/TourPoint.module.scss.js +28 -28
  247. package/dist/index.cjs +1 -1
  248. package/dist/index.css +24 -8
  249. package/dist/index.d.ts +8 -1
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +192 -175
  252. package/dist/index.js.map +1 -1
  253. package/package.json +25 -4
  254. package/dist/components/message-reactions/MessageReactions.cjs +0 -2
  255. package/dist/components/message-reactions/MessageReactions.cjs.map +0 -1
  256. package/dist/components/message-reactions/MessageReactions.d.ts.map +0 -1
  257. package/dist/components/message-reactions/MessageReactions.js +0 -85
  258. package/dist/components/message-reactions/MessageReactions.js.map +0 -1
  259. package/dist/components/message-reactions/MessageReactions.module.css +0 -1
  260. package/dist/components/message-reactions/MessageReactions.module.scss.cjs +0 -2
  261. package/dist/components/message-reactions/MessageReactions.module.scss.cjs.map +0 -1
  262. package/dist/components/message-reactions/MessageReactions.module.scss.js +0 -18
  263. package/dist/components/message-reactions/MessageReactions.module.scss.js.map +0 -1
  264. package/dist/components/message-reactions/index.d.ts +0 -3
  265. package/dist/components/message-reactions/index.d.ts.map +0 -1
  266. package/dist/components/message-reactions/index.js +0 -5
  267. /package/dist/components/{message-reactions → card-button}/index.cjs.map +0 -0
  268. /package/dist/components/{message-reactions → emoji-button}/index.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"RightSidebarHeader.cjs","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport ArrowBackIosIcon from '@mattermost/compass-icons/components/arrow-back-ios';\nimport ArrowExpandIcon from '@mattermost/compass-icons/components/arrow-expand';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport type { TagType } from '@/components/tag/Tag';\nimport styles from './RightSidebarHeader.module.scss';\n\nexport interface RightSidebarHeaderProps {\n /** Primary title text. */\n title: string;\n /** Secondary title shown to the right of a vertical divider (e.g. parent channel name). */\n secondaryTitle?: string;\n /** Optional tag rendered next to the title (e.g. \"BETA\"). */\n tag?: string;\n /** Tag visual style. Default: Info. */\n tagType?: TagType;\n /** Optional leading element shown before the title — typically a UserAvatar or Icon. */\n leadingIcon?: ReactNode;\n /** When set, shows a back button and calls this on click. */\n onBack?: () => void;\n /** When set, shows an expand button and calls this on click. */\n onExpand?: () => void;\n /** When set, shows a close button and calls this on click. */\n onClose?: () => void;\n /** Optional inline action label (e.g. \"Follow\"). */\n actionLabel?: string;\n /** Click handler for the action label. */\n onActionClick?: () => void;\n /** When true, the action button shows in its active state. */\n actionActive?: boolean;\n className?: string;\n}\n\nexport default function RightSidebarHeader({\n title,\n secondaryTitle,\n tag,\n tagType = 'info',\n leadingIcon,\n onBack,\n onExpand,\n onClose,\n actionLabel,\n onActionClick,\n actionActive = false,\n className = '',\n}: RightSidebarHeaderProps) {\n const rootClass = [styles['right-sidebar-header'], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div className={styles['right-sidebar-header__left']}>\n <div className={styles['right-sidebar-header__primary']}>\n {onBack && (\n <IconButton\n className={styles['right-sidebar-header__back']}\n size=\"small\"\n aria-label=\"Back\"\n onClick={onBack}\n icon={<Icon size=\"16\" glyph={<ArrowBackIosIcon />} />}\n />\n )}\n {leadingIcon && (\n <span className={styles['right-sidebar-header__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <span className={styles['right-sidebar-header__title']}>{title}</span>\n {tag && (\n <span className={styles['right-sidebar-header__tag']}>\n <Tag\n label={tag}\n type={tagType}\n size=\"x-small\"\n casing=\"all-caps\"\n />\n </span>\n )}\n </div>\n {secondaryTitle && (\n <div className={styles['right-sidebar-header__secondary']}>\n <span className={styles['right-sidebar-header__secondary-text']}>\n {secondaryTitle}\n </span>\n </div>\n )}\n </div>\n\n <div className={styles['right-sidebar-header__actions']}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[\n styles['right-sidebar-header__action'],\n actionActive\n ? styles['right-sidebar-header__action--active']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onActionClick}\n aria-pressed={actionActive ? true : undefined}\n >\n {actionLabel}\n </button>\n )}\n {onExpand && (\n <IconButton\n size=\"small\"\n aria-label=\"Expand\"\n onClick={onExpand}\n icon={<Icon size=\"16\" glyph={<ArrowExpandIcon />} />}\n />\n )}\n {onClose && (\n <IconButton\n size=\"small\"\n aria-label=\"Close\"\n onClick={onClose}\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["RightSidebarHeader","title","secondaryTitle","tag","tagType","leadingIcon","onBack","onExpand","onClose","actionLabel","onActionClick","actionActive","className","rootClass","styles","jsxs","jsx","IconButton","Icon","ArrowBackIosIcon","Tag","ArrowExpandIcon","CloseIcon"],"mappings":"+dAoCA,SAAwBA,EAAmB,CACzC,MAAAC,EACA,eAAAC,EACA,IAAAC,EACA,QAAAC,EAAU,OACV,YAAAC,EACA,OAAAC,EACA,SAAAC,EACA,QAAAC,EACA,YAAAC,EACA,cAAAC,EACA,aAAAC,EAAe,GACf,UAAAC,EAAY,EACd,EAA4B,CAC1B,MAAMC,EAAY,CAACC,UAAO,sBAAsB,EAAGF,CAAS,EACzD,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEG,EAAAA,KAAC,MAAA,CAAI,UAAWF,EACd,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,4BAA4B,EACjD,SAAA,CAAAC,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,+BAA+B,EACnD,SAAA,CAAAR,GACCU,EAAAA,IAACC,EAAAA,QAAA,CACC,UAAWH,EAAAA,QAAO,4BAA4B,EAC9C,KAAK,QACL,aAAW,OACX,QAASR,EACT,WAAOY,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOF,EAAAA,IAACG,IAAiB,CAAA,CAAI,CAAA,CAAA,EAGtDd,GACCW,EAAAA,IAAC,OAAA,CAAK,UAAWF,EAAAA,QAAO,oCAAoC,EACzD,SAAAT,EACH,QAED,OAAA,CAAK,UAAWS,EAAAA,QAAO,6BAA6B,EAAI,SAAAb,EAAM,EAC9DE,GACCa,EAAAA,IAAC,OAAA,CAAK,UAAWF,EAAAA,QAAO,2BAA2B,EACjD,SAAAE,EAAAA,IAACI,EAAAA,QAAA,CACC,MAAOjB,EACP,KAAMC,EACN,KAAK,UACL,OAAO,UAAA,CAAA,CACT,CACF,CAAA,EAEJ,EACCF,GACCc,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAAA,QAAO,iCAAiC,EACtD,SAAAE,EAAAA,IAAC,OAAA,CAAK,UAAWF,EAAAA,QAAO,sCAAsC,EAC3D,WACH,CAAA,CACF,CAAA,EAEJ,EAEAC,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,+BAA+B,EACnD,SAAA,CAAAL,GACCO,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAW,CACTF,EAAAA,QAAO,8BAA8B,EACrCH,EACIG,EAAAA,QAAO,sCAAsC,EAC7C,EAAA,EAEH,OAAO,OAAO,EACd,KAAK,GAAG,EACX,QAASJ,EACT,eAAcC,EAAe,GAAO,OAEnC,SAAAF,CAAA,CAAA,EAGJF,GACCS,EAAAA,IAACC,EAAAA,QAAA,CACC,KAAK,QACL,aAAW,SACX,QAASV,EACT,WAAOW,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOF,EAAAA,IAACK,IAAgB,CAAA,CAAI,CAAA,CAAA,EAGrDb,GACCQ,EAAAA,IAACC,EAAAA,QAAA,CACC,KAAK,QACL,aAAW,QACX,QAAST,EACT,WAAOU,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOF,EAAAA,IAACM,IAAU,CAAA,CAAI,CAAA,CAAA,CAC9C,CAAA,CAEJ,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"RightSidebarHeader.cjs","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport ArrowBackIosIcon from '@mattermost/compass-icons/components/arrow-back-ios';\nimport ArrowExpandIcon from '@mattermost/compass-icons/components/arrow-expand';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport type { TagType } from '@/components/tag/Tag';\nimport styles from './RightSidebarHeader.module.scss';\n\nexport interface RightSidebarHeaderProps {\n /** Primary title text. */\n title: string;\n /** Secondary title shown to the right of a vertical divider (e.g. parent channel name). */\n secondaryTitle?: string;\n /** Optional tag rendered next to the title (e.g. \"BETA\"). */\n tag?: string;\n /** Tag visual style. Default: Info. */\n tagType?: TagType;\n /** Optional leading element shown before the title — typically a `UserAvatar` or an icon. When passing an icon, use `<Icon glyph={<SomeIcon />} size=\"20\" />` to align with the title text. */\n leadingIcon?: ReactNode;\n /** When set, shows a back button and calls this on click. */\n onBack?: () => void;\n /** When set, shows an expand button and calls this on click. */\n onExpand?: () => void;\n /** When set, shows a close button and calls this on click. */\n onClose?: () => void;\n /** Optional inline action label (e.g. \"Follow\"). */\n actionLabel?: string;\n /** Click handler for the action label. */\n onActionClick?: () => void;\n /** When true, the action button shows in its active state. */\n actionActive?: boolean;\n className?: string;\n}\n\nexport default function RightSidebarHeader({\n title,\n secondaryTitle,\n tag,\n tagType = 'info',\n leadingIcon,\n onBack,\n onExpand,\n onClose,\n actionLabel,\n onActionClick,\n actionActive = false,\n className = '',\n}: RightSidebarHeaderProps) {\n const rootClass = [styles['right-sidebar-header'], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div className={styles['right-sidebar-header__left']}>\n <div className={styles['right-sidebar-header__primary']}>\n {onBack && (\n <IconButton\n className={styles['right-sidebar-header__back']}\n size=\"small\"\n aria-label=\"Back\"\n onClick={onBack}\n icon={<Icon size=\"16\" glyph={<ArrowBackIosIcon />} />}\n />\n )}\n {leadingIcon && (\n <span className={styles['right-sidebar-header__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <span className={styles['right-sidebar-header__title']}>{title}</span>\n {tag && (\n <span className={styles['right-sidebar-header__tag']}>\n <Tag\n label={tag}\n type={tagType}\n size=\"x-small\"\n casing=\"all-caps\"\n />\n </span>\n )}\n </div>\n {secondaryTitle && (\n <div className={styles['right-sidebar-header__secondary']}>\n <span className={styles['right-sidebar-header__secondary-text']}>\n {secondaryTitle}\n </span>\n </div>\n )}\n </div>\n\n <div className={styles['right-sidebar-header__actions']}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[\n styles['right-sidebar-header__action'],\n actionActive\n ? styles['right-sidebar-header__action--active']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onActionClick}\n aria-pressed={actionActive ? true : undefined}\n >\n {actionLabel}\n </button>\n )}\n {onExpand && (\n <IconButton\n size=\"small\"\n aria-label=\"Expand\"\n onClick={onExpand}\n icon={<Icon size=\"16\" glyph={<ArrowExpandIcon />} />}\n />\n )}\n {onClose && (\n <IconButton\n size=\"small\"\n aria-label=\"Close\"\n onClick={onClose}\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["RightSidebarHeader","title","secondaryTitle","tag","tagType","leadingIcon","onBack","onExpand","onClose","actionLabel","onActionClick","actionActive","className","rootClass","styles","jsxs","jsx","IconButton","Icon","ArrowBackIosIcon","Tag","ArrowExpandIcon","CloseIcon"],"mappings":"+dAoCA,SAAwBA,EAAmB,CACzC,MAAAC,EACA,eAAAC,EACA,IAAAC,EACA,QAAAC,EAAU,OACV,YAAAC,EACA,OAAAC,EACA,SAAAC,EACA,QAAAC,EACA,YAAAC,EACA,cAAAC,EACA,aAAAC,EAAe,GACf,UAAAC,EAAY,EACd,EAA4B,CAC1B,MAAMC,EAAY,CAACC,UAAO,sBAAsB,EAAGF,CAAS,EACzD,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEG,EAAAA,KAAC,MAAA,CAAI,UAAWF,EACd,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,4BAA4B,EACjD,SAAA,CAAAC,EAAAA,KAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,+BAA+B,EACnD,SAAA,CAAAR,GACCU,EAAAA,IAACC,EAAAA,QAAA,CACC,UAAWH,EAAAA,QAAO,4BAA4B,EAC9C,KAAK,QACL,aAAW,OACX,QAASR,EACT,WAAOY,EAAAA,QAAA,C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EJ,CAAA,EACF,CAEJ"}
@@ -9,7 +9,7 @@ export interface RightSidebarHeaderProps {
9
9
  tag?: string;
10
10
  /** Tag visual style. Default: Info. */
11
11
  tagType?: TagType;
12
- /** Optional leading element shown before the title — typically a UserAvatar or Icon. */
12
+ /** Optional leading element shown before the title — typically a `UserAvatar` or an icon. When passing an icon, use `<Icon glyph={<SomeIcon />} size="20" />` to align with the title text. */
13
13
  leadingIcon?: ReactNode;
14
14
  /** When set, shows a back button and calls this on click. */
15
15
  onBack?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"RightSidebarHeader.d.ts","sourceRoot":"","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,cAAc,EACd,GAAG,EACH,OAAgB,EAChB,WAAW,EACX,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAoB,EACpB,SAAc,GACf,EAAE,uBAAuB,2CAiFzB"}
1
+ {"version":3,"file":"RightSidebarHeader.d.ts","sourceRoot":"","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+LAA+L;IAC/L,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,cAAc,EACd,GAAG,EACH,OAAgB,EAChB,WAAW,EACX,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAoB,EACpB,SAAc,GACf,EAAE,uBAAuB,2CAiFzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"RightSidebarHeader.js","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport ArrowBackIosIcon from '@mattermost/compass-icons/components/arrow-back-ios';\nimport ArrowExpandIcon from '@mattermost/compass-icons/components/arrow-expand';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport type { TagType } from '@/components/tag/Tag';\nimport styles from './RightSidebarHeader.module.scss';\n\nexport interface RightSidebarHeaderProps {\n /** Primary title text. */\n title: string;\n /** Secondary title shown to the right of a vertical divider (e.g. parent channel name). */\n secondaryTitle?: string;\n /** Optional tag rendered next to the title (e.g. \"BETA\"). */\n tag?: string;\n /** Tag visual style. Default: Info. */\n tagType?: TagType;\n /** Optional leading element shown before the title — typically a UserAvatar or Icon. */\n leadingIcon?: ReactNode;\n /** When set, shows a back button and calls this on click. */\n onBack?: () => void;\n /** When set, shows an expand button and calls this on click. */\n onExpand?: () => void;\n /** When set, shows a close button and calls this on click. */\n onClose?: () => void;\n /** Optional inline action label (e.g. \"Follow\"). */\n actionLabel?: string;\n /** Click handler for the action label. */\n onActionClick?: () => void;\n /** When true, the action button shows in its active state. */\n actionActive?: boolean;\n className?: string;\n}\n\nexport default function RightSidebarHeader({\n title,\n secondaryTitle,\n tag,\n tagType = 'info',\n leadingIcon,\n onBack,\n onExpand,\n onClose,\n actionLabel,\n onActionClick,\n actionActive = false,\n className = '',\n}: RightSidebarHeaderProps) {\n const rootClass = [styles['right-sidebar-header'], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div className={styles['right-sidebar-header__left']}>\n <div className={styles['right-sidebar-header__primary']}>\n {onBack && (\n <IconButton\n className={styles['right-sidebar-header__back']}\n size=\"small\"\n aria-label=\"Back\"\n onClick={onBack}\n icon={<Icon size=\"16\" glyph={<ArrowBackIosIcon />} />}\n />\n )}\n {leadingIcon && (\n <span className={styles['right-sidebar-header__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <span className={styles['right-sidebar-header__title']}>{title}</span>\n {tag && (\n <span className={styles['right-sidebar-header__tag']}>\n <Tag\n label={tag}\n type={tagType}\n size=\"x-small\"\n casing=\"all-caps\"\n />\n </span>\n )}\n </div>\n {secondaryTitle && (\n <div className={styles['right-sidebar-header__secondary']}>\n <span className={styles['right-sidebar-header__secondary-text']}>\n {secondaryTitle}\n </span>\n </div>\n )}\n </div>\n\n <div className={styles['right-sidebar-header__actions']}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[\n styles['right-sidebar-header__action'],\n actionActive\n ? styles['right-sidebar-header__action--active']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onActionClick}\n aria-pressed={actionActive ? true : undefined}\n >\n {actionLabel}\n </button>\n )}\n {onExpand && (\n <IconButton\n size=\"small\"\n aria-label=\"Expand\"\n onClick={onExpand}\n icon={<Icon size=\"16\" glyph={<ArrowExpandIcon />} />}\n />\n )}\n {onClose && (\n <IconButton\n size=\"small\"\n aria-label=\"Close\"\n onClick={onClose}\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["RightSidebarHeader","title","secondaryTitle","tag","tagType","leadingIcon","onBack","onExpand","onClose","actionLabel","onActionClick","actionActive","className","rootClass","styles","jsxs","jsx","IconButton","Icon","ArrowBackIosIcon","Tag","ArrowExpandIcon","CloseIcon"],"mappings":";;;;;;;;AAoCA,SAAwBA,EAAmB;AAAA,EACzC,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC,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QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAW;AAAA,YACTF,EAAO,8BAA8B;AAAA,YACrCH,IACIG,EAAO,sCAAsC,IAC7C;AAAA,UAAA,EAEH,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,UACX,SAASJ;AAAA,UACT,gBAAcC,IAAe,KAAO;AAAA,UAEnC,UAAAF;AAAA,QAAA;AAAA,MAAA;AAAA,MAGJF,KACC,gBAAAS;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,cAAW;AAAA,UACX,SAASV;AAAA,UACT,wBAAOW,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAF,EAACK,KAAgB,EAAA,CAAI;AAAA,QAAA;AAAA,MAAA;AAAA,MAGrDb,KACC,gBAAAQ;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,cAAW;AAAA,UACX,SAAST;AAAA,UACT,wBAAOU,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAF,EAACM,KAAU,EAAA,CAAI;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9C,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"RightSidebarHeader.js","sources":["../../../src/components/right-sidebar-header/RightSidebarHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport ArrowBackIosIcon from '@mattermost/compass-icons/components/arrow-back-ios';\nimport ArrowExpandIcon from '@mattermost/compass-icons/components/arrow-expand';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Tag from '@/components/tag/Tag';\nimport type { TagType } from '@/components/tag/Tag';\nimport styles from './RightSidebarHeader.module.scss';\n\nexport interface RightSidebarHeaderProps {\n /** Primary title text. */\n title: string;\n /** Secondary title shown to the right of a vertical divider (e.g. parent channel name). */\n secondaryTitle?: string;\n /** Optional tag rendered next to the title (e.g. \"BETA\"). */\n tag?: string;\n /** Tag visual style. Default: Info. */\n tagType?: TagType;\n /** Optional leading element shown before the title — typically a `UserAvatar` or an icon. When passing an icon, use `<Icon glyph={<SomeIcon />} size=\"20\" />` to align with the title text. */\n leadingIcon?: ReactNode;\n /** When set, shows a back button and calls this on click. */\n onBack?: () => void;\n /** When set, shows an expand button and calls this on click. */\n onExpand?: () => void;\n /** When set, shows a close button and calls this on click. */\n onClose?: () => void;\n /** Optional inline action label (e.g. \"Follow\"). */\n actionLabel?: string;\n /** Click handler for the action label. */\n onActionClick?: () => void;\n /** When true, the action button shows in its active state. */\n actionActive?: boolean;\n className?: string;\n}\n\nexport default function RightSidebarHeader({\n title,\n secondaryTitle,\n tag,\n tagType = 'info',\n leadingIcon,\n onBack,\n onExpand,\n onClose,\n actionLabel,\n onActionClick,\n actionActive = false,\n className = '',\n}: RightSidebarHeaderProps) {\n const rootClass = [styles['right-sidebar-header'], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass}>\n <div className={styles['right-sidebar-header__left']}>\n <div className={styles['right-sidebar-header__primary']}>\n {onBack && (\n <IconButton\n className={styles['right-sidebar-header__back']}\n size=\"small\"\n aria-label=\"Back\"\n onClick={onBack}\n icon={<Icon size=\"16\" glyph={<ArrowBackIosIcon />} />}\n />\n )}\n {leadingIcon && (\n <span className={styles['right-sidebar-header__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <span className={styles['right-sidebar-header__title']}>{title}</span>\n {tag && (\n <span className={styles['right-sidebar-header__tag']}>\n <Tag\n label={tag}\n type={tagType}\n size=\"x-small\"\n casing=\"all-caps\"\n />\n </span>\n )}\n </div>\n {secondaryTitle && (\n <div className={styles['right-sidebar-header__secondary']}>\n <span className={styles['right-sidebar-header__secondary-text']}>\n {secondaryTitle}\n </span>\n </div>\n )}\n </div>\n\n <div className={styles['right-sidebar-header__actions']}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[\n styles['right-sidebar-header__action'],\n actionActive\n ? styles['right-sidebar-header__action--active']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={onActionClick}\n aria-pressed={actionActive ? true : undefined}\n >\n {actionLabel}\n </button>\n )}\n {onExpand && (\n <IconButton\n size=\"small\"\n aria-label=\"Expand\"\n onClick={onExpand}\n icon={<Icon size=\"16\" glyph={<ArrowExpandIcon />} />}\n />\n )}\n {onClose && (\n <IconButton\n size=\"small\"\n aria-label=\"Close\"\n onClick={onClose}\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n />\n )}\n </div>\n </div>\n );\n}\n"],"names":["RightSidebarHeader","title","secondaryTitle","tag","tagType","leadingIcon","onBack","onExpand","onClose","actionLabel","onActionClick","actionActive","className","rootClass","styles","jsxs","jsx","IconButton","Icon","ArrowBackIosIcon","Tag","ArrowExpandIcon","CloseIcon"],"mappings":";;;;;;;;AAoCA,SAAwBA,EAAmB;AAAA,EACzC,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AACd,GAA4B;AAC1B,QAAMC,IAAY,CAACC,EAAO,sBAAsB,GAAGF,CAAS,EACzD,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAG,EAAC,OAAA,EAAI,WAAWF,GACd,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWD,EAAO,4BAA4B,GACjD,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWD,EAAO,+BAA+B,GACnD,UAAA;AAAA,QAAAR,KACC,gBAAAU;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,WAAWH,EAAO,4BAA4B;AAAA,YAC9C,MAAK;AAAA,YACL,cAAW;AAAA,YACX,SAASR;AAAA,YACT,wBAAOY,GAA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AAAQ;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,cAAW;AAAA,UACX,SAAST;AAAA,UACT,wBAAOU,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAF,EAACM,KAAU,EAAA,CAAI;AAAA,QAAA;AAAA,MAAA;AAAA,IAC9C,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":"onBAyCMA,EAAsD,CAC1D,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACC,IAAuB,EAAI,EACzD,cAAUF,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACE,IAAuB,EAAI,EAC5D,aAASH,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACG,IAAiB,EAAI,EACrD,cAAUJ,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACI,IAAuB,EAAI,EAC5D,WAAOL,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOC,EAAAA,IAACC,IAAuB,CAAA,CAAI,CAC3D,EAOA,SAAwBI,EAAc,CACpC,UAAAC,EAAY,GACZ,KAAAC,EAAO,OACP,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,qBAAAC,EACA,kBAAAC,EACA,UAAAC,CACF,EAAuB,CACrB,MAAMC,EAAYC,EAAAA,QAAO,wBAAwBV,EAAK,YAAA,CAAa,EAAE,EAE/DW,EAAY,CAACD,UAAO,gBAAgB,EAAGD,EAAWV,CAAS,EAC9D,OAAO,OAAO,EACd,KAAK,GAAG,EAELa,EAAeX,IAAS,OAAYA,EAAOV,EAAcS,CAAI,EAE7Da,EAAaT,GAAsB,MAAQE,GAAwB,KAEzE,OACEQ,EAAAA,KAAC,MAAA,CAAI,UAAWH,EACd,SAAA,CAAAG,EAAAA,KAAC,MAAA,CAAI,UAAWJ,EAAAA,QAAO,yBAAyB,EAC7C,SAAA,CAAAE,GAAgB,YACd,OAAA,CAAK,UAAWF,EAAAA,QAAO,sBAAsB,EAAG,cAAW,GACzD,SAAAE,CAAA,CACH,EAEFE,EAAAA,KAAC,MAAA,CAAI,UAAWJ,EAAAA,QAAO,sBAAsB,EAC3C,SAAA,CAAAjB,MAAC,IAAA,CAAE,UAAWiB,EAAAA,QAAO,uBAAuB,EAAI,SAAAR,EAAM,EACrDC,GAAe,MACdV,MAAC,MAAA,CAAI,UAAWiB,EAAAA,QAAO,6BAA6B,EACjD,SAAAP,EACH,EAEDU,GACCC,EAAAA,KAAC,MAAA,CAAI,UAAWJ,UAAO,yBAAyB,EAC7C,SAAA,CAAAN,GAAsB,MACrBX,EAAAA,IAACsB,EAAAA,QAAA,CACC,SAAS,UACT,KAAK,QACL,QAASV,EAER,SAAAD,CAAA,CAAA,EAGJE,GAAwB,MACvBb,EAAAA,IAACsB,EAAAA,QAAA,CACC,SAAS,YACT,KAAK,QACL,QAASR,EAER,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,EACF,EACCE,GAAa,MACZf,EAAAA,IAACuB,EAAAA,QAAA,CACC,UAAWN,EAAAA,QAAO,yBAAyB,EAC3C,aAAW,UACX,KAAK,QACL,WAAOlB,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACwB,IAAU,EAAI,EAC5C,QAAST,CAAA,CAAA,CACX,EAEJ,CAEJ"}
1
+ {"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size=\"20\" />` — the slot does not resize raw SVG children. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":"onBAyCMA,EAAsD,CAC1D,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACC,IAAuB,EAAI,EACzD,cAAUF,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACE,IAAuB,EAAI,EAC5D,aAASH,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACG,IAAiB,EAAI,EACrD,cAAUJ,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACI,IAAuB,EAAI,EAC5D,WAAOL,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOC,EAAAA,IAACC,IAAuB,CAAA,CAAI,CAC3D,EAOA,SAAwBI,EAAc,CACpC,UAAAC,EAAY,GACZ,KAAAC,EAAO,OACP,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,mBAAAC,EACA,gBAAAC,E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K,MAAOC,MAACwB,IAAU,EAAI,EAC5C,QAAST,CAAA,CAAA,CACX,EAEJ,CAEJ"}
@@ -5,7 +5,7 @@ export interface SectionNoticeProps {
5
5
  className?: string;
6
6
  /** Type controls color-coding. Default: Info. */
7
7
  type?: SectionNoticeType;
8
- /** Optional leading icon. When omitted a default type icon is shown. */
8
+ /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size="20" />` — the slot does not resize raw SVG children. */
9
9
  icon?: ReactNode;
10
10
  /** Title / headline text. */
11
11
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,qCAAqC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAUD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,SAAc,EACd,IAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,GACV,EAAE,kBAAkB,2CA6DpB"}
1
+ {"version":3,"file":"SectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,oKAAoK;IACpK,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,qCAAqC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAUD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,SAAc,EACd,IAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,GACV,EAAE,kBAAkB,2CA6DpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AAyCA,MAAMA,IAAsD;AAAA,EAC1D,wBAAOC,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,GAAI;AAAA,EACzD,2BAAUF,GAAA,EAA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AAAP,GACH;AAAA,QAEDU,KACC,gBAAAC,EAAC,OAAA,EAAI,WAAWJ,EAAO,yBAAyB,GAC7C,UAAA;AAAA,UAAAN,KAAsB,QACrB,gBAAAX;AAAA,YAACsB;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,MAAK;AAAA,cACL,SAASV;AAAA,cAER,UAAAD;AAAA,YAAA;AAAA,UAAA;AAAA,UAGJE,KAAwB,QACvB,gBAAAb;AAAA,YAACsB;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,MAAK;AAAA,cACL,SAASR;AAAA,cAER,UAAAD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH,EAAA,CAEJ;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IACCE,KAAa,QACZ,gBAAAf;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,WAAWN,EAAO,yBAAyB;AAAA,QAC3C,cAAW;AAAA,QACX,MAAK;AAAA,QACL,wBAAOlB,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACwB,KAAU,GAAI;AAAA,QAC5C,SAAST;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size=\"20\" />` — the slot does not resize raw SVG children. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AAyCA,MAAMA,IAAsD;AAAA,EAC1D,wBAAOC,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,GAAI;AAAA,EACzD,2BAAUF,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACE,KAAuB,GAAI;AAAA,EAC5D,0BAASH,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACG,KAAiB,GAAI;AAAA,EACrD,2BAAUJ,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACI,KAAuB,GAAI;AAAA,EAC5D,wBAAOL,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,EAAA,CAAI;AAC3D;AAOA,SAAwBI,EAAc;AAAA,EACpC,WAAAC,IAAY;AAAA,EACZ,MAAAC,I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,UAAAD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH,EAAA,CAEJ;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IACCE,KAAa,QACZ,gBAAAf;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,WAAWN,EAAO,yBAAyB;AAAA,QAC3C,cAAW;AAAA,QACX,MAAK;AAAA,QACL,wBAAOlB,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACwB,KAAU,GAAI;AAAA,QAC5C,SAAST;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),t=require("./Spinner.module.scss.cjs");function d({size:e=16,inverted:n=!1,className:r="","aria-label":a="Loading",style:i,...s}){const o=Math.max(1,Math.min(3,Math.round(e*.1))),l=[t.default.spinner,n?t.default["spinner--inverted"]:"",r].filter(Boolean).join(" ");return u.jsx("span",{className:l,role:"status","aria-label":a,style:{width:`${e}px`,height:`${e}px`,"--spinner-stroke-width":`${o}px`,...i},...s})}exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),t=require("./Spinner.module.scss.cjs");function p({size:n="16",inverted:r=!1,className:s="","aria-label":i="Loading",style:a,...o}){const e=Number(n),l=Math.max(1,Math.min(3,Math.round(e*.1))),u=[t.default.spinner,r?t.default["spinner--inverted"]:"",s].filter(Boolean).join(" ");return d.jsx("span",{className:u,role:"status","aria-label":i,style:{width:`${e}px`,height:`${e}px`,"--spinner-stroke-width":`${l}px`,...a},...o})}exports.default=p;
2
2
  //# sourceMappingURL=Spinner.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.cjs","sources":["../../../src/components/spinner/Spinner.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Spinner.module.scss';\n\nexport type SpinnerSize = 10 | 12 | 16 | 20 | 24 | 28 | 32;\n\nexport interface SpinnerProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'role'\n> {\n size?: SpinnerSize;\n inverted?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * A Spinner is the all-purpose indicator that something is happening but the duration is\n * unknown. It signals \"wait\" without claiming to know how long the wait will be.\n */\nexport default function Spinner({\n size = 16,\n inverted = false,\n className = '',\n 'aria-label': ariaLabel = 'Loading',\n style,\n ...htmlProps\n}: SpinnerProps) {\n const strokeWidth = Math.max(1, Math.min(3, Math.round(size * 0.1)));\n\n const rootClass = [\n styles.spinner,\n inverted ? styles['spinner--inverted'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n className={rootClass}\n role=\"status\"\n aria-label={ariaLabel}\n style={{\n width: `${size}px`,\n height: `${size}px`,\n ['--spinner-stroke-width' as string]: `${strokeWidth}px`,\n ...style,\n }}\n {...htmlProps}\n />\n );\n}\n"],"names":["Spinner","size","inverted","className","ariaLabel","style","htmlProps","strokeWidth","rootClass","styles","jsx"],"mappings":"wLAkBA,SAAwBA,EAAQ,CAC9B,KAAAC,EAAO,GACP,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,aAAcC,EAAY,UAC1B,MAAAC,EACA,GAAGC,CACL,EAAiB,CACf,MAAMC,EAAc,KAAK,IAAI,EAAG,KAAK,IAAI,EAAG,KAAK,MAAMN,EAAO,EAAG,CAAC,CAAC,EAE7DO,EAAY,CAChBC,EAAAA,QAAO,QACPP,EAAWO,EAAAA,QAAO,mBAAmB,EAAI,GACzCN,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEO,EAAAA,IAAC,OAAA,CACC,UAAWF,EACX,KAAK,SACL,aAAYJ,EACZ,MAAO,CACL,MAAO,GAAGH,CAAI,KACd,OAAQ,GAAGA,CAAI,KACd,yBAAqC,GAAGM,CAAW,KACpD,GAAGF,CAAA,EAEJ,GAAGC,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"Spinner.cjs","sources":["../../../src/components/spinner/Spinner.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Spinner.module.scss';\n\nexport type SpinnerSize = '10' | '12' | '16' | '20' | '24' | '28' | '32';\n\nexport interface SpinnerProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'role'\n> {\n size?: SpinnerSize;\n inverted?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * A Spinner is the all-purpose indicator that something is happening but the duration is\n * unknown. It signals \"wait\" without claiming to know how long the wait will be.\n */\nexport default function Spinner({\n size = '16',\n inverted = false,\n className = '',\n 'aria-label': ariaLabel = 'Loading',\n style,\n ...htmlProps\n}: SpinnerProps) {\n const sizePx = Number(size);\n const strokeWidth = Math.max(1, Math.min(3, Math.round(sizePx * 0.1)));\n\n const rootClass = [\n styles.spinner,\n inverted ? styles['spinner--inverted'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n className={rootClass}\n role=\"status\"\n aria-label={ariaLabel}\n style={{\n width: `${sizePx}px`,\n height: `${sizePx}px`,\n ['--spinner-stroke-width' as string]: `${strokeWidth}px`,\n ...style,\n }}\n {...htmlProps}\n />\n );\n}\n"],"names":["Spinner","size","inverted","className","ariaLabel","style","htmlProps","sizePx","strokeWidth","rootClass","styles","jsx"],"mappings":"wLAkBA,SAAwBA,EAAQ,CAC9B,KAAAC,EAAO,KACP,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,aAAcC,EAAY,UAC1B,MAAAC,EACA,GAAGC,CACL,EAAiB,CACf,MAAMC,EAAS,OAAON,CAAI,EACpBO,EAAc,KAAK,IAAI,EAAG,KAAK,IAAI,EAAG,KAAK,MAAMD,EAAS,EAAG,CAAC,CAAC,EAE/DE,EAAY,CAChBC,EAAAA,QAAO,QACPR,EAAWQ,EAAAA,QAAO,mBAAmB,EAAI,GACzCP,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEQ,EAAAA,IAAC,OAAA,CACC,UAAWF,EACX,KAAK,SACL,aAAYL,EACZ,MAAO,CACL,MAAO,GAAGG,CAAM,KAChB,OAAQ,GAAGA,CAAM,KAChB,yBAAqC,GAAGC,CAAW,KACpD,GAAGH,CAAA,EAEJ,GAAGC,CAAA,CAAA,CAGV"}
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- export type SpinnerSize = 10 | 12 | 16 | 20 | 24 | 28 | 32;
2
+ export type SpinnerSize = '10' | '12' | '16' | '20' | '24' | '28' | '32';
3
3
  export interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'role'> {
4
4
  size?: SpinnerSize;
5
5
  inverted?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE3D,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,eAAe,CAAC,EAC/B,MAAM,CACP;IACC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAS,EACT,QAAgB,EAChB,SAAc,EACd,YAAY,EAAE,SAAqB,EACnC,KAAK,EACL,GAAG,SAAS,EACb,EAAE,YAAY,2CAyBd"}
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzE,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,cAAc,CAAC,eAAe,CAAC,EAC/B,MAAM,CACP;IACC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAW,EACX,QAAgB,EAChB,SAAc,EACd,YAAY,EAAE,SAAqB,EACnC,KAAK,EACL,GAAG,SAAS,EACb,EAAE,YAAY,2CA0Bd"}
@@ -1,35 +1,35 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import a from "./Spinner.module.scss.js";
3
- function m({
4
- size: t = 16,
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import e from "./Spinner.module.scss.js";
3
+ function x({
4
+ size: s = "16",
5
5
  inverted: n = !1,
6
6
  className: r = "",
7
- "aria-label": e = "Loading",
8
- style: o,
9
- ...s
7
+ "aria-label": a = "Loading",
8
+ style: i,
9
+ ...o
10
10
  }) {
11
- const i = Math.max(1, Math.min(3, Math.round(t * 0.1))), l = [
12
- a.spinner,
13
- n ? a["spinner--inverted"] : "",
11
+ const t = Number(s), l = Math.max(1, Math.min(3, Math.round(t * 0.1))), p = [
12
+ e.spinner,
13
+ n ? e["spinner--inverted"] : "",
14
14
  r
15
15
  ].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ p(
16
+ return /* @__PURE__ */ h(
17
17
  "span",
18
18
  {
19
- className: l,
19
+ className: p,
20
20
  role: "status",
21
- "aria-label": e,
21
+ "aria-label": a,
22
22
  style: {
23
23
  width: `${t}px`,
24
24
  height: `${t}px`,
25
- "--spinner-stroke-width": `${i}px`,
26
- ...o
25
+ "--spinner-stroke-width": `${l}px`,
26
+ ...i
27
27
  },
28
- ...s
28
+ ...o
29
29
  }
30
30
  );
31
31
  }
32
32
  export {
33
- m as default
33
+ x as default
34
34
  };
35
35
  //# sourceMappingURL=Spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sources":["../../../src/components/spinner/Spinner.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Spinner.module.scss';\n\nexport type SpinnerSize = 10 | 12 | 16 | 20 | 24 | 28 | 32;\n\nexport interface SpinnerProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'role'\n> {\n size?: SpinnerSize;\n inverted?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * A Spinner is the all-purpose indicator that something is happening but the duration is\n * unknown. It signals \"wait\" without claiming to know how long the wait will be.\n */\nexport default function Spinner({\n size = 16,\n inverted = false,\n className = '',\n 'aria-label': ariaLabel = 'Loading',\n style,\n ...htmlProps\n}: SpinnerProps) {\n const strokeWidth = Math.max(1, Math.min(3, Math.round(size * 0.1)));\n\n const rootClass = [\n styles.spinner,\n inverted ? styles['spinner--inverted'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n className={rootClass}\n role=\"status\"\n aria-label={ariaLabel}\n style={{\n width: `${size}px`,\n height: `${size}px`,\n ['--spinner-stroke-width' as string]: `${strokeWidth}px`,\n ...style,\n }}\n {...htmlProps}\n />\n );\n}\n"],"names":["Spinner","size","inverted","className","ariaLabel","style","htmlProps","strokeWidth","rootClass","styles","jsx"],"mappings":";;AAkBA,SAAwBA,EAAQ;AAAA,EAC9B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,cAAcC,IAAY;AAAA,EAC1B,OAAAC;AAAA,EACA,GAAGC;AACL,GAAiB;AACf,QAAMC,IAAc,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAMN,IAAO,GAAG,CAAC,CAAC,GAE7DO,IAAY;AAAA,IAChBC,EAAO;AAAA,IACPP,IAAWO,EAAO,mBAAmB,IAAI;AAAA,IACzCN;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACX,MAAK;AAAA,MACL,cAAYJ;AAAA,MACZ,OAAO;AAAA,QACL,OAAO,GAAGH,CAAI;AAAA,QACd,QAAQ,GAAGA,CAAI;AAAA,QACd,0BAAqC,GAAGM,CAAW;AAAA,QACpD,GAAGF;AAAA,MAAA;AAAA,MAEJ,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"Spinner.js","sources":["../../../src/components/spinner/Spinner.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Spinner.module.scss';\n\nexport type SpinnerSize = '10' | '12' | '16' | '20' | '24' | '28' | '32';\n\nexport interface SpinnerProps extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'role'\n> {\n size?: SpinnerSize;\n inverted?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * A Spinner is the all-purpose indicator that something is happening but the duration is\n * unknown. It signals \"wait\" without claiming to know how long the wait will be.\n */\nexport default function Spinner({\n size = '16',\n inverted = false,\n className = '',\n 'aria-label': ariaLabel = 'Loading',\n style,\n ...htmlProps\n}: SpinnerProps) {\n const sizePx = Number(size);\n const strokeWidth = Math.max(1, Math.min(3, Math.round(sizePx * 0.1)));\n\n const rootClass = [\n styles.spinner,\n inverted ? styles['spinner--inverted'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n className={rootClass}\n role=\"status\"\n aria-label={ariaLabel}\n style={{\n width: `${sizePx}px`,\n height: `${sizePx}px`,\n ['--spinner-stroke-width' as string]: `${strokeWidth}px`,\n ...style,\n }}\n {...htmlProps}\n />\n );\n}\n"],"names":["Spinner","size","inverted","className","ariaLabel","style","htmlProps","sizePx","strokeWidth","rootClass","styles","jsx"],"mappings":";;AAkBA,SAAwBA,EAAQ;AAAA,EAC9B,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,cAAcC,IAAY;AAAA,EAC1B,OAAAC;AAAA,EACA,GAAGC;AACL,GAAiB;AACf,QAAMC,IAAS,OAAON,CAAI,GACpBO,IAAc,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAMD,IAAS,GAAG,CAAC,CAAC,GAE/DE,IAAY;AAAA,IAChBC,EAAO;AAAA,IACPR,IAAWQ,EAAO,mBAAmB,IAAI;AAAA,IACzCP;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACX,MAAK;AAAA,MACL,cAAYL;AAAA,MACZ,OAAO;AAAA,QACL,OAAO,GAAGG,CAAM;AAAA,QAChB,QAAQ,GAAGA,CAAM;AAAA,QAChB,0BAAqC,GAAGC,CAAW;AAAA,QACpD,GAAGH;AAAA,MAAA;AAAA,MAEJ,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Optional leading icon node. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":"oLA6BMA,EAAsC,CAC1C,QAASC,EAAAA,QAAO,mBAAmB,EACnC,KAAMA,EAAAA,QAAO,gBAAgB,EAC7B,WAAYA,EAAAA,QAAO,oBAAoB,EACvC,OAAQA,EAAAA,QAAO,kBAAkB,EACjC,QAASA,EAAAA,QAAO,mBAAmB,EACnC,QAASA,EAAAA,QAAO,mBAAmB,CACrC,EAOA,SAAwBC,EAAI,CAC1B,MAAAC,EACA,KAAAC,EAAO,UACP,KAAAC,EAAO,UACP,OAAAC,EAAS,aACT,YAAAC,EACA,UAAAC,EAAY,EACd,EAAa,CACX,MAAMC,EAAU,CACdR,EAAAA,QAAO,IACPD,EAAWI,CAAI,EACfC,IAAS,QACLJ,EAAAA,QAAO,iBAAiB,EACxBA,EAAAA,QAAO,mBAAmB,EAC9BK,IAAW,WAAaL,UAAO,sBAAsB,EAAI,GACzDO,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEE,EAAAA,KAAC,OAAA,CAAK,UAAWD,EACd,SAAA,CAAAF,GACCI,EAAAA,IAAC,QAAK,UAAWV,EAAAA,QAAO,UAAc,cAAW,GAC9C,SAAAM,CAAA,CACH,QAED,OAAA,CAAK,UAAWN,EAAAA,QAAO,WAAgB,SAAAE,CAAA,CAAM,CAAA,EAChD,CAEJ"}
1
+ {"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size=\"x-small\"` or `<GlobeIcon size={12} />` for `size=\"small\"`. Do not wrap in `<Icon>`. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":"oLA6BMA,EAAsC,CAC1C,QAASC,EAAAA,QAAO,mBAAmB,EACnC,KAAMA,EAAAA,QAAO,gBAAgB,EAC7B,WAAYA,EAAAA,QAAO,oBAAoB,EACvC,OAAQA,EAAAA,QAAO,kBAAkB,EACjC,QAASA,EAAAA,QAAO,mBAAmB,EACnC,QAASA,EAAAA,QAAO,mBAAmB,CACrC,EAOA,SAAwBC,EAAI,CAC1B,MAAAC,EACA,KAAAC,EAAO,UACP,KAAAC,EAAO,UACP,OAAAC,EAAS,aACT,YAAAC,EACA,UAAAC,EAAY,EACd,EAAa,CACX,MAAMC,EAAU,CACdR,EAAAA,QAAO,IACPD,EAAWI,CAAI,EACfC,IAAS,QACLJ,EAAAA,QAAO,iBAAiB,EACxBA,EAAAA,QAAO,mBAAmB,EAC9BK,IAAW,WAAaL,UAAO,sBAAsB,EAAI,GACzDO,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEE,EAAAA,KAAC,OAAA,CAAK,UAAWD,EACd,SAAA,CAAAF,GACCI,EAAAA,IAAC,QAAK,UAAWV,EAAAA,QAAO,UAAc,cAAW,GAC9C,SAAAM,CAAA,CACH,QAED,OAAA,CAAK,UAAWN,EAAAA,QAAO,WAAgB,SAAAE,CAAA,CAAM,CAAA,EAChD,CAEJ"}
@@ -11,7 +11,7 @@ export type TagProps = {
11
11
  size?: TagSize;
12
12
  /** Text casing. Default: Title Case. */
13
13
  casing?: TagCasing;
14
- /** Optional leading icon node. */
14
+ /** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size="x-small"` or `<GlobeIcon size={12} />` for `size="small"`. Do not wrap in `<Icon>`. */
15
15
  leadingIcon?: ReactNode;
16
16
  /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */
17
17
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,OAAO,GACf,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC1C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG;IACrB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kCAAkC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,KAAK,EACL,IAAgB,EAChB,IAAgB,EAChB,MAAqB,EACrB,WAAW,EACX,SAAc,GACf,EAAE,QAAQ,2CAuBV"}
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,OAAO,GACf,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC1C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG;IACrB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qLAAqL;IACrL,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,KAAK,EACL,IAAgB,EAChB,IAAgB,EAChB,MAAqB,EACrB,WAAW,EACX,SAAc,GACf,EAAE,QAAQ,2CAuBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Optional leading icon node. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":";;AA6BA,MAAMA,IAAsC;AAAA,EAC1C,SAASC,EAAO,mBAAmB;AAAA,EACnC,MAAMA,EAAO,gBAAgB;AAAA,EAC7B,YAAYA,EAAO,oBAAoB;AAAA,EACvC,QAAQA,EAAO,kBAAkB;AAAA,EACjC,SAASA,EAAO,mBAAmB;AAAA,EACnC,SAASA,EAAO,mBAAmB;AACrC;AAOA,SAAwBC,EAAI;AAAA,EAC1B,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAa;AACX,QAAMC,IAAU;AAAA,IACdR,EAAO;AAAA,IACPD,EAAWI,CAAI;AAAA,IACfC,MAAS,UACLJ,EAAO,iBAAiB,IACxBA,EAAO,mBAAmB;AAAA,IAC9BK,MAAW,aAAaL,EAAO,sBAAsB,IAAI;AAAA,IACzDO;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAE,EAAC,QAAA,EAAK,WAAWD,GACd,UAAA;AAAA,IAAAF,KACC,gBAAAI,EAAC,UAAK,WAAWV,EAAO,WAAc,eAAW,IAC9C,UAAAM,EAAA,CACH;AAAA,sBAED,QAAA,EAAK,WAAWN,EAAO,YAAgB,UAAAE,EAAA,CAAM;AAAA,EAAA,GAChD;AAEJ;"}
1
+ {"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size=\"x-small\"` or `<GlobeIcon size={12} />` for `size=\"small\"`. Do not wrap in `<Icon>`. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":";;AA6BA,MAAMA,IAAsC;AAAA,EAC1C,SAASC,EAAO,mBAAmB;AAAA,EACnC,MAAMA,EAAO,gBAAgB;AAAA,EAC7B,YAAYA,EAAO,oBAAoB;AAAA,EACvC,QAAQA,EAAO,kBAAkB;AAAA,EACjC,SAASA,EAAO,mBAAmB;AAAA,EACnC,SAASA,EAAO,mBAAmB;AACrC;AAOA,SAAwBC,EAAI;AAAA,EAC1B,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAa;AACX,QAAMC,IAAU;AAAA,IACdR,EAAO;AAAA,IACPD,EAAWI,CAAI;AAAA,IACfC,MAAS,UACLJ,EAAO,iBAAiB,IACxBA,EAAO,mBAAmB;AAAA,IAC9BK,MAAW,aAAaL,EAAO,sBAAsB,IAAI;AAAA,IACzDO;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAE,EAAC,QAAA,EAAK,WAAWD,GACd,UAAA;AAAA,IAAAF,KACC,gBAAAI,EAAC,UAAK,WAAWV,EAAO,WAAc,eAAW,IAC9C,UAAAM,EAAA,CACH;AAAA,sBAED,QAAA,EAAK,WAAWN,EAAO,YAAgB,UAAAE,EAAA,CAAM;AAAA,EAAA,GAChD;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.cjs","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon. */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":"iPAsCMA,EAAYC,EAAAA,WAChB,SACE,CACE,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,QAAAC,EAAU,GACV,UAAAC,EACA,mBAAAC,EAAqB,GACrB,GAAIC,EACJ,MAAOC,EACP,aAAAC,EACA,YAAAC,EACA,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAAKd,GAAUY,EACfG,EAAWC,EAAAA,OAAgC,IAAI,EAE/CC,EAAcC,EAAAA,YACjBC,GAAkC,CAEjC,GADAJ,EAAS,QAAUI,EACf,OAAOR,GAAQ,WAAY,CAC7B,MAAM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,EACJ3C,GAAsBD,GAAa,KAAO,GAAGgB,CAAE,WAAa,OAE9D,OACE6B,EAAAA,KAAC,MAAA,CAAI,UAAWH,EACd,SAAA,CAAAI,EAAAA,IAAC,MAAA,CAAI,UAAWV,EAAAA,QAAO,qBAAqB,EAC1C,gBAAC,QAAA,CAAM,UAAWA,EAAAA,QAAO,mBAAmB,EACzC,SAAA,CAAAxC,GAAS,MACRkD,MAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,mBAAmB,EAAI,SAAAxC,EAAM,EAEtDC,GAAe,MACdiD,MAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,0BAA0B,EAC/C,SAAAvC,EACH,EAEFiD,EAAAA,IAAC,QAAA,CACC,IAAK3B,EACL,GAAAH,EACA,UAAWoB,EAAAA,QAAO,mBAAmB,EACrC,MAAOb,EAAepB,EAAY,OAClC,aAAcoB,EAAe,OAAYnB,EACzC,YAAAC,EACA,UAAAL,EACA,SAAAS,EACA,SAAAC,EACA,eAAcX,EAAU,GAAO,OAC/B,mBACE,CAACY,EAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAExD,QAASZ,EACT,OAAQC,EACR,SAAUC,EACT,GAAGtB,CAAA,CAAA,EAELd,GAAgB,MACfgD,EAAAA,IAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,2BAA2B,EAChD,SAAAtC,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,EACCG,GAAsBD,GAAa,MAClC6C,EAAAA,KAAC,MAAA,CACC,GAAID,EACJ,UAAWR,EAAAA,QAAO,qBAAqB,EACvC,YAAU,SAET,SAAA,CAAAO,EAAc,MAAI3C,CAAA,CAAA,CAAA,CACrB,EAEJ,CAEJ,CACF"}
1
+ {"version":3,"file":"TextInput.cjs","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size=\"16\" />`). */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":"iPAsCMA,EAAYC,EAAAA,WAChB,SACE,CACE,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,QAAAC,EAAU,GACV,UAAAC,EACA,mBAAAC,EAAqB,GACrB,GAAIC,EACJ,MAAOC,EACP,aAAAC,EACA,YAAAC,EACA,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAAKd,GAAUY,EACfG,EAAWC,EAAAA,OAAgC,IAAI,EAE/CC,EAAcC,EAAAA,YACjBC,GAAkC,CAEjC,GADAJ,EAAS,QAAUI,EACf,OAAOR,GAAQ,WAAY,CAC7B,MAAMS,EAAWT,EAAsCQ,CAAI,EAC3D,MAAO,IAAM,CACXJ,EAAS,QAAU,KACf,OAAOK,GAAY,YAAYA,EAAA,CACrC,CACF,CACIT,MAAS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AAAA,IAAC,MAAA,CAAI,UAAWV,EAAAA,QAAO,qBAAqB,EAC1C,gBAAC,QAAA,CAAM,UAAWA,EAAAA,QAAO,mBAAmB,EACzC,SAAA,CAAAxC,GAAS,MACRkD,MAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,mBAAmB,EAAI,SAAAxC,EAAM,EAEtDC,GAAe,MACdiD,MAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,0BAA0B,EAC/C,SAAAvC,EACH,EAEFiD,EAAAA,IAAC,QAAA,CACC,IAAK3B,EACL,GAAAH,EACA,UAAWoB,EAAAA,QAAO,mBAAmB,EACrC,MAAOb,EAAepB,EAAY,OAClC,aAAcoB,EAAe,OAAYnB,EACzC,YAAAC,EACA,UAAAL,EACA,SAAAS,EACA,SAAAC,EACA,eAAcX,EAAU,GAAO,OAC/B,mBACE,CAACY,EAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAExD,QAASZ,EACT,OAAQC,EACR,SAAUC,EACT,GAAGtB,CAAA,CAAA,EAELd,GAAgB,MACfgD,EAAAA,IAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,2BAA2B,EAChD,SAAAtC,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,EACCG,GAAsBD,GAAa,MAClC6C,EAAAA,KAAC,MAAA,CACC,GAAID,EACJ,UAAWR,EAAAA,QAAO,qBAAqB,EACvC,YAAU,SAET,SAAA,CAAAO,EAAc,MAAI3C,CAAA,CAAA,CAAA,CACrB,EAEJ,CAEJ,CACF"}
@@ -15,7 +15,7 @@ export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
15
15
  showCharacterCount?: boolean;
16
16
  /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */
17
17
  size?: TextInputSize;
18
- /** Trailing icon. */
18
+ /** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size="16" />`). */
19
19
  trailingIcon?: ReactNode;
20
20
  }
21
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EAGV,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,CACP;IACC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+FAA+F;IAC/F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uFAAuF;IACvF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,qBAAqB;IACrB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED;;;GAGG;AACH,QAAA,MAAM,SAAS,6GAuJd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EAGV,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,CACP;IACC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+FAA+F;IAC/F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uFAAuF;IACvF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,sEAAsE;IACtE,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED;;;GAGG;AACH,QAAA,MAAM,SAAS,6GAuJd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon. */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":";;;;AAsCA,MAAMA,KAAYC;AAAA,EAChB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,O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coB,IAAe,SAAYnB;AAAA,YACzC,aAAAC;AAAA,YACA,WAAAL;AAAA,YACA,UAAAS;AAAA,YACA,UAAAC;AAAA,YACA,gBAAcX,IAAU,KAAO;AAAA,YAC/B,oBACE,CAACY,GAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,YAExD,SAASZ;AAAA,YACT,QAAQC;AAAA,YACR,UAAUC;AAAA,YACT,GAAGtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAELd,KAAgB,QACf,gBAAAgD,EAAC,QAAA,EAAK,WAAWV,EAAO,2BAA2B,GAChD,UAAAtC,EAAA,CACH;AAAA,MAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MACCG,KAAsBD,KAAa,QAClC,gBAAA6C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAID;AAAA,UACJ,WAAWR,EAAO,qBAAqB;AAAA,UACvC,aAAU;AAAA,UAET,UAAA;AAAA,YAAAO;AAAA,YAAc;AAAA,YAAI3C;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrB,GAEJ;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size=\"16\" />`). */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":";;;;AAsCA,MAAMA,KAAYC;AAAA,EAChB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,WAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,IAAIC;AAAA,IACJ,OAAOC;AAAA,IACP,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAcC,EAAA,GACdC,IAAKd,KAAUY,GACfG,IAAWC,EAAgC,IAAI,GAE/CC,IAAcC;AAAA,MAClB,CAACC,MAAkC;AAEjC,YADAJ,EAAS,UAAUI,GACf,OAAOR,KAAQ,YAAY;AAC7B,gBAAMS,IAAWT,EAAsCQ,CAAI;AAC3D,iBAAO,MAAM;AACX,YAAAJ,EAAS,UAAU,MACf,OAAOK,KAAY,cAAYA,EAAA;AAAA,UACrC;AAAA,QACF;AACA,QAAIT,QAAS,UAAUQ;AAAA,MACzB;AAAA,MACA,CAACR,CAAG;AAAA,IAAA,GAGAU,IAAepB,MAAc,QAC7B,CAACqB,GAAmBC,CAAoB,IAAIC;AAAA,MAChDtB,KAAgB;AAAA,IAAA,GAEZuB,IAAQJ,IAAgBpB,IAAuBqB,GAC/CI,IAAWD,KAAS,QAAQA,MAAU,IAEtC,CAACE,GAA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S,QACR,gBAAAkD,EAAC,QAAA,EAAK,WAAWV,EAAO,mBAAmB,GAAI,UAAAxC,GAAM;AAAA,QAEtDC,KAAe,QACd,gBAAAiD,EAAC,QAAA,EAAK,WAAWV,EAAO,0BAA0B,GAC/C,UAAAvC,GACH;AAAA,QAEF,gBAAAiD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAK3B;AAAA,YACL,IAAAH;AAAA,YACA,WAAWoB,EAAO,mBAAmB;AAAA,YACrC,OAAOb,IAAepB,IAAY;AAAA,YAClC,cAAcoB,IAAe,SAAYnB;AAAA,YACzC,aAAAC;AAAA,YACA,WAAAL;AAAA,YACA,UAAAS;AAAA,YACA,UAAAC;AAAA,YACA,gBAAcX,IAAU,KAAO;AAAA,YAC/B,oBACE,CAACY,GAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,YAExD,SAASZ;AAAA,YACT,QAAQC;AAAA,YACR,UAAUC;AAAA,YACT,GAAGtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAELd,KAAgB,QACf,gBAAAgD,EAAC,QAAA,EAAK,WAAWV,EAAO,2BAA2B,GAChD,UAAAtC,EAAA,CACH;AAAA,MAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MACCG,KAAsBD,KAAa,QAClC,gBAAA6C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAID;AAAA,UACJ,WAAWR,EAAO,qBAAqB;AAAA,UACvC,aAAU;AAAA,UAET,UAAA;AAAA,YAAAO;AAAA,YAAc;AAAA,YAAI3C;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrB,GAEJ;AAAA,EAEJ;AACF;"}
@@ -1 +1 @@
1
- ._thread-footer_953ir_2{--thread-footer-focus-ring-color: var(--focus-ring-color);display:flex;flex-direction:column;align-items:flex-start;padding:var(--spacing-s) var(--spacing-l)}._thread-footer__inner_953ir_9{display:inline-flex;align-items:center;padding:0 var(--spacing-s);border-radius:var(--radius-s)}._thread-footer__avatars-group_953ir_15{display:inline-flex;align-items:center;gap:var(--spacing-xxxs);padding-right:var(--spacing-xxxs)}._thread-footer__status-hint_953ir_21{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._thread-footer__unread-dot_953ir_32{display:block;width:8px;height:8px;border-radius:var(--radius-full);background-color:var(--link-color);flex-shrink:0}._thread-footer__mention-badge_953ir_40{display:inline-flex;flex-shrink:0}._thread-footer__buttons_953ir_44{display:inline-flex;align-items:center;gap:0}._thread-footer__reply-btn_953ir_49,._thread-footer__follow-btn_953ir_49{--focus-ring-color: var(--thread-footer-focus-ring-color)}._thread-footer_953ir_2 ._thread-footer__reply-btn_953ir_49[class*=button--emphasis-quaternary],._thread-footer_953ir_2 ._thread-footer__follow-btn_953ir_49:not(._thread-footer__follow-btn--following_953ir_52)[class*=button--emphasis-quaternary]{color:rgba(var(--center-channel-color-rgb),.75)}._thread-footer_953ir_2 ._thread-footer__reply-btn_953ir_49[class*=button--emphasis-quaternary]:hover:not(:disabled),._thread-footer_953ir_2 ._thread-footer__follow-btn_953ir_49:not(._thread-footer__follow-btn--following_953ir_52)[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_953ir_2 ._thread-footer__reply-btn--hovered_953ir_58[class*=button--emphasis-quaternary]{background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_953ir_2 ._thread-footer__follow-btn--following_953ir_52[class*=button--emphasis-quaternary]{color:var(--link-color);background-color:rgba(var(--link-color-rgb),.08)}._thread-footer_953ir_2 ._thread-footer__follow-btn--following_953ir_52[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--link-color-rgb),.12)}._thread-footer__btn-label_953ir_68{font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-semibold);line-height:15px;white-space:nowrap}._thread-footer__divider_953ir_75{box-sizing:border-box;width:1px;min-width:1px;max-width:1px;height:16px;padding:0;margin:0;border:0;background-color:rgba(var(--center-channel-color-rgb),.16);flex-shrink:0;transition:opacity var(--duration-quick) var(--ease-transition)}._thread-footer__buttons_953ir_44:has(._thread-footer__follow-btn--following_953ir_52)>._thread-footer__divider_953ir_75:first-of-type,._thread-footer__buttons_953ir_44:has(._thread-footer__follow-btn--following_953ir_52)>._thread-footer__last-reply-group_953ir_88>._thread-footer__divider_953ir_75{opacity:0}._thread-footer__buttons_953ir_44:not(:has(._thread-footer__follow-btn--following_953ir_52)):has(._thread-footer__reply-btn_953ir_49:hover,._thread-footer__reply-btn--hovered_953ir_58,._thread-footer__reply-btn_953ir_49:focus-visible,._thread-footer__follow-btn_953ir_49:hover,._thread-footer__follow-btn_953ir_49:focus-visible)>._thread-footer__divider_953ir_75:first-of-type{opacity:0}._thread-footer__last-reply-group_953ir_88{display:inline-flex;align-items:center;gap:0;overflow:hidden;max-width:0;opacity:0;transition:max-width var(--duration-quick) var(--ease-transition),opacity var(--duration-quick) var(--ease-transition)}._thread-footer--following_953ir_107:hover ._thread-footer__last-reply-group_953ir_88,._thread-footer--following_953ir_107:focus-within ._thread-footer__last-reply-group_953ir_88,._thread-footer--following_953ir_107._thread-footer--hovered_953ir_107 ._thread-footer__last-reply-group_953ir_88{max-width:10rem;opacity:1}._thread-footer__last-reply_953ir_88{padding:4.5px var(--spacing-s);color:rgba(var(--center-channel-color-rgb),.64);font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-regular);line-height:15px;white-space:nowrap}
1
+ ._thread-footer_k8u9j_2{--thread-footer-focus-ring-color: var(--focus-ring-color);display:flex;flex-direction:column;align-items:flex-start;padding:0 var(--spacing-l)}._thread-footer__inner_k8u9j_9{display:inline-flex;align-items:center;padding:0 var(--spacing-s);border-radius:var(--radius-s)}._thread-footer__avatars-group_k8u9j_15{display:inline-flex;align-items:center;gap:var(--spacing-xxxs);padding-right:var(--spacing-xxxs)}._thread-footer__status-hint_k8u9j_21{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._thread-footer__unread-dot_k8u9j_32{display:block;width:8px;height:8px;border-radius:var(--radius-full);background-color:var(--link-color);flex-shrink:0}._thread-footer__mention-badge_k8u9j_40{display:inline-flex;flex-shrink:0}._thread-footer__buttons_k8u9j_44{display:inline-flex;align-items:center;gap:0}._thread-footer__reply-btn_k8u9j_49,._thread-footer__follow-btn_k8u9j_49{--focus-ring-color: var(--thread-footer-focus-ring-color)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn_k8u9j_49[class*=button--emphasis-quaternary],._thread-footer_k8u9j_2 ._thread-footer__follow-btn_k8u9j_49:not(._thread-footer__follow-btn--following_k8u9j_52)[class*=button--emphasis-quaternary]{color:rgba(var(--center-channel-color-rgb),.75)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn_k8u9j_49[class*=button--emphasis-quaternary]:hover:not(:disabled),._thread-footer_k8u9j_2 ._thread-footer__follow-btn_k8u9j_49:not(._thread-footer__follow-btn--following_k8u9j_52)[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn--hovered_k8u9j_58[class*=button--emphasis-quaternary]{background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__follow-btn--following_k8u9j_52[class*=button--emphasis-quaternary]{color:var(--link-color);background-color:rgba(var(--link-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__follow-btn--following_k8u9j_52[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--link-color-rgb),.12)}._thread-footer__btn-label_k8u9j_68{font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-semibold);line-height:15px;white-space:nowrap}._thread-footer__divider_k8u9j_75{box-sizing:border-box;width:1px;min-width:1px;max-width:1px;height:16px;padding:0;margin:0;border:0;background-color:rgba(var(--center-channel-color-rgb),.16);flex-shrink:0;transition:opacity var(--duration-quick) var(--ease-transition)}._thread-footer__buttons_k8u9j_44:has(._thread-footer__follow-btn--following_k8u9j_52)>._thread-footer__divider_k8u9j_75:first-of-type,._thread-footer__buttons_k8u9j_44:has(._thread-footer__follow-btn--following_k8u9j_52)>._thread-footer__last-reply-group_k8u9j_88>._thread-footer__divider_k8u9j_75{opacity:0}._thread-footer__buttons_k8u9j_44:not(:has(._thread-footer__follow-btn--following_k8u9j_52)):has(._thread-footer__reply-btn_k8u9j_49:hover,._thread-footer__reply-btn--hovered_k8u9j_58,._thread-footer__reply-btn_k8u9j_49:focus-visible,._thread-footer__follow-btn_k8u9j_49:hover,._thread-footer__follow-btn_k8u9j_49:focus-visible)>._thread-footer__divider_k8u9j_75:first-of-type{opacity:0}._thread-footer__last-reply-group_k8u9j_88{display:inline-flex;align-items:center;gap:0;overflow:hidden;max-width:0;opacity:0;transition:max-width var(--duration-quick) var(--ease-transition),opacity var(--duration-quick) var(--ease-transition)}._thread-footer--following_k8u9j_107:hover ._thread-footer__last-reply-group_k8u9j_88,._thread-footer--following_k8u9j_107:focus-within ._thread-footer__last-reply-group_k8u9j_88,._thread-footer--following_k8u9j_107._thread-footer--hovered_k8u9j_107 ._thread-footer__last-reply-group_k8u9j_88{max-width:10rem;opacity:1}._thread-footer__last-reply_k8u9j_88{padding:4.5px var(--spacing-s);color:rgba(var(--center-channel-color-rgb),.64);font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-regular);line-height:15px;white-space:nowrap}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.module.css');const r={"thread-footer":"_thread-footer_953ir_2","thread-footer__inner":"_thread-footer__inner_953ir_9","thread-footer__avatars-group":"_thread-footer__avatars-group_953ir_15","thread-footer__status-hint":"_thread-footer__status-hint_953ir_21","thread-footer__unread-dot":"_thread-footer__unread-dot_953ir_32","thread-footer__mention-badge":"_thread-footer__mention-badge_953ir_40","thread-footer__buttons":"_thread-footer__buttons_953ir_44","thread-footer__reply-btn":"_thread-footer__reply-btn_953ir_49","thread-footer__follow-btn":"_thread-footer__follow-btn_953ir_49","thread-footer__follow-btn--following":"_thread-footer__follow-btn--following_953ir_52","thread-footer__reply-btn--hovered":"_thread-footer__reply-btn--hovered_953ir_58","thread-footer__btn-label":"_thread-footer__btn-label_953ir_68","thread-footer__divider":"_thread-footer__divider_953ir_75","thread-footer__last-reply-group":"_thread-footer__last-reply-group_953ir_88","thread-footer--following":"_thread-footer--following_953ir_107","thread-footer--hovered":"_thread-footer--hovered_953ir_107","thread-footer__last-reply":"_thread-footer__last-reply_953ir_88"};exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.module.css');const e={"thread-footer":"_thread-footer_k8u9j_2","thread-footer__inner":"_thread-footer__inner_k8u9j_9","thread-footer__avatars-group":"_thread-footer__avatars-group_k8u9j_15","thread-footer__status-hint":"_thread-footer__status-hint_k8u9j_21","thread-footer__unread-dot":"_thread-footer__unread-dot_k8u9j_32","thread-footer__mention-badge":"_thread-footer__mention-badge_k8u9j_40","thread-footer__buttons":"_thread-footer__buttons_k8u9j_44","thread-footer__reply-btn":"_thread-footer__reply-btn_k8u9j_49","thread-footer__follow-btn":"_thread-footer__follow-btn_k8u9j_49","thread-footer__follow-btn--following":"_thread-footer__follow-btn--following_k8u9j_52","thread-footer__reply-btn--hovered":"_thread-footer__reply-btn--hovered_k8u9j_58","thread-footer__btn-label":"_thread-footer__btn-label_k8u9j_68","thread-footer__divider":"_thread-footer__divider_k8u9j_75","thread-footer__last-reply-group":"_thread-footer__last-reply-group_k8u9j_88","thread-footer--following":"_thread-footer--following_k8u9j_107","thread-footer--hovered":"_thread-footer--hovered_k8u9j_107","thread-footer__last-reply":"_thread-footer__last-reply_k8u9j_88"};exports.default=e;
2
2
  //# sourceMappingURL=ThreadFooter.module.scss.cjs.map
@@ -1,23 +1,23 @@
1
- import './ThreadFooter.module.css';const r = {
2
- "thread-footer": "_thread-footer_953ir_2",
3
- "thread-footer__inner": "_thread-footer__inner_953ir_9",
4
- "thread-footer__avatars-group": "_thread-footer__avatars-group_953ir_15",
5
- "thread-footer__status-hint": "_thread-footer__status-hint_953ir_21",
6
- "thread-footer__unread-dot": "_thread-footer__unread-dot_953ir_32",
7
- "thread-footer__mention-badge": "_thread-footer__mention-badge_953ir_40",
8
- "thread-footer__buttons": "_thread-footer__buttons_953ir_44",
9
- "thread-footer__reply-btn": "_thread-footer__reply-btn_953ir_49",
10
- "thread-footer__follow-btn": "_thread-footer__follow-btn_953ir_49",
11
- "thread-footer__follow-btn--following": "_thread-footer__follow-btn--following_953ir_52",
12
- "thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--hovered_953ir_58",
13
- "thread-footer__btn-label": "_thread-footer__btn-label_953ir_68",
14
- "thread-footer__divider": "_thread-footer__divider_953ir_75",
15
- "thread-footer__last-reply-group": "_thread-footer__last-reply-group_953ir_88",
16
- "thread-footer--following": "_thread-footer--following_953ir_107",
17
- "thread-footer--hovered": "_thread-footer--hovered_953ir_107",
18
- "thread-footer__last-reply": "_thread-footer__last-reply_953ir_88"
1
+ import './ThreadFooter.module.css';const _ = {
2
+ "thread-footer": "_thread-footer_k8u9j_2",
3
+ "thread-footer__inner": "_thread-footer__inner_k8u9j_9",
4
+ "thread-footer__avatars-group": "_thread-footer__avatars-group_k8u9j_15",
5
+ "thread-footer__status-hint": "_thread-footer__status-hint_k8u9j_21",
6
+ "thread-footer__unread-dot": "_thread-footer__unread-dot_k8u9j_32",
7
+ "thread-footer__mention-badge": "_thread-footer__mention-badge_k8u9j_40",
8
+ "thread-footer__buttons": "_thread-footer__buttons_k8u9j_44",
9
+ "thread-footer__reply-btn": "_thread-footer__reply-btn_k8u9j_49",
10
+ "thread-footer__follow-btn": "_thread-footer__follow-btn_k8u9j_49",
11
+ "thread-footer__follow-btn--following": "_thread-footer__follow-btn--following_k8u9j_52",
12
+ "thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--hovered_k8u9j_58",
13
+ "thread-footer__btn-label": "_thread-footer__btn-label_k8u9j_68",
14
+ "thread-footer__divider": "_thread-footer__divider_k8u9j_75",
15
+ "thread-footer__last-reply-group": "_thread-footer__last-reply-group_k8u9j_88",
16
+ "thread-footer--following": "_thread-footer--following_k8u9j_107",
17
+ "thread-footer--hovered": "_thread-footer--hovered_k8u9j_107",
18
+ "thread-footer__last-reply": "_thread-footer__last-reply_k8u9j_88"
19
19
  };
20
20
  export {
21
- r as default
21
+ _ as default
22
22
  };
23
23
  //# sourceMappingURL=ThreadFooter.module.scss.js.map