@appss/ui 0.0.0-stage → 0.1.0
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/AGENTS.md +359 -0
- package/README.md +255 -2
- package/dist/appearances/profiles.d.ts +4 -0
- package/dist/appearances/profiles.d.ts.map +1 -0
- package/dist/appearances/profiles.js +5 -0
- package/dist/appearances/profiles.js.map +1 -0
- package/dist/appearances/reddit/profile.d.ts +187 -0
- package/dist/appearances/reddit/profile.d.ts.map +1 -0
- package/dist/appearances/reddit/profile.js +107 -0
- package/dist/appearances/reddit/profile.js.map +1 -0
- package/dist/appearances/reddit/reddit.module.css.js +240 -0
- package/dist/appearances/reddit/reddit.module.css.js.map +1 -0
- package/dist/appearances/telegram/profile.d.ts +197 -0
- package/dist/appearances/telegram/profile.d.ts.map +1 -0
- package/dist/appearances/telegram/profile.js +114 -0
- package/dist/appearances/telegram/profile.js.map +1 -0
- package/dist/appearances/telegram/telegram.module.css.js +270 -0
- package/dist/appearances/telegram/telegram.module.css.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +4 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion/Accordion.js +91 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/Accordion.module.css.js +30 -0
- package/dist/components/Accordion/Accordion.module.css.js.map +1 -0
- package/dist/components/Accordion/Accordion.types.d.ts +34 -0
- package/dist/components/Accordion/Accordion.types.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +4 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.js +50 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/Avatar.module.css.js +18 -0
- package/dist/components/Avatar/Avatar.module.css.js.map +1 -0
- package/dist/components/Avatar/Avatar.types.d.ts +24 -0
- package/dist/components/Avatar/Avatar.types.d.ts.map +1 -0
- package/dist/components/Banner/Banner.d.ts +3 -0
- package/dist/components/Banner/Banner.d.ts.map +1 -0
- package/dist/components/Banner/Banner.js +39 -0
- package/dist/components/Banner/Banner.js.map +1 -0
- package/dist/components/Banner/Banner.module.css.js +24 -0
- package/dist/components/Banner/Banner.module.css.js.map +1 -0
- package/dist/components/Banner/Banner.types.d.ts +25 -0
- package/dist/components/Banner/Banner.types.d.ts.map +1 -0
- package/dist/components/BottomNav/BottomNav.d.ts +3 -0
- package/dist/components/BottomNav/BottomNav.d.ts.map +1 -0
- package/dist/components/BottomNav/BottomNav.js +68 -0
- package/dist/components/BottomNav/BottomNav.js.map +1 -0
- package/dist/components/BottomNav/BottomNav.module.css.js +24 -0
- package/dist/components/BottomNav/BottomNav.module.css.js.map +1 -0
- package/dist/components/BottomNav/BottomNav.types.d.ts +35 -0
- package/dist/components/BottomNav/BottomNav.types.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +52 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.module.css.js +24 -0
- package/dist/components/Button/Button.module.css.js.map +1 -0
- package/dist/components/Button/Button.types.d.ts +23 -0
- package/dist/components/Button/Button.types.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +3 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +50 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/Card.module.css.js +21 -0
- package/dist/components/Card/Card.module.css.js.map +1 -0
- package/dist/components/Card/Card.types.d.ts +23 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -0
- package/dist/components/ChatListItem/ChatListItem.d.ts +7 -0
- package/dist/components/ChatListItem/ChatListItem.d.ts.map +1 -0
- package/dist/components/ChatListItem/ChatListItem.js +75 -0
- package/dist/components/ChatListItem/ChatListItem.js.map +1 -0
- package/dist/components/ChatListItem/ChatListItem.module.css.js +51 -0
- package/dist/components/ChatListItem/ChatListItem.module.css.js.map +1 -0
- package/dist/components/ChatListItem/ChatListItem.types.d.ts +38 -0
- package/dist/components/ChatListItem/ChatListItem.types.d.ts.map +1 -0
- package/dist/components/ChatListItem/MessageStatusIcon.d.ts +7 -0
- package/dist/components/ChatListItem/MessageStatusIcon.d.ts.map +1 -0
- package/dist/components/ChatListItem/MessageStatusIcon.js +18 -0
- package/dist/components/ChatListItem/MessageStatusIcon.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +4 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +63 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/Dialog.module.css.js +21 -0
- package/dist/components/Dialog/Dialog.module.css.js.map +1 -0
- package/dist/components/Dialog/Dialog.types.d.ts +26 -0
- package/dist/components/Dialog/Dialog.types.d.ts.map +1 -0
- package/dist/components/Divider/Divider.d.ts +3 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.js +27 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Divider/Divider.module.css.js +9 -0
- package/dist/components/Divider/Divider.module.css.js.map +1 -0
- package/dist/components/Divider/Divider.types.d.ts +17 -0
- package/dist/components/Divider/Divider.types.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/IconButton/IconButton.js +49 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconButton/IconButton.module.css.js +15 -0
- package/dist/components/IconButton/IconButton.module.css.js.map +1 -0
- package/dist/components/IconButton/IconButton.types.d.ts +25 -0
- package/dist/components/IconButton/IconButton.types.d.ts.map +1 -0
- package/dist/components/Likes/Likes.d.ts +4 -0
- package/dist/components/Likes/Likes.d.ts.map +1 -0
- package/dist/components/Likes/Likes.js +85 -0
- package/dist/components/Likes/Likes.js.map +1 -0
- package/dist/components/Likes/Likes.module.css.js +18 -0
- package/dist/components/Likes/Likes.module.css.js.map +1 -0
- package/dist/components/Likes/Likes.types.d.ts +27 -0
- package/dist/components/Likes/Likes.types.d.ts.map +1 -0
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.js +47 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/Link/Link.module.css.js +15 -0
- package/dist/components/Link/Link.module.css.js.map +1 -0
- package/dist/components/Link/Link.types.d.ts +22 -0
- package/dist/components/Link/Link.types.d.ts.map +1 -0
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.d.ts.map +1 -0
- package/dist/components/Menu/Menu.js +134 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/Menu.module.css.js +27 -0
- package/dist/components/Menu/Menu.module.css.js.map +1 -0
- package/dist/components/Menu/Menu.types.d.ts +32 -0
- package/dist/components/Menu/Menu.types.d.ts.map +1 -0
- package/dist/components/MessageBubble/MessageBubble.d.ts +3 -0
- package/dist/components/MessageBubble/MessageBubble.d.ts.map +1 -0
- package/dist/components/MessageBubble/MessageBubble.js +85 -0
- package/dist/components/MessageBubble/MessageBubble.js.map +1 -0
- package/dist/components/MessageBubble/MessageBubble.module.css.js +54 -0
- package/dist/components/MessageBubble/MessageBubble.module.css.js.map +1 -0
- package/dist/components/MessageBubble/MessageBubble.types.d.ts +54 -0
- package/dist/components/MessageBubble/MessageBubble.types.d.ts.map +1 -0
- package/dist/components/MessageComposer/MessageComposer.d.ts +3 -0
- package/dist/components/MessageComposer/MessageComposer.d.ts.map +1 -0
- package/dist/components/MessageComposer/MessageComposer.js +55 -0
- package/dist/components/MessageComposer/MessageComposer.js.map +1 -0
- package/dist/components/MessageComposer/MessageComposer.module.css.js +24 -0
- package/dist/components/MessageComposer/MessageComposer.module.css.js.map +1 -0
- package/dist/components/MessageComposer/MessageComposer.types.d.ts +27 -0
- package/dist/components/MessageComposer/MessageComposer.types.d.ts.map +1 -0
- package/dist/components/MessageDivider/MessageDivider.d.ts +3 -0
- package/dist/components/MessageDivider/MessageDivider.d.ts.map +1 -0
- package/dist/components/MessageDivider/MessageDivider.js +28 -0
- package/dist/components/MessageDivider/MessageDivider.js.map +1 -0
- package/dist/components/MessageDivider/MessageDivider.module.css.js +12 -0
- package/dist/components/MessageDivider/MessageDivider.module.css.js.map +1 -0
- package/dist/components/MessageDivider/MessageDivider.types.d.ts +19 -0
- package/dist/components/MessageDivider/MessageDivider.types.d.ts.map +1 -0
- package/dist/components/NavBar/NavBar.d.ts +3 -0
- package/dist/components/NavBar/NavBar.d.ts.map +1 -0
- package/dist/components/NavBar/NavBar.js +42 -0
- package/dist/components/NavBar/NavBar.js.map +1 -0
- package/dist/components/NavBar/NavBar.module.css.js +24 -0
- package/dist/components/NavBar/NavBar.module.css.js.map +1 -0
- package/dist/components/NavBar/NavBar.types.d.ts +26 -0
- package/dist/components/NavBar/NavBar.types.d.ts.map +1 -0
- package/dist/components/NavList/NavList.d.ts +3 -0
- package/dist/components/NavList/NavList.d.ts.map +1 -0
- package/dist/components/NavList/NavList.js +53 -0
- package/dist/components/NavList/NavList.js.map +1 -0
- package/dist/components/NavList/NavList.module.css.js +24 -0
- package/dist/components/NavList/NavList.module.css.js.map +1 -0
- package/dist/components/NavList/NavList.types.d.ts +31 -0
- package/dist/components/NavList/NavList.types.d.ts.map +1 -0
- package/dist/components/SearchField/SearchField.d.ts +3 -0
- package/dist/components/SearchField/SearchField.d.ts.map +1 -0
- package/dist/components/SearchField/SearchField.js +38 -0
- package/dist/components/SearchField/SearchField.js.map +1 -0
- package/dist/components/SearchField/SearchField.module.css.js +18 -0
- package/dist/components/SearchField/SearchField.module.css.js.map +1 -0
- package/dist/components/SearchField/SearchField.types.d.ts +23 -0
- package/dist/components/SearchField/SearchField.types.d.ts.map +1 -0
- package/dist/components/Section/Section.d.ts +4 -0
- package/dist/components/Section/Section.d.ts.map +1 -0
- package/dist/components/Section/Section.js +101 -0
- package/dist/components/Section/Section.js.map +1 -0
- package/dist/components/Section/Section.module.css.js +36 -0
- package/dist/components/Section/Section.module.css.js.map +1 -0
- package/dist/components/Section/Section.types.d.ts +36 -0
- package/dist/components/Section/Section.types.d.ts.map +1 -0
- package/dist/components/Stat/Stat.d.ts +4 -0
- package/dist/components/Stat/Stat.d.ts.map +1 -0
- package/dist/components/Stat/Stat.js +31 -0
- package/dist/components/Stat/Stat.js.map +1 -0
- package/dist/components/Stat/Stat.module.css.js +15 -0
- package/dist/components/Stat/Stat.module.css.js.map +1 -0
- package/dist/components/Stat/Stat.types.d.ts +18 -0
- package/dist/components/Stat/Stat.types.d.ts.map +1 -0
- package/dist/components/Switch/Switch.d.ts +4 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +45 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/Switch.module.css.js +21 -0
- package/dist/components/Switch/Switch.module.css.js.map +1 -0
- package/dist/components/Switch/Switch.types.d.ts +19 -0
- package/dist/components/Switch/Switch.types.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +92 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.module.css.js +24 -0
- package/dist/components/Tabs/Tabs.module.css.js.map +1 -0
- package/dist/components/Tabs/Tabs.types.d.ts +31 -0
- package/dist/components/Tabs/Tabs.types.d.ts.map +1 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -0
- package/dist/components/Tag/Tag.js +33 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/Tag.module.css.js +12 -0
- package/dist/components/Tag/Tag.module.css.js.map +1 -0
- package/dist/components/Tag/Tag.types.d.ts +20 -0
- package/dist/components/Tag/Tag.types.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +63 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.module.css.js +12 -0
- package/dist/components/Tooltip/Tooltip.module.css.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +24 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/core/AppssProvider.d.ts +21 -0
- package/dist/core/AppssProvider.d.ts.map +1 -0
- package/dist/core/AppssProvider.js +42 -0
- package/dist/core/AppssProvider.js.map +1 -0
- package/dist/core/appearance.d.ts +28 -0
- package/dist/core/appearance.d.ts.map +1 -0
- package/dist/core/appearance.js +40 -0
- package/dist/core/appearance.js.map +1 -0
- package/dist/core/host.d.ts +28 -0
- package/dist/core/host.d.ts.map +1 -0
- package/dist/core/host.js +42 -0
- package/dist/core/host.js.map +1 -0
- package/dist/hosts/adapters.d.ts +5 -0
- package/dist/hosts/adapters.d.ts.map +1 -0
- package/dist/hosts/adapters.js +21 -0
- package/dist/hosts/adapters.js.map +1 -0
- package/dist/icons/icons.d.ts +164 -0
- package/dist/icons/icons.d.ts.map +1 -0
- package/dist/icons/icons.js +220 -0
- package/dist/icons/icons.js.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +43 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations.d.ts +9 -0
- package/dist/integrations.d.ts.map +1 -0
- package/dist/integrations.js +27 -0
- package/dist/integrations.js.map +1 -0
- package/dist/modules/hideOnScroll.d.ts +7 -0
- package/dist/modules/hideOnScroll.d.ts.map +1 -0
- package/dist/modules/hideOnScroll.js +39 -0
- package/dist/modules/hideOnScroll.js.map +1 -0
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +5 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/recipes/buttons.d.ts +30 -0
- package/dist/recipes/buttons.d.ts.map +1 -0
- package/dist/recipes/buttons.js +28 -0
- package/dist/recipes/buttons.js.map +1 -0
- package/dist/recipes/index.d.ts +4 -0
- package/dist/recipes/index.d.ts.map +1 -0
- package/dist/recipes/index.js +23 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/recipes/navigation.d.ts +36 -0
- package/dist/recipes/navigation.d.ts.map +1 -0
- package/dist/recipes/navigation.js +28 -0
- package/dist/recipes/navigation.js.map +1 -0
- package/dist/recipes/recipes.module.css.js +27 -0
- package/dist/recipes/recipes.module.css.js.map +1 -0
- package/dist/recipes/whatsapp.d.ts +155 -0
- package/dist/recipes/whatsapp.d.ts.map +1 -0
- package/dist/recipes/whatsapp.js +155 -0
- package/dist/recipes/whatsapp.js.map +1 -0
- package/dist/recipes/whatsapp.module.css.js +135 -0
- package/dist/recipes/whatsapp.module.css.js.map +1 -0
- package/dist/styles.css +4089 -0
- package/package.json +78 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type BannerSlot = "root" | "media" | "content" | "title" | "subtitle" | "caption";
|
|
4
|
+
export type BannerAppearance = Appearance<BannerSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Banner: BannerAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type BannerRecipe = Recipe<"Banner">;
|
|
11
|
+
/** Highlighted link block with a colored background: an announcement, a feature, a call to action. */
|
|
12
|
+
export interface BannerProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "title" | "children" | "color" | "media"> {
|
|
13
|
+
href: string;
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
subtitle?: ReactNode;
|
|
16
|
+
caption?: ReactNode;
|
|
17
|
+
/** Icon or Avatar, rendered in the media slot. */
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
/** Background; text stays white, so pick a dark enough color. */
|
|
20
|
+
color?: string | undefined;
|
|
21
|
+
appearance?: BannerAppearance;
|
|
22
|
+
recipe?: BannerRecipe;
|
|
23
|
+
adaptation?: "host" | "fixed";
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Banner.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Banner/Banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AACzF,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAEtD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,MAAM,EAAE,gBAAgB,CAAC;KAC1B;CACF;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5C,sGAAsG;AACtG,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CACzC;IACC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { BottomNavProps } from "./BottomNav.types";
|
|
2
|
+
export declare function BottomNav({ items, activeId, onNavigate, appearance, recipe, adaptation, modules, className, style, "aria-label": ariaLabel, ...props }: BottomNavProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=BottomNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomNav.d.ts","sourceRoot":"","sources":["../../../src/ui/components/BottomNav/BottomNav.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAmB,cAAc,EAAiB,MAAM,mBAAmB,CAAC;AAKxF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,OAAmB,EACnB,SAAS,EACT,KAAK,EACL,YAAY,EAAE,SAAgC,EAC9C,GAAG,KAAK,EACT,EAAE,cAAc,+BA6DhB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect } from "react";
|
|
3
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
4
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
5
|
+
import classes from "./BottomNav.module.css.js";
|
|
6
|
+
const noModules = [];
|
|
7
|
+
function BottomNav({
|
|
8
|
+
items,
|
|
9
|
+
activeId,
|
|
10
|
+
onNavigate,
|
|
11
|
+
appearance,
|
|
12
|
+
recipe,
|
|
13
|
+
adaptation = "host",
|
|
14
|
+
modules = noModules,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
"aria-label": ariaLabel = "Основная навигация",
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
const host = useHostAppearance("BottomNav");
|
|
21
|
+
const rootRef = useRef(null);
|
|
22
|
+
const slot = createSlotProps(
|
|
23
|
+
{ classNames: classes },
|
|
24
|
+
recipe?.appearance,
|
|
25
|
+
adaptation === "host" ? host : void 0,
|
|
26
|
+
appearance,
|
|
27
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
28
|
+
);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const root = rootRef.current;
|
|
31
|
+
if (!root) return;
|
|
32
|
+
const ids = modules.map((module) => module.id);
|
|
33
|
+
if (new Set(ids).size !== ids.length) throw new Error("BottomNav module IDs must be unique.");
|
|
34
|
+
const controller = new AbortController();
|
|
35
|
+
const cleanups = modules.map((module) => module.mount({ root, signal: controller.signal }));
|
|
36
|
+
return () => {
|
|
37
|
+
controller.abort();
|
|
38
|
+
cleanups.reverse().forEach((cleanup) => cleanup?.());
|
|
39
|
+
};
|
|
40
|
+
}, [modules]);
|
|
41
|
+
return /* @__PURE__ */ jsx("nav", { ...props, ...slot("root"), ref: rootRef, "aria-label": ariaLabel, children: /* @__PURE__ */ jsx("ul", { ...slot("list"), children: items.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
42
|
+
"a",
|
|
43
|
+
{
|
|
44
|
+
...slot("item"),
|
|
45
|
+
href: item.href,
|
|
46
|
+
"data-active": item.id === activeId,
|
|
47
|
+
"aria-current": item.id === activeId ? "page" : void 0,
|
|
48
|
+
"aria-disabled": item.disabled || void 0,
|
|
49
|
+
tabIndex: item.disabled ? -1 : void 0,
|
|
50
|
+
onClick: (event) => {
|
|
51
|
+
if (item.disabled) {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
onNavigate?.(item.id, event);
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
item.icon && /* @__PURE__ */ jsx("span", { ...slot("icon"), "aria-hidden": "true", children: item.icon }),
|
|
59
|
+
/* @__PURE__ */ jsx("span", { ...slot("label"), children: item.label }),
|
|
60
|
+
item.badge !== void 0 && item.badge > 0 && /* @__PURE__ */ jsx("span", { ...slot("badge"), "aria-label": `${item.badge} новых`, children: item.badge })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
) }, item.id)) }) });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
BottomNav
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=BottomNav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomNav.js","sources":["../../../src/ui/components/BottomNav/BottomNav.tsx"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { BottomNavModule, BottomNavProps, BottomNavSlot } from \"./BottomNav.types\";\nimport classes from \"./BottomNav.module.css\";\n\nconst noModules: readonly BottomNavModule[] = [];\n\nexport function BottomNav({\n items,\n activeId,\n onNavigate,\n appearance,\n recipe,\n adaptation = \"host\",\n modules = noModules,\n className,\n style,\n \"aria-label\": ariaLabel = \"Основная навигация\",\n ...props\n}: BottomNavProps) {\n const host = useHostAppearance(\"BottomNav\");\n const rootRef = useRef<HTMLElement>(null);\n const slot = createSlotProps<BottomNavSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n const ids = modules.map((module) => module.id);\n if (new Set(ids).size !== ids.length) throw new Error(\"BottomNav module IDs must be unique.\");\n const controller = new AbortController();\n const cleanups = modules.map((module) => module.mount({ root, signal: controller.signal }));\n return () => {\n controller.abort();\n cleanups.reverse().forEach((cleanup) => cleanup?.());\n };\n }, [modules]);\n\n return (\n <nav {...props} {...slot(\"root\")} ref={rootRef} aria-label={ariaLabel}>\n <ul {...slot(\"list\")}>\n {items.map((item) => (\n <li key={item.id}>\n <a\n {...slot(\"item\")}\n href={item.href}\n data-active={item.id === activeId}\n aria-current={item.id === activeId ? \"page\" : undefined}\n aria-disabled={item.disabled || undefined}\n tabIndex={item.disabled ? -1 : undefined}\n onClick={(event) => {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n onNavigate?.(item.id, event);\n }}\n >\n {item.icon && (\n <span {...slot(\"icon\")} aria-hidden=\"true\">\n {item.icon}\n </span>\n )}\n <span {...slot(\"label\")}>{item.label}</span>\n {item.badge !== undefined && item.badge > 0 && (\n <span {...slot(\"badge\")} aria-label={`${item.badge} новых`}>\n {item.badge}\n </span>\n )}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,YAAwC,CAAA;AAEvC,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,cAAc,YAAY;AAAA,EAC1B,GAAG;AACL,GAAmB;AACjB,QAAM,OAAO,kBAAkB,WAAW;AAC1C,QAAM,UAAU,OAAoB,IAAI;AACxC,QAAM,OAAO;AAAA,IACX,EAAE,YAAY,QAAA;AAAA,IACd,QAAQ;AAAA,IACR,eAAe,SAAS,OAAO;AAAA,IAC/B;AAAA,IACA,EAAE,YAAY,EAAE,MAAM,aAAa,MAAM,QAAQ,EAAE,MAAM,SAAS,KAAG;AAAA,EAAE;AAGzE,YAAU,MAAM;AACd,UAAM,OAAO,QAAQ;AACrB,QAAI,CAAC,KAAM;AACX,UAAM,MAAM,QAAQ,IAAI,CAAC,WAAW,OAAO,EAAE;AAC7C,QAAI,IAAI,IAAI,GAAG,EAAE,SAAS,IAAI,OAAQ,OAAM,IAAI,MAAM,sCAAsC;AAC5F,UAAM,aAAa,IAAI,gBAAA;AACvB,UAAM,WAAW,QAAQ,IAAI,CAAC,WAAW,OAAO,MAAM,EAAE,MAAM,QAAQ,WAAW,OAAA,CAAQ,CAAC;AAC1F,WAAO,MAAM;AACX,iBAAW,MAAA;AACX,eAAS,UAAU,QAAQ,CAAC,YAAY,WAAW;AAAA,IACrD;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SACE,oBAAC,SAAK,GAAG,OAAQ,GAAG,KAAK,MAAM,GAAG,KAAK,SAAS,cAAY,WAC1D,UAAA,oBAAC,MAAA,EAAI,GAAG,KAAK,MAAM,GAChB,gBAAM,IAAI,CAAC,SACV,oBAAC,MAAA,EACC,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG,KAAK,MAAM;AAAA,MACf,MAAM,KAAK;AAAA,MACX,eAAa,KAAK,OAAO;AAAA,MACzB,gBAAc,KAAK,OAAO,WAAW,SAAS;AAAA,MAC9C,iBAAe,KAAK,YAAY;AAAA,MAChC,UAAU,KAAK,WAAW,KAAK;AAAA,MAC/B,SAAS,CAAC,UAAU;AAClB,YAAI,KAAK,UAAU;AACjB,gBAAM,eAAA;AACN;AAAA,QACF;AACA,qBAAa,KAAK,IAAI,KAAK;AAAA,MAC7B;AAAA,MAEC,UAAA;AAAA,QAAA,KAAK,QACJ,oBAAC,QAAA,EAAM,GAAG,KAAK,MAAM,GAAG,eAAY,QACjC,UAAA,KAAK,KAAA,CACR;AAAA,4BAED,QAAA,EAAM,GAAG,KAAK,OAAO,GAAI,eAAK,OAAM;AAAA,QACpC,KAAK,UAAU,UAAa,KAAK,QAAQ,yBACvC,QAAA,EAAM,GAAG,KAAK,OAAO,GAAG,cAAY,GAAG,KAAK,KAAK,UAC/C,eAAK,MAAA,CACR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,EAEJ,GA3BO,KAAK,EA4Bd,CACD,GACH,EAAA,CACF;AAEJ;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const root = "appss-root-7Ak74";
|
|
2
|
+
const list = "appss-list--hcEK";
|
|
3
|
+
const item = "appss-item-FnYMh";
|
|
4
|
+
const icon = "appss-icon-r6zpr";
|
|
5
|
+
const label = "appss-label-svMhe";
|
|
6
|
+
const badge = "appss-badge-hhGwy";
|
|
7
|
+
const classes = {
|
|
8
|
+
root,
|
|
9
|
+
list,
|
|
10
|
+
item,
|
|
11
|
+
icon,
|
|
12
|
+
label,
|
|
13
|
+
badge
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
badge,
|
|
17
|
+
classes as default,
|
|
18
|
+
icon,
|
|
19
|
+
item,
|
|
20
|
+
label,
|
|
21
|
+
list,
|
|
22
|
+
root
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=BottomNav.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomNav.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HTMLAttributes, MouseEvent, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type BottomNavSlot = "root" | "list" | "item" | "icon" | "label" | "badge";
|
|
4
|
+
export type BottomNavAppearance = Appearance<BottomNavSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
BottomNav: BottomNavAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type BottomNavRecipe = Recipe<"BottomNav">;
|
|
11
|
+
export interface BottomNavItem {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
href: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
badge?: number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface BottomNavModule {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
mount(context: {
|
|
22
|
+
root: HTMLElement;
|
|
23
|
+
signal: AbortSignal;
|
|
24
|
+
}): void | (() => void);
|
|
25
|
+
}
|
|
26
|
+
export interface BottomNavProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
|
|
27
|
+
items: readonly BottomNavItem[];
|
|
28
|
+
activeId: string;
|
|
29
|
+
onNavigate?: (id: string, event: MouseEvent<HTMLAnchorElement>) => void;
|
|
30
|
+
appearance?: BottomNavAppearance;
|
|
31
|
+
recipe?: BottomNavRecipe;
|
|
32
|
+
adaptation?: "host" | "fixed";
|
|
33
|
+
modules?: readonly BottomNavModule[];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=BottomNav.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomNav.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/BottomNav/BottomNav.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAClF,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAE5D,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,SAAS,EAAE,mBAAmB,CAAC;KAChC;CACF;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAClD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;CACjF;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACnF,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACxE,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ButtonProps } from "./Button.types";
|
|
2
|
+
export declare function Button({ appearance, recipe, adaptation, variant, tone, size, loading, disabled, leading, trailing, className, style, children, type, ...props }: ButtonProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAG9D,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,OAAiB,EACjB,IAAe,EACf,IAAW,EACX,OAAe,EACf,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACR,IAAe,EACf,GAAG,KAAK,EACT,EAAE,WAAW,+BAoCb"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
3
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
4
|
+
import classes from "./Button.module.css.js";
|
|
5
|
+
function Button({
|
|
6
|
+
appearance,
|
|
7
|
+
recipe,
|
|
8
|
+
adaptation = "host",
|
|
9
|
+
variant = "solid",
|
|
10
|
+
tone = "accent",
|
|
11
|
+
size = "md",
|
|
12
|
+
loading = false,
|
|
13
|
+
disabled,
|
|
14
|
+
leading,
|
|
15
|
+
trailing,
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
type = "button",
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const host = useHostAppearance("Button");
|
|
23
|
+
const slot = createSlotProps(
|
|
24
|
+
{ classNames: classes },
|
|
25
|
+
recipe?.appearance,
|
|
26
|
+
adaptation === "host" ? host : void 0,
|
|
27
|
+
appearance,
|
|
28
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
29
|
+
);
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
...props,
|
|
34
|
+
...slot("root"),
|
|
35
|
+
type,
|
|
36
|
+
disabled: disabled || loading,
|
|
37
|
+
"aria-busy": loading || void 0,
|
|
38
|
+
"data-variant": variant,
|
|
39
|
+
"data-tone": tone,
|
|
40
|
+
"data-size": size,
|
|
41
|
+
children: [
|
|
42
|
+
loading ? /* @__PURE__ */ jsx("span", { ...slot("spinner"), "aria-hidden": "true" }) : leading ? /* @__PURE__ */ jsx("span", { ...slot("leading"), "aria-hidden": "true", children: leading }) : null,
|
|
43
|
+
/* @__PURE__ */ jsx("span", { ...slot("label"), children }),
|
|
44
|
+
trailing && /* @__PURE__ */ jsx("span", { ...slot("trailing"), "aria-hidden": "true", children: trailing })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
Button
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/ui/components/Button/Button.tsx"],"sourcesContent":["import { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { ButtonProps, ButtonSlot } from \"./Button.types\";\nimport classes from \"./Button.module.css\";\n\nexport function Button({\n appearance,\n recipe,\n adaptation = \"host\",\n variant = \"solid\",\n tone = \"accent\",\n size = \"md\",\n loading = false,\n disabled,\n leading,\n trailing,\n className,\n style,\n children,\n type = \"button\",\n ...props\n}: ButtonProps) {\n const host = useHostAppearance(\"Button\");\n const slot = createSlotProps<ButtonSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n\n return (\n <button\n {...props}\n {...slot(\"root\")}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n >\n {loading ? (\n <span {...slot(\"spinner\")} aria-hidden=\"true\" />\n ) : leading ? (\n <span {...slot(\"leading\")} aria-hidden=\"true\">\n {leading}\n </span>\n ) : null}\n <span {...slot(\"label\")}>{children}</span>\n {trailing && (\n <span {...slot(\"trailing\")} aria-hidden=\"true\">\n {trailing}\n </span>\n )}\n </button>\n );\n}\n"],"names":[],"mappings":";;;;AAKO,SAAS,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAgB;AACd,QAAM,OAAO,kBAAkB,QAAQ;AACvC,QAAM,OAAO;AAAA,IACX,EAAE,YAAY,QAAA;AAAA,IACd,QAAQ;AAAA,IACR,eAAe,SAAS,OAAO;AAAA,IAC/B;AAAA,IACA,EAAE,YAAY,EAAE,MAAM,aAAa,MAAM,QAAQ,EAAE,MAAM,SAAS,KAAG;AAAA,EAAE;AAGzE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG,KAAK,MAAM;AAAA,MACf;AAAA,MACA,UAAU,YAAY;AAAA,MACtB,aAAW,WAAW;AAAA,MACtB,gBAAc;AAAA,MACd,aAAW;AAAA,MACX,aAAW;AAAA,MAEV,UAAA;AAAA,QAAA,8BACE,QAAA,EAAM,GAAG,KAAK,SAAS,GAAG,eAAY,OAAA,CAAO,IAC5C,UACF,oBAAC,QAAA,EAAM,GAAG,KAAK,SAAS,GAAG,eAAY,QACpC,mBACH,IACE;AAAA,4BACH,QAAA,EAAM,GAAG,KAAK,OAAO,GAAI,UAAS;AAAA,QAClC,gCACE,QAAA,EAAM,GAAG,KAAK,UAAU,GAAG,eAAY,QACrC,UAAA,SAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const root = "appss-root-eresH";
|
|
2
|
+
const label = "appss-label--cMaO";
|
|
3
|
+
const leading = "appss-leading-SSQn6";
|
|
4
|
+
const trailing = "appss-trailing-FuwSx";
|
|
5
|
+
const spinner = "appss-spinner-Ht-8L";
|
|
6
|
+
const spin = "appss-spin-T-JVO";
|
|
7
|
+
const classes = {
|
|
8
|
+
root,
|
|
9
|
+
label,
|
|
10
|
+
leading,
|
|
11
|
+
trailing,
|
|
12
|
+
spinner,
|
|
13
|
+
spin
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
classes as default,
|
|
17
|
+
label,
|
|
18
|
+
leading,
|
|
19
|
+
root,
|
|
20
|
+
spin,
|
|
21
|
+
spinner,
|
|
22
|
+
trailing
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Button.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type ButtonSlot = "root" | "label" | "leading" | "trailing" | "spinner";
|
|
4
|
+
export type ButtonAppearance = Appearance<ButtonSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Button: ButtonAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type ButtonRecipe = Recipe<"Button">;
|
|
11
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
appearance?: ButtonAppearance;
|
|
13
|
+
recipe?: ButtonRecipe;
|
|
14
|
+
adaptation?: "host" | "fixed";
|
|
15
|
+
variant?: "solid" | "soft" | "outline" | "plain";
|
|
16
|
+
/** neutral: dark/gray emphasis; brand: the platform's brand color. */
|
|
17
|
+
tone?: "accent" | "neutral" | "brand" | "destructive";
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
leading?: ReactNode;
|
|
21
|
+
trailing?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAEtD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,MAAM,EAAE,gBAAgB,CAAC;KAC1B;CACF;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACjD,sEAAsE;IACtE,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;IACtD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CardProps } from "./Card.types";
|
|
2
|
+
export declare function Card({ title, titleAs: Title, action, titleStyle, variant, appearance, recipe, adaptation, className, style, children, ...props }: CardProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Card/Card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,cAAc,CAAC;AAGxD,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,OAAO,EAAE,KAAY,EACrB,MAAM,EACN,UAAsB,EACtB,OAAkB,EAClB,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,+BAgCX"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
4
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
5
|
+
import classes from "./Card.module.css.js";
|
|
6
|
+
function Card({
|
|
7
|
+
title,
|
|
8
|
+
titleAs: Title = "h2",
|
|
9
|
+
action,
|
|
10
|
+
titleStyle = "caption",
|
|
11
|
+
variant = "filled",
|
|
12
|
+
appearance,
|
|
13
|
+
recipe,
|
|
14
|
+
adaptation = "host",
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
const host = useHostAppearance("Card");
|
|
21
|
+
const titleId = useId();
|
|
22
|
+
const slot = createSlotProps(
|
|
23
|
+
{ classNames: classes },
|
|
24
|
+
recipe?.appearance,
|
|
25
|
+
adaptation === "host" ? host : void 0,
|
|
26
|
+
appearance,
|
|
27
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"section",
|
|
31
|
+
{
|
|
32
|
+
...props,
|
|
33
|
+
...slot("root"),
|
|
34
|
+
"aria-labelledby": title ? titleId : void 0,
|
|
35
|
+
"data-variant": variant,
|
|
36
|
+
"data-title-style": titleStyle,
|
|
37
|
+
children: [
|
|
38
|
+
(title || action) && /* @__PURE__ */ jsxs("div", { ...slot("header"), children: [
|
|
39
|
+
title && /* @__PURE__ */ jsx(Title, { ...slot("title"), id: titleId, children: title }),
|
|
40
|
+
action && /* @__PURE__ */ jsx("div", { ...slot("action"), children: action })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsx("div", { ...slot("body"), children })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
Card
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/ui/components/Card/Card.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { CardProps, CardSlot } from \"./Card.types\";\nimport classes from \"./Card.module.css\";\n\nexport function Card({\n title,\n titleAs: Title = \"h2\",\n action,\n titleStyle = \"caption\",\n variant = \"filled\",\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n children,\n ...props\n}: CardProps) {\n const host = useHostAppearance(\"Card\");\n const titleId = useId();\n const slot = createSlotProps<CardSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n\n return (\n <section\n {...props}\n {...slot(\"root\")}\n aria-labelledby={title ? titleId : undefined}\n data-variant={variant}\n data-title-style={titleStyle}\n >\n {(title || action) && (\n <div {...slot(\"header\")}>\n {title && (\n <Title {...slot(\"title\")} id={titleId}>\n {title}\n </Title>\n )}\n {action && <div {...slot(\"action\")}>{action}</div>}\n </div>\n )}\n <div {...slot(\"body\")}>{children}</div>\n </section>\n );\n}\n"],"names":[],"mappings":";;;;;AAMO,SAAS,KAAK;AAAA,EACnB;AAAA,EACA,SAAS,QAAQ;AAAA,EACjB;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAc;AACZ,QAAM,OAAO,kBAAkB,MAAM;AACrC,QAAM,UAAU,MAAA;AAChB,QAAM,OAAO;AAAA,IACX,EAAE,YAAY,QAAA;AAAA,IACd,QAAQ;AAAA,IACR,eAAe,SAAS,OAAO;AAAA,IAC/B;AAAA,IACA,EAAE,YAAY,EAAE,MAAM,aAAa,MAAM,QAAQ,EAAE,MAAM,SAAS,KAAG;AAAA,EAAE;AAGzE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG,KAAK,MAAM;AAAA,MACf,mBAAiB,QAAQ,UAAU;AAAA,MACnC,gBAAc;AAAA,MACd,oBAAkB;AAAA,MAEhB,UAAA;AAAA,SAAA,SAAS,WACT,qBAAC,OAAA,EAAK,GAAG,KAAK,QAAQ,GACnB,UAAA;AAAA,UAAA,SACC,oBAAC,SAAO,GAAG,KAAK,OAAO,GAAG,IAAI,SAC3B,UAAA,MAAA,CACH;AAAA,UAED,UAAU,oBAAC,OAAA,EAAK,GAAG,KAAK,QAAQ,GAAI,UAAA,OAAA,CAAO;AAAA,QAAA,GAC9C;AAAA,4BAED,OAAA,EAAK,GAAG,KAAK,MAAM,GAAI,SAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGvC;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const root = "appss-root-elpfv";
|
|
2
|
+
const header = "appss-header-kXE1L";
|
|
3
|
+
const title = "appss-title-Lv5AW";
|
|
4
|
+
const action = "appss-action-vL9vd";
|
|
5
|
+
const body = "appss-body-2E0QA";
|
|
6
|
+
const classes = {
|
|
7
|
+
root,
|
|
8
|
+
header,
|
|
9
|
+
title,
|
|
10
|
+
action,
|
|
11
|
+
body
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
action,
|
|
15
|
+
body,
|
|
16
|
+
classes as default,
|
|
17
|
+
header,
|
|
18
|
+
root,
|
|
19
|
+
title
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Card.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type CardSlot = "root" | "header" | "title" | "action" | "body";
|
|
4
|
+
export type CardAppearance = Appearance<CardSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Card: CardAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type CardRecipe = Recipe<"Card">;
|
|
11
|
+
export interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
titleAs?: "h2" | "h3" | "div";
|
|
14
|
+
/** Header action, e.g. a "Clear" link or a Join button. */
|
|
15
|
+
action?: ReactNode;
|
|
16
|
+
/** caption: small caps title such as "RECENT POSTS"; heading: regular title. */
|
|
17
|
+
titleStyle?: "caption" | "heading";
|
|
18
|
+
variant?: "filled" | "outlined" | "elevated";
|
|
19
|
+
appearance?: CardAppearance;
|
|
20
|
+
recipe?: CardRecipe;
|
|
21
|
+
adaptation?: "host" | "fixed";
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AAElD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,IAAI,EAAE,cAAc,CAAC;KACtB;CACF;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACxC,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC9B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gFAAgF;IAChF,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7C,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChatListItemProps } from "./ChatListItem.types";
|
|
2
|
+
/**
|
|
3
|
+
* The delivery status renders in two places: before the preview ("status", WhatsApp)
|
|
4
|
+
* and next to the time ("timeStatus", Telegram). Styles show exactly one of them.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ChatListItem({ name, avatar, sender, preview, time, unreadCount, status, muted, pinned, tags, href, previewLines, appearance, recipe, adaptation, className, style, onClick, ...props }: ChatListItemProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ChatListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatListItem.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ChatListItem/ChatListItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAIhF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,WAAW,EACX,MAAM,EACN,KAAa,EACb,MAAc,EACd,IAAI,EACJ,IAAI,EACJ,YAAgB,EAChB,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAwEnB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
3
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
4
|
+
import { MutedIcon, PinIcon } from "../../icons/icons.js";
|
|
5
|
+
import { MessageStatusIcon } from "./MessageStatusIcon.js";
|
|
6
|
+
import classes from "./ChatListItem.module.css.js";
|
|
7
|
+
function ChatListItem({
|
|
8
|
+
name,
|
|
9
|
+
avatar,
|
|
10
|
+
sender,
|
|
11
|
+
preview,
|
|
12
|
+
time,
|
|
13
|
+
unreadCount,
|
|
14
|
+
status,
|
|
15
|
+
muted = false,
|
|
16
|
+
pinned = false,
|
|
17
|
+
tags,
|
|
18
|
+
href,
|
|
19
|
+
previewLines = 2,
|
|
20
|
+
appearance,
|
|
21
|
+
recipe,
|
|
22
|
+
adaptation = "host",
|
|
23
|
+
className,
|
|
24
|
+
style,
|
|
25
|
+
onClick,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
const host = useHostAppearance("ChatListItem");
|
|
29
|
+
const slot = createSlotProps(
|
|
30
|
+
{ classNames: classes },
|
|
31
|
+
recipe?.appearance,
|
|
32
|
+
adaptation === "host" ? host : void 0,
|
|
33
|
+
appearance,
|
|
34
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
35
|
+
);
|
|
36
|
+
const unread = unreadCount !== void 0 && unreadCount > 0;
|
|
37
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38
|
+
avatar && /* @__PURE__ */ jsx("span", { ...slot("avatar"), children: avatar }),
|
|
39
|
+
/* @__PURE__ */ jsxs("span", { ...slot("content"), children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("span", { ...slot("header"), children: [
|
|
41
|
+
/* @__PURE__ */ jsxs("span", { ...slot("name"), children: [
|
|
42
|
+
name,
|
|
43
|
+
muted && /* @__PURE__ */ jsx("span", { ...slot("muted"), children: /* @__PURE__ */ jsx(MutedIcon, { size: 16, title: "Без звука" }) })
|
|
44
|
+
] }),
|
|
45
|
+
status && /* @__PURE__ */ jsx(MessageStatusIcon, { ...slot("timeStatus"), status }),
|
|
46
|
+
time && /* @__PURE__ */ jsx("span", { ...slot("time"), children: time })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsxs("span", { ...slot("body"), children: [
|
|
49
|
+
status && /* @__PURE__ */ jsx(MessageStatusIcon, { ...slot("status"), status }),
|
|
50
|
+
sender && /* @__PURE__ */ jsx("span", { ...slot("sender"), children: sender }),
|
|
51
|
+
/* @__PURE__ */ jsx("span", { ...slot("preview"), "data-lines": sender ? 1 : previewLines, children: preview }),
|
|
52
|
+
unread ? /* @__PURE__ */ jsx("span", { ...slot("badge"), "aria-label": `${unreadCount} непрочитанных`, children: unreadCount > 999 ? "999+" : unreadCount }) : pinned && /* @__PURE__ */ jsx("span", { ...slot("pin"), children: /* @__PURE__ */ jsx(PinIcon, { size: 18, title: "Закреплён" }) }),
|
|
53
|
+
tags && /* @__PURE__ */ jsx("span", { ...slot("tags"), children: tags })
|
|
54
|
+
] })
|
|
55
|
+
] })
|
|
56
|
+
] });
|
|
57
|
+
const shared = {
|
|
58
|
+
...props,
|
|
59
|
+
...slot("root"),
|
|
60
|
+
"data-unread": unread,
|
|
61
|
+
"data-muted": muted,
|
|
62
|
+
"data-interactive": Boolean(href || onClick)
|
|
63
|
+
};
|
|
64
|
+
if (href) {
|
|
65
|
+
return /* @__PURE__ */ jsx("a", { ...shared, href, onClick, children: inner });
|
|
66
|
+
}
|
|
67
|
+
if (onClick) {
|
|
68
|
+
return /* @__PURE__ */ jsx("button", { ...shared, type: "button", onClick, children: inner });
|
|
69
|
+
}
|
|
70
|
+
return /* @__PURE__ */ jsx("div", { ...shared, children: inner });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
ChatListItem
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=ChatListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatListItem.js","sources":["../../../src/ui/components/ChatListItem/ChatListItem.tsx"],"sourcesContent":["import { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport { MutedIcon, PinIcon } from \"../../icons/icons\";\nimport type { ChatListItemProps, ChatListItemSlot } from \"./ChatListItem.types\";\nimport { MessageStatusIcon } from \"./MessageStatusIcon\";\nimport classes from \"./ChatListItem.module.css\";\n\n/**\n * The delivery status renders in two places: before the preview (\"status\", WhatsApp)\n * and next to the time (\"timeStatus\", Telegram). Styles show exactly one of them.\n */\nexport function ChatListItem({\n name,\n avatar,\n sender,\n preview,\n time,\n unreadCount,\n status,\n muted = false,\n pinned = false,\n tags,\n href,\n previewLines = 2,\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n onClick,\n ...props\n}: ChatListItemProps) {\n const host = useHostAppearance(\"ChatListItem\");\n const slot = createSlotProps<ChatListItemSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n const unread = unreadCount !== undefined && unreadCount > 0;\n\n const inner = (\n <>\n {avatar && <span {...slot(\"avatar\")}>{avatar}</span>}\n <span {...slot(\"content\")}>\n <span {...slot(\"header\")}>\n <span {...slot(\"name\")}>\n {name}\n {muted && (\n <span {...slot(\"muted\")}>\n <MutedIcon size={16} title=\"Без звука\" />\n </span>\n )}\n </span>\n {status && <MessageStatusIcon {...slot(\"timeStatus\")} status={status} />}\n {time && <span {...slot(\"time\")}>{time}</span>}\n </span>\n <span {...slot(\"body\")}>\n {status && <MessageStatusIcon {...slot(\"status\")} status={status} />}\n {sender && <span {...slot(\"sender\")}>{sender}</span>}\n <span {...slot(\"preview\")} data-lines={sender ? 1 : previewLines}>\n {preview}\n </span>\n {unread ? (\n <span {...slot(\"badge\")} aria-label={`${unreadCount} непрочитанных`}>\n {unreadCount > 999 ? \"999+\" : unreadCount}\n </span>\n ) : (\n pinned && (\n <span {...slot(\"pin\")}>\n <PinIcon size={18} title=\"Закреплён\" />\n </span>\n )\n )}\n {tags && <span {...slot(\"tags\")}>{tags}</span>}\n </span>\n </span>\n </>\n );\n const shared = {\n ...props,\n ...slot(\"root\"),\n \"data-unread\": unread,\n \"data-muted\": muted,\n \"data-interactive\": Boolean(href || onClick),\n };\n\n if (href) {\n return (\n <a {...shared} href={href} onClick={onClick}>\n {inner}\n </a>\n );\n }\n if (onClick) {\n return (\n <button {...shared} type=\"button\" onClick={onClick}>\n {inner}\n </button>\n );\n }\n return <div {...shared}>{inner}</div>;\n}\n"],"names":[],"mappings":";;;;;;AAWO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,OAAO,kBAAkB,cAAc;AAC7C,QAAM,OAAO;AAAA,IACX,EAAE,YAAY,QAAA;AAAA,IACd,QAAQ;AAAA,IACR,eAAe,SAAS,OAAO;AAAA,IAC/B;AAAA,IACA,EAAE,YAAY,EAAE,MAAM,aAAa,MAAM,QAAQ,EAAE,MAAM,SAAS,KAAG;AAAA,EAAE;AAEzE,QAAM,SAAS,gBAAgB,UAAa,cAAc;AAE1D,QAAM,QACJ,qBAAA,UAAA,EACG,UAAA;AAAA,IAAA,8BAAW,QAAA,EAAM,GAAG,KAAK,QAAQ,GAAI,UAAA,QAAO;AAAA,IAC7C,qBAAC,QAAA,EAAM,GAAG,KAAK,SAAS,GACtB,UAAA;AAAA,MAAA,qBAAC,QAAA,EAAM,GAAG,KAAK,QAAQ,GACrB,UAAA;AAAA,QAAA,qBAAC,QAAA,EAAM,GAAG,KAAK,MAAM,GAClB,UAAA;AAAA,UAAA;AAAA,UACA,SACC,oBAAC,QAAA,EAAM,GAAG,KAAK,OAAO,GACpB,UAAA,oBAAC,WAAA,EAAU,MAAM,IAAI,OAAM,aAAY,EAAA,CACzC;AAAA,QAAA,GAEJ;AAAA,QACC,UAAU,oBAAC,mBAAA,EAAmB,GAAG,KAAK,YAAY,GAAG,QAAgB;AAAA,QACrE,QAAQ,oBAAC,QAAA,EAAM,GAAG,KAAK,MAAM,GAAI,UAAA,KAAA,CAAK;AAAA,MAAA,GACzC;AAAA,MACA,qBAAC,QAAA,EAAM,GAAG,KAAK,MAAM,GAClB,UAAA;AAAA,QAAA,8BAAW,mBAAA,EAAmB,GAAG,KAAK,QAAQ,GAAG,QAAgB;AAAA,QACjE,UAAU,oBAAC,QAAA,EAAM,GAAG,KAAK,QAAQ,GAAI,UAAA,QAAO;AAAA,QAC7C,oBAAC,QAAA,EAAM,GAAG,KAAK,SAAS,GAAG,cAAY,SAAS,IAAI,cACjD,UAAA,QAAA,CACH;AAAA,QACC,SACC,oBAAC,QAAA,EAAM,GAAG,KAAK,OAAO,GAAG,cAAY,GAAG,WAAW,kBAChD,UAAA,cAAc,MAAM,SAAS,YAAA,CAChC,IAEA,UACE,oBAAC,QAAA,EAAM,GAAG,KAAK,KAAK,GAClB,UAAA,oBAAC,SAAA,EAAQ,MAAM,IAAI,OAAM,aAAY,GACvC;AAAA,QAGH,QAAQ,oBAAC,QAAA,EAAM,GAAG,KAAK,MAAM,GAAI,UAAA,KAAA,CAAK;AAAA,MAAA,EAAA,CACzC;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEF,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IACH,GAAG,KAAK,MAAM;AAAA,IACd,eAAe;AAAA,IACf,cAAc;AAAA,IACd,oBAAoB,QAAQ,QAAQ,OAAO;AAAA,EAAA;AAG7C,MAAI,MAAM;AACR,+BACG,KAAA,EAAG,GAAG,QAAQ,MAAY,SACxB,UAAA,OACH;AAAA,EAEJ;AACA,MAAI,SAAS;AACX,+BACG,UAAA,EAAQ,GAAG,QAAQ,MAAK,UAAS,SAC/B,UAAA,OACH;AAAA,EAEJ;AACA,SAAO,oBAAC,OAAA,EAAK,GAAG,QAAS,UAAA,OAAM;AACjC;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const root = "appss-root-hcURc";
|
|
2
|
+
const avatar = "appss-avatar-uVevp";
|
|
3
|
+
const content = "appss-content-qbARD";
|
|
4
|
+
const header = "appss-header-Qc0VR";
|
|
5
|
+
const body = "appss-body-TtkP2";
|
|
6
|
+
const sender = "appss-sender-5Kj-d";
|
|
7
|
+
const name = "appss-name-y36-0";
|
|
8
|
+
const muted = "appss-muted-E2ETu";
|
|
9
|
+
const time = "appss-time-sJUbW";
|
|
10
|
+
const status = "appss-status-vB74g";
|
|
11
|
+
const timeStatus = "appss-timeStatus-Dbitr";
|
|
12
|
+
const preview = "appss-preview-YVWYC";
|
|
13
|
+
const badge = "appss-badge-I8VGA";
|
|
14
|
+
const pin = "appss-pin-bCYG1";
|
|
15
|
+
const tags = "appss-tags-1AkvT";
|
|
16
|
+
const classes = {
|
|
17
|
+
root,
|
|
18
|
+
avatar,
|
|
19
|
+
content,
|
|
20
|
+
header,
|
|
21
|
+
body,
|
|
22
|
+
sender,
|
|
23
|
+
name,
|
|
24
|
+
muted,
|
|
25
|
+
time,
|
|
26
|
+
status,
|
|
27
|
+
timeStatus,
|
|
28
|
+
preview,
|
|
29
|
+
badge,
|
|
30
|
+
pin,
|
|
31
|
+
tags
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
avatar,
|
|
35
|
+
badge,
|
|
36
|
+
body,
|
|
37
|
+
content,
|
|
38
|
+
classes as default,
|
|
39
|
+
header,
|
|
40
|
+
muted,
|
|
41
|
+
name,
|
|
42
|
+
pin,
|
|
43
|
+
preview,
|
|
44
|
+
root,
|
|
45
|
+
sender,
|
|
46
|
+
status,
|
|
47
|
+
tags,
|
|
48
|
+
time,
|
|
49
|
+
timeStatus
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=ChatListItem.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatListItem.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|