asheeui 1.0.0 → 1.1.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 +61 -166
- package/dist/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +6 -6
- package/dist/components/auth-layout/AuthLayout.d.ts +79 -0
- package/dist/components/auth-layout/AuthLayout.d.ts.map +1 -0
- package/dist/components/auth-layout/AuthLayout.js +54 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts +41 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-config.js +18 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts +25 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-styles.js +11 -0
- package/dist/components/auth-layout/index.d.ts +3 -0
- package/dist/components/auth-layout/index.d.ts.map +1 -0
- package/dist/components/auth-layout/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +3 -3
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +6 -6
- package/dist/components/calendar/Calendar.d.ts.map +1 -1
- package/dist/components/calendar/Calendar.js +4 -4
- package/dist/components/calendar/DateGrid.d.ts.map +1 -1
- package/dist/components/calendar/DateGrid.js +87 -87
- package/dist/components/clipboard/Clipboard.d.ts +75 -0
- package/dist/components/clipboard/Clipboard.d.ts.map +1 -0
- package/dist/components/clipboard/Clipboard.js +53 -0
- package/dist/components/clipboard/CopyButton.d.ts +64 -0
- package/dist/components/clipboard/CopyButton.d.ts.map +1 -0
- package/dist/components/clipboard/CopyButton.js +44 -0
- package/dist/components/clipboard/clipboard-config.d.ts +42 -0
- package/dist/components/clipboard/clipboard-config.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-config.js +23 -0
- package/dist/components/clipboard/clipboard-styles.d.ts +11 -0
- package/dist/components/clipboard/clipboard-styles.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-styles.js +5 -0
- package/dist/components/clipboard/index.d.ts +4 -0
- package/dist/components/clipboard/index.d.ts.map +1 -0
- package/dist/components/clipboard/index.js +4 -0
- package/dist/components/container/Container.d.ts +51 -0
- package/dist/components/container/Container.d.ts.map +1 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/container/container-config.d.ts +61 -0
- package/dist/components/container/container-config.d.ts.map +1 -0
- package/dist/components/container/container-config.js +16 -0
- package/dist/components/container/container-styles.d.ts +18 -0
- package/dist/components/container/container-styles.d.ts.map +1 -0
- package/dist/components/container/container-styles.js +12 -0
- package/dist/components/container/index.d.ts +3 -0
- package/dist/components/container/index.d.ts.map +1 -0
- package/dist/components/container/index.js +3 -0
- package/dist/components/cta/CTA.d.ts +81 -0
- package/dist/components/cta/CTA.d.ts.map +1 -0
- package/dist/components/cta/CTA.js +60 -0
- package/dist/components/cta/cta-config.d.ts +69 -0
- package/dist/components/cta/cta-config.d.ts.map +1 -0
- package/dist/components/cta/cta-config.js +22 -0
- package/dist/components/cta/cta-styles.d.ts +8 -0
- package/dist/components/cta/cta-styles.d.ts.map +1 -0
- package/dist/components/cta/cta-styles.js +9 -0
- package/dist/components/cta/index.d.ts +3 -0
- package/dist/components/cta/index.d.ts.map +1 -0
- package/dist/components/cta/index.js +3 -0
- package/dist/components/dropmenu/Dropmenu.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +77 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +46 -0
- package/dist/components/empty-state/empty-state-config.d.ts +44 -0
- package/dist/components/empty-state/empty-state-config.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-config.js +16 -0
- package/dist/components/empty-state/empty-state-styles.d.ts +13 -0
- package/dist/components/empty-state/empty-state-styles.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-styles.js +18 -0
- package/dist/components/empty-state/index.d.ts +3 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +3 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts +107 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts.map +1 -0
- package/dist/components/feature-grid/FeatureGrid.js +94 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts +80 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-config.js +28 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts +11 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-styles.js +5 -0
- package/dist/components/feature-grid/index.d.ts +3 -0
- package/dist/components/feature-grid/index.d.ts.map +1 -0
- package/dist/components/feature-grid/index.js +3 -0
- package/dist/components/footer/Footer.d.ts +73 -0
- package/dist/components/footer/Footer.d.ts.map +1 -0
- package/dist/components/footer/Footer.js +112 -0
- package/dist/components/footer/footer-config.d.ts +40 -0
- package/dist/components/footer/footer-config.d.ts.map +1 -0
- package/dist/components/footer/footer-config.js +18 -0
- package/dist/components/footer/footer-styles.d.ts +22 -0
- package/dist/components/footer/footer-styles.d.ts.map +1 -0
- package/dist/components/footer/footer-styles.js +9 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/index.d.ts.map +1 -0
- package/dist/components/footer/index.js +3 -0
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/grid/Grid.d.ts +71 -0
- package/dist/components/grid/Grid.d.ts.map +1 -0
- package/dist/components/grid/Grid.js +23 -0
- package/dist/components/grid/grid-config.d.ts +63 -0
- package/dist/components/grid/grid-config.d.ts.map +1 -0
- package/dist/components/grid/grid-config.js +16 -0
- package/dist/components/grid/grid-styles.d.ts +12 -0
- package/dist/components/grid/grid-styles.d.ts.map +1 -0
- package/dist/components/grid/grid-styles.js +31 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/hero/Hero.d.ts +90 -0
- package/dist/components/hero/Hero.d.ts.map +1 -0
- package/dist/components/hero/Hero.js +63 -0
- package/dist/components/hero/hero-config.d.ts +71 -0
- package/dist/components/hero/hero-config.d.ts.map +1 -0
- package/dist/components/hero/hero-config.js +22 -0
- package/dist/components/hero/hero-styles.d.ts +19 -0
- package/dist/components/hero/hero-styles.d.ts.map +1 -0
- package/dist/components/hero/hero-styles.js +5 -0
- package/dist/components/hero/index.d.ts +3 -0
- package/dist/components/hero/index.d.ts.map +1 -0
- package/dist/components/hero/index.js +3 -0
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/navbar/Navbar.d.ts +87 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navbar/Navbar.js +117 -0
- package/dist/components/navbar/index.d.ts +3 -0
- package/dist/components/navbar/index.d.ts.map +1 -0
- package/dist/components/navbar/index.js +3 -0
- package/dist/components/navbar/navbar-config.d.ts +52 -0
- package/dist/components/navbar/navbar-config.d.ts.map +1 -0
- package/dist/components/navbar/navbar-config.js +20 -0
- package/dist/components/navbar/navbar-styles.d.ts +28 -0
- package/dist/components/navbar/navbar-styles.d.ts.map +1 -0
- package/dist/components/navbar/navbar-styles.js +9 -0
- package/dist/components/page/Page.d.ts +166 -0
- package/dist/components/page/Page.d.ts.map +1 -0
- package/dist/components/page/Page.js +90 -0
- package/dist/components/page/index.d.ts +3 -0
- package/dist/components/page/index.d.ts.map +1 -0
- package/dist/components/page/index.js +3 -0
- package/dist/components/page/page-config.d.ts +57 -0
- package/dist/components/page/page-config.d.ts.map +1 -0
- package/dist/components/page/page-config.js +20 -0
- package/dist/components/page/page-styles.d.ts +25 -0
- package/dist/components/page/page-styles.d.ts.map +1 -0
- package/dist/components/page/page-styles.js +5 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.js +8 -8
- package/dist/components/pin-input/PinInput.d.ts +109 -0
- package/dist/components/pin-input/PinInput.d.ts.map +1 -0
- package/dist/components/pin-input/PinInput.js +124 -0
- package/dist/components/pin-input/index.d.ts +3 -0
- package/dist/components/pin-input/index.d.ts.map +1 -0
- package/dist/components/pin-input/index.js +3 -0
- package/dist/components/pin-input/pin-input-config.d.ts +82 -0
- package/dist/components/pin-input/pin-input-config.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-config.js +23 -0
- package/dist/components/pin-input/pin-input-styles.d.ts +16 -0
- package/dist/components/pin-input/pin-input-styles.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-styles.js +9 -0
- package/dist/components/pricing-card/PricingCard.d.ts +87 -0
- package/dist/components/pricing-card/PricingCard.d.ts.map +1 -0
- package/dist/components/pricing-card/PricingCard.js +79 -0
- package/dist/components/pricing-card/index.d.ts +3 -0
- package/dist/components/pricing-card/index.d.ts.map +1 -0
- package/dist/components/pricing-card/index.js +3 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts +35 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-config.js +16 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts +21 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-styles.js +5 -0
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/section/Section.d.ts +56 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +27 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/index.d.ts.map +1 -0
- package/dist/components/section/index.js +3 -0
- package/dist/components/section/section-config.d.ts +64 -0
- package/dist/components/section/section-config.d.ts.map +1 -0
- package/dist/components/section/section-config.js +20 -0
- package/dist/components/section/section-styles.d.ts +8 -0
- package/dist/components/section/section-styles.d.ts.map +1 -0
- package/dist/components/section/section-styles.js +9 -0
- package/dist/components/section-kit/ActionGroup.d.ts +47 -0
- package/dist/components/section-kit/ActionGroup.d.ts.map +1 -0
- package/dist/components/section-kit/ActionGroup.js +35 -0
- package/dist/components/section-kit/SectionHeading.d.ts +65 -0
- package/dist/components/section-kit/SectionHeading.d.ts.map +1 -0
- package/dist/components/section-kit/SectionHeading.js +34 -0
- package/dist/components/section-kit/index.d.ts +12 -0
- package/dist/components/section-kit/index.d.ts.map +1 -0
- package/dist/components/section-kit/index.js +2 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts +67 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -0
- package/dist/components/sidebar-layout/SidebarLayout.js +40 -0
- package/dist/components/sidebar-layout/index.d.ts +3 -0
- package/dist/components/sidebar-layout/index.d.ts.map +1 -0
- package/dist/components/sidebar-layout/index.js +3 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts +49 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.js +16 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +21 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.js +9 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/stack/Stack.d.ts +107 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/Stack.js +36 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack-config.d.ts +68 -0
- package/dist/components/stack/stack-config.d.ts.map +1 -0
- package/dist/components/stack/stack-config.js +20 -0
- package/dist/components/stack/stack-styles.d.ts +10 -0
- package/dist/components/stack/stack-styles.d.ts.map +1 -0
- package/dist/components/stack/stack-styles.js +21 -0
- package/dist/components/testimonials/Testimonials.d.ts +78 -0
- package/dist/components/testimonials/Testimonials.d.ts.map +1 -0
- package/dist/components/testimonials/Testimonials.js +96 -0
- package/dist/components/testimonials/index.d.ts +3 -0
- package/dist/components/testimonials/index.d.ts.map +1 -0
- package/dist/components/testimonials/index.js +3 -0
- package/dist/components/testimonials/testimonials-config.d.ts +44 -0
- package/dist/components/testimonials/testimonials-config.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-config.js +28 -0
- package/dist/components/testimonials/testimonials-styles.d.ts +11 -0
- package/dist/components/testimonials/testimonials-styles.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-styles.js +5 -0
- package/dist/components/typography/typography-styles.d.ts.map +1 -1
- package/dist/config/validate-config.d.ts.map +1 -1
- package/dist/icons/CopyIcon.d.ts +3 -0
- package/dist/icons/CopyIcon.d.ts.map +1 -0
- package/dist/icons/CopyIcon.js +24 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -72
- package/dist/puck/adapters.d.ts +41 -0
- package/dist/puck/adapters.d.ts.map +1 -0
- package/dist/puck/adapters.js +30 -0
- package/dist/puck/blocks/content.d.ts +32 -0
- package/dist/puck/blocks/content.d.ts.map +1 -0
- package/dist/puck/blocks/content.js +54 -0
- package/dist/puck/blocks/layout.d.ts +44 -0
- package/dist/puck/blocks/layout.d.ts.map +1 -0
- package/dist/puck/blocks/layout.js +69 -0
- package/dist/puck/blocks/navigation.d.ts +66 -0
- package/dist/puck/blocks/navigation.d.ts.map +1 -0
- package/dist/puck/blocks/navigation.js +122 -0
- package/dist/puck/blocks/sections.d.ts +134 -0
- package/dist/puck/blocks/sections.d.ts.map +1 -0
- package/dist/puck/blocks/sections.js +232 -0
- package/dist/puck/blocks/utility.d.ts +22 -0
- package/dist/puck/blocks/utility.d.ts.map +1 -0
- package/dist/puck/blocks/utility.js +49 -0
- package/dist/puck/config.d.ts +63 -0
- package/dist/puck/config.d.ts.map +1 -0
- package/dist/puck/config.js +79 -0
- package/dist/puck/fields.d.ts +94 -0
- package/dist/puck/fields.d.ts.map +1 -0
- package/dist/puck/fields.js +116 -0
- package/dist/puck/index.d.ts +21 -0
- package/dist/puck/index.d.ts.map +1 -0
- package/dist/puck/index.js +10 -0
- package/dist/shared/action.d.ts +52 -0
- package/dist/shared/action.d.ts.map +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/spacing.d.ts +38 -0
- package/dist/shared/spacing.d.ts.map +1 -0
- package/dist/shared/spacing.js +29 -0
- package/dist/shared/typography.d.ts.map +1 -1
- package/dist/utils/resolve-token.d.ts +32 -7
- package/dist/utils/resolve-token.d.ts.map +1 -1
- package/dist/utils/resolve-token.js +9 -1
- package/package.json +14 -2
package/README.md
CHANGED
|
@@ -1,210 +1,105 @@
|
|
|
1
1
|
# asheeui
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React UI framework built on Tailwind CSS v4. Accessible, config-driven
|
|
4
|
+
components, a layout system, the sections a page is made of, and a Puck
|
|
5
|
+
integration behind their own entry point.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
|
-
- **Config-driven** —
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- **
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- **Config-driven** — theme, variant, color, radius and spacing defaults resolve
|
|
10
|
+
through one cascade, so a value can be set globally, per component or per
|
|
11
|
+
instance.
|
|
12
|
+
- **A layout system** — `Container`, `Section`, `Stack`/`HStack`/`VStack`,
|
|
13
|
+
`Grid`, `Page`/`PageHeader`/`PageContent`/`PageFooter`, plus `SidebarLayout`
|
|
14
|
+
and `AuthLayout` for application pages.
|
|
15
|
+
- **Page sections** — `Navbar`, `Hero`, `FeatureGrid`, `CTA`, `Testimonials`,
|
|
16
|
+
`PricingCard` and `Footer`, each taking its actions as configuration.
|
|
17
|
+
- **Puck integration** — `asheeui/puck` exposes the same components as builder
|
|
18
|
+
blocks, so an application, an editor and a published page share one
|
|
19
|
+
implementation. `@puckeditor/core` is an optional peer dependency.
|
|
20
|
+
- **Tailwind CSS v4** — class names are static and complete, and colours resolve
|
|
21
|
+
through CSS custom properties.
|
|
22
|
+
- **Light and dark themes** — built-in `light`, `dark` and `system` themes, plus
|
|
23
|
+
custom themes.
|
|
24
|
+
- **Accessible** — landmarks, names, keyboard behaviour and announced state are
|
|
25
|
+
part of each component's contract, with tests that state them.
|
|
26
|
+
- **TypeScript-first** — fully typed configuration, theme registry and component
|
|
27
|
+
props, with JSDoc on every exported symbol.
|
|
13
28
|
|
|
14
29
|
## Requirements
|
|
15
30
|
|
|
16
31
|
- React 18 or newer
|
|
17
32
|
- Tailwind CSS v4
|
|
18
|
-
- Node.js
|
|
33
|
+
- Node.js 22.12 or newer for development
|
|
19
34
|
|
|
20
35
|
## Installation
|
|
21
36
|
|
|
22
|
-
The fastest way to get started is with the CLI. Run this in your project root:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npx asheeui@latest init
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The CLI detects your framework, installs dependencies, adds the provider to your root layout, and configures Tailwind.
|
|
29
|
-
|
|
30
|
-
### Manual setup
|
|
31
|
-
|
|
32
|
-
Install the package:
|
|
33
|
-
|
|
34
37
|
```bash
|
|
35
|
-
npm install asheeui
|
|
38
|
+
npm install asheeui
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
Import the stylesheet once and wrap your root in the provider:
|
|
39
42
|
|
|
40
43
|
```css
|
|
41
44
|
@import "tailwindcss";
|
|
42
45
|
@import "asheeui/styles";
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```jsx
|
|
48
|
+
```tsx
|
|
48
49
|
import { AsheeUIProvider } from "asheeui";
|
|
49
|
-
|
|
50
|
-
export default function RootLayout({ children }) {
|
|
51
|
-
return (
|
|
52
|
-
<html suppressHydrationWarning>
|
|
53
|
-
<body>
|
|
54
|
-
<AsheeUIProvider>{children}</AsheeUIProvider>
|
|
55
|
-
</body>
|
|
56
|
-
</html>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
50
|
```
|
|
60
51
|
|
|
61
|
-
|
|
52
|
+
The optional `@asheeui/cli` package can scaffold that setup and check it, but it
|
|
53
|
+
is not required: the two steps above are the whole setup.
|
|
62
54
|
|
|
63
|
-
|
|
55
|
+
## Documentation
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
- [TanStack Start](/docs/installation/tanstack-start) — Full-stack React with TanStack Router
|
|
67
|
-
- [Vite + React](/docs/installation/vite) — Lightweight React SPA
|
|
57
|
+
The framework documentation lives in the repository:
|
|
68
58
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
function App() {
|
|
77
|
-
return <Button>Hello AsheeUI</Button>;
|
|
78
|
-
}
|
|
79
|
-
```
|
|
59
|
+
- [Installation](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/installation.md)
|
|
60
|
+
- [Configuration](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/configuration.md)
|
|
61
|
+
- [Components](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/components.md)
|
|
62
|
+
- [Puck](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/puck.md)
|
|
63
|
+
- [Accessibility](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/accessibility.md)
|
|
64
|
+
- [Migration](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/migration.md)
|
|
80
65
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Configuration
|
|
84
|
-
|
|
85
|
-
AsheeUI is configured through an optional `asheeui.config.ts` file at your project root. Sensible defaults apply with no config at all.
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
// asheeui.config.ts
|
|
89
|
-
import type { ExternalConfig } from "asheeui";
|
|
90
|
-
|
|
91
|
-
export const config: ExternalConfig = {
|
|
92
|
-
defaultTheme: "system", // "light" | "dark" | "system"
|
|
93
|
-
defaultVariant: "solid", // "solid" | "ghost" | "bordered" | "faded" | "underlined"
|
|
94
|
-
defaultColor: "primary", // "none" | "default" | "primary" | "secondary" | "danger" | "warning" | "success"
|
|
95
|
-
defaultRadius: "md", // "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full"
|
|
96
|
-
};
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Values are resolved in this order (highest priority first):
|
|
100
|
-
|
|
101
|
-
1. **Instance prop** — `<Button variant="solid" />`
|
|
102
|
-
2. **Component config** — `components.button.variant`
|
|
103
|
-
3. **Theme default** — top-level `defaultVariant`, `defaultColor`, etc.
|
|
104
|
-
4. **Built-in fallback** — the library's internal default
|
|
105
|
-
|
|
106
|
-
### Per-component defaults
|
|
107
|
-
|
|
108
|
-
Set defaults for specific components while keeping global defaults for everything else:
|
|
109
|
-
|
|
110
|
-
```ts
|
|
111
|
-
export const config: ExternalConfig = {
|
|
112
|
-
defaultVariant: "bordered", // applies to all components
|
|
113
|
-
components: {
|
|
114
|
-
button: { variant: "solid" }, // overrides for Button only
|
|
115
|
-
input: { variant: "bordered", radius: "sm" },
|
|
116
|
-
toast: { variant: "bordered", placement: "bottom-right" },
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
See the [Configuration docs](/docs/configuration) for the full reference.
|
|
122
|
-
|
|
123
|
-
## Theming
|
|
124
|
-
|
|
125
|
-
AsheeUI's theming system is CSS-variable-driven. It ships with `light`, `dark`, and `system` themes, and you can override tokens or define entirely custom themes.
|
|
126
|
-
|
|
127
|
-
### Switch themes at runtime
|
|
128
|
-
|
|
129
|
-
```jsx
|
|
130
|
-
import { useTheme } from "asheeui";
|
|
66
|
+
## Quick start
|
|
131
67
|
|
|
132
|
-
|
|
133
|
-
|
|
68
|
+
```tsx
|
|
69
|
+
import { Button, Page, PageContent, Hero } from "asheeui";
|
|
134
70
|
|
|
71
|
+
export function App() {
|
|
135
72
|
return (
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
73
|
+
<Page>
|
|
74
|
+
<PageContent>
|
|
75
|
+
<Hero
|
|
76
|
+
title="Run your campaigns from one place"
|
|
77
|
+
primaryAction={{ label: "Start free", href: "/signup" }}
|
|
78
|
+
/>
|
|
79
|
+
<Button>Hello AsheeUI</Button>
|
|
80
|
+
</PageContent>
|
|
81
|
+
</Page>
|
|
142
82
|
);
|
|
143
83
|
}
|
|
144
84
|
```
|
|
145
85
|
|
|
146
|
-
`
|
|
147
|
-
|
|
148
|
-
| Property | Type | Description |
|
|
149
|
-
|---|---|---|
|
|
150
|
-
| `theme` | `ThemeSelection` | Current selected theme (`"light"` \| `"dark"` \| `"system"`) |
|
|
151
|
-
| `resolvedTheme` | `ThemeName` | Actual resolved theme (after system fallback) |
|
|
152
|
-
| `setTheme` | `(theme: ThemeSelection) => void` | Set the active theme |
|
|
153
|
-
| `toggleTheme` | `() => void` | Cycle to the next theme in sequence |
|
|
154
|
-
| `availableThemes` | `readonly string[]` | All registered theme names |
|
|
86
|
+
A complete page is `Navbar`, a band or two, and `Footer`, all of them composing
|
|
87
|
+
through `Page`, `Section`, `Container` and `Grid`.
|
|
155
88
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
### Override a built-in theme
|
|
159
|
-
|
|
160
|
-
```ts
|
|
161
|
-
export const config: ExternalConfig = {
|
|
162
|
-
color: {
|
|
163
|
-
light: { primary: "#7c3aed", background: "#faf5ff" },
|
|
164
|
-
dark: { primary: "#8b5cf6", border: "#3b3b3b" },
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Only the tokens you specify are overridden — everything else stays at the built-in default.
|
|
170
|
-
|
|
171
|
-
### Add a custom theme
|
|
172
|
-
|
|
173
|
-
Extend `light` or `dark` and override only what you need:
|
|
174
|
-
|
|
175
|
-
```ts
|
|
176
|
-
export const config: ExternalConfig = {
|
|
177
|
-
defaultTheme: "company-red",
|
|
178
|
-
color: {
|
|
179
|
-
"company-red": {
|
|
180
|
-
extends: "dark",
|
|
181
|
-
background: "#1a0505",
|
|
182
|
-
foreground: "#fef2f2",
|
|
183
|
-
primary: "#dc2626",
|
|
184
|
-
// ...other tokens inherit from dark
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
> **TypeScript:** Register custom theme names so `useTheme` and `setTheme` recognize them:
|
|
191
|
-
>
|
|
192
|
-
> ```ts
|
|
193
|
-
> declare module "asheeui" {
|
|
194
|
-
> interface AsheeColorRegistry {
|
|
195
|
-
> "company-red": true;
|
|
196
|
-
> }
|
|
197
|
-
> }
|
|
198
|
-
> ```
|
|
89
|
+
## Theming
|
|
199
90
|
|
|
200
|
-
|
|
91
|
+
Themes are CSS custom properties (`--ashee-background`, `--ashee-primary`, and
|
|
92
|
+
so on), applied by the provider before the first paint. `useTheme` switches the
|
|
93
|
+
theme at runtime and records the preference, `themeController` does the same
|
|
94
|
+
outside React, and a theme is defined as a block in the configuration.
|
|
201
95
|
|
|
202
96
|
## Links
|
|
203
97
|
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
-
|
|
98
|
+
- Documentation: https://asheeui.com
|
|
99
|
+
- Repository: https://github.com/AsheeSoftworks/AsheeUI
|
|
100
|
+
- Issues: https://github.com/AsheeSoftworks/AsheeUI/issues
|
|
207
101
|
|
|
208
102
|
## License
|
|
209
103
|
|
|
210
|
-
MIT
|
|
104
|
+
MIT
|
|
105
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWxE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AAUxB,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,uGAwFjB,CAAC"}
|
|
@@ -10,8 +10,8 @@ import { CloseIcon as s } from "../../icons/CloseIcon.js";
|
|
|
10
10
|
import { ErrorIcon as c } from "../../icons/ErrorIcon.js";
|
|
11
11
|
import { InfoIcon as l } from "../../icons/InfoIcon.js";
|
|
12
12
|
import { WarningIcon as u } from "../../icons/WarningIcon.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { FALLBACK_ALERT_CONFIG as d } from "./alert-config.js";
|
|
14
|
+
import { ALERT_BASE_CLASS as f, ALERT_ICON_CLASS as p, ALERT_TYPE_COLOR as m, ALERT_TYPE_ICON_CLASS as h, ALERT_TYPE_ROLE as g } from "./alert-styles.js";
|
|
15
15
|
import { forwardRef as _ } from "react";
|
|
16
16
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/alert/Alert.tsx
|
|
@@ -24,16 +24,16 @@ function b(e) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
var x = _(({ type: o, variant: c, radius: l, title: u, children: _, icon: x, isClosable: S = !1, onClose: C, closeLabel: w = "Dismiss alert", role: T, className: E, ...D }, O) => {
|
|
27
|
-
let k = r(), A = k.components?.alert, j = i(o, A?.type, void 0,
|
|
27
|
+
let k = r(), A = k.components?.alert, j = i(o, A?.type, void 0, d.type), M = i(c, A?.variant, k.defaultVariant, d.variant), N = M === "underlined" ? "bordered" : M, P = i(l, A?.radius, k.defaultRadius, d.radius), F = a(P, t, d.radius);
|
|
28
28
|
return /* @__PURE__ */ y("div", {
|
|
29
29
|
ref: O,
|
|
30
|
-
role: T ??
|
|
31
|
-
className: e(
|
|
30
|
+
role: T ?? g[j],
|
|
31
|
+
className: e(f, F, n(N, m[j]), E),
|
|
32
32
|
...D,
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ v("span", {
|
|
35
35
|
"aria-hidden": "true",
|
|
36
|
-
className: e(
|
|
36
|
+
className: e(p, h[j]),
|
|
37
37
|
children: x ?? b(j)
|
|
38
38
|
}),
|
|
39
39
|
/* @__PURE__ */ y("div", {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { AuthLayoutConfig } from './auth-layout-config';
|
|
3
|
+
type BaseAuthLayoutProps = AuthLayoutConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title">;
|
|
4
|
+
/**
|
|
5
|
+
* Props for the AuthLayout component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AuthLayoutProps extends BaseAuthLayoutProps {
|
|
8
|
+
/** Brand content above the heading, typically a logo and product name. */
|
|
9
|
+
brand?: ReactNode;
|
|
10
|
+
/** The heading of the page, for example "Sign in". */
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** Supporting sentence under the heading. */
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
/** The form itself. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Content under the form, typically the link to the other route.
|
|
18
|
+
* It is rendered inside the panel, under the form.
|
|
19
|
+
*/
|
|
20
|
+
footer?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Product media beside the form from the `lg` breakpoint upwards, such as a
|
|
23
|
+
* screenshot. On a narrow screen the media stacks above the form.
|
|
24
|
+
*/
|
|
25
|
+
media?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Element to render the shell as.
|
|
28
|
+
* Defaults to a `div`.
|
|
29
|
+
*
|
|
30
|
+
* @default "div"
|
|
31
|
+
*/
|
|
32
|
+
as?: ElementType;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The shell of an authentication page.
|
|
36
|
+
*
|
|
37
|
+
* AuthLayout gives an authentication route the structure its content assumes: the
|
|
38
|
+
* form is vertically centred, it has a readable measure, it optionally sits on a
|
|
39
|
+
* panel, and it has somewhere to put the brand, the heading and the link to the
|
|
40
|
+
* other route. Everything the reader submits comes from the consumer, so no
|
|
41
|
+
* authentication behaviour lives in the framework.
|
|
42
|
+
*
|
|
43
|
+
* @param props - AuthLayout configuration options and element attributes.
|
|
44
|
+
* @param props.children - The form.
|
|
45
|
+
* @param props.brand - Brand content above the heading.
|
|
46
|
+
* @param props.title - The heading of the page.
|
|
47
|
+
* @param props.description - Supporting sentence under the heading.
|
|
48
|
+
* @param props.footer - Content under the form.
|
|
49
|
+
* @param props.media - Product media beside the form.
|
|
50
|
+
* @param props.panel - Draw the form on a panel. Defaults to true.
|
|
51
|
+
* @param props.align - Vertical alignment of the form column. Defaults to
|
|
52
|
+
* "center".
|
|
53
|
+
* @param props.mediaPosition - Side of the media column. Defaults to "end".
|
|
54
|
+
* @param props.contentSize - Maximum width of the form column. Defaults to
|
|
55
|
+
* "sm".
|
|
56
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
57
|
+
* @returns The rendered shell.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <AuthLayout
|
|
62
|
+
* brand="Ashee SMS"
|
|
63
|
+
* title="Sign in"
|
|
64
|
+
* description="Use the email address your workspace knows."
|
|
65
|
+
* footer={<Link href="/reset">Forgot your password?</Link>}
|
|
66
|
+
* media={<Image src="/inbox.png" alt="" ratio="video" />}
|
|
67
|
+
* >
|
|
68
|
+
* <Form onSubmit={signIn}>
|
|
69
|
+
* <Input label="Email" type="email" name="email" required />
|
|
70
|
+
* <Button type="submit" fullWidth>Sign in</Button>
|
|
71
|
+
* </Form>
|
|
72
|
+
* </AuthLayout>
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @see Page - The shell for an authenticated page.
|
|
76
|
+
*/
|
|
77
|
+
export declare const AuthLayout: import('react').ForwardRefExoticComponent<AuthLayoutProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=AuthLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthLayout.d.ts","sourceRoot":"","sources":["../../../src/components/auth-layout/AuthLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAc9B,KAAK,mBAAmB,GAAG,gBAAgB,GACzC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,0EAA0E;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,sDAAsD;IACtD,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,uBAAuB;IACvB,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,UAAU,4GAkFtB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
|
+
import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
|
|
6
|
+
import { SectionHeading as r } from "../section-kit/SectionHeading.js";
|
|
7
|
+
import { FALLBACK_AUTH_LAYOUT_CONFIG as i } from "./auth-layout-config.js";
|
|
8
|
+
import { AUTH_CONTENT_SIZE_CLASS as a, AUTH_FORM_COLUMN_CLASS as o, AUTH_FORM_WRAPPER_CLASS as s, AUTH_LAYOUT_CLASS as c } from "./auth-layout-styles.js";
|
|
9
|
+
import { forwardRef as l } from "react";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/auth-layout/AuthLayout.tsx
|
|
12
|
+
var f = l(({ brand: l, title: f, description: p, footer: m, media: h, panel: g, align: _, mediaPosition: v, contentSize: y, as: b, className: x, children: S, ...C }, w) => {
|
|
13
|
+
let T = t(), E = n({
|
|
14
|
+
panel: g,
|
|
15
|
+
align: _,
|
|
16
|
+
mediaPosition: v,
|
|
17
|
+
contentSize: y
|
|
18
|
+
}, T.components?.authlayout, i), D = !!h, O = b ?? "div", k = D && /* @__PURE__ */ u("div", {
|
|
19
|
+
className: e("flex min-h-48 items-center justify-center overflow-hidden bg-secondary/40", E.mediaPosition === "start" && "lg:order-first"),
|
|
20
|
+
children: h
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ d(O, {
|
|
23
|
+
ref: w,
|
|
24
|
+
className: e(c, D && "lg:grid-cols-2", x),
|
|
25
|
+
...C,
|
|
26
|
+
children: [
|
|
27
|
+
E.mediaPosition === "start" && k,
|
|
28
|
+
/* @__PURE__ */ u("div", {
|
|
29
|
+
className: e(o, E.align === "center" && "justify-center"),
|
|
30
|
+
children: /* @__PURE__ */ d("div", {
|
|
31
|
+
className: e(s, a[E.contentSize], E.panel && "rounded-md border border-border bg-background", E.panel && "p-6 md:p-8"),
|
|
32
|
+
children: [
|
|
33
|
+
l,
|
|
34
|
+
/* @__PURE__ */ u(r, {
|
|
35
|
+
title: f,
|
|
36
|
+
description: p,
|
|
37
|
+
align: "center",
|
|
38
|
+
size: "lg"
|
|
39
|
+
}),
|
|
40
|
+
S,
|
|
41
|
+
m && /* @__PURE__ */ u("div", {
|
|
42
|
+
className: "text-center",
|
|
43
|
+
children: m
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
E.mediaPosition === "end" && k
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
f.displayName = "AuthLayout";
|
|
53
|
+
//#endregion
|
|
54
|
+
export { f as AuthLayout };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ContainerSize } from '../container/container-config';
|
|
2
|
+
/**
|
|
3
|
+
* Theme configuration options for the AuthLayout component.
|
|
4
|
+
*
|
|
5
|
+
* Set under `components.authlayout` in the AsheeUI config. Values feed the
|
|
6
|
+
* component-level fallback tier of the theme cascade.
|
|
7
|
+
*/
|
|
8
|
+
export interface AuthLayoutConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the form is drawn on a panel.
|
|
11
|
+
* A panel suits a page that also shows product media; without one the form
|
|
12
|
+
* sits directly on the page background.
|
|
13
|
+
*
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
panel?: boolean;
|
|
17
|
+
/** Vertical alignment of the form column. @default "center" */
|
|
18
|
+
align?: "center" | "start";
|
|
19
|
+
/**
|
|
20
|
+
* Side the media column sits on from the `lg` breakpoint upwards.
|
|
21
|
+
*
|
|
22
|
+
* @default "end"
|
|
23
|
+
*/
|
|
24
|
+
mediaPosition?: "start" | "end";
|
|
25
|
+
/** Maximum width of the form column. @default "sm" */
|
|
26
|
+
contentSize?: ContainerSize;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Default config values registered for the AuthLayout component.
|
|
30
|
+
*/
|
|
31
|
+
export declare const defaultAuthLayoutConfig: AuthLayoutConfig;
|
|
32
|
+
declare module "../../libs/registry" {
|
|
33
|
+
interface ComponentTypeConfigRegistry {
|
|
34
|
+
authlayout: AuthLayoutConfig;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Hard fallback values used when no config tier provides a value.
|
|
39
|
+
*/
|
|
40
|
+
export declare const FALLBACK_AUTH_LAYOUT_CONFIG: Required<AuthLayoutConfig>;
|
|
41
|
+
//# sourceMappingURL=auth-layout-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-layout-config.d.ts","sourceRoot":"","sources":["../../../src/components/auth-layout/auth-layout-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAEhC,sDAAsD;IACtD,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAKrC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,gBAAgB,CAKlE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/auth-layout/auth-layout-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
panel: !0,
|
|
6
|
+
align: "center",
|
|
7
|
+
mediaPosition: "end",
|
|
8
|
+
contentSize: "sm"
|
|
9
|
+
};
|
|
10
|
+
e("authlayout", t);
|
|
11
|
+
var n = {
|
|
12
|
+
panel: !0,
|
|
13
|
+
align: "center",
|
|
14
|
+
mediaPosition: "end",
|
|
15
|
+
contentSize: "sm"
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as FALLBACK_AUTH_LAYOUT_CONFIG, t as defaultAuthLayoutConfig };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContainerSize } from '../container/container-config';
|
|
2
|
+
/**
|
|
3
|
+
* The shell: a full-height column that becomes two columns from the `lg`
|
|
4
|
+
* breakpoint when the page has media.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AUTH_LAYOUT_CLASS = "flex min-h-dvh w-full flex-col bg-background lg:grid lg:grid-cols-2";
|
|
7
|
+
/** The form column. */
|
|
8
|
+
export declare const AUTH_FORM_COLUMN_CLASS = "flex flex-1 flex-col p-6 md:p-10";
|
|
9
|
+
/** Centres the form column vertically. */
|
|
10
|
+
export declare const AUTH_FORM_COLUMN_CENTERED_CLASS = "justify-center";
|
|
11
|
+
/** The form wrapper, which owns the measure of the form. */
|
|
12
|
+
export declare const AUTH_FORM_WRAPPER_CLASS = "mx-auto flex w-full flex-col gap-6";
|
|
13
|
+
/** The panel treatment of the form wrapper. */
|
|
14
|
+
export declare const AUTH_PANEL_CLASS = "rounded-md border border-border bg-background";
|
|
15
|
+
/** Padding of the panel at each content width. */
|
|
16
|
+
export declare const AUTH_PANEL_PADDING_CLASS = "p-6 md:p-8";
|
|
17
|
+
/** The media column. */
|
|
18
|
+
export declare const AUTH_MEDIA_COLUMN_CLASS = "flex min-h-48 items-center justify-center overflow-hidden bg-secondary/40";
|
|
19
|
+
/** Puts the media column first from the `lg` breakpoint upwards. */
|
|
20
|
+
export declare const AUTH_MEDIA_FIRST_CLASS = "lg:order-first";
|
|
21
|
+
/** The row under the form, for a link to the other authentication route. */
|
|
22
|
+
export declare const AUTH_FOOTER_CLASS = "text-center";
|
|
23
|
+
/** Maximum width of the form wrapper at each content width. */
|
|
24
|
+
export declare const AUTH_CONTENT_SIZE_CLASS: Record<ContainerSize, string>;
|
|
25
|
+
//# sourceMappingURL=auth-layout-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-layout-styles.d.ts","sourceRoot":"","sources":["../../../src/components/auth-layout/auth-layout-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wEACyC,CAAC;AAExE,uBAAuB;AACvB,eAAO,MAAM,sBAAsB,qCAAqC,CAAC;AAEzE,0CAA0C;AAC1C,eAAO,MAAM,+BAA+B,mBAAmB,CAAC;AAEhE,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,uCAAuC,CAAC;AAE5E,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,kDAAkD,CAAC;AAEhF,kDAAkD;AAClD,eAAO,MAAM,wBAAwB,eAAe,CAAC;AAErD,wBAAwB;AACxB,eAAO,MAAM,uBAAuB,8EACyC,CAAC;AAE9E,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAMjE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/auth-layout/auth-layout-styles.ts
|
|
3
|
+
var e = "flex min-h-dvh w-full flex-col bg-background lg:grid lg:grid-cols-2", t = "flex flex-1 flex-col p-6 md:p-10", n = "justify-center", r = "mx-auto flex w-full flex-col gap-6", i = "rounded-md border border-border bg-background", a = "p-6 md:p-8", o = "flex min-h-48 items-center justify-center overflow-hidden bg-secondary/40", s = "lg:order-first", c = "text-center", l = {
|
|
4
|
+
sm: "max-w-md",
|
|
5
|
+
md: "max-w-lg",
|
|
6
|
+
lg: "max-w-xl",
|
|
7
|
+
xl: "max-w-2xl",
|
|
8
|
+
full: "max-w-none"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { l as AUTH_CONTENT_SIZE_CLASS, c as AUTH_FOOTER_CLASS, n as AUTH_FORM_COLUMN_CENTERED_CLASS, t as AUTH_FORM_COLUMN_CLASS, r as AUTH_FORM_WRAPPER_CLASS, e as AUTH_LAYOUT_CLASS, o as AUTH_MEDIA_COLUMN_CLASS, s as AUTH_MEDIA_FIRST_CLASS, i as AUTH_PANEL_CLASS, a as AUTH_PANEL_PADDING_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/auth-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,SAAS,CAAC;AACzE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAI/B;;;;GAIG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,EACzD,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAEtE;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,eAAO,MAAM,YAAY,gHA2RxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAQ5E,KAAK,eAAe,GAAG,YAAY,GACjC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,MAAM,wGAmGlB,CAAC"}
|
|
@@ -6,20 +6,20 @@ import { resolveVariantClass as n } from "../../shared/variant.js";
|
|
|
6
6
|
import { useAsheeConfig as r } from "../../libs/context.js";
|
|
7
7
|
import { resolveCascade as i, resolveClassKey as a } from "../../utils/resolve-token.js";
|
|
8
8
|
import { Image as o } from "../image/Image.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { getInitials as s } from "./avatar.helpers.js";
|
|
10
|
+
import { FALLBACK_AVATAR_CONFIG as c } from "./avatar-config.js";
|
|
11
|
+
import { AVATAR_BASE_CLASS as l, AVATAR_FALLBACK_VARIANT as u, AVATAR_FONT_CLASS as d, AVATAR_SIZE_CLASS as f } from "./avatar-styles.js";
|
|
12
12
|
import { forwardRef as p, useState as m } from "react";
|
|
13
13
|
import { jsx as h } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/avatar/Avatar.tsx
|
|
15
15
|
var g = p(({ name: p, src: g, alt: _, component: v, componentProps: y, fallback: b, size: x, radius: S, color: C, className: w, ...T }, E) => {
|
|
16
|
-
let D = r(), O = D.components?.avatar, [k, A] = m(!1), j = i(x, O?.size, void 0,
|
|
16
|
+
let D = r(), O = D.components?.avatar, [k, A] = m(!1), j = i(x, O?.size, void 0, c.size), M = i(S, O?.radius, D.defaultRadius, c.radius), N = i(C, O?.color, D.defaultColor, c.color), P = a(j, f, c.size), F = a(j, d, c.size), I = a(M, t, c.radius), L = _ ?? p, R = !!g && !k;
|
|
17
17
|
return /* @__PURE__ */ h("div", {
|
|
18
18
|
ref: E,
|
|
19
19
|
role: "img",
|
|
20
20
|
"aria-label": L,
|
|
21
21
|
"aria-hidden": !L || void 0,
|
|
22
|
-
className: e(
|
|
22
|
+
className: e(l, P, I, w),
|
|
23
23
|
...T,
|
|
24
24
|
children: R ? /* @__PURE__ */ h(o, {
|
|
25
25
|
src: g,
|
|
@@ -33,8 +33,8 @@ var g = p(({ name: p, src: g, alt: _, component: v, componentProps: y, fallback:
|
|
|
33
33
|
className: "size-full"
|
|
34
34
|
}) : /* @__PURE__ */ h("span", {
|
|
35
35
|
"aria-hidden": "true",
|
|
36
|
-
className: e("inline-flex items-center justify-center size-full", F, n(
|
|
37
|
-
children: b ??
|
|
36
|
+
className: e("inline-flex items-center justify-center size-full", F, n(u, N)),
|
|
37
|
+
children: b ?? s(p ?? "")
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAUxE,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,gBAAgB,CAAC;AASxB,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,KAAK,wGA+HjB,CAAC"}
|