@proyecto-viviana/ui 0.3.5 → 0.4.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/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 +97 -0
- package/dist/CalendarCard.js.map +1 -0
- package/dist/CalendarCard.jsx +51 -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 +177 -0
- package/dist/Conversation.js.map +1 -0
- package/dist/Conversation.jsx +107 -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 +173 -0
- package/dist/EventCard.js.map +1 -0
- package/dist/EventCard.jsx +96 -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 +78 -0
- package/dist/ProfileCard.js.map +1 -0
- package/dist/ProfileCard.jsx +53 -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 +164 -0
- package/dist/ProjectCard.js.map +1 -0
- package/dist/ProjectCard.jsx +133 -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 +15 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +74 -0
- package/dist/vite.js.map +1 -0
- package/dist/vite.jsx +74 -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 +99 -50
- package/src/custom/chip/index.tsx +59 -27
- package/src/custom/conversation/index.tsx +149 -55
- package/src/custom/event-card/index.tsx +174 -74
- package/src/custom/header/index.tsx +64 -33
- package/src/custom/lateral-nav/index.tsx +84 -38
- package/src/custom/logo/index.tsx +34 -39
- package/src/custom/nav-header/index.tsx +81 -25
- package/src/custom/page-layout/index.tsx +23 -19
- package/src/custom/profile-card/index.tsx +85 -35
- package/src/custom/project-card/index.tsx +57 -40
- package/src/custom/timeline-item/index.tsx +83 -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 +152 -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,115 @@
|
|
|
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
|
+
color: "[var(--color-accent)]",
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const tags = style({
|
|
70
|
+
display: "flex",
|
|
71
|
+
flexWrap: "wrap",
|
|
72
|
+
gap: 4,
|
|
73
|
+
});
|
|
74
|
+
|
|
13
75
|
export function CalendarCard(props: CalendarCardProps) {
|
|
14
|
-
const displayedFollowers = () => props.followers?.slice(0, 2) ?? []
|
|
76
|
+
const displayedFollowers = () => props.followers?.slice(0, 2) ?? [];
|
|
15
77
|
const remainingCount = () => {
|
|
16
|
-
const total = props.followerCount ?? props.followers?.length ?? 0
|
|
17
|
-
const displayed = displayedFollowers().length
|
|
18
|
-
return total - displayed
|
|
19
|
-
}
|
|
78
|
+
const total = props.followerCount ?? props.followers?.length ?? 0;
|
|
79
|
+
const displayed = displayedFollowers().length;
|
|
80
|
+
return total - displayed;
|
|
81
|
+
};
|
|
20
82
|
|
|
21
83
|
return (
|
|
22
|
-
<div class={
|
|
84
|
+
<div class={`${card} ${props.class ?? ""}`}>
|
|
23
85
|
<Show when={props.image}>
|
|
24
|
-
<
|
|
25
|
-
<img src={props.image} alt={props.title} class="h-full w-full object-cover" />
|
|
26
|
-
</div>
|
|
86
|
+
<img class={thumb} src={props.image} alt={props.title} />
|
|
27
87
|
</Show>
|
|
28
|
-
<div class=
|
|
88
|
+
<div class={body}>
|
|
89
|
+
<span class={title}>{props.title}</span>
|
|
90
|
+
<Show when={displayedFollowers().length > 0}>
|
|
91
|
+
<span class={followers}>
|
|
92
|
+
seguida por{" "}
|
|
93
|
+
<For each={displayedFollowers()}>
|
|
94
|
+
{(follower, index) => (
|
|
95
|
+
<>
|
|
96
|
+
<span class={followerName}>{follower.name}</span>
|
|
97
|
+
{index() < displayedFollowers().length - 1 && ", "}
|
|
98
|
+
</>
|
|
99
|
+
)}
|
|
100
|
+
</For>
|
|
101
|
+
<Show when={remainingCount() > 0}>
|
|
102
|
+
{" "}
|
|
103
|
+
y <span class={followerName}>{remainingCount()} más</span>
|
|
104
|
+
</Show>
|
|
105
|
+
</span>
|
|
106
|
+
</Show>
|
|
29
107
|
<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>
|
|
108
|
+
<div class={tags}>
|
|
109
|
+
<For each={props.tags}>{(tag) => <Chip text={tag} variant="primary" />}</For>
|
|
36
110
|
</div>
|
|
37
111
|
</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
112
|
</div>
|
|
64
113
|
</div>
|
|
65
|
-
)
|
|
114
|
+
);
|
|
66
115
|
}
|
|
@@ -1,46 +1,78 @@
|
|
|
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
|
+
accent: "[var(--color-bg-400)]",
|
|
54
|
+
outline: "[var(--color-primary-200)]",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
24
58
|
|
|
25
59
|
export function Chip(props: ChipProps) {
|
|
26
|
-
const variant = () => props.variant ?? 'primary'
|
|
27
|
-
|
|
28
60
|
const renderIcon = () => {
|
|
29
|
-
const icon = props.icon
|
|
30
|
-
if (!icon) return null
|
|
31
|
-
if (typeof icon ===
|
|
32
|
-
return icon()
|
|
33
|
-
}
|
|
61
|
+
const icon = props.icon;
|
|
62
|
+
if (!icon) return null;
|
|
63
|
+
if (typeof icon === "string") return icon;
|
|
64
|
+
return icon();
|
|
65
|
+
};
|
|
34
66
|
|
|
35
67
|
return (
|
|
36
|
-
<
|
|
37
|
-
class={
|
|
38
|
-
|
|
68
|
+
<HeadlessButton
|
|
69
|
+
class={`${chip({ variant: props.variant ?? "primary" })} ${props.class ?? ""}`}
|
|
70
|
+
onPress={() => props.onClick?.()}
|
|
39
71
|
>
|
|
40
72
|
<Show when={props.icon}>
|
|
41
|
-
<span
|
|
73
|
+
<span>{renderIcon()}</span>
|
|
42
74
|
</Show>
|
|
43
|
-
|
|
44
|
-
</
|
|
45
|
-
)
|
|
75
|
+
{props.text}
|
|
76
|
+
</HeadlessButton>
|
|
77
|
+
);
|
|
46
78
|
}
|
|
@@ -1,96 +1,190 @@
|
|
|
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: "[var(--color-text-muted)]",
|
|
69
|
+
flexShrink: 0,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const previewMessage = style({
|
|
73
|
+
font: "ui-sm",
|
|
74
|
+
color: "[var(--color-text-secondary)]",
|
|
75
|
+
overflow: "hidden",
|
|
76
|
+
textOverflow: "ellipsis",
|
|
77
|
+
whiteSpace: "nowrap",
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const unread = style({
|
|
81
|
+
display: "flex",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
justifyContent: "center",
|
|
84
|
+
flexShrink: 0,
|
|
85
|
+
width: 20,
|
|
86
|
+
height: 20,
|
|
87
|
+
borderRadius: "full",
|
|
88
|
+
font: "detail-sm",
|
|
89
|
+
fontWeight: "bold",
|
|
90
|
+
backgroundColor: "[var(--color-accent)]",
|
|
91
|
+
color: "[var(--color-bg-400)]",
|
|
92
|
+
});
|
|
93
|
+
|
|
24
94
|
export function ConversationPreview(props: ConversationPreviewProps) {
|
|
25
95
|
return (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
96
|
+
<HeadlessButton
|
|
97
|
+
type="button"
|
|
98
|
+
class={`${preview} ${props.class ?? ""}`}
|
|
99
|
+
onPress={() => props.onClick?.()}
|
|
29
100
|
>
|
|
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>
|
|
101
|
+
<Avatar src={props.user.avatar} alt={props.user.name} online={props.user.online} size="md" />
|
|
102
|
+
<div class={previewBody}>
|
|
103
|
+
<div class={previewTop}>
|
|
104
|
+
<span class={previewName}>{props.user.name}</span>
|
|
39
105
|
<Show when={props.timestamp}>
|
|
40
|
-
<span class=
|
|
106
|
+
<span class={previewTime}>{props.timestamp}</span>
|
|
41
107
|
</Show>
|
|
42
108
|
</div>
|
|
43
109
|
<Show when={props.lastMessage}>
|
|
44
|
-
<p class=
|
|
110
|
+
<p class={previewMessage}>{props.lastMessage}</p>
|
|
45
111
|
</Show>
|
|
46
112
|
</div>
|
|
47
113
|
<Show when={props.unreadCount && props.unreadCount > 0}>
|
|
48
|
-
<span class=
|
|
49
|
-
{props.unreadCount}
|
|
50
|
-
</span>
|
|
114
|
+
<span class={unread}>{props.unreadCount}</span>
|
|
51
115
|
</Show>
|
|
52
|
-
</
|
|
53
|
-
)
|
|
116
|
+
</HeadlessButton>
|
|
117
|
+
);
|
|
54
118
|
}
|
|
55
119
|
|
|
56
120
|
export interface ConversationBubbleProps {
|
|
57
|
-
content: string
|
|
58
|
-
sender:
|
|
59
|
-
timestamp?: string
|
|
60
|
-
class?: string
|
|
121
|
+
content: string;
|
|
122
|
+
sender: "user" | "other";
|
|
123
|
+
timestamp?: string;
|
|
124
|
+
class?: string;
|
|
61
125
|
}
|
|
62
126
|
|
|
127
|
+
const bubbleRow = style<{ isUser: boolean }>({
|
|
128
|
+
display: "flex",
|
|
129
|
+
justifyContent: { default: "start", isUser: "end" },
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
const bubble = style<{ isUser: boolean }>({
|
|
133
|
+
display: "flex",
|
|
134
|
+
flexDirection: "column",
|
|
135
|
+
gap: 2,
|
|
136
|
+
maxWidth: "[70%]",
|
|
137
|
+
paddingX: 16,
|
|
138
|
+
paddingY: 8,
|
|
139
|
+
borderRadius: "lg",
|
|
140
|
+
backgroundColor: {
|
|
141
|
+
default: "[var(--color-bg-300)]",
|
|
142
|
+
isUser: "[var(--color-accent)]",
|
|
143
|
+
},
|
|
144
|
+
color: {
|
|
145
|
+
default: "[var(--color-primary-100)]",
|
|
146
|
+
isUser: "[var(--color-bg-400)]",
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const bubbleTime = style<{ isUser: boolean }>({
|
|
151
|
+
font: "detail-sm",
|
|
152
|
+
color: {
|
|
153
|
+
default: "[var(--color-text-muted)]",
|
|
154
|
+
isUser: "[var(--color-bg-300)]",
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
|
|
63
158
|
export function ConversationBubble(props: ConversationBubbleProps) {
|
|
64
|
-
const isUser = () => props.sender ===
|
|
159
|
+
const isUser = () => props.sender === "user";
|
|
65
160
|
|
|
66
161
|
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
|
-
>
|
|
162
|
+
<div class={`${bubbleRow({ isUser: isUser() })} ${props.class ?? ""}`}>
|
|
163
|
+
<div class={bubble({ isUser: isUser() })}>
|
|
75
164
|
<p>{props.content}</p>
|
|
76
165
|
<Show when={props.timestamp}>
|
|
77
|
-
<span class={
|
|
78
|
-
{props.timestamp}
|
|
79
|
-
</span>
|
|
166
|
+
<span class={bubbleTime({ isUser: isUser() })}>{props.timestamp}</span>
|
|
80
167
|
</Show>
|
|
81
168
|
</div>
|
|
82
169
|
</div>
|
|
83
|
-
)
|
|
170
|
+
);
|
|
84
171
|
}
|
|
85
172
|
|
|
86
173
|
export interface ConversationProps {
|
|
87
|
-
messages: Message[]
|
|
88
|
-
class?: string
|
|
174
|
+
messages: Message[];
|
|
175
|
+
class?: string;
|
|
89
176
|
}
|
|
90
177
|
|
|
178
|
+
const thread = style({
|
|
179
|
+
display: "flex",
|
|
180
|
+
flexDirection: "column",
|
|
181
|
+
gap: 8,
|
|
182
|
+
padding: 16,
|
|
183
|
+
});
|
|
184
|
+
|
|
91
185
|
export function Conversation(props: ConversationProps) {
|
|
92
186
|
return (
|
|
93
|
-
<div class={
|
|
187
|
+
<div class={`${thread} ${props.class ?? ""}`}>
|
|
94
188
|
<For each={props.messages}>
|
|
95
189
|
{(message) => (
|
|
96
190
|
<ConversationBubble
|
|
@@ -101,5 +195,5 @@ export function Conversation(props: ConversationProps) {
|
|
|
101
195
|
)}
|
|
102
196
|
</For>
|
|
103
197
|
</div>
|
|
104
|
-
)
|
|
198
|
+
);
|
|
105
199
|
}
|