@kubetail/ui 2.0.2 → 2.0.4-rc1

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 (118) hide show
  1. package/dist/_virtual/rolldown:runtime.cjs +1 -0
  2. package/dist/elements/button.cjs +2 -2
  3. package/dist/elements/button.cjs.map +1 -1
  4. package/dist/elements/button.js +39 -42
  5. package/dist/elements/button.js.map +1 -1
  6. package/dist/elements/calendar.cjs +2 -2
  7. package/dist/elements/calendar.cjs.map +1 -1
  8. package/dist/elements/calendar.js +23 -27
  9. package/dist/elements/calendar.js.map +1 -1
  10. package/dist/elements/card.cjs +2 -2
  11. package/dist/elements/card.cjs.map +1 -1
  12. package/dist/elements/card.js +47 -50
  13. package/dist/elements/card.js.map +1 -1
  14. package/dist/elements/checkbox.cjs +2 -2
  15. package/dist/elements/checkbox.cjs.map +1 -1
  16. package/dist/elements/checkbox.js +19 -28
  17. package/dist/elements/checkbox.js.map +1 -1
  18. package/dist/elements/dialog.cjs +2 -2
  19. package/dist/elements/dialog.cjs.map +1 -1
  20. package/dist/elements/dialog.js +75 -107
  21. package/dist/elements/dialog.js.map +1 -1
  22. package/dist/elements/dropdown-menu.cjs +2 -2
  23. package/dist/elements/dropdown-menu.cjs.map +1 -1
  24. package/dist/elements/dropdown-menu.js +107 -181
  25. package/dist/elements/dropdown-menu.js.map +1 -1
  26. package/dist/elements/form.cjs +2 -2
  27. package/dist/elements/form.cjs.map +1 -1
  28. package/dist/elements/form.js +73 -76
  29. package/dist/elements/form.js.map +1 -1
  30. package/dist/elements/input.cjs +2 -2
  31. package/dist/elements/input.cjs.map +1 -1
  32. package/dist/elements/input.js +12 -21
  33. package/dist/elements/input.js.map +1 -1
  34. package/dist/elements/label.cjs +2 -2
  35. package/dist/elements/label.cjs.map +1 -1
  36. package/dist/elements/label.js +13 -19
  37. package/dist/elements/label.js.map +1 -1
  38. package/dist/elements/pagination.cjs +2 -0
  39. package/dist/elements/pagination.cjs.map +1 -0
  40. package/dist/elements/pagination.d.ts +13 -0
  41. package/dist/elements/pagination.js +79 -0
  42. package/dist/elements/pagination.js.map +1 -0
  43. package/dist/elements/pagination.stories.d.ts +15 -0
  44. package/dist/elements/pagination.test.d.ts +0 -0
  45. package/dist/elements/popover.cjs +2 -2
  46. package/dist/elements/popover.cjs.map +1 -1
  47. package/dist/elements/popover.js +31 -37
  48. package/dist/elements/popover.js.map +1 -1
  49. package/dist/elements/search-box.cjs +2 -2
  50. package/dist/elements/search-box.cjs.map +1 -1
  51. package/dist/elements/search-box.js +25 -28
  52. package/dist/elements/search-box.js.map +1 -1
  53. package/dist/elements/select.cjs +2 -2
  54. package/dist/elements/select.cjs.map +1 -1
  55. package/dist/elements/select.js +89 -136
  56. package/dist/elements/select.js.map +1 -1
  57. package/dist/elements/separator.cjs +2 -0
  58. package/dist/elements/separator.cjs.map +1 -0
  59. package/dist/elements/separator.d.ts +3 -0
  60. package/dist/elements/separator.js +16 -0
  61. package/dist/elements/separator.js.map +1 -0
  62. package/dist/elements/separator.stories.d.ts +15 -0
  63. package/dist/elements/separator.test.d.ts +0 -0
  64. package/dist/elements/sheet.cjs +2 -0
  65. package/dist/elements/sheet.cjs.map +1 -0
  66. package/dist/elements/sheet.d.ts +12 -0
  67. package/dist/elements/sheet.js +81 -0
  68. package/dist/elements/sheet.js.map +1 -0
  69. package/dist/elements/sheet.stories.d.ts +15 -0
  70. package/dist/elements/sheet.test.d.ts +0 -0
  71. package/dist/elements/sidebar.cjs +2 -0
  72. package/dist/elements/sidebar.cjs.map +1 -0
  73. package/dist/elements/sidebar.d.ts +68 -0
  74. package/dist/elements/sidebar.js +347 -0
  75. package/dist/elements/sidebar.js.map +1 -0
  76. package/dist/elements/sidebar.stories.d.ts +17 -0
  77. package/dist/elements/sidebar.test.d.ts +0 -0
  78. package/dist/elements/skeleton.cjs +2 -0
  79. package/dist/elements/skeleton.cjs.map +1 -0
  80. package/dist/elements/skeleton.d.ts +2 -0
  81. package/dist/elements/skeleton.js +12 -0
  82. package/dist/elements/skeleton.js.map +1 -0
  83. package/dist/elements/skeleton.stories.d.ts +15 -0
  84. package/dist/elements/skeleton.test.d.ts +0 -0
  85. package/dist/elements/spinner.cjs +2 -2
  86. package/dist/elements/spinner.cjs.map +1 -1
  87. package/dist/elements/spinner.js +30 -39
  88. package/dist/elements/spinner.js.map +1 -1
  89. package/dist/elements/table.cjs +2 -2
  90. package/dist/elements/table.cjs.map +1 -1
  91. package/dist/elements/table.js +58 -63
  92. package/dist/elements/table.js.map +1 -1
  93. package/dist/elements/tabs.cjs +2 -2
  94. package/dist/elements/tabs.cjs.map +1 -1
  95. package/dist/elements/tabs.js +31 -38
  96. package/dist/elements/tabs.js.map +1 -1
  97. package/dist/elements/tooltip.cjs +2 -0
  98. package/dist/elements/tooltip.cjs.map +1 -0
  99. package/dist/elements/tooltip.d.ts +6 -0
  100. package/dist/elements/tooltip.js +35 -0
  101. package/dist/elements/tooltip.js.map +1 -0
  102. package/dist/elements/tooltip.stories.d.ts +15 -0
  103. package/dist/elements/tooltip.test.d.ts +0 -0
  104. package/dist/hooks/use-mobile.cjs +2 -0
  105. package/dist/hooks/use-mobile.cjs.map +1 -0
  106. package/dist/hooks/use-mobile.d.ts +1 -0
  107. package/dist/hooks/use-mobile.js +14 -0
  108. package/dist/hooks/use-mobile.js.map +1 -0
  109. package/dist/index.cjs +0 -2
  110. package/dist/index.css +16 -16
  111. package/dist/index.js +0 -2
  112. package/dist/lib/utils.cjs +2 -2
  113. package/dist/lib/utils.cjs.map +1 -1
  114. package/dist/lib/utils.js +7 -8
  115. package/dist/lib/utils.js.map +1 -1
  116. package/package.json +51 -41
  117. package/dist/index.cjs.map +0 -1
  118. package/dist/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sources":["../../src/elements/form.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useId, useMemo } from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/elements/label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n const value = useMemo(() => ({ name: props.name }), [props.name]);\n\n return (\n <FormFieldContext.Provider value={value}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext);\n const itemContext = useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = useId();\n const value = useMemo(() => ({ id }), [id]);\n\n return (\n <FormItemContext.Provider value={value}>\n <div data-slot=\"form-item\" className={cn('grid gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn('text-destructive text-sm', className)} {...props}>\n {body}\n </p>\n );\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };\n"],"names":["Form","FormProvider","FormFieldContext","createContext","FormItemContext","FormField","props","value","useMemo","jsx","Controller","useFormField","fieldContext","useContext","itemContext","getFieldState","useFormContext","formState","useFormState","fieldState","id","FormItem","className","useId","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","body"],"mappings":";;;;;;;AAkBA,MAAMA,IAAOC,GASPC,IAAmBC,EAAqC,EAA2B,GAMnFC,IAAkBD,EAAoC,EAA0B,GAEhFE,IAAY,CAGhB;AAAA,EACA,GAAGC;AACL,MAA4C;AAC1C,QAAMC,IAAQC,EAAQ,OAAO,EAAE,MAAMF,EAAM,KAAA,IAAS,CAACA,EAAM,IAAI,CAAC;AAEhE,SACE,gBAAAG,EAACP,EAAiB,UAAjB,EAA0B,OAAAK,GACzB,UAAA,gBAAAE,EAACC,GAAA,EAAY,GAAGJ,EAAA,CAAO,EAAA,CACzB;AAEJ,GAEMK,IAAe,MAAM;AACzB,QAAMC,IAAeC,EAAWX,CAAgB,GAC1CY,IAAcD,EAAWT,CAAe,GACxC,EAAE,eAAAW,EAAA,IAAkBC,EAAA,GACpBC,IAAYC,EAAa,EAAE,MAAMN,EAAa,MAAM,GACpDO,IAAaJ,EAAcH,EAAa,MAAMK,CAAS;AAE7D,MAAI,CAACL;AACH,UAAM,IAAI,MAAM,gDAAgD;AAGlE,QAAM,EAAE,IAAAQ,MAAON;AAEf,SAAO;AAAA,IACL,IAAAM;AAAA,IACA,MAAMR,EAAa;AAAA,IACnB,YAAY,GAAGQ,CAAE;AAAA,IACjB,mBAAmB,GAAGA,CAAE;AAAA,IACxB,eAAe,GAAGA,CAAE;AAAA,IACpB,GAAGD;AAAA,EAAA;AAEP;AAEA,SAASE,EAAS,EAAE,WAAAC,GAAW,GAAGhB,KAAsC;AACtE,QAAMc,IAAKG,EAAA,GACLhB,IAAQC,EAAQ,OAAO,EAAE,IAAAY,MAAO,CAACA,CAAE,CAAC;AAE1C,2BACGhB,EAAgB,UAAhB,EAAyB,OAAAG,GACxB,4BAAC,OAAA,EAAI,aAAU,aAAY,WAAWiB,EAAG,cAAcF,CAAS,GAAI,GAAGhB,GAAO,GAChF;AAEJ;AAEA,SAASmB,EAAU,EAAE,WAAAH,GAAW,GAAGhB,KAA2D;AAC5F,QAAM,EAAE,OAAAoB,GAAO,YAAAC,EAAA,IAAehB,EAAA;AAE9B,SACE,gBAAAF;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,cAAY,CAAC,CAACF;AAAA,MACd,WAAWF,EAAG,sCAAsCF,CAAS;AAAA,MAC7D,SAASK;AAAA,MACR,GAAGrB;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASuB,EAAY,EAAE,GAAGvB,KAA4C;AACpE,QAAM,EAAE,OAAAoB,GAAO,YAAAC,GAAY,mBAAAG,GAAmB,eAAAC,EAAA,IAAkBpB,EAAA;AAEhE,SACE,gBAAAF;AAAA,IAACuB;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,IAAIL;AAAA,MACJ,oBAAmBD,IAA4B,GAAGI,CAAiB,IAAIC,CAAa,KAAzDD;AAAA,MAC3B,gBAAc,CAAC,CAACJ;AAAA,MACf,GAAGpB;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS2B,EAAgB,EAAE,WAAAX,GAAW,GAAGhB,KAAoC;AAC3E,QAAM,EAAE,mBAAAwB,EAAA,IAAsBnB,EAAA;AAE9B,SACE,gBAAAF;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,IAAIqB;AAAA,MACJ,WAAWN,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGhB;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS4B,EAAY,EAAE,WAAAZ,GAAW,GAAGhB,KAAoC;AACvE,QAAM,EAAE,OAAAoB,GAAO,eAAAK,EAAA,IAAkBpB,EAAA,GAC3BwB,IAAOT,IAAQ,QAAOA,KAAA,gBAAAA,EAAO,YAAW,EAAE,IAAIpB,EAAM;AAE1D,SAAK6B,IAKH,gBAAA1B,EAAC,KAAA,EAAE,aAAU,gBAAe,IAAIsB,GAAe,WAAWP,EAAG,4BAA4BF,CAAS,GAAI,GAAGhB,GACtG,UAAA6B,GACH,IANO;AAQX;"}
