@mattermost/compass-ui 0.1.0-alpha.5 → 0.1.0-alpha.7
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.
- package/README.md +1 -0
- package/dist/components/action-button/ActionButton.cjs.map +1 -1
- package/dist/components/action-button/ActionButton.d.ts +1 -0
- package/dist/components/action-button/ActionButton.d.ts.map +1 -1
- package/dist/components/action-button/ActionButton.js.map +1 -1
- package/dist/components/admin-panel/AdminPanel.cjs.map +1 -1
- package/dist/components/admin-panel/AdminPanel.d.ts +1 -0
- package/dist/components/admin-panel/AdminPanel.d.ts.map +1 -1
- package/dist/components/admin-panel/AdminPanel.js.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.cjs.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts +1 -0
- package/dist/components/admin-panel-header/AdminPanelHeader.d.ts.map +1 -1
- package/dist/components/admin-panel-header/AdminPanelHeader.js.map +1 -1
- package/dist/components/button/Button.cjs +1 -1
- package/dist/components/button/Button.cjs.map +1 -1
- package/dist/components/button/Button.d.ts +2 -2
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +24 -24
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.module.css +1 -1
- package/dist/components/button/Button.module.scss.cjs +1 -1
- package/dist/components/button/Button.module.scss.js +13 -12
- package/dist/components/button/Button.module.scss.js.map +1 -1
- package/dist/components/card-button/CardButton.cjs +2 -0
- package/dist/components/card-button/CardButton.cjs.map +1 -0
- package/dist/components/card-button/CardButton.d.ts +20 -0
- package/dist/components/card-button/CardButton.d.ts.map +1 -0
- package/dist/components/card-button/CardButton.js +45 -0
- package/dist/components/card-button/CardButton.js.map +1 -0
- package/dist/components/card-button/CardButton.module.css +1 -0
- package/dist/components/card-button/CardButton.module.scss.cjs +2 -0
- package/dist/components/card-button/CardButton.module.scss.cjs.map +1 -0
- package/dist/components/card-button/CardButton.module.scss.js +13 -0
- package/dist/components/card-button/CardButton.module.scss.js.map +1 -0
- package/dist/components/card-button/CardButtonGroup.cjs +2 -0
- package/dist/components/card-button/CardButtonGroup.cjs.map +1 -0
- package/dist/components/card-button/CardButtonGroup.d.ts +13 -0
- package/dist/components/card-button/CardButtonGroup.d.ts.map +1 -0
- package/dist/components/card-button/CardButtonGroup.js +85 -0
- package/dist/components/card-button/CardButtonGroup.js.map +1 -0
- package/dist/components/card-button/CardButtonGroup.module.css +1 -0
- package/dist/components/card-button/CardButtonGroup.module.scss.cjs +2 -0
- package/dist/components/card-button/CardButtonGroup.module.scss.cjs.map +1 -0
- package/dist/components/card-button/CardButtonGroup.module.scss.js +7 -0
- package/dist/components/card-button/CardButtonGroup.module.scss.js.map +1 -0
- package/dist/components/card-button/index.cjs +2 -0
- package/dist/components/card-button/index.d.ts +5 -0
- package/dist/components/card-button/index.d.ts.map +1 -0
- package/dist/components/card-button/index.js +7 -0
- package/dist/components/emoji-button/EmojiButton.cjs +2 -0
- package/dist/components/emoji-button/EmojiButton.cjs.map +1 -0
- package/dist/components/emoji-button/EmojiButton.d.ts +30 -0
- package/dist/components/emoji-button/EmojiButton.d.ts.map +1 -0
- package/dist/components/emoji-button/EmojiButton.js +35 -0
- package/dist/components/emoji-button/EmojiButton.js.map +1 -0
- package/dist/components/emoji-button/EmojiButton.module.css +1 -0
- package/dist/components/emoji-button/EmojiButton.module.scss.cjs +2 -0
- package/dist/components/emoji-button/EmojiButton.module.scss.cjs.map +1 -0
- package/dist/components/emoji-button/EmojiButton.module.scss.js +15 -0
- package/dist/components/emoji-button/EmojiButton.module.scss.js.map +1 -0
- package/dist/components/emoji-button/index.cjs +2 -0
- package/dist/components/emoji-button/index.d.ts +3 -0
- package/dist/components/emoji-button/index.d.ts.map +1 -0
- package/dist/components/emoji-button/index.js +6 -0
- package/dist/components/emoji-popover/EmojiPopover.cjs +2 -0
- package/dist/components/emoji-popover/EmojiPopover.cjs.map +1 -0
- package/dist/components/emoji-popover/EmojiPopover.d.ts +34 -0
- package/dist/components/emoji-popover/EmojiPopover.d.ts.map +1 -0
- package/dist/components/emoji-popover/EmojiPopover.js +244 -0
- package/dist/components/emoji-popover/EmojiPopover.js.map +1 -0
- package/dist/components/emoji-popover/EmojiPopover.module.css +1 -0
- package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs +2 -0
- package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs.map +1 -0
- package/dist/components/emoji-popover/EmojiPopover.module.scss.js +27 -0
- package/dist/components/emoji-popover/EmojiPopover.module.scss.js.map +1 -0
- package/dist/components/{message-input → emoji-popover}/index.cjs +1 -1
- package/dist/components/emoji-popover/index.d.ts +3 -0
- package/dist/components/{reaction-pill → emoji-popover}/index.d.ts.map +1 -1
- package/dist/components/emoji-popover/index.js +5 -0
- package/dist/components/global-banner/GlobalBanner.cjs.map +1 -1
- package/dist/components/global-banner/GlobalBanner.d.ts +1 -1
- package/dist/components/global-banner/GlobalBanner.d.ts.map +1 -1
- package/dist/components/global-banner/GlobalBanner.js.map +1 -1
- package/dist/components/global-header/GlobalHeader.module.css +1 -1
- package/dist/components/global-header/GlobalHeader.module.scss.cjs +1 -1
- package/dist/components/global-header/GlobalHeader.module.scss.js +16 -16
- package/dist/components/icon/Icon.js +6 -6
- package/dist/components/illustration/Illustration.cjs.map +1 -1
- package/dist/components/illustration/Illustration.d.ts +5 -5
- package/dist/components/illustration/Illustration.d.ts.map +1 -1
- package/dist/components/illustration/Illustration.js.map +1 -1
- package/dist/components/menu-group-heading/MenuGroupHeading.cjs +2 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.cjs.map +1 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.d.ts +11 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.d.ts.map +1 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.js +20 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.js.map +1 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.module.css +1 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.cjs +2 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.cjs.map +1 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.js +8 -0
- package/dist/components/menu-group-heading/MenuGroupHeading.module.scss.js.map +1 -0
- package/dist/components/{message-reactions → menu-group-heading}/index.cjs +1 -1
- package/dist/components/menu-group-heading/index.d.ts +3 -0
- package/dist/components/menu-group-heading/index.d.ts.map +1 -0
- package/dist/components/menu-group-heading/index.js +5 -0
- package/dist/components/menu-item/MenuItem.cjs.map +1 -1
- package/dist/components/menu-item/MenuItem.d.ts +2 -2
- package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/menu-item/MenuItem.js.map +1 -1
- package/dist/components/message-separator/MessageSeparator.cjs +1 -1
- package/dist/components/message-separator/MessageSeparator.cjs.map +1 -1
- package/dist/components/message-separator/MessageSeparator.d.ts +1 -1
- package/dist/components/message-separator/MessageSeparator.js +1 -1
- package/dist/components/message-separator/MessageSeparator.js.map +1 -1
- package/dist/components/modal/Modal.cjs +1 -1
- package/dist/components/modal/Modal.cjs.map +1 -1
- package/dist/components/modal/Modal.d.ts +43 -11
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +56 -74
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.module.css +1 -1
- package/dist/components/modal/Modal.module.scss.cjs +1 -1
- package/dist/components/modal/Modal.module.scss.js +12 -25
- package/dist/components/modal/Modal.module.scss.js.map +1 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal-footer/ModalFooter.cjs +2 -0
- package/dist/components/modal-footer/ModalFooter.cjs.map +1 -0
- package/dist/components/modal-footer/ModalFooter.d.ts +29 -0
- package/dist/components/modal-footer/ModalFooter.d.ts.map +1 -0
- package/dist/components/modal-footer/ModalFooter.js +31 -0
- package/dist/components/modal-footer/ModalFooter.js.map +1 -0
- package/dist/components/modal-footer/ModalFooter.module.css +1 -0
- package/dist/components/modal-footer/ModalFooter.module.scss.cjs +2 -0
- package/dist/components/modal-footer/ModalFooter.module.scss.cjs.map +1 -0
- package/dist/components/modal-footer/ModalFooter.module.scss.js +17 -0
- package/dist/components/modal-footer/ModalFooter.module.scss.js.map +1 -0
- package/dist/components/{app-bar-item → modal-footer}/index.cjs +1 -1
- package/dist/components/modal-footer/index.d.ts +3 -0
- package/dist/components/modal-footer/index.d.ts.map +1 -0
- package/dist/components/modal-footer/index.js +5 -0
- package/dist/components/modal-header/ModalHeader.cjs +2 -0
- package/dist/components/modal-header/ModalHeader.cjs.map +1 -0
- package/dist/components/modal-header/ModalHeader.d.ts +38 -0
- package/dist/components/modal-header/ModalHeader.d.ts.map +1 -0
- package/dist/components/modal-header/ModalHeader.js +74 -0
- package/dist/components/modal-header/ModalHeader.js.map +1 -0
- package/dist/components/modal-header/ModalHeader.module.css +1 -0
- package/dist/components/modal-header/ModalHeader.module.scss.cjs +2 -0
- package/dist/components/modal-header/ModalHeader.module.scss.cjs.map +1 -0
- package/dist/components/modal-header/ModalHeader.module.scss.js +19 -0
- package/dist/components/modal-header/ModalHeader.module.scss.js.map +1 -0
- package/dist/components/{reaction-pill → modal-header}/index.cjs +1 -1
- package/dist/components/modal-header/index.d.ts +3 -0
- package/dist/components/modal-header/index.d.ts.map +1 -0
- package/dist/components/modal-header/index.js +5 -0
- package/dist/components/popover-notice/PopoverNotice.cjs.map +1 -1
- package/dist/components/popover-notice/PopoverNotice.d.ts +1 -1
- package/dist/components/popover-notice/PopoverNotice.d.ts.map +1 -1
- package/dist/components/popover-notice/PopoverNotice.js.map +1 -1
- package/dist/components/reaction-button/ReactionButton.cjs +2 -0
- package/dist/components/reaction-button/ReactionButton.cjs.map +1 -0
- package/dist/components/reaction-button/ReactionButton.d.ts +17 -0
- package/dist/components/reaction-button/ReactionButton.d.ts.map +1 -0
- package/dist/components/reaction-button/ReactionButton.js +42 -0
- package/dist/components/reaction-button/ReactionButton.js.map +1 -0
- package/dist/components/reaction-button/ReactionButton.module.css +1 -0
- package/dist/components/reaction-button/ReactionButton.module.scss.cjs +2 -0
- package/dist/components/reaction-button/ReactionButton.module.scss.cjs.map +1 -0
- package/dist/components/reaction-button/ReactionButton.module.scss.js +12 -0
- package/dist/components/reaction-button/ReactionButton.module.scss.js.map +1 -0
- package/dist/components/reaction-button/index.cjs +2 -0
- package/dist/components/reaction-button/index.d.ts +3 -0
- package/dist/components/reaction-button/index.d.ts.map +1 -0
- package/dist/components/reaction-button/index.js +5 -0
- package/dist/components/reaction-button/index.js.map +1 -0
- package/dist/components/reactions-row/ReactionsRow.cjs +2 -0
- package/dist/components/reactions-row/ReactionsRow.cjs.map +1 -0
- package/dist/components/{message-reactions/MessageReactions.d.ts → reactions-row/ReactionsRow.d.ts} +5 -5
- package/dist/components/reactions-row/ReactionsRow.d.ts.map +1 -0
- package/dist/components/reactions-row/ReactionsRow.js +71 -0
- package/dist/components/reactions-row/ReactionsRow.js.map +1 -0
- package/dist/components/reactions-row/ReactionsRow.module.css +1 -0
- package/dist/components/reactions-row/ReactionsRow.module.scss.cjs +2 -0
- package/dist/components/reactions-row/ReactionsRow.module.scss.cjs.map +1 -0
- package/dist/components/reactions-row/ReactionsRow.module.scss.js +14 -0
- package/dist/components/reactions-row/ReactionsRow.module.scss.js.map +1 -0
- package/dist/components/{channel-header → reactions-row}/index.cjs +1 -1
- package/dist/components/reactions-row/index.cjs.map +1 -0
- package/dist/components/reactions-row/index.d.ts +3 -0
- package/dist/components/{message-input → reactions-row}/index.d.ts.map +1 -1
- package/dist/components/reactions-row/index.js +5 -0
- package/dist/components/reactions-row/index.js.map +1 -0
- package/dist/components/right-sidebar-header/RightSidebarHeader.cjs +2 -0
- package/dist/components/right-sidebar-header/RightSidebarHeader.cjs.map +1 -0
- package/dist/components/{right-sidebar/RightSidebarHeader → right-sidebar-header}/RightSidebarHeader.d.ts +2 -2
- package/dist/components/right-sidebar-header/RightSidebarHeader.d.ts.map +1 -0
- package/dist/components/{right-sidebar/RightSidebarHeader → right-sidebar-header}/RightSidebarHeader.js +3 -3
- package/dist/components/right-sidebar-header/RightSidebarHeader.js.map +1 -0
- package/dist/components/right-sidebar-header/RightSidebarHeader.module.css +1 -0
- package/dist/components/right-sidebar-header/RightSidebarHeader.module.scss.cjs +2 -0
- package/dist/components/{right-sidebar/RightSidebarHeader → right-sidebar-header}/RightSidebarHeader.module.scss.js +12 -12
- package/dist/components/right-sidebar-header/index.cjs +2 -0
- package/dist/components/right-sidebar-header/index.cjs.map +1 -0
- package/dist/components/right-sidebar-header/index.d.ts +3 -0
- package/dist/components/right-sidebar-header/index.d.ts.map +1 -0
- package/dist/components/right-sidebar-header/index.js +5 -0
- package/dist/components/right-sidebar-header/index.js.map +1 -0
- package/dist/components/section-notice/SectionNotice.cjs.map +1 -1
- package/dist/components/section-notice/SectionNotice.d.ts +1 -1
- package/dist/components/section-notice/SectionNotice.d.ts.map +1 -1
- package/dist/components/section-notice/SectionNotice.js.map +1 -1
- package/dist/components/tag/Tag.cjs.map +1 -1
- package/dist/components/tag/Tag.d.ts +1 -1
- package/dist/components/tag/Tag.d.ts.map +1 -1
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/text-input/TextInput.cjs.map +1 -1
- package/dist/components/text-input/TextInput.d.ts +1 -1
- package/dist/components/text-input/TextInput.d.ts.map +1 -1
- package/dist/components/text-input/TextInput.js.map +1 -1
- package/dist/components/thread-footer/ThreadFooter.module.css +1 -1
- package/dist/components/thread-footer/ThreadFooter.module.scss.cjs +1 -1
- package/dist/components/thread-footer/ThreadFooter.module.scss.js +19 -19
- package/dist/components/toast/Toast.cjs +1 -1
- package/dist/components/toast/Toast.cjs.map +1 -1
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +31 -31
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toast/Toast.module.css +1 -1
- package/dist/components/toast/Toast.module.scss.cjs +1 -1
- package/dist/components/toast/Toast.module.scss.js +14 -13
- package/dist/components/toast/Toast.module.scss.js.map +1 -1
- package/dist/components/tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tour-point/TourPoint.module.css +1 -1
- package/dist/components/tour-point/TourPoint.module.scss.cjs +1 -1
- package/dist/components/tour-point/TourPoint.module.scss.js +28 -28
- package/dist/illustrations/ai-copilot-intro.cjs +2 -0
- package/dist/illustrations/ai-copilot-intro.cjs.map +1 -0
- package/dist/illustrations/ai-copilot-intro.d.ts +4 -0
- package/dist/illustrations/ai-copilot-intro.js +5 -0
- package/dist/illustrations/ai-copilot-intro.js.map +1 -0
- package/dist/illustrations/ai-copilot-intro.svg.cjs +2 -0
- package/dist/illustrations/ai-copilot-intro.svg.cjs.map +1 -0
- package/dist/illustrations/ai-copilot-intro.svg.js +6 -0
- package/dist/illustrations/ai-copilot-intro.svg.js.map +1 -0
- package/dist/illustrations/alert-on-sidebar-bg.cjs +2 -0
- package/dist/illustrations/alert-on-sidebar-bg.cjs.map +1 -0
- package/dist/illustrations/alert-on-sidebar-bg.d.ts +4 -0
- package/dist/illustrations/alert-on-sidebar-bg.js +5 -0
- package/dist/illustrations/alert-on-sidebar-bg.js.map +1 -0
- package/dist/illustrations/alert-on-sidebar-bg.svg.cjs +2 -0
- package/dist/illustrations/alert-on-sidebar-bg.svg.cjs.map +1 -0
- package/dist/illustrations/alert-on-sidebar-bg.svg.js +6 -0
- package/dist/illustrations/alert-on-sidebar-bg.svg.js.map +1 -0
- package/dist/illustrations/alert.cjs +2 -0
- package/dist/illustrations/alert.cjs.map +1 -0
- package/dist/illustrations/alert.d.ts +4 -0
- package/dist/illustrations/alert.js +5 -0
- package/dist/illustrations/alert.js.map +1 -0
- package/dist/illustrations/alert.svg.cjs +2 -0
- package/dist/illustrations/alert.svg.cjs.map +1 -0
- package/dist/illustrations/alert.svg.js +6 -0
- package/dist/illustrations/alert.svg.js.map +1 -0
- package/dist/illustrations/archived-channel.cjs +2 -0
- package/dist/illustrations/archived-channel.cjs.map +1 -0
- package/dist/illustrations/archived-channel.d.ts +4 -0
- package/dist/illustrations/archived-channel.js +5 -0
- package/dist/illustrations/archived-channel.js.map +1 -0
- package/dist/illustrations/archived-channel.svg.cjs +2 -0
- package/dist/illustrations/archived-channel.svg.cjs.map +1 -0
- package/dist/illustrations/archived-channel.svg.js +6 -0
- package/dist/illustrations/archived-channel.svg.js.map +1 -0
- package/dist/illustrations/auto-translation.cjs +2 -0
- package/dist/illustrations/auto-translation.cjs.map +1 -0
- package/dist/illustrations/auto-translation.d.ts +4 -0
- package/dist/illustrations/auto-translation.js +5 -0
- package/dist/illustrations/auto-translation.js.map +1 -0
- package/dist/illustrations/auto-translation.svg.cjs +2 -0
- package/dist/illustrations/auto-translation.svg.cjs.map +1 -0
- package/dist/illustrations/auto-translation.svg.js +6 -0
- package/dist/illustrations/auto-translation.svg.js.map +1 -0
- package/dist/illustrations/banners.cjs +2 -0
- package/dist/illustrations/banners.cjs.map +1 -0
- package/dist/illustrations/banners.d.ts +4 -0
- package/dist/illustrations/banners.js +5 -0
- package/dist/illustrations/banners.js.map +1 -0
- package/dist/illustrations/banners.svg.cjs +2 -0
- package/dist/illustrations/banners.svg.cjs.map +1 -0
- package/dist/illustrations/banners.svg.js +6 -0
- package/dist/illustrations/banners.svg.js.map +1 -0
- package/dist/illustrations/billing-history.cjs +2 -0
- package/dist/illustrations/billing-history.cjs.map +1 -0
- package/dist/illustrations/billing-history.d.ts +4 -0
- package/dist/illustrations/billing-history.js +5 -0
- package/dist/illustrations/billing-history.js.map +1 -0
- package/dist/illustrations/billing-history.svg.cjs +2 -0
- package/dist/illustrations/billing-history.svg.cjs.map +1 -0
- package/dist/illustrations/billing-history.svg.js +6 -0
- package/dist/illustrations/billing-history.svg.js.map +1 -0
- package/dist/illustrations/blank-playbook.cjs +2 -0
- package/dist/illustrations/blank-playbook.cjs.map +1 -0
- package/dist/illustrations/blank-playbook.d.ts +4 -0
- package/dist/illustrations/blank-playbook.js +5 -0
- package/dist/illustrations/blank-playbook.js.map +1 -0
- package/dist/illustrations/blank-playbook.svg.cjs +2 -0
- package/dist/illustrations/blank-playbook.svg.cjs.map +1 -0
- package/dist/illustrations/blank-playbook.svg.js +6 -0
- package/dist/illustrations/blank-playbook.svg.js.map +1 -0
- package/dist/illustrations/bot-accounts.cjs +2 -0
- package/dist/illustrations/bot-accounts.cjs.map +1 -0
- package/dist/illustrations/bot-accounts.d.ts +4 -0
- package/dist/illustrations/bot-accounts.js +5 -0
- package/dist/illustrations/bot-accounts.js.map +1 -0
- package/dist/illustrations/bot-accounts.svg.cjs +2 -0
- package/dist/illustrations/bot-accounts.svg.cjs.map +1 -0
- package/dist/illustrations/bot-accounts.svg.js +6 -0
- package/dist/illustrations/bot-accounts.svg.js.map +1 -0
- package/dist/illustrations/browser-or-desktop.cjs +2 -0
- package/dist/illustrations/browser-or-desktop.cjs.map +1 -0
- package/dist/illustrations/browser-or-desktop.d.ts +4 -0
- package/dist/illustrations/browser-or-desktop.js +5 -0
- package/dist/illustrations/browser-or-desktop.js.map +1 -0
- package/dist/illustrations/browser-or-desktop.svg.cjs +2 -0
- package/dist/illustrations/browser-or-desktop.svg.cjs.map +1 -0
- package/dist/illustrations/browser-or-desktop.svg.js +6 -0
- package/dist/illustrations/browser-or-desktop.svg.js.map +1 -0
- package/dist/illustrations/bug-bash.cjs +2 -0
- package/dist/illustrations/bug-bash.cjs.map +1 -0
- package/dist/illustrations/bug-bash.d.ts +4 -0
- package/dist/illustrations/bug-bash.js +5 -0
- package/dist/illustrations/bug-bash.js.map +1 -0
- package/dist/illustrations/bug-bash.svg.cjs +2 -0
- package/dist/illustrations/bug-bash.svg.cjs.map +1 -0
- package/dist/illustrations/bug-bash.svg.js +6 -0
- package/dist/illustrations/bug-bash.svg.js.map +1 -0
- package/dist/illustrations/calls.cjs +2 -0
- package/dist/illustrations/calls.cjs.map +1 -0
- package/dist/illustrations/calls.d.ts +4 -0
- package/dist/illustrations/calls.js +5 -0
- package/dist/illustrations/calls.js.map +1 -0
- package/dist/illustrations/calls.svg.cjs +2 -0
- package/dist/illustrations/calls.svg.cjs.map +1 -0
- package/dist/illustrations/calls.svg.js +6 -0
- package/dist/illustrations/calls.svg.js.map +1 -0
- package/dist/illustrations/collaborate.cjs +2 -0
- package/dist/illustrations/collaborate.cjs.map +1 -0
- package/dist/illustrations/collaborate.d.ts +4 -0
- package/dist/illustrations/collaborate.js +5 -0
- package/dist/illustrations/collaborate.js.map +1 -0
- package/dist/illustrations/collaborate.svg.cjs +2 -0
- package/dist/illustrations/collaborate.svg.cjs.map +1 -0
- package/dist/illustrations/collaborate.svg.js +6 -0
- package/dist/illustrations/collaborate.svg.js.map +1 -0
- package/dist/illustrations/compliance-exports.cjs +2 -0
- package/dist/illustrations/compliance-exports.cjs.map +1 -0
- package/dist/illustrations/compliance-exports.d.ts +4 -0
- package/dist/illustrations/compliance-exports.js +5 -0
- package/dist/illustrations/compliance-exports.js.map +1 -0
- package/dist/illustrations/compliance-exports.svg.cjs +2 -0
- package/dist/illustrations/compliance-exports.svg.cjs.map +1 -0
- package/dist/illustrations/compliance-exports.svg.js +6 -0
- package/dist/illustrations/compliance-exports.svg.js.map +1 -0
- package/dist/illustrations/copilot-bot.cjs +2 -0
- package/dist/illustrations/copilot-bot.cjs.map +1 -0
- package/dist/illustrations/copilot-bot.d.ts +4 -0
- package/dist/illustrations/copilot-bot.js +5 -0
- package/dist/illustrations/copilot-bot.js.map +1 -0
- package/dist/illustrations/copilot-bot.svg.cjs +2 -0
- package/dist/illustrations/copilot-bot.svg.cjs.map +1 -0
- package/dist/illustrations/copilot-bot.svg.js +6 -0
- package/dist/illustrations/copilot-bot.svg.js.map +1 -0
- package/dist/illustrations/custom-branding.cjs +2 -0
- package/dist/illustrations/custom-branding.cjs.map +1 -0
- package/dist/illustrations/custom-branding.d.ts +4 -0
- package/dist/illustrations/custom-branding.js +5 -0
- package/dist/illustrations/custom-branding.js.map +1 -0
- package/dist/illustrations/custom-branding.svg.cjs +2 -0
- package/dist/illustrations/custom-branding.svg.cjs.map +1 -0
- package/dist/illustrations/custom-branding.svg.js +6 -0
- package/dist/illustrations/custom-branding.svg.js.map +1 -0
- package/dist/illustrations/custom-terms.cjs +2 -0
- package/dist/illustrations/custom-terms.cjs.map +1 -0
- package/dist/illustrations/custom-terms.d.ts +4 -0
- package/dist/illustrations/custom-terms.js +5 -0
- package/dist/illustrations/custom-terms.js.map +1 -0
- package/dist/illustrations/custom-terms.svg.cjs +2 -0
- package/dist/illustrations/custom-terms.svg.cjs.map +1 -0
- package/dist/illustrations/custom-terms.svg.js +6 -0
- package/dist/illustrations/custom-terms.svg.js.map +1 -0
- package/dist/illustrations/customer-onboarding.cjs +2 -0
- package/dist/illustrations/customer-onboarding.cjs.map +1 -0
- package/dist/illustrations/customer-onboarding.d.ts +4 -0
- package/dist/illustrations/customer-onboarding.js +5 -0
- package/dist/illustrations/customer-onboarding.js.map +1 -0
- package/dist/illustrations/customer-onboarding.svg.cjs +2 -0
- package/dist/illustrations/customer-onboarding.svg.cjs.map +1 -0
- package/dist/illustrations/customer-onboarding.svg.js +6 -0
- package/dist/illustrations/customer-onboarding.svg.js.map +1 -0
- package/dist/illustrations/data-retention.cjs +2 -0
- package/dist/illustrations/data-retention.cjs.map +1 -0
- package/dist/illustrations/data-retention.d.ts +4 -0
- package/dist/illustrations/data-retention.js +5 -0
- package/dist/illustrations/data-retention.js.map +1 -0
- package/dist/illustrations/data-retention.svg.cjs +2 -0
- package/dist/illustrations/data-retention.svg.cjs.map +1 -0
- package/dist/illustrations/data-retention.svg.js +6 -0
- package/dist/illustrations/data-retention.svg.js.map +1 -0
- package/dist/illustrations/drafts-empty.cjs +2 -0
- package/dist/illustrations/drafts-empty.cjs.map +1 -0
- package/dist/illustrations/drafts-empty.d.ts +4 -0
- package/dist/illustrations/drafts-empty.js +5 -0
- package/dist/illustrations/drafts-empty.js.map +1 -0
- package/dist/illustrations/drafts-empty.svg.cjs +2 -0
- package/dist/illustrations/drafts-empty.svg.cjs.map +1 -0
- package/dist/illustrations/drafts-empty.svg.js +6 -0
- package/dist/illustrations/drafts-empty.svg.js.map +1 -0
- package/dist/illustrations/employee-onboarding.cjs +2 -0
- package/dist/illustrations/employee-onboarding.cjs.map +1 -0
- package/dist/illustrations/employee-onboarding.d.ts +4 -0
- package/dist/illustrations/employee-onboarding.js +5 -0
- package/dist/illustrations/employee-onboarding.js.map +1 -0
- package/dist/illustrations/employee-onboarding.svg.cjs +2 -0
- package/dist/illustrations/employee-onboarding.svg.cjs.map +1 -0
- package/dist/illustrations/employee-onboarding.svg.js +6 -0
- package/dist/illustrations/employee-onboarding.svg.js.map +1 -0
- package/dist/illustrations/feature-lifecycle.cjs +2 -0
- package/dist/illustrations/feature-lifecycle.cjs.map +1 -0
- package/dist/illustrations/feature-lifecycle.d.ts +4 -0
- package/dist/illustrations/feature-lifecycle.js +5 -0
- package/dist/illustrations/feature-lifecycle.js.map +1 -0
- package/dist/illustrations/feature-lifecycle.svg.cjs +2 -0
- package/dist/illustrations/feature-lifecycle.svg.cjs.map +1 -0
- package/dist/illustrations/feature-lifecycle.svg.js +6 -0
- package/dist/illustrations/feature-lifecycle.svg.js.map +1 -0
- package/dist/illustrations/file-search-empty.cjs +2 -0
- package/dist/illustrations/file-search-empty.cjs.map +1 -0
- package/dist/illustrations/file-search-empty.d.ts +4 -0
- package/dist/illustrations/file-search-empty.js +5 -0
- package/dist/illustrations/file-search-empty.js.map +1 -0
- package/dist/illustrations/file-search-empty.svg.cjs +2 -0
- package/dist/illustrations/file-search-empty.svg.cjs.map +1 -0
- package/dist/illustrations/file-search-empty.svg.js +6 -0
- package/dist/illustrations/file-search-empty.svg.js.map +1 -0
- package/dist/illustrations/globe.cjs +2 -0
- package/dist/illustrations/globe.cjs.map +1 -0
- package/dist/illustrations/globe.d.ts +4 -0
- package/dist/illustrations/globe.js +5 -0
- package/dist/illustrations/globe.js.map +1 -0
- package/dist/illustrations/globe.svg.cjs +2 -0
- package/dist/illustrations/globe.svg.cjs.map +1 -0
- package/dist/illustrations/globe.svg.js +6 -0
- package/dist/illustrations/globe.svg.js.map +1 -0
- package/dist/illustrations/group.cjs +2 -0
- package/dist/illustrations/group.cjs.map +1 -0
- package/dist/illustrations/group.d.ts +4 -0
- package/dist/illustrations/group.js +5 -0
- package/dist/illustrations/group.js.map +1 -0
- package/dist/illustrations/group.svg.cjs +2 -0
- package/dist/illustrations/group.svg.cjs.map +1 -0
- package/dist/illustrations/group.svg.js +12 -0
- package/dist/illustrations/group.svg.js.map +1 -0
- package/dist/illustrations/groups.cjs +2 -0
- package/dist/illustrations/groups.cjs.map +1 -0
- package/dist/illustrations/groups.d.ts +4 -0
- package/dist/illustrations/groups.js +5 -0
- package/dist/illustrations/groups.js.map +1 -0
- package/dist/illustrations/groups.svg.cjs +2 -0
- package/dist/illustrations/groups.svg.cjs.map +1 -0
- package/dist/illustrations/groups.svg.js +12 -0
- package/dist/illustrations/groups.svg.js.map +1 -0
- package/dist/illustrations/incident-resolution.cjs +2 -0
- package/dist/illustrations/incident-resolution.cjs.map +1 -0
- package/dist/illustrations/incident-resolution.d.ts +4 -0
- package/dist/illustrations/incident-resolution.js +5 -0
- package/dist/illustrations/incident-resolution.js.map +1 -0
- package/dist/illustrations/incident-resolution.svg.cjs +2 -0
- package/dist/illustrations/incident-resolution.svg.cjs.map +1 -0
- package/dist/illustrations/incident-resolution.svg.js +6 -0
- package/dist/illustrations/incident-resolution.svg.js.map +1 -0
- package/dist/illustrations/incoming-webhook.cjs +2 -0
- package/dist/illustrations/incoming-webhook.cjs.map +1 -0
- package/dist/illustrations/incoming-webhook.d.ts +4 -0
- package/dist/illustrations/incoming-webhook.js +5 -0
- package/dist/illustrations/incoming-webhook.js.map +1 -0
- package/dist/illustrations/incoming-webhook.svg.cjs +2 -0
- package/dist/illustrations/incoming-webhook.svg.cjs.map +1 -0
- package/dist/illustrations/incoming-webhook.svg.js +6 -0
- package/dist/illustrations/incoming-webhook.svg.js.map +1 -0
- package/dist/illustrations/intune-mam.cjs +2 -0
- package/dist/illustrations/intune-mam.cjs.map +1 -0
- package/dist/illustrations/intune-mam.d.ts +4 -0
- package/dist/illustrations/intune-mam.js +5 -0
- package/dist/illustrations/intune-mam.js.map +1 -0
- package/dist/illustrations/intune-mam.svg.cjs +2 -0
- package/dist/illustrations/intune-mam.svg.cjs.map +1 -0
- package/dist/illustrations/intune-mam.svg.js +8 -0
- package/dist/illustrations/intune-mam.svg.js.map +1 -0
- package/dist/illustrations/learn-playbooks.cjs +2 -0
- package/dist/illustrations/learn-playbooks.cjs.map +1 -0
- package/dist/illustrations/learn-playbooks.d.ts +4 -0
- package/dist/illustrations/learn-playbooks.js +5 -0
- package/dist/illustrations/learn-playbooks.js.map +1 -0
- package/dist/illustrations/learn-playbooks.svg.cjs +2 -0
- package/dist/illustrations/learn-playbooks.svg.cjs.map +1 -0
- package/dist/illustrations/learn-playbooks.svg.js +6 -0
- package/dist/illustrations/learn-playbooks.svg.js.map +1 -0
- package/dist/illustrations/locked-messages.cjs +2 -0
- package/dist/illustrations/locked-messages.cjs.map +1 -0
- package/dist/illustrations/locked-messages.d.ts +4 -0
- package/dist/illustrations/locked-messages.js +5 -0
- package/dist/illustrations/locked-messages.js.map +1 -0
- package/dist/illustrations/locked-messages.svg.cjs +2 -0
- package/dist/illustrations/locked-messages.svg.cjs.map +1 -0
- package/dist/illustrations/locked-messages.svg.js +6 -0
- package/dist/illustrations/locked-messages.svg.js.map +1 -0
- package/dist/illustrations/mentions-empty.cjs +2 -0
- package/dist/illustrations/mentions-empty.cjs.map +1 -0
- package/dist/illustrations/mentions-empty.d.ts +4 -0
- package/dist/illustrations/mentions-empty.js +5 -0
- package/dist/illustrations/mentions-empty.js.map +1 -0
- package/dist/illustrations/mentions-empty.svg.cjs +2 -0
- package/dist/illustrations/mentions-empty.svg.cjs.map +1 -0
- package/dist/illustrations/mentions-empty.svg.js +6 -0
- package/dist/illustrations/mentions-empty.svg.js.map +1 -0
- package/dist/illustrations/message-not-viewable.cjs +2 -0
- package/dist/illustrations/message-not-viewable.cjs.map +1 -0
- package/dist/illustrations/message-not-viewable.d.ts +4 -0
- package/dist/illustrations/message-not-viewable.js +5 -0
- package/dist/illustrations/message-not-viewable.js.map +1 -0
- package/dist/illustrations/message-not-viewable.svg.cjs +2 -0
- package/dist/illustrations/message-not-viewable.svg.cjs.map +1 -0
- package/dist/illustrations/message-not-viewable.svg.js +6 -0
- package/dist/illustrations/message-not-viewable.svg.js.map +1 -0
- package/dist/illustrations/message-search-empty.cjs +2 -0
- package/dist/illustrations/message-search-empty.cjs.map +1 -0
- package/dist/illustrations/message-search-empty.d.ts +4 -0
- package/dist/illustrations/message-search-empty.js +5 -0
- package/dist/illustrations/message-search-empty.js.map +1 -0
- package/dist/illustrations/message-search-empty.svg.cjs +2 -0
- package/dist/illustrations/message-search-empty.svg.cjs.map +1 -0
- package/dist/illustrations/message-search-empty.svg.js +6 -0
- package/dist/illustrations/message-search-empty.svg.js.map +1 -0
- package/dist/illustrations/mfa-complete.cjs +2 -0
- package/dist/illustrations/mfa-complete.cjs.map +1 -0
- package/dist/illustrations/mfa-complete.d.ts +4 -0
- package/dist/illustrations/mfa-complete.js +5 -0
- package/dist/illustrations/mfa-complete.js.map +1 -0
- package/dist/illustrations/mfa-complete.svg.cjs +2 -0
- package/dist/illustrations/mfa-complete.svg.cjs.map +1 -0
- package/dist/illustrations/mfa-complete.svg.js +6 -0
- package/dist/illustrations/mfa-complete.svg.js.map +1 -0
- package/dist/illustrations/mfa.cjs +2 -0
- package/dist/illustrations/mfa.cjs.map +1 -0
- package/dist/illustrations/mfa.d.ts +4 -0
- package/dist/illustrations/mfa.js +5 -0
- package/dist/illustrations/mfa.js.map +1 -0
- package/dist/illustrations/mfa.svg.cjs +2 -0
- package/dist/illustrations/mfa.svg.cjs.map +1 -0
- package/dist/illustrations/mfa.svg.js +6 -0
- package/dist/illustrations/mfa.svg.js.map +1 -0
- package/dist/illustrations/mobile-protection.cjs +2 -0
- package/dist/illustrations/mobile-protection.cjs.map +1 -0
- package/dist/illustrations/mobile-protection.d.ts +4 -0
- package/dist/illustrations/mobile-protection.js +5 -0
- package/dist/illustrations/mobile-protection.js.map +1 -0
- package/dist/illustrations/mobile-protection.svg.cjs +2 -0
- package/dist/illustrations/mobile-protection.svg.cjs.map +1 -0
- package/dist/illustrations/mobile-protection.svg.js +6 -0
- package/dist/illustrations/mobile-protection.svg.js.map +1 -0
- package/dist/illustrations/mobile-security.cjs +2 -0
- package/dist/illustrations/mobile-security.cjs.map +1 -0
- package/dist/illustrations/mobile-security.d.ts +4 -0
- package/dist/illustrations/mobile-security.js +5 -0
- package/dist/illustrations/mobile-security.js.map +1 -0
- package/dist/illustrations/mobile-security.svg.cjs +2 -0
- package/dist/illustrations/mobile-security.svg.cjs.map +1 -0
- package/dist/illustrations/mobile-security.svg.js +6 -0
- package/dist/illustrations/mobile-security.svg.js.map +1 -0
- package/dist/illustrations/names.cjs +2 -0
- package/dist/illustrations/names.cjs.map +1 -0
- package/dist/illustrations/names.d.ts +3 -0
- package/dist/illustrations/names.d.ts.map +1 -0
- package/dist/illustrations/names.js +73 -0
- package/dist/illustrations/names.js.map +1 -0
- package/dist/illustrations/new-password.cjs +2 -0
- package/dist/illustrations/new-password.cjs.map +1 -0
- package/dist/illustrations/new-password.d.ts +4 -0
- package/dist/illustrations/new-password.js +5 -0
- package/dist/illustrations/new-password.js.map +1 -0
- package/dist/illustrations/new-password.svg.cjs +2 -0
- package/dist/illustrations/new-password.svg.cjs.map +1 -0
- package/dist/illustrations/new-password.svg.js +6 -0
- package/dist/illustrations/new-password.svg.js.map +1 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.cjs +2 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.cjs.map +1 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.d.ts +4 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.js +5 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.js.map +1 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.svg.cjs +2 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.svg.cjs.map +1 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.svg.js +6 -0
- package/dist/illustrations/no-unreads-on-sidebar-bg.svg.js.map +1 -0
- package/dist/illustrations/office.cjs +2 -0
- package/dist/illustrations/office.cjs.map +1 -0
- package/dist/illustrations/office.d.ts +4 -0
- package/dist/illustrations/office.js +5 -0
- package/dist/illustrations/office.js.map +1 -0
- package/dist/illustrations/office.svg.cjs +2 -0
- package/dist/illustrations/office.svg.cjs.map +1 -0
- package/dist/illustrations/office.svg.js +6 -0
- package/dist/illustrations/office.svg.js.map +1 -0
- package/dist/illustrations/outgoing-webhook.cjs +2 -0
- package/dist/illustrations/outgoing-webhook.cjs.map +1 -0
- package/dist/illustrations/outgoing-webhook.d.ts +4 -0
- package/dist/illustrations/outgoing-webhook.js +5 -0
- package/dist/illustrations/outgoing-webhook.js.map +1 -0
- package/dist/illustrations/outgoing-webhook.svg.cjs +2 -0
- package/dist/illustrations/outgoing-webhook.svg.cjs.map +1 -0
- package/dist/illustrations/outgoing-webhook.svg.js +6 -0
- package/dist/illustrations/outgoing-webhook.svg.js.map +1 -0
- package/dist/illustrations/pinned-empty.cjs +2 -0
- package/dist/illustrations/pinned-empty.cjs.map +1 -0
- package/dist/illustrations/pinned-empty.d.ts +4 -0
- package/dist/illustrations/pinned-empty.js +5 -0
- package/dist/illustrations/pinned-empty.js.map +1 -0
- package/dist/illustrations/pinned-empty.svg.cjs +2 -0
- package/dist/illustrations/pinned-empty.svg.cjs.map +1 -0
- package/dist/illustrations/pinned-empty.svg.js +6 -0
- package/dist/illustrations/pinned-empty.svg.js.map +1 -0
- package/dist/illustrations/playbooks-empty.cjs +2 -0
- package/dist/illustrations/playbooks-empty.cjs.map +1 -0
- package/dist/illustrations/playbooks-empty.d.ts +4 -0
- package/dist/illustrations/playbooks-empty.js +5 -0
- package/dist/illustrations/playbooks-empty.js.map +1 -0
- package/dist/illustrations/playbooks-empty.svg.cjs +2 -0
- package/dist/illustrations/playbooks-empty.svg.cjs.map +1 -0
- package/dist/illustrations/playbooks-empty.svg.js +6 -0
- package/dist/illustrations/playbooks-empty.svg.js.map +1 -0
- package/dist/illustrations/private-channel-intro.cjs +2 -0
- package/dist/illustrations/private-channel-intro.cjs.map +1 -0
- package/dist/illustrations/private-channel-intro.d.ts +4 -0
- package/dist/illustrations/private-channel-intro.js +5 -0
- package/dist/illustrations/private-channel-intro.js.map +1 -0
- package/dist/illustrations/private-channel-intro.svg.cjs +2 -0
- package/dist/illustrations/private-channel-intro.svg.cjs.map +1 -0
- package/dist/illustrations/private-channel-intro.svg.js +6 -0
- package/dist/illustrations/private-channel-intro.svg.js.map +1 -0
- package/dist/illustrations/product-release.cjs +2 -0
- package/dist/illustrations/product-release.cjs.map +1 -0
- package/dist/illustrations/product-release.d.ts +4 -0
- package/dist/illustrations/product-release.js +5 -0
- package/dist/illustrations/product-release.js.map +1 -0
- package/dist/illustrations/product-release.svg.cjs +2 -0
- package/dist/illustrations/product-release.svg.cjs.map +1 -0
- package/dist/illustrations/product-release.svg.js +6 -0
- package/dist/illustrations/product-release.svg.js.map +1 -0
- package/dist/illustrations/public-channel-intro.cjs +2 -0
- package/dist/illustrations/public-channel-intro.cjs.map +1 -0
- package/dist/illustrations/public-channel-intro.d.ts +4 -0
- package/dist/illustrations/public-channel-intro.js +5 -0
- package/dist/illustrations/public-channel-intro.js.map +1 -0
- package/dist/illustrations/public-channel-intro.svg.cjs +2 -0
- package/dist/illustrations/public-channel-intro.svg.cjs.map +1 -0
- package/dist/illustrations/public-channel-intro.svg.js +6 -0
- package/dist/illustrations/public-channel-intro.svg.js.map +1 -0
- package/dist/illustrations/rating-desktop.cjs +2 -0
- package/dist/illustrations/rating-desktop.cjs.map +1 -0
- package/dist/illustrations/rating-desktop.d.ts +4 -0
- package/dist/illustrations/rating-desktop.js +5 -0
- package/dist/illustrations/rating-desktop.js.map +1 -0
- package/dist/illustrations/rating-desktop.svg.cjs +2 -0
- package/dist/illustrations/rating-desktop.svg.cjs.map +1 -0
- package/dist/illustrations/rating-desktop.svg.js +6 -0
- package/dist/illustrations/rating-desktop.svg.js.map +1 -0
- package/dist/illustrations/rating.cjs +2 -0
- package/dist/illustrations/rating.cjs.map +1 -0
- package/dist/illustrations/rating.d.ts +4 -0
- package/dist/illustrations/rating.js +5 -0
- package/dist/illustrations/rating.js.map +1 -0
- package/dist/illustrations/rating.svg.cjs +2 -0
- package/dist/illustrations/rating.svg.cjs.map +1 -0
- package/dist/illustrations/rating.svg.js +6 -0
- package/dist/illustrations/rating.svg.js.map +1 -0
- package/dist/illustrations/read-only.cjs +2 -0
- package/dist/illustrations/read-only.cjs.map +1 -0
- package/dist/illustrations/read-only.d.ts +4 -0
- package/dist/illustrations/read-only.js +5 -0
- package/dist/illustrations/read-only.js.map +1 -0
- package/dist/illustrations/read-only.svg.cjs +2 -0
- package/dist/illustrations/read-only.svg.cjs.map +1 -0
- package/dist/illustrations/read-only.svg.js +6 -0
- package/dist/illustrations/read-only.svg.js.map +1 -0
- package/dist/illustrations/reset-password.cjs +2 -0
- package/dist/illustrations/reset-password.cjs.map +1 -0
- package/dist/illustrations/reset-password.d.ts +4 -0
- package/dist/illustrations/reset-password.js +5 -0
- package/dist/illustrations/reset-password.js.map +1 -0
- package/dist/illustrations/reset-password.svg.cjs +2 -0
- package/dist/illustrations/reset-password.svg.cjs.map +1 -0
- package/dist/illustrations/reset-password.svg.js +8 -0
- package/dist/illustrations/reset-password.svg.js.map +1 -0
- package/dist/illustrations/saved-empty.cjs +2 -0
- package/dist/illustrations/saved-empty.cjs.map +1 -0
- package/dist/illustrations/saved-empty.d.ts +4 -0
- package/dist/illustrations/saved-empty.js +5 -0
- package/dist/illustrations/saved-empty.js.map +1 -0
- package/dist/illustrations/saved-empty.svg.cjs +2 -0
- package/dist/illustrations/saved-empty.svg.cjs.map +1 -0
- package/dist/illustrations/saved-empty.svg.js +6 -0
- package/dist/illustrations/saved-empty.svg.js.map +1 -0
- package/dist/illustrations/scheduled-empty.cjs +2 -0
- package/dist/illustrations/scheduled-empty.cjs.map +1 -0
- package/dist/illustrations/scheduled-empty.d.ts +4 -0
- package/dist/illustrations/scheduled-empty.js +5 -0
- package/dist/illustrations/scheduled-empty.js.map +1 -0
- package/dist/illustrations/scheduled-empty.svg.cjs +2 -0
- package/dist/illustrations/scheduled-empty.svg.cjs.map +1 -0
- package/dist/illustrations/scheduled-empty.svg.js +6 -0
- package/dist/illustrations/scheduled-empty.svg.js.map +1 -0
- package/dist/illustrations/search.cjs +2 -0
- package/dist/illustrations/search.cjs.map +1 -0
- package/dist/illustrations/search.d.ts +4 -0
- package/dist/illustrations/search.js +5 -0
- package/dist/illustrations/search.js.map +1 -0
- package/dist/illustrations/search.svg.cjs +2 -0
- package/dist/illustrations/search.svg.cjs.map +1 -0
- package/dist/illustrations/search.svg.js +6 -0
- package/dist/illustrations/search.svg.js.map +1 -0
- package/dist/illustrations/server.cjs +2 -0
- package/dist/illustrations/server.cjs.map +1 -0
- package/dist/illustrations/server.d.ts +4 -0
- package/dist/illustrations/server.js +5 -0
- package/dist/illustrations/server.js.map +1 -0
- package/dist/illustrations/server.svg.cjs +2 -0
- package/dist/illustrations/server.svg.cjs.map +1 -0
- package/dist/illustrations/server.svg.js +6 -0
- package/dist/illustrations/server.svg.js.map +1 -0
- package/dist/illustrations/setup-system.cjs +2 -0
- package/dist/illustrations/setup-system.cjs.map +1 -0
- package/dist/illustrations/setup-system.d.ts +4 -0
- package/dist/illustrations/setup-system.js +5 -0
- package/dist/illustrations/setup-system.js.map +1 -0
- package/dist/illustrations/setup-system.svg.cjs +2 -0
- package/dist/illustrations/setup-system.svg.cjs.map +1 -0
- package/dist/illustrations/setup-system.svg.js +6 -0
- package/dist/illustrations/setup-system.svg.js.map +1 -0
- package/dist/illustrations/site-error.cjs +2 -0
- package/dist/illustrations/site-error.cjs.map +1 -0
- package/dist/illustrations/site-error.d.ts +4 -0
- package/dist/illustrations/site-error.js +5 -0
- package/dist/illustrations/site-error.js.map +1 -0
- package/dist/illustrations/site-error.svg.cjs +2 -0
- package/dist/illustrations/site-error.svg.cjs.map +1 -0
- package/dist/illustrations/site-error.svg.js +6 -0
- package/dist/illustrations/site-error.svg.js.map +1 -0
- package/dist/illustrations/slash-commands.cjs +2 -0
- package/dist/illustrations/slash-commands.cjs.map +1 -0
- package/dist/illustrations/slash-commands.d.ts +4 -0
- package/dist/illustrations/slash-commands.js +5 -0
- package/dist/illustrations/slash-commands.js.map +1 -0
- package/dist/illustrations/slash-commands.svg.cjs +2 -0
- package/dist/illustrations/slash-commands.svg.cjs.map +1 -0
- package/dist/illustrations/slash-commands.svg.js +6 -0
- package/dist/illustrations/slash-commands.svg.js.map +1 -0
- package/dist/illustrations/success.cjs +2 -0
- package/dist/illustrations/success.cjs.map +1 -0
- package/dist/illustrations/success.d.ts +4 -0
- package/dist/illustrations/success.js +5 -0
- package/dist/illustrations/success.js.map +1 -0
- package/dist/illustrations/success.svg.cjs +2 -0
- package/dist/illustrations/success.svg.cjs.map +1 -0
- package/dist/illustrations/success.svg.js +6 -0
- package/dist/illustrations/success.svg.js.map +1 -0
- package/dist/illustrations/system-admins.cjs +2 -0
- package/dist/illustrations/system-admins.cjs.map +1 -0
- package/dist/illustrations/system-admins.d.ts +4 -0
- package/dist/illustrations/system-admins.js +5 -0
- package/dist/illustrations/system-admins.js.map +1 -0
- package/dist/illustrations/system-admins.svg.cjs +2 -0
- package/dist/illustrations/system-admins.svg.cjs.map +1 -0
- package/dist/illustrations/system-admins.svg.js +14 -0
- package/dist/illustrations/system-admins.svg.js.map +1 -0
- package/dist/illustrations/threads-empty.cjs +2 -0
- package/dist/illustrations/threads-empty.cjs.map +1 -0
- package/dist/illustrations/threads-empty.d.ts +4 -0
- package/dist/illustrations/threads-empty.js +5 -0
- package/dist/illustrations/threads-empty.js.map +1 -0
- package/dist/illustrations/threads-empty.svg.cjs +2 -0
- package/dist/illustrations/threads-empty.svg.cjs.map +1 -0
- package/dist/illustrations/threads-empty.svg.js +6 -0
- package/dist/illustrations/threads-empty.svg.js.map +1 -0
- package/dist/illustrations/timer.cjs +2 -0
- package/dist/illustrations/timer.cjs.map +1 -0
- package/dist/illustrations/timer.d.ts +4 -0
- package/dist/illustrations/timer.js +5 -0
- package/dist/illustrations/timer.js.map +1 -0
- package/dist/illustrations/timer.svg.cjs +2 -0
- package/dist/illustrations/timer.svg.cjs.map +1 -0
- package/dist/illustrations/timer.svg.js +6 -0
- package/dist/illustrations/timer.svg.js.map +1 -0
- package/dist/illustrations/tls-certificate.cjs +2 -0
- package/dist/illustrations/tls-certificate.cjs.map +1 -0
- package/dist/illustrations/tls-certificate.d.ts +4 -0
- package/dist/illustrations/tls-certificate.js +5 -0
- package/dist/illustrations/tls-certificate.js.map +1 -0
- package/dist/illustrations/tls-certificate.svg.cjs +2 -0
- package/dist/illustrations/tls-certificate.svg.cjs.map +1 -0
- package/dist/illustrations/tls-certificate.svg.js +6 -0
- package/dist/illustrations/tls-certificate.svg.js.map +1 -0
- package/dist/illustrations/tools.cjs +2 -0
- package/dist/illustrations/tools.cjs.map +1 -0
- package/dist/illustrations/tools.d.ts +4 -0
- package/dist/illustrations/tools.js +5 -0
- package/dist/illustrations/tools.js.map +1 -0
- package/dist/illustrations/tools.svg.cjs +2 -0
- package/dist/illustrations/tools.svg.cjs.map +1 -0
- package/dist/illustrations/tools.svg.js +6 -0
- package/dist/illustrations/tools.svg.js.map +1 -0
- package/dist/illustrations/town-square-channel-intro.cjs +2 -0
- package/dist/illustrations/town-square-channel-intro.cjs.map +1 -0
- package/dist/illustrations/town-square-channel-intro.d.ts +4 -0
- package/dist/illustrations/town-square-channel-intro.js +5 -0
- package/dist/illustrations/town-square-channel-intro.js.map +1 -0
- package/dist/illustrations/town-square-channel-intro.svg.cjs +2 -0
- package/dist/illustrations/town-square-channel-intro.svg.cjs.map +1 -0
- package/dist/illustrations/town-square-channel-intro.svg.js +6 -0
- package/dist/illustrations/town-square-channel-intro.svg.js.map +1 -0
- package/dist/illustrations/upload-license.cjs +2 -0
- package/dist/illustrations/upload-license.cjs.map +1 -0
- package/dist/illustrations/upload-license.d.ts +4 -0
- package/dist/illustrations/upload-license.js +5 -0
- package/dist/illustrations/upload-license.js.map +1 -0
- package/dist/illustrations/upload-license.svg.cjs +2 -0
- package/dist/illustrations/upload-license.svg.cjs.map +1 -0
- package/dist/illustrations/upload-license.svg.js +6 -0
- package/dist/illustrations/upload-license.svg.js.map +1 -0
- package/dist/illustrations/verify-email.cjs +2 -0
- package/dist/illustrations/verify-email.cjs.map +1 -0
- package/dist/illustrations/verify-email.d.ts +4 -0
- package/dist/illustrations/verify-email.js +5 -0
- package/dist/illustrations/verify-email.js.map +1 -0
- package/dist/illustrations/verify-email.svg.cjs +2 -0
- package/dist/illustrations/verify-email.svg.cjs.map +1 -0
- package/dist/illustrations/verify-email.svg.js +8 -0
- package/dist/illustrations/verify-email.svg.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +22 -18
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +186 -183
- package/dist/index.js.map +1 -1
- package/package.json +239 -21
- package/dist/components/app-bar-item/AppBarItem.cjs +0 -2
- package/dist/components/app-bar-item/AppBarItem.cjs.map +0 -1
- package/dist/components/app-bar-item/AppBarItem.d.ts +0 -25
- package/dist/components/app-bar-item/AppBarItem.d.ts.map +0 -1
- package/dist/components/app-bar-item/AppBarItem.js +0 -49
- package/dist/components/app-bar-item/AppBarItem.js.map +0 -1
- package/dist/components/app-bar-item/AppBarItem.module.css +0 -1
- package/dist/components/app-bar-item/AppBarItem.module.scss.cjs +0 -2
- package/dist/components/app-bar-item/AppBarItem.module.scss.cjs.map +0 -1
- package/dist/components/app-bar-item/AppBarItem.module.scss.js +0 -11
- package/dist/components/app-bar-item/AppBarItem.module.scss.js.map +0 -1
- package/dist/components/app-bar-item/index.d.ts +0 -3
- package/dist/components/app-bar-item/index.d.ts.map +0 -1
- package/dist/components/app-bar-item/index.js +0 -5
- package/dist/components/channel-header/ChannelHeader.cjs +0 -2
- package/dist/components/channel-header/ChannelHeader.cjs.map +0 -1
- package/dist/components/channel-header/ChannelHeader.d.ts +0 -37
- package/dist/components/channel-header/ChannelHeader.d.ts.map +0 -1
- package/dist/components/channel-header/ChannelHeader.js +0 -174
- package/dist/components/channel-header/ChannelHeader.js.map +0 -1
- package/dist/components/channel-header/ChannelHeader.module.css +0 -1
- package/dist/components/channel-header/ChannelHeader.module.scss.cjs +0 -2
- package/dist/components/channel-header/ChannelHeader.module.scss.cjs.map +0 -1
- package/dist/components/channel-header/ChannelHeader.module.scss.js +0 -20
- package/dist/components/channel-header/ChannelHeader.module.scss.js.map +0 -1
- package/dist/components/channel-header/index.d.ts +0 -3
- package/dist/components/channel-header/index.d.ts.map +0 -1
- package/dist/components/channel-header/index.js +0 -5
- package/dist/components/message/Message.cjs +0 -2
- package/dist/components/message/Message.cjs.map +0 -1
- package/dist/components/message/Message.d.ts +0 -34
- package/dist/components/message/Message.d.ts.map +0 -1
- package/dist/components/message/Message.js +0 -54
- package/dist/components/message/Message.js.map +0 -1
- package/dist/components/message/Message.module.css +0 -1
- package/dist/components/message/Message.module.scss.cjs +0 -2
- package/dist/components/message/Message.module.scss.cjs.map +0 -1
- package/dist/components/message/Message.module.scss.js +0 -26
- package/dist/components/message/Message.module.scss.js.map +0 -1
- package/dist/components/message/index.cjs +0 -2
- package/dist/components/message/index.d.ts +0 -4
- package/dist/components/message/index.d.ts.map +0 -1
- package/dist/components/message/index.js +0 -7
- package/dist/components/message-input/MessageInput.cjs +0 -2
- package/dist/components/message-input/MessageInput.cjs.map +0 -1
- package/dist/components/message-input/MessageInput.d.ts +0 -15
- package/dist/components/message-input/MessageInput.d.ts.map +0 -1
- package/dist/components/message-input/MessageInput.js +0 -407
- package/dist/components/message-input/MessageInput.js.map +0 -1
- package/dist/components/message-input/MessageInput.module.css +0 -1
- package/dist/components/message-input/MessageInput.module.scss.cjs +0 -2
- package/dist/components/message-input/MessageInput.module.scss.cjs.map +0 -1
- package/dist/components/message-input/MessageInput.module.scss.js +0 -37
- package/dist/components/message-input/MessageInput.module.scss.js.map +0 -1
- package/dist/components/message-input/index.d.ts +0 -3
- package/dist/components/message-input/index.js +0 -5
- package/dist/components/message-reactions/MessageReactions.cjs +0 -2
- package/dist/components/message-reactions/MessageReactions.cjs.map +0 -1
- package/dist/components/message-reactions/MessageReactions.d.ts.map +0 -1
- package/dist/components/message-reactions/MessageReactions.js +0 -85
- package/dist/components/message-reactions/MessageReactions.js.map +0 -1
- package/dist/components/message-reactions/MessageReactions.module.css +0 -1
- package/dist/components/message-reactions/MessageReactions.module.scss.cjs +0 -2
- package/dist/components/message-reactions/MessageReactions.module.scss.cjs.map +0 -1
- package/dist/components/message-reactions/MessageReactions.module.scss.js +0 -18
- package/dist/components/message-reactions/MessageReactions.module.scss.js.map +0 -1
- package/dist/components/message-reactions/index.d.ts +0 -3
- package/dist/components/message-reactions/index.d.ts.map +0 -1
- package/dist/components/message-reactions/index.js +0 -5
- package/dist/components/reaction-pill/ReactionPill.cjs +0 -2
- package/dist/components/reaction-pill/ReactionPill.cjs.map +0 -1
- package/dist/components/reaction-pill/ReactionPill.d.ts +0 -24
- package/dist/components/reaction-pill/ReactionPill.d.ts.map +0 -1
- package/dist/components/reaction-pill/ReactionPill.js +0 -51
- package/dist/components/reaction-pill/ReactionPill.js.map +0 -1
- package/dist/components/reaction-pill/ReactionPill.module.css +0 -1
- package/dist/components/reaction-pill/ReactionPill.module.scss.cjs +0 -2
- package/dist/components/reaction-pill/ReactionPill.module.scss.cjs.map +0 -1
- package/dist/components/reaction-pill/ReactionPill.module.scss.js +0 -17
- package/dist/components/reaction-pill/ReactionPill.module.scss.js.map +0 -1
- package/dist/components/reaction-pill/index.d.ts +0 -3
- package/dist/components/reaction-pill/index.js +0 -5
- package/dist/components/right-sidebar/RightSidebar.cjs +0 -2
- package/dist/components/right-sidebar/RightSidebar.cjs.map +0 -1
- package/dist/components/right-sidebar/RightSidebar.d.ts +0 -23
- package/dist/components/right-sidebar/RightSidebar.d.ts.map +0 -1
- package/dist/components/right-sidebar/RightSidebar.js +0 -29
- package/dist/components/right-sidebar/RightSidebar.js.map +0 -1
- package/dist/components/right-sidebar/RightSidebar.module.css +0 -1
- package/dist/components/right-sidebar/RightSidebar.module.scss.cjs +0 -2
- package/dist/components/right-sidebar/RightSidebar.module.scss.cjs.map +0 -1
- package/dist/components/right-sidebar/RightSidebar.module.scss.js +0 -12
- package/dist/components/right-sidebar/RightSidebar.module.scss.js.map +0 -1
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.cjs +0 -2
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.cjs.map +0 -1
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.d.ts.map +0 -1
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.js.map +0 -1
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.module.css +0 -1
- package/dist/components/right-sidebar/RightSidebarHeader/RightSidebarHeader.module.scss.cjs +0 -2
- package/dist/components/right-sidebar/RightSidebarHeader/index.d.ts +0 -3
- package/dist/components/right-sidebar/RightSidebarHeader/index.d.ts.map +0 -1
- package/dist/components/right-sidebar/index.cjs +0 -2
- package/dist/components/right-sidebar/index.d.ts +0 -5
- package/dist/components/right-sidebar/index.d.ts.map +0 -1
- package/dist/components/right-sidebar/index.js +0 -7
- package/dist/components/right-sidebar/index.js.map +0 -1
- /package/dist/components/{app-bar-item → card-button}/index.cjs.map +0 -0
- /package/dist/components/{message → card-button}/index.js.map +0 -0
- /package/dist/components/{channel-header → emoji-button}/index.cjs.map +0 -0
- /package/dist/components/{app-bar-item → emoji-button}/index.js.map +0 -0
- /package/dist/components/{message-input → emoji-popover}/index.cjs.map +0 -0
- /package/dist/components/{channel-header → emoji-popover}/index.js.map +0 -0
- /package/dist/components/{message-reactions → menu-group-heading}/index.cjs.map +0 -0
- /package/dist/components/{message-input → menu-group-heading}/index.js.map +0 -0
- /package/dist/components/{message → modal-footer}/index.cjs.map +0 -0
- /package/dist/components/{message-reactions → modal-footer}/index.js.map +0 -0
- /package/dist/components/{reaction-pill → modal-header}/index.cjs.map +0 -0
- /package/dist/components/{reaction-pill → modal-header}/index.js.map +0 -0
- /package/dist/components/{right-sidebar → reaction-button}/index.cjs.map +0 -0
- /package/dist/components/{right-sidebar/RightSidebarHeader → right-sidebar-header}/RightSidebarHeader.module.scss.cjs.map +0 -0
- /package/dist/components/{right-sidebar/RightSidebarHeader → right-sidebar-header}/RightSidebarHeader.module.scss.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":"onBAyCMA,EAAsD,CAC1D,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACC,IAAuB,EAAI,EACzD,cAAUF,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACE,IAAuB,EAAI,EAC5D,aAASH,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACG,IAAiB,EAAI,EACrD,cAAUJ,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACI,IAAuB,EAAI,EAC5D,WAAOL,EAAAA,QAAA,CAAK,KAAK,KAAK,MAAOC,EAAAA,IAACC,IAAuB,CAAA,CAAI,CAC3D,EAOA,SAAwBI,EAAc,CACpC,UAAAC,EAAY,GACZ,KAAAC,EAAO,OACP,KAAAC,EACA,MAAAC,EACA,YAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,qBAAAC,EACA,kBAAAC,EACA,UAAAC,CACF,EAAuB,CACrB,MAAMC,EAAYC,EAAAA,QAAO,wBAAwBV,EAAK,YAAA,CAAa,EAAE,EAE/DW,EAAY,CAACD,UAAO,gBAAgB,EAAGD,EAAWV,CAAS,EAC9D,OAAO,OAAO,EACd,KAAK,GAAG,EAELa,EAAeX,IAAS,OAAYA,EAAOV,EAAcS,CAAI,EAE7Da,EAAaT,GAAsB,MAAQE,GAAwB,KAEzE,OACEQ,EAAAA,KAAC,MAAA,CAAI,UAAWH,EACd,SAAA,CAAAG,EAAAA,KAAC,MAAA,CAAI,UAAWJ,EAAAA,QAAO,yBAAyB,EAC7C,SAAA,CAAAE,GAAgB,YACd,OAAA,CAAK,UAAWF,EAAAA,QAAO,sBAAsB,EAAG,cAAW,GACzD,SAAAE,CAAA,CACH,EAEFE,EAAAA,KAAC,MAAA,CAAI,UAAWJ,EAAAA,QAAO,sBAAsB,EAC3C,SAAA,CAAAjB,MAAC,IAAA,CAAE,UAAWiB,EAAAA,QAAO,uBAAuB,EAAI,SAAAR,EAAM,EACrDC,GAAe,MACdV,MAAC,MAAA,CAAI,UAAWiB,EAAAA,QAAO,6BAA6B,EACjD,SAAAP,EACH,EAEDU,GACCC,EAAAA,KAAC,MAAA,CAAI,UAAWJ,UAAO,yBAAyB,EAC7C,SAAA,CAAAN,GAAsB,MACrBX,EAAAA,IAACsB,EAAAA,QAAA,CACC,SAAS,UACT,KAAK,QACL,QAASV,EAER,SAAAD,CAAA,CAAA,EAGJE,GAAwB,MACvBb,EAAAA,IAACsB,EAAAA,QAAA,CACC,SAAS,YACT,KAAK,QACL,QAASR,EAER,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,EACF,EACCE,GAAa,MACZf,EAAAA,IAACuB,EAAAA,QAAA,CACC,UAAWN,EAAAA,QAAO,yBAAyB,EAC3C,aAAW,UACX,KAAK,QACL,WAAOlB,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACwB,IAAU,EAAI,EAC5C,QAAST,CAAA,CAAA,CACX,EAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"SectionNotice.cjs","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size=\"20\" />` — the slot does not resize raw SVG children. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":"onBAyCMA,EAAsD,CAC1D,WAAOC,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACC,IAAuB,EAAI,EACzD,cAAUF,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACE,IAAuB,EAAI,EAC5D,aAASH,UAAA,CAAK,KAAK,KAAK,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D,CAAA,CAAA,EAGJE,GAAwB,MACvBb,EAAAA,IAACsB,EAAAA,QAAA,CACC,SAAS,YACT,KAAK,QACL,QAASR,EAER,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,EACF,EACCE,GAAa,MACZf,EAAAA,IAACuB,EAAAA,QAAA,CACC,UAAWN,EAAAA,QAAO,yBAAyB,EAC3C,aAAW,UACX,KAAK,QACL,WAAOlB,UAAA,CAAK,KAAK,KAAK,MAAOC,MAACwB,IAAU,EAAI,EAC5C,QAAST,CAAA,CAAA,CACX,EAEJ,CAEJ"}
|
|
@@ -5,7 +5,7 @@ export interface SectionNoticeProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Type controls color-coding. Default: Info. */
|
|
7
7
|
type?: SectionNoticeType;
|
|
8
|
-
/** Optional leading icon. When omitted a default type icon is shown. */
|
|
8
|
+
/** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size="20" />` — the slot does not resize raw SVG children. */
|
|
9
9
|
icon?: ReactNode;
|
|
10
10
|
/** Title / headline text. */
|
|
11
11
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,
|
|
1
|
+
{"version":3,"file":"SectionNotice.d.ts","sourceRoot":"","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,oKAAoK;IACpK,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,qCAAqC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAUD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,SAAc,EACd,IAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,GACV,EAAE,kBAAkB,2CA6DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AAyCA,MAAMA,IAAsD;AAAA,EAC1D,wBAAOC,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,GAAI;AAAA,EACzD,2BAAUF,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACE,KAAuB,GAAI;AAAA,EAC5D,0BAASH,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACG,KAAiB,GAAI;AAAA,EACrD,2BAAUJ,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACI,KAAuB,GAAI;AAAA,EAC5D,wBAAOL,GAAA,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AAA,UAAA;AAAA,UAGJE,KAAwB,QACvB,gBAAAb;AAAA,YAACsB;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,MAAK;AAAA,cACL,SAASR;AAAA,cAER,UAAAD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH,EAAA,CAEJ;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IACCE,KAAa,QACZ,gBAAAf;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,WAAWN,EAAO,yBAAyB;AAAA,QAC3C,cAAW;AAAA,QACX,MAAK;AAAA,QACL,wBAAOlB,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACwB,KAAU,GAAI;AAAA,QAC5C,SAAST;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"SectionNotice.js","sources":["../../../src/components/section-notice/SectionNotice.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport Button from '@/components/button/Button';\nimport IconButton from '@/components/icon-button/IconButton';\nimport Icon from '@/components/icon/Icon';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport CheckCircleOutlineIcon from '@mattermost/compass-icons/components/check-circle-outline';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport styles from './SectionNotice.module.scss';\n\nexport type SectionNoticeType =\n | 'info'\n | 'warning'\n | 'danger'\n | 'success'\n | 'hint';\n\nexport interface SectionNoticeProps {\n /** Optional CSS class name. */\n className?: string;\n /** Type controls color-coding. Default: Info. */\n type?: SectionNoticeType;\n /** Optional leading icon. When omitted a default type icon is shown. Pass `<Icon glyph={<SomeIcon />} size=\"20\" />` — the slot does not resize raw SVG children. */\n icon?: ReactNode;\n /** Title / headline text. */\n title: string;\n /** Optional body description. */\n description?: ReactNode;\n /** Primary action button label. */\n primaryButtonLabel?: string;\n /** Primary action callback. */\n onPrimaryAction?: () => void;\n /** Secondary action button label. */\n secondaryButtonLabel?: string;\n /** Secondary action callback. */\n onSecondaryAction?: () => void;\n /** Called when dismiss (×) button is clicked. When omitted, dismiss button is hidden. */\n onDismiss?: () => void;\n}\n\nconst DEFAULT_ICONS: Record<SectionNoticeType, ReactNode> = {\n info: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n warning: <Icon size=\"20\" glyph={<AlertCircleOutlineIcon />} />,\n danger: <Icon size=\"20\" glyph={<AlertOutlineIcon />} />,\n success: <Icon size=\"20\" glyph={<CheckCircleOutlineIcon />} />,\n hint: <Icon size=\"20\" glyph={<InformationOutlineIcon />} />,\n};\n\n/**\n * A Section Notice is an in-context alert that lives inside a settings page, admin panel, or\n * other content region. Use it to flag important information, report a state change, or\n * surface a problem the user needs to act on — without yanking them out of the flow.\n */\nexport default function SectionNotice({\n className = '',\n type = 'info',\n icon,\n title,\n description,\n primaryButtonLabel,\n onPrimaryAction,\n secondaryButtonLabel,\n onSecondaryAction,\n onDismiss,\n}: SectionNoticeProps) {\n const typeClass = styles[`section-notice--type-${type.toLowerCase()}`];\n\n const rootClass = [styles['section-notice'], typeClass, className]\n .filter(Boolean)\n .join(' ');\n\n const resolvedIcon = icon !== undefined ? icon : DEFAULT_ICONS[type];\n\n const hasActions = primaryButtonLabel != null || secondaryButtonLabel != null;\n\n return (\n <div className={rootClass}>\n <div className={styles['section-notice__content']}>\n {resolvedIcon != null && (\n <span className={styles['section-notice__icon']} aria-hidden>\n {resolvedIcon}\n </span>\n )}\n <div className={styles['section-notice__body']}>\n <p className={styles['section-notice__title']}>{title}</p>\n {description != null && (\n <div className={styles['section-notice__description']}>\n {description}\n </div>\n )}\n {hasActions && (\n <div className={styles['section-notice__actions']}>\n {primaryButtonLabel != null && (\n <Button\n emphasis=\"primary\"\n size=\"small\"\n onClick={onPrimaryAction}\n >\n {primaryButtonLabel}\n </Button>\n )}\n {secondaryButtonLabel != null && (\n <Button\n emphasis=\"secondary\"\n size=\"small\"\n onClick={onSecondaryAction}\n >\n {secondaryButtonLabel}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n {onDismiss != null && (\n <IconButton\n className={styles['section-notice__dismiss']}\n aria-label=\"Dismiss\"\n size=\"small\"\n icon={<Icon size=\"16\" glyph={<CloseIcon />} />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["DEFAULT_ICONS","Icon","jsx","InformationOutlineIcon","AlertCircleOutlineIcon","AlertOutlineIcon","CheckCircleOutlineIcon","SectionNotice","className","type","icon","title","description","primaryButtonLabel","onPrimaryAction","secondaryButtonLabel","onSecondaryAction","onDismiss","typeClass","styles","rootClass","resolvedIcon","hasActions","jsxs","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AAyCA,MAAMA,IAAsD;AAAA,EAC1D,wBAAOC,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,GAAI;AAAA,EACzD,2BAAUF,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACE,KAAuB,GAAI;AAAA,EAC5D,0BAASH,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACG,KAAiB,GAAI;AAAA,EACrD,2BAAUJ,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACI,KAAuB,GAAI;AAAA,EAC5D,wBAAOL,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACC,KAAuB,EAAA,CAAI;AAC3D;AAOA,SAAwBI,EAAc;AAAA,EACpC,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,GAAuB;AACrB,QAAMC,IAAYC,EAAO,wBAAwBV,EAAK,YAAA,CAAa,EAAE,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AAA,QACL,wBAAOlB,GAAA,EAAK,MAAK,MAAK,OAAO,gBAAAC,EAACwB,KAAU,GAAI;AAAA,QAC5C,SAAST;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /**
|
|
1
|
+
{"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size=\"x-small\"` or `<GlobeIcon size={12} />` for `size=\"small\"`. Do not wrap in `<Icon>`. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":"oLA6BMA,EAAsC,CAC1C,QAASC,EAAAA,QAAO,mBAAmB,EACnC,KAAMA,EAAAA,QAAO,gBAAgB,EAC7B,WAAYA,EAAAA,QAAO,oBAAoB,EACvC,OAAQA,EAAAA,QAAO,kBAAkB,EACjC,QAASA,EAAAA,QAAO,mBAAmB,EACnC,QAASA,EAAAA,QAAO,mBAAmB,CACrC,EAOA,SAAwBC,EAAI,CAC1B,MAAAC,EACA,KAAAC,EAAO,UACP,KAAAC,EAAO,UACP,OAAAC,EAAS,aACT,YAAAC,EACA,UAAAC,EAAY,EACd,EAAa,CACX,MAAMC,EAAU,CACdR,EAAAA,QAAO,IACPD,EAAWI,CAAI,EACfC,IAAS,QACLJ,EAAAA,QAAO,iBAAiB,EACxBA,EAAAA,QAAO,mBAAmB,EAC9BK,IAAW,WAAaL,UAAO,sBAAsB,EAAI,GACzDO,CAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEE,EAAAA,KAAC,OAAA,CAAK,UAAWD,EACd,SAAA,CAAAF,GACCI,EAAAA,IAAC,QAAK,UAAWV,EAAAA,QAAO,UAAc,cAAW,GAC9C,SAAAM,CAAA,CACH,QAED,OAAA,CAAK,UAAWN,EAAAA,QAAO,WAAgB,SAAAE,CAAA,CAAM,CAAA,EAChD,CAEJ"}
|
|
@@ -11,7 +11,7 @@ export type TagProps = {
|
|
|
11
11
|
size?: TagSize;
|
|
12
12
|
/** Text casing. Default: Title Case. */
|
|
13
13
|
casing?: TagCasing;
|
|
14
|
-
/**
|
|
14
|
+
/** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size="x-small"` or `<GlobeIcon size={12} />` for `size="small"`. Do not wrap in `<Icon>`. */
|
|
15
15
|
leadingIcon?: ReactNode;
|
|
16
16
|
/** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */
|
|
17
17
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,OAAO,GACf,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC1C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG;IACrB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,OAAO,GACf,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC1C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG;IACrB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qLAAqL;IACrL,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,KAAK,EACL,IAAgB,EAChB,IAAgB,EAChB,MAAqB,EACrB,WAAW,EACX,SAAc,GACf,EAAE,QAAQ,2CAuBV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /**
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styles from './Tag.module.scss';\n\nexport type TagType =\n | 'default'\n | 'info'\n | 'info-dim'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TagSize = 'small' | 'x-small';\nexport type TagCasing = 'title-case' | 'all-caps';\n\nexport type TagProps = {\n /** Tag label text. */\n label: string;\n /** Semantic colour type. Default: Default. */\n type?: TagType;\n /** Size variant. Default: X-Small. */\n size?: TagSize;\n /** Text casing. Default: Title Case. */\n casing?: TagCasing;\n /** Raw SVG glyph from `@mattermost/compass-icons` — e.g. `<GlobeIcon size={10} />` for `size=\"x-small\"` or `<GlobeIcon size={12} />` for `size=\"small\"`. Do not wrap in `<Icon>`. */\n leadingIcon?: ReactNode;\n /** Merged onto the root after variant classes (e.g. layout overrides in a parent row). */\n className?: string;\n};\n\nconst TYPE_CLASS: Record<TagType, string> = {\n default: styles['tag--type-default'],\n info: styles['tag--type-info'],\n 'info-dim': styles['tag--type-info-dim'],\n danger: styles['tag--type-danger'],\n success: styles['tag--type-success'],\n warning: styles['tag--type-warning'],\n};\n\n/**\n * Tags are compact pills that mark something — a role (_BOT_, _GUEST_), a tier\n * (_PROFESSIONAL_), a status (_NEW_, _BETA_), or a category. They're scannable signal: a way\n * to surface a small piece of metadata without spending a sentence on it.\n */\nexport default function Tag({\n label,\n type = 'default',\n size = 'x-small',\n casing = 'title-case',\n leadingIcon,\n className = '',\n}: TagProps) {\n const classes = [\n styles.tag,\n TYPE_CLASS[type],\n size === 'small'\n ? styles['tag--size-small']\n : styles['tag--size-x-small'],\n casing === 'all-caps' ? styles['tag--casing-all-caps'] : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={classes}>\n {leadingIcon && (\n <span className={styles['tag__icon']} aria-hidden>\n {leadingIcon}\n </span>\n )}\n <span className={styles['tag__label']}>{label}</span>\n </span>\n );\n}\n"],"names":["TYPE_CLASS","styles","Tag","label","type","size","casing","leadingIcon","className","classes","jsxs","jsx"],"mappings":";;AA6BA,MAAMA,IAAsC;AAAA,EAC1C,SAASC,EAAO,mBAAmB;AAAA,EACnC,MAAMA,EAAO,gBAAgB;AAAA,EAC7B,YAAYA,EAAO,oBAAoB;AAAA,EACvC,QAAQA,EAAO,kBAAkB;AAAA,EACjC,SAASA,EAAO,mBAAmB;AAAA,EACnC,SAASA,EAAO,mBAAmB;AACrC;AAOA,SAAwBC,EAAI;AAAA,EAC1B,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAa;AACX,QAAMC,IAAU;AAAA,IACdR,EAAO;AAAA,IACPD,EAAWI,CAAI;AAAA,IACfC,MAAS,UACLJ,EAAO,iBAAiB,IACxBA,EAAO,mBAAmB;AAAA,IAC9BK,MAAW,aAAaL,EAAO,sBAAsB,IAAI;AAAA,IACzDO;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAE,EAAC,QAAA,EAAK,WAAWD,GACd,UAAA;AAAA,IAAAF,KACC,gBAAAI,EAAC,UAAK,WAAWV,EAAO,WAAc,eAAW,IAC9C,UAAAM,EAAA,CACH;AAAA,sBAED,QAAA,EAAK,WAAWN,EAAO,YAAgB,UAAAE,EAAA,CAAM;AAAA,EAAA,GAChD;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.cjs","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon. */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":"iPAsCMA,EAAYC,EAAAA,WAChB,SACE,CACE,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,QAAAC,EAAU,GACV,UAAAC,EACA,mBAAAC,EAAqB,GACrB,GAAIC,EACJ,MAAOC,EACP,aAAAC,EACA,YAAAC,EACA,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAAKd,GAAUY,EACfG,EAAWC,EAAAA,OAAgC,IAAI,EAE/CC,EAAcC,EAAAA,YACjBC,GAAkC,CAEjC,GADAJ,EAAS,QAAUI,EACf,OAAOR,GAAQ,WAAY,CAC7B,MAAMS,EAAWT,EAAsCQ,CAAI,EAC3D,MAAO,IAAM,CACXJ,EAAS,QAAU,KACf,OAAOK,GAAY,YAAYA,EAAA,CACrC,CACF,CACIT,MAAS,QAAUQ,EACzB,EACA,CAACR,CAAG,CAAA,EAGAU,EAAepB,IAAc,OAC7B,CAACqB,EAAmBC,CAAoB,EAAIC,EAAAA,SAChDtB,GAAgB,EAAA,EAEZuB,EAAQJ,EAAgBpB,EAAuBqB,EAC/CI,EAAWD,GAAS,MAAQA,IAAU,GAEtC,CAACE,EAAWC,CAAY,EAAIJ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D,MAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,0BAA0B,EAC/C,SAAAvC,EACH,EAEFiD,EAAAA,IAAC,QAAA,CACC,IAAK3B,EACL,GAAAH,EACA,UAAWoB,EAAAA,QAAO,mBAAmB,EACrC,MAAOb,EAAepB,EAAY,OAClC,aAAcoB,EAAe,OAAYnB,EACzC,YAAAC,EACA,UAAAL,EACA,SAAAS,EACA,SAAAC,EACA,eAAcX,EAAU,GAAO,OAC/B,mBACE,CAACY,EAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAExD,QAASZ,EACT,OAAQC,EACR,SAAUC,EACT,GAAGtB,CAAA,CAAA,EAELd,GAAgB,MACfgD,EAAAA,IAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,2BAA2B,EAChD,SAAAtC,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,EACCG,GAAsBD,GAAa,MAClC6C,EAAAA,KAAC,MAAA,CACC,GAAID,EACJ,UAAWR,EAAAA,QAAO,qBAAqB,EACvC,YAAU,SAET,SAAA,CAAAO,EAAc,MAAI3C,CAAA,CAAA,CAAA,CACrB,EAEJ,CAEJ,CACF"}
|
|
1
|
+
{"version":3,"file":"TextInput.cjs","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size=\"16\" />`). */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":"iPAsCMA,EAAYC,EAAAA,WAChB,SACE,CACE,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,MAAAC,EACA,YAAAC,EACA,aAAAC,EACA,QAAAC,EAAU,GACV,UAAAC,EACA,mBAAAC,EAAqB,GACrB,GAAIC,EACJ,MAAOC,EACP,aAAAC,EACA,YAAAC,EACA,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,GAAGC,CAAA,EAELC,EACA,CACA,MAAMC,EAAcC,EAAAA,MAAA,EACdC,EAAKd,GAAUY,EACfG,EAAWC,EAAAA,OAAgC,IAAI,EAE/CC,EAAcC,EAAAA,YACjBC,GAAkC,CAEjC,GADAJ,EAAS,QAAUI,EACf,OAAOR,GAAQ,WAAY,CAC7B,MAAMS,EAAWT,EAAsCQ,CAAI,EAC3D,MAAO,IAAM,CACXJ,EAAS,QAAU,KACf,OAAOK,GAAY,YAAYA,EAAA,CACrC,CACF,CACIT,MAAS,QAAUQ,EACzB,EACA,CAACR,CAAG,CAAA,EAGAU,EAAepB,IAAc,OAC7B,CAACqB,EAAmBC,CAAoB,EAAIC,EAAAA,SAChDtB,GAAgB,EAAA,EAEZuB,EAAQJ,EAAgBpB,EAAuBqB,EAC/CI,EAAWD,GAAS,MAAQA,IAAU,GAEtC,CAACE,EAAWC,CAAY,EAAIJ,EAAAA,SAAS,EAAK,EAC1CK,EAAeF,GAAaD,EAE5BI,EAAcZ,EAAAA,YACjB,GAA0C,CACzCU,EAAa,EAAI,EACjBxB,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,EACL,GAAAH,EACA,UAAWoB,EAAAA,QAAO,mBAAmB,EACrC,MAAOb,EAAepB,EAAY,OAClC,aAAcoB,EAAe,OAAYnB,EACzC,YAAAC,EACA,UAAAL,EACA,SAAAS,EACA,SAAAC,EACA,eAAcX,EAAU,GAAO,OAC/B,mBACE,CAACY,EAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,OAExD,QAASZ,EACT,OAAQC,EACR,SAAUC,EACT,GAAGtB,CAAA,CAAA,EAELd,GAAgB,MACfgD,EAAAA,IAAC,OAAA,CAAK,UAAWV,EAAAA,QAAO,2BAA2B,EAChD,SAAAtC,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,EACCG,GAAsBD,GAAa,MAClC6C,EAAAA,KAAC,MAAA,CACC,GAAID,EACJ,UAAWR,EAAAA,QAAO,qBAAqB,EACvC,YAAU,SAET,SAAA,CAAAO,EAAc,MAAI3C,CAAA,CAAA,CAAA,CACrB,EAEJ,CAEJ,CACF"}
|
|
@@ -15,7 +15,7 @@ export interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
15
15
|
showCharacterCount?: boolean;
|
|
16
16
|
/** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */
|
|
17
17
|
size?: TextInputSize;
|
|
18
|
-
/** Trailing icon. */
|
|
18
|
+
/** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size="16" />`). */
|
|
19
19
|
trailingIcon?: ReactNode;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EAGV,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,cAAe,SA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AS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon. */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":";;;;AAsCA,MAAMA,KAAYC;AAAA,EAChB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,WAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,IAAIC;AAAA,IACJ,OAAOC;AAAA,IACP,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAcC,EAAA,GACdC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,2BAA2B,GAChD,UAAAtC,EAAA,CACH;AAAA,MAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MACCG,KAAsBD,KAAa,QAClC,gBAAA6C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAID;AAAA,UACJ,WAAWR,EAAO,qBAAqB;AAAA,UACvC,aAAU;AAAA,UAET,UAAA;AAAA,YAAAO;AAAA,YAAc;AAAA,YAAI3C;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrB,GAEJ;AAAA,EAEJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../../../src/components/text-input/TextInput.tsx"],"sourcesContent":["import type {\n InputHTMLAttributes,\n ReactNode,\n ChangeEvent,\n RefCallback,\n} from 'react';\nimport { forwardRef, useId, useState, useCallback, useRef } from 'react';\nimport { toKebab } from '@/utils/string';\nimport styles from './TextInput.module.scss';\n\nexport type TextInputSize = 'small' | 'medium' | 'large';\n\nexport interface TextInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size'\n> {\n /** Optional CSS class name. */\n className?: string;\n /** When true, shows invalid/error styling. */\n invalid?: boolean;\n /** Floating label content. When provided, label floats on focus or when value is non-empty. */\n label?: ReactNode;\n /** Leading icon (e.g. <Icon glyph={<SearchIcon />} size=\"16\" />). */\n leadingIcon?: ReactNode;\n /** Max length for the input; used with showCharacterCount for counter. */\n maxLength?: number;\n /** When true with maxLength, shows \"current / max\" character count below input. */\n showCharacterCount?: boolean;\n /** Size variant. Figma: Small (32px), Medium (40px), Large (48px). Default: Medium. */\n size?: TextInputSize;\n /** Trailing icon (e.g. `<Icon glyph={<SomeIcon />} size=\"16\" />`). */\n trailingIcon?: ReactNode;\n}\n\n/**\n * Text Inputs let people enter and edit a single line of text — names, emails, search\n * queries, channel titles. They're the workhorse of every form and modal in Mattermost.\n */\nconst TextInput = forwardRef<HTMLInputElement, TextInputProps>(\n function TextInput(\n {\n className = '',\n size = 'medium',\n label,\n leadingIcon,\n trailingIcon,\n invalid = false,\n maxLength,\n showCharacterCount = false,\n id: idProp,\n value: valueProp,\n defaultValue,\n placeholder,\n onFocus,\n onBlur,\n onChange,\n disabled,\n readOnly,\n 'aria-describedby': describedBy,\n ...rest\n },\n ref,\n ) {\n const generatedId = useId();\n const id = idProp ?? generatedId;\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n const cleanup = (ref as RefCallback<HTMLInputElement>)(node);\n return () => {\n inputRef.current = null;\n if (typeof cleanup === 'function') cleanup();\n };\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const isControlled = valueProp !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(\n defaultValue ?? '',\n );\n const value = isControlled ? (valueProp as string) : uncontrolledValue;\n const hasValue = value != null && value !== '';\n\n const [isFocused, setIsFocused] = useState(false);\n const labelFloated = isFocused || hasValue;\n\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (!isControlled) setUncontrolledValue(e.target.value);\n onChange?.(e);\n },\n [isControlled, onChange],\n );\n\n const sizeClass = styles[`text-input--size-${toKebab(size)}`];\n const invalidClass = invalid ? styles['text-input--invalid'] : '';\n const labelFloatedClass =\n label != null && labelFloated ? styles['text-input--label-floated'] : '';\n const hasLeadingClass =\n leadingIcon != null ? styles['text-input--has-leading-icon'] : '';\n const hasTrailingClass =\n trailingIcon != null ? styles['text-input--has-trailing-icon'] : '';\n\n const rootClass = [\n styles['text-input'],\n sizeClass,\n invalidClass,\n labelFloatedClass,\n hasLeadingClass,\n hasTrailingClass,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const currentLength = typeof value === 'string' ? value.length : 0;\n const counterId =\n showCharacterCount && maxLength != null ? `${id}-counter` : undefined;\n\n return (\n <div className={rootClass}>\n <div className={styles['text-input__wrapper']}>\n <label className={styles['text-input__inner']}>\n {label != null && (\n <span className={styles['text-input__label']}>{label}</span>\n )}\n {leadingIcon != null && (\n <span className={styles['text-input__leading-icon']}>\n {leadingIcon}\n </span>\n )}\n <input\n ref={setInputRef}\n id={id}\n className={styles['text-input__input']}\n value={isControlled ? valueProp : undefined}\n defaultValue={isControlled ? undefined : defaultValue}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n readOnly={readOnly}\n aria-invalid={invalid ? true : undefined}\n aria-describedby={\n [describedBy, counterId].filter(Boolean).join(' ') || undefined\n }\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n {trailingIcon != null && (\n <span className={styles['text-input__trailing-icon']}>\n {trailingIcon}\n </span>\n )}\n </label>\n </div>\n {showCharacterCount && maxLength != null && (\n <div\n id={counterId}\n className={styles['text-input__counter']}\n aria-live=\"polite\"\n >\n {currentLength} / {maxLength}\n </div>\n )}\n </div>\n );\n },\n);\n\nexport default TextInput;\n"],"names":["TextInput","forwardRef","className","size","label","leadingIcon","trailingIcon","invalid","maxLength","showCharacterCount","idProp","valueProp","defaultValue","placeholder","onFocus","onBlur","onChange","disabled","readOnly","describedBy","rest","ref","generatedId","useId","id","inputRef","useRef","setInputRef","useCallback","node","cleanup","isControlled","uncontrolledValue","setUncontrolledValue","useState","value","hasValue","isFocused","setIsFocused","labelFloated","handleFocus","handleBlur","handleChange","sizeClass","styles","toKebab","invalidClass","labelFloatedClass","hasLeadingClass","hasTrailingClass","rootClass","currentLength","counterId","jsxs","jsx"],"mappings":";;;;AAsCA,MAAMA,KAAYC;AAAA,EAChB,SACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,aAAAC;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,YACzC,aAAAC;AAAA,YACA,WAAAL;AAAA,YACA,UAAAS;AAAA,YACA,UAAAC;AAAA,YACA,gBAAcX,IAAU,KAAO;AAAA,YAC/B,oBACE,CAACY,GAAaiC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,YAExD,SAASZ;AAAA,YACT,QAAQC;AAAA,YACR,UAAUC;AAAA,YACT,GAAGtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAELd,KAAgB,QACf,gBAAAgD,EAAC,QAAA,EAAK,WAAWV,EAAO,2BAA2B,GAChD,UAAAtC,EAAA,CACH;AAAA,MAAA,EAAA,CAEJ,EAAA,CACF;AAAA,MACCG,KAAsBD,KAAa,QAClC,gBAAA6C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAID;AAAA,UACJ,WAAWR,EAAO,qBAAqB;AAAA,UACvC,aAAU;AAAA,UAET,UAAA;AAAA,YAAAO;AAAA,YAAc;AAAA,YAAI3C;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrB,GAEJ;AAAA,EAEJ;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._thread-
|
|
1
|
+
._thread-footer_k8u9j_2{--thread-footer-focus-ring-color: var(--focus-ring-color);display:flex;flex-direction:column;align-items:flex-start;padding:0 var(--spacing-l)}._thread-footer__inner_k8u9j_9{display:inline-flex;align-items:center;padding:0 var(--spacing-s);border-radius:var(--radius-s)}._thread-footer__avatars-group_k8u9j_15{display:inline-flex;align-items:center;gap:var(--spacing-xxxs);padding-right:var(--spacing-xxxs)}._thread-footer__status-hint_k8u9j_21{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._thread-footer__unread-dot_k8u9j_32{display:block;width:8px;height:8px;border-radius:var(--radius-full);background-color:var(--link-color);flex-shrink:0}._thread-footer__mention-badge_k8u9j_40{display:inline-flex;flex-shrink:0}._thread-footer__buttons_k8u9j_44{display:inline-flex;align-items:center;gap:0}._thread-footer__reply-btn_k8u9j_49,._thread-footer__follow-btn_k8u9j_49{--focus-ring-color: var(--thread-footer-focus-ring-color)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn_k8u9j_49[class*=button--emphasis-quaternary],._thread-footer_k8u9j_2 ._thread-footer__follow-btn_k8u9j_49:not(._thread-footer__follow-btn--following_k8u9j_52)[class*=button--emphasis-quaternary]{color:rgba(var(--center-channel-color-rgb),.75)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn_k8u9j_49[class*=button--emphasis-quaternary]:hover:not(:disabled),._thread-footer_k8u9j_2 ._thread-footer__follow-btn_k8u9j_49:not(._thread-footer__follow-btn--following_k8u9j_52)[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__reply-btn--hovered_k8u9j_58[class*=button--emphasis-quaternary]{background-color:rgba(var(--center-channel-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__follow-btn--following_k8u9j_52[class*=button--emphasis-quaternary]{color:var(--link-color);background-color:rgba(var(--link-color-rgb),.08)}._thread-footer_k8u9j_2 ._thread-footer__follow-btn--following_k8u9j_52[class*=button--emphasis-quaternary]:hover:not(:disabled){background-color:rgba(var(--link-color-rgb),.12)}._thread-footer__btn-label_k8u9j_68{font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-semibold);line-height:15px;white-space:nowrap}._thread-footer__divider_k8u9j_75{box-sizing:border-box;width:1px;min-width:1px;max-width:1px;height:16px;padding:0;margin:0;border:0;background-color:rgba(var(--center-channel-color-rgb),.16);flex-shrink:0;transition:opacity var(--duration-quick) var(--ease-transition)}._thread-footer__buttons_k8u9j_44:has(._thread-footer__follow-btn--following_k8u9j_52)>._thread-footer__divider_k8u9j_75:first-of-type,._thread-footer__buttons_k8u9j_44:has(._thread-footer__follow-btn--following_k8u9j_52)>._thread-footer__last-reply-group_k8u9j_88>._thread-footer__divider_k8u9j_75{opacity:0}._thread-footer__buttons_k8u9j_44:not(:has(._thread-footer__follow-btn--following_k8u9j_52)):has(._thread-footer__reply-btn_k8u9j_49:hover,._thread-footer__reply-btn--hovered_k8u9j_58,._thread-footer__reply-btn_k8u9j_49:focus-visible,._thread-footer__follow-btn_k8u9j_49:hover,._thread-footer__follow-btn_k8u9j_49:focus-visible)>._thread-footer__divider_k8u9j_75:first-of-type{opacity:0}._thread-footer__last-reply-group_k8u9j_88{display:inline-flex;align-items:center;gap:0;overflow:hidden;max-width:0;opacity:0;transition:max-width var(--duration-quick) var(--ease-transition),opacity var(--duration-quick) var(--ease-transition)}._thread-footer--following_k8u9j_107:hover ._thread-footer__last-reply-group_k8u9j_88,._thread-footer--following_k8u9j_107:focus-within ._thread-footer__last-reply-group_k8u9j_88,._thread-footer--following_k8u9j_107._thread-footer--hovered_k8u9j_107 ._thread-footer__last-reply-group_k8u9j_88{max-width:10rem;opacity:1}._thread-footer__last-reply_k8u9j_88{padding:4.5px var(--spacing-s);color:rgba(var(--center-channel-color-rgb),.64);font-family:var(--font-family-body);font-size:var(--font-size-75);font-weight:var(--font-weight-regular);line-height:15px;white-space:nowrap}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.module.css');const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ThreadFooter.module.css');const e={"thread-footer":"_thread-footer_k8u9j_2","thread-footer__inner":"_thread-footer__inner_k8u9j_9","thread-footer__avatars-group":"_thread-footer__avatars-group_k8u9j_15","thread-footer__status-hint":"_thread-footer__status-hint_k8u9j_21","thread-footer__unread-dot":"_thread-footer__unread-dot_k8u9j_32","thread-footer__mention-badge":"_thread-footer__mention-badge_k8u9j_40","thread-footer__buttons":"_thread-footer__buttons_k8u9j_44","thread-footer__reply-btn":"_thread-footer__reply-btn_k8u9j_49","thread-footer__follow-btn":"_thread-footer__follow-btn_k8u9j_49","thread-footer__follow-btn--following":"_thread-footer__follow-btn--following_k8u9j_52","thread-footer__reply-btn--hovered":"_thread-footer__reply-btn--hovered_k8u9j_58","thread-footer__btn-label":"_thread-footer__btn-label_k8u9j_68","thread-footer__divider":"_thread-footer__divider_k8u9j_75","thread-footer__last-reply-group":"_thread-footer__last-reply-group_k8u9j_88","thread-footer--following":"_thread-footer--following_k8u9j_107","thread-footer--hovered":"_thread-footer--hovered_k8u9j_107","thread-footer__last-reply":"_thread-footer__last-reply_k8u9j_88"};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=ThreadFooter.module.scss.cjs.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import './ThreadFooter.module.css';const
|
|
2
|
-
"thread-footer": "_thread-
|
|
3
|
-
"thread-footer__inner": "_thread-
|
|
4
|
-
"thread-footer__avatars-group": "_thread-footer__avatars-
|
|
5
|
-
"thread-footer__status-hint": "_thread-footer__status-
|
|
6
|
-
"thread-footer__unread-dot": "_thread-footer__unread-
|
|
7
|
-
"thread-footer__mention-badge": "_thread-footer__mention-
|
|
8
|
-
"thread-footer__buttons": "_thread-
|
|
9
|
-
"thread-footer__reply-btn": "_thread-footer__reply-
|
|
10
|
-
"thread-footer__follow-btn": "_thread-footer__follow-
|
|
11
|
-
"thread-footer__follow-btn--following": "_thread-footer__follow-btn--
|
|
12
|
-
"thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--
|
|
13
|
-
"thread-footer__btn-label": "_thread-footer__btn-
|
|
14
|
-
"thread-footer__divider": "_thread-
|
|
15
|
-
"thread-footer__last-reply-group": "_thread-footer__last-reply-
|
|
16
|
-
"thread-footer--following": "_thread-footer--
|
|
17
|
-
"thread-footer--hovered": "_thread-footer--
|
|
18
|
-
"thread-footer__last-reply": "_thread-footer__last-
|
|
1
|
+
import './ThreadFooter.module.css';const _ = {
|
|
2
|
+
"thread-footer": "_thread-footer_k8u9j_2",
|
|
3
|
+
"thread-footer__inner": "_thread-footer__inner_k8u9j_9",
|
|
4
|
+
"thread-footer__avatars-group": "_thread-footer__avatars-group_k8u9j_15",
|
|
5
|
+
"thread-footer__status-hint": "_thread-footer__status-hint_k8u9j_21",
|
|
6
|
+
"thread-footer__unread-dot": "_thread-footer__unread-dot_k8u9j_32",
|
|
7
|
+
"thread-footer__mention-badge": "_thread-footer__mention-badge_k8u9j_40",
|
|
8
|
+
"thread-footer__buttons": "_thread-footer__buttons_k8u9j_44",
|
|
9
|
+
"thread-footer__reply-btn": "_thread-footer__reply-btn_k8u9j_49",
|
|
10
|
+
"thread-footer__follow-btn": "_thread-footer__follow-btn_k8u9j_49",
|
|
11
|
+
"thread-footer__follow-btn--following": "_thread-footer__follow-btn--following_k8u9j_52",
|
|
12
|
+
"thread-footer__reply-btn--hovered": "_thread-footer__reply-btn--hovered_k8u9j_58",
|
|
13
|
+
"thread-footer__btn-label": "_thread-footer__btn-label_k8u9j_68",
|
|
14
|
+
"thread-footer__divider": "_thread-footer__divider_k8u9j_75",
|
|
15
|
+
"thread-footer__last-reply-group": "_thread-footer__last-reply-group_k8u9j_88",
|
|
16
|
+
"thread-footer--following": "_thread-footer--following_k8u9j_107",
|
|
17
|
+
"thread-footer--hovered": "_thread-footer--hovered_k8u9j_107",
|
|
18
|
+
"thread-footer__last-reply": "_thread-footer__last-reply_k8u9j_88"
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
_ as default
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=ThreadFooter.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),__n=require("@mattermost/compass-icons/components/alert-circle-outline.js"),n=__n?.default??__n,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),__n=require("@mattermost/compass-icons/components/alert-circle-outline.js"),n=__n?.default??__n,__j=require("@mattermost/compass-icons/components/alert-outline.js"),j=__j?.default??__j,__m=require("@mattermost/compass-icons/components/check.js"),m=__m?.default??__m,__x=require("@mattermost/compass-icons/components/close.js"),x=__x?.default??__x,___=require("@mattermost/compass-icons/components/information-outline.js"),_=___?.default??___,h=require("../button/Button.cjs"),o=require("../icon/Icon.cjs"),p=require("../icon-button/IconButton.cjs"),s=require("./Toast.module.scss.cjs"),q={general:e.jsx(n,{}),info:e.jsx(_,{}),success:e.jsx(m,{}),danger:e.jsx(j,{}),warning:e.jsx(n,{})};function C({className:i="",message:r,type:a="general",actionLabel:l,onAction:c,onDismiss:t}){const u=s.default[`toast--type-${a.toLowerCase()}`],d=t==null?s.default["toast--no-dismiss"]:"",f=[s.default.toast,u,d,i].filter(Boolean).join(" ");return e.jsxs("div",{className:f,role:"status","aria-live":"polite",children:[e.jsxs("div",{className:s.default.toast__content,children:[e.jsx("span",{className:s.default.toast__icon,"aria-hidden":!0,children:e.jsx(o.default,{glyph:q[a],size:"16"})}),e.jsx("span",{className:s.default.toast__message,children:r}),l!=null&&e.jsx(h.default,{appearance:"default",emphasis:"tertiary",size:"x-small",className:s.default["toast__action-btn--on-dark"],onClick:c,children:l})]}),t!=null&&e.jsx(p.default,{"aria-label":"Dismiss",size:"small",className:s.default.toast__dismiss,icon:e.jsx(o.default,{glyph:e.jsx(x,{}),size:"16"}),onClick:t})]})}exports.default=C;
|
|
2
2
|
//# sourceMappingURL=Toast.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.cjs","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport styles from './Toast.module.scss';\n\nexport type ToastType =\n | 'general'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\n\nexport interface ToastProps {\n className?: string;\n message: string;\n type?: ToastType;\n actionLabel?: string;\n onAction?: () => void;\n onDismiss?: () => void;\n}\n\nconst TYPE_ICONS: Record<ToastType, ReactNode> = {\n general: <AlertCircleOutlineIcon />,\n info: <InformationOutlineIcon />,\n success: <CheckIcon />,\n danger: <AlertOutlineIcon />,\n warning: <AlertCircleOutlineIcon />,\n};\n\n/**\n * Toasts notify the user that an action has completed or surface a brief message about a\n * system process. They sit on top of the workflow without interrupting it, don't require\n * user input to disappear, and auto-dismiss after a short duration.\n */\nexport default function Toast({\n className = '',\n message,\n type = 'general',\n actionLabel,\n onAction,\n onDismiss,\n}: ToastProps) {\n const typeClass = styles[`toast--type-${type.toLowerCase()}`];\n const rootClass = [styles.toast, typeClass, className].filter(Boolean).join(' ');\n\n return (\n <div className={rootClass} role=\"status\" aria-live=\"polite\">\n <div className={styles['toast__content']}>\n <span className={styles['toast__icon']} aria-hidden>\n <Icon glyph={TYPE_ICONS[type]} size=\"16\" />\n </span>\n <span className={styles['toast__message']}>{message}</span>\n {actionLabel != null && (\n <Button\n appearance=\"default\"\n emphasis=\"tertiary\"\n size=\"x-small\"\n className={styles['toast__action-btn--on-dark']}\n onClick={onAction}\n >\n {actionLabel}\n </Button>\n )}\n </div>\n {onDismiss != null && (\n <IconButton\n aria-label=\"Dismiss\"\n size=\"small\"\n className={styles['toast__dismiss']}\n icon={<Icon glyph={<CloseIcon />} size=\"16\" />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["TYPE_ICONS","AlertCircleOutlineIcon","InformationOutlineIcon","CheckIcon","AlertOutlineIcon","Toast","className","message","type","actionLabel","onAction","onDismiss","typeClass","styles","rootClass","jsxs","jsx","Icon","Button","IconButton","CloseIcon"],"mappings":"6lBA2BMA,EAA2C,CAC/C,cAAUC,EAAA,EAAuB,EACjC,WAAOC,EAAA,EAAuB,EAC9B,cAAUC,EAAA,EAAU,EACpB,aAASC,EAAA,EAAiB,EAC1B,cAAUH,EAAA,CAAA,CAAuB,CACnC,EAOA,SAAwBI,EAAM,CAC5B,UAAAC,EAAY,GACZ,QAAAC,EACA,KAAAC,EAAO,UACP,YAAAC,EACA,SAAAC,EACA,UAAAC,CACF,EAAe,CACb,MAAMC,EAAYC,EAAAA,QAAO,eAAeL,EAAK,YAAA,CAAa,EAAE,EACtDM,EAAY,
|
|
1
|
+
{"version":3,"file":"Toast.cjs","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport styles from './Toast.module.scss';\n\nexport type ToastType =\n | 'general'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\n\nexport interface ToastProps {\n className?: string;\n message: string;\n type?: ToastType;\n actionLabel?: string;\n onAction?: () => void;\n onDismiss?: () => void;\n}\n\nconst TYPE_ICONS: Record<ToastType, ReactNode> = {\n general: <AlertCircleOutlineIcon />,\n info: <InformationOutlineIcon />,\n success: <CheckIcon />,\n danger: <AlertOutlineIcon />,\n warning: <AlertCircleOutlineIcon />,\n};\n\n/**\n * Toasts notify the user that an action has completed or surface a brief message about a\n * system process. They sit on top of the workflow without interrupting it, don't require\n * user input to disappear, and auto-dismiss after a short duration.\n */\nexport default function Toast({\n className = '',\n message,\n type = 'general',\n actionLabel,\n onAction,\n onDismiss,\n}: ToastProps) {\n const typeClass = styles[`toast--type-${type.toLowerCase()}`];\n const noDismissClass = onDismiss == null ? styles['toast--no-dismiss'] : '';\n const rootClass = [styles.toast, typeClass, noDismissClass, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} role=\"status\" aria-live=\"polite\">\n <div className={styles['toast__content']}>\n <span className={styles['toast__icon']} aria-hidden>\n <Icon glyph={TYPE_ICONS[type]} size=\"16\" />\n </span>\n <span className={styles['toast__message']}>{message}</span>\n {actionLabel != null && (\n <Button\n appearance=\"default\"\n emphasis=\"tertiary\"\n size=\"x-small\"\n className={styles['toast__action-btn--on-dark']}\n onClick={onAction}\n >\n {actionLabel}\n </Button>\n )}\n </div>\n {onDismiss != null && (\n <IconButton\n aria-label=\"Dismiss\"\n size=\"small\"\n className={styles['toast__dismiss']}\n icon={<Icon glyph={<CloseIcon />} size=\"16\" />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["TYPE_ICONS","AlertCircleOutlineIcon","InformationOutlineIcon","CheckIcon","AlertOutlineIcon","Toast","className","message","type","actionLabel","onAction","onDismiss","typeClass","styles","noDismissClass","rootClass","jsxs","jsx","Icon","Button","IconButton","CloseIcon"],"mappings":"6lBA2BMA,EAA2C,CAC/C,cAAUC,EAAA,EAAuB,EACjC,WAAOC,EAAA,EAAuB,EAC9B,cAAUC,EAAA,EAAU,EACpB,aAASC,EAAA,EAAiB,EAC1B,cAAUH,EAAA,CAAA,CAAuB,CACnC,EAOA,SAAwBI,EAAM,CAC5B,UAAAC,EAAY,GACZ,QAAAC,EACA,KAAAC,EAAO,UACP,YAAAC,EACA,SAAAC,EACA,UAAAC,CACF,EAAe,CACb,MAAMC,EAAYC,EAAAA,QAAO,eAAeL,EAAK,YAAA,CAAa,EAAE,EACtDM,EAAiBH,GAAa,KAAOE,EAAAA,QAAO,mBAAmB,EAAI,GACnEE,EAAY,CAAC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AIG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,SAAc,EACd,OAAO,EACP,IAAgB,EAChB,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/toast/Toast.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAUD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,SAAc,EACd,OAAO,EACP,IAAgB,EAChB,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,UAAU,2CAqCZ"}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import __r from "@mattermost/compass-icons/components/alert-circle-outline.js";const r=__r&&__r.default?__r.default:__r;
|
|
3
|
+
import __u from "@mattermost/compass-icons/components/alert-outline.js";const u=__u&&__u.default?__u.default:__u;
|
|
4
|
+
import ___ from "@mattermost/compass-icons/components/check.js";const _=___&&___.default?___.default:___;
|
|
5
|
+
import __h from "@mattermost/compass-icons/components/close.js";const h=__h&&__h.default?__h.default:__h;
|
|
6
|
+
import __C from "@mattermost/compass-icons/components/information-outline.js";const C=__C&&__C.default?__C.default:__C;
|
|
7
|
+
import I from "../button/Button.js";
|
|
8
8
|
import i from "../icon/Icon.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
general: /* @__PURE__ */ o(
|
|
13
|
-
info: /* @__PURE__ */ o(
|
|
14
|
-
success: /* @__PURE__ */ o(
|
|
15
|
-
danger: /* @__PURE__ */ o(
|
|
16
|
-
warning: /* @__PURE__ */ o(
|
|
9
|
+
import g from "../icon-button/IconButton.js";
|
|
10
|
+
import s from "./Toast.module.scss.js";
|
|
11
|
+
const N = {
|
|
12
|
+
general: /* @__PURE__ */ o(r, {}),
|
|
13
|
+
info: /* @__PURE__ */ o(C, {}),
|
|
14
|
+
success: /* @__PURE__ */ o(_, {}),
|
|
15
|
+
danger: /* @__PURE__ */ o(u, {}),
|
|
16
|
+
warning: /* @__PURE__ */ o(r, {})
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function T({
|
|
19
19
|
className: l = "",
|
|
20
20
|
message: c,
|
|
21
|
-
type:
|
|
21
|
+
type: a = "general",
|
|
22
22
|
actionLabel: e,
|
|
23
23
|
onAction: m,
|
|
24
|
-
onDismiss:
|
|
24
|
+
onDismiss: t
|
|
25
25
|
}) {
|
|
26
|
-
const p =
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ o("span", { className:
|
|
30
|
-
/* @__PURE__ */ o("span", { className:
|
|
26
|
+
const p = s[`toast--type-${a.toLowerCase()}`], f = t == null ? s["toast--no-dismiss"] : "", d = [s.toast, p, f, l].filter(Boolean).join(" ");
|
|
27
|
+
return /* @__PURE__ */ n("div", { className: d, role: "status", "aria-live": "polite", children: [
|
|
28
|
+
/* @__PURE__ */ n("div", { className: s.toast__content, children: [
|
|
29
|
+
/* @__PURE__ */ o("span", { className: s.toast__icon, "aria-hidden": !0, children: /* @__PURE__ */ o(i, { glyph: N[a], size: "16" }) }),
|
|
30
|
+
/* @__PURE__ */ o("span", { className: s.toast__message, children: c }),
|
|
31
31
|
e != null && /* @__PURE__ */ o(
|
|
32
|
-
|
|
32
|
+
I,
|
|
33
33
|
{
|
|
34
34
|
appearance: "default",
|
|
35
35
|
emphasis: "tertiary",
|
|
36
36
|
size: "x-small",
|
|
37
|
-
className:
|
|
37
|
+
className: s["toast__action-btn--on-dark"],
|
|
38
38
|
onClick: m,
|
|
39
39
|
children: e
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
] }),
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
t != null && /* @__PURE__ */ o(
|
|
44
|
+
g,
|
|
45
45
|
{
|
|
46
46
|
"aria-label": "Dismiss",
|
|
47
47
|
size: "small",
|
|
48
|
-
className:
|
|
49
|
-
icon: /* @__PURE__ */ o(i, { glyph: /* @__PURE__ */ o(
|
|
50
|
-
onClick:
|
|
48
|
+
className: s.toast__dismiss,
|
|
49
|
+
icon: /* @__PURE__ */ o(i, { glyph: /* @__PURE__ */ o(h, {}), size: "16" }),
|
|
50
|
+
onClick: t
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] });
|
|
54
54
|
}
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
T as default
|
|
57
57
|
};
|
|
58
58
|
//# sourceMappingURL=Toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport styles from './Toast.module.scss';\n\nexport type ToastType =\n | 'general'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\n\nexport interface ToastProps {\n className?: string;\n message: string;\n type?: ToastType;\n actionLabel?: string;\n onAction?: () => void;\n onDismiss?: () => void;\n}\n\nconst TYPE_ICONS: Record<ToastType, ReactNode> = {\n general: <AlertCircleOutlineIcon />,\n info: <InformationOutlineIcon />,\n success: <CheckIcon />,\n danger: <AlertOutlineIcon />,\n warning: <AlertCircleOutlineIcon />,\n};\n\n/**\n * Toasts notify the user that an action has completed or surface a brief message about a\n * system process. They sit on top of the workflow without interrupting it, don't require\n * user input to disappear, and auto-dismiss after a short duration.\n */\nexport default function Toast({\n className = '',\n message,\n type = 'general',\n actionLabel,\n onAction,\n onDismiss,\n}: ToastProps) {\n const typeClass = styles[`toast--type-${type.toLowerCase()}`];\n const rootClass = [styles.toast, typeClass, className].filter(Boolean).join(' ');\n\n return (\n <div className={rootClass} role=\"status\" aria-live=\"polite\">\n <div className={styles['toast__content']}>\n <span className={styles['toast__icon']} aria-hidden>\n <Icon glyph={TYPE_ICONS[type]} size=\"16\" />\n </span>\n <span className={styles['toast__message']}>{message}</span>\n {actionLabel != null && (\n <Button\n appearance=\"default\"\n emphasis=\"tertiary\"\n size=\"x-small\"\n className={styles['toast__action-btn--on-dark']}\n onClick={onAction}\n >\n {actionLabel}\n </Button>\n )}\n </div>\n {onDismiss != null && (\n <IconButton\n aria-label=\"Dismiss\"\n size=\"small\"\n className={styles['toast__dismiss']}\n icon={<Icon glyph={<CloseIcon />} size=\"16\" />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["TYPE_ICONS","AlertCircleOutlineIcon","InformationOutlineIcon","CheckIcon","AlertOutlineIcon","Toast","className","message","type","actionLabel","onAction","onDismiss","typeClass","styles","rootClass","jsxs","jsx","Icon","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AA2BA,MAAMA,IAA2C;AAAA,EAC/C,2BAAUC,GAAA,EAAuB;AAAA,EACjC,wBAAOC,GAAA,EAAuB;AAAA,EAC9B,2BAAUC,GAAA,EAAU;AAAA,EACpB,0BAASC,GAAA,EAAiB;AAAA,EAC1B,2BAAUH,GAAA,CAAA,CAAuB;AACnC;AAOA,SAAwBI,EAAM;AAAA,EAC5B,WAAAC,IAAY;AAAA,EACZ,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAAYC,EAAO,eAAeL,EAAK,YAAA,CAAa,EAAE,GACtDM,IAAY,
|
|
1
|
+
{"version":3,"file":"Toast.js","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport AlertCircleOutlineIcon from '@mattermost/compass-icons/components/alert-circle-outline';\nimport AlertOutlineIcon from '@mattermost/compass-icons/components/alert-outline';\nimport CheckIcon from '@mattermost/compass-icons/components/check';\nimport CloseIcon from '@mattermost/compass-icons/components/close';\nimport InformationOutlineIcon from '@mattermost/compass-icons/components/information-outline';\nimport Button from '@/components/button/Button';\nimport Icon from '@/components/icon/Icon';\nimport IconButton from '@/components/icon-button/IconButton';\nimport styles from './Toast.module.scss';\n\nexport type ToastType =\n | 'general'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\n\nexport interface ToastProps {\n className?: string;\n message: string;\n type?: ToastType;\n actionLabel?: string;\n onAction?: () => void;\n onDismiss?: () => void;\n}\n\nconst TYPE_ICONS: Record<ToastType, ReactNode> = {\n general: <AlertCircleOutlineIcon />,\n info: <InformationOutlineIcon />,\n success: <CheckIcon />,\n danger: <AlertOutlineIcon />,\n warning: <AlertCircleOutlineIcon />,\n};\n\n/**\n * Toasts notify the user that an action has completed or surface a brief message about a\n * system process. They sit on top of the workflow without interrupting it, don't require\n * user input to disappear, and auto-dismiss after a short duration.\n */\nexport default function Toast({\n className = '',\n message,\n type = 'general',\n actionLabel,\n onAction,\n onDismiss,\n}: ToastProps) {\n const typeClass = styles[`toast--type-${type.toLowerCase()}`];\n const noDismissClass = onDismiss == null ? styles['toast--no-dismiss'] : '';\n const rootClass = [styles.toast, typeClass, noDismissClass, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClass} role=\"status\" aria-live=\"polite\">\n <div className={styles['toast__content']}>\n <span className={styles['toast__icon']} aria-hidden>\n <Icon glyph={TYPE_ICONS[type]} size=\"16\" />\n </span>\n <span className={styles['toast__message']}>{message}</span>\n {actionLabel != null && (\n <Button\n appearance=\"default\"\n emphasis=\"tertiary\"\n size=\"x-small\"\n className={styles['toast__action-btn--on-dark']}\n onClick={onAction}\n >\n {actionLabel}\n </Button>\n )}\n </div>\n {onDismiss != null && (\n <IconButton\n aria-label=\"Dismiss\"\n size=\"small\"\n className={styles['toast__dismiss']}\n icon={<Icon glyph={<CloseIcon />} size=\"16\" />}\n onClick={onDismiss}\n />\n )}\n </div>\n );\n}\n"],"names":["TYPE_ICONS","AlertCircleOutlineIcon","InformationOutlineIcon","CheckIcon","AlertOutlineIcon","Toast","className","message","type","actionLabel","onAction","onDismiss","typeClass","styles","noDismissClass","rootClass","jsxs","jsx","Icon","Button","IconButton","CloseIcon"],"mappings":";;;;;;;;;;AA2BA,MAAMA,IAA2C;AAAA,EAC/C,2BAAUC,GAAA,EAAuB;AAAA,EACjC,wBAAOC,GAAA,EAAuB;AAAA,EAC9B,2BAAUC,GAAA,EAAU;AAAA,EACpB,0BAASC,GAAA,EAAiB;AAAA,EAC1B,2BAAUH,GAAA,CAAA,CAAuB;AACnC;AAOA,SAAwBI,EAAM;AAAA,EAC5B,WAAAC,IAAY;AAAA,EACZ,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAAYC,EAAO,eAAeL,EAAK,YAAA,CAAa,EAAE,GACtDM,IAAiBH,KAAa,OAAOE,EAAO,mBAAmB,IAAI,IACnEE,IAAY,CAACF,EAAO,OAAOD,GAAWE,GAAgBR,CAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,OAAA,EAAI,WAAWS,GAAW,MAAK,UAAS,aAAU,UACjD,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWH,EAAO,gBACrB,UAAA;AAAA,MAAA,gBAAAI,EAAC,QAAA,EAAK,WAAWJ,EAAO,aAAgB,eAAW,IACjD,UAAA,gBAAAI,EAACC,GAAA,EAAK,OAAOlB,EAAWQ,CAAI,GAAG,MAAK,MAAK,GAC3C;AAAA,wBACC,QAAA,EAAK,WAAWK,EAAO,gBAAoB,UAAAN,GAAQ;AAAA,MACnDE,KAAe,QACd,gBAAAQ;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,YAAW;AAAA,UACX,UAAS;AAAA,UACT,MAAK;AAAA,UACL,WAAWN,EAAO,4BAA4B;AAAA,UAC9C,SAASH;AAAA,UAER,UAAAD;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,GAEJ;AAAA,IACCE,KAAa,QACZ,gBAAAM;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,cAAW;AAAA,QACX,MAAK;AAAA,QACL,WAAWP,EAAO;AAAA,QAClB,wBAAOK,GAAA,EAAK,yBAAQG,GAAA,EAAU,GAAI,MAAK,MAAK;AAAA,QAC5C,SAASV;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toast_1x4xn_2{display:inline-flex;gap:var(--spacing-xxs);align-items:center;width:fit-content;max-width:440px;padding:var(--spacing-xxxs);background-color:var(--neutral-900);border-radius:var(--radius-s);box-shadow:var(--elevation-2)}._toast__content_1x4xn_13{display:flex;align-items:center;gap:var(--spacing-xs);height:32px;padding-left:var(--spacing-xs);min-width:0}._toast__icon_1x4xn_21{display:inline-flex;align-items:center;flex-shrink:0;color:var(--neutral-0)}._toast__message_1x4xn_27{flex:0 1 auto;min-width:0;font-size:var(--font-size-100);font-weight:var(--font-weight-semibold);line-height:var(--line-height-100);color:var(--neutral-0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._toast__action-btn--on-dark_1x4xn_38{flex-shrink:0;background-color:color-mix(in srgb,var(--neutral-0) 8%,transparent)!important;color:var(--neutral-0)!important;border-color:transparent!important}._toast__action-btn--on-dark_1x4xn_38:hover:not(:disabled){background-color:color-mix(in srgb,var(--neutral-0) 12%,transparent)!important;color:var(--neutral-0)!important}._toast__action-btn--on-dark_1x4xn_38:active:not(:disabled){background-color:color-mix(in srgb,var(--neutral-0) 16%,transparent)!important;color:var(--neutral-0)!important}._toast__action-btn--on-dark_1x4xn_38:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb,var(--neutral-0) 56%,transparent)!important}._toast__action-btn--on-dark_1x4xn_38:disabled{color:color-mix(in srgb,var(--neutral-0) 40%,transparent)!important;background-color:color-mix(in srgb,var(--neutral-0) 6%,transparent)!important}._toast__dismiss_1x4xn_59{flex-shrink:0;color:color-mix(in srgb,var(--neutral-0) 64%,transparent)!important}._toast__dismiss_1x4xn_59:hover:not(:disabled){background-color:color-mix(in srgb,var(--neutral-0) 12%,transparent)!important;color:var(--neutral-0)!important}._toast__dismiss_1x4xn_59:active:not(:disabled){background-color:color-mix(in srgb,var(--neutral-0) 20%,transparent)!important;color:var(--neutral-0)!important}._toast__dismiss_1x4xn_59:focus-visible{outline:2px solid color-mix(in srgb,var(--neutral-0) 56%,transparent)!important;outline-offset:2px!important;box-shadow:none!important}._toast--type-info_1x4xn_76{background-color:rgb(var(--semantic-color-info))}._toast--type-success_1x4xn_79{background-color:rgb(var(--semantic-color-success))}._toast--type-danger_1x4xn_82{background-color:rgb(var(--semantic-color-danger))}._toast--type-warning_1x4xn_85{background-color:rgb(var(--semantic-color-warning))}._toast--no-dismiss_1x4xn_88 ._toast__content_1x4xn_13{padding-right:var(--spacing-xs)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./Toast.module.css');const t="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./Toast.module.css');const t="_toast_1x4xn_2",s="_toast__content_1x4xn_13",_="_toast__icon_1x4xn_21",o="_toast__message_1x4xn_27",a="_toast__dismiss_1x4xn_59",n={toast:t,toast__content:s,toast__icon:_,toast__message:o,"toast__action-btn--on-dark":"_toast__action-btn--on-dark_1x4xn_38",toast__dismiss:a,"toast--type-info":"_toast--type-info_1x4xn_76","toast--type-success":"_toast--type-success_1x4xn_79","toast--type-danger":"_toast--type-danger_1x4xn_82","toast--type-warning":"_toast--type-warning_1x4xn_85","toast--no-dismiss":"_toast--no-dismiss_1x4xn_88"};exports.default=n;exports.toast=t;exports.toast__content=s;exports.toast__dismiss=a;exports.toast__icon=_;exports.toast__message=o;
|
|
2
2
|
//# sourceMappingURL=Toast.module.scss.cjs.map
|