@mattermost/compass-ui 0.1.0-alpha.20 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/combobox/Combobox.cjs +1 -1
- package/dist/components/combobox/Combobox.cjs.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +12 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.js +226 -214
- package/dist/components/combobox/Combobox.js.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/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/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/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/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -24
- 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/package.json +4 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
._team-
|
|
1
|
+
._team-avatar_1cnye_2{position:relative;display:inline-flex;flex-shrink:0;cursor:pointer;outline-style:solid;outline-offset:0;outline-color:transparent;transition:outline-color var(--duration-quick) var(--ease-transition)}._team-avatar__inner_1cnye_12{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;overflow:hidden}._team-avatar__inner_1cnye_12:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box;border-radius:inherit;border-style:solid;border-color:var(--sidebar-header-bg, #192a4d);border-width:0;pointer-events:none;z-index:1;transition:border-width var(--duration-quick) var(--ease-transition)}._team-avatar__image_1cnye_31{display:block;width:100%;height:100%;object-fit:cover}._team-avatar__fallback_1cnye_37{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:rgba(var(--sidebar-text-rgb),.16);color:var(--sidebar-text, white);font-family:Metropolis,sans-serif;font-weight:var(--font-weight-semibold);line-height:1;-webkit-user-select:none;user-select:none}._team-avatar__badge_1cnye_50{position:absolute;top:-4px;right:-4px;z-index:2;box-shadow:0 0 0 2px var(--sidebar-header-bg, #192a4d)}._team-avatar--size-24_1cnye_57{width:24px;height:24px;border-radius:4px;outline-width:2px}._team-avatar--size-24_1cnye_57 ._team-avatar__inner_1cnye_12{border-radius:4px}._team-avatar--size-24_1cnye_57 ._team-avatar__fallback_1cnye_37{font-size:11.2px}._team-avatar--size-24_1cnye_57:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-24_1cnye_57._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:2px}._team-avatar--size-24_1cnye_57:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-24_1cnye_57._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-28_1cnye_78{width:28px;height:28px;border-radius:4px;outline-width:2px}._team-avatar--size-28_1cnye_78 ._team-avatar__inner_1cnye_12{border-radius:4px}._team-avatar--size-28_1cnye_78 ._team-avatar__fallback_1cnye_37{font-size:13.07px}._team-avatar--size-28_1cnye_78:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-28_1cnye_78._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:2px}._team-avatar--size-28_1cnye_78:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-28_1cnye_78._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-32_1cnye_99{width:32px;height:32px;border-radius:6px;outline-width:3px}._team-avatar--size-32_1cnye_99 ._team-avatar__inner_1cnye_12{border-radius:6px}._team-avatar--size-32_1cnye_99 ._team-avatar__fallback_1cnye_37{font-size:14.93px}._team-avatar--size-32_1cnye_99:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-32_1cnye_99._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-32_1cnye_99:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-32_1cnye_99._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-40_1cnye_120{width:40px;height:40px;border-radius:8px;outline-width:3px}._team-avatar--size-40_1cnye_120 ._team-avatar__inner_1cnye_12{border-radius:8px}._team-avatar--size-40_1cnye_120 ._team-avatar__fallback_1cnye_37{font-size:18.67px}._team-avatar--size-40_1cnye_120:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-40_1cnye_120._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-40_1cnye_120:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-40_1cnye_120._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-48_1cnye_141{width:48px;height:48px;border-radius:9px;outline-width:3px}._team-avatar--size-48_1cnye_141 ._team-avatar__inner_1cnye_12{border-radius:9px}._team-avatar--size-48_1cnye_141 ._team-avatar__fallback_1cnye_37{font-size:22.4px}._team-avatar--size-48_1cnye_141:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-48_1cnye_141._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-48_1cnye_141:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-48_1cnye_141._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-56_1cnye_162{width:56px;height:56px;border-radius:10px;outline-width:3px}._team-avatar--size-56_1cnye_162 ._team-avatar__inner_1cnye_12{border-radius:10px}._team-avatar--size-56_1cnye_162 ._team-avatar__fallback_1cnye_37{font-size:26.13px}._team-avatar--size-56_1cnye_162:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-56_1cnye_162._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-56_1cnye_162:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-56_1cnye_162._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-64_1cnye_183{width:64px;height:64px;border-radius:11px;outline-width:3px}._team-avatar--size-64_1cnye_183 ._team-avatar__inner_1cnye_12{border-radius:11px}._team-avatar--size-64_1cnye_183 ._team-avatar__fallback_1cnye_37{font-size:29.87px}._team-avatar--size-64_1cnye_183:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-64_1cnye_183._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-64_1cnye_183:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-64_1cnye_183._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-72_1cnye_204{width:72px;height:72px;border-radius:12px;outline-width:3px}._team-avatar--size-72_1cnye_204 ._team-avatar__inner_1cnye_12{border-radius:12px}._team-avatar--size-72_1cnye_204 ._team-avatar__fallback_1cnye_37{font-size:33.6px}._team-avatar--size-72_1cnye_204:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-72_1cnye_204._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-72_1cnye_204:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-72_1cnye_204._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-96_1cnye_225{width:96px;height:96px;border-radius:18px;outline-width:3px}._team-avatar--size-96_1cnye_225 ._team-avatar__inner_1cnye_12{border-radius:20px}._team-avatar--size-96_1cnye_225 ._team-avatar__fallback_1cnye_37{font-size:44.8px}._team-avatar--size-96_1cnye_225:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-96_1cnye_225._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-96_1cnye_225:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-96_1cnye_225._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--size-120_1cnye_246{width:120px;height:120px;border-radius:24px;outline-width:3px}._team-avatar--size-120_1cnye_246 ._team-avatar__inner_1cnye_12{border-radius:24px}._team-avatar--size-120_1cnye_246 ._team-avatar__fallback_1cnye_37{font-size:56px}._team-avatar--size-120_1cnye_246:hover ._team-avatar__inner_1cnye_12:after,._team-avatar--size-120_1cnye_246._team-avatar--active_1cnye_69 ._team-avatar__inner_1cnye_12:after{border-width:3px}._team-avatar--size-120_1cnye_246:hover{outline-color:rgba(var(--sidebar-text-rgb),.16)}._team-avatar--size-120_1cnye_246._team-avatar--active_1cnye_69{outline-color:var(--sidebar-text-active-border, #5d89ea)}._team-avatar--menu_1cnye_267{cursor:default}._team-avatar--menu_1cnye_267:hover{outline-color:transparent}._team-avatar--menu_1cnye_267:hover ._team-avatar__inner_1cnye_12:after{border-width:0}._team-avatar--menu_1cnye_267 ._team-avatar__fallback_1cnye_37{background:rgba(var(--center-channel-color-rgb),.08);color:rgba(var(--center-channel-color-rgb),.72)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type TeamAvatarSize = '24' | '28' | '32' | '40' | '48' | '56' | '64' | '72' | '96' | '120';
|
|
2
2
|
export type TeamAvatarState = 'default' | 'active';
|
|
3
|
+
export type TeamAvatarVariant = 'sidebar' | 'menu';
|
|
3
4
|
export interface TeamAvatarProps {
|
|
4
5
|
alt?: string;
|
|
5
6
|
badge?: number;
|
|
@@ -8,10 +9,16 @@ export interface TeamAvatarProps {
|
|
|
8
9
|
size?: TeamAvatarSize;
|
|
9
10
|
src?: string;
|
|
10
11
|
state?: TeamAvatarState;
|
|
12
|
+
/**
|
|
13
|
+
* `sidebar` (default) is interactive and uses sidebar colors. `menu` is decorative and uses
|
|
14
|
+
* center-channel colors — for menu rows and other surfaces on `center-channel-bg`. It has no
|
|
15
|
+
* hover or pointer affordance, is hidden from assistive tech, and ignores `state` and `badge`.
|
|
16
|
+
*/
|
|
17
|
+
variant?: TeamAvatarVariant;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* Team Avatars identify a Team in Mattermost. Their rounded-square shape sets them apart
|
|
14
21
|
* from circular User Avatars at a glance — same scanning rhythm, different kind of subject.
|
|
15
22
|
*/
|
|
16
|
-
export default function TeamAvatar({ alt, badge, className, initials, size, src, state, }: TeamAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default function TeamAvatar({ alt, badge, className, initials, size, src, state, variant, }: TeamAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
17
24
|
//# sourceMappingURL=TeamAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC;AACV,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TeamAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC;AACV,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,GAAQ,EACR,KAAK,EACL,SAAc,EACd,QAAe,EACf,IAAW,EACX,GAAG,EACH,KAAiB,EACjB,OAAmB,GACpB,EAAE,eAAe,2CAwCjB"}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as _, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import h from "../mention-badge/MentionBadge.js";
|
|
3
3
|
import a from "./TeamAvatar.module.scss.js";
|
|
4
|
-
function
|
|
5
|
-
alt:
|
|
6
|
-
badge:
|
|
7
|
-
className:
|
|
8
|
-
initials:
|
|
9
|
-
size:
|
|
10
|
-
src:
|
|
11
|
-
state:
|
|
4
|
+
function j({
|
|
5
|
+
alt: m = "",
|
|
6
|
+
badge: s,
|
|
7
|
+
className: c = "",
|
|
8
|
+
initials: r = "Ac",
|
|
9
|
+
size: i = "40",
|
|
10
|
+
src: n,
|
|
11
|
+
state: l = "default",
|
|
12
|
+
variant: v = "sidebar"
|
|
12
13
|
}) {
|
|
13
|
-
const
|
|
14
|
+
const d = parseInt(i, 10), e = v === "menu", o = l === "active" && !e, u = s != null && s > 0 && d <= 64 && !o && !e, f = [
|
|
14
15
|
a["team-avatar"],
|
|
15
|
-
a[`team-avatar--size-${
|
|
16
|
+
a[`team-avatar--size-${i}`],
|
|
16
17
|
o && a["team-avatar--active"],
|
|
17
|
-
|
|
18
|
+
e && a["team-avatar--menu"],
|
|
19
|
+
c
|
|
18
20
|
].filter(Boolean).join(" ");
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ _("div", { className: f, "aria-hidden": e || void 0, children: [
|
|
22
|
+
/* @__PURE__ */ t("div", { className: a["team-avatar__inner"], children: n ? /* @__PURE__ */ t("img", { src: n, alt: m, className: a["team-avatar__image"] }) : /* @__PURE__ */ t(
|
|
21
23
|
"div",
|
|
22
24
|
{
|
|
23
25
|
className: a["team-avatar__fallback"],
|
|
24
|
-
"aria-label":
|
|
25
|
-
children:
|
|
26
|
+
"aria-label": m || r,
|
|
27
|
+
children: r
|
|
26
28
|
}
|
|
27
29
|
) }),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
u && /* @__PURE__ */ t(
|
|
31
|
+
h,
|
|
30
32
|
{
|
|
31
|
-
count:
|
|
33
|
+
count: s,
|
|
32
34
|
size: "medium",
|
|
33
35
|
className: a["team-avatar__badge"]
|
|
34
36
|
}
|
|
@@ -36,6 +38,6 @@ function h({
|
|
|
36
38
|
] });
|
|
37
39
|
}
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
j as default
|
|
40
42
|
};
|
|
41
43
|
//# sourceMappingURL=TeamAvatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamAvatar.js","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"sourcesContent":["import MentionBadge from '../mention-badge/MentionBadge';\nimport styles from './TeamAvatar.module.scss';\n\nexport type TeamAvatarSize =\n | '24'\n | '28'\n | '32'\n | '40'\n | '48'\n | '56'\n | '64'\n | '72'\n | '96'\n | '120';\nexport type TeamAvatarState = 'default' | 'active';\n\nexport interface TeamAvatarProps {\n alt?: string;\n badge?: number;\n className?: string;\n initials?: string;\n size?: TeamAvatarSize;\n src?: string;\n state?: TeamAvatarState;\n}\n\n/**\n * Team Avatars identify a Team in Mattermost. Their rounded-square shape sets them apart\n * from circular User Avatars at a glance — same scanning rhythm, different kind of subject.\n */\nexport default function TeamAvatar({\n alt = '',\n badge,\n className = '',\n initials = 'Ac',\n size = '40',\n src,\n state = 'default',\n}: TeamAvatarProps) {\n const numSize = parseInt(size, 10);\n const isActive = state === 'active';\n const showBadge
|
|
1
|
+
{"version":3,"file":"TeamAvatar.js","sources":["../../../src/components/team-avatar/TeamAvatar.tsx"],"sourcesContent":["import MentionBadge from '../mention-badge/MentionBadge';\nimport styles from './TeamAvatar.module.scss';\n\nexport type TeamAvatarSize =\n | '24'\n | '28'\n | '32'\n | '40'\n | '48'\n | '56'\n | '64'\n | '72'\n | '96'\n | '120';\nexport type TeamAvatarState = 'default' | 'active';\nexport type TeamAvatarVariant = 'sidebar' | 'menu';\n\nexport interface TeamAvatarProps {\n alt?: string;\n badge?: number;\n className?: string;\n initials?: string;\n size?: TeamAvatarSize;\n src?: string;\n state?: TeamAvatarState;\n /**\n * `sidebar` (default) is interactive and uses sidebar colors. `menu` is decorative and uses\n * center-channel colors — for menu rows and other surfaces on `center-channel-bg`. It has no\n * hover or pointer affordance, is hidden from assistive tech, and ignores `state` and `badge`.\n */\n variant?: TeamAvatarVariant;\n}\n\n/**\n * Team Avatars identify a Team in Mattermost. Their rounded-square shape sets them apart\n * from circular User Avatars at a glance — same scanning rhythm, different kind of subject.\n */\nexport default function TeamAvatar({\n alt = '',\n badge,\n className = '',\n initials = 'Ac',\n size = '40',\n src,\n state = 'default',\n variant = 'sidebar',\n}: TeamAvatarProps) {\n const numSize = parseInt(size, 10);\n const isMenu = variant === 'menu';\n const isActive = state === 'active' && !isMenu;\n const showBadge =\n badge != null && badge > 0 && numSize <= 64 && !isActive && !isMenu;\n\n const rootClasses = [\n styles['team-avatar'],\n styles[`team-avatar--size-${size}`],\n isActive && styles['team-avatar--active'],\n isMenu && styles['team-avatar--menu'],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={rootClasses} aria-hidden={isMenu || undefined}>\n <div className={styles['team-avatar__inner']}>\n {src ? (\n <img src={src} alt={alt} className={styles['team-avatar__image']} />\n ) : (\n <div\n className={styles['team-avatar__fallback']}\n aria-label={alt || initials}\n >\n {initials}\n </div>\n )}\n </div>\n {showBadge && (\n <MentionBadge\n count={badge!}\n size=\"medium\"\n className={styles['team-avatar__badge']}\n />\n )}\n </div>\n );\n}\n"],"names":["TeamAvatar","alt","badge","className","initials","size","src","state","variant","numSize","isMenu","isActive","showBadge","rootClasses","styles","jsx","MentionBadge"],"mappings":";;;AAqCA,SAAwBA,EAAW;AAAA,EACjC,KAAAC,IAAM;AAAA,EACN,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,KAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,SAAAC,IAAU;AACZ,GAAoB;AAClB,QAAMC,IAAU,SAASJ,GAAM,EAAE,GAC3BK,IAASF,MAAY,QACrBG,IAAWJ,MAAU,YAAY,CAACG,GAClCE,IACJV,KAAS,QAAQA,IAAQ,KAAKO,KAAW,MAAM,CAACE,KAAY,CAACD,GAEzDG,IAAc;AAAA,IAClBC,EAAO,aAAa;AAAA,IACpBA,EAAO,qBAAqBT,CAAI,EAAE;AAAA,IAClCM,KAAYG,EAAO,qBAAqB;AAAA,IACxCJ,KAAUI,EAAO,mBAAmB;AAAA,IACpCX;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,OAAA,EAAI,WAAWU,GAAa,eAAaH,KAAU,QAClD,UAAA;AAAA,IAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWD,EAAO,oBAAoB,GACxC,UAAAR,IACC,gBAAAS,EAAC,OAAA,EAAI,KAAAT,GAAU,KAAAL,GAAU,WAAWa,EAAO,oBAAoB,GAAG,IAElE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD,EAAO,uBAAuB;AAAA,QACzC,cAAYb,KAAOG;AAAA,QAElB,UAAAA;AAAA,MAAA;AAAA,IAAA,GAGP;AAAA,IACCQ,KACC,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOd;AAAA,QACP,MAAK;AAAA,QACL,WAAWY,EAAO,oBAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./TeamAvatar.css');const a={"team-avatar":"_team-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./TeamAvatar.css');const a={"team-avatar":"_team-avatar_1cnye_2","team-avatar__inner":"_team-avatar__inner_1cnye_12","team-avatar__image":"_team-avatar__image_1cnye_31","team-avatar__fallback":"_team-avatar__fallback_1cnye_37","team-avatar__badge":"_team-avatar__badge_1cnye_50","team-avatar--size-24":"_team-avatar--size-24_1cnye_57","team-avatar--active":"_team-avatar--active_1cnye_69","team-avatar--size-28":"_team-avatar--size-28_1cnye_78","team-avatar--size-32":"_team-avatar--size-32_1cnye_99","team-avatar--size-40":"_team-avatar--size-40_1cnye_120","team-avatar--size-48":"_team-avatar--size-48_1cnye_141","team-avatar--size-56":"_team-avatar--size-56_1cnye_162","team-avatar--size-64":"_team-avatar--size-64_1cnye_183","team-avatar--size-72":"_team-avatar--size-72_1cnye_204","team-avatar--size-96":"_team-avatar--size-96_1cnye_225","team-avatar--size-120":"_team-avatar--size-120_1cnye_246","team-avatar--menu":"_team-avatar--menu_1cnye_267"};exports.default=a;
|
|
2
2
|
//# sourceMappingURL=TeamAvatar.module.scss.cjs.map
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import './TeamAvatar.css';const a = {
|
|
2
|
-
"team-avatar": "_team-
|
|
3
|
-
"team-avatar__inner": "_team-
|
|
4
|
-
"team-avatar__image": "_team-
|
|
5
|
-
"team-avatar__fallback": "_team-
|
|
6
|
-
"team-avatar__badge": "_team-
|
|
7
|
-
"team-avatar--size-24": "_team-avatar--size-
|
|
8
|
-
"team-avatar--active": "_team-avatar--
|
|
9
|
-
"team-avatar--size-28": "_team-avatar--size-
|
|
10
|
-
"team-avatar--size-32": "_team-avatar--size-
|
|
11
|
-
"team-avatar--size-40": "_team-avatar--size-
|
|
12
|
-
"team-avatar--size-48": "_team-avatar--size-
|
|
13
|
-
"team-avatar--size-56": "_team-avatar--size-
|
|
14
|
-
"team-avatar--size-64": "_team-avatar--size-
|
|
15
|
-
"team-avatar--size-72": "_team-avatar--size-
|
|
16
|
-
"team-avatar--size-96": "_team-avatar--size-
|
|
17
|
-
"team-avatar--size-120": "_team-avatar--size-
|
|
2
|
+
"team-avatar": "_team-avatar_1cnye_2",
|
|
3
|
+
"team-avatar__inner": "_team-avatar__inner_1cnye_12",
|
|
4
|
+
"team-avatar__image": "_team-avatar__image_1cnye_31",
|
|
5
|
+
"team-avatar__fallback": "_team-avatar__fallback_1cnye_37",
|
|
6
|
+
"team-avatar__badge": "_team-avatar__badge_1cnye_50",
|
|
7
|
+
"team-avatar--size-24": "_team-avatar--size-24_1cnye_57",
|
|
8
|
+
"team-avatar--active": "_team-avatar--active_1cnye_69",
|
|
9
|
+
"team-avatar--size-28": "_team-avatar--size-28_1cnye_78",
|
|
10
|
+
"team-avatar--size-32": "_team-avatar--size-32_1cnye_99",
|
|
11
|
+
"team-avatar--size-40": "_team-avatar--size-40_1cnye_120",
|
|
12
|
+
"team-avatar--size-48": "_team-avatar--size-48_1cnye_141",
|
|
13
|
+
"team-avatar--size-56": "_team-avatar--size-56_1cnye_162",
|
|
14
|
+
"team-avatar--size-64": "_team-avatar--size-64_1cnye_183",
|
|
15
|
+
"team-avatar--size-72": "_team-avatar--size-72_1cnye_204",
|
|
16
|
+
"team-avatar--size-96": "_team-avatar--size-96_1cnye_225",
|
|
17
|
+
"team-avatar--size-120": "_team-avatar--size-120_1cnye_246",
|
|
18
|
+
"team-avatar--menu": "_team-avatar--menu_1cnye_267"
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
21
|
a as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamAvatar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TeamAvatar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/team-avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/team-avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),B=require("react"),i=require("../icon/Icon.cjs"),q=require("../../utils/slot.cjs"),e=require("./TileButton.module.scss.cjs"),n=B.forwardRef(function(l,a){if(l.asChild){const{icon:m,label:v,destructive:j=!1,className:C,disabled:x,children:N,asChild:P,..._}=l,g=[e.default["tile-button"],j?e.default["tile-button--destructive"]:"",C??""].filter(Boolean).join(" "),p=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:e.default["tile-button__icon"],"aria-hidden":!0,children:t.jsx(i.IconSlotContext.Provider,{value:{size:"20"},children:m})}),t.jsx("span",{className:e.default["tile-button__label"],children:v})]});return q.renderAsChild({child:N,props:{..._,className:g},ref:a,content:p,disabled:!!x,disabledClassName:e.default["tile-button--disabled"],warnOnChildContent:!0})}const{icon:o,label:d,toggled:s,destructive:r=!1,className:u,disabled:c,type:b="button",asChild:y,...f}=l,h=[e.default["tile-button"],s?e.default["tile-button--toggled"]:"",r?e.default["tile-button--destructive"]:"",u??""].filter(Boolean).join(" ");return t.jsxs("button",{ref:a,className:h,type:b,disabled:c,"aria-pressed":s===void 0?void 0:s,...f,children:[t.jsx("span",{className:e.default["tile-button__icon"],"aria-hidden":!0,children:t.jsx(i.IconSlotContext.Provider,{value:{size:"20"},children:o})}),t.jsx("span",{className:e.default["tile-button__label"],children:d})]})});n.displayName="TileButton";exports.default=n;
|
|
2
|
+
//# sourceMappingURL=TileButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileButton.cjs","sources":["../../../src/components/tile-button/TileButton.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 './TileButton.module.scss';\n\ninterface TileButtonOwnProps {\n /** Pass `<Icon glyph={<SomeIcon />} />` — TileButton 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 TileButtonProps\n extends TileButtonOwnProps, ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * When true, merges TileButton 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 toggled?: boolean;\n}\n\nexport interface TileButtonAsChildProps\n extends\n TileButtonOwnProps,\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'color'> {\n /**\n * Merges TileButton 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 `toggled` — they are not available on links.\n * Pass an empty child; TileButton supplies the icon and label anatomy.\n */\n asChild: true;\n /** Single empty element to render as the TileButton (e.g. `<a href=\"…\" />`). */\n children: ReactElement;\n}\n\ntype TileButtonComponent = {\n (\n props: TileButtonAsChildProps & RefAttributes<HTMLElement>,\n ): ReactElement | null;\n (\n props: TileButtonProps & RefAttributes<HTMLButtonElement>,\n ): ReactElement | null;\n displayName?: string;\n};\n\n/**\n * Tile 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 Tile Button styling (no nested `<button>`).\n */\nconst TileButton = forwardRef(function TileButton(\n props: TileButtonProps | TileButtonAsChildProps,\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['tile-button'],\n destructive ? styles['tile-button--destructive'] : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const anatomy = (\n <>\n <span className={styles['tile-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['tile-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['tile-button--disabled'],\n warnOnChildContent: true,\n });\n }\n\n const {\n icon,\n label,\n toggled,\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['tile-button'],\n toggled ? styles['tile-button--toggled'] : '',\n destructive ? styles['tile-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={toggled === undefined ? undefined : toggled}\n {...htmlProps}\n >\n <span className={styles['tile-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['tile-button__label']}>{label}</span>\n </button>\n );\n}) as TileButtonComponent;\n\nTileButton.displayName = 'TileButton';\n\nexport default TileButton;\n"],"names":["TileButton","forwardRef","props","ref","icon","label","destructive","className","disabled","children","asChild","rest","rootClass","styles","anatomy","jsxs","Fragment","jsx","IconSlotContext","renderAsChild","toggled","type","htmlProps"],"mappings":"8QA2EMA,EAAaC,EAAAA,WAAW,SAC5BC,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,EAGEU,EAAY,CAChBC,EAAAA,QAAO,aAAa,EACpBP,EAAcO,EAAAA,QAAO,0BAA0B,EAAI,GACnDN,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAELO,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAC,MAAC,QAAK,UAAWJ,EAAAA,QAAO,mBAAmB,EAAG,cAAW,GACvD,SAAAI,EAAAA,IAACC,EAAAA,gBAAgB,SAAhB,CAAyB,MAAO,CAAE,KAAM,MACtC,SAAAd,EACH,EACF,QACC,OAAA,CAAK,UAAWS,EAAAA,QAAO,oBAAoB,EAAI,SAAAR,CAAAA,CAAM,CAAA,EACxD,EAGF,OAAOc,gBAAc,CACnB,MAAOV,EACP,MAAO,CACL,GAAGE,EACH,UAAWC,CAAA,EAEb,IAAAT,EACA,QAASW,EACT,SAAU,EAAQN,EAClB,kBAAmBK,EAAAA,QAAO,uBAAuB,EACjD,mBAAoB,EAAA,CACrB,CACH,CAEA,KAAM,CACJ,KAAAT,EACA,MAAAC,EACA,QAAAe,EACA,YAAAd,EAAc,GACd,UAAAC,EACA,SAAAC,EACA,KAAAa,EAAO,SACP,QAAAX,EACA,GAAGY,CAAA,EACDpB,EAGEU,EAAY,CAChBC,EAAAA,QAAO,aAAa,EACpBO,EAAUP,EAAAA,QAAO,sBAAsB,EAAI,GAC3CP,EAAcO,EAAAA,QAAO,0BAA0B,EAAI,GACnDN,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEQ,EAAAA,KAAC,SAAA,CACC,IAAAZ,EACA,UAAWS,EACX,KAAAS,EACA,SAAAb,EACA,eAAcY,IAAY,OAAY,OAAYA,EACjD,GAAGE,EAEJ,SAAA,CAAAL,MAAC,QAAK,UAAWJ,EAAAA,QAAO,mBAAmB,EAAG,cAAW,GACvD,SAAAI,EAAAA,IAACC,EAAAA,gBAAgB,SAAhB,CAAyB,MAAO,CAAE,KAAM,IAAA,EACtC,WACH,EACF,QACC,OAAA,CAAK,UAAWL,EAAAA,QAAO,oBAAoB,EAAI,SAAAR,CAAA,CAAM,CAAA,CAAA,CAAA,CAG5D,CAAC,EAEDL,EAAW,YAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tile-button_w3stn_2{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xxxs);width:108px;min-width:64px;max-width:100%;padding:var(--spacing-m) 0 var(--spacing-s);border:none;border-radius:var(--radius-s);background-color:rgba(var(--center-channel-color-rgb),.04);--tile-button-fg: rgba(var(--center-channel-color-rgb), .72);--tile-button-icon-fg: rgba(var(--center-channel-color-rgb), .64);color:var(--tile-button-fg);cursor:pointer;text-decoration:none;transition:background-color var(--duration-quick) var(--ease-transition),color var(--duration-quick) var(--ease-transition),outline-color var(--duration-quick) var(--ease-transition),outline-offset var(--duration-quick) var(--ease-transition);outline:2px solid color-mix(in srgb,var(--focus-ring-color) 0%,transparent);outline-offset:0}._tile-button_w3stn_2:any-link,._tile-button_w3stn_2:hover,._tile-button_w3stn_2:focus,._tile-button_w3stn_2:active,._tile-button_w3stn_2:visited{color:var(--tile-button-fg);text-decoration:none}._tile-button_w3stn_2:focus-visible{outline-color:var(--focus-ring-color);outline-offset:3px}._tile-button_w3stn_2:hover:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--center-channel-color-rgb),.08);--tile-button-fg: rgba(var(--center-channel-color-rgb), .75)}._tile-button_w3stn_2:active:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--button-bg-rgb),.08);--tile-button-fg: var(--link-color)}._tile-button_w3stn_2:is(:disabled,._tile-button--disabled_w3stn_31){opacity:.48;cursor:not-allowed}._tile-button--toggled_w3stn_43{--tile-button-fg: var(--link-color);background-color:rgba(var(--button-bg-rgb),.08)}._tile-button--toggled_w3stn_43 ._tile-button__icon_w3stn_47,._tile-button--toggled_w3stn_43 ._tile-button__label_w3stn_48{color:var(--link-color)}._tile-button--toggled_w3stn_43:hover:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--button-bg-rgb),.12)}._tile-button--toggled_w3stn_43:active:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--button-bg-rgb),.16)}._tile-button--destructive_w3stn_57{--focus-ring-color: var(--error-text, var(--color-danger));--tile-button-fg: var(--error-text, var(--color-danger));background-color:rgba(var(--error-text-color-rgb, var(--color-danger-rgb)),.04)}._tile-button--destructive_w3stn_57:hover:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--error-text-color-rgb, var(--color-danger-rgb)),.08);--tile-button-fg: var(--error-text, var(--color-danger))}._tile-button--destructive_w3stn_57:active:not(:disabled,._tile-button--disabled_w3stn_31){background-color:rgba(var(--error-text-color-rgb, var(--color-danger-rgb)),.16);--tile-button-fg: var(--error-text, var(--color-danger))}._tile-button_w3stn_2:hover:not(:disabled,._tile-button--disabled_w3stn_31),._tile-button_w3stn_2:active:not(:disabled,._tile-button--disabled_w3stn_31),._tile-button--toggled_w3stn_43,._tile-button--destructive_w3stn_57{--tile-button-icon-fg: initial}._tile-button__icon_w3stn_47{display:flex;align-items:center;justify-content:center;width:var(--icon-size-20);height:var(--icon-size-20);flex-shrink:0;color:var(--tile-button-icon-fg, var(--tile-button-fg))}._tile-button__label_w3stn_48{font-family:var(--font-family-body);font-size:var(--font-size-50);font-weight:var(--font-weight-semibold);line-height:var(--line-height-50);letter-spacing:.11px;box-sizing:border-box;max-width:100%;padding-inline:var(--tile-button-padding-inline, clamp(var(--spacing-xs), 33.33% - 13.33px, var(--spacing-l)));display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;text-wrap:balance;white-space:normal;text-align:center;color:var(--tile-button-fg)}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
interface TileButtonOwnProps {
|
|
3
|
+
/** Pass `<Icon glyph={<SomeIcon />} />` — TileButton provides the correct size (20) via context. */
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
/** Visible label. Accepts translated nodes (e.g. `<FormattedMessage/>`). */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
destructive?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* When true, disables the control. On a native `<button>`, sets the `disabled`
|
|
11
|
+
* attribute. With `asChild`, sets `aria-disabled`, applies disabled styles, and
|
|
12
|
+
* blocks click / middle-click navigation (the link stays focusable).
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface TileButtonProps extends TileButtonOwnProps, ButtonHTMLAttributes<HTMLButtonElement> {
|
|
17
|
+
/**
|
|
18
|
+
* When true, merges TileButton props onto the single child element instead of
|
|
19
|
+
* rendering a `<button>`. Use with `<a>` or a router `Link`. Default: false.
|
|
20
|
+
*/
|
|
21
|
+
asChild?: false;
|
|
22
|
+
/**
|
|
23
|
+
* When set, this is a toggle; maps to `aria-pressed`. Only applies to the native
|
|
24
|
+
* `<button>`; not available with `asChild`.
|
|
25
|
+
*/
|
|
26
|
+
toggled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface TileButtonAsChildProps extends TileButtonOwnProps, Omit<HTMLAttributes<HTMLElement>, 'children' | 'color'> {
|
|
29
|
+
/**
|
|
30
|
+
* Merges TileButton props onto the single child element instead of rendering a
|
|
31
|
+
* `<button>`. The child's own props (`href`, `to`, `target`, …) stay on the
|
|
32
|
+
* child. Do not pass `type` or `toggled` — they are not available on links.
|
|
33
|
+
* Pass an empty child; TileButton supplies the icon and label anatomy.
|
|
34
|
+
*/
|
|
35
|
+
asChild: true;
|
|
36
|
+
/** Single empty element to render as the TileButton (e.g. `<a href="…" />`). */
|
|
37
|
+
children: ReactElement;
|
|
38
|
+
}
|
|
39
|
+
type TileButtonComponent = {
|
|
40
|
+
(props: TileButtonAsChildProps & RefAttributes<HTMLElement>): ReactElement | null;
|
|
41
|
+
(props: TileButtonProps & RefAttributes<HTMLButtonElement>): ReactElement | null;
|
|
42
|
+
displayName?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Tile Buttons surface a small set of high-frequency actions in a fixed context — a
|
|
46
|
+
* profile popover, a channel info panel, a card. They sit close to the content they act on
|
|
47
|
+
* and read as a row of equal-weight choices.
|
|
48
|
+
*
|
|
49
|
+
* Pass `asChild` with a single empty `<a>` or router `Link` child to render a navigational
|
|
50
|
+
* action with Tile Button styling (no nested `<button>`).
|
|
51
|
+
*/
|
|
52
|
+
declare const TileButton: TileButtonComponent;
|
|
53
|
+
export default TileButton;
|
|
54
|
+
//# sourceMappingURL=TileButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileButton.d.ts","sourceRoot":"","sources":["../../../src/components/tile-button/TileButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAKf,UAAU,kBAAkB;IAC1B,oGAAoG;IACpG,IAAI,EAAE,SAAS,CAAC;IAChB,4EAA4E;IAC5E,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,kBAAkB,EAAE,oBAAoB,CAAC,iBAAiB,CAAC;IACnE;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBACf,SACE,kBAAkB,EAClB,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACzD;;;;;OAKG;IACH,OAAO,EAAE,IAAI,CAAC;IACd,gFAAgF;IAChF,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,KAAK,mBAAmB,GAAG;IACzB,CACE,KAAK,EAAE,sBAAsB,GAAG,aAAa,CAAC,WAAW,CAAC,GACzD,YAAY,GAAG,IAAI,CAAC;IACvB,CACE,KAAK,EAAE,eAAe,GAAG,aAAa,CAAC,iBAAiB,CAAC,GACxD,YAAY,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;GAOG;AACH,QAAA,MAAM,UAAU,EAyFV,mBAAmB,CAAC;AAI1B,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as x, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { IconSlotContext as o } from "../icon/Icon.js";
|
|
4
|
+
import { renderAsChild as P } from "../../utils/slot.js";
|
|
5
|
+
import e from "./TileButton.module.scss.js";
|
|
6
|
+
const T = y(function(l, s) {
|
|
7
|
+
if (l.asChild) {
|
|
8
|
+
const {
|
|
9
|
+
icon: f,
|
|
10
|
+
label: p,
|
|
11
|
+
destructive: v = !1,
|
|
12
|
+
className: C,
|
|
13
|
+
disabled: N,
|
|
14
|
+
children: _,
|
|
15
|
+
asChild: A,
|
|
16
|
+
...B
|
|
17
|
+
} = l, g = [
|
|
18
|
+
e["tile-button"],
|
|
19
|
+
v ? e["tile-button--destructive"] : "",
|
|
20
|
+
C ?? ""
|
|
21
|
+
].filter(Boolean).join(" "), j = /* @__PURE__ */ a(x, { children: [
|
|
22
|
+
/* @__PURE__ */ t("span", { className: e["tile-button__icon"], "aria-hidden": !0, children: /* @__PURE__ */ t(o.Provider, { value: { size: "20" }, children: f }) }),
|
|
23
|
+
/* @__PURE__ */ t("span", { className: e["tile-button__label"], children: p })
|
|
24
|
+
] });
|
|
25
|
+
return P({
|
|
26
|
+
child: _,
|
|
27
|
+
props: {
|
|
28
|
+
...B,
|
|
29
|
+
className: g
|
|
30
|
+
},
|
|
31
|
+
ref: s,
|
|
32
|
+
content: j,
|
|
33
|
+
disabled: !!N,
|
|
34
|
+
disabledClassName: e["tile-button--disabled"],
|
|
35
|
+
warnOnChildContent: !0
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const {
|
|
39
|
+
icon: n,
|
|
40
|
+
label: r,
|
|
41
|
+
toggled: i,
|
|
42
|
+
destructive: d = !1,
|
|
43
|
+
className: c,
|
|
44
|
+
disabled: u,
|
|
45
|
+
type: m = "button",
|
|
46
|
+
asChild: z,
|
|
47
|
+
...b
|
|
48
|
+
} = l, h = [
|
|
49
|
+
e["tile-button"],
|
|
50
|
+
i ? e["tile-button--toggled"] : "",
|
|
51
|
+
d ? e["tile-button--destructive"] : "",
|
|
52
|
+
c ?? ""
|
|
53
|
+
].filter(Boolean).join(" ");
|
|
54
|
+
return /* @__PURE__ */ a(
|
|
55
|
+
"button",
|
|
56
|
+
{
|
|
57
|
+
ref: s,
|
|
58
|
+
className: h,
|
|
59
|
+
type: m,
|
|
60
|
+
disabled: u,
|
|
61
|
+
"aria-pressed": i === void 0 ? void 0 : i,
|
|
62
|
+
...b,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ t("span", { className: e["tile-button__icon"], "aria-hidden": !0, children: /* @__PURE__ */ t(o.Provider, { value: { size: "20" }, children: n }) }),
|
|
65
|
+
/* @__PURE__ */ t("span", { className: e["tile-button__label"], children: r })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
T.displayName = "TileButton";
|
|
71
|
+
export {
|
|
72
|
+
T as default
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=TileButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileButton.js","sources":["../../../src/components/tile-button/TileButton.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 './TileButton.module.scss';\n\ninterface TileButtonOwnProps {\n /** Pass `<Icon glyph={<SomeIcon />} />` — TileButton 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 TileButtonProps\n extends TileButtonOwnProps, ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * When true, merges TileButton 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 toggled?: boolean;\n}\n\nexport interface TileButtonAsChildProps\n extends\n TileButtonOwnProps,\n Omit<HTMLAttributes<HTMLElement>, 'children' | 'color'> {\n /**\n * Merges TileButton 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 `toggled` — they are not available on links.\n * Pass an empty child; TileButton supplies the icon and label anatomy.\n */\n asChild: true;\n /** Single empty element to render as the TileButton (e.g. `<a href=\"…\" />`). */\n children: ReactElement;\n}\n\ntype TileButtonComponent = {\n (\n props: TileButtonAsChildProps & RefAttributes<HTMLElement>,\n ): ReactElement | null;\n (\n props: TileButtonProps & RefAttributes<HTMLButtonElement>,\n ): ReactElement | null;\n displayName?: string;\n};\n\n/**\n * Tile 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 Tile Button styling (no nested `<button>`).\n */\nconst TileButton = forwardRef(function TileButton(\n props: TileButtonProps | TileButtonAsChildProps,\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['tile-button'],\n destructive ? styles['tile-button--destructive'] : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const anatomy = (\n <>\n <span className={styles['tile-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['tile-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['tile-button--disabled'],\n warnOnChildContent: true,\n });\n }\n\n const {\n icon,\n label,\n toggled,\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['tile-button'],\n toggled ? styles['tile-button--toggled'] : '',\n destructive ? styles['tile-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={toggled === undefined ? undefined : toggled}\n {...htmlProps}\n >\n <span className={styles['tile-button__icon']} aria-hidden>\n <IconSlotContext.Provider value={{ size: '20' }}>\n {icon}\n </IconSlotContext.Provider>\n </span>\n <span className={styles['tile-button__label']}>{label}</span>\n </button>\n );\n}) as TileButtonComponent;\n\nTileButton.displayName = 'TileButton';\n\nexport default TileButton;\n"],"names":["TileButton","forwardRef","props","ref","icon","label","destructive","className","disabled","children","asChild","rest","rootClass","styles","anatomy","jsxs","Fragment","jsx","IconSlotContext","renderAsChild","toggled","type","htmlProps"],"mappings":";;;;;AA2EA,MAAMA,IAAaC,EAAW,SAC5BC,GACAC,GACA;AACA,MAAID,EAAM,SAAS;AACjB,UAAM;AAAA,MACJ,MAAAE;AAAAA,MACA,OAAAC;AAAAA,MACA,aAAAC,IAAc;AAAA,MACd,WAAAC;AAAAA,MACA,UAAAC;AAAAA,MACA,UAAAC;AAAA,MACA,SAAAC;AAAAA,MACA,GAAGC;AAAA,IAAA,IACDT,GAGEU,IAAY;AAAA,MAChBC,EAAO,aAAa;AAAA,MACpBP,IAAcO,EAAO,0BAA0B,IAAI;AAAA,MACnDN,KAAa;AAAA,IAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,GAELO,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,WAAWJ,EAAO,mBAAmB,GAAG,eAAW,IACvD,UAAA,gBAAAI,EAACC,EAAgB,UAAhB,EAAyB,OAAO,EAAE,MAAM,QACtC,UAAAd,GACH,GACF;AAAA,wBACC,QAAA,EAAK,WAAWS,EAAO,oBAAoB,GAAI,UAAAR,EAAAA,CAAM;AAAA,IAAA,GACxD;AAGF,WAAOc,EAAc;AAAA,MACnB,OAAOV;AAAA,MACP,OAAO;AAAA,QACL,GAAGE;AAAA,QACH,WAAWC;AAAAA,MAAA;AAAA,MAEb,KAAAT;AAAA,MACA,SAASW;AAAA,MACT,UAAU,EAAQN;AAAAA,MAClB,mBAAmBK,EAAO,uBAAuB;AAAA,MACjD,oBAAoB;AAAA,IAAA,CACrB;AAAA,EACH;AAEA,QAAM;AAAA,IACJ,MAAAT;AAAA,IACA,OAAAC;AAAA,IACA,SAAAe;AAAA,IACA,aAAAd,IAAc;AAAA,IACd,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAa,IAAO;AAAA,IACP,SAAAX;AAAA,IACA,GAAGY;AAAA,EAAA,IACDpB,GAGEU,IAAY;AAAA,IAChBC,EAAO,aAAa;AAAA,IACpBO,IAAUP,EAAO,sBAAsB,IAAI;AAAA,IAC3CP,IAAcO,EAAO,0BAA0B,IAAI;AAAA,IACnDN,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAZ;AAAA,MACA,WAAWS;AAAA,MACX,MAAAS;AAAA,MACA,UAAAb;AAAA,MACA,gBAAcY,MAAY,SAAY,SAAYA;AAAA,MACjD,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAL,EAAC,UAAK,WAAWJ,EAAO,mBAAmB,GAAG,eAAW,IACvD,UAAA,gBAAAI,EAACC,EAAgB,UAAhB,EAAyB,OAAO,EAAE,MAAM,KAAA,GACtC,aACH,GACF;AAAA,0BACC,QAAA,EAAK,WAAWL,EAAO,oBAAoB,GAAI,UAAAR,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5D,CAAC;AAEDL,EAAW,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./TileButton.css');const t={"tile-button":"_tile-button_w3stn_2","tile-button--disabled":"_tile-button--disabled_w3stn_31","tile-button--toggled":"_tile-button--toggled_w3stn_43","tile-button__icon":"_tile-button__icon_w3stn_47","tile-button__label":"_tile-button__label_w3stn_48","tile-button--destructive":"_tile-button--destructive_w3stn_57"};exports.default=t;
|
|
2
|
+
//# sourceMappingURL=TileButton.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileButton.module.scss.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './TileButton.css';const t = {
|
|
2
|
+
"tile-button": "_tile-button_w3stn_2",
|
|
3
|
+
"tile-button--disabled": "_tile-button--disabled_w3stn_31",
|
|
4
|
+
"tile-button--toggled": "_tile-button--toggled_w3stn_43",
|
|
5
|
+
"tile-button__icon": "_tile-button__icon_w3stn_47",
|
|
6
|
+
"tile-button__label": "_tile-button__label_w3stn_48",
|
|
7
|
+
"tile-button--destructive": "_tile-button--destructive_w3stn_57"
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
t as default
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=TileButton.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileButton.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TileButton.cjs");exports.TileButton=e.default;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tile-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./components/tile-button/TileButton.cjs"),i=require("./components/admin-console-header/AdminConsoleHeader.cjs"),s=require("./components/admin-panel/AdminPanel.cjs"),l=require("./components/admin-console-footer/AdminConsoleFooter.cjs"),d=require("./components/admin-panel-footer/AdminPanelFooter.cjs"),c=require("./components/admin-panel-header/AdminPanelHeader.cjs"),f=require("./components/attachment-card/AttachmentCard.cjs"),q=require("./components/button/Button.cjs"),p=require("./components/button/Button.module.scss.cjs"),P=require("./components/card-button/CardButton.cjs"),S=require("./components/card-button/CardButtonGroup.cjs"),M=require("./components/channel-info-msg-header/ChannelInfoMsgHeader.cjs"),T=require("./components/channel-sidebar-item/ChannelSidebarItem.cjs"),I=require("./components/checkbox/Checkbox.cjs"),v=require("./components/chip/Chip.cjs"),g=require("./components/chip/ChipGroup.cjs"),m=require("./components/combobox/Combobox.cjs"),C=require("./components/date-range-picker/DateRangePicker.cjs"),B=require("./components/divider/Divider.cjs"),h=require("./components/dropdown/Dropdown.cjs"),A=require("./components/emoji/Emoji.cjs"),t=require("./components/emoji-button/EmojiButton.cjs"),_=require("./components/emoji-popover/EmojiPopover.cjs"),b=require("./components/empty-state/EmptyState.cjs"),E=require("./components/error-message/ErrorMessage.cjs"),O=require("./components/field-message/FieldMessage.cjs"),G=require("./components/feature-discovery-panel/FeatureDiscoveryPanel.cjs"),N=require("./components/global-banner/GlobalBanner.cjs"),r=require("./components/icon/Icon.cjs"),o=require("./components/icon-button/IconButton.cjs"),w=require("./components/illustration/Illustration.cjs"),R=require("./components/image-preview/ImagePreview.cjs"),x=require("./components/tag/Tag.cjs"),H=require("./components/link-preview/LinkPreview.cjs"),k=require("./components/mention-badge/MentionBadge.cjs"),D=require("./components/menu-group-heading/MenuGroupHeading.cjs"),F=require("./components/menu-item/MenuItem.cjs"),U=require("./components/message-actions/MessageActions.cjs"),y=require("./components/message-header/MessageHeader.cjs"),j=require("./components/reactions-row/ReactionsRow.cjs"),Z=require("./components/reaction-button/ReactionButton.cjs"),J=require("./components/message-separator/MessageSeparator.cjs"),L=require("./components/modal/Modal.cjs"),V=require("./components/modal/ModalOverlay.module.scss.cjs"),K=require("./components/modal-footer/ModalFooter.cjs"),z=require("./components/modal-header/ModalHeader.cjs"),Q=require("./components/more-unreads-banner/MoreUnreadsBanner.cjs"),W=require("./components/new-message-banner/NewMessageBanner.cjs"),X=require("./components/pagination-dots/PaginationDots.cjs"),Y=require("./components/permalink-preview/PermalinkPreview.cjs"),$=require("./components/pinned-saved-indicators/PinnedSavedIndicators.cjs"),e=require("./components/popover-menu/PopoverMenu.cjs"),ee=require("./components/popover-notice/PopoverNotice.cjs"),re=require("./components/profile-popover/ProfilePopover.cjs"),te=require("./components/progress-bar/ProgressBar.cjs"),oe=require("./components/radio/Radio.cjs"),ue=require("./components/right-sidebar-header/RightSidebarHeader.cjs"),ae=require("./components/scrollbar/Scrollbar.cjs"),ne=require("./components/password-input/PasswordInput.cjs"),ie=require("./components/search-input/SearchInput.cjs"),se=require("./components/search-tip-banner/SearchTipBanner.cjs"),u=require("./components/shortcut-tag/ShortcutTag.cjs"),le=require("./components/section-notice/SectionNotice.cjs"),de=require("./components/select/Select.cjs"),ce=require("./components/spinner/Spinner.cjs"),fe=require("./components/status-badge/StatusBadge.cjs"),qe=require("./components/switch/Switch.cjs"),pe=require("./components/tabs/Tabs.cjs"),Pe=require("./components/team-avatar/TeamAvatar.cjs"),Se=require("./components/text-area/TextArea.cjs"),Me=require("./components/text-input/TextInput.cjs"),Te=require("./components/thread-footer/ThreadFooter.cjs"),Ie=require("./components/thread-list-item/ThreadListItem.cjs"),ve=require("./components/toast/Toast.cjs"),ge=require("./components/tooltip/Tooltip.cjs"),me=require("./components/tour-point/TourPoint.cjs"),Ce=require("./components/unread-badge/UnreadBadge.cjs"),Be=require("./components/user-avatar/UserAvatar.cjs"),he=require("./components/user-avatar-group/UserAvatarGroup.cjs"),Ae=require("./hooks/use-controllable.cjs"),_e=require("./hooks/use-exit-animation.cjs"),be=require("./hooks/use-outside-close.cjs"),a=require("./hooks/use-popover-transition.cjs"),Ee=require("./utils/string.cjs");exports.TileButton=n.default;exports.AdminConsoleHeader=i.default;exports.AdminPanel=s.default;exports.AdminConsoleFooter=l.default;exports.AdminPanelFooter=d.default;exports.AdminPanelHeader=c.default;exports.AttachmentCard=f.default;exports.Button=q.default;exports.btnStyles=p.default;exports.CardButton=P.default;exports.CardButtonGroup=S.default;exports.ChannelInfoMsgHeader=M.default;exports.ChannelSidebarItem=T.default;exports.Checkbox=I.default;exports.Chip=v.default;exports.ChipGroup=g.default;exports.Combobox=m.default;exports.DateRangePicker=C.default;exports.Divider=B.default;exports.Dropdown=h.default;exports.Emoji=A.default;exports.EMOJI_BUTTON_EMOJI_SIZES=t.EMOJI_BUTTON_EMOJI_SIZES;exports.EmojiButton=t.default;exports.EmojiPopover=_.default;exports.EmptyState=b.default;exports.ErrorMessage=E.default;exports.FieldMessage=O.default;exports.FeatureDiscoveryPanel=G.default;exports.GlobalBanner=N.default;exports.Icon=r.default;exports.IconSlotContext=r.IconSlotContext;exports.SVG_SIZE_MAP=r.SVG_SIZE_MAP;exports.useIconSlotContext=r.useIconSlotContext;exports.ICON_BUTTON_ICON_SIZES=o.ICON_BUTTON_ICON_SIZES;exports.IconButton=o.default;exports.Illustration=w.default;exports.ImagePreview=R.default;exports.Tag=x.default;exports.LinkPreview=H.default;exports.MentionBadge=k.default;exports.MenuGroupHeading=D.default;exports.MenuItem=F.default;exports.MessageActions=U.default;exports.MessageHeader=y.default;exports.ReactionsRow=j.default;exports.ReactionButton=Z.default;exports.MessageSeparator=J.default;exports.Modal=L.default;exports.modalOverlayStyles=V.default;exports.ModalFooter=K.default;exports.ModalHeader=z.default;exports.MoreUnreadsBanner=Q.default;exports.NewMessageBanner=W.default;exports.PaginationDots=X.default;exports.PermalinkPreview=Y.default;exports.PinnedSavedIndicators=$.default;exports.PopoverMenu=e.default;exports.PopoverMenuDivider=e.PopoverMenuDivider;exports.PopoverMenuGroup=e.PopoverMenuGroup;exports.PopoverMenuGroupTitle=e.PopoverMenuGroupTitle;exports.PopoverMenuScroll=e.PopoverMenuScroll;exports.PopoverMenuTitle=e.PopoverMenuTitle;exports.PopoverNotice=ee.default;exports.ProfilePopover=re.default;exports.ProgressBar=te.default;exports.Radio=oe.default;exports.RightSidebarHeader=ue.default;exports.Scrollbar=ae.default;exports.PasswordInput=ne.default;exports.SearchInput=ie.default;exports.SearchTipBanner=se.default;exports.ShortcutTag=u.default;exports.ShortcutTagGroup=u.ShortcutTagGroup;exports.SectionNotice=le.default;exports.Select=de.default;exports.Spinner=ce.default;exports.StatusBadge=fe.default;exports.Switch=qe.default;exports.Tabs=pe.default;exports.TeamAvatar=Pe.default;exports.TextArea=Se.default;exports.TextInput=Me.default;exports.ThreadFooter=Te.default;exports.ThreadListItem=Ie.default;exports.Toast=ve.default;exports.Tooltip=ge.default;exports.TourPoint=me.default;exports.UnreadBadge=Ce.default;exports.UserAvatar=Be.default;exports.UserAvatarGroup=he.default;exports.useControllable=Ae.useControllable;exports.useExitAnimation=_e.useExitAnimation;exports.useOutsideClose=be.useOutsideClose;exports.POPOVER_TRANSITION_MS=a.POPOVER_TRANSITION_MS;exports.usePopoverTransition=a.usePopoverTransition;exports.toKebab=Ee.toKebab;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export type * from './components/
|
|
1
|
+
export { default as TileButton } from './components/tile-button/TileButton';
|
|
2
|
+
export type * from './components/tile-button/TileButton';
|
|
3
3
|
export * from './components/admin-console-header/index';
|
|
4
4
|
export * from './components/admin-panel/index';
|
|
5
5
|
export * from './components/admin-console-footer/index';
|
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,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,mBAAmB,oCAAoC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAClE,mBAAmB,8BAA8B,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACpF,mBAAmB,0CAA0C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACvF,mBAAmB,4CAA4C,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAClE,mBAAmB,8BAA8B,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AAEnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC"}
|