@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,70 +1,138 @@
|
|
|
1
|
-
import type { JSX } from
|
|
2
|
-
import { Show, For } from
|
|
3
|
-
import { Avatar } from
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { Show, For } from "solid-js";
|
|
3
|
+
import { Avatar } from "@proyecto-viviana/solid-spectrum";
|
|
4
|
+
import { Button as HeadlessButton } from "@proyecto-viviana/solidaria-components";
|
|
5
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
6
|
+
// src/style.ts). An event summary card (S2 Card shape: preview + content +
|
|
7
|
+
// footer) plus a compact list-item variant, on the S2 ramps in Silapse colors.
|
|
8
|
+
import { style } from "../../style" with { type: "macro" };
|
|
4
9
|
|
|
5
10
|
export interface EventCardProps {
|
|
6
|
-
title: string
|
|
7
|
-
image?: string
|
|
8
|
-
date?: string
|
|
9
|
-
author?: string
|
|
10
|
-
authorAvatar?: string
|
|
11
|
-
attendees?: { avatar?: string; name: string }[]
|
|
12
|
-
attendeeCount?: number
|
|
13
|
-
decorationImage?: string
|
|
11
|
+
title: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
date?: string;
|
|
14
|
+
author?: string;
|
|
15
|
+
authorAvatar?: string;
|
|
16
|
+
attendees?: { avatar?: string; name: string }[];
|
|
17
|
+
attendeeCount?: number;
|
|
18
|
+
decorationImage?: string;
|
|
14
19
|
/**
|
|
15
20
|
* Actions to display below the event.
|
|
16
21
|
* Use a function returning JSX for SSR compatibility: `actions={() => <Button>...</Button>}`
|
|
17
22
|
*/
|
|
18
|
-
actions?: JSX.Element | (() => JSX.Element)
|
|
19
|
-
class?: string
|
|
23
|
+
actions?: JSX.Element | (() => JSX.Element);
|
|
24
|
+
class?: string;
|
|
20
25
|
}
|
|
21
26
|
|
|
27
|
+
const card = style({
|
|
28
|
+
position: "relative",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
overflow: "hidden",
|
|
32
|
+
borderRadius: "xl",
|
|
33
|
+
backgroundColor: "[var(--color-bg-200)]",
|
|
34
|
+
boxShadow: "elevated",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const decoration = style({
|
|
38
|
+
position: "absolute",
|
|
39
|
+
top: 8,
|
|
40
|
+
insetEnd: 8,
|
|
41
|
+
width: 32,
|
|
42
|
+
height: 32,
|
|
43
|
+
objectFit: "contain",
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const preview = style({
|
|
47
|
+
width: "full",
|
|
48
|
+
aspectRatio: "16/9",
|
|
49
|
+
objectFit: "cover",
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const body = style({
|
|
53
|
+
display: "flex",
|
|
54
|
+
flexDirection: "column",
|
|
55
|
+
gap: 12,
|
|
56
|
+
padding: 16,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const title = style({
|
|
60
|
+
font: "heading",
|
|
61
|
+
color: "[var(--color-accent)]",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const meta = style({
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
gap: 16,
|
|
68
|
+
font: "ui-sm",
|
|
69
|
+
color: "[var(--color-text-secondary)]",
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const metaItem = style({
|
|
73
|
+
display: "flex",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
gap: 4,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const metaIcon = style({
|
|
79
|
+
color: "[var(--color-accent)]",
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const attendeesRow = style({
|
|
83
|
+
display: "flex",
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
gap: 8,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const avatars = style({
|
|
89
|
+
display: "flex",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
gap: 4,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const more = style({
|
|
95
|
+
font: "ui-sm",
|
|
96
|
+
color: "[var(--color-text-secondary)]",
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const actionRow = style({
|
|
100
|
+
display: "flex",
|
|
101
|
+
gap: 8,
|
|
102
|
+
});
|
|
103
|
+
|
|
22
104
|
export function EventCard(props: EventCardProps) {
|
|
23
|
-
const displayedAttendees = () => props.attendees?.slice(0, 3) ?? []
|
|
105
|
+
const displayedAttendees = () => props.attendees?.slice(0, 3) ?? [];
|
|
24
106
|
const remainingCount = () => {
|
|
25
|
-
const total = props.attendeeCount ?? props.attendees?.length ?? 0
|
|
26
|
-
const displayed = displayedAttendees().length
|
|
27
|
-
return total - displayed
|
|
28
|
-
}
|
|
107
|
+
const total = props.attendeeCount ?? props.attendees?.length ?? 0;
|
|
108
|
+
const displayed = displayedAttendees().length;
|
|
109
|
+
return total - displayed;
|
|
110
|
+
};
|
|
29
111
|
|
|
30
112
|
return (
|
|
31
|
-
<div class={
|
|
32
|
-
{/* Decoration image (fire gif, etc) */}
|
|
113
|
+
<div class={`${card} ${props.class ?? ""}`}>
|
|
33
114
|
<Show when={props.decorationImage}>
|
|
34
|
-
<
|
|
35
|
-
<img src={props.decorationImage} alt="" class="w-8 h-8 object-contain" />
|
|
36
|
-
<img src={props.decorationImage} alt="" class="w-6 h-6 object-contain ml-2" />
|
|
37
|
-
<img src={props.decorationImage} alt="" class="w-5 h-5 object-contain" />
|
|
38
|
-
</div>
|
|
115
|
+
<img class={decoration} src={props.decorationImage} alt="" />
|
|
39
116
|
</Show>
|
|
40
117
|
|
|
41
118
|
<Show when={props.image}>
|
|
42
|
-
<
|
|
43
|
-
<img
|
|
44
|
-
src={props.image}
|
|
45
|
-
alt={props.title}
|
|
46
|
-
class="w-full h-full object-cover"
|
|
47
|
-
/>
|
|
48
|
-
<div class="absolute inset-0 bg-gradient-to-t from-bg-200 via-transparent to-transparent" />
|
|
49
|
-
</div>
|
|
119
|
+
<img class={preview} src={props.image} alt={props.title} />
|
|
50
120
|
</Show>
|
|
51
121
|
|
|
52
|
-
<div class=
|
|
53
|
-
<h3 class=
|
|
54
|
-
{props.title}
|
|
55
|
-
</h3>
|
|
122
|
+
<div class={body}>
|
|
123
|
+
<h3 class={title}>{props.title}</h3>
|
|
56
124
|
|
|
57
125
|
<Show when={props.date || props.author}>
|
|
58
|
-
<div class=
|
|
126
|
+
<div class={meta}>
|
|
59
127
|
<Show when={props.author}>
|
|
60
|
-
<div class=
|
|
61
|
-
<span class=
|
|
128
|
+
<div class={metaItem}>
|
|
129
|
+
<span class={metaIcon}>@</span>
|
|
62
130
|
<span>{props.author}</span>
|
|
63
131
|
</div>
|
|
64
132
|
</Show>
|
|
65
133
|
<Show when={props.date}>
|
|
66
|
-
<div class=
|
|
67
|
-
<span class=
|
|
134
|
+
<div class={metaItem}>
|
|
135
|
+
<span class={metaIcon}>⏱</span>
|
|
68
136
|
<span>{props.date}</span>
|
|
69
137
|
</div>
|
|
70
138
|
</Show>
|
|
@@ -72,61 +140,93 @@ export function EventCard(props: EventCardProps) {
|
|
|
72
140
|
</Show>
|
|
73
141
|
|
|
74
142
|
<Show when={displayedAttendees().length > 0}>
|
|
75
|
-
<div class=
|
|
76
|
-
<div class=
|
|
143
|
+
<div class={attendeesRow}>
|
|
144
|
+
<div class={avatars}>
|
|
77
145
|
<For each={displayedAttendees()}>
|
|
78
|
-
{(attendee) =>
|
|
79
|
-
<Avatar src={attendee.avatar} alt={attendee.name} size="sm" />
|
|
80
|
-
)}
|
|
146
|
+
{(attendee) => <Avatar src={attendee.avatar} alt={attendee.name} size="sm" />}
|
|
81
147
|
</For>
|
|
82
148
|
</div>
|
|
83
149
|
<Show when={remainingCount() > 0}>
|
|
84
|
-
<span class=
|
|
85
|
-
+{remainingCount()} más
|
|
86
|
-
</span>
|
|
150
|
+
<span class={more}>+{remainingCount()} más</span>
|
|
87
151
|
</Show>
|
|
88
152
|
</div>
|
|
89
153
|
</Show>
|
|
90
154
|
|
|
91
155
|
<Show when={props.actions}>
|
|
92
|
-
<div class=
|
|
93
|
-
{typeof props.actions ===
|
|
156
|
+
<div class={actionRow}>
|
|
157
|
+
{typeof props.actions === "function" ? props.actions() : props.actions}
|
|
94
158
|
</div>
|
|
95
159
|
</Show>
|
|
96
160
|
</div>
|
|
97
161
|
</div>
|
|
98
|
-
)
|
|
162
|
+
);
|
|
99
163
|
}
|
|
100
164
|
|
|
101
165
|
export interface EventListItemProps {
|
|
102
|
-
title: string
|
|
103
|
-
image?: string
|
|
104
|
-
subtitle?: string
|
|
105
|
-
onClick?: () => void
|
|
106
|
-
class?: string
|
|
166
|
+
title: string;
|
|
167
|
+
image?: string;
|
|
168
|
+
subtitle?: string;
|
|
169
|
+
onClick?: () => void;
|
|
170
|
+
class?: string;
|
|
107
171
|
}
|
|
108
172
|
|
|
173
|
+
const listItem = style({
|
|
174
|
+
display: "flex",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
gap: 12,
|
|
177
|
+
width: "full",
|
|
178
|
+
padding: 8,
|
|
179
|
+
borderRadius: "lg",
|
|
180
|
+
textAlign: "start",
|
|
181
|
+
cursor: "pointer",
|
|
182
|
+
backgroundColor: "transparent",
|
|
183
|
+
borderStyle: "none",
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const thumb = style({
|
|
187
|
+
width: 48,
|
|
188
|
+
height: 48,
|
|
189
|
+
flexShrink: 0,
|
|
190
|
+
borderRadius: "default",
|
|
191
|
+
objectFit: "cover",
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
const listBody = style({
|
|
195
|
+
display: "flex",
|
|
196
|
+
flexDirection: "column",
|
|
197
|
+
flexGrow: 1,
|
|
198
|
+
minWidth: 0,
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const listTitle = style({
|
|
202
|
+
font: "ui",
|
|
203
|
+
fontWeight: "medium",
|
|
204
|
+
color: "[var(--color-primary-100)]",
|
|
205
|
+
overflow: "hidden",
|
|
206
|
+
textOverflow: "ellipsis",
|
|
207
|
+
whiteSpace: "nowrap",
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const listSubtitle = style({
|
|
211
|
+
font: "ui-sm",
|
|
212
|
+
color: "[var(--color-text-secondary)]",
|
|
213
|
+
overflow: "hidden",
|
|
214
|
+
textOverflow: "ellipsis",
|
|
215
|
+
whiteSpace: "nowrap",
|
|
216
|
+
});
|
|
217
|
+
|
|
109
218
|
export function EventListItem(props: EventListItemProps) {
|
|
110
219
|
return (
|
|
111
|
-
<
|
|
112
|
-
class={`flex items-center gap-3 w-full p-2 rounded-lg hover:bg-bg-300 transition-colors text-left ${props.class ?? ''}`}
|
|
113
|
-
onClick={props.onClick}
|
|
114
|
-
>
|
|
220
|
+
<HeadlessButton class={`${listItem} ${props.class ?? ""}`} onPress={() => props.onClick?.()}>
|
|
115
221
|
<Show when={props.image}>
|
|
116
|
-
<
|
|
117
|
-
<img
|
|
118
|
-
src={props.image}
|
|
119
|
-
alt={props.title}
|
|
120
|
-
class="w-full h-full object-cover"
|
|
121
|
-
/>
|
|
122
|
-
</div>
|
|
222
|
+
<img class={thumb} src={props.image} alt={props.title} />
|
|
123
223
|
</Show>
|
|
124
|
-
<div class=
|
|
125
|
-
<h4 class=
|
|
224
|
+
<div class={listBody}>
|
|
225
|
+
<h4 class={listTitle}>{props.title}</h4>
|
|
126
226
|
<Show when={props.subtitle}>
|
|
127
|
-
<p class=
|
|
227
|
+
<p class={listSubtitle}>{props.subtitle}</p>
|
|
128
228
|
</Show>
|
|
129
229
|
</div>
|
|
130
|
-
</
|
|
131
|
-
)
|
|
230
|
+
</HeadlessButton>
|
|
231
|
+
);
|
|
132
232
|
}
|
|
@@ -1,33 +1,64 @@
|
|
|
1
|
-
import type { JSX } from
|
|
2
|
-
import { Logo, type LogoProps } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
logo
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { Logo, type LogoProps } from "../logo";
|
|
3
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
4
|
+
// src/style.ts). A top app-bar: centered max-width row with a logo group and
|
|
5
|
+
// a nav slot, on the S2 ramps in Silapse colors.
|
|
6
|
+
import { style } from "../../style" with { type: "macro" };
|
|
7
|
+
|
|
8
|
+
export interface HeaderProps {
|
|
9
|
+
logoImage?: JSX.Element;
|
|
10
|
+
/** Props to pass to the Logo component (firstWord, secondWord, size, inverted). Pass null to hide the text logo. */
|
|
11
|
+
logoProps?: LogoProps | null;
|
|
12
|
+
logo?: JSX.Element;
|
|
13
|
+
children?: JSX.Element;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const bar = style({
|
|
18
|
+
display: "flex",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
width: "full",
|
|
22
|
+
backgroundColor: "[var(--color-header-bg)]",
|
|
23
|
+
borderBottomWidth: 1,
|
|
24
|
+
borderStyle: "solid",
|
|
25
|
+
borderColor: "[var(--color-border)]",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const inner = style({
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
justifyContent: "space-between",
|
|
32
|
+
width: "full",
|
|
33
|
+
maxWidth: 1152,
|
|
34
|
+
paddingX: 24,
|
|
35
|
+
paddingY: 12,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const logoGroup = style({
|
|
39
|
+
display: "flex",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
gap: 12,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const nav = style({
|
|
45
|
+
display: "flex",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
gap: 16,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function Header(props: HeaderProps) {
|
|
51
|
+
const showTextLogo = () => props.logo !== undefined || props.logoProps !== null;
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<header class={`${bar} ${props.class ?? ""}`}>
|
|
55
|
+
<div class={inner}>
|
|
56
|
+
<div class={logoGroup}>
|
|
57
|
+
{props.logoImage}
|
|
58
|
+
{showTextLogo() && (props.logo ?? <Logo size="lg" {...(props.logoProps ?? {})} />)}
|
|
59
|
+
</div>
|
|
60
|
+
<nav class={nav}>{props.children}</nav>
|
|
61
|
+
</div>
|
|
62
|
+
</header>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -1,62 +1,99 @@
|
|
|
1
|
-
import type { JSX } from
|
|
2
|
-
import { Show, For } from
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
import { Show, For } from "solid-js";
|
|
3
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
4
|
+
// src/style.ts). A sidebar nav (sections with an accent rail + links) on the
|
|
5
|
+
// S2 spacing/type ramps in Silapse colors.
|
|
6
|
+
import { style } from "../../style" with { type: "macro" };
|
|
3
7
|
|
|
4
8
|
export interface NavItemProps {
|
|
5
|
-
title: string
|
|
6
|
-
children?: JSX.Element
|
|
7
|
-
class?: string
|
|
9
|
+
title: string;
|
|
10
|
+
children?: JSX.Element;
|
|
11
|
+
class?: string;
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
const item = style({
|
|
15
|
+
display: "flex",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
font: "heading-sm",
|
|
18
|
+
color: "[var(--color-primary-200)]",
|
|
19
|
+
});
|
|
20
|
+
|
|
10
21
|
export function NavItem(props: NavItemProps) {
|
|
11
22
|
return (
|
|
12
|
-
<li class={
|
|
13
|
-
<span
|
|
23
|
+
<li class={`${item} ${props.class ?? ""}`}>
|
|
24
|
+
<span>{props.title}</span>
|
|
14
25
|
{props.children}
|
|
15
26
|
</li>
|
|
16
|
-
)
|
|
27
|
+
);
|
|
17
28
|
}
|
|
18
29
|
|
|
19
30
|
export interface NavLinkProps {
|
|
20
|
-
href: string
|
|
21
|
-
children: JSX.Element
|
|
22
|
-
active?: boolean
|
|
23
|
-
class?: string
|
|
31
|
+
href: string;
|
|
32
|
+
children: JSX.Element;
|
|
33
|
+
active?: boolean;
|
|
34
|
+
class?: string;
|
|
24
35
|
}
|
|
25
36
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
const link = style<{ isActive: boolean }>({
|
|
38
|
+
font: "ui",
|
|
39
|
+
textDecoration: { default: "none", isActive: "underline" },
|
|
40
|
+
fontWeight: { default: "normal", isActive: "medium" },
|
|
41
|
+
color: {
|
|
42
|
+
default: "[var(--color-text-secondary)]",
|
|
43
|
+
isActive: "[var(--color-primary-300)]",
|
|
44
|
+
},
|
|
45
|
+
});
|
|
29
46
|
|
|
47
|
+
export function NavLink(props: NavLinkProps) {
|
|
30
48
|
return (
|
|
31
49
|
<a
|
|
32
50
|
href={props.href}
|
|
33
|
-
class={`${props.active
|
|
51
|
+
class={`${link({ isActive: props.active ?? false })} ${props.class ?? ""}`}
|
|
34
52
|
>
|
|
35
53
|
{props.children}
|
|
36
54
|
</a>
|
|
37
|
-
)
|
|
55
|
+
);
|
|
38
56
|
}
|
|
39
57
|
|
|
40
58
|
export interface NavSectionProps {
|
|
41
|
-
title: string
|
|
42
|
-
links?: { href: string; label: string; active?: boolean }[]
|
|
43
|
-
children?: JSX.Element
|
|
44
|
-
class?: string
|
|
59
|
+
title: string;
|
|
60
|
+
links?: { href: string; label: string; active?: boolean }[];
|
|
61
|
+
children?: JSX.Element;
|
|
62
|
+
class?: string;
|
|
45
63
|
}
|
|
46
64
|
|
|
65
|
+
const sectionRow = style({
|
|
66
|
+
display: "flex",
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const accentRail = style({
|
|
70
|
+
flexShrink: 0,
|
|
71
|
+
width: 4,
|
|
72
|
+
height: 20,
|
|
73
|
+
backgroundColor: "[var(--color-accent-300)]",
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const list = style({
|
|
77
|
+
display: "flex",
|
|
78
|
+
flexDirection: "column",
|
|
79
|
+
flexGrow: 1,
|
|
80
|
+
gap: 4,
|
|
81
|
+
paddingStart: 16,
|
|
82
|
+
});
|
|
83
|
+
|
|
47
84
|
export function NavSection(props: NavSectionProps) {
|
|
48
85
|
return (
|
|
49
|
-
<div class={props.class ??
|
|
86
|
+
<div class={props.class ?? ""}>
|
|
50
87
|
<NavItem title={props.title} />
|
|
51
|
-
<div class=
|
|
52
|
-
<div class=
|
|
53
|
-
<ul class=
|
|
88
|
+
<div class={sectionRow}>
|
|
89
|
+
<div class={accentRail} />
|
|
90
|
+
<ul class={list}>
|
|
54
91
|
<Show when={props.links}>
|
|
55
92
|
<For each={props.links}>
|
|
56
|
-
{(
|
|
93
|
+
{(navLink) => (
|
|
57
94
|
<li>
|
|
58
|
-
<NavLink href={
|
|
59
|
-
{
|
|
95
|
+
<NavLink href={navLink.href} active={navLink.active}>
|
|
96
|
+
{navLink.label}
|
|
60
97
|
</NavLink>
|
|
61
98
|
</li>
|
|
62
99
|
)}
|
|
@@ -66,23 +103,32 @@ export function NavSection(props: NavSectionProps) {
|
|
|
66
103
|
</ul>
|
|
67
104
|
</div>
|
|
68
105
|
</div>
|
|
69
|
-
)
|
|
106
|
+
);
|
|
70
107
|
}
|
|
71
108
|
|
|
72
109
|
export interface LateralNavProps {
|
|
73
|
-
transparent?: boolean
|
|
74
|
-
children?: JSX.Element
|
|
75
|
-
class?: string
|
|
110
|
+
transparent?: boolean;
|
|
111
|
+
children?: JSX.Element;
|
|
112
|
+
class?: string;
|
|
76
113
|
}
|
|
77
114
|
|
|
78
|
-
|
|
79
|
-
|
|
115
|
+
const nav = style<{ isTransparent: boolean }>({
|
|
116
|
+
width: 300,
|
|
117
|
+
margin: 0,
|
|
118
|
+
padding: 12,
|
|
119
|
+
borderEndWidth: 1,
|
|
120
|
+
borderStyle: "solid",
|
|
121
|
+
borderColor: "[var(--color-primary-600)]",
|
|
122
|
+
backgroundColor: {
|
|
123
|
+
default: "[var(--color-bg-200)]",
|
|
124
|
+
isTransparent: "transparent",
|
|
125
|
+
},
|
|
126
|
+
});
|
|
80
127
|
|
|
128
|
+
export function LateralNav(props: LateralNavProps) {
|
|
81
129
|
return (
|
|
82
|
-
<div
|
|
83
|
-
class={`hidden w-[300px] md:block ${bgColor()} m-0 border-r border-primary-600 p-3 ${props.class ?? ''}`}
|
|
84
|
-
>
|
|
130
|
+
<div class={`${nav({ isTransparent: props.transparent ?? false })} ${props.class ?? ""}`}>
|
|
85
131
|
{props.children}
|
|
86
132
|
</div>
|
|
87
|
-
)
|
|
133
|
+
);
|
|
88
134
|
}
|
|
@@ -1,58 +1,53 @@
|
|
|
1
|
-
import { JSX } from "solid-js";
|
|
1
|
+
import type { JSX } from "solid-js";
|
|
2
|
+
// Styled via the S2 style() macro through viviana's own seam (../../style →
|
|
3
|
+
// src/style.ts). A clean two-word wordmark: the S2 title ramp sizes it; Silapse
|
|
4
|
+
// colors paint it (primary + accent). `inverted` swaps which word takes accent.
|
|
5
|
+
import { style } from "../../style" with { type: "macro" };
|
|
2
6
|
|
|
3
7
|
export type LogoSize = "sm" | "md" | "lg" | "xl";
|
|
4
8
|
|
|
5
9
|
export interface LogoProps {
|
|
6
|
-
/** First word (light weight, muted color) */
|
|
7
10
|
firstWord?: string;
|
|
8
|
-
/** Second word (bold, with 3D effect) */
|
|
9
11
|
secondWord?: string;
|
|
10
|
-
/** Size variant of the logo */
|
|
11
12
|
size?: LogoSize;
|
|
12
|
-
/** Invert the styles (first word gets 3D effect, second word is muted) */
|
|
13
13
|
inverted?: boolean;
|
|
14
|
-
/** Additional CSS classes */
|
|
15
14
|
class?: string;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
};
|
|
17
|
+
const wordmark = style<{ size: LogoSize }>({
|
|
18
|
+
display: "inline-flex",
|
|
19
|
+
alignItems: "baseline",
|
|
20
|
+
columnGap: 8,
|
|
21
|
+
whiteSpace: "nowrap",
|
|
22
|
+
font: {
|
|
23
|
+
size: {
|
|
24
|
+
sm: "title-sm",
|
|
25
|
+
md: "title",
|
|
26
|
+
lg: "title-xl",
|
|
27
|
+
xl: "title-3xl",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
fontWeight: "black",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const word = style<{ tone: "primary" | "accent" }>({
|
|
34
|
+
color: {
|
|
35
|
+
tone: {
|
|
36
|
+
primary: "[var(--color-primary-100)]",
|
|
37
|
+
accent: "[var(--color-accent)]",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
44
41
|
|
|
42
|
+
export function Logo(props: LogoProps): JSX.Element {
|
|
45
43
|
const firstWord = () => props.firstWord ?? "Proyecto";
|
|
46
44
|
const secondWord = () => props.secondWord ?? "Viviana";
|
|
45
|
+
const inverted = () => props.inverted ?? false;
|
|
47
46
|
|
|
48
47
|
return (
|
|
49
|
-
<span class={
|
|
50
|
-
<span class=
|
|
51
|
-
|
|
52
|
-
</span>
|
|
53
|
-
<span class="vui-logo__second" data-text={props.inverted ? undefined : secondWord()}>
|
|
54
|
-
{secondWord()}
|
|
55
|
-
</span>
|
|
48
|
+
<span class={`${wordmark({ size: props.size ?? "md" })} ${props.class ?? ""}`}>
|
|
49
|
+
<span class={word({ tone: inverted() ? "accent" : "primary" })}>{firstWord()}</span>
|
|
50
|
+
<span class={word({ tone: inverted() ? "primary" : "accent" })}>{secondWord()}</span>
|
|
56
51
|
</span>
|
|
57
52
|
);
|
|
58
53
|
}
|