@seekho/ui 0.1.2 → 0.1.4

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/index.js CHANGED
@@ -260,12 +260,12 @@ function Modal({
260
260
  )
261
261
  ] }),
262
262
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-3.5 py-3", children }),
263
- isButtonsRequired && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md border-t", children: [
263
+ isButtonsRequired && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md", children: [
264
264
  onHide && /* @__PURE__ */ jsxRuntime.jsx(
265
265
  "button",
266
266
  {
267
267
  onClick: onHide,
268
- className: "px-4 py-2 border bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors",
268
+ className: "px-4 py-2 bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors",
269
269
  children: "Cancel"
270
270
  }
271
271
  ),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Input/Input.tsx","../src/utils/modalStack.ts","../src/components/Modal/Modal.tsx","../src/hooks/useLocalStorage.ts","../src/utils/cn.ts"],"names":["jsxs","jsx","variantClasses","React","useId","useEffect","useHotkeys","useState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,cAAA,GAAgD;AAAA,EACpD,OAAA,EAAS,0EAAA;AAAA,EACT,SAAA,EAAW,iEAAA;AAAA,EACX,MAAA,EAAQ,2DAAA;AAAA,EACR,KAAA,EAAO;AACT,CAAA;AAEA,IAAM,WAAA,GAA0C;AAAA,EAC9C,EAAA,EAAI,qBAAA;AAAA,EACJ,EAAA,EAAI,mBAAA;AAAA,EACJ,EAAA,E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CAAA;AAAA,MACpC;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,mCAAA,EAAsC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAClE;AAAA,EACF,CAAA;AAEA,EAAA,OAAO,CAAC,WAAA,EAAa,QAAA,EAAU,MAAM,CAAA;AACvC;;;ACpCO,SAAS,MAAM,OAAA,EAAwD;AAC5E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC","file":"index.js","sourcesContent":["import React from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"danger\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n loading?: boolean;\n children: React.ReactNode;\n}\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary: \"bg-basePurple text-white hover:bg-basePurple/80 focus:ring-basePurple/50\",\n secondary: \"bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-400\",\n danger: \"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500\",\n ghost: \"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300\",\n};\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: \"px-3 py-1.5 text-sm\",\n md: \"px-4 py-2 text-sm\",\n lg: \"px-5 py-2.5 text-base\",\n};\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n loading = false,\n disabled,\n className = \"\",\n children,\n ...props\n}: ButtonProps) {\n return (\n <button\n disabled={disabled || loading}\n className={[\n \"inline-flex items-center justify-center gap-2 rounded-md font-medium\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2\",\n \"transition-colors duration-150\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n variantClasses[variant],\n sizeClasses[size],\n className,\n ].join(\" \")}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n}\n","import React from \"react\";\n\nexport type BadgeVariant = \"default\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n className?: string;\n}\n\nconst variantClasses: Record<BadgeVariant, string> = {\n default: \"bg-gray-100 text-gray-800\",\n success: \"bg-green-100 text-green-800\",\n warning: \"bg-yellow-100 text-yellow-800\",\n danger: \"bg-red-100 text-red-800\",\n info: \"bg-blue-100 text-blue-800\",\n};\n\nexport function Badge({ variant = \"default\", children, className = \"\" }: BadgeProps) {\n return (\n <span\n className={[\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium\",\n variantClasses[variant],\n className,\n ].join(\" \")}\n >\n {children}\n </span>\n );\n}\n","import React from \"react\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ label, error, hint, className = \"\", id, ...props }, ref) => {\n const inputId = id || label?.toLowerCase().replace(/\\s+/g, \"-\");\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={inputId}\n className=\"text-sm font-medium text-gray-700\"\n >\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={[\n \"block w-full rounded-md border px-3 py-2 text-sm shadow-sm\",\n \"placeholder:text-gray-400\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-0\",\n error\n ? \"border-red-400 focus:border-red-500 focus:ring-red-300\"\n : \"border-gray-300 focus:border-blue-500 focus:ring-blue-200\",\n \"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500\",\n className,\n ].join(\" \")}\n {...props}\n />\n {error && <p className=\"text-xs text-red-600\">{error}</p>}\n {hint && !error && <p className=\"text-xs text-gray-500\">{hint}</p>}\n </div>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","type ModalEntry = { id: string };\n\nconst stack: ModalEntry[] = [];\n\nexport function handlePushModal({ id }: ModalEntry) {\n if (!stack.find((m) => m.id === id)) {\n stack.push({ id });\n }\n}\n\nexport function handlePopModal({ id }: ModalEntry) {\n const idx = stack.findIndex((m) => m.id === id);\n if (idx !== -1) stack.splice(idx, 1);\n}\n\nexport function handleIsTopModal({ id }: ModalEntry): boolean {\n return stack.length > 0 && stack[stack.length - 1].id === id;\n}\n","import React, { useEffect, useId } from \"react\";\nimport { useHotkeys } from \"react-hotkeys-hook\";\nimport {\n handleIsTopModal,\n handlePopModal,\n handlePushModal,\n} from \"../../utils/modalStack\";\n\nexport interface ModalProps {\n show: boolean;\n title?: string;\n className?: string;\n children?: React.ReactNode;\n isLoading?: boolean;\n onHide?: () => void;\n isWarning?: boolean;\n isButtonsRequired?: boolean;\n handleConfirmation?: () => void;\n handleConfirmationBtnText?: string;\n}\n\nexport function Modal({\n show,\n title = \"\",\n className,\n children,\n isLoading = false,\n onHide,\n isWarning = false,\n isButtonsRequired = true,\n handleConfirmation,\n handleConfirmationBtnText = \"Confirm\",\n}: ModalProps) {\n const modalId = useId();\n\n useEffect(() => {\n if (show) handlePushModal({ id: modalId });\n return () => handlePopModal({ id: modalId });\n }, [show, modalId]);\n\n useHotkeys(\n \"enter\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && handleConfirmation)\n handleConfirmation();\n },\n { enabled: show && !isLoading }\n );\n\n useHotkeys(\n \"esc\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && onHide) onHide();\n },\n { enabled: show && !isLoading }\n );\n\n if (!show) return null;\n\n return (\n <div className=\"fixed inset-0 z-999 bg-gray-800/50 flex items-center justify-center\">\n <div\n className={[\n \"w-[95%] bg-white rounded-lg shadow-lg flex flex-col\",\n \"md:w-[60%] lg:w-[30%] max-h-[95vh]\",\n className || \"\",\n ].join(\" \")}\n >\n {/* Header */}\n {title && (\n <div className=\"px-3.5 py-3 border-b border-gray-200 flex justify-between items-start gap-x-3\">\n <h2 className=\"text-[17px] font-semibold line-clamp-2 capitalize flex gap-x-2 items-center\">\n {isWarning && (\n <svg\n className=\"text-red-500 w-6 h-6 shrink-0\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M12 2a10 10 0 100 20A10 10 0 0012 2zm0 5a1 1 0 011 1v4a1 1 0 11-2 0V8a1 1 0 011-1zm0 8a1.25 1.25 0 110 2.5A1.25 1.25 0 0112 15z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n {title}\n </h2>\n {onHide && (\n <button\n onClick={onHide}\n className=\"text-gray-400 hover:text-gray-600 transition-colors shrink-0\"\n aria-label=\"Close\"\n >\n ✕\n </button>\n )}\n </div>\n )}\n\n {/* Body */}\n <div className=\"flex-1 overflow-y-auto px-3.5 py-3\">{children}</div>\n\n {/* Footer */}\n {isButtonsRequired && (\n <div className=\"px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md border-t\">\n {onHide && (\n <button\n onClick={onHide}\n className=\"px-4 py-2 border bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors\"\n >\n Cancel\n </button>\n )}\n <button\n onClick={handleConfirmation}\n disabled={isLoading}\n className={[\n \"px-4 py-2 text-white rounded-md text-[14px] font-semibold\",\n \"disabled:opacity-50 disabled:cursor-not-allowed transition-colors\",\n isWarning\n ? \"bg-red-600 hover:bg-red-700\"\n : \"bg-basePurple hover:bg-basePurple/80\",\n ].join(\" \")}\n >\n {isLoading ? (\n <span className=\"inline-flex items-center gap-2\">\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n {handleConfirmationBtnText}\n </span>\n ) : (\n handleConfirmationBtnText\n )}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * useState backed by localStorage — syncs value on mount and persists on change.\n */\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === \"undefined\") return initialValue;\n try {\n const item = window.localStorage.getItem(key);\n return item ? (JSON.parse(item) as T) : initialValue;\n } catch {\n return initialValue;\n }\n });\n\n const setValue = (value: T | ((prev: T) => T)) => {\n try {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n if (typeof window !== \"undefined\") {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to set \"${key}\"`, error);\n }\n };\n\n const remove = () => {\n try {\n setStoredValue(initialValue);\n if (typeof window !== \"undefined\") {\n window.localStorage.removeItem(key);\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to remove \"${key}\"`, error);\n }\n };\n\n return [storedValue, setValue, remove] as const;\n}\n","/**\n * Merges class names, filtering out falsy values.\n * Lightweight alternative to clsx for simple use cases.\n */\nexport function cn(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n"]}