1
+ {"version":3,"file":"form.js","names":[],"sources":["../../src/elements/form.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useId, useMemo } from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/elements/label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n const value = useMemo(() => ({ name: props.name }), [props.name]);\n\n return (\n <FormFieldContext.Provider value={value}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext);\n const itemContext = useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = useId();\n const value = useMemo(() => ({ id }), [id]);\n\n return (\n <FormItemContext.Provider value={value}>\n <div data-slot=\"form-item\" className={cn('grid gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn('text-destructive text-sm', className)} {...props}>\n {body}\n </p>\n );\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };\n"],"mappings":";;;;;;;;AAkBA,IAAM,OAAO,cASP,mBAAmB,cAAqC,EAAE,CAA0B,EAMpF,kBAAkB,cAAoC,EAAE,CAAyB,EAEjF,aAGJ,EACA,GAAG,QACuC;CAC1C,IAAM,IAAQ,eAAe,EAAE,MAAM,EAAM,MAAM,GAAG,CAAC,EAAM,KAAK,CAAC;AAEjE,QACE,oBAAC,iBAAiB,UAAA;EAAgB;YAChC,oBAAC,YAAA,EAAW,GAAI,GAAA,CAAS;GACC;GAI1B,qBAAqB;CACzB,IAAM,IAAe,WAAW,iBAAiB,EAC3C,IAAc,WAAW,gBAAgB,EACzC,EAAE,qBAAkB,gBAAgB,EACpC,IAAY,aAAa,EAAE,MAAM,EAAa,MAAM,CAAC,EACrD,IAAa,EAAc,EAAa,MAAM,EAAU;AAE9D,KAAI,CAAC,EACH,OAAU,MAAM,iDAAiD;CAGnE,IAAM,EAAE,UAAO;AAEf,QAAO;EACL;EACA,MAAM,EAAa;EACnB,YAAY,GAAG,EAAG;EAClB,mBAAmB,GAAG,EAAG;EACzB,eAAe,GAAG,EAAG;EACrB,GAAG;EACJ;;AAGH,SAAS,SAAS,EAAE,cAAW,GAAG,KAAsC;CACtE,IAAM,IAAK,OAAO,EACZ,IAAQ,eAAe,EAAE,OAAI,GAAG,CAAC,EAAG,CAAC;AAE3C,QACE,oBAAC,gBAAgB,UAAA;EAAgB;YAC/B,oBAAC,OAAA;GAAI,aAAU;GAAY,WAAW,GAAG,cAAc,EAAU;GAAE,GAAI;IAAS;GACvD;;AAI/B,SAAS,UAAU,EAAE,cAAW,GAAG,KAA2D;CAC5F,IAAM,EAAE,UAAO,kBAAe,cAAc;AAE5C,QACE,oBAAC,OAAA;EACC,aAAU;EACV,cAAY,CAAC,CAAC;EACd,WAAW,GAAG,sCAAsC,EAAU;EAC9D,SAAS;EACT,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,GAAG,KAA4C;CACpE,IAAM,EAAE,UAAO,eAAY,sBAAmB,qBAAkB,cAAc;AAE9E,QACE,oBAAC,MAAA;EACC,aAAU;EACV,IAAI;EACJ,oBAAmB,IAA4B,GAAG,EAAkB,GAAG,MAA5C;EAC3B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EAAE,cAAW,GAAG,KAAoC;CAC3E,IAAM,EAAE,yBAAsB,cAAc;AAE5C,QACE,oBAAC,KAAA;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,iCAAiC,EAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,cAAW,GAAG,KAAoC;CACvE,IAAM,EAAE,UAAO,qBAAkB,cAAc,EACzC,IAAO,IAAQ,OAAO,GAAO,WAAW,GAAG,GAAG,EAAM;AAM1D,QAJK,IAKH,oBAAC,KAAA;EAAE,aAAU;EAAe,IAAI;EAAe,WAAW,GAAG,4BAA4B,EAAU;EAAE,GAAI;YACtG;GACC,GANG"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("../lib/utils.cjs");function o({className:e,type:i,...r}){return t.jsx("input",{type:i,"data-slot":"input",className:n.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 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),...r})}exports.Input=o;
2
- //# sourceMappingURL=input.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,type:r,...i}){return(0,n.jsx)(`input`,{type:r,"data-slot":`input`,className:t.cn(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 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),...i})}exports.Input=r;
2
+ //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","jsx","cn"],"mappings":"mJAEA,SAASA,EAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,GAAwC,CAC3E,OACEC,EAAAA,IAAC,QAAA,CACC,KAAAF,EACA,YAAU,QACV,UAAWG,EAAAA,GACT,kcACA,gFACA,yGACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"input.cjs","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":"wLAEA,SAAS,EAAM,CAAE,YAAW,OAAM,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAA,CACO,OACN,YAAU,QACV,UAAW,EAAA,GACT,kcACA,gFACA,yGACA,EACD,CACD,GAAI,GACJ"}
@@ -1,22 +1,13 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { cn as n } from "../lib/utils.js";
3
- function a({ className: e, type: i, ...r }) {
4
- return /* @__PURE__ */ t(
5
- "input",
6
- {
7
- type: i,
8
- "data-slot": "input",
9
- className: n(
10
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
12
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
13
- e
14
- ),
15
- ...r
16
- }
17
- );
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function Input({ className: n, type: r, ...i }) {
4
+ return /* @__PURE__ */ jsx("input", {
5
+ type: r,
6
+ "data-slot": "input",
7
+ className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 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", n),
8
+ ...i
9
+ });
18
10
  }
19
- export {
20
- a as Input
21
- };
22
- //# sourceMappingURL=input.js.map
11
+ export { Input };
12
+
13
+ //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","jsx","cn"],"mappings":";;AAEA,SAASA,EAAM,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AAC3E,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAF;AAAA,MACA,aAAU;AAAA,MACV,WAAWG;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex 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 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;AAEA,SAAS,MAAM,EAAE,cAAW,SAAM,GAAG,KAAwC;AAC3E,QACE,oBAAC,SAAA;EACO;EACN,aAAU;EACV,WAAW,GACT,mcACA,iFACA,0GACA,EACD;EACD,GAAI;GACJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("@radix-ui/react-label"),i=require("../lib/utils.cjs");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=l(a);function c({className:e,...t}){return o.jsx(s.Root,{"data-slot":"label",className:i.cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}exports.Label=c;
2
- //# sourceMappingURL=label.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-label`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`label`,className:t.cn(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...i})}exports.Label=i;
2
+ //# sourceMappingURL=label.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.cjs","sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"names":["Label","className","props","jsx","LabelPrimitive","cn"],"mappings":"gdAMA,SAASA,EAAM,CAAE,UAAAC,EAAW,GAAGC,GAA2D,CACxF,OACEC,EAAAA,IAACC,EAAe,KAAf,CACC,YAAU,QACV,UAAWC,EAAAA,GACT,sNACAJ,CAAA,EAED,GAAGC,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"label.cjs","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":"uPAMA,SAAS,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAAA,EAAA,KAAC,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EAAA,GACT,sNACA,EACD,CACD,GAAI,GACJ"}
@@ -1,20 +1,14 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as a from "@radix-ui/react-label";
3
- import { cn as r } from "../lib/utils.js";
4
- function l({ className: e, ...t }) {
5
- return /* @__PURE__ */ o(
6
- a.Root,
7
- {
8
- "data-slot": "label",
9
- className: r(
10
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
11
- e
12
- ),
13
- ...t
14
- }
15
- );
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as LabelPrimitive from "@radix-ui/react-label";
5
+ function Label({ className: r, ...i }) {
6
+ return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
7
+ "data-slot": "label",
8
+ className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", r),
9
+ ...i
10
+ });
16
11
  }
