fina-react-ds 1.0.7 → 1.0.8

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,6 +1,6 @@
1
1
  var w = Object.defineProperty;
2
- var n = (f, o) => w(f, "name", { value: o, configurable: !0 });
3
- import { jsx as c } from "react/jsx-runtime";
2
+ var f = (d, o) => w(d, "name", { value: o, configurable: !0 });
3
+ import { jsx as a } from "react/jsx-runtime";
4
4
  import * as g from "react";
5
5
  import { ChevronLeftIcon as h, ChevronRightIcon as y, ChevronDownIcon as _ } from "lucide-react";
6
6
  import { getDefaultClassNames as x, DayPicker as v } from "react-day-picker";
@@ -8,9 +8,9 @@ import { cn as e } from "../lib/utils.js";
8
8
  import { buttonVariants as p, Button as z } from "./button.js";
9
9
  import { fr as k } from "../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js";
10
10
  function q({
11
- className: f,
11
+ className: d,
12
12
  classNames: o,
13
- showOutsideDays: r = !0,
13
+ showOutsideDays: c = !0,
14
14
  captionLayout: s = "label",
15
15
  buttonVariant: u = "ghost",
16
16
  formatters: i,
@@ -18,20 +18,20 @@ function q({
18
18
  ...b
19
19
  }) {
20
20
  const t = x();
21
- return /* @__PURE__ */ c(
21
+ return /* @__PURE__ */ a(
22
22
  v,
23
23
  {
24
24
  locale: k,
25
- showOutsideDays: r,
25
+ showOutsideDays: c,
26
26
  className: e(
27
27
  "fc:group/calendar fc:p-3 fc:[--cell-size:--spacing(8)]",
28
28
  String.raw`fc:rtl:**:[.rdp-button\_next>svg]:rotate-180`,
29
29
  String.raw`fc:rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
30
- f
30
+ d
31
31
  ),
32
32
  captionLayout: s,
33
33
  formatters: {
34
- formatMonthDropdown: /* @__PURE__ */ n((a) => a.toLocaleString("default", { month: "short" }), "formatMonthDropdown"),
34
+ formatMonthDropdown: /* @__PURE__ */ f((r) => r.toLocaleString("default", { month: "short" }), "formatMonthDropdown"),
35
35
  ...i
36
36
  },
37
37
  classNames: {
@@ -131,54 +131,54 @@ function q({
131
131
  ...o
132
132
  },
133
133
  components: {
134
- Root: /* @__PURE__ */ n(({ className: a, rootRef: d, ...l }) => /* @__PURE__ */ c(
134
+ Root: /* @__PURE__ */ f(({ className: r, rootRef: n, ...l }) => /* @__PURE__ */ a(
135
135
  "div",
136
136
  {
137
137
  "data-slot": "calendar",
138
- ref: d,
139
- className: e(a),
138
+ ref: n,
139
+ className: e(r),
140
140
  ...l
141
141
  }
142
142
  ), "Root"),
143
- Chevron: /* @__PURE__ */ n(({ className: a, orientation: d, ...l }) => d === "left" ? /* @__PURE__ */ c(
143
+ Chevron: /* @__PURE__ */ f(({ className: r, orientation: n, ...l }) => n === "left" ? /* @__PURE__ */ a(
144
144
  h,
145
145
  {
146
- className: e("fc:size-4", a),
146
+ className: e("fc:size-4", r),
147
147
  ...l
148
148
  }
149
- ) : d === "right" ? /* @__PURE__ */ c(
149
+ ) : n === "right" ? /* @__PURE__ */ a(
150
150
  y,
151
151
  {
152
- className: e("fc:size-4", a),
152
+ className: e("fc:size-4", r),
153
153
  ...l
154
154
  }
155
- ) : /* @__PURE__ */ c(
155
+ ) : /* @__PURE__ */ a(
156
156
  _,
157
157
  {
158
- className: e("fc:size-4", a),
158
+ className: e("fc:size-4", r),
159
159
  ...l
160
160
  }
161
161
  ), "Chevron"),
162
162
  DayButton: N,
163
- WeekNumber: /* @__PURE__ */ n(({ children: a, ...d }) => /* @__PURE__ */ c("td", { ...d, children: /* @__PURE__ */ c("div", { className: "fc:flex fc:size-(--cell-size) fc:items-center fc:justify-center fc:text-center", children: a }) }), "WeekNumber"),
163
+ WeekNumber: /* @__PURE__ */ f(({ children: r, ...n }) => /* @__PURE__ */ a("td", { ...n, children: /* @__PURE__ */ a("div", { className: "fc:flex fc:size-(--cell-size) fc:items-center fc:justify-center fc:text-center", children: r }) }), "WeekNumber"),
164
164
  ...m
165
165
  },
166
166
  ...b
167
167
  }
168
168
  );
169
169
  }
170
- n(q, "Calendar");
170
+ f(q, "Calendar");
171
171
  function N({
172
- className: f,
172
+ className: d,
173
173
  day: o,
174
- modifiers: r,
174
+ modifiers: c,
175
175
  ...s
176
176
  }) {
177
177
  const u = x(), i = g.useRef(null);
178
178
  return g.useEffect(() => {
179
179
  var m;
180
- r.focused && ((m = i.current) == null || m.focus());
181
- }, [r.focused]), /* @__PURE__ */ c(
180
+ c.focused && ((m = i.current) == null || m.focus());
181
+ }, [c.focused]), /* @__PURE__ */ a(
182
182
  z,
183
183
  {
184
184
  ref: i,
@@ -186,20 +186,20 @@ function N({
186
186
  size: "icon",
187
187
  color: "dark",
188
188
  "data-day": o.date.toLocaleDateString(),
189
- "data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
190
- "data-range-start": r.range_start,
191
- "data-range-end": r.range_end,
192
- "data-range-middle": r.range_middle,
189
+ "data-selected-single": c.selected && !c.range_start && !c.range_end && !c.range_middle,
190
+ "data-range-start": c.range_start,
191
+ "data-range-end": c.range_end,
192
+ "data-range-middle": c.range_middle,
193
193
  className: e(
194
- "fc:data-[selected-single=true]:bg-primary! fc:data-[selected-single=true]:text-primary-foreground! data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
194
+ "fc:data-[selected-single=true]:bg-primary! fc:data-[selected-single=true]:text-primary-foreground! fc:data-[range-middle=true]:bg-accent fc:data-[range-middle=true]:text-accent-foreground fc:data-[range-start=true]:bg-primary fc:data-[range-start=true]:text-primary-foreground fc:data-[range-end=true]:bg-primary fc:data-[range-end=true]:text-primary-foreground fc:group-data-[focused=true]/day:border-ring fc:group-data-[focused=true]/day:ring-ring/50 fc:dark:hover:text-accent-foreground fc:flex fc:aspect-square fc:size-auto fc:w-full fc:min-w-(--cell-size) fc:flex-col fc:gap-1 fc:leading-none fc:font-normal fc:group-data-[focused=true]/day:relative fc:group-data-[focused=true]/day:z-10 fc:group-data-[focused=true]/day:ring-[3px] fc:data-[range-end=true]:rounded-md fc:data-[range-end=true]:rounded-r-md fc:data-[range-middle=true]:rounded-none fc:data-[range-start=true]:rounded-md fc:data-[range-start=true]:rounded-l-md fc:[&>span]:text-xs fc:[&>span]:opacity-70",
195
195
  u.day,
196
- f
196
+ d
197
197
  ),
198
198
  ...s
199
199
  }
200
200
  );
201
201
  }
202
- n(N, "CalendarDayButton");
202
+ f(N, "CalendarDayButton");
203
203
  export {
204
204
  q as Calendar,
205
205
  N as CalendarDayButton
@@ -1,22 +1,22 @@
1
1
  var a = Object.defineProperty;
2
2
  var o = (r, t) => a(r, "name", { value: t, configurable: !0 });
3
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
3
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
4
4
  import { Sun as l, Moon as i } from "lucide-react";
5
5
  import { Button as s } from "./button.js";
6
- import { DropdownMenu as m, DropdownMenuTrigger as f, DropdownMenuContent as d, DropdownMenuItem as c } from "./dropdown-menu.js";
6
+ import { DropdownMenu as m, DropdownMenuTrigger as f, DropdownMenuContent as d, DropdownMenuItem as n } from "./dropdown-menu.js";
7
7
  import { useTheme as h } from "../providers/theme-provider.js";
8
8
  function C() {
9
9
  const { setTheme: r } = h();
10
- return /* @__PURE__ */ n(m, { children: [
11
- /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ n(s, { variant: "outline", color: "dark", size: "icon", children: [
10
+ return /* @__PURE__ */ c(m, { children: [
11
+ /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ c(s, { variant: "ghost", color: "dark", size: "icon", children: [
12
12
  /* @__PURE__ */ e(l, { className: "fc:h-[1.2rem] fc:w-[1.2rem] fc:scale-100 fc:rotate-0 fc:transition-all fc:dark:scale-0 fc:dark:-rotate-90" }),
13
13
  /* @__PURE__ */ e(i, { className: "fc:absolute fc:h-[1.2rem] fc:w-[1.2rem] fc:scale-0 fc:rotate-90 fc:transition-all fc:dark:scale-100 fc:dark:rotate-0" }),
14
14
  /* @__PURE__ */ e("span", { className: "fc:sr-only", children: "Toggle theme" })
15
15
  ] }) }),
16
- /* @__PURE__ */ n(d, { align: "end", children: [
17
- /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("light"), "onClick"), children: "Light" }),
18
- /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("dark"), "onClick"), children: "Dark" }),
19
- /* @__PURE__ */ e(c, { onClick: /* @__PURE__ */ o(() => r("system"), "onClick"), children: "System" })
16
+ /* @__PURE__ */ c(d, { align: "end", children: [
17
+ /* @__PURE__ */ e(n, { onClick: /* @__PURE__ */ o(() => r("light"), "onClick"), children: "Light" }),
18
+ /* @__PURE__ */ e(n, { onClick: /* @__PURE__ */ o(() => r("dark"), "onClick"), children: "Dark" }),
19
+ /* @__PURE__ */ e(n, { onClick: /* @__PURE__ */ o(() => r("system"), "onClick"), children: "System" })
20
20
  ] })
21
21
  ] });
22
22
  }
@@ -364,6 +364,10 @@
364
364
  width: calc(var(--fc-spacing) * 9);
365
365
  height: calc(var(--fc-spacing) * 9);
366
366
  }
367
+ .fc\:size-auto {
368
+ width: auto;
369
+ height: auto;
370
+ }
367
371
  .fc\:size-full {
368
372
  width: 100%;
369
373
  height: 100%;
@@ -467,6 +471,9 @@
467
471
  .fc\:max-w-\[calc\(100\%-2rem\)\] {
468
472
  max-width: calc(100% - 2rem);
469
473
  }
474
+ .fc\:min-w-\(--cell-size\) {
475
+ min-width: var(--cell-size);
476
+ }
470
477
  .fc\:min-w-0 {
471
478
  min-width: calc(var(--fc-spacing) * 0);
472
479
  }
@@ -1318,6 +1325,35 @@
1318
1325
  opacity: 50%;
1319
1326
  }
1320
1327
  }
1328
+ .fc\:group-data-\[focused\=true\]\/day\:relative {
1329
+ &:is(:where(.fc\:group\/day)[data-focused="true"] *) {
1330
+ position: relative;
1331
+ }
1332
+ }
1333
+ .fc\:group-data-\[focused\=true\]\/day\:z-10 {
1334
+ &:is(:where(.fc\:group\/day)[data-focused="true"] *) {
1335
+ z-index: 10;
1336
+ }
1337
+ }
1338
+ .fc\:group-data-\[focused\=true\]\/day\:border-ring {
1339
+ &:is(:where(.fc\:group\/day)[data-focused="true"] *) {
1340
+ border-color: var(--ring);
1341
+ }
1342
+ }
1343
+ .fc\:group-data-\[focused\=true\]\/day\:ring-\[3px\] {
1344
+ &:is(:where(.fc\:group\/day)[data-focused="true"] *) {
1345
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1346
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1347
+ }
1348
+ }
1349
+ .fc\:group-data-\[focused\=true\]\/day\:ring-ring\/50 {
1350
+ &:is(:where(.fc\:group\/day)[data-focused="true"] *) {
1351
+ --tw-ring-color: var(--ring);
1352
+ @supports (color: color-mix(in lab, red, red)) {
1353
+ --tw-ring-color: color-mix(in oklab, var(--ring) 50%, transparent);
1354
+ }
1355
+ }
1356
+ }
1321
1357
  .fc\:group-data-\[side\=left\]\:-right-4 {
1322
1358
  &:is(:where(.fc\:group)[data-side="left"] *) {
1323
1359
  right: calc(var(--fc-spacing) * -4);
@@ -2062,6 +2098,63 @@
2062
2098
  padding-left: calc(var(--fc-spacing) * 8);
2063
2099
  }
2064
2100
  }
2101
+ .fc\:data-\[range-end\=true\]\:rounded-md {
2102
+ &[data-range-end="true"] {
2103
+ border-radius: var(--fc-radius-md);
2104
+ }
2105
+ }
2106
+ .fc\:data-\[range-end\=true\]\:rounded-r-md {
2107
+ &[data-range-end="true"] {
2108
+ border-top-right-radius: var(--fc-radius-md);
2109
+ border-bottom-right-radius: var(--fc-radius-md);
2110
+ }
2111
+ }
2112
+ .fc\:data-\[range-end\=true\]\:bg-primary {
2113
+ &[data-range-end="true"] {
2114
+ background-color: var(--primary);
2115
+ }
2116
+ }
2117
+ .fc\:data-\[range-end\=true\]\:text-primary-foreground {
2118
+ &[data-range-end="true"] {
2119
+ color: var(--primary-foreground);
2120
+ }
2121
+ }
2122
+ .fc\:data-\[range-middle\=true\]\:rounded-none {
2123
+ &[data-range-middle="true"] {
2124
+ border-radius: 0;
2125
+ }
2126
+ }
2127
+ .fc\:data-\[range-middle\=true\]\:bg-accent {
2128
+ &[data-range-middle="true"] {
2129
+ background-color: var(--accent);
2130
+ }
2131
+ }
2132
+ .fc\:data-\[range-middle\=true\]\:text-accent-foreground {
2133
+ &[data-range-middle="true"] {
2134
+ color: var(--accent-foreground);
2135
+ }
2136
+ }
2137
+ .fc\:data-\[range-start\=true\]\:rounded-md {
2138
+ &[data-range-start="true"] {
2139
+ border-radius: var(--fc-radius-md);
2140
+ }
2141
+ }
2142
+ .fc\:data-\[range-start\=true\]\:rounded-l-md {
2143
+ &[data-range-start="true"] {
2144
+ border-top-left-radius: var(--fc-radius-md);
2145
+ border-bottom-left-radius: var(--fc-radius-md);
2146
+ }
2147
+ }
2148
+ .fc\:data-\[range-start\=true\]\:bg-primary {
2149
+ &[data-range-start="true"] {
2150
+ background-color: var(--primary);
2151
+ }
2152
+ }
2153
+ .fc\:data-\[range-start\=true\]\:text-primary-foreground {
2154
+ &[data-range-start="true"] {
2155
+ color: var(--primary-foreground);
2156
+ }
2157
+ }
2065
2158
  .fc\:data-\[selected-single\=true\]\:bg-primary\! {
2066
2159
  &[data-selected-single="true"] {
2067
2160
  background-color: var(--primary) !important;
@@ -2472,6 +2565,15 @@
2472
2565
  }
2473
2566
  }
2474
2567
  }
2568
+ .fc\:dark\:hover\:text-accent-foreground {
2569
+ &:is(.dark *) {
2570
+ &:hover {
2571
+ @media (hover: hover) {
2572
+ color: var(--accent-foreground);
2573
+ }
2574
+ }
2575
+ }
2576
+ }
2475
2577
  .fc\:has-aria-invalid\:dark\:ring-destructive\/40\! {
2476
2578
  &:has(*[aria-invalid="true"]) {
2477
2579
  &:is(.dark *) {
@@ -2615,6 +2717,17 @@
2615
2717
  display: none;
2616
2718
  }
2617
2719
  }
2720
+ .fc\:\[\&\>span\]\:text-xs {
2721
+ &>span {
2722
+ font-size: var(--fc-text-xs);
2723
+ line-height: var(--tw-leading, var(--fc-text-xs--line-height));
2724
+ }
2725
+ }
2726
+ .fc\:\[\&\>span\]\:opacity-70 {
2727
+ &>span {
2728
+ opacity: 70%;
2729
+ }
2730
+ }
2618
2731
  .fc\:\[\&\>span\:last-child\]\:truncate {
2619
2732
  &>span:last-child {
2620
2733
  overflow: hidden;
@@ -2795,7 +2908,6 @@
2795
2908
  initial-value: 0;
2796
2909
  }
2797
2910
  :root {
2798
- --radius: 0.625rem;
2799
2911
  --background: oklch(0.9659 0.008 286.25);
2800
2912
  --foreground: oklch(0.145 0 0);
2801
2913
  --card: oklch(1 0 0);
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/F1na/fina-react-ds"
6
6
  },
7
7
  "private": false,
8
- "version": "1.0.7",
8
+ "version": "1.0.8",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"