@codefast/ui 0.0.47 → 0.0.49
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/chunk-JPRGRYAM.js +2 -0
- package/dist/chunk-JPRGRYAM.js.map +1 -0
- package/dist/chunk-PPEAG5G4.mjs +2 -0
- package/dist/chunk-PPEAG5G4.mjs.map +1 -0
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.mjs +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/button.mjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/calendar.mjs +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.mjs +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/form.d.mts +6 -6
- package/dist/react/form.d.ts +6 -6
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/form.mjs +1 -1
- package/dist/react/form.mjs.map +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.mjs +1 -1
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/package.json +6 -6
- package/src/react/button.tsx +6 -6
- package/src/react/form.tsx +8 -6
- package/tailwind.config.ts +2 -2
- package/dist/chunk-24MQV5BV.js +0 -2
- package/dist/chunk-24MQV5BV.js.map +0 -1
- package/dist/chunk-VY7GIEVM.mjs +0 -2
- package/dist/chunk-VY7GIEVM.mjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkZTEJNUH6js = require('./chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('./chunk-HQ4AUOQM.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _jsxruntime = require('react/jsx-runtime');var y=_chunkHQ4AUOQMjs.a.call(void 0, {base:"inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm"},size:{default:"h-10 px-4 gap-2",xs:"h-8 px-2 gap-1",sm:"h-9 px-3 gap-2",lg:"h-11 px-8 gap-2",icon:"size-10 gap-2","icon-xs":"size-8","icon-sm":"size-9","icon-lg":"size-11"},loading:{true:"relative"}},defaultVariants:{size:"default",variant:"default",loading:!1}}),x= exports.b =i.forwardRef(({children:e,className:u,variant:d,size:p,loading:o=!1,asChild:n=!1,...r},l)=>{let c=n?_reactslot.Slot:"button",m=n?"span":_react.Fragment,f=o||r.disabled;return _jsxruntime.jsx.call(void 0, c,{ref:l,type:n?void 0:"button",className:y({variant:d,size:p,loading:o,className:u}),...r,disabled:f,children:o?_jsxruntime.jsxs.call(void 0, m,{children:[_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":!0,className:"invisible contents",children:e}),_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{children:e}),_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, _chunkZTEJNUH6js.a,{})})]}):e})});x.displayName="Button";exports.a = y; exports.b = x;
|
|
2
|
+
//# sourceMappingURL=chunk-JPRGRYAM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/button.tsx"],"names":["React","Fragment","Slot","VisuallyHidden","jsx","jsxs","buttonVariants","cva","Button","children","className","variant","size","loading","asChild","props","ref","Component","ComponentLoading","disabled","Spinner"],"mappings":"2EAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBAErB,OAAS,kBAAAC,MAAsB,kCAmFrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBA3EV,IAAMC,EAAiBC,EAAI,CACzB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YACE,+EACF,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UACE,wEACJ,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,gBACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAgBKC,EAAe,aACnB,CACE,CACE,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,IACG,CACH,IAAMC,EAAYH,EAAUZ,EAAO,SAC7BgB,EAAmBJ,EAAU,OAASb,EACtCkB,EAAWN,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,KAAMF,EAAU,OAAY,SAC5B,UAAWR,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC9D,GAAGK,EACJ,SAAUI,EAET,SAAAN,EACCR,EAACa,EAAA,CACC,UAAAd,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACD,EAAA,CAAgB,SAAAM,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACgB,EAAA,EAAQ,EACX,GACF,EAEAX,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'cva';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cva } from '../lib/utils';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 px-4 gap-2',\n xs: 'h-8 px-2 gap-1',\n sm: 'h-9 px-3 gap-2',\n lg: 'h-11 px-8 gap-2',\n icon: 'size-10 gap-2',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n (\n {\n children,\n className,\n variant,\n size,\n loading = false,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : 'button'}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as s}from"./chunk-P5AV3QU7.mjs";import{a}from"./chunk-LEUB3C3L.mjs";import*as i from"react";import{Fragment as b}from"react";import{Slot as g}from"@radix-ui/react-slot";import{VisuallyHidden as v}from"@radix-ui/react-visually-hidden";import{jsx as t,jsxs as h}from"react/jsx-runtime";var y=a({base:"inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm"},size:{default:"h-10 px-4 gap-2",xs:"h-8 px-2 gap-1",sm:"h-9 px-3 gap-2",lg:"h-11 px-8 gap-2",icon:"size-10 gap-2","icon-xs":"size-8","icon-sm":"size-9","icon-lg":"size-11"},loading:{true:"relative"}},defaultVariants:{size:"default",variant:"default",loading:!1}}),x=i.forwardRef(({children:e,className:u,variant:d,size:p,loading:o=!1,asChild:n=!1,...r},l)=>{let c=n?g:"button",m=n?"span":b,f=o||r.disabled;return t(c,{ref:l,type:n?void 0:"button",className:y({variant:d,size:p,loading:o,className:u}),...r,disabled:f,children:o?h(m,{children:[t("span",{"aria-hidden":!0,className:"invisible contents",children:e}),t(v,{children:e}),t("span",{className:"absolute inset-0 flex items-center justify-center",children:t(s,{})})]}):e})});x.displayName="Button";export{y as a,x as b};
|
|
2
|
+
//# sourceMappingURL=chunk-PPEAG5G4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'cva';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cva } from '../lib/utils';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 px-4 gap-2',\n xs: 'h-8 px-2 gap-1',\n sm: 'h-9 px-3 gap-2',\n lg: 'h-11 px-8 gap-2',\n icon: 'size-10 gap-2',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n (\n {\n children,\n className,\n variant,\n size,\n loading = false,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : 'button'}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"],"mappings":"6EAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBAErB,OAAS,kBAAAC,MAAsB,kCAmFrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBA3EV,IAAMC,EAAiBC,EAAI,CACzB,KAAM,gPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YACE,+EACF,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UACE,wEACJ,EACA,KAAM,CACJ,QAAS,kBACT,GAAI,iBACJ,GAAI,iBACJ,GAAI,kBACJ,KAAM,gBACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAgBKC,EAAe,aACnB,CACE,CACE,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,IACG,CACH,IAAMC,EAAYH,EAAUI,EAAO,SAC7BC,EAAmBL,EAAU,OAASM,EACtCC,EAAWR,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,KAAMF,EAAU,OAAY,SAC5B,UAAWR,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC9D,GAAGK,EACJ,SAAUM,EAET,SAAAR,EACCR,EAACc,EAAA,CACC,UAAAf,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACkB,EAAA,CAAgB,SAAAb,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACmB,EAAA,EAAQ,EACX,GACF,EAEAd,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","names":["React","Fragment","Slot","VisuallyHidden","jsx","jsxs","buttonVariants","cva","Button","children","className","variant","size","loading","asChild","props","ref","Component","Slot","ComponentLoading","Fragment","disabled","VisuallyHidden","Spinner"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactalertdialog = require('@radix-ui/react-alert-dialog'); var e = _interopRequireWildcard(_reactalertdialog);var _jsxruntime = require('react/jsx-runtime');var d=e.Root,P= exports.AlertDialogTrigger =e.Trigger,s= exports.AlertDialogContent =r.forwardRef(({className:t,...i},o)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsx.call(void 0, e.Content,{ref:o,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t),...i})]}));s.displayName=e.Content.displayName;function y({className:t,...i}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col space-y-2 text-center","sm:text-left",t),...i})}function R({className:t,...i}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",t),...i})}var p=r.forwardRef(({className:t,...i},o)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:o,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-lg font-semibold",t),...i}));p.displayName=e.Title.displayName;var m=r.forwardRef(({className:t,...i},o)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:o,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-sm",t),...i}));m.displayName=e.Description.displayName;var g=r.forwardRef(({className:t,...i},o)=>_jsxruntime.jsx.call(void 0, e.Action,{ref:o,className:_chunkJPRGRYAMjs.a.call(void 0, {className:t}),...i}));g.displayName=e.Action.displayName;var A=r.forwardRef(({className:t,...i},o)=>_jsxruntime.jsx.call(void 0, e.Cancel,{ref:o,className:_chunkJPRGRYAMjs.a.call(void 0, {variant:"outline",className:t}),...i}));A.displayName=e.Cancel.displayName;exports.AlertDialog = d; exports.AlertDialogAction = g; exports.AlertDialogCancel = A; exports.AlertDialogContent = s; exports.AlertDialogDescription = m; exports.AlertDialogFooter = R; exports.AlertDialogHeader = y; exports.AlertDialogTitle = p; exports.AlertDialogTrigger = P;
|
|
2
2
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as n}from"../chunk-
|
|
1
|
+
"use client";import{a as n}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import{b as a}from"../chunk-LEUB3C3L.mjs";import*as r from"react";import*as e from"@radix-ui/react-alert-dialog";import{jsx as l,jsxs as D}from"react/jsx-runtime";var d=e.Root,P=e.Trigger,s=r.forwardRef(({className:t,...i},o)=>D(e.Portal,{children:[l(e.Overlay,{className:"data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),l(e.Content,{ref:o,className:a("bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t),...i})]}));s.displayName=e.Content.displayName;function y({className:t,...i}){return l("div",{className:a("flex flex-col space-y-2 text-center","sm:text-left",t),...i})}function R({className:t,...i}){return l("div",{className:a("flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",t),...i})}var p=r.forwardRef(({className:t,...i},o)=>l(e.Title,{ref:o,className:a("text-lg font-semibold",t),...i}));p.displayName=e.Title.displayName;var m=r.forwardRef(({className:t,...i},o)=>l(e.Description,{ref:o,className:a("text-muted-foreground text-sm",t),...i}));m.displayName=e.Description.displayName;var g=r.forwardRef(({className:t,...i},o)=>l(e.Action,{ref:o,className:n({className:t}),...i}));g.displayName=e.Action.displayName;var A=r.forwardRef(({className:t,...i},o)=>l(e.Cancel,{ref:o,className:n({variant:"outline",className:t}),...i}));A.displayName=e.Cancel.displayName;export{d as AlertDialog,g as AlertDialogAction,A as AlertDialogCancel,s as AlertDialogContent,m as AlertDialogDescription,R as AlertDialogFooter,y as AlertDialogHeader,p as AlertDialogTitle,P as AlertDialogTrigger};
|
|
2
2
|
//# sourceMappingURL=alert-dialog.mjs.map
|
package/dist/react/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');require('../chunk-HQ4AUOQM.js');exports.Button = _chunkJPRGRYAMjs.b; exports.buttonVariants = _chunkJPRGRYAMjs.a;
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
package/dist/react/button.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import"../chunk-LEUB3C3L.mjs";export{b as Button,a as buttonVariants};
|
|
2
2
|
//# sourceMappingURL=button.mjs.map
|
package/dist/react/calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _reactdaypicker = require('react-day-picker');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function l({children:t,...e}){return _jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4",...e})}function m({children:t,...e}){return _jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4",...e})}function g({className:t,classNames:e,showOutsideDays:d=!0,...o}){return _jsxruntime.jsx.call(void 0, _reactdaypicker.DayPicker,{showOutsideDays:d,className:_chunkHQ4AUOQMjs.b.call(void 0, "p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:_chunkJPRGRYAMjs.a.call(void 0, {variant:"outline",className:"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"}),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-xs",row:"flex w-full mt-2",cell:_chunkHQ4AUOQMjs.b.call(void 0, "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-start)]:rounded-l-md [&:has(>.day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:_chunkJPRGRYAMjs.a.call(void 0, {variant:"ghost",className:"size-9 p-0 font-normal aria-selected:opacity-100"}),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:l,IconRight:m},...o})}exports.Calendar = g;
|
|
2
2
|
//# sourceMappingURL=calendar.js.map
|
package/dist/react/calendar.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as r}from"../chunk-
|
|
1
|
+
"use client";import{a as r}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import{b as a}from"../chunk-LEUB3C3L.mjs";import{DayPicker as s}from"react-day-picker";import{ChevronLeftIcon as c,ChevronRightIcon as i}from"@radix-ui/react-icons";import{jsx as n}from"react/jsx-runtime";function l({children:t,...e}){return n(c,{className:"size-4",...e})}function m({children:t,...e}){return n(i,{className:"size-4",...e})}function g({className:t,classNames:e,showOutsideDays:d=!0,...o}){return n(s,{showOutsideDays:d,className:a("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:r({variant:"outline",className:"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"}),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-xs",row:"flex w-full mt-2",cell:a("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-start)]:rounded-l-md [&:has(>.day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:r({variant:"ghost",className:"size-9 p-0 font-normal aria-selected:opacity-100"}),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:l,IconRight:m},...o})}export{g as Calendar};
|
|
2
2
|
//# sourceMappingURL=calendar.mjs.map
|
package/dist/react/carousel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var e = _interopRequireWildcard(_react);var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);var _reacticons = require('@radix-ui/react-icons');var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var N="Carousel",[D]=_reactcontext.createContextScope.call(void 0, N),[U,f]=D(N),_= exports.Carousel =e.forwardRef(({__scopeCarousel:l,children:a,orientation:s,opts:r,setApi:t,plugins:c,className:p,...C},m)=>{let[T,o]=_emblacarouselreact2.default.call(void 0, {...r,axis:s==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),P=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),y=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _2 => _2.scrollPrev, 'call', _3 => _3()])},[o]),v=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _4 => _4.scrollNext, 'call', _5 => _5()])},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),y()):u.key==="ArrowRight"&&(u.preventDefault(),v())},[y,v]);return e.useEffect(()=>{!o||!t||t(o)},[o,t]),e.useEffect(()=>{if(o)return P(o),o.on("reInit",P),o.on("select",P),()=>{o.off("select",P)}},[o,P]),_jsxruntime.jsx.call(void 0, U,{scope:l,carouselRef:T,api:o,opts:r,orientation:_nullishCoalesce(s, () => ((_optionalChain([r, 'optionalAccess', _6 => _6.axis])==="y"?"vertical":"horizontal"))),scrollPrev:y,scrollNext:v,canScrollPrev:L,canScrollNext:M,children:_jsxruntime.jsx.call(void 0, "div",{ref:m,onKeyDownCapture:I,className:_chunkHQ4AUOQMjs.b.call(void 0, "relative",p),role:"region","aria-roledescription":"carousel",...C,children:a})})});_.displayName=N;var E="CarouselContent",g= exports.CarouselContent =e.forwardRef(({__scopeCarousel:l,className:a,...s},r)=>{let{carouselRef:t,orientation:c}=f(E,l);return _jsxruntime.jsx.call(void 0, "div",{ref:t,className:"overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{ref:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex",c==="horizontal"?"-ml-4":"-mt-4 flex-col",a),...s})})});g.displayName=E;var R="CarouselItem",k= exports.CarouselItem =e.forwardRef(({__scopeCarousel:l,className:a,...s},r)=>{let{orientation:t}=f(R,l);return _jsxruntime.jsx.call(void 0, "div",{ref:r,role:"group","aria-roledescription":"slide",className:_chunkHQ4AUOQMjs.b.call(void 0, "min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",a),...s})});k.displayName=R;var x="CarouselPrevious",O= exports.CarouselPrevious =e.forwardRef(({__scopeCarousel:l,className:a,variant:s="outline",size:r="icon",...t},c)=>{let{orientation:p,scrollPrev:C,canScrollPrev:m}=f(x,l);return _jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{ref:c,variant:s,size:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "absolute size-8 rounded-full",p==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!m,onClick:C,...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=x;var S="CarouselNext",K= exports.CarouselNext =e.forwardRef(({__scopeCarousel:l,className:a,variant:s="outline",size:r="icon",...t},c)=>{let{orientation:p,scrollNext:C,canScrollNext:m}=f(S,l);return _jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{ref:c,variant:s,size:r,className:_chunkHQ4AUOQMjs.b.call(void 0, "absolute size-8 rounded-full",p==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!m,onClick:C,...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowRightIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Next slide"})]})});K.displayName=S;exports.Carousel = _; exports.CarouselContent = g; exports.CarouselItem = k; exports.CarouselNext = K; exports.CarouselPrevious = O;
|
|
2
2
|
//# sourceMappingURL=carousel.js.map
|
package/dist/react/carousel.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{b as d}from"../chunk-
|
|
1
|
+
"use client";import{b as d}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import{b as i}from"../chunk-LEUB3C3L.mjs";import*as e from"react";import h from"embla-carousel-react";import{ArrowLeftIcon as z,ArrowRightIcon as H}from"@radix-ui/react-icons";import{createContextScope as B}from"@radix-ui/react-context";import{jsx as n,jsxs as b}from"react/jsx-runtime";var N="Carousel",[D]=B(N),[U,f]=D(N),_=e.forwardRef(({__scopeCarousel:l,children:a,orientation:s,opts:r,setApi:t,plugins:c,className:p,...C},m)=>{let[T,o]=h({...r,axis:s==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),P=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),y=e.useCallback(()=>{o?.scrollPrev()},[o]),v=e.useCallback(()=>{o?.scrollNext()},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),y()):u.key==="ArrowRight"&&(u.preventDefault(),v())},[y,v]);return e.useEffect(()=>{!o||!t||t(o)},[o,t]),e.useEffect(()=>{if(o)return P(o),o.on("reInit",P),o.on("select",P),()=>{o.off("select",P)}},[o,P]),n(U,{scope:l,carouselRef:T,api:o,opts:r,orientation:s??(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:y,scrollNext:v,canScrollPrev:L,canScrollNext:M,children:n("div",{ref:m,onKeyDownCapture:I,className:i("relative",p),role:"region","aria-roledescription":"carousel",...C,children:a})})});_.displayName=N;var E="CarouselContent",g=e.forwardRef(({__scopeCarousel:l,className:a,...s},r)=>{let{carouselRef:t,orientation:c}=f(E,l);return n("div",{ref:t,className:"overflow-hidden",children:n("div",{ref:r,className:i("flex",c==="horizontal"?"-ml-4":"-mt-4 flex-col",a),...s})})});g.displayName=E;var R="CarouselItem",k=e.forwardRef(({__scopeCarousel:l,className:a,...s},r)=>{let{orientation:t}=f(R,l);return n("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",a),...s})});k.displayName=R;var x="CarouselPrevious",O=e.forwardRef(({__scopeCarousel:l,className:a,variant:s="outline",size:r="icon",...t},c)=>{let{orientation:p,scrollPrev:C,canScrollPrev:m}=f(x,l);return b(d,{ref:c,variant:s,size:r,className:i("absolute size-8 rounded-full",p==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!m,onClick:C,...t,children:[n(z,{className:"size-4"}),n("span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=x;var S="CarouselNext",K=e.forwardRef(({__scopeCarousel:l,className:a,variant:s="outline",size:r="icon",...t},c)=>{let{orientation:p,scrollNext:C,canScrollNext:m}=f(S,l);return b(d,{ref:c,variant:s,size:r,className:i("absolute size-8 rounded-full",p==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!m,onClick:C,...t,children:[n(H,{className:"size-4"}),n("span",{className:"sr-only",children:"Next slide"})]})});K.displayName=S;export{_ as Carousel,g as CarouselContent,k as CarouselItem,K as CarouselNext,O as CarouselPrevious};
|
|
2
2
|
//# sourceMappingURL=carousel.mjs.map
|
package/dist/react/data-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkSDGUDONZjs = require('../chunk-SDGUDONZ.js');var _chunkOP6Q7VT5js = require('../chunk-OP6Q7VT5.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkSDGUDONZjs = require('../chunk-SDGUDONZ.js');var _chunkOP6Q7VT5js = require('../chunk-OP6Q7VT5.js');var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function A({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.a,{children:[_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"mr-2 size-4"}),"View"]})}),_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.j,{className:"capitalize",checked:n.getIsVisible(),onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex items-center justify-between px-2",n),...s,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of"," ",a.getFilteredRowModel().rows.length," row(s) selected."]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-6 lg:space-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunkSDGUDONZjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunkSDGUDONZjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunkSDGUDONZjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunkSDGUDONZjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunkSDGUDONZjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of"," ",a.getPageCount()]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(0)},disabled:!a.getCanPreviousPage(),children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to first page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"outline",size:"icon-xs",onClick:()=>{a.previousPage()},disabled:!a.getCanPreviousPage(),children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to previous page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"outline",size:"icon-xs",onClick:()=>{a.nextPage()},disabled:!a.getCanNextPage(),children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to next page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},disabled:!a.getCanNextPage(),children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to last page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowRightIcon,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex items-center space-x-2",s),children:_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.a,{children:[_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkJPRGRYAMjs.b,{variant:"ghost",size:"xs",className:"data-[state=open]:bg-accent -ml-3",children:[_jsxruntime.jsx.call(void 0, "span",{children:n}),_jsxruntime.jsx.call(void 0, z,{sorted:a.getIsSorted()})]})}),_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkOP6Q7VT5js.m,{}),_jsxruntime.jsxs.call(void 0, _chunkOP6Q7VT5js.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"ml-2 size-4"});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"ml-2 size-4"});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"ml-2 size-4"})}}exports.DataTableColumnHeader = L; exports.DataTablePagination = B; exports.DataTableViewOptions = A;
|
|
2
2
|
//# sourceMappingURL=data-table.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-MU2MZ434.mjs";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-XHNT6PVI.mjs";import{b as o}from"../chunk-
|
|
1
|
+
"use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-MU2MZ434.mjs";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-XHNT6PVI.mjs";import{b as o}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import{b as l}from"../chunk-LEUB3C3L.mjs";import{ArrowDownIcon as C,ArrowUpIcon as N,CaretSortIcon as v,ChevronLeftIcon as S,ChevronRightIcon as P,DoubleArrowLeftIcon as b,DoubleArrowRightIcon as M,EyeNoneIcon as I,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function A({table:a}){return t(c,{children:[e(d,{asChild:!0,children:t(o,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e(h,{className:"mr-2 size-4"}),"View"]})}),t(m,{align:"end",className:"w-36",children:[e(u,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(p,{className:"capitalize",checked:n.getIsVisible(),onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return t("div",{className:l("flex items-center justify-between px-2",n),...s,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of"," ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(D,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(T,{className:"w-18 h-8",children:e(f,{placeholder:a.getState().pagination.pageSize})}),e(x,{side:"top",children:[10,20,30,40,50].map(i=>e(w,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of"," ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(o,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(0)},disabled:!a.getCanPreviousPage(),children:[e("span",{className:"sr-only",children:"Go to first page"}),e(b,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",onClick:()=>{a.previousPage()},disabled:!a.getCanPreviousPage(),children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(S,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",onClick:()=>{a.nextPage()},disabled:!a.getCanNextPage(),children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},disabled:!a.getCanNextPage(),children:[e("span",{className:"sr-only",children:"Go to last page"}),e(M,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",s),children:t(c,{children:[e(d,{asChild:!0,children:t(o,{variant:"ghost",size:"xs",className:"data-[state=open]:bg-accent -ml-3",children:[e("span",{children:n}),e(z,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(C,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(I,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return e(C,{className:"ml-2 size-4"});case"asc":return e(N,{className:"ml-2 size-4"});default:return e(v,{className:"ml-2 size-4"})}}export{L as DataTableColumnHeader,B as DataTablePagination,A as DataTableViewOptions};
|
|
2
2
|
//# sourceMappingURL=data-table.mjs.map
|
package/dist/react/form.d.mts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import * as react_hook_form from 'react-hook-form';
|
|
4
|
-
import { FieldError, FormProvider, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
4
|
+
import { FieldError, Merge, FieldErrorsImpl, FormProvider, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
7
7
|
|
|
8
8
|
declare const useFormField: () => {
|
|
9
|
+
error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
|
|
10
|
+
formDescriptionId: string;
|
|
11
|
+
formItemId: string;
|
|
12
|
+
formMessageId: string;
|
|
13
|
+
id: string;
|
|
9
14
|
invalid: boolean;
|
|
10
15
|
isDirty: boolean;
|
|
11
16
|
isTouched: boolean;
|
|
12
17
|
isValidating: boolean;
|
|
13
|
-
error?: FieldError | undefined;
|
|
14
|
-
id: string;
|
|
15
18
|
name: string;
|
|
16
|
-
formItemId: string;
|
|
17
|
-
formDescriptionId: string;
|
|
18
|
-
formMessageId: string;
|
|
19
19
|
};
|
|
20
20
|
type FormProps = React.ComponentProps<typeof FormProvider>;
|
|
21
21
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
package/dist/react/form.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import * as react_hook_form from 'react-hook-form';
|
|
4
|
-
import { FieldError, FormProvider, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
4
|
+
import { FieldError, Merge, FieldErrorsImpl, FormProvider, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
7
7
|
|
|
8
8
|
declare const useFormField: () => {
|
|
9
|
+
error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
|
|
10
|
+
formDescriptionId: string;
|
|
11
|
+
formItemId: string;
|
|
12
|
+
formMessageId: string;
|
|
13
|
+
id: string;
|
|
9
14
|
invalid: boolean;
|
|
10
15
|
isDirty: boolean;
|
|
11
16
|
isTouched: boolean;
|
|
12
17
|
isValidating: boolean;
|
|
13
|
-
error?: FieldError | undefined;
|
|
14
|
-
id: string;
|
|
15
18
|
name: string;
|
|
16
|
-
formItemId: string;
|
|
17
|
-
formDescriptionId: string;
|
|
18
|
-
formMessageId: string;
|
|
19
19
|
};
|
|
20
20
|
type FormProps = React.ComponentProps<typeof FormProvider>;
|
|
21
21
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
package/dist/react/form.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkLG7ACTREjs = require('../chunk-LG7ACTRE.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkLG7ACTREjs = require('../chunk-LG7ACTRE.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:o,className:_chunkHQ4AUOQMjs.b.call(void 0, "space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return _jsxruntime.jsx.call(void 0, _chunkLG7ACTREjs.a,{ref:o,className:_chunkHQ4AUOQMjs.b.call(void 0, m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:r,id:m,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:o,id:m,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-xs",e),...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=_optionalChain([s, 'optionalAccess', _ => _.message])?String(s.message):e;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,id:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-destructive text-xs font-medium",r),...o,children:d}):null});C.displayName="FormMessage";exports.Form = b; exports.FormControl = I; exports.FormDescription = x; exports.FormField = h; exports.FormItem = R; exports.FormLabel = g; exports.FormMessage = C; exports.useFormField = n;
|
|
2
2
|
//# sourceMappingURL=form.js.map
|
package/dist/react/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,
|
|
1
|
+
{"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"+FAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,MACK,kBAiFD,cAAAC,MAAA,oBA9DN,IAAMC,EAAyB,gBAC7B,IACF,EAEMC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,CACL,GAAAI,EACA,KAAML,EAAa,KACnB,WAAY,aAAaK,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOZ,EAWb,SAASa,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEZ,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMW,EAAM,IAAK,EACnD,SAAAZ,EAACH,EAAA,CAAY,GAAGe,EAAO,EACzB,CAEJ,CASA,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,IAAMN,EAAW,QAAM,EAEvB,OACET,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAO,CAAG,EACpC,SAAAT,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGF,EAAO,EACnE,CAEJ,CACF,EAEAC,EAAS,YAAc,WAWvB,IAAMI,EAAkB,aACtB,CAAC,CAAE,UAAAH,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAIhB,EAAa,EAE3C,OACEH,EAACoB,EAAA,CACC,IAAKL,EACL,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EACpD,QAASK,EACR,GAAGP,EACN,CAEJ,CACF,EAEAK,EAAU,YAAc,YASxB,IAAMI,EAAoB,aACxB,CAAC,CAAE,GAAGT,CAAM,EAAGG,IAAQ,CACrB,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAC1DpB,EAAa,EAEf,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,GAAII,EACJ,mBACGD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAEX,eAAc,EAAQJ,EACrB,GAAGN,EACN,CAEJ,CACF,EAEAS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAG5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAClC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OACEH,EAAC,KACC,IAAKe,EACL,GAAIO,EACJ,UAAWN,EAAG,gCAAiCF,CAAS,EACvD,GAAGF,EACN,CAEJ,CAAC,EAEDY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aACxB,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAC1C,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIQ,EAEtD,OAAKC,EAKH3B,EAAC,KACC,IAAKe,EACL,GAAIQ,EACJ,UAAWP,EAAG,uCAAwCF,CAAS,EAC9D,GAAGF,EAEH,SAAAe,EACH,EAXO,IAaX,CACF,EAEAF,EAAY,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(\n null,\n);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<\n typeof LabelPrimitive.Root\n>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-muted-foreground text-xs', className)}\n {...props}\n />\n );\n});\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-destructive text-xs font-medium', className)}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
|
package/dist/react/form.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as F}from"../chunk-6FL3EBDQ.mjs";import{b as
|
|
1
|
+
"use client";import{a as F}from"../chunk-6FL3EBDQ.mjs";import{b as a}from"../chunk-LEUB3C3L.mjs";import*as t from"react";import{Slot as u}from"@radix-ui/react-slot";import{Controller as f,FormProvider as P,useFormContext as y}from"react-hook-form";import{jsx as l}from"react/jsx-runtime";var p=t.createContext(null),c=t.createContext(null),n=()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=y();if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b=P;function h({...e}){return l(p.Provider,{value:{name:e.name},children:l(f,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return l(c.Provider,{value:{id:m},children:l("div",{ref:o,className:a("space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return l(F,{ref:o,className:a(m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return l(u,{ref:r,id:m,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return l("p",{ref:o,id:m,className:a("text-muted-foreground text-xs",e),...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=s?.message?String(s.message):e;return d?l("p",{ref:m,id:i,className:a("text-destructive text-xs font-medium",r),...o,children:d}):null});C.displayName="FormMessage";export{b as Form,I as FormControl,x as FormDescription,h as FormField,R as FormItem,g as FormLabel,C as FormMessage,n as useFormField};
|
|
2
2
|
//# sourceMappingURL=form.mjs.map
|
package/dist/react/form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(\n null,\n);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n
|
|
1
|
+
{"version":3,"sources":["../../src/react/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(\n null,\n);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<\n typeof LabelPrimitive.Root\n>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-muted-foreground text-xs', className)}\n {...props}\n />\n );\n});\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-destructive text-xs font-medium', className)}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,MACK,kBAiFD,cAAAC,MAAA,oBA9DN,IAAMC,EAAyB,gBAC7B,IACF,EAEMC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIC,EAAe,EAEpD,GAAI,CAACJ,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMI,EAAaH,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAG,CAAG,EAAIL,EAEf,MAAO,CACL,GAAAK,EACA,KAAMN,EAAa,KACnB,WAAY,aAAaM,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOC,EAWb,SAASC,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEd,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMa,EAAM,IAAK,EACnD,SAAAd,EAACe,EAAA,CAAY,GAAGD,EAAO,EACzB,CAEJ,CASA,IAAME,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,IAAMR,EAAW,QAAM,EAEvB,OACEV,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAQ,CAAG,EACpC,SAAAV,EAAC,OAAI,IAAKkB,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGH,EAAO,EACnE,CAEJ,CACF,EAEAE,EAAS,YAAc,WAWvB,IAAMI,EAAkB,aACtB,CAAC,CAAE,UAAAH,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAChC,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAInB,EAAa,EAE3C,OACEH,EAACuB,EAAA,CACC,IAAKL,EACL,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EACpD,QAASK,EACR,GAAGR,EACN,CAEJ,CACF,EAEAM,EAAU,YAAc,YASxB,IAAMI,EAAoB,aACxB,CAAC,CAAE,GAAGV,CAAM,EAAGI,IAAQ,CACrB,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAC1DvB,EAAa,EAEf,OACEH,EAAC2B,EAAA,CACC,IAAKT,EACL,GAAII,EACJ,mBACGD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAEX,eAAc,EAAQJ,EACrB,GAAGP,EACN,CAEJ,CACF,EAEAU,EAAY,YAAc,cAS1B,IAAMI,EAAwB,aAG5B,CAAC,CAAE,UAAAX,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAClC,GAAM,CAAE,kBAAAO,CAAkB,EAAItB,EAAa,EAE3C,OACEH,EAAC,KACC,IAAKkB,EACL,GAAIO,EACJ,UAAWN,EAAG,gCAAiCF,CAAS,EACvD,GAAGH,EACN,CAEJ,CAAC,EAEDc,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aACxB,CAAC,CAAE,SAAAC,EAAU,UAAAb,EAAW,GAAGH,CAAM,EAAGI,IAAQ,CAC1C,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIvB,EAAa,EACxC4B,EAAOV,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIS,EAEtD,OAAKC,EAKH/B,EAAC,KACC,IAAKkB,EACL,GAAIQ,EACJ,UAAWP,EAAG,uCAAwCF,CAAS,EAC9D,GAAGH,EAEH,SAAAiB,EACH,EAXO,IAaX,CACF,EAEAF,EAAY,YAAc","names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","useFormContext","fieldState","id","Form","FormProvider","FormField","props","Controller","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body"]}
|
package/dist/react/pagination.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkJPRGRYAMjs = require('../chunk-JPRGRYAM.js');require('../chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{role:"navigation","aria-label":"pagination",className:_chunkHQ4AUOQMjs.b.call(void 0, "mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkJPRGRYAMjs.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pl-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pr-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
|
|
2
2
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"../chunk-
|
|
1
|
+
import{a as r}from"../chunk-PPEAG5G4.mjs";import"../chunk-P5AV3QU7.mjs";import{b as e}from"../chunk-LEUB3C3L.mjs";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{role:"navigation","aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 pl-2.5",n),...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",size:"default",className:e("gap-1 pr-2.5",n),...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
|
|
2
2
|
//# sourceMappingURL=pagination.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../tailwind.config.ts"],"names":["fontFamily","
|
|
1
|
+
{"version":3,"sources":["../tailwind.config.ts"],"names":["fontFamily","tailwindcssConfig","animate_plugin_default","perspective_plugin_default","base_plugin_default","tailwind_config_default"],"mappings":"wHACA,OAAS,cAAAA,MAAkB,2BAK3B,IAAMC,EAA4B,CAChC,QAAS,CAAC,gCAAgC,EAC1C,SAAU,CAAC,OAAO,EAClB,QAAS,CAACC,EAASC,EAAaC,CAAI,EACpC,MAAO,CACL,OAAQ,CACN,UAAW,CACT,mBAAoB,8BACpB,qBAAsB,gCACtB,cAAe,kCACjB,EACA,YAAa,CACX,QAAS,oBACX,EACA,aAAc,CACZ,GAAI,yCACJ,QAAS,yBACT,GAAI,0CACJ,GAAI,yCACJ,GAAI,wCACJ,MAAO,yCACP,MAAO,wCACT,EACA,OAAQ,CACN,OAAQ,CACN,QAAS,qBACT,WAAY,+BACd,EACA,WAAY,yBACZ,OAAQ,qBACR,KAAM,CACJ,QAAS,mBACT,WAAY,6BACd,EACA,YAAa,CACX,QAAS,0BACT,WAAY,oCACd,EACA,WAAY,yBACZ,KAAM,CACJ,QAAS,mBACT,WAAY,6BACd,EACA,MAAO,oBACP,MAAO,CACL,QAAS,oBACT,WAAY,8BACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,KAAM,mBACN,UAAW,CACT,QAAS,wBACT,WAAY,kCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,CACF,EACA,WAAY,CACV,KAAM,oBAAoBJ,EAAW,KAAK,KAAK,IAAI,CAAC,GACtD,EACA,UAAW,CACT,mBAAoB,CAClB,KAAM,CACJ,OAAQ,GACV,EACA,GAAI,CACF,OAAQ,yCACV,CACF,EACA,qBAAsB,CACpB,KAAM,CACJ,OAAQ,yCACV,EACA,GAAI,CACF,OAAQ,GACV,CACF,EACA,cAAe,CACb,cAAe,CACb,QAAS,GACX,EACA,UAAW,CACT,QAAS,GACX,CACF,CACF,EACA,aAAc,CACZ,QAAS,kBACX,EACA,UAAW,CACT,QAAS,kBACX,EACA,gBAAiB,CACf,QAAS,wBACX,EACA,QAAS,CACP,IAAM,YACN,GAAI,QACN,EACA,mBAAoB,CAClB,IAAK,OACP,CACF,CACF,CACF,EAEOK,EAAQJ","sourcesContent":["import type { Config } from 'tailwindcss';\nimport { fontFamily } from 'tailwindcss/defaultTheme';\nimport animate from './plugin/animate.plugin';\nimport perspective from './plugin/perspective.plugin';\nimport base from './plugin/base.plugin';\n\nconst tailwindcssConfig: Config = {\n content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],\n darkMode: ['class'],\n plugins: [animate, perspective, base],\n theme: {\n extend: {\n animation: {\n 'collapsible-open': 'collapsible-open 200ms ease',\n 'collapsible-closed': 'collapsible-closed 200ms ease',\n 'caret-blink': 'caret-blink 1000ms ease infinite',\n },\n borderColor: {\n DEFAULT: 'hsl(var(--border))',\n },\n borderRadius: {\n sm: 'calc(var(--radius, 0.25rem) - 0.125px)', // 2px\n DEFAULT: 'var(--radius, 0.25rem)', // 4px\n md: 'calc(var(--radius, 0.25rem) + 0.125rem)', // 6px\n lg: 'calc(var(--radius, 0.25rem) + 0.25rem)', // 8px\n xl: 'calc(var(--radius, 0.25rem) + 0.5rem)', // 12px\n '2xl': 'calc(var(--radius, 0.25rem) + 0.75rem)', // 16px\n '3xl': 'calc(var(--radius, 0.25rem) + 1.25rem)', // 24px\n },\n colors: {\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n background: 'hsl(var(--background))',\n border: 'hsl(var(--border))',\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n foreground: 'hsl(var(--foreground))',\n info: {\n DEFAULT: 'hsl(var(--info))',\n foreground: 'hsl(var(--info-foreground))',\n },\n input: 'hsl(var(--input))',\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n ring: 'hsl(var(--ring))',\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n success: {\n DEFAULT: 'hsl(var(--success))',\n foreground: 'hsl(var(--success-foreground))',\n },\n warning: {\n DEFAULT: 'hsl(var(--warning))',\n foreground: 'hsl(var(--warning-foreground))',\n },\n },\n fontFamily: {\n sans: `var(--font-sans, ${fontFamily.sans.join(', ')})`,\n },\n keyframes: {\n 'collapsible-open': {\n from: {\n height: '0',\n },\n to: {\n height: 'var(--radix-collapsible-content-height)',\n },\n },\n 'collapsible-closed': {\n from: {\n height: 'var(--radix-collapsible-content-height)',\n },\n to: {\n height: '0',\n },\n },\n 'caret-blink': {\n '0%,70%,100%': {\n opacity: '1',\n },\n '20%,50%': {\n opacity: '0',\n },\n },\n },\n outlineColor: {\n DEFAULT: 'hsl(var(--ring))',\n },\n ringColor: {\n DEFAULT: 'hsl(var(--ring))',\n },\n ringOffsetColor: {\n DEFAULT: 'hsl(var(--background))',\n },\n spacing: {\n 0.75: '0.1875rem', // 3px\n 18: '4.5rem', // 72px\n },\n transitionDuration: {\n 250: '250ms',\n },\n },\n },\n};\n\nexport default tailwindcssConfig;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../tailwind.config.ts"],"sourcesContent":["import type { Config } from 'tailwindcss';\nimport { fontFamily } from 'tailwindcss/defaultTheme';\nimport animate from './plugin/animate.plugin';\nimport perspective from './plugin/perspective.plugin';\nimport base from './plugin/base.plugin';\n\nconst
|
|
1
|
+
{"version":3,"sources":["../tailwind.config.ts"],"sourcesContent":["import type { Config } from 'tailwindcss';\nimport { fontFamily } from 'tailwindcss/defaultTheme';\nimport animate from './plugin/animate.plugin';\nimport perspective from './plugin/perspective.plugin';\nimport base from './plugin/base.plugin';\n\nconst tailwindcssConfig: Config = {\n content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],\n darkMode: ['class'],\n plugins: [animate, perspective, base],\n theme: {\n extend: {\n animation: {\n 'collapsible-open': 'collapsible-open 200ms ease',\n 'collapsible-closed': 'collapsible-closed 200ms ease',\n 'caret-blink': 'caret-blink 1000ms ease infinite',\n },\n borderColor: {\n DEFAULT: 'hsl(var(--border))',\n },\n borderRadius: {\n sm: 'calc(var(--radius, 0.25rem) - 0.125px)', // 2px\n DEFAULT: 'var(--radius, 0.25rem)', // 4px\n md: 'calc(var(--radius, 0.25rem) + 0.125rem)', // 6px\n lg: 'calc(var(--radius, 0.25rem) + 0.25rem)', // 8px\n xl: 'calc(var(--radius, 0.25rem) + 0.5rem)', // 12px\n '2xl': 'calc(var(--radius, 0.25rem) + 0.75rem)', // 16px\n '3xl': 'calc(var(--radius, 0.25rem) + 1.25rem)', // 24px\n },\n colors: {\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n background: 'hsl(var(--background))',\n border: 'hsl(var(--border))',\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n foreground: 'hsl(var(--foreground))',\n info: {\n DEFAULT: 'hsl(var(--info))',\n foreground: 'hsl(var(--info-foreground))',\n },\n input: 'hsl(var(--input))',\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n ring: 'hsl(var(--ring))',\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n success: {\n DEFAULT: 'hsl(var(--success))',\n foreground: 'hsl(var(--success-foreground))',\n },\n warning: {\n DEFAULT: 'hsl(var(--warning))',\n foreground: 'hsl(var(--warning-foreground))',\n },\n },\n fontFamily: {\n sans: `var(--font-sans, ${fontFamily.sans.join(', ')})`,\n },\n keyframes: {\n 'collapsible-open': {\n from: {\n height: '0',\n },\n to: {\n height: 'var(--radix-collapsible-content-height)',\n },\n },\n 'collapsible-closed': {\n from: {\n height: 'var(--radix-collapsible-content-height)',\n },\n to: {\n height: '0',\n },\n },\n 'caret-blink': {\n '0%,70%,100%': {\n opacity: '1',\n },\n '20%,50%': {\n opacity: '0',\n },\n },\n },\n outlineColor: {\n DEFAULT: 'hsl(var(--ring))',\n },\n ringColor: {\n DEFAULT: 'hsl(var(--ring))',\n },\n ringOffsetColor: {\n DEFAULT: 'hsl(var(--background))',\n },\n spacing: {\n 0.75: '0.1875rem', // 3px\n 18: '4.5rem', // 72px\n },\n transitionDuration: {\n 250: '250ms',\n },\n },\n },\n};\n\nexport default tailwindcssConfig;\n"],"mappings":"2HACA,OAAS,cAAAA,MAAkB,2BAK3B,IAAMC,EAA4B,CAChC,QAAS,CAAC,gCAAgC,EAC1C,SAAU,CAAC,OAAO,EAClB,QAAS,CAACC,EAASC,EAAaC,CAAI,EACpC,MAAO,CACL,OAAQ,CACN,UAAW,CACT,mBAAoB,8BACpB,qBAAsB,gCACtB,cAAe,kCACjB,EACA,YAAa,CACX,QAAS,oBACX,EACA,aAAc,CACZ,GAAI,yCACJ,QAAS,yBACT,GAAI,0CACJ,GAAI,yCACJ,GAAI,wCACJ,MAAO,yCACP,MAAO,wCACT,EACA,OAAQ,CACN,OAAQ,CACN,QAAS,qBACT,WAAY,+BACd,EACA,WAAY,yBACZ,OAAQ,qBACR,KAAM,CACJ,QAAS,mBACT,WAAY,6BACd,EACA,YAAa,CACX,QAAS,0BACT,WAAY,oCACd,EACA,WAAY,yBACZ,KAAM,CACJ,QAAS,mBACT,WAAY,6BACd,EACA,MAAO,oBACP,MAAO,CACL,QAAS,oBACT,WAAY,8BACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,KAAM,mBACN,UAAW,CACT,QAAS,wBACT,WAAY,kCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,EACA,QAAS,CACP,QAAS,sBACT,WAAY,gCACd,CACF,EACA,WAAY,CACV,KAAM,oBAAoBC,EAAW,KAAK,KAAK,IAAI,CAAC,GACtD,EACA,UAAW,CACT,mBAAoB,CAClB,KAAM,CACJ,OAAQ,GACV,EACA,GAAI,CACF,OAAQ,yCACV,CACF,EACA,qBAAsB,CACpB,KAAM,CACJ,OAAQ,yCACV,EACA,GAAI,CACF,OAAQ,GACV,CACF,EACA,cAAe,CACb,cAAe,CACb,QAAS,GACX,EACA,UAAW,CACT,QAAS,GACX,CACF,CACF,EACA,aAAc,CACZ,QAAS,kBACX,EACA,UAAW,CACT,QAAS,kBACX,EACA,gBAAiB,CACf,QAAS,wBACX,EACA,QAAS,CACP,IAAM,YACN,GAAI,QACN,EACA,mBAAoB,CAClB,IAAK,OACP,CACF,CACF,CACF,EAEOC,EAAQL","names":["fontFamily","tailwindcssConfig","animate_plugin_default","perspective_plugin_default","base_plugin_default","fontFamily","tailwind_config_default"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -387,11 +387,11 @@
|
|
|
387
387
|
"@tanstack/react-table": "^8.17.0",
|
|
388
388
|
"cmdk": "^1.0.0",
|
|
389
389
|
"cva": "1.0.0-beta.1",
|
|
390
|
-
"embla-carousel-react": "^8.
|
|
390
|
+
"embla-carousel-react": "^8.1.3",
|
|
391
391
|
"input-otp": "^1.2.4",
|
|
392
392
|
"next-themes": "^0.3.0",
|
|
393
393
|
"react-day-picker": "^8.10.1",
|
|
394
|
-
"react-hook-form": "^7.51.
|
|
394
|
+
"react-hook-form": "^7.51.5",
|
|
395
395
|
"react-resizable-panels": "^2.0.19",
|
|
396
396
|
"sonner": "^1.4.41",
|
|
397
397
|
"tailwind-merge": "^2.3.0",
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
"devDependencies": {
|
|
401
401
|
"@types/eslint": "^8.56.10",
|
|
402
402
|
"@types/node": "^20.12.12",
|
|
403
|
-
"@types/react": "^18.3.
|
|
403
|
+
"@types/react": "^18.3.3",
|
|
404
404
|
"autoprefixer": "^10.4.19",
|
|
405
405
|
"eslint": "^8.57.0",
|
|
406
406
|
"postcss": "^8.4.38",
|
|
@@ -408,8 +408,8 @@
|
|
|
408
408
|
"tailwindcss": "^3.4.3",
|
|
409
409
|
"tsup": "^8.0.2",
|
|
410
410
|
"typescript": "^5.4.5",
|
|
411
|
-
"@codefast/
|
|
412
|
-
"@codefast/
|
|
411
|
+
"@codefast/eslint-config": "0.0.23",
|
|
412
|
+
"@codefast/typescript-config": "0.0.2"
|
|
413
413
|
},
|
|
414
414
|
"peerDependencies": {
|
|
415
415
|
"@types/react": "^18.2.79",
|
package/src/react/button.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import { Spinner } from './spinner';
|
|
|
11
11
|
* -------------------------------------------------------------------------- */
|
|
12
12
|
|
|
13
13
|
const buttonVariants = cva({
|
|
14
|
-
base: 'inline-flex select-none items-center justify-center
|
|
14
|
+
base: 'inline-flex select-none items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
17
17
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',
|
|
@@ -25,11 +25,11 @@ const buttonVariants = cva({
|
|
|
25
25
|
'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',
|
|
26
26
|
},
|
|
27
27
|
size: {
|
|
28
|
-
default: 'h-10 px-4',
|
|
29
|
-
xs: 'h-8 px-2',
|
|
30
|
-
sm: 'h-9 px-3',
|
|
31
|
-
lg: 'h-11 px-8',
|
|
32
|
-
icon: 'size-10',
|
|
28
|
+
default: 'h-10 px-4 gap-2',
|
|
29
|
+
xs: 'h-8 px-2 gap-1',
|
|
30
|
+
sm: 'h-9 px-3 gap-2',
|
|
31
|
+
lg: 'h-11 px-8 gap-2',
|
|
32
|
+
icon: 'size-10 gap-2',
|
|
33
33
|
'icon-xs': 'size-8',
|
|
34
34
|
'icon-sm': 'size-9',
|
|
35
35
|
'icon-lg': 'size-11',
|
package/src/react/form.tsx
CHANGED
|
@@ -7,9 +7,11 @@ import {
|
|
|
7
7
|
Controller,
|
|
8
8
|
type ControllerProps,
|
|
9
9
|
type FieldError,
|
|
10
|
+
type FieldErrorsImpl,
|
|
10
11
|
type FieldPath,
|
|
11
12
|
type FieldValues,
|
|
12
13
|
FormProvider,
|
|
14
|
+
type Merge,
|
|
13
15
|
useFormContext,
|
|
14
16
|
} from 'react-hook-form';
|
|
15
17
|
import { cn } from '../lib/utils';
|
|
@@ -37,16 +39,16 @@ const FormFieldContext = React.createContext<FormFieldContextValue | null>(
|
|
|
37
39
|
const FormItemContext = React.createContext<FormItemContextValue | null>(null);
|
|
38
40
|
|
|
39
41
|
const useFormField = (): {
|
|
42
|
+
error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;
|
|
43
|
+
formDescriptionId: string;
|
|
44
|
+
formItemId: string;
|
|
45
|
+
formMessageId: string;
|
|
46
|
+
id: string;
|
|
40
47
|
invalid: boolean;
|
|
41
48
|
isDirty: boolean;
|
|
42
49
|
isTouched: boolean;
|
|
43
50
|
isValidating: boolean;
|
|
44
|
-
error?: FieldError | undefined;
|
|
45
|
-
id: string;
|
|
46
51
|
name: string;
|
|
47
|
-
formItemId: string;
|
|
48
|
-
formDescriptionId: string;
|
|
49
|
-
formMessageId: string;
|
|
50
52
|
} => {
|
|
51
53
|
const fieldContext = React.useContext(FormFieldContext);
|
|
52
54
|
const itemContext = React.useContext(FormItemContext);
|
|
@@ -207,7 +209,7 @@ type FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;
|
|
|
207
209
|
const FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(
|
|
208
210
|
({ children, className, ...props }, ref) => {
|
|
209
211
|
const { error, formMessageId } = useFormField();
|
|
210
|
-
const body = error?.message ? error.message : children;
|
|
212
|
+
const body = error?.message ? String(error.message) : children;
|
|
211
213
|
|
|
212
214
|
if (!body) {
|
|
213
215
|
return null;
|
package/tailwind.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import animate from './plugin/animate.plugin';
|
|
|
4
4
|
import perspective from './plugin/perspective.plugin';
|
|
5
5
|
import base from './plugin/base.plugin';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const tailwindcssConfig: Config = {
|
|
8
8
|
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
9
9
|
darkMode: ['class'],
|
|
10
10
|
plugins: [animate, perspective, base],
|
|
@@ -123,4 +123,4 @@ const config: Config = {
|
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
export default
|
|
126
|
+
export default tailwindcssConfig;
|
package/dist/chunk-24MQV5BV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkZTEJNUH6js = require('./chunk-ZTEJNUH6.js');var _chunkHQ4AUOQMjs = require('./chunk-HQ4AUOQM.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _jsxruntime = require('react/jsx-runtime');var y=_chunkHQ4AUOQMjs.a.call(void 0, {base:"inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm"},size:{default:"h-10 px-4",xs:"h-8 px-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"size-10","icon-xs":"size-8","icon-sm":"size-9","icon-lg":"size-11"},loading:{true:"relative"}},defaultVariants:{size:"default",variant:"default",loading:!1}}),x= exports.b =i.forwardRef(({children:e,className:u,variant:d,size:p,loading:o=!1,asChild:n=!1,...r},l)=>{let c=n?_reactslot.Slot:"button",m=n?"span":_react.Fragment,f=o||r.disabled;return _jsxruntime.jsx.call(void 0, c,{ref:l,type:n?void 0:"button",className:y({variant:d,size:p,loading:o,className:u}),...r,disabled:f,children:o?_jsxruntime.jsxs.call(void 0, m,{children:[_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":!0,className:"invisible contents",children:e}),_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{children:e}),_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, _chunkZTEJNUH6js.a,{})})]}):e})});x.displayName="Button";exports.a = y; exports.b = x;
|
|
2
|
-
//# sourceMappingURL=chunk-24MQV5BV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/button.tsx"],"names":["React","Fragment","Slot","VisuallyHidden","jsx","jsxs","buttonVariants","cva","Button","children","className","variant","size","loading","asChild","props","ref","Component","ComponentLoading","disabled","Spinner"],"mappings":"2EAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBAErB,OAAS,kBAAAC,MAAsB,kCAmFrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBA3EV,IAAMC,EAAiBC,EAAI,CACzB,KAAM,sPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YACE,+EACF,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UACE,wEACJ,EACA,KAAM,CACJ,QAAS,YACT,GAAI,WACJ,GAAI,WACJ,GAAI,YACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAgBKC,EAAe,aACnB,CACE,CACE,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,IACG,CACH,IAAMC,EAAYH,EAAUZ,EAAO,SAC7BgB,EAAmBJ,EAAU,OAASb,EACtCkB,EAAWN,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,KAAMF,EAAU,OAAY,SAC5B,UAAWR,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC9D,GAAGK,EACJ,SAAUI,EAET,SAAAN,EACCR,EAACa,EAAA,CACC,UAAAd,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACD,EAAA,CAAgB,SAAAM,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACgB,EAAA,EAAQ,EACX,GACF,EAEAX,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'cva';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cva } from '../lib/utils';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: 'inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 px-4',\n xs: 'h-8 px-2',\n sm: 'h-9 px-3',\n lg: 'h-11 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n (\n {\n children,\n className,\n variant,\n size,\n loading = false,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : 'button'}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"]}
|
package/dist/chunk-VY7GIEVM.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-P5AV3QU7.mjs";import{a as s}from"./chunk-LEUB3C3L.mjs";import*as i from"react";import{Fragment as b}from"react";import{Slot as g}from"@radix-ui/react-slot";import{VisuallyHidden as v}from"@radix-ui/react-visually-hidden";import{jsx as t,jsxs as h}from"react/jsx-runtime";var y=s({base:"inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm"},size:{default:"h-10 px-4",xs:"h-8 px-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"size-10","icon-xs":"size-8","icon-sm":"size-9","icon-lg":"size-11"},loading:{true:"relative"}},defaultVariants:{size:"default",variant:"default",loading:!1}}),x=i.forwardRef(({children:e,className:u,variant:d,size:p,loading:o=!1,asChild:n=!1,...r},l)=>{let c=n?g:"button",m=n?"span":b,f=o||r.disabled;return t(c,{ref:l,type:n?void 0:"button",className:y({variant:d,size:p,loading:o,className:u}),...r,disabled:f,children:o?h(m,{children:[t("span",{"aria-hidden":!0,className:"invisible contents",children:e}),t(v,{children:e}),t("span",{className:"absolute inset-0 flex items-center justify-center",children:t(a,{})})]}):e})});x.displayName="Button";export{y as a,x as b};
|
|
2
|
-
//# sourceMappingURL=chunk-VY7GIEVM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Fragment } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'cva';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { cva } from '../lib/utils';\nimport { Spinner } from './spinner';\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: 'inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',\n ghost: 'text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline:\n 'border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground border shadow-sm',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',\n },\n size: {\n default: 'h-10 px-4',\n xs: 'h-8 px-2',\n sm: 'h-9 px-3',\n lg: 'h-11 px-8',\n icon: 'size-10',\n 'icon-xs': 'size-8',\n 'icon-sm': 'size-9',\n 'icon-lg': 'size-11',\n },\n loading: {\n true: 'relative',\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n (\n {\n children,\n className,\n variant,\n size,\n loading = false,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Component = asChild ? Slot : 'button';\n const ComponentLoading = asChild ? 'span' : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : 'button'}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = 'Button';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"],"mappings":"6EAAA,UAAYA,MAAW,QACvB,OAAS,YAAAC,MAAgB,QACzB,OAAS,QAAAC,MAAY,uBAErB,OAAS,kBAAAC,MAAsB,kCAmFrB,OACE,OAAAC,EADF,QAAAC,MAAA,oBA3EV,IAAMC,EAAiBC,EAAI,CACzB,KAAM,sPACN,SAAU,CACR,QAAS,CACP,QAAS,gEACT,YACE,+EACF,MAAO,+DACP,KAAM,kDACN,QACE,2GACF,UACE,wEACJ,EACA,KAAM,CACJ,QAAS,YACT,GAAI,WACJ,GAAI,WACJ,GAAI,YACJ,KAAM,UACN,UAAW,SACX,UAAW,SACX,UAAW,SACb,EACA,QAAS,CACP,KAAM,UACR,CACF,EACA,gBAAiB,CACf,KAAM,UACN,QAAS,UACT,QAAS,EACX,CACF,CAAC,EAgBKC,EAAe,aACnB,CACE,CACE,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,GAAGC,CACL,EACAC,IACG,CACH,IAAMC,EAAYH,EAAUI,EAAO,SAC7BC,EAAmBL,EAAU,OAASM,EACtCC,EAAWR,GAAWE,EAAM,SAElC,OACEX,EAACa,EAAA,CACC,IAAKD,EACL,KAAMF,EAAU,OAAY,SAC5B,UAAWR,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,EAC9D,GAAGK,EACJ,SAAUM,EAET,SAAAR,EACCR,EAACc,EAAA,CACC,UAAAf,EAAC,QAAK,cAAW,GAAC,UAAU,qBACzB,SAAAK,EACH,EACAL,EAACkB,EAAA,CAAgB,SAAAb,EAAS,EAC1BL,EAAC,QAAK,UAAU,oDACd,SAAAA,EAACmB,EAAA,EAAQ,EACX,GACF,EAEAd,EAEJ,CAEJ,CACF,EAEAD,EAAO,YAAc","names":["React","Fragment","Slot","VisuallyHidden","jsx","jsxs","buttonVariants","cva","Button","children","className","variant","size","loading","asChild","props","ref","Component","Slot","ComponentLoading","Fragment","disabled","VisuallyHidden","Spinner"]}
|