@inspirare/design-system 0.0.18 → 0.0.19
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/node_modules/.pnpm/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js +359 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +328 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1._f1bed12861163fa290e602839f1ebdb9/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +212 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1_90771884ca9639bf31e5f01b1faf83e4/node_modules/@radix-ui/react-accordion/dist/index.js +195 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialo_0211f1deb04a7e512244dbbc3e4765ed/node_modules/@radix-ui/react-alert-dialog/dist/index.js +119 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.9_b34b7156178de4198a23e93f83c57da5/node_modules/@radix-ui/react-arrow/dist/index.js +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-rati_62430dda2e5090a076c492dea1ecc5d8/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1._d460f1c45278b86e7424fb8ae25577de/node_modules/@radix-ui/react-avatar/dist/index.js +73 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js +158 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js +97 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js +62 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context-men_f76d1e5eaec57e990fe72d3c41a037df/node_modules/@radix-ui/react-context-menu/dist/index.js +240 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js +80 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +108 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-me_9dd0889a66ea847559fd572aaa20379b/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js +22 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js +146 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@_8a3f4d1399bacc84c908e03b45229f87/node_modules/@radix-ui/react-hover-card/dist/index.js +161 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.2_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.js +12 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.9_386dd2eabe41e70ee233c5790da58dd5/node_modules/@radix-ui/react-label/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.js +563 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1_52e1207bf5981387ca85fb7a6f7b2195/node_modules/@radix-ui/react-menubar/dist/index.js +312 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.js +553 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1_0f96f9f03b66af70568af721c965c5cd/node_modules/@radix-ui/react-popover/dist/index.js +199 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js +203 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js +85 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1._4cd7f31ebaa5416f0f0f54265ec22793/node_modules/@radix-ui/react-progress/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group_385226f717d657e4aea3688d6214f1c0/node_modules/@radix-ui/react-radio-group/dist/index.js +249 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js +154 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.3._b9232b5aa23e604443839e7a081b7527/node_modules/@radix-ui/react-select/dist/index.js +727 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.js +23 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.js +404 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.5_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.js +120 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.js +125 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.js +351 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +45 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-_c83bcf92add652965a36806e6d79891c/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydr_d8b55bd05f5d50f7ea21f52744760552/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +46 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +33 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/component.js +70 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +4 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +27 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +14 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +13 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/singleton.js +28 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +19 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +22 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js +16 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js +69 -0
- package/dist/src/components/ui/accessibility-improvements.js +60 -0
- package/dist/src/components/ui/accordion.js +44 -0
- package/dist/src/components/ui/alert-dialog.js +61 -0
- package/dist/src/components/ui/alert.js +32 -0
- package/dist/src/components/ui/aspect-ratio.js +6 -0
- package/dist/src/components/ui/avatar.js +29 -0
- package/dist/src/components/ui/badge.js +24 -0
- package/dist/src/components/ui/breadcrumb.js +60 -0
- package/dist/src/components/ui/button-group.js +38 -0
- package/dist/src/components/ui/button.js +41 -0
- package/dist/src/components/ui/calendar.js +89 -0
- package/dist/src/components/ui/card.js +55 -0
- package/dist/src/components/ui/carousel.js +116 -0
- package/dist/src/components/ui/chart.js +128 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.js +26 -0
- package/dist/src/components/ui/color-picker.js +133 -0
- package/dist/src/components/ui/combobox.js +42 -0
- package/dist/src/components/ui/command.js +86 -0
- package/dist/src/components/ui/context-menu.js +72 -0
- package/dist/src/components/ui/dialog.js +88 -0
- package/dist/src/components/ui/drawer.js +80 -0
- package/dist/src/components/ui/dropdown-menu.js +124 -0
- package/dist/src/components/ui/empty.js +59 -0
- package/dist/src/components/ui/field.js +111 -0
- package/dist/src/components/ui/form.js +76 -0
- package/dist/src/components/ui/hover-card.js +33 -0
- package/dist/src/components/ui/input-group.js +78 -0
- package/dist/src/components/ui/input-otp.js +42 -0
- package/dist/src/components/ui/input.js +14 -0
- package/dist/src/components/ui/item.js +116 -0
- package/dist/src/components/ui/kbd.js +19 -0
- package/dist/src/components/ui/label.js +15 -0
- package/dist/src/components/ui/menubar.js +105 -0
- package/dist/src/components/ui/navigation-menu.js +58 -0
- package/dist/src/components/ui/pagination.js +62 -0
- package/dist/src/components/ui/popover.js +36 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.js +27 -0
- package/dist/src/components/ui/resizable.js +19 -0
- package/dist/src/components/ui/scroll-area.js +18 -0
- package/dist/src/components/ui/select.js +96 -0
- package/dist/src/components/ui/separator.js +17 -0
- package/dist/src/components/ui/sheet.js +84 -0
- package/dist/src/components/ui/sidebar.js +326 -0
- package/dist/src/components/ui/skeleton.js +49 -0
- package/dist/src/components/ui/slider.js +36 -0
- package/dist/src/components/ui/sonner.js +20 -0
- package/dist/src/components/ui/spinner.js +14 -0
- package/dist/src/components/ui/switch.js +20 -0
- package/dist/src/components/ui/table.js +67 -0
- package/dist/src/components/ui/tabs.js +36 -0
- package/dist/src/components/ui/textarea.js +13 -0
- package/dist/src/components/ui/theme-toggle.js +56 -0
- package/dist/src/components/ui/toggle-group.js +44 -0
- package/dist/src/components/ui/toggle.js +37 -0
- package/dist/src/components/ui/tooltip.js +37 -0
- package/dist/src/hooks/use-mobile.js +14 -0
- package/dist/src/index.js +61 -0
- package/dist/src/lib/utils.js +8 -0
- package/package.json +9 -6
- package/dist/index.js +0 -22051
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t, buttonVariants as n } from "./button.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronDownIcon as a, ChevronLeftIcon as o, ChevronRightIcon as s } from "lucide-react";
|
|
7
|
+
import { DayPicker as c, getDefaultClassNames as l } from "react-day-picker";
|
|
8
|
+
//#region src/components/ui/calendar.tsx
|
|
9
|
+
function u({ className: t, classNames: r, showOutsideDays: u = !0, captionLayout: f = "label", buttonVariant: p = "ghost", formatters: m, components: h, ...g }) {
|
|
10
|
+
let _ = l();
|
|
11
|
+
return /* @__PURE__ */ i(c, {
|
|
12
|
+
showOutsideDays: u,
|
|
13
|
+
className: e("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, t),
|
|
14
|
+
captionLayout: f,
|
|
15
|
+
formatters: {
|
|
16
|
+
formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
|
|
17
|
+
...m
|
|
18
|
+
},
|
|
19
|
+
classNames: {
|
|
20
|
+
root: e("w-fit", _.root),
|
|
21
|
+
months: e("relative flex flex-col gap-4 md:flex-row", _.months),
|
|
22
|
+
month: e("flex w-full flex-col gap-4", _.month),
|
|
23
|
+
nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", _.nav),
|
|
24
|
+
button_previous: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", _.button_previous),
|
|
25
|
+
button_next: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", _.button_next),
|
|
26
|
+
month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", _.month_caption),
|
|
27
|
+
dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", _.dropdowns),
|
|
28
|
+
dropdown_root: e("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", _.dropdown_root),
|
|
29
|
+
dropdown: e("absolute inset-0 bg-popover opacity-0", _.dropdown),
|
|
30
|
+
caption_label: e("font-medium select-none", f === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", _.caption_label),
|
|
31
|
+
table: "w-full border-collapse",
|
|
32
|
+
weekdays: e("flex", _.weekdays),
|
|
33
|
+
weekday: e("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", _.weekday),
|
|
34
|
+
week: e("mt-2 flex w-full", _.week),
|
|
35
|
+
week_number_header: e("w-(--cell-size) select-none", _.week_number_header),
|
|
36
|
+
week_number: e("text-[0.8rem] text-muted-foreground select-none", _.week_number),
|
|
37
|
+
day: e("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", g.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", _.day),
|
|
38
|
+
range_start: e("rounded-l-md bg-accent", _.range_start),
|
|
39
|
+
range_middle: e("rounded-none", _.range_middle),
|
|
40
|
+
range_end: e("rounded-r-md bg-accent", _.range_end),
|
|
41
|
+
today: e("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", _.today),
|
|
42
|
+
outside: e("text-muted-foreground aria-selected:text-muted-foreground", _.outside),
|
|
43
|
+
disabled: e("text-muted-foreground opacity-50", _.disabled),
|
|
44
|
+
hidden: e("invisible", _.hidden),
|
|
45
|
+
...r
|
|
46
|
+
},
|
|
47
|
+
components: {
|
|
48
|
+
Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ i("div", {
|
|
49
|
+
"data-slot": "calendar",
|
|
50
|
+
ref: n,
|
|
51
|
+
className: e(t),
|
|
52
|
+
...r
|
|
53
|
+
}),
|
|
54
|
+
Chevron: ({ className: t, orientation: n, ...r }) => i(n === "left" ? o : n === "right" ? s : a, {
|
|
55
|
+
className: e("size-4", t),
|
|
56
|
+
...r
|
|
57
|
+
}),
|
|
58
|
+
DayButton: d,
|
|
59
|
+
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ i("td", {
|
|
60
|
+
...t,
|
|
61
|
+
children: /* @__PURE__ */ i("div", {
|
|
62
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
63
|
+
children: e
|
|
64
|
+
})
|
|
65
|
+
}),
|
|
66
|
+
...h
|
|
67
|
+
},
|
|
68
|
+
...g
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function d({ className: n, day: a, modifiers: o, ...s }) {
|
|
72
|
+
let c = l(), u = r.useRef(null);
|
|
73
|
+
return r.useEffect(() => {
|
|
74
|
+
o.focused && u.current?.focus();
|
|
75
|
+
}, [o.focused]), /* @__PURE__ */ i(t, {
|
|
76
|
+
ref: u,
|
|
77
|
+
variant: "ghost",
|
|
78
|
+
size: "icon",
|
|
79
|
+
"data-day": a.date.toLocaleDateString(),
|
|
80
|
+
"data-selected-single": o.selected && !o.range_start && !o.range_end && !o.range_middle,
|
|
81
|
+
"data-range-start": o.range_start,
|
|
82
|
+
"data-range-end": o.range_end,
|
|
83
|
+
"data-range-middle": o.range_middle,
|
|
84
|
+
className: e("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:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", c.day, n),
|
|
85
|
+
...s
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { u as Calendar, d as CalendarDayButton };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/card.tsx
|
|
5
|
+
function n({ className: n, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "card",
|
|
8
|
+
className: e("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function r({ className: n, ...r }) {
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
"data-slot": "card-header",
|
|
15
|
+
className: e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", n),
|
|
16
|
+
...r
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function i({ className: n, ...r }) {
|
|
20
|
+
return /* @__PURE__ */ t("div", {
|
|
21
|
+
"data-slot": "card-title",
|
|
22
|
+
className: e("leading-none font-semibold", n),
|
|
23
|
+
...r
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function a({ className: n, ...r }) {
|
|
27
|
+
return /* @__PURE__ */ t("div", {
|
|
28
|
+
"data-slot": "card-description",
|
|
29
|
+
className: e("text-muted-foreground text-sm", n),
|
|
30
|
+
...r
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function o({ className: n, ...r }) {
|
|
34
|
+
return /* @__PURE__ */ t("div", {
|
|
35
|
+
"data-slot": "card-action",
|
|
36
|
+
className: e("col-start-2 row-span-2 row-start-1 self-start justify-self-end", n),
|
|
37
|
+
...r
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function s({ className: n, ...r }) {
|
|
41
|
+
return /* @__PURE__ */ t("div", {
|
|
42
|
+
"data-slot": "card-content",
|
|
43
|
+
className: e("px-6", n),
|
|
44
|
+
...r
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function c({ className: n, ...r }) {
|
|
48
|
+
return /* @__PURE__ */ t("div", {
|
|
49
|
+
"data-slot": "card-footer",
|
|
50
|
+
className: e("flex items-center px-6 [.border-t]:pt-6", n),
|
|
51
|
+
...r
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { n as Card, o as CardAction, s as CardContent, a as CardDescription, c as CardFooter, r as CardHeader, i as CardTitle };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowLeft as a, ArrowRight as o } from "lucide-react";
|
|
7
|
+
import s from "embla-carousel-react";
|
|
8
|
+
//#region src/components/ui/carousel.tsx
|
|
9
|
+
var c = n.createContext(null);
|
|
10
|
+
function l() {
|
|
11
|
+
let e = n.useContext(c);
|
|
12
|
+
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
var u = n.forwardRef(({ orientation: t = "horizontal", opts: i, setApi: a, plugins: o, className: l, children: u, ...d }, f) => {
|
|
16
|
+
let [p, m] = s({
|
|
17
|
+
...i,
|
|
18
|
+
axis: t === "horizontal" ? "x" : "y"
|
|
19
|
+
}, o), [h, g] = n.useState(!1), [_, v] = n.useState(!1), y = n.useCallback((e) => {
|
|
20
|
+
e && (g(e.canScrollPrev()), v(e.canScrollNext()));
|
|
21
|
+
}, []), b = n.useCallback(() => {
|
|
22
|
+
m?.scrollPrev();
|
|
23
|
+
}, [m]), x = n.useCallback(() => {
|
|
24
|
+
m?.scrollNext();
|
|
25
|
+
}, [m]), S = n.useCallback((e) => {
|
|
26
|
+
e.key === "ArrowLeft" ? (e.preventDefault(), b()) : e.key === "ArrowRight" && (e.preventDefault(), x());
|
|
27
|
+
}, [b, x]);
|
|
28
|
+
return n.useEffect(() => {
|
|
29
|
+
!m || !a || a(m);
|
|
30
|
+
}, [m, a]), n.useEffect(() => {
|
|
31
|
+
if (m) return y(m), m.on("reInit", y), m.on("select", y), () => {
|
|
32
|
+
m?.off("select", y);
|
|
33
|
+
};
|
|
34
|
+
}, [m, y]), /* @__PURE__ */ r(c.Provider, {
|
|
35
|
+
value: {
|
|
36
|
+
carouselRef: p,
|
|
37
|
+
api: m,
|
|
38
|
+
opts: i,
|
|
39
|
+
orientation: t || (i?.axis === "y" ? "vertical" : "horizontal"),
|
|
40
|
+
scrollPrev: b,
|
|
41
|
+
scrollNext: x,
|
|
42
|
+
canScrollPrev: h,
|
|
43
|
+
canScrollNext: _
|
|
44
|
+
},
|
|
45
|
+
children: /* @__PURE__ */ r("div", {
|
|
46
|
+
ref: f,
|
|
47
|
+
onKeyDownCapture: S,
|
|
48
|
+
className: e("relative", l),
|
|
49
|
+
role: "region",
|
|
50
|
+
"aria-roledescription": "carousel",
|
|
51
|
+
...d,
|
|
52
|
+
children: u
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
u.displayName = "Carousel";
|
|
57
|
+
var d = n.forwardRef(({ className: t, ...n }, i) => {
|
|
58
|
+
let { carouselRef: a, orientation: o } = l();
|
|
59
|
+
return /* @__PURE__ */ r("div", {
|
|
60
|
+
ref: a,
|
|
61
|
+
className: "overflow-hidden",
|
|
62
|
+
children: /* @__PURE__ */ r("div", {
|
|
63
|
+
ref: i,
|
|
64
|
+
className: e("flex", o === "horizontal" ? "-ml-4" : "-mt-4 flex-col", t),
|
|
65
|
+
...n
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
d.displayName = "CarouselContent";
|
|
70
|
+
var f = n.forwardRef(({ className: t, ...n }, i) => {
|
|
71
|
+
let { orientation: a } = l();
|
|
72
|
+
return /* @__PURE__ */ r("div", {
|
|
73
|
+
ref: i,
|
|
74
|
+
role: "group",
|
|
75
|
+
"aria-roledescription": "slide",
|
|
76
|
+
className: e("min-w-0 shrink-0 grow-0 basis-full", a === "horizontal" ? "pl-4" : "pt-4", t),
|
|
77
|
+
...n
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
f.displayName = "CarouselItem";
|
|
81
|
+
var p = n.forwardRef(({ className: n, variant: o = "outline", size: s = "icon", ...c }, u) => {
|
|
82
|
+
let { orientation: d, scrollPrev: f, canScrollPrev: p } = l();
|
|
83
|
+
return /* @__PURE__ */ i(t, {
|
|
84
|
+
ref: u,
|
|
85
|
+
variant: o,
|
|
86
|
+
size: s,
|
|
87
|
+
className: e("absolute h-8 w-8 rounded-full", d === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
88
|
+
disabled: !p,
|
|
89
|
+
onClick: f,
|
|
90
|
+
...c,
|
|
91
|
+
children: [/* @__PURE__ */ r(a, { className: "h-4 w-4" }), /* @__PURE__ */ r("span", {
|
|
92
|
+
className: "sr-only",
|
|
93
|
+
children: "Previous slide"
|
|
94
|
+
})]
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
p.displayName = "CarouselPrevious";
|
|
98
|
+
var m = n.forwardRef(({ className: n, variant: a = "outline", size: s = "icon", ...c }, u) => {
|
|
99
|
+
let { orientation: d, scrollNext: f, canScrollNext: p } = l();
|
|
100
|
+
return /* @__PURE__ */ i(t, {
|
|
101
|
+
ref: u,
|
|
102
|
+
variant: a,
|
|
103
|
+
size: s,
|
|
104
|
+
className: e("absolute h-8 w-8 rounded-full", d === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
105
|
+
disabled: !p,
|
|
106
|
+
onClick: f,
|
|
107
|
+
...c,
|
|
108
|
+
children: [/* @__PURE__ */ r(o, { className: "h-4 w-4" }), /* @__PURE__ */ r("span", {
|
|
109
|
+
className: "sr-only",
|
|
110
|
+
children: "Next slide"
|
|
111
|
+
})]
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
m.displayName = "CarouselNext";
|
|
115
|
+
//#endregion
|
|
116
|
+
export { u as Carousel, d as CarouselContent, f as CarouselItem, m as CarouselNext, p as CarouselPrevious };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import * as a from "recharts";
|
|
6
|
+
//#region src/components/ui/chart.tsx
|
|
7
|
+
var o = {
|
|
8
|
+
light: "",
|
|
9
|
+
dark: ".dark"
|
|
10
|
+
}, s = t.createContext(null);
|
|
11
|
+
function c() {
|
|
12
|
+
let e = t.useContext(s);
|
|
13
|
+
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
var l = t.forwardRef(({ id: n, className: o, children: c, config: l, ...d }, f) => {
|
|
17
|
+
let p = t.useId(), m = `chart-${n || p.replace(/:/g, "")}`;
|
|
18
|
+
return /* @__PURE__ */ r(s.Provider, {
|
|
19
|
+
value: { config: l },
|
|
20
|
+
children: /* @__PURE__ */ i("div", {
|
|
21
|
+
"data-chart": m,
|
|
22
|
+
ref: f,
|
|
23
|
+
className: e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", o),
|
|
24
|
+
...d,
|
|
25
|
+
children: [/* @__PURE__ */ r(u, {
|
|
26
|
+
id: m,
|
|
27
|
+
config: l
|
|
28
|
+
}), /* @__PURE__ */ r(a.ResponsiveContainer, { children: c })]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
l.displayName = "Chart";
|
|
33
|
+
var u = ({ id: e, config: t }) => {
|
|
34
|
+
let n = Object.entries(t).filter(([, e]) => e.theme || e.color);
|
|
35
|
+
return n.length ? /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: Object.entries(o).map(([t, r]) => `
|
|
36
|
+
${r} [data-chart=${e}] {
|
|
37
|
+
${n.map(([e, n]) => {
|
|
38
|
+
let r = n.theme?.[t] || n.color;
|
|
39
|
+
return r ? ` --color-${e}: ${r};` : null;
|
|
40
|
+
}).join("\n")}
|
|
41
|
+
}
|
|
42
|
+
`).join("\n") } }) : null;
|
|
43
|
+
}, d = a.Tooltip, f = t.forwardRef(({ active: a, payload: o, className: s, indicator: l = "dot", hideLabel: u = !1, hideIndicator: d = !1, label: f, labelFormatter: p, labelClassName: m, formatter: g, color: _, nameKey: v, labelKey: y }, b) => {
|
|
44
|
+
let { config: x } = c(), S = t.useMemo(() => {
|
|
45
|
+
if (u || !o?.length) return null;
|
|
46
|
+
let [t] = o, n = h(x, t, `${y || t?.dataKey || t?.name || "value"}`), i = !y && typeof f == "string" ? x[f]?.label || f : n?.label;
|
|
47
|
+
return p ? /* @__PURE__ */ r("div", {
|
|
48
|
+
className: e("font-medium", m),
|
|
49
|
+
children: p(i, o)
|
|
50
|
+
}) : i ? /* @__PURE__ */ r("div", {
|
|
51
|
+
className: e("font-medium", m),
|
|
52
|
+
children: i
|
|
53
|
+
}) : null;
|
|
54
|
+
}, [
|
|
55
|
+
f,
|
|
56
|
+
p,
|
|
57
|
+
o,
|
|
58
|
+
u,
|
|
59
|
+
m,
|
|
60
|
+
x,
|
|
61
|
+
y
|
|
62
|
+
]);
|
|
63
|
+
if (!a || !o?.length) return null;
|
|
64
|
+
let C = o.length === 1 && l !== "dot";
|
|
65
|
+
return /* @__PURE__ */ i("div", {
|
|
66
|
+
ref: b,
|
|
67
|
+
className: e("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", s),
|
|
68
|
+
children: [C ? null : S, /* @__PURE__ */ r("div", {
|
|
69
|
+
className: "grid gap-1.5",
|
|
70
|
+
children: o.filter((e) => e.type !== "none").map((t, a) => {
|
|
71
|
+
let o = h(x, t, `${v || t.name || t.dataKey || "value"}`), s = _ || t.payload.fill || t.color;
|
|
72
|
+
return /* @__PURE__ */ r("div", {
|
|
73
|
+
className: e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", l === "dot" && "items-center"),
|
|
74
|
+
children: g && t?.value !== void 0 && t.name ? g(t.value, t.name, t, a, t.payload) : /* @__PURE__ */ i(n, { children: [o?.icon ? /* @__PURE__ */ r(o.icon, {}) : !d && /* @__PURE__ */ r("div", {
|
|
75
|
+
className: e("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
76
|
+
"h-2.5 w-2.5": l === "dot",
|
|
77
|
+
"w-1": l === "line",
|
|
78
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": l === "dashed",
|
|
79
|
+
"my-0.5": C && l === "dashed"
|
|
80
|
+
}),
|
|
81
|
+
style: {
|
|
82
|
+
"--color-bg": s,
|
|
83
|
+
"--color-border": s
|
|
84
|
+
}
|
|
85
|
+
}), /* @__PURE__ */ i("div", {
|
|
86
|
+
className: e("flex flex-1 justify-between leading-none", C ? "items-end" : "items-center"),
|
|
87
|
+
children: [/* @__PURE__ */ i("div", {
|
|
88
|
+
className: "grid gap-1.5",
|
|
89
|
+
children: [C ? S : null, /* @__PURE__ */ r("span", {
|
|
90
|
+
className: "text-muted-foreground",
|
|
91
|
+
children: o?.label || t.name
|
|
92
|
+
})]
|
|
93
|
+
}), t.value && /* @__PURE__ */ r("span", {
|
|
94
|
+
className: "font-mono font-medium tabular-nums text-foreground",
|
|
95
|
+
children: t.value.toLocaleString()
|
|
96
|
+
})]
|
|
97
|
+
})] })
|
|
98
|
+
}, t.dataKey);
|
|
99
|
+
})
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
f.displayName = "ChartTooltip";
|
|
104
|
+
var p = a.Legend, m = t.forwardRef(({ className: t, hideIcon: n = !1, payload: a, verticalAlign: o = "bottom", nameKey: s }, l) => {
|
|
105
|
+
let { config: u } = c();
|
|
106
|
+
return a?.length ? /* @__PURE__ */ r("div", {
|
|
107
|
+
ref: l,
|
|
108
|
+
className: e("flex items-center justify-center gap-4", o === "top" ? "pb-3" : "pt-3", t),
|
|
109
|
+
children: a.filter((e) => e.type !== "none").map((t) => {
|
|
110
|
+
let a = h(u, t, `${s || t.dataKey || "value"}`);
|
|
111
|
+
return /* @__PURE__ */ i("div", {
|
|
112
|
+
className: e("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
113
|
+
children: [a?.icon && !n ? /* @__PURE__ */ r(a.icon, {}) : /* @__PURE__ */ r("div", {
|
|
114
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
115
|
+
style: { backgroundColor: t.color }
|
|
116
|
+
}), a?.label]
|
|
117
|
+
}, t.value);
|
|
118
|
+
})
|
|
119
|
+
}) : null;
|
|
120
|
+
});
|
|
121
|
+
m.displayName = "ChartLegend";
|
|
122
|
+
function h(e, t, n) {
|
|
123
|
+
if (typeof t != "object" || !t) return;
|
|
124
|
+
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
125
|
+
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { l as ChartContainer, p as ChartLegend, m as ChartLegendContent, u as ChartStyle, d as ChartTooltip, f as ChartTooltipContent };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Checkbox as t, CheckboxIndicator as n } from "../../../node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon as i } from "lucide-react";
|
|
7
|
+
//#region src/components/ui/checkbox.tsx
|
|
8
|
+
function a({ className: a, ...o }) {
|
|
9
|
+
return /* @__PURE__ */ r(t, {
|
|
10
|
+
"data-slot": "checkbox",
|
|
11
|
+
className: e("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary", a),
|
|
12
|
+
...o,
|
|
13
|
+
children: /* @__PURE__ */ r(n, {
|
|
14
|
+
"data-slot": "checkbox-indicator",
|
|
15
|
+
className: "grid place-content-center text-current transition-none",
|
|
16
|
+
children: /* @__PURE__ */ r(i, { className: "size-3.5" })
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as Checkbox };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CollapsibleContent as e, CollapsibleTrigger as t, Root as n } from "../../../node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
3
|
+
import { cn as r } from "../../lib/utils.js";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/collapsible.tsx
|
|
6
|
+
function a({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ i(n, {
|
|
8
|
+
"data-slot": "collapsible",
|
|
9
|
+
...e
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function o({ className: e, ...n }) {
|
|
13
|
+
return /* @__PURE__ */ i(t, {
|
|
14
|
+
"data-slot": "collapsible-trigger",
|
|
15
|
+
className: r("cursor-pointer", e),
|
|
16
|
+
...n
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function s({ ...t }) {
|
|
20
|
+
return /* @__PURE__ */ i(e, {
|
|
21
|
+
"data-slot": "collapsible-content",
|
|
22
|
+
...t
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as Collapsible, s as CollapsibleContent, o as CollapsibleTrigger };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Input as n } from "./input.js";
|
|
5
|
+
import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "./popover.js";
|
|
6
|
+
import { useState as o } from "react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { HexColorPicker as l } from "react-colorful";
|
|
9
|
+
//#region src/components/ui/color-picker.tsx
|
|
10
|
+
function u({ value: u, onChange: d, className: f, disabled: p = !1 }) {
|
|
11
|
+
let [m, h] = o(u), [g, _] = o(!1), v = (e) => {
|
|
12
|
+
h(e), d(e);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ c(r, {
|
|
15
|
+
open: g,
|
|
16
|
+
onOpenChange: _,
|
|
17
|
+
children: [/* @__PURE__ */ s(a, {
|
|
18
|
+
asChild: !0,
|
|
19
|
+
children: /* @__PURE__ */ c(t, {
|
|
20
|
+
variant: "outline",
|
|
21
|
+
className: e("w-[200px] justify-start text-left font-normal border-border hover:border-primary/50 transition-colors gap-2 px-3", !m && "text-muted-foreground", f),
|
|
22
|
+
disabled: p,
|
|
23
|
+
children: [/* @__PURE__ */ s("div", {
|
|
24
|
+
className: "w-4 h-4 rounded border border-border shadow-sm shrink-0",
|
|
25
|
+
style: { backgroundColor: m || "#ffffff" }
|
|
26
|
+
}), /* @__PURE__ */ s("span", {
|
|
27
|
+
className: "truncate flex-1",
|
|
28
|
+
children: m ? /* @__PURE__ */ s("span", {
|
|
29
|
+
className: "font-mono text-xs",
|
|
30
|
+
children: m.toUpperCase()
|
|
31
|
+
}) : "Selecionar cor"
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
}), /* @__PURE__ */ s(i, {
|
|
35
|
+
className: "w-80 p-0",
|
|
36
|
+
children: /* @__PURE__ */ c("div", {
|
|
37
|
+
className: "p-4 space-y-4",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ s("div", {
|
|
40
|
+
className: "text-sm font-medium text-foreground pb-2 border-b border-border",
|
|
41
|
+
children: "Seletor de Cor"
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ c("div", {
|
|
44
|
+
className: "space-y-3",
|
|
45
|
+
children: [/* @__PURE__ */ s(l, {
|
|
46
|
+
color: m || "#ffffff",
|
|
47
|
+
onChange: v,
|
|
48
|
+
className: "w-full !h-32"
|
|
49
|
+
}), /* @__PURE__ */ c("div", {
|
|
50
|
+
className: "space-y-1",
|
|
51
|
+
children: [/* @__PURE__ */ s("label", {
|
|
52
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
53
|
+
children: "Código Hexadecimal"
|
|
54
|
+
}), /* @__PURE__ */ s(n, {
|
|
55
|
+
value: m || "",
|
|
56
|
+
onChange: (e) => {
|
|
57
|
+
let t = e.target.value;
|
|
58
|
+
(/^#[0-9A-F]{6}$/i.test(t) || t === "") && (h(t), t !== "" && d(t));
|
|
59
|
+
},
|
|
60
|
+
placeholder: "#000000",
|
|
61
|
+
className: "font-mono text-sm border-border focus:border-primary/50 focus:ring-primary/20 bg-background text-foreground"
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ c("div", {
|
|
66
|
+
className: "space-y-2",
|
|
67
|
+
children: [/* @__PURE__ */ s("label", {
|
|
68
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
69
|
+
children: "Cores Predefinidas"
|
|
70
|
+
}), /* @__PURE__ */ s("div", {
|
|
71
|
+
className: "grid grid-cols-8 gap-1.5",
|
|
72
|
+
children: [
|
|
73
|
+
"#9192FA",
|
|
74
|
+
"#60A5FA",
|
|
75
|
+
"#e0e7ff",
|
|
76
|
+
"#dbeafe",
|
|
77
|
+
"#1f2937",
|
|
78
|
+
"#374151",
|
|
79
|
+
"#6b7280",
|
|
80
|
+
"#9ca3af",
|
|
81
|
+
"#d1d5db",
|
|
82
|
+
"#f3f4f6",
|
|
83
|
+
"#ffffff",
|
|
84
|
+
"#000000",
|
|
85
|
+
"#dc2626",
|
|
86
|
+
"#ea580c",
|
|
87
|
+
"#d97706",
|
|
88
|
+
"#16a34a",
|
|
89
|
+
"#2563eb",
|
|
90
|
+
"#4f46e5",
|
|
91
|
+
"#9333ea",
|
|
92
|
+
"#e11d48",
|
|
93
|
+
"#fef3c7",
|
|
94
|
+
"#d1fae5",
|
|
95
|
+
"#fce7f3",
|
|
96
|
+
"#e9d5ff"
|
|
97
|
+
].map((t) => /* @__PURE__ */ s("button", {
|
|
98
|
+
className: e("w-7 h-7 rounded border cursor-pointer transition-all duration-200 hover:scale-110 hover:shadow-md", m === t ? "border-primary ring-2 ring-primary/20" : "border-border hover:border-muted-foreground/50"),
|
|
99
|
+
style: { backgroundColor: t },
|
|
100
|
+
onClick: () => v(t),
|
|
101
|
+
title: t.toUpperCase()
|
|
102
|
+
}, t))
|
|
103
|
+
})]
|
|
104
|
+
}),
|
|
105
|
+
m && /* @__PURE__ */ c("div", {
|
|
106
|
+
className: "pt-2 border-t border-border",
|
|
107
|
+
children: [/* @__PURE__ */ s("div", {
|
|
108
|
+
className: "text-xs font-medium text-muted-foreground mb-2",
|
|
109
|
+
children: "Cor Atual"
|
|
110
|
+
}), /* @__PURE__ */ c("div", {
|
|
111
|
+
className: "flex items-center gap-3 p-2 bg-muted/50 rounded-md cursor-pointer hover:bg-muted transition-colors",
|
|
112
|
+
children: [/* @__PURE__ */ s("div", {
|
|
113
|
+
className: "w-8 h-8 rounded border border-border shadow-sm shrink-0",
|
|
114
|
+
style: { backgroundColor: m }
|
|
115
|
+
}), /* @__PURE__ */ c("div", {
|
|
116
|
+
className: "flex-1",
|
|
117
|
+
children: [/* @__PURE__ */ s("div", {
|
|
118
|
+
className: "font-mono text-sm font-medium text-foreground",
|
|
119
|
+
children: m.toUpperCase()
|
|
120
|
+
}), /* @__PURE__ */ s("div", {
|
|
121
|
+
className: "text-xs text-muted-foreground",
|
|
122
|
+
children: "Clique para copiar"
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { u as ColorPicker };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Popover as n, PopoverContent as r, PopoverTrigger as i } from "./popover.js";
|
|
5
|
+
import { Command as a, CommandEmpty as o, CommandGroup as s, CommandInput as c, CommandItem as l, CommandList as u } from "./command.js";
|
|
6
|
+
import * as d from "react";
|
|
7
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
+
import { Check as m, ChevronsUpDown as h } from "lucide-react";
|
|
9
|
+
//#region src/components/ui/combobox.tsx
|
|
10
|
+
function g({ options: g, value: _, onChange: v, placeholder: y = "Select option...", searchPlaceholder: b = "Search...", emptyMessage: x = "No option found.", className: S, buttonClassName: C, contentClassName: w, disabled: T = !1 }) {
|
|
11
|
+
let [E, D] = d.useState(!1), O = d.useMemo(() => g.find((e) => e.value === _)?.label, [g, _]);
|
|
12
|
+
return /* @__PURE__ */ p(n, {
|
|
13
|
+
open: E,
|
|
14
|
+
onOpenChange: D,
|
|
15
|
+
children: [/* @__PURE__ */ f(i, {
|
|
16
|
+
asChild: !0,
|
|
17
|
+
children: /* @__PURE__ */ p(t, {
|
|
18
|
+
variant: "outline",
|
|
19
|
+
role: "combobox",
|
|
20
|
+
"aria-expanded": E,
|
|
21
|
+
disabled: T,
|
|
22
|
+
className: e("w-full justify-between", !_ && "text-muted-foreground", C),
|
|
23
|
+
children: [O || y, /* @__PURE__ */ f(h, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
24
|
+
})
|
|
25
|
+
}), /* @__PURE__ */ f(r, {
|
|
26
|
+
className: e("w-full p-0", w),
|
|
27
|
+
align: "start",
|
|
28
|
+
children: /* @__PURE__ */ p(a, {
|
|
29
|
+
className: S,
|
|
30
|
+
children: [/* @__PURE__ */ f(c, { placeholder: b }), /* @__PURE__ */ p(u, { children: [/* @__PURE__ */ f(o, { children: x }), /* @__PURE__ */ f(s, { children: g.map((t) => /* @__PURE__ */ p(l, {
|
|
31
|
+
value: t.value,
|
|
32
|
+
onSelect: (e) => {
|
|
33
|
+
v?.(e === _ ? "" : e), D(!1);
|
|
34
|
+
},
|
|
35
|
+
children: [/* @__PURE__ */ f(m, { className: e("mr-2 h-4 w-4", _ === t.value ? "opacity-100" : "opacity-0") }), t.label]
|
|
36
|
+
}, t.value)) })] })]
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { g as Combobox };
|