@treeseed/core 0.10.21 → 0.11.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.
Files changed (111) hide show
  1. package/README.md +69 -125
  2. package/dist/content.js +1 -0
  3. package/dist/dev-watch.js +2 -1
  4. package/dist/dev.d.ts +1 -1
  5. package/dist/dev.js +51 -35
  6. package/dist/pages/404.astro +1 -1
  7. package/dist/pages/[slug].astro +4 -4
  8. package/dist/pages/agents/[slug].astro +3 -3
  9. package/dist/pages/agents/index.astro +3 -3
  10. package/dist/pages/books/[slug].astro +3 -3
  11. package/dist/pages/books/index.astro +3 -3
  12. package/dist/pages/contact.astro +2 -2
  13. package/dist/pages/decisions/[slug].astro +3 -3
  14. package/dist/pages/decisions/index.astro +3 -3
  15. package/dist/pages/docs-runtime/[...slug].astro +3 -3
  16. package/dist/pages/docs-runtime/index.astro +3 -3
  17. package/dist/pages/index.astro +11 -11
  18. package/dist/pages/notes/[slug].astro +3 -3
  19. package/dist/pages/notes/index.astro +3 -3
  20. package/dist/pages/objectives/[slug].astro +3 -3
  21. package/dist/pages/objectives/index.astro +3 -3
  22. package/dist/pages/people/[slug].astro +3 -3
  23. package/dist/pages/people/index.astro +3 -3
  24. package/dist/pages/proposals/[slug].astro +3 -3
  25. package/dist/pages/proposals/index.astro +3 -3
  26. package/dist/pages/questions/[slug].astro +3 -3
  27. package/dist/pages/questions/index.astro +3 -3
  28. package/dist/pages/ui/index.astro +23 -23
  29. package/dist/platform-resources.js +5 -1
  30. package/dist/scripts/build-dist.js +2 -0
  31. package/dist/scripts/release-verify.js +24 -2
  32. package/dist/scripts/workspace-bootstrap.js +3 -0
  33. package/dist/site.js +49 -11
  34. package/dist/styles/global.css +5 -5
  35. package/dist/templates.d.ts +2 -0
  36. package/dist/templates.js +8 -6
  37. package/package.json +3 -45
  38. package/templates/github/deploy-web.workflow.yml +36 -2
  39. package/dist/components/DevWatchReload.astro +0 -45
  40. package/dist/components/SiteTitle.astro +0 -51
  41. package/dist/components/content/ContentStatusLegend.astro +0 -18
  42. package/dist/components/content/StatusBadge.astro +0 -11
  43. package/dist/components/docs/BookFontControls.astro +0 -180
  44. package/dist/components/docs/DesktopSidebarToggle.astro +0 -88
  45. package/dist/components/docs/DownloadBook.astro +0 -34
  46. package/dist/components/docs/Footer.astro +0 -112
  47. package/dist/components/docs/Header.astro +0 -157
  48. package/dist/components/docs/PageFrame.astro +0 -260
  49. package/dist/components/docs/PageSidebar.astro +0 -63
  50. package/dist/components/docs/PageTitle.astro +0 -39
  51. package/dist/components/docs/Sidebar.astro +0 -41
  52. package/dist/components/docs/ThemeSelect.astro +0 -5
  53. package/dist/components/forms/ContactForm.astro +0 -233
  54. package/dist/components/forms/FooterSubscribeForm.astro +0 -188
  55. package/dist/components/site/BookList.astro +0 -27
  56. package/dist/components/site/CTASection.astro +0 -24
  57. package/dist/components/site/ChronicleList.astro +0 -33
  58. package/dist/components/site/Hero.astro +0 -18
  59. package/dist/components/site/NotesList.astro +0 -29
  60. package/dist/components/site/PathCard.astro +0 -16
  61. package/dist/components/site/ProfileList.astro +0 -30
  62. package/dist/components/site/PublishedContentBody.astro +0 -5
  63. package/dist/components/site/RouteNotFound.astro +0 -25
  64. package/dist/components/site/SectionIntro.astro +0 -9
  65. package/dist/components/site/StageBanner.astro +0 -8
  66. package/dist/components/site/TrustCallout.astro +0 -9
  67. package/dist/components/starlight.js +0 -6
  68. package/dist/components/ui/data/ActionList.astro +0 -51
  69. package/dist/components/ui/data/Badge.astro +0 -19
  70. package/dist/components/ui/data/DataTable.astro +0 -51
  71. package/dist/components/ui/data/KeyValueList.astro +0 -28
  72. package/dist/components/ui/data/MetricCard.astro +0 -25
  73. package/dist/components/ui/data/MetricGrid.astro +0 -27
  74. package/dist/components/ui/data/StatusPill.astro +0 -20
  75. package/dist/components/ui/forms/Button.astro +0 -59
  76. package/dist/components/ui/forms/Field.astro +0 -39
  77. package/dist/components/ui/forms/FormActions.astro +0 -12
  78. package/dist/components/ui/forms/PasswordMeter.astro +0 -80
  79. package/dist/components/ui/forms/RadioGroup.astro +0 -55
  80. package/dist/components/ui/forms/Select.astro +0 -47
  81. package/dist/components/ui/forms/TextInput.astro +0 -58
  82. package/dist/components/ui/forms/Textarea.astro +0 -45
  83. package/dist/components/ui/layout/PageHeader.astro +0 -45
  84. package/dist/components/ui/shell/AppShell.astro +0 -130
  85. package/dist/components/ui/shell/BottomNav.astro +0 -42
  86. package/dist/components/ui/shell/ProjectHeader.astro +0 -66
  87. package/dist/components/ui/shell/PublicFooter.astro +0 -39
  88. package/dist/components/ui/shell/PublicShell.astro +0 -184
  89. package/dist/components/ui/shell/RailNav.astro +0 -42
  90. package/dist/components/ui/shell/ShellIconLink.astro +0 -30
  91. package/dist/components/ui/shell/TopBar.astro +0 -52
  92. package/dist/components/ui/surface/Card.astro +0 -46
  93. package/dist/components/ui/surface/EmptyState.astro +0 -45
  94. package/dist/components/ui/surface/Panel.astro +0 -54
  95. package/dist/components/ui/theme/ThemeMenu.astro +0 -58
  96. package/dist/components/ui/theme/ThemePreviewSwatch.astro +0 -18
  97. package/dist/components/ui/theme/ThemeScript.astro +0 -112
  98. package/dist/components/ui/theme/ThemeSelector.astro +0 -202
  99. package/dist/components/ui/types.js +0 -0
  100. package/dist/layouts/AuthoredEntryLayout.astro +0 -195
  101. package/dist/layouts/BookLayout.astro +0 -35
  102. package/dist/layouts/BridgeLayout.astro +0 -11
  103. package/dist/layouts/ContentLayout.astro +0 -24
  104. package/dist/layouts/MainLayout.astro +0 -76
  105. package/dist/layouts/NoteLayout.astro +0 -26
  106. package/dist/layouts/ProfileLayout.astro +0 -85
  107. package/dist/styles/app-shell.css +0 -626
  108. package/dist/styles/forms.css +0 -274
  109. package/dist/styles/theme.css +0 -198
  110. package/dist/styles/tokens.css +0 -65
  111. package/dist/styles/ui.css +0 -551
