@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,38 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type ChatListItemSlot = "root" | "avatar" | "content" | "header" | "name" | "muted" | "timeStatus" | "time" | "body" | "status" | "sender" | "preview" | "badge" | "pin" | "tags";
|
|
4
|
+
export type ChatListItemAppearance = Appearance<ChatListItemSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
ChatListItem: ChatListItemAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type ChatListItemRecipe = Recipe<"ChatListItem">;
|
|
11
|
+
export type MessageStatus = "sending" | "sent" | "delivered" | "read";
|
|
12
|
+
/** Conversation row: avatar, name, time, last message preview, unread counter. */
|
|
13
|
+
export interface ChatListItemProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
14
|
+
name: ReactNode;
|
|
15
|
+
/** Usually an Avatar. */
|
|
16
|
+
avatar?: ReactNode;
|
|
17
|
+
/** Author of the last message in a group chat, shown above the preview. */
|
|
18
|
+
sender?: ReactNode;
|
|
19
|
+
preview?: ReactNode;
|
|
20
|
+
time?: string;
|
|
21
|
+
unreadCount?: number;
|
|
22
|
+
/** Delivery state of the user's own last message. */
|
|
23
|
+
status?: MessageStatus;
|
|
24
|
+
/** Notifications are off: a muted icon after the name and a neutral counter. */
|
|
25
|
+
muted?: boolean;
|
|
26
|
+
/** Pinned chat; the pin shows when there is no unread counter. */
|
|
27
|
+
pinned?: boolean;
|
|
28
|
+
/** Folder labels under the preview, e.g. Tag components. */
|
|
29
|
+
tags?: ReactNode;
|
|
30
|
+
/** Opens the chat as a link; with onClick it renders a button, otherwise a static row. */
|
|
31
|
+
href?: string;
|
|
32
|
+
/** Lines of preview text before truncation. */
|
|
33
|
+
previewLines?: 1 | 2;
|
|
34
|
+
appearance?: ChatListItemAppearance;
|
|
35
|
+
recipe?: ChatListItemRecipe;
|
|
36
|
+
adaptation?: "host" | "fixed";
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=ChatListItem.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatListItem.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ChatListItem/ChatListItem.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,gBAAgB,GACxB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,KAAK,GACL,MAAM,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAElE,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,YAAY,EAAE,sBAAsB,CAAC;KACtC;CACF;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAEtE,kFAAkF;AAClF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,yBAAyB;IACzB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import type { MessageStatus } from "./ChatListItem.types";
|
|
3
|
+
/** Shared by ChatListItem and MessageBubble; data-status lets recipes color "read". */
|
|
4
|
+
export declare function MessageStatusIcon({ status, ...props }: {
|
|
5
|
+
status: MessageStatus;
|
|
6
|
+
} & HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=MessageStatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageStatusIcon.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ChatListItem/MessageStatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS1D,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,GAAG,KAAK,EACT,EAAE;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,GAAG,cAAc,CAAC,eAAe,CAAC,+BAU7D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CheckIcon, DoubleCheckIcon } from "../../icons/icons.js";
|
|
3
|
+
const labels = {
|
|
4
|
+
sending: "Отправляется",
|
|
5
|
+
sent: "Отправлено",
|
|
6
|
+
delivered: "Доставлено",
|
|
7
|
+
read: "Прочитано"
|
|
8
|
+
};
|
|
9
|
+
function MessageStatusIcon({
|
|
10
|
+
status,
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx("span", { ...props, role: "img", "aria-label": labels[status], "data-status": status, children: status === "sent" || status === "sending" ? /* @__PURE__ */ jsx(CheckIcon, { size: 16, strokeWidth: 2 }) : /* @__PURE__ */ jsx(DoubleCheckIcon, { size: 16, strokeWidth: 2 }) });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
MessageStatusIcon
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MessageStatusIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageStatusIcon.js","sources":["../../../src/ui/components/ChatListItem/MessageStatusIcon.tsx"],"sourcesContent":["import type { HTMLAttributes } from \"react\";\nimport { CheckIcon, DoubleCheckIcon } from \"../../icons/icons\";\nimport type { MessageStatus } from \"./ChatListItem.types\";\n\nconst labels: Record<MessageStatus, string> = {\n sending: \"Отправляется\",\n sent: \"Отправлено\",\n delivered: \"Доставлено\",\n read: \"Прочитано\",\n};\n\n/** Shared by ChatListItem and MessageBubble; data-status lets recipes color \"read\". */\nexport function MessageStatusIcon({\n status,\n ...props\n}: { status: MessageStatus } & HTMLAttributes<HTMLSpanElement>) {\n return (\n <span {...props} role=\"img\" aria-label={labels[status]} data-status={status}>\n {status === \"sent\" || status === \"sending\" ? (\n <CheckIcon size={16} strokeWidth={2} />\n ) : (\n <DoubleCheckIcon size={16} strokeWidth={2} />\n )}\n </span>\n );\n}\n"],"names":[],"mappings":";;AAIA,MAAM,SAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,WAAW;AAAA,EACX,MAAM;AACR;AAGO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA,GAAG;AACL,GAAgE;AAC9D,SACE,oBAAC,QAAA,EAAM,GAAG,OAAO,MAAK,OAAM,cAAY,OAAO,MAAM,GAAG,eAAa,QAClE,UAAA,WAAW,UAAU,WAAW,YAC/B,oBAAC,WAAA,EAAU,MAAM,IAAI,aAAa,GAAG,IAErC,oBAAC,iBAAA,EAAgB,MAAM,IAAI,aAAa,GAAG,GAE/C;AAEJ;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DialogProps } from "./Dialog.types";
|
|
2
|
+
/** Native modal <dialog>: the browser traps focus, makes the page inert and restores focus. */
|
|
3
|
+
export declare function Dialog({ open, onClose, title, actions, placement, dismissible, appearance, recipe, adaptation, className, style, children, ...props }: DialogProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAG9D,+FAA+F;AAC/F,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAoB,EACpB,WAAkB,EAClB,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,+BA2Cb"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useId, useEffect } from "react";
|
|
3
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
4
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
5
|
+
import classes from "./Dialog.module.css.js";
|
|
6
|
+
function Dialog({
|
|
7
|
+
open,
|
|
8
|
+
onClose,
|
|
9
|
+
title,
|
|
10
|
+
actions,
|
|
11
|
+
placement = "center",
|
|
12
|
+
dismissible = true,
|
|
13
|
+
appearance,
|
|
14
|
+
recipe,
|
|
15
|
+
adaptation = "host",
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const host = useHostAppearance("Dialog");
|
|
22
|
+
const ref = useRef(null);
|
|
23
|
+
const titleId = useId();
|
|
24
|
+
const slot = createSlotProps(
|
|
25
|
+
{ classNames: classes },
|
|
26
|
+
recipe?.appearance,
|
|
27
|
+
adaptation === "host" ? host : void 0,
|
|
28
|
+
appearance,
|
|
29
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
30
|
+
);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const dialog = ref.current;
|
|
33
|
+
if (!dialog) return;
|
|
34
|
+
if (open && !dialog.open) dialog.showModal();
|
|
35
|
+
if (!open && dialog.open) dialog.close();
|
|
36
|
+
}, [open]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"dialog",
|
|
39
|
+
{
|
|
40
|
+
...props,
|
|
41
|
+
...slot("root"),
|
|
42
|
+
ref,
|
|
43
|
+
"aria-labelledby": titleId,
|
|
44
|
+
"data-placement": placement,
|
|
45
|
+
onCancel: (event) => {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
if (dismissible) onClose();
|
|
48
|
+
},
|
|
49
|
+
onClick: (event) => {
|
|
50
|
+
if (dismissible && event.target === event.currentTarget) onClose();
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */ jsxs("div", { ...slot("panel"), children: [
|
|
53
|
+
/* @__PURE__ */ jsx("h2", { ...slot("title"), id: titleId, children: title }),
|
|
54
|
+
children && /* @__PURE__ */ jsx("div", { ...slot("body"), children }),
|
|
55
|
+
actions && /* @__PURE__ */ jsx("div", { ...slot("actions"), children: actions })
|
|
56
|
+
] })
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
Dialog
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../src/ui/components/Dialog/Dialog.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from \"react\";\nimport { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { DialogProps, DialogSlot } from \"./Dialog.types\";\nimport classes from \"./Dialog.module.css\";\n\n/** Native modal <dialog>: the browser traps focus, makes the page inert and restores focus. */\nexport function Dialog({\n open,\n onClose,\n title,\n actions,\n placement = \"center\",\n dismissible = true,\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n children,\n ...props\n}: DialogProps) {\n const host = useHostAppearance(\"Dialog\");\n const ref = useRef<HTMLDialogElement>(null);\n const titleId = useId();\n const slot = createSlotProps<DialogSlot>(\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 dialog = ref.current;\n if (!dialog) return;\n if (open && !dialog.open) dialog.showModal();\n if (!open && dialog.open) dialog.close();\n }, [open]);\n\n return (\n <dialog\n {...props}\n {...slot(\"root\")}\n ref={ref}\n aria-labelledby={titleId}\n data-placement={placement}\n onCancel={(event) => {\n event.preventDefault();\n if (dismissible) onClose();\n }}\n onClick={(event) => {\n if (dismissible && event.target === event.currentTarget) onClose();\n }}\n >\n <div {...slot(\"panel\")}>\n <h2 {...slot(\"title\")} id={titleId}>\n {title}\n </h2>\n {children && <div {...slot(\"body\")}>{children}</div>}\n {actions && <div {...slot(\"actions\")}>{actions}</div>}\n </div>\n </dialog>\n );\n}\n"],"names":[],"mappings":";;;;;AAOO,SAAS,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAgB;AACd,QAAM,OAAO,kBAAkB,QAAQ;AACvC,QAAM,MAAM,OAA0B,IAAI;AAC1C,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,YAAU,MAAM;AACd,UAAM,SAAS,IAAI;AACnB,QAAI,CAAC,OAAQ;AACb,QAAI,QAAQ,CAAC,OAAO,aAAa,UAAA;AACjC,QAAI,CAAC,QAAQ,OAAO,aAAa,MAAA;AAAA,EACnC,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG,KAAK,MAAM;AAAA,MACf;AAAA,MACA,mBAAiB;AAAA,MACjB,kBAAgB;AAAA,MAChB,UAAU,CAAC,UAAU;AACnB,cAAM,eAAA;AACN,YAAI,YAAa,SAAA;AAAA,MACnB;AAAA,MACA,SAAS,CAAC,UAAU;AAClB,YAAI,eAAe,MAAM,WAAW,MAAM,cAAe,SAAA;AAAA,MAC3D;AAAA,MAEA,UAAA,qBAAC,OAAA,EAAK,GAAG,KAAK,OAAO,GACnB,UAAA;AAAA,QAAA,oBAAC,QAAI,GAAG,KAAK,OAAO,GAAG,IAAI,SACxB,UAAA,OACH;AAAA,QACC,YAAY,oBAAC,OAAA,EAAK,GAAG,KAAK,MAAM,GAAI,UAAS;AAAA,QAC7C,WAAW,oBAAC,OAAA,EAAK,GAAG,KAAK,SAAS,GAAI,UAAA,QAAA,CAAQ;AAAA,MAAA,EAAA,CACjD;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const root = "appss-root-gvRSV";
|
|
2
|
+
const panel = "appss-panel-UOALX";
|
|
3
|
+
const actions = "appss-actions-agK9u";
|
|
4
|
+
const title = "appss-title-cHdjd";
|
|
5
|
+
const body = "appss-body-UIZXU";
|
|
6
|
+
const classes = {
|
|
7
|
+
root,
|
|
8
|
+
panel,
|
|
9
|
+
actions,
|
|
10
|
+
title,
|
|
11
|
+
body
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
actions,
|
|
15
|
+
body,
|
|
16
|
+
classes as default,
|
|
17
|
+
panel,
|
|
18
|
+
root,
|
|
19
|
+
title
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Dialog.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type DialogSlot = "root" | "panel" | "title" | "body" | "actions";
|
|
4
|
+
export type DialogAppearance = Appearance<DialogSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Dialog: DialogAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type DialogRecipe = Recipe<"Dialog">;
|
|
11
|
+
export interface DialogProps extends Omit<HTMLAttributes<HTMLDialogElement>, "title"> {
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Called on Escape, backdrop click (when dismissible) and from your own buttons. */
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
title: ReactNode;
|
|
16
|
+
/** Buttons. On open the browser focuses the first focusable element; mark another with autoFocus. */
|
|
17
|
+
actions?: ReactNode;
|
|
18
|
+
/** center: modal window; bottom: sheet or consent banner. */
|
|
19
|
+
placement?: "center" | "bottom";
|
|
20
|
+
/** Escape and backdrop click close the dialog. Disable for required choices. */
|
|
21
|
+
dismissible?: boolean;
|
|
22
|
+
appearance?: DialogAppearance;
|
|
23
|
+
recipe?: DialogRecipe;
|
|
24
|
+
adaptation?: "host" | "fixed";
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Dialog.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Dialog/Dialog.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,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AACzE,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,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACnF,IAAI,EAAE,OAAO,CAAC;IACd,qFAAqF;IACrF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,qGAAqG;IACrG,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,gFAAgF;IAChF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Divider/Divider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAGjE,wBAAgB,OAAO,CAAC,EACtB,WAA0B,EAC1B,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,YAAY,+BAWd"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createSlotProps } from "../../core/appearance.js";
|
|
3
|
+
import { useHostAppearance } from "../../core/AppssProvider.js";
|
|
4
|
+
import classes from "./Divider.module.css.js";
|
|
5
|
+
function Divider({
|
|
6
|
+
orientation = "horizontal",
|
|
7
|
+
appearance,
|
|
8
|
+
recipe,
|
|
9
|
+
adaptation = "host",
|
|
10
|
+
className,
|
|
11
|
+
style,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
const host = useHostAppearance("Divider");
|
|
15
|
+
const slot = createSlotProps(
|
|
16
|
+
{ classNames: classes },
|
|
17
|
+
recipe?.appearance,
|
|
18
|
+
adaptation === "host" ? host : void 0,
|
|
19
|
+
appearance,
|
|
20
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ jsx("hr", { ...props, ...slot("root"), "aria-orientation": orientation });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
Divider
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../src/ui/components/Divider/Divider.tsx"],"sourcesContent":["import { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { DividerProps, DividerSlot } from \"./Divider.types\";\nimport classes from \"./Divider.module.css\";\n\nexport function Divider({\n orientation = \"horizontal\",\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n ...props\n}: DividerProps) {\n const host = useHostAppearance(\"Divider\");\n const slot = createSlotProps<DividerSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n\n return <hr {...props} {...slot(\"root\")} aria-orientation={orientation} />;\n}\n"],"names":[],"mappings":";;;;AAKO,SAAS,QAAQ;AAAA,EACtB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAiB;AACf,QAAM,OAAO,kBAAkB,SAAS;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,SAAO,oBAAC,QAAI,GAAG,OAAQ,GAAG,KAAK,MAAM,GAAG,oBAAkB,aAAa;AACzE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type DividerSlot = "root";
|
|
4
|
+
export type DividerAppearance = Appearance<DividerSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Divider: DividerAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type DividerRecipe = Recipe<"Divider">;
|
|
11
|
+
export interface DividerProps extends Omit<HTMLAttributes<HTMLHRElement>, "children"> {
|
|
12
|
+
orientation?: "horizontal" | "vertical";
|
|
13
|
+
appearance?: DividerAppearance;
|
|
14
|
+
recipe?: DividerRecipe;
|
|
15
|
+
adaptation?: "host" | "fixed";
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Divider.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Divider/Divider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAExD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,OAAO,EAAE,iBAAiB,CAAC;KAC5B;CACF;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC9C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC;IACnF,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IconButtonProps } from "./IconButton.types";
|
|
2
|
+
export declare function IconButton({ label, icon, variant, size, badge, pressed, appearance, recipe, adaptation, className, style, type, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/ui/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oBAAoB,CAAC;AAG1E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,OAAiB,EACjB,IAAW,EACX,KAAK,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,IAAe,EACf,GAAG,KAAK,EACT,EAAE,eAAe,+BA+BjB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 "./IconButton.module.css.js";
|
|
5
|
+
function IconButton({
|
|
6
|
+
label,
|
|
7
|
+
icon,
|
|
8
|
+
variant = "plain",
|
|
9
|
+
size = "md",
|
|
10
|
+
badge,
|
|
11
|
+
pressed,
|
|
12
|
+
appearance,
|
|
13
|
+
recipe,
|
|
14
|
+
adaptation = "host",
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
type = "button",
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
const host = useHostAppearance("IconButton");
|
|
21
|
+
const slot = createSlotProps(
|
|
22
|
+
{ classNames: classes },
|
|
23
|
+
recipe?.appearance,
|
|
24
|
+
adaptation === "host" ? host : void 0,
|
|
25
|
+
appearance,
|
|
26
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
27
|
+
);
|
|
28
|
+
const count = typeof badge === "number" && badge > 0 ? badge : void 0;
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
...props,
|
|
33
|
+
...slot("root"),
|
|
34
|
+
type,
|
|
35
|
+
"aria-label": count ? `${label} (${count})` : label,
|
|
36
|
+
"aria-pressed": pressed,
|
|
37
|
+
"data-variant": variant,
|
|
38
|
+
"data-size": size,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx("span", { ...slot("icon"), "aria-hidden": "true", children: icon }),
|
|
41
|
+
(count || badge === true) && /* @__PURE__ */ jsx("span", { ...slot("badge"), "aria-hidden": "true", "data-dot": badge === true || void 0, children: count !== void 0 && (count > 99 ? "99+" : count) })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
IconButton
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../src/ui/components/IconButton/IconButton.tsx"],"sourcesContent":["import { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { IconButtonProps, IconButtonSlot } from \"./IconButton.types\";\nimport classes from \"./IconButton.module.css\";\n\nexport function IconButton({\n label,\n icon,\n variant = \"plain\",\n size = \"md\",\n badge,\n pressed,\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n type = \"button\",\n ...props\n}: IconButtonProps) {\n const host = useHostAppearance(\"IconButton\");\n const slot = createSlotProps<IconButtonSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n const count = typeof badge === \"number\" && badge > 0 ? badge : undefined;\n\n return (\n <button\n {...props}\n {...slot(\"root\")}\n type={type}\n aria-label={count ? `${label} (${count})` : label}\n aria-pressed={pressed}\n data-variant={variant}\n data-size={size}\n >\n <span {...slot(\"icon\")} aria-hidden=\"true\">\n {icon}\n </span>\n {(count || badge === true) && (\n <span {...slot(\"badge\")} aria-hidden=\"true\" data-dot={badge === true || undefined}>\n {count !== undefined && (count > 99 ? \"99+\" : count)}\n </span>\n )}\n </button>\n );\n}\n"],"names":[],"mappings":";;;;AAKO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAoB;AAClB,QAAM,OAAO,kBAAkB,YAAY;AAC3C,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,QAAQ,OAAO,UAAU,YAAY,QAAQ,IAAI,QAAQ;AAE/D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG,KAAK,MAAM;AAAA,MACf;AAAA,MACA,cAAY,QAAQ,GAAG,KAAK,KAAK,KAAK,MAAM;AAAA,MAC5C,gBAAc;AAAA,MACd,gBAAc;AAAA,MACd,aAAW;AAAA,MAEX,UAAA;AAAA,QAAA,oBAAC,UAAM,GAAG,KAAK,MAAM,GAAG,eAAY,QACjC,UAAA,MACH;AAAA,SACE,SAAS,UAAU,SACnB,oBAAC,UAAM,GAAG,KAAK,OAAO,GAAG,eAAY,QAAO,YAAU,UAAU,QAAQ,QACrE,UAAA,UAAU,WAAc,QAAQ,KAAK,QAAQ,OAAA,CAChD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const root = "appss-root-5sxPU";
|
|
2
|
+
const icon = "appss-icon-qSaEj";
|
|
3
|
+
const badge = "appss-badge-iI9iQ";
|
|
4
|
+
const classes = {
|
|
5
|
+
root,
|
|
6
|
+
icon,
|
|
7
|
+
badge
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
badge,
|
|
11
|
+
classes as default,
|
|
12
|
+
icon,
|
|
13
|
+
root
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=IconButton.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type IconButtonSlot = "root" | "icon" | "badge";
|
|
4
|
+
export type IconButtonAppearance = Appearance<IconButtonSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
IconButton: IconButtonAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type IconButtonRecipe = Recipe<"IconButton">;
|
|
11
|
+
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "aria-label"> {
|
|
12
|
+
/** Accessible name; icon-only buttons have no visible text. */
|
|
13
|
+
label: string;
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
variant?: "plain" | "soft" | "outline" | "solid";
|
|
16
|
+
size?: "sm" | "md" | "lg";
|
|
17
|
+
/** Counter on the corner; true renders a dot. */
|
|
18
|
+
badge?: number | boolean;
|
|
19
|
+
/** Toggle state, exposed as aria-pressed. */
|
|
20
|
+
pressed?: boolean;
|
|
21
|
+
appearance?: IconButtonAppearance;
|
|
22
|
+
recipe?: IconButtonRecipe;
|
|
23
|
+
adaptation?: "host" | "fixed";
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=IconButton.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/IconButton/IconButton.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,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAE9D,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,UAAU,EAAE,oBAAoB,CAAC;KAClC;CACF;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACpD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,YAAY,CAC1B;IACC,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACjD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LikesProps } from "./Likes.types";
|
|
2
|
+
/** Two toggle buttons around a live score; pressing the active vote clears it. */
|
|
3
|
+
export declare function Likes({ score, vote, onVoteChange, upLabel, downLabel, label, formatScore, size, appearance, recipe, adaptation, className, style, ...props }: LikesProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Likes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Likes.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Likes/Likes.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AAoB3D,kFAAkF;AAClF,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,OAAoB,EACpB,SAAyB,EACzB,KAAgB,EAChB,WAA8C,EAC9C,IAAW,EACX,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,UAAU,+BA2CZ"}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 "./Likes.module.css.js";
|
|
5
|
+
const compact = new Intl.NumberFormat(void 0, { notation: "compact", maximumFractionDigits: 1 });
|
|
6
|
+
const arrow = (direction) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
width: "18",
|
|
10
|
+
height: "18",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: "2",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
style: direction === "down" ? { transform: "rotate(180deg)" } : void 0,
|
|
17
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 3 4 12h5v8h6v-8h5z" })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function Likes({
|
|
21
|
+
score,
|
|
22
|
+
vote,
|
|
23
|
+
onVoteChange,
|
|
24
|
+
upLabel = "Нравится",
|
|
25
|
+
downLabel = "Не нравится",
|
|
26
|
+
label = "Оценка",
|
|
27
|
+
formatScore = (value) => compact.format(value),
|
|
28
|
+
size = "md",
|
|
29
|
+
appearance,
|
|
30
|
+
recipe,
|
|
31
|
+
adaptation = "host",
|
|
32
|
+
className,
|
|
33
|
+
style,
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
const host = useHostAppearance("Likes");
|
|
37
|
+
const slot = createSlotProps(
|
|
38
|
+
{ classNames: classes },
|
|
39
|
+
recipe?.appearance,
|
|
40
|
+
adaptation === "host" ? host : void 0,
|
|
41
|
+
appearance,
|
|
42
|
+
{ classNames: { root: className ?? "" }, styles: { root: style ?? {} } }
|
|
43
|
+
);
|
|
44
|
+
const total = score + (vote === "up" ? 1 : vote === "down" ? -1 : 0);
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
...props,
|
|
49
|
+
...slot("root"),
|
|
50
|
+
role: "group",
|
|
51
|
+
"aria-label": label,
|
|
52
|
+
"data-vote": vote ?? "none",
|
|
53
|
+
"data-size": size,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
"button",
|
|
57
|
+
{
|
|
58
|
+
...slot("up"),
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-label": upLabel,
|
|
61
|
+
"aria-pressed": vote === "up",
|
|
62
|
+
onClick: () => onVoteChange?.(vote === "up" ? null : "up"),
|
|
63
|
+
children: arrow("up")
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx("span", { ...slot("score"), "aria-live": "polite", children: formatScore(total) }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
...slot("down"),
|
|
71
|
+
type: "button",
|
|
72
|
+
"aria-label": downLabel,
|
|
73
|
+
"aria-pressed": vote === "down",
|
|
74
|
+
onClick: () => onVoteChange?.(vote === "down" ? null : "down"),
|
|
75
|
+
children: arrow("down")
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
Likes
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=Likes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Likes.js","sources":["../../../src/ui/components/Likes/Likes.tsx"],"sourcesContent":["import { createSlotProps } from \"../../core/appearance\";\nimport { useHostAppearance } from \"../../core/AppssProvider\";\nimport type { LikesProps, LikesSlot } from \"./Likes.types\";\nimport classes from \"./Likes.module.css\";\n\nconst compact = new Intl.NumberFormat(undefined, { notation: \"compact\", maximumFractionDigits: 1 });\n\nconst arrow = (direction: \"up\" | \"down\") => (\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinejoin=\"round\"\n style={direction === \"down\" ? { transform: \"rotate(180deg)\" } : undefined}\n >\n <path d=\"M12 3 4 12h5v8h6v-8h5z\" />\n </svg>\n);\n\n/** Two toggle buttons around a live score; pressing the active vote clears it. */\nexport function Likes({\n score,\n vote,\n onVoteChange,\n upLabel = \"Нравится\",\n downLabel = \"Не нравится\",\n label = \"Оценка\",\n formatScore = (value) => compact.format(value),\n size = \"md\",\n appearance,\n recipe,\n adaptation = \"host\",\n className,\n style,\n ...props\n}: LikesProps) {\n const host = useHostAppearance(\"Likes\");\n const slot = createSlotProps<LikesSlot>(\n { classNames: classes },\n recipe?.appearance,\n adaptation === \"host\" ? host : undefined,\n appearance,\n { classNames: { root: className ?? \"\" }, styles: { root: style ?? {} } },\n );\n const total = score + (vote === \"up\" ? 1 : vote === \"down\" ? -1 : 0);\n\n return (\n <div\n {...props}\n {...slot(\"root\")}\n role=\"group\"\n aria-label={label}\n data-vote={vote ?? \"none\"}\n data-size={size}\n >\n <button\n {...slot(\"up\")}\n type=\"button\"\n aria-label={upLabel}\n aria-pressed={vote === \"up\"}\n onClick={() => onVoteChange?.(vote === \"up\" ? null : \"up\")}\n >\n {arrow(\"up\")}\n </button>\n <span {...slot(\"score\")} aria-live=\"polite\">\n {formatScore(total)}\n </span>\n <button\n {...slot(\"down\")}\n type=\"button\"\n aria-label={downLabel}\n aria-pressed={vote === \"down\"}\n onClick={() => onVoteChange?.(vote === \"down\" ? null : \"down\")}\n >\n {arrow(\"down\")}\n </button>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,UAAU,IAAI,KAAK,aAAa,QAAW,EAAE,UAAU,WAAW,uBAAuB,GAAG;AAElG,MAAM,QAAQ,CAAC,cACb;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,gBAAe;AAAA,IACf,OAAO,cAAc,SAAS,EAAE,WAAW,qBAAqB;AAAA,IAEhE,UAAA,oBAAC,QAAA,EAAK,GAAE,yBAAA,CAAyB;AAAA,EAAA;AACnC;AAIK,SAAS,MAAM;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc,CAAC,UAAU,QAAQ,OAAO,KAAK;AAAA,EAC7C,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAe;AACb,QAAM,OAAO,kBAAkB,OAAO;AACtC,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,QAAQ,SAAS,SAAS,OAAO,IAAI,SAAS,SAAS,KAAK;AAElE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG,KAAK,MAAM;AAAA,MACf,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,aAAW,QAAQ;AAAA,MACnB,aAAW;AAAA,MAEX,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAG,KAAK,IAAI;AAAA,YACb,MAAK;AAAA,YACL,cAAY;AAAA,YACZ,gBAAc,SAAS;AAAA,YACvB,SAAS,MAAM,eAAe,SAAS,OAAO,OAAO,IAAI;AAAA,YAExD,gBAAM,IAAI;AAAA,UAAA;AAAA,QAAA;AAAA,QAEb,oBAAC,QAAA,EAAM,GAAG,KAAK,OAAO,GAAG,aAAU,UAChC,UAAA,YAAY,KAAK,EAAA,CACpB;AAAA,QACA;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAG,KAAK,MAAM;AAAA,YACf,MAAK;AAAA,YACL,cAAY;AAAA,YACZ,gBAAc,SAAS;AAAA,YACvB,SAAS,MAAM,eAAe,SAAS,SAAS,OAAO,MAAM;AAAA,YAE5D,gBAAM,MAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const root = "appss-root-3UbTc";
|
|
2
|
+
const up = "appss-up-S8hf9";
|
|
3
|
+
const down = "appss-down-ZPceQ";
|
|
4
|
+
const score = "appss-score-Uh51M";
|
|
5
|
+
const classes = {
|
|
6
|
+
root,
|
|
7
|
+
up,
|
|
8
|
+
down,
|
|
9
|
+
score
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
classes as default,
|
|
13
|
+
down,
|
|
14
|
+
root,
|
|
15
|
+
score,
|
|
16
|
+
up
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Likes.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Likes.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import type { Appearance, Recipe } from "../../core/appearance";
|
|
3
|
+
export type LikesSlot = "root" | "up" | "down" | "score";
|
|
4
|
+
export type LikesAppearance = Appearance<LikesSlot>;
|
|
5
|
+
declare module "../../core/appearance" {
|
|
6
|
+
interface ComponentAppearanceMap {
|
|
7
|
+
Likes: LikesAppearance;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type LikesRecipe = Recipe<"Likes">;
|
|
11
|
+
export type Vote = "up" | "down" | null;
|
|
12
|
+
export interface LikesProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
13
|
+
/** Score without the user's own vote; the control adds it. */
|
|
14
|
+
score: number;
|
|
15
|
+
vote: Vote;
|
|
16
|
+
onVoteChange?: (vote: Vote) => void;
|
|
17
|
+
upLabel?: string;
|
|
18
|
+
downLabel?: string;
|
|
19
|
+
/** Group label for assistive technology. */
|
|
20
|
+
label?: string;
|
|
21
|
+
formatScore?: (score: number) => string;
|
|
22
|
+
size?: "sm" | "md";
|
|
23
|
+
appearance?: LikesAppearance;
|
|
24
|
+
recipe?: LikesRecipe;
|
|
25
|
+
adaptation?: "host" | "fixed";
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=Likes.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Likes.types.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Likes/Likes.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAEpD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,sBAAsB;QAC9B,KAAK,EAAE,eAAe,CAAC;KACxB;CACF;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAC1C,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;AAExC,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAClF,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { LinkProps } from "./Link.types";
|
|
2
|
+
export declare function Link({ appearance, recipe, adaptation, variant, external, leading, trailing, className, style, children, target, rel, ...props }: LinkProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Link/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,cAAc,CAAC;AAGxD,wBAAgB,IAAI,CAAC,EACnB,UAAU,EACV,MAAM,EACN,UAAmB,EACnB,OAAkB,EAClB,QAAgB,EAChB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,+BA+BX"}
|