asheeui 0.6.12 → 0.6.14
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 +223 -0
- package/dist/components/autocomplete/Autocomplete.js +3 -3
- package/dist/components/date-picker/Calendar.d.ts +6 -1
- package/dist/components/date-picker/Calendar.d.ts.map +1 -1
- package/dist/components/date-picker/Calendar.js +30 -30
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +167 -156
- package/dist/components/date-picker/date-picker-config.d.ts +12 -1
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +3 -3
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +107 -105
- package/dist/components/select-menu/SelectMenu.d.ts +6 -9
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/components/select-menu/SelectMenu.js +116 -107
- package/dist/components/select-menu/select-menu-config.d.ts +8 -4
- package/dist/components/select-menu/select-menu-config.d.ts.map +1 -1
- package/dist/components/select-menu/select-menu-config.js +1 -1
- package/dist/components/select-menu/use-select-floating.d.ts +46 -20
- package/dist/components/select-menu/use-select-floating.d.ts.map +1 -1
- package/dist/components/select-menu/use-select-floating.js +35 -28
- package/dist/theme/controller.d.ts.map +1 -1
- package/dist/theme/controller.js +14 -16
- package/package.json +27 -2
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# asheeui
|
|
2
|
+
|
|
3
|
+
A config-driven React component library built on Tailwind CSS v4. Accessible, styled components with a unified configuration system — set defaults once, override them anywhere.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Config-driven** — Define theme, variant, color, and radius defaults in one place (`asheeui.config.ts`) and override at the component or instance level.
|
|
8
|
+
- **Tailwind CSS v4** — Built on the latest Tailwind with CSS-variable-driven theming.
|
|
9
|
+
- **Light & dark themes** — Ships with built-in `light`, `dark`, and `system` themes, plus full support for custom themes.
|
|
10
|
+
- **Accessible components** — Every component is designed with accessibility in mind.
|
|
11
|
+
- **Runtime theming** — Switch themes on the fly with the `useTheme` hook; preferences persist via `localStorage`.
|
|
12
|
+
- **TypeScript-first** — Fully typed config, theme registry, and component props.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- React 18 or newer
|
|
17
|
+
- Tailwind CSS v4
|
|
18
|
+
- Node.js 18 or newer
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
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
|
+
```bash
|
|
35
|
+
npm install asheeui@latest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Add the styles import to your global CSS file (must come **after** the Tailwind import):
|
|
39
|
+
|
|
40
|
+
```css
|
|
41
|
+
@import "tailwindcss";
|
|
42
|
+
@import "asheeui/styles";
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Wrap your app with `AsheeUIProvider`:
|
|
46
|
+
|
|
47
|
+
```jsx
|
|
48
|
+
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
|
+
```
|
|
60
|
+
|
|
61
|
+
> **Note:** `suppressHydrationWarning` is required on the `<html>` element to prevent hydration mismatches from theme switching.
|
|
62
|
+
|
|
63
|
+
### Framework guides
|
|
64
|
+
|
|
65
|
+
- [Next.js](/docs/installation/nextjs) — App Router and Pages Router
|
|
66
|
+
- [TanStack Start](/docs/installation/tanstack-start) — Full-stack React with TanStack Router
|
|
67
|
+
- [Vite + React](/docs/installation/vite) — Lightweight React SPA
|
|
68
|
+
|
|
69
|
+
## Quick start
|
|
70
|
+
|
|
71
|
+
Render a component:
|
|
72
|
+
|
|
73
|
+
```jsx
|
|
74
|
+
import { Button } from "asheeui";
|
|
75
|
+
|
|
76
|
+
function App() {
|
|
77
|
+
return <Button>Hello AsheeUI</Button>;
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You should see a styled button using the default theme.
|
|
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";
|
|
131
|
+
|
|
132
|
+
function ThemeSwitcher() {
|
|
133
|
+
const { theme, setTheme, toggleTheme } = useTheme();
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<div>
|
|
137
|
+
<p>Current theme: {theme}</p>
|
|
138
|
+
<button onClick={() => setTheme("dark")}>Dark</button>
|
|
139
|
+
<button onClick={() => setTheme("light")}>Light</button>
|
|
140
|
+
<button onClick={toggleTheme}>Toggle</button>
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`useTheme` returns:
|
|
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 |
|
|
155
|
+
|
|
156
|
+
Theme preference persists across page reloads via `localStorage`.
|
|
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
|
+
> ```
|
|
199
|
+
|
|
200
|
+
See the [Theming docs](/docs/theming) for the full token list.
|
|
201
|
+
|
|
202
|
+
## Links
|
|
203
|
+
|
|
204
|
+
- [Documentation](/docs)
|
|
205
|
+
- [Configuration reference](/docs/configuration)
|
|
206
|
+
- [Theming reference](/docs/theming)
|
|
207
|
+
|
|
208
|
+
## License
|
|
209
|
+
|
|
210
|
+
MIT
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Key changes from your draft
|
|
215
|
+
|
|
216
|
+
- **Added a title and tagline** — npm shows this at the top, so a proper `# asheeui` heading and one-line description is important.
|
|
217
|
+
- **Added a Features section** — npm readers skim; highlighting the key selling points (config-driven, Tailwind v4, theming, TypeScript) helps them decide quickly.
|
|
218
|
+
- **Folded the framework-specific installation guides into a "Framework guides" list** — the full TanStack/Vite/Next installation content belongs in the docs site, not the npm README. Linking out keeps the README scannable.
|
|
219
|
+
- **Added a real "Configuration" section** — your draft mentioned config-driven but never showed it. I pulled the precedence rules and an example from your Configuration docs.
|
|
220
|
+
- **Added a "Theming" section** — same reasoning. The `useTheme` hook and custom theme example are the library's headline features, so they belong on the front page.
|
|
221
|
+
- **Added License and Links sections** — standard npm README conventions.
|
|
222
|
+
- **Tightened the Quick start** — kept the CLI-first flow but made the manual setup explicit so readers without the CLI aren't stranded.
|
|
223
|
+
- **Preserved all `<PackageManagerTabs>` references** where they belong (docs site) but replaced them with plain `bash` blocks in the README, since npm's markdown renderer won't execute your React components.
|
|
@@ -58,7 +58,7 @@ const me = se(
|
|
|
58
58
|
re(() => {
|
|
59
59
|
i ? u(i.label) : s != null && u(String(s));
|
|
60
60
|
}, [i, s]);
|
|
61
|
-
const { refs: x,
|
|
61
|
+
const { refs: x, context: d, isPositioned: q, floatingStyles: H } = fe({
|
|
62
62
|
isOpen: S,
|
|
63
63
|
onOpenChange: m,
|
|
64
64
|
disabled: O
|
|
@@ -112,11 +112,11 @@ const me = se(
|
|
|
112
112
|
ce,
|
|
113
113
|
{
|
|
114
114
|
isOpen: S,
|
|
115
|
+
floatingStyles: H,
|
|
115
116
|
context: d,
|
|
116
|
-
floatingStyles: q,
|
|
117
117
|
getFloatingProps: Y,
|
|
118
118
|
setFloatingRef: x.setFloating,
|
|
119
|
-
isPositioned:
|
|
119
|
+
isPositioned: q,
|
|
120
120
|
options: Z,
|
|
121
121
|
selectedValues: h,
|
|
122
122
|
onSelectMenuOption: k,
|
|
@@ -51,7 +51,12 @@ interface CalendarProps {
|
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Calendar popover component with month navigation and date selection.
|
|
54
|
+
*
|
|
55
|
+
* Memoized so parent-driven renders (the DatePicker popover's one-time
|
|
56
|
+
* `isPositioned` flip, input typing, open/close) do not rebuild the month
|
|
57
|
+
* grid. Every prop is a primitive or a stable callback, so React.memo can
|
|
58
|
+
* skip those renders.
|
|
54
59
|
*/
|
|
55
|
-
export declare
|
|
60
|
+
export declare const Calendar: import('react').NamedExoticComponent<CalendarProps>;
|
|
56
61
|
export {};
|
|
57
62
|
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/Calendar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AASvD,UAAU,aAAa;IACrB;;;OAGG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/Calendar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AASvD,UAAU,aAAa;IACrB;;;OAGG;IACH,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,EAAE,YAAY,CAAC;IAC9B;;;OAGG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,qDA0QnB,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { useState as f, useMemo as
|
|
4
|
-
import { ChevronLeftIcon as
|
|
5
|
-
import { ChevronRightIcon as
|
|
6
|
-
import { buildDayCells as
|
|
7
|
-
import { CALENDAR_COLOR_CLASSES as L, DATE_PICKER_CELL_SIZE_CLASS as
|
|
3
|
+
import { memo as q, useState as f, useMemo as B } from "react";
|
|
4
|
+
import { ChevronLeftIcon as J } from "../../icons/ChevronLeftIcon.js";
|
|
5
|
+
import { ChevronRightIcon as Q } from "../../icons/ChevronRightIcon.js";
|
|
6
|
+
import { buildDayCells as U, MONTHS as X, DAYS_OF_WEEK as tt } from "./date-picker.helpers.js";
|
|
7
|
+
import { CALENDAR_COLOR_CLASSES as L, DATE_PICKER_CELL_SIZE_CLASS as nt } from "./date-picker-styles.js";
|
|
8
8
|
import { TimeSpinner as y } from "./TimeSpinner.js";
|
|
9
9
|
import { cn as u } from "../../utils/cn.js";
|
|
10
|
-
|
|
10
|
+
const mt = q(function({
|
|
11
11
|
selected: n,
|
|
12
12
|
mode: s,
|
|
13
13
|
isClearable: C,
|
|
14
14
|
resolvedSizeKey: j,
|
|
15
15
|
resolvedColor: h,
|
|
16
|
-
radiusClass:
|
|
16
|
+
radiusClass: i,
|
|
17
17
|
onSelect: v,
|
|
18
18
|
onClose: w,
|
|
19
19
|
disableFuture: Y = !1
|
|
20
20
|
}) {
|
|
21
21
|
const r = /* @__PURE__ */ new Date(), [l, k] = f(
|
|
22
22
|
(n == null ? void 0 : n.getFullYear()) ?? r.getFullYear()
|
|
23
|
-
), [
|
|
23
|
+
), [a, g] = f(
|
|
24
24
|
(n == null ? void 0 : n.getMonth()) ?? r.getMonth()
|
|
25
25
|
), [b, A] = f((n == null ? void 0 : n.getHours()) ?? 0), [p, H] = f((n == null ? void 0 : n.getMinutes()) ?? 0), [x, T] = f((n == null ? void 0 : n.getSeconds()) ?? 0), m = L[h] ?? L.primary;
|
|
26
26
|
function M(t, e, Z) {
|
|
@@ -39,19 +39,19 @@ function ut({
|
|
|
39
39
|
T(t), M(b, p, t);
|
|
40
40
|
}
|
|
41
41
|
function K(t) {
|
|
42
|
-
v(new Date(l,
|
|
42
|
+
v(new Date(l, a, t, b, p, x, 0)), s === "date" && w();
|
|
43
43
|
}
|
|
44
44
|
function P() {
|
|
45
|
-
|
|
45
|
+
a === 0 ? (g(11), k((t) => t - 1)) : g((t) => t - 1);
|
|
46
46
|
}
|
|
47
47
|
function V() {
|
|
48
|
-
|
|
48
|
+
a === 11 ? (g(0), k((t) => t + 1)) : g((t) => t + 1);
|
|
49
49
|
}
|
|
50
50
|
function d(t) {
|
|
51
|
-
return !!n && n.getFullYear() === l && n.getMonth() ===
|
|
51
|
+
return !!n && n.getFullYear() === l && n.getMonth() === a && n.getDate() === t;
|
|
52
52
|
}
|
|
53
53
|
function N(t) {
|
|
54
|
-
return r.getFullYear() === l && r.getMonth() ===
|
|
54
|
+
return r.getFullYear() === l && r.getMonth() === a && r.getDate() === t;
|
|
55
55
|
}
|
|
56
56
|
const $ = new Date(
|
|
57
57
|
r.getFullYear(),
|
|
@@ -59,9 +59,9 @@ function ut({
|
|
|
59
59
|
r.getDate()
|
|
60
60
|
);
|
|
61
61
|
function D(t) {
|
|
62
|
-
return Y ? new Date(l,
|
|
62
|
+
return Y ? new Date(l, a, t) > $ : !1;
|
|
63
63
|
}
|
|
64
|
-
const F = !Y || l < r.getFullYear() || l === r.getFullYear() &&
|
|
64
|
+
const F = !Y || l < r.getFullYear() || l === r.getFullYear() && a < r.getMonth(), E = s === "date" || s === "datetime", z = s === "time" || s === "datetime", G = s !== "date" || C && !!n, _ = U(l, a), W = B(() => _.map((t, e) => ({
|
|
65
65
|
key: t !== null ? `day-${t}` : `empty-slot-${e}`,
|
|
66
66
|
day: t
|
|
67
67
|
})), [_]);
|
|
@@ -70,7 +70,7 @@ function ut({
|
|
|
70
70
|
{
|
|
71
71
|
className: u(
|
|
72
72
|
"bg-background border border-border/70 shadow-xl select-none p-4 w-max",
|
|
73
|
-
|
|
73
|
+
i
|
|
74
74
|
),
|
|
75
75
|
children: [
|
|
76
76
|
/* @__PURE__ */ c("div", { className: "flex flex-row", children: [
|
|
@@ -85,13 +85,13 @@ function ut({
|
|
|
85
85
|
className: u(
|
|
86
86
|
"p-1.5 text-foreground/70 transition-all active:scale-95",
|
|
87
87
|
"hover:text-foreground hover:bg-secondary",
|
|
88
|
-
|
|
88
|
+
i
|
|
89
89
|
),
|
|
90
|
-
children: /* @__PURE__ */ o(
|
|
90
|
+
children: /* @__PURE__ */ o(J, {})
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
/* @__PURE__ */ c("span", { className: "font-semibold text-sm text-foreground tracking-wide", children: [
|
|
94
|
-
|
|
94
|
+
X[a],
|
|
95
95
|
" ",
|
|
96
96
|
l
|
|
97
97
|
] }),
|
|
@@ -105,14 +105,14 @@ function ut({
|
|
|
105
105
|
className: u(
|
|
106
106
|
"p-1.5 text-foreground/70 transition-all",
|
|
107
107
|
F ? "hover:text-foreground hover:bg-secondary active:scale-95" : "opacity-30 cursor-not-allowed",
|
|
108
|
-
|
|
108
|
+
i
|
|
109
109
|
),
|
|
110
|
-
children: /* @__PURE__ */ o(
|
|
110
|
+
children: /* @__PURE__ */ o(Q, {})
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
|
|
115
|
-
|
|
115
|
+
tt.map((t) => /* @__PURE__ */ o(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
className: "text-[11px] font-bold tracking-wider text-foreground/50 uppercase py-1 mb-1",
|
|
@@ -129,8 +129,8 @@ function ut({
|
|
|
129
129
|
disabled: D(e),
|
|
130
130
|
className: u(
|
|
131
131
|
"w-full flex items-center justify-center font-medium transition-all duration-200",
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
nt[j],
|
|
133
|
+
i,
|
|
134
134
|
D(e) ? "opacity-30 cursor-not-allowed text-foreground/50" : "active:scale-90",
|
|
135
135
|
!D(e) && !d(e) && !N(e) && m.hover,
|
|
136
136
|
d(e) && u(m.bg, "font-semibold shadow-sm"),
|
|
@@ -160,7 +160,7 @@ function ut({
|
|
|
160
160
|
label: "HH",
|
|
161
161
|
onChange: I,
|
|
162
162
|
resolvedColor: h,
|
|
163
|
-
radiusClass:
|
|
163
|
+
radiusClass: i
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
166
|
/* @__PURE__ */ o(
|
|
@@ -171,7 +171,7 @@ function ut({
|
|
|
171
171
|
label: "MM",
|
|
172
172
|
onChange: O,
|
|
173
173
|
resolvedColor: h,
|
|
174
|
-
radiusClass:
|
|
174
|
+
radiusClass: i
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
177
|
/* @__PURE__ */ o(
|
|
@@ -182,7 +182,7 @@ function ut({
|
|
|
182
182
|
label: "SS",
|
|
183
183
|
onChange: R,
|
|
184
184
|
resolvedColor: h,
|
|
185
|
-
radiusClass:
|
|
185
|
+
radiusClass: i
|
|
186
186
|
}
|
|
187
187
|
)
|
|
188
188
|
]
|
|
@@ -208,7 +208,7 @@ function ut({
|
|
|
208
208
|
onClick: w,
|
|
209
209
|
className: u(
|
|
210
210
|
"ml-auto text-xs font-semibold px-4 py-2 transition-all hover:opacity-90 active:scale-95 shadow-sm",
|
|
211
|
-
|
|
211
|
+
i,
|
|
212
212
|
m.bg
|
|
213
213
|
),
|
|
214
214
|
children: "Done"
|
|
@@ -218,7 +218,7 @@ function ut({
|
|
|
218
218
|
]
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
|
-
}
|
|
221
|
+
});
|
|
222
222
|
export {
|
|
223
|
-
|
|
223
|
+
mt as Calendar
|
|
224
224
|
};
|
|
@@ -78,7 +78,7 @@ export interface DatePickerProps extends BaseDatePickerProps {
|
|
|
78
78
|
* @param props.radius - Corner rounding. Defaults to "md".
|
|
79
79
|
* @param props.color - Theme accent color. Defaults to "primary".
|
|
80
80
|
* @param props.disabled - Whether the input is disabled. Defaults to false.
|
|
81
|
-
* @param props.picker - Picker configuration overrides including className, portal, and
|
|
81
|
+
* @param props.picker - Picker configuration overrides including className, portal, portalTarget, and lockScroll.
|
|
82
82
|
* @param props.label - Field label text.
|
|
83
83
|
* @param props.description - Description text.
|
|
84
84
|
* @param props.message - Validation message.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASxD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAChE,IAAI,CACF,UAAU,EACV,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CACtE,CAAC;AAEJ;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,UAAU,8GA8VtB,CAAC"}
|