17
- export {
18
- l as Label
19
- };
20
- //# sourceMappingURL=label.js.map
12
+ export { Label };
13
+
14
+ //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"names":["Label","className","props","jsx","LabelPrimitive","cn"],"mappings":";;;AAMA,SAASA,EAAM,EAAE,WAAAC,GAAW,GAAGC,KAA2D;AACxF,SACE,gBAAAC;AAAA,IAACC,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"label.js","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;AAMA,SAAS,MAAM,EAAE,cAAW,GAAG,KAA2D;AACxF,QACE,oBAAC,eAAe,MAAA;EACd,aAAU;EACV,WAAW,GACT,uNACA,EACD;EACD,GAAI;GACJ"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./button.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:t.cn(`mx-auto flex w-full justify-center`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`ul`,{"data-slot":`pagination-content`,className:t.cn(`flex flex-row items-center gap-1`,e),...n})}function c({...e}){return(0,r.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function l({className:e,isActive:i,size:a=`icon`,children:o,...s}){return(0,r.jsx)(`a`,{"aria-current":i?`page`:void 0,"data-slot":`pagination-link`,"data-active":i,className:t.cn(n.buttonVariants({variant:i?`outline`:`ghost`,size:a}),e),...s,children:o})}function u({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to previous page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pl-2.5`,e),...n,children:[(0,r.jsx)(i.ChevronLeftIcon,{}),(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function d({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to next page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pr-2.5`,e),...n,children:[(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,r.jsx)(i.ChevronRightIcon,{})]})}function f({className:e,...n}){return(0,r.jsxs)(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:t.cn(`flex size-9 items-center justify-center`,e),...n,children:[(0,r.jsx)(i.MoreHorizontalIcon,{className:`size-4`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
2
+ //# sourceMappingURL=pagination.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.cjs","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":"8QAMA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAA,CACC,KAAK,aACL,aAAW,aACX,YAAU,aACV,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAC9D,GAAI,GACJ,CAIN,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAqC,CAC9E,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,qBAAqB,UAAW,EAAA,GAAG,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAGvH,SAAS,EAAe,CAAE,GAAG,GAAqC,CAChE,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,kBAAkB,GAAI,GAAS,CAQtD,SAAS,EAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,WAAU,GAAG,GAA8B,CACvG,OACE,EAAA,EAAA,KAAC,IAAA,CACC,eAAc,EAAW,OAAS,IAAA,GAClC,YAAU,kBACV,cAAa,EACb,UAAW,EAAA,GACT,EAAA,eAAe,CACb,QAAS,EAAW,UAAY,QAChC,OACD,CAAC,CACF,EACD,CACD,GAAI,EAEH,YACC,CAIR,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsD,CAChG,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,gBAAA,EAAA,CAAkB,EACnB,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,YAAe,CAAA,EAClC,CAIrB,SAAS,EAAe,CAAE,YAAW,GAAG,GAAsD,CAC5F,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,kBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,QAAW,EAC7C,EAAA,EAAA,KAAC,EAAA,iBAAA,EAAA,CAAmB,CAAA,EACL,CAIrB,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAuC,CACjF,OACE,EAAA,EAAA,MAAC,OAAA,CACC,cAAA,GACA,YAAU,sBACV,UAAW,EAAA,GAAG,0CAA2C,EAAU,CACnE,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,mBAAA,CAAmB,UAAU,SAAA,CAAW,EACzC,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,cAAiB,CAAA,EACtC"}
@@ -0,0 +1,13 @@
1
+ import { Button } from './button';
2
+ import * as React from 'react';
3
+ declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
6
+ type PaginationLinkProps = {
7
+ isActive?: boolean;
8
+ } & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
9
+ declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
11
+ declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
12
+ declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
13
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
@@ -0,0 +1,79 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { buttonVariants } from "./button.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
5
+ import "react";
6
+ function Pagination({ className: c, ...l }) {
7
+ return /* @__PURE__ */ jsx("nav", {
8
+ role: "navigation",
9
+ "aria-label": "pagination",
10
+ "data-slot": "pagination",
11
+ className: cn("mx-auto flex w-full justify-center", c),
12
+ ...l
13
+ });
14
+ }
15
+ function PaginationContent({ className: c, ...l }) {
16
+ return /* @__PURE__ */ jsx("ul", {
17
+ "data-slot": "pagination-content",
18
+ className: cn("flex flex-row items-center gap-1", c),
19
+ ...l
20
+ });
21
+ }
22
+ function PaginationItem({ ...e }) {
23
+ return /* @__PURE__ */ jsx("li", {
24
+ "data-slot": "pagination-item",
25
+ ...e
26
+ });
27
+ }
28
+ function PaginationLink({ className: l, isActive: u, size: d = "icon", children: f, ...p }) {
29
+ return /* @__PURE__ */ jsx("a", {
30
+ "aria-current": u ? "page" : void 0,
31
+ "data-slot": "pagination-link",
32
+ "data-active": u,
33
+ className: cn(buttonVariants({
34
+ variant: u ? "outline" : "ghost",
35
+ size: d
36
+ }), l),
37
+ ...p,
38
+ children: f
39
+ });
40
+ }
41
+ function PaginationPrevious({ className: c, ...d }) {
42
+ return /* @__PURE__ */ jsxs(PaginationLink, {
43
+ "aria-label": "Go to previous page",
44
+ size: "default",
45
+ className: cn("gap-1 px-2.5 sm:pl-2.5", c),
46
+ ...d,
47
+ children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {}), /* @__PURE__ */ jsx("span", {
48
+ className: "hidden sm:block",
49
+ children: "Previous"
50
+ })]
51
+ });
52
+ }
53
+ function PaginationNext({ className: c, ...u }) {
54
+ return /* @__PURE__ */ jsxs(PaginationLink, {
55
+ "aria-label": "Go to next page",
56
+ size: "default",
57
+ className: cn("gap-1 px-2.5 sm:pr-2.5", c),
58
+ ...u,
59
+ children: [/* @__PURE__ */ jsx("span", {
60
+ className: "hidden sm:block",
61
+ children: "Next"
62
+ }), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
63
+ });
64
+ }
65
+ function PaginationEllipsis({ className: c, ...u }) {
66
+ return /* @__PURE__ */ jsxs("span", {
67
+ "aria-hidden": !0,
68
+ "data-slot": "pagination-ellipsis",
69
+ className: cn("flex size-9 items-center justify-center", c),
70
+ ...u,
71
+ children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
72
+ className: "sr-only",
73
+ children: "More pages"
74
+ })]
75
+ });
76
+ }
77
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
78
+
79
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":";;;;;AAMA,SAAS,WAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,oBAAC,OAAA;EACC,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAW,GAAG,sCAAsC,EAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EAAE,cAAW,GAAG,KAAqC;AAC9E,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAqB,WAAW,GAAG,oCAAoC,EAAU;EAAE,GAAI;GAAS;;AAGvH,SAAS,eAAe,EAAE,GAAG,KAAqC;AAChE,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAkB,GAAI;GAAS;;AAQtD,SAAS,eAAe,EAAE,cAAW,aAAU,UAAO,QAAQ,aAAU,GAAG,KAA8B;AACvG,QACE,oBAAC,KAAA;EACC,gBAAc,IAAW,SAAS,KAAA;EAClC,aAAU;EACV,eAAa;EACb,WAAW,GACT,eAAe;GACb,SAAS,IAAW,YAAY;GAChC;GACD,CAAC,EACF,EACD;EACD,GAAI;EAEH;GACC;;AAIR,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAsD;AAChG,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,iBAAA,EAAA,CAAkB,EACnB,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAe,CAAA;GAClC;;AAIrB,SAAS,eAAe,EAAE,cAAW,GAAG,KAAsD;AAC5F,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAW,EAC7C,oBAAC,kBAAA,EAAA,CAAmB,CAAA;GACL;;AAIrB,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAuC;AACjF,QACE,qBAAC,QAAA;EACC,eAAA;EACA,aAAU;EACV,WAAW,GAAG,2CAA2C,EAAU;EACnE,GAAI;aAEJ,oBAAC,oBAAA,EAAmB,WAAU,UAAA,CAAW,EACzC,oBAAC,QAAA;GAAK,WAAU;aAAU;IAAiB,CAAA;GACtC"}
@@ -0,0 +1,15 @@
1
+ import { Pagination } from './pagination';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Pagination;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function BasicDemo(): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("@radix-ui/react-popover"),s=require("../lib/utils.cjs");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const t=d(i);function p({...e}){return n.jsx(t.Root,{"data-slot":"popover",...e})}function c({...e}){return n.jsx(t.Trigger,{"data-slot":"popover-trigger",...e})}function l({className:e,align:r="center",sideOffset:o=4,...a}){return n.jsx(t.Portal,{children:n.jsx(t.Content,{"data-slot":"popover-content",align:r,sideOffset:o,className:s.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}function u({...e}){return n.jsx(t.Anchor,{"data-slot":"popover-anchor",...e})}const f=t.Close;exports.Popover=p;exports.PopoverAnchor=u;exports.PopoverClose=f;exports.PopoverContent=l;exports.PopoverTrigger=c;
2
- //# sourceMappingURL=popover.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-popover`);r=e.__toESM(r);function i({...e}){return(0,n.jsx)(r.Root,{"data-slot":`popover`,...e})}function a({...e}){return(0,n.jsx)(r.Trigger,{"data-slot":`popover-trigger`,...e})}function o({className:e,align:i=`center`,sideOffset:a=4,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}function s({...e}){return(0,n.jsx)(r.Anchor,{"data-slot":`popover-anchor`,...e})}var c=r.Close;exports.Popover=i,exports.PopoverAnchor=s,exports.PopoverClose=c,exports.PopoverContent=o,exports.PopoverTrigger=a;
2
+ //# sourceMappingURL=popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.cjs","sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","jsx","cn","PopoverAnchor","PopoverClose"],"mappings":"kdAMA,SAASA,EAAQ,CAAE,GAAGC,GAA6D,CACjF,aAAQC,EAAiB,KAAjB,CAAsB,YAAU,UAAW,GAAGD,EAAO,CAC/D,CAEA,SAASE,EAAe,CAAE,GAAGF,GAAgE,CAC3F,aAAQC,EAAiB,QAAjB,CAAyB,YAAU,kBAAmB,GAAGD,EAAO,CAC1E,CAEA,SAASG,EAAe,CACtB,UAAAC,EACA,MAAAC,EAAQ,SACR,WAAAC,EAAa,EACb,GAAGN,CACL,EAA0D,CACxD,OACEO,EAAAA,IAACN,EAAiB,OAAjB,CACC,SAAAM,EAAAA,IAACN,EAAiB,QAAjB,CACC,YAAU,kBACV,MAAAI,EACA,WAAAC,EACA,UAAWE,EAAAA,GACT,ieACAJ,CAAA,EAED,GAAGJ,CAAA,CAAA,EAER,CAEJ,CAEA,SAASS,EAAc,CAAE,GAAGT,GAA+D,CACzF,aAAQC,EAAiB,OAAjB,CAAwB,YAAU,iBAAkB,GAAGD,EAAO,CACxE,CAEA,MAAMU,EAAeT,EAAiB"}
1
+ {"version":3,"file":"popover.cjs","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":"yPAMA,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAO,EAAA,EAAA,KAAC,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAGjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CACtB,YACA,QAAQ,SACR,aAAa,EACb,GAAG,GACqD,CACxD,OACE,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,KAAC,EAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,UAAW,EAAA,GACT,ieACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAI9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAG1E,IAAM,EAAe,EAAiB"}
@@ -1,41 +1,35 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-popover";
3
- import { cn as i } from "../lib/utils.js";
4
- function s({ ...o }) {
5
- return /* @__PURE__ */ e(t.Root, { "data-slot": "popover", ...o });
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ function Popover({ ...e }) {
6
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
7
+ "data-slot": "popover",
8
+ ...e
9
+ });
6
10
  }
7
- function m({ ...o }) {
8
- return /* @__PURE__ */ e(t.Trigger, { "data-slot": "popover-trigger", ...o });
11
+ function PopoverTrigger({ ...e }) {
12
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
13
+ "data-slot": "popover-trigger",
14
+ ...e
15
+ });
9
16
  }
10
- function l({
11
- className: o,
12
- align: r = "center",
13
- sideOffset: a = 4,
14
- ...n
15
- }) {
16
- return /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
17
- t.Content,
18
- {
19
- "data-slot": "popover-content",
20
- align: r,
21
- sideOffset: a,
22
- className: i(
23
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
24
- o
25
- ),
26
- ...n
27
- }
28
- ) });
17
+ function PopoverContent({ className: i, align: a = "center", sideOffset: o = 4, ...s }) {
18
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
19
+ "data-slot": "popover-content",
20
+ align: a,
21
+ sideOffset: o,
22
+ className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", i),
23
+ ...s
24
+ }) });
29
25
  }
