asheeui 0.6.7 → 0.6.9
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/dist/components/autocomplete/Autocomplete.d.ts +34 -17
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +90 -106
- package/dist/components/autocomplete/autocomplete-config.d.ts +2 -20
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete-config.js +9 -13
- package/dist/components/button/Button.d.ts +31 -5
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +68 -64
- package/dist/components/card/Card.d.ts +58 -54
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +152 -158
- package/dist/components/card/card-config.d.ts +66 -33
- package/dist/components/card/card-config.d.ts.map +1 -1
- package/dist/components/card/card-config.js +9 -9
- package/dist/components/date-picker/Calendar.d.ts +57 -0
- package/dist/components/date-picker/Calendar.d.ts.map +1 -0
- package/dist/components/date-picker/Calendar.js +224 -0
- package/dist/components/date-picker/DatePicker.d.ts +68 -155
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +194 -466
- package/dist/components/date-picker/TimeSpinner.d.ts +46 -0
- package/dist/components/date-picker/TimeSpinner.d.ts.map +1 -0
- package/dist/components/date-picker/TimeSpinner.js +84 -0
- package/dist/components/date-picker/date-picker-config.d.ts +21 -1
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-config.js +10 -14
- package/dist/components/date-picker/date-picker-styles.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-styles.js +4 -11
- package/dist/components/date-picker/date-picker.helpers.d.ts +111 -0
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.helpers.js +110 -0
- package/dist/components/date-picker/index.js +3 -0
- package/dist/components/input/Input.d.ts +13 -7
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +96 -91
- package/dist/components/keyboard/KeyboardContext.d.ts +130 -0
- package/dist/components/keyboard/KeyboardContext.d.ts.map +1 -0
- package/dist/components/keyboard/KeyboardContext.js +13 -0
- package/dist/components/keyboard/KeyboardProvider.d.ts +78 -0
- package/dist/components/keyboard/KeyboardProvider.d.ts.map +1 -0
- package/dist/components/keyboard/KeyboardProvider.js +183 -0
- package/dist/components/keyboard/OnScreenKeyboard.d.ts +65 -43
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
- package/dist/components/keyboard/OnScreenKeyboard.js +119 -113
- package/dist/components/keyboard/index.d.ts +2 -1
- package/dist/components/keyboard/index.d.ts.map +1 -1
- package/dist/components/keyboard/index.js +2 -1
- package/dist/components/keyboard/keyboard-config.d.ts +40 -36
- package/dist/components/keyboard/keyboard-config.d.ts.map +1 -1
- package/dist/components/keyboard/keyboard-config.js +15 -10
- package/dist/components/keyboard/use-keyboard-field.d.ts +6 -4
- package/dist/components/keyboard/use-keyboard-field.d.ts.map +1 -1
- package/dist/components/keyboard/use-keyboard-field.js +12 -12
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +59 -65
- package/dist/components/multi-select/MultiSelect.d.ts +75 -40
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +188 -188
- package/dist/components/multi-select/multi-select-config.d.ts +2 -20
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-config.js +10 -14
- package/dist/components/select/Select.d.ts +60 -45
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +149 -161
- package/dist/components/select/select-config.d.ts +3 -29
- package/dist/components/select/select-config.d.ts.map +1 -1
- package/dist/components/select/select-config.js +6 -14
- package/dist/components/select/select-styles.js +1 -6
- package/dist/components/select-menu/SelectMenu.d.ts +48 -42
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/components/select-menu/SelectMenu.js +137 -123
- package/dist/components/select-menu/select-menu-config.d.ts +33 -2
- package/dist/components/select-menu/select-menu-config.d.ts.map +1 -1
- package/dist/components/select-menu/select-menu-config.js +3 -1
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/switch/Switch.d.ts +9 -33
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +68 -74
- package/dist/components/switch/switch-styles.d.ts +1 -6
- package/dist/components/switch/switch-styles.d.ts.map +1 -1
- package/dist/components/switch/switch-styles.js +6 -12
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/textarea/Textarea.d.ts +19 -1
- package/dist/components/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +95 -90
- package/dist/components/toast/ToastContext.d.ts +122 -0
- package/dist/components/toast/ToastContext.d.ts.map +1 -0
- package/dist/components/toast/ToastContext.js +28 -0
- package/dist/components/toast/ToastProvider.d.ts +98 -0
- package/dist/components/toast/ToastProvider.d.ts.map +1 -0
- package/dist/components/toast/ToastProvider.js +188 -0
- package/dist/components/toast/index.d.ts +2 -1
- package/dist/components/toast/index.d.ts.map +1 -1
- package/dist/components/toast/index.js +2 -1
- package/dist/components/toast/toast-config.d.ts +36 -0
- package/dist/components/toast/toast-config.d.ts.map +1 -1
- package/dist/icons/ChevronUpIcon.d.ts +3 -0
- package/dist/icons/ChevronUpIcon.d.ts.map +1 -0
- package/dist/icons/ChevronUpIcon.js +21 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.css +24 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -59
- package/dist/theme/color.js +2 -2
- package/package.json +1 -1
- package/dist/components/keyboard/keyboard-context.d.ts +0 -118
- package/dist/components/keyboard/keyboard-context.d.ts.map +0 -1
- package/dist/components/keyboard/keyboard-context.js +0 -90
- package/dist/components/toast/toast-context.d.ts +0 -163
- package/dist/components/toast/toast-context.d.ts.map +0 -1
- package/dist/components/toast/toast-context.js +0 -177
|
@@ -1,212 +1,206 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useAsheeConfig as
|
|
5
|
-
import { resolveCascade as v, resolveRadiusKey as
|
|
6
|
-
import { Image as
|
|
7
|
-
import { FALLBACK_CARD_CONFIG as
|
|
8
|
-
import { CARD_PADDING_CLASS as
|
|
9
|
-
import { RADIUS_CLASS as
|
|
10
|
-
import { cn as
|
|
11
|
-
const
|
|
2
|
+
import { jsxs as C, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as ot, useId as nt } from "react";
|
|
4
|
+
import { useAsheeConfig as et } from "../../libs/context.js";
|
|
5
|
+
import { resolveCascade as v, resolveRadiusKey as st, resolveAnimate as lt, resolveClassKey as y } from "../../utils/resolve-token.js";
|
|
6
|
+
import { Image as dt } from "../image/Image.js";
|
|
7
|
+
import { FALLBACK_CARD_CONFIG as e } from "./card-config.js";
|
|
8
|
+
import { CARD_PADDING_CLASS as at, CARD_GAP_CLASS as ct, CARD_HEADER_GAP_CLASS as it, CARD_VARIANT_CLASS as k } from "./card-styles.js";
|
|
9
|
+
import { RADIUS_CLASS as ut } from "../../shared/radius.js";
|
|
10
|
+
import { cn as p } from "../../utils/cn.js";
|
|
11
|
+
const ft = ot(
|
|
12
12
|
({
|
|
13
|
-
variant:
|
|
14
|
-
size:
|
|
15
|
-
radius:
|
|
16
|
-
animate:
|
|
17
|
-
isClickable:
|
|
18
|
-
isDisabled:
|
|
19
|
-
href:
|
|
20
|
-
title:
|
|
21
|
-
description:
|
|
22
|
-
header:
|
|
23
|
-
body:
|
|
24
|
-
footer:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
imageProps: r,
|
|
33
|
-
className: T,
|
|
34
|
-
children: U,
|
|
35
|
-
onClick: f,
|
|
36
|
-
id: q,
|
|
37
|
-
style: J,
|
|
13
|
+
variant: G,
|
|
14
|
+
size: j,
|
|
15
|
+
radius: K,
|
|
16
|
+
animate: B,
|
|
17
|
+
isClickable: D,
|
|
18
|
+
isDisabled: s = !1,
|
|
19
|
+
href: i,
|
|
20
|
+
title: h,
|
|
21
|
+
description: x,
|
|
22
|
+
header: I,
|
|
23
|
+
body: E,
|
|
24
|
+
footer: N,
|
|
25
|
+
image: t,
|
|
26
|
+
imageProps: o,
|
|
27
|
+
className: V,
|
|
28
|
+
children: F,
|
|
29
|
+
onClick: u,
|
|
30
|
+
id: $,
|
|
31
|
+
style: H,
|
|
38
32
|
onKeyDown: A,
|
|
39
|
-
...
|
|
40
|
-
},
|
|
41
|
-
var
|
|
42
|
-
const z =
|
|
43
|
-
K,
|
|
44
|
-
e == null ? void 0 : e.size,
|
|
45
|
-
void 0,
|
|
46
|
-
a.size
|
|
47
|
-
), Y = v(
|
|
33
|
+
...O
|
|
34
|
+
}, T) => {
|
|
35
|
+
var L;
|
|
36
|
+
const z = et(), r = (L = z.components) == null ? void 0 : L.card, U = nt(), q = $ ?? U, m = v(
|
|
48
37
|
j,
|
|
49
|
-
|
|
38
|
+
r == null ? void 0 : r.size,
|
|
39
|
+
void 0,
|
|
40
|
+
e.size
|
|
41
|
+
), J = v(
|
|
42
|
+
G,
|
|
43
|
+
r == null ? void 0 : r.variant,
|
|
50
44
|
z.defaultVariant,
|
|
51
|
-
|
|
52
|
-
),
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
e.variant
|
|
46
|
+
), M = st(
|
|
47
|
+
K,
|
|
48
|
+
r == null ? void 0 : r.radius,
|
|
55
49
|
z.defaultRadius,
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
e.radius
|
|
51
|
+
), b = v(
|
|
52
|
+
t == null ? void 0 : t.position,
|
|
53
|
+
r == null ? void 0 : r.image.position,
|
|
60
54
|
void 0,
|
|
61
|
-
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
),
|
|
83
|
-
|
|
84
|
-
|
|
55
|
+
e.image.position
|
|
56
|
+
), c = D ?? !!(i || u), Q = lt(
|
|
57
|
+
B,
|
|
58
|
+
r == null ? void 0 : r.animate,
|
|
59
|
+
e.animate
|
|
60
|
+
), W = y(
|
|
61
|
+
m,
|
|
62
|
+
at,
|
|
63
|
+
e.size
|
|
64
|
+
), S = y(
|
|
65
|
+
m,
|
|
66
|
+
ct,
|
|
67
|
+
e.size
|
|
68
|
+
), X = y(
|
|
69
|
+
m,
|
|
70
|
+
it,
|
|
71
|
+
e.size
|
|
72
|
+
), Y = y(
|
|
73
|
+
M,
|
|
74
|
+
ut,
|
|
75
|
+
e.radius
|
|
76
|
+
), Z = v(
|
|
77
|
+
t == null ? void 0 : t.loading,
|
|
78
|
+
r == null ? void 0 : r.image.loading,
|
|
85
79
|
void 0,
|
|
86
|
-
|
|
87
|
-
),
|
|
88
|
-
if (
|
|
89
|
-
|
|
80
|
+
e.image.loading
|
|
81
|
+
), P = k[J] ?? k.bordered, w = (n) => {
|
|
82
|
+
if (s) {
|
|
83
|
+
n.preventDefault();
|
|
90
84
|
return;
|
|
91
85
|
}
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
A == null || A(
|
|
95
|
-
},
|
|
96
|
-
if (!
|
|
97
|
-
const
|
|
86
|
+
u == null || u(n), i && !n.defaultPrevented && (window.location.href = i);
|
|
87
|
+
}, g = (n) => {
|
|
88
|
+
A == null || A(n), c && !s && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), w(n));
|
|
89
|
+
}, R = (n) => {
|
|
90
|
+
if (!(t != null && t.src) || b !== n) return null;
|
|
91
|
+
const a = {
|
|
98
92
|
top: "w-full shrink-0 rounded-b-none",
|
|
99
93
|
bottom: "w-full shrink-0 order-last rounded-t-none",
|
|
100
94
|
background: ""
|
|
101
|
-
}[
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
(
|
|
106
|
-
`[Card] ${
|
|
107
|
-
),
|
|
108
|
-
...
|
|
95
|
+
}[n];
|
|
96
|
+
let l = { ...o ?? {} };
|
|
97
|
+
if (t != null && t.component) {
|
|
98
|
+
const f = (o == null ? void 0 : o.loading) === "lazy", rt = (o == null ? void 0 : o.priority) === !0;
|
|
99
|
+
(f || rt) && console.warn(
|
|
100
|
+
`[Card] ${f ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
|
|
101
|
+
), l = {
|
|
102
|
+
...l,
|
|
109
103
|
loading: "eager",
|
|
110
104
|
// Remove priority if present to avoid conflicts
|
|
111
|
-
...
|
|
105
|
+
...l.priority !== void 0 && { priority: !1 }
|
|
112
106
|
};
|
|
113
107
|
}
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
-
|
|
108
|
+
return /* @__PURE__ */ d(
|
|
109
|
+
dt,
|
|
116
110
|
{
|
|
117
|
-
src:
|
|
118
|
-
alt:
|
|
119
|
-
ratio:
|
|
120
|
-
fit:
|
|
121
|
-
className:
|
|
122
|
-
imageComponent:
|
|
123
|
-
imageProps:
|
|
124
|
-
loading:
|
|
111
|
+
src: t.src,
|
|
112
|
+
alt: t.alt,
|
|
113
|
+
ratio: (t == null ? void 0 : t.ratio) ?? "video",
|
|
114
|
+
fit: t.fit ?? "cover",
|
|
115
|
+
className: a,
|
|
116
|
+
imageComponent: t.component,
|
|
117
|
+
imageProps: l,
|
|
118
|
+
loading: Z
|
|
125
119
|
}
|
|
126
120
|
);
|
|
127
|
-
},
|
|
128
|
-
if (!
|
|
129
|
-
const
|
|
130
|
-
let
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
(
|
|
134
|
-
`[Card] ${
|
|
135
|
-
),
|
|
136
|
-
...
|
|
121
|
+
}, tt = () => {
|
|
122
|
+
if (!(t != null && t.src) || b !== "background") return null;
|
|
123
|
+
const n = t.component || "img";
|
|
124
|
+
let a = { ...o ?? {} };
|
|
125
|
+
if (t != null && t.component) {
|
|
126
|
+
const l = (o == null ? void 0 : o.loading) === "lazy", f = (o == null ? void 0 : o.priority) === !0;
|
|
127
|
+
(l || f) && console.warn(
|
|
128
|
+
`[Card] ${l ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
|
|
129
|
+
), a = {
|
|
130
|
+
...a,
|
|
137
131
|
loading: "eager",
|
|
138
|
-
...
|
|
132
|
+
...a.priority !== void 0 && { priority: !1 }
|
|
139
133
|
};
|
|
140
134
|
}
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
|
|
135
|
+
return /* @__PURE__ */ d("div", { className: "absolute inset-0 z-0 pointer-events-none", children: /* @__PURE__ */ d(
|
|
136
|
+
n,
|
|
143
137
|
{
|
|
144
|
-
src:
|
|
145
|
-
alt:
|
|
138
|
+
src: t.src,
|
|
139
|
+
alt: t == null ? void 0 : t.alt,
|
|
146
140
|
className: "h-full w-full object-cover",
|
|
147
|
-
...
|
|
141
|
+
...a
|
|
148
142
|
}
|
|
149
143
|
) });
|
|
150
|
-
},
|
|
151
|
-
return /* @__PURE__ */
|
|
144
|
+
}, _ = E ?? F;
|
|
145
|
+
return /* @__PURE__ */ C(
|
|
152
146
|
"div",
|
|
153
147
|
{
|
|
154
|
-
ref:
|
|
155
|
-
id:
|
|
156
|
-
tabIndex:
|
|
157
|
-
role:
|
|
158
|
-
"aria-disabled":
|
|
159
|
-
onClick:
|
|
160
|
-
onKeyDown:
|
|
161
|
-
className:
|
|
148
|
+
ref: T,
|
|
149
|
+
id: q,
|
|
150
|
+
tabIndex: c && !s ? 0 : -1,
|
|
151
|
+
role: c ? i ? "link" : "button" : void 0,
|
|
152
|
+
"aria-disabled": s,
|
|
153
|
+
onClick: w,
|
|
154
|
+
onKeyDown: g,
|
|
155
|
+
className: p(
|
|
162
156
|
"relative flex flex-col transition-colors duration-200 text-left",
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
157
|
+
P,
|
|
158
|
+
Y,
|
|
159
|
+
c && !s && "cursor-pointer hover:shadow-lg hover:border-primary/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 select-none",
|
|
160
|
+
c && !s && Q && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]",
|
|
161
|
+
s && "opacity-50 pointer-events-none select-none",
|
|
162
|
+
V
|
|
169
163
|
),
|
|
170
|
-
style:
|
|
171
|
-
...
|
|
164
|
+
style: H,
|
|
165
|
+
...O,
|
|
172
166
|
children: [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */
|
|
167
|
+
R("top"),
|
|
168
|
+
tt(),
|
|
169
|
+
/* @__PURE__ */ C(
|
|
176
170
|
"div",
|
|
177
171
|
{
|
|
178
|
-
className:
|
|
172
|
+
className: p(
|
|
179
173
|
"flex flex-col flex-1 z-10 w-full min-w-0",
|
|
180
|
-
|
|
181
|
-
|
|
174
|
+
W,
|
|
175
|
+
S
|
|
182
176
|
),
|
|
183
177
|
children: [
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
178
|
+
(I || h || x) && /* @__PURE__ */ C("div", { className: p("flex flex-col z-10", X), children: [
|
|
179
|
+
I,
|
|
180
|
+
h && /* @__PURE__ */ d("h3", { className: "font-semibold leading-tight tracking-tight text-foreground text-lg md:text-xl", children: h }),
|
|
181
|
+
x && /* @__PURE__ */ d("p", { className: "text-sm text-muted-foreground leading-relaxed", children: x })
|
|
188
182
|
] }),
|
|
189
|
-
|
|
190
|
-
|
|
183
|
+
_ && /* @__PURE__ */ d("div", { className: "flex-1 z-10 text-sm leading-relaxed", children: _ }),
|
|
184
|
+
N && /* @__PURE__ */ d(
|
|
191
185
|
"div",
|
|
192
186
|
{
|
|
193
|
-
className:
|
|
187
|
+
className: p(
|
|
194
188
|
"flex items-center justify-between z-10 mt-auto pt-2",
|
|
195
|
-
|
|
189
|
+
S
|
|
196
190
|
),
|
|
197
|
-
children:
|
|
191
|
+
children: N
|
|
198
192
|
}
|
|
199
193
|
)
|
|
200
194
|
]
|
|
201
195
|
}
|
|
202
196
|
),
|
|
203
|
-
|
|
197
|
+
R("bottom")
|
|
204
198
|
]
|
|
205
199
|
}
|
|
206
200
|
);
|
|
207
201
|
}
|
|
208
202
|
);
|
|
209
|
-
|
|
203
|
+
ft.displayName = "Card";
|
|
210
204
|
export {
|
|
211
|
-
|
|
205
|
+
ft as Card
|
|
212
206
|
};
|
|
@@ -20,6 +20,47 @@ export type CardImagePosition = "top" | "bottom" | "background";
|
|
|
20
20
|
* Controls when the browser loads the image resource.
|
|
21
21
|
*/
|
|
22
22
|
export type CardImageLoading = "lazy" | "eager";
|
|
23
|
+
/**
|
|
24
|
+
* Configuration options for the card image.
|
|
25
|
+
* Controls the placement, aspect ratio, fit, and loading behavior
|
|
26
|
+
* of images displayed within the card.
|
|
27
|
+
*/
|
|
28
|
+
export interface CardImageConfig {
|
|
29
|
+
/**
|
|
30
|
+
* Placement of the card image.
|
|
31
|
+
* Determines where the image appears relative to the content.
|
|
32
|
+
*
|
|
33
|
+
* @default "top"
|
|
34
|
+
*/
|
|
35
|
+
position?: CardImagePosition;
|
|
36
|
+
/**
|
|
37
|
+
* Aspect ratio of the positioned image.
|
|
38
|
+
* Controls the proportional dimensions of the image container.
|
|
39
|
+
* Common values: "video" (16:9), "square" (1:1), "portrait" (3:4).
|
|
40
|
+
*
|
|
41
|
+
* @default "video"
|
|
42
|
+
*/
|
|
43
|
+
ratio?: ImageRatioKey;
|
|
44
|
+
/**
|
|
45
|
+
* Object-fit strategy of the positioned image.
|
|
46
|
+
* Controls how the image fills its container.
|
|
47
|
+
*
|
|
48
|
+
* - `cover`: Scales the image to cover the container, cropping if necessary.
|
|
49
|
+
* - `contain`: Scales the image to fit within the container.
|
|
50
|
+
* - `fill`: Stretches the image to fill the container.
|
|
51
|
+
*
|
|
52
|
+
* @default "cover"
|
|
53
|
+
*/
|
|
54
|
+
fit?: ImageFit;
|
|
55
|
+
/**
|
|
56
|
+
* Native loading strategy of the positioned image.
|
|
57
|
+
* `lazy` defers loading until the image is near the viewport.
|
|
58
|
+
* `eager` loads the image immediately.
|
|
59
|
+
*
|
|
60
|
+
* @default "lazy"
|
|
61
|
+
*/
|
|
62
|
+
loading?: CardImageLoading;
|
|
63
|
+
}
|
|
23
64
|
/**
|
|
24
65
|
* Theme configuration options for the Card component.
|
|
25
66
|
*
|
|
@@ -31,12 +72,18 @@ export interface CardConfig {
|
|
|
31
72
|
* Visual style variant.
|
|
32
73
|
* Controls the card's background, border, and shadow treatment.
|
|
33
74
|
*
|
|
75
|
+
* - `elevated`: Card with box shadow elevation.
|
|
76
|
+
* - `bordered`: Card with a subtle outline border.
|
|
77
|
+
* - `flat`: Card with a solid neutral background.
|
|
78
|
+
* - `ghost`: Transparent card background without a border.
|
|
79
|
+
*
|
|
34
80
|
* @default "bordered"
|
|
35
81
|
*/
|
|
36
82
|
variant?: CardVariant;
|
|
37
83
|
/**
|
|
38
84
|
* Content padding and spacing scale.
|
|
39
85
|
* Controls the density of the card's internal spacing.
|
|
86
|
+
* Larger values provide more padding and gap between elements.
|
|
40
87
|
*
|
|
41
88
|
* @default "md"
|
|
42
89
|
*/
|
|
@@ -48,46 +95,27 @@ export interface CardConfig {
|
|
|
48
95
|
* @default "md"
|
|
49
96
|
*/
|
|
50
97
|
radius?: Radius;
|
|
51
|
-
/**
|
|
52
|
-
* Placement of the card image.
|
|
53
|
-
* Determines where the image appears relative to the content.
|
|
54
|
-
*
|
|
55
|
-
* @default "top"
|
|
56
|
-
*/
|
|
57
|
-
imagePosition?: CardImagePosition;
|
|
58
|
-
/**
|
|
59
|
-
* Aspect ratio of the positioned image.
|
|
60
|
-
* Controls the proportional dimensions of the image container.
|
|
61
|
-
*
|
|
62
|
-
* @default "video"
|
|
63
|
-
*/
|
|
64
|
-
imageRatio?: ImageRatioKey;
|
|
65
|
-
/**
|
|
66
|
-
* Object-fit strategy of the positioned image.
|
|
67
|
-
* Controls how the image fills its container.
|
|
68
|
-
*
|
|
69
|
-
* @default "cover"
|
|
70
|
-
*/
|
|
71
|
-
imageFit?: ImageFit;
|
|
72
|
-
/**
|
|
73
|
-
* Native loading strategy of the positioned image.
|
|
74
|
-
*
|
|
75
|
-
* @default "lazy"
|
|
76
|
-
*/
|
|
77
|
-
imageLoading?: CardImageLoading;
|
|
78
98
|
/**
|
|
79
99
|
* Enables the press animation when clickable.
|
|
80
|
-
* When true, the card scales down slightly on click.
|
|
100
|
+
* When true, the card scales down slightly on click for tactile feedback.
|
|
81
101
|
*
|
|
82
102
|
* @default true
|
|
83
103
|
*/
|
|
84
104
|
animate?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Image configuration for the card.
|
|
107
|
+
* Controls the placement, aspect ratio, fit, and loading behavior
|
|
108
|
+
* of the card's image.
|
|
109
|
+
*/
|
|
110
|
+
image: CardImageConfig;
|
|
85
111
|
}
|
|
86
112
|
/**
|
|
87
113
|
* Default config values registered for the Card component.
|
|
88
114
|
*
|
|
89
115
|
* `variant` and `radius` are intentionally absent so they inherit from
|
|
90
|
-
* the global `defaultVariant` / `defaultRadius`.
|
|
116
|
+
* the global `defaultVariant` / `defaultRadius`. This allows the card
|
|
117
|
+
* to adapt to the global theme settings while providing sensible defaults
|
|
118
|
+
* for other properties.
|
|
91
119
|
*/
|
|
92
120
|
export declare const defaultCardConfig: CardConfig;
|
|
93
121
|
declare module "../../libs/registry" {
|
|
@@ -99,15 +127,20 @@ declare module "../../libs/registry" {
|
|
|
99
127
|
* Hard fallback values used when no config tier provides a value.
|
|
100
128
|
* These values are used when instance props, component config,
|
|
101
129
|
* and global defaults are all undefined.
|
|
130
|
+
*
|
|
131
|
+
* These provide the absolute minimum defaults to ensure the card
|
|
132
|
+
* renders correctly even when no configuration is available.
|
|
102
133
|
*/
|
|
103
134
|
export declare const FALLBACK_CARD_CONFIG: {
|
|
104
135
|
readonly size: "md";
|
|
105
136
|
readonly variant: "bordered";
|
|
106
137
|
readonly radius: "md";
|
|
107
|
-
readonly
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
138
|
+
readonly image: {
|
|
139
|
+
readonly position: "top";
|
|
140
|
+
readonly ratio: "video";
|
|
141
|
+
readonly fit: "cover";
|
|
142
|
+
readonly loading: "lazy";
|
|
143
|
+
};
|
|
111
144
|
readonly animate: true;
|
|
112
145
|
};
|
|
113
146
|
//# sourceMappingURL=card-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-config.d.ts","sourceRoot":"","sources":["../../../src/components/card/card-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"card-config.d.ts","sourceRoot":"","sources":["../../../src/components/card/card-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAE7B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,KAAK,EAAE,eAAe,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAI/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAWvB,CAAC"}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import { registerComponentDefaults as i } from "../../libs/registry.js";
|
|
3
3
|
const e = {
|
|
4
4
|
size: "md",
|
|
5
|
-
|
|
6
|
-
imageRatio: "video",
|
|
7
|
-
imageFit: "cover",
|
|
5
|
+
image: { position: "top", ratio: "video", fit: "cover" },
|
|
8
6
|
animate: !0
|
|
9
7
|
};
|
|
10
8
|
i("card", e);
|
|
11
|
-
const
|
|
9
|
+
const t = {
|
|
12
10
|
size: "md",
|
|
13
11
|
variant: "bordered",
|
|
14
12
|
radius: "md",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
image: {
|
|
14
|
+
position: "top",
|
|
15
|
+
ratio: "video",
|
|
16
|
+
fit: "cover",
|
|
17
|
+
loading: "lazy"
|
|
18
|
+
},
|
|
19
19
|
animate: !0
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
t as FALLBACK_CARD_CONFIG,
|
|
23
23
|
e as defaultCardConfig
|
|
24
24
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Color } from '../../shared';
|
|
2
|
+
import { FieldSizeKey } from '../field/field-config';
|
|
3
|
+
import { PickerMode } from './date-picker-config';
|
|
4
|
+
interface CalendarProps {
|
|
5
|
+
/**
|
|
6
|
+
* The currently selected date.
|
|
7
|
+
* Used to highlight the selected day and initialize time values.
|
|
8
|
+
*/
|
|
9
|
+
selected: Date | null | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Selection mode of the picker.
|
|
12
|
+
* Controls whether the calendar, time spinners, or both are shown.
|
|
13
|
+
*/
|
|
14
|
+
mode: PickerMode;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a clear button is shown in the footer.
|
|
17
|
+
*/
|
|
18
|
+
isClearable: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Resolved size key for the calendar cells.
|
|
21
|
+
* Controls the size of day buttons in the grid.
|
|
22
|
+
*/
|
|
23
|
+
resolvedSizeKey: FieldSizeKey;
|
|
24
|
+
/**
|
|
25
|
+
* Resolved color for the calendar.
|
|
26
|
+
* Used for accent colors and hover states.
|
|
27
|
+
*/
|
|
28
|
+
resolvedColor: Color;
|
|
29
|
+
/**
|
|
30
|
+
* CSS class for corner rounding.
|
|
31
|
+
* Applied to the calendar container.
|
|
32
|
+
*/
|
|
33
|
+
radiusClass: string;
|
|
34
|
+
/**
|
|
35
|
+
* Callback fired when a date is selected.
|
|
36
|
+
* Receives the selected date or null.
|
|
37
|
+
*/
|
|
38
|
+
onSelect: (date: Date | null) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Callback fired when the calendar should close.
|
|
41
|
+
* Called after date selection or when "Done" is clicked.
|
|
42
|
+
*/
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Whether future dates are disabled.
|
|
46
|
+
* Prevents selection of dates after today.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
disableFuture?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Calendar popover component with month navigation and date selection.
|
|
54
|
+
*/
|
|
55
|
+
export declare function Calendar({ selected, mode, isClearable, resolvedSizeKey, resolvedColor, radiusClass, onSelect, onClose, disableFuture, }: CalendarProps): import("react").JSX.Element;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -0,0 +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;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,eAAe,EACf,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACP,aAAqB,GACtB,EAAE,aAAa,+BAgQf"}
|