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.
Files changed (114) hide show
  1. package/dist/components/autocomplete/Autocomplete.d.ts +34 -17
  2. package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
  3. package/dist/components/autocomplete/Autocomplete.js +90 -106
  4. package/dist/components/autocomplete/autocomplete-config.d.ts +2 -20
  5. package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
  6. package/dist/components/autocomplete/autocomplete-config.js +9 -13
  7. package/dist/components/button/Button.d.ts +31 -5
  8. package/dist/components/button/Button.d.ts.map +1 -1
  9. package/dist/components/button/Button.js +68 -64
  10. package/dist/components/card/Card.d.ts +58 -54
  11. package/dist/components/card/Card.d.ts.map +1 -1
  12. package/dist/components/card/Card.js +152 -158
  13. package/dist/components/card/card-config.d.ts +66 -33
  14. package/dist/components/card/card-config.d.ts.map +1 -1
  15. package/dist/components/card/card-config.js +9 -9
  16. package/dist/components/date-picker/Calendar.d.ts +57 -0
  17. package/dist/components/date-picker/Calendar.d.ts.map +1 -0
  18. package/dist/components/date-picker/Calendar.js +224 -0
  19. package/dist/components/date-picker/DatePicker.d.ts +68 -155
  20. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  21. package/dist/components/date-picker/DatePicker.js +194 -466
  22. package/dist/components/date-picker/TimeSpinner.d.ts +46 -0
  23. package/dist/components/date-picker/TimeSpinner.d.ts.map +1 -0
  24. package/dist/components/date-picker/TimeSpinner.js +84 -0
  25. package/dist/components/date-picker/date-picker-config.d.ts +21 -1
  26. package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
  27. package/dist/components/date-picker/date-picker-config.js +10 -14
  28. package/dist/components/date-picker/date-picker-styles.d.ts.map +1 -1
  29. package/dist/components/date-picker/date-picker-styles.js +4 -11
  30. package/dist/components/date-picker/date-picker.helpers.d.ts +111 -0
  31. package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -0
  32. package/dist/components/date-picker/date-picker.helpers.js +110 -0
  33. package/dist/components/date-picker/index.js +3 -0
  34. package/dist/components/input/Input.d.ts +13 -7
  35. package/dist/components/input/Input.d.ts.map +1 -1
  36. package/dist/components/input/Input.js +96 -91
  37. package/dist/components/keyboard/KeyboardContext.d.ts +130 -0
  38. package/dist/components/keyboard/KeyboardContext.d.ts.map +1 -0
  39. package/dist/components/keyboard/KeyboardContext.js +13 -0
  40. package/dist/components/keyboard/KeyboardProvider.d.ts +78 -0
  41. package/dist/components/keyboard/KeyboardProvider.d.ts.map +1 -0
  42. package/dist/components/keyboard/KeyboardProvider.js +183 -0
  43. package/dist/components/keyboard/OnScreenKeyboard.d.ts +65 -43
  44. package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
  45. package/dist/components/keyboard/OnScreenKeyboard.js +119 -113
  46. package/dist/components/keyboard/index.d.ts +2 -1
  47. package/dist/components/keyboard/index.d.ts.map +1 -1
  48. package/dist/components/keyboard/index.js +2 -1
  49. package/dist/components/keyboard/keyboard-config.d.ts +40 -36
  50. package/dist/components/keyboard/keyboard-config.d.ts.map +1 -1
  51. package/dist/components/keyboard/keyboard-config.js +15 -10
  52. package/dist/components/keyboard/use-keyboard-field.d.ts +6 -4
  53. package/dist/components/keyboard/use-keyboard-field.d.ts.map +1 -1
  54. package/dist/components/keyboard/use-keyboard-field.js +12 -12
  55. package/dist/components/modal/Modal.d.ts.map +1 -1
  56. package/dist/components/modal/Modal.js +59 -65
  57. package/dist/components/multi-select/MultiSelect.d.ts +75 -40
  58. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  59. package/dist/components/multi-select/MultiSelect.js +188 -188
  60. package/dist/components/multi-select/multi-select-config.d.ts +2 -20
  61. package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
  62. package/dist/components/multi-select/multi-select-config.js +10 -14
  63. package/dist/components/select/Select.d.ts +60 -45
  64. package/dist/components/select/Select.d.ts.map +1 -1
  65. package/dist/components/select/Select.js +149 -161
  66. package/dist/components/select/select-config.d.ts +3 -29
  67. package/dist/components/select/select-config.d.ts.map +1 -1
  68. package/dist/components/select/select-config.js +6 -14
  69. package/dist/components/select/select-styles.js +1 -6
  70. package/dist/components/select-menu/SelectMenu.d.ts +48 -42
  71. package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
  72. package/dist/components/select-menu/SelectMenu.js +137 -123
  73. package/dist/components/select-menu/select-menu-config.d.ts +33 -2
  74. package/dist/components/select-menu/select-menu-config.d.ts.map +1 -1
  75. package/dist/components/select-menu/select-menu-config.js +3 -1
  76. package/dist/components/sidebar/Sidebar.js +1 -1
  77. package/dist/components/switch/Switch.d.ts +9 -33
  78. package/dist/components/switch/Switch.d.ts.map +1 -1
  79. package/dist/components/switch/Switch.js +68 -74
  80. package/dist/components/switch/switch-styles.d.ts +1 -6
  81. package/dist/components/switch/switch-styles.d.ts.map +1 -1
  82. package/dist/components/switch/switch-styles.js +6 -12
  83. package/dist/components/tabs/Tabs.js +1 -1
  84. package/dist/components/textarea/Textarea.d.ts +19 -1
  85. package/dist/components/textarea/Textarea.d.ts.map +1 -1
  86. package/dist/components/textarea/Textarea.js +95 -90
  87. package/dist/components/toast/ToastContext.d.ts +122 -0
  88. package/dist/components/toast/ToastContext.d.ts.map +1 -0
  89. package/dist/components/toast/ToastContext.js +28 -0
  90. package/dist/components/toast/ToastProvider.d.ts +98 -0
  91. package/dist/components/toast/ToastProvider.d.ts.map +1 -0
  92. package/dist/components/toast/ToastProvider.js +188 -0
  93. package/dist/components/toast/index.d.ts +2 -1
  94. package/dist/components/toast/index.d.ts.map +1 -1
  95. package/dist/components/toast/index.js +2 -1
  96. package/dist/components/toast/toast-config.d.ts +36 -0
  97. package/dist/components/toast/toast-config.d.ts.map +1 -1
  98. package/dist/icons/ChevronUpIcon.d.ts +3 -0
  99. package/dist/icons/ChevronUpIcon.d.ts.map +1 -0
  100. package/dist/icons/ChevronUpIcon.js +21 -0
  101. package/dist/icons/index.d.ts +2 -0
  102. package/dist/icons/index.d.ts.map +1 -1
  103. package/dist/index.css +24 -2
  104. package/dist/index.d.ts +1 -0
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +62 -59
  107. package/dist/theme/color.js +2 -2
  108. package/package.json +1 -1
  109. package/dist/components/keyboard/keyboard-context.d.ts +0 -118
  110. package/dist/components/keyboard/keyboard-context.d.ts.map +0 -1
  111. package/dist/components/keyboard/keyboard-context.js +0 -90
  112. package/dist/components/toast/toast-context.d.ts +0 -163
  113. package/dist/components/toast/toast-context.d.ts.map +0 -1
  114. package/dist/components/toast/toast-context.js +0 -177
