@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,70 +1,159 @@
|
|
|
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
|
+
// WCAG AA fix: the title sits on the `--color-bg-200` card. `--color-accent`
|
|
62
|
+
// (#df5c9a) is a fixed pink in BOTH themes, so it does not flip against a card
|
|
63
|
+
// that is dark-grey in dark mode and light-blue in light mode — it read 4.48:1
|
|
64
|
+
// dark / 1.89:1 light. `font: heading` renders 22px / weight 800, which is WCAG
|
|
65
|
+
// large text via the BOLD path (≥18.66px && ≥700), NOT because it is ≥24px — so
|
|
66
|
+
// the 3:1 large-text floor applies. `--color-accent-500` is the smallest ramp
|
|
67
|
+
// step that flips with the theme (bright pink dark / deep magenta light) AND
|
|
68
|
+
// clears 3:1 both ways (3.87:1 dark / 4.91:1 light), keeping the brand accent.
|
|
69
|
+
color: "[var(--color-accent-500)]",
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const meta = style({
|
|
73
|
+
display: "flex",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
gap: 16,
|
|
76
|
+
font: "ui-sm",
|
|
77
|
+
// WCAG AA fix: the meta text is small (`ui-sm`), so the 4.5:1 normal-text
|
|
78
|
+
// floor applies. `--color-text-secondary` read only 3.84:1 on the light
|
|
79
|
+
// `--color-bg-200` card; `--color-text` flips and clears 4.5:1 both ways
|
|
80
|
+
// (15.33:1 dark / 7.53:1 light). Secondary de-emphasis rides on the smaller
|
|
81
|
+
// `ui-sm` size rather than a sub-AA color.
|
|
82
|
+
color: "[var(--color-text)]",
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const metaItem = style({
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
gap: 4,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const metaIcon = style({
|
|
92
|
+
// WCAG AA fix: the meta glyphs (@ / ⏱) are small (inherit `ui-sm`), so the
|
|
93
|
+
// 4.5:1 floor applies. `--color-accent` fails on the card (4.48:1 dark /
|
|
94
|
+
// 1.89:1 light) and no pink ramp step clears 4.5:1 on both the dark-grey and
|
|
95
|
+
// light-blue card, so the glyphs take the flipping `--color-text` like the
|
|
96
|
+
// meta text they prefix.
|
|
97
|
+
color: "[var(--color-text)]",
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const attendeesRow = style({
|
|
101
|
+
display: "flex",
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
gap: 8,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const avatars = style({
|
|
107
|
+
display: "flex",
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
gap: 4,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const more = style({
|
|
113
|
+
font: "ui-sm",
|
|
114
|
+
// WCAG AA fix: the "+N más" overflow count is small text on the same
|
|
115
|
+
// `--color-bg-200` card as the meta, so it shares the same 3.84:1-light
|
|
116
|
+
// failure and the same `--color-text` fix.
|
|
117
|
+
color: "[var(--color-text)]",
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const actionRow = style({
|
|
121
|
+
display: "flex",
|
|
122
|
+
gap: 8,
|
|
123
|
+
});
|
|
124
|
+
|
|
22
125
|
export function EventCard(props: EventCardProps) {
|
|
23
|
-
const displayedAttendees = () => props.attendees?.slice(0, 3) ?? []
|
|
126
|
+
const displayedAttendees = () => props.attendees?.slice(0, 3) ?? [];
|
|
24
127
|
const remainingCount = () => {
|
|
25
|
-
const total = props.attendeeCount ?? props.attendees?.length ?? 0
|
|
26
|
-
const displayed = displayedAttendees().length
|
|
27
|
-
return total - displayed
|
|
28
|
-
}
|
|
128
|
+
const total = props.attendeeCount ?? props.attendees?.length ?? 0;
|
|
129
|
+
const displayed = displayedAttendees().length;
|
|
130
|
+
return total - displayed;
|
|
131
|
+
};
|
|
29
132
|
|
|
30
133
|
return (
|
|
31
|
-
<div class={
|
|
32
|
-
{/* Decoration image (fire gif, etc) */}
|
|
134
|
+
<div class={`${card} ${props.class ?? ""}`}>
|
|
33
135
|
<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>
|
|
136
|
+
<img class={decoration} src={props.decorationImage} alt="" />
|
|
39
137
|
</Show>
|
|
40
138
|
|
|
41
139
|
<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>
|
|
140
|
+
<img class={preview} src={props.image} alt={props.title} />
|
|
50
141
|
</Show>
|
|
51
142
|
|
|
52
|
-
<div class=
|
|
53
|
-
<h3 class=
|
|
54
|
-
{props.title}
|
|
55
|
-
</h3>
|
|
143
|
+
<div class={body}>
|
|
144
|
+
<h3 class={title}>{props.title}</h3>
|
|
56
145
|
|
|
57
146
|
<Show when={props.date || props.author}>
|
|
58
|
-
<div class=
|
|
147
|
+
<div class={meta}>
|
|
59
148
|
<Show when={props.author}>
|
|
60
|
-
<div class=
|
|
61
|
-
<span class=
|
|
149
|
+
<div class={metaItem}>
|
|
150
|
+
<span class={metaIcon}>@</span>
|
|
62
151
|
<span>{props.author}</span>
|
|
63
152
|
</div>
|
|
64
153
|
</Show>
|
|
65
154
|
<Show when={props.date}>
|
|
66
|
-
<div class=
|
|
67
|
-
<span class=
|
|
155
|
+
<div class={metaItem}>
|
|
156
|
+
<span class={metaIcon}>⏱</span>
|
|
68
157
|
<span>{props.date}</span>
|
|
69
158
|
</div>
|
|
70
159
|
</Show>
|
|
@@ -72,61 +161,93 @@ export function EventCard(props: EventCardProps) {
|
|
|
72
161
|
</Show>
|
|
73
162
|
|
|
74
163
|
<Show when={displayedAttendees().length > 0}>
|
|
75
|
-
<div class=
|
|
76
|
-
<div class=
|
|
164
|
+
<div class={attendeesRow}>
|
|
165
|
+
<div class={avatars}>
|
|
77
166
|
<For each={displayedAttendees()}>
|
|
78
|
-
{(attendee) =>
|
|
79
|
-
<Avatar src={attendee.avatar} alt={attendee.name} size="sm" />
|
|
80
|
-
)}
|
|
167
|
+
{(attendee) => <Avatar src={attendee.avatar} alt={attendee.name} size="sm" />}
|
|
81
168
|
</For>
|
|
82
169
|
</div>
|
|
83
170
|
<Show when={remainingCount() > 0}>
|
|
84
|
-
<span class=
|
|
85
|
-
+{remainingCount()} más
|
|
86
|
-
</span>
|
|
171
|
+
<span class={more}>+{remainingCount()} más</span>
|
|
87
172
|
</Show>
|
|
88
173
|
</div>
|
|
89
174
|
</Show>
|
|
90
175
|
|
|
91
176
|
<Show when={props.actions}>
|
|
92
|
-
<div class=
|
|
93
|
-
{typeof props.actions ===
|
|
177
|
+
<div class={actionRow}>
|
|
178
|
+
{typeof props.actions === "function" ? props.actions() : props.actions}
|
|
94
179
|
</div>
|
|
95
180
|
</Show>
|
|
96
181
|
</div>
|
|
97
182
|
</div>
|
|
98
|
-
)
|
|
183
|
+
);
|
|
99
184
|
}
|
|
100
185
|
|
|
101
186
|
export interface EventListItemProps {
|
|
102
|
-
title: string
|
|
103
|
-
image?: string
|
|
104
|
-
subtitle?: string
|
|
105
|
-
onClick?: () => void
|
|
106
|
-
class?: string
|
|
187
|
+
title: string;
|
|
188
|
+
image?: string;
|
|
189
|
+
subtitle?: string;
|
|
190
|
+
onClick?: () => void;
|
|
191
|
+
class?: string;
|
|
107
192
|
}
|
|
108
193
|
|
|
194
|
+
const listItem = style({
|
|
195
|
+
display: "flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
gap: 12,
|
|
198
|
+
width: "full",
|
|
199
|
+
padding: 8,
|
|
200
|
+
borderRadius: "lg",
|
|
201
|
+
textAlign: "start",
|
|
202
|
+
cursor: "pointer",
|
|
203
|
+
backgroundColor: "transparent",
|
|
204
|
+
borderStyle: "none",
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const thumb = style({
|
|
208
|
+
width: 48,
|
|
209
|
+
height: 48,
|
|
210
|
+
flexShrink: 0,
|
|
211
|
+
borderRadius: "default",
|
|
212
|
+
objectFit: "cover",
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const listBody = style({
|
|
216
|
+
display: "flex",
|
|
217
|
+
flexDirection: "column",
|
|
218
|
+
flexGrow: 1,
|
|
219
|
+
minWidth: 0,
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const listTitle = style({
|
|
223
|
+
font: "ui",
|
|
224
|
+
fontWeight: "medium",
|
|
225
|
+
color: "[var(--color-primary-100)]",
|
|
226
|
+
overflow: "hidden",
|
|
227
|
+
textOverflow: "ellipsis",
|
|
228
|
+
whiteSpace: "nowrap",
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
const listSubtitle = style({
|
|
232
|
+
font: "ui-sm",
|
|
233
|
+
color: "[var(--color-text-secondary)]",
|
|
234
|
+
overflow: "hidden",
|
|
235
|
+
textOverflow: "ellipsis",
|
|
236
|
+
whiteSpace: "nowrap",
|
|
237
|
+
});
|
|
238
|
+
|
|
109
239
|
export function EventListItem(props: EventListItemProps) {
|
|
110
240
|
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
|
-
>
|
|
241
|
+
<HeadlessButton class={`${listItem} ${props.class ?? ""}`} onPress={() => props.onClick?.()}>
|
|
115
242
|
<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>
|
|
243
|
+
<img class={thumb} src={props.image} alt={props.title} />
|
|
123
244
|
</Show>
|
|
124
|
-
<div class=
|
|
125
|
-
<h4 class=
|
|
245
|
+
<div class={listBody}>
|
|
246
|
+
<h4 class={listTitle}>{props.title}</h4>
|
|
126
247
|
<Show when={props.subtitle}>
|
|
127
|
-
<p class=
|
|
248
|
+
<p class={listSubtitle}>{props.subtitle}</p>
|
|
128
249
|
</Show>
|
|
129
250
|
</div>
|
|
130
|
-
</
|
|
131
|
-
)
|
|
251
|
+
</HeadlessButton>
|
|
252
|
+
);
|
|
132
253
|
}
|
|
@@ -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,108 @@
|
|
|
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
|
+
// A ≥24px hit target (WCAG 2.5.8): the link is a full-width flex row, not a
|
|
39
|
+
// bare inline anchor (which rendered ~15px tall on the `ui` ramp).
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
minHeight: 32,
|
|
43
|
+
font: "ui",
|
|
44
|
+
textDecoration: { default: "none", isActive: "underline" },
|
|
45
|
+
fontWeight: { default: "normal", isActive: "medium" },
|
|
46
|
+
// `color` MUST stay after `font`: the S2 style() `font` shorthand emits a
|
|
47
|
+
// default text color that wins on source order otherwise. The resting link
|
|
48
|
+
// uses the flipping `--color-text` (AA on the light `bg-200` panel); the active
|
|
49
|
+
// link is set apart by its underline + medium weight + `--color-primary-300`.
|
|
50
|
+
color: {
|
|
51
|
+
default: "[var(--color-text)]",
|
|
52
|
+
isActive: "[var(--color-primary-300)]",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
29
55
|
|
|
56
|
+
export function NavLink(props: NavLinkProps) {
|
|
30
57
|
return (
|
|
31
58
|
<a
|
|
32
59
|
href={props.href}
|
|
33
|
-
class={`${props.active
|
|
60
|
+
class={`${link({ isActive: props.active ?? false })} ${props.class ?? ""}`}
|
|
34
61
|
>
|
|
35
62
|
{props.children}
|
|
36
63
|
</a>
|
|
37
|
-
)
|
|
64
|
+
);
|
|
38
65
|
}
|
|
39
66
|
|
|
40
67
|
export interface NavSectionProps {
|
|
41
|
-
title: string
|
|
42
|
-
links?: { href: string; label: string; active?: boolean }[]
|
|
43
|
-
children?: JSX.Element
|
|
44
|
-
class?: string
|
|
68
|
+
title: string;
|
|
69
|
+
links?: { href: string; label: string; active?: boolean }[];
|
|
70
|
+
children?: JSX.Element;
|
|
71
|
+
class?: string;
|
|
45
72
|
}
|
|
46
73
|
|
|
74
|
+
const sectionRow = style({
|
|
75
|
+
display: "flex",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const accentRail = style({
|
|
79
|
+
flexShrink: 0,
|
|
80
|
+
width: 4,
|
|
81
|
+
height: 20,
|
|
82
|
+
backgroundColor: "[var(--color-accent-300)]",
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const list = style({
|
|
86
|
+
display: "flex",
|
|
87
|
+
flexDirection: "column",
|
|
88
|
+
flexGrow: 1,
|
|
89
|
+
gap: 4,
|
|
90
|
+
paddingStart: 16,
|
|
91
|
+
});
|
|
92
|
+
|
|
47
93
|
export function NavSection(props: NavSectionProps) {
|
|
48
94
|
return (
|
|
49
|
-
<div class={props.class ??
|
|
95
|
+
<div class={props.class ?? ""}>
|
|
50
96
|
<NavItem title={props.title} />
|
|
51
|
-
<div class=
|
|
52
|
-
<div class=
|
|
53
|
-
<ul class=
|
|
97
|
+
<div class={sectionRow}>
|
|
98
|
+
<div class={accentRail} />
|
|
99
|
+
<ul class={list}>
|
|
54
100
|
<Show when={props.links}>
|
|
55
101
|
<For each={props.links}>
|
|
56
|
-
{(
|
|
102
|
+
{(navLink) => (
|
|
57
103
|
<li>
|
|
58
|
-
<NavLink href={
|
|
59
|
-
{
|
|
104
|
+
<NavLink href={navLink.href} active={navLink.active}>
|
|
105
|
+
{navLink.label}
|
|
60
106
|
</NavLink>
|
|
61
107
|
</li>
|
|
62
108
|
)}
|
|
@@ -66,23 +112,32 @@ export function NavSection(props: NavSectionProps) {
|
|
|
66
112
|
</ul>
|
|
67
113
|
</div>
|
|
68
114
|
</div>
|
|
69
|
-
)
|
|
115
|
+
);
|
|
70
116
|
}
|
|
71
117
|
|
|
72
118
|
export interface LateralNavProps {
|
|
73
|
-
transparent?: boolean
|
|
74
|
-
children?: JSX.Element
|
|
75
|
-
class?: string
|
|
119
|
+
transparent?: boolean;
|
|
120
|
+
children?: JSX.Element;
|
|
121
|
+
class?: string;
|
|
76
122
|
}
|
|
77
123
|
|
|
78
|
-
|
|
79
|
-
|
|
124
|
+
const nav = style<{ isTransparent: boolean }>({
|
|
125
|
+
width: 300,
|
|
126
|
+
margin: 0,
|
|
127
|
+
padding: 12,
|
|
128
|
+
borderEndWidth: 1,
|
|
129
|
+
borderStyle: "solid",
|
|
130
|
+
borderColor: "[var(--color-primary-600)]",
|
|
131
|
+
backgroundColor: {
|
|
132
|
+
default: "[var(--color-bg-200)]",
|
|
133
|
+
isTransparent: "transparent",
|
|
134
|
+
},
|
|
135
|
+
});
|
|
80
136
|
|
|
137
|
+
export function LateralNav(props: LateralNavProps) {
|
|
81
138
|
return (
|
|
82
|
-
<div
|
|
83
|
-
class={`hidden w-[300px] md:block ${bgColor()} m-0 border-r border-primary-600 p-3 ${props.class ?? ''}`}
|
|
84
|
-
>
|
|
139
|
+
<div class={`${nav({ isTransparent: props.transparent ?? false })} ${props.class ?? ""}`}>
|
|
85
140
|
{props.children}
|
|
86
141
|
</div>
|
|
87
|
-
)
|
|
142
|
+
);
|
|
88
143
|
}
|