@proyecto-viviana/ui 0.3.5 → 0.4.1
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/LICENSE +21 -0
- package/README.md +80 -157
- package/dist/ActionButton.d.ts +2 -0
- package/dist/ActionButton.d.ts.map +1 -0
- package/dist/ActionButton.js +1 -0
- package/dist/ActionButton.jsx +1 -0
- package/dist/ActionMenu.d.ts +2 -0
- package/dist/ActionMenu.d.ts.map +1 -0
- package/dist/ActionMenu.js +1 -0
- package/dist/ActionMenu.jsx +1 -0
- package/dist/Breadcrumbs.d.ts +2 -0
- package/dist/Breadcrumbs.d.ts.map +1 -0
- package/dist/Breadcrumbs.js +1 -0
- package/dist/Breadcrumbs.jsx +1 -0
- package/dist/Button.d.ts +2 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +1 -0
- package/dist/Button.jsx +1 -0
- package/dist/Calendar.d.ts +2 -0
- package/dist/Calendar.d.ts.map +1 -0
- package/dist/Calendar.js +1 -0
- package/dist/Calendar.jsx +1 -0
- package/dist/CalendarCard.d.ts +2 -0
- package/dist/CalendarCard.d.ts.map +1 -0
- package/dist/CalendarCard.js +96 -0
- package/dist/CalendarCard.js.map +1 -0
- package/dist/CalendarCard.jsx +50 -0
- package/dist/CalendarCard.jsx.map +1 -0
- package/dist/Card.d.ts +2 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.js +1 -0
- package/dist/Card.jsx +1 -0
- package/dist/CardView.d.ts +2 -0
- package/dist/CardView.d.ts.map +1 -0
- package/dist/CardView.js +1 -0
- package/dist/CardView.jsx +1 -0
- package/dist/CenterBaseline.d.ts +2 -0
- package/dist/CenterBaseline.d.ts.map +1 -0
- package/dist/CenterBaseline.js +1 -0
- package/dist/CenterBaseline.jsx +1 -0
- package/dist/Chip.d.ts +2 -0
- package/dist/Chip.d.ts.map +1 -0
- package/dist/Chip.js +2 -0
- package/dist/Chip.jsx +2 -0
- package/dist/ColorArea.d.ts +2 -0
- package/dist/ColorArea.d.ts.map +1 -0
- package/dist/ColorArea.js +1 -0
- package/dist/ColorArea.jsx +1 -0
- package/dist/ColorField.d.ts +2 -0
- package/dist/ColorField.d.ts.map +1 -0
- package/dist/ColorField.js +1 -0
- package/dist/ColorField.jsx +1 -0
- package/dist/ColorSlider.d.ts +2 -0
- package/dist/ColorSlider.d.ts.map +1 -0
- package/dist/ColorSlider.js +1 -0
- package/dist/ColorSlider.jsx +1 -0
- package/dist/ColorSwatch.d.ts +2 -0
- package/dist/ColorSwatch.d.ts.map +1 -0
- package/dist/ColorSwatch.js +1 -0
- package/dist/ColorSwatch.jsx +1 -0
- package/dist/ColorSwatchPicker.d.ts +2 -0
- package/dist/ColorSwatchPicker.d.ts.map +1 -0
- package/dist/ColorSwatchPicker.js +1 -0
- package/dist/ColorSwatchPicker.jsx +1 -0
- package/dist/ColorWheel.d.ts +2 -0
- package/dist/ColorWheel.d.ts.map +1 -0
- package/dist/ColorWheel.js +1 -0
- package/dist/ColorWheel.jsx +1 -0
- package/dist/ContrastIcon.d.ts +3 -0
- package/dist/ContrastIcon.d.ts.map +1 -0
- package/dist/ContrastIcon.js +3 -0
- package/dist/ContrastIcon.jsx +3 -0
- package/dist/Conversation.d.ts +2 -0
- package/dist/Conversation.d.ts.map +1 -0
- package/dist/Conversation.js +176 -0
- package/dist/Conversation.js.map +1 -0
- package/dist/Conversation.jsx +106 -0
- package/dist/Conversation.jsx.map +1 -0
- package/dist/Disclosure.d.ts +2 -0
- package/dist/Disclosure.d.ts.map +1 -0
- package/dist/Disclosure.js +1 -0
- package/dist/Disclosure.jsx +1 -0
- package/dist/EventCard.d.ts +2 -0
- package/dist/EventCard.d.ts.map +1 -0
- package/dist/EventCard.js +171 -0
- package/dist/EventCard.js.map +1 -0
- package/dist/EventCard.jsx +94 -0
- package/dist/EventCard.jsx.map +1 -0
- package/dist/FileTrigger.d.ts +2 -0
- package/dist/FileTrigger.d.ts.map +1 -0
- package/dist/FileTrigger.js +1 -0
- package/dist/FileTrigger.jsx +1 -0
- package/dist/GitHubIcon.d.ts +2 -0
- package/dist/GitHubIcon.d.ts.map +1 -0
- package/dist/GitHubIcon.js +1 -0
- package/dist/GitHubIcon.jsx +1 -0
- package/dist/LightenIcon.d.ts +3 -0
- package/dist/LightenIcon.d.ts.map +1 -0
- package/dist/LightenIcon.js +3 -0
- package/dist/LightenIcon.jsx +3 -0
- package/dist/LinkButton.d.ts +2 -0
- package/dist/LinkButton.d.ts.map +1 -0
- package/dist/LinkButton.js +1 -0
- package/dist/LinkButton.jsx +1 -0
- package/dist/ListView.d.ts +2 -0
- package/dist/ListView.d.ts.map +1 -0
- package/dist/ListView.js +1 -0
- package/dist/ListView.jsx +1 -0
- package/dist/Logo.d.ts +2 -0
- package/dist/Logo.d.ts.map +1 -0
- package/dist/Logo.js +116 -0
- package/dist/Logo.js.map +1 -0
- package/dist/Logo.jsx +101 -0
- package/dist/Logo.jsx.map +1 -0
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.d.ts.map +1 -0
- package/dist/Menu.js +1 -0
- package/dist/Menu.jsx +1 -0
- package/dist/PageLayout.d.ts +2 -0
- package/dist/PageLayout.d.ts.map +1 -0
- package/dist/PageLayout.js +31 -0
- package/dist/PageLayout.js.map +1 -0
- package/dist/PageLayout.jsx +23 -0
- package/dist/PageLayout.jsx.map +1 -0
- package/dist/Picker.d.ts +2 -0
- package/dist/Picker.d.ts.map +1 -0
- package/dist/Picker.js +1 -0
- package/dist/Picker.jsx +1 -0
- package/dist/ProfileCard.d.ts +2 -0
- package/dist/ProfileCard.d.ts.map +1 -0
- package/dist/ProfileCard.js +77 -0
- package/dist/ProfileCard.js.map +1 -0
- package/dist/ProfileCard.jsx +52 -0
- package/dist/ProfileCard.jsx.map +1 -0
- package/dist/ProjectCard.d.ts +2 -0
- package/dist/ProjectCard.d.ts.map +1 -0
- package/dist/ProjectCard.js +162 -0
- package/dist/ProjectCard.js.map +1 -0
- package/dist/ProjectCard.jsx +131 -0
- package/dist/ProjectCard.jsx.map +1 -0
- package/dist/Provider.d.ts +2 -0
- package/dist/Provider.d.ts.map +1 -0
- package/dist/Provider.js +1 -0
- package/dist/Provider.jsx +1 -0
- package/dist/RangeCalendar.d.ts +2 -0
- package/dist/RangeCalendar.d.ts.map +1 -0
- package/dist/RangeCalendar.js +1 -0
- package/dist/RangeCalendar.jsx +1 -0
- package/dist/SearchField.d.ts +2 -0
- package/dist/SearchField.d.ts.map +1 -0
- package/dist/SearchField.js +1 -0
- package/dist/SearchField.jsx +1 -0
- package/dist/SegmentedControl.d.ts +2 -0
- package/dist/SegmentedControl.d.ts.map +1 -0
- package/dist/SegmentedControl.js +1 -0
- package/dist/SegmentedControl.jsx +1 -0
- package/dist/Switch.d.ts +2 -0
- package/dist/Switch.d.ts.map +1 -0
- package/dist/Switch.js +1 -0
- package/dist/Switch.jsx +1 -0
- package/dist/Tabs.d.ts +2 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.js +1 -0
- package/dist/Tabs.jsx +1 -0
- package/dist/TextArea.d.ts +2 -0
- package/dist/TextArea.d.ts.map +1 -0
- package/dist/TextArea.js +1 -0
- package/dist/TextArea.jsx +1 -0
- package/dist/TextField.d.ts +2 -0
- package/dist/TextField.d.ts.map +1 -0
- package/dist/TextField.js +1 -0
- package/dist/TextField.jsx +1 -0
- package/dist/TimelineItem.d.ts +2 -0
- package/dist/TimelineItem.d.ts.map +1 -0
- package/dist/TimelineItem.js +137 -0
- package/dist/TimelineItem.js.map +1 -0
- package/dist/TimelineItem.jsx +70 -0
- package/dist/TimelineItem.jsx.map +1 -0
- package/dist/TreeView.d.ts +2 -0
- package/dist/TreeView.d.ts.map +1 -0
- package/dist/TreeView.js +1 -0
- package/dist/TreeView.jsx +1 -0
- package/dist/chip2.js +82 -0
- package/dist/chip2.js.map +1 -0
- package/dist/chip2.jsx +68 -0
- package/dist/chip2.jsx.map +1 -0
- package/dist/components.css +2 -1077
- package/dist/custom/calendar-card/index.d.ts.map +1 -1
- package/dist/custom/chip/index.d.ts +2 -2
- package/dist/custom/chip/index.d.ts.map +1 -1
- package/dist/custom/conversation/index.d.ts +2 -2
- package/dist/custom/conversation/index.d.ts.map +1 -1
- package/dist/custom/event-card/index.d.ts +1 -1
- package/dist/custom/event-card/index.d.ts.map +1 -1
- package/dist/custom/header/index.d.ts +2 -6
- package/dist/custom/header/index.d.ts.map +1 -1
- package/dist/custom/lateral-nav/index.d.ts +1 -1
- package/dist/custom/lateral-nav/index.d.ts.map +1 -1
- package/dist/custom/logo/index.d.ts +1 -18
- package/dist/custom/logo/index.d.ts.map +1 -1
- package/dist/custom/nav-header/index.d.ts +2 -1
- package/dist/custom/nav-header/index.d.ts.map +1 -1
- package/dist/custom/page-layout/index.d.ts +1 -7
- package/dist/custom/page-layout/index.d.ts.map +1 -1
- package/dist/custom/profile-card/index.d.ts +1 -1
- package/dist/custom/profile-card/index.d.ts.map +1 -1
- package/dist/custom/project-card/index.d.ts +2 -13
- package/dist/custom/project-card/index.d.ts.map +1 -1
- package/dist/custom/timeline-item/index.d.ts +2 -2
- package/dist/custom/timeline-item/index.d.ts.map +1 -1
- package/dist/font-faces.css +1 -0
- package/dist/index.d.ts +1 -104
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -8222
- package/dist/index.jsx +1 -0
- package/dist/style/runtime.d.ts +2 -0
- package/dist/style/runtime.d.ts.map +1 -0
- package/dist/style/runtime.js +1 -0
- package/dist/style/runtime.jsx +1 -0
- package/dist/style.d.ts +2 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +1 -0
- package/dist/style.jsx +1 -0
- package/dist/styles.css +9 -450
- package/dist/theme.css +2 -101
- package/dist/vite.d.ts +16 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +82 -0
- package/dist/vite.js.map +1 -0
- package/dist/vite.jsx +82 -0
- package/dist/vite.jsx.map +1 -0
- package/dist/viviana-tokens.css +318 -0
- package/package.json +300 -44
- package/src/ActionButton.ts +1 -0
- package/src/ActionMenu.ts +1 -0
- package/src/Breadcrumbs.ts +1 -0
- package/src/Button.ts +1 -0
- package/src/Calendar.ts +1 -0
- package/src/CalendarCard.ts +1 -0
- package/src/Card.ts +1 -0
- package/src/CardView.ts +1 -0
- package/src/CenterBaseline.ts +1 -0
- package/src/Chip.ts +1 -0
- package/src/ColorArea.ts +1 -0
- package/src/ColorField.ts +1 -0
- package/src/ColorSlider.ts +1 -0
- package/src/ColorSwatch.ts +1 -0
- package/src/ColorSwatchPicker.ts +1 -0
- package/src/ColorWheel.ts +1 -0
- package/src/ContrastIcon.ts +2 -0
- package/src/Conversation.ts +1 -0
- package/src/Disclosure.ts +1 -0
- package/src/EventCard.ts +1 -0
- package/src/FileTrigger.ts +1 -0
- package/src/GitHubIcon.ts +1 -0
- package/src/LightenIcon.ts +2 -0
- package/src/LinkButton.ts +1 -0
- package/src/ListView.ts +1 -0
- package/src/Logo.ts +1 -0
- package/src/Menu.ts +1 -0
- package/src/PageLayout.ts +1 -0
- package/src/Picker.ts +1 -0
- package/src/ProfileCard.ts +1 -0
- package/src/ProjectCard.ts +1 -0
- package/src/Provider.ts +1 -0
- package/src/RangeCalendar.ts +1 -0
- package/src/SearchField.ts +1 -0
- package/src/SegmentedControl.ts +1 -0
- package/src/Switch.ts +1 -0
- package/src/Tabs.ts +1 -0
- package/src/TextArea.ts +1 -0
- package/src/TextField.ts +1 -0
- package/src/TimelineItem.ts +1 -0
- package/src/TreeView.ts +1 -0
- package/src/components.css +2 -1077
- package/src/custom/calendar-card/index.tsx +108 -50
- package/src/custom/chip/index.tsx +63 -27
- package/src/custom/conversation/index.tsx +166 -55
- package/src/custom/event-card/index.tsx +195 -74
- package/src/custom/header/index.tsx +64 -33
- package/src/custom/lateral-nav/index.tsx +93 -38
- package/src/custom/logo/index.tsx +41 -39
- package/src/custom/nav-header/index.tsx +89 -25
- package/src/custom/page-layout/index.tsx +23 -19
- package/src/custom/profile-card/index.tsx +94 -35
- package/src/custom/project-card/index.tsx +57 -40
- package/src/custom/timeline-item/index.tsx +91 -48
- package/src/font-faces.css +1 -0
- package/src/index.ts +8 -322
- package/src/style/runtime.ts +2 -0
- package/src/style.ts +5 -0
- package/src/styles.css +6 -450
- package/src/theme.css +2 -101
- package/src/vite.ts +164 -0
- package/src/viviana-tokens.css +318 -0
- package/dist/alert/index.d.ts +0 -12
- package/dist/alert/index.d.ts.map +0 -1
- package/dist/autocomplete/index.d.ts +0 -89
- package/dist/autocomplete/index.d.ts.map +0 -1
- package/dist/avatar/index.d.ts +0 -17
- package/dist/avatar/index.d.ts.map +0 -1
- package/dist/badge/index.d.ts +0 -12
- package/dist/badge/index.d.ts.map +0 -1
- package/dist/breadcrumbs/index.d.ts +0 -38
- package/dist/breadcrumbs/index.d.ts.map +0 -1
- package/dist/button/Button.d.ts +0 -19
- package/dist/button/Button.d.ts.map +0 -1
- package/dist/button/index.d.ts +0 -3
- package/dist/button/index.d.ts.map +0 -1
- package/dist/button/types.d.ts +0 -23
- package/dist/button/types.d.ts.map +0 -1
- package/dist/calendar/DateField.d.ts +0 -47
- package/dist/calendar/DateField.d.ts.map +0 -1
- package/dist/calendar/DatePicker.d.ts +0 -48
- package/dist/calendar/DatePicker.d.ts.map +0 -1
- package/dist/calendar/RangeCalendar.d.ts +0 -42
- package/dist/calendar/RangeCalendar.d.ts.map +0 -1
- package/dist/calendar/TimeField.d.ts +0 -44
- package/dist/calendar/TimeField.d.ts.map +0 -1
- package/dist/calendar/index.d.ts +0 -50
- package/dist/calendar/index.d.ts.map +0 -1
- package/dist/checkbox/index.d.ts +0 -43
- package/dist/checkbox/index.d.ts.map +0 -1
- package/dist/color/index.d.ts +0 -228
- package/dist/color/index.d.ts.map +0 -1
- package/dist/combobox/index.d.ts +0 -81
- package/dist/combobox/index.d.ts.map +0 -1
- package/dist/dialog/Dialog.d.ts +0 -67
- package/dist/dialog/Dialog.d.ts.map +0 -1
- package/dist/dialog/index.d.ts +0 -3
- package/dist/dialog/index.d.ts.map +0 -1
- package/dist/disclosure/index.d.ts +0 -84
- package/dist/disclosure/index.d.ts.map +0 -1
- package/dist/gridlist/index.d.ts +0 -92
- package/dist/gridlist/index.d.ts.map +0 -1
- package/dist/icon/icons/GitHubIcon.d.ts +0 -7
- package/dist/icon/icons/GitHubIcon.d.ts.map +0 -1
- package/dist/icon/index.d.ts +0 -28
- package/dist/icon/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/index.ssr.js +0 -6631
- package/dist/index.ssr.js.map +0 -7
- package/dist/landmark/index.d.ts +0 -83
- package/dist/landmark/index.d.ts.map +0 -1
- package/dist/link/index.d.ts +0 -39
- package/dist/link/index.d.ts.map +0 -1
- package/dist/listbox/index.d.ts +0 -47
- package/dist/listbox/index.d.ts.map +0 -1
- package/dist/menu/index.d.ts +0 -74
- package/dist/menu/index.d.ts.map +0 -1
- package/dist/meter/index.d.ts +0 -49
- package/dist/meter/index.d.ts.map +0 -1
- package/dist/numberfield/index.d.ts +0 -50
- package/dist/numberfield/index.d.ts.map +0 -1
- package/dist/popover/index.d.ts +0 -85
- package/dist/popover/index.d.ts.map +0 -1
- package/dist/progress-bar/index.d.ts +0 -49
- package/dist/progress-bar/index.d.ts.map +0 -1
- package/dist/radio/index.d.ts +0 -46
- package/dist/radio/index.d.ts.map +0 -1
- package/dist/searchfield/index.d.ts +0 -44
- package/dist/searchfield/index.d.ts.map +0 -1
- package/dist/select/index.d.ts +0 -72
- package/dist/select/index.d.ts.map +0 -1
- package/dist/separator/index.d.ts +0 -42
- package/dist/separator/index.d.ts.map +0 -1
- package/dist/slider/index.d.ts +0 -53
- package/dist/slider/index.d.ts.map +0 -1
- package/dist/switch/ToggleSwitch.d.ts +0 -28
- package/dist/switch/ToggleSwitch.d.ts.map +0 -1
- package/dist/switch/index.d.ts +0 -26
- package/dist/switch/index.d.ts.map +0 -1
- package/dist/table/index.d.ts +0 -140
- package/dist/table/index.d.ts.map +0 -1
- package/dist/tabs/index.d.ts +0 -56
- package/dist/tabs/index.d.ts.map +0 -1
- package/dist/tag-group/index.d.ts +0 -80
- package/dist/tag-group/index.d.ts.map +0 -1
- package/dist/test-utils/index.d.ts +0 -44
- package/dist/test-utils/index.d.ts.map +0 -1
- package/dist/textfield/index.d.ts +0 -31
- package/dist/textfield/index.d.ts.map +0 -1
- package/dist/toast/index.d.ts +0 -101
- package/dist/toast/index.d.ts.map +0 -1
- package/dist/toolbar/index.d.ts +0 -42
- package/dist/toolbar/index.d.ts.map +0 -1
- package/dist/tooltip/index.d.ts +0 -78
- package/dist/tooltip/index.d.ts.map +0 -1
- package/dist/tree/index.d.ts +0 -99
- package/dist/tree/index.d.ts.map +0 -1
- package/src/alert/index.tsx +0 -48
- package/src/assets/favicon.png +0 -0
- package/src/assets/fire.gif +0 -0
- package/src/autocomplete/index.tsx +0 -313
- package/src/avatar/index.tsx +0 -75
- package/src/badge/index.tsx +0 -43
- package/src/breadcrumbs/index.tsx +0 -207
- package/src/button/Button.tsx +0 -74
- package/src/button/index.ts +0 -2
- package/src/button/types.ts +0 -24
- package/src/calendar/DateField.tsx +0 -200
- package/src/calendar/DatePicker.tsx +0 -298
- package/src/calendar/RangeCalendar.tsx +0 -236
- package/src/calendar/TimeField.tsx +0 -196
- package/src/calendar/index.tsx +0 -223
- package/src/checkbox/index.tsx +0 -257
- package/src/color/index.tsx +0 -687
- package/src/combobox/index.tsx +0 -383
- package/src/dialog/Dialog.tsx +0 -260
- package/src/dialog/index.tsx +0 -3
- package/src/disclosure/index.tsx +0 -307
- package/src/gridlist/index.tsx +0 -403
- package/src/icon/icons/GitHubIcon.tsx +0 -20
- package/src/icon/index.tsx +0 -48
- package/src/landmark/index.tsx +0 -231
- package/src/link/index.tsx +0 -130
- package/src/listbox/index.tsx +0 -231
- package/src/menu/index.tsx +0 -297
- package/src/meter/index.tsx +0 -163
- package/src/numberfield/index.tsx +0 -482
- package/src/popover/index.tsx +0 -260
- package/src/progress-bar/index.tsx +0 -169
- package/src/radio/index.tsx +0 -173
- package/src/searchfield/index.tsx +0 -453
- package/src/select/index.tsx +0 -349
- package/src/separator/index.tsx +0 -141
- package/src/slider/index.tsx +0 -382
- package/src/switch/ToggleSwitch.tsx +0 -112
- package/src/switch/index.tsx +0 -90
- package/src/table/index.tsx +0 -531
- package/src/tabs/index.tsx +0 -273
- package/src/tag-group/index.tsx +0 -240
- package/src/test-utils/index.ts +0 -40
- package/src/textfield/index.tsx +0 -211
- package/src/toast/index.tsx +0 -324
- package/src/toolbar/index.tsx +0 -108
- package/src/tooltip/index.tsx +0 -197
- package/src/tree/index.tsx +0 -494
|
@@ -1,66 +1,124 @@
|
|
|
1
|
-
import { Show, For } from
|
|
2
|
-
import { Chip } from
|
|
1
|
+
import { Show, For } from "solid-js";
|
|
2
|
+
import { Chip } from "../chip";
|
|
3
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
4
|
+
// src/style.ts). A horizontal "followed calendar" card: square thumbnail +
|
|
5
|
+
// title + followers line + tag chips, on the S2 ramps in Silapse colors.
|
|
6
|
+
import { style } from "../../style" with { type: "macro" };
|
|
3
7
|
|
|
4
8
|
export interface CalendarCardProps {
|
|
5
|
-
title: string
|
|
6
|
-
image?: string
|
|
7
|
-
tags?: string[]
|
|
8
|
-
followers?: { name: string }[]
|
|
9
|
-
followerCount?: number
|
|
10
|
-
class?: string
|
|
9
|
+
title: string;
|
|
10
|
+
image?: string;
|
|
11
|
+
tags?: string[];
|
|
12
|
+
followers?: { name: string }[];
|
|
13
|
+
followerCount?: number;
|
|
14
|
+
class?: string;
|
|
11
15
|
}
|
|
12
16
|
|
|
17
|
+
const card = style({
|
|
18
|
+
display: "flex",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
gap: 12,
|
|
21
|
+
width: "full",
|
|
22
|
+
maxWidth: 500,
|
|
23
|
+
padding: 12,
|
|
24
|
+
borderRadius: "xl",
|
|
25
|
+
borderWidth: 2,
|
|
26
|
+
borderStyle: "solid",
|
|
27
|
+
borderColor: "[var(--color-primary-600)]",
|
|
28
|
+
backgroundColor: "[var(--color-bg-300)]",
|
|
29
|
+
boxShadow: "elevated",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const thumb = style({
|
|
33
|
+
width: 80,
|
|
34
|
+
height: 80,
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
objectFit: "cover",
|
|
37
|
+
borderRadius: "lg",
|
|
38
|
+
borderWidth: 2,
|
|
39
|
+
borderStyle: "solid",
|
|
40
|
+
borderColor: "[var(--color-accent)]",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const body = style({
|
|
44
|
+
display: "flex",
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
gap: 8,
|
|
47
|
+
flexGrow: 1,
|
|
48
|
+
minWidth: 0,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const title = style({
|
|
52
|
+
font: "heading-sm",
|
|
53
|
+
color: "[var(--color-primary-100)]",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
textOverflow: "ellipsis",
|
|
56
|
+
whiteSpace: "nowrap",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const followers = style({
|
|
60
|
+
font: "ui-sm",
|
|
61
|
+
color: "[var(--color-text-secondary)]",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const followerName = style({
|
|
65
|
+
fontWeight: "bold",
|
|
66
|
+
// WCAG AA fix: the follower names sit on the `--color-bg-300` card. They are
|
|
67
|
+
// small text (`ui-sm`, inherited), so the 4.5:1 normal-text floor applies.
|
|
68
|
+
// `--color-accent` (#df5c9a) is a fixed pink in both themes and read only
|
|
69
|
+
// 2.42:1 on the light-blue card (5.08:1 dark); no pink ramp step clears 4.5:1
|
|
70
|
+
// on both the dark-grey and light-blue card (`--color-accent-500` is 4.39:1
|
|
71
|
+
// dark — a hair under). The names keep their emphasis via `fontWeight: bold`
|
|
72
|
+
// against the secondary-grey connectors and take the flipping `--color-text`,
|
|
73
|
+
// which clears 4.5:1 both ways (17.40:1 dark / 9.63:1 light). The card's pink
|
|
74
|
+
// accent moment stays on the thumbnail border (bears no text).
|
|
75
|
+
color: "[var(--color-text)]",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const tags = style({
|
|
79
|
+
display: "flex",
|
|
80
|
+
flexWrap: "wrap",
|
|
81
|
+
gap: 4,
|
|
82
|
+
});
|
|
83
|
+
|
|
13
84
|
export function CalendarCard(props: CalendarCardProps) {
|
|
14
|
-
const displayedFollowers = () => props.followers?.slice(0, 2) ?? []
|
|
85
|
+
const displayedFollowers = () => props.followers?.slice(0, 2) ?? [];
|
|
15
86
|
const remainingCount = () => {
|
|
16
|
-
const total = props.followerCount ?? props.followers?.length ?? 0
|
|
17
|
-
const displayed = displayedFollowers().length
|
|
18
|
-
return total - displayed
|
|
19
|
-
}
|
|
87
|
+
const total = props.followerCount ?? props.followers?.length ?? 0;
|
|
88
|
+
const displayed = displayedFollowers().length;
|
|
89
|
+
return total - displayed;
|
|
90
|
+
};
|
|
20
91
|
|
|
21
92
|
return (
|
|
22
|
-
<div class={
|
|
93
|
+
<div class={`${card} ${props.class ?? ""}`}>
|
|
23
94
|
<Show when={props.image}>
|
|
24
|
-
<
|
|
25
|
-
<img src={props.image} alt={props.title} class="h-full w-full object-cover" />
|
|
26
|
-
</div>
|
|
95
|
+
<img class={thumb} src={props.image} alt={props.title} />
|
|
27
96
|
</Show>
|
|
28
|
-
<div class=
|
|
97
|
+
<div class={body}>
|
|
98
|
+
<span class={title}>{props.title}</span>
|
|
99
|
+
<Show when={displayedFollowers().length > 0}>
|
|
100
|
+
<span class={followers}>
|
|
101
|
+
seguida por{" "}
|
|
102
|
+
<For each={displayedFollowers()}>
|
|
103
|
+
{(follower, index) => (
|
|
104
|
+
<>
|
|
105
|
+
<span class={followerName}>{follower.name}</span>
|
|
106
|
+
{index() < displayedFollowers().length - 1 && ", "}
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
</For>
|
|
110
|
+
<Show when={remainingCount() > 0}>
|
|
111
|
+
{" "}
|
|
112
|
+
y <span class={followerName}>{remainingCount()} más</span>
|
|
113
|
+
</Show>
|
|
114
|
+
</span>
|
|
115
|
+
</Show>
|
|
29
116
|
<Show when={props.tags && props.tags.length > 0}>
|
|
30
|
-
<div class=
|
|
31
|
-
<
|
|
32
|
-
<For each={props.tags}>
|
|
33
|
-
{(tag) => <Chip text={tag} variant="primary" />}
|
|
34
|
-
</For>
|
|
35
|
-
</div>
|
|
117
|
+
<div class={tags}>
|
|
118
|
+
<For each={props.tags}>{(tag) => <Chip text={tag} variant="primary" />}</For>
|
|
36
119
|
</div>
|
|
37
120
|
</Show>
|
|
38
|
-
<div class="flex h-full flex-col items-end justify-center pb-3 pr-5 pt-2">
|
|
39
|
-
<div class="flex flex-1">
|
|
40
|
-
<span class="text-lg font-semibold text-white drop-shadow-sm">
|
|
41
|
-
{props.title}
|
|
42
|
-
</span>
|
|
43
|
-
</div>
|
|
44
|
-
<Show when={displayedFollowers().length > 0}>
|
|
45
|
-
<div class="flex flex-1">
|
|
46
|
-
<span class="text-base font-normal text-primary-500">
|
|
47
|
-
seguida por{' '}
|
|
48
|
-
<For each={displayedFollowers()}>
|
|
49
|
-
{(follower, index) => (
|
|
50
|
-
<>
|
|
51
|
-
<span class="font-semibold text-accent-200">{follower.name}</span>
|
|
52
|
-
{index() < displayedFollowers().length - 1 && ', '}
|
|
53
|
-
</>
|
|
54
|
-
)}
|
|
55
|
-
</For>
|
|
56
|
-
<Show when={remainingCount() > 0}>
|
|
57
|
-
{' '}y <span class="font-semibold text-accent-200">{remainingCount()} más</span>
|
|
58
|
-
</Show>
|
|
59
|
-
</span>
|
|
60
|
-
</div>
|
|
61
|
-
</Show>
|
|
62
|
-
</div>
|
|
63
121
|
</div>
|
|
64
122
|
</div>
|
|
65
|
-
)
|
|
123
|
+
);
|
|
66
124
|
}
|
|
@@ -1,46 +1,82 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { Show } from "solid-js";
|
|
3
|
+
import { Button as HeadlessButton } from "@proyecto-viviana/solidaria-components";
|
|
4
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
5
|
+
// src/style.ts). S2 named tokens carry the shape (mirrors Badge's size-S
|
|
6
|
+
// control: minHeight 24, 2px border, ui-sm font, pill radius); Silapse colors
|
|
7
|
+
// ride in as arbitrary `[var(--color-*)]` values.
|
|
8
|
+
import { style } from "../../style" with { type: "macro" };
|
|
2
9
|
|
|
3
|
-
export type ChipVariant =
|
|
10
|
+
export type ChipVariant = "primary" | "secondary" | "accent" | "outline";
|
|
4
11
|
|
|
5
12
|
export interface ChipProps {
|
|
6
|
-
text: string
|
|
7
|
-
variant?: ChipVariant
|
|
8
|
-
onClick?: () => void
|
|
13
|
+
text: string;
|
|
14
|
+
variant?: ChipVariant;
|
|
15
|
+
onClick?: () => void;
|
|
9
16
|
/**
|
|
10
17
|
* Icon to display before the text.
|
|
11
18
|
* Use a function returning JSX for SSR compatibility: `icon={() => <MyIcon />}`
|
|
12
19
|
* Or pass a simple string for text-based icons: `icon="★"`
|
|
13
20
|
*/
|
|
14
|
-
icon?: string | (() => JSX.Element)
|
|
15
|
-
class?: string
|
|
21
|
+
icon?: string | (() => JSX.Element);
|
|
22
|
+
class?: string;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
const chip = style<{ variant: ChipVariant }>({
|
|
26
|
+
display: "inline-flex",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
columnGap: "text-to-visual",
|
|
30
|
+
minHeight: 24,
|
|
31
|
+
width: "fit",
|
|
32
|
+
paddingX: 12,
|
|
33
|
+
borderRadius: "full",
|
|
34
|
+
borderStyle: "solid",
|
|
35
|
+
borderWidth: 2,
|
|
36
|
+
font: "ui-sm",
|
|
37
|
+
borderColor: {
|
|
38
|
+
default: "transparent",
|
|
39
|
+
variant: { outline: "[var(--color-primary-600)]" },
|
|
40
|
+
},
|
|
41
|
+
backgroundColor: {
|
|
42
|
+
variant: {
|
|
43
|
+
primary: "[var(--color-primary-700)]",
|
|
44
|
+
secondary: "[var(--color-bg-100)]",
|
|
45
|
+
accent: "[var(--color-accent)]",
|
|
46
|
+
outline: "transparent",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
color: {
|
|
50
|
+
variant: {
|
|
51
|
+
primary: "[var(--color-primary-100)]",
|
|
52
|
+
secondary: "[var(--color-primary-200)]",
|
|
53
|
+
// WCAG AA fix: accent text on the pink accent fill. The near-white
|
|
54
|
+
// `--color-bg-400` gave only 2.74:1 in light mode (fail); the darkest
|
|
55
|
+
// grey token reaches 5.24:1 light / 6.14:1 dark — the smallest existing-
|
|
56
|
+
// token change that clears the 4.5:1 floor for this ui-sm label.
|
|
57
|
+
accent: "[var(--color-grey-900)]",
|
|
58
|
+
outline: "[var(--color-primary-200)]",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
24
62
|
|
|
25
63
|
export function Chip(props: ChipProps) {
|
|
26
|
-
const variant = () => props.variant ?? 'primary'
|
|
27
|
-
|
|
28
64
|
const renderIcon = () => {
|
|
29
|
-
const icon = props.icon
|
|
30
|
-
if (!icon) return null
|
|
31
|
-
if (typeof icon ===
|
|
32
|
-
return icon()
|
|
33
|
-
}
|
|
65
|
+
const icon = props.icon;
|
|
66
|
+
if (!icon) return null;
|
|
67
|
+
if (typeof icon === "string") return icon;
|
|
68
|
+
return icon();
|
|
69
|
+
};
|
|
34
70
|
|
|
35
71
|
return (
|
|
36
|
-
<
|
|
37
|
-
class={
|
|
38
|
-
|
|
72
|
+
<HeadlessButton
|
|
73
|
+
class={`${chip({ variant: props.variant ?? "primary" })} ${props.class ?? ""}`}
|
|
74
|
+
onPress={() => props.onClick?.()}
|
|
39
75
|
>
|
|
40
76
|
<Show when={props.icon}>
|
|
41
|
-
<span
|
|
77
|
+
<span>{renderIcon()}</span>
|
|
42
78
|
</Show>
|
|
43
|
-
|
|
44
|
-
</
|
|
45
|
-
)
|
|
79
|
+
{props.text}
|
|
80
|
+
</HeadlessButton>
|
|
81
|
+
);
|
|
46
82
|
}
|
|
@@ -1,96 +1,207 @@
|
|
|
1
|
-
import { Show, For } from
|
|
2
|
-
import { Avatar } from
|
|
1
|
+
import { Show, For } from "solid-js";
|
|
2
|
+
import { Avatar } from "@proyecto-viviana/solid-spectrum";
|
|
3
|
+
import { Button as HeadlessButton } from "@proyecto-viviana/solidaria-components";
|
|
4
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
5
|
+
// src/style.ts). A conversation preview row, message bubbles, and a thread
|
|
6
|
+
// list, on the S2 spacing/radius ramps in Silapse colors.
|
|
7
|
+
import { style } from "../../style" with { type: "macro" };
|
|
3
8
|
|
|
4
9
|
export interface Message {
|
|
5
|
-
id: string
|
|
6
|
-
content: string
|
|
7
|
-
sender:
|
|
8
|
-
timestamp?: string
|
|
10
|
+
id: string;
|
|
11
|
+
content: string;
|
|
12
|
+
sender: "user" | "other";
|
|
13
|
+
timestamp?: string;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
16
|
export interface ConversationPreviewProps {
|
|
12
17
|
user: {
|
|
13
|
-
name: string
|
|
14
|
-
avatar?: string
|
|
15
|
-
online?: boolean
|
|
16
|
-
}
|
|
17
|
-
lastMessage?: string
|
|
18
|
-
unreadCount?: number
|
|
19
|
-
timestamp?: string
|
|
20
|
-
onClick?: () => void
|
|
21
|
-
class?: string
|
|
18
|
+
name: string;
|
|
19
|
+
avatar?: string;
|
|
20
|
+
online?: boolean;
|
|
21
|
+
};
|
|
22
|
+
lastMessage?: string;
|
|
23
|
+
unreadCount?: number;
|
|
24
|
+
timestamp?: string;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
class?: string;
|
|
22
27
|
}
|
|
23
28
|
|
|
29
|
+
const preview = style({
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
gap: 12,
|
|
33
|
+
width: "full",
|
|
34
|
+
padding: 12,
|
|
35
|
+
borderRadius: "lg",
|
|
36
|
+
textAlign: "start",
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
backgroundColor: "transparent",
|
|
39
|
+
borderStyle: "none",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const previewBody = style({
|
|
43
|
+
display: "flex",
|
|
44
|
+
flexDirection: "column",
|
|
45
|
+
gap: 2,
|
|
46
|
+
flexGrow: 1,
|
|
47
|
+
minWidth: 0,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const previewTop = style({
|
|
51
|
+
display: "flex",
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
justifyContent: "space-between",
|
|
54
|
+
gap: 8,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const previewName = style({
|
|
58
|
+
font: "ui",
|
|
59
|
+
fontWeight: "bold",
|
|
60
|
+
color: "[var(--color-primary-100)]",
|
|
61
|
+
overflow: "hidden",
|
|
62
|
+
textOverflow: "ellipsis",
|
|
63
|
+
whiteSpace: "nowrap",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const previewTime = style({
|
|
67
|
+
font: "detail-sm",
|
|
68
|
+
// `--color-text-muted` renders ~1.7:1 light / ~2.4:1 dark on the `bg-200`
|
|
69
|
+
// panel (fails AA both modes); the flipping `--color-text` clears it. Muting
|
|
70
|
+
// is carried by the smaller `detail-sm` size, not a sub-AA color.
|
|
71
|
+
color: "[var(--color-text)]",
|
|
72
|
+
flexShrink: 0,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const previewMessage = style({
|
|
76
|
+
font: "ui-sm",
|
|
77
|
+
// `--color-text-secondary` renders 3.84:1 on the light `bg-200` panel (fails
|
|
78
|
+
// the 4.5 small-text floor); the flipping `--color-text` clears both themes.
|
|
79
|
+
color: "[var(--color-text)]",
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
textOverflow: "ellipsis",
|
|
82
|
+
whiteSpace: "nowrap",
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const unread = style({
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
justifyContent: "center",
|
|
89
|
+
flexShrink: 0,
|
|
90
|
+
width: 20,
|
|
91
|
+
height: 20,
|
|
92
|
+
borderRadius: "full",
|
|
93
|
+
font: "detail-sm",
|
|
94
|
+
fontWeight: "bold",
|
|
95
|
+
backgroundColor: "[var(--color-accent)]",
|
|
96
|
+
// Text on the non-flipping pink `--color-accent` fill: the near-white
|
|
97
|
+
// `--color-bg-400` gives only 2.74:1 in light mode (fail). `--color-grey-900`
|
|
98
|
+
// (the darkest token) reaches ~5.2:1 light / ~6.1:1 dark — the Chip accent-fill
|
|
99
|
+
// resolution.
|
|
100
|
+
color: "[var(--color-grey-900)]",
|
|
101
|
+
});
|
|
102
|
+
|
|
24
103
|
export function ConversationPreview(props: ConversationPreviewProps) {
|
|
25
104
|
return (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
105
|
+
<HeadlessButton
|
|
106
|
+
type="button"
|
|
107
|
+
class={`${preview} ${props.class ?? ""}`}
|
|
108
|
+
onPress={() => props.onClick?.()}
|
|
29
109
|
>
|
|
30
|
-
<Avatar
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
size="md"
|
|
35
|
-
/>
|
|
36
|
-
<div class="flex-1 min-w-0">
|
|
37
|
-
<div class="flex items-center justify-between">
|
|
38
|
-
<span class="font-semibold text-primary-100 truncate">{props.user.name}</span>
|
|
110
|
+
<Avatar src={props.user.avatar} alt={props.user.name} online={props.user.online} size="md" />
|
|
111
|
+
<div class={previewBody}>
|
|
112
|
+
<div class={previewTop}>
|
|
113
|
+
<span class={previewName}>{props.user.name}</span>
|
|
39
114
|
<Show when={props.timestamp}>
|
|
40
|
-
<span class=
|
|
115
|
+
<span class={previewTime}>{props.timestamp}</span>
|
|
41
116
|
</Show>
|
|
42
117
|
</div>
|
|
43
118
|
<Show when={props.lastMessage}>
|
|
44
|
-
<p class=
|
|
119
|
+
<p class={previewMessage}>{props.lastMessage}</p>
|
|
45
120
|
</Show>
|
|
46
121
|
</div>
|
|
47
122
|
<Show when={props.unreadCount && props.unreadCount > 0}>
|
|
48
|
-
<span class=
|
|
49
|
-
{props.unreadCount}
|
|
50
|
-
</span>
|
|
123
|
+
<span class={unread}>{props.unreadCount}</span>
|
|
51
124
|
</Show>
|
|
52
|
-
</
|
|
53
|
-
)
|
|
125
|
+
</HeadlessButton>
|
|
126
|
+
);
|
|
54
127
|
}
|
|
55
128
|
|
|
56
129
|
export interface ConversationBubbleProps {
|
|
57
|
-
content: string
|
|
58
|
-
sender:
|
|
59
|
-
timestamp?: string
|
|
60
|
-
class?: string
|
|
130
|
+
content: string;
|
|
131
|
+
sender: "user" | "other";
|
|
132
|
+
timestamp?: string;
|
|
133
|
+
class?: string;
|
|
61
134
|
}
|
|
62
135
|
|
|
136
|
+
const bubbleRow = style<{ isUser: boolean }>({
|
|
137
|
+
display: "flex",
|
|
138
|
+
justifyContent: { default: "start", isUser: "end" },
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const bubble = style<{ isUser: boolean }>({
|
|
142
|
+
display: "flex",
|
|
143
|
+
flexDirection: "column",
|
|
144
|
+
gap: 2,
|
|
145
|
+
maxWidth: "[70%]",
|
|
146
|
+
paddingX: 16,
|
|
147
|
+
paddingY: 8,
|
|
148
|
+
borderRadius: "lg",
|
|
149
|
+
backgroundColor: {
|
|
150
|
+
default: "[var(--color-bg-300)]",
|
|
151
|
+
isUser: "[var(--color-accent)]",
|
|
152
|
+
},
|
|
153
|
+
color: {
|
|
154
|
+
// `other` bubble: `--color-primary-100` on the neutral `bg-300` fill (AA both
|
|
155
|
+
// themes). `user` bubble text on the pink `--color-accent` fill: the near-white
|
|
156
|
+
// `--color-bg-400` gives only 2.74:1 light (fail) → `--color-grey-900` (~5.2:1
|
|
157
|
+
// light / ~6.1:1 dark), the Chip accent-fill resolution.
|
|
158
|
+
default: "[var(--color-primary-100)]",
|
|
159
|
+
isUser: "[var(--color-grey-900)]",
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const bubbleTime = style<{ isUser: boolean }>({
|
|
164
|
+
font: "detail-sm",
|
|
165
|
+
color: {
|
|
166
|
+
// `other` timestamp on `bg-300`: `--color-text-muted` fails AA both modes
|
|
167
|
+
// (~2.2:1 light / ~2.8:1 dark) → the flipping `--color-text`. `user` timestamp
|
|
168
|
+
// on the `--color-accent` fill: `--color-bg-300` gives 2.42:1 light (fail) →
|
|
169
|
+
// `--color-grey-900` (matching the bubble body).
|
|
170
|
+
default: "[var(--color-text)]",
|
|
171
|
+
isUser: "[var(--color-grey-900)]",
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
|
|
63
175
|
export function ConversationBubble(props: ConversationBubbleProps) {
|
|
64
|
-
const isUser = () => props.sender ===
|
|
176
|
+
const isUser = () => props.sender === "user";
|
|
65
177
|
|
|
66
178
|
return (
|
|
67
|
-
<div class={
|
|
68
|
-
<div
|
|
69
|
-
class={`max-w-[70%] rounded-2xl px-4 py-2 ${
|
|
70
|
-
isUser()
|
|
71
|
-
? 'bg-accent text-white rounded-br-sm'
|
|
72
|
-
: 'bg-bg-300 text-primary-100 rounded-bl-sm'
|
|
73
|
-
}`}
|
|
74
|
-
>
|
|
179
|
+
<div class={`${bubbleRow({ isUser: isUser() })} ${props.class ?? ""}`}>
|
|
180
|
+
<div class={bubble({ isUser: isUser() })}>
|
|
75
181
|
<p>{props.content}</p>
|
|
76
182
|
<Show when={props.timestamp}>
|
|
77
|
-
<span class={
|
|
78
|
-
{props.timestamp}
|
|
79
|
-
</span>
|
|
183
|
+
<span class={bubbleTime({ isUser: isUser() })}>{props.timestamp}</span>
|
|
80
184
|
</Show>
|
|
81
185
|
</div>
|
|
82
186
|
</div>
|
|
83
|
-
)
|
|
187
|
+
);
|
|
84
188
|
}
|
|
85
189
|
|
|
86
190
|
export interface ConversationProps {
|
|
87
|
-
messages: Message[]
|
|
88
|
-
class?: string
|
|
191
|
+
messages: Message[];
|
|
192
|
+
class?: string;
|
|
89
193
|
}
|
|
90
194
|
|
|
195
|
+
const thread = style({
|
|
196
|
+
display: "flex",
|
|
197
|
+
flexDirection: "column",
|
|
198
|
+
gap: 8,
|
|
199
|
+
padding: 16,
|
|
200
|
+
});
|
|
201
|
+
|
|
91
202
|
export function Conversation(props: ConversationProps) {
|
|
92
203
|
return (
|
|
93
|
-
<div class={
|
|
204
|
+
<div class={`${thread} ${props.class ?? ""}`}>
|
|
94
205
|
<For each={props.messages}>
|
|
95
206
|
{(message) => (
|
|
96
207
|
<ConversationBubble
|
|
@@ -101,5 +212,5 @@ export function Conversation(props: ConversationProps) {
|
|
|
101
212
|
)}
|
|
102
213
|
</For>
|
|
103
214
|
</div>
|
|
104
|
-
)
|
|
215
|
+
);
|
|
105
216
|
}
|