@clasing/ui 2.9.0 → 2.9.1

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.
@@ -1,23 +1,23 @@
1
1
  import { j as n, c as e } from "../index-C_XDkVGm.js";
2
2
  import * as i from "react";
3
- import { getDefaultClassNames as p, DayPicker as x } from "react-day-picker";
4
- import { b as m, B as h } from "../button-DSpGxL2e.js";
3
+ import { getDefaultClassNames as m, DayPicker as x } from "react-day-picker";
4
+ import { b as f, B as h } from "../button-DSpGxL2e.js";
5
5
  import { CaretLeftIcon as w, CaretRightIcon as _, CaretDownIcon as y } from "@phosphor-icons/react";
6
6
  function C({
7
7
  className: c,
8
8
  classNames: g,
9
- showOutsideDays: a = !0,
9
+ showOutsideDays: r = !0,
10
10
  captionLayout: s = "label",
11
11
  buttonVariant: l = "ghost",
12
12
  formatters: u,
13
- components: f,
14
- ...b
13
+ components: b,
14
+ ...p
15
15
  }) {
16
- const t = p();
16
+ const t = m();
17
17
  return /* @__PURE__ */ n.jsx(
18
18
  x,
19
19
  {
20
- showOutsideDays: a,
20
+ showOutsideDays: r,
21
21
  className: e(
22
22
  `
23
23
  group/calendar bg-background p-3 [--cell-size:--spacing(8)]
@@ -30,7 +30,7 @@ function C({
30
30
  ),
31
31
  captionLayout: s,
32
32
  formatters: {
33
- formatMonthDropdown: (r) => r.toLocaleString("default", { month: "short" }),
33
+ formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
34
34
  ...u
35
35
  },
36
36
  classNames: {
@@ -51,7 +51,7 @@ function C({
51
51
  t.nav
52
52
  ),
53
53
  button_previous: e(
54
- m({ size: "sm", variant: l }),
54
+ f({ size: "sm", variant: l }),
55
55
  `
56
56
  size-(--cell-size) p-0 select-none
57
57
  aria-disabled:opacity-50
@@ -59,7 +59,7 @@ function C({
59
59
  t.button_previous
60
60
  ),
61
61
  button_next: e(
62
- m({ size: "sm", variant: l }),
62
+ f({ size: "sm", variant: l }),
63
63
  `
64
64
  size-(--cell-size) p-0 select-none
65
65
  aria-disabled:opacity-50
@@ -155,7 +155,7 @@ function C({
155
155
  },
156
156
  components: {
157
157
  Root: ({
158
- className: r,
158
+ className: a,
159
159
  rootRef: d,
160
160
  ...o
161
161
  }) => /* @__PURE__ */ n.jsx(
@@ -163,73 +163,77 @@ function C({
163
163
  {
164
164
  "data-slot": "calendar",
165
165
  ref: d,
166
- className: e(r),
166
+ className: e(a),
167
167
  ...o
168
168
  }
169
169
  ),
170
- Chevron: ({ className: r, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n.jsx(w, { className: e(r), ...o }) : d === "right" ? /* @__PURE__ */ n.jsx(_, { className: e(r), ...o }) : /* @__PURE__ */ n.jsx(y, { ...o }),
170
+ Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n.jsx(w, { className: e(a), ...o }) : d === "right" ? /* @__PURE__ */ n.jsx(_, { className: e(a), ...o }) : /* @__PURE__ */ n.jsx(y, { ...o }),
171
171
  DayButton: v,
172
- WeekNumber: ({ children: r, ...d }) => /* @__PURE__ */ n.jsx("td", { ...d, children: /* @__PURE__ */ n.jsx(
172
+ WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n.jsx("td", { ...d, children: /* @__PURE__ */ n.jsx(
173
173
  "div",
174
174
  {
175
175
  className: `\r
176
176
  flex size-(--cell-size) items-center justify-center\r
177
177
  text-center\r
178
178
  `,
179
- children: r
179
+ children: a
180
180
  }
181
181
  ) }),
182
- ...f
182
+ ...b
183
183
  },
184
- ...b
184
+ ...p
185
185
  }
186
186
  );
187
187
  }
188
188
  function v({
189
189
  className: c,
190
190
  day: g,
191
- modifiers: a,
191
+ modifiers: r,
192
192
  ...s
193
193
  }) {
194
- const l = p(), u = i.useRef(null);
194
+ const l = m(), u = i.useRef(null);
195
195
  return i.useEffect(() => {
196
- a.focused && u.current?.focus();
197
- }, [a.focused]), /* @__PURE__ */ n.jsx(
196
+ r.focused && u.current?.focus();
197
+ }, [r.focused]), /* @__PURE__ */ n.jsx(
198
198
  h,
199
199
  {
200
200
  ref: u,
201
201
  variant: "ghost",
202
202
  size: "xs",
203
203
  "data-day": g.date.toLocaleDateString(),
204
- "data-selected-single": a.selected && !a.range_start && !a.range_end && !a.range_middle,
205
- "data-range-start": a.range_start,
206
- "data-range-end": a.range_end,
207
- "data-range-middle": a.range_middle,
204
+ "data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
205
+ "data-range-start": r.range_start,
206
+ "data-range-end": r.range_end,
207
+ "data-range-middle": r.range_middle,
208
208
  className: e(
209
209
  `
210
210
  flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1
211
- rounded-md bg-transparent p-1 leading-none font-regular
211
+ p-1 leading-none font-regular
212
212
  group-data-[focused=true]/day:relative
213
213
  group-data-[focused=true]/day:z-10
214
214
  group-data-[focused=true]/day:border-ring
215
215
  group-data-[focused=true]/day:ring-[3px]
216
216
  group-data-[focused=true]/day:ring-ring/50
217
- data-[range-end=true]:rounded-md data-[range-end=true]:rounded-l-none
218
- data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-blue-500
217
+ before:rounded-md before:bg-transparent
219
218
  data-[range-end=true]:text-white
220
- data-[range-end=true]:hover:bg-blue-500/80
221
- data-[range-middle=true]:rounded-none
222
- data-[range-middle=true]:bg-blue-500/10
219
+ data-[range-end=true]:before:rounded-md
220
+ data-[range-end=true]:before:rounded-l-none
221
+ data-[range-end=true]:before:rounded-r-md
222
+ data-[range-end=true]:before:bg-blue-500
223
+ data-[range-end=true]:hover:before:bg-blue-500/80
223
224
  data-[range-middle=true]:text-blue-800
224
- data-[range-start=true]:rounded-md
225
- data-[range-start=true]:rounded-l-md
226
- data-[range-start=true]:rounded-r-none
227
- data-[range-start=true]:bg-blue-500 data-[range-start=true]:text-white
228
- data-[range-start=true]:hover:bg-blue-500/80
229
- data-[selected-single=true]:bg-blue-500
225
+ data-[range-middle=true]:before:rounded-none
226
+ data-[range-middle=true]:before:bg-blue-500/10
227
+ data-[range-start=true]:text-white
228
+ data-[range-start=true]:before:rounded-md
229
+ data-[range-start=true]:before:rounded-l-md
230
+ data-[range-start=true]:before:rounded-r-none
231
+ data-[range-start=true]:before:bg-blue-500
232
+ data-[range-start=true]:hover:before:bg-blue-500/80
230
233
  data-[selected-single=true]:text-white
231
- data-[selected-single=true]:hover:bg-blue-500/80
234
+ data-[selected-single=true]:before:bg-blue-500
232
235
  data-[selected-single=true]:hover:text-white
236
+ data-[selected-single=true]:hover:before:bg-blue-500/80
233
237
  dark:hover:text-accent-foreground
234
238
  dark:data-[range-middle=true]:text-blue-050
235
239
  [&>span]:paragraph-xs [&>span]:opacity-70
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clasing/ui",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"