@stoa-dev/kit 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useOnlineStatus/index.js +14 -0
- package/dist/hooks/useOnlineStatus/index.js.map +1 -0
- package/dist/hooks/useRouting/index.js +17 -0
- package/dist/hooks/useRouting/index.js.map +1 -0
- package/dist/i18n/index.js +30 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/locales/at.json.js +16 -0
- package/dist/i18n/locales/at.json.js.map +1 -0
- package/dist/i18n/locales/de.json.js +16 -0
- package/dist/i18n/locales/de.json.js.map +1 -0
- package/dist/i18n/locales/en.json.js +16 -0
- package/dist/i18n/locales/en.json.js.map +1 -0
- package/dist/i18n/locales/it.json.js +16 -0
- package/dist/i18n/locales/it.json.js.map +1 -0
- package/dist/i18n/namespace.js +5 -0
- package/dist/i18n/namespace.js.map +1 -0
- package/dist/kit.css +1 -0
- package/dist/licensing/LicenseActivation/index.js +101 -0
- package/dist/licensing/LicenseActivation/index.js.map +1 -0
- package/dist/licensing/LicenseCard/index.js +149 -0
- package/dist/licensing/LicenseCard/index.js.map +1 -0
- package/dist/licensing/LicenseGate/index.js +72 -0
- package/dist/licensing/LicenseGate/index.js.map +1 -0
- package/dist/licensing/LicenseProvider/index.js +137 -0
- package/dist/licensing/LicenseProvider/index.js.map +1 -0
- package/dist/licensing/LicenseStatusBanner/index.js +135 -0
- package/dist/licensing/LicenseStatusBanner/index.js.map +1 -0
- package/dist/licensing/api.js +57 -0
- package/dist/licensing/api.js.map +1 -0
- package/dist/licensing/index.js +23 -0
- package/dist/licensing/index.js.map +1 -0
- package/dist/shell/AppNavigation/AppNavigation.module.scss.js +16 -0
- package/dist/shell/AppNavigation/AppNavigation.module.scss.js.map +1 -0
- package/dist/shell/AppNavigation/index.js +136 -0
- package/dist/shell/AppNavigation/index.js.map +1 -0
- package/dist/shell/BackHomeButton/index.js +23 -0
- package/dist/shell/BackHomeButton/index.js.map +1 -0
- package/dist/shell/BrandLines/BrandLines.module.scss.js +10 -0
- package/dist/shell/BrandLines/BrandLines.module.scss.js.map +1 -0
- package/dist/shell/BrandLines/index.js +25 -0
- package/dist/shell/BrandLines/index.js.map +1 -0
- package/dist/shell/ConfirmDialog/index.js +53 -0
- package/dist/shell/ConfirmDialog/index.js.map +1 -0
- package/dist/shell/DatePicker/index.js +219 -0
- package/dist/shell/DatePicker/index.js.map +1 -0
- package/dist/shell/ErrorBoundary/index.js +29 -0
- package/dist/shell/ErrorBoundary/index.js.map +1 -0
- package/dist/shell/NativeSelect/index.js +24 -0
- package/dist/shell/NativeSelect/index.js.map +1 -0
- package/dist/shell/PageHeading/PageHeading.module.scss.js +8 -0
- package/dist/shell/PageHeading/PageHeading.module.scss.js.map +1 -0
- package/dist/shell/PageHeading/index.js +14 -0
- package/dist/shell/PageHeading/index.js.map +1 -0
- package/dist/shell/SectionNavigation/index.js +116 -0
- package/dist/shell/SectionNavigation/index.js.map +1 -0
- package/dist/shell/Spinner/index.js +16 -0
- package/dist/shell/Spinner/index.js.map +1 -0
- package/dist/shell/UploadButton/index.js +44 -0
- package/dist/shell/UploadButton/index.js.map +1 -0
- package/dist/shell/index.js +29 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useOnlineStatus/index.d.ts +2 -0
- package/dist/types/hooks/useOnlineStatus/index.d.ts.map +1 -0
- package/dist/types/hooks/useRouting/index.d.ts +14 -0
- package/dist/types/hooks/useRouting/index.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +582 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/namespace.d.ts +3 -0
- package/dist/types/i18n/namespace.d.ts.map +1 -0
- package/dist/types/licensing/LicenseActivation/index.d.ts +8 -0
- package/dist/types/licensing/LicenseActivation/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseCard/index.d.ts +2 -0
- package/dist/types/licensing/LicenseCard/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseGate/index.d.ts +11 -0
- package/dist/types/licensing/LicenseGate/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseProvider/index.d.ts +20 -0
- package/dist/types/licensing/LicenseProvider/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseStatusBanner/index.d.ts +4 -0
- package/dist/types/licensing/LicenseStatusBanner/index.d.ts.map +1 -0
- package/dist/types/licensing/api.d.ts +28 -0
- package/dist/types/licensing/api.d.ts.map +1 -0
- package/dist/types/licensing/index.d.ts +7 -0
- package/dist/types/licensing/index.d.ts.map +1 -0
- package/dist/types/shell/AppNavigation/index.d.ts +45 -0
- package/dist/types/shell/AppNavigation/index.d.ts.map +1 -0
- package/dist/types/shell/BackHomeButton/index.d.ts +7 -0
- package/dist/types/shell/BackHomeButton/index.d.ts.map +1 -0
- package/dist/types/shell/BrandLines/index.d.ts +6 -0
- package/dist/types/shell/BrandLines/index.d.ts.map +1 -0
- package/dist/types/shell/ConfirmDialog/index.d.ts +21 -0
- package/dist/types/shell/ConfirmDialog/index.d.ts.map +1 -0
- package/dist/types/shell/DatePicker/index.d.ts +14 -0
- package/dist/types/shell/DatePicker/index.d.ts.map +1 -0
- package/dist/types/shell/ErrorBoundary/index.d.ts +20 -0
- package/dist/types/shell/ErrorBoundary/index.d.ts.map +1 -0
- package/dist/types/shell/NativeSelect/index.d.ts +3 -0
- package/dist/types/shell/NativeSelect/index.d.ts.map +1 -0
- package/dist/types/shell/PageHeading/index.d.ts +9 -0
- package/dist/types/shell/PageHeading/index.d.ts.map +1 -0
- package/dist/types/shell/SectionNavigation/index.d.ts +12 -0
- package/dist/types/shell/SectionNavigation/index.d.ts.map +1 -0
- package/dist/types/shell/Spinner/index.d.ts +6 -0
- package/dist/types/shell/Spinner/index.d.ts.map +1 -0
- package/dist/types/shell/UploadButton/index.d.ts +6 -0
- package/dist/types/shell/UploadButton/index.d.ts.map +1 -0
- package/dist/types/shell/index.d.ts +12 -0
- package/dist/types/shell/index.d.ts.map +1 -0
- package/dist/types/ui/accordion/index.d.ts +8 -0
- package/dist/types/ui/accordion/index.d.ts.map +1 -0
- package/dist/types/ui/button/index.d.ts +11 -0
- package/dist/types/ui/button/index.d.ts.map +1 -0
- package/dist/types/ui/calendar/index.d.ts +11 -0
- package/dist/types/ui/calendar/index.d.ts.map +1 -0
- package/dist/types/ui/card/index.d.ts +12 -0
- package/dist/types/ui/card/index.d.ts.map +1 -0
- package/dist/types/ui/dialog/index.d.ts +18 -0
- package/dist/types/ui/dialog/index.d.ts.map +1 -0
- package/dist/types/ui/dropdown-menu/index.d.ts +30 -0
- package/dist/types/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/types/ui/field/index.d.ts +25 -0
- package/dist/types/ui/field/index.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +21 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/dist/types/ui/input/index.d.ts +4 -0
- package/dist/types/ui/input/index.d.ts.map +1 -0
- package/dist/types/ui/input-group/index.d.ts +17 -0
- package/dist/types/ui/input-group/index.d.ts.map +1 -0
- package/dist/types/ui/label/index.d.ts +5 -0
- package/dist/types/ui/label/index.d.ts.map +1 -0
- package/dist/types/ui/popover/index.d.ts +11 -0
- package/dist/types/ui/popover/index.d.ts.map +1 -0
- package/dist/types/ui/radio-group/index.d.ts +6 -0
- package/dist/types/ui/radio-group/index.d.ts.map +1 -0
- package/dist/types/ui/scroll-area/index.d.ts +6 -0
- package/dist/types/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/types/ui/select/index.d.ts +16 -0
- package/dist/types/ui/select/index.d.ts.map +1 -0
- package/dist/types/ui/separator/index.d.ts +5 -0
- package/dist/types/ui/separator/index.d.ts.map +1 -0
- package/dist/types/ui/sonner/index.d.ts +4 -0
- package/dist/types/ui/sonner/index.d.ts.map +1 -0
- package/dist/types/ui/switch/index.d.ts +7 -0
- package/dist/types/ui/switch/index.d.ts.map +1 -0
- package/dist/types/ui/textarea/index.d.ts +4 -0
- package/dist/types/ui/textarea/index.d.ts.map +1 -0
- package/dist/types/ui/toggle/index.d.ts +10 -0
- package/dist/types/ui/toggle/index.d.ts.map +1 -0
- package/dist/types/ui/tooltip/index.d.ts +8 -0
- package/dist/types/ui/tooltip/index.d.ts.map +1 -0
- package/dist/types/utils/cn.d.ts +3 -0
- package/dist/types/utils/cn.d.ts.map +1 -0
- package/dist/types/utils/colors.d.ts +3 -0
- package/dist/types/utils/colors.d.ts.map +1 -0
- package/dist/types/utils/dates.d.ts +9 -0
- package/dist/types/utils/dates.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/ui/accordion/index.js +65 -0
- package/dist/ui/accordion/index.js.map +1 -0
- package/dist/ui/button/index.js +57 -0
- package/dist/ui/button/index.js.map +1 -0
- package/dist/ui/calendar/index.js +179 -0
- package/dist/ui/calendar/index.js.map +1 -0
- package/dist/ui/card/index.js +102 -0
- package/dist/ui/card/index.js.map +1 -0
- package/dist/ui/dialog/index.js +158 -0
- package/dist/ui/dialog/index.js.map +1 -0
- package/dist/ui/dropdown-menu/index.js +252 -0
- package/dist/ui/dropdown-menu/index.js.map +1 -0
- package/dist/ui/field/index.js +209 -0
- package/dist/ui/field/index.js.map +1 -0
- package/dist/ui/index.js +112 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input/index.js +20 -0
- package/dist/ui/input/index.js.map +1 -0
- package/dist/ui/input-group/index.js +143 -0
- package/dist/ui/input-group/index.js.map +1 -0
- package/dist/ui/label/index.js +23 -0
- package/dist/ui/label/index.js.map +1 -0
- package/dist/ui/popover/index.js +81 -0
- package/dist/ui/popover/index.js.map +1 -0
- package/dist/ui/radio-group/index.js +45 -0
- package/dist/ui/radio-group/index.js.map +1 -0
- package/dist/ui/scroll-area/index.js +60 -0
- package/dist/ui/scroll-area/index.js.map +1 -0
- package/dist/ui/select/index.js +182 -0
- package/dist/ui/select/index.js.map +1 -0
- package/dist/ui/separator/index.js +27 -0
- package/dist/ui/separator/index.js.map +1 -0
- package/dist/ui/sonner/index.js +37 -0
- package/dist/ui/sonner/index.js.map +1 -0
- package/dist/ui/switch/index.js +32 -0
- package/dist/ui/switch/index.js.map +1 -0
- package/dist/ui/textarea/index.js +19 -0
- package/dist/ui/textarea/index.js.map +1 -0
- package/dist/ui/toggle/index.js +44 -0
- package/dist/ui/toggle/index.js.map +1 -0
- package/dist/ui/tooltip/index.js +56 -0
- package/dist/ui/tooltip/index.js.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/colors.js +8 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/dates.js +28 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +121 -4
- package/scss/_index.scss +4 -0
- package/scss/_tools.scss +21 -0
- package/styles/theme.css +192 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/switch/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG;IACtD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;CAC9B,qBAiBA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/textarea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAW1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Toggle as TogglePrimitive } from 'radix-ui';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
9
|
+
export { Toggle, toggleVariants };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/toggle/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,QAAA,MAAM,cAAc;;;8EAoBnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GACnD,YAAY,CAAC,OAAO,cAAc,CAAC,qBAQnC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,iBAAS,eAAe,CAAC,EACxB,aAAiB,EACjB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,qBAQxD;AAED,iBAAS,OAAO,CAAC,EAChB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAEpD;AAED,iBAAS,cAAc,CAAC,EACvB,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAEvD;AAED,iBAAS,cAAc,CAAC,EACvB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAiBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,iBAM1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function getRuntimeLocale(): string;
|
|
2
|
+
export declare function isValidDate(value: unknown): value is Date;
|
|
3
|
+
export declare function formatDate(value: Date | undefined, options?: {
|
|
4
|
+
locale?: string;
|
|
5
|
+
}): string;
|
|
6
|
+
export declare function formatTimestamp(value: string, options?: {
|
|
7
|
+
locale?: string;
|
|
8
|
+
}): string;
|
|
9
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../src/utils/dates.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,WAE/B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAEzD;AAED,wBAAgB,UAAU,CACzB,KAAK,EAAE,IAAI,GAAG,SAAS,EACvB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,UAS7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,UAQ3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACN,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,GACX,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDownIcon as c } from "lucide-react";
|
|
3
|
+
import { Accordion as n } from "radix-ui";
|
|
4
|
+
import { cn as i } from "../../utils/cn.js";
|
|
5
|
+
function u({
|
|
6
|
+
...o
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(n.Root, { "data-slot": "accordion", ...o });
|
|
9
|
+
}
|
|
10
|
+
function f({
|
|
11
|
+
className: o,
|
|
12
|
+
...t
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ e(
|
|
15
|
+
n.Item,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "accordion-item",
|
|
18
|
+
className: i("border-b last:border-b-0", o),
|
|
19
|
+
...t
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function p({
|
|
24
|
+
className: o,
|
|
25
|
+
children: t,
|
|
26
|
+
...r
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ e(n.Header, { className: "flex", children: /* @__PURE__ */ a(
|
|
29
|
+
n.Trigger,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "accordion-trigger",
|
|
32
|
+
className: i(
|
|
33
|
+
"flex flex-1 items-center justify-between gap-4 rounded-md py-3 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
34
|
+
o
|
|
35
|
+
),
|
|
36
|
+
...r,
|
|
37
|
+
children: [
|
|
38
|
+
t,
|
|
39
|
+
/* @__PURE__ */ e(c, { className: "size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
function g({
|
|
45
|
+
className: o,
|
|
46
|
+
children: t,
|
|
47
|
+
...r
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ e(
|
|
50
|
+
n.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "accordion-content",
|
|
53
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none",
|
|
54
|
+
...r,
|
|
55
|
+
children: /* @__PURE__ */ e("div", { className: i("pt-0 pb-4", o), children: t })
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
u as Accordion,
|
|
61
|
+
g as AccordionContent,
|
|
62
|
+
f as AccordionItem,
|
|
63
|
+
p as AccordionTrigger
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/accordion/index.tsx"],"sourcesContent":["import { ChevronDownIcon } from 'lucide-react'\nimport { Accordion as AccordionPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Accordion({\n\t...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n\treturn <AccordionPrimitive.Root data-slot='accordion' {...props} />\n}\n\nfunction AccordionItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n\treturn (\n\t\t<AccordionPrimitive.Item\n\t\t\tdata-slot='accordion-item'\n\t\t\tclassName={cn('border-b last:border-b-0', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction AccordionTrigger({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n\treturn (\n\t\t<AccordionPrimitive.Header className='flex'>\n\t\t\t<AccordionPrimitive.Trigger\n\t\t\t\tdata-slot='accordion-trigger'\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'flex flex-1 items-center justify-between gap-4 rounded-md py-3 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<ChevronDownIcon className='size-4 shrink-0 text-muted-foreground transition-transform duration-200' />\n\t\t\t</AccordionPrimitive.Trigger>\n\t\t</AccordionPrimitive.Header>\n\t)\n}\n\nfunction AccordionContent({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n\treturn (\n\t\t<AccordionPrimitive.Content\n\t\t\tdata-slot='accordion-content'\n\t\t\tclassName='overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none'\n\t\t\t{...props}\n\t\t>\n\t\t\t<div className={cn('pt-0 pb-4', className)}>{children}</div>\n\t\t</AccordionPrimitive.Content>\n\t)\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger }\n"],"names":["Accordion","props","AccordionPrimitive","AccordionItem","className","jsx","cn","AccordionTrigger","children","jsxs","ChevronDownIcon","AccordionContent"],"mappings":";;;;AAMA,SAASA,EAAU;AAAA,EAClB,GAAGC;AACJ,GAAyD;AACxD,2BAAQC,EAAmB,MAAnB,EAAwB,aAAU,aAAa,GAAGD,GAAO;AAClE;AAEA,SAASE,EAAc;AAAA,EACtB,WAAAC;AAAA,EACA,GAAGH;AACJ,GAAyD;AACxD,SACC,gBAAAI;AAAA,IAACH,EAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI,EAAG,4BAA4BF,CAAS;AAAA,MAClD,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAiB;AAAA,EACzB,WAAAH;AAAA,EACA,UAAAI;AAAA,EACA,GAAGP;AACJ,GAA4D;AAC3D,SACC,gBAAAI,EAACH,EAAmB,QAAnB,EAA0B,WAAU,QACpC,UAAA,gBAAAO;AAAA,IAACP,EAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI;AAAA,QACV;AAAA,QACAF;AAAA,MAAA;AAAA,MAEA,GAAGH;AAAA,MAEH,UAAA;AAAA,QAAAO;AAAA,QACD,gBAAAH,EAACK,GAAA,EAAgB,WAAU,0EAAA,CAA0E;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEvG;AAEF;AAEA,SAASC,EAAiB;AAAA,EACzB,WAAAP;AAAA,EACA,UAAAI;AAAA,EACA,GAAGP;AACJ,GAA4D;AAC3D,SACC,gBAAAI;AAAA,IAACH,EAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAGD;AAAA,MAEJ,4BAAC,OAAA,EAAI,WAAWK,EAAG,aAAaF,CAAS,GAAI,UAAAI,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGzD;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cva as d } from "class-variance-authority";
|
|
3
|
+
import { Slot as s } from "radix-ui";
|
|
4
|
+
import { cn as u } from "../../utils/cn.js";
|
|
5
|
+
const c = d(
|
|
6
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,filter] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-accent text-accent-foreground duration-150 ease-out hover:brightness-120 hover:shadow-sm dark:hover:brightness-110 active:brightness-85 active:shadow-none dark:active:brightness-95 motion-reduce:transition-none",
|
|
11
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground duration-150 ease-out hover:brightness-95 hover:shadow-sm dark:hover:brightness-125 active:brightness-90 active:shadow-none dark:active:brightness-110 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground motion-reduce:transition-none",
|
|
13
|
+
ghost: "hover:bg-(--accent-muted) hover:text-foreground aria-expanded:bg-(--accent-muted) aria-expanded:text-foreground",
|
|
14
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
15
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-12 gap-2 px-4 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
19
|
+
xs: "h-7 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
20
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
21
|
+
lg: "h-12 gap-2 px-5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
22
|
+
icon: "size-9",
|
|
23
|
+
"icon-xs": "size-7 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
24
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
25
|
+
"icon-lg": "size-12"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "default"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
function p({
|
|
35
|
+
className: t,
|
|
36
|
+
variant: e = "default",
|
|
37
|
+
size: r = "default",
|
|
38
|
+
asChild: n = !1,
|
|
39
|
+
...i
|
|
40
|
+
}) {
|
|
41
|
+
const a = n ? s.Root : "button";
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
a,
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "button",
|
|
46
|
+
"data-variant": e,
|
|
47
|
+
"data-size": r,
|
|
48
|
+
className: u(c({ variant: e, size: r, className: t })),
|
|
49
|
+
...i
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
p as Button,
|
|
55
|
+
c as buttonVariants
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/button/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nconst buttonVariants = cva(\n\t\"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,filter] duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'bg-accent text-accent-foreground duration-150 ease-out hover:brightness-120 hover:shadow-sm dark:hover:brightness-110 active:brightness-85 active:shadow-none dark:active:brightness-95 motion-reduce:transition-none',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',\n\t\t\t\tsecondary:\n\t\t\t\t\t'bg-secondary text-secondary-foreground duration-150 ease-out hover:brightness-95 hover:shadow-sm dark:hover:brightness-125 active:brightness-90 active:shadow-none dark:active:brightness-110 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground motion-reduce:transition-none',\n\t\t\t\tghost:\n\t\t\t\t\t'hover:bg-(--accent-muted) hover:text-foreground aria-expanded:bg-(--accent-muted) aria-expanded:text-foreground',\n\t\t\t\tdestructive:\n\t\t\t\t\t'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',\n\t\t\t\tlink: 'text-primary underline-offset-4 hover:underline',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault:\n\t\t\t\t\t'h-12 gap-2 px-4 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n\t\t\t\txs: \"h-7 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\tsm: \"h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tlg: 'h-12 gap-2 px-5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n\t\t\t\ticon: 'size-9',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t\"size-7 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\t'icon-sm':\n\t\t\t\t\t'size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n\t\t\t\t'icon-lg': 'size-12',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'default',\n\t\t},\n\t},\n)\n\nfunction Button({\n\tclassName,\n\tvariant = 'default',\n\tsize = 'default',\n\tasChild = false,\n\t...props\n}: React.ComponentProps<'button'> &\n\tVariantProps<typeof buttonVariants> & {\n\t\tasChild?: boolean\n\t}) {\n\tconst Comp = asChild ? Slot.Root : 'button'\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-slot='button'\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","props","Comp","Slot","jsx","cn"],"mappings":";;;;AAMA,MAAMA,IAAiBC;AAAA,EACtB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,SAAS;AAAA,QACR,SACC;AAAA,QACD,SACC;AAAA,QACD,WACC;AAAA,QACD,OACC;AAAA,QACD,aACC;AAAA,QACD,MAAM;AAAA,MAAA;AAAA,MAEP,MAAM;AAAA,QACL,SACC;AAAA,QACD,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WACC;AAAA,QACD,WACC;AAAA,QACD,WAAW;AAAA,MAAA;AAAA,IACZ;AAAA,IAED,iBAAiB;AAAA,MAChB,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACP;AAEF;AAEA,SAASC,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,GAAGC;AACJ,GAGI;AACH,QAAMC,IAAOF,IAAUG,EAAK,OAAO;AAEnC,SACC,gBAAAC;AAAA,IAACF;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,gBAAcJ;AAAA,MACd,aAAWC;AAAA,MACX,WAAWM,EAAGX,EAAe,EAAE,SAAAI,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,MACzD,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon as w, ChevronRightIcon as y, ChevronDownIcon as _ } from "lucide-react";
|
|
3
|
+
import * as m from "react";
|
|
4
|
+
import { getDefaultClassNames as b, DayPicker as h } from "react-day-picker";
|
|
5
|
+
import { cn as e } from "../../utils/cn.js";
|
|
6
|
+
import { buttonVariants as p, Button as v } from "../button/index.js";
|
|
7
|
+
function R({
|
|
8
|
+
className: c,
|
|
9
|
+
classNames: g,
|
|
10
|
+
showOutsideDays: r = !0,
|
|
11
|
+
captionLayout: s = "label",
|
|
12
|
+
buttonVariant: u = "ghost",
|
|
13
|
+
locale: o,
|
|
14
|
+
formatters: i,
|
|
15
|
+
components: x,
|
|
16
|
+
...f
|
|
17
|
+
}) {
|
|
18
|
+
const t = b();
|
|
19
|
+
return /* @__PURE__ */ n(
|
|
20
|
+
h,
|
|
21
|
+
{
|
|
22
|
+
showOutsideDays: r,
|
|
23
|
+
className: e(
|
|
24
|
+
"group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
25
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
26
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
27
|
+
c
|
|
28
|
+
),
|
|
29
|
+
captionLayout: s,
|
|
30
|
+
locale: o,
|
|
31
|
+
formatters: {
|
|
32
|
+
formatMonthDropdown: (a) => a.toLocaleString(o?.code, { month: "short" }),
|
|
33
|
+
...i
|
|
34
|
+
},
|
|
35
|
+
classNames: {
|
|
36
|
+
root: e("w-fit", t.root),
|
|
37
|
+
months: e(
|
|
38
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
39
|
+
t.months
|
|
40
|
+
),
|
|
41
|
+
month: e("flex w-full flex-col gap-4", t.month),
|
|
42
|
+
nav: e(
|
|
43
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
44
|
+
t.nav
|
|
45
|
+
),
|
|
46
|
+
button_previous: e(
|
|
47
|
+
p({ variant: u }),
|
|
48
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
49
|
+
t.button_previous
|
|
50
|
+
),
|
|
51
|
+
button_next: e(
|
|
52
|
+
p({ variant: u }),
|
|
53
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
54
|
+
t.button_next
|
|
55
|
+
),
|
|
56
|
+
month_caption: e(
|
|
57
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
58
|
+
t.month_caption
|
|
59
|
+
),
|
|
60
|
+
dropdowns: e(
|
|
61
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
62
|
+
t.dropdowns
|
|
63
|
+
),
|
|
64
|
+
dropdown_root: e(
|
|
65
|
+
"relative rounded-(--cell-radius)",
|
|
66
|
+
t.dropdown_root
|
|
67
|
+
),
|
|
68
|
+
dropdown: e(
|
|
69
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
70
|
+
t.dropdown
|
|
71
|
+
),
|
|
72
|
+
caption_label: e(
|
|
73
|
+
"font-medium select-none",
|
|
74
|
+
s === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
75
|
+
t.caption_label
|
|
76
|
+
),
|
|
77
|
+
weekdays: e("flex", t.weekdays),
|
|
78
|
+
weekday: e(
|
|
79
|
+
"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
80
|
+
t.weekday
|
|
81
|
+
),
|
|
82
|
+
week: e("mt-2 flex w-full", t.week),
|
|
83
|
+
week_number_header: e(
|
|
84
|
+
"w-(--cell-size) select-none",
|
|
85
|
+
t.week_number_header
|
|
86
|
+
),
|
|
87
|
+
week_number: e(
|
|
88
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
89
|
+
t.week_number
|
|
90
|
+
),
|
|
91
|
+
day: e(
|
|
92
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
93
|
+
f.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
94
|
+
t.day
|
|
95
|
+
),
|
|
96
|
+
range_start: e(
|
|
97
|
+
"relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
|
|
98
|
+
t.range_start
|
|
99
|
+
),
|
|
100
|
+
range_middle: e("rounded-none", t.range_middle),
|
|
101
|
+
range_end: e(
|
|
102
|
+
"relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
|
|
103
|
+
t.range_end
|
|
104
|
+
),
|
|
105
|
+
today: e(
|
|
106
|
+
"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
|
|
107
|
+
t.today
|
|
108
|
+
),
|
|
109
|
+
outside: e(
|
|
110
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
111
|
+
t.outside
|
|
112
|
+
),
|
|
113
|
+
disabled: e(
|
|
114
|
+
"text-muted-foreground opacity-50",
|
|
115
|
+
t.disabled
|
|
116
|
+
),
|
|
117
|
+
hidden: e("invisible", t.hidden),
|
|
118
|
+
...g
|
|
119
|
+
},
|
|
120
|
+
components: {
|
|
121
|
+
Root: ({ className: a, rootRef: d, ...l }) => /* @__PURE__ */ n(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "calendar",
|
|
125
|
+
ref: d,
|
|
126
|
+
className: e(a),
|
|
127
|
+
...l
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
Chevron: ({ className: a, orientation: d, ...l }) => d === "left" ? /* @__PURE__ */ n(w, { className: e("size-4", a), ...l }) : d === "right" ? /* @__PURE__ */ n(
|
|
131
|
+
y,
|
|
132
|
+
{
|
|
133
|
+
className: e("size-4", a),
|
|
134
|
+
...l
|
|
135
|
+
}
|
|
136
|
+
) : /* @__PURE__ */ n(_, { className: e("size-4", a), ...l }),
|
|
137
|
+
DayButton: ({ ...a }) => /* @__PURE__ */ n(z, { locale: o, ...a }),
|
|
138
|
+
WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n("td", { ...d, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
|
|
139
|
+
...x
|
|
140
|
+
},
|
|
141
|
+
...f
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function z({
|
|
146
|
+
className: c,
|
|
147
|
+
day: g,
|
|
148
|
+
modifiers: r,
|
|
149
|
+
locale: s,
|
|
150
|
+
...u
|
|
151
|
+
}) {
|
|
152
|
+
const o = b(), i = m.useRef(null);
|
|
153
|
+
return m.useEffect(() => {
|
|
154
|
+
r.focused && i.current?.focus();
|
|
155
|
+
}, [r.focused]), /* @__PURE__ */ n(
|
|
156
|
+
v,
|
|
157
|
+
{
|
|
158
|
+
ref: i,
|
|
159
|
+
variant: "ghost",
|
|
160
|
+
size: "icon",
|
|
161
|
+
"data-day": g.date.toLocaleDateString(s?.code),
|
|
162
|
+
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
163
|
+
"data-range-start": r.range_start,
|
|
164
|
+
"data-range-end": r.range_end,
|
|
165
|
+
"data-range-middle": r.range_middle,
|
|
166
|
+
className: e(
|
|
167
|
+
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 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-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) 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-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
168
|
+
o.day,
|
|
169
|
+
c
|
|
170
|
+
),
|
|
171
|
+
...u
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
R as Calendar,
|
|
177
|
+
z as CalendarDayButton
|
|
178
|
+
};
|
|
179
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/calendar/index.tsx"],"sourcesContent":["'use client'\n\nimport {\n\tChevronDownIcon,\n\tChevronLeftIcon,\n\tChevronRightIcon,\n} from 'lucide-react'\nimport * as React from 'react'\nimport {\n\ttype DayButton,\n\tDayPicker,\n\tgetDefaultClassNames,\n\ttype Locale,\n} from 'react-day-picker'\nimport { cn } from '../../utils/cn'\nimport { Button, buttonVariants } from '../button'\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\tcaptionLayout = 'label',\n\tbuttonVariant = 'ghost',\n\tlocale,\n\tformatters,\n\tcomponents,\n\t...props\n}: React.ComponentProps<typeof DayPicker> & {\n\tbuttonVariant?: React.ComponentProps<typeof Button>['variant']\n}) {\n\tconst defaultClassNames = getDefaultClassNames()\n\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\n\t\t\t\t'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n\t\t\t\tString.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tcaptionLayout={captionLayout}\n\t\t\tlocale={locale}\n\t\t\tformatters={{\n\t\t\t\tformatMonthDropdown: (date) =>\n\t\t\t\t\tdate.toLocaleString(locale?.code, { month: 'short' }),\n\t\t\t\t...formatters,\n\t\t\t}}\n\t\t\tclassNames={{\n\t\t\t\troot: cn('w-fit', defaultClassNames.root),\n\t\t\t\tmonths: cn(\n\t\t\t\t\t'relative flex flex-col gap-4 md:flex-row',\n\t\t\t\t\tdefaultClassNames.months,\n\t\t\t\t),\n\t\t\t\tmonth: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n\t\t\t\tnav: cn(\n\t\t\t\t\t'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',\n\t\t\t\t\tdefaultClassNames.nav,\n\t\t\t\t),\n\t\t\t\tbutton_previous: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n\t\t\t\t\tdefaultClassNames.button_previous,\n\t\t\t\t),\n\t\t\t\tbutton_next: cn(\n\t\t\t\t\tbuttonVariants({ variant: buttonVariant }),\n\t\t\t\t\t'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n\t\t\t\t\tdefaultClassNames.button_next,\n\t\t\t\t),\n\t\t\t\tmonth_caption: cn(\n\t\t\t\t\t'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n\t\t\t\t\tdefaultClassNames.month_caption,\n\t\t\t\t),\n\t\t\t\tdropdowns: cn(\n\t\t\t\t\t'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n\t\t\t\t\tdefaultClassNames.dropdowns,\n\t\t\t\t),\n\t\t\t\tdropdown_root: cn(\n\t\t\t\t\t'relative rounded-(--cell-radius)',\n\t\t\t\t\tdefaultClassNames.dropdown_root,\n\t\t\t\t),\n\t\t\t\tdropdown: cn(\n\t\t\t\t\t'absolute inset-0 bg-popover opacity-0',\n\t\t\t\t\tdefaultClassNames.dropdown,\n\t\t\t\t),\n\t\t\t\tcaption_label: cn(\n\t\t\t\t\t'font-medium select-none',\n\t\t\t\t\tcaptionLayout === 'label'\n\t\t\t\t\t\t? 'text-sm'\n\t\t\t\t\t\t: 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n\t\t\t\t\tdefaultClassNames.caption_label,\n\t\t\t\t),\n\t\t\t\tweekdays: cn('flex', defaultClassNames.weekdays),\n\t\t\t\tweekday: cn(\n\t\t\t\t\t'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n\t\t\t\t\tdefaultClassNames.weekday,\n\t\t\t\t),\n\t\t\t\tweek: cn('mt-2 flex w-full', defaultClassNames.week),\n\t\t\t\tweek_number_header: cn(\n\t\t\t\t\t'w-(--cell-size) select-none',\n\t\t\t\t\tdefaultClassNames.week_number_header,\n\t\t\t\t),\n\t\t\t\tweek_number: cn(\n\t\t\t\t\t'text-[0.8rem] text-muted-foreground select-none',\n\t\t\t\t\tdefaultClassNames.week_number,\n\t\t\t\t),\n\t\t\t\tday: cn(\n\t\t\t\t\t'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)',\n\t\t\t\t\tprops.showWeekNumber\n\t\t\t\t\t\t? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)'\n\t\t\t\t\t\t: '[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)',\n\t\t\t\t\tdefaultClassNames.day,\n\t\t\t\t),\n\t\t\t\trange_start: cn(\n\t\t\t\t\t'relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted',\n\t\t\t\t\tdefaultClassNames.range_start,\n\t\t\t\t),\n\t\t\t\trange_middle: cn('rounded-none', defaultClassNames.range_middle),\n\t\t\t\trange_end: cn(\n\t\t\t\t\t'relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted',\n\t\t\t\t\tdefaultClassNames.range_end,\n\t\t\t\t),\n\t\t\t\ttoday: cn(\n\t\t\t\t\t'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n\t\t\t\t\tdefaultClassNames.today,\n\t\t\t\t),\n\t\t\t\toutside: cn(\n\t\t\t\t\t'text-muted-foreground aria-selected:text-muted-foreground',\n\t\t\t\t\tdefaultClassNames.outside,\n\t\t\t\t),\n\t\t\t\tdisabled: cn(\n\t\t\t\t\t'text-muted-foreground opacity-50',\n\t\t\t\t\tdefaultClassNames.disabled,\n\t\t\t\t),\n\t\t\t\thidden: cn('invisible', defaultClassNames.hidden),\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tRoot: ({ className, rootRef, ...props }) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-slot='calendar'\n\t\t\t\t\t\t\tref={rootRef}\n\t\t\t\t\t\t\tclassName={cn(className)}\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\tChevron: ({ className, orientation, ...props }) => {\n\t\t\t\t\tif (orientation === 'left') {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ChevronLeftIcon className={cn('size-4', className)} {...props} />\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\n\t\t\t\t\tif (orientation === 'right') {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ChevronRightIcon\n\t\t\t\t\t\t\t\tclassName={cn('size-4', className)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ChevronDownIcon className={cn('size-4', className)} {...props} />\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\tDayButton: ({ ...props }) => (\n\t\t\t\t\t<CalendarDayButton locale={locale} {...props} />\n\t\t\t\t),\n\t\t\t\tWeekNumber: ({ children, ...props }) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<td {...props}>\n\t\t\t\t\t\t\t<div className='flex size-(--cell-size) items-center justify-center text-center'>\n\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t...components,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CalendarDayButton({\n\tclassName,\n\tday,\n\tmodifiers,\n\tlocale,\n\t...props\n}: React.ComponentProps<typeof DayButton> & { locale?: Partial<Locale> }) {\n\tconst defaultClassNames = getDefaultClassNames()\n\n\tconst ref = React.useRef<HTMLButtonElement>(null)\n\tReact.useEffect(() => {\n\t\tif (modifiers.focused) ref.current?.focus()\n\t}, [modifiers.focused])\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant='ghost'\n\t\t\tsize='icon'\n\t\t\tdata-day={day.date.toLocaleDateString(locale?.code)}\n\t\t\tdata-selected-single={\n\t\t\t\tmodifiers.selected &&\n\t\t\t\t!modifiers.range_start &&\n\t\t\t\t!modifiers.range_end &&\n\t\t\t\t!modifiers.range_middle\n\t\t\t}\n\t\t\tdata-range-start={modifiers.range_start}\n\t\t\tdata-range-end={modifiers.range_end}\n\t\t\tdata-range-middle={modifiers.range_middle}\n\t\t\tclassName={cn(\n\t\t\t\t'relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 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-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) 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-foreground [&>span]:text-xs [&>span]:opacity-70',\n\t\t\t\tdefaultClassNames.day,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Calendar, CalendarDayButton }\n"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","locale","formatters","components","props","defaultClassNames","getDefaultClassNames","jsx","DayPicker","cn","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","React","Button"],"mappings":"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"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../utils/cn.js";
|
|
3
|
+
function i({
|
|
4
|
+
className: a,
|
|
5
|
+
size: t = "default",
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "card",
|
|
12
|
+
"data-size": t,
|
|
13
|
+
className: d(
|
|
14
|
+
"group/card flex flex-col gap-4 overflow-hidden rounded-xl border-0 bg-card/95 py-5 shadow-(--surface-shadow) text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
15
|
+
a
|
|
16
|
+
),
|
|
17
|
+
...e
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function c({ className: a, ...t }) {
|
|
22
|
+
return /* @__PURE__ */ r(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "card-header",
|
|
26
|
+
className: d(
|
|
27
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-5 sm:px-6 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-5 group-data-[size=sm]/card:[.border-b]:pb-4",
|
|
28
|
+
a
|
|
29
|
+
),
|
|
30
|
+
...t
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function n({ className: a, ...t }) {
|
|
35
|
+
return /* @__PURE__ */ r(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "card-title",
|
|
39
|
+
className: d(
|
|
40
|
+
"font-heading text-lg leading-snug font-semibold tracking-tight group-data-[size=sm]/card:text-sm",
|
|
41
|
+
a
|
|
42
|
+
),
|
|
43
|
+
...t
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function l({ className: a, ...t }) {
|
|
48
|
+
return /* @__PURE__ */ r(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "card-description",
|
|
52
|
+
className: d("text-sm text-muted-foreground", a),
|
|
53
|
+
...t
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function u({ className: a, ...t }) {
|
|
58
|
+
return /* @__PURE__ */ r(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "card-action",
|
|
62
|
+
className: d(
|
|
63
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
64
|
+
a
|
|
65
|
+
),
|
|
66
|
+
...t
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
function p({ className: a, ...t }) {
|
|
71
|
+
return /* @__PURE__ */ r(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
"data-slot": "card-content",
|
|
75
|
+
className: d("px-5 sm:px-6 group-data-[size=sm]/card:px-3", a),
|
|
76
|
+
...t
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function m({ className: a, ...t }) {
|
|
81
|
+
return /* @__PURE__ */ r(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "card-footer",
|
|
85
|
+
className: d(
|
|
86
|
+
"flex items-center rounded-b-xl mt-1 border-t bg-transparent p-5 pt-6 sm:px-6 group-data-[size=sm]/card:p-3 group-data-[size=sm]/card:pt-4",
|
|
87
|
+
a
|
|
88
|
+
),
|
|
89
|
+
...t
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
i as Card,
|
|
95
|
+
u as CardAction,
|
|
96
|
+
p as CardContent,
|
|
97
|
+
l as CardDescription,
|
|
98
|
+
m as CardFooter,
|
|
99
|
+
c as CardHeader,
|
|
100
|
+
n as CardTitle
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/card/index.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Card({\n\tclassName,\n\tsize = 'default',\n\t...props\n}: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t'group/card flex flex-col gap-4 overflow-hidden rounded-xl border-0 bg-card/95 py-5 shadow-(--surface-shadow) text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-header'\n\t\t\tclassName={cn(\n\t\t\t\t'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-5 sm:px-6 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-5 group-data-[size=sm]/card:[.border-b]:pb-4',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-title'\n\t\t\tclassName={cn(\n\t\t\t\t'font-heading text-lg leading-snug font-semibold tracking-tight group-data-[size=sm]/card:text-sm',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-description'\n\t\t\tclassName={cn('text-sm text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-action'\n\t\t\tclassName={cn(\n\t\t\t\t'col-start-2 row-span-2 row-start-1 self-start justify-self-end',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-content'\n\t\t\tclassName={cn('px-5 sm:px-6 group-data-[size=sm]/card:px-3', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='card-footer'\n\t\t\tclassName={cn(\n\t\t\t\t'flex items-center rounded-b-xl mt-1 border-t bg-transparent p-5 pt-6 sm:px-6 group-data-[size=sm]/card:p-3 group-data-[size=sm]/card:pt-4',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport {\n\tCard,\n\tCardAction,\n\tCardContent,\n\tCardDescription,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n}\n"],"names":["Card","className","size","props","jsx","cn","CardHeader","CardTitle","CardDescription","CardAction","CardContent","CardFooter"],"mappings":";;AAIA,SAASA,EAAK;AAAA,EACb,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACJ,GAA8D;AAC7D,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,aAAWF;AAAA,MACX,WAAWG;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASG,EAAW,EAAE,WAAAL,GAAW,GAAGE,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASI,EAAU,EAAE,WAAAN,GAAW,GAAGE,KAAsC;AACxE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASK,EAAgB,EAAE,WAAAP,GAAW,GAAGE,KAAsC;AAC9E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,iCAAiCJ,CAAS;AAAA,MACvD,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAW,EAAE,WAAAR,GAAW,GAAGE,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASO,EAAY,EAAE,WAAAT,GAAW,GAAGE,KAAsC;AAC1E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,+CAA+CJ,CAAS;AAAA,MACrE,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASQ,EAAW,EAAE,WAAAV,GAAW,GAAGE,KAAsC;AACzE,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|