@codefast/ui 0.3.9-canary.1 → 0.3.9-canary.3

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/chart.d.ts +1 -1
  3. package/dist/components/field.cjs +2 -0
  4. package/dist/components/field.d.ts +41 -0
  5. package/dist/components/field.js +2 -0
  6. package/dist/components/input-group.cjs +2 -0
  7. package/dist/components/input-group.d.ts +36 -0
  8. package/dist/components/input-group.js +2 -0
  9. package/dist/components/input-number.cjs +1 -1
  10. package/dist/components/input-number.d.ts +1 -3
  11. package/dist/components/input-number.js +1 -1
  12. package/dist/components/input-password.cjs +1 -1
  13. package/dist/components/input-password.d.ts +3 -6
  14. package/dist/components/input-password.js +1 -1
  15. package/dist/components/input-search.cjs +1 -1
  16. package/dist/components/input-search.d.ts +3 -5
  17. package/dist/components/input-search.js +1 -1
  18. package/dist/components/input.cjs +1 -1
  19. package/dist/components/input.d.ts +2 -11
  20. package/dist/components/input.js +1 -1
  21. package/dist/components/native-select.cjs +1 -0
  22. package/dist/components/native-select.d.ts +9 -0
  23. package/dist/components/native-select.js +1 -0
  24. package/dist/components/select.cjs +1 -1
  25. package/dist/components/select.js +1 -1
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.d.ts +7 -25
  28. package/dist/index.js +1 -1
  29. package/package.json +7 -7
  30. package/dist/components/blockquote.cjs +0 -2
  31. package/dist/components/blockquote.d.ts +0 -7
  32. package/dist/components/blockquote.js +0 -2
  33. package/dist/components/box.cjs +0 -2
  34. package/dist/components/box.d.ts +0 -7
  35. package/dist/components/box.js +0 -2
  36. package/dist/components/code.cjs +0 -2
  37. package/dist/components/code.d.ts +0 -7
  38. package/dist/components/code.js +0 -2
  39. package/dist/components/container.cjs +0 -2
  40. package/dist/components/container.d.ts +0 -7
  41. package/dist/components/container.js +0 -2
  42. package/dist/components/em.cjs +0 -2
  43. package/dist/components/em.d.ts +0 -7
  44. package/dist/components/em.js +0 -2
  45. package/dist/components/heading.cjs +0 -2
  46. package/dist/components/heading.d.ts +0 -8
  47. package/dist/components/heading.js +0 -2
  48. package/dist/components/inline.cjs +0 -2
  49. package/dist/components/inline.d.ts +0 -7
  50. package/dist/components/inline.js +0 -2
  51. package/dist/components/pre.cjs +0 -2
  52. package/dist/components/pre.d.ts +0 -7
  53. package/dist/components/pre.js +0 -2
  54. package/dist/components/quote.cjs +0 -2
  55. package/dist/components/quote.d.ts +0 -7
  56. package/dist/components/quote.js +0 -2
  57. package/dist/components/section.cjs +0 -2
  58. package/dist/components/section.d.ts +0 -7
  59. package/dist/components/section.js +0 -2
  60. package/dist/components/strong.cjs +0 -2
  61. package/dist/components/strong.d.ts +0 -7
  62. package/dist/components/strong.js +0 -2
  63. package/dist/components/text.cjs +0 -2
  64. package/dist/components/text.d.ts +0 -7
  65. package/dist/components/text.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @codefast/ui
2
2
 
