@dynamic-labs-sdk/droplet 1.12.2 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/components/code-block/code-block.stories.d.ts +1 -1
  2. package/dist/components/code-block/code-block.stories.d.ts.map +1 -1
  3. package/dist/components/copy-button/copy-button.stories.d.ts +1 -1
  4. package/dist/components/copy-button/copy-button.stories.d.ts.map +1 -1
  5. package/dist/components/danger-zone/danger-zone.stories.d.ts +1 -1
  6. package/dist/components/danger-zone/danger-zone.stories.d.ts.map +1 -1
  7. package/dist/components/domain-list/domain-list.stories.d.ts +1 -1
  8. package/dist/components/domain-list/domain-list.stories.d.ts.map +1 -1
  9. package/dist/components/empty-state/empty-state.stories.d.ts +1 -1
  10. package/dist/components/empty-state/empty-state.stories.d.ts.map +1 -1
  11. package/dist/components/info-banner/info-banner.stories.d.ts +1 -1
  12. package/dist/components/info-banner/info-banner.stories.d.ts.map +1 -1
  13. package/dist/components/metric-card/metric-card.stories.d.ts +1 -1
  14. package/dist/components/metric-card/metric-card.stories.d.ts.map +1 -1
  15. package/dist/components/migration/banner/banner.stories.d.ts +1 -1
  16. package/dist/components/migration/banner/banner.stories.d.ts.map +1 -1
  17. package/dist/components/migration/double-section/double-section.stories.d.ts +1 -1
  18. package/dist/components/migration/double-section/double-section.stories.d.ts.map +1 -1
  19. package/dist/components/migration/field/field.stories.d.ts +1 -1
  20. package/dist/components/migration/field/field.stories.d.ts.map +1 -1
  21. package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts +1 -1
  22. package/dist/components/migration/settings-section-v2/settings-section-v2.stories.d.ts.map +1 -1
  23. package/dist/components/migration/sub-section/sub-section.stories.d.ts +1 -1
  24. package/dist/components/migration/sub-section/sub-section.stories.d.ts.map +1 -1
  25. package/dist/components/migration/toggle-group/toggle-group.stories.d.ts +1 -1
  26. package/dist/components/migration/toggle-group/toggle-group.stories.d.ts.map +1 -1
  27. package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts +1 -1
  28. package/dist/components/patterns/config-tab-with-pill/config-tab-with-pill.stories.d.ts.map +1 -1
  29. package/dist/components/patterns/cors-list/cors-list.stories.d.ts +1 -1
  30. package/dist/components/patterns/cors-list/cors-list.stories.d.ts.map +1 -1
  31. package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts +1 -1
  32. package/dist/components/patterns/rounded-row-list/rounded-row-list.stories.d.ts.map +1 -1
  33. package/dist/components/patterns/save-in-modal/save-in-modal.stories.d.ts +1 -1
  34. package/dist/components/patterns/save-in-modal/save-in-modal.stories.d.ts.map +1 -1
  35. package/dist/components/patterns/stat-card-grid/stat-card-grid.stories.d.ts +1 -1
  36. package/dist/components/patterns/stat-card-grid/stat-card-grid.stories.d.ts.map +1 -1
  37. package/dist/components/product-page-layout/product-page-layout.stories.d.ts +1 -1
  38. package/dist/components/product-page-layout/product-page-layout.stories.d.ts.map +1 -1
  39. package/dist/components/settings-section/settings-section.stories.d.ts +1 -1
  40. package/dist/components/settings-section/settings-section.stories.d.ts.map +1 -1
  41. package/dist/components/status-badge/status-badge.stories.d.ts +1 -1
  42. package/dist/components/status-badge/status-badge.stories.d.ts.map +1 -1
  43. package/dist/components/toggle-card/toggle-card.stories.d.ts +1 -1
  44. package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -1
  45. package/dist/components/toggle-row/toggle-row.stories.d.ts +1 -1
  46. package/dist/components/toggle-row/toggle-row.stories.d.ts.map +1 -1
  47. package/dist/components/tokens/colors/colors.stories.d.ts +1 -1
  48. package/dist/components/tokens/colors/colors.stories.d.ts.map +1 -1
  49. package/dist/components/tokens/radius/radius.stories.d.ts +1 -1
  50. package/dist/components/tokens/radius/radius.stories.d.ts.map +1 -1
  51. package/dist/components/tokens/shadows/shadows.stories.d.ts +1 -1
  52. package/dist/components/tokens/shadows/shadows.stories.d.ts.map +1 -1
  53. package/dist/components/tokens/spacing/spacing.stories.d.ts +1 -1
  54. package/dist/components/tokens/spacing/spacing.stories.d.ts.map +1 -1
  55. package/dist/components/tokens/typography/typography.stories.d.ts +1 -1
  56. package/dist/components/tokens/typography/typography.stories.d.ts.map +1 -1
  57. package/dist/components/ui/alert-dialog/alert-dialog.stories.d.ts +1 -1
  58. package/dist/components/ui/alert-dialog/alert-dialog.stories.d.ts.map +1 -1
  59. package/dist/components/ui/avatar/avatar.stories.d.ts +1 -1
  60. package/dist/components/ui/avatar/avatar.stories.d.ts.map +1 -1
  61. package/dist/components/ui/badge/badge.stories.d.ts +1 -1
  62. package/dist/components/ui/badge/badge.stories.d.ts.map +1 -1
  63. package/dist/components/ui/button/button.d.ts +7 -0
  64. package/dist/components/ui/button/button.d.ts.map +1 -1
  65. package/dist/components/ui/button/button.stories.d.ts +1 -1
  66. package/dist/components/ui/button/button.stories.d.ts.map +1 -1
  67. package/dist/components/ui/card/card.stories.d.ts +1 -1
  68. package/dist/components/ui/card/card.stories.d.ts.map +1 -1
  69. package/dist/components/ui/checkbox/checkbox.stories.d.ts +1 -1
  70. package/dist/components/ui/checkbox/checkbox.stories.d.ts.map +1 -1
  71. package/dist/components/ui/collapsible/collapsible.stories.d.ts +1 -1
  72. package/dist/components/ui/collapsible/collapsible.stories.d.ts.map +1 -1
  73. package/dist/components/ui/dialog/dialog.d.ts +6 -0
  74. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  75. package/dist/components/ui/dialog/dialog.stories.d.ts +1 -1
  76. package/dist/components/ui/dialog/dialog.stories.d.ts.map +1 -1
  77. package/dist/components/ui/dropdown-menu/dropdown-menu.stories.d.ts +1 -1
  78. package/dist/components/ui/dropdown-menu/dropdown-menu.stories.d.ts.map +1 -1
  79. package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts +1 -1
  80. package/dist/components/ui/flush-card-detach/flush-card-detach.stories.d.ts.map +1 -1
  81. package/dist/components/ui/input/input.stories.d.ts +1 -1
  82. package/dist/components/ui/input/input.stories.d.ts.map +1 -1
  83. package/dist/components/ui/label/label.stories.d.ts +1 -1
  84. package/dist/components/ui/label/label.stories.d.ts.map +1 -1
  85. package/dist/components/ui/popover/popover.stories.d.ts +1 -1
  86. package/dist/components/ui/popover/popover.stories.d.ts.map +1 -1
  87. package/dist/components/ui/progress/progress.stories.d.ts +1 -1
  88. package/dist/components/ui/progress/progress.stories.d.ts.map +1 -1
  89. package/dist/components/ui/radio-group/radio-group.stories.d.ts +1 -1
  90. package/dist/components/ui/radio-group/radio-group.stories.d.ts.map +1 -1
  91. package/dist/components/ui/select/select.stories.d.ts +1 -1
  92. package/dist/components/ui/select/select.stories.d.ts.map +1 -1
  93. package/dist/components/ui/selectable-card/selectable-card.stories.d.ts +1 -1
  94. package/dist/components/ui/selectable-card/selectable-card.stories.d.ts.map +1 -1
  95. package/dist/components/ui/separator/separator.stories.d.ts +1 -1
  96. package/dist/components/ui/separator/separator.stories.d.ts.map +1 -1
  97. package/dist/components/ui/sheet/sheet.stories.d.ts +1 -1
  98. package/dist/components/ui/sheet/sheet.stories.d.ts.map +1 -1
  99. package/dist/components/ui/skeleton/skeleton.stories.d.ts +1 -1
  100. package/dist/components/ui/skeleton/skeleton.stories.d.ts.map +1 -1
  101. package/dist/components/ui/spinner/spinner.stories.d.ts +1 -1
  102. package/dist/components/ui/spinner/spinner.stories.d.ts.map +1 -1
  103. package/dist/components/ui/switch/switch.stories.d.ts +1 -1
  104. package/dist/components/ui/switch/switch.stories.d.ts.map +1 -1
  105. package/dist/components/ui/table/table.stories.d.ts +1 -1
  106. package/dist/components/ui/table/table.stories.d.ts.map +1 -1
  107. package/dist/components/ui/tabs/tabs.stories.d.ts +1 -1
  108. package/dist/components/ui/tabs/tabs.stories.d.ts.map +1 -1
  109. package/dist/components/ui/textarea/textarea.stories.d.ts +1 -1
  110. package/dist/components/ui/textarea/textarea.stories.d.ts.map +1 -1
  111. package/dist/components/ui/tooltip/tooltip.stories.d.ts +1 -1
  112. package/dist/components/ui/tooltip/tooltip.stories.d.ts.map +1 -1
  113. package/dist/components/ui/well/well.stories.d.ts +1 -1
  114. package/dist/components/ui/well/well.stories.d.ts.map +1 -1
  115. package/dist/components/unsaved-changes-bar/unsaved-changes-bar.stories.d.ts +1 -1
  116. package/dist/components/unsaved-changes-bar/unsaved-changes-bar.stories.d.ts.map +1 -1
  117. package/dist/index.cjs +7 -1
  118. package/dist/index.cjs.map +1 -1
  119. package/dist/index.esm.js +7 -1
  120. package/dist/index.esm.js.map +1 -1
  121. package/dist/migration.cjs +1 -1
  122. package/dist/migration.esm.js +1 -1
  123. package/dist/{toggle-row-7lfPUutt.cjs → toggle-row-B7XCm0Z-.cjs} +8 -1
  124. package/dist/toggle-row-B7XCm0Z-.cjs.map +1 -0
  125. package/dist/{toggle-row-B5iXNWCJ.esm.js → toggle-row-C-B8HtY0.esm.js} +8 -1
  126. package/dist/toggle-row-C-B8HtY0.esm.js.map +1 -0
  127. package/package.json +7 -6
  128. package/dist/toggle-row-7lfPUutt.cjs.map +0 -1
  129. package/dist/toggle-row-B5iXNWCJ.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const require_toggle_row = require('./toggle-row-7lfPUutt.cjs');
