@refraction-ui/react 0.20.0 → 0.21.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/{chunk-F7B64KT3.js → chunk-NKCWOPNX.js} +5 -1
- package/dist/chunk-NKCWOPNX.js.map +7 -0
- package/dist/index.cjs +61 -17
- package/dist/index.cjs.map +1 -1
- package/dist/internal/badge/index.d.cts +2 -2
- package/dist/internal/badge/index.d.ts +2 -2
- package/dist/internal/button/index.d.cts +2 -2
- package/dist/internal/button/index.d.ts +2 -2
- package/dist/internal/card/index.d.cts +10 -2
- package/dist/internal/card/index.d.ts +10 -2
- package/dist/internal/react-card/index.d.cts +3 -0
- package/dist/internal/react-card/index.d.ts +3 -0
- package/dist/internal/react-separator/index.d.cts +6 -1
- package/dist/internal/react-separator/index.d.ts +6 -1
- package/dist/internal/separator/index.d.cts +6 -1
- package/dist/internal/separator/index.d.ts +6 -1
- package/dist/react-avatar-group.js +1 -1
- package/dist/react-avatar-group.js.map +1 -1
- package/dist/react-badge.js +14 -2
- package/dist/react-badge.js.map +2 -2
- package/dist/react-browser-chrome-mock.js.map +2 -2
- package/dist/react-button.js +1 -1
- package/dist/react-card.js +12 -3
- package/dist/react-card.js.map +2 -2
- package/dist/react-diff-viewer.js +3 -0
- package/dist/react-diff-viewer.js.map +2 -2
- package/dist/react-presence-indicator.js +1 -1
- package/dist/react-presence-indicator.js.map +1 -1
- package/dist/react-separator.js +18 -6
- package/dist/react-separator.js.map +2 -2
- package/dist/react-slide-viewer.js +2 -0
- package/dist/react-slide-viewer.js.map +2 -2
- package/dist/react-social-auth-button.js +1 -1
- package/dist/react-status-indicator.js +4 -4
- package/dist/react-status-indicator.js.map +1 -1
- package/dist/react-sticky-note.js +2 -0
- package/dist/react-sticky-note.js.map +2 -2
- package/dist/styles.css +56 -0
- package/package.json +1 -1
- package/dist/chunk-F7B64KT3.js.map +0 -7
|
@@ -74,6 +74,10 @@ var buttonVariants = cva({
|
|
|
74
74
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
75
75
|
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
76
76
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
77
|
+
// Soft tinted brand fill — lower-emphasis primary action (issue #485).
|
|
78
|
+
soft: "bg-primary-soft text-primary-soft-foreground shadow-sm hover:bg-primary-soft/80",
|
|
79
|
+
// Second brand accent (issue #485).
|
|
80
|
+
tertiary: "bg-tertiary text-tertiary-foreground shadow-sm hover:bg-tertiary/90",
|
|
77
81
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
78
82
|
link: "text-primary underline-offset-4 hover:underline"
|
|
79
83
|
},
|
|
@@ -184,4 +188,4 @@ export {
|
|
|
184
188
|
buttonVariants,
|
|
185
189
|
Button
|
|
186
190
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
191
|
+
//# sourceMappingURL=chunk-NKCWOPNX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../button/src/button.ts", "../../button/src/button.styles.ts", "../../react-button/src/button.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { AccessibilityProps, KeyboardHandlerMap } from '@refraction-ui/shared'\nimport { Keys } from '@refraction-ui/shared'\n\n/**\n * `primary` is an alias of `default` — included so the universal React-ecosystem\n * muscle-memory (`<Button variant=\"primary\">`) renders as the most-emphasized\n * button instead of falling through to the unstyled base. See issue #201.\n */\nexport type ButtonVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'outline'\n | 'secondary'\n | 'ghost'\n | 'link'\n // Issue #485 — soft tinted brand fill + a real second brand accent.\n | 'soft'\n | 'tertiary'\n\n/** Variants that map to the same visual style as `default`. */\nexport const BUTTON_VARIANT_ALIASES: Partial<Record<ButtonVariant, ButtonVariant>> = {\n primary: 'default',\n}\n\n/** Resolve an alias to its canonical variant. Pass-through for unknown/undefined. */\nexport function resolveButtonVariant(variant: ButtonVariant | undefined): ButtonVariant | undefined {\n if (!variant) return variant\n return BUTTON_VARIANT_ALIASES[variant] ?? variant\n}\nexport type ButtonSize = 'xs' | 'sm' | 'default' | 'lg' | 'icon'\n\nexport interface ButtonProps {\n variant?: ButtonVariant\n size?: ButtonSize\n disabled?: boolean\n loading?: boolean\n asChild?: boolean\n type?: 'button' | 'submit' | 'reset'\n}\n\nexport interface ButtonAPI {\n /** ARIA attributes to spread on the element */\n ariaProps: Partial<AccessibilityProps>\n /** Keyboard handlers to attach */\n keyboardHandlers: KeyboardHandlerMap\n /** Whether interaction should be blocked */\n isInteractive: boolean\n /** Data attributes for CSS styling hooks */\n dataAttributes: Record<string, string>\n}\n\nexport function createButton(props: ButtonProps = {}): ButtonAPI {\n const { disabled = false, loading = false } = props\n const isInteractive = !disabled && !loading\n\n const ariaProps: Partial<AccessibilityProps> = {}\n if (disabled) {\n ariaProps['aria-disabled'] = true\n }\n if (loading) {\n ariaProps['aria-disabled'] = true\n ariaProps['aria-label'] = ariaProps['aria-label'] ?? undefined\n }\n\n const dataAttributes: Record<string, string> = {}\n if (loading) {\n dataAttributes['data-loading'] = ''\n }\n if (disabled) {\n dataAttributes['data-disabled'] = ''\n }\n\n const keyboardHandlers: KeyboardHandlerMap = {}\n if (!isInteractive) {\n keyboardHandlers[Keys.Enter] = (e) => e.preventDefault()\n keyboardHandlers[Keys.Space] = (e) => e.preventDefault()\n }\n\n return {\n ariaProps,\n keyboardHandlers,\n isInteractive,\n dataAttributes,\n }\n}\n\nexport function getButtonType(props: ButtonProps): string {\n return props.type ?? 'button'\n}\n", "import { cva } from '@refraction-ui/shared'\nimport type { TokenContract } from '@refraction-ui/shared'\n\nexport const buttonTokens: TokenContract = {\n name: 'button',\n tokens: {\n bg: { variable: '--rfr-button-bg', fallback: 'hsl(var(--primary))' },\n fg: { variable: '--rfr-button-fg', fallback: 'hsl(var(--primary-foreground))' },\n border: { variable: '--rfr-button-border', fallback: 'hsl(var(--border))' },\n radius: { variable: '--rfr-button-radius', fallback: 'var(--radius)' },\n ring: { variable: '--rfr-button-ring', fallback: 'hsl(var(--ring))' },\n },\n}\n\nexport const buttonVariants = cva({\n base: 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n // Alias for `default` — see resolveButtonVariant + issue #201. Same classes\n // so styling stays identical even if a consumer reaches into `buttonVariants`\n // directly without going through resolveButtonVariant.\n primary: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n // Soft tinted brand fill — lower-emphasis primary action (issue #485).\n soft: 'bg-primary-soft text-primary-soft-foreground shadow-sm hover:bg-primary-soft/80',\n // Second brand accent (issue #485).\n tertiary: 'bg-tertiary text-tertiary-foreground shadow-sm hover:bg-tertiary/90',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n xs: 'h-7 rounded px-2 text-xs',\n sm: 'h-8 rounded-md px-3 text-xs',\n default: 'h-9 px-4 py-2',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n", "import * as React from 'react'\nimport {\n createButton,\n buttonVariants,\n getButtonType,\n resolveButtonVariant,\n type ButtonVariant,\n type ButtonSize,\n} from '@refraction-ui/button'\nimport { useShortcut, ShortcutHint } from '@refraction-ui/react-keyboard-shortcut'\nimport { cn } from '@refraction-ui/shared'\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant\n size?: ButtonSize\n loading?: boolean\n asChild?: boolean\n shortcut?: string\n action?: string\n}\n\n/**\n * Button component — renders a styled button with variant and size support.\n *\n * Uses the headless @refraction-ui/button core for state, ARIA, and keyboard handling.\n * Styling via Tailwind utility classes (no external CSS-in-JS).\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) {\n // `primary` is an ecosystem-muscle-memory alias for `default` — resolve it\n // here so styling, aria, and data attributes all see the canonical variant.\n // See issue #201.\n const resolvedVariant = resolveButtonVariant(variant)\n const api = createButton({ variant: resolvedVariant, size, disabled, loading, asChild, type: props.type })\n const classes = cn(buttonVariants({ variant: resolvedVariant, size }), className)\n \n const internalRef = React.useRef<HTMLButtonElement>(null)\n const mergedRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n internalRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n useShortcut({\n shortcut,\n action,\n enabled: !disabled && !loading && (!!shortcut || !!action),\n onTrigger: () => {\n internalRef.current?.click()\n },\n })\n\n // When asChild, render the child element directly with button props merged in.\n // This allows <Button asChild><a href=\"/\">Link</a></Button>\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n ref: mergedRef,\n className: cn(classes, (children.props as Record<string, unknown>).className as string, 'relative'),\n type: getButtonType({ type: props.type }),\n ...api.ariaProps,\n ...api.dataAttributes,\n ...props,\n children: (\n <>\n {(shortcut || action) && <ShortcutHint shortcut={shortcut} action={action} className=\"right-4\" />}\n {(children.props as Record<string, unknown>).children}\n </>\n )\n })\n }\n\n return (\n <button\n ref={mergedRef}\n type={getButtonType({ type: props.type }) as 'button' | 'submit' | 'reset'}\n className={cn(classes, 'relative')}\n disabled={disabled || loading}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {(shortcut || action) && <ShortcutHint shortcut={shortcut} action={action} className=\"right-4\" />}\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\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 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n {children}\n </button>\n )\n },\n)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAqBO,IAAM,yBAAwE;EACnF,SAAS;AACX;AAGO,SAAS,qBAAqB,SAA+D;AAClG,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,uBAAuB,OAAO,KAAK;AAC5C;AAuBO,SAAS,aAAa,QAAqB,CAAA,GAAe;AAC/D,QAAM,EAAE,WAAW,OAAO,UAAU,MAAA,IAAU;AAC9C,QAAM,gBAAgB,CAAC,YAAY,CAAC;AAEpC,QAAM,YAAyC,CAAA;AAC/C,MAAI,UAAU;AACZ,cAAU,eAAe,IAAI;EAC/B;AACA,MAAI,SAAS;AACX,cAAU,eAAe,IAAI;AAC7B,cAAU,YAAY,IAAI,UAAU,YAAY,KAAK;EACvD;AAEA,QAAM,iBAAyC,CAAA;AAC/C,MAAI,SAAS;AACX,mBAAe,cAAc,IAAI;EACnC;AACA,MAAI,UAAU;AACZ,mBAAe,eAAe,IAAI;EACpC;AAEA,QAAM,mBAAuC,CAAA;AAC7C,MAAI,CAAC,eAAe;AAClB,qBAAiB,KAAK,KAAK,IAAI,CAAC,MAAM,EAAE,eAAA;AACxC,qBAAiB,KAAK,KAAK,IAAI,CAAC,MAAM,E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
|
|
1752
1752
|
|
|
1753
1753
|
// ../badge/dist/index.js
|
|
1754
|
-
var statusVariants = [
|
|
1754
|
+
var statusVariants = [
|
|
1755
|
+
"success",
|
|
1756
|
+
"warning",
|
|
1757
|
+
"destructive",
|
|
1758
|
+
"positive",
|
|
1759
|
+
"caution",
|
|
1760
|
+
"done"
|
|
1761
|
+
];
|
|
1755
1762
|
function createBadge(props = {}) {
|
|
1756
1763
|
const { variant = "default" } = props;
|
|
1757
1764
|
const ariaProps = {};
|
|
@@ -1775,7 +1782,12 @@ var badgeVariants = cva({
|
|
|
1775
1782
|
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80 font-semibold",
|
|
1776
1783
|
outline: "text-foreground",
|
|
1777
1784
|
success: "border-transparent bg-success text-success-foreground shadow hover:bg-success/80 font-semibold",
|
|
1778
|
-
warning: "border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold"
|
|
1785
|
+
warning: "border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold",
|
|
1786
|
+
// Second brand accent + extended status roles (issue #485).
|
|
1787
|
+
tertiary: "border-transparent bg-tertiary text-tertiary-foreground shadow hover:bg-tertiary/80 font-semibold",
|
|
1788
|
+
positive: "border-transparent bg-positive text-positive-foreground shadow hover:bg-positive/80 font-semibold",
|
|
1789
|
+
caution: "border-transparent bg-caution text-caution-foreground shadow hover:bg-caution/80 font-semibold",
|
|
1790
|
+
done: "border-transparent bg-done text-info-foreground shadow hover:bg-done/80 font-semibold"
|
|
1779
1791
|
},
|
|
1780
1792
|
size: {
|
|
1781
1793
|
sm: "px-2 py-0 text-[10px]",
|
|
@@ -2071,6 +2083,10 @@ var buttonVariants = cva({
|
|
|
2071
2083
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
2072
2084
|
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
2073
2085
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
2086
|
+
// Soft tinted brand fill — lower-emphasis primary action (issue #485).
|
|
2087
|
+
soft: "bg-primary-soft text-primary-soft-foreground shadow-sm hover:bg-primary-soft/80",
|
|
2088
|
+
// Second brand accent (issue #485).
|
|
2089
|
+
tertiary: "bg-tertiary text-tertiary-foreground shadow-sm hover:bg-tertiary/90",
|
|
2074
2090
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
2075
2091
|
link: "text-primary underline-offset-4 hover:underline"
|
|
2076
2092
|
},
|
|
@@ -16496,6 +16512,8 @@ var slideViewerProgressBarVariants = cva({
|
|
|
16496
16512
|
var slideTypeBadgeVariants = cva({
|
|
16497
16513
|
base: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
16498
16514
|
variants: {
|
|
16515
|
+
// Slide-type accents are a content-category palette (lesson/quiz/exercise…),
|
|
16516
|
+
// not status tones — deliberately not routed through the theme tokens.
|
|
16499
16517
|
type: {
|
|
16500
16518
|
lesson: "bg-blue-100 text-blue-800",
|
|
16501
16519
|
quiz: "bg-purple-100 text-purple-800",
|
|
@@ -18200,6 +18218,9 @@ var diffViewerTokens = {
|
|
|
18200
18218
|
sidebarBg: { variable: "--rfr-diff-sidebar-bg", fallback: "hsl(var(--muted))" },
|
|
18201
18219
|
headerBg: { variable: "--rfr-diff-header-bg", fallback: "hsl(var(--muted))" },
|
|
18202
18220
|
border: { variable: "--rfr-diff-border", fallback: "hsl(var(--border))" },
|
|
18221
|
+
// Diff add/del colors are syntax semantics (like code highlighting), not
|
|
18222
|
+
// theme status tones — deliberately NOT routed through the success/
|
|
18223
|
+
// destructive tokens. The --rfr-diff-* variables are the theming seam.
|
|
18203
18224
|
addBg: { variable: "--rfr-diff-add-bg", fallback: "rgba(46, 160, 67, 0.15)" },
|
|
18204
18225
|
delBg: { variable: "--rfr-diff-del-bg", fallback: "rgba(248, 81, 73, 0.15)" },
|
|
18205
18226
|
addFg: { variable: "--rfr-diff-add-fg", fallback: "#3fb950" },
|
|
@@ -18723,7 +18744,7 @@ var avatarPresenceDotVariants = cva({
|
|
|
18723
18744
|
},
|
|
18724
18745
|
status: {
|
|
18725
18746
|
online: "bg-success",
|
|
18726
|
-
offline: "bg-
|
|
18747
|
+
offline: "bg-neutral",
|
|
18727
18748
|
away: "bg-warning",
|
|
18728
18749
|
busy: "bg-destructive",
|
|
18729
18750
|
dnd: "bg-destructive"
|
|
@@ -18807,8 +18828,16 @@ var cardTokens = {
|
|
|
18807
18828
|
}
|
|
18808
18829
|
};
|
|
18809
18830
|
var cardVariants = cva({
|
|
18810
|
-
base: "rounded-lg border
|
|
18831
|
+
base: "rounded-lg border shadow",
|
|
18811
18832
|
variants: {
|
|
18833
|
+
variant: {
|
|
18834
|
+
// Default — unchanged surface (bg-card + border via the global token).
|
|
18835
|
+
default: "bg-card text-card-foreground",
|
|
18836
|
+
// Lower-emphasis container on the subtle surface token (issue #485).
|
|
18837
|
+
subtle: "bg-surface-subtle text-card-foreground",
|
|
18838
|
+
// Tinted second-accent card (issue #485).
|
|
18839
|
+
tertiary: "border-transparent bg-tertiary-soft text-tertiary-soft-foreground"
|
|
18840
|
+
},
|
|
18812
18841
|
padding: {
|
|
18813
18842
|
none: "",
|
|
18814
18843
|
default: "p-6",
|
|
@@ -18816,6 +18845,7 @@ var cardVariants = cva({
|
|
|
18816
18845
|
}
|
|
18817
18846
|
},
|
|
18818
18847
|
defaultVariants: {
|
|
18848
|
+
variant: "default",
|
|
18819
18849
|
padding: "none"
|
|
18820
18850
|
}
|
|
18821
18851
|
});
|
|
@@ -18845,9 +18875,9 @@ var cardFooterVariants = cva({
|
|
|
18845
18875
|
base: "flex items-center p-6 pt-0"
|
|
18846
18876
|
});
|
|
18847
18877
|
var Card = React52__namespace.forwardRef(
|
|
18848
|
-
function Card2({ className, asChild = false, ...props }, ref) {
|
|
18878
|
+
function Card2({ className, variant, asChild = false, ...props }, ref) {
|
|
18849
18879
|
const api = createCard();
|
|
18850
|
-
const classes = cn(cardVariants(), className);
|
|
18880
|
+
const classes = cn(cardVariants({ variant }), className);
|
|
18851
18881
|
if (asChild) {
|
|
18852
18882
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18853
18883
|
Slot,
|
|
@@ -20000,7 +20030,7 @@ var presenceDotVariants = cva({
|
|
|
20000
20030
|
variants: {
|
|
20001
20031
|
status: {
|
|
20002
20032
|
online: "bg-success",
|
|
20003
|
-
offline: "bg-
|
|
20033
|
+
offline: "bg-neutral",
|
|
20004
20034
|
away: "bg-warning",
|
|
20005
20035
|
busy: "bg-destructive",
|
|
20006
20036
|
dnd: "bg-destructive"
|
|
@@ -20846,8 +20876,8 @@ var statusDotVariants = cva({
|
|
|
20846
20876
|
error: "bg-destructive",
|
|
20847
20877
|
warning: "bg-warning",
|
|
20848
20878
|
info: "bg-info",
|
|
20849
|
-
pending: "bg-
|
|
20850
|
-
neutral: "bg-
|
|
20879
|
+
pending: "bg-pending",
|
|
20880
|
+
neutral: "bg-neutral"
|
|
20851
20881
|
}
|
|
20852
20882
|
},
|
|
20853
20883
|
defaultVariants: {
|
|
@@ -20862,8 +20892,8 @@ var statusPulseVariants = cva({
|
|
|
20862
20892
|
error: "bg-destructive",
|
|
20863
20893
|
warning: "bg-warning",
|
|
20864
20894
|
info: "bg-info",
|
|
20865
|
-
pending: "bg-
|
|
20866
|
-
neutral: "bg-
|
|
20895
|
+
pending: "bg-pending",
|
|
20896
|
+
neutral: "bg-neutral"
|
|
20867
20897
|
}
|
|
20868
20898
|
},
|
|
20869
20899
|
defaultVariants: {
|
|
@@ -24951,8 +24981,16 @@ var separatorVariants = cva({
|
|
|
24951
24981
|
base: "",
|
|
24952
24982
|
variants: {
|
|
24953
24983
|
orientation: {
|
|
24954
|
-
horizontal: "h-px w-full
|
|
24955
|
-
vertical: "w-px h-full
|
|
24984
|
+
horizontal: "h-px w-full",
|
|
24985
|
+
vertical: "w-px h-full"
|
|
24986
|
+
},
|
|
24987
|
+
// Line color (issue #485). `default` is the standard border token;
|
|
24988
|
+
// `subtle` uses the hairline `border-subtle` token for a lighter rule.
|
|
24989
|
+
// Keeping the color here (not in `orientation`) keeps every existing call
|
|
24990
|
+
// pixel-identical while adding the subtle option.
|
|
24991
|
+
tone: {
|
|
24992
|
+
default: "bg-border",
|
|
24993
|
+
subtle: "bg-border-subtle"
|
|
24956
24994
|
},
|
|
24957
24995
|
labeled: {
|
|
24958
24996
|
true: "flex items-center",
|
|
@@ -24961,31 +24999,35 @@ var separatorVariants = cva({
|
|
|
24961
24999
|
},
|
|
24962
25000
|
defaultVariants: {
|
|
24963
25001
|
orientation: "horizontal",
|
|
25002
|
+
tone: "default",
|
|
24964
25003
|
labeled: "false"
|
|
24965
25004
|
}
|
|
24966
25005
|
});
|
|
24967
25006
|
var separatorLineClass = "h-px flex-1 bg-border";
|
|
25007
|
+
var separatorSubtleLineClass = "h-px flex-1 bg-border-subtle";
|
|
24968
25008
|
var separatorLabelClass = "px-3 text-xs uppercase tracking-wide text-muted-foreground";
|
|
24969
25009
|
var Separator = React52__namespace.forwardRef(
|
|
24970
25010
|
function Separator2({
|
|
24971
25011
|
orientation = "horizontal",
|
|
25012
|
+
tone = "default",
|
|
24972
25013
|
label,
|
|
24973
25014
|
decorative = true,
|
|
24974
25015
|
className,
|
|
24975
25016
|
...props
|
|
24976
25017
|
}, ref) {
|
|
24977
25018
|
if (orientation === "horizontal" && label != null) {
|
|
25019
|
+
const lineClass = tone === "subtle" ? separatorSubtleLineClass : separatorLineClass;
|
|
24978
25020
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24979
25021
|
"div",
|
|
24980
25022
|
{
|
|
24981
25023
|
ref,
|
|
24982
25024
|
role: "none",
|
|
24983
|
-
className: cn(separatorVariants({ labeled: "true" }), className),
|
|
25025
|
+
className: cn(separatorVariants({ labeled: "true", tone }), className),
|
|
24984
25026
|
...props,
|
|
24985
25027
|
children: [
|
|
24986
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
25028
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: lineClass }),
|
|
24987
25029
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: separatorLabelClass, children: label }),
|
|
24988
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
25030
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: lineClass })
|
|
24989
25031
|
]
|
|
24990
25032
|
}
|
|
24991
25033
|
);
|
|
@@ -24998,7 +25040,7 @@ var Separator = React52__namespace.forwardRef(
|
|
|
24998
25040
|
"div",
|
|
24999
25041
|
{
|
|
25000
25042
|
ref,
|
|
25001
|
-
className: cn(separatorVariants({ orientation }), className),
|
|
25043
|
+
className: cn(separatorVariants({ orientation, tone }), className),
|
|
25002
25044
|
...ariaProps,
|
|
25003
25045
|
...dataAttributes,
|
|
25004
25046
|
...props
|
|
@@ -27707,6 +27749,8 @@ var stickyNoteVariants = cva({
|
|
|
27707
27749
|
"min-w-[160px] min-h-[120px]"
|
|
27708
27750
|
].join(" "),
|
|
27709
27751
|
variants: {
|
|
27752
|
+
// Named paper colors are product semantics (physical sticky notes),
|
|
27753
|
+
// not status tones — deliberately not routed through the theme tokens.
|
|
27710
27754
|
color: {
|
|
27711
27755
|
yellow: "bg-yellow-100 text-yellow-900",
|
|
27712
27756
|
pink: "bg-pink-100 text-pink-900",
|