@@ -1,130 +0,0 @@
1
- ---
2
- import '../../../styles/tokens.css';
3
- import '../../../styles/theme.css';
4
- import '../../../styles/ui.css';
5
- import '../../../styles/forms.css';
6
- import '../../../styles/app-shell.css';
7
- import { ClientRouter } from 'astro:transitions';
8
- import ThemeScript from '../theme/ThemeScript.astro';
9
- import ThemeMenu from '../theme/ThemeMenu.astro';
10
- import RailNav from './RailNav.astro';
11
- import BottomNav from './BottomNav.astro';
12
- import TopBar from './TopBar.astro';
13
- import ShellIconLink from './ShellIconLink.astro';
14
- import Button from '../forms/Button.astro';
15
- import DevWatchReload from '../../DevWatchReload.astro';
16
- import type { ButtonAction } from '../types.js';
17
- import type { ThemePreference } from '../../../utils/theme.js';
18
-
19
- interface Brand {
20
- name: string;
21
- tag?: string;
22
- href: string;
23
- logoSrc?: string;
24
- logoAlt?: string;
25
- mark?: string;
26
- }
27
-
28
- interface NavItem {
29
- label: string;
30
- href: string;
31
- ariaLabel?: string;
32
- }
33
-
34
- interface Props {
35
- title: string;
36
- description: string;
37
- currentPath: string;
38
- appearance: ThemePreference;
39
- brand: Brand;
40
- navItems: NavItem[];
41
- quickActions?: ButtonAction[];
42
- bottomNavItems?: NavItem[];
43
- }
44
-
45
- const {
46
- title,
47
- description,
48
- currentPath,
49
- appearance,
50
- brand,
51
- navItems,
52
- quickActions = [],
53
- bottomNavItems = navItems.slice(0, 5),
54
- } = Astro.props as Props;
55
- ---
56
-
57
- <!doctype html>
58
- <html lang="en">
59
- <head>
60
- <meta charset="utf-8" />
61
- <meta name="viewport" content="width=device-width, initial-scale=1" />
62
- <title>{title}</title>
63
- <meta name="description" content={description} />
64
- <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
65
- <link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml" />
66
- <ThemeScript defaultScheme={appearance.scheme} defaultMode={appearance.mode} preferDefaultPreference />
67
- <ClientRouter />
68
- </head>
69
- <body>
70
- <a class="ts-skip-link" href="#main-content">Skip to content</a>
71
- <div class="ts-app-shell">
72
- <aside class="ts-app-shell__rail">
73
- <div class="ts-app-shell__rail-scroll">
74
- <TopBar brand={brand} />
75
- <div class="ts-app-shell__rail-context">
76
- <slot name="railContext" />
77
- </div>
78
- <RailNav items={navItems} currentPath={currentPath} />
79
- </div>
80
- {quickActions.length > 0 ? (
81
- <div class="ts-app-shell__quick-actions">
82
- <p class="ts-app-shell__eyebrow">Quick actions</p>
83
- <div class="ts-app-shell__quick-list">
84
- {quickActions.map((action) => (
85
- <Button
86
- href={action.href}
87
- type={action.type}
88
- variant={action.variant ?? 'secondary'}
89
- ariaLabel={action.ariaLabel}
90
- disabled={action.disabled}
91
- reload={action.reload}
92
- size="sm"
93
- >
94
- {action.label}
95
- </Button>
96
- ))}
97
- </div>
98
- </div>
99
- ) : null}
100
- </aside>
101
- <main class="ts-app-shell__main" id="main-content">
102
- <TopBar brand={brand} class="ts-app-shell__mobile-top">
103
- <Fragment slot="actions">
104
- <ThemeMenu selectedScheme={appearance.scheme} selectedMode={appearance.mode} />
105
- <ShellIconLink href="/" label="Book home" icon="book" />
106
- </Fragment>
107
- </TopBar>
108
- <header class="ts-app-shell__header">
109
- <div class="ts-app-shell__title">
110
- <h1>{title}</h1>
111
- <p>{description}</p>
112
- </div>
113
- <div class="ts-app-shell__header-actions">
114
- <div class="ts-shell-utility-actions">
115
- <ThemeMenu selectedScheme={appearance.scheme} selectedMode={appearance.mode} />
116
- <ShellIconLink href="/" label="Book home" icon="book" />
117
- </div>
118
- <slot name="headerAction" />
119
- </div>
120
- </header>
121
- <slot name="projectContext" />
122
- <slot />
123
- </main>
124
- {bottomNavItems.length > 0 ? <BottomNav items={bottomNavItems} currentPath={currentPath} /> : null}
125
- </div>
126
- <slot name="sensitiveModal" />
127
- <slot name="modal" />
128
- <DevWatchReload />
129
- </body>
130
- </html>
@@ -1,42 +0,0 @@
1
- ---
2
- interface NavItem {
3
- label: string;
4
- href: string;
5
- ariaLabel?: string;
6
- }
7
-
8
- interface Props {
9
- items: NavItem[];
10
- currentPath: string;
11
- label?: string;
12
- class?: string;
13
- }
14
-
15
- const {
16
- items,
17
- currentPath,
18
- label = 'Primary',
19
- class: className,
20
- } = Astro.props as Props;
21
-
22
- function normalizePath(path: string) {
23
- if (path.length <= 1) return path;
24
- return path.replace(/\/+$/u, '');
25
- }
26
-
27
- function isCurrentPath(href: string) {
28
- const current = normalizePath(currentPath);
29
- const target = normalizePath(href);
30
- if (target === '/') return current === '/';
31
- if (target === '/app') return current === '/app';
32
- return current === target || current.startsWith(`${target}/`);
33
- }
34
- ---
35
-
36
- <nav class:list={['ts-bottom-nav', className]} aria-label={label}>
37
- {items.map((item) => (
38
- <a class="ts-bottom-nav__link" href={item.href} aria-label={item.ariaLabel} aria-current={isCurrentPath(item.href) ? 'page' : undefined}>
39
- <span>{item.label}</span>
40
- </a>
41
- ))}
42
- </nav>
@@ -1,66 +0,0 @@
1
- ---
2
- import Badge from '../data/Badge.astro';
3
- import Button from '../forms/Button.astro';
4
- import type { ButtonAction } from '../types.js';
5
-
6
- interface TabItem {
7
- label: string;
8
- href: string;
9
- }
10
-
11
- interface Props {
12
- title: string;
13
- description?: string;
14
- badges?: string[];
15
- actions?: ButtonAction[];
16
- tabs?: TabItem[];
17
- currentPath?: string;
18
- class?: string;
19
- }
20
-
21
- const {
22
- title,
23
- description,
24
- badges = [],
25
- actions = [],
26
- tabs = [],
27
- currentPath = '',
28
- class: className,
29
- } = Astro.props as Props;
30
- ---
31
-
32
- <section class:list={['ts-project-header', className]}>
33
- <div class="ts-project-header__main">
34
- {badges.length > 0 ? (
35
- <div class="ts-project-header__badges">
36
- {badges.map((badge) => <Badge>{badge}</Badge>)}
37
- </div>
38
- ) : null}
39
- <h2>{title}</h2>
40
- {description ? <p>{description}</p> : null}
41
- </div>
42
- {actions.length > 0 || Astro.slots.has('actions') ? (
43
- <div class="ts-project-header__actions">
44
- {actions.map((action) => (
45
- <Button
46
- href={action.href}
47
- type={action.type}
48
- variant={action.variant ?? 'secondary'}
49
- ariaLabel={action.ariaLabel}
50
- disabled={action.disabled}
51
- size="sm"
52
- >
53
- {action.label}
54
- </Button>
55
- ))}
56
- <slot name="actions" />
57
- </div>
58
- ) : null}
59
- {tabs.length > 0 ? (
60
- <nav class="ts-shell-tabs" aria-label="Project">
61
- {tabs.map((tab) => (
62
- <a class="ts-shell-tab" href={tab.href} aria-current={currentPath === tab.href ? 'page' : undefined}>{tab.label}</a>
63
- ))}
64
- </nav>
65
- ) : null}
66
- </section>
@@ -1,39 +0,0 @@
1
- ---
2
- import FooterSubscribeForm from '../../forms/FooterSubscribeForm.astro';
3
- import { PROJECT_STAGE } from '../../../utils/content-status';
4
- import { SITE } from '../../../utils/seo';
5
- import { SITE_FOOTER_MENU } from '../../../utils/site-config';
6
-
7
- interface Props {
8
- currentPath?: string;
9
- }
10
-
11
- const { currentPath = Astro.url.pathname } = Astro.props as Props;
12
- ---
13
-
14
- <footer class="ts-public-footer">
15
- <div class="ts-public-footer__inner">
16
- <div class="ts-public-footer__grid">
17
- <div class="ts-public-footer__column">
18
- <p class="ts-public-footer__title">{SITE.name}</p>
19
- <p class="ts-public-footer__copy">{SITE.summary}</p>
20
- </div>
21
- <div class="ts-public-footer__column">
22
- <p class="ts-public-footer__heading">Project stage</p>
23
- <p class="ts-public-footer__column-title">{PROJECT_STAGE.label}</p>
24
- <p class="ts-public-footer__copy">{PROJECT_STAGE.description}</p>
25
- </div>
26
- {SITE_FOOTER_MENU.map((group) => (
27
- <div class="ts-public-footer__column">
28
- <p class="ts-public-footer__heading">{group.label}</p>
29
- <div class="ts-public-footer__links">
30
- {group.items.map((item) => (
31
- <a href={item.href}>{item.label}</a>
32
- ))}
33
- </div>
34
- </div>
35
- ))}
36
- </div>
37
- <FooterSubscribeForm currentPath={currentPath} />
38
- </div>
39
- </footer>
@@ -1,184 +0,0 @@
1
- ---
2
- import '../../../styles/tokens.css';
3
- import '../../../styles/theme.css';
4
- import '../../../styles/ui.css';
5
- import '../../../styles/forms.css';
6
- import '../../../styles/app-shell.css';
7
- import { ClientRouter } from 'astro:transitions';
8
- import ThemeScript from '../theme/ThemeScript.astro';
9
- import ThemeMenu from '../theme/ThemeMenu.astro';
10
- import TopBar from './TopBar.astro';
11
- import Button from '../forms/Button.astro';
12
- import PublicFooter from './PublicFooter.astro';
13
- import DevWatchReload from '../../DevWatchReload.astro';
14
- import type { ButtonAction } from '../types.js';
15
- import type { ThemePreference } from '../../../utils/theme.js';
16
-
17
- interface Brand {
18
- name: string;
19
- tag?: string;
20
- href: string;
21
- logoSrc?: string;
22
- logoAlt?: string;
23
- mark?: string;
24
- }
25
-
26
- interface NavItem {
27
- label: string;
28
- href: string;
29
- ariaLabel?: string;
30
- }
31
-
32
- interface NavGroup {
33
- label: string;
34
- items: NavItem[];
35
- }
36
-
37
- interface Props {
38
- title: string;
39
- description: string;
40
- currentPath: string;
41
- appearance: ThemePreference;
42
- brand: Brand;
43
- navItems: NavItem[];
44
- navGroups?: NavGroup[];
45
- actions?: ButtonAction[];
46
- showAppearanceControl?: boolean;
47
- preferServerAppearance?: boolean;
48
- contentWidth?: 'shell' | 'content';
49
- }
50
-
51
- const {
52
- title,
53
- description,
54
- currentPath,
55
- appearance,
56
- brand,
57
- navItems,
58
- navGroups = [],
59
- actions = [],
60
- showAppearanceControl = true,
61
- preferServerAppearance = false,
62
- contentWidth = 'shell',
63
- } = Astro.props as Props;
64
-
65
- function isCurrentPath(href: string) {
66
- if (href === '/') return currentPath === '/';
67
- return currentPath === href || currentPath.startsWith(href);
68
- }
69
- ---
70
-
71
- <!doctype html>
72
- <html lang="en">
73
- <head>
74
- <meta charset="utf-8" />
75
- <meta name="viewport" content="width=device-width, initial-scale=1" />
76
- <title>{title}</title>
77
- <meta name="description" content={description} />
78
- <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
79
- <link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml" />
80
- <ThemeScript
81
- defaultScheme={appearance.scheme}
82
- defaultMode={appearance.mode}
83
- preferDefaultPreference={preferServerAppearance}
84
- />
85
- <ClientRouter />
86
- <slot name="head" />
87
- </head>
88
- <body>
89
- <a class="ts-skip-link" href="#main-content">Skip to content</a>
90
- <div class:list={['ts-public-shell', contentWidth === 'content' && 'ts-public-shell--content']}>
91
- <header class="ts-public-shell__header">
92
- <TopBar brand={brand}>
93
- <Fragment slot="actions">
94
- <nav class="ts-public-shell__nav" aria-label="Primary" data-ts-public-nav>
95
- {navGroups.length > 0 ? (
96
- navGroups.map((group) => (
97
- <details class="ts-public-shell__nav-group" data-ts-public-nav-group>
98
- <summary
99
- class:list={[
100
- 'ts-public-shell__link ts-public-shell__summary',
101
- group.items.some((item) => isCurrentPath(item.href)) && 'ts-public-shell__summary--active',
102
- ]}
103
- >
104
- {group.label}
105
- <span aria-hidden="true">▾</span>
106
- </summary>
107
- <div class="ts-public-shell__menu">
108
- {group.items.map((item) => (
109
- <a
110
- class="ts-public-shell__menu-link"
111
- href={item.href}
112
- aria-label={item.ariaLabel}
113
- aria-current={isCurrentPath(item.href) ? 'page' : undefined}
114
- >
115
- {item.label}
116
- </a>
117
- ))}
118
- </div>
119
- </details>
120
- ))
121
- ) : (
122
- navItems.map((item) => (
123
- <a class="ts-public-shell__link" href={item.href} aria-label={item.ariaLabel} aria-current={isCurrentPath(item.href) ? 'page' : undefined}>
124
- {item.label}
125
- </a>
126
- ))
127
- )}
128
- </nav>
129
- {showAppearanceControl ? <ThemeMenu selectedScheme={appearance.scheme} selectedMode={appearance.mode} /> : null}
130
- {actions.map((action) => (
131
- <Button
132
- href={action.href}
133
- type={action.type}
134
- variant={action.variant ?? 'secondary'}
135
- ariaLabel={action.ariaLabel}
136
- disabled={action.disabled}
137
- reload={action.reload}
138
- size="sm"
139
- >
140
- {action.label}
141
- </Button>
142
- ))}
143
- <slot name="actions" />
144
- </Fragment>
145
- </TopBar>
146
- </header>
147
- <main class="ts-public-shell__main" id="main-content">
148
- <slot />
149
- </main>
150
- {Astro.slots.has('footer') ? <slot name="footer" /> : <PublicFooter currentPath={currentPath} />}
151
- <slot name="afterFooter" />
152
- </div>
153
- <DevWatchReload />
154
- <script>
155
- const publicNav = document.querySelector('[data-ts-public-nav]');
156
- const navGroups = document.querySelectorAll<HTMLDetailsElement>('[data-ts-public-nav-group]');
157
-
158
- navGroups.forEach((group) => {
159
- group.addEventListener('toggle', () => {
160
- if (!group.open) return;
161
- navGroups.forEach((otherGroup) => {
162
- if (otherGroup !== group) otherGroup.open = false;
163
- });
164
- });
165
- });
166
-
167
- document.addEventListener('click', (event) => {
168
- if (!(publicNav instanceof HTMLElement)) return;
169
- if (event.target instanceof Node && publicNav.contains(event.target)) return;
170
- navGroups.forEach((group) => {
171
- group.open = false;
172
- });
173
- });
174
-
175
- publicNav?.addEventListener('click', (event) => {
176
- const target = event.target;
177
- if (!(target instanceof HTMLElement) || !target.closest('a')) return;
178
- navGroups.forEach((group) => {
179
- group.open = false;
180
- });
181
- });
182
- </script>
183
- </body>
184
- </html>
@@ -1,42 +0,0 @@
1
- ---
2
- interface NavItem {
3
- label: string;
4
- href: string;
5
- ariaLabel?: string;
6
- }
7
-
8
- interface Props {
9
- items: NavItem[];
10
- currentPath: string;
11
- label?: string;
12
- class?: string;
13
- }
14
-
15
- const {
16
- items,
17
- currentPath,
18
- label = 'Application',
19
- class: className,
20
- } = Astro.props as Props;
21
-
22
- function normalizePath(path: string) {
23
- if (path.length <= 1) return path;
24
- return path.replace(/\/+$/u, '');
25
- }
26
-
27
- function isCurrentPath(href: string) {
28
- const current = normalizePath(currentPath);
29
- const target = normalizePath(href);
30
- if (target === '/') return current === '/';
31
- if (target === '/app') return current === '/app';
32
- return current === target || current.startsWith(`${target}/`);
33
- }
34
- ---
35
-
36
- <nav class:list={['ts-rail-nav', className]} aria-label={label}>
37
- {items.map((item) => (
38
- <a class="ts-rail-nav__link" href={item.href} aria-label={item.ariaLabel} aria-current={isCurrentPath(item.href) ? 'page' : undefined}>
39
- <span>{item.label}</span>
40
- </a>
41
- ))}
42
- </nav>
@@ -1,30 +0,0 @@
1
- ---
2
- interface Props {
3
- href: string;
4
- label: string;
5
- icon: 'book' | 'manager';
6
- }
7
-
8
- const { href, label, icon } = Astro.props as Props;
9
- ---
10
-
11
- <a
12
- href={href}
13
- aria-label={label}
14
- title={label}
15
- class="ts-public-shell__icon-link ts-public-shell__icon-link--stroke"
16
- >
17
- {icon === 'manager' ? (
18
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
19
- <path d="M12 15.25a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5Z" />
20
- <path d="M19.43 12.98c.04-.32.07-.65.07-.98s-.02-.66-.07-.98l2.05-1.6-2-3.46-2.42.98a7.65 7.65 0 0 0-1.7-.98L15 3.38h-4l-.36 2.58c-.6.24-1.17.57-1.7.98l-2.42-.98-2 3.46 2.05 1.6c-.04.32-.07.65-.07.98s.02.66.07.98l-2.05 1.6 2 3.46 2.42-.98c.52.41 1.09.74 1.7.98l.36 2.58h4l.36-2.58c.6-.24 1.17-.57 1.7-.98l2.42.98 2-3.46-2.05-1.6Z" />
21
- </svg>
22
- ) : (
23
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
24
- <path d="M4.75 5.75A2.75 2.75 0 0 1 7.5 3h11.75v16.25H7.5a2.75 2.75 0 0 0-2.75 2.75V5.75Z" />
25
- <path d="M7.5 19.25h11.75" />
26
- <path d="M8.25 7.25h7.5" />
27
- <path d="M8.25 10.75h6" />
28
- </svg>
29
- )}
30
- </a>
@@ -1,52 +0,0 @@
1
- ---
2
- import Button from '../forms/Button.astro';
3
- import type { ButtonAction } from '../types.js';
4
-
5
- interface Brand {
6
- name: string;
7
- tag?: string;
8
- href: string;
9
- logoSrc?: string;
10
- logoAlt?: string;
11
- mark?: string;
12
- }
13
-
14
- interface Props {
15
- brand: Brand;
16
- actions?: ButtonAction[];
17
- class?: string;
18
- }
19
-
20
- const {
21
- brand,
22
- actions = [],
23
- class: className,
24
- } = Astro.props as Props;
25
- ---
26
-
27
- <div class:list={['ts-top-bar', className]}>
28
- <a class="ts-shell-brand" href={brand.href}>
29
- <span class="ts-shell-brand__mark">
30
- {brand.logoSrc ? <img src={brand.logoSrc} alt={brand.logoAlt ?? ''} width="60" height="60" loading="eager" /> : brand.mark}
31
- </span>
32
- <span class="ts-shell-brand__text">
33
- <span class="ts-shell-brand__name">{brand.name}</span>
34
- {brand.tag ? <span class="ts-shell-brand__tag">{brand.tag}</span> : null}
35
- </span>
36
- </a>
37
- <div class="ts-top-bar__actions">
38
- <slot name="actions" />
39
- {actions.map((action) => (
40
- <Button
41
- href={action.href}
42
- type={action.type}
43
- variant={action.variant ?? 'secondary'}
44
- ariaLabel={action.ariaLabel}
45
- disabled={action.disabled}
46
- size="sm"
47
- >
48
- {action.label}
49
- </Button>
50
- ))}
51
- </div>
52
- </div>
@@ -1,46 +0,0 @@
1
- ---
2
- import type { Tone } from '../types.js';
3
-
4
- interface Props {
5
- href?: string;
6
- eyebrow?: string;
7
- title?: string;
8
- description?: string;
9
- tone?: Tone;
10
- interactive?: boolean;
11
- class?: string;
12
- }
13
-
14
- const {
15
- href,
16
- eyebrow,
17
- title,
18
- description,
19
- tone = 'default',
20
- interactive = false,
21
- class: className,
22
- } = Astro.props as Props;
23
-
24
- const classes = ['ts-card', className].filter(Boolean).join(' ');
25
- const isInteractive = href || interactive;
26
- ---
27
-
28
- {
29
- href ? (
30
- <a href={href} class={classes} data-tone={tone} data-interactive="true">
31
- {eyebrow ? <p class="ts-card__eyebrow">{eyebrow}</p> : null}
32
- {title ? <h3 class="ts-card__title">{title}</h3> : null}
33
- {description ? <p class="ts-card__description">{description}</p> : null}
34
- <div class="ts-card__body"><slot /></div>
35
- <slot name="footer" />
36
- </a>
37
- ) : (
38
- <article class={classes} data-tone={tone} data-interactive={isInteractive ? 'true' : undefined}>
39
- {eyebrow ? <p class="ts-card__eyebrow">{eyebrow}</p> : null}
40
- {title ? <h3 class="ts-card__title">{title}</h3> : null}
41
- {description ? <p class="ts-card__description">{description}</p> : null}
42
- <div class="ts-card__body"><slot /></div>
43
- <slot name="footer" />
44
- </article>
45
- )
46
- }
@@ -1,45 +0,0 @@
1
- ---
2
- import Button from '../forms/Button.astro';
3
- import type { ButtonAction } from '../types.js';
4
-
5
- interface Props {
6
- eyebrow?: string;
7
- title: string;
8
- description?: string;
9
- actions?: ButtonAction[];
10
- class?: string;
11
- }
12
-
13
- const {
14
- eyebrow,
15
- title,
16
- description,
17
- actions = [],
18
- class: className,
19
- } = Astro.props as Props;
20
- ---
21
-
22
- <section class:list={['ts-empty-state', className]}>
23
- {eyebrow ? <p class="ts-empty-state__eyebrow">{eyebrow}</p> : null}
24
- <h2 class="ts-empty-state__title">{title}</h2>
25
- {description ? <p class="ts-empty-state__description">{description}</p> : null}
26
- <div class="ts-empty-state__body">
27
- <slot />
28
- </div>
29
- {actions.length > 0 || Astro.slots.has('actions') ? (
30
- <div class="ts-empty-state__actions">
31
- {actions.map((action) => (
32
- <Button
33
- href={action.href}
34
- type={action.type}
35
- variant={action.variant ?? 'secondary'}
36
- ariaLabel={action.ariaLabel}
37
- disabled={action.disabled}
38
- >
39
- {action.label}
40
- </Button>
41
- ))}
42
- <slot name="actions" />
43
- </div>
44
- ) : null}
45
- </section>