1
+ const require_toggle_row = require('./toggle-row-B7XCm0Z-.cjs');
2
2
  const require_index = require('./index.cjs');
3
3
  let react = require("react");
4
4
  let _hugeicons_react = require("@hugeicons/react");
@@ -1,4 +1,4 @@
1
- import { i as Input, r as Label, s as cn, t as ToggleRow } from "./toggle-row-B5iXNWCJ.esm.js";
1
+ import { i as Input, r as Label, s as cn, t as ToggleRow } from "./toggle-row-C-B8HtY0.esm.js";
2
2
  import { useId, useState } from "react";
3
3
  import { HugeiconsIcon } from "@hugeicons/react";
4
4
  import { AiMagicIcon, Alert01Icon, Cancel01Icon, CheckmarkCircle02Icon, InformationCircleIcon } from "@hugeicons/core-free-icons";
@@ -42,6 +42,13 @@ const buttonVariants = (0, class_variance_authority.cva)("relative isolate inlin
42
42
  }
43
43
  }
44
44
  });
45
+ /**
46
+ * Primary clickable action button.
47
+ *
48
+ * Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.
49
+ * Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.
50
+ * Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.
51
+ */
45
52
  const Button = ({ className, variant = "default", size = "default", asChild = false, ...props }) => {
46
53
  if (asChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
47
54
  "data-slot": "button",
@@ -317,4 +324,4 @@ Object.defineProperty(exports, 'cn', {
317
324
  return cn;
318
325
  }
319
326
  });
320
- //# sourceMappingURL=toggle-row-7lfPUutt.cjs.map
327
+ //# sourceMappingURL=toggle-row-B7XCm0Z-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-row-B7XCm0Z-.cjs","names":["Slot","shaderDefaults: Required<ShaderBorderConfig>","AnimatePresence","motion","PulsingBorder","Root","Root","Thumb","HugeiconsIcon","Setting07Icon"],"sources":["../src/lib/utils.ts","../src/components/ui/button/button.tsx","../src/components/ui/input/input.tsx","../src/components/ui/label/label.tsx","../src/components/ui/switch/switch.tsx","../src/components/toggle-row/toggle-row.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));\n","import { type ComponentProps } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n \"relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease active:scale-[0.96] cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n {\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default: \"rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon\": 'size-9 rounded-md',\n \"icon-sm\": \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[6px] before:content-['']\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[9px] before:content-['']\",\n lg: \"rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']\",\n xs: \"rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default:\n 'bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]',\n destructive:\n 'bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n ghost:\n 'text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]',\n link: 'text-(--action) underline-offset-4 hover:underline',\n outline:\n 'bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n secondary:\n 'bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n },\n },\n },\n);\n\n/**\n * Primary clickable action button.\n *\n * Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.\n * Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.\n * Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.\n */\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) => {\n if (asChild) {\n return (\n <Slot\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n }\n\n return (\n <button\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n};\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport type { ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { PulsingBorder } from '@paper-design/shaders-react';\n\nimport { cn } from '../../../lib/utils';\n\ntype ShaderBorderConfig = {\n bloom?: number;\n colors?: string[];\n inset?: number;\n intensity?: number;\n pulse?: number;\n roundness?: number;\n scale?: number;\n smoke?: number;\n smokeSize?: number;\n softness?: number;\n speed?: number;\n spotSize?: number;\n spots?: number;\n thickness?: number;\n};\n\nconst shaderDefaults: Required<ShaderBorderConfig> = {\n bloom: 0,\n colors: ['#BDDCFF', '#57A7FF', '#DEEAFC'],\n inset: 1,\n intensity: 0,\n pulse: 0.3,\n roundness: 0.6,\n scale: 1,\n smoke: 0.75,\n smokeSize: 0.7,\n softness: 0.6,\n speed: 2.2,\n spots: 8,\n spotSize: 0.75,\n thickness: 0.04,\n};\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype InputProps = ComponentProps<'input'> & {\n shaderBorder?: boolean | ShaderBorderConfig;\n};\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, shaderBorder, style, ...props }, ref) => {\n const prefersReducedMotion = useReducedMotion();\n const inputClassName = cn(\n 'file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_rgba(0,114,239,0.15)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]',\n className,\n );\n\n const isActive = !!shaderBorder;\n const config =\n typeof shaderBorder === 'object'\n ? { ...shaderDefaults, ...shaderBorder }\n : shaderDefaults;\n const inset = config.inset;\n\n if (shaderBorder !== undefined) {\n return (\n <div className='relative'>\n <AnimatePresence initial={false}>\n {isActive && (\n <motion.div\n key='shader-border'\n initial={prefersReducedMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={prefersReducedMotion ? { duration: 0 } : spring}\n className='absolute pointer-events-none z-20'\n style={{\n borderRadius: `${8 + inset}px`,\n inset: `-${inset}px`,\n willChange: 'opacity',\n }}\n >\n <PulsingBorder\n colorBack='#00000000'\n colors={config.colors}\n speed={config.speed}\n scale={config.scale}\n roundness={config.roundness}\n thickness={config.thickness}\n softness={config.softness}\n intensity={config.intensity}\n bloom={config.bloom}\n spots={config.spots}\n spotSize={config.spotSize}\n pulse={config.pulse}\n smoke={config.smoke}\n smokeSize={config.smokeSize}\n webGlContextAttributes={{\n alpha: true,\n premultipliedAlpha: true,\n }}\n className='size-full'\n style={{ borderRadius: `${8 + inset}px` }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={cn(\n inputClassName,\n isActive && 'animate-shimmer motion-reduce:animate-none',\n )}\n style={\n isActive\n ? {\n backgroundClip: 'text',\n backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,\n backgroundSize: '200% 100%',\n boxShadow: 'none',\n color: 'transparent',\n WebkitBackgroundClip: 'text',\n ...style,\n }\n : style\n }\n {...props}\n />\n </div>\n );\n }\n\n return (\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={inputClassName}\n style={style}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\nexport type { ShaderBorderConfig };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nconst Label = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = Root.displayName;\n\nexport { Label };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\nimport { Root, Thumb } from '@radix-ui/react-switch';\n\nimport { cn } from '../../../lib/utils';\n\nconst Switch = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & {\n size?: 'sm' | 'default';\n }\n>(({ className, size = 'default', ...props }, ref) => (\n <Root\n ref={ref}\n data-slot='switch'\n data-size={size}\n className={cn(\n \"peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[0_0_0_1px_rgba(31,41,55,0.20),0_1px_2px_0_rgba(0,0,0,0.06),0_0_1px_0_rgba(0,0,0,0.02)] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.15),0_1px_2px_0_rgba(0,0,0,0.20),0_0_1px_0_rgba(0,0,0,0.06)] data-[state=checked]:shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_rgba(255,255,255,0.15)_inset,0px_2px_3px_0px_rgba(31,41,55,0.30),0px_1px_1px_0px_rgba(0,0,0,0.28)] dark:data-[state=checked]:shadow-[0px_1px_1px_0px_rgba(255,255,255,0.10)_inset,0px_2px_3px_0px_rgba(0,0,0,0.50),0px_1px_1px_0px_rgba(0,0,0,0.30)] transition-[color,background-color,box-shadow] duration-200 ease outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[13px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n \"bg-background dark:data-[state=checked]:bg-white dark:data-[state=unchecked]:bg-[oklch(0.500_0.013_253)] pointer-events-none block rounded-full shadow-[0_2px_2px_-1px_rgba(0,0,0,0.06),0_0_0_1px_rgba(0,0,0,0.06),0_4px_4px_-2px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_2px_-1px_rgba(0,0,0,0.20),0_0_0_1px_rgba(0,0,0,0.15),0_4px_4px_-2px_rgba(0,0,0,0.15)] ring-0 transition-[transform,background-color] duration-150 ease group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5 data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]\",\n )}\n />\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client'\n\nimport { type ReactNode, useId } from 'react'\nimport { HugeiconsIcon } from '@hugeicons/react'\nimport { Setting07Icon } from '@hugeicons/core-free-icons'\n\nimport { Switch } from '../ui/switch'\nimport { Button } from '../ui/button'\nimport { cn } from '../../lib/utils'\n\nexport interface ToggleRowProps {\n badge?: ReactNode,\n checked: boolean,\n children?: ReactNode,\n className?: string,\n description?: string,\n disabled?: boolean,\n icon?: ReactNode\n label: string,\n onCheckedChange: (checked: boolean) => void,\n onSettings?: () => void,\n switchPosition?: 'left' | 'right'\n}\n\nexport const ToggleRow = ({\n label,\n description,\n checked,\n onCheckedChange,\n disabled = false,\n switchPosition = 'left',\n icon,\n badge,\n onSettings,\n children,\n className,\n}: ToggleRowProps) => {\n const switchId = useId()\n const descId = useId()\n\n const cursorClass = disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n\n if (switchPosition === 'left') {\n return (\n <div className={className}>\n <div className={cn('flex items-start gap-2.5 touch-manipulation group/toggle')}>\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n className='mt-0.5'\n />\n {icon && (\n <label\n htmlFor={switchId}\n className={cn('text-muted-foreground shrink-0 self-start', cursorClass)}\n >\n {icon}\n </label>\n )}\n <div className='flex-1 min-w-0'>\n <div className='flex items-center gap-2'>\n <label\n htmlFor={switchId}\n className={cn(\n 'font-medium select-none',\n disabled && 'text-muted-foreground',\n cursorClass\n )}\n >\n {label}\n </label>\n {badge}\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-1 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n </div>\n {children}\n </div>\n )\n }\n\n // switchPosition === \"right\"\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <div className='flex items-center justify-between gap-4'>\n <label\n htmlFor={switchId}\n className={cn('text-sm font-medium select-none', cursorClass)}\n >\n {label}\n </label>\n <div className='flex items-center gap-2 shrink-0'>\n {onSettings && checked && (\n <Button\n variant='ghost'\n size='icon-xs'\n onClick={onSettings}\n className='text-muted-foreground hover:text-foreground'\n aria-label='Configure'\n >\n <HugeiconsIcon icon={Setting07Icon} size={14} />\n </Button>\n )}\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n />\n </div>\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-0.5 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n {checked && children && children}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,sDAAsC,OAAO,CAAC;;;;ACGpE,MAAM,mDACJ,mkBACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,WAAW;GACX,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,SAAS;GACP,SACE;GACF,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;GACH;EACF;CACF,CACF;;;;;;;;AASD,MAAM,UAAU,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,YAIG;AACN,KAAI,QACF,QACE,2CAACA;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;GAAS,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,mBAAmB,OACrB,QACE,4CAAC;EAAe;aACd,4CAAC;GAAI,WAAW,GAAG,2DAA2D;;IAC5E,2CAAC;KACC,IAAI;KACJ,oBAAkB,cAAc,SAAS;KAChC;KACQ;KACP;KACV,WAAU;MACV;IACD,QACC,2CAAC;KACC,SAAS;KACT,WAAW,GAAG,6CAA6C,YAAY;eAEtE;MACK;IAEV,4CAAC;KAAI,WAAU;gBACb,4CAAC;MAAI,WAAU;iBACb,2CAAC;OACC,SAAS;OACT,WAAW,GACT,2BACA,YAAY,yBACZ,YACD;iBAEA;QACK,EACP;OACG,EACL,eACC,2CAAC;MACC,SAAS;MACT,IAAI;MACJ,WAAW,GACT,gFACA,YACD;gBAEA;OACK;MAEN;;IACF,EACL;GACG;AAKV,QACE,4CAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,4CAAC,oBACC,4CAAC;GAAI,WAAU;cACb,2CAAC;IACC,SAAS;IACT,WAAW,GAAG,mCAAmC,YAAY;cAE5D;KACK,EACR,4CAAC;IAAI,WAAU;eACZ,cAAc,WACb,2CAAC;KACC,SAAQ;KACR,MAAK;KACL,SAAS;KACT,WAAU;KACV,cAAW;eAEX,2CAACC;MAAc,MAAMC;MAAe,MAAM;OAAM;MACzC,EAEX,2CAAC;KACC,IAAI;KACJ,oBAAkB,cAAc,SAAS;KAChC;KACQ;KACP;MACV;KACE;IACF,EACL,eACC,2CAAC;GACC,SAAS;GACT,IAAI;GACJ,WAAW,GACT,kFACA,YACD;aAEA;IACK,IAEN,EACL,WAAW,YAAY;GACpB"}
@@ -41,6 +41,13 @@ const buttonVariants = cva("relative isolate inline-flex items-center justify-ce
41
41
  }
42
42
  }