3
+ ## 0.3.9-canary.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dab8f27`](https://github.com/codefastlabs/codefast/commit/dab8f27d3d9bafcc547c310d33dbaeb364246b25) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui): remove `inputVariants` from `Input` and `InputNumber` components
8
+
9
+ - [`c2d5bc1`](https://github.com/codefastlabs/codefast/commit/c2d5bc11cc28069c8d6a5120f19a033cb31d3c3a) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui, docs): replace `InputSearch` implementation with `InputGroup`
10
+
11
+ - [`4899386`](https://github.com/codefastlabs/codefast/commit/489938610509f94e9bafc09b46ecfc7318655261) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui): remove unused components and exports from `ui` package
12
+
13
+ - [`135b519`](https://github.com/codefastlabs/codefast/commit/135b5198dc0c26a1b885b2d2a84dfa078f2683f7) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui, docs): replace `InputPassword` implementation with `InputGroup`
14
+
15
+ - Updated dependencies []:
16
+ - @codefast/tailwind-variants@0.3.9-canary.3
17
+
18
+ ## 0.3.9-canary.2
19
+
20
+ ### Patch Changes
21
+
22
+ - [`cbc4092`](https://github.com/codefastlabs/codefast/commit/cbc4092c53c8a8c67685eaec87be95f580b24b88) Thanks [@thevuong](https://github.com/thevuong)! - refactor(eslint-config): rename presets for consistency
23
+
24
+ - [`436e1d9`](https://github.com/codefastlabs/codefast/commit/436e1d941654beec192a9da9c6daefef6c4f6666) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui, docs): add `InputGroup` and `Field` components and integrate into registry
25
+
26
+ - [`237b576`](https://github.com/codefastlabs/codefast/commit/237b576f8e12c528cfec40aefe2d0a68c0b01ac4) Thanks [@thevuong](https://github.com/thevuong)! - chore(deps): bump package versions across workspaces
27
+
28
+ - [`888a904`](https://github.com/codefastlabs/codefast/commit/888a9047e4ad2e79e5945fad09d5ffa8baef0a45) Thanks [@thevuong](https://github.com/thevuong)! - refactor(eslint-config): reorganize presets and imports
29
+
30
+ - [`308eb18`](https://github.com/codefastlabs/codefast/commit/308eb18cc58934e2c0dfc92657e4bad9cac5699d) Thanks [@thevuong](https://github.com/thevuong)! - refactor(ui, docs): add `NativeSelect` component and integrate into docs
31
+
32
+ - Updated dependencies [[`237b576`](https://github.com/codefastlabs/codefast/commit/237b576f8e12c528cfec40aefe2d0a68c0b01ac4), [`888a904`](https://github.com/codefastlabs/codefast/commit/888a9047e4ad2e79e5945fad09d5ffa8baef0a45)]:
33
+ - @codefast/tailwind-variants@0.3.9-canary.2
34
+
3
35
  ## 0.3.9-canary.1
4
36
 
5
37
  ### Patch Changes
@@ -34,7 +34,7 @@ interface ChartStyleProps {
34
34
  declare function ChartStyle({ config, id }: ChartStyleProps): ReactNode;
35
35
  type ChartTooltipProps<TValue extends ValueType, TName extends NameType> = ComponentProps<typeof RechartsPrimitive.Tooltip<TValue, TName>>;
36
36
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
37
- type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<ExtractProps<ComponentProps<typeof RechartsPrimitive.Tooltip<TValue, TName>>["content"]>, "accessibilityLayer" | "active" | "coordinate" | "payload">, "payload"> & {
37
+ type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<ExtractProps<ComponentProps<typeof RechartsPrimitive.Tooltip<TValue, TName>>["content"]>, "accessibilityLayer" | "active" | "activeIndex" | "coordinate" | "payload">, "payload"> & {
38
38
  hideIndicator?: boolean;
39
39
  hideLabel?: boolean;
40
40
  indicator?: "dashed" | "dot" | "line";
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FieldContent:()=>FieldContent,FieldError:()=>FieldError,FieldLabel:()=>FieldLabel,FieldDescription:()=>FieldDescription,FieldSeparator:()=>FieldSeparator,fieldVariants:()=>fieldVariants,FieldGroup:()=>FieldGroup,FieldTitle:()=>FieldTitle,FieldSet:()=>FieldSet,Field:()=>Field,FieldLegend:()=>FieldLegend});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_react_namespaceObject=require("react"),external_label_cjs_namespaceObject=require("./label.cjs"),external_separator_cjs_namespaceObject=require("./separator.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),fieldVariants=(0,tailwind_variants_namespaceObject.tv)({base:"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",defaultVariants:{orientation:"vertical"},variants:{orientation:{horizontal:(0,tailwind_variants_namespaceObject.cn)("flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"),responsive:(0,tailwind_variants_namespaceObject.cn)("flex-col [&>*]:w-full [&>.sr-only]:w-auto","@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"),vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto"}}});function FieldSet({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("fieldset",{className:(0,tailwind_variants_namespaceObject.cn)("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),"data-slot":"field-set",...a})}function FieldLegend({className:e,variant:a="legend",...t}){return(0,jsx_runtime_namespaceObject.jsx)("legend",{className:(0,tailwind_variants_namespaceObject.cn)("mb-3 text-base font-medium","data-[variant=label]:text-sm",e),"data-slot":"field-legend","data-variant":a,...t})}function FieldGroup({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),"data-slot":"field-group",...a})}function Field({className:e,orientation:a="vertical",...t}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:fieldVariants({className:e,orientation:a}),"data-orientation":a,"data-slot":"field",role:"group",...t})}function FieldContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),"data-slot":"field-content",...a})}function FieldLabel({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label,{className:(0,tailwind_variants_namespaceObject.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",e),"data-slot":"field-label",...a})}function FieldTitle({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),"data-slot":"field-label",...a})}function FieldDescription({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("p",{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),"data-slot":"field-description",...a})}function FieldSeparator({children:e,className:a,...t}){let l=!!e;return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",a),"data-content":l,"data-slot":"field-separator",...t,children:[(0,jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator,{className:"absolute inset-0 top-1/2"}),l?(0,jsx_runtime_namespaceObject.jsx)("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:e}):null]})}function FieldError({children:e,className:a,errors:t,...l}){let r=(0,external_react_namespaceObject.useMemo)(()=>{if(!t?.length)return null;let e=[...new Map(t.map(e=>[e?.message,e])).values()];return 1===e.length?e[0]?.message??null:(0,jsx_runtime_namespaceObject.jsx)("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:e.map(e=>e?.message?(0,jsx_runtime_namespaceObject.jsx)("li",{children:e.message},e.message):null)})},[t]),i=e??r;return null==i||!1===i?null:(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("text-destructive text-sm font-normal",a),"data-slot":"field-error",role:"alert",...l,children:i})}for(var __webpack_i__ in exports.Field=__webpack_exports__.Field,exports.FieldContent=__webpack_exports__.FieldContent,exports.FieldDescription=__webpack_exports__.FieldDescription,exports.FieldError=__webpack_exports__.FieldError,exports.FieldGroup=__webpack_exports__.FieldGroup,exports.FieldLabel=__webpack_exports__.FieldLabel,exports.FieldLegend=__webpack_exports__.FieldLegend,exports.FieldSeparator=__webpack_exports__.FieldSeparator,exports.FieldSet=__webpack_exports__.FieldSet,exports.FieldTitle=__webpack_exports__.FieldTitle,exports.fieldVariants=__webpack_exports__.fieldVariants,__webpack_exports__)-1===["Field","FieldContent","FieldDescription","FieldError","FieldGroup","FieldLabel","FieldLegend","FieldSeparator","FieldSet","FieldTitle","fieldVariants"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,41 @@
1
+ import type { ComponentProps, JSX } from "react";
2
+ import type { VariantProps } from "@codefast/tailwind-variants";
3
+ import { Label } from "./label";
4
+ declare const fieldVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
5
+ orientation: {
6
+ horizontal: string;
7
+ responsive: string;
8
+ vertical: string;
9
+ };
10
+ }, Record<string, never>>;
11
+ type FieldSetProps = ComponentProps<"fieldset">;
12
+ declare function FieldSet({ className, ...props }: FieldSetProps): JSX.Element;
13
+ type FieldLegendProps = ComponentProps<"legend"> & {
14
+ variant?: "label" | "legend";
15
+ };
16
+ declare function FieldLegend({ className, variant, ...props }: FieldLegendProps): JSX.Element;
17
+ type FieldGroupProps = ComponentProps<"div">;
18
+ declare function FieldGroup({ className, ...props }: FieldGroupProps): JSX.Element;
19
+ type FieldProps = ComponentProps<"div"> & VariantProps<typeof fieldVariants>;
20
+ declare function Field({ className, orientation, ...props }: FieldProps): JSX.Element;
21
+ type FieldContentProps = ComponentProps<"div">;
22
+ declare function FieldContent({ className, ...props }: FieldContentProps): JSX.Element;
23
+ type FieldLabelProps = ComponentProps<typeof Label>;
24
+ declare function FieldLabel({ className, ...props }: FieldLabelProps): JSX.Element;
25
+ type FieldTitleProps = ComponentProps<"div">;
26
+ declare function FieldTitle({ className, ...props }: FieldTitleProps): JSX.Element;
27
+ type FieldDescriptionProps = ComponentProps<"p">;
28
+ declare function FieldDescription({ className, ...props }: FieldDescriptionProps): JSX.Element;
29
+ type FieldSeparatorProps = ComponentProps<"div"> & {
30
+ children?: ComponentProps<"span">["children"];
31
+ };
32
+ declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): JSX.Element;
33
+ interface FieldErrorMessage {
34
+ message?: string;
35
+ }
36
+ interface FieldErrorProps extends ComponentProps<"div"> {
37
+ errors?: (FieldErrorMessage | undefined)[];
38
+ }
39
+ declare function FieldError({ children, className, errors, ...props }: FieldErrorProps): JSX.Element | null;
40
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, fieldVariants, };
41
+ export type { FieldContentProps, FieldDescriptionProps, FieldErrorProps, FieldGroupProps, FieldLabelProps, FieldLegendProps, FieldProps, FieldSeparatorProps, FieldSetProps, FieldTitleProps, };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useMemo as a}from"react";import{Label as l}from"./label.js";import{Separator as o}from"./separator.js";import{cn as r,tv as d}from"@codefast/tailwind-variants";let i=d({base:"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",defaultVariants:{orientation:"vertical"},variants:{orientation:{horizontal:r("flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"),responsive:r("flex-col [&>*]:w-full [&>.sr-only]:w-auto","@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"),vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto"}}});function s({className:t,...a}){return e("fieldset",{className:r("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",t),"data-slot":"field-set",...a})}function n({className:t,variant:a="legend",...l}){return e("legend",{className:r("mb-3 text-base font-medium","data-[variant=label]:text-sm",t),"data-slot":"field-legend","data-variant":a,...l})}function f({className:t,...a}){return e("div",{className:r("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",t),"data-slot":"field-group",...a})}function u({className:t,orientation:a="vertical",...l}){return e("div",{className:i({className:t,orientation:a}),"data-orientation":a,"data-slot":"field",role:"group",...l})}function c({className:t,...a}){return e("div",{className:r("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",t),"data-slot":"field-content",...a})}function m({className:t,...a}){return e(l,{className:r("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",t),"data-slot":"field-label",...a})}function p({className:t,...a}){return e("div",{className:r("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",t),"data-slot":"field-label",...a})}function g({className:t,...a}){return e("p",{className:r("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),"data-slot":"field-description",...a})}function x({children:a,className:l,...d}){let i=!!a;return t("div",{className:r("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",l),"data-content":i,"data-slot":"field-separator",...d,children:[e(o,{className:"absolute inset-0 top-1/2"}),i?e("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:a}):null]})}function h({children:t,className:l,errors:o,...d}){let i=a(()=>{if(!o?.length)return null;let t=[...new Map(o.map(e=>[e?.message,e])).values()];return 1===t.length?t[0]?.message??null:e("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:t.map(t=>t?.message?e("li",{children:t.message},t.message):null)})},[o]),s=t??i;return null==s||!1===s?null:e("div",{className:r("text-destructive text-sm font-normal",l),"data-slot":"field-error",role:"alert",...d,children:s})}export{u as Field,c as FieldContent,g as FieldDescription,h as FieldError,f as FieldGroup,m as FieldLabel,n as FieldLegend,x as FieldSeparator,s as FieldSet,p as FieldTitle,i as fieldVariants};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(t,e)=>{for(var a in e)__webpack_require__.o(e,a)&&!__webpack_require__.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{inputGroupAddonVariants:()=>inputGroupAddonVariants,inputGroupVariants:()=>inputGroupVariants,InputGroupText:()=>InputGroupText,InputGroupAddon:()=>InputGroupAddon,InputGroupTextarea:()=>InputGroupTextarea,InputGroupButton:()=>InputGroupButton,InputGroup:()=>InputGroup,InputGroupInput:()=>InputGroupInput,inputGroupButtonVariants:()=>inputGroupButtonVariants});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_button_cjs_namespaceObject=require("./button.cjs"),external_input_cjs_namespaceObject=require("./input.cjs"),external_textarea_cjs_namespaceObject=require("./textarea.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),inputGroupVariants=(0,tailwind_variants_namespaceObject.tv)({base:(0,tailwind_variants_namespaceObject.cn)("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-lg border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2","has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40")}),inputGroupAddonVariants=(0,tailwind_variants_namespaceObject.tv)({base:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50"),defaultVariants:{align:"inline-start"},variants:{align:{"block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]"}}}),inputGroupButtonVariants=(0,tailwind_variants_namespaceObject.tv)({base:"text-sm shadow-none flex items-center gap-2 [&>svg:not([class*='size-'])]:size-4",defaultVariants:{size:"xs"},variants:{size:{"icon-sm":"size-8 p-0 has-[>svg]:p-0","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg]:size-3.5 has-[>svg]:px-2"}}});function InputGroup({className:t,...e}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:inputGroupVariants({className:t}),"data-slot":"input-group",role:"group",...e})}function InputGroupAddon({align:t="inline-start",className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)(inputGroupAddonVariants({align:t}),e),"data-align":t,"data-slot":"input-group-addon",role:"group",onPointerDown:t=>{if(t.target.closest("button"))return;t.preventDefault();let e=t.currentTarget.parentElement?.querySelector("input, textarea");e instanceof HTMLElement&&e.focus()},...a})}function InputGroupButton({className:t,size:e="xs",type:a="button",variant:n="ghost",...r}){return(0,jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button,{className:(0,tailwind_variants_namespaceObject.cn)(inputGroupButtonVariants({size:e}),t),"data-size":e,"data-slot":"input-group-button",type:a,variant:n,...r})}function InputGroupText({className:t,...e}){return(0,jsx_runtime_namespaceObject.jsx)("span",{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",t),"data-slot":"input-group-text",...e})}function InputGroupInput({className:t,...e}){return(0,jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input,{className:(0,tailwind_variants_namespaceObject.cn)("flex-1 rounded-none border-0 bg-transparent px-3 py-1 shadow-none focus-visible:ring-0 dark:bg-transparent",t),"data-slot":"input-group-control",...e})}function InputGroupTextarea({className:t,...e}){return(0,jsx_runtime_namespaceObject.jsx)(external_textarea_cjs_namespaceObject.Textarea,{className:(0,tailwind_variants_namespaceObject.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",t),"data-slot":"input-group-control",...e})}for(var __webpack_i__ in exports.InputGroup=__webpack_exports__.InputGroup,exports.InputGroupAddon=__webpack_exports__.InputGroupAddon,exports.InputGroupButton=__webpack_exports__.InputGroupButton,exports.InputGroupInput=__webpack_exports__.InputGroupInput,exports.InputGroupText=__webpack_exports__.InputGroupText,exports.InputGroupTextarea=__webpack_exports__.InputGroupTextarea,exports.inputGroupAddonVariants=__webpack_exports__.inputGroupAddonVariants,exports.inputGroupButtonVariants=__webpack_exports__.inputGroupButtonVariants,exports.inputGroupVariants=__webpack_exports__.inputGroupVariants,__webpack_exports__)-1===["InputGroup","InputGroupAddon","InputGroupButton","InputGroupInput","InputGroupText","InputGroupTextarea","inputGroupAddonVariants","inputGroupButtonVariants","inputGroupVariants"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,36 @@
1
+ import type { ComponentProps, JSX } from "react";
2
+ import type { ButtonProps } from "./button";
3
+ import type { InputProps } from "./input";
4
+ import type { TextareaProps } from "./textarea";
5
+ import type { VariantProps } from "@codefast/tailwind-variants";
6
+ declare const inputGroupVariants: import("@codefast/tailwind-variants").VariantFunctionType<import("@codefast/tailwind-variants").ConfigurationSchema, Record<string, never>>;
7
+ declare const inputGroupAddonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
8
+ align: {
9
+ "block-end": string;
10
+ "block-start": string;
11
+ "inline-end": string;
12
+ "inline-start": string;
13
+ };
14
+ }, Record<string, never>>;
15
+ declare const inputGroupButtonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
16
+ size: {
17
+ "icon-sm": string;
18
+ "icon-xs": string;
19
+ sm: string;
20
+ xs: string;
21
+ };
22
+ }, Record<string, never>>;
23
+ type InputGroupProps = ComponentProps<"div">;
24
+ declare function InputGroup({ className, ...props }: InputGroupProps): JSX.Element;
25
+ type InputGroupAddonProps = ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>;
26
+ declare function InputGroupAddon({ align, className, ...props }: InputGroupAddonProps): JSX.Element;
27
+ type InputGroupButtonProps = Omit<ButtonProps, "size"> & VariantProps<typeof inputGroupButtonVariants>;
28
+ declare function InputGroupButton({ className, size, type, variant, ...props }: InputGroupButtonProps): JSX.Element;
29
+ type InputGroupTextProps = ComponentProps<"span">;
30
+ declare function InputGroupText({ className, ...props }: InputGroupTextProps): JSX.Element;
31
+ type InputGroupInputProps = InputProps;
32
+ declare function InputGroupInput({ className, ...props }: InputGroupInputProps): JSX.Element;
33
+ type InputGroupTextareaProps = TextareaProps;
34
+ declare function InputGroupTextarea({ className, ...props }: InputGroupTextareaProps): JSX.Element;
35
+ export { InputGroup, InputGroupAddon, inputGroupAddonVariants, InputGroupButton, inputGroupButtonVariants, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupVariants, };
36
+ export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextareaProps, InputGroupTextProps, };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as t}from"react/jsx-runtime";import{Button as a}from"./button.js";import{Input as r}from"./input.js";import{Textarea as n}from"./textarea.js";import{cn as o,tv as e}from"@codefast/tailwind-variants";let s=e({base:o("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-lg border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2","has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40")}),i=e({base:o("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50"),defaultVariants:{align:"inline-start"},variants:{align:{"block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]"}}}),u=e({base:"text-sm shadow-none flex items-center gap-2 [&>svg:not([class*='size-'])]:size-4",defaultVariants:{size:"xs"},variants:{size:{"icon-sm":"size-8 p-0 has-[>svg]:p-0","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg]:size-3.5 has-[>svg]:px-2"}}});function p({className:a,...r}){return t("div",{className:s({className:a}),"data-slot":"input-group",role:"group",...r})}function l({align:a="inline-start",className:r,...n}){return t("div",{className:o(i({align:a}),r),"data-align":a,"data-slot":"input-group-addon",role:"group",onPointerDown:t=>{if(t.target.closest("button"))return;t.preventDefault();let a=t.currentTarget.parentElement?.querySelector("input, textarea");a instanceof HTMLElement&&a.focus()},...n})}function d({className:r,size:n="xs",type:e="button",variant:s="ghost",...i}){return t(a,{className:o(u({size:n}),r),"data-size":n,"data-slot":"input-group-button",type:e,variant:s,...i})}function g({className:a,...r}){return t("span",{className:o("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),"data-slot":"input-group-text",...r})}function c({className:a,...n}){return t(r,{className:o("flex-1 rounded-none border-0 bg-transparent px-3 py-1 shadow-none focus-visible:ring-0 dark:bg-transparent",a),"data-slot":"input-group-control",...n})}function b({className:a,...r}){return t(n,{className:o("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",a),"data-slot":"input-group-control",...r})}export{p as InputGroup,l as InputGroupAddon,d as InputGroupButton,c as InputGroupInput,g as InputGroupText,b as InputGroupTextarea,i as inputGroupAddonVariants,u as inputGroupButtonVariants,s as inputGroupVariants};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputNumber:()=>InputNumber});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_input_cjs_namespaceObject=require("./input.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_number_cjs_namespaceObject=require("../primitives/input-number.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),{input:e,root:r}=(0,external_input_cjs_namespaceObject.inputVariants)();function InputNumber({ariaDecrementLabel:t,ariaIncrementLabel:a,className:n,defaultValue:i,disabled:_,formatOptions:s,id:c,loaderPosition:u,loading:o,max:p,min:b,onChange:d,prefix:l,readOnly:m,spinner:j,step:v,suffix:x,value:f,...g}){return(0,jsx_runtime_namespaceObject.jsxs)(input_number_cjs_namespaceObject.Root,{ariaDecrementLabel:t,ariaIncrementLabel:a,className:r({className:["group pr-0",n]}),"data-slot":"input-number",defaultValue:i,disabled:_,formatOptions:s,id:c,loaderPosition:u,loading:o,max:p,min:b,prefix:l,readOnly:m,spinner:j??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),step:v,suffix:x,value:f,onChange:d,children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.Field,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:e(),spellCheck:"false",...g}),(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.IncrementButton,{"aria-label":"Increment",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon,{})}),(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.DecrementButton,{"aria-label":"Decrement",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{})})]})]})}for(var __webpack_i__ in exports.InputNumber=__webpack_exports__.InputNumber,__webpack_exports__)-1===["InputNumber"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputNumber:()=>InputNumber});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_number_cjs_namespaceObject=require("../primitives/input-number.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function InputNumber({ariaDecrementLabel:e,ariaIncrementLabel:r,className:t,defaultValue:i,disabled:n,formatOptions:a,id:s,loaderPosition:o,loading:u,max:c,min:_,onChange:d,prefix:b,readOnly:l,spinner:p,step:m,suffix:v,value:g,...f}){return(0,jsx_runtime_namespaceObject.jsxs)(input_number_cjs_namespaceObject.Root,{ariaDecrementLabel:e,ariaIncrementLabel:r,className:(0,tailwind_variants_namespaceObject.cn)("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),"data-slot":"input-number",defaultValue:i,disabled:n,formatOptions:a,id:s,loaderPosition:o,loading:u,max:c,min:_,prefix:b,readOnly:l,spinner:p??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),step:m,suffix:v,value:g,onChange:d,children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.Field,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",spellCheck:"false",...f}),(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.IncrementButton,{"aria-label":"Increment",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon,{})}),(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.DecrementButton,{"aria-label":"Decrement",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{})})]})]})}for(var __webpack_i__ in exports.InputNumber=__webpack_exports__.InputNumber,__webpack_exports__)-1===["InputNumber"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,8 +1,6 @@
1
1
  import type { ComponentProps, JSX } from "react";
2
- import type { VariantProps } from "@codefast/tailwind-variants";
3
- import { inputVariants } from "./input";
4
2
  import * as InputNumberPrimitive from "../primitives/input-number";
5
- interface InputNumberProps extends ComponentProps<typeof InputNumberPrimitive.Field>, ComponentProps<typeof InputNumberPrimitive.Root>, VariantProps<typeof inputVariants> {
3
+ interface InputNumberProps extends ComponentProps<typeof InputNumberPrimitive.Field>, ComponentProps<typeof InputNumberPrimitive.Root> {
6
4
  }
7
5
  declare function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }: InputNumberProps): JSX.Element;