30
- function c({ ...o }) {
31
- return /* @__PURE__ */ e(t.Anchor, { "data-slot": "popover-anchor", ...o });
26
+ function PopoverAnchor({ ...e }) {
27
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
28
+ "data-slot": "popover-anchor",
29
+ ...e
30
+ });
32
31
  }
33
- const f = t.Close;
34
- export {
35
- s as Popover,
36
- c as PopoverAnchor,
37
- f as PopoverClose,
38
- l as PopoverContent,
39
- m as PopoverTrigger
40
- };
41
- //# sourceMappingURL=popover.js.map
32
+ var PopoverClose = PopoverPrimitive.Close;
33
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
34
+
35
+ //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","jsx","cn","PopoverAnchor","PopoverClose"],"mappings":";;;AAMA,SAASA,EAAQ,EAAE,GAAGC,KAA6D;AACjF,2BAAQC,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGD,GAAO;AAC/D;AAEA,SAASE,EAAe,EAAE,GAAGF,KAAgE;AAC3F,2BAAQC,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGD,GAAO;AAC1E;AAEA,SAASG,EAAe;AAAA,EACtB,WAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,YAAAC,IAAa;AAAA,EACb,GAAGN;AACL,GAA0D;AACxD,SACE,gBAAAO,EAACN,EAAiB,QAAjB,EACC,UAAA,gBAAAM;AAAA,IAACN,EAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,OAAAI;AAAA,MACA,YAAAC;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGJ;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ;AAEA,SAASS,EAAc,EAAE,GAAGT,KAA+D;AACzF,2BAAQC,EAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,MAAMU,IAAeT,EAAiB;"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;AAMA,SAAS,QAAQ,EAAE,GAAG,KAA6D;AACjF,QAAO,oBAAC,iBAAiB,MAAA;EAAK,aAAU;EAAU,GAAI;GAAS;;AAGjE,SAAS,eAAe,EAAE,GAAG,KAAgE;AAC3F,QAAO,oBAAC,iBAAiB,SAAA;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAG,KACqD;AACxD,QACE,oBAAC,iBAAiB,QAAA,EAAA,UAChB,oBAAC,iBAAiB,SAAA;EAChB,aAAU;EACH;EACK;EACZ,WAAW,GACT,keACA,EACD;EACD,GAAI;GACJ,EAAA,CACsB;;AAI9B,SAAS,cAAc,EAAE,GAAG,KAA+D;AACzF,QAAO,oBAAC,iBAAiB,QAAA;EAAO,aAAU;EAAiB,GAAI;GAAS;;AAG1E,IAAM,eAAe,iBAAiB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),l=require("lucide-react"),d=require("./input.cjs"),t=require("../lib/utils.cjs"),a=u.forwardRef(({className:s,containerClassName:c,placeholder:n="",...r},i)=>{const{disabled:o}=r;return e.jsxs("div",{className:t.cn("relative w-full max-w-sm",c),children:[e.jsx(l.Search,{"aria-hidden":!0,className:t.cn("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",o&&"opacity-50")}),e.jsx(d.Input,{ref:i,type:"search",placeholder:n,className:t.cn("pl-9",s),...r})]})});a.displayName="SearchBox";exports.SearchBox=a;
2
- //# sourceMappingURL=search-box.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./input.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);var o=(0,a.forwardRef)(({className:e,containerClassName:a,placeholder:o=``,...s},c)=>{let{disabled:l}=s;return(0,r.jsxs)(`div`,{className:t.cn(`relative w-full max-w-sm`,a),children:[(0,r.jsx)(i.Search,{"aria-hidden":!0,className:t.cn(`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,l&&`opacity-50`)}),(0,r.jsx)(n.Input,{ref:c,type:`search`,placeholder:o,className:t.cn(`pl-9`,e),...s})]})});o.displayName=`SearchBox`,exports.SearchBox=o;
2
+ //# sourceMappingURL=search-box.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-box.cjs","sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"names":["SearchBox","forwardRef","className","containerClassName","placeholder","props","ref","disabled","cn","jsx","Search","Input"],"mappings":"yNAeMA,EAAYC,EAAAA,WAChB,CAAC,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,YAAAC,EAAc,GAAI,GAAGC,CAAA,EAASC,IAAQ,CACtE,KAAM,CAAE,SAAAC,GAAaF,EAErB,cACG,MAAA,CAAI,UAAWG,EAAAA,GAAG,2BAA4BL,CAAkB,EAC/D,SAAA,CAAAM,EAAAA,IAACC,EAAAA,OAAA,CACC,cAAW,GACX,UAAWF,EAAAA,GACT,6FACAD,GAAY,YAAA,CACd,CAAA,EAEFE,EAAAA,IAACE,EAAAA,MAAA,CAAM,IAAAL,EAAU,KAAK,SAAS,YAAAF,EAA0B,UAAWI,EAAAA,GAAG,OAAQN,CAAS,EAAI,GAAGG,CAAA,CAAO,CAAA,EACxG,CAEJ,CACF,EAEAL,EAAU,YAAc"}
1
+ {"version":3,"file":"search-box.cjs","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":"8PAeA,IAAM,GAAA,EAAA,EAAA,aACH,CAAE,YAAW,qBAAoB,cAAc,GAAI,GAAG,GAAS,IAAQ,CACtE,GAAM,CAAE,YAAa,EAErB,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAW,EAAA,GAAG,2BAA4B,EAAmB,YAChE,EAAA,EAAA,KAAC,EAAA,OAAA,CACC,cAAA,GACA,UAAW,EAAA,GACT,6FACA,GAAY,aACb,EACD,EACF,EAAA,EAAA,KAAC,EAAA,MAAA,CAAW,MAAK,KAAK,SAAsB,cAAa,UAAW,EAAA,GAAG,OAAQ,EAAU,CAAE,GAAI,GAAS,CAAA,EACpG,EAGX,CAED,EAAU,YAAc"}
@@ -1,28 +1,25 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { Search as c } from "lucide-react";
4
- import { Input as p } from "./input.js";
5
- import { cn as e } from "../lib/utils.js";
6
- const d = n(
7
- ({ className: a, containerClassName: o, placeholder: m = "", ...r }, s) => {
8
- const { disabled: i } = r;
9
- return /* @__PURE__ */ l("div", { className: e("relative w-full max-w-sm", o), children: [
10
- /* @__PURE__ */ t(
11
- c,
12
- {
13
- "aria-hidden": !0,
14
- className: e(
15
- "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
16
- i && "opacity-50"
17
- )
18
- }
19
- ),
20
- /* @__PURE__ */ t(p, { ref: s, type: "search", placeholder: m, className: e("pl-9", a), ...r })
21
- ] });
22
- }
23
- );
24
- d.displayName = "SearchBox";
25
- export {
26
- d as SearchBox
27
- };
28
- //# sourceMappingURL=search-box.js.map
1
+ import { cn } from "../lib/utils.js";
2
+ import { Input } from "./input.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Search } from "lucide-react";
5
+ import { forwardRef } from "react";
6
+ var SearchBox = forwardRef(({ className: a, containerClassName: o, placeholder: s = "", ...c }, l) => {
7
+ let { disabled: u } = c;
8
+ return /* @__PURE__ */ jsxs("div", {
9
+ className: cn("relative w-full max-w-sm", o),
10
+ children: [/* @__PURE__ */ jsx(Search, {
11
+ "aria-hidden": !0,
12
+ className: cn("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", u && "opacity-50")
13
+ }), /* @__PURE__ */ jsx(Input, {
14
+ ref: l,
15
+ type: "search",
16
+ placeholder: s,
17
+ className: cn("pl-9", a),
18
+ ...c
19
+ })]
20
+ });
21
+ });
22
+ SearchBox.displayName = "SearchBox";
23
+ export { SearchBox };
24
+
25
+ //# sourceMappingURL=search-box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-box.js","sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"names":["SearchBox","forwardRef","className","containerClassName","placeholder","props","ref","disabled","cn","jsx","Search","Input"],"mappings":";;;;;AAeA,MAAMA,IAAYC;AAAA,EAChB,CAAC,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,aAAAC,IAAc,IAAI,GAAGC,EAAA,GAASC,MAAQ;AACtE,UAAM,EAAE,UAAAC,MAAaF;AAErB,6BACG,OAAA,EAAI,WAAWG,EAAG,4BAA4BL,CAAkB,GAC/D,UAAA;AAAA,MAAA,gBAAAM;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAWF;AAAA,YACT;AAAA,YACAD,KAAY;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,MAEF,gBAAAE,EAACE,GAAA,EAAM,KAAAL,GAAU,MAAK,UAAS,aAAAF,GAA0B,WAAWI,EAAG,QAAQN,CAAS,GAAI,GAAGG,EAAA,CAAO;AAAA,IAAA,GACxG;AAAA,EAEJ;AACF;AAEAL,EAAU,cAAc;"}
1
+ {"version":3,"file":"search-box.js","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":";;;;;AAeA,IAAM,YAAY,YACf,EAAE,cAAW,uBAAoB,iBAAc,IAAI,GAAG,KAAS,MAAQ;CACtE,IAAM,EAAE,gBAAa;AAErB,QACE,qBAAC,OAAA;EAAI,WAAW,GAAG,4BAA4B,EAAmB;aAChE,oBAAC,QAAA;GACC,eAAA;GACA,WAAW,GACT,8FACA,KAAY,aACb;IACD,EACF,oBAAC,OAAA;GAAW;GAAK,MAAK;GAAsB;GAAa,WAAW,GAAG,QAAQ,EAAU;GAAE,GAAI;IAAS,CAAA;GACpG;EAGX;AAED,UAAU,cAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("@radix-ui/react-select"),l=require("lucide-react"),n=require("../lib/utils.cjs");function p(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const s=p(u);function m({...e}){return t.jsx(s.Root,{"data-slot":"select",...e})}function f({...e}){return t.jsx(s.Group,{"data-slot":"select-group",...e})}function g({...e}){return t.jsx(s.Value,{"data-slot":"select-value",...e})}function x({className:e,size:a="default",children:r,asChild:o=!1,...i}){return o?t.jsx(s.Trigger,{...i,asChild:!0,children:r}):t.jsxs(s.Trigger,{"data-slot":"select-trigger","data-size":a,className:n.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[r,t.jsx(s.Icon,{asChild:!0,children:t.jsx(l.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function c({className:e,...a}){return t.jsx(s.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:n.cn("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(l.ChevronUpIcon,{className:"size-4"})})}function d({className:e,...a}){return t.jsx(s.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:n.cn("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(l.ChevronDownIcon,{className:"size-4"})})}function v({className:e,children:a,position:r="popper",...o}){return t.jsx(s.Portal,{children:t.jsxs(s.Content,{"data-slot":"select-content",className:n.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[t.jsx(c,{}),t.jsx(s.Viewport,{className:n.cn("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),t.jsx(d,{})]})})}function b({className:e,...a}){return t.jsx(s.Label,{"data-slot":"select-label",className:n.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...a})}function h({className:e,children:a,...r}){return t.jsxs(s.Item,{"data-slot":"select-item",className:n.cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(s.ItemIndicator,{children:t.jsx(l.CheckIcon,{className:"size-4"})})}),t.jsx(s.ItemText,{children:a})]})}function S({className:e,...a}){return t.jsx(s.Separator,{"data-slot":"select-separator",className:n.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...a})}exports.Select=m;exports.SelectContent=v;exports.SelectGroup=f;exports.SelectItem=h;exports.SelectLabel=b;exports.SelectScrollDownButton=d;exports.SelectScrollUpButton=c;exports.SelectSeparator=S;exports.SelectTrigger=x;exports.SelectValue=g;
2
- //# sourceMappingURL=select.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`@radix-ui/react-select`);i=e.__toESM(i);function a({...e}){return(0,n.jsx)(i.Root,{"data-slot":`select`,...e})}function o({...e}){return(0,n.jsx)(i.Group,{"data-slot":`select-group`,...e})}function s({...e}){return(0,n.jsx)(i.Value,{"data-slot":`select-value`,...e})}function c({className:e,size:a=`default`,children:o,asChild:s=!1,...c}){return s?(0,n.jsx)(i.Trigger,{...c,asChild:!0,children:o}):(0,n.jsxs)(i.Trigger,{"data-slot":`select-trigger`,"data-size":a,className:t.cn(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...c,children:[o,(0,n.jsx)(i.Icon,{asChild:!0,children:(0,n.jsx)(r.ChevronDownIcon,{className:`size-4 opacity-50`})})]})}function l({className:e,...a}){return(0,n.jsx)(i.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...a,children:(0,n.jsx)(r.ChevronUpIcon,{className:`size-4`})})}function u({className:e,...a}){return(0,n.jsx)(i.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...a,children:(0,n.jsx)(r.ChevronDownIcon,{className:`size-4`})})}function d({className:e,children:r,position:a=`popper`,...o}){return(0,n.jsx)(i.Portal,{children:(0,n.jsxs)(i.Content,{"data-slot":`select-content`,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,a===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:a,...o,children:[(0,n.jsx)(l,{}),(0,n.jsx)(i.Viewport,{className:t.cn(`p-1`,a===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:r}),(0,n.jsx)(u,{})]})})}function f({className:e,...r}){return(0,n.jsx)(i.Label,{"data-slot":`select-label`,className:t.cn(`text-muted-foreground px-2 py-1.5 text-xs`,e),...r})}function p({className:e,children:a,...o}){return(0,n.jsxs)(i.Item,{"data-slot":`select-item`,className:t.cn(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...o,children:[(0,n.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(i.ItemIndicator,{children:(0,n.jsx)(r.CheckIcon,{className:`size-4`})})}),(0,n.jsx)(i.ItemText,{children:a})]})}function m({className:e,...r}){return(0,n.jsx)(i.Separator,{"data-slot":`select-separator`,className:t.cn(`bg-border pointer-events-none -mx-1 my-1 h-px`,e),...r})}exports.Select=a,exports.SelectContent=d,exports.SelectGroup=o,exports.SelectItem=p,exports.SelectLabel=f,exports.SelectScrollDownButton=u,exports.SelectScrollUpButton=l,exports.SelectSeparator=m,exports.SelectTrigger=c,exports.SelectValue=s;
2
+ //# sourceMappingURL=select.cjs.map