@dynamic-labs-sdk/droplet 1.49.1 → 1.51.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.
- package/dist/components/copy-button/copy-button.d.ts +3 -1
- package/dist/components/copy-button/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button/copy-button.stories.d.ts +1 -1
- package/dist/components/empty-state/empty-state.d.ts +3 -3
- package/dist/components/empty-state/empty-state.d.ts.map +1 -1
- package/dist/components/migration/field/field.d.ts.map +1 -1
- package/dist/components/status-badge/status-badge.d.ts.map +1 -1
- package/dist/components/tab-navigation/tab-navigation.d.ts.map +1 -1
- package/dist/components/toggle-card/toggle-card.d.ts +10 -0
- package/dist/components/toggle-card/toggle-card.d.ts.map +1 -1
- package/dist/components/toggle-card/toggle-card.stories.d.ts +5 -0
- package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -1
- package/dist/components/toggle-row/toggle-row.d.ts +22 -1
- package/dist/components/toggle-row/toggle-row.d.ts.map +1 -1
- package/dist/components/toggle-row/toggle-row.stories.d.ts +10 -6
- package/dist/components/toggle-row/toggle-row.stories.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +54 -12
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts +12 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts.map +1 -1
- package/dist/components/ui/data-table/create-column-helper.d.ts +20 -0
- package/dist/components/ui/data-table/create-column-helper.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-active-filters.d.ts +37 -0
- package/dist/components/ui/data-table/data-table-active-filters.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-column-filter.d.ts +48 -0
- package/dist/components/ui/data-table/data-table-column-filter.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-column-visibility.d.ts +37 -0
- package/dist/components/ui/data-table/data-table-column-visibility.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-content.d.ts +43 -0
- package/dist/components/ui/data-table/data-table-content.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +13 -0
- package/dist/components/ui/data-table/data-table-context.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-pagination.d.ts +38 -0
- package/dist/components/ui/data-table/data-table-pagination.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts +21 -0
- package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-rows.d.ts +22 -0
- package/dist/components/ui/data-table/data-table-rows.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-search.d.ts +40 -0
- package/dist/components/ui/data-table/data-table-search.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.d.ts +56 -0
- package/dist/components/ui/data-table/data-table.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.stories.d.ts +32 -0
- package/dist/components/ui/data-table/data-table.stories.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.types.d.ts +189 -0
- package/dist/components/ui/data-table/data-table.types.d.ts.map +1 -0
- package/dist/components/ui/data-table/expand-chevron.d.ts +7 -0
- package/dist/components/ui/data-table/expand-chevron.d.ts.map +1 -0
- package/dist/components/ui/data-table/get-column-label.d.ts +7 -0
- package/dist/components/ui/data-table/get-column-label.d.ts.map +1 -0
- package/dist/components/ui/data-table/get-pinned-cell-props.d.ts +15 -0
- package/dist/components/ui/data-table/get-pinned-cell-props.d.ts.map +1 -0
- package/dist/components/ui/data-table/selection-column.d.ts +24 -0
- package/dist/components/ui/data-table/selection-column.d.ts.map +1 -0
- package/dist/components/ui/data-table/use-data-table.d.ts +157 -0
- package/dist/components/ui/data-table/use-data-table.d.ts.map +1 -0
- package/dist/components/ui/field/field-control-context.d.ts +20 -0
- package/dist/components/ui/field/field-control-context.d.ts.map +1 -0
- package/dist/components/ui/field/field.d.ts +20 -4
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.stories.d.ts +18 -6
- package/dist/components/ui/field/field.stories.d.ts.map +1 -1
- package/dist/components/ui/label/label.d.ts +15 -0
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/pagination/pagination.d.ts +2 -2
- package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.stories.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts +7 -3
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/table/table.stories.d.ts +3 -1
- package/dist/components/ui/table/table.stories.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +3 -1
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/index.cjs +1722 -247
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1714 -251
- package/dist/index.esm.js.map +1 -1
- package/dist/migration.cjs +1 -1
- package/dist/migration.cjs.map +1 -1
- package/dist/migration.esm.js +1 -1
- package/dist/migration.esm.js.map +1 -1
- package/dist/{toggle-row-PqelNVXI.esm.js → toggle-row-CeiCy3Aa.esm.js} +33 -8
- package/dist/toggle-row-CeiCy3Aa.esm.js.map +1 -0
- package/dist/{toggle-row-BBTk7_bT.cjs → toggle-row-DcV81G3w.cjs} +33 -8
- package/dist/toggle-row-DcV81G3w.cjs.map +1 -0
- package/package.json +3 -1
- package/src/styles/globals.css +54 -15
- package/dist/toggle-row-BBTk7_bT.cjs.map +0 -1
- package/dist/toggle-row-PqelNVXI.esm.js.map +0 -1
package/dist/migration.cjs
CHANGED
package/dist/migration.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration.cjs","names":["variantStyles: Record<BannerVariant, VariantStyle>","variantIcons: Record<BannerVariant, typeof Alert01Icon>","AiMagicIcon","Alert01Icon","InformationCircleIcon","CheckmarkCircle02Icon","cn","HugeiconsIcon","Cancel01Icon","cn","describedBy: string | undefined","cn","Label","Input","cn","cn","cn","ToggleRow"],"sources":["../src/components/migration/banner/banner.tsx","../src/components/migration/double-section/double-section.tsx","../src/components/migration/field/field.tsx","../src/components/migration/settings-section-v2/settings-section-v2.tsx","../src/components/migration/sub-section/sub-section.tsx","../src/components/migration/toggle-group/toggle-group.tsx"],"sourcesContent":["/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport {\n AiMagicIcon,\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type BannerVariant =\n | 'info'\n | 'warning'\n | 'error'\n | 'success'\n | 'advance';\n\nexport type BannerProps = {\n action?: { onClick: () => void; text: string };\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n variant?: BannerVariant;\n};\n\ntype VariantStyle = { bg: string; iconColor: string; text: string };\n\nconst variantStyles: Record<BannerVariant, VariantStyle> = {\n advance: {\n bg: 'bg-brand-light border-border-focused/20',\n iconColor: 'text-brand-default',\n text: 'text-brand-accented',\n },\n error: {\n bg: 'bg-danger-light border-border-danger/20',\n iconColor: 'text-danger-default',\n text: 'text-text-danger',\n },\n info: {\n bg: 'bg-bg-default border-border-divider',\n iconColor: 'text-muted-foreground',\n text: 'text-muted-foreground',\n },\n success: {\n bg: 'bg-success-light border-border-success/20',\n iconColor: 'text-success-default',\n text: 'text-text-success',\n },\n warning: {\n bg: 'bg-warning-light border-border-warning/20',\n iconColor: 'text-warning-default',\n text: 'text-text-warning',\n },\n};\n\nconst variantIcons: Record<BannerVariant, typeof Alert01Icon> = {\n advance: AiMagicIcon,\n error: Alert01Icon,\n info: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n};\n\n/**\n * 5-variant banner: `info` | `warning` | `error` | `success` | `advance`.\n * Inline icon + text + optional action button + optional close.\n *\n * Distinct from the canonical single-variant `InfoBanner`. The canonical\n * replacement may simply extend `InfoBanner` with semantic variants.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Banner = ({\n action,\n children,\n className,\n dismissible = false,\n onDismiss,\n variant = 'info',\n}: BannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n\n const handleDismiss = () => {\n setDismissed(true);\n onDismiss?.();\n };\n\n if (dismissed) return null;\n\n const styles = variantStyles[variant];\n const icon = variantIcons[variant];\n\n return (\n <output\n className={cn(\n 'flex items-center gap-2.5 rounded-lg border px-3 py-2 text-sm',\n styles.bg,\n styles.text,\n className\n )}\n >\n <span className={cn('shrink-0', styles.iconColor)}>\n <HugeiconsIcon icon={icon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty font-medium\">{children}</div>\n {action && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className={cn(\n 'shrink-0 px-2 py-1 rounded-md text-xs font-medium cursor-pointer touch-manipulation',\n 'hover:bg-overlay-hover transition-colors',\n styles.text\n )}\n >\n {action.text}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n onClick={handleDismiss}\n aria-label=\"Dismiss\"\n className={cn(\n 'shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 cursor-pointer transition-opacity',\n styles.text\n )}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n )}\n </output>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SectionItem = {\n badge?: ReactNode;\n children: ReactNode;\n description?: string;\n id: string;\n title: ReactNode;\n};\n\nexport type DoubleSectionProps = {\n className?: string;\n sections: [SectionItem, SectionItem];\n};\n\n/**\n * Two `SettingsSection`-like blocks side by side with a divider between them.\n * Common use case: \"Live mode | Sandbox mode\" pairs.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const DoubleSection = ({\n className,\n sections,\n}: DoubleSectionProps): ReactElement => (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card shadow-[var(--shadow-card)] overflow-hidden',\n 'grid grid-cols-1 md:grid-cols-2 md:divide-x md:divide-border-divider',\n className\n )}\n >\n {sections.map((section) => (\n <div key={section.id} className=\"p-6 space-y-4\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-sm font-semibold text-balance\">\n {section.title}\n </h3>\n {section.badge}\n </div>\n {section.description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {section.description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{section.children}</div>\n </div>\n ))}\n </section>\n);\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../../ui/input';\nimport { Label } from '../../ui/label';\n\nexport type FieldProps = Omit<ComponentProps<'input'>, 'children'> & {\n className?: string;\n error?: string;\n helper?: ReactNode;\n label: string;\n required?: boolean;\n};\n\n/**\n * `Label` + `Input` + helper/error composite. Wires up `htmlFor`,\n * `aria-describedby`, and `aria-invalid` so call sites don't repeat the layout.\n *\n * The canonical version may differ in form-validation integration (RHF,\n * formik, native form, etc.) — keep this composite focused on layout only.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Field = ({\n className,\n error,\n helper,\n label,\n required,\n id: idProp,\n ...inputProps\n}: FieldProps): ReactElement => {\n const reactId = useId();\n const id = idProp || reactId;\n const helperId = `${id}-helper`;\n const errorId = `${id}-error`;\n\n const showHelper = Boolean(helper) && !error;\n const showError = Boolean(error);\n\n let describedBy: string | undefined;\n if (showError) {\n describedBy = errorId;\n } else if (showHelper) {\n describedBy = helperId;\n }\n\n return (\n <div className={cn('space-y-2', className)}>\n <Label htmlFor={id}>\n {label}\n {required && (\n <span className=\"text-text-danger\" aria-hidden>\n *\n </span>\n )}\n </Label>\n <Input\n id={id}\n aria-describedby={describedBy}\n aria-invalid={error ? true : undefined}\n required={required}\n {...inputProps}\n />\n {showHelper ? (\n <p id={helperId} className=\"text-xs text-muted-foreground\">\n {helper}\n </p>\n ) : null}\n {showError ? (\n <p id={errorId} role=\"alert\" className=\"text-xs text-text-danger\">\n {error}\n </p>\n ) : null}\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet `SettingsSection` directly instead.\n *\n * This is the redcoast-flavored variant of `SettingsSection` extended with\n * - `helpLink` (deep-link to docs)\n * - `alert` (inline alert slot in the header)\n * - `layout='split'` (opt-in 2-column variant matching Northstar's layout)\n *\n * The canonical `SettingsSection` at `../../settings-section` remains untouched\n * so its consumers don't pick up Northstar-flavored API.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SettingsSectionV2Props = {\n alert?: ReactNode;\n children: ReactNode;\n className?: string;\n description?: string;\n helpLink?: { text: string; url: string };\n layout?: 'stacked' | 'split';\n title: string;\n variant?: 'default' | 'danger';\n};\n\n/**\n * Card-shaped settings section with a header (title + optional description +\n * optional helpLink + optional alert) and a content area.\n *\n * `layout='split'` renders header on the left and content on the right (1fr\n * 2fr grid on `md+`). Default `'stacked'` matches the canonical\n * `SettingsSection`.\n *\n * `variant='danger'` tints the title red and adds a red border.\n *\n * @deprecated Migration-aid only. Replace with canonical `SettingsSection` once\n * the design team's finalized version supports `helpLink` / `alert` / split layout.\n */\nexport const SettingsSectionV2 = ({\n alert,\n children,\n className,\n description,\n helpLink,\n layout = 'stacked',\n title,\n variant = 'default',\n}: SettingsSectionV2Props): ReactElement => {\n const headerBlock = (\n <div>\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-text-danger'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n {helpLink && (\n <a\n href={helpLink.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-block text-sm font-medium text-text-link mt-2 hover:underline\"\n >\n {helpLink.text} →\n </a>\n )}\n {alert && <div className=\"mt-3\">{alert}</div>}\n </div>\n );\n\n if (layout === 'split') {\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n 'grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-6',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n {headerBlock}\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n }\n\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n <div className=\"mb-4\">{headerBlock}</div>\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SubSectionProps = {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'plain' | 'boxed';\n};\n\n/**\n * Heading + content stack, used inside an outer SettingsSection to group\n * sub-fields. Two variants:\n * - 'plain' (default): unboxed.\n * - 'boxed': thin-bordered card-within-a-card.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const SubSection = ({\n children,\n className,\n description,\n title,\n variant = 'plain',\n}: SubSectionProps): ReactElement => {\n if (variant === 'boxed') {\n return (\n <div\n className={cn(\n 'rounded-lg border border-border-divider bg-bg-bottom p-4',\n className\n )}\n >\n <div className=\"mb-3\">\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n }\n\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { ToggleRow, type ToggleRowProps } from '../../toggle-row';\nimport { cn } from '../../../lib/utils';\n\nexport type ToggleGroupProps = {\n children?: ReactNode;\n className?: string;\n /**\n * All ToggleRow props for the master row. `children` of master is ignored —\n * pass nested rows via `children` of ToggleGroup.\n */\n master: Omit<ToggleRowProps, 'children'>;\n};\n\n/**\n * Master `ToggleRow` on top, with a vertically-indented stack of nested\n * sub-toggles underneath. Sub-toggles auto-hide when the master is off.\n *\n * Used for \"social login → which providers\" and similar grouped-toggle\n * patterns ported from redcoast.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const ToggleGroup = ({\n children,\n className,\n master,\n}: ToggleGroupProps): ReactElement => {\n const showChildren = master.checked && Boolean(children);\n\n return (\n <div className={cn('space-y-3', className)}>\n <ToggleRow {...master} />\n {showChildren ? (\n <div className=\"ml-[42px] pl-4 border-l border-border-divider space-y-3\">\n {children}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAwCA,MAAMA,gBAAqD;CACzD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,OAAO;EACL,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,MAAM;EACJ,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACF;AAED,MAAMC,eAA0D;CAC9D,SAASC;CACT,OAAOC;CACP,MAAMC;CACN,SAASC;CACT,SAASF;CACV;;;;;;;;;;AAWD,MAAa,UAAU,EACrB,QACA,UACA,WACA,cAAc,OACd,WACA,UAAU,aAC4B;CACtC,MAAM,CAAC,WAAW,oCAAyB,MAAM;CAEjD,MAAM,sBAAsB;AAC1B,eAAa,KAAK;AAClB,eAAa;;AAGf,KAAI,UAAW,QAAO;CAEtB,MAAM,SAAS,cAAc;CAC7B,MAAM,OAAO,aAAa;AAE1B,QACE,4CAAC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sBAAG,aAAa,UAAU;aACxC,4CAAC,oBACC,2CAAC;GAAG,WAAU;aAAuC;IAAW,EAC/D,eACC,2CAAC;GAAE,WAAU;aACV;IACC,IAEF,EACN,2CAAC;GAAI,WAAU;GAAa;IAAe;GACvC;;;;;;;;;;;;;;;;;;;;;;ACjCV,MAAa,eAAe,EAC1B,UACA,WACA,aACoC;CACpC,MAAM,eAAe,OAAO,WAAW,QAAQ,SAAS;AAExD,QACE,4CAAC;EAAI,WAAWC,sBAAG,aAAa,UAAU;aACxC,2CAACC,gCAAU,GAAI,SAAU,EACxB,eACC,2CAAC;GAAI,WAAU;GACZ;IACG,GACJ;GACA"}
|
|
1
|
+
{"version":3,"file":"migration.cjs","names":["variantStyles: Record<BannerVariant, VariantStyle>","variantIcons: Record<BannerVariant, typeof Alert01Icon>","AiMagicIcon","Alert01Icon","InformationCircleIcon","CheckmarkCircle02Icon","cn","HugeiconsIcon","Cancel01Icon","cn","describedBy: string | undefined","cn","Label","Input","cn","cn","cn","ToggleRow"],"sources":["../src/components/migration/banner/banner.tsx","../src/components/migration/double-section/double-section.tsx","../src/components/migration/field/field.tsx","../src/components/migration/settings-section-v2/settings-section-v2.tsx","../src/components/migration/sub-section/sub-section.tsx","../src/components/migration/toggle-group/toggle-group.tsx"],"sourcesContent":["/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport {\n AiMagicIcon,\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type BannerVariant =\n | 'info'\n | 'warning'\n | 'error'\n | 'success'\n | 'advance';\n\nexport type BannerProps = {\n action?: { onClick: () => void; text: string };\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n variant?: BannerVariant;\n};\n\ntype VariantStyle = { bg: string; iconColor: string; text: string };\n\nconst variantStyles: Record<BannerVariant, VariantStyle> = {\n advance: {\n bg: 'bg-brand-light border-border-focused/20',\n iconColor: 'text-brand-default',\n text: 'text-brand-accented',\n },\n error: {\n bg: 'bg-danger-light border-border-danger/20',\n iconColor: 'text-danger-default',\n text: 'text-text-danger',\n },\n info: {\n bg: 'bg-bg-default border-border-divider',\n iconColor: 'text-muted-foreground',\n text: 'text-muted-foreground',\n },\n success: {\n bg: 'bg-success-light border-border-success/20',\n iconColor: 'text-success-default',\n text: 'text-text-success',\n },\n warning: {\n bg: 'bg-warning-light border-border-warning/20',\n iconColor: 'text-warning-default',\n text: 'text-text-warning',\n },\n};\n\nconst variantIcons: Record<BannerVariant, typeof Alert01Icon> = {\n advance: AiMagicIcon,\n error: Alert01Icon,\n info: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n};\n\n/**\n * 5-variant banner: `info` | `warning` | `error` | `success` | `advance`.\n * Inline icon + text + optional action button + optional close.\n *\n * Distinct from the canonical single-variant `InfoBanner`. The canonical\n * replacement may simply extend `InfoBanner` with semantic variants.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Banner = ({\n action,\n children,\n className,\n dismissible = false,\n onDismiss,\n variant = 'info',\n}: BannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n\n const handleDismiss = () => {\n setDismissed(true);\n onDismiss?.();\n };\n\n if (dismissed) return null;\n\n const styles = variantStyles[variant];\n const icon = variantIcons[variant];\n\n return (\n <output\n className={cn(\n 'flex items-center gap-2.5 rounded-lg border px-3 py-2 text-sm',\n styles.bg,\n styles.text,\n className\n )}\n >\n <span className={cn('shrink-0', styles.iconColor)}>\n <HugeiconsIcon icon={icon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty font-medium\">{children}</div>\n {action && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className={cn(\n 'shrink-0 px-2 py-1 rounded-md text-xs font-medium cursor-pointer touch-manipulation',\n 'hover:bg-overlay-hover transition-colors',\n styles.text\n )}\n >\n {action.text}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n onClick={handleDismiss}\n aria-label=\"Dismiss\"\n className={cn(\n 'shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 cursor-pointer transition-opacity',\n styles.text\n )}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n )}\n </output>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SectionItem = {\n badge?: ReactNode;\n children: ReactNode;\n description?: string;\n id: string;\n title: ReactNode;\n};\n\nexport type DoubleSectionProps = {\n className?: string;\n sections: [SectionItem, SectionItem];\n};\n\n/**\n * Two `SettingsSection`-like blocks side by side with a divider between them.\n * Common use case: \"Live mode | Sandbox mode\" pairs.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const DoubleSection = ({\n className,\n sections,\n}: DoubleSectionProps): ReactElement => (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card shadow-[var(--shadow-card)] overflow-hidden',\n 'grid grid-cols-1 md:grid-cols-2 md:divide-x md:divide-border-divider',\n className\n )}\n >\n {sections.map((section) => (\n <div key={section.id} className=\"p-6 space-y-4\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-sm font-semibold text-balance\">\n {section.title}\n </h3>\n {section.badge}\n </div>\n {section.description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {section.description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{section.children}</div>\n </div>\n ))}\n </section>\n);\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../../ui/input';\nimport { Label } from '../../ui/label';\n\nexport type FieldProps = Omit<ComponentProps<'input'>, 'children'> & {\n className?: string;\n error?: string;\n helper?: ReactNode;\n label: string;\n required?: boolean;\n};\n\n/**\n * `Label` + `Input` + helper/error composite. Wires up `htmlFor`,\n * `aria-describedby`, and `aria-invalid` so call sites don't repeat the layout.\n *\n * The canonical version may differ in form-validation integration (RHF,\n * formik, native form, etc.) — keep this composite focused on layout only.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Field = ({\n className,\n error,\n helper,\n label,\n required,\n id: idProp,\n ...inputProps\n}: FieldProps): ReactElement => {\n const reactId = useId();\n const id = idProp || reactId;\n const helperId = `${id}-helper`;\n const errorId = `${id}-error`;\n\n const showHelper = Boolean(helper) && !error;\n const showError = Boolean(error);\n\n let describedBy: string | undefined;\n if (showError) {\n describedBy = errorId;\n } else if (showHelper) {\n describedBy = helperId;\n }\n\n return (\n // Uniform 8px between label, input and message. The canonical `Field` uses a 10px label gap\n // and a 6px message gap instead, so swapping to it changes the spacing on purpose.\n <div className={cn('space-y-2', className)}>\n <Label htmlFor={id}>\n {label}\n {required && (\n <span className=\"text-text-danger\" aria-hidden>\n *\n </span>\n )}\n </Label>\n <Input\n id={id}\n aria-describedby={describedBy}\n aria-invalid={error ? true : undefined}\n required={required}\n {...inputProps}\n />\n {showHelper ? (\n <p id={helperId} className=\"text-xs text-muted-foreground\">\n {helper}\n </p>\n ) : null}\n {showError ? (\n <p id={errorId} role=\"alert\" className=\"text-xs text-text-danger\">\n {error}\n </p>\n ) : null}\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet `SettingsSection` directly instead.\n *\n * This is the redcoast-flavored variant of `SettingsSection` extended with\n * - `helpLink` (deep-link to docs)\n * - `alert` (inline alert slot in the header)\n * - `layout='split'` (opt-in 2-column variant matching Northstar's layout)\n *\n * The canonical `SettingsSection` at `../../settings-section` remains untouched\n * so its consumers don't pick up Northstar-flavored API.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SettingsSectionV2Props = {\n alert?: ReactNode;\n children: ReactNode;\n className?: string;\n description?: string;\n helpLink?: { text: string; url: string };\n layout?: 'stacked' | 'split';\n title: string;\n variant?: 'default' | 'danger';\n};\n\n/**\n * Card-shaped settings section with a header (title + optional description +\n * optional helpLink + optional alert) and a content area.\n *\n * `layout='split'` renders header on the left and content on the right (1fr\n * 2fr grid on `md+`). Default `'stacked'` matches the canonical\n * `SettingsSection`.\n *\n * `variant='danger'` tints the title red and adds a red border.\n *\n * @deprecated Migration-aid only. Replace with canonical `SettingsSection` once\n * the design team's finalized version supports `helpLink` / `alert` / split layout.\n */\nexport const SettingsSectionV2 = ({\n alert,\n children,\n className,\n description,\n helpLink,\n layout = 'stacked',\n title,\n variant = 'default',\n}: SettingsSectionV2Props): ReactElement => {\n const headerBlock = (\n <div>\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-text-danger'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n {helpLink && (\n <a\n href={helpLink.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-block text-sm font-medium text-text-link mt-2 hover:underline\"\n >\n {helpLink.text} →\n </a>\n )}\n {alert && <div className=\"mt-3\">{alert}</div>}\n </div>\n );\n\n if (layout === 'split') {\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n 'grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-6',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n {headerBlock}\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n }\n\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n <div className=\"mb-4\">{headerBlock}</div>\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SubSectionProps = {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'plain' | 'boxed';\n};\n\n/**\n * Heading + content stack, used inside an outer SettingsSection to group\n * sub-fields. Two variants:\n * - 'plain' (default): unboxed.\n * - 'boxed': thin-bordered card-within-a-card.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const SubSection = ({\n children,\n className,\n description,\n title,\n variant = 'plain',\n}: SubSectionProps): ReactElement => {\n if (variant === 'boxed') {\n return (\n <div\n className={cn(\n 'rounded-lg border border-border-divider bg-bg-bottom p-4',\n className\n )}\n >\n <div className=\"mb-3\">\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n }\n\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { ToggleRow, type ToggleRowProps } from '../../toggle-row';\nimport { cn } from '../../../lib/utils';\n\nexport type ToggleGroupProps = {\n children?: ReactNode;\n className?: string;\n /**\n * All ToggleRow props for the master row. `children` of master is ignored —\n * pass nested rows via `children` of ToggleGroup.\n */\n master: Omit<ToggleRowProps, 'children'>;\n};\n\n/**\n * Master `ToggleRow` on top, with a vertically-indented stack of nested\n * sub-toggles underneath. Sub-toggles auto-hide when the master is off.\n *\n * Used for \"social login → which providers\" and similar grouped-toggle\n * patterns ported from redcoast.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const ToggleGroup = ({\n children,\n className,\n master,\n}: ToggleGroupProps): ReactElement => {\n const showChildren = master.checked && Boolean(children);\n\n return (\n <div className={cn('space-y-3', className)}>\n <ToggleRow {...master} />\n {showChildren ? (\n <div className=\"ml-[42px] pl-4 border-l border-border-divider space-y-3\">\n {children}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAwCA,MAAMA,gBAAqD;CACzD,SAAS;EACP,IAAI;EACJ,WAAW;E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EACC,WAAWA,sBACT,2EACA,iDACA,YAAY,YAAY,2BACxB,UACD;aAEA,aACD,2CAAC;GAAI,WAAU;GAAa;IAAe;GACnC;AAId,QACE,4CAAC;EACC,WAAWA,sBACT,2EACA,YAAY,YAAY,2BACxB,UACD;aAED,2CAAC;GAAI,WAAU;aAAQ;IAAkB,EACzC,2CAAC;GAAI,WAAU;GAAa;IAAe;GACnC;;;;;;;;;;;;;ACjFd,MAAa,cAAc,EACzB,UACA,WACA,aACA,OACA,UAAU,cACyB;AACnC,KAAI,YAAY,QACd,QACE,4CAAC;EACC,WAAWC,sBACT,4DACA,UACD;aAED,4CAAC;GAAI,WAAU;cACb,2CAAC;IAAG,WAAU;cAAuC;KAAW,EAC/D,eACC,2CAAC;IAAE,WAAU;cACV;KACC;IAEF,EACN,2CAAC;GAAI,WAAU;GAAa;IAAe;GACvC;AAIV,QACE,4CAAC;EAAI,WAAWA,sBAAG,aAAa,UAAU;aACxC,4CAAC,oBACC,2CAAC;GAAG,WAAU;aAAuC;IAAW,EAC/D,eACC,2CAAC;GAAE,WAAU;aACV;IACC,IAEF,EACN,2CAAC;GAAI,WAAU;GAAa;IAAe;GACvC;;;;;;;;;;;;;;;;;;;;;;ACjCV,MAAa,eAAe,EAC1B,UACA,WACA,aACoC;CACpC,MAAM,eAAe,OAAO,WAAW,QAAQ,SAAS;AAExD,QACE,4CAAC;EAAI,WAAWC,sBAAG,aAAa,UAAU;aACxC,2CAACC,gCAAU,GAAI,SAAU,EACxB,eACC,2CAAC;GAAI,WAAU;GACZ;IACG,GACJ;GACA"}
|
package/dist/migration.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as cn, i as Input, r as Label, t as ToggleRow } from "./toggle-row-
|
|
1
|
+
import { c as cn, i as Input, r as Label, t as ToggleRow } from "./toggle-row-CeiCy3Aa.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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration.esm.js","names":["variantStyles: Record<BannerVariant, VariantStyle>","variantIcons: Record<BannerVariant, typeof Alert01Icon>","describedBy: string | undefined"],"sources":["../src/components/migration/banner/banner.tsx","../src/components/migration/double-section/double-section.tsx","../src/components/migration/field/field.tsx","../src/components/migration/settings-section-v2/settings-section-v2.tsx","../src/components/migration/sub-section/sub-section.tsx","../src/components/migration/toggle-group/toggle-group.tsx"],"sourcesContent":["/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport {\n AiMagicIcon,\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type BannerVariant =\n | 'info'\n | 'warning'\n | 'error'\n | 'success'\n | 'advance';\n\nexport type BannerProps = {\n action?: { onClick: () => void; text: string };\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n variant?: BannerVariant;\n};\n\ntype VariantStyle = { bg: string; iconColor: string; text: string };\n\nconst variantStyles: Record<BannerVariant, VariantStyle> = {\n advance: {\n bg: 'bg-brand-light border-border-focused/20',\n iconColor: 'text-brand-default',\n text: 'text-brand-accented',\n },\n error: {\n bg: 'bg-danger-light border-border-danger/20',\n iconColor: 'text-danger-default',\n text: 'text-text-danger',\n },\n info: {\n bg: 'bg-bg-default border-border-divider',\n iconColor: 'text-muted-foreground',\n text: 'text-muted-foreground',\n },\n success: {\n bg: 'bg-success-light border-border-success/20',\n iconColor: 'text-success-default',\n text: 'text-text-success',\n },\n warning: {\n bg: 'bg-warning-light border-border-warning/20',\n iconColor: 'text-warning-default',\n text: 'text-text-warning',\n },\n};\n\nconst variantIcons: Record<BannerVariant, typeof Alert01Icon> = {\n advance: AiMagicIcon,\n error: Alert01Icon,\n info: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n};\n\n/**\n * 5-variant banner: `info` | `warning` | `error` | `success` | `advance`.\n * Inline icon + text + optional action button + optional close.\n *\n * Distinct from the canonical single-variant `InfoBanner`. The canonical\n * replacement may simply extend `InfoBanner` with semantic variants.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Banner = ({\n action,\n children,\n className,\n dismissible = false,\n onDismiss,\n variant = 'info',\n}: BannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n\n const handleDismiss = () => {\n setDismissed(true);\n onDismiss?.();\n };\n\n if (dismissed) return null;\n\n const styles = variantStyles[variant];\n const icon = variantIcons[variant];\n\n return (\n <output\n className={cn(\n 'flex items-center gap-2.5 rounded-lg border px-3 py-2 text-sm',\n styles.bg,\n styles.text,\n className\n )}\n >\n <span className={cn('shrink-0', styles.iconColor)}>\n <HugeiconsIcon icon={icon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty font-medium\">{children}</div>\n {action && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className={cn(\n 'shrink-0 px-2 py-1 rounded-md text-xs font-medium cursor-pointer touch-manipulation',\n 'hover:bg-overlay-hover transition-colors',\n styles.text\n )}\n >\n {action.text}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n onClick={handleDismiss}\n aria-label=\"Dismiss\"\n className={cn(\n 'shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 cursor-pointer transition-opacity',\n styles.text\n )}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n )}\n </output>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SectionItem = {\n badge?: ReactNode;\n children: ReactNode;\n description?: string;\n id: string;\n title: ReactNode;\n};\n\nexport type DoubleSectionProps = {\n className?: string;\n sections: [SectionItem, SectionItem];\n};\n\n/**\n * Two `SettingsSection`-like blocks side by side with a divider between them.\n * Common use case: \"Live mode | Sandbox mode\" pairs.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const DoubleSection = ({\n className,\n sections,\n}: DoubleSectionProps): ReactElement => (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card shadow-[var(--shadow-card)] overflow-hidden',\n 'grid grid-cols-1 md:grid-cols-2 md:divide-x md:divide-border-divider',\n className\n )}\n >\n {sections.map((section) => (\n <div key={section.id} className=\"p-6 space-y-4\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-sm font-semibold text-balance\">\n {section.title}\n </h3>\n {section.badge}\n </div>\n {section.description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {section.description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{section.children}</div>\n </div>\n ))}\n </section>\n);\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../../ui/input';\nimport { Label } from '../../ui/label';\n\nexport type FieldProps = Omit<ComponentProps<'input'>, 'children'> & {\n className?: string;\n error?: string;\n helper?: ReactNode;\n label: string;\n required?: boolean;\n};\n\n/**\n * `Label` + `Input` + helper/error composite. Wires up `htmlFor`,\n * `aria-describedby`, and `aria-invalid` so call sites don't repeat the layout.\n *\n * The canonical version may differ in form-validation integration (RHF,\n * formik, native form, etc.) — keep this composite focused on layout only.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Field = ({\n className,\n error,\n helper,\n label,\n required,\n id: idProp,\n ...inputProps\n}: FieldProps): ReactElement => {\n const reactId = useId();\n const id = idProp || reactId;\n const helperId = `${id}-helper`;\n const errorId = `${id}-error`;\n\n const showHelper = Boolean(helper) && !error;\n const showError = Boolean(error);\n\n let describedBy: string | undefined;\n if (showError) {\n describedBy = errorId;\n } else if (showHelper) {\n describedBy = helperId;\n }\n\n return (\n <div className={cn('space-y-2', className)}>\n <Label htmlFor={id}>\n {label}\n {required && (\n <span className=\"text-text-danger\" aria-hidden>\n *\n </span>\n )}\n </Label>\n <Input\n id={id}\n aria-describedby={describedBy}\n aria-invalid={error ? true : undefined}\n required={required}\n {...inputProps}\n />\n {showHelper ? (\n <p id={helperId} className=\"text-xs text-muted-foreground\">\n {helper}\n </p>\n ) : null}\n {showError ? (\n <p id={errorId} role=\"alert\" className=\"text-xs text-text-danger\">\n {error}\n </p>\n ) : null}\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet `SettingsSection` directly instead.\n *\n * This is the redcoast-flavored variant of `SettingsSection` extended with\n * - `helpLink` (deep-link to docs)\n * - `alert` (inline alert slot in the header)\n * - `layout='split'` (opt-in 2-column variant matching Northstar's layout)\n *\n * The canonical `SettingsSection` at `../../settings-section` remains untouched\n * so its consumers don't pick up Northstar-flavored API.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SettingsSectionV2Props = {\n alert?: ReactNode;\n children: ReactNode;\n className?: string;\n description?: string;\n helpLink?: { text: string; url: string };\n layout?: 'stacked' | 'split';\n title: string;\n variant?: 'default' | 'danger';\n};\n\n/**\n * Card-shaped settings section with a header (title + optional description +\n * optional helpLink + optional alert) and a content area.\n *\n * `layout='split'` renders header on the left and content on the right (1fr\n * 2fr grid on `md+`). Default `'stacked'` matches the canonical\n * `SettingsSection`.\n *\n * `variant='danger'` tints the title red and adds a red border.\n *\n * @deprecated Migration-aid only. Replace with canonical `SettingsSection` once\n * the design team's finalized version supports `helpLink` / `alert` / split layout.\n */\nexport const SettingsSectionV2 = ({\n alert,\n children,\n className,\n description,\n helpLink,\n layout = 'stacked',\n title,\n variant = 'default',\n}: SettingsSectionV2Props): ReactElement => {\n const headerBlock = (\n <div>\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-text-danger'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n {helpLink && (\n <a\n href={helpLink.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-block text-sm font-medium text-text-link mt-2 hover:underline\"\n >\n {helpLink.text} →\n </a>\n )}\n {alert && <div className=\"mt-3\">{alert}</div>}\n </div>\n );\n\n if (layout === 'split') {\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n 'grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-6',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n {headerBlock}\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n }\n\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n <div className=\"mb-4\">{headerBlock}</div>\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SubSectionProps = {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'plain' | 'boxed';\n};\n\n/**\n * Heading + content stack, used inside an outer SettingsSection to group\n * sub-fields. Two variants:\n * - 'plain' (default): unboxed.\n * - 'boxed': thin-bordered card-within-a-card.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const SubSection = ({\n children,\n className,\n description,\n title,\n variant = 'plain',\n}: SubSectionProps): ReactElement => {\n if (variant === 'boxed') {\n return (\n <div\n className={cn(\n 'rounded-lg border border-border-divider bg-bg-bottom p-4',\n className\n )}\n >\n <div className=\"mb-3\">\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n }\n\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { ToggleRow, type ToggleRowProps } from '../../toggle-row';\nimport { cn } from '../../../lib/utils';\n\nexport type ToggleGroupProps = {\n children?: ReactNode;\n className?: string;\n /**\n * All ToggleRow props for the master row. `children` of master is ignored —\n * pass nested rows via `children` of ToggleGroup.\n */\n master: Omit<ToggleRowProps, 'children'>;\n};\n\n/**\n * Master `ToggleRow` on top, with a vertically-indented stack of nested\n * sub-toggles underneath. Sub-toggles auto-hide when the master is off.\n *\n * Used for \"social login → which providers\" and similar grouped-toggle\n * patterns ported from redcoast.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const ToggleGroup = ({\n children,\n className,\n master,\n}: ToggleGroupProps): ReactElement => {\n const showChildren = master.checked && Boolean(children);\n\n return (\n <div className={cn('space-y-3', className)}>\n <ToggleRow {...master} />\n {showChildren ? (\n <div className=\"ml-[42px] pl-4 border-l border-border-divider space-y-3\">\n {children}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAMA,gBAAqD;CACzD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,OAAO;EACL,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,MAAM;EACJ,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACF;AAED,MAAMC,eAA0D;CAC9D,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;CACT,SAAS;CACV;;;;;;;;;;AAWD,MAAa,UAAU,EACrB,QACA,UACA,WACA,cAAc,OACd,WACA,UAAU,aAC4B;CACtC,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CAEjD,MAAM,sBAAsB;AAC1B,eAAa,KAAK;AAClB,eAAa;;AAGf,KAAI,UAA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WAAU;GAAa;IAAe;GACvC;AAIV,QACE,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,qBAAC,oBACC,oBAAC;GAAG,WAAU;aAAuC;IAAW,EAC/D,eACC,oBAAC;GAAE,WAAU;aACV;IACC,IAEF,EACN,oBAAC;GAAI,WAAU;GAAa;IAAe;GACvC;;;;;;;;;;;;;;;;;;;;;;ACjCV,MAAa,eAAe,EAC1B,UACA,WACA,aACoC;CACpC,MAAM,eAAe,OAAO,WAAW,QAAQ,SAAS;AAExD,QACE,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,oBAAC,aAAU,GAAI,SAAU,EACxB,eACC,oBAAC;GAAI,WAAU;GACZ;IACG,GACJ;GACA"}
|
|
1
|
+
{"version":3,"file":"migration.esm.js","names":["variantStyles: Record<BannerVariant, VariantStyle>","variantIcons: Record<BannerVariant, typeof Alert01Icon>","describedBy: string | undefined"],"sources":["../src/components/migration/banner/banner.tsx","../src/components/migration/double-section/double-section.tsx","../src/components/migration/field/field.tsx","../src/components/migration/settings-section-v2/settings-section-v2.tsx","../src/components/migration/sub-section/sub-section.tsx","../src/components/migration/toggle-group/toggle-group.tsx"],"sourcesContent":["/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode, useState } from 'react';\nimport {\n AiMagicIcon,\n Alert01Icon,\n Cancel01Icon,\n CheckmarkCircle02Icon,\n InformationCircleIcon,\n} from '@hugeicons/core-free-icons';\nimport { HugeiconsIcon } from '@hugeicons/react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type BannerVariant =\n | 'info'\n | 'warning'\n | 'error'\n | 'success'\n | 'advance';\n\nexport type BannerProps = {\n action?: { onClick: () => void; text: string };\n children: ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n variant?: BannerVariant;\n};\n\ntype VariantStyle = { bg: string; iconColor: string; text: string };\n\nconst variantStyles: Record<BannerVariant, VariantStyle> = {\n advance: {\n bg: 'bg-brand-light border-border-focused/20',\n iconColor: 'text-brand-default',\n text: 'text-brand-accented',\n },\n error: {\n bg: 'bg-danger-light border-border-danger/20',\n iconColor: 'text-danger-default',\n text: 'text-text-danger',\n },\n info: {\n bg: 'bg-bg-default border-border-divider',\n iconColor: 'text-muted-foreground',\n text: 'text-muted-foreground',\n },\n success: {\n bg: 'bg-success-light border-border-success/20',\n iconColor: 'text-success-default',\n text: 'text-text-success',\n },\n warning: {\n bg: 'bg-warning-light border-border-warning/20',\n iconColor: 'text-warning-default',\n text: 'text-text-warning',\n },\n};\n\nconst variantIcons: Record<BannerVariant, typeof Alert01Icon> = {\n advance: AiMagicIcon,\n error: Alert01Icon,\n info: InformationCircleIcon,\n success: CheckmarkCircle02Icon,\n warning: Alert01Icon,\n};\n\n/**\n * 5-variant banner: `info` | `warning` | `error` | `success` | `advance`.\n * Inline icon + text + optional action button + optional close.\n *\n * Distinct from the canonical single-variant `InfoBanner`. The canonical\n * replacement may simply extend `InfoBanner` with semantic variants.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Banner = ({\n action,\n children,\n className,\n dismissible = false,\n onDismiss,\n variant = 'info',\n}: BannerProps): ReactElement | null => {\n const [dismissed, setDismissed] = useState(false);\n\n const handleDismiss = () => {\n setDismissed(true);\n onDismiss?.();\n };\n\n if (dismissed) return null;\n\n const styles = variantStyles[variant];\n const icon = variantIcons[variant];\n\n return (\n <output\n className={cn(\n 'flex items-center gap-2.5 rounded-lg border px-3 py-2 text-sm',\n styles.bg,\n styles.text,\n className\n )}\n >\n <span className={cn('shrink-0', styles.iconColor)}>\n <HugeiconsIcon icon={icon} size={16} />\n </span>\n <div className=\"flex-1 min-w-0 text-pretty font-medium\">{children}</div>\n {action && (\n <button\n type=\"button\"\n onClick={action.onClick}\n className={cn(\n 'shrink-0 px-2 py-1 rounded-md text-xs font-medium cursor-pointer touch-manipulation',\n 'hover:bg-overlay-hover transition-colors',\n styles.text\n )}\n >\n {action.text}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n onClick={handleDismiss}\n aria-label=\"Dismiss\"\n className={cn(\n 'shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 cursor-pointer transition-opacity',\n styles.text\n )}\n >\n <HugeiconsIcon icon={Cancel01Icon} size={14} />\n </button>\n )}\n </output>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype SectionItem = {\n badge?: ReactNode;\n children: ReactNode;\n description?: string;\n id: string;\n title: ReactNode;\n};\n\nexport type DoubleSectionProps = {\n className?: string;\n sections: [SectionItem, SectionItem];\n};\n\n/**\n * Two `SettingsSection`-like blocks side by side with a divider between them.\n * Common use case: \"Live mode | Sandbox mode\" pairs.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const DoubleSection = ({\n className,\n sections,\n}: DoubleSectionProps): ReactElement => (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card shadow-[var(--shadow-card)] overflow-hidden',\n 'grid grid-cols-1 md:grid-cols-2 md:divide-x md:divide-border-divider',\n className\n )}\n >\n {sections.map((section) => (\n <div key={section.id} className=\"p-6 space-y-4\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-sm font-semibold text-balance\">\n {section.title}\n </h3>\n {section.badge}\n </div>\n {section.description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {section.description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{section.children}</div>\n </div>\n ))}\n </section>\n);\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ComponentProps, type ReactElement, type ReactNode, useId } from 'react';\n\nimport { cn } from '../../../lib/utils';\nimport { Input } from '../../ui/input';\nimport { Label } from '../../ui/label';\n\nexport type FieldProps = Omit<ComponentProps<'input'>, 'children'> & {\n className?: string;\n error?: string;\n helper?: ReactNode;\n label: string;\n required?: boolean;\n};\n\n/**\n * `Label` + `Input` + helper/error composite. Wires up `htmlFor`,\n * `aria-describedby`, and `aria-invalid` so call sites don't repeat the layout.\n *\n * The canonical version may differ in form-validation integration (RHF,\n * formik, native form, etc.) — keep this composite focused on layout only.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const Field = ({\n className,\n error,\n helper,\n label,\n required,\n id: idProp,\n ...inputProps\n}: FieldProps): ReactElement => {\n const reactId = useId();\n const id = idProp || reactId;\n const helperId = `${id}-helper`;\n const errorId = `${id}-error`;\n\n const showHelper = Boolean(helper) && !error;\n const showError = Boolean(error);\n\n let describedBy: string | undefined;\n if (showError) {\n describedBy = errorId;\n } else if (showHelper) {\n describedBy = helperId;\n }\n\n return (\n // Uniform 8px between label, input and message. The canonical `Field` uses a 10px label gap\n // and a 6px message gap instead, so swapping to it changes the spacing on purpose.\n <div className={cn('space-y-2', className)}>\n <Label htmlFor={id}>\n {label}\n {required && (\n <span className=\"text-text-danger\" aria-hidden>\n *\n </span>\n )}\n </Label>\n <Input\n id={id}\n aria-describedby={describedBy}\n aria-invalid={error ? true : undefined}\n required={required}\n {...inputProps}\n />\n {showHelper ? (\n <p id={helperId} className=\"text-xs text-muted-foreground\">\n {helper}\n </p>\n ) : null}\n {showError ? (\n <p id={errorId} role=\"alert\" className=\"text-xs text-text-danger\">\n {error}\n </p>\n ) : null}\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet `SettingsSection` directly instead.\n *\n * This is the redcoast-flavored variant of `SettingsSection` extended with\n * - `helpLink` (deep-link to docs)\n * - `alert` (inline alert slot in the header)\n * - `layout='split'` (opt-in 2-column variant matching Northstar's layout)\n *\n * The canonical `SettingsSection` at `../../settings-section` remains untouched\n * so its consumers don't pick up Northstar-flavored API.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SettingsSectionV2Props = {\n alert?: ReactNode;\n children: ReactNode;\n className?: string;\n description?: string;\n helpLink?: { text: string; url: string };\n layout?: 'stacked' | 'split';\n title: string;\n variant?: 'default' | 'danger';\n};\n\n/**\n * Card-shaped settings section with a header (title + optional description +\n * optional helpLink + optional alert) and a content area.\n *\n * `layout='split'` renders header on the left and content on the right (1fr\n * 2fr grid on `md+`). Default `'stacked'` matches the canonical\n * `SettingsSection`.\n *\n * `variant='danger'` tints the title red and adds a red border.\n *\n * @deprecated Migration-aid only. Replace with canonical `SettingsSection` once\n * the design team's finalized version supports `helpLink` / `alert` / split layout.\n */\nexport const SettingsSectionV2 = ({\n alert,\n children,\n className,\n description,\n helpLink,\n layout = 'stacked',\n title,\n variant = 'default',\n}: SettingsSectionV2Props): ReactElement => {\n const headerBlock = (\n <div>\n <h3\n className={cn(\n 'text-sm font-semibold text-balance',\n variant === 'danger' && 'text-text-danger'\n )}\n >\n {title}\n </h3>\n {description && (\n <p className=\"text-sm text-muted-foreground mt-1 text-pretty\">\n {description}\n </p>\n )}\n {helpLink && (\n <a\n href={helpLink.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"inline-block text-sm font-medium text-text-link mt-2 hover:underline\"\n >\n {helpLink.text} →\n </a>\n )}\n {alert && <div className=\"mt-3\">{alert}</div>}\n </div>\n );\n\n if (layout === 'split') {\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n 'grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-6',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n {headerBlock}\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n }\n\n return (\n <section\n className={cn(\n 'rounded-xl border border-border bg-card p-6 shadow-[var(--shadow-card)]',\n variant === 'danger' && 'border-border-danger/30',\n className\n )}\n >\n <div className=\"mb-4\">{headerBlock}</div>\n <div className=\"space-y-4\">{children}</div>\n </section>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\nexport type SubSectionProps = {\n children: ReactNode;\n className?: string;\n description?: string;\n title: string;\n variant?: 'plain' | 'boxed';\n};\n\n/**\n * Heading + content stack, used inside an outer SettingsSection to group\n * sub-fields. Two variants:\n * - 'plain' (default): unboxed.\n * - 'boxed': thin-bordered card-within-a-card.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const SubSection = ({\n children,\n className,\n description,\n title,\n variant = 'plain',\n}: SubSectionProps): ReactElement => {\n if (variant === 'boxed') {\n return (\n <div\n className={cn(\n 'rounded-lg border border-border-divider bg-bg-bottom p-4',\n className\n )}\n >\n <div className=\"mb-3\">\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n }\n\n return (\n <div className={cn('space-y-3', className)}>\n <div>\n <h4 className=\"text-sm font-medium text-foreground\">{title}</h4>\n {description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 text-pretty\">\n {description}\n </p>\n )}\n </div>\n <div className=\"space-y-3\">{children}</div>\n </div>\n );\n};\n","/**\n * MIGRATION-AID — temporary composite added to unblock the redcoast\n * Northstar→droplet dashboard migration. NOT canonical. Will be replaced\n * by the design team's finalized version. Do not adopt for new droplet\n * projects; use the canonical droplet primitives directly instead.\n *\n * Tracking: https://github.com/dynamic-labs/redcoast/blob/main/MIGRATION-PLAN.md\n */\n'use client';\n\nimport { type ReactElement, type ReactNode } from 'react';\n\nimport { ToggleRow, type ToggleRowProps } from '../../toggle-row';\nimport { cn } from '../../../lib/utils';\n\nexport type ToggleGroupProps = {\n children?: ReactNode;\n className?: string;\n /**\n * All ToggleRow props for the master row. `children` of master is ignored —\n * pass nested rows via `children` of ToggleGroup.\n */\n master: Omit<ToggleRowProps, 'children'>;\n};\n\n/**\n * Master `ToggleRow` on top, with a vertically-indented stack of nested\n * sub-toggles underneath. Sub-toggles auto-hide when the master is off.\n *\n * Used for \"social login → which providers\" and similar grouped-toggle\n * patterns ported from redcoast.\n *\n * @deprecated Migration-aid only. Replace with canonical version when available.\n */\nexport const ToggleGroup = ({\n children,\n className,\n master,\n}: ToggleGroupProps): ReactElement => {\n const showChildren = master.checked && Boolean(children);\n\n return (\n <div className={cn('space-y-3', className)}>\n <ToggleRow {...master} />\n {showChildren ? (\n <div className=\"ml-[42px] pl-4 border-l border-border-divider space-y-3\">\n {children}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAMA,gBAAqD;CACzD,SAAS;EACP,IAAI;EACJ,WAAW;EACX,MAAM;EACP;CACD,OAAO;EACL,IAAI;EACJ,WAAW;EACX,MAAM;E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AAI,WAAU;GAAa;IAAe;GACnC;AAId,QACE,qBAAC;EACC,WAAW,GACT,2EACA,YAAY,YAAY,2BACxB,UACD;aAED,oBAAC;GAAI,WAAU;aAAQ;IAAkB,EACzC,oBAAC;GAAI,WAAU;GAAa;IAAe;GACnC;;;;;;;;;;;;;ACjFd,MAAa,cAAc,EACzB,UACA,WACA,aACA,OACA,UAAU,cACyB;AACnC,KAAI,YAAY,QACd,QACE,qBAAC;EACC,WAAW,GACT,4DACA,UACD;aAED,qBAAC;GAAI,WAAU;cACb,oBAAC;IAAG,WAAU;cAAuC;KAAW,EAC/D,eACC,oBAAC;IAAE,WAAU;cACV;KACC;IAEF,EACN,oBAAC;GAAI,WAAU;GAAa;IAAe;GACvC;AAIV,QACE,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,qBAAC,oBACC,oBAAC;GAAG,WAAU;aAAuC;IAAW,EAC/D,eACC,oBAAC;GAAE,WAAU;aACV;IACC,IAEF,EACN,oBAAC;GAAI,WAAU;GAAa;IAAe;GACvC;;;;;;;;;;;;;;;;;;;;;;ACjCV,MAAa,eAAe,EAC1B,UACA,WACA,aACoC;CACpC,MAAM,eAAe,OAAO,WAAW,QAAQ,SAAS;AAExD,QACE,qBAAC;EAAI,WAAW,GAAG,aAAa,UAAU;aACxC,oBAAC,aAAU,GAAI,SAAU,EACxB,eACC,oBAAC;GAAI,WAAU;GACZ;IACG,GACJ;GACA"}
|
|
@@ -252,6 +252,21 @@ Input.displayName = "Input";
|
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/components/ui/label/label.tsx
|
|
254
254
|
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
255
|
+
/**
|
|
256
|
+
* The text label for a form control.
|
|
257
|
+
*
|
|
258
|
+
* `Label` carries no spacing of its own. To label a form control, wrap the
|
|
259
|
+
* control in `Field` and pass `label`: `Field` sets the gap between the label
|
|
260
|
+
* and the control and wires up `htmlFor`. A bare `Label` placed next to a
|
|
261
|
+
* control ends up at whatever gap its parent happens to use.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```tsx
|
|
265
|
+
* <Field label="Email">
|
|
266
|
+
* <Input type="email" />
|
|
267
|
+
* </Field>
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
255
270
|
const Label = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Root, {
|
|
256
271
|
ref,
|
|
257
272
|
className: cn(labelVariants(), className),
|
|
@@ -277,7 +292,19 @@ Switch.displayName = "Switch";
|
|
|
277
292
|
|
|
278
293
|
//#endregion
|
|
279
294
|
//#region src/components/toggle-row/toggle-row.tsx
|
|
280
|
-
|
|
295
|
+
/**
|
|
296
|
+
* A single on/off setting: switch on the left, then label, description and
|
|
297
|
+
* optional `Badge`. It has no surface of its own.
|
|
298
|
+
*
|
|
299
|
+
* Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a
|
|
300
|
+
* `Card`. Never put a `Well` under it directly; sub-options go in the
|
|
301
|
+
* `FlushCardStack.Item` reveal.
|
|
302
|
+
*
|
|
303
|
+
* @see FlushCardStack
|
|
304
|
+
* @see Switch
|
|
305
|
+
*/
|
|
306
|
+
const ToggleRow = (props) => {
|
|
307
|
+
const { label, description, checked, onCheckedChange, disabled = false, switchPosition = "left", icon, badge, onSettings, children, className } = props;
|
|
281
308
|
const switchId = useId();
|
|
282
309
|
const descId = useId();
|
|
283
310
|
const cursorClass = disabled ? "cursor-not-allowed" : "cursor-pointer";
|
|
@@ -308,10 +335,9 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
|
|
|
308
335
|
className: cn("font-medium select-none", disabled && "text-muted-foreground", cursorClass),
|
|
309
336
|
children: label
|
|
310
337
|
}), badge]
|
|
311
|
-
}), description && /* @__PURE__ */ jsx("
|
|
312
|
-
htmlFor: switchId,
|
|
338
|
+
}), description && /* @__PURE__ */ jsx("p", {
|
|
313
339
|
id: descId,
|
|
314
|
-
className:
|
|
340
|
+
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
315
341
|
children: description
|
|
316
342
|
})]
|
|
317
343
|
})
|
|
@@ -346,10 +372,9 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
|
|
|
346
372
|
disabled
|
|
347
373
|
})]
|
|
348
374
|
})]
|
|
349
|
-
}), description && /* @__PURE__ */ jsx("
|
|
350
|
-
htmlFor: switchId,
|
|
375
|
+
}), description && /* @__PURE__ */ jsx("p", {
|
|
351
376
|
id: descId,
|
|
352
|
-
className:
|
|
377
|
+
className: "text-sm text-muted-foreground mt-0.5 text-pretty",
|
|
353
378
|
children: description
|
|
354
379
|
})] }), checked && children && children]
|
|
355
380
|
});
|
|
@@ -357,4 +382,4 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
|
|
|
357
382
|
|
|
358
383
|
//#endregion
|
|
359
384
|
export { Button as a, cn as c, Input as i, Switch as n, buttonVariants as o, Label as r, Spinner as s, ToggleRow as t };
|
|
360
|
-
//# sourceMappingURL=toggle-row-
|
|
385
|
+
//# sourceMappingURL=toggle-row-CeiCy3Aa.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-row-CeiCy3Aa.esm.js","names":["shaderDefaults: Required<ShaderBorderConfig>","Root"],"sources":["../src/lib/utils.ts","../src/components/ui/spinner/spinner.tsx","../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[]): string => twMerge(clsx(inputs));\n","import type { ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n/** Maps the `size` prop to Tailwind size utilities. */\nconst sizeMap = {\n lg: 'size-6',\n md: 'size-4',\n sm: 'size-3',\n} as const;\n\ntype SpinnerSize = keyof typeof sizeMap;\n\ntype SpinnerProps = {\n className?: string;\n /** Controls the spinner diameter. Defaults to `md` (size-4). `className` wins over `size`. */\n size?: SpinnerSize;\n};\n\nconst Spinner = ({ className, size = 'md' }: SpinnerProps): ReactElement => (\n <output aria-label=\"Loading\" className=\"inline-flex\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\n 'animate-spin motion-reduce:animate-none',\n sizeMap[size],\n className\n )}\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 </output>\n);\n\nexport { Spinner };\nexport type { SpinnerProps, SpinnerSize };\n","import { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\nimport { Spinner } from '../spinner';\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-out active:scale-[0.96] motion-reduce:transition-none 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 // Min-width floors so short labels (Done/OK/Save) read as proper buttons and\n // paired footer actions balance — only for solid/outlined TEXT buttons.\n // Excluded by design: `ghost`/`link` (inline text, no button floor) and all\n // `icon*` sizes (square). `min-w-*` (not fixed width) so labels still grow,\n // and `w-full`/`flex-1` usages override it harmlessly.\n compoundVariants: [\n {\n class: 'min-w-16',\n size: 'sm',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-20',\n size: 'default',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-24',\n size: 'lg',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n ],\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default:\n \"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':\n \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[8px] before:content-['']\",\n 'icon-xs':\n \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[10px] 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 * Set `loading` to show an inline spinner before the label and disable interaction while an async action is pending.\n * When `asChild` is true, `loading` is ignored — the Slot host cannot render an additional spinner child.\n */\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n loading = false,\n disabled,\n children,\n style,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** When true, renders an inline spinner before the label and disables interaction. */\n loading?: boolean;\n }): ReactElement => {\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, disabled, style }}\n >\n {children}\n </Slot>\n );\n }\n\n return (\n <button\n data-slot=\"button\"\n data-size={size}\n data-variant={variant}\n className={cn(\n buttonVariants({ size, variant }),\n // Loading stays full-strength (not the 50% disabled wash) so it reads as\n // \"working\", not \"disabled\" — interaction is still blocked via `disabled`.\n loading && 'cursor-wait',\n className\n )}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n // Inline opacity wins over the class-level `disabled:opacity-50` so the\n // loading button keeps its color while remaining truly disabled.\n style={loading ? { opacity: 1, ...style } : style}\n {...props}\n >\n {loading && (\n // Size matches the svg sizing the button already applies to icons at each size\n <Spinner className=\"size-3.5\" />\n )}\n {children}\n </button>\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_var(--ring-halo,#0072EF26)]',\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 isActive && 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--ring)]',\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\n/**\n * The text label for a form control.\n *\n * `Label` carries no spacing of its own. To label a form control, wrap the\n * control in `Field` and pass `label`: `Field` sets the gap between the label\n * and the control and wires up `htmlFor`. A bare `Label` placed next to a\n * control ends up at whatever gap its parent happens to use.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\">\n * <Input type=\"email\" />\n * </Field>\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.16)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] 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-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] transition-[color,background-color,box-shadow] duration-200 ease-out motion-reduce:transition-none 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-[15px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n 'pointer-events-none relative block ring-0',\n // travel only — slides between off/on with ease-out (Emil's blueprint)\n 'transition-transform duration-200 ease-out motion-reduce:transition-none',\n 'group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5',\n '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 {/* Inner pill carries the appearance + the press stretch. It animates WIDTH\n (not scaleX, which would oval the round caps) and is pinned to the edge\n nearest the track wall — right when checked, left when unchecked — so it\n only ever grows inward toward the track centre, never past the wall. */}\n <span\n className={cn(\n 'absolute top-0 h-full rounded-full',\n 'bg-background dark:group-data-[state=checked]/switch:bg-white dark:group-data-[state=unchecked]/switch:bg-[oklch(0.500_0.013_253)]',\n 'shadow-[var(--shadow-control-thumb)] dark:shadow-[var(--shadow-control-thumb)]',\n 'group-data-[size=default]/switch:w-3.5 group-data-[size=sm]/switch:w-2.5',\n 'group-data-[state=checked]/switch:right-0 group-data-[state=unchecked]/switch:left-0',\n // press stretch (1.2×) — ease-out, quick, direct-manipulation feedback\n 'group-[&[data-size=default]:active]/switch:w-[17px] group-[&[data-size=sm]:active]/switch:w-3',\n 'transition-[width,background-color] duration-[120ms] ease-out motion-reduce:transition-none',\n )}\n />\n </Thumb>\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client';\n\nimport { type ReactElement, 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 /** Status next to the label. Pass droplet `Badge` elements only, never hand-made chips. */\n badge?: ReactNode;\n checked: boolean;\n /** Content rendered under the row. For sub-options, prefer a `FlushCardStack.Item` reveal. */\n children?: ReactNode;\n className?: string;\n description?: string;\n disabled?: boolean;\n icon?: ReactNode;\n label: string;\n onCheckedChange: (checked: boolean) => void;\n /**\n * @deprecated Only rendered with `switchPosition='right'`, which is deprecated.\n * Put settings in a `FlushCardStack.Item` reveal instead.\n */\n onSettings?: () => void;\n /**\n * @deprecated The switch always sits on the left. `'right'` still renders for\n * existing callers but must not be used in new code.\n */\n switchPosition?: 'left' | 'right';\n}\n\n// The component still honours the deprecated props for existing callers, so it reads them through a type without the\n// deprecation tags; the tags are for callers, not for this implementation.\ntype ToggleRowImplementationProps = Omit<\n ToggleRowProps,\n 'onSettings' | 'switchPosition'\n> & {\n onSettings?: () => void;\n switchPosition?: 'left' | 'right';\n};\n\n/**\n * A single on/off setting: switch on the left, then label, description and\n * optional `Badge`. It has no surface of its own.\n *\n * Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a\n * `Card`. Never put a `Well` under it directly; sub-options go in the\n * `FlushCardStack.Item` reveal.\n *\n * @see FlushCardStack\n * @see Switch\n */\nexport const ToggleRow = (props: ToggleRowProps): ReactElement => {\n const {\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 }: ToggleRowImplementationProps = props;\n\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\n className={cn(\n 'flex items-start gap-2.5 touch-manipulation group/toggle'\n )}\n >\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(\n 'text-muted-foreground shrink-0 self-start',\n cursorClass\n )}\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 {/* Not a <label>: a second label would add the description to the\n switch's name, and screen readers would read it twice. */}\n {description && (\n <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-1 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n </div>\n {children}\n </div>\n );\n }\n\n // Deprecated right-switch layout, kept so existing callers keep rendering.\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 <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-0.5 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n {checked && children && children}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,WAAiC,QAAQ,KAAK,OAAO,CAAC;;;;;ACE5E,MAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI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,OACA,aACA,SACA,iBACA,WAAW,OACX,iBAAiB,QACjB,MACA,OACA,YACA,UACA,cACgC;CAElC,MAAM,WAAW,OAAO;CACxB,MAAM,SAAS,OAAO;CAEtB,MAAM,cAAc,WAAW,uBAAuB;AAEtD,KAAI,mBAAmB,OACrB,QACE,qBAAC;EAAe;aACd,qBAAC;GACC,WAAW,GACT,2DACD;;IAED,oBAAC;KACC,IAAI;KACJ,oBAAkB,cAAc,SAAS;KAChC;KACQ;KACP;KACV,WAAU;MACV;IACD,QACC,oBAAC;KACC,SAAS;KACT,WAAW,GACT,6CACA,YACD;eAEA;MACK;IAEV,qBAAC;KAAI,WAAU;gBACb,qBAAC;MAAI,WAAU;iBACb,oBAAC;OACC,SAAS;OACT,WAAW,GACT,2BACA,YAAY,yBACZ,YACD;iBAEA;QACK,EACP;OACG,EAGL,eACC,oBAAC;MACC,IAAI;MACJ,WAAU;gBAET;OACC;MAEF;;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,IAAI;GACJ,WAAU;aAET;IACC,IAEF,EACL,WAAW,YAAY;GACpB"}
|
|
@@ -253,6 +253,21 @@ Input.displayName = "Input";
|
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/components/ui/label/label.tsx
|
|
255
255
|
const labelVariants = (0, class_variance_authority.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
256
|
+
/**
|
|
257
|
+
* The text label for a form control.
|
|
258
|
+
*
|
|
259
|
+
* `Label` carries no spacing of its own. To label a form control, wrap the
|
|
260
|
+
* control in `Field` and pass `label`: `Field` sets the gap between the label
|
|
261
|
+
* and the control and wires up `htmlFor`. A bare `Label` placed next to a
|
|
262
|
+
* control ends up at whatever gap its parent happens to use.
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```tsx
|
|
266
|
+
* <Field label="Email">
|
|
267
|
+
* <Input type="email" />
|
|
268
|
+
* </Field>
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
256
271
|
const Label = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_label.Root, {
|
|
257
272
|
ref,
|
|
258
273
|
className: cn(labelVariants(), className),
|
|
@@ -278,7 +293,19 @@ Switch.displayName = "Switch";
|
|
|
278
293
|
|
|
279
294
|
//#endregion
|
|
280
295
|
//#region src/components/toggle-row/toggle-row.tsx
|
|
281
|
-
|
|
296
|
+
/**
|
|
297
|
+
* A single on/off setting: switch on the left, then label, description and
|
|
298
|
+
* optional `Badge`. It has no surface of its own.
|
|
299
|
+
*
|
|
300
|
+
* Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a
|
|
301
|
+
* `Card`. Never put a `Well` under it directly; sub-options go in the
|
|
302
|
+
* `FlushCardStack.Item` reveal.
|
|
303
|
+
*
|
|
304
|
+
* @see FlushCardStack
|
|
305
|
+
* @see Switch
|
|
306
|
+
*/
|
|
307
|
+
const ToggleRow = (props) => {
|
|
308
|
+
const { label, description, checked, onCheckedChange, disabled = false, switchPosition = "left", icon, badge, onSettings, children, className } = props;
|
|
282
309
|
const switchId = (0, react.useId)();
|
|
283
310
|
const descId = (0, react.useId)();
|
|
284
311
|
const cursorClass = disabled ? "cursor-not-allowed" : "cursor-pointer";
|
|
@@ -309,10 +336,9 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
|
|
|
309
336
|
className: cn("font-medium select-none", disabled && "text-muted-foreground", cursorClass),
|
|
310
337
|
children: label
|
|
311
338
|
}), badge]
|
|
312
|
-
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
313
|
-
htmlFor: switchId,
|
|
339
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
314
340
|
id: descId,
|
|
315
|
-
className:
|
|
341
|
+
className: "text-sm text-muted-foreground mt-1 text-pretty",
|
|
316
342
|
children: description
|
|
317
343
|
})]
|
|
318
344
|
})
|
|
@@ -347,10 +373,9 @@ const ToggleRow = ({ label, description, checked, onCheckedChange, disabled = fa
|
|
|
347
373
|
disabled
|
|
348
374
|
})]
|
|
349
375
|
})]
|
|
350
|
-
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
351
|
-
htmlFor: switchId,
|
|
376
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
352
377
|
id: descId,
|
|
353
|
-
className:
|
|
378
|
+
className: "text-sm text-muted-foreground mt-0.5 text-pretty",
|
|
354
379
|
children: description
|
|
355
380
|
})] }), checked && children && children]
|
|
356
381
|
});
|
|
@@ -405,4 +430,4 @@ Object.defineProperty(exports, 'cn', {
|
|
|
405
430
|
return cn;
|
|
406
431
|
}
|
|
407
432
|
});
|
|
408
|
-
//# sourceMappingURL=toggle-row-
|
|
433
|
+
//# sourceMappingURL=toggle-row-DcV81G3w.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-row-DcV81G3w.cjs","names":["Slot","shaderDefaults: Required<ShaderBorderConfig>","AnimatePresence","motion","PulsingBorder","Root","Root","Thumb","HugeiconsIcon","Setting07Icon"],"sources":["../src/lib/utils.ts","../src/components/ui/spinner/spinner.tsx","../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[]): string => twMerge(clsx(inputs));\n","import type { ReactElement } from 'react';\n\nimport { cn } from '../../../lib/utils';\n\n/** Maps the `size` prop to Tailwind size utilities. */\nconst sizeMap = {\n lg: 'size-6',\n md: 'size-4',\n sm: 'size-3',\n} as const;\n\ntype SpinnerSize = keyof typeof sizeMap;\n\ntype SpinnerProps = {\n className?: string;\n /** Controls the spinner diameter. Defaults to `md` (size-4). `className` wins over `size`. */\n size?: SpinnerSize;\n};\n\nconst Spinner = ({ className, size = 'md' }: SpinnerProps): ReactElement => (\n <output aria-label=\"Loading\" className=\"inline-flex\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\n 'animate-spin motion-reduce:animate-none',\n sizeMap[size],\n className\n )}\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 </output>\n);\n\nexport { Spinner };\nexport type { SpinnerProps, SpinnerSize };\n","import { type ComponentProps, type ReactElement } from 'react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '../../../lib/utils';\nimport { Spinner } from '../spinner';\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-out active:scale-[0.96] motion-reduce:transition-none 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 // Min-width floors so short labels (Done/OK/Save) read as proper buttons and\n // paired footer actions balance — only for solid/outlined TEXT buttons.\n // Excluded by design: `ghost`/`link` (inline text, no button floor) and all\n // `icon*` sizes (square). `min-w-*` (not fixed width) so labels still grow,\n // and `w-full`/`flex-1` usages override it harmlessly.\n compoundVariants: [\n {\n class: 'min-w-16',\n size: 'sm',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-20',\n size: 'default',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n {\n class: 'min-w-24',\n size: 'lg',\n variant: ['default', 'destructive', 'outline', 'secondary'],\n },\n ],\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n variants: {\n size: {\n default:\n \"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':\n \"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5 relative before:absolute before:-inset-[8px] before:content-['']\",\n 'icon-xs':\n \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3 relative before:absolute before:-inset-[10px] 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 * Set `loading` to show an inline spinner before the label and disable interaction while an async action is pending.\n * When `asChild` is true, `loading` is ignored — the Slot host cannot render an additional spinner child.\n */\nconst Button = ({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n loading = false,\n disabled,\n children,\n style,\n ...props\n}: ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** When true, renders an inline spinner before the label and disables interaction. */\n loading?: boolean;\n }): ReactElement => {\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, disabled, style }}\n >\n {children}\n </Slot>\n );\n }\n\n return (\n <button\n data-slot=\"button\"\n data-size={size}\n data-variant={variant}\n className={cn(\n buttonVariants({ size, variant }),\n // Loading stays full-strength (not the 50% disabled wash) so it reads as\n // \"working\", not \"disabled\" — interaction is still blocked via `disabled`.\n loading && 'cursor-wait',\n className\n )}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n // Inline opacity wins over the class-level `disabled:opacity-50` so the\n // loading button keeps its color while remaining truly disabled.\n style={loading ? { opacity: 1, ...style } : style}\n {...props}\n >\n {loading && (\n // Size matches the svg sizing the button already applies to icons at each size\n <Spinner className=\"size-3.5\" />\n )}\n {children}\n </button>\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_var(--ring-halo,#0072EF26)]',\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 isActive && 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--ring)]',\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\n/**\n * The text label for a form control.\n *\n * `Label` carries no spacing of its own. To label a form control, wrap the\n * control in `Field` and pass `label`: `Field` sets the gap between the label\n * and the control and wires up `htmlFor`. A bare `Label` placed next to a\n * control ends up at whatever gap its parent happens to use.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\">\n * <Input type=\"email\" />\n * </Field>\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.16)] group-hover/toggle:data-[state=unchecked]:bg-[rgba(31,41,55,0.16)] 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-[var(--shadow-control)] dark:shadow-[var(--shadow-control)] data-[state=checked]:shadow-[var(--shadow-control-checked)] dark:data-[state=checked]:shadow-[var(--shadow-control-checked)] transition-[color,background-color,box-shadow] duration-200 ease-out motion-reduce:transition-none 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-[15px] before:content-['']\",\n className,\n )}\n {...props}\n >\n <Thumb\n data-slot='switch-thumb'\n className={cn(\n 'pointer-events-none relative block ring-0',\n // travel only — slides between off/on with ease-out (Emil's blueprint)\n 'transition-transform duration-200 ease-out motion-reduce:transition-none',\n 'group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-2.5',\n '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 {/* Inner pill carries the appearance + the press stretch. It animates WIDTH\n (not scaleX, which would oval the round caps) and is pinned to the edge\n nearest the track wall — right when checked, left when unchecked — so it\n only ever grows inward toward the track centre, never past the wall. */}\n <span\n className={cn(\n 'absolute top-0 h-full rounded-full',\n 'bg-background dark:group-data-[state=checked]/switch:bg-white dark:group-data-[state=unchecked]/switch:bg-[oklch(0.500_0.013_253)]',\n 'shadow-[var(--shadow-control-thumb)] dark:shadow-[var(--shadow-control-thumb)]',\n 'group-data-[size=default]/switch:w-3.5 group-data-[size=sm]/switch:w-2.5',\n 'group-data-[state=checked]/switch:right-0 group-data-[state=unchecked]/switch:left-0',\n // press stretch (1.2×) — ease-out, quick, direct-manipulation feedback\n 'group-[&[data-size=default]:active]/switch:w-[17px] group-[&[data-size=sm]:active]/switch:w-3',\n 'transition-[width,background-color] duration-[120ms] ease-out motion-reduce:transition-none',\n )}\n />\n </Thumb>\n </Root>\n));\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n","'use client';\n\nimport { type ReactElement, 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 /** Status next to the label. Pass droplet `Badge` elements only, never hand-made chips. */\n badge?: ReactNode;\n checked: boolean;\n /** Content rendered under the row. For sub-options, prefer a `FlushCardStack.Item` reveal. */\n children?: ReactNode;\n className?: string;\n description?: string;\n disabled?: boolean;\n icon?: ReactNode;\n label: string;\n onCheckedChange: (checked: boolean) => void;\n /**\n * @deprecated Only rendered with `switchPosition='right'`, which is deprecated.\n * Put settings in a `FlushCardStack.Item` reveal instead.\n */\n onSettings?: () => void;\n /**\n * @deprecated The switch always sits on the left. `'right'` still renders for\n * existing callers but must not be used in new code.\n */\n switchPosition?: 'left' | 'right';\n}\n\n// The component still honours the deprecated props for existing callers, so it reads them through a type without the\n// deprecation tags; the tags are for callers, not for this implementation.\ntype ToggleRowImplementationProps = Omit<\n ToggleRowProps,\n 'onSettings' | 'switchPosition'\n> & {\n onSettings?: () => void;\n switchPosition?: 'left' | 'right';\n};\n\n/**\n * A single on/off setting: switch on the left, then label, description and\n * optional `Badge`. It has no surface of its own.\n *\n * Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a\n * `Card`. Never put a `Well` under it directly; sub-options go in the\n * `FlushCardStack.Item` reveal.\n *\n * @see FlushCardStack\n * @see Switch\n */\nexport const ToggleRow = (props: ToggleRowProps): ReactElement => {\n const {\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 }: ToggleRowImplementationProps = props;\n\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\n className={cn(\n 'flex items-start gap-2.5 touch-manipulation group/toggle'\n )}\n >\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(\n 'text-muted-foreground shrink-0 self-start',\n cursorClass\n )}\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 {/* Not a <label>: a second label would add the description to the\n switch's name, and screen readers would read it twice. */}\n {description && (\n <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-1 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n </div>\n {children}\n </div>\n );\n }\n\n // Deprecated right-switch layout, kept so existing callers keep rendering.\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 <p\n id={descId}\n className=\"text-sm text-muted-foreground mt-0.5 text-pretty\"\n >\n {description}\n </p>\n )}\n </div>\n {checked && children && children}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAGA,MAAa,MAAM,GAAG,sDAA8C,OAAO,CAAC;;;;;ACE5E,MAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAUD,MAAM,WAAW,EAAE,WAAW,OAAO,WACnC,2CAAC;CAAO,cAAW;CAAU,WAAU;WACrC,4CAAC;EACC,SAAQ;EACR,MAAK;EACL,OAAM;EACN,WAAW,GACT,2CACA,QAAQ,OACR,UACD;aAED,2CAAC;GACC,WAAU;GACV,IAAG;GACH,IAAG;GACH,GAAE;GACF,QAAO;GACP,aAAY;IACZ,EACF,2CAAC;GACC,WAAU;GACV,MAAK;GACL,GAAE;IACF;GACE;EACC;;;;ACtCX,MAAM,mDACJ,qmBACA;CAME,kBAAkB;EAChB;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACD;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACD;GACE,OAAO;GACP,MAAM;GACN,SAAS;IAAC;IAAW;IAAe;IAAW;IAAY;GAC5D;EACF;CACD,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;GACJ,SACE;GACF,MAAM;GACN,WACE;GACF,WACE;GACF,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,SAAS;GACP,SACE;GACF,aACE;GACF,OACE;GACF,MAAM;GACN,SACE;GACF,WACE;GACH;EACF;CACF,CACF;;;;;;;;;;AAWD,MAAM,UAAU,EACd,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,UAAU,OACV,UACA,UACA,OACA,GAAG,YAMiB;AACpB,KAAI,QACF,QACE,2CAACA;EACC,aAAU;EACV,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,WAAU;aAET;IACC,IAEF,EACL,WAAW,YAAY;GACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-sdk/droplet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"@radix-ui/react-switch": "1.2.6",
|
|
48
48
|
"@radix-ui/react-tabs": "1.1.3",
|
|
49
49
|
"@radix-ui/react-tooltip": "1.2.8",
|
|
50
|
+
"@tanstack/react-table": "8.21.3",
|
|
51
|
+
"@tanstack/react-virtual": "3.14.13",
|
|
50
52
|
"class-variance-authority": "0.7.1",
|
|
51
53
|
"clsx": "2.1.1",
|
|
52
54
|
"cmdk": "1.0.0",
|