8
6
  export { InputNumber };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r,jsxs as i}from"react/jsx-runtime";import{ChevronDownIcon as e,ChevronUpIcon as t}from"lucide-react";import{buttonVariants as o}from"./button.js";import{inputVariants as a}from"./input.js";import{Spinner as n}from"./spinner.js";import{DecrementButton as u,Field as s,IncrementButton as d,Root as l}from"../primitives/input-number.js";import{cn as p}from"@codefast/tailwind-variants";let{input:c,root:m}=a();function b({ariaDecrementLabel:a,ariaIncrementLabel:b,className:g,defaultValue:v,disabled:f,formatOptions:h,id:x,loaderPosition:N,loading:w,max:j,min:C,onChange:k,prefix:I,readOnly:y,spinner:D,step:L,suffix:O,value:z,...P}){return i(l,{ariaDecrementLabel:a,ariaIncrementLabel:b,className:m({className:["group pr-0",g]}),"data-slot":"input-number",defaultValue:v,disabled:f,formatOptions:h,id:x,loaderPosition:N,loading:w,max:j,min:C,prefix:I,readOnly:y,spinner:D??r(n,{},"spinner"),step:L,suffix:O,value:z,onChange:k,children:[r(s,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:c(),spellCheck:"false",...P}),i("div",{className:p("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[r(d,{"aria-label":"Increment",className:o({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:r(t,{})}),r(u,{"aria-label":"Decrement",className:o({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:r(e,{})})]})]})}export{b as InputNumber};
2
+ import{jsx as i,jsxs as r}from"react/jsx-runtime";import{ChevronDownIcon as e,ChevronUpIcon as t}from"lucide-react";import{buttonVariants as o}from"./button.js";import{Spinner as a}from"./spinner.js";import{DecrementButton as n,Field as d,IncrementButton as s,Root as u}from"../primitives/input-number.js";import{cn as l}from"@codefast/tailwind-variants";function c({ariaDecrementLabel:c,ariaIncrementLabel:b,className:g,defaultValue:p,disabled:f,formatOptions:h,id:v,loaderPosition:m,loading:x,max:w,min:k,onChange:N,prefix:y,readOnly:C,spinner:j,step:z,suffix:I,value:D,...L}){return r(u,{ariaDecrementLabel:c,ariaIncrementLabel:b,className:l("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",g),"data-slot":"input-number",defaultValue:p,disabled:f,formatOptions:h,id:v,loaderPosition:m,loading:x,max:w,min:k,prefix:y,readOnly:C,spinner:j??i(a,{},"spinner"),step:z,suffix:I,value:D,onChange:N,children:[i(d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",spellCheck:"false",...L}),r("div",{className:l("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[i(s,{"aria-label":"Increment",className:o({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:i(t,{})}),i(n,{"aria-label":"Decrement",className:o({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:i(e,{})})]})]})}export{c as InputNumber};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputPassword:()=>InputPassword});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_input_cjs_namespaceObject=require("./input.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_cjs_namespaceObject=require("../primitives/input.cjs"),{input:e,root:_}=(0,external_input_cjs_namespaceObject.inputVariants)();function InputPassword({className:a,disabled:r,loaderPosition:t,loading:s,prefix:c,readOnly:n,spinner:p,suffix:i,...o}){let[u,b]=(0,external_react_namespaceObject.useState)("password"),l=(0,external_react_namespaceObject.useCallback)(()=>{b(e=>"password"===e?"text":"password")},[]);return(0,jsx_runtime_namespaceObject.jsxs)(input_cjs_namespaceObject.Root,{className:_({className:[!i&&"pr-1.5",a]}),"data-slot":"input-password",disabled:r,loaderPosition:t,loading:s,prefix:c,readOnly:n,spinner:p??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),suffix:i,children:[(0,jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Field,{autoCapitalize:"none",className:e(),"data-slot":"input-password-item",type:u,...o}),(0,jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button,{"aria-label":"password"===u?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:r,size:"icon",variant:"ghost",onClick:l,children:"password"===u?(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeOffIcon,{}):(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeIcon,{})})]})}for(var __webpack_i__ in exports.InputPassword=__webpack_exports__.InputPassword,__webpack_exports__)-1===["InputPassword"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputPassword:()=>InputPassword});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),external_input_group_cjs_namespaceObject=require("./input-group.cjs");function InputPassword({className:e,disabled:_,readOnly:r,...t}){let[a,s]=(0,external_react_namespaceObject.useState)("password"),c=(0,external_react_namespaceObject.useCallback)(()=>{s(e=>"password"===e?"text":"password")},[]);return(0,jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup,{className:e,"data-disabled":_?"true":void 0,"data-slot":"input-password",children:[(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput,{autoCapitalize:"none","data-slot":"input-password-item",disabled:_,readOnly:r,type:a,...t}),(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton,{"aria-label":"password"===a?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:_,size:"icon-sm",type:"button",variant:"ghost",onClick:c,children:"password"===a?(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeOffIcon,{}):(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeIcon,{})})]})}for(var __webpack_i__ in exports.InputPassword=__webpack_exports__.InputPassword,__webpack_exports__)-1===["InputPassword"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,9 +1,6 @@
1
1
  import type { ComponentProps, JSX } from "react";
2
- import type { VariantProps } from "@codefast/tailwind-variants";
3
- import { inputVariants } from "./input";
4
- import * as InputPrimitive from "../primitives/input";
5
- interface InputPasswordProps extends ComponentProps<typeof InputPrimitive.Root>, Omit<ComponentProps<typeof InputPrimitive.Field>, "prefix" | "type">, VariantProps<typeof inputVariants> {
6
- }
7
- declare function InputPassword({ className, disabled, loaderPosition, loading, prefix, readOnly, spinner, suffix, ...props }: InputPasswordProps): JSX.Element;
2
+ import { InputGroupInput } from "./input-group";
3
+ type InputPasswordProps = Omit<ComponentProps<typeof InputGroupInput>, "type">;
4
+ declare function InputPassword({ className, disabled, readOnly, ...props }: InputPasswordProps): JSX.Element;
8
5
  export { InputPassword };
9
6
  export type { InputPasswordProps };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as s,jsxs as i}from"react/jsx-runtime";import{EyeIcon as o,EyeOffIcon as r}from"lucide-react";import{useCallback as t,useState as a}from"react";import{Button as e}from"./button.js";import{inputVariants as p}from"./input.js";import{Spinner as n}from"./spinner.js";import{Field as d,Root as l}from"../primitives/input.js";let{input:m,root:u}=p();function c({className:p,disabled:c,loaderPosition:f,loading:w,prefix:b,readOnly:g,spinner:j,suffix:x,...h}){let[v,N]=a("password"),z=t(()=>{N(s=>"password"===s?"text":"password")},[]);return i(l,{className:u({className:[!x&&"pr-1.5",p]}),"data-slot":"input-password",disabled:c,loaderPosition:f,loading:w,prefix:b,readOnly:g,spinner:j??s(n,{},"spinner"),suffix:x,children:[s(d,{autoCapitalize:"none",className:m(),"data-slot":"input-password-item",type:v,...h}),s(e,{"aria-label":"password"===v?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:c,size:"icon",variant:"ghost",onClick:z,children:"password"===v?s(r,{}):s(o,{})})]})}export{c as InputPassword};
2
+ import{jsx as s,jsxs as a}from"react/jsx-runtime";import{EyeIcon as t,EyeOffIcon as o}from"lucide-react";import{useCallback as r,useState as i}from"react";import{InputGroup as d,InputGroupButton as e,InputGroupInput as p}from"./input-group.js";function l({className:l,disabled:n,readOnly:u,...c}){let[m,w]=i("password"),b=r(()=>{w(s=>"password"===s?"text":"password")},[]);return a(d,{className:l,"data-disabled":n?"true":void 0,"data-slot":"input-password",children:[s(p,{autoCapitalize:"none","data-slot":"input-password-item",disabled:n,readOnly:u,type:m,...c}),s(e,{"aria-label":"password"===m?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:n,size:"icon-sm",type:"button",variant:"ghost",onClick:b,children:"password"===m?s(o,{}):s(t,{})})]})}export{l as InputPassword};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputSearch:()=>InputSearch});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_input_cjs_namespaceObject=require("./input.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_cjs_namespaceObject=require("../primitives/input.cjs"),react_use_controllable_state_namespaceObject=require("@radix-ui/react-use-controllable-state"),{input:e,root:_}=(0,external_input_cjs_namespaceObject.inputVariants)();function InputSearch({className:a,defaultValue:r,disabled:t,loaderPosition:c,loading:n,onChange:s,prefix:i,readOnly:p,spinner:u,suffix:l,value:o,...b}){let[j,m]=(0,react_use_controllable_state_namespaceObject.useControllableState)({defaultProp:r,onChange:s,prop:o});return(0,jsx_runtime_namespaceObject.jsxs)(input_cjs_namespaceObject.Root,{className:_({className:[!l&&"pr-1.5",a]}),"data-slot":"input-search",disabled:t,loaderPosition:c,loading:n,prefix:i??(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.SearchIcon,{},"prefix"),readOnly:p,spinner:u??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),suffix:l,children:[(0,jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Field,{className:e(),"data-slot":"input-search-item",type:"search",value:j??"",onChange:e=>{m(e.target.value)},...b}),j?(0,jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button,{"aria-label":"Clear search",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-search-clear",disabled:t??p,size:"icon",variant:"ghost",onClick:()=>{m("")},children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon,{})}):null]})}for(var __webpack_i__ in exports.InputSearch=__webpack_exports__.InputSearch,__webpack_exports__)-1===["InputSearch"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputSearch:()=>InputSearch});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_input_group_cjs_namespaceObject=require("./input-group.cjs"),react_use_controllable_state_namespaceObject=require("@radix-ui/react-use-controllable-state");function InputSearch({className:e,defaultValue:_,disabled:r,onChange:t,readOnly:a,value:c,...n}){let[p,u]=(0,react_use_controllable_state_namespaceObject.useControllableState)({defaultProp:_,onChange:t,prop:c});return(0,jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup,{className:e,"data-disabled":r?"true":void 0,"data-slot":"input-search",children:[(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupAddon,{align:"inline-start",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.SearchIcon,{})}),(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput,{"data-slot":"input-search-item",disabled:r,readOnly:a,type:"search",value:p??"",onChange:e=>{u(e.target.value)},...n}),p?(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton,{"aria-label":"Clear search",className:"focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0","data-slot":"input-search-clear",disabled:r??a,size:"icon-sm",variant:"ghost",onClick:()=>{u("")},children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon,{})}):null]})}for(var __webpack_i__ in exports.InputSearch=__webpack_exports__.InputSearch,__webpack_exports__)-1===["InputSearch"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,12 +1,10 @@
1
1
  import type { ComponentProps, JSX } from "react";
2
- import type { VariantProps } from "@codefast/tailwind-variants";
3
- import { inputVariants } from "./input";
4
- import * as InputPrimitive from "../primitives/input";
5
- interface InputSearchProps extends ComponentProps<typeof InputPrimitive.Root>, Omit<ComponentProps<typeof InputPrimitive.Field>, "defaultValue" | "onChange" | "prefix" | "type" | "value">, VariantProps<typeof inputVariants> {
2
+ import { InputGroupInput } from "./input-group";
3
+ interface InputSearchProps extends Omit<ComponentProps<typeof InputGroupInput>, "defaultValue" | "onChange" | "type" | "value"> {
6
4
  defaultValue?: string;
7
5
  onChange?: (value?: string) => void;
8
6
  value?: string;
9
7
  }
10
- declare function InputSearch({ className, defaultValue, disabled, loaderPosition, loading, onChange, prefix, readOnly, spinner, suffix, value: valueProperty, ...props }: InputSearchProps): JSX.Element;
8
+ declare function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }: InputSearchProps): JSX.Element;
11
9
  export { InputSearch };