1
+ {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Input/Input.tsx","../src/utils/modalStack.ts","../src/components/Modal/Modal.tsx","../src/hooks/useLocalStorage.ts","../src/utils/cn.ts"],"names":["jsxs","jsx","variantClasses","React","useId","useEffect","useHotkeys","useState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,cAAA,GAAgD;AAAA,EACpD,OAAA,EAAS,0EAAA;AAAA,EACT,SAAA,EAAW,iEAAA;AAAA,EACX,MAAA,EAAQ,2DAAA;AAAA,EACR,KAAA,EAAO;AACT,CAAA;AAEA,IAAM,WAAA,GAA0C;AAAA,EAC9C,EAAA,EAAI,qBAAA;AAAA,EACJ,EAAA,EAAI,mBAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEO,SAAS,OAAO,EAAA,EAQP;AARO,EAAA,IAAA,EAAA,GAAA,EAAA,EACrB;AAAA,IAAA,OAAA,GAAU,SAAA;AAAA,IACV,IAAA,GAAO,IAAA;AAAA,IACP,OAAA,GAAU,KAAA;AAAA,IACV,QAAA;AAAA,IACA,SAAA,GAAY,EAAA;AAAA,IACZ;AAAA,GA/BF,GAyBuB,EAAA,EAOlB,KAAA,GAAA,SAAA,CAPkB,EAAA,EAOlB;AAAA,IANH,SAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,uBACEA,eAAA;AAAA,IAAC,QAAA;AAAA,IAAA,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,UAAU,QAAA,IAAY,OAAA;AAAA,MACtB,SAAA,EAAW;AAAA,QACT,sEAAA;AAAA,QACA,qDAAA;AAAA,QACA,gCAAA;AAAA,QACA,iDAAA;AAAA,QACA,eAAe,OAAO,CAAA;AAAA,QACtB,YAAY,IAAI,CAAA;AAAA,QAChB;AAAA,OACF,CAAE,KAAK,GAAG;AAAA,KAAA,EACN,KAAA,CAAA,EAXL;AAAA,MAaE,QAAA,EAA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Aa;AACjC,QAAA,MAAA,CAAO,aAAa,OAAA,CAAQ,GAAA,EAAK,IAAA,CAAK,SAAA,CAAU,YAAY,CAAC,CAAA;AAAA,MAC/D;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,gCAAA,EAAmC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAC/D;AAAA,EACF,CAAA;AAEA,EAAA,MAAM,SAAS,MAAM;AACnB,IAAA,IAAI;AACF,MAAA,cAAA,CAAe,YAAY,CAAA;AAC3B,MAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,QAAA,MAAA,CAAO,YAAA,CAAa,WAAW,GAAG,CAAA;AAAA,MACpC;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,mCAAA,EAAsC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAClE;AAAA,EACF,CAAA;AAEA,EAAA,OAAO,CAAC,WAAA,EAAa,QAAA,EAAU,MAAM,CAAA;AACvC;;;ACpCO,SAAS,MAAM,OAAA,EAAwD;AAC5E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC","file":"index.js","sourcesContent":["import React from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"danger\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n loading?: boolean;\n children: React.ReactNode;\n}\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary: \"bg-basePurple text-white hover:bg-basePurple/80 focus:ring-basePurple/50\",\n secondary: \"bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-400\",\n danger: \"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500\",\n ghost: \"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300\",\n};\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: \"px-3 py-1.5 text-sm\",\n md: \"px-4 py-2 text-sm\",\n lg: \"px-5 py-2.5 text-base\",\n};\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n loading = false,\n disabled,\n className = \"\",\n children,\n ...props\n}: ButtonProps) {\n return (\n <button\n disabled={disabled || loading}\n className={[\n \"inline-flex items-center justify-center gap-2 rounded-md font-medium\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2\",\n \"transition-colors duration-150\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n variantClasses[variant],\n sizeClasses[size],\n className,\n ].join(\" \")}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n}\n","import React from \"react\";\n\nexport type BadgeVariant = \"default\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n className?: string;\n}\n\nconst variantClasses: Record<BadgeVariant, string> = {\n default: \"bg-gray-100 text-gray-800\",\n success: \"bg-green-100 text-green-800\",\n warning: \"bg-yellow-100 text-yellow-800\",\n danger: \"bg-red-100 text-red-800\",\n info: \"bg-blue-100 text-blue-800\",\n};\n\nexport function Badge({ variant = \"default\", children, className = \"\" }: BadgeProps) {\n return (\n <span\n className={[\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium\",\n variantClasses[variant],\n className,\n ].join(\" \")}\n >\n {children}\n </span>\n );\n}\n","import React from \"react\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ label, error, hint, className = \"\", id, ...props }, ref) => {\n const inputId = id || label?.toLowerCase().replace(/\\s+/g, \"-\");\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={inputId}\n className=\"text-sm font-medium text-gray-700\"\n >\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={[\n \"block w-full rounded-md border px-3 py-2 text-sm shadow-sm\",\n \"placeholder:text-gray-400\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-0\",\n error\n ? \"border-red-400 focus:border-red-500 focus:ring-red-300\"\n : \"border-gray-300 focus:border-blue-500 focus:ring-blue-200\",\n \"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500\",\n className,\n ].join(\" \")}\n {...props}\n />\n {error && <p className=\"text-xs text-red-600\">{error}</p>}\n {hint && !error && <p className=\"text-xs text-gray-500\">{hint}</p>}\n </div>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","type ModalEntry = { id: string };\n\nconst stack: ModalEntry[] = [];\n\nexport function handlePushModal({ id }: ModalEntry) {\n if (!stack.find((m) => m.id === id)) {\n stack.push({ id });\n }\n}\n\nexport function handlePopModal({ id }: ModalEntry) {\n const idx = stack.findIndex((m) => m.id === id);\n if (idx !== -1) stack.splice(idx, 1);\n}\n\nexport function handleIsTopModal({ id }: ModalEntry): boolean {\n return stack.length > 0 && stack[stack.length - 1].id === id;\n}\n","import React, { useEffect, useId } from \"react\";\nimport { useHotkeys } from \"react-hotkeys-hook\";\nimport {\n handleIsTopModal,\n handlePopModal,\n handlePushModal,\n} from \"../../utils/modalStack\";\n\nexport interface ModalProps {\n show: boolean;\n title?: string;\n className?: string;\n children?: React.ReactNode;\n isLoading?: boolean;\n onHide?: () => void;\n isWarning?: boolean;\n isButtonsRequired?: boolean;\n handleConfirmation?: () => void;\n handleConfirmationBtnText?: string;\n}\n\nexport function Modal({\n show,\n title = \"\",\n className,\n children,\n isLoading = false,\n onHide,\n isWarning = false,\n isButtonsRequired = true,\n handleConfirmation,\n handleConfirmationBtnText = \"Confirm\",\n}: ModalProps) {\n const modalId = useId();\n\n useEffect(() => {\n if (show) handlePushModal({ id: modalId });\n return () => handlePopModal({ id: modalId });\n }, [show, modalId]);\n\n useHotkeys(\n \"enter\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && handleConfirmation)\n handleConfirmation();\n },\n { enabled: show && !isLoading }\n );\n\n useHotkeys(\n \"esc\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && onHide) onHide();\n },\n { enabled: show && !isLoading }\n );\n\n if (!show) return null;\n\n return (\n <div className=\"fixed inset-0 z-999 bg-gray-800/50 flex items-center justify-center\">\n <div\n className={[\n \"w-[95%] bg-white rounded-lg shadow-lg flex flex-col\",\n \"md:w-[60%] lg:w-[30%] max-h-[95vh]\",\n className || \"\",\n ].join(\" \")}\n >\n {/* Header */}\n {title && (\n <div className=\"px-3.5 py-3 border-b border-gray-200 flex justify-between items-start gap-x-3\">\n <h2 className=\"text-[17px] font-semibold line-clamp-2 capitalize flex gap-x-2 items-center\">\n {isWarning && (\n <svg\n className=\"text-red-500 w-6 h-6 shrink-0\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M12 2a10 10 0 100 20A10 10 0 0012 2zm0 5a1 1 0 011 1v4a1 1 0 11-2 0V8a1 1 0 011-1zm0 8a1.25 1.25 0 110 2.5A1.25 1.25 0 0112 15z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n {title}\n </h2>\n {onHide && (\n <button\n onClick={onHide}\n className=\"text-gray-400 hover:text-gray-600 transition-colors shrink-0\"\n aria-label=\"Close\"\n >\n ✕\n </button>\n )}\n </div>\n )}\n\n {/* Body */}\n <div className=\"flex-1 overflow-y-auto px-3.5 py-3\">{children}</div>\n\n {/* Footer */}\n {isButtonsRequired && (\n <div className=\"px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md\">\n {onHide && (\n <button\n onClick={onHide}\n className=\"px-4 py-2 bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors\"\n >\n Cancel\n </button>\n )}\n <button\n onClick={handleConfirmation}\n disabled={isLoading}\n className={[\n \"px-4 py-2 text-white rounded-md text-[14px] font-semibold\",\n \"disabled:opacity-50 disabled:cursor-not-allowed transition-colors\",\n isWarning\n ? \"bg-red-600 hover:bg-red-700\"\n : \"bg-basePurple hover:bg-basePurple/80\",\n ].join(\" \")}\n >\n {isLoading ? (\n <span className=\"inline-flex items-center gap-2\">\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n {handleConfirmationBtnText}\n </span>\n ) : (\n handleConfirmationBtnText\n )}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * useState backed by localStorage — syncs value on mount and persists on change.\n */\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === \"undefined\") return initialValue;\n try {\n const item = window.localStorage.getItem(key);\n return item ? (JSON.parse(item) as T) : initialValue;\n } catch {\n return initialValue;\n }\n });\n\n const setValue = (value: T | ((prev: T) => T)) => {\n try {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n if (typeof window !== \"undefined\") {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to set \"${key}\"`, error);\n }\n };\n\n const remove = () => {\n try {\n setStoredValue(initialValue);\n if (typeof window !== \"undefined\") {\n window.localStorage.removeItem(key);\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to remove \"${key}\"`, error);\n }\n };\n\n return [storedValue, setValue, remove] as const;\n}\n","/**\n * Merges class names, filtering out falsy values.\n * Lightweight alternative to clsx for simple use cases.\n */\nexport function cn(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n"]}
package/dist/index.mjs CHANGED
@@ -254,12 +254,12 @@ function Modal({
254
254
  )
255
255
  ] }),
