@mattermost/compass-ui 0.1.0-alpha.20 → 0.1.0-alpha.22
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/dist/components/combobox/Combobox.cjs +1 -1
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.css +1 -1
- package/dist/components/combobox/Combobox.d.ts +55 -3
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +299 -272
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/combobox/Combobox.module.scss.cjs +1 -1
- package/dist/components/combobox/Combobox.module.scss.js +25 -25
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/date-range-picker/DateRangePicker.css +1 -1
- package/dist/components/date-range-picker/DateRangePicker.module.scss.cjs +1 -1
- package/dist/components/date-range-picker/DateRangePicker.module.scss.js +26 -26
- package/dist/components/emoji-popover/EmojiPopover.css +1 -1
- package/dist/components/emoji-popover/EmojiPopover.module.scss.cjs +1 -1
- package/dist/components/emoji-popover/EmojiPopover.module.scss.js +21 -21
- package/dist/components/menu-item/MenuItem.cjs.map +1 -1
- package/dist/components/menu-item/MenuItem.css +1 -1
- package/dist/components/menu-item/MenuItem.d.ts +6 -1
- package/dist/components/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/menu-item/MenuItem.js.map +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.cjs +1 -1
- package/dist/components/menu-item/MenuItem.module.scss.js +18 -18
- package/dist/components/modal/Modal.cjs +1 -1
- package/dist/components/modal/Modal.cjs.map +1 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +91 -93
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/ModalOverlay.cjs +2 -0
- package/dist/components/modal/ModalOverlay.cjs.map +1 -0
- package/dist/components/modal/ModalOverlay.css +1 -1
- package/dist/components/modal/ModalOverlay.d.ts +43 -0
- package/dist/components/modal/ModalOverlay.d.ts.map +1 -0
- package/dist/components/modal/ModalOverlay.js +59 -0
- package/dist/components/modal/ModalOverlay.js.map +1 -0
- package/dist/components/modal/ModalOverlay.module.scss.cjs +1 -1
- package/dist/components/modal/ModalOverlay.module.scss.js +3 -3
- package/dist/components/modal/index.cjs +1 -1
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +4 -2
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/password-input/PasswordInput.css +1 -1
- package/dist/components/password-input/PasswordInput.module.scss.cjs +1 -1
- package/dist/components/password-input/PasswordInput.module.scss.js +12 -12
- package/dist/components/popover-menu/PopoverMenu.cjs +1 -1
- package/dist/components/popover-menu/PopoverMenu.cjs.map +1 -1
- package/dist/components/popover-menu/PopoverMenu.css +1 -1
- package/dist/components/popover-menu/PopoverMenu.d.ts +6 -2
- package/dist/components/popover-menu/PopoverMenu.d.ts.map +1 -1
- package/dist/components/popover-menu/PopoverMenu.js +29 -29
- package/dist/components/popover-menu/PopoverMenu.js.map +1 -1
- package/dist/components/popover-menu/PopoverMenu.module.scss.cjs +1 -1
- package/dist/components/popover-menu/PopoverMenu.module.scss.js +13 -12
- package/dist/components/popover-menu/PopoverMenu.module.scss.js.map +1 -1
- package/dist/components/profile-popover/ProfilePopover.css +1 -1
- package/dist/components/profile-popover/ProfilePopover.module.scss.cjs +1 -1
- package/dist/components/profile-popover/ProfilePopover.module.scss.js +33 -33
- package/dist/components/search-input/SearchInput.css +1 -1
- package/dist/components/search-input/SearchInput.module.scss.cjs +1 -1
- package/dist/components/search-input/SearchInput.module.scss.js +15 -15
- package/dist/components/team-avatar/TeamAvatar.cjs +1 -1
- package/dist/components/team-avatar/TeamAvatar.cjs.map +1 -1
- package/dist/components/team-avatar/TeamAvatar.css +1 -1
- package/dist/components/team-avatar/TeamAvatar.d.ts +8 -1
- package/dist/components/team-avatar/TeamAvatar.d.ts.map +1 -1
- package/dist/components/team-avatar/TeamAvatar.js +23 -21
- package/dist/components/team-avatar/TeamAvatar.js.map +1 -1
- package/dist/components/team-avatar/TeamAvatar.module.scss.cjs +1 -1
- package/dist/components/team-avatar/TeamAvatar.module.scss.js +17 -16
- package/dist/components/team-avatar/TeamAvatar.module.scss.js.map +1 -1
- package/dist/components/team-avatar/index.d.ts +1 -1
- package/dist/components/team-avatar/index.d.ts.map +1 -1
- package/dist/components/text-area/TextArea.css +1 -1
- package/dist/components/text-area/TextArea.module.scss.cjs +1 -1
- package/dist/components/text-area/TextArea.module.scss.js +12 -12
- package/dist/components/text-input/TextInput.css +1 -1
- package/dist/components/text-input/TextInput.module.scss.cjs +1 -1
- package/dist/components/text-input/TextInput.module.scss.js +19 -19
- package/dist/components/tile-button/TileButton.cjs +2 -0
- package/dist/components/tile-button/TileButton.cjs.map +1 -0
- package/dist/components/tile-button/TileButton.css +1 -0
- package/dist/components/tile-button/TileButton.d.ts +54 -0
- package/dist/components/tile-button/TileButton.d.ts.map +1 -0
- package/dist/components/tile-button/TileButton.js +74 -0
- package/dist/components/tile-button/TileButton.js.map +1 -0
- package/dist/components/tile-button/TileButton.module.scss.cjs +2 -0
- package/dist/components/tile-button/TileButton.module.scss.cjs.map +1 -0
- package/dist/components/tile-button/TileButton.module.scss.js +12 -0
- package/dist/components/tile-button/TileButton.module.scss.js.map +1 -0
- package/dist/components/{action-button → tile-button}/index.cjs +1 -1
- package/dist/components/tile-button/index.d.ts +3 -0
- package/dist/components/tile-button/index.d.ts.map +1 -0
- package/dist/components/tile-button/index.js +5 -0
- package/dist/components/tour-point/TourPoint.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/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +111 -109
- package/dist/index.js.map +1 -1
- package/dist/utils/scrollLock.cjs +2 -0
- package/dist/utils/scrollLock.cjs.map +1 -0
- package/dist/utils/scrollLock.d.ts +9 -0
- package/dist/utils/scrollLock.d.ts.map +1 -0
- package/dist/utils/scrollLock.js +38 -0
- package/dist/utils/scrollLock.js.map +1 -0
- package/dist/utils/slot.cjs.map +1 -1
- package/dist/utils/slot.d.ts +1 -1
- package/dist/utils/slot.js.map +1 -1
- package/dist/utils/useOnExited.cjs +2 -0
- package/dist/utils/useOnExited.cjs.map +1 -0
- package/dist/utils/useOnExited.d.ts +7 -0
- package/dist/utils/useOnExited.d.ts.map +1 -0
- package/dist/utils/useOnExited.js +14 -0
- package/dist/utils/useOnExited.js.map +1 -0
- package/package.json +5 -4
- package/dist/components/action-button/ActionButton.cjs +0 -2
- package/dist/components/action-button/ActionButton.cjs.map +0 -1
- package/dist/components/action-button/ActionButton.css +0 -1
- package/dist/components/action-button/ActionButton.d.ts +0 -54
- package/dist/components/action-button/ActionButton.d.ts.map +0 -1
- package/dist/components/action-button/ActionButton.js +0 -74
- package/dist/components/action-button/ActionButton.js.map +0 -1
- package/dist/components/action-button/ActionButton.module.scss.cjs +0 -2
- package/dist/components/action-button/ActionButton.module.scss.cjs.map +0 -1
- package/dist/components/action-button/ActionButton.module.scss.js +0 -12
- package/dist/components/action-button/ActionButton.module.scss.js.map +0 -1
- package/dist/components/action-button/index.d.ts +0 -3
- package/dist/components/action-button/index.d.ts.map +0 -1
- package/dist/components/action-button/index.js +0 -5
- /package/dist/components/{action-button → tile-button}/index.cjs.map +0 -0
- /package/dist/components/{action-button → tile-button}/index.js.map +0 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAA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,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { default as r } from "./components/
|
|
1
|
+
import { default as r } from "./components/tile-button/TileButton.js";
|
|
2
2
|
import { default as a } from "./components/admin-console-header/AdminConsoleHeader.js";
|
|
3
3
|
import { default as s } from "./components/admin-panel/AdminPanel.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as l } from "./components/admin-console-footer/AdminConsoleFooter.js";
|
|
5
5
|
import { default as p } from "./components/admin-panel-footer/AdminPanelFooter.js";
|
|
6
6
|
import { default as x } from "./components/admin-panel-header/AdminPanelHeader.js";
|
|
7
7
|
import { default as i } from "./components/attachment-card/AttachmentCard.js";
|
|
8
8
|
import { default as S } from "./components/button/Button.js";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as c } from "./components/button/Button.module.scss.js";
|
|
10
10
|
import { default as T } from "./components/card-button/CardButton.js";
|
|
11
11
|
import { default as g } from "./components/card-button/CardButtonGroup.js";
|
|
12
12
|
import { default as C } from "./components/channel-info-msg-header/ChannelInfoMsgHeader.js";
|
|
13
|
-
import { default as
|
|
13
|
+
import { default as A } from "./components/channel-sidebar-item/ChannelSidebarItem.js";
|
|
14
14
|
import { default as E } from "./components/checkbox/Checkbox.js";
|
|
15
15
|
import { default as _ } from "./components/chip/Chip.js";
|
|
16
16
|
import { default as N } from "./components/chip/ChipGroup.js";
|
|
17
17
|
import { default as R } from "./components/combobox/Combobox.js";
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
18
|
+
import { default as y } from "./components/date-range-picker/DateRangePicker.js";
|
|
19
|
+
import { default as F } from "./components/divider/Divider.js";
|
|
20
20
|
import { default as k } from "./components/dropdown/Dropdown.js";
|
|
21
21
|
import { default as Z } from "./components/emoji/Emoji.js";
|
|
22
22
|
import { EMOJI_BUTTON_EMOJI_SIZES as L, default as V } from "./components/emoji-button/EmojiButton.js";
|
|
@@ -26,65 +26,65 @@ import { default as X } from "./components/error-message/ErrorMessage.js";
|
|
|
26
26
|
import { default as $ } from "./components/field-message/FieldMessage.js";
|
|
27
27
|
import { default as oe } from "./components/feature-discovery-panel/FeatureDiscoveryPanel.js";
|
|
28
28
|
import { default as te } from "./components/global-banner/GlobalBanner.js";
|
|
29
|
-
import { default as fe, IconSlotContext as se, SVG_SIZE_MAP as de, useIconSlotContext as
|
|
29
|
+
import { default as fe, IconSlotContext as se, SVG_SIZE_MAP as de, useIconSlotContext as le } from "./components/icon/Icon.js";
|
|
30
30
|
import { ICON_BUTTON_ICON_SIZES as pe, default as me } from "./components/icon-button/IconButton.js";
|
|
31
31
|
import { default as ne } from "./components/illustration/Illustration.js";
|
|
32
32
|
import { default as Pe } from "./components/image-preview/ImagePreview.js";
|
|
33
|
-
import { default as
|
|
33
|
+
import { default as Me } from "./components/tag/Tag.js";
|
|
34
34
|
import { default as Ie } from "./components/link-preview/LinkPreview.js";
|
|
35
35
|
import { default as ve } from "./components/mention-badge/MentionBadge.js";
|
|
36
36
|
import { default as Be } from "./components/menu-group-heading/MenuGroupHeading.js";
|
|
37
|
-
import { default as
|
|
37
|
+
import { default as he } from "./components/menu-item/MenuItem.js";
|
|
38
38
|
import { default as be } from "./components/message-actions/MessageActions.js";
|
|
39
39
|
import { default as Oe } from "./components/message-header/MessageHeader.js";
|
|
40
40
|
import { default as Ge } from "./components/reactions-row/ReactionsRow.js";
|
|
41
41
|
import { default as we } from "./components/reaction-button/ReactionButton.js";
|
|
42
42
|
import { default as He } from "./components/message-separator/MessageSeparator.js";
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as je } from "./components/modal
|
|
46
|
-
import { default as Je } from "./components/modal-
|
|
47
|
-
import { default as Ve } from "./components/
|
|
48
|
-
import { default as qe } from "./components/
|
|
49
|
-
import { default as Qe } from "./components/
|
|
50
|
-
import { default as Xe } from "./components/
|
|
51
|
-
import { default as $e } from "./components/
|
|
52
|
-
import { default as oo
|
|
53
|
-
import { default as lo } from "./components/popover-
|
|
54
|
-
import { default as mo } from "./components/
|
|
55
|
-
import { default as no } from "./components/
|
|
56
|
-
import { default as Po } from "./components/
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as Io } from "./components/
|
|
59
|
-
import { default as vo } from "./components/
|
|
60
|
-
import { default as Bo } from "./components/
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as bo
|
|
63
|
-
import { default as _o } from "./components/
|
|
64
|
-
import { default as No } from "./components/
|
|
65
|
-
import { default as Ro } from "./components/
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as ko } from "./components/
|
|
69
|
-
import { default as Zo } from "./components/
|
|
70
|
-
import { default as Lo } from "./components/
|
|
71
|
-
import { default as Ko } from "./components/text-
|
|
72
|
-
import { default as zo } from "./components/
|
|
73
|
-
import { default as Wo } from "./components/thread-
|
|
74
|
-
import { default as Yo } from "./components/
|
|
75
|
-
import { default as er } from "./components/
|
|
76
|
-
import { default as rr } from "./components/
|
|
77
|
-
import { default as ar } from "./components/
|
|
78
|
-
import { default as sr } from "./components/
|
|
79
|
-
import { default as
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
43
|
+
import { default as De } from "./components/modal/Modal.js";
|
|
44
|
+
import { default as Ue } from "./components/modal/ModalOverlay.js";
|
|
45
|
+
import { default as je } from "./components/modal/ModalOverlay.module.scss.js";
|
|
46
|
+
import { default as Je } from "./components/modal-footer/ModalFooter.js";
|
|
47
|
+
import { default as Ve } from "./components/modal-header/ModalHeader.js";
|
|
48
|
+
import { default as qe } from "./components/more-unreads-banner/MoreUnreadsBanner.js";
|
|
49
|
+
import { default as Qe } from "./components/new-message-banner/NewMessageBanner.js";
|
|
50
|
+
import { default as Xe } from "./components/pagination-dots/PaginationDots.js";
|
|
51
|
+
import { default as $e } from "./components/permalink-preview/PermalinkPreview.js";
|
|
52
|
+
import { default as oo } from "./components/pinned-saved-indicators/PinnedSavedIndicators.js";
|
|
53
|
+
import { default as to, PopoverMenuDivider as ao, PopoverMenuGroup as fo, PopoverMenuGroupTitle as so, PopoverMenuScroll as lo, PopoverMenuTitle as uo } from "./components/popover-menu/PopoverMenu.js";
|
|
54
|
+
import { default as mo } from "./components/popover-notice/PopoverNotice.js";
|
|
55
|
+
import { default as no } from "./components/profile-popover/ProfilePopover.js";
|
|
56
|
+
import { default as Po } from "./components/progress-bar/ProgressBar.js";
|
|
57
|
+
import { default as Mo } from "./components/radio/Radio.js";
|
|
58
|
+
import { default as Io } from "./components/right-sidebar-header/RightSidebarHeader.js";
|
|
59
|
+
import { default as vo } from "./components/scrollbar/Scrollbar.js";
|
|
60
|
+
import { default as Bo } from "./components/password-input/PasswordInput.js";
|
|
61
|
+
import { default as ho } from "./components/search-input/SearchInput.js";
|
|
62
|
+
import { default as bo } from "./components/search-tip-banner/SearchTipBanner.js";
|
|
63
|
+
import { default as Oo, ShortcutTagGroup as _o } from "./components/shortcut-tag/ShortcutTag.js";
|
|
64
|
+
import { default as No } from "./components/section-notice/SectionNotice.js";
|
|
65
|
+
import { default as Ro } from "./components/select/Select.js";
|
|
66
|
+
import { default as yo } from "./components/spinner/Spinner.js";
|
|
67
|
+
import { default as Fo } from "./components/status-badge/StatusBadge.js";
|
|
68
|
+
import { default as ko } from "./components/switch/Switch.js";
|
|
69
|
+
import { default as Zo } from "./components/tabs/Tabs.js";
|
|
70
|
+
import { default as Lo } from "./components/team-avatar/TeamAvatar.js";
|
|
71
|
+
import { default as Ko } from "./components/text-area/TextArea.js";
|
|
72
|
+
import { default as zo } from "./components/text-input/TextInput.js";
|
|
73
|
+
import { default as Wo } from "./components/thread-footer/ThreadFooter.js";
|
|
74
|
+
import { default as Yo } from "./components/thread-list-item/ThreadListItem.js";
|
|
75
|
+
import { default as er } from "./components/toast/Toast.js";
|
|
76
|
+
import { default as rr } from "./components/tooltip/Tooltip.js";
|
|
77
|
+
import { default as ar } from "./components/tour-point/TourPoint.js";
|
|
78
|
+
import { default as sr } from "./components/unread-badge/UnreadBadge.js";
|
|
79
|
+
import { default as lr } from "./components/user-avatar/UserAvatar.js";
|
|
80
|
+
import { default as pr } from "./components/user-avatar-group/UserAvatarGroup.js";
|
|
81
|
+
import { useControllable as xr } from "./hooks/use-controllable.js";
|
|
82
|
+
import { useExitAnimation as ir } from "./hooks/use-exit-animation.js";
|
|
83
|
+
import { useOutsideClose as Sr } from "./hooks/use-outside-close.js";
|
|
84
|
+
import { POPOVER_TRANSITION_MS as cr, usePopoverTransition as Ir } from "./hooks/use-popover-transition.js";
|
|
85
|
+
import { toKebab as vr } from "./utils/string.js";
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
-
u as AdminConsoleFooter,
|
|
87
|
+
l as AdminConsoleFooter,
|
|
88
88
|
a as AdminConsoleHeader,
|
|
89
89
|
s as AdminPanel,
|
|
90
90
|
p as AdminPanelFooter,
|
|
@@ -94,13 +94,13 @@ export {
|
|
|
94
94
|
T as CardButton,
|
|
95
95
|
g as CardButtonGroup,
|
|
96
96
|
C as ChannelInfoMsgHeader,
|
|
97
|
-
|
|
97
|
+
A as ChannelSidebarItem,
|
|
98
98
|
E as Checkbox,
|
|
99
99
|
_ as Chip,
|
|
100
100
|
N as ChipGroup,
|
|
101
101
|
R as Combobox,
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
y as DateRangePicker,
|
|
103
|
+
F as Divider,
|
|
104
104
|
k as Dropdown,
|
|
105
105
|
L as EMOJI_BUTTON_EMOJI_SIZES,
|
|
106
106
|
Z as Emoji,
|
|
@@ -120,64 +120,66 @@ export {
|
|
|
120
120
|
Ie as LinkPreview,
|
|
121
121
|
ve as MentionBadge,
|
|
122
122
|
Be as MenuGroupHeading,
|
|
123
|
-
|
|
123
|
+
he as MenuItem,
|
|
124
124
|
be as MessageActions,
|
|
125
125
|
Oe as MessageHeader,
|
|
126
126
|
He as MessageSeparator,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
qe as
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
$e as
|
|
137
|
-
oo as
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
mo as
|
|
145
|
-
no as
|
|
146
|
-
Po as
|
|
127
|
+
De as Modal,
|
|
128
|
+
Je as ModalFooter,
|
|
129
|
+
Ve as ModalHeader,
|
|
130
|
+
Ue as ModalOverlay,
|
|
131
|
+
qe as MoreUnreadsBanner,
|
|
132
|
+
Qe as NewMessageBanner,
|
|
133
|
+
cr as POPOVER_TRANSITION_MS,
|
|
134
|
+
Xe as PaginationDots,
|
|
135
|
+
Bo as PasswordInput,
|
|
136
|
+
$e as PermalinkPreview,
|
|
137
|
+
oo as PinnedSavedIndicators,
|
|
138
|
+
to as PopoverMenu,
|
|
139
|
+
ao as PopoverMenuDivider,
|
|
140
|
+
fo as PopoverMenuGroup,
|
|
141
|
+
so as PopoverMenuGroupTitle,
|
|
142
|
+
lo as PopoverMenuScroll,
|
|
143
|
+
uo as PopoverMenuTitle,
|
|
144
|
+
mo as PopoverNotice,
|
|
145
|
+
no as ProfilePopover,
|
|
146
|
+
Po as ProgressBar,
|
|
147
|
+
Mo as Radio,
|
|
147
148
|
we as ReactionButton,
|
|
148
149
|
Ge as ReactionsRow,
|
|
149
|
-
|
|
150
|
+
Io as RightSidebarHeader,
|
|
150
151
|
de as SVG_SIZE_MAP,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
er as
|
|
170
|
-
rr as
|
|
171
|
-
ar as
|
|
172
|
-
sr as
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
xr as
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
152
|
+
vo as Scrollbar,
|
|
153
|
+
ho as SearchInput,
|
|
154
|
+
bo as SearchTipBanner,
|
|
155
|
+
No as SectionNotice,
|
|
156
|
+
Ro as Select,
|
|
157
|
+
Oo as ShortcutTag,
|
|
158
|
+
_o as ShortcutTagGroup,
|
|
159
|
+
yo as Spinner,
|
|
160
|
+
Fo as StatusBadge,
|
|
161
|
+
ko as Switch,
|
|
162
|
+
Zo as Tabs,
|
|
163
|
+
Me as Tag,
|
|
164
|
+
Lo as TeamAvatar,
|
|
165
|
+
Ko as TextArea,
|
|
166
|
+
zo as TextInput,
|
|
167
|
+
Wo as ThreadFooter,
|
|
168
|
+
Yo as ThreadListItem,
|
|
169
|
+
r as TileButton,
|
|
170
|
+
er as Toast,
|
|
171
|
+
rr as Tooltip,
|
|
172
|
+
ar as TourPoint,
|
|
173
|
+
sr as UnreadBadge,
|
|
174
|
+
lr as UserAvatar,
|
|
175
|
+
pr as UserAvatarGroup,
|
|
176
|
+
c as btnStyles,
|
|
177
|
+
je as modalOverlayStyles,
|
|
178
|
+
vr as toKebab,
|
|
179
|
+
xr as useControllable,
|
|
180
|
+
ir as useExitAnimation,
|
|
181
|
+
le as useIconSlotContext,
|
|
182
|
+
Sr as useOutsideClose,
|
|
183
|
+
Ir as usePopoverTransition
|
|
182
184
|
};
|
|
183
185
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=Symbol.for("@mattermost/compass-ui/scroll-lock/v1");function a(o){const e=globalThis;let t=e[s];t||(t=new WeakMap,e[s]=t);let n=t.get(o);return n||(n={count:0,savedOverflow:"",savedPaddingRight:""},t.set(o,n)),n}function r(o){var n;const e=o.documentElement.clientWidth,t=((n=o.defaultView)==null?void 0:n.innerWidth)??0;return e>0&&t>e?t-e:0}function u(o=typeof document>"u"?void 0:document){var i;if(!o)return()=>{};const{body:e}=o,t=a(o);if(t.count===0){const l=r(o);if(t.savedOverflow=e.style.overflow,t.savedPaddingRight=e.style.paddingRight,l>0){const d=parseFloat(((i=o.defaultView)==null?void 0:i.getComputedStyle(e).paddingRight)??"")||0;e.style.paddingRight=`${d+l}px`}e.style.overflow="hidden"}t.count+=1;let n=!1;return()=>{n||(n=!0,t.count-=1,t.count===0&&(e.style.overflow=t.savedOverflow,e.style.paddingRight=t.savedPaddingRight))}}exports.lockBodyScroll=u;
|
|
2
|
+
//# sourceMappingURL=scrollLock.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollLock.cjs","sources":["../../src/utils/scrollLock.ts"],"sourcesContent":["interface ScrollLockState {\n count: number;\n savedOverflow: string;\n savedPaddingRight: string;\n}\n\n// Shared on globalThis so every bundled compass-ui copy on the page counts the same locks.\nconst STATE_KEY = Symbol.for('@mattermost/compass-ui/scroll-lock/v1');\n\n// Keyed per document so a popout window or iframe locks and restores independently.\nfunction getState(doc: Document): ScrollLockState {\n const host = globalThis as unknown as Record<\n symbol,\n WeakMap<Document, ScrollLockState> | undefined\n >;\n let states = host[STATE_KEY];\n if (!states) {\n states = new WeakMap();\n host[STATE_KEY] = states;\n }\n let state = states.get(doc);\n if (!state) {\n state = { count: 0, savedOverflow: '', savedPaddingRight: '' };\n states.set(doc, state);\n }\n return state;\n}\n\nfunction scrollbarWidth(doc: Document): number {\n const viewport = doc.documentElement.clientWidth;\n const outer = doc.defaultView?.innerWidth ?? 0;\n // clientWidth is 0 in non-layout environments (jsdom); don't treat that as a scrollbar.\n return viewport > 0 && outer > viewport ? outer - viewport : 0;\n}\n\n/**\n * Locks scroll on `doc.body` (default: the global `document`). Ref-counted so\n * stacked locks restore the original `overflow` only once the last one is\n * released. Pads the body by the scrollbar width so the page doesn't shift\n * sideways when the scrollbar disappears. Returns the release function; calling\n * it more than once is a no-op.\n */\nexport function lockBodyScroll(\n doc: Document | undefined = typeof document === 'undefined'\n ? undefined\n : document,\n): () => void {\n if (!doc) return () => {};\n\n const { body } = doc;\n const state = getState(doc);\n if (state.count === 0) {\n const gap = scrollbarWidth(doc);\n state.savedOverflow = body.style.overflow;\n state.savedPaddingRight = body.style.paddingRight;\n if (gap > 0) {\n const base =\n parseFloat(\n doc.defaultView?.getComputedStyle(body).paddingRight ?? '',\n ) || 0;\n body.style.paddingRight = `${base + gap}px`;\n }\n body.style.overflow = 'hidden';\n }\n state.count += 1;\n\n let released = false;\n return () => {\n if (released) return;\n released = true;\n state.count -= 1;\n if (state.count === 0) {\n body.style.overflow = state.savedOverflow;\n body.style.paddingRight = state.savedPaddingRight;\n }\n };\n}\n"],"names":["STATE_KEY","getState","doc","host","states","state","scrollbarWidth","viewport","outer","_a","lockBodyScroll","body","gap","base","released"],"mappings":"gFAOA,MAAMA,EAAY,OAAO,IAAI,uCAAuC,EAGpE,SAASC,EAASC,EAAgC,CAChD,MAAMC,EAAO,WAIb,IAAIC,EAASD,EAAKH,CAAS,EACtBI,IACHA,MAAa,QACbD,EAAKH,CAAS,EAAII,GAEpB,IAAIC,EAAQD,EAAO,IAAIF,CAAG,EAC1B,OAAKG,IACHA,EAAQ,CAAE,MAAO,EAAG,cAAe,GAAI,kBAAmB,EAAA,EAC1DD,EAAO,IAAIF,EAAKG,CAAK,GAEhBA,CACT,CAEA,SAASC,EAAeJ,EAAuB,OAC7C,MAAMK,EAAWL,EAAI,gBAAgB,YAC/BM,IAAQC,EAAAP,EAAI,cAAJ,YAAAO,EAAiB,aAAc,EAE7C,OAAOF,EAAW,GAAKC,EAAQD,EAAWC,EAAQD,EAAW,CAC/D,CASO,SAASG,EACdR,EAA4B,OAAO,SAAa,IAC5C,OACA,SACQ,OACZ,GAAI,CAACA,EAAK,MAAO,IAAM,CAAC,EAExB,KAAM,CAAE,KAAAS,GAAST,EACXG,EAAQJ,EAASC,CAAG,EAC1B,GAAIG,EAAM,QAAU,EAAG,CACrB,MAAMO,EAAMN,EAAeJ,CAAG,EAG9B,GAFAG,EAAM,cAAgBM,EAAK,MAAM,SACjCN,EAAM,kBAAoBM,EAAK,MAAM,aACjCC,EAAM,EAAG,CACX,MAAMC,EACJ,aACEJ,EAAAP,EAAI,cAAJ,YAAAO,EAAiB,iBAAiBE,GAAM,eAAgB,EAAA,GACrD,EACPA,EAAK,MAAM,aAAe,GAAGE,EAAOD,CAAG,IACzC,CACAD,EAAK,MAAM,SAAW,QACxB,CACAN,EAAM,OAAS,EAEf,IAAIS,EAAW,GACf,MAAO,IAAM,CACPA,IACJA,EAAW,GACXT,EAAM,OAAS,EACXA,EAAM,QAAU,IAClBM,EAAK,MAAM,SAAWN,EAAM,cAC5BM,EAAK,MAAM,aAAeN,EAAM,mBAEpC,CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locks scroll on `doc.body` (default: the global `document`). Ref-counted so
|
|
3
|
+
* stacked locks restore the original `overflow` only once the last one is
|
|
4
|
+
* released. Pads the body by the scrollbar width so the page doesn't shift
|
|
5
|
+
* sideways when the scrollbar disappears. Returns the release function; calling
|
|
6
|
+
* it more than once is a no-op.
|
|
7
|
+
*/
|
|
8
|
+
export declare function lockBodyScroll(doc?: Document | undefined): () => void;
|
|
9
|
+
//# sourceMappingURL=scrollLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollLock.d.ts","sourceRoot":"","sources":["../../src/utils/scrollLock.ts"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,GAAG,GAAE,QAAQ,GAAG,SAEJ,GACX,MAAM,IAAI,CA8BZ"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const l = Symbol.for("@mattermost/compass-ui/scroll-lock/v1");
|
|
2
|
+
function d(n) {
|
|
3
|
+
const e = globalThis;
|
|
4
|
+
let t = e[l];
|
|
5
|
+
t || (t = /* @__PURE__ */ new WeakMap(), e[l] = t);
|
|
6
|
+
let o = t.get(n);
|
|
7
|
+
return o || (o = { count: 0, savedOverflow: "", savedPaddingRight: "" }, t.set(n, o)), o;
|
|
8
|
+
}
|
|
9
|
+
function r(n) {
|
|
10
|
+
var o;
|
|
11
|
+
const e = n.documentElement.clientWidth, t = ((o = n.defaultView) == null ? void 0 : o.innerWidth) ?? 0;
|
|
12
|
+
return e > 0 && t > e ? t - e : 0;
|
|
13
|
+
}
|
|
14
|
+
function u(n = typeof document > "u" ? void 0 : document) {
|
|
15
|
+
var i;
|
|
16
|
+
if (!n) return () => {
|
|
17
|
+
};
|
|
18
|
+
const { body: e } = n, t = d(n);
|
|
19
|
+
if (t.count === 0) {
|
|
20
|
+
const s = r(n);
|
|
21
|
+
if (t.savedOverflow = e.style.overflow, t.savedPaddingRight = e.style.paddingRight, s > 0) {
|
|
22
|
+
const a = parseFloat(
|
|
23
|
+
((i = n.defaultView) == null ? void 0 : i.getComputedStyle(e).paddingRight) ?? ""
|
|
24
|
+
) || 0;
|
|
25
|
+
e.style.paddingRight = `${a + s}px`;
|
|
26
|
+
}
|
|
27
|
+
e.style.overflow = "hidden";
|
|
28
|
+
}
|
|
29
|
+
t.count += 1;
|
|
30
|
+
let o = !1;
|
|
31
|
+
return () => {
|
|
32
|
+
o || (o = !0, t.count -= 1, t.count === 0 && (e.style.overflow = t.savedOverflow, e.style.paddingRight = t.savedPaddingRight));
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
u as lockBodyScroll
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=scrollLock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollLock.js","sources":["../../src/utils/scrollLock.ts"],"sourcesContent":["interface ScrollLockState {\n count: number;\n savedOverflow: string;\n savedPaddingRight: string;\n}\n\n// Shared on globalThis so every bundled compass-ui copy on the page counts the same locks.\nconst STATE_KEY = Symbol.for('@mattermost/compass-ui/scroll-lock/v1');\n\n// Keyed per document so a popout window or iframe locks and restores independently.\nfunction getState(doc: Document): ScrollLockState {\n const host = globalThis as unknown as Record<\n symbol,\n WeakMap<Document, ScrollLockState> | undefined\n >;\n let states = host[STATE_KEY];\n if (!states) {\n states = new WeakMap();\n host[STATE_KEY] = states;\n }\n let state = states.get(doc);\n if (!state) {\n state = { count: 0, savedOverflow: '', savedPaddingRight: '' };\n states.set(doc, state);\n }\n return state;\n}\n\nfunction scrollbarWidth(doc: Document): number {\n const viewport = doc.documentElement.clientWidth;\n const outer = doc.defaultView?.innerWidth ?? 0;\n // clientWidth is 0 in non-layout environments (jsdom); don't treat that as a scrollbar.\n return viewport > 0 && outer > viewport ? outer - viewport : 0;\n}\n\n/**\n * Locks scroll on `doc.body` (default: the global `document`). Ref-counted so\n * stacked locks restore the original `overflow` only once the last one is\n * released. Pads the body by the scrollbar width so the page doesn't shift\n * sideways when the scrollbar disappears. Returns the release function; calling\n * it more than once is a no-op.\n */\nexport function lockBodyScroll(\n doc: Document | undefined = typeof document === 'undefined'\n ? undefined\n : document,\n): () => void {\n if (!doc) return () => {};\n\n const { body } = doc;\n const state = getState(doc);\n if (state.count === 0) {\n const gap = scrollbarWidth(doc);\n state.savedOverflow = body.style.overflow;\n state.savedPaddingRight = body.style.paddingRight;\n if (gap > 0) {\n const base =\n parseFloat(\n doc.defaultView?.getComputedStyle(body).paddingRight ?? '',\n ) || 0;\n body.style.paddingRight = `${base + gap}px`;\n }\n body.style.overflow = 'hidden';\n }\n state.count += 1;\n\n let released = false;\n return () => {\n if (released) return;\n released = true;\n state.count -= 1;\n if (state.count === 0) {\n body.style.overflow = state.savedOverflow;\n body.style.paddingRight = state.savedPaddingRight;\n }\n };\n}\n"],"names":["STATE_KEY","getState","doc","host","states","state","scrollbarWidth","_a","viewport","outer","lockBodyScroll","body","gap","base","released"],"mappings":"AAOA,MAAMA,IAAY,OAAO,IAAI,uCAAuC;AAGpE,SAASC,EAASC,GAAgC;AAChD,QAAMC,IAAO;AAIb,MAAIC,IAASD,EAAKH,CAAS;AAC3B,EAAKI,MACHA,wBAAa,QAAA,GACbD,EAAKH,CAAS,IAAII;AAEpB,MAAIC,IAAQD,EAAO,IAAIF,CAAG;AAC1B,SAAKG,MACHA,IAAQ,EAAE,OAAO,GAAG,eAAe,IAAI,mBAAmB,GAAA,GAC1DD,EAAO,IAAIF,GAAKG,CAAK,IAEhBA;AACT;AAEA,SAASC,EAAeJ,GAAuB;AArB/C,MAAAK;AAsBE,QAAMC,IAAWN,EAAI,gBAAgB,aAC/BO,MAAQF,IAAAL,EAAI,gBAAJ,gBAAAK,EAAiB,eAAc;AAE7C,SAAOC,IAAW,KAAKC,IAAQD,IAAWC,IAAQD,IAAW;AAC/D;AASO,SAASE,EACdR,IAA4B,OAAO,WAAa,MAC5C,SACA,UACQ;AAvCd,MAAAK;AAwCE,MAAI,CAACL,EAAK,QAAO,MAAM;AAAA,EAAC;AAExB,QAAM,EAAE,MAAAS,MAAST,GACXG,IAAQJ,EAASC,CAAG;AAC1B,MAAIG,EAAM,UAAU,GAAG;AACrB,UAAMO,IAAMN,EAAeJ,CAAG;AAG9B,QAFAG,EAAM,gBAAgBM,EAAK,MAAM,UACjCN,EAAM,oBAAoBM,EAAK,MAAM,cACjCC,IAAM,GAAG;AACX,YAAMC,IACJ;AAAA,UACEN,IAAAL,EAAI,gBAAJ,gBAAAK,EAAiB,iBAAiBI,GAAM,iBAAgB;AAAA,MAAA,KACrD;AACP,MAAAA,EAAK,MAAM,eAAe,GAAGE,IAAOD,CAAG;AAAA,IACzC;AACA,IAAAD,EAAK,MAAM,WAAW;AAAA,EACxB;AACA,EAAAN,EAAM,SAAS;AAEf,MAAIS,IAAW;AACf,SAAO,MAAM;AACX,IAAIA,MACJA,IAAW,IACXT,EAAM,SAAS,GACXA,EAAM,UAAU,MAClBM,EAAK,MAAM,WAAWN,EAAM,eAC5BM,EAAK,MAAM,eAAeN,EAAM;AAAA,EAEpC;AACF;"}
|
package/dist/utils/slot.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.cjs","sources":["../../src/utils/slot.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from 'react';\nimport { mergeClassNames } from '@/utils/props';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\n/** Assigns a value to a callback or object ref. */\nfunction setRef<T>(ref: PossibleRef<T>, value: T | null) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as { current: T | null }).current = value;\n }\n}\n\n/** Composes multiple refs into a single callback ref. */\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node) => {\n for (const ref of refs) {\n setRef(ref, node);\n }\n };\n}\n\n/**\n * Reads the ref from a React element across React 18 (`element.ref`) and\n * React 19 (`element.props.ref`).\n */\nexport function getElementRef(element: ReactElement): Ref<unknown> | undefined {\n // React 19: ref is a regular prop. React 18: ref is on the element.\n const propsRef = (element.props as { ref?: Ref<unknown> } | null | undefined)\n ?.ref;\n if (propsRef !== undefined) {\n return propsRef;\n }\n return (element as ReactElement & { ref?: Ref<unknown> }).ref;\n}\n\ntype AnyProps = Record<string, unknown>;\n\nfunction isHandlerKey(key: string): boolean {\n return (\n key.length > 2 && key.startsWith('on') && key[2] === key[2]?.toUpperCase()\n );\n}\n\n/**\n * Merges Slot (asChild host) props with the child's props.\n * Child props win by default; event handlers are composed (child first;\n * host skipped when the child called `preventDefault()`); `className` and\n * `style` are merged.\n */\nexport function mergeSlotProps(\n slotProps: AnyProps,\n childProps: AnyProps,\n): AnyProps {\n const override: AnyProps = { ...childProps };\n\n for (const propName of Object.keys(slotProps)) {\n const slotValue = slotProps[propName];\n const childValue = childProps[propName];\n\n if (isHandlerKey(propName)) {\n if (typeof slotValue === 'function' && typeof childValue === 'function') {\n override[propName] = (...args: unknown[]) => {\n const event = args[0] as { defaultPrevented?: boolean } | undefined;\n childValue(...args);\n if (!event?.defaultPrevented) {\n slotValue(...args);\n }\n };\n } else if (typeof slotValue === 'function') {\n override[propName] = slotValue;\n }\n } else if (propName === 'style') {\n override.style = {\n ...(typeof slotValue === 'object' && slotValue != null\n ? (slotValue as CSSProperties)\n : null),\n ...(typeof childValue === 'object' && childValue != null\n ? (childValue as CSSProperties)\n : null),\n };\n } else if (propName === 'className') {\n override.className = mergeClassNames(\n typeof slotValue === 'string' ? slotValue : undefined,\n typeof childValue === 'string' ? childValue : undefined,\n );\n } else if (!(propName in childProps)) {\n override[propName] = slotValue;\n }\n }\n\n return override;\n}\n\nfunction hasRenderableChildren(children: ReactNode): boolean {\n if (children == null || children === false || children === true) {\n return false;\n }\n if (typeof children === 'string') {\n return children.length > 0;\n }\n if (Array.isArray(children)) {\n return children.some(hasRenderableChildren);\n }\n return true;\n}\n\nfunction blockNavigation(event: {\n preventDefault: () => void;\n stopPropagation: () => void;\n}) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport interface RenderAsChildOptions {\n /** Single React element to clone (e.g. `<a>` or `<Link>`). */\n child: ReactNode;\n /** Props owned by the host component (className, handlers, aria-*, …). */\n props: AnyProps;\n /** Forwarded ref from the host. */\n ref?: Ref<unknown>;\n /** Anatomy nodes that replace the child's children. */\n content: ReactNode;\n /** When true, apply disabled-link semantics. */\n disabled?: boolean;\n /** BEM disabled class (e.g. `button--disabled`). */\n disabledClassName?: string;\n /**\n * When true, warn in development if the child already has children (they\n * will be replaced). Use for hosts that own their full anatomy\n * (IconButton,
|
|
1
|
+
{"version":3,"file":"slot.cjs","sources":["../../src/utils/slot.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from 'react';\nimport { mergeClassNames } from '@/utils/props';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\n/** Assigns a value to a callback or object ref. */\nfunction setRef<T>(ref: PossibleRef<T>, value: T | null) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as { current: T | null }).current = value;\n }\n}\n\n/** Composes multiple refs into a single callback ref. */\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node) => {\n for (const ref of refs) {\n setRef(ref, node);\n }\n };\n}\n\n/**\n * Reads the ref from a React element across React 18 (`element.ref`) and\n * React 19 (`element.props.ref`).\n */\nexport function getElementRef(element: ReactElement): Ref<unknown> | undefined {\n // React 19: ref is a regular prop. React 18: ref is on the element.\n const propsRef = (element.props as { ref?: Ref<unknown> } | null | undefined)\n ?.ref;\n if (propsRef !== undefined) {\n return propsRef;\n }\n return (element as ReactElement & { ref?: Ref<unknown> }).ref;\n}\n\ntype AnyProps = Record<string, unknown>;\n\nfunction isHandlerKey(key: string): boolean {\n return (\n key.length > 2 && key.startsWith('on') && key[2] === key[2]?.toUpperCase()\n );\n}\n\n/**\n * Merges Slot (asChild host) props with the child's props.\n * Child props win by default; event handlers are composed (child first;\n * host skipped when the child called `preventDefault()`); `className` and\n * `style` are merged.\n */\nexport function mergeSlotProps(\n slotProps: AnyProps,\n childProps: AnyProps,\n): AnyProps {\n const override: AnyProps = { ...childProps };\n\n for (const propName of Object.keys(slotProps)) {\n const slotValue = slotProps[propName];\n const childValue = childProps[propName];\n\n if (isHandlerKey(propName)) {\n if (typeof slotValue === 'function' && typeof childValue === 'function') {\n override[propName] = (...args: unknown[]) => {\n const event = args[0] as { defaultPrevented?: boolean } | undefined;\n childValue(...args);\n if (!event?.defaultPrevented) {\n slotValue(...args);\n }\n };\n } else if (typeof slotValue === 'function') {\n override[propName] = slotValue;\n }\n } else if (propName === 'style') {\n override.style = {\n ...(typeof slotValue === 'object' && slotValue != null\n ? (slotValue as CSSProperties)\n : null),\n ...(typeof childValue === 'object' && childValue != null\n ? (childValue as CSSProperties)\n : null),\n };\n } else if (propName === 'className') {\n override.className = mergeClassNames(\n typeof slotValue === 'string' ? slotValue : undefined,\n typeof childValue === 'string' ? childValue : undefined,\n );\n } else if (!(propName in childProps)) {\n override[propName] = slotValue;\n }\n }\n\n return override;\n}\n\nfunction hasRenderableChildren(children: ReactNode): boolean {\n if (children == null || children === false || children === true) {\n return false;\n }\n if (typeof children === 'string') {\n return children.length > 0;\n }\n if (Array.isArray(children)) {\n return children.some(hasRenderableChildren);\n }\n return true;\n}\n\nfunction blockNavigation(event: {\n preventDefault: () => void;\n stopPropagation: () => void;\n}) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport interface RenderAsChildOptions {\n /** Single React element to clone (e.g. `<a>` or `<Link>`). */\n child: ReactNode;\n /** Props owned by the host component (className, handlers, aria-*, …). */\n props: AnyProps;\n /** Forwarded ref from the host. */\n ref?: Ref<unknown>;\n /** Anatomy nodes that replace the child's children. */\n content: ReactNode;\n /** When true, apply disabled-link semantics. */\n disabled?: boolean;\n /** BEM disabled class (e.g. `button--disabled`). */\n disabledClassName?: string;\n /**\n * When true, warn in development if the child already has children (they\n * will be replaced). Use for hosts that own their full anatomy\n * (IconButton, TileButton). Leave false when the host wraps the child's\n * text (Button label).\n */\n warnOnChildContent?: boolean;\n}\n\n/**\n * Clones a single child element with merged host props, composed refs, and\n * replacement content. Never forwards `type`. When `disabled`, sets\n * `aria-disabled`, the disabled class, and blocks click / auxclick navigation.\n */\nexport function renderAsChild({\n child,\n props,\n ref,\n content,\n disabled = false,\n disabledClassName,\n warnOnChildContent = false,\n}: RenderAsChildOptions): ReactElement | null {\n const warn = process.env.NODE_ENV !== 'production';\n\n let onlyChild: ReactNode = null;\n try {\n onlyChild = Children.only(child);\n } catch {\n onlyChild = null;\n }\n\n if (!isValidElement(onlyChild)) {\n if (warn) {\n console.warn(\n 'asChild expects a single React element child (e.g. <a> or <Link>).',\n );\n }\n return null;\n }\n\n const childProps = onlyChild.props as AnyProps & { children?: ReactNode };\n\n if (\n warn &&\n warnOnChildContent &&\n hasRenderableChildren(childProps.children)\n ) {\n console.warn(\n 'asChild replaces the child element\\'s children with component anatomy. Pass an empty element (e.g. <a href=\"…\" />).',\n );\n }\n\n // Strip `type` — on <a> it means MIME type, not button type.\n const slotProps: AnyProps = { ...props };\n delete slotProps.type;\n\n if (disabled) {\n slotProps['aria-disabled'] = true;\n if (disabledClassName) {\n slotProps.className = mergeClassNames(\n typeof slotProps.className === 'string'\n ? slotProps.className\n : undefined,\n disabledClassName,\n );\n }\n }\n\n const merged = mergeSlotProps(slotProps, childProps);\n\n if (disabled) {\n merged.onClick = blockNavigation;\n merged.onAuxClick = blockNavigation;\n }\n\n const childRef = getElementRef(onlyChild);\n\n return cloneElement(onlyChild, {\n ...merged,\n ref: composeRefs(ref, childRef),\n children: content,\n } as AnyProps);\n}\n"],"names":["setRef","ref","value","composeRefs","refs","node","getElementRef","element","propsRef","_a","isHandlerKey","key","mergeSlotProps","slotProps","childProps","override","propName","slotValue","childValue","args","event","mergeClassNames","hasRenderableChildren","children","blockNavigation","renderAsChild","child","props","content","disabled","disabledClassName","warnOnChildContent","warn","onlyChild","Children","isValidElement","merged","childRef","cloneElement"],"mappings":"kIAeA,SAASA,EAAUC,EAAqBC,EAAiB,CACnD,OAAOD,GAAQ,WACjBA,EAAIC,CAAK,EACAD,GAAO,OACfA,EAA8B,QAAUC,EAE7C,CAGO,SAASC,KAAkBC,EAA6C,CAC7E,OAAQC,GAAS,CACf,UAAWJ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AQA,CAAQ,EACjBA,EAAS,KAAKD,CAAqB,EAErC,EACT,CAEA,SAASE,EAAgBJ,EAGtB,CACDA,EAAM,eAAA,EACNA,EAAM,gBAAA,CACR,CA6BO,SAASK,EAAc,CAC5B,MAAAC,EAAA,MACAC,EACA,IAAA1B,EACA,QAAA2B,EACA,SAAAC,EAAW,GACX,kBAAAC,EACA,mBAAAC,EAAqB,EACvB,EAA8C,CAC5C,MAAMC,EAAO,QAAQ,IAAI,WAAa,aAEtC,IAAIC,EAAuB,KAC3B,GAAI,CACFA,EAAYC,EAAAA,SAAS,KAAKR,CAAK,CACjC,MAAQ,CACNO,EAAY,IACd,CAEA,GAAI,CAACE,EAAAA,eAAeF,CAAS,EAC3B,OAAID,GACF,QAAQ,KACN,oEAAA,EAGG,KAGT,MAAMlB,EAAamB,EAAU,MAG3BD,GACAD,GACAT,EAAsBR,EAAW,QAAQ,GAEzC,QAAQ,KACN,oHAAA,EAKJ,MAAMD,EAAsB,CAAE,GAAGc,CAAA,EACjC,OAAOd,EAAU,KAEbgB,IACFhB,EAAU,eAAe,EAAI,GACzBiB,IACFjB,EAAU,UAAYQ,EAAAA,gBACpB,OAAOR,EAAU,WAAc,SAC3BA,EAAU,UACV,OACJiB,CAAA,IAKN,MAAMM,EAASxB,EAAeC,EAAWC,CAAU,EAE/Ce,IACFO,EAAO,QAAUZ,EACjBY,EAAO,WAAaZ,GAGtB,MAAMa,EAAW/B,EAAc2B,CAAS,EAExC,OAAOK,EAAAA,aAAaL,EAAW,CAC7B,GAAGG,EACH,IAAKjC,EAAYF,EAAKoC,CAAQ,EAC9B,SAAUT,CAAA,CACC,CACf"}
|
package/dist/utils/slot.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface RenderAsChildOptions {
|
|
|
31
31
|
/**
|
|
32
32
|
* When true, warn in development if the child already has children (they
|
|
33
33
|
* will be replaced). Use for hosts that own their full anatomy
|
|
34
|
-
* (IconButton,
|
|
34
|
+
* (IconButton, TileButton). Leave false when the host wraps the child's
|
|
35
35
|
* text (Button label).
|
|
36
36
|
*/
|
|
37
37
|
warnOnChildContent?: boolean;
|
package/dist/utils/slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sources":["../../src/utils/slot.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from 'react';\nimport { mergeClassNames } from '@/utils/props';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\n/** Assigns a value to a callback or object ref. */\nfunction setRef<T>(ref: PossibleRef<T>, value: T | null) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as { current: T | null }).current = value;\n }\n}\n\n/** Composes multiple refs into a single callback ref. */\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node) => {\n for (const ref of refs) {\n setRef(ref, node);\n }\n };\n}\n\n/**\n * Reads the ref from a React element across React 18 (`element.ref`) and\n * React 19 (`element.props.ref`).\n */\nexport function getElementRef(element: ReactElement): Ref<unknown> | undefined {\n // React 19: ref is a regular prop. React 18: ref is on the element.\n const propsRef = (element.props as { ref?: Ref<unknown> } | null | undefined)\n ?.ref;\n if (propsRef !== undefined) {\n return propsRef;\n }\n return (element as ReactElement & { ref?: Ref<unknown> }).ref;\n}\n\ntype AnyProps = Record<string, unknown>;\n\nfunction isHandlerKey(key: string): boolean {\n return (\n key.length > 2 && key.startsWith('on') && key[2] === key[2]?.toUpperCase()\n );\n}\n\n/**\n * Merges Slot (asChild host) props with the child's props.\n * Child props win by default; event handlers are composed (child first;\n * host skipped when the child called `preventDefault()`); `className` and\n * `style` are merged.\n */\nexport function mergeSlotProps(\n slotProps: AnyProps,\n childProps: AnyProps,\n): AnyProps {\n const override: AnyProps = { ...childProps };\n\n for (const propName of Object.keys(slotProps)) {\n const slotValue = slotProps[propName];\n const childValue = childProps[propName];\n\n if (isHandlerKey(propName)) {\n if (typeof slotValue === 'function' && typeof childValue === 'function') {\n override[propName] = (...args: unknown[]) => {\n const event = args[0] as { defaultPrevented?: boolean } | undefined;\n childValue(...args);\n if (!event?.defaultPrevented) {\n slotValue(...args);\n }\n };\n } else if (typeof slotValue === 'function') {\n override[propName] = slotValue;\n }\n } else if (propName === 'style') {\n override.style = {\n ...(typeof slotValue === 'object' && slotValue != null\n ? (slotValue as CSSProperties)\n : null),\n ...(typeof childValue === 'object' && childValue != null\n ? (childValue as CSSProperties)\n : null),\n };\n } else if (propName === 'className') {\n override.className = mergeClassNames(\n typeof slotValue === 'string' ? slotValue : undefined,\n typeof childValue === 'string' ? childValue : undefined,\n );\n } else if (!(propName in childProps)) {\n override[propName] = slotValue;\n }\n }\n\n return override;\n}\n\nfunction hasRenderableChildren(children: ReactNode): boolean {\n if (children == null || children === false || children === true) {\n return false;\n }\n if (typeof children === 'string') {\n return children.length > 0;\n }\n if (Array.isArray(children)) {\n return children.some(hasRenderableChildren);\n }\n return true;\n}\n\nfunction blockNavigation(event: {\n preventDefault: () => void;\n stopPropagation: () => void;\n}) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport interface RenderAsChildOptions {\n /** Single React element to clone (e.g. `<a>` or `<Link>`). */\n child: ReactNode;\n /** Props owned by the host component (className, handlers, aria-*, …). */\n props: AnyProps;\n /** Forwarded ref from the host. */\n ref?: Ref<unknown>;\n /** Anatomy nodes that replace the child's children. */\n content: ReactNode;\n /** When true, apply disabled-link semantics. */\n disabled?: boolean;\n /** BEM disabled class (e.g. `button--disabled`). */\n disabledClassName?: string;\n /**\n * When true, warn in development if the child already has children (they\n * will be replaced). Use for hosts that own their full anatomy\n * (IconButton,
|
|
1
|
+
{"version":3,"file":"slot.js","sources":["../../src/utils/slot.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefCallback,\n} from 'react';\nimport { mergeClassNames } from '@/utils/props';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\n/** Assigns a value to a callback or object ref. */\nfunction setRef<T>(ref: PossibleRef<T>, value: T | null) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as { current: T | null }).current = value;\n }\n}\n\n/** Composes multiple refs into a single callback ref. */\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node) => {\n for (const ref of refs) {\n setRef(ref, node);\n }\n };\n}\n\n/**\n * Reads the ref from a React element across React 18 (`element.ref`) and\n * React 19 (`element.props.ref`).\n */\nexport function getElementRef(element: ReactElement): Ref<unknown> | undefined {\n // React 19: ref is a regular prop. React 18: ref is on the element.\n const propsRef = (element.props as { ref?: Ref<unknown> } | null | undefined)\n ?.ref;\n if (propsRef !== undefined) {\n return propsRef;\n }\n return (element as ReactElement & { ref?: Ref<unknown> }).ref;\n}\n\ntype AnyProps = Record<string, unknown>;\n\nfunction isHandlerKey(key: string): boolean {\n return (\n key.length > 2 && key.startsWith('on') && key[2] === key[2]?.toUpperCase()\n );\n}\n\n/**\n * Merges Slot (asChild host) props with the child's props.\n * Child props win by default; event handlers are composed (child first;\n * host skipped when the child called `preventDefault()`); `className` and\n * `style` are merged.\n */\nexport function mergeSlotProps(\n slotProps: AnyProps,\n childProps: AnyProps,\n): AnyProps {\n const override: AnyProps = { ...childProps };\n\n for (const propName of Object.keys(slotProps)) {\n const slotValue = slotProps[propName];\n const childValue = childProps[propName];\n\n if (isHandlerKey(propName)) {\n if (typeof slotValue === 'function' && typeof childValue === 'function') {\n override[propName] = (...args: unknown[]) => {\n const event = args[0] as { defaultPrevented?: boolean } | undefined;\n childValue(...args);\n if (!event?.defaultPrevented) {\n slotValue(...args);\n }\n };\n } else if (typeof slotValue === 'function') {\n override[propName] = slotValue;\n }\n } else if (propName === 'style') {\n override.style = {\n ...(typeof slotValue === 'object' && slotValue != null\n ? (slotValue as CSSProperties)\n : null),\n ...(typeof childValue === 'object' && childValue != null\n ? (childValue as CSSProperties)\n : null),\n };\n } else if (propName === 'className') {\n override.className = mergeClassNames(\n typeof slotValue === 'string' ? slotValue : undefined,\n typeof childValue === 'string' ? childValue : undefined,\n );\n } else if (!(propName in childProps)) {\n override[propName] = slotValue;\n }\n }\n\n return override;\n}\n\nfunction hasRenderableChildren(children: ReactNode): boolean {\n if (children == null || children === false || children === true) {\n return false;\n }\n if (typeof children === 'string') {\n return children.length > 0;\n }\n if (Array.isArray(children)) {\n return children.some(hasRenderableChildren);\n }\n return true;\n}\n\nfunction blockNavigation(event: {\n preventDefault: () => void;\n stopPropagation: () => void;\n}) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport interface RenderAsChildOptions {\n /** Single React element to clone (e.g. `<a>` or `<Link>`). */\n child: ReactNode;\n /** Props owned by the host component (className, handlers, aria-*, …). */\n props: AnyProps;\n /** Forwarded ref from the host. */\n ref?: Ref<unknown>;\n /** Anatomy nodes that replace the child's children. */\n content: ReactNode;\n /** When true, apply disabled-link semantics. */\n disabled?: boolean;\n /** BEM disabled class (e.g. `button--disabled`). */\n disabledClassName?: string;\n /**\n * When true, warn in development if the child already has children (they\n * will be replaced). Use for hosts that own their full anatomy\n * (IconButton, TileButton). Leave false when the host wraps the child's\n * text (Button label).\n */\n warnOnChildContent?: boolean;\n}\n\n/**\n * Clones a single child element with merged host props, composed refs, and\n * replacement content. Never forwards `type`. When `disabled`, sets\n * `aria-disabled`, the disabled class, and blocks click / auxclick navigation.\n */\nexport function renderAsChild({\n child,\n props,\n ref,\n content,\n disabled = false,\n disabledClassName,\n warnOnChildContent = false,\n}: RenderAsChildOptions): ReactElement | null {\n const warn = process.env.NODE_ENV !== 'production';\n\n let onlyChild: ReactNode = null;\n try {\n onlyChild = Children.only(child);\n } catch {\n onlyChild = null;\n }\n\n if (!isValidElement(onlyChild)) {\n if (warn) {\n console.warn(\n 'asChild expects a single React element child (e.g. <a> or <Link>).',\n );\n }\n return null;\n }\n\n const childProps = onlyChild.props as AnyProps & { children?: ReactNode };\n\n if (\n warn &&\n warnOnChildContent &&\n hasRenderableChildren(childProps.children)\n ) {\n console.warn(\n 'asChild replaces the child element\\'s children with component anatomy. Pass an empty element (e.g. <a href=\"…\" />).',\n );\n }\n\n // Strip `type` — on <a> it means MIME type, not button type.\n const slotProps: AnyProps = { ...props };\n delete slotProps.type;\n\n if (disabled) {\n slotProps['aria-disabled'] = true;\n if (disabledClassName) {\n slotProps.className = mergeClassNames(\n typeof slotProps.className === 'string'\n ? slotProps.className\n : undefined,\n disabledClassName,\n );\n }\n }\n\n const merged = mergeSlotProps(slotProps, childProps);\n\n if (disabled) {\n merged.onClick = blockNavigation;\n merged.onAuxClick = blockNavigation;\n }\n\n const childRef = getElementRef(onlyChild);\n\n return cloneElement(onlyChild, {\n ...merged,\n ref: composeRefs(ref, childRef),\n children: content,\n } as AnyProps);\n}\n"],"names":["setRef","ref","value","composeRefs","refs","node","getElementRef","element","propsRef","_a","isHandlerKey","key","mergeSlotProps","slotProps","childProps","override","propName","slotValue","childValue","args","event","mergeClassNames","hasRenderableChildren","children","blockNavigation","renderAsChild","child","props","content","disabled","disabledClassName","warnOnChildContent","warn","onlyChild","Children","isValidElement","merged","childRef","cloneElement"],"mappings":";;AAeA,SAASA,EAAUC,GAAqBC,GAAiB;AACvD,EAAI,OAAOD,KAAQ,aACjBA,EAAIC,CAAK,IACAD,KAAO,SACfA,EAA8B,UAAUC;AAE7C;AAGO,SAASC,KAAkBC,GAA6C;AAC7E,SAAO,CAACC,MAAS;AACf,eAAWJ,KAAOG;AAChB,MAAAJ,EAAOC,GAAKI,CAAI;AAAA,EAEpB;AACF;AAMO,SAASC,EAAcC,GAAiD;;AAE7E,QAAMC,KAAYC,IAAAF,EAAQ,UAAR,gBAAAE,EACd;AACJ,SAAID,MAAa,SACRA,IAEDD,EAAkD;AAC5D;AAIA,SAASG,EAAaC,GAAsB;;AAC1C,SACEA,EAAI,SAAS,KAAKA,EAAI,WAAW,IAAI,KAAKA,EAAI,CAAC,QAAMF,IAAAE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ACA,UAAAC,IAAW;AAAA,EACX,mBAAAC;AAAA,EACA,oBAAAC,IAAqB;AACvB,GAA8C;AAC5C,QAAMC,IAAO,QAAQ,IAAI,aAAa;AAEtC,MAAIC,IAAuB;AAC3B,MAAI;AACF,IAAAA,IAAYC,EAAS,KAAKR,CAAK;AAAA,EACjC,QAAQ;AACN,IAAAO,IAAY;AAAA,EACd;AAEA,MAAI,CAACE,EAAeF,CAAS;AAC3B,WAAID,KACF,QAAQ;AAAA,MACN;AAAA,IAAA,GAGG;AAGT,QAAMlB,IAAamB,EAAU;AAE7B,EACED,KACAD,KACAT,EAAsBR,EAAW,QAAQ,KAEzC,QAAQ;AAAA,IACN;AAAA,EAAA;AAKJ,QAAMD,IAAsB,EAAE,GAAGc,EAAA;AACjC,SAAOd,EAAU,MAEbgB,MACFhB,EAAU,eAAe,IAAI,IACzBiB,MACFjB,EAAU,YAAYQ;AAAA,IACpB,OAAOR,EAAU,aAAc,WAC3BA,EAAU,YACV;AAAA,IACJiB;AAAA,EAAA;AAKN,QAAMM,IAASxB,EAAeC,GAAWC,CAAU;AAEnD,EAAIe,MACFO,EAAO,UAAUZ,GACjBY,EAAO,aAAaZ;AAGtB,QAAMa,IAAW/B,EAAc2B,CAAS;AAExC,SAAOK,EAAaL,GAAW;AAAA,IAC7B,GAAGG;AAAA,IACH,KAAKjC,EAAYF,GAAKoC,CAAQ;AAAA,IAC9B,UAAUT;AAAA,EAAA,CACC;AACf;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");function n(e,u,c=!0){const s=r.useRef(e),t=r.useRef(u);r.useEffect(()=>{t.current=u}),r.useEffect(()=>{var f;s.current&&!e&&c&&((f=t.current)==null||f.call(t)),s.current=e},[e,c])}exports.useOnExited=n;
|
|
2
|
+
//# sourceMappingURL=useOnExited.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnExited.cjs","sources":["../../src/utils/useOnExited.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * Calls `onExited` once `mounted` flips from true to false. Not called if the\n * component unmounts during the exit. Pass `enabled={false}` to skip it (e.g. a\n * mount-controlled `Modal`). Internal: `hooks/` is a public subpath export.\n */\nexport function useOnExited(\n mounted: boolean,\n onExited: (() => void) | undefined,\n enabled = true,\n) {\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n // Declared before the exit effect so it commits the latest callback first.\n useEffect(() => {\n onExitedRef.current = onExited;\n });\n\n useEffect(() => {\n if (wasMounted.current && !mounted && enabled) onExitedRef.current?.();\n wasMounted.current = mounted;\n }, [mounted, enabled]);\n}\n"],"names":["useOnExited","mounted","onExited","enabled","wasMounted","useRef","onExitedRef","useEffect"],"mappings":"yGAOO,SAASA,EACdC,EACAC,EACAC,EAAU,GACV,CACA,MAAMC,EAAaC,EAAAA,OAAOJ,CAAO,EAC3BK,EAAcD,EAAAA,OAAOH,CAAQ,EAEnCK,EAAAA,UAAU,IAAM,CACdD,EAAY,QAAUJ,CACxB,CAAC,EAEDK,EAAAA,UAAU,IAAM,OACVH,EAAW,SAAW,CAACH,GAAWE,SAAqB,2BAC3DC,EAAW,QAAUH,CACvB,EAAG,CAACA,EAASE,CAAO,CAAC,CACvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls `onExited` once `mounted` flips from true to false. Not called if the
|
|
3
|
+
* component unmounts during the exit. Pass `enabled={false}` to skip it (e.g. a
|
|
4
|
+
* mount-controlled `Modal`). Internal: `hooks/` is a public subpath export.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOnExited(mounted: boolean, onExited: (() => void) | undefined, enabled?: boolean): void;
|
|
7
|
+
//# sourceMappingURL=useOnExited.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnExited.d.ts","sourceRoot":"","sources":["../../src/utils/useOnExited.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EAClC,OAAO,UAAO,QAaf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRef as f, useEffect as n } from "react";
|
|
2
|
+
function o(r, t, u = !0) {
|
|
3
|
+
const s = f(r), c = f(t);
|
|
4
|
+
n(() => {
|
|
5
|
+
c.current = t;
|
|
6
|
+
}), n(() => {
|
|
7
|
+
var e;
|
|
8
|
+
s.current && !r && u && ((e = c.current) == null || e.call(c)), s.current = r;
|
|
9
|
+
}, [r, u]);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as useOnExited
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useOnExited.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnExited.js","sources":["../../src/utils/useOnExited.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * Calls `onExited` once `mounted` flips from true to false. Not called if the\n * component unmounts during the exit. Pass `enabled={false}` to skip it (e.g. a\n * mount-controlled `Modal`). Internal: `hooks/` is a public subpath export.\n */\nexport function useOnExited(\n mounted: boolean,\n onExited: (() => void) | undefined,\n enabled = true,\n) {\n const wasMounted = useRef(mounted);\n const onExitedRef = useRef(onExited);\n // Declared before the exit effect so it commits the latest callback first.\n useEffect(() => {\n onExitedRef.current = onExited;\n });\n\n useEffect(() => {\n if (wasMounted.current && !mounted && enabled) onExitedRef.current?.();\n wasMounted.current = mounted;\n }, [mounted, enabled]);\n}\n"],"names":["useOnExited","mounted","onExited","enabled","wasMounted","useRef","onExitedRef","useEffect"],"mappings":";AAOO,SAASA,EACdC,GACAC,GACAC,IAAU,IACV;AACA,QAAMC,IAAaC,EAAOJ,CAAO,GAC3BK,IAAcD,EAAOH,CAAQ;AAEnC,EAAAK,EAAU,MAAM;AACd,IAAAD,EAAY,UAAUJ;AAAA,EACxB,CAAC,GAEDK,EAAU,MAAM;;AACd,IAAIH,EAAW,WAAW,CAACH,KAAWE,aAAqB,gCAC3DC,EAAW,UAAUH;AAAA,EACvB,GAAG,CAACA,GAASE,CAAO,CAAC;AACvB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattermost/compass-ui",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.22",
|
|
4
4
|
"description": "Compass design system UI components for Mattermost products",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"@storybook/react": "^8.6.14",
|
|
77
77
|
"@storybook/react-vite": "^8.6.14",
|
|
78
78
|
"@storybook/test": "^8.6.14",
|
|
79
|
+
"@testing-library/user-event": "^14.5.2",
|
|
79
80
|
"@types/react": "^19.0.0",
|
|
80
81
|
"@types/react-dom": "^19.0.0",
|
|
81
82
|
"@vitejs/plugin-react": "^4.3.4",
|
|
@@ -107,9 +108,6 @@
|
|
|
107
108
|
"utils/string": [
|
|
108
109
|
"./dist/utils/string.d.ts"
|
|
109
110
|
],
|
|
110
|
-
"components/action-button": [
|
|
111
|
-
"./dist/components/action-button/index.d.ts"
|
|
112
|
-
],
|
|
113
111
|
"components/admin-console-footer": [
|
|
114
112
|
"./dist/components/admin-console-footer/index.d.ts"
|
|
115
113
|
],
|
|
@@ -314,6 +312,9 @@
|
|
|
314
312
|
"components/thread-list-item": [
|
|
315
313
|
"./dist/components/thread-list-item/index.d.ts"
|
|
316
314
|
],
|
|
315
|
+
"components/tile-button": [
|
|
316
|
+
"./dist/components/tile-button/index.d.ts"
|
|
317
|
+
],
|
|
317
318
|
"components/toast": [
|
|
318
319
|
"./dist/components/toast/index.d.ts"
|
|
319
320
|
],
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("react"),s=require("../icon/Icon.cjs"),A=require("../../utils/slot.cjs"),t=require("./ActionButton.module.scss.cjs"),i=q.forwardRef(function(a,o){if(a.asChild){const{icon:m,label:v,destructive:j=!1,className:C,disabled:x,children:N,asChild:S,..._}=a,p=[t.default["action-button"],j?t.default["action-button--destructive"]:"",C??""].filter(Boolean).join(" "),B=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.default["action-button__icon"],"aria-hidden":!0,children:e.jsx(s.IconSlotContext.Provider,{value:{size:"20"},children:m})}),e.jsx("span",{className:t.default["action-button__label"],children:v})]});return A.renderAsChild({child:N,props:{..._,className:p},ref:o,content:B,disabled:!!x,disabledClassName:t.default["action-button--disabled"],warnOnChildContent:!0})}const{icon:l,label:c,active:n,destructive:d=!1,className:r,disabled:u,type:b="button",asChild:P,...f}=a,h=[t.default["action-button"],n?t.default["action-button--active"]:"",d?t.default["action-button--destructive"]:"",r??""].filter(Boolean).join(" ");return e.jsxs("button",{ref:o,className:h,type:b,disabled:u,"aria-pressed":n===void 0?void 0:n,...f,children:[e.jsx("span",{className:t.default["action-button__icon"],"aria-hidden":!0,children:e.jsx(s.IconSlotContext.Provider,{value:{size:"20"},children:l})}),e.jsx("span",{className:t.default["action-button__label"],children:c})]})});i.displayName="ActionButton";exports.default=i;
|
|
2
|
-
//# sourceMappingURL=ActionButton.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.cjs","sources":["../../../src/components/action-button/ActionButton.tsx"],"sourcesContent":["import {\n forwardRef,\n type ButtonHTMLAttributes,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefAttributes,\n} from 'react';\nimport { IconSlotContext } from '@/components/icon/Icon';\nimport { renderAsChild } from '@/utils/slot';\nimport styles from './ActionButton.module.scss';\n\ninterface ActionButtonOwnProps {\n /** Pass `<Icon glyph={<SomeIcon />} />` — ActionButton provides the correct size (20) via context. */\n icon: ReactNode;\n /** Visible label. Accepts translated nodes (e.g. `<FormattedMessage/>`). */\n label: ReactNode;\n destructive?: boolean;\n className?: string;\n /**\n * When true, disables the control. On a native `<button>`, sets the `disabled`\n * attribute. With `asChild`, sets `aria-disabled`, applies disabled styles, and\n * blocks click / middle-click navigation (the link stays focusable).\n */\n disabled?: boolean;\n}\n\nexport interface ActionButtonProps\n extends ActionButtonOwnProps, ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * When true, merges ActionButton props onto the single child element instead of\n * rendering a `<button>`. Use with `<a>` or a router `Link`. Default: false.\n */\n asChild?: false;\n /**\n * When set, this is a toggle; maps to `aria-pressed`. Only applies to the native\n * `<button>`; not available with `asChild`.\n */\n active?: boolean;\n}\n\nexport interface ActionButtonAsChildProps\n extends\n ActionButtonOwnProps,\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'color'> {\n /**\n * Merges ActionButton props onto the single child element instead of rendering a\n * `<button>`. The child's own props (`href`, `to`, `target`, …) stay on the\n * child. Do not pass `type` or `active` — they are not available on links.\n * Pass an empty child; ActionButton supplies the icon and label anatomy.\n */\n asChild: true;\n /** Single empty element to render as the ActionButton (e.g. `<a href=\"…\" />`). */\n children: ReactElement;\n}\n\ntype ActionButtonComponent = {\n (\n props: ActionButtonAsChildProps & RefAttributes<HTMLElement>,\n ): ReactElement | null;\n (\n props: ActionButtonProps & RefAttributes<HTMLButtonElement>,\n ): ReactElement | null;\n displayName?: string;\n};\n\n/**\n * Action Buttons surface a small set of high-frequency actions in a fixed context — a\n * profile popover, a channel info panel, a card. They sit close to the content they act on\n * and read as a row of equal-weight choices.\n *\n * Pass `asChild` with a single empty `<a>` or router `Link` child to render a navigational\n * action with Action Button styling (no nested `<button>`).\n */\nconst ActionButton = forwardRef(function ActionButton(\n props: ActionButtonProps | ActionButtonAsChildProps,\n ref: Ref<HTMLButtonElement | HTMLElement>,\n) {\n if (props.asChild) {\n const {\n icon,\n label,\n destructive = false,\n className,\n disabled,\n children,\n asChild,\n ...rest\n } = props;\n void asChild;\n\n const rootClass = [\n styles['action-button'],\n destructive ? styles['action-button--destructive'] : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const anatomy = (\n <>\n <span className={styles['action-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['action-button__label']}>{label}</span>\n </>\n );\n\n return renderAsChild({\n child: children,\n props: {\n ...rest,\n className: rootClass,\n },\n ref,\n content: anatomy,\n disabled: Boolean(disabled),\n disabledClassName: styles['action-button--disabled'],\n warnOnChildContent: true,\n });\n }\n\n const {\n icon,\n label,\n active,\n destructive = false,\n className,\n disabled,\n type = 'button',\n asChild,\n ...htmlProps\n } = props;\n void asChild;\n\n const rootClass = [\n styles['action-button'],\n active ? styles['action-button--active'] : '',\n destructive ? styles['action-button--destructive'] : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n ref={ref as Ref<HTMLButtonElement>}\n className={rootClass}\n type={type}\n disabled={disabled}\n aria-pressed={active === undefined ? undefined : active}\n {...htmlProps}\n >\n <span className={styles['action-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['action-button__label']}>{label}</span>\n </button>\n );\n}) as ActionButtonComponent;\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"names":["ActionButton","forwardRef","props","ref","icon","label","destructive","className","disabled","children","asChild","rest","rootClass","styles","anatomy","jsxs","Fragment","jsx","IconSlotContext","renderAsChild","active","type","htmlProps"],"mappings":"gRA2EMA,EAAeC,EAAAA,WAAW,SAC9BC,EACAC,EACA,CACA,GAAID,EAAM,QAAS,CACjB,KAAM,CACJ,KAAAE,EACA,MAAAC,EACA,YAAAC,EAAc,GACd,UAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAGC,CAAA,EACDT,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