12
10
  export type { InputSearchProps };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{SearchIcon as i,XIcon as a}from"lucide-react";import{Button as t}from"./button.js";import{inputVariants as s}from"./input.js";import{Spinner as l}from"./spinner.js";import{Field as o,Root as n}from"../primitives/input.js";import{useControllableState as p}from"@radix-ui/react-use-controllable-state";let{input:u,root:c}=s();function m({className:s,defaultValue:m,disabled:d,loaderPosition:f,loading:h,onChange:b,prefix:v,readOnly:g,spinner:x,suffix:j,value:N,...C}){let[y,z]=p({defaultProp:m,onChange:b,prop:N});return r(n,{className:c({className:[!j&&"pr-1.5",s]}),"data-slot":"input-search",disabled:d,loaderPosition:f,loading:h,prefix:v??e(i,{},"prefix"),readOnly:g,spinner:x??e(l,{},"spinner"),suffix:j,children:[e(o,{className:u(),"data-slot":"input-search-item",type:"search",value:y??"",onChange:e=>{z(e.target.value)},...C}),y?e(t,{"aria-label":"Clear search",className:"focus-visible:not-disabled:bg-input size-7 rounded-full focus-visible:ring-0","data-slot":"input-search-clear",disabled:d??g,size:"icon",variant:"ghost",onClick:()=>{z("")},children:e(a,{})}):null]})}export{m as InputSearch};