256
256
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto px-3.5 py-3", children }),
257
- isButtonsRequired && /* @__PURE__ */ jsxs("div", { className: "px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md border-t", children: [
257
+ isButtonsRequired && /* @__PURE__ */ jsxs("div", { className: "px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md", children: [
258
258
  onHide && /* @__PURE__ */ jsx(
259
259
  "button",
260
260
  {
261
261
  onClick: onHide,
262
- className: "px-4 py-2 border bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors",
262
+ className: "px-4 py-2 bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors",
263
263
  children: "Cancel"
264
264
  }
265
265
  ),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Input/Input.tsx","../src/utils/modalStack.ts","../src/components/Modal/Modal.tsx","../src/hooks/useLocalStorage.ts","../src/utils/cn.ts"],"names":["variantClasses","jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,cAAA,GAAgD;AAAA,EACpD,OAAA,EAAS,0EAAA;AAAA,EACT,SAAA,EAAW,i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AA,MAAM,SAAS,MAAM;AACnB,IAAA,IAAI;AACF,MAAA,cAAA,CAAe,YAAY,CAAA;AAC3B,MAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,QAAA,MAAA,CAAO,YAAA,CAAa,WAAW,GAAG,CAAA;AAAA,MACpC;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,mCAAA,EAAsC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAClE;AAAA,EACF,CAAA;AAEA,EAAA,OAAO,CAAC,WAAA,EAAa,QAAA,EAAU,MAAM,CAAA;AACvC;;;ACpCO,SAAS,MAAM,OAAA,EAAwD;AAC5E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC","file":"index.mjs","sourcesContent":["import React from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"danger\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n loading?: boolean;\n children: React.ReactNode;\n}\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary: \"bg-basePurple text-white hover:bg-basePurple/80 focus:ring-basePurple/50\",\n secondary: \"bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-400\",\n danger: \"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500\",\n ghost: \"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300\",\n};\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: \"px-3 py-1.5 text-sm\",\n md: \"px-4 py-2 text-sm\",\n lg: \"px-5 py-2.5 text-base\",\n};\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n loading = false,\n disabled,\n className = \"\",\n children,\n ...props\n}: ButtonProps) {\n return (\n <button\n disabled={disabled || loading}\n className={[\n \"inline-flex items-center justify-center gap-2 rounded-md font-medium\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2\",\n \"transition-colors duration-150\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n variantClasses[variant],\n sizeClasses[size],\n className,\n ].join(\" \")}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n}\n","import React from \"react\";\n\nexport type BadgeVariant = \"default\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n className?: string;\n}\n\nconst variantClasses: Record<BadgeVariant, string> = {\n default: \"bg-gray-100 text-gray-800\",\n success: \"bg-green-100 text-green-800\",\n warning: \"bg-yellow-100 text-yellow-800\",\n danger: \"bg-red-100 text-red-800\",\n info: \"bg-blue-100 text-blue-800\",\n};\n\nexport function Badge({ variant = \"default\", children, className = \"\" }: BadgeProps) {\n return (\n <span\n className={[\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium\",\n variantClasses[variant],\n className,\n ].join(\" \")}\n >\n {children}\n </span>\n );\n}\n","import React from \"react\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ label, error, hint, className = \"\", id, ...props }, ref) => {\n const inputId = id || label?.toLowerCase().replace(/\\s+/g, \"-\");\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={inputId}\n className=\"text-sm font-medium text-gray-700\"\n >\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={[\n \"block w-full rounded-md border px-3 py-2 text-sm shadow-sm\",\n \"placeholder:text-gray-400\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-0\",\n error\n ? \"border-red-400 focus:border-red-500 focus:ring-red-300\"\n : \"border-gray-300 focus:border-blue-500 focus:ring-blue-200\",\n \"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500\",\n className,\n ].join(\" \")}\n {...props}\n />\n {error && <p className=\"text-xs text-red-600\">{error}</p>}\n {hint && !error && <p className=\"text-xs text-gray-500\">{hint}</p>}\n </div>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","type ModalEntry = { id: string };\n\nconst stack: ModalEntry[] = [];\n\nexport function handlePushModal({ id }: ModalEntry) {\n if (!stack.find((m) => m.id === id)) {\n stack.push({ id });\n }\n}\n\nexport function handlePopModal({ id }: ModalEntry) {\n const idx = stack.findIndex((m) => m.id === id);\n if (idx !== -1) stack.splice(idx, 1);\n}\n\nexport function handleIsTopModal({ id }: ModalEntry): boolean {\n return stack.length > 0 && stack[stack.length - 1].id === id;\n}\n","import React, { useEffect, useId } from \"react\";\nimport { useHotkeys } from \"react-hotkeys-hook\";\nimport {\n handleIsTopModal,\n handlePopModal,\n handlePushModal,\n} from \"../../utils/modalStack\";\n\nexport interface ModalProps {\n show: boolean;\n title?: string;\n className?: string;\n children?: React.ReactNode;\n isLoading?: boolean;\n onHide?: () => void;\n isWarning?: boolean;\n isButtonsRequired?: boolean;\n handleConfirmation?: () => void;\n handleConfirmationBtnText?: string;\n}\n\nexport function Modal({\n show,\n title = \"\",\n className,\n children,\n isLoading = false,\n onHide,\n isWarning = false,\n isButtonsRequired = true,\n handleConfirmation,\n handleConfirmationBtnText = \"Confirm\",\n}: ModalProps) {\n const modalId = useId();\n\n useEffect(() => {\n if (show) handlePushModal({ id: modalId });\n return () => handlePopModal({ id: modalId });\n }, [show, modalId]);\n\n useHotkeys(\n \"enter\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && handleConfirmation)\n handleConfirmation();\n },\n { enabled: show && !isLoading }\n );\n\n useHotkeys(\n \"esc\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && onHide) onHide();\n },\n { enabled: show && !isLoading }\n );\n\n if (!show) return null;\n\n return (\n <div className=\"fixed inset-0 z-999 bg-gray-800/50 flex items-center justify-center\">\n <div\n className={[\n \"w-[95%] bg-white rounded-lg shadow-lg flex flex-col\",\n \"md:w-[60%] lg:w-[30%] max-h-[95vh]\",\n className || \"\",\n ].join(\" \")}\n >\n {/* Header */}\n {title && (\n <div className=\"px-3.5 py-3 border-b border-gray-200 flex justify-between items-start gap-x-3\">\n <h2 className=\"text-[17px] font-semibold line-clamp-2 capitalize flex gap-x-2 items-center\">\n {isWarning && (\n <svg\n className=\"text-red-500 w-6 h-6 shrink-0\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M12 2a10 10 0 100 20A10 10 0 0012 2zm0 5a1 1 0 011 1v4a1 1 0 11-2 0V8a1 1 0 011-1zm0 8a1.25 1.25 0 110 2.5A1.25 1.25 0 0112 15z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n {title}\n </h2>\n {onHide && (\n <button\n onClick={onHide}\n className=\"text-gray-400 hover:text-gray-600 transition-colors shrink-0\"\n aria-label=\"Close\"\n >\n ✕\n </button>\n )}\n </div>\n )}\n\n {/* Body */}\n <div className=\"flex-1 overflow-y-auto px-3.5 py-3\">{children}</div>\n\n {/* Footer */}\n {isButtonsRequired && (\n <div className=\"px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md border-t\">\n {onHide && (\n <button\n onClick={onHide}\n className=\"px-4 py-2 border bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors\"\n >\n Cancel\n </button>\n )}\n <button\n onClick={handleConfirmation}\n disabled={isLoading}\n className={[\n \"px-4 py-2 text-white rounded-md text-[14px] font-semibold\",\n \"disabled:opacity-50 disabled:cursor-not-allowed transition-colors\",\n isWarning\n ? \"bg-red-600 hover:bg-red-700\"\n : \"bg-basePurple hover:bg-basePurple/80\",\n ].join(\" \")}\n >\n {isLoading ? (\n <span className=\"inline-flex items-center gap-2\">\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n {handleConfirmationBtnText}\n </span>\n ) : (\n handleConfirmationBtnText\n )}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * useState backed by localStorage — syncs value on mount and persists on change.\n */\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === \"undefined\") return initialValue;\n try {\n const item = window.localStorage.getItem(key);\n return item ? (JSON.parse(item) as T) : initialValue;\n } catch {\n return initialValue;\n }\n });\n\n const setValue = (value: T | ((prev: T) => T)) => {\n try {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n if (typeof window !== \"undefined\") {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to set \"${key}\"`, error);\n }\n };\n\n const remove = () => {\n try {\n setStoredValue(initialValue);\n if (typeof window !== \"undefined\") {\n window.localStorage.removeItem(key);\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to remove \"${key}\"`, error);\n }\n };\n\n return [storedValue, setValue, remove] as const;\n}\n","/**\n * Merges class names, filtering out falsy values.\n * Lightweight alternative to clsx for simple use cases.\n */\nexport function cn(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n"]}
1
+ {"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Badge/Badge.tsx","../src/components/Input/Input.tsx","../src/utils/modalStack.ts","../src/components/Modal/Modal.tsx","../src/hooks/useLocalStorage.ts","../src/utils/cn.ts"],"names":["variantClasses","jsx","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,cAAA,GAAgD;AAAA,EACpD,OAAA,EAAS,0EAAA;AAAA,EACT,SAAA,EAAW,iEAAA;AAAA,EACX,MAAA,EAAQ,2DAAA;AAAA,EACR,KAAA,EAAO;AACT,CAAA;AAEA,IAAM,WAAA,GAA0C;AAAA,EAC9C,EAAA,EAAI,qBAAA;AAAA,EACJ,EAAA,EAAI,mBAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAEO,SAAS,OAAO,EAAA,EAQP;AARO,EAAA,IAAA,EAAA,GAAA,EAAA,EACrB;AAAA,IAAA,OAAA,GAAU,SAAA;AAAA,IACV,IAAA,GAAO,IAAA;AAAA,IACP,OAAA,GAAU,KAAA;AAAA,IACV,QAAA;AAAA,IACA,SAAA,GAAY,EAAA;AAAA,IACZ;AAAA,GA/BF,GAyBuB,EAAA,EAOlB,KAAA,GAAA,SAAA,CAPkB,EAAA,EAOlB;AAAA,IANH,SAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,UAAU,QAAA,IAAY,OAAA;AAAA,MACtB,SAAA,EAAW;AAAA,QACT,sEAAA;AAAA,QACA,qDAAA;AAAA,QACA,gCAAA;AAAA,QACA,iDAAA;AAAA,QACA,eAAe,OAA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QAAA,GAAW,KAAA,CAAM,WAAW,CAAA,GAAI,KAAA;AACtE,MAAA,cAAA,CAAe,YAAY,CAAA;AAC3B,MAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,QAAA,MAAA,CAAO,aAAa,OAAA,CAAQ,GAAA,EAAK,IAAA,CAAK,SAAA,CAAU,YAAY,CAAC,CAAA;AAAA,MAC/D;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,gCAAA,EAAmC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAC/D;AAAA,EACF,CAAA;AAEA,EAAA,MAAM,SAAS,MAAM;AACnB,IAAA,IAAI;AACF,MAAA,cAAA,CAAe,YAAY,CAAA;AAC3B,MAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,QAAA,MAAA,CAAO,YAAA,CAAa,WAAW,GAAG,CAAA;AAAA,MACpC;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,mCAAA,EAAsC,GAAG,CAAA,CAAA,CAAA,EAAK,KAAK,CAAA;AAAA,IAClE;AAAA,EACF,CAAA;AAEA,EAAA,OAAO,CAAC,WAAA,EAAa,QAAA,EAAU,MAAM,CAAA;AACvC;;;ACpCO,SAAS,MAAM,OAAA,EAAwD;AAC5E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC","file":"index.mjs","sourcesContent":["import React from \"react\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"danger\" | \"ghost\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n loading?: boolean;\n children: React.ReactNode;\n}\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary: \"bg-basePurple text-white hover:bg-basePurple/80 focus:ring-basePurple/50\",\n secondary: \"bg-gray-100 text-gray-900 hover:bg-gray-200 focus:ring-gray-400\",\n danger: \"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500\",\n ghost: \"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-300\",\n};\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: \"px-3 py-1.5 text-sm\",\n md: \"px-4 py-2 text-sm\",\n lg: \"px-5 py-2.5 text-base\",\n};\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n loading = false,\n disabled,\n className = \"\",\n children,\n ...props\n}: ButtonProps) {\n return (\n <button\n disabled={disabled || loading}\n className={[\n \"inline-flex items-center justify-center gap-2 rounded-md font-medium\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2\",\n \"transition-colors duration-150\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n variantClasses[variant],\n sizeClasses[size],\n className,\n ].join(\" \")}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n}\n","import React from \"react\";\n\nexport type BadgeVariant = \"default\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n className?: string;\n}\n\nconst variantClasses: Record<BadgeVariant, string> = {\n default: \"bg-gray-100 text-gray-800\",\n success: \"bg-green-100 text-green-800\",\n warning: \"bg-yellow-100 text-yellow-800\",\n danger: \"bg-red-100 text-red-800\",\n info: \"bg-blue-100 text-blue-800\",\n};\n\nexport function Badge({ variant = \"default\", children, className = \"\" }: BadgeProps) {\n return (\n <span\n className={[\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium\",\n variantClasses[variant],\n className,\n ].join(\" \")}\n >\n {children}\n </span>\n );\n}\n","import React from \"react\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ label, error, hint, className = \"\", id, ...props }, ref) => {\n const inputId = id || label?.toLowerCase().replace(/\\s+/g, \"-\");\n\n return (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={inputId}\n className=\"text-sm font-medium text-gray-700\"\n >\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={[\n \"block w-full rounded-md border px-3 py-2 text-sm shadow-sm\",\n \"placeholder:text-gray-400\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-0\",\n error\n ? \"border-red-400 focus:border-red-500 focus:ring-red-300\"\n : \"border-gray-300 focus:border-blue-500 focus:ring-blue-200\",\n \"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500\",\n className,\n ].join(\" \")}\n {...props}\n />\n {error && <p className=\"text-xs text-red-600\">{error}</p>}\n {hint && !error && <p className=\"text-xs text-gray-500\">{hint}</p>}\n </div>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","type ModalEntry = { id: string };\n\nconst stack: ModalEntry[] = [];\n\nexport function handlePushModal({ id }: ModalEntry) {\n if (!stack.find((m) => m.id === id)) {\n stack.push({ id });\n }\n}\n\nexport function handlePopModal({ id }: ModalEntry) {\n const idx = stack.findIndex((m) => m.id === id);\n if (idx !== -1) stack.splice(idx, 1);\n}\n\nexport function handleIsTopModal({ id }: ModalEntry): boolean {\n return stack.length > 0 && stack[stack.length - 1].id === id;\n}\n","import React, { useEffect, useId } from \"react\";\nimport { useHotkeys } from \"react-hotkeys-hook\";\nimport {\n handleIsTopModal,\n handlePopModal,\n handlePushModal,\n} from \"../../utils/modalStack\";\n\nexport interface ModalProps {\n show: boolean;\n title?: string;\n className?: string;\n children?: React.ReactNode;\n isLoading?: boolean;\n onHide?: () => void;\n isWarning?: boolean;\n isButtonsRequired?: boolean;\n handleConfirmation?: () => void;\n handleConfirmationBtnText?: string;\n}\n\nexport function Modal({\n show,\n title = \"\",\n className,\n children,\n isLoading = false,\n onHide,\n isWarning = false,\n isButtonsRequired = true,\n handleConfirmation,\n handleConfirmationBtnText = \"Confirm\",\n}: ModalProps) {\n const modalId = useId();\n\n useEffect(() => {\n if (show) handlePushModal({ id: modalId });\n return () => handlePopModal({ id: modalId });\n }, [show, modalId]);\n\n useHotkeys(\n \"enter\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && handleConfirmation)\n handleConfirmation();\n },\n { enabled: show && !isLoading }\n );\n\n useHotkeys(\n \"esc\",\n (e) => {\n e.preventDefault();\n if (show && handleIsTopModal({ id: modalId }) && onHide) onHide();\n },\n { enabled: show && !isLoading }\n );\n\n if (!show) return null;\n\n return (\n <div className=\"fixed inset-0 z-999 bg-gray-800/50 flex items-center justify-center\">\n <div\n className={[\n \"w-[95%] bg-white rounded-lg shadow-lg flex flex-col\",\n \"md:w-[60%] lg:w-[30%] max-h-[95vh]\",\n className || \"\",\n ].join(\" \")}\n >\n {/* Header */}\n {title && (\n <div className=\"px-3.5 py-3 border-b border-gray-200 flex justify-between items-start gap-x-3\">\n <h2 className=\"text-[17px] font-semibold line-clamp-2 capitalize flex gap-x-2 items-center\">\n {isWarning && (\n <svg\n className=\"text-red-500 w-6 h-6 shrink-0\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M12 2a10 10 0 100 20A10 10 0 0012 2zm0 5a1 1 0 011 1v4a1 1 0 11-2 0V8a1 1 0 011-1zm0 8a1.25 1.25 0 110 2.5A1.25 1.25 0 0112 15z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n {title}\n </h2>\n {onHide && (\n <button\n onClick={onHide}\n className=\"text-gray-400 hover:text-gray-600 transition-colors shrink-0\"\n aria-label=\"Close\"\n >\n ✕\n </button>\n )}\n </div>\n )}\n\n {/* Body */}\n <div className=\"flex-1 overflow-y-auto px-3.5 py-3\">{children}</div>\n\n {/* Footer */}\n {isButtonsRequired && (\n <div className=\"px-6 py-3 bg-gray-100 flex justify-end space-x-3 rounded-b-md\">\n {onHide && (\n <button\n onClick={onHide}\n className=\"px-4 py-2 bg-white rounded-md font-semibold text-[14px] hover:bg-gray-50 transition-colors\"\n >\n Cancel\n </button>\n )}\n <button\n onClick={handleConfirmation}\n disabled={isLoading}\n className={[\n \"px-4 py-2 text-white rounded-md text-[14px] font-semibold\",\n \"disabled:opacity-50 disabled:cursor-not-allowed transition-colors\",\n isWarning\n ? \"bg-red-600 hover:bg-red-700\"\n : \"bg-basePurple hover:bg-basePurple/80\",\n ].join(\" \")}\n >\n {isLoading ? (\n <span className=\"inline-flex items-center gap-2\">\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n {handleConfirmationBtnText}\n </span>\n ) : (\n handleConfirmationBtnText\n )}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { useState } from \"react\";\n\n/**\n * useState backed by localStorage — syncs value on mount and persists on change.\n */\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === \"undefined\") return initialValue;\n try {\n const item = window.localStorage.getItem(key);\n return item ? (JSON.parse(item) as T) : initialValue;\n } catch {\n return initialValue;\n }\n });\n\n const setValue = (value: T | ((prev: T) => T)) => {\n try {\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n if (typeof window !== \"undefined\") {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to set \"${key}\"`, error);\n }\n };\n\n const remove = () => {\n try {\n setStoredValue(initialValue);\n if (typeof window !== \"undefined\") {\n window.localStorage.removeItem(key);\n }\n } catch (error) {\n console.warn(`useLocalStorage: failed to remove \"${key}\"`, error);\n }\n };\n\n return [storedValue, setValue, remove] as const;\n}\n","/**\n * Merges class names, filtering out falsy values.\n * Lightweight alternative to clsx for simple use cases.\n */\nexport function cn(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n"]}
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-100:oklch(96.2% .044 156.743);--color-green-800:oklch(44.8% .119 151.328);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-800:oklch(42.4% .199 265.638);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.z-999{z-index:999}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.max-h-\[95vh\]{max-height:95vh}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-\[95\%\]{width:95%}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-400{border-color:var(--color-red-400)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800\/50{background-color:#1e293980}@supports (color:color-mix(in lab, red, red)){.bg-gray-800\/50{background-color:color-mix(in oklab, var(--color-gray-800) 50%, transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[14px\]{font-size:14px}.text-\[17px\]{font-size:17px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-800{color:var(--color-blue-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}@media (hover:hover){.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\:ring-gray-300:focus{--tw-ring-color:var(--color-gray-300)}.focus\:ring-gray-400:focus{--tw-ring-color:var(--color-gray-400)}.focus\:ring-red-300:focus{--tw-ring-color:var(--color-red-300)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{background-color:var(--color-gray-50)}.disabled\:text-gray-500:disabled{color:var(--color-gray-500)}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:48rem){.md\:w-\[60\%\]{width:60%}}@media (min-width:64rem){.lg\:w-\[30\%\]{width:30%}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-100:oklch(96.2% .044 156.743);--color-green-800:oklch(44.8% .119 151.328);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-800:oklch(42.4% .199 265.638);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-basePurple:#534f8f}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.z-999{z-index:999}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.max-h-\[95vh\]{max-height:95vh}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-\[95\%\]{width:95%}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-400{border-color:var(--color-red-400)}.bg-basePurple{background-color:var(--color-basePurple)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800\/50{background-color:#1e293980}@supports (color:color-mix(in lab, red, red)){.bg-gray-800\/50{background-color:color-mix(in oklab, var(--color-gray-800) 50%, transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[14px\]{font-size:14px}.text-\[17px\]{font-size:17px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-800{color:var(--color-blue-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}@media (hover:hover){.hover\:bg-basePurple\/80:hover{background-color:#534f8fcc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-basePurple\/80:hover{background-color:color-mix(in oklab, var(--color-basePurple) 80%, transparent)}}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-basePurple\/50:focus{--tw-ring-color:#534f8f80}@supports (color:color-mix(in lab, red, red)){.focus\:ring-basePurple\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-basePurple) 50%, transparent)}}.focus\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\:ring-gray-300:focus{--tw-ring-color:var(--color-gray-300)}.focus\:ring-gray-400:focus{--tw-ring-color:var(--color-gray-400)}.focus\:ring-red-300:focus{--tw-ring-color:var(--color-red-300)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{background-color:var(--color-gray-50)}.disabled\:text-gray-500:disabled{color:var(--color-gray-500)}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:48rem){.md\:w-\[60\%\]{width:60%}}@media (min-width:64rem){.lg\:w-\[30\%\]{width:30%}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seekho/ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Seekho internal UI component library",
5
5
  "keywords": [
6
6
  "seekho",