43
43
  });
44
+ /**
45
+ * Primary clickable action button.
46
+ *
47
+ * Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.
48
+ * Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.
49
+ * Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.
50
+ */
44
51
  const Button = ({ className, variant = "default", size = "default", asChild = false, ...props }) => {
45
52
  if (asChild) return /* @__PURE__ */ jsx(Slot, {
46
53
  "data-slot": "button",
@@ -275,4 +282,4 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
275
282
 
276
283
  //#endregion
277
284
  export { Button as a, Input as i, Switch as n, buttonVariants as o, Label as r, cn as s, ToggleRow as t };
278
- //# sourceMappingURL=toggle-row-B5iXNWCJ.esm.js.map
285
+ //# sourceMappingURL=toggle-row-C-B8HtY0.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-row-C-B8HtY0.esm.js","names":["shaderDefaults: Required<ShaderBorderConfig>","Root"],"sources":["../src/lib/utils.ts","../src/components/ui/button/button.tsx","../src/components/ui/input/input.tsx","../src/components/ui/label/label.tsx","../src/components/ui/switch/switch.tsx","../src/components/toggle-row/toggle-row.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));\n","import { type ComponentProps } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n \"relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease active:scale-[0.96] cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n {\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default: \"rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon\": 'size-9 rounded-md',\n \"icon-sm\": \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[6px] before:content-['']\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[9px] before:content-['']\",\n lg: \"rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']\",\n xs: \"rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default:\n 'bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]',\n destructive:\n 'bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n ghost:\n 'text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]',\n link: 'text-(--action) underline-offset-4 hover:underline',\n outline:\n 'bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n secondary:\n 'bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n },\n },\n },\n);\n\n/**\n * Primary clickable action button.\n *\n * Variants: `default` | `destructive` | `outline` | `secondary` | `ghost` | `link`.\n * Sizes: `default` | `sm` | `xs` | `lg` | `icon` | `icon-sm` | `icon-xs`.\n * Set `asChild` to render the button styles onto a child element (e.g. an anchor) instead of a `<button>`.\n */\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) => {\n if (asChild) {\n return (\n <Slot\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n }\n\n return (\n <button\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n};\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport type { ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { PulsingBorder } from '@paper-design/shaders-react';\n\nimport { cn } from '../../../lib/utils';\n\ntype ShaderBorderConfig = {\n bloom?: number;\n colors?: string[];\n inset?: number;\n intensity?: number;\n pulse?: number;\n roundness?: number;\n scale?: number;\n smoke?: number;\n smokeSize?: number;\n softness?: number;\n speed?: number;\n spotSize?: number;\n spots?: number;\n thickness?: number;\n};\n\nconst shaderDefaults: Required<ShaderBorderConfig> = {\n bloom: 0,\n colors: ['#BDDCFF', '#57A7FF', '#DEEAFC'],\n inset: 1,\n intensity: 0,\n pulse: 0.3,\n roundness: 0.6,\n scale: 1,\n smoke: 0.75,\n smokeSize: 0.7,\n softness: 0.6,\n speed: 2.2,\n spots: 8,\n spotSize: 0.75,\n thickness: 0.04,\n};\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype InputProps = ComponentProps<'input'> & {\n shaderBorder?: boolean | ShaderBorderConfig;\n};\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, shaderBorder, style, ...props }, ref) => {\n const prefersReducedMotion = useReducedMotion();\n const inputClassName = cn(\n 'file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_rgba(0,114,239,0.15)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]',\n className,\n );\n\n const isActive = !!shaderBorder;\n const config =\n typeof shaderBorder === 'object'\n ? { ...shaderDefaults, ...shaderBorder }\n : shaderDefaults;\n const inset = config.inset;\n\n if (shaderBorder !== undefined) {\n return (\n <div className='relative'>\n <AnimatePresence initial={false}>\n {isActive && (\n <motion.div\n key='shader-border'\n initial={prefersReducedMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={prefersReducedMotion ? { duration: 0 } : spring}\n className='absolute pointer-events-none z-20'\n style={{\n borderRadius: `${8 + inset}px`,\n inset: `-${inset}px`,\n willChange: 'opacity',\n }}\n >\n <PulsingBorder\n colorBack='#00000000'\n colors={config.colors}\n speed={config.speed}\n scale={config.scale}\n roundness={config.roundness}\n thickness={config.thickness}\n softness={config.softness}\n intensity={config.intensity}\n bloom={config.bloom}\n spots={config.spots}\n spotSize={config.spotSize}\n pulse={config.pulse}\n smoke={config.smoke}\n smokeSize={config.smokeSize}\n webGlContextAttributes={{\n alpha: true,\n premultipliedAlpha: true,\n }}\n className='size-full'\n style={{ borderRadius: `${8 + inset}px` }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={cn(\n inputClassName,\n isActive && 'animate-shimmer motion-reduce:animate-none',\n )}\n style={\n isActive\n ? {\n backgroundClip: 'text',\n backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,\n backgroundSize: '200% 100%',\n boxShadow: 'none',\n color: 'transparent',\n WebkitBackgroundClip: 'text',\n ...style,\n }\n : style\n }\n {...props}\n />\n </div>\n );\n }\n\n return (\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={inputClassName}\n style={style}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\nexport type { ShaderBorderConfig };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nconst Label = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = Root.displayName;\n\nexport { Label };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\nimport { Root, Thumb } from '@radix-ui/react-switch';\n\nimport { cn } from '../../../lib/utils';\n\nconst Switch = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & {\n size?: 'sm' | 'default';\n }\n>(({ className, size = 'default', ...props }, ref) => (\n <Root\n ref={ref}\n data-slot='switch'\n data-size={size}\n className={cn(\n \"peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[0_0_0_1px_rgba(31,41,55,0.20),0_1px_2px_0_rgba(0,0,0,0.06),0_0_1px_0_rgba(0,0,0,0.02)] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.15),0_1px_2px_0_rgba(0,0,0,0.20),0_0_1px_0_rgba(0,0,0,0.06)] data-[state=checked]:shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_rgba(255,255,255,0.15)_inset,0px_2px_3px_0px_rgba(31,41,55,0.30),0px_1px_1px_0px_rgba(0,0,0,0.28)] dark:data-[state=checked]:shadow-[0px_1px_1px_0px_rgba(255,255,255,0.10)_inset,0px_2px_3px_0px_rgba(0,0,0,0.50),0px_1px_1px_0px_rgba(0,0,0,0.30)] transition-[color,background-color,box-shadow] duration-200 ease outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[13px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n \"bg-background dark:data-[state=checked]:bg-white dark:data-[state=unchecked]:bg-[oklch(0.500_0.013_253)] pointer-events-none block rounded-full shadow-[0_2px_2px_-1px_rgba(0,0,0,0.06),0_0_0_1px_rgba(0,0,0,0.06),0_4px_4px_-2px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_2px_-1px_rgba(0,0,0,0.20),0_0_0_1px_rgba(0,0,0,0.15),0_4px_4px_-2px_rgba(0,0,0,0.15)] ring-0 transition-[transform,background-color] duration-150 ease group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5 data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]\",\n )}\n />\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client'\n\nimport { type ReactNode, useId } from 'react'\nimport { HugeiconsIcon } from '@hugeicons/react'\nimport { Setting07Icon } from '@hugeicons/core-free-icons'\n\nimport { Switch } from '../ui/switch'\nimport { Button } from '../ui/button'\nimport { cn } from '../../lib/utils'\n\nexport interface ToggleRowProps {\n badge?: ReactNode,\n checked: boolean,\n children?: ReactNode,\n className?: string,\n description?: string,\n disabled?: boolean,\n icon?: ReactNode\n label: string,\n onCheckedChange: (checked: boolean) => void,\n onSettings?: () => void,\n switchPosition?: 'left' | 'right'\n}\n\nexport const ToggleRow = ({\n label,\n description,\n checked,\n onCheckedChange,\n disabled = false,\n switchPosition = 'left',\n icon,\n badge,\n onSettings,\n children,\n className,\n}: ToggleRowProps) => {\n const switchId = useId()\n const descId = useId()\n\n const cursorClass = disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n\n if (switchPosition === 'left') {\n return (\n <div className={className}>\n <div className={cn('flex items-start gap-2.5 touch-manipulation group/toggle')}>\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n className='mt-0.5'\n />\n {icon && (\n <label\n htmlFor={switchId}\n className={cn('text-muted-foreground shrink-0 self-start', cursorClass)}\n >\n {icon}\n </label>\n )}\n <div className='flex-1 min-w-0'>\n <div className='flex items-center gap-2'>\n <label\n htmlFor={switchId}\n className={cn(\n 'font-medium select-none',\n disabled && 'text-muted-foreground',\n cursorClass\n )}\n >\n {label}\n </label>\n {badge}\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-1 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n </div>\n {children}\n </div>\n )\n }\n\n // switchPosition === \"right\"\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <div className='flex items-center justify-between gap-4'>\n <label\n htmlFor={switchId}\n className={cn('text-sm font-medium select-none', cursorClass)}\n >\n {label}\n </label>\n <div className='flex items-center gap-2 shrink-0'>\n {onSettings && checked && (\n <Button\n variant='ghost'\n size='icon-xs'\n onClick={onSettings}\n className='text-muted-foreground hover:text-foreground'\n aria-label='Configure'\n >\n <HugeiconsIcon icon={Setting07Icon} size={14} />\n </Button>\n )}\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n />\n </div>\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-0.5 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n {checked && children && children}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,WAAyB,QAAQ,KAAK,OAAO,CAAC;;;;ACGpE,MAAM,iBAAiB,IACrB,mkBACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,WAAW;GACX,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,SAAS;GACP,SACE;GACF,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;GACH;EACF;CACF,CACF;;;;;;;;AASD,MAAM,UAAU,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,YAIG;AACN,KAAI,QACF,QACE,oBAAC;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;GAAS,CAAC,CAAC;EAC3D,GAAI;GACJ;AAIN,QACE,oBAAC;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;GAAS,CAAC,CAAC;EAC3D,GAAI;GACJ;;;;;A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;KACQ;KACP;KACV,WAAU;MACV;IACD,QACC,oBAAC;KACC,SAAS;KACT,WAAW,GAAG,6CAA6C,YAAY;eAEtE;MACK;IAEV,qBAAC;KAAI,WAAU;gBACb,qBAAC;MAAI,WAAU;iBACb,oBAAC;OACC,SAAS;OACT,WAAW,GACT,2BACA,YAAY,yBACZ,YACD;iBAEA;QACK,EACP;OACG,EACL,eACC,oBAAC;MACC,SAAS;MACT,IAAI;MACJ,WAAW,GACT,gFACA,YACD;gBAEA;OACK;MAEN;;IACF,EACL;GACG;AAKV,QACE,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,qBAAC,oBACC,qBAAC;GAAI,WAAU;cACb,oBAAC;IACC,SAAS;IACT,WAAW,GAAG,mCAAmC,YAAY;cAE5D;KACK,EACR,qBAAC;IAAI,WAAU;eACZ,cAAc,WACb,oBAAC;KACC,SAAQ;KACR,MAAK;KACL,SAAS;KACT,WAAU;KACV,cAAW;eAEX,oBAAC;MAAc,MAAM;MAAe,MAAM;OAAM;MACzC,EAEX,oBAAC;KACC,IAAI;KACJ,oBAAkB,cAAc,SAAS;KAChC;KACQ;KACP;MACV;KACE;IACF,EACL,eACC,oBAAC;GACC,SAAS;GACT,IAAI;GACJ,WAAW,GACT,kFACA,YACD;aAEA;IACK,IAEN,EACL,WAAW,YAAY;GACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs-sdk/droplet",
3
- "version": "1.12.2",
3
+ "version": "1.13.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -58,19 +58,20 @@
58
58
  "tw-animate-css": "1.3.4"
59
59
  },
60
60
  "devDependencies": {
61
+ "@storybook/addon-a11y": "10.4.1",
62
+ "@storybook/addon-docs": "10.4.1",
63
+ "@storybook/addon-mcp": "0.6.0",
64
+ "@storybook/react-vite": "10.4.1",
61
65
  "@tailwindcss/vite": "4.1.10",
62
- "@storybook/addon-a11y": "8.6.17",
63
- "@storybook/addon-docs": "8.6.17",
64
- "@storybook/addon-toolbars": "8.6.17",
65
- "@storybook/react-vite": "8.6.17",
66
66
  "@testing-library/jest-dom": "6.5.0",
67
67
  "@testing-library/react": "16.3.2",
68
68
  "@testing-library/user-event": "14.0.0",
69
69
  "@types/react": "19.2.14",
70
70
  "@types/react-dom": "19.2.3",
71
+ "eslint-plugin-storybook": "10.4.1",
71
72
  "react": "19.1.0",
72
73
  "react-dom": "19.1.0",
73
- "storybook": "8.6.17",
74
+ "storybook": "10.4.1",
74
75
  "tailwindcss": "4.1.10",
75
76
  "tsdown": "*",
76
77
  "typescript": "~5.7.2",
@@ -1 +0,0 @@
1
- {"version":3,"file":"toggle-row-7lfPUutt.cjs","names":["Slot","shaderDefaults: Required<ShaderBorderConfig>","AnimatePresence","motion","PulsingBorder","Root","Root","Thumb","HugeiconsIcon","Setting07Icon"],"sources":["../src/lib/utils.ts","../src/components/ui/button/button.tsx","../src/components/ui/input/input.tsx","../src/components/ui/label/label.tsx","../src/components/ui/switch/switch.tsx","../src/components/toggle-row/toggle-row.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));\n","import { type ComponentProps } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n \"relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease active:scale-[0.96] cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n {\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default: \"rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon\": 'size-9 rounded-md',\n \"icon-sm\": \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[6px] before:content-['']\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[9px] before:content-['']\",\n lg: \"rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']\",\n xs: \"rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default:\n 'bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]',\n destructive:\n 'bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n ghost:\n 'text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]',\n link: 'text-(--action) underline-offset-4 hover:underline',\n outline:\n 'bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n secondary:\n 'bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n },\n },\n },\n);\n\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) => {\n if (asChild) {\n return (\n <Slot\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n }\n\n return (\n <button\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n};\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport type { ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { PulsingBorder } from '@paper-design/shaders-react';\n\nimport { cn } from '../../../lib/utils';\n\ntype ShaderBorderConfig = {\n bloom?: number;\n colors?: string[];\n inset?: number;\n intensity?: number;\n pulse?: number;\n roundness?: number;\n scale?: number;\n smoke?: number;\n smokeSize?: number;\n softness?: number;\n speed?: number;\n spotSize?: number;\n spots?: number;\n thickness?: number;\n};\n\nconst shaderDefaults: Required<ShaderBorderConfig> = {\n bloom: 0,\n colors: ['#BDDCFF', '#57A7FF', '#DEEAFC'],\n inset: 1,\n intensity: 0,\n pulse: 0.3,\n roundness: 0.6,\n scale: 1,\n smoke: 0.75,\n smokeSize: 0.7,\n softness: 0.6,\n speed: 2.2,\n spots: 8,\n spotSize: 0.75,\n thickness: 0.04,\n};\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype InputProps = ComponentProps<'input'> & {\n shaderBorder?: boolean | ShaderBorderConfig;\n};\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, shaderBorder, style, ...props }, ref) => {\n const prefersReducedMotion = useReducedMotion();\n const inputClassName = cn(\n 'file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_rgba(0,114,239,0.15)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]',\n className,\n );\n\n const isActive = !!shaderBorder;\n const config =\n typeof shaderBorder === 'object'\n ? { ...shaderDefaults, ...shaderBorder }\n : shaderDefaults;\n const inset = config.inset;\n\n if (shaderBorder !== undefined) {\n return (\n <div className='relative'>\n <AnimatePresence initial={false}>\n {isActive && (\n <motion.div\n key='shader-border'\n initial={prefersReducedMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={prefersReducedMotion ? { duration: 0 } : spring}\n className='absolute pointer-events-none z-20'\n style={{\n borderRadius: `${8 + inset}px`,\n inset: `-${inset}px`,\n willChange: 'opacity',\n }}\n >\n <PulsingBorder\n colorBack='#00000000'\n colors={config.colors}\n speed={config.speed}\n scale={config.scale}\n roundness={config.roundness}\n thickness={config.thickness}\n softness={config.softness}\n intensity={config.intensity}\n bloom={config.bloom}\n spots={config.spots}\n spotSize={config.spotSize}\n pulse={config.pulse}\n smoke={config.smoke}\n smokeSize={config.smokeSize}\n webGlContextAttributes={{\n alpha: true,\n premultipliedAlpha: true,\n }}\n className='size-full'\n style={{ borderRadius: `${8 + inset}px` }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={cn(\n inputClassName,\n isActive && 'animate-shimmer motion-reduce:animate-none',\n )}\n style={\n isActive\n ? {\n backgroundClip: 'text',\n backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,\n backgroundSize: '200% 100%',\n boxShadow: 'none',\n color: 'transparent',\n WebkitBackgroundClip: 'text',\n ...style,\n }\n : style\n }\n {...props}\n />\n </div>\n );\n }\n\n return (\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={inputClassName}\n style={style}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\nexport type { ShaderBorderConfig };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nconst Label = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = Root.displayName;\n\nexport { Label };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\nimport { Root, Thumb } from '@radix-ui/react-switch';\n\nimport { cn } from '../../../lib/utils';\n\nconst Switch = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & {\n size?: 'sm' | 'default';\n }\n>(({ className, size = 'default', ...props }, ref) => (\n <Root\n ref={ref}\n data-slot='switch'\n data-size={size}\n className={cn(\n \"peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[0_0_0_1px_rgba(31,41,55,0.20),0_1px_2px_0_rgba(0,0,0,0.06),0_0_1px_0_rgba(0,0,0,0.02)] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.15),0_1px_2px_0_rgba(0,0,0,0.20),0_0_1px_0_rgba(0,0,0,0.06)] data-[state=checked]:shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_rgba(255,255,255,0.15)_inset,0px_2px_3px_0px_rgba(31,41,55,0.30),0px_1px_1px_0px_rgba(0,0,0,0.28)] dark:data-[state=checked]:shadow-[0px_1px_1px_0px_rgba(255,255,255,0.10)_inset,0px_2px_3px_0px_rgba(0,0,0,0.50),0px_1px_1px_0px_rgba(0,0,0,0.30)] transition-[color,background-color,box-shadow] duration-200 ease outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[13px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n \"bg-background dark:data-[state=checked]:bg-white dark:data-[state=unchecked]:bg-[oklch(0.500_0.013_253)] pointer-events-none block rounded-full shadow-[0_2px_2px_-1px_rgba(0,0,0,0.06),0_0_0_1px_rgba(0,0,0,0.06),0_4px_4px_-2px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_2px_-1px_rgba(0,0,0,0.20),0_0_0_1px_rgba(0,0,0,0.15),0_4px_4px_-2px_rgba(0,0,0,0.15)] ring-0 transition-[transform,background-color] duration-150 ease group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5 data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]\",\n )}\n />\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client'\n\nimport { type ReactNode, useId } from 'react'\nimport { HugeiconsIcon } from '@hugeicons/react'\nimport { Setting07Icon } from '@hugeicons/core-free-icons'\n\nimport { Switch } from '../ui/switch'\nimport { Button } from '../ui/button'\nimport { cn } from '../../lib/utils'\n\nexport interface ToggleRowProps {\n badge?: ReactNode,\n checked: boolean,\n children?: ReactNode,\n className?: string,\n description?: string,\n disabled?: boolean,\n icon?: ReactNode\n label: string,\n onCheckedChange: (checked: boolean) => void,\n onSettings?: () => void,\n switchPosition?: 'left' | 'right'\n}\n\nexport const ToggleRow = ({\n label,\n description,\n checked,\n onCheckedChange,\n disabled = false,\n switchPosition = 'left',\n icon,\n badge,\n onSettings,\n children,\n className,\n}: ToggleRowProps) => {\n const switchId = useId()\n const descId = useId()\n\n const cursorClass = disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n\n if (switchPosition === 'left') {\n return (\n <div className={className}>\n <div className={cn('flex items-start gap-2.5 touch-manipulation group/toggle')}>\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n className='mt-0.5'\n />\n {icon && (\n <label\n htmlFor={switchId}\n className={cn('text-muted-foreground shrink-0 self-start', cursorClass)}\n >\n {icon}\n </label>\n )}\n <div className='flex-1 min-w-0'>\n <div className='flex items-center gap-2'>\n <label\n htmlFor={switchId}\n className={cn(\n 'font-medium select-none',\n disabled && 'text-muted-foreground',\n cursorClass\n )}\n >\n {label}\n </label>\n {badge}\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-1 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n </div>\n {children}\n </div>\n )\n }\n\n // switchPosition === \"right\"\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <div className='flex items-center justify-between gap-4'>\n <label\n htmlFor={switchId}\n className={cn('text-sm font-medium select-none', cursorClass)}\n >\n {label}\n </label>\n <div className='flex items-center gap-2 shrink-0'>\n {onSettings && checked && (\n <Button\n variant='ghost'\n size='icon-xs'\n onClick={onSettings}\n className='text-muted-foreground hover:text-foreground'\n aria-label='Configure'\n >\n <HugeiconsIcon icon={Setting07Icon} size={14} />\n </Button>\n )}\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n />\n </div>\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-0.5 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n {checked && children && children}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,sDAAsC,OAAO,CAAC;;;;ACGpE,MAAM,mDACJ,mkBACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,WAAW;GACX,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,SAAS;GACP,SACE;GACF,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;GACH;EACF;CACF,CACF;AAED,MAAM,UAAU,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,YAIG;AACN,KAAI,QACF,QACE,2CAACA;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;GAAS,CAAC,CAAC;EAC3D,GAAI;GACJ;AAIN,QACE,2CAAC;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;GAAS,CAAC,CAAC;EAC3D,GAAI;GACJ;;;;;AC3CN,MAAMC,iBAA+C;CACnD,OAAO;CACP,QAAQ;EAAC;EAAW;EAAW;EAAU;CACzC,OAAO;CACP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U;gBACb,4CAAC;MAAI,WAAU;iBACb,2CAAC;OACC,SAAS;OACT,WAAW,GACT,2BACA,YAAY,yBACZ,YACD;iBAEA;QACK,EACP;OACG,EACL,eACC,2CAAC;MACC,SAAS;MACT,IAAI;MACJ,WAAW,GACT,gFACA,YACD;gBAEA;OACK;MAEN;;IACF,EACL;GACG;AAKV,QACE,4CAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,4CAAC,oBACC,4CAAC;GAAI,WAAU;cACb,2CAAC;IACC,SAAS;IACT,WAAW,GAAG,mCAAmC,YAAY;cAE5D;KACK,EACR,4CAAC;IAAI,WAAU;eACZ,cAAc,WACb,2CAAC;KACC,SAAQ;KACR,MAAK;KACL,SAAS;KACT,WAAU;KACV,cAAW;eAEX,2CAACC;MAAc,MAAMC;MAAe,MAAM;OAAM;MACzC,EAEX,2CAAC;KACC,IAAI;KACJ,oBAAkB,cAAc,SAAS;KAChC;KACQ;KACP;MACV;KACE;IACF,EACL,eACC,2CAAC;GACC,SAAS;GACT,IAAI;GACJ,WAAW,GACT,kFACA,YACD;aAEA;IACK,IAEN,EACL,WAAW,YAAY;GACpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toggle-row-B5iXNWCJ.esm.js","names":["shaderDefaults: Required<ShaderBorderConfig>","Root"],"sources":["../src/lib/utils.ts","../src/components/ui/button/button.tsx","../src/components/ui/input/input.tsx","../src/components/ui/label/label.tsx","../src/components/ui/switch/switch.tsx","../src/components/toggle-row/toggle-row.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));\n","import { type ComponentProps } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n \"relative isolate inline-flex items-center justify-center gap-1.5 whitespace-nowrap select-none text-[13px] font-medium leading-[calc(18/13)] touch-manipulation transition-[background-color,color,opacity,box-shadow,transform,filter,scale] duration-150 ease active:scale-[0.96] cursor-pointer border-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n {\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default: \"rounded-md px-3 py-1.5 h-8 has-[>svg]:px-2.5 [&_svg:not([class*='size-'])]:size-3.5\",\n \"icon\": 'size-9 rounded-md',\n \"icon-sm\": \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[6px] before:content-['']\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[9px] before:content-['']\",\n lg: \"rounded-md px-5 py-2.5 h-10 has-[>svg]:px-4 [&_svg:not([class*='size-'])]:size-4\",\n sm: \"rounded-md px-2.5 py-1 h-7 has-[>svg]:px-2 [&_svg:not([class*='size-'])]:size-3 before:absolute before:-inset-y-[6px] before:inset-x-0 before:content-['']\",\n xs: \"rounded-md px-3 py-1 h-7 [&_svg:not([class*='size-'])]:size-3\",\n },\n variant: {\n default:\n 'bg-(--action) text-white shadow-[0_0_0_1px_var(--action),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)]',\n destructive:\n 'bg-destructive text-white shadow-[0_0_0_1px_var(--destructive),var(--shadow-button)] hover:brightness-105 [text-shadow:0_1px_1px_rgba(0,0,0,0.16)] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n ghost:\n 'text-muted-foreground hover:bg-[#f8f8f9] hover:text-foreground dark:hover:bg-white/[0.06]',\n link: 'text-(--action) underline-offset-4 hover:underline',\n outline:\n 'bg-white shadow-[var(--shadow-input)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-input-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n secondary:\n 'bg-white shadow-[var(--shadow-secondary)] hover:bg-[#f8f8f9] hover:shadow-[var(--shadow-secondary-hover)] dark:bg-input/30 dark:hover:bg-white/[0.06]',\n },\n },\n },\n);\n\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) => {\n if (asChild) {\n return (\n <Slot\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n }\n\n return (\n <button\n data-slot='button'\n data-size={size}\n data-variant={variant}\n className={cn(buttonVariants({ className, size, variant }))}\n {...props}\n />\n );\n};\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport type { ComponentProps } from 'react';\nimport { forwardRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { PulsingBorder } from '@paper-design/shaders-react';\n\nimport { cn } from '../../../lib/utils';\n\ntype ShaderBorderConfig = {\n bloom?: number;\n colors?: string[];\n inset?: number;\n intensity?: number;\n pulse?: number;\n roundness?: number;\n scale?: number;\n smoke?: number;\n smokeSize?: number;\n softness?: number;\n speed?: number;\n spotSize?: number;\n spots?: number;\n thickness?: number;\n};\n\nconst shaderDefaults: Required<ShaderBorderConfig> = {\n bloom: 0,\n colors: ['#BDDCFF', '#57A7FF', '#DEEAFC'],\n inset: 1,\n intensity: 0,\n pulse: 0.3,\n roundness: 0.6,\n scale: 1,\n smoke: 0.75,\n smokeSize: 0.7,\n softness: 0.6,\n speed: 2.2,\n spots: 8,\n spotSize: 0.75,\n thickness: 0.04,\n};\n\nconst spring = { bounce: 0, duration: 0.35, type: 'spring' as const };\n\ntype InputProps = ComponentProps<'input'> & {\n shaderBorder?: boolean | ShaderBorderConfig;\n};\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, shaderBorder, style, ...props }, ref) => {\n const prefersReducedMotion = useReducedMotion();\n const inputClassName = cn(\n 'file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground dark:bg-input/30 h-8 w-full min-w-0 touch-manipulation rounded-md border-0 bg-background px-3 py-1 text-base shadow-[var(--shadow-input)] transition-[color,box-shadow] duration-100 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'hover:shadow-[var(--shadow-input-hover)]',\n 'focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_rgba(0,114,239,0.15)]',\n 'aria-invalid:shadow-[0_0_0_1px_var(--destructive),0_0_1px_0_var(--destructive)] dark:aria-invalid:shadow-[0_0_0_1px_var(--destructive)]',\n className,\n );\n\n const isActive = !!shaderBorder;\n const config =\n typeof shaderBorder === 'object'\n ? { ...shaderDefaults, ...shaderBorder }\n : shaderDefaults;\n const inset = config.inset;\n\n if (shaderBorder !== undefined) {\n return (\n <div className='relative'>\n <AnimatePresence initial={false}>\n {isActive && (\n <motion.div\n key='shader-border'\n initial={prefersReducedMotion ? false : { opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={prefersReducedMotion ? { duration: 0 } : spring}\n className='absolute pointer-events-none z-20'\n style={{\n borderRadius: `${8 + inset}px`,\n inset: `-${inset}px`,\n willChange: 'opacity',\n }}\n >\n <PulsingBorder\n colorBack='#00000000'\n colors={config.colors}\n speed={config.speed}\n scale={config.scale}\n roundness={config.roundness}\n thickness={config.thickness}\n softness={config.softness}\n intensity={config.intensity}\n bloom={config.bloom}\n spots={config.spots}\n spotSize={config.spotSize}\n pulse={config.pulse}\n smoke={config.smoke}\n smokeSize={config.smokeSize}\n webGlContextAttributes={{\n alpha: true,\n premultipliedAlpha: true,\n }}\n className='size-full'\n style={{ borderRadius: `${8 + inset}px` }}\n />\n </motion.div>\n )}\n </AnimatePresence>\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={cn(\n inputClassName,\n isActive && 'animate-shimmer motion-reduce:animate-none',\n )}\n style={\n isActive\n ? {\n backgroundClip: 'text',\n backgroundImage: `linear-gradient(to right, color-mix(in srgb, ${config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[1] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[2] || config.colors[0]} 70%, #000), color-mix(in srgb, ${config.colors[0]} 70%, #000))`,\n backgroundSize: '200% 100%',\n boxShadow: 'none',\n color: 'transparent',\n WebkitBackgroundClip: 'text',\n ...style,\n }\n : style\n }\n {...props}\n />\n </div>\n );\n }\n\n return (\n <input\n ref={ref}\n type={type}\n data-slot='input'\n className={inputClassName}\n style={style}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\nexport type { ShaderBorderConfig };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef} from 'react';\nimport { forwardRef } from 'react';\nimport { Root } from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nconst Label = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = Root.displayName;\n\nexport { Label };\n","'use client';\n\nimport type { ComponentPropsWithoutRef, ComponentRef } from 'react';\nimport { forwardRef } from 'react';\nimport { Root, Thumb } from '@radix-ui/react-switch';\n\nimport { cn } from '../../../lib/utils';\n\nconst Switch = forwardRef<\n ComponentRef<typeof Root>,\n ComponentPropsWithoutRef<typeof Root> & {\n size?: 'sm' | 'default';\n }\n>(({ className, size = 'default', ...props }, ref) => (\n <Root\n ref={ref}\n data-slot='switch'\n data-size={size}\n className={cn(\n \"peer data-[state=checked]:bg-(--action) data-[state=unchecked]:bg-input hover:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.14)] focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 dark:hover:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] dark:group-hover/toggle:data-[state=unchecked]:bg-[rgba(255,255,255,0.12)] relative group/switch inline-flex shrink-0 touch-manipulation items-center rounded-full border-0 shadow-[0_0_0_1px_rgba(31,41,55,0.20),0_1px_2px_0_rgba(0,0,0,0.06),0_0_1px_0_rgba(0,0,0,0.02)] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.15),0_1px_2px_0_rgba(0,0,0,0.20),0_0_1px_0_rgba(0,0,0,0.06)] data-[state=checked]:shadow-[0_0_0_1px_var(--action),0px_1px_1px_0px_rgba(255,255,255,0.15)_inset,0px_2px_3px_0px_rgba(31,41,55,0.30),0px_1px_1px_0px_rgba(0,0,0,0.28)] dark:data-[state=checked]:shadow-[0px_1px_1px_0px_rgba(255,255,255,0.10)_inset,0px_2px_3px_0px_rgba(0,0,0,0.50),0px_1px_1px_0px_rgba(0,0,0,0.30)] transition-[color,background-color,box-shadow] duration-200 ease outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer data-[size=default]:h-[18px] data-[size=default]:w-[30px] data-[size=sm]:h-3.5 data-[size=sm]:w-[22px] before:absolute before:-inset-[13px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n \"bg-background dark:data-[state=checked]:bg-white dark:data-[state=unchecked]:bg-[oklch(0.500_0.013_253)] pointer-events-none block rounded-full shadow-[0_2px_2px_-1px_rgba(0,0,0,0.06),0_0_0_1px_rgba(0,0,0,0.06),0_4px_4px_-2px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_2px_-1px_rgba(0,0,0,0.20),0_0_0_1px_rgba(0,0,0,0.15),0_4px_4px_-2px_rgba(0,0,0,0.15)] ring-0 transition-[transform,background-color] duration-150 ease group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5 data-[state=unchecked]:translate-x-0.5 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px]\",\n )}\n />\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client'\n\nimport { type ReactNode, useId } from 'react'\nimport { HugeiconsIcon } from '@hugeicons/react'\nimport { Setting07Icon } from '@hugeicons/core-free-icons'\n\nimport { Switch } from '../ui/switch'\nimport { Button } from '../ui/button'\nimport { cn } from '../../lib/utils'\n\nexport interface ToggleRowProps {\n badge?: ReactNode,\n checked: boolean,\n children?: ReactNode,\n className?: string,\n description?: string,\n disabled?: boolean,\n icon?: ReactNode\n label: string,\n onCheckedChange: (checked: boolean) => void,\n onSettings?: () => void,\n switchPosition?: 'left' | 'right'\n}\n\nexport const ToggleRow = ({\n label,\n description,\n checked,\n onCheckedChange,\n disabled = false,\n switchPosition = 'left',\n icon,\n badge,\n onSettings,\n children,\n className,\n}: ToggleRowProps) => {\n const switchId = useId()\n const descId = useId()\n\n const cursorClass = disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n\n if (switchPosition === 'left') {\n return (\n <div className={className}>\n <div className={cn('flex items-start gap-2.5 touch-manipulation group/toggle')}>\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n className='mt-0.5'\n />\n {icon && (\n <label\n htmlFor={switchId}\n className={cn('text-muted-foreground shrink-0 self-start', cursorClass)}\n >\n {icon}\n </label>\n )}\n <div className='flex-1 min-w-0'>\n <div className='flex items-center gap-2'>\n <label\n htmlFor={switchId}\n className={cn(\n 'font-medium select-none',\n disabled && 'text-muted-foreground',\n cursorClass\n )}\n >\n {label}\n </label>\n {badge}\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-1 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n </div>\n {children}\n </div>\n )\n }\n\n // switchPosition === \"right\"\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <div className='flex items-center justify-between gap-4'>\n <label\n htmlFor={switchId}\n className={cn('text-sm font-medium select-none', cursorClass)}\n >\n {label}\n </label>\n <div className='flex items-center gap-2 shrink-0'>\n {onSettings && checked && (\n <Button\n variant='ghost'\n size='icon-xs'\n onClick={onSettings}\n className='text-muted-foreground hover:text-foreground'\n aria-label='Configure'\n >\n <HugeiconsIcon icon={Setting07Icon} size={14} />\n </Button>\n )}\n <Switch\n id={switchId}\n aria-describedby={description ? descId : undefined}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n />\n </div>\n </div>\n {description && (\n <label\n htmlFor={switchId}\n id={descId}\n className={cn(\n 'block text-sm font-normal text-muted-foreground mt-0.5 text-pretty select-none',\n cursorClass\n )}\n >\n {description}\n </label>\n )}\n </div>\n {checked && children && children}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,WAAyB,QAAQ,KAAK,OAAO,CAAC;;;;ACGpE,MAAM,iBAAiB,IACrB,mkBACA;CACE,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,WAAW;GACX,WAAW;GACX,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,SAAS;GACP,SACE;GACF,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;GACH;EACF;CACF,CACF;AAED,MAAM,UAAU,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,YAIG;AACN,KAAI,QACF,QACE,oBAAC;EACC,aAAU;EACV,aAAW;EACX,gBAAc;EACd,WAAW,GAAG,eAAe;GAAE;GAAW;GAAM;G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