2
+ import{jsx as a,jsxs as e}from"react/jsx-runtime";import{SearchIcon as r,XIcon as t}from"lucide-react";import{InputGroup as i,InputGroupAddon as l,InputGroupButton as s,InputGroupInput as n}from"./input-group.js";import{useControllableState as o}from"@radix-ui/react-use-controllable-state";function u({className:u,defaultValue:c,disabled:d,onChange:p,readOnly:m,value:h,...b}){let[f,g]=o({defaultProp:c,onChange:p,prop:h});return e(i,{className:u,"data-disabled":d?"true":void 0,"data-slot":"input-search",children:[a(l,{align:"inline-start",children:a(r,{})}),a(n,{"data-slot":"input-search-item",disabled:d,readOnly:m,type:"search",value:f??"",onChange:a=>{g(a.target.value)},...b}),f?a(s,{"aria-label":"Clear search",className:"focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0","data-slot":"input-search-clear",disabled:d??m,size:"icon-sm",variant:"ghost",onClick:()=>{g("")},children:a(t,{})}):null]})}export{u as InputSearch};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input,inputVariants:()=>inputVariants});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_cjs_namespaceObject=require("../primitives/input.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),inputVariants=(0,tailwind_variants_namespaceObject.tv)({slots:{input:"placeholder:text-muted-foreground outline-hidden file:py-1.75 size-full file:bg-transparent file:font-medium",root:"border-input not-has-disabled:shadow-xs hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3 has-disabled:opacity-50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 text-base transition md:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"}}),{input:e,root:t}=inputVariants();function Input({className:r,disabled:i,loaderPosition:n,loading:_,prefix:a,readOnly:s,spinner:p,suffix:c,...o}){return(0,jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Root,{className:t({className:r}),"data-slot":"input",disabled:i,loaderPosition:n,loading:_,prefix:a,readOnly:s,spinner:p??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),suffix:c,children:(0,jsx_runtime_namespaceObject.jsx)(input_cjs_namespaceObject.Field,{className:e(),"data-slot":"input-item",...o})})}for(var __webpack_i__ in exports.Input=__webpack_exports__.Input,exports.inputVariants=__webpack_exports__.inputVariants,__webpack_exports__)-1===["Input","inputVariants"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function Input({className:e,type:r,..._}){return(0,jsx_runtime_namespaceObject.jsx)("input",{className:(0,tailwind_variants_namespaceObject.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),"data-slot":"input",type:r,..._})}for(var __webpack_i__ in exports.Input=__webpack_exports__.Input,__webpack_exports__)-1===["Input"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,14 +1,5 @@
1
1
  import type { ComponentProps, JSX } from "react";
2
- import type { VariantProps } from "@codefast/tailwind-variants";
3
- import * as InputPrimitive from "../primitives/input";
4
- declare const inputVariants: import("@codefast/tailwind-variants").VariantFunctionType<Record<string, never>, {
5
- input: string;
6
- root: string;
7
- }>;
8
- interface InputProps extends ComponentProps<typeof InputPrimitive.Root>, Omit<ComponentProps<typeof InputPrimitive.Field>, "prefix" | "type">, VariantProps<typeof inputVariants> {
9
- type?: "date" | "datetime-local" | "email" | "file" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week";
10
- }
11
- declare function Input({ className, disabled, loaderPosition, loading, prefix, readOnly, spinner, suffix, ...props }: InputProps): JSX.Element;
12
- export { inputVariants };
2
+ type InputProps = ComponentProps<"input">;
3
+ declare function Input({ className, type, ...props }: InputProps): JSX.Element;
13
4
  export { Input };
14
5
  export type { InputProps };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as i}from"react/jsx-runtime";import{Spinner as t}from"./spinner.js";import{Field as r,Root as e}from"../primitives/input.js";import{tv as n}from"@codefast/tailwind-variants";let s=n({slots:{input:"placeholder:text-muted-foreground outline-hidden file:py-1.75 size-full file:bg-transparent file:font-medium",root:"border-input not-has-disabled:shadow-xs hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3 has-disabled:opacity-50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 text-base transition md:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"}}),{input:a,root:o}=s();function d({className:n,disabled:s,loaderPosition:d,loading:l,prefix:u,readOnly:f,spinner:p,suffix:h,...c}){return i(e,{className:o({className:n}),"data-slot":"input",disabled:s,loaderPosition:d,loading:l,prefix:u,readOnly:f,spinner:p??i(t,{},"spinner"),suffix:h,children:i(r,{className:a(),"data-slot":"input-item",...c})})}export{d as Input,s as inputVariants};
