@incognia/cosmik 0.37.0-beta.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/Filter/index.d.ts.map +1 -1
- package/dist/cosmik.css +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs11.js.map +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs12.js.map +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs14.js.map +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs15.js.map +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs17.js.map +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs19.js.map +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs21.js.map +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs25.js.map +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs27.js.map +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs32.js.map +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs33.js.map +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs34.js.map +1 -1
- package/dist/index.cjs35.js +1 -1
- package/dist/index.cjs35.js.map +1 -1
- package/dist/index.cjs38.js +1 -1
- package/dist/index.cjs38.js.map +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.es11.js +1 -1
- package/dist/index.es11.js.map +1 -1
- package/dist/index.es12.js +47 -47
- package/dist/index.es12.js.map +1 -1
- package/dist/index.es14.js +17 -21
- package/dist/index.es14.js.map +1 -1
- package/dist/index.es15.js +13 -16
- package/dist/index.es15.js.map +1 -1
- package/dist/index.es17.js +1 -1
- package/dist/index.es17.js.map +1 -1
- package/dist/index.es19.js +12 -12
- package/dist/index.es19.js.map +1 -1
- package/dist/index.es21.js +1 -1
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es25.js +7 -7
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es27.js +7 -7
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es32.js +20 -20
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es33.js +1 -1
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +1 -1
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +6 -6
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es38.js +5 -5
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es4.js +2 -1
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es8.js.map +1 -1
- package/dist/tailwind-theme-config.d.ts +1 -0
- package/dist/tailwind-theme-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs8.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index.cjs40.js"),u=require("@radix-ui/react-slot"),b=require("class-variance-authority"),f=require("react"),y=require("./index.cjs41.js");function p(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const v=p(f),l=b.cva("inline-flex items-center justify-center rounded text-base font-medium outline-none transition-opacity transition-colors disabled:pointer-events-none disabled:opacity-40",{variants:{variant:{filled:"",outline:"border",ghost:"",link:""},intent:{primary:"",secondary:"",warning:"",danger:"",filter:""},size:{md:"h-40 min-w-96 px-24",sm:"h-32 px-16",icon:"h-32 w-32","fit-content":""}},compoundVariants:[{variant:"filled",intent:"primary",className:"bg-robinblue-500 text-white fill-white hover:bg-robinblue-600 focus:bg-robinblue-600 active:bg-robinblue-700"},{variant:"filled",intent:"secondary",className:"bg-gray-900-8 text-gray-900 fill-gray-900 hover:bg-gray-900-12 focus:bg-gray-900-12 active:bg-gray-900-16"},{variant:"filled",intent:"warning",className:"bg-yellow-500 text-white fill-white hover:bg-yellow-600 focus:bg-yellow-600 active:bg-yellow-700"},{variant:"filled",intent:"danger",className:"bg-magenta-500 text-white fill-white hover:bg-magenta-600 focus:bg-magenta-600 active:bg-magenta-700"},{variant:"filled",intent:"filter",className:"bg-purple-100 text-purple-800 fill-purple-800 hover:bg-purple-200 focus:bg-purple-200 active:bg-purple-300"},{variant:"outline",intent:"primary",className:"text-robinblue-500 fill-robinblue-500 border-robinblue-500"},{variant:"outline",intent:"secondary",className:"text-gray-700 fill-gray-700 border-gray-900-24 hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12"},{variant:"outline",intent:"warning",className:"text-yellow-500 fill-yellow-500 border-yellow-500"},{variant:"outline",intent:"danger",className:"text-magenta-500 fill-magenta-500 border-magenta-500"},{variant:"outline",intent:"filter",className:"text-purple-600 fill-purple-600 border-purple-400"},{variant:["outline","ghost"],intent:"primary",className:"hover:bg-robinblue-500-8 focus:bg-robinblue-500-8 active:bg-robinblue-500-12"},{variant:["outline","ghost"],intent:"secondary",className:"hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12"},{variant:["outline","ghost"],intent:"warning",className:"bg-yellow-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["outline","ghost"],intent:"danger",className:"bg-magenta-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["outline","ghost"],intent:"filter",className:"bg-purple-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["ghost","link"],intent:"primary",className:"text-robinblue-500 fill-robinblue-500 hover:text-robinblue-600 hover:fill-text-robinblue-600 focus:text-robinblue-600 focus:fill-robinblue-600 active:text-robinblue-700 active:fill-robinblue-700"},{variant:["ghost","link"],intent:"secondary",className:"text-gray-700 fill-gray-700 hover:text-gray-800 hover:fill-gray-800 focus:text-gray-800 focus:fill-gray-800 active:text-gray-900 active:fill-gray-900 "},{variant:["ghost","link"],intent:"warning",className:"text-yellow-500 fill-yellow-500 hover:text-yellow-600 hover:fill-text-yellow-600 focus:text-yellow-600 focus:fill-yellow-600 active:text-yellow-700 active:fill-yellow-700"},{variant:["ghost","link"],intent:"danger",className:"text-magenta-500 fill-magenta-500 hover:text-magenta-600 hover:fill-text-magenta-600 focus:text-magenta-600 focus:fill-magenta-600 active:text-magenta-700 active:fill-magenta-700"},{variant:["ghost","link"],intent:"filter",className:"text-purple-600 fill-purple-600 hover:text-purple-700 hover:fill-text-purple-700 focus:text-purple-700 focus:fill-purple-700 active:text-purple-800 active:fill-purple-800"}],defaultVariants:{variant:"filled",intent:"primary",size:"md"}}),n=v.forwardRef(({className:e,variant:a,intent:t,size:i,asChild:r=!1,...o},s)=>{const c=r?u.Slot:"button";return g.jsxRuntimeExports.jsx(c,{className:y.cn(l({variant:a,intent:t,size:i,className:e})),ref:s,...o})});n.displayName="Button";exports.Button=n;exports.buttonVariants=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index.cjs40.js"),u=require("@radix-ui/react-slot"),b=require("class-variance-authority"),f=require("react"),y=require("./index.cjs41.js");function p(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const v=p(f),l=b.cva("inline-flex items-center justify-center rounded-full text-base font-medium outline-none transition-opacity transition-colors disabled:pointer-events-none disabled:opacity-40",{variants:{variant:{filled:"",outline:"border",ghost:"",link:""},intent:{primary:"",secondary:"",warning:"",danger:"",filter:""},size:{md:"h-40 min-w-96 px-24",sm:"h-32 px-16",icon:"h-32 w-32","fit-content":""}},compoundVariants:[{variant:"filled",intent:"primary",className:"bg-robinblue-500 text-white fill-white hover:bg-robinblue-600 focus:bg-robinblue-600 active:bg-robinblue-700"},{variant:"filled",intent:"secondary",className:"bg-gray-900-8 text-gray-900 fill-gray-900 hover:bg-gray-900-12 focus:bg-gray-900-12 active:bg-gray-900-16"},{variant:"filled",intent:"warning",className:"bg-yellow-500 text-white fill-white hover:bg-yellow-600 focus:bg-yellow-600 active:bg-yellow-700"},{variant:"filled",intent:"danger",className:"bg-magenta-500 text-white fill-white hover:bg-magenta-600 focus:bg-magenta-600 active:bg-magenta-700"},{variant:"filled",intent:"filter",className:"bg-purple-100 text-purple-800 fill-purple-800 hover:bg-purple-200 focus:bg-purple-200 active:bg-purple-300"},{variant:"outline",intent:"primary",className:"text-robinblue-500 fill-robinblue-500 border-robinblue-500"},{variant:"outline",intent:"secondary",className:"text-gray-700 fill-gray-700 border-gray-900-24 hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12"},{variant:"outline",intent:"warning",className:"text-yellow-500 fill-yellow-500 border-yellow-500"},{variant:"outline",intent:"danger",className:"text-magenta-500 fill-magenta-500 border-magenta-500"},{variant:"outline",intent:"filter",className:"text-purple-600 fill-purple-600 border-purple-400"},{variant:["outline","ghost"],intent:"primary",className:"hover:bg-robinblue-500-8 focus:bg-robinblue-500-8 active:bg-robinblue-500-12"},{variant:["outline","ghost"],intent:"secondary",className:"hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12"},{variant:["outline","ghost"],intent:"warning",className:"bg-yellow-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["outline","ghost"],intent:"danger",className:"bg-magenta-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["outline","ghost"],intent:"filter",className:"bg-purple-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12"},{variant:["ghost","link"],intent:"primary",className:"text-robinblue-500 fill-robinblue-500 hover:text-robinblue-600 hover:fill-text-robinblue-600 focus:text-robinblue-600 focus:fill-robinblue-600 active:text-robinblue-700 active:fill-robinblue-700"},{variant:["ghost","link"],intent:"secondary",className:"text-gray-700 fill-gray-700 hover:text-gray-800 hover:fill-gray-800 focus:text-gray-800 focus:fill-gray-800 active:text-gray-900 active:fill-gray-900 "},{variant:["ghost","link"],intent:"warning",className:"text-yellow-500 fill-yellow-500 hover:text-yellow-600 hover:fill-text-yellow-600 focus:text-yellow-600 focus:fill-yellow-600 active:text-yellow-700 active:fill-yellow-700"},{variant:["ghost","link"],intent:"danger",className:"text-magenta-500 fill-magenta-500 hover:text-magenta-600 hover:fill-text-magenta-600 focus:text-magenta-600 focus:fill-magenta-600 active:text-magenta-700 active:fill-magenta-700"},{variant:["ghost","link"],intent:"filter",className:"text-purple-600 fill-purple-600 hover:text-purple-700 hover:fill-text-purple-700 focus:text-purple-700 focus:fill-purple-700 active:text-purple-800 active:fill-purple-800"}],defaultVariants:{variant:"filled",intent:"primary",size:"md"}}),n=v.forwardRef(({className:e,variant:a,intent:t,size:i,asChild:r=!1,...o},s)=>{const c=r?u.Slot:"button";return g.jsxRuntimeExports.jsx(c,{className:y.cn(l({variant:a,intent:t,size:i,className:e})),ref:s,...o})});n.displayName="Button";exports.Button=n;exports.buttonVariants=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs8.js.map
|
package/dist/index.cjs8.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs8.js","sources":["../src/Button/index.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center rounded text-base font-medium outline-none transition-opacity transition-colors disabled:pointer-events-none disabled:opacity-40',\n {\n variants: {\n variant: {\n filled: '',\n outline: 'border',\n ghost: '',\n link: ''\n },\n intent: {\n primary: '',\n secondary: '',\n warning: '',\n danger: '',\n filter: ''\n },\n size: {\n md: 'h-40 min-w-96 px-24',\n sm: 'h-32 px-16',\n icon: 'h-32 w-32',\n 'fit-content': ''\n }\n },\n compoundVariants: [\n {\n variant: 'filled',\n intent: 'primary',\n className:\n 'bg-robinblue-500 text-white fill-white hover:bg-robinblue-600 focus:bg-robinblue-600 active:bg-robinblue-700'\n },\n {\n variant: 'filled',\n intent: 'secondary',\n className:\n 'bg-gray-900-8 text-gray-900 fill-gray-900 hover:bg-gray-900-12 focus:bg-gray-900-12 active:bg-gray-900-16'\n },\n {\n variant: 'filled',\n intent: 'warning',\n className:\n 'bg-yellow-500 text-white fill-white hover:bg-yellow-600 focus:bg-yellow-600 active:bg-yellow-700'\n },\n {\n variant: 'filled',\n intent: 'danger',\n className:\n 'bg-magenta-500 text-white fill-white hover:bg-magenta-600 focus:bg-magenta-600 active:bg-magenta-700'\n },\n {\n variant: 'filled',\n intent: 'filter',\n className:\n 'bg-purple-100 text-purple-800 fill-purple-800 hover:bg-purple-200 focus:bg-purple-200 active:bg-purple-300'\n },\n {\n variant: 'outline',\n intent: 'primary',\n className: 'text-robinblue-500 fill-robinblue-500 border-robinblue-500'\n },\n {\n variant: 'outline',\n intent: 'secondary',\n className:\n 'text-gray-700 fill-gray-700 border-gray-900-24 hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12'\n },\n {\n variant: 'outline',\n intent: 'warning',\n className: 'text-yellow-500 fill-yellow-500 border-yellow-500'\n },\n {\n variant: 'outline',\n intent: 'danger',\n className: 'text-magenta-500 fill-magenta-500 border-magenta-500'\n },\n {\n variant: 'outline',\n intent: 'filter',\n className: 'text-purple-600 fill-purple-600 border-purple-400'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'primary',\n className:\n 'hover:bg-robinblue-500-8 focus:bg-robinblue-500-8 active:bg-robinblue-500-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'secondary',\n className:\n 'hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'warning',\n className:\n 'bg-yellow-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'danger',\n className:\n 'bg-magenta-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'filter',\n className:\n 'bg-purple-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'primary',\n className:\n 'text-robinblue-500 fill-robinblue-500 hover:text-robinblue-600 hover:fill-text-robinblue-600 focus:text-robinblue-600 focus:fill-robinblue-600 active:text-robinblue-700 active:fill-robinblue-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'secondary',\n className:\n 'text-gray-700 fill-gray-700 hover:text-gray-800 hover:fill-gray-800 focus:text-gray-800 focus:fill-gray-800 active:text-gray-900 active:fill-gray-900 '\n },\n {\n variant: ['ghost', 'link'],\n intent: 'warning',\n className:\n 'text-yellow-500 fill-yellow-500 hover:text-yellow-600 hover:fill-text-yellow-600 focus:text-yellow-600 focus:fill-yellow-600 active:text-yellow-700 active:fill-yellow-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'danger',\n className:\n 'text-magenta-500 fill-magenta-500 hover:text-magenta-600 hover:fill-text-magenta-600 focus:text-magenta-600 focus:fill-magenta-600 active:text-magenta-700 active:fill-magenta-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'filter',\n className:\n 'text-purple-600 fill-purple-600 hover:text-purple-700 hover:fill-text-purple-700 focus:text-purple-700 focus:fill-purple-700 active:text-purple-800 active:fill-purple-800'\n }\n ],\n defaultVariants: {\n variant: 'filled',\n intent: 'primary',\n size: 'md'\n }\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, intent, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n className={cn(buttonVariants({ variant, intent, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","React","className","variant","intent","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":"ugBAKMA,EAAiBC,EAAA,IACrB,
|
|
1
|
+
{"version":3,"file":"index.cjs8.js","sources":["../src/Button/index.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center rounded-full text-base font-medium outline-none transition-opacity transition-colors disabled:pointer-events-none disabled:opacity-40',\n {\n variants: {\n variant: {\n filled: '',\n outline: 'border',\n ghost: '',\n link: ''\n },\n intent: {\n primary: '',\n secondary: '',\n warning: '',\n danger: '',\n filter: ''\n },\n size: {\n md: 'h-40 min-w-96 px-24',\n sm: 'h-32 px-16',\n icon: 'h-32 w-32',\n 'fit-content': ''\n }\n },\n compoundVariants: [\n {\n variant: 'filled',\n intent: 'primary',\n className:\n 'bg-robinblue-500 text-white fill-white hover:bg-robinblue-600 focus:bg-robinblue-600 active:bg-robinblue-700'\n },\n {\n variant: 'filled',\n intent: 'secondary',\n className:\n 'bg-gray-900-8 text-gray-900 fill-gray-900 hover:bg-gray-900-12 focus:bg-gray-900-12 active:bg-gray-900-16'\n },\n {\n variant: 'filled',\n intent: 'warning',\n className:\n 'bg-yellow-500 text-white fill-white hover:bg-yellow-600 focus:bg-yellow-600 active:bg-yellow-700'\n },\n {\n variant: 'filled',\n intent: 'danger',\n className:\n 'bg-magenta-500 text-white fill-white hover:bg-magenta-600 focus:bg-magenta-600 active:bg-magenta-700'\n },\n {\n variant: 'filled',\n intent: 'filter',\n className:\n 'bg-purple-100 text-purple-800 fill-purple-800 hover:bg-purple-200 focus:bg-purple-200 active:bg-purple-300'\n },\n {\n variant: 'outline',\n intent: 'primary',\n className: 'text-robinblue-500 fill-robinblue-500 border-robinblue-500'\n },\n {\n variant: 'outline',\n intent: 'secondary',\n className:\n 'text-gray-700 fill-gray-700 border-gray-900-24 hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12'\n },\n {\n variant: 'outline',\n intent: 'warning',\n className: 'text-yellow-500 fill-yellow-500 border-yellow-500'\n },\n {\n variant: 'outline',\n intent: 'danger',\n className: 'text-magenta-500 fill-magenta-500 border-magenta-500'\n },\n {\n variant: 'outline',\n intent: 'filter',\n className: 'text-purple-600 fill-purple-600 border-purple-400'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'primary',\n className:\n 'hover:bg-robinblue-500-8 focus:bg-robinblue-500-8 active:bg-robinblue-500-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'secondary',\n className:\n 'hover:bg-gray-900-8 focus:bg-gray-900-8 active:bg-gray-900-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'warning',\n className:\n 'bg-yellow-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'danger',\n className:\n 'bg-magenta-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['outline', 'ghost'],\n intent: 'filter',\n className:\n 'bg-purple-500 bg-opacity-0 hover:bg-opacity-8 focus:bg-opacity-8 active:bg-opacity-12'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'primary',\n className:\n 'text-robinblue-500 fill-robinblue-500 hover:text-robinblue-600 hover:fill-text-robinblue-600 focus:text-robinblue-600 focus:fill-robinblue-600 active:text-robinblue-700 active:fill-robinblue-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'secondary',\n className:\n 'text-gray-700 fill-gray-700 hover:text-gray-800 hover:fill-gray-800 focus:text-gray-800 focus:fill-gray-800 active:text-gray-900 active:fill-gray-900 '\n },\n {\n variant: ['ghost', 'link'],\n intent: 'warning',\n className:\n 'text-yellow-500 fill-yellow-500 hover:text-yellow-600 hover:fill-text-yellow-600 focus:text-yellow-600 focus:fill-yellow-600 active:text-yellow-700 active:fill-yellow-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'danger',\n className:\n 'text-magenta-500 fill-magenta-500 hover:text-magenta-600 hover:fill-text-magenta-600 focus:text-magenta-600 focus:fill-magenta-600 active:text-magenta-700 active:fill-magenta-700'\n },\n {\n variant: ['ghost', 'link'],\n intent: 'filter',\n className:\n 'text-purple-600 fill-purple-600 hover:text-purple-700 hover:fill-text-purple-700 focus:text-purple-700 focus:fill-purple-700 active:text-purple-800 active:fill-purple-800'\n }\n ],\n defaultVariants: {\n variant: 'filled',\n intent: 'primary',\n size: 'md'\n }\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, intent, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n className={cn(buttonVariants({ variant, intent, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","React","className","variant","intent","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":"ugBAKMA,EAAiBC,EAAA,IACrB,gLACA,CACE,SAAU,CACR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oLACJ,EACA,CACE,QAAS,CAAC,QAAS,MAAM,EACzB,OAAQ,SACR,UACE,4KACJ,CACF,EACA,gBAAiB,CACf,QAAS,SACT,OAAQ,UACR,KAAM,IACR,CACF,CACF,EAQMC,EAASC,EAAM,WACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAAQ,CAClE,MAAAC,EAAOH,EAAUI,EAAO,KAAA,SAE5B,OAAAC,EAAA,kBAAA,IAACF,EAAA,CACC,UAAWG,EAAAA,GAAGd,EAAe,CAAE,QAAAK,EAAS,OAAAC,EAAQ,KAAAC,EAAM,UAAAH,CAAU,CAAC,CAAC,EAClE,IAAAM,EACC,GAAGD,CAAA,CAAA,CAGV,CACF,EACAP,EAAO,YAAc"}
|
package/dist/index.es11.js
CHANGED
|
@@ -8,7 +8,7 @@ const n = b.forwardRef(({ className: i, ...a }, d) => /* @__PURE__ */ e.jsx(
|
|
|
8
8
|
{
|
|
9
9
|
ref: d,
|
|
10
10
|
className: r(
|
|
11
|
-
"peer h-16 w-16 shrink-0 rounded border border-gray-900-24",
|
|
11
|
+
"peer h-16 w-16 shrink-0 rounded-small border border-gray-900-24",
|
|
12
12
|
"disabled:cursor-not-allowed disabled:bg-transparent",
|
|
13
13
|
"disabled:data-[state=checked]:bg-gray-900-8 disabled:data-[state=checked]:text-gray-800 disabled:opacity-64",
|
|
14
14
|
"disabled:data-[state=indeterminate]:bg-gray-900-8 disabled:data-[state=indeterminate]:text-gray-800",
|
package/dist/index.es11.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es11.js","sources":["../src/Checkbox/index.tsx"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-16 w-16 shrink-0 rounded border border-gray-900-24',\n 'disabled:cursor-not-allowed disabled:bg-transparent',\n 'disabled:data-[state=checked]:bg-gray-900-8 disabled:data-[state=checked]:text-gray-800 disabled:opacity-64',\n 'disabled:data-[state=indeterminate]:bg-gray-900-8 disabled:data-[state=indeterminate]:text-gray-800',\n 'data-[state=checked]:bg-robinblue-500 data-[state=checked]:text-white',\n 'data-[state=indeterminate]:bg-robinblue-500 data-[state=indeterminate]:text-white',\n 'hover:bg-gray-900-8 hover:data-[state=checked]:bg-robinblue-600 hover:data-[state=indeterminate]:bg-robinblue-600',\n 'focus-visible:outline-none focus:bg-gray-900-16 focus:data-[state=checked]:bg-robinblue-700 focus:data-[state=indeterminate]:bg-robinblue-700',\n 'active:bg-gray-900-16 active:data-[state=checked]:bg-robinblue-700 active:data-[state=indeterminate]:bg-robinblue-700',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn('flex items-center justify-center text-current')}\n >\n {props.checked == 'indeterminate' ? (\n <Minus className=\"h-[14px] w-[14px]\" />\n ) : (\n <Check className=\"h-[14px] w-[14px]\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"names":["Checkbox","React","className","props","ref","jsx","CheckboxPrimitive","cn","Minus","Check"],"mappings":";;;;;AAOM,MAAAA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAkB;AAAA,EAAlB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAAE,gBAAAA,EAAA;AAAA,MAACC,EAAkB;AAAA,MAAlB;AAAA,QACC,WAAWC,EAAG,+CAA+C;AAAA,QAE5D,UAAAJ,EAAM,WAAW,kBACfE,gBAAAA,EAAA,IAAAG,GAAA,EAAM,WAAU,oBAAoB,CAAA,IAErCH,gBAAAA,EAAAA,IAACI,GAAM,EAAA,WAAU,oBAAoB,CAAA;AAAA,MAAA;AAAA,IAEzC;AAAA,EAAA;AACF,CACD;AAEDT,EAAS,cAAcM,EAAkB,KAAK;"}
|
|
1
|
+
{"version":3,"file":"index.es11.js","sources":["../src/Checkbox/index.tsx"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-16 w-16 shrink-0 rounded-small border border-gray-900-24',\n 'disabled:cursor-not-allowed disabled:bg-transparent',\n 'disabled:data-[state=checked]:bg-gray-900-8 disabled:data-[state=checked]:text-gray-800 disabled:opacity-64',\n 'disabled:data-[state=indeterminate]:bg-gray-900-8 disabled:data-[state=indeterminate]:text-gray-800',\n 'data-[state=checked]:bg-robinblue-500 data-[state=checked]:text-white',\n 'data-[state=indeterminate]:bg-robinblue-500 data-[state=indeterminate]:text-white',\n 'hover:bg-gray-900-8 hover:data-[state=checked]:bg-robinblue-600 hover:data-[state=indeterminate]:bg-robinblue-600',\n 'focus-visible:outline-none focus:bg-gray-900-16 focus:data-[state=checked]:bg-robinblue-700 focus:data-[state=indeterminate]:bg-robinblue-700',\n 'active:bg-gray-900-16 active:data-[state=checked]:bg-robinblue-700 active:data-[state=indeterminate]:bg-robinblue-700',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn('flex items-center justify-center text-current')}\n >\n {props.checked == 'indeterminate' ? (\n <Minus className=\"h-[14px] w-[14px]\" />\n ) : (\n <Check className=\"h-[14px] w-[14px]\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"names":["Checkbox","React","className","props","ref","jsx","CheckboxPrimitive","cn","Minus","Check"],"mappings":";;;;;AAOM,MAAAA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAkB;AAAA,EAAlB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAAE,gBAAAA,EAAA;AAAA,MAACC,EAAkB;AAAA,MAAlB;AAAA,QACC,WAAWC,EAAG,+CAA+C;AAAA,QAE5D,UAAAJ,EAAM,WAAW,kBACfE,gBAAAA,EAAA,IAAAG,GAAA,EAAM,WAAU,oBAAoB,CAAA,IAErCH,gBAAAA,EAAAA,IAACI,GAAM,EAAA,WAAU,oBAAoB,CAAA;AAAA,MAAA;AAAA,IAEzC;AAAA,EAAA;AACF,CACD;AAEDT,EAAS,cAAcM,EAAkB,KAAK;"}
|
package/dist/index.es12.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Command as
|
|
1
|
+
import { j as o } from "./index.es40.js";
|
|
2
|
+
import { Command as t } from "cmdk";
|
|
3
3
|
import { Search as d } from "lucide-react";
|
|
4
4
|
import * as r from "react";
|
|
5
5
|
import "./index.es2.js";
|
|
@@ -34,92 +34,92 @@ import "./index.es35.js";
|
|
|
34
34
|
import "./index.es36.js";
|
|
35
35
|
import "./index.es37.js";
|
|
36
36
|
import "./index.es38.js";
|
|
37
|
-
const i = r.forwardRef(({ className: e, ...
|
|
38
|
-
|
|
37
|
+
const i = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsx(
|
|
38
|
+
t,
|
|
39
39
|
{
|
|
40
|
-
ref:
|
|
40
|
+
ref: a,
|
|
41
41
|
className: p(
|
|
42
42
|
"flex h-full w-full flex-col overflow-hidden rounded bg-white text-gray-900",
|
|
43
43
|
e
|
|
44
44
|
),
|
|
45
|
-
...
|
|
45
|
+
...m
|
|
46
46
|
}
|
|
47
47
|
));
|
|
48
|
-
i.displayName =
|
|
49
|
-
const Z = ({ children: e, ...
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
48
|
+
i.displayName = t.displayName;
|
|
49
|
+
const Z = ({ children: e, ...m }) => /* @__PURE__ */ o.jsx(s, { ...m, children: /* @__PURE__ */ o.jsx(n, { hideCloseIcon: !0, className: "overflow-hidden p-0 shadow-200", children: /* @__PURE__ */ o.jsx(i, { className: "[&_[cmdk-group-heading]]:px-8 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-900 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-8 [&_[cmdk-input-wrapper]_svg]:h-16 [&_[cmdk-input-wrapper]_svg]:w-16 [&_[cmdk-input]]:h-48 [&_[cmdk-item]]:px-8 [&_[cmdk-item]]:py-12 [&_[cmdk-item]_svg]:h-16 [&_[cmdk-item]_svg]:w-16", children: e }) }) }), l = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsxs("div", { className: "flex items-center border-b px-12", "cmdk-input-wrapper": "", children: [
|
|
50
|
+
/* @__PURE__ */ o.jsx(
|
|
51
|
+
t.Input,
|
|
52
52
|
{
|
|
53
|
-
ref:
|
|
53
|
+
ref: a,
|
|
54
54
|
className: p(
|
|
55
|
-
"flex h-[44px] w-full rounded bg-white py-12 text-sm outline-none placeholder:text-gray-
|
|
55
|
+
"flex h-[44px] w-full rounded bg-white py-12 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-64",
|
|
56
56
|
e
|
|
57
57
|
),
|
|
58
|
-
...
|
|
58
|
+
...m
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ o.jsx(d, { className: "ml-8 h-16 w-16 shrink-0" })
|
|
62
62
|
] }));
|
|
63
|
-
l.displayName =
|
|
64
|
-
const c = r.forwardRef(({ className: e, ...
|
|
65
|
-
|
|
63
|
+
l.displayName = t.Input.displayName;
|
|
64
|
+
const c = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsx(
|
|
65
|
+
t.List,
|
|
66
66
|
{
|
|
67
|
-
ref:
|
|
67
|
+
ref: a,
|
|
68
68
|
className: p("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
69
|
-
...
|
|
69
|
+
...m
|
|
70
70
|
}
|
|
71
71
|
));
|
|
72
|
-
c.displayName =
|
|
73
|
-
const x = r.forwardRef((e,
|
|
74
|
-
|
|
72
|
+
c.displayName = t.List.displayName;
|
|
73
|
+
const x = r.forwardRef((e, m) => /* @__PURE__ */ o.jsx(
|
|
74
|
+
t.Empty,
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
76
|
+
ref: m,
|
|
77
77
|
className: "py-[10px] text-center text-sm",
|
|
78
78
|
...e
|
|
79
79
|
}
|
|
80
80
|
));
|
|
81
|
-
x.displayName =
|
|
82
|
-
const u = r.forwardRef(({ className: e, ...
|
|
83
|
-
|
|
81
|
+
x.displayName = t.Empty.displayName;
|
|
82
|
+
const u = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsx(
|
|
83
|
+
t.Group,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: a,
|
|
86
86
|
className: p(
|
|
87
|
-
"overflow-hidden text-gray-900 [&_[cmdk-group-heading]]:px-
|
|
87
|
+
"overflow-hidden p-4 text-gray-900 [&_[cmdk-group-heading]]:px-8 [&_[cmdk-group-heading]]:py-[6px] [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-900",
|
|
88
88
|
e
|
|
89
89
|
),
|
|
90
|
-
...
|
|
90
|
+
...m
|
|
91
91
|
}
|
|
92
92
|
));
|
|
93
|
-
u.displayName =
|
|
94
|
-
const
|
|
95
|
-
|
|
93
|
+
u.displayName = t.Group.displayName;
|
|
94
|
+
const g = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsx(
|
|
95
|
+
t.Separator,
|
|
96
96
|
{
|
|
97
|
-
ref:
|
|
97
|
+
ref: a,
|
|
98
98
|
className: p("-mx-4 h-[1px] bg-gray-900-8", e),
|
|
99
|
-
...
|
|
99
|
+
...m
|
|
100
100
|
}
|
|
101
101
|
));
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
g.displayName = t.Separator.displayName;
|
|
103
|
+
const f = r.forwardRef(({ className: e, ...m }, a) => /* @__PURE__ */ o.jsx(
|
|
104
|
+
t.Item,
|
|
105
105
|
{
|
|
106
|
-
ref:
|
|
106
|
+
ref: a,
|
|
107
107
|
className: p(
|
|
108
|
-
"relative flex cursor-default select-none items-center
|
|
108
|
+
"relative flex cursor-default select-none items-center rounded px-8 py-[6px] text-sm outline-none aria-selected:bg-purple-100 aria-selected:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-64",
|
|
109
109
|
e
|
|
110
110
|
),
|
|
111
|
-
...
|
|
111
|
+
...m
|
|
112
112
|
}
|
|
113
113
|
));
|
|
114
|
-
|
|
114
|
+
f.displayName = t.Item.displayName;
|
|
115
115
|
const y = ({
|
|
116
116
|
className: e,
|
|
117
|
-
...
|
|
118
|
-
}) => /* @__PURE__ */
|
|
117
|
+
...m
|
|
118
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
119
119
|
"span",
|
|
120
120
|
{
|
|
121
|
-
className: p("ml-auto text-xs tracking-widest text-gray-
|
|
122
|
-
...
|
|
121
|
+
className: p("ml-auto text-xs tracking-widest text-gray-900", e),
|
|
122
|
+
...m
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
y.displayName = "CommandShortcut";
|
|
@@ -129,9 +129,9 @@ export {
|
|
|
129
129
|
x as CommandEmpty,
|
|
130
130
|
u as CommandGroup,
|
|
131
131
|
l as CommandInput,
|
|
132
|
-
|
|
132
|
+
f as CommandItem,
|
|
133
133
|
c as CommandList,
|
|
134
|
-
|
|
134
|
+
g as CommandSeparator,
|
|
135
135
|
y as CommandShortcut
|
|
136
136
|
};
|
|
137
137
|
//# sourceMappingURL=index.es12.js.map
|
package/dist/index.es12.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es12.js","sources":["../src/Command/index.tsx"],"sourcesContent":["'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\nimport { Dialog, DialogContent } from '../'\nimport { cn } from '../lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded bg-white text-gray-900',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent hideCloseIcon className=\"overflow-hidden p-0 shadow-200\">\n <Command className=\"[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-900 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-16 [&_[cmdk-input-wrapper]_svg]:w-16 [&_[cmdk-input]]:h-48 [&_[cmdk-item]]:px-
|
|
1
|
+
{"version":3,"file":"index.es12.js","sources":["../src/Command/index.tsx"],"sourcesContent":["'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\nimport { Dialog, DialogContent } from '../'\nimport { cn } from '../lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded bg-white text-gray-900',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent hideCloseIcon className=\"overflow-hidden p-0 shadow-200\">\n <Command className=\"[&_[cmdk-group-heading]]:px-8 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-900 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-8 [&_[cmdk-input-wrapper]_svg]:h-16 [&_[cmdk-input-wrapper]_svg]:w-16 [&_[cmdk-input]]:h-48 [&_[cmdk-item]]:px-8 [&_[cmdk-item]]:py-12 [&_[cmdk-item]_svg]:h-16 [&_[cmdk-item]_svg]:w-16\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-12\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-[44px] w-full rounded bg-white py-12 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-64',\n className\n )}\n {...props}\n />\n <Search className=\"ml-8 h-16 w-16 shrink-0\" />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-[10px] text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-4 text-gray-900 [&_[cmdk-group-heading]]:px-8 [&_[cmdk-group-heading]]:py-[6px] [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-900',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-4 h-[1px] bg-gray-900-8', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded px-8 py-[6px] text-sm outline-none aria-selected:bg-purple-100 aria-selected:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-64',\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-gray-900', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator\n}\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASM,MAAAA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcM,EAAiB;AAIvC,MAAME,IAAgB,CAAC,EAAE,UAAAC,GAAU,GAAGN,8BAEjCO,GAAQ,EAAA,GAAGP,GACV,UAAAE,gBAAAA,EAAAA,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C,GAAGC;AAAA,EAAA;AACN,CACD;AAEDc,EAAa,cAAcX,EAAiB,MAAM;AAE5C,MAAAY,IAAmBjB,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,+BAA+BL,CAAS;AAAA,IACrD,GAAGC;AAAA,EAAA;AACN,CACD;AACDe,EAAiB,cAAcZ,EAAiB,UAAU;AAEpD,MAAAa,IAAclB,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AAEDgB,EAAY,cAAcb,EAAiB,KAAK;AAEhD,MAAMc,IAAkB,CAAC;AAAA,EACvB,WAAAlB;AAAA,EACA,GAAGC;AACL,MAEIE,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWE,EAAG,iDAAiDL,CAAS;AAAA,IACvE,GAAGC;AAAA,EAAA;AAAA;AAIViB,EAAgB,cAAc;"}
|
package/dist/index.es14.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./index.es40.js";
|
|
2
2
|
import * as e from "@radix-ui/react-dropdown-menu";
|
|
3
|
-
import { ChevronRight as l, Check as
|
|
3
|
+
import { ChevronRight as l, Check as m, Circle as p } from "lucide-react";
|
|
4
4
|
import * as d from "react";
|
|
5
5
|
import { cn as n } from "./index.es41.js";
|
|
6
6
|
const M = e.Root, R = e.Trigger, I = e.Group, S = e.Portal, C = e.Sub, v = e.RadioGroup, c = d.forwardRef(({ className: t, inset: a, children: s, ...r }, i) => /* @__PURE__ */ o.jsxs(
|
|
@@ -8,7 +8,7 @@ const M = e.Root, R = e.Trigger, I = e.Group, S = e.Portal, C = e.Sub, v = e.Rad
|
|
|
8
8
|
{
|
|
9
9
|
ref: i,
|
|
10
10
|
className: n(
|
|
11
|
-
"flex cursor-default select-none items-center pl-
|
|
11
|
+
"flex cursor-default select-none items-center rounded-small pl-8 py-8 text-base outline-none focus:bg-gray-900-8 data-[state=open]:bg-gray-900-8",
|
|
12
12
|
a && "pl-32",
|
|
13
13
|
t
|
|
14
14
|
),
|
|
@@ -25,7 +25,7 @@ const u = d.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o.jsx(
|
|
|
25
25
|
{
|
|
26
26
|
ref: s,
|
|
27
27
|
className: n(
|
|
28
|
-
"z-50 min-w-[8rem] overflow-hidden rounded border border-gray-900-8 bg-white text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2",
|
|
28
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-gray-900-8 bg-white p-2 text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2",
|
|
29
29
|
t
|
|
30
30
|
),
|
|
31
31
|
...a
|
|
@@ -38,7 +38,7 @@ const f = d.forwardRef(({ className: t, sideOffset: a = 4, ...s }, r) => /* @__P
|
|
|
38
38
|
ref: r,
|
|
39
39
|
sideOffset: a,
|
|
40
40
|
className: n(
|
|
41
|
-
"z-50 min-w-[8rem] overflow-hidden rounded border border-gray-900-8 bg-white text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2",
|
|
41
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-gray-900-8 bg-white p-2 text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2",
|
|
42
42
|
t
|
|
43
43
|
),
|
|
44
44
|
...s
|
|
@@ -50,7 +50,7 @@ const x = d.forwardRef(({ className: t, inset: a, ...s }, r) => /* @__PURE__ */
|
|
|
50
50
|
{
|
|
51
51
|
ref: r,
|
|
52
52
|
className: n(
|
|
53
|
-
"relative flex cursor-default select-none items-center px-
|
|
53
|
+
"relative flex cursor-default select-none items-center rounded-small px-8 py-8 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
54
54
|
a && "pl-[2rem]",
|
|
55
55
|
t
|
|
56
56
|
),
|
|
@@ -63,52 +63,48 @@ const b = d.forwardRef(({ className: t, children: a, checked: s, ...r }, i) => /
|
|
|
63
63
|
{
|
|
64
64
|
ref: i,
|
|
65
65
|
className: n(
|
|
66
|
-
"relative flex cursor-default select-none items-center py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-
|
|
66
|
+
"relative flex cursor-default select-none items-center rounded-[2px] py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
67
67
|
t
|
|
68
68
|
),
|
|
69
69
|
checked: s,
|
|
70
70
|
...r,
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-8 flex h-[14px] w-[14px] items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(
|
|
72
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-8 flex h-[14px] w-[14px] items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(m, { className: "h-16 w-16" }) }) }),
|
|
73
73
|
a
|
|
74
74
|
]
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
77
|
b.displayName = e.CheckboxItem.displayName;
|
|
78
|
-
const
|
|
78
|
+
const y = d.forwardRef(({ className: t, children: a, ...s }, r) => /* @__PURE__ */ o.jsxs(
|
|
79
79
|
e.RadioItem,
|
|
80
80
|
{
|
|
81
81
|
ref: r,
|
|
82
82
|
className: n(
|
|
83
|
-
"relative flex cursor-default select-none items-center py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-
|
|
83
|
+
"relative flex cursor-default select-none items-center rounded-[2px] py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
84
84
|
t
|
|
85
85
|
),
|
|
86
86
|
...s,
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-8 flex h-[14px] w-[14px] items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(
|
|
88
|
+
/* @__PURE__ */ o.jsx("span", { className: "absolute left-8 flex h-[14px] w-[14px] items-center justify-center", children: /* @__PURE__ */ o.jsx(e.ItemIndicator, { children: /* @__PURE__ */ o.jsx(p, { className: "h-8 w-8 fill-gray-900" }) }) }),
|
|
89
89
|
a
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
));
|
|
93
|
-
|
|
94
|
-
const
|
|
93
|
+
y.displayName = e.RadioItem.displayName;
|
|
94
|
+
const w = d.forwardRef(({ className: t, inset: a, ...s }, r) => /* @__PURE__ */ o.jsx(
|
|
95
95
|
e.Label,
|
|
96
96
|
{
|
|
97
97
|
ref: r,
|
|
98
|
-
className: n(
|
|
99
|
-
"px-16 py-8 text-base font-medium",
|
|
100
|
-
a && "pl-32",
|
|
101
|
-
t
|
|
102
|
-
),
|
|
98
|
+
className: n("p-8 text-base font-medium", a && "pl-32", t),
|
|
103
99
|
...s
|
|
104
100
|
}
|
|
105
101
|
));
|
|
106
|
-
|
|
102
|
+
w.displayName = e.Label.displayName;
|
|
107
103
|
const g = d.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o.jsx(
|
|
108
104
|
e.Separator,
|
|
109
105
|
{
|
|
110
106
|
ref: s,
|
|
111
|
-
className: n("h-[1px] bg-gray-900-8", t),
|
|
107
|
+
className: n("-mx-2 my-2 h-[1px] bg-gray-900-8", t),
|
|
112
108
|
...a
|
|
113
109
|
}
|
|
114
110
|
));
|
|
@@ -130,10 +126,10 @@ export {
|
|
|
130
126
|
f as DropdownMenuContent,
|
|
131
127
|
I as DropdownMenuGroup,
|
|
132
128
|
x as DropdownMenuItem,
|
|
133
|
-
|
|
129
|
+
w as DropdownMenuLabel,
|
|
134
130
|
S as DropdownMenuPortal,
|
|
135
131
|
v as DropdownMenuRadioGroup,
|
|
136
|
-
|
|
132
|
+
y as DropdownMenuRadioItem,
|
|
137
133
|
g as DropdownMenuSeparator,
|
|
138
134
|
h as DropdownMenuShortcut,
|
|
139
135
|
C as DropdownMenuSub,
|
package/dist/index.es14.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es14.js","sources":["../src/DropdownMenu/index.tsx"],"sourcesContent":["'use client'\n\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center pl-16 py-8 text-base outline-none focus:bg-purple-100 data-[state=open]:bg-purple-100',\n inset && 'pl-32',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto mr-4 h-16 w-16\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded border border-gray-900-8 bg-white text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded border border-gray-900-8 bg-white text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center px-16 py-8 text-base outline-none transition-colors focus:bg-purple-100 focus:bg-purple-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n inset && 'pl-[2rem]',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-purple-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-8 flex h-[14px] w-[14px] items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-16 w-16\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-purple-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-8 flex h-[14px] w-[14px] items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-8 w-8 fill-gray-900\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'px-16 py-8 text-base font-medium',\n inset && 'pl-32',\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('h-[1px] bg-gray-900-8', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest opacity-40', className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup\n}\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAOA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAE/CM,IAAyBC,EAAM,WAKnC,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAAS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AAA;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,EAAA;AACN,CACD;AACDe,EAAkB,cAAc1B,EAAsB,MAAM;AAEtD,MAAA2B,IAAwBpB,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAM,GAAGC,MAC1BG,gBAAAA,EAAA;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE,EAAG,yBAAyBN,CAAS;AAAA,IAC/C,GAAGG;AAAA,EAAA;AACN,CACD;AACDgB,EAAsB,cAAc3B,EAAsB,UAAU;AAEpE,MAAM4B,IAAuB,CAAC;AAAA,EAC5B,WAAApB;AAAA,EACA,GAAGG;AACL,MAEII,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWD,EAAG,8CAA8CN,CAAS;AAAA,IACpE,GAAGG;AAAA,EAAA;AAAA;AAIViB,EAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index.es14.js","sources":["../src/DropdownMenu/index.tsx"],"sourcesContent":["'use client'\n\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-small pl-8 py-8 text-base outline-none focus:bg-gray-900-8 data-[state=open]:bg-gray-900-8',\n inset && 'pl-32',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto mr-4 h-16 w-16\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-gray-900-8 bg-white p-2 text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-[6px] border border-gray-900-8 bg-white p-2 text-gray-900 shadow-200 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-[0.25rem] data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-small px-8 py-8 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n inset && 'pl-[2rem]',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-[2px] py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-8 flex h-[14px] w-[14px] items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-16 w-16\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-[2px] py-8 pl-32 pr-4 text-base outline-none transition-colors focus:bg-gray-900-8 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-8 flex h-[14px] w-[14px] items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-8 w-8 fill-gray-900\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('p-8 text-base font-medium', inset && 'pl-32', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-2 my-2 h-[1px] bg-gray-900-8', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest opacity-40', className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup\n}\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAOA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAE/CM,IAAyBC,EAAM,WAKnC,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAASC,MAC3CC,gBAAAA,EAAA;AAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACDK,gBAAAA,EAAAA,IAACC,GAAa,EAAA,WAAU,yBAAyB,CAAA;AAAA,IAAA;AAAA,EAAA;AACnD,CACD;AACDV,EAAuB,cACrBN,EAAsB,WAAW;AAE7B,MAAAiB,IAAyBV,EAAM,WAGnC,CAAC,EA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AAS;AAAA,IAC1D,GAAGG;AAAA,EAAA;AACN,CACD;AACDgB,EAAsB,cAAc3B,EAAsB,UAAU;AAEpE,MAAM4B,IAAuB,CAAC;AAAA,EAC5B,WAAApB;AAAA,EACA,GAAGG;AACL,MAEII,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWD,EAAG,8CAA8CN,CAAS;AAAA,IACpE,GAAGG;AAAA,EAAA;AAAA;AAIViB,EAAqB,cAAc;"}
|
package/dist/index.es15.js
CHANGED
|
@@ -6,27 +6,24 @@ import { Popover as w, PopoverTrigger as C, PopoverContent as N } from "./index.
|
|
|
6
6
|
import { cn as b } from "./index.es41.js";
|
|
7
7
|
function V({
|
|
8
8
|
children: m,
|
|
9
|
-
label:
|
|
9
|
+
label: p,
|
|
10
10
|
selectedLabel: a,
|
|
11
|
-
trigger:
|
|
11
|
+
trigger: d,
|
|
12
12
|
i18n: n,
|
|
13
13
|
value: t,
|
|
14
14
|
onOpenChange: u,
|
|
15
|
-
onApply:
|
|
15
|
+
onApply: l,
|
|
16
16
|
...h
|
|
17
17
|
}) {
|
|
18
|
-
const [x, c] = f.useState(!1), [i,
|
|
18
|
+
const [x, c] = f.useState(!1), [i, s] = f.useState(t || null), j = t ? a ? a(t) : t.toString() : p, g = /* @__PURE__ */ e.jsxs(
|
|
19
19
|
o,
|
|
20
20
|
{
|
|
21
21
|
variant: t ? "filled" : "outline",
|
|
22
22
|
intent: t ? "filter" : "secondary",
|
|
23
23
|
size: "sm",
|
|
24
|
-
className: b(
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"pr-12": !!t
|
|
28
|
-
}
|
|
29
|
-
),
|
|
24
|
+
className: b("font-normal flex items-center whitespace-nowrap gap-x-4", {
|
|
25
|
+
"pr-12": !!t
|
|
26
|
+
}),
|
|
30
27
|
children: [
|
|
31
28
|
j,
|
|
32
29
|
t && /* @__PURE__ */ e.jsx(
|
|
@@ -34,7 +31,7 @@ function V({
|
|
|
34
31
|
{
|
|
35
32
|
className: "w-16 h-16 rounded hover:bg-purple-100 shrink-0",
|
|
36
33
|
onClick: (r) => {
|
|
37
|
-
r.preventDefault(),
|
|
34
|
+
r.preventDefault(), s(null), l?.(void 0);
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
)
|
|
@@ -46,20 +43,20 @@ function V({
|
|
|
46
43
|
{
|
|
47
44
|
open: x,
|
|
48
45
|
onOpenChange: (r) => {
|
|
49
|
-
u?.(r), r ||
|
|
46
|
+
u?.(r), r || l?.(i || void 0), r && s(t || null), c(r);
|
|
50
47
|
},
|
|
51
48
|
...h,
|
|
52
49
|
children: [
|
|
53
|
-
/* @__PURE__ */ e.jsx(C, { asChild: !0, children:
|
|
50
|
+
/* @__PURE__ */ e.jsx(C, { asChild: !0, children: d || g }),
|
|
54
51
|
/* @__PURE__ */ e.jsx(N, { align: "start", className: "w-full", children: /* @__PURE__ */ e.jsxs(
|
|
55
52
|
"form",
|
|
56
53
|
{
|
|
57
54
|
onSubmit: (r) => {
|
|
58
|
-
r.preventDefault(),
|
|
55
|
+
r.preventDefault(), l?.(i || void 0), c(!1);
|
|
59
56
|
},
|
|
60
57
|
children: [
|
|
61
58
|
/* @__PURE__ */ e.jsx("div", { className: "p-8", children: m({
|
|
62
|
-
onFilterChange:
|
|
59
|
+
onFilterChange: s,
|
|
63
60
|
filterValue: i
|
|
64
61
|
}) }),
|
|
65
62
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full flex justify-between mt-16", children: [
|
|
@@ -71,7 +68,7 @@ function V({
|
|
|
71
68
|
size: "fit-content",
|
|
72
69
|
type: "button",
|
|
73
70
|
onClick: () => {
|
|
74
|
-
|
|
71
|
+
s(null);
|
|
75
72
|
},
|
|
76
73
|
children: n.clear
|
|
77
74
|
}
|
package/dist/index.es15.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es15.js","sources":["../src/Filter/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport React from 'react'\nimport { Button } from '../Button'\nimport { Popover, PopoverContent, PopoverTrigger } from '../Popover'\nimport { cn } from '../lib/utils'\n\ntype FilterPropsBase<T> = {\n i18n: {\n apply?: string\n clear?: string\n }\n value?: T\n onOpenChange?: (open: boolean) => void\n onApply: (value?: T) => void\n children: (props: {\n onFilterChange: (value: T | null) => void\n filterValue: T | null\n }) => React.ReactNode\n}\n\ntype FilterPropsWithLabel<T> = FilterPropsBase<T> & {\n label: string\n selectedLabel?: (value: T) => React.ReactNode\n trigger?: never\n}\n\ntype FilterPropsWithTrigger<T> = FilterPropsBase<T> & {\n trigger: React.ReactNode\n label?: never\n selectedLabel?: never\n}\n\ntype FilterProps<T> = FilterPropsWithLabel<T> | FilterPropsWithTrigger<T>\n\nfunction Filter<T>({\n children,\n label,\n selectedLabel,\n trigger,\n i18n,\n value,\n onOpenChange,\n onApply,\n ...props\n}: FilterProps<T>) {\n const [isOpen, setIsOpen] = React.useState(false)\n const [localValue, setLocalValue] = React.useState<T | null>(value || null)\n\n const filterLabel = value\n ? selectedLabel\n ? selectedLabel(value)\n : value.toString()\n : label\n\n const defaultTrigger = (\n <Button\n variant={value ? 'filled' : 'outline'}\n intent={value ? 'filter' : 'secondary'}\n size=\"sm\"\n className={cn(
|
|
1
|
+
{"version":3,"file":"index.es15.js","sources":["../src/Filter/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport React from 'react'\nimport { Button } from '../Button'\nimport { Popover, PopoverContent, PopoverTrigger } from '../Popover'\nimport { cn } from '../lib/utils'\n\ntype FilterPropsBase<T> = {\n i18n: {\n apply?: string\n clear?: string\n }\n value?: T\n onOpenChange?: (open: boolean) => void\n onApply: (value?: T) => void\n children: (props: {\n onFilterChange: (value: T | null) => void\n filterValue: T | null\n }) => React.ReactNode\n}\n\ntype FilterPropsWithLabel<T> = FilterPropsBase<T> & {\n label: string\n selectedLabel?: (value: T) => React.ReactNode\n trigger?: never\n}\n\ntype FilterPropsWithTrigger<T> = FilterPropsBase<T> & {\n trigger: React.ReactNode\n label?: never\n selectedLabel?: never\n}\n\ntype FilterProps<T> = FilterPropsWithLabel<T> | FilterPropsWithTrigger<T>\n\nfunction Filter<T>({\n children,\n label,\n selectedLabel,\n trigger,\n i18n,\n value,\n onOpenChange,\n onApply,\n ...props\n}: FilterProps<T>) {\n const [isOpen, setIsOpen] = React.useState(false)\n const [localValue, setLocalValue] = React.useState<T | null>(value || null)\n\n const filterLabel = value\n ? selectedLabel\n ? selectedLabel(value)\n : value.toString()\n : label\n\n const defaultTrigger = (\n <Button\n variant={value ? 'filled' : 'outline'}\n intent={value ? 'filter' : 'secondary'}\n size=\"sm\"\n className={cn('font-normal flex items-center whitespace-nowrap gap-x-4', {\n 'pr-12': !!value\n })}\n >\n {filterLabel}\n {value && (\n <LucideX\n className=\"w-16 h-16 rounded hover:bg-purple-100 shrink-0\"\n onClick={e => {\n e.preventDefault()\n setLocalValue(null)\n onApply?.(undefined)\n }}\n />\n )}\n </Button>\n )\n\n return (\n <Popover\n open={isOpen}\n onOpenChange={open => {\n onOpenChange?.(open)\n if (!open) onApply?.(localValue || undefined)\n if (open) setLocalValue(value || null)\n setIsOpen(open)\n }}\n {...props}\n >\n <PopoverTrigger asChild>{trigger || defaultTrigger}</PopoverTrigger>\n <PopoverContent align=\"start\" className=\"w-full\">\n <form\n onSubmit={event => {\n event.preventDefault()\n onApply?.(localValue || undefined)\n setIsOpen(false)\n }}\n >\n <div className=\"p-8\">\n {children({\n onFilterChange: setLocalValue,\n filterValue: localValue\n })}\n </div>\n <div className=\"w-full flex justify-between mt-16\">\n {localValue && i18n.clear && (\n <Button\n variant=\"link\"\n intent=\"secondary\"\n size=\"fit-content\"\n type=\"button\"\n onClick={() => {\n setLocalValue(null)\n }}\n >\n {i18n.clear}\n </Button>\n )}\n {i18n.apply && (\n <Button\n className=\"ml-auto\"\n variant=\"link\"\n size=\"fit-content\"\n type=\"submit\"\n >\n {i18n.apply}\n </Button>\n )}\n </div>\n </form>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport { Filter }\nexport type { FilterProps }\n"],"names":["Filter","children","label","selectedLabel","trigger","i18n","value","onOpenChange","onApply","props","isOpen","setIsOpen","React","localValue","setLocalValue","filterLabel","defaultTrigger","jsxs","Button","cn","jsx","LucideX","e","Popover","open","PopoverTrigger","PopoverContent","event"],"mappings":";;;;;;AAkCA,SAASA,EAAU;AAAA,EACjB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GAAmB;AACjB,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAM,SAAS,EAAK,GAC1C,CAACC,GAAYC,CAAa,IAAIF,EAAM,SAAmBN,KAAS,IAAI,GAEpES,IAAcT,IAChBH,IACEA,EAAcG,CAAK,IACnBA,EAAM,SACR,IAAAJ,GAEEc,IACJC,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAASZ,IAAQ,WAAW;AAAA,MAC5B,QAAQA,IAAQ,WAAW;AAAA,MAC3B,MAAK;AAAA,MACL,WAAWa,EAAG,2DAA2D;AAAA,QACvE,SAAS,CAAC,CAACb;AAAA,MAAA,CACZ;AAAA,MAEA,UAAA;AAAA,QAAAS;AAAA,QACAT,KACCc,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,SAAS,CAAKC,MAAA;AACZ,cAAAA,EAAE,eAAe,GACjBR,EAAc,IAAI,GAClBN,IAAU,MAAS;AAAA,YACrB;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAMJ,SAAAS,gBAAAA,EAAA;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,MAAMb;AAAA,MACN,cAAc,CAAQc,MAAA;AACpB,QAAAjB,IAAeiB,CAAI,GACdA,KAA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es17.js
CHANGED
|
@@ -9,7 +9,7 @@ const s = a.forwardRef(
|
|
|
9
9
|
className: d(
|
|
10
10
|
"flex h-[36px] w-full rounded border border-gray-900-24 bg-white px-12 py-[6px] text-base",
|
|
11
11
|
"file:border-0 file:bg-white file:text-base file:font-medium",
|
|
12
|
-
"placeholder:text-gray-
|
|
12
|
+
"placeholder:text-gray-400",
|
|
13
13
|
"hover:shadow-field-hover",
|
|
14
14
|
"active:shadow-field-active",
|
|
15
15
|
"focus-visible:outline-none focus:shadow-field-active",
|
package/dist/index.es17.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es17.js","sources":["../src/Input/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../lib/utils'\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-[36px] w-full rounded border border-gray-900-24 bg-white px-12 py-[6px] text-base',\n 'file:border-0 file:bg-white file:text-base file:font-medium',\n 'placeholder:text-gray-
|
|
1
|
+
{"version":3,"file":"index.es17.js","sources":["../src/Input/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../lib/utils'\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-[36px] w-full rounded border border-gray-900-24 bg-white px-12 py-[6px] text-base',\n 'file:border-0 file:bg-white file:text-base file:font-medium',\n 'placeholder:text-gray-400',\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'focus-visible:outline-none focus:shadow-field-active',\n 'disabled:cursor-not-allowed disabled:opacity-64 disabled:shadow-none',\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = 'Input'\n\nexport { Input }\n"],"names":["Input","React","className","type","props","ref","jsx","cn"],"mappings":";;;AAMA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAE5BC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAH;AAAA,MACA,WAAWI;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAL;AAAA,MACF;AAAA,MACA,KAAAG;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAJ,EAAM,cAAc;"}
|