@@ -1,212 +1,206 @@
1
1
  "use client";
2
- import { jsxs as I, jsx as s } from "react/jsx-runtime";
3
- import { forwardRef as ie, useId as de } from "react";
4
- import { useAsheeConfig as ce } from "../../libs/context.js";
5
- import { resolveCascade as v, resolveRadiusKey as ue, resolveAnimate as fe, resolveClassKey as y } from "../../utils/resolve-token.js";
6
- import { Image as me } from "../image/Image.js";
7
- import { FALLBACK_CARD_CONFIG as a } from "./card-config.js";
8
- import { CARD_PADDING_CLASS as ve, CARD_GAP_CLASS as ye, CARD_HEADER_GAP_CLASS as he, CARD_VARIANT_CLASS as G } from "./card-styles.js";
9
- import { RADIUS_CLASS as xe } from "../../shared/radius.js";
10
- import { cn as h } from "../../utils/cn.js";
11
- const ge = ie(
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: j,
14
- size: K,
15
- radius: B,
16
- animate: D,
17
- isClickable: E,
18
- isDisabled: o = !1,
19
- href: d,
20
- title: x,
21
- description: g,
22
- header: N,
23
- body: V,
24
- footer: b,
25
- imageSrc: c,
26
- imageAlt: w = "",
27
- imagePosition: F,
28
- imageRatio: $,
29
- imageFit: H,
30
- imageLoading: O = "lazy",
31
- imageComponent: u,
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
- ...M
40
- }, Q) => {
41
- var k;
42
- const z = ce(), e = (k = z.components) == null ? void 0 : k.card, W = de(), X = q ?? W, p = v(
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
- e == null ? void 0 : e.variant,
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
- a.variant
52
- ), Z = ue(
53
- B,
54
- e == null ? void 0 : e.radius,
45
+ e.variant
46
+ ), M = st(
47
+ K,
48
+ r == null ? void 0 : r.radius,
55
49
  z.defaultRadius,
56
- a.radius
57
- ), C = v(
58
- F,
59
- e == null ? void 0 : e.imagePosition,
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
- a.imagePosition
62
- ), i = E ?? !!(d || f), P = fe(
63
- D,
64
- e == null ? void 0 : e.animate,
65
- a.animate
66
- ), ee = y(
67
- p,
68
- ve,
69
- a.size
70
- ), L = y(
71
- p,
72
- ye,
73
- a.size
74
- ), re = y(
75
- p,
76
- he,
77
- a.size
78
- ), te = y(
79
- Z,
80
- xe,
81
- a.radius
82
- ), ae = v(
83
- O,
84
- e == null ? void 0 : e.imageLoading,
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
- a.imageLoading
87
- ), oe = G[Y] ?? G.bordered, R = (t) => {
88
- if (o) {
89
- t.preventDefault();
80
+ e.image.loading
81
+ ), P = k[J] ?? k.bordered, w = (n) => {
82
+ if (s) {
83
+ n.preventDefault();
90
84
  return;
91
85
  }
92
- f == null || f(t), d && !t.defaultPrevented && (window.location.href = d);
93
- }, ne = (t) => {
94
- A == null || A(t), i && !o && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), R(t));
95
- }, _ = (t) => {
96
- if (!c || C !== t) return null;
97
- const l = {
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
- }[t];
102
- let n = { ...r ?? {} };
103
- if (u) {
104
- const m = (r == null ? void 0 : r.loading) === "lazy", le = (r == null ? void 0 : r.priority) === !0;
105
- (m || le) && console.warn(
106
- `[Card] ${m ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
107
- ), n = {
108
- ...n,
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
- ...n.priority !== void 0 && { priority: !1 }
105
+ ...l.priority !== void 0 && { priority: !1 }
112
106
  };
113
107
  }
114
- return /* @__PURE__ */ s(
115
- me,
108
+ return /* @__PURE__ */ d(
109
+ dt,
116
110
  {
117
- src: c,
118
- alt: w,
119
- ratio: $ ?? "video",
120
- fit: H ?? "cover",
121
- className: l,
122
- imageComponent: u,
123
- imageProps: n,
124
- loading: ae
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
- }, se = () => {
128
- if (!c || C !== "background") return null;
129
- const t = u || "img";
130
- let l = { ...r ?? {} };
131
- if (u) {
132
- const n = (r == null ? void 0 : r.loading) === "lazy", m = (r == null ? void 0 : r.priority) === !0;
133
- (n || m) && console.warn(
134
- `[Card] ${n ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
135
- ), l = {
136
- ...l,
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
- ...l.priority !== void 0 && { priority: !1 }
132
+ ...a.priority !== void 0 && { priority: !1 }
139
133
  };
140
134
  }
141
- return /* @__PURE__ */ s("div", { className: "absolute inset-0 z-0 pointer-events-none", children: /* @__PURE__ */ s(
142
- t,
135
+ return /* @__PURE__ */ d("div", { className: "absolute inset-0 z-0 pointer-events-none", children: /* @__PURE__ */ d(
136
+ n,
143
137
  {
144
- src: c,
145
- alt: w,
138
+ src: t.src,
139
+ alt: t == null ? void 0 : t.alt,
146
140
  className: "h-full w-full object-cover",
147
- ...l
141
+ ...a
148
142
  }
149
143
  ) });
150
- }, S = V ?? U;
151
- return /* @__PURE__ */ I(
144
+ }, _ = E ?? F;
145
+ return /* @__PURE__ */ C(
152
146
  "div",
153
147
  {
154
- ref: Q,
155
- id: X,
156
- tabIndex: i && !o ? 0 : -1,
157
- role: i ? d ? "link" : "button" : void 0,
158
- "aria-disabled": o,
159
- onClick: R,
160
- onKeyDown: ne,
161
- className: h(
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
- oe,
164
- te,
165
- i && !o && "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",
166
- i && !o && P && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]",
167
- o && "opacity-50 pointer-events-none select-none",
168
- T
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: J,
171
- ...M,
164
+ style: H,
165
+ ...O,
172
166
  children: [
173
- _("top"),
174
- se(),
175
- /* @__PURE__ */ I(
167
+ R("top"),
168
+ tt(),
169
+ /* @__PURE__ */ C(
176
170
  "div",
177
171
  {
178
- className: h(
172
+ className: p(
179
173
  "flex flex-col flex-1 z-10 w-full min-w-0",
180
- ee,
181
- L
174
+ W,
175
+ S
182
176
  ),
183
177
  children: [
184
- (N || x || g) && /* @__PURE__ */ I("div", { className: h("flex flex-col z-10", re), children: [
185
- N,
186
- x && /* @__PURE__ */ s("h3", { className: "font-semibold leading-tight tracking-tight text-foreground text-lg md:text-xl", children: x }),
187
- g && /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground leading-relaxed", children: g })
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
- S && /* @__PURE__ */ s("div", { className: "flex-1 z-10 text-sm leading-relaxed", children: S }),
190
- b && /* @__PURE__ */ s(
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: h(
187
+ className: p(
194
188
  "flex items-center justify-between z-10 mt-auto pt-2",
195
- L
189
+ S
196
190
  ),
197
- children: b
191
+ children: N
198
192
  }
199
193
  )
200
194
  ]
201
195
  }
202
196
  ),
203
- _("bottom")
197
+ R("bottom")
204
198
  ]
205
199
  }
206
200
  );
207
201
  }
208
202
  );
209
- ge.displayName = "Card";
203
+ ft.displayName = "Card";
210
204
  export {
211
- ge as Card
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 imagePosition: "top";
108
- readonly imageRatio: "video";
109
- readonly imageFit: "cover";
110
- readonly imageLoading: "lazy";
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;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAM/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;CASvB,CAAC"}
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
- imagePosition: "top",
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 o = {
9
+ const t = {
12
10
  size: "md",
13
11
  variant: "bordered",
14
12
  radius: "md",
15
- imagePosition: "top",
16
- imageRatio: "video",
17
- imageFit: "cover",
18
- imageLoading: "lazy",
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
- o as FALLBACK_CARD_CONFIG,
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"}