@mattermost/compass-ui 0.1.0-alpha.20 → 0.1.0-alpha.21

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 (83) hide show
  1. package/dist/components/combobox/Combobox.cjs +1 -1
  2. package/dist/components/combobox/Combobox.cjs.map +1 -1
  3. package/dist/components/combobox/Combobox.d.ts +12 -0
  4. package/dist/components/combobox/Combobox.d.ts.map +1 -1
  5. package/dist/components/combobox/Combobox.js +226 -214
  6. package/dist/components/combobox/Combobox.js.map +1 -1
  7. package/dist/components/date-range-picker/DateRangePicker.css +1 -1
  8. package/dist/components/date-range-picker/DateRangePicker.module.scss.cjs +1 -1
  9. package/dist/components/date-range-picker/DateRangePicker.module.scss.js +26 -26
  10. package/dist/components/emoji-popover/EmojiPopover.css +1 -1
  11. package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs +1 -1
  12. package/dist/components/emoji-popover/EmojiPopover.module.scss.js +21 -21
  13. package/dist/components/menu-item/MenuItem.cjs.map +1 -1
  14. package/dist/components/menu-item/MenuItem.css +1 -1
  15. package/dist/components/menu-item/MenuItem.d.ts +6 -1
  16. package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
  17. package/dist/components/menu-item/MenuItem.js.map +1 -1
  18. package/dist/components/menu-item/MenuItem.module.scss.cjs +1 -1
  19. package/dist/components/menu-item/MenuItem.module.scss.js +18 -18
  20. package/dist/components/popover-menu/PopoverMenu.cjs +1 -1
  21. package/dist/components/popover-menu/PopoverMenu.cjs.map +1 -1
  22. package/dist/components/popover-menu/PopoverMenu.css +1 -1
  23. package/dist/components/popover-menu/PopoverMenu.d.ts +6 -2
  24. package/dist/components/popover-menu/PopoverMenu.d.ts.map +1 -1
  25. package/dist/components/popover-menu/PopoverMenu.js +29 -29
  26. package/dist/components/popover-menu/PopoverMenu.js.map +1 -1
  27. package/dist/components/popover-menu/PopoverMenu.module.scss.cjs +1 -1
  28. package/dist/components/popover-menu/PopoverMenu.module.scss.js +13 -12
  29. package/dist/components/popover-menu/PopoverMenu.module.scss.js.map +1 -1
  30. package/dist/components/profile-popover/ProfilePopover.css +1 -1
  31. package/dist/components/profile-popover/ProfilePopover.module.scss.cjs +1 -1
  32. package/dist/components/profile-popover/ProfilePopover.module.scss.js +33 -33
  33. package/dist/components/team-avatar/TeamAvatar.cjs +1 -1
  34. package/dist/components/team-avatar/TeamAvatar.cjs.map +1 -1
  35. package/dist/components/team-avatar/TeamAvatar.css +1 -1
  36. package/dist/components/team-avatar/TeamAvatar.d.ts +8 -1
  37. package/dist/components/team-avatar/TeamAvatar.d.ts.map +1 -1
  38. package/dist/components/team-avatar/TeamAvatar.js +23 -21
  39. package/dist/components/team-avatar/TeamAvatar.js.map +1 -1
  40. package/dist/components/team-avatar/TeamAvatar.module.scss.cjs +1 -1
  41. package/dist/components/team-avatar/TeamAvatar.module.scss.js +17 -16
  42. package/dist/components/team-avatar/TeamAvatar.module.scss.js.map +1 -1
  43. package/dist/components/team-avatar/index.d.ts +1 -1
  44. package/dist/components/team-avatar/index.d.ts.map +1 -1
  45. package/dist/components/tile-button/TileButton.cjs +2 -0
  46. package/dist/components/tile-button/TileButton.cjs.map +1 -0
  47. package/dist/components/tile-button/TileButton.css +1 -0
  48. package/dist/components/tile-button/TileButton.d.ts +54 -0
  49. package/dist/components/tile-button/TileButton.d.ts.map +1 -0
  50. package/dist/components/tile-button/TileButton.js +74 -0
  51. package/dist/components/tile-button/TileButton.js.map +1 -0
  52. package/dist/components/tile-button/TileButton.module.scss.cjs +2 -0
  53. package/dist/components/tile-button/TileButton.module.scss.cjs.map +1 -0
  54. package/dist/components/tile-button/TileButton.module.scss.js +12 -0
  55. package/dist/components/tile-button/TileButton.module.scss.js.map +1 -0
  56. package/dist/components/{action-button → tile-button}/index.cjs +1 -1
  57. package/dist/components/tile-button/index.d.ts +3 -0
  58. package/dist/components/tile-button/index.d.ts.map +1 -0
  59. package/dist/components/tile-button/index.js +5 -0
  60. package/dist/index.cjs +1 -1
  61. package/dist/index.d.ts +2 -2
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +24 -24
  64. package/dist/utils/slot.cjs.map +1 -1
  65. package/dist/utils/slot.d.ts +1 -1
  66. package/dist/utils/slot.js.map +1 -1
  67. package/package.json +4 -4
  68. package/dist/components/action-button/ActionButton.cjs +0 -2
  69. package/dist/components/action-button/ActionButton.cjs.map +0 -1
  70. package/dist/components/action-button/ActionButton.css +0 -1
  71. package/dist/components/action-button/ActionButton.d.ts +0 -54
  72. package/dist/components/action-button/ActionButton.d.ts.map +0 -1
  73. package/dist/components/action-button/ActionButton.js +0 -74
  74. package/dist/components/action-button/ActionButton.js.map +0 -1
  75. package/dist/components/action-button/ActionButton.module.scss.cjs +0 -2
  76. package/dist/components/action-button/ActionButton.module.scss.cjs.map +0 -1
  77. package/dist/components/action-button/ActionButton.module.scss.js +0 -12
  78. package/dist/components/action-button/ActionButton.module.scss.js.map +0 -1
  79. package/dist/components/action-button/index.d.ts +0 -3
  80. package/dist/components/action-button/index.d.ts.map +0 -1
  81. package/dist/components/action-button/index.js +0 -5
  82. /package/dist/components/{action-button → tile-button}/index.cjs.map +0 -0
  83. /package/dist/components/{action-button → tile-button}/index.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","sources":["../../../src/components/menu-item/MenuItem.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react';\nimport EmoticonHappyOutlineIcon from '@mattermost/compass-icons/components/emoticon-happy-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport Tag from '@/components/tag/Tag';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport type { DataAttributes } from '@/utils/props';\nimport styles from './MenuItem.module.scss';\n\nexport interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Primary label. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n label: ReactNode;\n /** Optional secondary label. */\n secondaryLabel?: ReactNode;\n /** Where the secondary label appears. Default: 'below'. */\n secondaryLabelPosition?: 'inline' | 'below';\n /** Custom content for the leading slot. When omitted, shows placeholder icon. When passing an icon, use `<Icon glyph={<SomeIcon />} />` — MenuItem provides the correct size via context. */\n leadingVisual?: ReactNode;\n /** Show the leading visual slot. Default: true. */\n leadingElement?: boolean;\n /** Custom content for the trailing slot. When omitted with trailingElement=true, shows check icon. When passing an icon, use `<Icon glyph={<SomeIcon />} />` — MenuItem provides the correct size via context. */\n trailingVisual?: ReactNode;\n /** Show the trailing visual slot. Default: false. */\n trailingElement?: boolean;\n /** Emoji character for custom status, shown inline after the label. */\n customStatusEmoji?: string;\n /** Show \"NEW\" label tag. */\n tag?: boolean;\n /** Text of the `tag`. Default: \"NEW\". */\n tagLabel?: ReactNode;\n /** Inline mention count badge. */\n mentionCount?: number;\n /** Destructive (danger) styling. */\n destructive?: boolean;\n /** Highlight row (e.g. submenu parent while child menu is open). */\n active?: boolean;\n}\n\n/**\n * Props a host menu (`Combobox`, `Select`) can set itself on a row: ARIA and\n * selection state, keyboard / pointer handling, and the values it reads from the\n * option object (`label`, `secondaryLabel`, `leadingVisual`, `disabled`). They\n * can't be overridden through `menuItemProps`. This is the full set; each host\n * sets only some of the handlers (`Combobox` uses `onClick`, `Select` uses\n * `onPointerUp`) and passes the other one through. `autoFocus` is excluded too:\n * the host keeps focus on its input / trigger, and a row that grabs focus on\n * mount would take it away.\n */\nexport type MenuItemOwnedProps =\n | 'id'\n | 'role'\n | 'aria-selected'\n | 'autoFocus'\n | 'label'\n | 'secondaryLabel'\n | 'leadingVisual'\n | 'leadingElement'\n | 'trailingElement'\n | 'disabled'\n | 'active'\n | 'children'\n | 'onClick'\n | 'onMouseDown'\n | 'onMouseEnter'\n | 'onPointerUp';\n\n/**\n * Every `MenuItem` prop a host menu doesn't own (`secondaryLabelPosition`,\n * `trailingVisual`, `tag`, `mentionCount`, `destructive`, `className`, …), so\n * props added to `MenuItem` reach `Combobox` / `Select` rows automatically.\n * `Owned` is the set the host sets itself (default: all of `MenuItemOwnedProps`);\n * a host narrows it so the handlers it doesn't supply can still be passed.\n */\nexport type MenuItemPassthroughProps<\n Owned extends keyof MenuItemProps = MenuItemOwnedProps,\n> = Partial<Omit<MenuItemProps, Owned>> & DataAttributes;\n\n/**\n * Menu Items are the rows inside a Menu — the smallest selectable unit in any dropdown,\n * kebab, or context menu. One label, optional supporting visuals, and a clear hit target.\n */\nconst MenuItem = forwardRef<HTMLButtonElement, MenuItemProps>(function MenuItem(\n {\n label,\n secondaryLabel,\n secondaryLabelPosition = 'below',\n leadingVisual,\n leadingElement = true,\n trailingVisual,\n trailingElement = false,\n customStatusEmoji,\n tag = false,\n tagLabel = 'NEW',\n mentionCount,\n destructive = false,\n active = false,\n className = '',\n disabled,\n type = 'button',\n ...rest\n },\n ref,\n) {\n const rootClass = [\n styles['menu-item'],\n destructive ? styles['menu-item--destructive'] : '',\n active ? styles['menu-item--active'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n ref={ref}\n className={rootClass}\n type={type}\n disabled={disabled}\n {...rest}\n >\n <div className={styles['menu-item__content']}>\n {leadingElement && (\n <div className={styles['menu-item__left']}>\n <span className={styles['menu-item__leading-visual']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '16' }}>\n {leadingVisual ?? (\n <Icon glyph={<EmoticonHappyOutlineIcon />} size=\"16\" />\n )}\n </IconSlotContext.Provider>\n </span>\n </div>\n )}\n <div className={styles['menu-item__middle']}>\n <div className={styles['menu-item__top-row']}>\n <span className={styles['menu-item__label']}>{label}</span>\n {secondaryLabel && secondaryLabelPosition === 'inline' && (\n <span className={styles['menu-item__secondary-label-inline']}>\n {secondaryLabel}\n </span>\n )}\n {customStatusEmoji && (\n <span className={styles['menu-item__custom-status']} aria-hidden>\n {customStatusEmoji}\n </span>\n )}\n {tag && <Tag label={tagLabel} />}\n {mentionCount != null && mentionCount > 0 && (\n <MentionBadge\n count={mentionCount}\n location=\"menu-item\"\n size=\"small\"\n />\n )}\n </div>\n {secondaryLabel && secondaryLabelPosition === 'below' && (\n <div className={styles['menu-item__bottom-row']}>\n <span className={styles['menu-item__secondary-label-below']}>\n {secondaryLabel}\n </span>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className={styles['menu-item__right']}>\n <span\n className={[\n styles['menu-item__trailing-visual'],\n !trailingVisual\n ? styles['menu-item__trailing-visual--check']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <IconSlotContext.Provider value={{ size: '16' }}>\n {trailingVisual ?? <Icon glyph={<CheckIcon />} size=\"16\" />}\n </IconSlotContext.Provider>\n </span>\n </div>\n )}\n </div>\n </button>\n );\n});\n\nMenuItem.displayName = 'MenuItem';\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","label","secondaryLabel","secondaryLabelPosition","leadingVisual","leadingElement","trailingVisual","trailingElement","customStatusEmoji","tag","tagLabel","mentionCount","destructive","active","className","disabled","type","rest","ref","rootClass","styles","jsx","jsxs","IconSlotContext","Icon","EmoticonHappyOutlineIcon","Tag","MentionBadge","CheckIcon"],"mappings":";;;;;;;;AAkFA,MAAMA,IAAWC,EAA6C,SAC5D;AAAA,EACE,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,wBAAAC,IAAyB;AAAA,EACzB,eAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,gBAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,mBAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,UAAAC,IAAW;AAAA,EACX,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAY;AAAA,IAChBC,EAAO,WAAW;AAAA,IAClBR,IAAcQ,EA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AS;AAAA,gBACT,MAAK;AAAA,cAAA;AAAA,YAAA;AAAA,UACP,GAEJ;AAAA,UACCT,KAAkBC,MAA2B,WAC5C,gBAAAkB,EAAC,OAAA,EAAI,WAAWD,EAAO,uBAAuB,GAC5C,UAAA,gBAAAC,EAAC,UAAK,WAAWD,EAAO,kCAAkC,GACvD,aACH,EAAA,CACF;AAAA,QAAA,GAEJ;AAAA,QACCb,KACC,gBAAAc,EAAC,OAAA,EAAI,WAAWD,EAAO,kBAAkB,GACvC,UAAA,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW;AAAA,cACTD,EAAO,4BAA4B;AAAA,cAClCd,IAEG,KADAc,EAAO,mCAAmC;AAAA,YAC1C,EAEH,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,YAEX,4BAACG,EAAgB,UAAhB,EAAyB,OAAO,EAAE,MAAM,KAAA,GACtC,UAAAjB,KAAkB,gBAAAe,EAACG,KAAK,OAAO,gBAAAH,EAACO,KAAU,GAAI,MAAK,MAAK,EAAA,CAC3D;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAED7B,EAAS,cAAc;"}
1
+ {"version":3,"file":"MenuItem.js","sources":["../../../src/components/menu-item/MenuItem.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react';\nimport EmoticonHappyOutlineIcon from '@mattermost/compass-icons/components/emoticon-happy-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport Icon from '@/components/icon/Icon';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport Tag from '@/components/tag/Tag';\nimport MentionBadge from '@/components/mention-badge/MentionBadge';\nimport type { DataAttributes } from '@/utils/props';\nimport styles from './MenuItem.module.scss';\n\nexport interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Primary label. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n label: ReactNode;\n /** Optional secondary label. */\n secondaryLabel?: ReactNode;\n /** Where the secondary label appears. Default: 'below'. */\n secondaryLabelPosition?: 'inline' | 'below';\n /**\n * Custom content for the leading slot. When omitted, shows placeholder icon.\n * When passing an icon, use `<Icon glyph={<SomeIcon />} />` — MenuItem provides\n * the correct size via context. A 24px avatar (User Avatar or Team Avatar)\n * fills the same slot as that icon, so the label stays on the same line.\n */\n leadingVisual?: ReactNode;\n /** Show the leading visual slot. Default: true. */\n leadingElement?: boolean;\n /** Custom content for the trailing slot. When omitted with trailingElement=true, shows check icon. When passing an icon, use `<Icon glyph={<SomeIcon />} />` — MenuItem provides the correct size via context. */\n trailingVisual?: ReactNode;\n /** Show the trailing visual slot. Default: false. */\n trailingElement?: boolean;\n /** Emoji character for custom status, shown inline after the label. */\n customStatusEmoji?: string;\n /** Show \"NEW\" label tag. */\n tag?: boolean;\n /** Text of the `tag`. Default: \"NEW\". */\n tagLabel?: ReactNode;\n /** Inline mention count badge. */\n mentionCount?: number;\n /** Destructive (danger) styling. */\n destructive?: boolean;\n /** Highlight row (e.g. submenu parent while child menu is open). */\n active?: boolean;\n}\n\n/**\n * Props a host menu (`Combobox`, `Select`) can set itself on a row: ARIA and\n * selection state, keyboard / pointer handling, and the values it reads from the\n * option object (`label`, `secondaryLabel`, `leadingVisual`, `disabled`). They\n * can't be overridden through `menuItemProps`. This is the full set; each host\n * sets only some of the handlers (`Combobox` uses `onClick`, `Select` uses\n * `onPointerUp`) and passes the other one through. `autoFocus` is excluded too:\n * the host keeps focus on its input / trigger, and a row that grabs focus on\n * mount would take it away.\n */\nexport type MenuItemOwnedProps =\n | 'id'\n | 'role'\n | 'aria-selected'\n | 'autoFocus'\n | 'label'\n | 'secondaryLabel'\n | 'leadingVisual'\n | 'leadingElement'\n | 'trailingElement'\n | 'disabled'\n | 'active'\n | 'children'\n | 'onClick'\n | 'onMouseDown'\n | 'onMouseEnter'\n | 'onPointerUp';\n\n/**\n * Every `MenuItem` prop a host menu doesn't own (`secondaryLabelPosition`,\n * `trailingVisual`, `tag`, `mentionCount`, `destructive`, `className`, …), so\n * props added to `MenuItem` reach `Combobox` / `Select` rows automatically.\n * `Owned` is the set the host sets itself (default: all of `MenuItemOwnedProps`);\n * a host narrows it so the handlers it doesn't supply can still be passed.\n */\nexport type MenuItemPassthroughProps<\n Owned extends keyof MenuItemProps = MenuItemOwnedProps,\n> = Partial<Omit<MenuItemProps, Owned>> & DataAttributes;\n\n/**\n * Menu Items are the rows inside a Menu — the smallest selectable unit in any dropdown,\n * kebab, or context menu. One label, optional supporting visuals, and a clear hit target.\n */\nconst MenuItem = forwardRef<HTMLButtonElement, MenuItemProps>(function MenuItem(\n {\n label,\n secondaryLabel,\n secondaryLabelPosition = 'below',\n leadingVisual,\n leadingElement = true,\n trailingVisual,\n trailingElement = false,\n customStatusEmoji,\n tag = false,\n tagLabel = 'NEW',\n mentionCount,\n destructive = false,\n active = false,\n className = '',\n disabled,\n type = 'button',\n ...rest\n },\n ref,\n) {\n const rootClass = [\n styles['menu-item'],\n destructive ? styles['menu-item--destructive'] : '',\n active ? styles['menu-item--active'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n ref={ref}\n className={rootClass}\n type={type}\n disabled={disabled}\n {...rest}\n >\n <div className={styles['menu-item__content']}>\n {leadingElement && (\n <div className={styles['menu-item__left']}>\n <span className={styles['menu-item__leading-visual']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '16' }}>\n {leadingVisual ?? (\n <Icon glyph={<EmoticonHappyOutlineIcon />} size=\"16\" />\n )}\n </IconSlotContext.Provider>\n </span>\n </div>\n )}\n <div className={styles['menu-item__middle']}>\n <div className={styles['menu-item__top-row']}>\n <span className={styles['menu-item__label']}>{label}</span>\n {secondaryLabel && secondaryLabelPosition === 'inline' && (\n <span className={styles['menu-item__secondary-label-inline']}>\n {secondaryLabel}\n </span>\n )}\n {customStatusEmoji && (\n <span className={styles['menu-item__custom-status']} aria-hidden>\n {customStatusEmoji}\n </span>\n )}\n {tag && <Tag label={tagLabel} />}\n {mentionCount != null && mentionCount > 0 && (\n <MentionBadge\n count={mentionCount}\n location=\"menu-item\"\n size=\"small\"\n />\n )}\n </div>\n {secondaryLabel && secondaryLabelPosition === 'below' && (\n <div className={styles['menu-item__bottom-row']}>\n <span className={styles['menu-item__secondary-label-below']}>\n {secondaryLabel}\n </span>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className={styles['menu-item__right']}>\n <span\n className={[\n styles['menu-item__trailing-visual'],\n !trailingVisual\n ? styles['menu-item__trailing-visual--check']\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <IconSlotContext.Provider value={{ size: '16' }}>\n {trailingVisual ?? <Icon glyph={<CheckIcon />} size=\"16\" />}\n </IconSlotContext.Provider>\n </span>\n </div>\n )}\n </div>\n </button>\n );\n});\n\nMenuItem.displayName = 'MenuItem';\n\nexport default MenuItem;\n"],"names":["MenuItem","forwardRef","label","secondaryLabel","secondaryLabelPosition","leadingVisual","leadingElement","trailingVisual","trailingElement","customStatusEmoji","tag","tagLabel","mentionCount","destructive","active","className","disabled","type","rest","ref","rootClass","styles","jsx","jsxs","IconSlotContext","Icon","EmoticonHappyOutlineIcon","Tag","MentionBadge","CheckIcon"],"mappings":";;;;;;;;AAuFA,MAAMA,IAAWC,EAA6C,SAC5D;AAAA,EACE,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,wBAAAC,IAAyB;AAAA,EACzB,eAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,gBAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,mBAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,UAAAC,IAAW;AAAA,EACX,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GACAC,GACA;AACA,QAAMC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AA,cAACM;AAAA,cAAA;AAAA,gBACC,OAAOhB;AAAA,gBACP,UAAS;AAAA,gBACT,MAAK;AAAA,cAAA;AAAA,YAAA;AAAA,UACP,GAEJ;AAAA,UACCT,KAAkBC,MAA2B,WAC5C,gBAAAkB,EAAC,OAAA,EAAI,WAAWD,EAAO,uBAAuB,GAC5C,UAAA,gBAAAC,EAAC,UAAK,WAAWD,EAAO,kCAAkC,GACvD,aACH,EAAA,CACF;AAAA,QAAA,GAEJ;AAAA,QACCb,KACC,gBAAAc,EAAC,OAAA,EAAI,WAAWD,EAAO,kBAAkB,GACvC,UAAA,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW;AAAA,cACTD,EAAO,4BAA4B;AAAA,cAClCd,IAEG,KADAc,EAAO,mCAAmC;AAAA,YAC1C,EAEH,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,YAEX,4BAACG,EAAgB,UAAhB,EAAyB,OAAO,EAAE,MAAM,KAAA,GACtC,UAAAjB,KAAkB,gBAAAe,EAACG,KAAK,OAAO,gBAAAH,EAACO,KAAU,GAAI,MAAK,MAAK,EAAA,CAC3D;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAED7B,EAAS,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./MenuItem.css');const e={"menu-item":"_menu-item_1ilsv_2","menu-item--active":"_menu-item--active_1ilsv_27","menu-item__leading-visual":"_menu-item__leading-visual_1ilsv_30","menu-item__trailing-visual":"_menu-item__trailing-visual_1ilsv_31","menu-item__content":"_menu-item__content_1ilsv_44","menu-item__left":"_menu-item__left_1ilsv_53","menu-item__trailing-visual--check":"_menu-item__trailing-visual--check_1ilsv_65","menu-item__middle":"_menu-item__middle_1ilsv_68","menu-item__top-row":"_menu-item__top-row_1ilsv_80","menu-item__label":"_menu-item__label_1ilsv_88","menu-item__secondary-label-inline":"_menu-item__secondary-label-inline_1ilsv_97","menu-item__bottom-row":"_menu-item__bottom-row_1ilsv_105","menu-item__secondary-label-below":"_menu-item__secondary-label-below_1ilsv_112","menu-item__custom-status":"_menu-item__custom-status_1ilsv_123","menu-item__right":"_menu-item__right_1ilsv_132","menu-item--destructive":"_menu-item--destructive_1ilsv_139"};exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./MenuItem.css');const e={"menu-item":"_menu-item_1nie0_2","menu-item--active":"_menu-item--active_1nie0_27","menu-item__leading-visual":"_menu-item__leading-visual_1nie0_30","menu-item__trailing-visual":"_menu-item__trailing-visual_1nie0_31","menu-item__content":"_menu-item__content_1nie0_44","menu-item__left":"_menu-item__left_1nie0_53","menu-item__trailing-visual--check":"_menu-item__trailing-visual--check_1nie0_82","menu-item__middle":"_menu-item__middle_1nie0_85","menu-item__top-row":"_menu-item__top-row_1nie0_97","menu-item__label":"_menu-item__label_1nie0_105","menu-item__secondary-label-inline":"_menu-item__secondary-label-inline_1nie0_114","menu-item__bottom-row":"_menu-item__bottom-row_1nie0_122","menu-item__secondary-label-below":"_menu-item__secondary-label-below_1nie0_129","menu-item__custom-status":"_menu-item__custom-status_1nie0_140","menu-item__right":"_menu-item__right_1nie0_149","menu-item--destructive":"_menu-item--destructive_1nie0_157"};exports.default=e;
2
2
  //# sourceMappingURL=MenuItem.module.scss.cjs.map
@@ -1,22 +1,22 @@
1
- import './MenuItem.css';const _ = {
2
- "menu-item": "_menu-item_1ilsv_2",
3
- "menu-item--active": "_menu-item--active_1ilsv_27",
4
- "menu-item__leading-visual": "_menu-item__leading-visual_1ilsv_30",
5
- "menu-item__trailing-visual": "_menu-item__trailing-visual_1ilsv_31",
6
- "menu-item__content": "_menu-item__content_1ilsv_44",
7
- "menu-item__left": "_menu-item__left_1ilsv_53",
8
- "menu-item__trailing-visual--check": "_menu-item__trailing-visual--check_1ilsv_65",
9
- "menu-item__middle": "_menu-item__middle_1ilsv_68",
10
- "menu-item__top-row": "_menu-item__top-row_1ilsv_80",
11
- "menu-item__label": "_menu-item__label_1ilsv_88",
12
- "menu-item__secondary-label-inline": "_menu-item__secondary-label-inline_1ilsv_97",
13
- "menu-item__bottom-row": "_menu-item__bottom-row_1ilsv_105",
14
- "menu-item__secondary-label-below": "_menu-item__secondary-label-below_1ilsv_112",
15
- "menu-item__custom-status": "_menu-item__custom-status_1ilsv_123",
16
- "menu-item__right": "_menu-item__right_1ilsv_132",
17
- "menu-item--destructive": "_menu-item--destructive_1ilsv_139"
1
+ import './MenuItem.css';const e = {
2
+ "menu-item": "_menu-item_1nie0_2",
3
+ "menu-item--active": "_menu-item--active_1nie0_27",
4
+ "menu-item__leading-visual": "_menu-item__leading-visual_1nie0_30",
5
+ "menu-item__trailing-visual": "_menu-item__trailing-visual_1nie0_31",
6
+ "menu-item__content": "_menu-item__content_1nie0_44",
7
+ "menu-item__left": "_menu-item__left_1nie0_53",
8
+ "menu-item__trailing-visual--check": "_menu-item__trailing-visual--check_1nie0_82",
9
+ "menu-item__middle": "_menu-item__middle_1nie0_85",
10
+ "menu-item__top-row": "_menu-item__top-row_1nie0_97",
11
+ "menu-item__label": "_menu-item__label_1nie0_105",
12
+ "menu-item__secondary-label-inline": "_menu-item__secondary-label-inline_1nie0_114",
13
+ "menu-item__bottom-row": "_menu-item__bottom-row_1nie0_122",
14
+ "menu-item__secondary-label-below": "_menu-item__secondary-label-below_1nie0_129",
15
+ "menu-item__custom-status": "_menu-item__custom-status_1nie0_140",
16
+ "menu-item__right": "_menu-item__right_1nie0_149",
17
+ "menu-item--destructive": "_menu-item--destructive_1nie0_157"
18
18
  };
19
19
  export {
20
- _ as default
20
+ e as default
21
21
  };
22
22
  //# sourceMappingURL=MenuItem.module.scss.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),p=require("react"),M=require("../../hooks/use-popover-transition.cjs"),P=require("../scrollbar/Scrollbar.cjs"),n=require("./PopoverMenu.module.scss.cjs");function j({variant:e="parent",open:o,onExited:r,children:s,className:v="",...f}){const{mounted:t,visible:d}=M.usePopoverTransition(o??!0),l=o!==void 0,a=p.useRef(t),i=p.useRef(r);if(i.current=r,p.useEffect(()=>{var c;a.current&&!t&&l&&((c=i.current)==null||c.call(i)),a.current=t},[t,l]),l&&!t)return null;const m=[n.default["popover-menu"],e==="child"?n.default["popover-menu--child"]:n.default["popover-menu--parent"],l&&n.default["popover-menu--transition"],l&&d&&n.default["popover-menu--visible"],v].filter(Boolean).join(" ");return u.jsx("div",{className:m,...f,children:s})}function _({maxHeight:e,children:o,className:r=""}){const s=typeof e=="number"?`${e}px`:e;return u.jsx(P.default,{className:[n.default["popover-menu__scroll"],r].filter(Boolean).join(" "),style:{maxHeight:s},children:o})}function T({children:e,className:o="",...r}){return u.jsx("p",{className:[n.default["popover-menu__title"],o].filter(Boolean).join(" "),...r,children:e})}function b({children:e,className:o="",...r}){return u.jsx("div",{role:"group",className:[n.default["popover-menu__group"],o].filter(Boolean).join(" "),...r,children:e})}function x({children:e,className:o="",...r}){return u.jsx("p",{className:[n.default["popover-menu__group-title"],o].filter(Boolean).join(" "),...r,children:e})}function B({className:e="",...o}){return u.jsx("div",{className:[n.default["popover-menu__divider"],e].filter(Boolean).join(" "),role:"separator",...o})}exports.PopoverMenuDivider=B;exports.PopoverMenuGroup=b;exports.PopoverMenuGroupTitle=x;exports.PopoverMenuScroll=_;exports.PopoverMenuTitle=T;exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),p=require("react"),_=require("../../hooks/use-popover-transition.cjs"),j=require("../scrollbar/Scrollbar.cjs"),r=require("./PopoverMenu.module.scss.cjs");function M({variant:e="parent",open:o,onExited:n,children:s,className:v="",...f}){const{mounted:t,visible:d}=_.usePopoverTransition(o??!0),l=o!==void 0,a=p.useRef(t),i=p.useRef(n);if(i.current=n,p.useEffect(()=>{var c;a.current&&!t&&l&&((c=i.current)==null||c.call(i)),a.current=t},[t,l]),l&&!t)return null;const m=[r.default["popover-menu"],e==="child"?r.default["popover-menu--child"]:r.default["popover-menu--parent"],l&&r.default["popover-menu--transition"],l&&d&&r.default["popover-menu--visible"],v].filter(Boolean).join(" ");return u.jsx("div",{className:m,...f,children:s})}function P({maxHeight:e,children:o,className:n=""}){const s=typeof e=="number"?`${e}px`:e;return u.jsx(j.default,{className:[r.default["popover-menu__scroll"],n].filter(Boolean).join(" "),style:{maxHeight:s},children:u.jsx("div",{className:r.default["popover-menu__scroll-content"],children:o})})}function x({children:e,className:o="",...n}){return u.jsx("p",{className:[r.default["popover-menu__title"],o].filter(Boolean).join(" "),...n,children:e})}function N({children:e,className:o="",...n}){return u.jsx("div",{role:"group",className:[r.default["popover-menu__group"],o].filter(Boolean).join(" "),...n,children:e})}function T({children:e,className:o="",...n}){return u.jsx("p",{className:[r.default["popover-menu__group-title"],o].filter(Boolean).join(" "),...n,children:e})}function b({className:e="",...o}){return u.jsx("div",{className:[r.default["popover-menu__divider"],e].filter(Boolean).join(" "),role:"separator",...o})}exports.PopoverMenuDivider=b;exports.PopoverMenuGroup=N;exports.PopoverMenuGroupTitle=T;exports.PopoverMenuScroll=P;exports.PopoverMenuTitle=x;exports.default=M;
2
2
  //# sourceMappingURL=PopoverMenu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverMenu.cjs","sources":["../../../src/components/popover-menu/PopoverMenu.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { usePopoverTransition } from '@/hooks/use-popover-transition';\nimport Scrollbar from '@/components/scrollbar/Scrollbar';\nimport styles from './PopoverMenu.module.scss';\n\nexport interface PopoverMenuProps extends HTMLAttributes<HTMLDivElement> {\n /** Parent menus use Elevation 4; nested child menus use Elevation 5. */\n variant?: 'parent' | 'child';\n /**\n * Controlled visibility with the Compass popover transition (scale + fade in,\n * reverse on close); the menu unmounts after the exit. Omit to always render\n * without transition. The host owns the state and positioning.\n */\n open?: boolean;\n /** Called after the exit transition finishes and the menu unmounts (only when `open` is controlled). */\n onExited?: () => void;\n children: ReactNode;\n}\n\n/**\n * Surface container for popover-style menus — border, fill, elevation, and width\n * constraints per Compass. Compose with {@link MenuItem} rows and optional\n * titles, group labels, and dividers. Use {@link PopoverMenuScroll} when the item\n * list should scroll while a {@link PopoverMenuTitle} stays pinned.\n */\nexport default function PopoverMenu({\n variant = 'parent',\n open,\n onExited,\n children,\n className = '',\n ...rest\n}: PopoverMenuProps) {\n const { mounted, visible } = usePopoverTransition(open ?? true);\n const transitioned = open !== undefined;\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n onExitedRef.current = onExited;\n\n useEffect(() => {\n if (wasMounted.current && !mounted && transitioned) {\n onExitedRef.current?.();\n }\n wasMounted.current = mounted;\n }, [mounted, transitioned]);\n\n if (transitioned && !mounted) return null;\n\n const rootClass = [\n styles['popover-menu'],\n variant === 'child'\n ? styles['popover-menu--child']\n : styles['popover-menu--parent'],\n transitioned && styles['popover-menu--transition'],\n transitioned && visible && styles['popover-menu--visible'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} {...rest}>\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuScrollProps {\n children: ReactNode;\n /** Maximum height of the scrollable region (coerces numbers to px). */\n maxHeight: string | number;\n className?: string;\n}\n\n/** Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`. */\nexport function PopoverMenuScroll({\n maxHeight,\n children,\n className = '',\n}: PopoverMenuScrollProps) {\n const maxH = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n return (\n <Scrollbar\n className={[styles['popover-menu__scroll'], className]\n .filter(Boolean)\n .join(' ')}\n style={{ maxHeight: maxH }}\n >\n {children}\n </Scrollbar>\n );\n}\n\nexport interface PopoverMenuTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional heading above menu items; keep pinned outside a scrolling body when using `maxHeight` on `PopoverMenu`. */\nexport function PopoverMenuTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuTitleProps) {\n return (\n <p\n className={[styles['popover-menu__title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport interface PopoverMenuGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Accessible label when the group has no visible `PopoverMenuGroupTitle`. */\n 'aria-label'?: string;\n}\n\n/** Groups related menu items. */\nexport function PopoverMenuGroup({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupProps) {\n return (\n <div\n role=\"group\"\n className={[styles['popover-menu__group'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuGroupTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional label for a `PopoverMenuGroup`. */\nexport function PopoverMenuGroupTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupTitleProps) {\n return (\n <p\n className={[styles['popover-menu__group-title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport type PopoverMenuDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/** Horizontal rule between groups or below a menu title. */\nexport function PopoverMenuDivider({\n className = '',\n ...rest\n}: PopoverMenuDividerProps) {\n return (\n <div\n className={[styles['popover-menu__divider'], className]\n .filter(Boolean)\n .join(' ')}\n role=\"separator\"\n {...rest}\n />\n );\n}\n"],"names":["PopoverMenu","variant","open","onExited","children","className","rest","mounted","visible","usePopoverTransition","transitioned","wasMounted","useRef","onExitedRef","useEffect","_a","rootClass","styles","PopoverMenuScroll","maxHeight","maxH","jsx","Scrollbar","PopoverMenuTitle","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CAC/B,SAAAnB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA0B,CACxB,OACEe,EAAAA,IAAC,IAAA,CACC,UAAW,CAACJ,UAAO,qBAAqB,EAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CASO,SAASoB,EAAiB,CAC/B,SAAApB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA0B,CACxB,OACEe,EAAAA,IAAC,MAAA,CACC,KAAK,QACL,UAAW,CAACJ,UAAO,qBAAqB,EAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CAOO,SAASqB,EAAsB,CACpC,SAAArB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA+B,CAC7B,OACEe,EAAAA,IAAC,IAAA,CACC,UAAW,CAACJ,UAAO,2BAA2B,EAAGZ,CAAS,EACvD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CAKO,SAASsB,EAAmB,CACjC,UAAArB,EAAY,GACZ,GAAGC,CACL,EAA4B,CAC1B,OACEe,EAAAA,IAAC,MAAA,CACC,UAAW,CAACJ,UAAO,uBAAuB,EAAGZ,CAAS,EACnD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,KAAK,YACJ,GAAGC,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"PopoverMenu.cjs","sources":["../../../src/components/popover-menu/PopoverMenu.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { usePopoverTransition } from '@/hooks/use-popover-transition';\nimport Scrollbar from '@/components/scrollbar/Scrollbar';\nimport styles from './PopoverMenu.module.scss';\n\nexport interface PopoverMenuProps extends HTMLAttributes<HTMLDivElement> {\n /** Parent menus use Elevation 4; nested child menus use Elevation 5. */\n variant?: 'parent' | 'child';\n /**\n * Controlled visibility with the Compass popover transition (scale + fade in,\n * reverse on close); the menu unmounts after the exit. Omit to always render\n * without transition. The host owns the state and positioning.\n */\n open?: boolean;\n /** Called after the exit transition finishes and the menu unmounts (only when `open` is controlled). */\n onExited?: () => void;\n children: ReactNode;\n}\n\n/**\n * Surface container for popover-style menus — border, fill, elevation, and width\n * constraints per Compass. Compose with {@link MenuItem} rows and optional\n * titles, group labels, and dividers. Use {@link PopoverMenuScroll} when the item\n * list should scroll while a {@link PopoverMenuTitle} stays pinned.\n */\nexport default function PopoverMenu({\n variant = 'parent',\n open,\n onExited,\n children,\n className = '',\n ...rest\n}: PopoverMenuProps) {\n const { mounted, visible } = usePopoverTransition(open ?? true);\n const transitioned = open !== undefined;\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n onExitedRef.current = onExited;\n\n useEffect(() => {\n if (wasMounted.current && !mounted && transitioned) {\n onExitedRef.current?.();\n }\n wasMounted.current = mounted;\n }, [mounted, transitioned]);\n\n if (transitioned && !mounted) return null;\n\n const rootClass = [\n styles['popover-menu'],\n variant === 'child'\n ? styles['popover-menu--child']\n : styles['popover-menu--parent'],\n transitioned && styles['popover-menu--transition'],\n transitioned && visible && styles['popover-menu--visible'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} {...rest}>\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuScrollProps {\n children: ReactNode;\n /** Maximum height of the scrollable region, including its vertical padding (coerces numbers to px). */\n maxHeight: string | number;\n className?: string;\n}\n\n/**\n * Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`.\n * It owns the menu's vertical padding, so the region runs edge to edge and rows scroll under the\n * border instead of stopping 8px short of it.\n */\nexport function PopoverMenuScroll({\n maxHeight,\n children,\n className = '',\n}: PopoverMenuScrollProps) {\n const maxH = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n return (\n <Scrollbar\n className={[styles['popover-menu__scroll'], className]\n .filter(Boolean)\n .join(' ')}\n style={{ maxHeight: maxH }}\n >\n <div className={styles['popover-menu__scroll-content']}>{children}</div>\n </Scrollbar>\n );\n}\n\nexport interface PopoverMenuTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional heading above menu items; keep pinned outside a scrolling body when using `maxHeight` on `PopoverMenu`. */\nexport function PopoverMenuTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuTitleProps) {\n return (\n <p\n className={[styles['popover-menu__title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport interface PopoverMenuGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Accessible label when the group has no visible `PopoverMenuGroupTitle`. */\n 'aria-label'?: string;\n}\n\n/** Groups related menu items. */\nexport function PopoverMenuGroup({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupProps) {\n return (\n <div\n role=\"group\"\n className={[styles['popover-menu__group'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuGroupTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional label for a `PopoverMenuGroup`. */\nexport function PopoverMenuGroupTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupTitleProps) {\n return (\n <p\n className={[styles['popover-menu__group-title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport type PopoverMenuDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/** Horizontal rule between groups or below a menu title. */\nexport function PopoverMenuDivider({\n className = '',\n ...rest\n}: PopoverMenuDividerProps) {\n return (\n <div\n className={[styles['popover-menu__divider'], className]\n .filter(Boolean)\n .join(' ')}\n role=\"separator\"\n {...rest}\n />\n );\n}\n"],"names":["PopoverMenu","variant","open","onExited","children","className","rest","mounted","visible","usePopoverTransition","transitioned","wasMounted","useRef","onExitedRef","useEffect","_a","rootClass","styles","PopoverMenuScroll","maxHeight","maxH","jsx","Scrollbar","PopoverMenuTitle","PopoverMenuGroup","PopoverMenuGroupTitle","PopoverMenuDivider"],"mappings":"ySA0BA,SAAwBA,EAAY,CAClC,QAAAC,EAAU,SACV,KAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAAqB,CACnB,KAAM,CAAE,QAAAC,EAAS,QAAAC,CAAA,EAAYC,EAAAA,qBAAqBP,GAAQ,EAAI,EACxDQ,EAAeR,IAAS,OACxBS,EAAaC,EAAAA,OAAOL,CAAO,EAC3BM,EAAcD,EAAAA,OAAOT,CAAQ,EAUnC,GATAU,EAAY,QAAUV,EAEtBW,EAAAA,UAAU,IAAM,OACVH,EAAW,SAAW,CAACJ,GAAWG,KACpCK,EAAAF,EAAY,UAAZ,MAAAE,EAAA,KAAAF,IAEFF,EAAW,QAAUJ,CACvB,EAAG,CAACA,EAASG,CAAY,CAAC,EAEtBA,GAAgB,CAACH,EAAS,OAAO,KAErC,MAAMS,EAAY,CAChBC,EAAAA,QAAO,cAAc,EACrBhB,IAAY,QACRgB,EAAAA,QAAO,qBAAqB,EAC5BA,EAAAA,QAAO,sBAAsB,EACjCP,GAAgBO,EAAAA,QAAO,0BAA0B,EACjDP,GAAgBF,GAAWS,EAAAA,QAAO,uBAAuB,EACzDZ,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,aACG,MAAA,CAAI,UAAWW,EAAY,GAAGV,EAC5B,SAAAF,EACH,CAEJ,CAcO,SAASc,EAAkB,CAChC,UAAAC,EACA,SAAAf,EACA,UAAAC,EAAY,EACd,EAA2B,CACzB,MAAMe,EAAO,OAAOD,GAAc,SAAW,GAAGA,CAAS,KAAOA,EAChE,OACEE,EAAAA,IAACC,EAAAA,QAAA,CACC,UAAW,CAACL,UAAO,sBAAsB,EAAGZ,CAAS,EAClD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,CAAE,UAAWe,CAAA,EAEpB,eAAC,MAAA,CAAI,UAAWH,UAAO,8BAA8B,EAAI,SAAAb,CAAA,CAAS,CAAA,CAAA,CAGxE,CAOO,SAASmB,EAAiB,CAC/B,SAAAnB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA0B,CACxB,OACEe,EAAAA,IAAC,IAAA,CACC,UAAW,CAACJ,UAAO,qBAAqB,EAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CASO,SAASoB,EAAiB,CAC/B,SAAApB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA0B,CACxB,OACEe,EAAAA,IAAC,MAAA,CACC,KAAK,QACL,UAAW,CAACJ,UAAO,qBAAqB,EAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CAOO,SAASqB,EAAsB,CACpC,SAAArB,EACA,UAAAC,EAAY,GACZ,GAAGC,CACL,EAA+B,CAC7B,OACEe,EAAAA,IAAC,IAAA,CACC,UAAW,CAACJ,UAAO,2BAA2B,EAAGZ,CAAS,EACvD,OAAO,OAAO,EACd,KAAK,GAAG,EACV,GAAGC,EAEH,SAAAF,CAAA,CAAA,CAGP,CAKO,SAASsB,EAAmB,CACjC,UAAArB,EAAY,GACZ,GAAGC,CACL,EAA4B,CAC1B,OACEe,EAAAA,IAAC,MAAA,CACC,UAAW,CAACJ,UAAO,uBAAuB,EAAGZ,CAAS,EACnD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,KAAK,YACJ,GAAGC,CAAA,CAAA,CAGV"}
@@ -1 +1 @@
1
- ._popover-menu_1tx2s_2{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;min-width:212px;max-width:496px;width:max-content;padding:var(--spacing-xs) 0;background-color:var(--center-channel-bg);border:1px solid rgba(var(--center-channel-color-rgb),.16);border-radius:var(--radius-s);color:var(--center-channel-color)}._popover-menu--parent_1tx2s_16{box-shadow:var(--elevation-4)}._popover-menu--child_1tx2s_19{box-shadow:var(--elevation-5)}._popover-menu--transition_1tx2s_22{opacity:0;transform:scale(.9);transform-origin:top left;pointer-events:none;transition:opacity var(--duration-quick) var(--ease-exit),transform var(--duration-quick) var(--ease-exit)}@media(prefers-reduced-motion:reduce){._popover-menu--transition_1tx2s_22{transform:none;transition:none}}._popover-menu--visible_1tx2s_35{opacity:1;transform:scale(1);pointer-events:auto;transition:opacity var(--duration-quick) var(--ease-entrance),transform var(--duration-quick) var(--ease-entrance)}@media(prefers-reduced-motion:reduce){._popover-menu--visible_1tx2s_35{transform:none;transition:none}}._popover-menu__scroll_1tx2s_47{min-height:0}._popover-menu__title_1tx2s_50{flex-shrink:0;margin:0;padding:var(--spacing-xxs) var(--spacing-l) var(--spacing-xs);font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-semibold);line-height:var(--line-height-75);letter-spacing:var(--letter-spacing-normal);color:rgba(var(--center-channel-color-rgb),.75)}._popover-menu__group_1tx2s_61{display:flex;flex-direction:column;align-items:stretch}._popover-menu__group-title_1tx2s_66{flex-shrink:0;margin:0;padding:var(--spacing-xxs) var(--spacing-l) var(--spacing-xxs);font-family:var(--font-family-body);font-size:var(--font-size-50);font-weight:var(--font-weight-semibold);line-height:var(--line-height-50);letter-spacing:.11px;text-transform:uppercase;color:rgba(var(--center-channel-color-rgb),.64)}._popover-menu__divider_1tx2s_78{flex-shrink:0;width:100%;padding:var(--spacing-xs) 0}._popover-menu__divider_1tx2s_78:before{content:"";display:block;width:100%;border-top:1px solid rgba(var(--center-channel-color-rgb),.12)}
1
+ ._popover-menu_1ato7_2{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;min-width:212px;max-width:496px;width:max-content;padding:var(--spacing-xs) 0;background-color:var(--center-channel-bg);border:1px solid rgba(var(--center-channel-color-rgb),.16);border-radius:var(--radius-m);color:var(--center-channel-color)}._popover-menu_1ato7_2:has(>._popover-menu__scroll_1ato7_16){padding:0;overflow:hidden}._popover-menu_1ato7_2:has(>._popover-menu__scroll_1ato7_16)>._popover-menu__title_1ato7_20:first-child{margin-top:var(--spacing-xs)}._popover-menu--parent_1ato7_23{box-shadow:var(--elevation-4)}._popover-menu--child_1ato7_26{box-shadow:var(--elevation-5)}._popover-menu--transition_1ato7_29{opacity:0;transform:scale(.9);transform-origin:top left;pointer-events:none;transition:opacity var(--duration-quick) var(--ease-exit),transform var(--duration-quick) var(--ease-exit)}@media(prefers-reduced-motion:reduce){._popover-menu--transition_1ato7_29{transform:none;transition:none}}._popover-menu--visible_1ato7_42{opacity:1;transform:scale(1);pointer-events:auto;transition:opacity var(--duration-quick) var(--ease-entrance),transform var(--duration-quick) var(--ease-entrance)}@media(prefers-reduced-motion:reduce){._popover-menu--visible_1ato7_42{transform:none;transition:none}}._popover-menu__scroll_1ato7_16{min-height:0}._popover-menu__scroll-content_1ato7_57{padding:var(--spacing-xs) 0}._popover-menu__title_1ato7_20{flex-shrink:0;margin:0;padding:var(--spacing-xxs) var(--spacing-l) var(--spacing-xs);font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-semibold);line-height:var(--line-height-75);letter-spacing:var(--letter-spacing-normal);color:rgba(var(--center-channel-color-rgb),.75)}._popover-menu__group_1ato7_71{display:flex;flex-direction:column;align-items:stretch}._popover-menu__group-title_1ato7_76{flex-shrink:0;margin:0;padding:var(--spacing-xxs) var(--spacing-l) var(--spacing-xxs);font-family:var(--font-family-body);font-size:var(--font-size-50);font-weight:var(--font-weight-semibold);line-height:var(--line-height-50);letter-spacing:.11px;text-transform:uppercase;color:rgba(var(--center-channel-color-rgb),.64)}._popover-menu__divider_1ato7_88{flex-shrink:0;width:100%;padding:var(--spacing-xs) 0}._popover-menu__divider_1ato7_88:before{content:"";display:block;width:100%;border-top:1px solid rgba(var(--center-channel-color-rgb),.12)}
@@ -21,11 +21,15 @@ export interface PopoverMenuProps extends HTMLAttributes<HTMLDivElement> {
21
21
  export default function PopoverMenu({ variant, open, onExited, children, className, ...rest }: PopoverMenuProps): import("react/jsx-runtime").JSX.Element | null;
22
22
  export interface PopoverMenuScrollProps {
23
23
  children: ReactNode;
24
- /** Maximum height of the scrollable region (coerces numbers to px). */
24
+ /** Maximum height of the scrollable region, including its vertical padding (coerces numbers to px). */
25
25
  maxHeight: string | number;
26
26
  className?: string;
27
27
  }
28
- /** Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`. */
28
+ /**
29
+ * Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`.
30
+ * It owns the menu's vertical padding, so the region runs edge to edge and rows scroll under the
31
+ * border instead of stopping 8px short of it.
32
+ */
29
33
  export declare function PopoverMenuScroll({ maxHeight, children, className, }: PopoverMenuScrollProps): import("react/jsx-runtime").JSX.Element;
30
34
  export interface PopoverMenuTitleProps extends HTMLAttributes<HTMLParagraphElement> {
31
35
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverMenu.d.ts","sourceRoot":"","sources":["../../../src/components/popover-menu/PopoverMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,wEAAwE;IACxE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wGAAwG;IACxG,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAc,EACd,GAAG,IAAI,EACR,EAAE,gBAAgB,kDAiClB;AAED,MAAM,WAAW,sBAAsB;IACrC,Q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AAS,CAAC;CACrB;AAED,+CAA+C;AAC/C,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,SAAc,EACd,GAAG,IAAI,EACR,EAAE,0BAA0B,2CAW5B;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAErE,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,EACjC,SAAc,EACd,GAAG,IAAI,EACR,EAAE,uBAAuB,2CAUzB"}
@@ -2,25 +2,25 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useRef as c, useEffect as _ } from "react";
3
3
  import { usePopoverTransition as j } from "../../hooks/use-popover-transition.js";
4
4
  import M from "../scrollbar/Scrollbar.js";
5
- import n from "./PopoverMenu.module.scss.js";
5
+ import r from "./PopoverMenu.module.scss.js";
6
6
  function T({
7
7
  variant: o = "parent",
8
8
  open: e,
9
- onExited: r,
9
+ onExited: n,
10
10
  children: l,
11
11
  className: m = "",
12
12
  ...v
13
13
  }) {
14
- const { mounted: u, visible: f } = j(e ?? !0), i = e !== void 0, s = c(u), p = c(r);
15
- if (p.current = r, _(() => {
14
+ const { mounted: i, visible: f } = j(e ?? !0), u = e !== void 0, s = c(i), p = c(n);
15
+ if (p.current = n, _(() => {
16
16
  var a;
17
- s.current && !u && i && ((a = p.current) == null || a.call(p)), s.current = u;
18
- }, [u, i]), i && !u) return null;
17
+ s.current && !i && u && ((a = p.current) == null || a.call(p)), s.current = i;
18
+ }, [i, u]), u && !i) return null;
19
19
  const d = [
20
- n["popover-menu"],
21
- o === "child" ? n["popover-menu--child"] : n["popover-menu--parent"],
22
- i && n["popover-menu--transition"],
23
- i && f && n["popover-menu--visible"],
20
+ r["popover-menu"],
21
+ o === "child" ? r["popover-menu--child"] : r["popover-menu--parent"],
22
+ u && r["popover-menu--transition"],
23
+ u && f && r["popover-menu--visible"],
24
24
  m
25
25
  ].filter(Boolean).join(" ");
26
26
  return /* @__PURE__ */ t("div", { className: d, ...v, children: l });
@@ -28,57 +28,57 @@ function T({
28
28
  function g({
29
29
  maxHeight: o,
30
30
  children: e,
31
- className: r = ""
31
+ className: n = ""
32
32
  }) {
33
33
  const l = typeof o == "number" ? `${o}px` : o;
34
34
  return /* @__PURE__ */ t(
35
35
  M,
36
36
  {
37
- className: [n["popover-menu__scroll"], r].filter(Boolean).join(" "),
37
+ className: [r["popover-menu__scroll"], n].filter(Boolean).join(" "),
38
38
  style: { maxHeight: l },
39
- children: e
39
+ children: /* @__PURE__ */ t("div", { className: r["popover-menu__scroll-content"], children: e })
40
40
  }
41
41
  );
42
42
  }
43
- function G({
43
+ function h({
44
44
  children: o,
45
45
  className: e = "",
46
- ...r
46
+ ...n
47
47
  }) {
48
48
  return /* @__PURE__ */ t(
49
49
  "p",
50
50
  {
51
- className: [n["popover-menu__title"], e].filter(Boolean).join(" "),
52
- ...r,
51
+ className: [r["popover-menu__title"], e].filter(Boolean).join(" "),
52
+ ...n,
53
53
  children: o
54
54
  }
55
55
  );
56
56
  }
57
- function S({
57
+ function G({
58
58
  children: o,
59
59
  className: e = "",
60
- ...r
60
+ ...n
61
61
  }) {
62
62
  return /* @__PURE__ */ t(
63
63
  "div",
64
64
  {
65
65
  role: "group",
66
- className: [n["popover-menu__group"], e].filter(Boolean).join(" "),
67
- ...r,
66
+ className: [r["popover-menu__group"], e].filter(Boolean).join(" "),
67
+ ...n,
68
68
  children: o
69
69
  }
70
70
  );
71
71
  }
72
- function h({
72
+ function S({
73
73
  children: o,
74
74
  className: e = "",
75
- ...r
75
+ ...n
76
76
  }) {
77
77
  return /* @__PURE__ */ t(
78
78
  "p",
79
79
  {
80
- className: [n["popover-menu__group-title"], e].filter(Boolean).join(" "),
81
- ...r,
80
+ className: [r["popover-menu__group-title"], e].filter(Boolean).join(" "),
81
+ ...n,
82
82
  children: o
83
83
  }
84
84
  );
@@ -90,7 +90,7 @@ function w({
90
90
  return /* @__PURE__ */ t(
91
91
  "div",
92
92
  {
93
- className: [n["popover-menu__divider"], o].filter(Boolean).join(" "),
93
+ className: [r["popover-menu__divider"], o].filter(Boolean).join(" "),
94
94
  role: "separator",
95
95
  ...e
96
96
  }
@@ -98,10 +98,10 @@ function w({
98
98
  }
99
99
  export {
100
100
  w as PopoverMenuDivider,
101
- S as PopoverMenuGroup,
102
- h as PopoverMenuGroupTitle,
101
+ G as PopoverMenuGroup,
102
+ S as PopoverMenuGroupTitle,
103
103
  g as PopoverMenuScroll,
104
- G as PopoverMenuTitle,
104
+ h as PopoverMenuTitle,
105
105
  T as default
106
106
  };
107
107
  //# sourceMappingURL=PopoverMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverMenu.js","sources":["../../../src/components/popover-menu/PopoverMenu.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { usePopoverTransition } from '@/hooks/use-popover-transition';\nimport Scrollbar from '@/components/scrollbar/Scrollbar';\nimport styles from './PopoverMenu.module.scss';\n\nexport interface PopoverMenuProps extends HTMLAttributes<HTMLDivElement> {\n /** Parent menus use Elevation 4; nested child menus use Elevation 5. */\n variant?: 'parent' | 'child';\n /**\n * Controlled visibility with the Compass popover transition (scale + fade in,\n * reverse on close); the menu unmounts after the exit. Omit to always render\n * without transition. The host owns the state and positioning.\n */\n open?: boolean;\n /** Called after the exit transition finishes and the menu unmounts (only when `open` is controlled). */\n onExited?: () => void;\n children: ReactNode;\n}\n\n/**\n * Surface container for popover-style menus — border, fill, elevation, and width\n * constraints per Compass. Compose with {@link MenuItem} rows and optional\n * titles, group labels, and dividers. Use {@link PopoverMenuScroll} when the item\n * list should scroll while a {@link PopoverMenuTitle} stays pinned.\n */\nexport default function PopoverMenu({\n variant = 'parent',\n open,\n onExited,\n children,\n className = '',\n ...rest\n}: PopoverMenuProps) {\n const { mounted, visible } = usePopoverTransition(open ?? true);\n const transitioned = open !== undefined;\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n onExitedRef.current = onExited;\n\n useEffect(() => {\n if (wasMounted.current && !mounted && transitioned) {\n onExitedRef.current?.();\n }\n wasMounted.current = mounted;\n }, [mounted, transitioned]);\n\n if (transitioned && !mounted) return null;\n\n const rootClass = [\n styles['popover-menu'],\n variant === 'child'\n ? styles['popover-menu--child']\n : styles['popover-menu--parent'],\n transitioned && styles['popover-menu--transition'],\n transitioned && visible && styles['popover-menu--visible'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} {...rest}>\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuScrollProps {\n children: ReactNode;\n /** Maximum height of the scrollable region (coerces numbers to px). */\n maxHeight: string | number;\n className?: string;\n}\n\n/** Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`. */\nexport function PopoverMenuScroll({\n maxHeight,\n children,\n className = '',\n}: PopoverMenuScrollProps) {\n const maxH = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n return (\n <Scrollbar\n className={[styles['popover-menu__scroll'], className]\n .filter(Boolean)\n .join(' ')}\n style={{ maxHeight: maxH }}\n >\n {children}\n </Scrollbar>\n );\n}\n\nexport interface PopoverMenuTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional heading above menu items; keep pinned outside a scrolling body when using `maxHeight` on `PopoverMenu`. */\nexport function PopoverMenuTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuTitleProps) {\n return (\n <p\n className={[styles['popover-menu__title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport interface PopoverMenuGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Accessible label when the group has no visible `PopoverMenuGroupTitle`. */\n 'aria-label'?: string;\n}\n\n/** Groups related menu items. */\nexport function PopoverMenuGroup({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupProps) {\n return (\n <div\n role=\"group\"\n className={[styles['popover-menu__group'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuGroupTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional label for a `PopoverMenuGroup`. */\nexport function PopoverMenuGroupTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupTitleProps) {\n return (\n <p\n className={[styles['popover-menu__group-title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport type PopoverMenuDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/** Horizontal rule between groups or below a menu title. */\nexport function PopoverMenuDivider({\n className = '',\n ...rest\n}: PopoverMenuDividerProps) {\n return (\n <div\n className={[styles['popover-menu__divider'], className]\n .filter(Boolean)\n .join(' ')}\n role=\"separator\"\n {...rest}\n />\n );\n}\n"],"names":["PopoverMenu","variant","open","onExited","children","className","rest","mounted","visible","usePopoverTransition","transitioned","wasMounted","useRef","onExitedRef","useEffect","_a","rootClass","styles","PopoverMenuScroll","maxHeight","maxH","jsx","Scrollbar","PopoverMenuTitle","PopoverMenuGroup","PopoverMenuGroupTitle","PopoverMenuDivider"],"mappings":";;;;;AA0BA,SAAwBA,EAAY;AAAA,EAClC,SAAAC,IAAU;AAAA,EACV,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAqB;AACnB,QAAM,EAAE,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAqBP,KAAQ,EAAI,GACxDQ,IAAeR,MAAS,QACxBS,IAAaC,EAAOL,CAAO,GAC3BM,IAAcD,EAAOT,CAAQ;AAUnC,MATAU,EAAY,UAAUV,GAEtBW,EAAU,MAAM;;AACd,IAAIH,EAAW,WAAW,CAACJ,KAAWG,OACpCK,IAAAF,EAAY,YAAZ,QAAAE,EAAA,KAAAF,KAEFF,EAAW,UAAUJ;AAAA,EACvB,GAAG,CAACA,GAASG,CAAY,CAAC,GAEtBA,KA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AO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAOO,SAASqB,EAAsB;AAAA,EACpC,UAAArB;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAA+B;AAC7B,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACJ,EAAO,2BAA2B,GAAGZ,CAAS,EACvD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAKO,SAASsB,EAAmB;AAAA,EACjC,WAAArB,IAAY;AAAA,EACZ,GAAGC;AACL,GAA4B;AAC1B,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACJ,EAAO,uBAAuB,GAAGZ,CAAS,EACnD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACX,MAAK;AAAA,MACJ,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"PopoverMenu.js","sources":["../../../src/components/popover-menu/PopoverMenu.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { usePopoverTransition } from '@/hooks/use-popover-transition';\nimport Scrollbar from '@/components/scrollbar/Scrollbar';\nimport styles from './PopoverMenu.module.scss';\n\nexport interface PopoverMenuProps extends HTMLAttributes<HTMLDivElement> {\n /** Parent menus use Elevation 4; nested child menus use Elevation 5. */\n variant?: 'parent' | 'child';\n /**\n * Controlled visibility with the Compass popover transition (scale + fade in,\n * reverse on close); the menu unmounts after the exit. Omit to always render\n * without transition. The host owns the state and positioning.\n */\n open?: boolean;\n /** Called after the exit transition finishes and the menu unmounts (only when `open` is controlled). */\n onExited?: () => void;\n children: ReactNode;\n}\n\n/**\n * Surface container for popover-style menus — border, fill, elevation, and width\n * constraints per Compass. Compose with {@link MenuItem} rows and optional\n * titles, group labels, and dividers. Use {@link PopoverMenuScroll} when the item\n * list should scroll while a {@link PopoverMenuTitle} stays pinned.\n */\nexport default function PopoverMenu({\n variant = 'parent',\n open,\n onExited,\n children,\n className = '',\n ...rest\n}: PopoverMenuProps) {\n const { mounted, visible } = usePopoverTransition(open ?? true);\n const transitioned = open !== undefined;\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n onExitedRef.current = onExited;\n\n useEffect(() => {\n if (wasMounted.current && !mounted && transitioned) {\n onExitedRef.current?.();\n }\n wasMounted.current = mounted;\n }, [mounted, transitioned]);\n\n if (transitioned && !mounted) return null;\n\n const rootClass = [\n styles['popover-menu'],\n variant === 'child'\n ? styles['popover-menu--child']\n : styles['popover-menu--parent'],\n transitioned && styles['popover-menu--transition'],\n transitioned && visible && styles['popover-menu--visible'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} {...rest}>\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuScrollProps {\n children: ReactNode;\n /** Maximum height of the scrollable region, including its vertical padding (coerces numbers to px). */\n maxHeight: string | number;\n className?: string;\n}\n\n/**\n * Scrollable region for long item lists; keeps a sibling title visible when used with `maxHeight`.\n * It owns the menu's vertical padding, so the region runs edge to edge and rows scroll under the\n * border instead of stopping 8px short of it.\n */\nexport function PopoverMenuScroll({\n maxHeight,\n children,\n className = '',\n}: PopoverMenuScrollProps) {\n const maxH = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;\n return (\n <Scrollbar\n className={[styles['popover-menu__scroll'], className]\n .filter(Boolean)\n .join(' ')}\n style={{ maxHeight: maxH }}\n >\n <div className={styles['popover-menu__scroll-content']}>{children}</div>\n </Scrollbar>\n );\n}\n\nexport interface PopoverMenuTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional heading above menu items; keep pinned outside a scrolling body when using `maxHeight` on `PopoverMenu`. */\nexport function PopoverMenuTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuTitleProps) {\n return (\n <p\n className={[styles['popover-menu__title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport interface PopoverMenuGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /** Accessible label when the group has no visible `PopoverMenuGroupTitle`. */\n 'aria-label'?: string;\n}\n\n/** Groups related menu items. */\nexport function PopoverMenuGroup({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupProps) {\n return (\n <div\n role=\"group\"\n className={[styles['popover-menu__group'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nexport interface PopoverMenuGroupTitleProps extends HTMLAttributes<HTMLParagraphElement> {\n children: ReactNode;\n}\n\n/** Optional label for a `PopoverMenuGroup`. */\nexport function PopoverMenuGroupTitle({\n children,\n className = '',\n ...rest\n}: PopoverMenuGroupTitleProps) {\n return (\n <p\n className={[styles['popover-menu__group-title'], className]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {children}\n </p>\n );\n}\n\nexport type PopoverMenuDividerProps = HTMLAttributes<HTMLDivElement>;\n\n/** Horizontal rule between groups or below a menu title. */\nexport function PopoverMenuDivider({\n className = '',\n ...rest\n}: PopoverMenuDividerProps) {\n return (\n <div\n className={[styles['popover-menu__divider'], className]\n .filter(Boolean)\n .join(' ')}\n role=\"separator\"\n {...rest}\n />\n );\n}\n"],"names":["PopoverMenu","variant","open","onExited","children","className","rest","mounted","visible","usePopoverTransition","transitioned","wasMounted","useRef","onExitedRef","useEffect","_a","rootClass","styles","PopoverMenuScroll","maxHeight","maxH","jsx","Scrollbar","PopoverMenuTitle","PopoverMenuGroup","PopoverMenuGroupTitle","PopoverMenuDivider"],"mappings":";;;;;AA0BA,SAAwBA,EAAY;AAAA,EAClC,SAAAC,IAAU;AAAA,EACV,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;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AAAA,EACZ,GAAGC;AACL,GAA0B;AACxB,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACJ,EAAO,qBAAqB,GAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AASO,SAASoB,EAAiB;AAAA,EAC/B,UAAApB;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAA0B;AACxB,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAW,CAACJ,EAAO,qBAAqB,GAAGZ,CAAS,EACjD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAOO,SAASqB,EAAsB;AAAA,EACpC,UAAArB;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAA+B;AAC7B,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACJ,EAAO,2BAA2B,GAAGZ,CAAS,EACvD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;AAKO,SAASsB,EAAmB;AAAA,EACjC,WAAArB,IAAY;AAAA,EACZ,GAAGC;AACL,GAA4B;AAC1B,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACJ,EAAO,uBAAuB,GAAGZ,CAAS,EACnD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACX,MAAK;AAAA,MACJ,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./PopoverMenu.css');const e={"popover-menu":"_popover-menu_1tx2s_2","popover-menu--parent":"_popover-menu--parent_1tx2s_16","popover-menu--child":"_popover-menu--child_1tx2s_19","popover-menu--transition":"_popover-menu--transition_1tx2s_22","popover-menu--visible":"_popover-menu--visible_1tx2s_35","popover-menu__scroll":"_popover-menu__scroll_1tx2s_47","popover-menu__title":"_popover-menu__title_1tx2s_50","popover-menu__group":"_popover-menu__group_1tx2s_61","popover-menu__group-title":"_popover-menu__group-title_1tx2s_66","popover-menu__divider":"_popover-menu__divider_1tx2s_78"};exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./PopoverMenu.css');const o={"popover-menu":"_popover-menu_1ato7_2","popover-menu__scroll":"_popover-menu__scroll_1ato7_16","popover-menu__title":"_popover-menu__title_1ato7_20","popover-menu--parent":"_popover-menu--parent_1ato7_23","popover-menu--child":"_popover-menu--child_1ato7_26","popover-menu--transition":"_popover-menu--transition_1ato7_29","popover-menu--visible":"_popover-menu--visible_1ato7_42","popover-menu__scroll-content":"_popover-menu__scroll-content_1ato7_57","popover-menu__group":"_popover-menu__group_1ato7_71","popover-menu__group-title":"_popover-menu__group-title_1ato7_76","popover-menu__divider":"_popover-menu__divider_1ato7_88"};exports.default=o;
2
2
  //# sourceMappingURL=PopoverMenu.module.scss.cjs.map
@@ -1,16 +1,17 @@
1
- import './PopoverMenu.css';const e = {
2
- "popover-menu": "_popover-menu_1tx2s_2",
3
- "popover-menu--parent": "_popover-menu--parent_1tx2s_16",
4
- "popover-menu--child": "_popover-menu--child_1tx2s_19",
5
- "popover-menu--transition": "_popover-menu--transition_1tx2s_22",
6
- "popover-menu--visible": "_popover-menu--visible_1tx2s_35",
7
- "popover-menu__scroll": "_popover-menu__scroll_1tx2s_47",
8
- "popover-menu__title": "_popover-menu__title_1tx2s_50",
9
- "popover-menu__group": "_popover-menu__group_1tx2s_61",
10
- "popover-menu__group-title": "_popover-menu__group-title_1tx2s_66",
11
- "popover-menu__divider": "_popover-menu__divider_1tx2s_78"
1
+ import './PopoverMenu.css';const o = {
2
+ "popover-menu": "_popover-menu_1ato7_2",
3
+ "popover-menu__scroll": "_popover-menu__scroll_1ato7_16",
4
+ "popover-menu__title": "_popover-menu__title_1ato7_20",
5
+ "popover-menu--parent": "_popover-menu--parent_1ato7_23",
6
+ "popover-menu--child": "_popover-menu--child_1ato7_26",
7
+ "popover-menu--transition": "_popover-menu--transition_1ato7_29",
8
+ "popover-menu--visible": "_popover-menu--visible_1ato7_42",
9
+ "popover-menu__scroll-content": "_popover-menu__scroll-content_1ato7_57",
10
+ "popover-menu__group": "_popover-menu__group_1ato7_71",
11
+ "popover-menu__group-title": "_popover-menu__group-title_1ato7_76",
12
+ "popover-menu__divider": "_popover-menu__divider_1ato7_88"
12
13
  };
13
14
  export {
14
- e as default
15
+ o as default
15
16
  };
16
17
  //# sourceMappingURL=PopoverMenu.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverMenu.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"PopoverMenu.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- @keyframes _profile-popover-enter_1k0p0_1{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@keyframes _profile-popover-exit_1k0p0_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}._profile-popover_1k0p0_22{position:relative;display:flex;flex-direction:column;width:272px;padding-top:var(--spacing-m);background-color:var(--center-channel-bg);border:1px solid rgba(var(--center-channel-color-rgb),.16);border-radius:var(--radius-s);box-shadow:var(--elevation-6);animation:_profile-popover-enter_1k0p0_1 var(--duration-quick) var(--ease-entrance)}._profile-popover--closing_1k0p0_34{animation:_profile-popover-exit_1k0p0_1 var(--duration-quick) var(--ease-exit) forwards}._profile-popover__role-tag_1k0p0_37{display:flex;padding:0 var(--spacing-m)}._profile-popover__close_1k0p0_41{position:absolute;top:var(--spacing-xs);right:var(--spacing-xs)}._profile-popover__primary_1k0p0_46{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-m) var(--spacing-l) var(--spacing-xxl);border-bottom:1px solid rgba(var(--center-channel-color-rgb),.08)}._profile-popover__last-online_1k0p0_54{margin:0;font-size:var(--font-size-50);line-height:var(--line-height-50);color:rgba(var(--center-channel-color-rgb),.64);text-align:center}._profile-popover__names_1k0p0_61{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xxxs);width:100%;text-align:center;color:var(--center-channel-color)}._profile-popover__name_1k0p0_61{margin:0;font-family:var(--font-family-heading);font-size:var(--font-size-400);line-height:var(--line-height-400);font-weight:var(--font-weight-semibold)}._profile-popover__handle_1k0p0_77,._profile-popover__title_1k0p0_77{margin:0;font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__secondary_1k0p0_82{display:flex;flex-direction:column;gap:var(--spacing-m);padding:var(--spacing-l);border-bottom:1px solid rgba(var(--center-channel-color-rgb),.08)}._profile-popover__titles_1k0p0_89{display:flex;flex-direction:column;gap:var(--spacing-xxs)}._profile-popover__meta-item_1k0p0_94{display:flex;align-items:center;gap:var(--spacing-m);overflow:hidden}._profile-popover__meta-item--stacked_1k0p0_100{align-items:flex-start}._profile-popover__meta-icon_1k0p0_103{display:inline-flex;flex-shrink:0;color:var(--center-channel-color)}._profile-popover__phone-body_1k0p0_108{display:flex;flex-direction:column;gap:var(--spacing-xxxxs);flex:1 0 0;min-width:0}._profile-popover__phone-body_1k0p0_108 ._profile-popover__meta-link_1k0p0_115{flex:none;width:100%}._profile-popover__phone-sub_1k0p0_119{font-size:var(--font-size-75);line-height:var(--line-height-75);color:rgba(var(--center-channel-color-rgb),.75)}._profile-popover__meta-text_1k0p0_124,._profile-popover__meta-link_1k0p0_115{flex:1 0 0;min-width:0;font-size:var(--font-size-100);line-height:var(--line-height-100);color:var(--center-channel-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._profile-popover__meta-link_1k0p0_115{color:var(--link-color);text-decoration:none}._profile-popover__meta-link_1k0p0_115:hover{text-decoration:underline}._profile-popover_1k0p0_22 button._profile-popover__meta-link_1k0p0_115{padding:0;background:none;border:0;font:inherit;text-align:left;cursor:pointer}._profile-popover__section-label_1k0p0_149{margin:0;font-size:var(--font-size-50);line-height:var(--line-height-50);font-weight:var(--font-weight-semibold);color:var(--center-channel-color)}._profile-popover__local-time_1k0p0_156,._profile-popover__custom-status_1k0p0_156{display:flex;flex-direction:column;gap:var(--spacing-xxxs);color:var(--center-channel-color)}._profile-popover__time_1k0p0_162{display:flex;gap:var(--spacing-xxxs);font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__status-row_1k0p0_168{display:flex;align-items:center;gap:var(--spacing-xs);font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__status-emoji_1k0p0_175{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-size-16);height:var(--icon-size-16);font-size:var(--font-size-200);line-height:1}._profile-popover__footer_1k0p0_184{display:flex;padding:var(--spacing-l)}._profile-popover__footer--others_1k0p0_188{align-items:center;justify-content:space-between}._profile-popover__footer--you_1k0p0_192{align-items:flex-start;gap:var(--spacing-xs)}._profile-popover__primary-action_1k0p0_196{display:flex}._profile-popover__primary-action--others_1k0p0_199{width:132px;flex-shrink:0}._profile-popover__primary-action--you_1k0p0_203{flex:1 0 0;min-width:0}._profile-popover__primary-button_1k0p0_207{width:100%}._profile-popover__secondary-actions_1k0p0_210{display:flex;align-items:center;gap:var(--spacing-xxxxs)}
1
+ @keyframes _profile-popover-enter_1r9ql_1{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@keyframes _profile-popover-exit_1r9ql_1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}._profile-popover_1r9ql_22{position:relative;display:flex;flex-direction:column;width:272px;padding-top:var(--spacing-m);background-color:var(--center-channel-bg);border:1px solid rgba(var(--center-channel-color-rgb),.16);border-radius:var(--radius-m);box-shadow:var(--elevation-6);animation:_profile-popover-enter_1r9ql_1 var(--duration-quick) var(--ease-entrance)}._profile-popover--closing_1r9ql_34{animation:_profile-popover-exit_1r9ql_1 var(--duration-quick) var(--ease-exit) forwards}._profile-popover__role-tag_1r9ql_37{display:flex;padding:0 var(--spacing-m)}._profile-popover__close_1r9ql_41{position:absolute;top:var(--spacing-xs);right:var(--spacing-xs)}._profile-popover__primary_1r9ql_46{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-m) var(--spacing-l) var(--spacing-xxl);border-bottom:1px solid rgba(var(--center-channel-color-rgb),.08)}._profile-popover__last-online_1r9ql_54{margin:0;font-size:var(--font-size-50);line-height:var(--line-height-50);color:rgba(var(--center-channel-color-rgb),.64);text-align:center}._profile-popover__names_1r9ql_61{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xxxs);width:100%;text-align:center;color:var(--center-channel-color)}._profile-popover__name_1r9ql_61{margin:0;font-family:var(--font-family-heading);font-size:var(--font-size-400);line-height:var(--line-height-400);font-weight:var(--font-weight-semibold)}._profile-popover__handle_1r9ql_77,._profile-popover__title_1r9ql_77{margin:0;font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__secondary_1r9ql_82{display:flex;flex-direction:column;gap:var(--spacing-m);padding:var(--spacing-l);border-bottom:1px solid rgba(var(--center-channel-color-rgb),.08)}._profile-popover__titles_1r9ql_89{display:flex;flex-direction:column;gap:var(--spacing-xxs)}._profile-popover__meta-item_1r9ql_94{display:flex;align-items:center;gap:var(--spacing-m);overflow:hidden}._profile-popover__meta-item--stacked_1r9ql_100{align-items:flex-start}._profile-popover__meta-icon_1r9ql_103{display:inline-flex;flex-shrink:0;color:var(--center-channel-color)}._profile-popover__phone-body_1r9ql_108{display:flex;flex-direction:column;gap:var(--spacing-xxxxs);flex:1 0 0;min-width:0}._profile-popover__phone-body_1r9ql_108 ._profile-popover__meta-link_1r9ql_115{flex:none;width:100%}._profile-popover__phone-sub_1r9ql_119{font-size:var(--font-size-75);line-height:var(--line-height-75);color:rgba(var(--center-channel-color-rgb),.75)}._profile-popover__meta-text_1r9ql_124,._profile-popover__meta-link_1r9ql_115{flex:1 0 0;min-width:0;font-size:var(--font-size-100);line-height:var(--line-height-100);color:var(--center-channel-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._profile-popover__meta-link_1r9ql_115{color:var(--link-color);text-decoration:none}._profile-popover__meta-link_1r9ql_115:hover{text-decoration:underline}._profile-popover_1r9ql_22 button._profile-popover__meta-link_1r9ql_115{padding:0;background:none;border:0;font:inherit;text-align:left;cursor:pointer}._profile-popover__section-label_1r9ql_149{margin:0;font-size:var(--font-size-50);line-height:var(--line-height-50);font-weight:var(--font-weight-semibold);color:var(--center-channel-color)}._profile-popover__local-time_1r9ql_156,._profile-popover__custom-status_1r9ql_156{display:flex;flex-direction:column;gap:var(--spacing-xxxs);color:var(--center-channel-color)}._profile-popover__time_1r9ql_162{display:flex;gap:var(--spacing-xxxs);font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__status-row_1r9ql_168{display:flex;align-items:center;gap:var(--spacing-xs);font-size:var(--font-size-100);line-height:var(--line-height-100)}._profile-popover__status-emoji_1r9ql_175{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-size-16);height:var(--icon-size-16);font-size:var(--font-size-200);line-height:1}._profile-popover__footer_1r9ql_184{display:flex;padding:var(--spacing-l)}._profile-popover__footer--others_1r9ql_188{align-items:center;justify-content:space-between}._profile-popover__footer--you_1r9ql_192{align-items:flex-start;gap:var(--spacing-xs)}._profile-popover__primary-action_1r9ql_196{display:flex}._profile-popover__primary-action--others_1r9ql_199{width:132px;flex-shrink:0}._profile-popover__primary-action--you_1r9ql_203{flex:1 0 0;min-width:0}._profile-popover__primary-button_1r9ql_207{width:100%}._profile-popover__secondary-actions_1r9ql_210{display:flex;align-items:center;gap:var(--spacing-xxxxs)}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ProfilePopover.css');const o={"profile-popover":"_profile-popover_1k0p0_22","profile-popover--closing":"_profile-popover--closing_1k0p0_34","profile-popover__role-tag":"_profile-popover__role-tag_1k0p0_37","profile-popover__close":"_profile-popover__close_1k0p0_41","profile-popover__primary":"_profile-popover__primary_1k0p0_46","profile-popover__last-online":"_profile-popover__last-online_1k0p0_54","profile-popover__names":"_profile-popover__names_1k0p0_61","profile-popover__name":"_profile-popover__name_1k0p0_61","profile-popover__handle":"_profile-popover__handle_1k0p0_77","profile-popover__title":"_profile-popover__title_1k0p0_77","profile-popover__secondary":"_profile-popover__secondary_1k0p0_82","profile-popover__titles":"_profile-popover__titles_1k0p0_89","profile-popover__meta-item":"_profile-popover__meta-item_1k0p0_94","profile-popover__meta-item--stacked":"_profile-popover__meta-item--stacked_1k0p0_100","profile-popover__meta-icon":"_profile-popover__meta-icon_1k0p0_103","profile-popover__phone-body":"_profile-popover__phone-body_1k0p0_108","profile-popover__meta-link":"_profile-popover__meta-link_1k0p0_115","profile-popover__phone-sub":"_profile-popover__phone-sub_1k0p0_119","profile-popover__meta-text":"_profile-popover__meta-text_1k0p0_124","profile-popover__section-label":"_profile-popover__section-label_1k0p0_149","profile-popover__local-time":"_profile-popover__local-time_1k0p0_156","profile-popover__custom-status":"_profile-popover__custom-status_1k0p0_156","profile-popover__time":"_profile-popover__time_1k0p0_162","profile-popover__status-row":"_profile-popover__status-row_1k0p0_168","profile-popover__status-emoji":"_profile-popover__status-emoji_1k0p0_175","profile-popover__footer":"_profile-popover__footer_1k0p0_184","profile-popover__footer--others":"_profile-popover__footer--others_1k0p0_188","profile-popover__footer--you":"_profile-popover__footer--you_1k0p0_192","profile-popover__primary-action":"_profile-popover__primary-action_1k0p0_196","profile-popover__primary-action--others":"_profile-popover__primary-action--others_1k0p0_199","profile-popover__primary-action--you":"_profile-popover__primary-action--you_1k0p0_203","profile-popover__primary-button":"_profile-popover__primary-button_1k0p0_207","profile-popover__secondary-actions":"_profile-popover__secondary-actions_1k0p0_210"};exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ProfilePopover.css');const o={"profile-popover":"_profile-popover_1r9ql_22","profile-popover--closing":"_profile-popover--closing_1r9ql_34","profile-popover__role-tag":"_profile-popover__role-tag_1r9ql_37","profile-popover__close":"_profile-popover__close_1r9ql_41","profile-popover__primary":"_profile-popover__primary_1r9ql_46","profile-popover__last-online":"_profile-popover__last-online_1r9ql_54","profile-popover__names":"_profile-popover__names_1r9ql_61","profile-popover__name":"_profile-popover__name_1r9ql_61","profile-popover__handle":"_profile-popover__handle_1r9ql_77","profile-popover__title":"_profile-popover__title_1r9ql_77","profile-popover__secondary":"_profile-popover__secondary_1r9ql_82","profile-popover__titles":"_profile-popover__titles_1r9ql_89","profile-popover__meta-item":"_profile-popover__meta-item_1r9ql_94","profile-popover__meta-item--stacked":"_profile-popover__meta-item--stacked_1r9ql_100","profile-popover__meta-icon":"_profile-popover__meta-icon_1r9ql_103","profile-popover__phone-body":"_profile-popover__phone-body_1r9ql_108","profile-popover__meta-link":"_profile-popover__meta-link_1r9ql_115","profile-popover__phone-sub":"_profile-popover__phone-sub_1r9ql_119","profile-popover__meta-text":"_profile-popover__meta-text_1r9ql_124","profile-popover__section-label":"_profile-popover__section-label_1r9ql_149","profile-popover__local-time":"_profile-popover__local-time_1r9ql_156","profile-popover__custom-status":"_profile-popover__custom-status_1r9ql_156","profile-popover__time":"_profile-popover__time_1r9ql_162","profile-popover__status-row":"_profile-popover__status-row_1r9ql_168","profile-popover__status-emoji":"_profile-popover__status-emoji_1r9ql_175","profile-popover__footer":"_profile-popover__footer_1r9ql_184","profile-popover__footer--others":"_profile-popover__footer--others_1r9ql_188","profile-popover__footer--you":"_profile-popover__footer--you_1r9ql_192","profile-popover__primary-action":"_profile-popover__primary-action_1r9ql_196","profile-popover__primary-action--others":"_profile-popover__primary-action--others_1r9ql_199","profile-popover__primary-action--you":"_profile-popover__primary-action--you_1r9ql_203","profile-popover__primary-button":"_profile-popover__primary-button_1r9ql_207","profile-popover__secondary-actions":"_profile-popover__secondary-actions_1r9ql_210"};exports.default=o;
2
2
  //# sourceMappingURL=ProfilePopover.module.scss.cjs.map
@@ -1,37 +1,37 @@
1
1
  import './ProfilePopover.css';const o = {
2
- "profile-popover": "_profile-popover_1k0p0_22",
3
- "profile-popover--closing": "_profile-popover--closing_1k0p0_34",
4
- "profile-popover__role-tag": "_profile-popover__role-tag_1k0p0_37",
5
- "profile-popover__close": "_profile-popover__close_1k0p0_41",
6
- "profile-popover__primary": "_profile-popover__primary_1k0p0_46",
7
- "profile-popover__last-online": "_profile-popover__last-online_1k0p0_54",
8
- "profile-popover__names": "_profile-popover__names_1k0p0_61",
9
- "profile-popover__name": "_profile-popover__name_1k0p0_61",
10
- "profile-popover__handle": "_profile-popover__handle_1k0p0_77",
11
- "profile-popover__title": "_profile-popover__title_1k0p0_77",
12
- "profile-popover__secondary": "_profile-popover__secondary_1k0p0_82",
13
- "profile-popover__titles": "_profile-popover__titles_1k0p0_89",
14
- "profile-popover__meta-item": "_profile-popover__meta-item_1k0p0_94",
15
- "profile-popover__meta-item--stacked": "_profile-popover__meta-item--stacked_1k0p0_100",
16
- "profile-popover__meta-icon": "_profile-popover__meta-icon_1k0p0_103",
17
- "profile-popover__phone-body": "_profile-popover__phone-body_1k0p0_108",
18
- "profile-popover__meta-link": "_profile-popover__meta-link_1k0p0_115",
19
- "profile-popover__phone-sub": "_profile-popover__phone-sub_1k0p0_119",
20
- "profile-popover__meta-text": "_profile-popover__meta-text_1k0p0_124",
21
- "profile-popover__section-label": "_profile-popover__section-label_1k0p0_149",
22
- "profile-popover__local-time": "_profile-popover__local-time_1k0p0_156",
23
- "profile-popover__custom-status": "_profile-popover__custom-status_1k0p0_156",
24
- "profile-popover__time": "_profile-popover__time_1k0p0_162",
25
- "profile-popover__status-row": "_profile-popover__status-row_1k0p0_168",
26
- "profile-popover__status-emoji": "_profile-popover__status-emoji_1k0p0_175",
27
- "profile-popover__footer": "_profile-popover__footer_1k0p0_184",
28
- "profile-popover__footer--others": "_profile-popover__footer--others_1k0p0_188",
29
- "profile-popover__footer--you": "_profile-popover__footer--you_1k0p0_192",
30
- "profile-popover__primary-action": "_profile-popover__primary-action_1k0p0_196",
31
- "profile-popover__primary-action--others": "_profile-popover__primary-action--others_1k0p0_199",
32
- "profile-popover__primary-action--you": "_profile-popover__primary-action--you_1k0p0_203",
33
- "profile-popover__primary-button": "_profile-popover__primary-button_1k0p0_207",
34
- "profile-popover__secondary-actions": "_profile-popover__secondary-actions_1k0p0_210"
2
+ "profile-popover": "_profile-popover_1r9ql_22",
3
+ "profile-popover--closing": "_profile-popover--closing_1r9ql_34",
4
+ "profile-popover__role-tag": "_profile-popover__role-tag_1r9ql_37",
5
+ "profile-popover__close": "_profile-popover__close_1r9ql_41",
6
+ "profile-popover__primary": "_profile-popover__primary_1r9ql_46",
7
+ "profile-popover__last-online": "_profile-popover__last-online_1r9ql_54",
8
+ "profile-popover__names": "_profile-popover__names_1r9ql_61",
9
+ "profile-popover__name": "_profile-popover__name_1r9ql_61",
10
+ "profile-popover__handle": "_profile-popover__handle_1r9ql_77",
11
+ "profile-popover__title": "_profile-popover__title_1r9ql_77",
12
+ "profile-popover__secondary": "_profile-popover__secondary_1r9ql_82",
13
+ "profile-popover__titles": "_profile-popover__titles_1r9ql_89",
14
+ "profile-popover__meta-item": "_profile-popover__meta-item_1r9ql_94",
15
+ "profile-popover__meta-item--stacked": "_profile-popover__meta-item--stacked_1r9ql_100",
16
+ "profile-popover__meta-icon": "_profile-popover__meta-icon_1r9ql_103",
17
+ "profile-popover__phone-body": "_profile-popover__phone-body_1r9ql_108",
18
+ "profile-popover__meta-link": "_profile-popover__meta-link_1r9ql_115",
19
+ "profile-popover__phone-sub": "_profile-popover__phone-sub_1r9ql_119",
20
+ "profile-popover__meta-text": "_profile-popover__meta-text_1r9ql_124",
21
+ "profile-popover__section-label": "_profile-popover__section-label_1r9ql_149",
22
+ "profile-popover__local-time": "_profile-popover__local-time_1r9ql_156",
23
+ "profile-popover__custom-status": "_profile-popover__custom-status_1r9ql_156",
24
+ "profile-popover__time": "_profile-popover__time_1r9ql_162",
25
+ "profile-popover__status-row": "_profile-popover__status-row_1r9ql_168",
26
+ "profile-popover__status-emoji": "_profile-popover__status-emoji_1r9ql_175",
27
+ "profile-popover__footer": "_profile-popover__footer_1r9ql_184",
28
+ "profile-popover__footer--others": "_profile-popover__footer--others_1r9ql_188",
29
+ "profile-popover__footer--you": "_profile-popover__footer--you_1r9ql_192",
30
+ "profile-popover__primary-action": "_profile-popover__primary-action_1r9ql_196",
31
+ "profile-popover__primary-action--others": "_profile-popover__primary-action--others_1r9ql_199",
32
+ "profile-popover__primary-action--you": "_profile-popover__primary-action--you_1r9ql_203",
33
+ "profile-popover__primary-button": "_profile-popover__primary-button_1r9ql_207",
34
+ "profile-popover__secondary-actions": "_profile-popover__secondary-actions_1r9ql_210"
35
35
  };
36
36
  export {
37
37
  o as default
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),v=require("../mention-badge/MentionBadge.cjs"),a=require("./TeamAvatar.module.scss.cjs");function f({alt:s="",badge:t,className:n="",initials:l="Ac",size:r="40",src:u,state:c="default"}){const d=parseInt(r,10),i=c==="active",m=t!=null&&t>0&&d<=64&&!i,o=[a.default["team-avatar"],a.default[`team-avatar--size-${r}`],i&&a.default["team-avatar--active"],n].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[e.jsx("div",{className:a.default["team-avatar__inner"],children:u?e.jsx("img",{src:u,alt:s,className:a.default["team-avatar__image"]}):e.jsx("div",{className:a.default["team-avatar__fallback"],"aria-label":s||l,children:l})}),m&&e.jsx(v.default,{count:t,size:"medium",className:a.default["team-avatar__badge"]})]})}exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),_=require("../mention-badge/MentionBadge.cjs"),a=require("./TeamAvatar.module.scss.cjs");function j({alt:l="",badge:s,className:d="",initials:r="Ac",size:i="40",src:u,state:m="default",variant:c="sidebar"}){const o=parseInt(i,10),t=c==="menu",n=m==="active"&&!t,v=s!=null&&s>0&&o<=64&&!n&&!t,f=[a.default["team-avatar"],a.default[`team-avatar--size-${i}`],n&&a.default["team-avatar--active"],t&&a.default["team-avatar--menu"],d].filter(Boolean).join(" ");return e.jsxs("div",{className:f,"aria-hidden":t||void 0,children:[e.jsx("div",{className:a.default["team-avatar__inner"],children:u?e.jsx("img",{src:u,alt:l,className:a.default["team-avatar__image"]}):e.jsx("div",{className:a.default["team-avatar__fallback"],"aria-label":l||r,children:r})}),v&&e.jsx(_.default,{count:s,size:"medium",className:a.default["team-avatar__badge"]})]})}exports.default=j;
2
2
  //# sourceMappingURL=TeamAvatar.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeamAvatar.cjs","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"sourcesContent":["import MentionBadge from '../mention-badge/MentionBadge';\nimport styles from './TeamAvatar.module.scss';\n\nexport type TeamAvatarSize =\n | '24'\n | '28'\n | '32'\n | '40'\n | '48'\n | '56'\n | '64'\n | '72'\n | '96'\n | '120';\nexport type TeamAvatarState = 'default' | 'active';\n\nexport interface TeamAvatarProps {\n alt?: string;\n badge?: number;\n className?: string;\n initials?: string;\n size?: TeamAvatarSize;\n src?: string;\n state?: TeamAvatarState;\n}\n\n/**\n * Team Avatars identify a Team in Mattermost. Their rounded-square shape sets them apart\n * from circular User Avatars at a glance — same scanning rhythm, different kind of subject.\n */\nexport default function TeamAvatar({\n alt = '',\n badge,\n className = '',\n initials = 'Ac',\n size = '40',\n src,\n state = 'default',\n}: TeamAvatarProps) {\n const numSize = parseInt(size, 10);\n const isActive = state === 'active';\n const showBadge = badge != null && badge > 0 && numSize <= 64 && !isActive;\n\n const rootClasses = [\n styles['team-avatar'],\n styles[`team-avatar--size-${size}`],\n isActive && styles['team-avatar--active'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClasses}>\n <div className={styles['team-avatar__inner']}>\n {src ? (\n <img src={src} alt={alt} className={styles['team-avatar__image']} />\n ) : (\n <div\n className={styles['team-avatar__fallback']}\n aria-label={alt || initials}\n >\n {initials}\n </div>\n )}\n </div>\n {showBadge && (\n <MentionBadge\n count={badge!}\n size=\"medium\"\n className={styles['team-avatar__badge']}\n />\n )}\n </div>\n );\n}\n"],"names":["TeamAvatar","alt","badge","className","initials","size","src","state","numSize","isActive","showBadge","rootClasses","styles","jsxs","jsx","MentionBadge"],"mappings":"yOA8BA,SAAwBA,EAAW,CACjC,IAAAC,EAAM,GACN,MAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EAAW,KACX,KAAAC,EAAO,KACP,IAAAC,EACA,MAAAC,EAAQ,SACV,EAAoB,CAClB,MAAMC,EAAU,SAASH,EAAM,EAAE,EAC3BI,EAAWF,IAAU,SACrBG,EAAYR,GAAS,MAAQA,EAAQ,GAAKM,GAAW,IAAM,CAACC,EAE5DE,EAAc,CAClBC,EAAAA,QAAO,aAAa,EACpBA,EAAAA,QAAO,qBAAqBP,CAAI,EAAE,EAClCI,GAAYG,EAAAA,QAAO,qBAAqB,EACxCT,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEU,EAAAA,KAAC,MAAA,CAAI,UAAWF,EACd,SAAA,CAAAG,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAAA,QAAO,oBAAoB,EACxC,SAAAN,EACCQ,EAAAA,IAAC,MAAA,CAAI,IAAAR,EAAU,IAAAL,EAAU,UAAWW,EAAAA,QAAO,oBAAoB,EAAG,EAElEE,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,QAAO,uBAAuB,EACzC,aAAYX,GAAOG,EAElB,SAAAA,CAAA,CAAA,EAGP,EACCM,GACCI,EAAAA,IAACC,EAAAA,QAAA,CACC,MAAOb,EACP,KAAK,SACL,UAAWU,EAAAA,QAAO,oBAAoB,CAAA,CAAA,CACxC,EAEJ,CAEJ"}
1
+ {"version":3,"file":"TeamAvatar.cjs","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"sourcesContent":["import MentionBadge from '../mention-badge/MentionBadge';\nimport styles from './TeamAvatar.module.scss';\n\nexport type TeamAvatarSize =\n | '24'\n | '28'\n | '32'\n | '40'\n | '48'\n | '56'\n | '64'\n | '72'\n | '96'\n | '120';\nexport type TeamAvatarState = 'default' | 'active';\nexport type TeamAvatarVariant = 'sidebar' | 'menu';\n\nexport interface TeamAvatarProps {\n alt?: string;\n badge?: number;\n className?: string;\n initials?: string;\n size?: TeamAvatarSize;\n src?: string;\n state?: TeamAvatarState;\n /**\n * `sidebar` (default) is interactive and uses sidebar colors. `menu` is decorative and uses\n * center-channel colors — for menu rows and other surfaces on `center-channel-bg`. It has no\n * hover or pointer affordance, is hidden from assistive tech, and ignores `state` and `badge`.\n */\n variant?: TeamAvatarVariant;\n}\n\n/**\n * Team Avatars identify a Team in Mattermost. Their rounded-square shape sets them apart\n * from circular User Avatars at a glance — same scanning rhythm, different kind of subject.\n */\nexport default function TeamAvatar({\n alt = '',\n badge,\n className = '',\n initials = 'Ac',\n size = '40',\n src,\n state = 'default',\n variant = 'sidebar',\n}: TeamAvatarProps) {\n const numSize = parseInt(size, 10);\n const isMenu = variant === 'menu';\n const isActive = state === 'active' && !isMenu;\n const showBadge =\n badge != null && badge > 0 && numSize <= 64 && !isActive && !isMenu;\n\n const rootClasses = [\n styles['team-avatar'],\n styles[`team-avatar--size-${size}`],\n isActive && styles['team-avatar--active'],\n isMenu && styles['team-avatar--menu'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClasses} aria-hidden={isMenu || undefined}>\n <div className={styles['team-avatar__inner']}>\n {src ? (\n <img src={src} alt={alt} className={styles['team-avatar__image']} />\n ) : (\n <div\n className={styles['team-avatar__fallback']}\n aria-label={alt || initials}\n >\n {initials}\n </div>\n )}\n </div>\n {showBadge && (\n <MentionBadge\n count={badge!}\n size=\"medium\"\n className={styles['team-avatar__badge']}\n />\n )}\n </div>\n );\n}\n"],"names":["TeamAvatar","alt","badge","className","initials","size","src","state","variant","numSize","isMenu","isActive","showBadge","rootClasses","styles","jsx","MentionBadge"],"mappings":"yOAqCA,SAAwBA,EAAW,CACjC,IAAAC,EAAM,GACN,MAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EAAW,KACX,KAAAC,EAAO,KACP,IAAAC,EACA,MAAAC,EAAQ,UACR,QAAAC,EAAU,SACZ,EAAoB,CAClB,MAAMC,EAAU,SAASJ,EAAM,EAAE,EAC3BK,EAASF,IAAY,OACrBG,EAAWJ,IAAU,UAAY,CAACG,EAClCE,EACJV,GAAS,MAAQA,EAAQ,GAAKO,GAAW,IAAM,CAACE,GAAY,CAACD,EAEzDG,EAAc,CAClBC,EAAAA,QAAO,aAAa,EACpBA,EAAAA,QAAO,qBAAqBT,CAAI,EAAE,EAClCM,GAAYG,EAAAA,QAAO,qBAAqB,EACxCJ,GAAUI,EAAAA,QAAO,mBAAmB,EACpCX,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,cACG,MAAA,CAAI,UAAWU,EAAa,cAAaH,GAAU,OAClD,SAAA,CAAAK,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,oBAAoB,EACxC,SAAAR,EACCS,EAAAA,IAAC,MAAA,CAAI,IAAAT,EAAU,IAAAL,EAAU,UAAWa,EAAAA,QAAO,oBAAoB,EAAG,EAElEC,EAAAA,IAAC,MAAA,CACC,UAAWD,EAAAA,QAAO,uBAAuB,EACzC,aAAYb,GAAOG,EAElB,SAAAA,CAAA,CAAA,EAGP,EACCQ,GACCG,EAAAA,IAACC,EAAAA,QAAA,CACC,MAAOd,EACP,KAAK,SACL,UAAWY,EAAAA,QAAO,oBAAoB,CAAA,CAAA,CACxC,EAEJ,CAEJ"}