2
+ import{jsx as e}from"react/jsx-runtime";import{cn as i}from"@codefast/tailwind-variants";function r({className:r,type:t,...n}){return e("input",{className:i("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",r),"data-slot":"input",type:t,...n})}export{r as Input};
@@ -0,0 +1 @@
1
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{NativeSelectOption:()=>NativeSelectOption,NativeSelect:()=>NativeSelect,NativeSelectOptGroup:()=>NativeSelectOptGroup});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function NativeSelect({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"group/native-select relative w-fit has-[select:disabled]:opacity-50","data-slot":"native-select-wrapper",children:[(0,jsx_runtime_namespaceObject.jsx)("select",{className:(0,tailwind_variants_namespaceObject.cn)("border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-lg border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),"data-slot":"native-select",...t}),(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none","data-slot":"native-select-icon"})]})}function NativeSelectOption({...e}){return(0,jsx_runtime_namespaceObject.jsx)("option",{"data-slot":"native-select-option",...e})}function NativeSelectOptGroup({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("optgroup",{className:(0,tailwind_variants_namespaceObject.cn)(e),"data-slot":"native-select-optgroup",...t})}for(var __webpack_i__ in exports.NativeSelect=__webpack_exports__.NativeSelect,exports.NativeSelectOptGroup=__webpack_exports__.NativeSelectOptGroup,exports.NativeSelectOption=__webpack_exports__.NativeSelectOption,__webpack_exports__)-1===["NativeSelect","NativeSelectOptGroup","NativeSelectOption"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,9 @@
1
+ import type { ComponentProps, JSX } from "react";
2
+ type NativeSelectProps = ComponentProps<"select">;
3
+ declare function NativeSelect({ className, ...props }: NativeSelectProps): JSX.Element;
4
+ type NativeSelectOptionProps = ComponentProps<"option">;
5
+ declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): JSX.Element;
6
+ type NativeSelectOptGroupProps = ComponentProps<"optgroup">;
7
+ declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): JSX.Element;
8
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
9
+ export type { NativeSelectOptGroupProps, NativeSelectOptionProps, NativeSelectProps };
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{ChevronDownIcon as r}from"lucide-react";import{cn as i}from"@codefast/tailwind-variants";function a({className:a,...o}){return t("div",{className:"group/native-select relative w-fit has-[select:disabled]:opacity-50","data-slot":"native-select-wrapper",children:[e("select",{className:i("border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-lg border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),"data-slot":"native-select",...o}),e(r,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none","data-slot":"native-select-icon"})]})}function o({...t}){return e("option",{"data-slot":"native-select-option",...t})}function n({className:t,...r}){return e("optgroup",{className:i(t),"data-slot":"native-select-optgroup",...r})}export{a as NativeSelect,n as NativeSelectOptGroup,o as NativeSelectOption};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SelectItem:()=>SelectItem,SelectGroup:()=>SelectGroup,SelectLabel:()=>SelectLabel,SelectContent:()=>SelectContent,Select:()=>Select,SelectSeparator:()=>SelectSeparator,SelectTrigger:()=>SelectTrigger,SelectScrollUpButton:()=>SelectScrollUpButton,SelectScrollDownButton:()=>SelectScrollDownButton,SelectValue:()=>SelectValue});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_select_namespaceObject=require("@radix-ui/react-select");function Select({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Root,{"data-slot":"select",...e})}function SelectGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Group,{"data-slot":"select-group",...e})}function SelectValue({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Value,{"data-slot":"select-value",...e})}function SelectTrigger({children:e,className:t,size:a,...c}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger,{className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:["[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",t],size:a,variant:"outline"}),"data-size":a,"data-slot":"select-trigger",...c,children:[e,(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Icon,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronsUpDownIcon,{})})]})}function SelectScrollUpButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollUpButton,{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon,{size:16})})}function SelectScrollDownButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollDownButton,{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{size:16})})}function SelectContent({children:e,className:t,position:a="popper",...c}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Content,{className:(0,tailwind_variants_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border shadow-lg","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),"data-slot":"select-content",position:a,...c,children:[(0,jsx_runtime_namespaceObject.jsx)(SelectScrollUpButton,{}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Viewport,{className:(0,tailwind_variants_namespaceObject.cn)("p-1","popper"===a&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),(0,jsx_runtime_namespaceObject.jsx)(SelectScrollDownButton,{})]})})}function SelectLabel({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Label,{className:(0,tailwind_variants_namespaceObject.cn)("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-slot":"select-label",...t})}function SelectItem({children:e,className:t,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Item,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),"data-slot":"select-item",...a,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute right-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemText,{children:e})]})}function SelectSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator,{className:(0,tailwind_variants_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"select-separator",...t})}for(var __webpack_i__ in exports.Select=__webpack_exports__.Select,exports.SelectContent=__webpack_exports__.SelectContent,exports.SelectGroup=__webpack_exports__.SelectGroup,exports.SelectItem=__webpack_exports__.SelectItem,exports.SelectLabel=__webpack_exports__.SelectLabel,exports.SelectScrollDownButton=__webpack_exports__.SelectScrollDownButton,exports.SelectScrollUpButton=__webpack_exports__.SelectScrollUpButton,exports.SelectSeparator=__webpack_exports__.SelectSeparator,exports.SelectTrigger=__webpack_exports__.SelectTrigger,exports.SelectValue=__webpack_exports__.SelectValue,__webpack_exports__)-1===["Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectValue"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SelectItem:()=>SelectItem,SelectGroup:()=>SelectGroup,SelectLabel:()=>SelectLabel,SelectContent:()=>SelectContent,Select:()=>Select,SelectSeparator:()=>SelectSeparator,SelectTrigger:()=>SelectTrigger,SelectScrollUpButton:()=>SelectScrollUpButton,SelectScrollDownButton:()=>SelectScrollDownButton,SelectValue:()=>SelectValue});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_select_namespaceObject=require("@radix-ui/react-select");function Select({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Root,{"data-slot":"select",...e})}function SelectGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Group,{"data-slot":"select-group",...e})}function SelectValue({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Value,{"data-slot":"select-value",...e})}function SelectTrigger({children:e,className:t,size:a,...c}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger,{className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:["[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",t],size:a,variant:"outline"}),"data-size":a,"data-slot":"select-trigger",...c,children:[e,(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Icon,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{})})]})}function SelectScrollUpButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollUpButton,{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon,{size:16})})}function SelectScrollDownButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollDownButton,{className:(0,tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{size:16})})}function SelectContent({children:e,className:t,position:a="popper",...c}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Content,{className:(0,tailwind_variants_namespaceObject.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border shadow-lg","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),"data-slot":"select-content",position:a,...c,children:[(0,jsx_runtime_namespaceObject.jsx)(SelectScrollUpButton,{}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Viewport,{className:(0,tailwind_variants_namespaceObject.cn)("p-1","popper"===a&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),(0,jsx_runtime_namespaceObject.jsx)(SelectScrollDownButton,{})]})})}function SelectLabel({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Label,{className:(0,tailwind_variants_namespaceObject.cn)("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-slot":"select-label",...t})}function SelectItem({children:e,className:t,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Item,{className:(0,tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),"data-slot":"select-item",...a,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute right-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon,{className:"size-4"})})}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemText,{children:e})]})}function SelectSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator,{className:(0,tailwind_variants_namespaceObject.cn)("bg-border mx-2 my-1 h-px",e),"data-slot":"select-separator",...t})}for(var __webpack_i__ in exports.Select=__webpack_exports__.Select,exports.SelectContent=__webpack_exports__.SelectContent,exports.SelectGroup=__webpack_exports__.SelectGroup,exports.SelectItem=__webpack_exports__.SelectItem,exports.SelectLabel=__webpack_exports__.SelectLabel,exports.SelectScrollDownButton=__webpack_exports__.SelectScrollDownButton,exports.SelectScrollUpButton=__webpack_exports__.SelectScrollUpButton,exports.SelectSeparator=__webpack_exports__.SelectSeparator,exports.SelectTrigger=__webpack_exports__.SelectTrigger,exports.SelectValue=__webpack_exports__.SelectValue,__webpack_exports__)-1===["Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectValue"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{CheckIcon as a,ChevronDownIcon as s,ChevronUpIcon as o,ChevronsUpDownIcon as l}from"lucide-react";import{buttonVariants as r}from"./button.js";import{cn as n}from"@codefast/tailwind-variants";import{Content as i,Group as d,Icon as c,Item as u,ItemIndicator as m,ItemText as p,Label as f,Portal as g,Root as x,ScrollDownButton as h,ScrollUpButton as v,Separator as b,Trigger as y,Value as S,Viewport as w}from"@radix-ui/react-select";function N({...e}){return t(x,{"data-slot":"select",...e})}function z({...e}){return t(d,{"data-slot":"select-group",...e})}function j({...e}){return t(S,{"data-slot":"select-value",...e})}function _({children:a,className:s,size:o,...n}){return e(y,{className:r({className:["[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",s],size:o,variant:"outline"}),"data-size":o,"data-slot":"select-trigger",...n,children:[a,t(c,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:t(l,{})})]})}function k({className:e,...a}){return t(v,{className:n("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...a,children:t(o,{size:16})})}function B({className:e,...a}){return t(h,{className:n("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...a,children:t(s,{size:16})})}function C({children:a,className:s,position:o="popper",...l}){return t(g,{children:e(i,{className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border shadow-lg","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),"data-slot":"select-content",position:o,...l,children:[t(k,{}),t(w,{className:n("p-1","popper"===o&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:a}),t(B,{})]})})}function D({className:e,...a}){return t(f,{className:n("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-slot":"select-label",...a})}function G({children:s,className:o,...l}){return e(u,{className:n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),"data-slot":"select-item",...l,children:[t("span",{className:"absolute right-2 flex items-center justify-center",children:t(m,{children:t(a,{className:"size-4"})})}),t(p,{children:s})]})}function I({className:e,...a}){return t(b,{className:n("bg-border mx-2 my-1 h-px",e),"data-slot":"select-separator",...a})}export{N as Select,C as SelectContent,z as SelectGroup,G as SelectItem,D as SelectLabel,B as SelectScrollDownButton,k as SelectScrollUpButton,I as SelectSeparator,_ as SelectTrigger,j as SelectValue};
2
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{CheckIcon as a,ChevronDownIcon as s,ChevronUpIcon as o}from"lucide-react";import{buttonVariants as l}from"./button.js";import{cn as r}from"@codefast/tailwind-variants";import{Content as n,Group as i,Icon as d,Item as c,ItemIndicator as u,ItemText as m,Label as p,Portal as f,Root as g,ScrollDownButton as x,ScrollUpButton as h,Separator as v,Trigger as b,Value as y,Viewport as S}from"@radix-ui/react-select";function w({...e}){return t(g,{"data-slot":"select",...e})}function N({...e}){return t(i,{"data-slot":"select-group",...e})}function z({...e}){return t(y,{"data-slot":"select-value",...e})}function j({children:a,className:o,size:r,...n}){return e(b,{className:l({className:["[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",o],size:r,variant:"outline"}),"data-size":r,"data-slot":"select-trigger",...n,children:[a,t(d,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:t(s,{})})]})}function _({className:e,...a}){return t(h,{className:r("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...a,children:t(o,{size:16})})}function k({className:e,...a}){return t(x,{className:r("text-muted-foreground flex items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...a,children:t(s,{size:16})})}function B({children:a,className:s,position:o="popper",...l}){return t(f,{children:e(n,{className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border shadow-lg","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),"data-slot":"select-content",position:o,...l,children:[t(_,{}),t(S,{className:r("p-1","popper"===o&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:a}),t(k,{})]})})}function C({className:e,...a}){return t(p,{className:r("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",e),"data-slot":"select-label",...a})}function D({children:s,className:o,...l}){return e(c,{className:r("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),"data-slot":"select-item",...l,children:[t("span",{className:"absolute right-2 flex items-center justify-center",children:t(u,{children:t(a,{className:"size-4"})})}),t(m,{children:s})]})}function G({className:e,...a}){return t(v,{className:r("bg-border mx-2 my-1 h-px",e),"data-slot":"select-separator",...a})}export{w as Select,B as SelectContent,N as SelectGroup,D as SelectItem,C as SelectLabel,k as SelectScrollDownButton,_ as SelectScrollUpButton,G as SelectSeparator,j as SelectTrigger,z as SelectValue};