eidotter 0.36.0 → 0.37.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/README.md +19 -0
- package/dist/components/AIText/components/AIText.d.ts +0 -1
- package/dist/components/AIText/components/AIText.js +23 -0
- package/dist/components/AIText/components/index.d.ts +2 -2
- package/dist/components/AIText/components/index.js +1 -0
- package/dist/components/AIText/index.d.ts +2 -2
- package/dist/components/AIText/index.js +1 -0
- package/dist/components/Accordion/components/AccordionFill.d.ts +0 -1
- package/dist/components/Accordion/components/AccordionFill.js +12 -0
- package/dist/components/Accordion/components/Section.d.ts +0 -1
- package/dist/components/Accordion/components/Section.js +22 -0
- package/dist/components/Accordion/components/index.d.ts +4 -4
- package/dist/components/Accordion/components/index.js +2 -0
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/Alert/components/Alert.d.ts +0 -1
- package/dist/components/Alert/components/Alert.js +51 -0
- package/dist/components/Alert/components/index.d.ts +2 -2
- package/dist/components/Alert/components/index.js +1 -0
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Badge/components/Badge.d.ts +0 -1
- package/dist/components/Badge/components/Badge.js +31 -0
- package/dist/components/Badge/components/index.d.ts +2 -2
- package/dist/components/Badge/components/index.js +1 -0
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Brand/components/BrandLockup.js +14 -0
- package/dist/components/Brand/components/Logo.d.ts +0 -1
- package/dist/components/Brand/components/Logo.js +22 -0
- package/dist/components/Brand/components/Wordmark.d.ts +0 -1
- package/dist/components/Brand/components/Wordmark.js +13 -0
- package/dist/components/Brand/components/index.d.ts +6 -6
- package/dist/components/Brand/components/index.js +3 -0
- package/dist/components/Brand/index.d.ts +1 -1
- package/dist/components/Brand/index.js +1 -0
- package/dist/components/Breadcrumb/components/Breadcrumb.d.ts +0 -1
- package/dist/components/Breadcrumb/components/Breadcrumb.js +29 -0
- package/dist/components/Breadcrumb/components/index.d.ts +2 -2
- package/dist/components/Breadcrumb/components/index.js +1 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -2
- package/dist/components/Breadcrumb/index.js +1 -0
- package/dist/components/Button/components/Button.d.ts +0 -2
- package/dist/components/Button/components/Button.js +49 -0
- package/dist/components/Button/components/index.d.ts +2 -2
- package/dist/components/Button/components/index.js +1 -0
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Card/components/Card.d.ts +0 -1
- package/dist/components/Card/components/Card.js +16 -0
- package/dist/components/Card/components/index.d.ts +2 -2
- package/dist/components/Card/components/index.js +1 -0
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Chat/components/ChatContainer.d.ts +1 -1
- package/dist/components/Chat/components/ChatContainer.js +20 -0
- package/dist/components/Chat/components/ChatHistory.d.ts +0 -1
- package/dist/components/Chat/components/ChatHistory.js +27 -0
- package/dist/components/Chat/components/ChatInput.d.ts +0 -2
- package/dist/components/Chat/components/ChatInput.js +37 -0
- package/dist/components/Chat/components/ChatMessage.d.ts +0 -2
- package/dist/components/Chat/components/ChatMessage.js +18 -0
- package/dist/components/Chat/components/index.d.ts +8 -8
- package/dist/components/Chat/components/index.js +4 -0
- package/dist/components/Chat/index.d.ts +2 -2
- package/dist/components/Chat/index.js +1 -0
- package/dist/components/Checkbox/components/Checkbox.d.ts +0 -2
- package/dist/components/Checkbox/components/Checkbox.js +11 -0
- package/dist/components/Checkbox/components/index.d.ts +2 -2
- package/dist/components/Checkbox/components/index.js +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -2
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/ChecklistRow/components/ChecklistRow.js +18 -0
- package/dist/components/ChecklistRow/components/index.d.ts +2 -2
- package/dist/components/ChecklistRow/components/index.js +1 -0
- package/dist/components/ChecklistRow/index.d.ts +2 -2
- package/dist/components/ChecklistRow/index.js +1 -0
- package/dist/components/CmdPalette/components/CmdPalette.d.ts +0 -2
- package/dist/components/CmdPalette/components/CmdPalette.js +169 -0
- package/dist/components/CmdPalette/components/index.d.ts +2 -2
- package/dist/components/CmdPalette/components/index.js +1 -0
- package/dist/components/CmdPalette/index.d.ts +2 -2
- package/dist/components/CmdPalette/index.js +1 -0
- package/dist/components/CommandPrompt/components/CommandPrompt.d.ts +0 -2
- package/dist/components/CommandPrompt/components/CommandPrompt.js +34 -0
- package/dist/components/CommandPrompt/components/index.d.ts +2 -2
- package/dist/components/CommandPrompt/components/index.js +1 -0
- package/dist/components/CommandPrompt/index.d.ts +1 -1
- package/dist/components/CommandPrompt/index.js +1 -0
- package/dist/components/CopyButton/components/CopyButton.js +50 -0
- package/dist/components/CopyButton/components/index.d.ts +2 -2
- package/dist/components/CopyButton/components/index.js +1 -0
- package/dist/components/CopyButton/index.d.ts +2 -2
- package/dist/components/CopyButton/index.js +1 -0
- package/dist/components/DosFigure/components/DosFigure.d.ts +0 -1
- package/dist/components/DosFigure/components/DosFigure.js +26 -0
- package/dist/components/DosFigure/components/index.d.ts +2 -2
- package/dist/components/DosFigure/components/index.js +1 -0
- package/dist/components/DosFigure/index.d.ts +2 -2
- package/dist/components/DosFigure/index.js +1 -0
- package/dist/components/EmptyState/components/EmptyState.js +18 -0
- package/dist/components/EmptyState/components/index.d.ts +2 -2
- package/dist/components/EmptyState/components/index.js +1 -0
- package/dist/components/EmptyState/index.d.ts +2 -2
- package/dist/components/EmptyState/index.js +1 -0
- package/dist/components/FilterBar/components/FilterBar.d.ts +0 -1
- package/dist/components/FilterBar/components/FilterBar.js +120 -0
- package/dist/components/FilterBar/components/index.d.ts +2 -2
- package/dist/components/FilterBar/components/index.js +1 -0
- package/dist/components/FilterBar/index.d.ts +2 -2
- package/dist/components/FilterBar/index.js +1 -0
- package/dist/components/Footer/components/Footer.d.ts +0 -1
- package/dist/components/Footer/components/Footer.js +18 -0
- package/dist/components/Footer/components/index.d.ts +2 -2
- package/dist/components/Footer/components/index.js +1 -0
- package/dist/components/Footer/index.d.ts +2 -2
- package/dist/components/Footer/index.js +1 -0
- package/dist/components/Header/components/Header.d.ts +1 -2
- package/dist/components/Header/components/Header.js +13 -0
- package/dist/components/Header/components/index.d.ts +2 -2
- package/dist/components/Header/components/index.js +1 -0
- package/dist/components/Header/index.d.ts +2 -2
- package/dist/components/Header/index.js +1 -0
- package/dist/components/Icon/components/Icon.d.ts +0 -1
- package/dist/components/Icon/components/Icon.js +78 -0
- package/dist/components/Icon/components/index.d.ts +2 -2
- package/dist/components/Icon/components/index.js +1 -0
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/InlineExpand/components/InlineExpand.d.ts +0 -1
- package/dist/components/InlineExpand/components/InlineExpand.js +50 -0
- package/dist/components/InlineExpand/components/index.d.ts +2 -2
- package/dist/components/InlineExpand/components/index.js +1 -0
- package/dist/components/InlineExpand/index.d.ts +2 -2
- package/dist/components/InlineExpand/index.js +1 -0
- package/dist/components/InlineLink/components/InlineLink.d.ts +0 -1
- package/dist/components/InlineLink/components/InlineLink.js +61 -0
- package/dist/components/InlineLink/components/index.d.ts +2 -2
- package/dist/components/InlineLink/components/index.js +1 -0
- package/dist/components/InlineLink/index.d.ts +2 -2
- package/dist/components/InlineLink/index.js +1 -0
- package/dist/components/Input/components/Input.d.ts +0 -1
- package/dist/components/Input/components/Input.js +18 -0
- package/dist/components/Input/components/index.d.ts +2 -2
- package/dist/components/Input/components/index.js +1 -0
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +1 -0
- package/dist/components/LabeledProgress/components/LabeledProgress.d.ts +0 -1
- package/dist/components/LabeledProgress/components/LabeledProgress.js +16 -0
- package/dist/components/LabeledProgress/components/index.d.ts +2 -2
- package/dist/components/LabeledProgress/components/index.js +1 -0
- package/dist/components/LabeledProgress/index.d.ts +2 -2
- package/dist/components/LabeledProgress/index.js +1 -0
- package/dist/components/LedgerRow/components/LedgerRow.js +15 -0
- package/dist/components/LedgerRow/components/index.d.ts +2 -2
- package/dist/components/LedgerRow/components/index.js +1 -0
- package/dist/components/LedgerRow/index.d.ts +2 -2
- package/dist/components/LedgerRow/index.js +1 -0
- package/dist/components/LegalPage/components/LegalPage.d.ts +0 -1
- package/dist/components/LegalPage/components/LegalPage.js +11 -0
- package/dist/components/LegalPage/components/clauses.js +28 -0
- package/dist/components/LegalPage/components/index.d.ts +4 -4
- package/dist/components/LegalPage/components/index.js +2 -0
- package/dist/components/LegalPage/index.d.ts +2 -2
- package/dist/components/LegalPage/index.js +1 -0
- package/dist/components/Lightbox/components/Lightbox.d.ts +1 -3
- package/dist/components/Lightbox/components/Lightbox.js +97 -0
- package/dist/components/Lightbox/components/index.d.ts +2 -2
- package/dist/components/Lightbox/components/index.js +1 -0
- package/dist/components/Lightbox/index.d.ts +2 -2
- package/dist/components/Lightbox/index.js +1 -0
- package/dist/components/Modal/components/Modal.d.ts +0 -2
- package/dist/components/Modal/components/Modal.js +37 -0
- package/dist/components/Modal/components/index.d.ts +2 -2
- package/dist/components/Modal/components/index.js +1 -0
- package/dist/components/Modal/index.d.ts +2 -2
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Nav/components/Nav.d.ts +0 -1
- package/dist/components/Nav/components/Nav.js +69 -0
- package/dist/components/Nav/components/index.d.ts +2 -2
- package/dist/components/Nav/components/index.js +1 -0
- package/dist/components/Nav/index.d.ts +2 -2
- package/dist/components/Nav/index.js +1 -0
- package/dist/components/Notification/components/Notification.d.ts +1 -2
- package/dist/components/Notification/components/Notification.js +34 -0
- package/dist/components/Notification/components/index.d.ts +2 -2
- package/dist/components/Notification/components/index.js +1 -0
- package/dist/components/Notification/index.d.ts +1 -1
- package/dist/components/Notification/index.js +1 -0
- package/dist/components/Progress/components/Progress.d.ts +0 -1
- package/dist/components/Progress/components/Progress.js +72 -0
- package/dist/components/Progress/components/index.d.ts +2 -2
- package/dist/components/Progress/components/index.js +1 -0
- package/dist/components/Progress/index.d.ts +2 -2
- package/dist/components/Progress/index.js +1 -0
- package/dist/components/RetroEffects/components/RetroEffects.d.ts +0 -1
- package/dist/components/RetroEffects/components/RetroEffects.js +163 -0
- package/dist/components/RetroEffects/components/index.d.ts +2 -2
- package/dist/components/RetroEffects/components/index.js +1 -0
- package/dist/components/RetroEffects/index.d.ts +2 -2
- package/dist/components/RetroEffects/index.js +1 -0
- package/dist/components/SectionHeading/components/SectionHeading.js +18 -0
- package/dist/components/SectionHeading/components/index.d.ts +2 -2
- package/dist/components/SectionHeading/components/index.js +1 -0
- package/dist/components/SectionHeading/index.d.ts +2 -2
- package/dist/components/SectionHeading/index.js +1 -0
- package/dist/components/Select/components/Select.js +14 -0
- package/dist/components/Select/components/index.d.ts +2 -2
- package/dist/components/Select/components/index.js +1 -0
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.js +1 -0
- package/dist/components/Separator/components/Separator.d.ts +0 -1
- package/dist/components/Separator/components/Separator.js +11 -0
- package/dist/components/Separator/components/index.d.ts +2 -2
- package/dist/components/Separator/components/index.js +1 -0
- package/dist/components/Separator/index.d.ts +2 -2
- package/dist/components/Separator/index.js +1 -0
- package/dist/components/Skeleton/components/Skeleton.d.ts +0 -1
- package/dist/components/Skeleton/components/Skeleton.js +52 -0
- package/dist/components/Skeleton/components/index.d.ts +2 -2
- package/dist/components/Skeleton/components/index.js +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Stat/components/Stat.d.ts +0 -1
- package/dist/components/Stat/components/Stat.js +42 -0
- package/dist/components/Stat/components/index.d.ts +2 -2
- package/dist/components/Stat/components/index.js +1 -0
- package/dist/components/Stat/index.d.ts +2 -2
- package/dist/components/Stat/index.js +1 -0
- package/dist/components/Switch/components/Switch.d.ts +0 -1
- package/dist/components/Switch/components/Switch.js +11 -0
- package/dist/components/Switch/components/index.d.ts +2 -2
- package/dist/components/Switch/components/index.js +1 -0
- package/dist/components/Switch/index.d.ts +2 -2
- package/dist/components/Switch/index.js +1 -0
- package/dist/components/Tabs/components/Tabs.d.ts +0 -1
- package/dist/components/Tabs/components/Tabs.js +54 -0
- package/dist/components/Tabs/components/index.d.ts +2 -2
- package/dist/components/Tabs/components/index.js +1 -0
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Tag/components/Tag.d.ts +0 -1
- package/dist/components/Tag/components/Tag.js +46 -0
- package/dist/components/Tag/components/TagGroup.js +15 -0
- package/dist/components/Tag/components/index.d.ts +4 -4
- package/dist/components/Tag/components/index.js +2 -0
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Terminal/components/Terminal.d.ts +0 -2
- package/dist/components/Terminal/components/Terminal.js +43 -0
- package/dist/components/Terminal/components/index.d.ts +2 -2
- package/dist/components/Terminal/components/index.js +1 -0
- package/dist/components/Terminal/index.d.ts +1 -1
- package/dist/components/Terminal/index.js +1 -0
- package/dist/components/TextScramble/components/TextScramble.d.ts +0 -1
- package/dist/components/TextScramble/components/TextScramble.js +14 -0
- package/dist/components/TextScramble/components/index.d.ts +2 -2
- package/dist/components/TextScramble/components/index.js +1 -0
- package/dist/components/TextScramble/index.d.ts +1 -1
- package/dist/components/TextScramble/index.js +1 -0
- package/dist/components/TimelineContainer/components/MasterDetailLayout.d.ts +1 -3
- package/dist/components/TimelineContainer/components/MasterDetailLayout.js +77 -0
- package/dist/components/TimelineContainer/components/TimelineAxis.d.ts +0 -1
- package/dist/components/TimelineContainer/components/TimelineAxis.js +8 -0
- package/dist/components/TimelineContainer/components/TimelineContainer.d.ts +1 -3
- package/dist/components/TimelineContainer/components/TimelineContainer.js +218 -0
- package/dist/components/TimelineContainer/components/TimelineContent.d.ts +1 -1
- package/dist/components/TimelineContainer/components/TimelineContent.js +23 -0
- package/dist/components/TimelineContainer/components/TimelineEntryCard.d.ts +1 -2
- package/dist/components/TimelineContainer/components/TimelineEntryCard.js +50 -0
- package/dist/components/TimelineContainer/components/ZoomControls.d.ts +2 -3
- package/dist/components/TimelineContainer/components/ZoomControls.js +16 -0
- package/dist/components/TimelineContainer/components/index.d.ts +5 -5
- package/dist/components/TimelineContainer/components/index.js +2 -0
- package/dist/components/TimelineContainer/components/timelineUtils.d.ts +1 -1
- package/dist/components/TimelineContainer/components/timelineUtils.js +185 -0
- package/dist/components/TimelineContainer/components/types.js +7 -0
- package/dist/components/TimelineContainer/components/useDrillDown.d.ts +1 -1
- package/dist/components/TimelineContainer/components/useDrillDown.js +83 -0
- package/dist/components/TimelineContainer/components/useSelection.js +51 -0
- package/dist/components/TimelineContainer/components/useZoom.d.ts +1 -1
- package/dist/components/TimelineContainer/components/useZoom.js +54 -0
- package/dist/components/TimelineContainer/components/variants/TimelineEntryCardGallery.d.ts +1 -2
- package/dist/components/TimelineContainer/components/variants/TimelineEntryCardGallery.js +67 -0
- package/dist/components/TimelineContainer/components/variants/TimelineEntryCardImage.d.ts +1 -2
- package/dist/components/TimelineContainer/components/variants/TimelineEntryCardImage.js +31 -0
- package/dist/components/TimelineContainer/components/views/DayView.d.ts +1 -1
- package/dist/components/TimelineContainer/components/views/DayView.js +20 -0
- package/dist/components/TimelineContainer/components/views/HourView.d.ts +1 -1
- package/dist/components/TimelineContainer/components/views/HourView.js +22 -0
- package/dist/components/TimelineContainer/components/views/MonthView.d.ts +1 -1
- package/dist/components/TimelineContainer/components/views/MonthView.js +18 -0
- package/dist/components/TimelineContainer/components/views/YearView.d.ts +1 -1
- package/dist/components/TimelineContainer/components/views/YearView.js +13 -0
- package/dist/components/TimelineContainer/components/views/index.d.ts +4 -4
- package/dist/components/TimelineContainer/components/views/index.js +4 -0
- package/dist/components/TimelineContainer/index.d.ts +3 -3
- package/dist/components/TimelineContainer/index.js +2 -0
- package/dist/components/TimelineNode/components/TimelineNode.d.ts +0 -1
- package/dist/components/TimelineNode/components/TimelineNode.js +49 -0
- package/dist/components/TimelineNode/components/index.d.ts +2 -2
- package/dist/components/TimelineNode/components/index.js +1 -0
- package/dist/components/TimelineNode/index.d.ts +2 -2
- package/dist/components/TimelineNode/index.js +1 -0
- package/dist/components/registry.js +247 -0
- package/dist/eidotter.css +1 -1
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/useAnimatedDismiss.d.ts +15 -0
- package/dist/hooks/useAnimatedDismiss.js +29 -0
- package/dist/hooks/useTextScramble.d.ts +21 -0
- package/dist/hooks/useTextScramble.js +91 -0
- package/dist/hooks/useTextScramble.test.d.ts +1 -0
- package/dist/hooks/useThemePortal.d.ts +12 -0
- package/dist/hooks/useThemePortal.js +62 -0
- package/dist/hooks/useThemePortal.test.d.ts +1 -0
- package/dist/utils/cn.d.ts +9 -0
- package/dist/utils/cn.js +12 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/isSafeHref.d.ts +1 -0
- package/dist/utils/isSafeHref.js +22 -0
- package/dist/utils/isSafeUrl.d.ts +8 -0
- package/dist/utils/isSafeUrl.js +18 -0
- package/dist/utils/isSafeUrl.test.d.ts +1 -0
- package/dist/utils/prefersReducedMotion.d.ts +5 -0
- package/dist/utils/prefersReducedMotion.js +8 -0
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -79,6 +79,25 @@ module.exports = {
|
|
|
79
79
|
|
|
80
80
|
The preset auto-registers `tailwindcss-react-aria-components` and `tailwindcss-animate` if they resolve. Migrating from the pre-0.19.2 dual-preset split? See [CHANGELOG → 0.19.2](./CHANGELOG.md#0192--2026-04-18).
|
|
81
81
|
|
|
82
|
+
### Server Components (RSC / Next.js App Router)
|
|
83
|
+
|
|
84
|
+
The `.` barrel (`import { Button } from 'eidotter'`) inlines every component into one
|
|
85
|
+
module, so importing it into a **server component** pulls interactive components' hooks
|
|
86
|
+
into the RSC graph and fails. For server components, deep-import per component instead:
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
// In a Server Component:
|
|
90
|
+
import { SectionHeading } from 'eidotter/components/SectionHeading'; // presentational — renders on the server
|
|
91
|
+
import { Button } from 'eidotter/components/Button'; // interactive — resolves as a client reference
|
|
92
|
+
|
|
93
|
+
import 'eidotter/styles'; // CSS still ships once, app-wide (unchanged)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`eidotter/components/<Name>` (PascalCase, matching the component) carries `'use client'`
|
|
97
|
+
on interactive components automatically, so they cross the client boundary correctly while
|
|
98
|
+
presentational primitives stay server-renderable. The `.` barrel remains the right default
|
|
99
|
+
for client apps and `'use client'` files.
|
|
100
|
+
|
|
82
101
|
## Documentation
|
|
83
102
|
|
|
84
103
|
| | |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../../utils/cn.js';
|
|
3
|
+
/**
|
|
4
|
+
* Inline marker for AI-drafted prose. Renders a `<span>` with
|
|
5
|
+
* `data-provenance="ai-draft"`, the canonical attribute set by the eidotter
|
|
6
|
+
* provenance system (DMNC-884). The visual treatment — a static, theme-aware
|
|
7
|
+
* magenta gradient clipped to the text ('AI writer' style; DMNC-946) — lives in
|
|
8
|
+
* `src/styles/provenance.css` and is shared with the per-paragraph diff pipeline.
|
|
9
|
+
*
|
|
10
|
+
* For per-paragraph use inside MDX, prefer wrapping the paragraph directly:
|
|
11
|
+
* <p data-provenance="ai-draft">…</p>
|
|
12
|
+
* The diff script (`mark-provenance.mjs`) unwraps that to plain `<p>` once
|
|
13
|
+
* the paragraph drifts ≥40% from its AI baseline.
|
|
14
|
+
*
|
|
15
|
+
* This component is the inline ergonomic shortcut — useful for marking a
|
|
16
|
+
* single phrase within otherwise-human prose, or for hand-authored MDX where
|
|
17
|
+
* `<AIText>part of this paragraph</AIText>` reads more naturally than the
|
|
18
|
+
* raw attribute.
|
|
19
|
+
*/
|
|
20
|
+
export const AIText = ({ children, className, title = 'AI-assisted text — being rewritten', }) => {
|
|
21
|
+
return (_jsxs("span", { "data-provenance": "ai-draft", className: cn('eidotter-ai-text', className), title: title, children: [_jsx("span", { className: "eidotter-ai-text__sr-only", children: "AI-assisted: " }), children] }));
|
|
22
|
+
};
|
|
23
|
+
AIText.displayName = 'AIText';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AIText } from './AIText';
|
|
2
|
-
export type { AITextProps } from './AIText';
|
|
1
|
+
export { AIText } from './AIText.js';
|
|
2
|
+
export type { AITextProps } from './AIText.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AIText } from './AIText.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AIText } from './components';
|
|
2
|
-
export type { AITextProps } from './components';
|
|
1
|
+
export { AIText } from './components/index.js';
|
|
2
|
+
export type { AITextProps } from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AIText } from './components/index.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Section } from './Section.js';
|
|
5
|
+
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
export const AccordionFill = ({ sections, defaultExpandedIndex = -1, className, }) => {
|
|
7
|
+
const [, setExpandedIndex] = useState(defaultExpandedIndex);
|
|
8
|
+
const handleToggle = (index, isExpanded) => {
|
|
9
|
+
setExpandedIndex(isExpanded ? index : -1);
|
|
10
|
+
};
|
|
11
|
+
return (_jsx("div", { className: cn('w-full flex flex-col items-stretch gap-2 text-left text-base font-dos text-dos-text-brand', 'eidotter-accordion-fill', className), children: sections.map((section, index) => (_jsx(Section, { title: section.title, defaultExpanded: index === defaultExpandedIndex, onToggle: (isExpanded) => handleToggle(index, isExpanded), children: section.content }, index))) }));
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { Button as AriaButton } from 'react-aria-components';
|
|
5
|
+
import { Icon } from '../../Icon/components/Icon.js';
|
|
6
|
+
import { cn } from '../../../utils/cn.js';
|
|
7
|
+
/**
|
|
8
|
+
* DOS-styled collapsible section (accordion item).
|
|
9
|
+
* Pure presentational — uses CSS transitions for expand/collapse.
|
|
10
|
+
*/
|
|
11
|
+
export const Section = ({ title, children, defaultExpanded = false, isHovered = false, isActive = false, onToggle, }) => {
|
|
12
|
+
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setIsExpanded(defaultExpanded);
|
|
15
|
+
}, [defaultExpanded]);
|
|
16
|
+
const handleToggle = () => {
|
|
17
|
+
const newExpanded = !isExpanded;
|
|
18
|
+
setIsExpanded(newExpanded);
|
|
19
|
+
onToggle?.(newExpanded);
|
|
20
|
+
};
|
|
21
|
+
return (_jsxs("div", { className: cn('w-full border border-dos-border-default text-dos-text-brand font-dos', 'eidotter-section', isExpanded && 'eidotter-section--expanded', isHovered && 'eidotter-section--hover', isActive && 'eidotter-section--active'), children: [_jsxs(AriaButton, { className: "eidotter-section__header w-full flex justify-between items-center px-4 py-2 bg-transparent border-0 text-inherit font-[inherit] cursor-pointer text-left", onPress: handleToggle, "aria-expanded": isExpanded, children: [_jsx("div", { className: "flex-1 text-base leading-6", children: title }), _jsx("div", { className: "eidotter-section__icon flex items-center justify-center w-6 h-6 ml-2 text-inherit", children: _jsx(Icon, { name: isExpanded ? 'Chevron Up' : 'Chevron Down', size: "S" }) })] }), _jsx("div", { className: "eidotter-section__content", inert: !isExpanded ? true : undefined, children: _jsx("div", { className: "eidotter-section__content-inner", children: children }) })] }));
|
|
22
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Section } from './Section';
|
|
2
|
-
export type { SectionProps } from './Section';
|
|
3
|
-
export { AccordionFill } from './AccordionFill';
|
|
4
|
-
export type { AccordionFillProps } from './AccordionFill';
|
|
1
|
+
export { Section } from './Section.js';
|
|
2
|
+
export type { SectionProps } from './Section.js';
|
|
3
|
+
export { AccordionFill } from './AccordionFill.js';
|
|
4
|
+
export type { AccordionFillProps } from './AccordionFill.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button as AriaButton } from 'react-aria-components';
|
|
5
|
+
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
import { Icon } from '../../Icon/components/Icon.js';
|
|
7
|
+
import { useAnimatedDismiss } from '../../../hooks/useAnimatedDismiss.js';
|
|
8
|
+
const TYPE_TO_COLOR = {
|
|
9
|
+
info: 'default',
|
|
10
|
+
success: 'success',
|
|
11
|
+
warning: 'warning',
|
|
12
|
+
error: 'error',
|
|
13
|
+
default: 'default',
|
|
14
|
+
brand: 'brand',
|
|
15
|
+
};
|
|
16
|
+
const COLOR_ICONS = {
|
|
17
|
+
brand: 'Info',
|
|
18
|
+
gray: 'Info',
|
|
19
|
+
default: 'Info',
|
|
20
|
+
error: 'Error',
|
|
21
|
+
warning: 'Warning',
|
|
22
|
+
success: 'Done',
|
|
23
|
+
};
|
|
24
|
+
function resolveColor(color, type) {
|
|
25
|
+
if (color)
|
|
26
|
+
return color;
|
|
27
|
+
return TYPE_TO_COLOR[type || 'info'] || 'default';
|
|
28
|
+
}
|
|
29
|
+
function resolveSize(size) {
|
|
30
|
+
if (size === 'full-width')
|
|
31
|
+
return 'full-width';
|
|
32
|
+
return 'floating';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* DOS-styled Alert with V.37 design: uniform dark background, featured icon
|
|
36
|
+
* with outline rings, optional actions, and container-query responsive layout.
|
|
37
|
+
*
|
|
38
|
+
* Backward-compatible with `type` and `onClickHere` props from pre-V.37.
|
|
39
|
+
*/
|
|
40
|
+
export const Alert = forwardRef(({ color: colorProp, size = 'floating', type, title, children, actions, onClose, onClickHere, className, }, ref) => {
|
|
41
|
+
const resolvedColor = resolveColor(colorProp, type);
|
|
42
|
+
const resolvedSize = resolveSize(size);
|
|
43
|
+
const { isClosing, triggerClose, handleAnimationEnd } = useAnimatedDismiss('alert-exit', onClose);
|
|
44
|
+
// Build actions list (new prop + legacy onClickHere)
|
|
45
|
+
const allActions = [
|
|
46
|
+
...(actions || []),
|
|
47
|
+
...(onClickHere ? [{ label: 'Click here', onClick: onClickHere }] : []),
|
|
48
|
+
];
|
|
49
|
+
return (_jsxs("div", { ref: ref, className: cn('relative w-full flex flex-col gap-4 p-4', 'font-dos text-dos-text-sm', 'border border-dos-border-default rounded-dos-base', 'eidotter-alert', `eidotter-alert--${resolvedColor}`, resolvedSize === 'floating' && 'max-w-[1216px]', resolvedSize === 'full-width' && 'eidotter-alert--full-width max-w-none', isClosing && 'eidotter-alert--closing', className), onAnimationEnd: handleAnimationEnd, role: "alert", "data-color": resolvedColor, "data-size": resolvedSize, children: [_jsx("div", { className: "eidotter-alert__icon", children: _jsx(Icon, { name: COLOR_ICONS[resolvedColor] || 'Info', size: "S", "aria-label": `${resolvedColor} alert` }) }), _jsxs("div", { className: cn('flex-1 flex flex-col gap-3 min-w-0', onClose && 'pr-6'), children: [(title || children) && (_jsxs("div", { className: "flex flex-col gap-1", children: [title && (_jsx("div", { className: "eidotter-alert__title font-dos leading-[140%]", children: title })), children && (_jsx("div", { className: "eidotter-alert__text font-dos leading-[140%]", children: children }))] })), allActions.length > 0 && (_jsx("div", { className: "flex flex-row gap-3", children: allActions.map((action, i) => (_jsxs(AriaButton, { className: "eidotter-alert__action", onPress: action.onClick, children: [action.label, action.icon] }, i))) }))] }), onClose && (_jsx(AriaButton, { className: "eidotter-alert__close", onPress: triggerClose, "aria-label": "Close alert", children: _jsx(Icon, { name: "Close", size: "S" }) }))] }));
|
|
50
|
+
});
|
|
51
|
+
Alert.displayName = 'Alert';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Alert } from './Alert';
|
|
2
|
-
export type { AlertProps, AlertAction, AlertColor } from './Alert';
|
|
1
|
+
export { Alert } from './Alert.js';
|
|
2
|
+
export type { AlertProps, AlertAction, AlertColor } from './Alert.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert } from './Alert.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './Badge.css';
|
|
3
2
|
export interface BadgeProps {
|
|
4
3
|
/** The variant determines the badge's color scheme */
|
|
5
4
|
variant?: 'default' | 'success' | 'warning' | 'error' | 'info' | 'accent' | 'brand' | 'gray' | 'blue' | 'indigo' | 'purple' | 'pink' | 'orange';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
const sizeClasses = {
|
|
5
|
+
sm: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
|
|
6
|
+
md: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
|
|
7
|
+
lg: 'text-dos-text-md px-3 py-1.5 min-h-8 gap-1.5',
|
|
8
|
+
small: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
|
|
9
|
+
medium: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
|
|
10
|
+
};
|
|
11
|
+
const variantClasses = {
|
|
12
|
+
default: 'eidotter-badge--default',
|
|
13
|
+
success: 'eidotter-badge--success',
|
|
14
|
+
warning: 'eidotter-badge--warning',
|
|
15
|
+
error: 'eidotter-badge--error',
|
|
16
|
+
info: 'eidotter-badge--info',
|
|
17
|
+
accent: 'eidotter-badge--accent',
|
|
18
|
+
brand: 'eidotter-badge--accent',
|
|
19
|
+
gray: 'eidotter-badge--default',
|
|
20
|
+
blue: 'eidotter-badge--info',
|
|
21
|
+
indigo: 'eidotter-badge--info',
|
|
22
|
+
purple: 'eidotter-badge--info',
|
|
23
|
+
pink: 'eidotter-badge--error',
|
|
24
|
+
orange: 'eidotter-badge--warning',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* DOS-styled Badge for status indicators, labels, and counts.
|
|
28
|
+
* Pure presentational — no React Aria needed.
|
|
29
|
+
*/
|
|
30
|
+
export const Badge = forwardRef(({ variant = 'default', size = 'md', dot = false, children, className, ...props }, ref) => (_jsxs("span", { ref: ref, className: cn('inline-flex items-center justify-center', 'font-dos leading-none whitespace-nowrap select-none', 'uppercase tracking-wider', 'rounded-dos-sm', 'eidotter-badge', sizeClasses[size] || sizeClasses.md, variantClasses[variant] || variantClasses.default, className), "data-variant": variant, ...props, children: [dot && _jsx("span", { className: "eidotter-badge__dot", "aria-hidden": "true" }), _jsx("span", { className: "eidotter-badge__content", children: children })] })));
|
|
31
|
+
Badge.displayName = 'Badge';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Badge } from './Badge';
|
|
2
|
-
export type { BadgeProps } from './Badge';
|
|
1
|
+
export { Badge } from './Badge.js';
|
|
2
|
+
export type { BadgeProps } from './Badge.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from './Badge.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Badge } from './components';
|
|
2
|
-
export type { BadgeProps } from './components';
|
|
1
|
+
export { Badge } from './components/index.js';
|
|
2
|
+
export type { BadgeProps } from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from './components/index.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { Logo } from './Logo.js';
|
|
5
|
+
import { Wordmark } from './Wordmark.js';
|
|
6
|
+
/**
|
|
7
|
+
* eiDotter brand lockup — Logo + Wordmark composed horizontally.
|
|
8
|
+
*
|
|
9
|
+
* The canonical public-facing brand mark. Scales by setting the host's
|
|
10
|
+
* `font-size` (wordmark) and `logoSize` prop (icon). The two should stay
|
|
11
|
+
* proportional: roughly `logoSize ≈ font-size × 1.75`.
|
|
12
|
+
*/
|
|
13
|
+
export const BrandLockup = forwardRef(({ logoSize = 32, iconOnly = false, wordmarkOnly = false, glow = true, className, ...props }, ref) => (_jsxs("div", { ref: ref, className: cn('eidotter-brand-lockup inline-flex items-center gap-3', className), role: "img", "aria-label": "eiDotter", ...props, children: [!wordmarkOnly && _jsx(Logo, { size: logoSize, glow: glow, title: "" }), !iconOnly && _jsx(Wordmark, { glow: glow, "aria-hidden": "true" })] })));
|
|
14
|
+
BrandLockup.displayName = 'BrandLockup';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SVGProps } from 'react';
|
|
3
|
-
import './Brand.css';
|
|
4
3
|
export interface LogoProps extends Omit<SVGProps<SVGSVGElement>, 'viewBox' | 'children'> {
|
|
5
4
|
/** Icon size in pixels. Defaults to 32. Pass a number or CSS-valid string. */
|
|
6
5
|
size?: number | string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useId } from 'react';
|
|
4
|
+
import { cn } from '../../../utils/cn.js';
|
|
5
|
+
/**
|
|
6
|
+
* eiDotter brand mark — the Foundation Logomark (Figma node 16-610):
|
|
7
|
+
* a pixel-dotted ring (the "dotter") around the amber yolk, with pixel
|
|
8
|
+
* specular highlights and a soft radial phosphor halo. Mark only, on
|
|
9
|
+
* transparent — the iOS-style app-icon container in the Figma component
|
|
10
|
+
* is an app-icon artifact, not part of the inline mark.
|
|
11
|
+
*
|
|
12
|
+
* Fill colors are brand-locked (explicit amber hexes) rather than themed so
|
|
13
|
+
* the mark reads identically across themes. Gradient ids are namespaced via
|
|
14
|
+
* useId so multiple logos per page (header + footer) don't collide.
|
|
15
|
+
*/
|
|
16
|
+
export const Logo = forwardRef(({ size = 32, glow = true, title = 'eiDotter', className, ...props }, ref) => {
|
|
17
|
+
const uid = useId();
|
|
18
|
+
const haloId = `eidotter-logo-halo-${uid}`;
|
|
19
|
+
const coreId = `eidotter-logo-core-${uid}`;
|
|
20
|
+
return (_jsxs("svg", { ref: ref, width: size, height: size, viewBox: "8 7 22 22", xmlns: "http://www.w3.org/2000/svg", role: title ? 'img' : undefined, "aria-hidden": title ? undefined : true, className: cn('eidotter-logo', glow && 'eidotter-logo--glow', className), ...props, children: [title ? _jsx("title", { children: title }) : null, _jsxs("defs", { children: [_jsxs("radialGradient", { id: haloId, cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(19 19.1) scale(13.2)", children: [_jsx("stop", { stopColor: "#FFB000", stopOpacity: "0.3" }), _jsx("stop", { offset: "1", stopColor: "#020003", stopOpacity: "0" })] }), _jsxs("radialGradient", { id: coreId, cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(19 18.9) scale(9.9)", children: [_jsx("stop", { stopColor: "#FFB000", stopOpacity: "0.45" }), _jsx("stop", { offset: "0.6", stopColor: "#9A5700", stopOpacity: "0.22" }), _jsx("stop", { offset: "1", stopColor: "#020003", stopOpacity: "0" })] })] }), _jsx("path", { d: "M19 29C25.0751 29 30 24.0751 30 18C30 11.9249 25.0751 7 19 7C12.9249 7 8 11.9249 8 18C8 24.0751 12.9249 29 19 29Z", fill: `url(#${haloId})` }), _jsx("path", { d: "M19 27C23.9706 27 28 22.9706 28 18C28 13.0294 23.9706 9 19 9C14.0294 9 10 13.0294 10 18C10 22.9706 14.0294 27 19 27Z", fill: `url(#${coreId})` }), _jsx("path", { d: "M20.375 9.0625H17.625V9.75H20.375V9.0625Z", fill: "#FFB000" }), _jsx("path", { d: "M16.9375 9.75H15.5625V10.4375H16.9375V9.75Z", fill: "#FFB000" }), _jsx("path", { d: "M17.625 9.75H16.9375V10.4375H17.625V9.75Z", fill: "#FFB000" }), _jsx("path", { d: "M22.4375 9.75H20.375V10.4375H22.4375V9.75Z", fill: "#FFB000" }), _jsx("path", { d: "M15.5625 10.4375H14.1875V11.125H15.5625V10.4375Z", fill: "#FFB000" }), _jsx("path", { d: "M23.8125 10.4375H22.4375V11.125H23.8125V10.4375Z", fill: "#FFB000" }), _jsx("path", { d: "M14.1875 11.125H13.5V11.8125H14.1875V11.125Z", fill: "#FFB000" }), _jsx("path", { d: "M25.1875 11.125H23.8125V11.8125H25.1875V11.125Z", fill: "#FFB000" }), _jsx("path", { d: "M13.5 11.8125H12.8125V12.5H13.5V11.8125Z", fill: "#FFB000" }), _jsx("path", { d: "M25.875 11.8125H25.1875V13.1875H25.875V11.8125Z", fill: "#FFB000" }), _jsx("path", { d: "M12.8125 12.5H12.125V13.875H12.8125V12.5Z", fill: "#FFB000" }), _jsx("path", { d: "M12.125 13.875H11.4375V15.9375H12.125V13.875Z", fill: "#FFB000" }), _jsx("path", { d: "M11.4375 15.9375H10.75V18H11.4375V15.9375Z", fill: "#FFB000" }), _jsx("path", { d: "M10.75 18H10.0625V19.375H10.75V18Z", fill: "#FFB000" }), _jsx("path", { d: "M11.4375 19.375H10.75V20.75H11.4375V19.375Z", fill: "#FFB000" }), _jsx("path", { d: "M12.125 20.75H11.4375V22.125H12.125V20.75Z", fill: "#FFB000" }), _jsx("path", { d: "M12.8125 22.125H12.125V23.5H12.8125V22.125Z", fill: "#FFB000" }), _jsx("path", { d: "M26.5625 13.1875H25.875V15.25H26.5625V13.1875Z", fill: "#FFB000" }), _jsx("path", { d: "M27.25 15.25H26.5625V17.3125H27.25V15.25Z", fill: "#FFB000" }), _jsx("path", { d: "M27.9375 17.3125H27.25V19.375H27.9375V17.3125Z", fill: "#FFB000" }), _jsx("path", { d: "M27.25 19.375H26.5625V20.75H27.25V19.375Z", fill: "#FFB000" }), _jsx("path", { d: "M26.5625 20.75H25.875V22.125H26.5625V20.75Z", fill: "#FFB000" }), _jsx("path", { d: "M25.875 22.125H25.1875V23.5H25.875V22.125Z", fill: "#FFB000" }), _jsx("path", { d: "M14.1875 23.5H12.8125V24.1875H14.1875V23.5Z", fill: "#FFB000" }), _jsx("path", { d: "M16.25 24.1875H14.1875V24.875H16.25V24.1875Z", fill: "#FFB000" }), _jsx("path", { d: "M18.3125 24.875H16.25V25.5625H18.3125V24.875Z", fill: "#FFB000" }), _jsx("path", { d: "M20.375 25.5625H18.3125V26.25H20.375V25.5625Z", fill: "#FFB000" }), _jsx("path", { d: "M22.4375 24.875H20.375V25.5625H22.4375V24.875Z", fill: "#FFB000" }), _jsx("path", { d: "M24.5 24.1875H22.4375V24.875H24.5V24.1875Z", fill: "#FFB000" }), _jsx("path", { d: "M25.1875 23.5H24.5V24.1875H25.1875V23.5Z", fill: "#FFB000" }), _jsx("path", { d: "M10.0625 15.9375H9.375V16.625H10.0625V15.9375Z", fill: "#FFB000" }), _jsx("path", { d: "M29.3125 16.625H28.625V17.3125H29.3125V16.625Z", fill: "#FFB000" }), _jsx("path", { d: "M28.625 20.75H27.9375V21.4375H28.625V20.75Z", fill: "#FFB000" }), _jsx("path", { d: "M10.75 21.4375H10.0625V22.125H10.75V21.4375Z", fill: "#FFB000" }), _jsx("path", { d: "M18.4375 21C20.6466 21 22.4375 19.2091 22.4375 17C22.4375 14.7909 20.6466 13 18.4375 13C16.2284 13 14.4375 14.7909 14.4375 17C14.4375 19.2091 16.2284 21 18.4375 21Z", fill: "#FFB000" }), _jsx("path", { d: "M16.25 15.25H15.5625V17.3125H16.25V15.25Z", fill: "#FFC233" }), _jsx("path", { d: "M18.3125 13.875H16.25V14.5625H18.3125V13.875Z", fill: "#FFC233" }), _jsx("path", { d: "M16.25 14.5625H15.5625V15.25H16.25V14.5625Z", fill: "#FFC233" }), _jsx("path", { d: "M17.5 17C18.3284 17 19 16.3284 19 15.5C19 14.6716 18.3284 14 17.5 14C16.6716 14 16 14.6716 16 15.5C16 16.3284 16.6716 17 17.5 17Z", fill: "#FFD97A" }), _jsx("path", { d: "M17.5 15C17.7761 15 18 14.7761 18 14.5C18 14.2239 17.7761 14 17.5 14C17.2239 14 17 14.2239 17 14.5C17 14.7761 17.2239 15 17.5 15Z", fill: "#FFE8A8" })] }));
|
|
21
|
+
});
|
|
22
|
+
Logo.displayName = 'Logo';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
/**
|
|
5
|
+
* eiDotter wordmark — "eiDotter" with the "ei" prefix dimmed against the full-bright "Dotter".
|
|
6
|
+
*
|
|
7
|
+
* Uses the primary DOS font (Flexi IBM VGA True) and the amber phosphor palette.
|
|
8
|
+
* Sized via `font-size` on the host; the component does not set its own size by
|
|
9
|
+
* default so it inherits from the surrounding type scale. Wrap in a heading
|
|
10
|
+
* element if you need semantic weight.
|
|
11
|
+
*/
|
|
12
|
+
export const Wordmark = forwardRef(({ glow = true, className, ...props }, ref) => (_jsxs("span", { ref: ref, className: cn('eidotter-wordmark font-dos', glow && 'eidotter-wordmark--glow', className), "aria-label": "eiDotter", ...props, children: [_jsx("span", { className: "eidotter-wordmark__prefix", "aria-hidden": "true", children: "ei" }), _jsx("span", { className: "eidotter-wordmark__body", "aria-hidden": "true", children: "Dotter" })] })));
|
|
13
|
+
Wordmark.displayName = 'Wordmark';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Logo } from './Logo';
|
|
2
|
-
export type { LogoProps } from './Logo';
|
|
3
|
-
export { Wordmark } from './Wordmark';
|
|
4
|
-
export type { WordmarkProps } from './Wordmark';
|
|
5
|
-
export { BrandLockup } from './BrandLockup';
|
|
6
|
-
export type { BrandLockupProps } from './BrandLockup';
|
|
1
|
+
export { Logo } from './Logo.js';
|
|
2
|
+
export type { LogoProps } from './Logo.js';
|
|
3
|
+
export { Wordmark } from './Wordmark.js';
|
|
4
|
+
export type { WordmarkProps } from './Wordmark.js';
|
|
5
|
+
export { BrandLockup } from './BrandLockup.js';
|
|
6
|
+
export type { BrandLockupProps } from './BrandLockup.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button as AriaButton } from 'react-aria-components';
|
|
4
|
+
import { cn } from '../../../utils/cn.js';
|
|
5
|
+
const linkClasses = 'eidotter-breadcrumb__link inline-flex items-center gap-1 text-dos-text-accent opacity-70 no-underline';
|
|
6
|
+
/**
|
|
7
|
+
* DOS-styled Breadcrumb navigation component.
|
|
8
|
+
* Pure presentational — uses semantic HTML (nav > ol > li).
|
|
9
|
+
*/
|
|
10
|
+
export const Breadcrumb = ({ trail = [], currentLabel, showBackArrow = true, separator = '/', linkComponent: LinkComponent, className, }) => {
|
|
11
|
+
const renderLink = (item, isBackTarget) => {
|
|
12
|
+
const linkContent = (_jsxs(_Fragment, { children: [showBackArrow && isBackTarget && (_jsx("span", { className: "text-[1em] leading-none", "aria-hidden": "true", children: "<" })), _jsx("span", { children: item.label })] }));
|
|
13
|
+
if (item.onClick) {
|
|
14
|
+
return (_jsx(AriaButton, { className: cn(linkClasses, 'bg-transparent border-0 cursor-pointer font-[inherit] p-0'), onPress: item.onClick, children: linkContent }));
|
|
15
|
+
}
|
|
16
|
+
if (item.href) {
|
|
17
|
+
if (LinkComponent) {
|
|
18
|
+
return (_jsx(LinkComponent, { href: item.href, className: linkClasses, children: linkContent }));
|
|
19
|
+
}
|
|
20
|
+
return (_jsx("a", { href: item.href, className: linkClasses, children: linkContent }));
|
|
21
|
+
}
|
|
22
|
+
return _jsx("span", { className: linkClasses, children: linkContent });
|
|
23
|
+
};
|
|
24
|
+
return (_jsx("nav", { "aria-label": "Breadcrumb", className: cn('font-dos text-xs uppercase tracking-[0.35em]', 'eidotter-breadcrumb', className), children: _jsxs("ol", { className: "flex flex-wrap items-center gap-2 list-none m-0 p-0", children: [trail.map((item, index) => {
|
|
25
|
+
const isBackTarget = index === trail.length - 1;
|
|
26
|
+
const showSep = index < trail.length - 1;
|
|
27
|
+
return (_jsxs("li", { className: "flex items-center gap-2", children: [renderLink(item, isBackTarget), showSep && (_jsx("span", { className: "text-dos-text-accent opacity-40 select-none", "aria-hidden": "true", children: separator }))] }, `${item.href ?? item.label}-${index}`));
|
|
28
|
+
}), trail.length > 0 && (_jsx("li", { className: "flex items-center gap-2", children: _jsx("span", { className: "text-dos-text-accent opacity-40 select-none", "aria-hidden": "true", children: separator }) })), _jsx("li", { className: "flex items-center gap-2", "aria-current": "page", children: _jsx("span", { className: "text-dos-text-brand", children: currentLabel }) })] }) }));
|
|
29
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Breadcrumb } from './Breadcrumb';
|
|
2
|
-
export type { BreadcrumbProps, BreadcrumbItem } from './Breadcrumb';
|
|
1
|
+
export { Breadcrumb } from './Breadcrumb.js';
|
|
2
|
+
export type { BreadcrumbProps, BreadcrumbItem } from './Breadcrumb.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumb } from './Breadcrumb.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Breadcrumb } from './components';
|
|
2
|
-
export type { BreadcrumbProps, BreadcrumbItem } from './components';
|
|
1
|
+
export { Breadcrumb } from './components/index.js';
|
|
2
|
+
export type { BreadcrumbProps, BreadcrumbItem } from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumb } from './components/index.js';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type PressEvent } from 'react-aria-components';
|
|
3
|
-
import '../../../styles/keyframes.css';
|
|
4
|
-
import './Button.css';
|
|
5
3
|
export interface ButtonProps {
|
|
6
4
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'ghost' | 'link';
|
|
7
5
|
/** Size variant. Use xs/sm/md/lg/xl — small/medium/large are @deprecated aliases. */
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Button as AriaButton } from 'react-aria-components';
|
|
5
|
+
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
const sizeClasses = {
|
|
7
|
+
xs: 'text-dos-text-xs px-2 py-1 min-h-6 gap-1',
|
|
8
|
+
sm: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1',
|
|
9
|
+
md: 'text-dos-text-md px-3 py-2 min-h-8 gap-1.5',
|
|
10
|
+
lg: 'text-dos-text-lg px-4 py-2.5 min-h-10 gap-2',
|
|
11
|
+
xl: 'text-dos-text-xl px-5 py-3 min-h-11 gap-2',
|
|
12
|
+
small: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1',
|
|
13
|
+
medium: 'text-dos-text-md px-3 py-2 min-h-8 gap-1.5',
|
|
14
|
+
large: 'text-dos-text-lg px-4 py-2.5 min-h-10 gap-2',
|
|
15
|
+
};
|
|
16
|
+
const variantClasses = {
|
|
17
|
+
primary: 'eidotter-btn--primary',
|
|
18
|
+
secondary: 'eidotter-btn--secondary',
|
|
19
|
+
tertiary: 'eidotter-btn--tertiary',
|
|
20
|
+
destructive: 'eidotter-btn--destructive',
|
|
21
|
+
ghost: 'eidotter-btn--ghost',
|
|
22
|
+
link: 'eidotter-btn--link',
|
|
23
|
+
};
|
|
24
|
+
export const Button = forwardRef(({ variant = 'primary', size = 'md', type = 'button', disabled = false, loading = false, children, onPress, onClick, className, fullWidth = false, iconOnly = false, ...props }, ref) => {
|
|
25
|
+
const isDisabled = disabled || loading;
|
|
26
|
+
return (_jsxs(AriaButton, { ref: ref, type: type, isDisabled: isDisabled, isPending: loading || undefined, onPress: (e) => {
|
|
27
|
+
if (onPress) {
|
|
28
|
+
onPress(e);
|
|
29
|
+
}
|
|
30
|
+
else if (onClick) {
|
|
31
|
+
// Deprecated: bridge PressEvent to onClick for backward compatibility
|
|
32
|
+
const syntheticEvent = {
|
|
33
|
+
type: 'press',
|
|
34
|
+
target: e.target,
|
|
35
|
+
currentTarget: e.target,
|
|
36
|
+
preventDefault: () => { },
|
|
37
|
+
stopPropagation: () => { },
|
|
38
|
+
};
|
|
39
|
+
onClick(syntheticEvent);
|
|
40
|
+
}
|
|
41
|
+
}, className: cn(
|
|
42
|
+
// Stable BEM block hook (DMNC-1112): variant-agnostic class consumers
|
|
43
|
+
// can target reliably. Post-V.37 the Button only emitted
|
|
44
|
+
// `eidotter-btn--{variant}` modifiers, so consumer overrides written
|
|
45
|
+
// against `.eidotter-button` / `.eidotter-btn` silently no-op'd. Matches
|
|
46
|
+
// Badge (`eidotter-badge`) / Tag (`eidotter-tag`) which already emit a block class.
|
|
47
|
+
'eidotter-btn', 'inline-flex items-center justify-center relative', 'border-2 border-solid', 'font-dos leading-none whitespace-nowrap select-none', 'outline-none cursor-pointer', 'transition-all duration-100 ease-linear', sizeClasses[size] || sizeClasses.md, variantClasses[variant] || variantClasses.primary, isDisabled && 'opacity-50 cursor-not-allowed', loading && 'cursor-wait', fullWidth && 'w-full', iconOnly && 'aspect-square !px-0', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dos-border-focus', className), "data-loading": loading || undefined, "data-variant": variant, ...props, children: [loading && (_jsx("span", { className: "eidotter-btn__loading", "aria-hidden": "true", children: "\u2588" })), _jsx("span", { className: cn('inline-flex items-center justify-center', loading && 'opacity-70'), children: children })] }));
|
|
48
|
+
});
|
|
49
|
+
Button.displayName = 'Button';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button } from './Button';
|
|
2
|
-
export type { ButtonProps } from './Button';
|
|
1
|
+
export { Button } from './Button.js';
|
|
2
|
+
export type { ButtonProps } from './Button.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from './Button.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button } from './components';
|
|
2
|
-
export type { ButtonProps } from './components';
|
|
1
|
+
export { Button } from './components/index.js';
|
|
2
|
+
export type { ButtonProps } from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from './components/index.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
const variantClasses = {
|
|
5
|
+
default: 'eidotter-card--default',
|
|
6
|
+
elevated: 'eidotter-card--elevated',
|
|
7
|
+
bordered: 'eidotter-card--bordered',
|
|
8
|
+
glow: 'eidotter-card--glow',
|
|
9
|
+
interactive: 'eidotter-card--interactive',
|
|
10
|
+
minimal: 'eidotter-card--minimal',
|
|
11
|
+
callout: 'eidotter-card--callout',
|
|
12
|
+
};
|
|
13
|
+
export const Card = forwardRef(({ title, children, footer, variant = 'default', className, ...props }, ref) => {
|
|
14
|
+
return (_jsxs("div", { ref: ref, className: cn('border-2 border-solid border-dos-border-default', 'font-dos text-dos-text-brand', 'eidotter-card', variantClasses[variant] || variantClasses.default, className), ...props, children: [title && (_jsx("div", { className: "eidotter-card__header px-3 py-2 border-b border-dos-text-disabled bg-dos-bg-brand-dim", children: _jsx("span", { className: "text-dos-text-secondary text-dos-text-md uppercase", children: title }) })), _jsx("div", { className: "p-3", children: children }), footer && (_jsx("div", { className: "eidotter-card__footer px-3 py-2 border-t border-dos-text-disabled bg-dos-bg-secondary", children: footer }))] }));
|
|
15
|
+
});
|
|
16
|
+
Card.displayName = 'Card';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Card } from './Card';
|
|
2
|
-
export type { CardProps } from './Card';
|
|
1
|
+
export { Card } from './Card.js';
|
|
2
|
+
export type { CardProps } from './Card.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from './Card.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Card } from './components';
|
|
2
|
-
export type { CardProps } from './components';
|
|
1
|
+
export { Card } from './components/index.js';
|
|
2
|
+
export type { CardProps } from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from './components/index.js';
|