@loworbitstudio/visor 1.57.0 → 1.59.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/CHANGELOG.json +7 -1
- package/dist/index.js +42 -0
- package/dist/registry.json +55 -31
- package/dist/visor-manifest.json +296 -27
- package/package.json +2 -2
package/dist/registry.json
CHANGED
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
{
|
|
92
92
|
"path": "components/ui/text/text.tsx",
|
|
93
93
|
"type": "registry:ui",
|
|
94
|
-
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./text.module.css\"\n\nconst textVariants = cva(styles.base, {\n variants: {\n size: {\n xs: styles.sizeXs,\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n xl: styles.sizeXl,\n },\n weight: {\n normal: styles.weightNormal,\n medium: styles.weightMedium,\n semibold: styles.weightSemibold,\n bold: styles.weightBold,\n },\n // `body` adds no class: .base already sets the body face, so unset renders as before.\n family: {\n body: \"\",\n mono: styles.familyMono,\n },\n color: {\n primary: styles.colorPrimary,\n secondary: styles.colorSecondary,\n tertiary: styles.colorTertiary,\n warning: styles.colorWarning,\n success: styles.colorSuccess,\n amber: styles.colorAmber,\n inherit: styles.colorInherit,\n },\n leading: {\n tight: styles.leadingTight,\n snug: styles.leadingSnug,\n normal: styles.leadingNormal,\n relaxed: styles.leadingRelaxed,\n loose: styles.leadingLoose,\n },\n },\n defaultVariants: {\n size: \"md\",\n weight: \"normal\",\n family: \"body\",\n color: \"primary\",\n leading: \"normal\",\n },\n})\n\nexport interface TextProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"color\">,\n VariantProps<typeof textVariants> {\n as?: \"p\" | \"span\" | \"div\" | \"label\"\n}\n\nconst Text = React.forwardRef<HTMLElement, TextProps>(\n ({ className, as: Tag = \"p\", size, weight, family, color, leading, ...props }, ref) => {\n return (\n <Tag\n ref={ref as React.Ref<never>}\n data-slot=\"text\"\n className={cn(textVariants({ size
|
|
94
|
+
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./text.module.css\"\n\nconst textVariants = cva(styles.base, {\n variants: {\n size: {\n xs: styles.sizeXs,\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n xl: styles.sizeXl,\n eyebrow: styles.sizeEyebrow,\n },\n weight: {\n normal: styles.weightNormal,\n medium: styles.weightMedium,\n semibold: styles.weightSemibold,\n bold: styles.weightBold,\n },\n // `body` adds no class: .base already sets the body face, so unset renders as before.\n family: {\n body: \"\",\n mono: styles.familyMono,\n },\n color: {\n primary: styles.colorPrimary,\n secondary: styles.colorSecondary,\n tertiary: styles.colorTertiary,\n warning: styles.colorWarning,\n success: styles.colorSuccess,\n amber: styles.colorAmber,\n inherit: styles.colorInherit,\n },\n leading: {\n tight: styles.leadingTight,\n snug: styles.leadingSnug,\n normal: styles.leadingNormal,\n relaxed: styles.leadingRelaxed,\n loose: styles.leadingLoose,\n },\n },\n defaultVariants: {\n size: \"md\",\n weight: \"normal\",\n family: \"body\",\n color: \"primary\",\n leading: \"normal\",\n },\n})\n\nexport interface TextProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"color\">,\n VariantProps<typeof textVariants> {\n as?: \"p\" | \"span\" | \"div\" | \"label\"\n}\n\nconst Text = React.forwardRef<HTMLElement, TextProps>(\n ({ className, as: Tag = \"p\", size, weight, family, color, leading, ...props }, ref) => {\n return (\n <Tag\n ref={ref as React.Ref<never>}\n data-slot=\"text\"\n className={cn(\n textVariants({\n size,\n // An eyebrow's weight and colour come from its own hooks unless the caller picks one.\n weight: size === \"eyebrow\" && weight === undefined ? null : weight,\n family,\n color: size === \"eyebrow\" && color === undefined ? null : color,\n leading,\n }),\n className,\n )}\n {...props}\n />\n )\n }\n)\nText.displayName = \"Text\"\n\nexport { Text, textVariants }\n"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"path": "components/ui/text/text.module.css",
|
|
98
98
|
"type": "registry:ui",
|
|
99
|
-
"content": "/* Text base styles */\n.base {\n font-family: var(--font-body, inherit);\n margin: 0;\n}\n\n/* Sizes\n * A theme sets each size's type size, case and tracking through\n * --text-<size>-* (VI-656). Case and tracking live in visor-base, below. */\n.sizeXs {\n font-size: var(--text-xs-font-size, var(--font-size-xs, 0.75rem));\n}\n\n.sizeSm {\n font-size: var(--text-sm-font-size, var(--font-size-sm, 0.875rem));\n}\n\n.sizeMd {\n font-size: var(--text-md-font-size, var(--font-size-base, 1rem));\n}\n\n.sizeLg {\n font-size: var(--text-lg-font-size, var(--font-size-lg, 1.125rem));\n}\n\n.sizeXl {\n font-size: var(--text-xl-font-size, var(--font-size-xl, 1.25rem));\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeXs {\n text-transform: var(--text-xs-text-transform, revert-layer);\n letter-spacing: var(--text-xs-letter-spacing, revert-layer);\n }\n\n .sizeSm {\n text-transform: var(--text-sm-text-transform, revert-layer);\n letter-spacing: var(--text-sm-letter-spacing, revert-layer);\n }\n\n .sizeMd {\n text-transform: var(--text-md-text-transform, revert-layer);\n letter-spacing: var(--text-md-letter-spacing, revert-layer);\n }\n\n .sizeLg {\n text-transform: var(--text-lg-text-transform, revert-layer);\n letter-spacing: var(--text-lg-letter-spacing, revert-layer);\n }\n\n .sizeXl {\n text-transform: var(--text-xl-text-transform, revert-layer);\n letter-spacing: var(--text-xl-letter-spacing, revert-layer);\n }\n}\n\n/* Weights */\n.weightNormal {\n font-weight: var(--font-weight-normal, 400);\n}\n\n.weightMedium {\n font-weight: var(--font-weight-medium, 500);\n}\n\n.weightSemibold {\n font-weight: var(--font-weight-semibold, 600);\n}\n\n.weightBold {\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Families. `body` is .base itself; mono swaps the face and composes with\n every size and weight (VI-715). */\n.familyMono {\n font-family: var(--font-mono, ui-monospace, monospace);\n}\n\n/* Colors */\n.colorPrimary {\n color: var(--text-primary, #111827);\n}\n\n.colorSecondary {\n color: var(--text-secondary, #6b7280);\n}\n\n.colorTertiary {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.colorWarning {\n color: var(--text-warning, #b45309);\n}\n\n.colorSuccess {\n color: var(--text-success, #15803d);\n}\n\n/* A second amber a theme can bind without moving `warning` (VI-715). */\n.colorAmber {\n color: var(--text-amber, var(--text-warning, #b45309));\n}\n\n.colorInherit {\n color: inherit;\n}\n\n/* Line height */\n.leadingTight {\n line-height: var(--line-height-tight, 1.25);\n}\n\n.leadingSnug {\n line-height: var(--line-height-snug, 1.375);\n}\n\n.leadingNormal {\n line-height: var(--line-height-normal, 1.5);\n}\n\n.leadingRelaxed {\n line-height: var(--line-height-relaxed, 1.625);\n}\n\n.leadingLoose {\n line-height: var(--line-height-loose, 2);\n}\n"
|
|
99
|
+
"content": "/* Text base styles */\n.base {\n font-family: var(--font-body, inherit);\n margin: 0;\n}\n\n/* Sizes\n * A theme sets each size's type size, case and tracking through\n * --text-<size>-* (VI-656). Case and tracking live in visor-base, below. */\n.sizeXs {\n font-size: var(--text-xs-font-size, var(--font-size-xs, 0.75rem));\n}\n\n.sizeSm {\n font-size: var(--text-sm-font-size, var(--font-size-sm, 0.875rem));\n}\n\n.sizeMd {\n font-size: var(--text-md-font-size, var(--font-size-base, 1rem));\n}\n\n.sizeLg {\n font-size: var(--text-lg-font-size, var(--font-size-lg, 1.125rem));\n}\n\n.sizeXl {\n font-size: var(--text-xl-font-size, var(--font-size-xl, 1.25rem));\n}\n\n/* An all-caps label above a section, with room for a leading dot or icon (VI-801).\n Text drops its default weight and colour classes for this size, so these hooks\n set them; a weight or colour the caller passes still applies. */\n.sizeEyebrow {\n display: flex;\n align-items: center;\n gap: var(--text-eyebrow-gap, var(--spacing-2, 0.5rem));\n font-size: var(--text-eyebrow-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--text-eyebrow-font-weight, var(--font-weight-semibold, 600));\n color: var(--text-eyebrow-color, var(--text-secondary, #6b7280));\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeXs {\n text-transform: var(--text-xs-text-transform, revert-layer);\n letter-spacing: var(--text-xs-letter-spacing, revert-layer);\n }\n\n .sizeSm {\n text-transform: var(--text-sm-text-transform, revert-layer);\n letter-spacing: var(--text-sm-letter-spacing, revert-layer);\n }\n\n .sizeMd {\n text-transform: var(--text-md-text-transform, revert-layer);\n letter-spacing: var(--text-md-letter-spacing, revert-layer);\n }\n\n .sizeLg {\n text-transform: var(--text-lg-text-transform, revert-layer);\n letter-spacing: var(--text-lg-letter-spacing, revert-layer);\n }\n\n .sizeXl {\n text-transform: var(--text-xl-text-transform, revert-layer);\n letter-spacing: var(--text-xl-letter-spacing, revert-layer);\n }\n\n /* PageHeader's eyebrow case and tracking. */\n .sizeEyebrow {\n text-transform: var(--text-eyebrow-text-transform, uppercase);\n letter-spacing: var(--text-eyebrow-letter-spacing, var(--letter-spacing-wide, 0.05em));\n }\n}\n\n/* Weights */\n.weightNormal {\n font-weight: var(--font-weight-normal, 400);\n}\n\n.weightMedium {\n font-weight: var(--font-weight-medium, 500);\n}\n\n.weightSemibold {\n font-weight: var(--font-weight-semibold, 600);\n}\n\n.weightBold {\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Families. `body` is .base itself; mono swaps the face and composes with\n every size and weight (VI-715). */\n.familyMono {\n font-family: var(--font-mono, ui-monospace, monospace);\n}\n\n/* Colors */\n.colorPrimary {\n color: var(--text-primary, #111827);\n}\n\n.colorSecondary {\n color: var(--text-secondary, #6b7280);\n}\n\n.colorTertiary {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.colorWarning {\n color: var(--text-warning, #b45309);\n}\n\n.colorSuccess {\n color: var(--text-success, #15803d);\n}\n\n/* A second amber a theme can bind without moving `warning` (VI-715). */\n.colorAmber {\n color: var(--text-amber, var(--text-warning, #b45309));\n}\n\n.colorInherit {\n color: inherit;\n}\n\n/* Line height */\n.leadingTight {\n line-height: var(--line-height-tight, 1.25);\n}\n\n.leadingSnug {\n line-height: var(--line-height-snug, 1.375);\n}\n\n.leadingNormal {\n line-height: var(--line-height-normal, 1.5);\n}\n\n.leadingRelaxed {\n line-height: var(--line-height-relaxed, 1.625);\n}\n\n.leadingLoose {\n line-height: var(--line-height-loose, 2);\n}\n"
|
|
100
100
|
}
|
|
101
101
|
]
|
|
102
102
|
},
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
{
|
|
123
123
|
"path": "components/ui/time-picker/time-picker.module.css",
|
|
124
124
|
"type": "registry:ui",
|
|
125
|
-
"content": "/* Field wrapper: the date-picker trigger anatomy, carrying a typeable input.\n Geometry matches Input at size sm so the two share a baseline in a row. */\n.field {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n height: 2.25rem;\n /* VI-655: the border only holds box geometry. The visible resting edge is an\n inset outline from the shared --control-edge-* tokens, so\n --control-edge-width: 0 removes it with no layout shift. */\n border: 1px solid transparent;\n border-radius: var(--radius-sm, 0.25rem);\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n color: var(--text-primary, #111827);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .field {\n background-color: var(--field-control-bg, var(--surface-card));\n height: 33.5px;\n border-radius: var(--radius-md);\n}\n\n@media (hover: hover) {\n .field:hover:not(:focus-within):not(.disabled):not(:has(.input[aria-invalid=\"true\"])) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch, so both stay visible with edges off. */\n.field:focus-within {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.field:has(.input[aria-invalid=\"true\"]) {\n outline-color: transparent;\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444);\n}\n\n.field:has(.input[aria-invalid=\"true\"]):focus-within {\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444),\n 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent);\n}\n\n.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.input {\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 0 var(--spacing-3, 0.75rem);\n border: 0;\n border-radius: inherit;\n outline: none;\n background: transparent;\n color: inherit;\n line-height: inherit;\n}\n\n.input::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n.input:disabled {\n pointer-events: none;\n}\n\n/* Clock button: the popover trigger. Keeps the field's own focus ring quiet\n until the button itself takes focus. */\n.trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n height: 100%;\n padding: 0 var(--spacing-3, 0.75rem);\n border: 0;\n border-radius: inherit;\n background: transparent;\n color: var(--text-secondary, #9ca3af);\n cursor: pointer;\n}\n\n.trigger:disabled {\n pointer-events: none;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:disabled) {\n color: var(--text-primary, #111827);\n }\n}\n\n.trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--focus-ring-width, 2px) var(--border-focus, #3b82f6);\n}\n\n/* Popover content */\n.content {\n z-index: 50;\n display: flex;\n font-family: var(--font-body, inherit);\n gap: var(--spacing-1, 0.25rem);\n padding: var(--spacing-1, 0.25rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n
|
|
125
|
+
"content": "/* Field wrapper: the date-picker trigger anatomy, carrying a typeable input.\n Geometry matches Input at size sm so the two share a baseline in a row. */\n.field {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n height: 2.25rem;\n /* VI-655: the border only holds box geometry. The visible resting edge is an\n inset outline from the shared --control-edge-* tokens, so\n --control-edge-width: 0 removes it with no layout shift. */\n border: 1px solid transparent;\n border-radius: var(--radius-sm, 0.25rem);\n background-color: var(--field-control-bg, var(--input-bg, var(--surface-interactive-default, #f9fafb)));\n color: var(--text-primary, #111827);\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1.5;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--input-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .field {\n background-color: var(--field-control-bg, var(--surface-card));\n height: 33.5px;\n border-radius: var(--radius-md);\n}\n\n@media (hover: hover) {\n .field:hover:not(:focus-within):not(.disabled):not(:has(.input[aria-invalid=\"true\"])) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch, so both stay visible with edges off. */\n.field:focus-within {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.field:has(.input[aria-invalid=\"true\"]) {\n outline-color: transparent;\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444);\n}\n\n.field:has(.input[aria-invalid=\"true\"]):focus-within {\n box-shadow: inset 0 0 0 1.5px var(--border-error, #ef4444),\n 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-error, #ef4444) 30%, transparent);\n}\n\n.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.input {\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 0 var(--spacing-3, 0.75rem);\n border: 0;\n border-radius: inherit;\n outline: none;\n background: transparent;\n color: inherit;\n line-height: inherit;\n}\n\n.input::placeholder {\n color: var(--input-placeholder-color, var(--text-secondary, #9ca3af));\n}\n\n.input:disabled {\n pointer-events: none;\n}\n\n/* Clock button: the popover trigger. Keeps the field's own focus ring quiet\n until the button itself takes focus. */\n.trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n height: 100%;\n padding: 0 var(--spacing-3, 0.75rem);\n border: 0;\n border-radius: inherit;\n background: transparent;\n color: var(--text-secondary, #9ca3af);\n cursor: pointer;\n}\n\n.trigger:disabled {\n pointer-events: none;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:disabled) {\n color: var(--text-primary, #111827);\n }\n}\n\n.trigger:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--focus-ring-width, 2px) var(--border-focus, #3b82f6);\n}\n\n/* Popover content */\n.content {\n z-index: 50;\n display: flex;\n font-family: var(--font-body, inherit);\n gap: var(--spacing-1, 0.25rem);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n box-shadow: var(--shadow-md);\n outline: var(--hairline-width, var(--stroke-width-thin, 1px)) solid var(--hairline-strong, #d1d5db);\n outline-offset: calc(-1 * var(--hairline-width, var(--stroke-width-thin, 1px)));\n}\n\n.column {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n max-height: 14rem;\n min-width: 3.25rem;\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n.option {\n flex-shrink: 0;\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);\n border: 0;\n /* Concentric with the list (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n background: transparent;\n color: var(--text-primary, #111827);\n font-size: var(--font-size-sm, 0.875rem);\n font-variant-numeric: tabular-nums;\n text-align: center;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .option:hover:not(.optionSelected) {\n background-color: var(--surface-subtle, #f3f4f6);\n }\n}\n\n.option:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 var(--focus-ring-width, 2px) var(--border-focus, #3b82f6);\n}\n\n.optionSelected {\n background-color: var(--primary, #6366f1);\n color: var(--interactive-primary-text, #f9fafb);\n}\n\n/* Label centring (VI-684): trim the input's inner line box to the capital band,\n as Input does. Without text-box support rendering is unchanged. */\n@supports (text-box: trim-both cap alphabetic) {\n .input {\n text-box: trim-both cap alphabetic;\n }\n}\n"
|
|
126
126
|
}
|
|
127
127
|
]
|
|
128
128
|
},
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
{
|
|
176
176
|
"path": "components/ui/button/button.module.css",
|
|
177
177
|
"type": "registry:ui",
|
|
178
|
-
"content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--button-icon-gap, var(--spacing-2, 0.5rem));\n white-space: nowrap;\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n cursor: pointer;\n /* VI-655: the border only holds box geometry and is always transparent. The\n faces that draw an edge (outline, gated, dlg ghost) draw it on ::after —\n see \"Edged faces\" below — so the button's own outline stays free for the\n focus ring. */\n border: 1px solid transparent;\n /* VI-807: one duration and curve for every property, so a theme can slow the\n grow, press and fill change together (the kit's 0.5s ease-out). */\n transition: background-color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), opacity var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), scale var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), box-shadow var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n text-decoration: none;\n outline: none;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n /* Slides an ArrowSwap child, as hover does. */\n --_button-swap: 1;\n}\n\n.base:active:not(:disabled) {\n transform: var(--button-press-transform, translateY(1px));\n transition-duration: var(--button-press-duration, 0s);\n}\n\n.base:disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Label (VI-682; shared spec: the label-centering doc under docs/). Bare text is wrapped in a block span whose line box is trimmed\n to the capital-height band, so the flex container centres the ink and not the\n font's ascent/descent (which put Product Sans ~1px high in a 40px button).\n Without text-box (Firefox) the span is a plain block and rendering is exactly\n what it was before. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n\n /* The compact dlg size is height:auto, so trimming would shrink its box. */\n .sizeDlg .label {\n text-box: normal;\n }\n}\n\n/* Blink only. Blink snaps the text baseline to a whole CSS px, which leaves the\n trimmed ink up to half a pixel off for fractional cap heights (12px type). The\n baseline lands at (box + cap) / 2; this hands back what the snap took. WebKit\n positions the baseline exactly, so correcting there would overshoot. The\n -apple-pay-button-style probe is the WebKit-only property that tells them apart. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n\n .sizeDlg .label {\n transform: none;\n }\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--button-default-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-default-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Hero (VI-699): the solid, special-moment face. Unset it is the default face. */\n.variantHero {\n background-color: var(--button-hero-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-hero-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.variantSecondary {\n background-color: var(--interactive-secondary-bg, #f3f4f6);\n color: var(--interactive-secondary-text, #111827);\n}\n\n/* Editorial density: secondary on the card tier, ghost truly transparent.\n * Direct values — the editorial design language owns control surfaces, so the\n * theme's --interactive-secondary-bg / --interactive-ghost-bg are deliberately\n * bypassed (matches the blessed overlay, which out-cascaded the palette). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--surface-card, #ffffff);\n}\n\n:global([data-density=\"editorial\"]) .variantGhost {\n background-color: transparent;\n}\n\n.variantOutline {\n background-color: transparent;\n color: var(--button-outline-text, var(--text-primary, #111827));\n}\n\n/* Edged faces (VI-655). The resting edge is an inset outline over the border\n box, on the shared --control-edge-* tokens, so --control-edge-width: 0 on any\n ancestor removes it with no layout shift. Each face sets only the colour, in\n the same source position its border-color used to hold. */\n.variantOutline,\n.base[data-gated=\"true\"],\n.sizeDlg.variantGhost {\n position: relative;\n}\n\n.variantOutline::after,\n.base[data-gated=\"true\"]::after,\n.sizeDlg.variantGhost::after {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: inherit;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) transparent;\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.variantOutline::after {\n outline-color: var(--control-edge-color, var(--border-strong, #e5e7eb));\n}\n\n.variantGhost {\n background-color: var(--interactive-ghost-bg, transparent);\n color: var(--button-ghost-text, var(--text-primary, #111827));\n}\n\n.variantDestructive {\n background-color: var(--interactive-destructive-bg, #ef4444);\n color: var(--interactive-destructive-text, #fef2f2);\n}\n\n/* Glass (VI-807): a control that turns to glass under the glass switch\n (data-glass=\"on\", VI-795) and is a solid ringed control everywhere else, the\n glass layer's documented control recipe. It reads the layer's shared control\n values, the same set ThemeToggle reads, so the blur exists only where glass\n is on. The prefixed\n backdrop-filter line comes first so Lightning CSS keeps both (VI-788). */\n.variantGlass {\n background-color: var(--glass-on-control-fill, var(--surface-subtle, #f3f4f6));\n color: var(--glass-on-control-ink, var(--text-primary, #111827));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--glass-on-control-ring, var(--border-default, #e5e7eb));\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n}\n\n@media (hover: hover) {\n .variantDefault:hover {\n background-color: var(--button-default-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantHero:hover {\n background-color: var(--button-hero-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantSecondary:hover {\n background-color: var(--interactive-secondary-bg-hover, #e5e7eb);\n }\n\n .variantOutline:hover {\n background-color: var(--button-outline-bg-hover, var(--surface-muted, #f3f4f6));\n }\n\n .variantGlass:hover {\n background-color: var(--glass-on-control-hover-fill, var(--surface-muted, #f3f4f6));\n }\n\n .variantGhost:hover {\n background-color: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--button-ghost-text-hover, var(--text-primary, #111827));\n }\n\n .sizeDlg.variantGhost:hover {\n color: var(--button-ghost-text-hover, var(--text-secondary, #6b7280));\n }\n\n .variantDestructive:hover {\n background-color: var(--interactive-destructive-bg-hover, #dc2626);\n }\n}\n\n/* Open / active state — ghost variant only. OPT-IN, strictly additive.\n A ghost Button reads as \"held\" while its popover/menu is open so the\n trigger no longer needs an inline style. Three opt-in triggers, all\n resolving to the same held look:\n - data-state=\"open\" — forwarded automatically by Radix when the\n Button is the trigger via <Trigger asChild> (Popover/DropdownMenu).\n - data-active=\"true\" — manual non-Radix triggers (mirrors the\n sidebar `data-active` convention).\n - .isActive — className opt-in (mirrors sidebar/section-nav).\n Default ghost rendering is untouched: none of these match unless a\n consumer explicitly sets them. Matches the prototype-overlay held look:\n background var(--surface-subtle), color var(--text-primary). */\n.variantGhost[data-state=\"open\"],\n.variantGhost[data-active=\"true\"],\n.variantGhost.isActive {\n background-color: var(--surface-subtle, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n/* Gated state — orthogonal to variant, works with all variants */\n.base[data-gated=\"true\"] {\n opacity: var(--opacity-40, 0.4);\n cursor: not-allowed;\n}\n\n.base[data-gated=\"true\"]::after {\n outline-color: var(--control-edge-color, var(--border-default, #e5e7eb));\n}\n\n/* Editorial density: gated reads like plain disabled (the blessed admin\n builds render gated actions at the 0.5 disabled opacity). */\n:global([data-density=\"editorial\"]) .base[data-gated=\"true\"] {\n opacity: 0.5;\n}\n\n/* Suppress active transform when gated */\n.base[data-gated=\"true\"]:active {\n transform: none;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Sizes\n Default (no data-density attr) rendering is byte-identical to the prior\n canonical values. Under data-density=\"editorial\" (set on any ancestor,\n typically the app root), the editorial density axis re-drives specific\n metrics to the blessed admin values.\n\n Type and rounding are theme hooks (VI-656, VI-663): --button-<size>-font-size,\n -font-weight, -text-transform, -letter-spacing and -radius set one size, and\n the unprefixed --button-font-weight / -text-transform / -letter-spacing /\n -radius set every size. Unset, each size keeps its shipped type size and rounding; case and\n tracking live in visor-base, after the dlg size. */\n.sizeSm {\n --label-box-height: 2rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-3, 0.75rem);\n font-size: var(--button-sm-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--button-sm-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-sm-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeMd {\n --label-box-height: 2.5rem;\n height: var(--button-md-height, var(--label-box-height));\n padding: var(--button-md-padding, 0 var(--spacing-4, 1rem));\n line-height: 1;\n font-size: var(--button-md-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--button-md-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n font-size: var(--button-sm-font-size, 0.8125rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n --label-box-height: 2.125rem;\n height: var(--label-box-height);\n line-height: normal;\n}\n\n.sizeLg {\n --label-box-height: 3rem;\n height: var(--button-lg-height, var(--label-box-height));\n padding: var(--button-lg-padding, 0 var(--spacing-6, 1.5rem));\n font-size: var(--button-lg-font-size, var(--font-size-base, 1rem));\n font-weight: var(--button-lg-font-weight, var(--button-font-weight, var(--font-weight-medium, 500)));\n border-radius: var(--button-lg-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n/* Dialog-footer button — dlg-btn (Animal dialog substrate, VI-620).\n Compact modal-action metrics measured from the AN prototype (11.5px / 600,\n ~7px 13px padding, 7px radius), normalized onto Visor tokens: font-size-2xs\n (11px), spacing-2/spacing-3 padding (8/12px), radius-lg (8px). Height is\n auto so the compact padding drives the box. Color faces reuse the existing\n variant axis — primary via variant=\"default\", ghost via variant=\"ghost\"\n (refined below to a hairline-outlined, secondary-ink face), danger via\n variant=\"destructive\" (refined below to a subtle-danger face). */\n.sizeDlg {\n height: auto;\n padding: var(--button-dlg-padding, var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem));\n font-size: var(--button-dlg-font-size, var(--font-size-2xs, 0.6875rem));\n font-weight: var(--button-dlg-font-weight, var(--button-font-weight, var(--font-weight-semibold, 600)));\n line-height: 1;\n border-radius: var(--button-dlg-radius, var(--button-radius, var(--radius-lg, 0.5rem)));\n}\n\n/* Icon-only button — a square mark around one glyph (VI-659). The box is the\n glyph plus a hit-target pad on every side, so width always equals height;\n --button-icon-size sets the glyph and --button-icon-pad the pad. A 1em glyph\n (Phosphor's default) takes the size from font-size; a glyph with its own\n width/height attributes is sized by the svg rule. No edge on ghost; on\n outline the edge is the shared ::after one, so --control-edge-width: 0 turns\n it off. */\n.sizeIcon {\n width: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n height: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n padding: 0;\n flex-shrink: 0;\n font-size: var(--button-icon-size, 1rem);\n border-radius: var(--button-icon-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeIcon > svg {\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n flex-shrink: 0;\n}\n\n/* Ghost icon ink — the mark sits beside what it acts on, so it rests quieter\n than a labelled ghost button and comes up to primary ink on hover. :where()\n keeps it at one-class weight, so the held (open / active) ghost rule above\n still wins. */\n:where(.sizeIcon).variantGhost {\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n}\n\n@media (hover: hover) {\n :where(.sizeIcon).variantGhost:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeSm {\n text-transform: var(--button-sm-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-sm-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeMd {\n text-transform: var(--button-md-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-md-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeLg {\n text-transform: var(--button-lg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-lg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeDlg {\n text-transform: var(--button-dlg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-dlg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n}\n\n/* Pill motion and lift (VI-807). The grow on hover and the press both use the\n scale property, apart from the press nudge on transform, so a theme can turn\n on the kit's grow (1.06) and press (0.97) without touching a consumer's own\n transform. The default face can carry a drop shadow that deepens on hover.\n Each falls back to revert-layer in visor-base, so an unbound theme renders\n as if these rules were absent and every consumer rule still wins. A busy or\n gated button holds still. */\n@layer visor-base {\n .variantDefault {\n box-shadow: var(--button-default-shadow, revert-layer);\n }\n\n .variantDefault:disabled {\n box-shadow: none;\n }\n\n @media (hover: hover) {\n .variantDefault:hover {\n box-shadow: var(--button-default-shadow-hover, var(--button-default-shadow, revert-layer));\n }\n\n .base:hover:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-hover-scale, revert-layer);\n }\n }\n\n .base:active:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-press-scale, revert-layer);\n }\n}\n\n/* Arrow swap (VI-807): two arrows in a one-arrow window. At rest a right arrow's\n track sits half left, showing its second arrow; on the button's hover or\n keyboard focus it slides right, so the first arrow arrives as the second\n leaves. A left arrow is the mirror. */\n.arrowSwap {\n display: inline-flex;\n flex: none;\n width: 1em;\n height: 1em;\n overflow: hidden;\n}\n\n.arrowTrack {\n display: flex;\n flex: none;\n width: 2em;\n transform: translateX(calc(-50% + 50% * var(--_button-swap, 0)));\n transition: transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n}\n\n.arrowTrack > svg {\n flex: none;\n width: 1em;\n height: 1em;\n}\n\n.arrowSwap[data-direction=\"left\"] .arrowTrack {\n transform: translateX(calc(-50% * var(--_button-swap, 0)));\n}\n\n/* The button's hover (and its keyboard focus, in the focus-ring rule at the\n top) sets the swap to 1. */\n@media (hover: hover) {\n .base:hover {\n --_button-swap: 1;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .arrowTrack {\n transition: none;\n }\n}\n\n/* dlg ghost — transparent well with a hairline outline + secondary ink\n (AN dlg-btn ghost face: transparent / --ink-60 / 1px --hair). Two-class\n specificity keeps this scoped to the dlg size only. */\n.sizeDlg.variantGhost {\n color: var(--button-ghost-text, var(--text-secondary, #6b7280));\n}\n\n.sizeDlg.variantGhost::after {\n outline-color: var(--control-edge-color, var(--hairline, var(--border-default, #e5e7eb)));\n}\n\n/* dlg danger — subtle-danger face (AN dlg-btn danger face: --red on a faint\n red fill), distinct from the solid `destructive` variant. */\n.sizeDlg.variantDestructive {\n background-color: var(--button-dlg-destructive-bg, var(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent)));\n color: var(--button-dlg-destructive-text, var(--text-error, var(--destructive, #b91c1c)));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: var(--button-dlg-destructive-bg-hover, color-mix(in srgb, var(--destructive, #ef4444) 14%, transparent));\n }\n}\n\n/* Pending state — orthogonal to variant and size (VI-643).\n The idle children stay in the box at zero opacity so the control keeps its\n width, its height and its accessible name; the busy glyph paints over them\n in an absolutely-positioned overlay. A pending state that reflows has not\n fixed the defect it exists for, which is why nothing here is a leading slot\n that adds width.\n\n Themes tune the two timings via --button-pending-delay and\n --button-pending-min-duration. Neither is declared here on purpose: an\n element-level declaration shadows anything a theme emits on :root (VI-625). */\n.base[data-pending=\"true\"] {\n position: relative;\n cursor: progress;\n}\n\n/* No press dip while the action is in flight — the button is not accepting\n the click, so it must not pretend to. */\n.base[data-pending=\"true\"]:active {\n transform: none;\n transition: none;\n}\n\n/* Geometry holder. Mirrors .base's own flex metrics so wrapping the children\n does not change how they lay out. */\n.pendingLabel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n opacity: 0;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pendingOverlay {\n position: absolute;\n inset: 0;\n box-sizing: border-box;\n padding: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n pointer-events: none;\n}\n\n/* Clamped, so a pending label longer than the idle one can never widen the\n box it is being held inside. */\n.pendingText {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n"
|
|
178
|
+
"content": "/* Button base styles */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--button-icon-gap, var(--spacing-2, 0.5rem));\n white-space: nowrap;\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n cursor: pointer;\n /* VI-655: the border only holds box geometry and is always transparent. The\n faces that draw an edge (outline, gated, dlg ghost) draw it on ::after —\n see \"Edged faces\" below — so the button's own outline stays free for the\n focus ring. */\n border: 1px solid transparent;\n /* VI-807: one duration and curve for every property, so a theme can slow the\n grow, press and fill change together (the kit's 0.5s ease-out). */\n transition: background-color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), color var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), opacity var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), scale var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out)), box-shadow var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n text-decoration: none;\n outline: none;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n /* Slides an ArrowSwap child, as hover does. */\n --_button-swap: 1;\n}\n\n.base:active:not(:disabled) {\n transform: var(--button-press-transform, translateY(1px));\n transition-duration: var(--button-press-duration, 0s);\n}\n\n.base:disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Label (VI-682; shared spec: the label-centering doc under docs/). Bare text is wrapped in a block span whose line box is trimmed\n to the capital-height band, so the flex container centres the ink and not the\n font's ascent/descent (which put Product Sans ~1px high in a 40px button).\n Without text-box (Firefox) the span is a plain block and rendering is exactly\n what it was before. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n\n /* The compact dlg size is height:auto, so trimming would shrink its box. */\n .sizeDlg .label {\n text-box: normal;\n }\n}\n\n/* Blink only. Blink snaps the text baseline to a whole CSS px, which leaves the\n trimmed ink up to half a pixel off for fractional cap heights (12px type). The\n baseline lands at (box + cap) / 2; this hands back what the snap took. WebKit\n positions the baseline exactly, so correcting there would overshoot. The\n -apple-pay-button-style probe is the WebKit-only property that tells them apart. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n\n .sizeDlg .label {\n transform: none;\n }\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--button-default-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-default-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Hero (VI-699): the solid, special-moment face. Unset it is the default face. */\n.variantHero {\n background-color: var(--button-hero-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--button-hero-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.variantSecondary {\n background-color: var(--interactive-secondary-bg, #f3f4f6);\n color: var(--interactive-secondary-text, #111827);\n}\n\n/* Editorial density: secondary on the card tier, ghost truly transparent.\n * Direct values — the editorial design language owns control surfaces, so the\n * theme's --interactive-secondary-bg / --interactive-ghost-bg are deliberately\n * bypassed (matches the blessed overlay, which out-cascaded the palette). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--surface-card, #ffffff);\n}\n\n:global([data-density=\"editorial\"]) .variantGhost {\n background-color: transparent;\n}\n\n.variantOutline {\n background-color: var(--button-outline-bg, transparent);\n color: var(--button-outline-text, var(--text-primary, #111827));\n -webkit-backdrop-filter: var(--button-outline-backdrop-filter, none);\n backdrop-filter: var(--button-outline-backdrop-filter, none);\n /* VI-824: outline-only padding and weight. The size rules read these first;\n unbound they are invalid, so each size keeps its own padding and weight. */\n --_button-padding: var(--button-outline-padding);\n --_button-font-weight: var(--button-outline-font-weight);\n}\n\n/* Edged faces (VI-655). The resting edge is an inset outline over the border\n box, on the shared --control-edge-* tokens, so --control-edge-width: 0 on any\n ancestor removes it with no layout shift. Each face sets only the colour, in\n the same source position its border-color used to hold. */\n.variantOutline,\n.base[data-gated=\"true\"],\n.sizeDlg.variantGhost {\n position: relative;\n}\n\n.variantOutline::after,\n.base[data-gated=\"true\"]::after,\n.sizeDlg.variantGhost::after {\n content: \"\";\n position: absolute;\n inset: -1px;\n border-radius: inherit;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) transparent;\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.variantOutline::after {\n outline-color: var(--button-outline-ring-color, var(--control-edge-color, var(--border-strong, #e5e7eb)));\n}\n\n.variantGhost {\n background-color: var(--interactive-ghost-bg, transparent);\n color: var(--button-ghost-text, var(--text-primary, #111827));\n}\n\n.variantDestructive {\n background-color: var(--interactive-destructive-bg, #ef4444);\n color: var(--interactive-destructive-text, #fef2f2);\n}\n\n/* Glass (VI-807): a control that turns to glass under the glass switch\n (data-glass=\"on\", VI-795) and is a solid ringed control everywhere else, the\n glass layer's documented control recipe. It reads the layer's shared control\n values, the same set ThemeToggle reads, so the blur exists only where glass\n is on. The prefixed\n backdrop-filter line comes first so Lightning CSS keeps both (VI-788). */\n.variantGlass {\n background-color: var(--glass-on-control-fill, var(--surface-subtle, #f3f4f6));\n color: var(--glass-on-control-ink, var(--text-primary, #111827));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--glass-on-control-ring, var(--border-default, #e5e7eb));\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n}\n\n@media (hover: hover) {\n .variantDefault:hover {\n background-color: var(--button-default-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantHero:hover {\n background-color: var(--button-hero-bg-hover, var(--interactive-primary-bg-hover, #1f2937));\n }\n\n .variantSecondary:hover {\n background-color: var(--interactive-secondary-bg-hover, #e5e7eb);\n }\n\n .variantOutline:hover {\n background-color: var(--button-outline-bg-hover, var(--surface-muted, #f3f4f6));\n }\n\n .variantGlass:hover {\n background-color: var(--glass-on-control-hover-fill, var(--surface-muted, #f3f4f6));\n }\n\n .variantGhost:hover {\n background-color: var(--interactive-ghost-bg-hover, var(--surface-muted, #f3f4f6));\n color: var(--button-ghost-text-hover, var(--text-primary, #111827));\n }\n\n .sizeDlg.variantGhost:hover {\n color: var(--button-ghost-text-hover, var(--text-secondary, #6b7280));\n }\n\n .variantDestructive:hover {\n background-color: var(--interactive-destructive-bg-hover, #dc2626);\n }\n}\n\n/* Open / active state — ghost variant only. OPT-IN, strictly additive.\n A ghost Button reads as \"held\" while its popover/menu is open so the\n trigger no longer needs an inline style. Three opt-in triggers, all\n resolving to the same held look:\n - data-state=\"open\" — forwarded automatically by Radix when the\n Button is the trigger via <Trigger asChild> (Popover/DropdownMenu).\n - data-active=\"true\" — manual non-Radix triggers (mirrors the\n sidebar `data-active` convention).\n - .isActive — className opt-in (mirrors sidebar/section-nav).\n Default ghost rendering is untouched: none of these match unless a\n consumer explicitly sets them. Matches the prototype-overlay held look:\n background var(--surface-subtle), color var(--text-primary). */\n.variantGhost[data-state=\"open\"],\n.variantGhost[data-active=\"true\"],\n.variantGhost.isActive {\n background-color: var(--surface-subtle, var(--surface-muted, #f3f4f6));\n color: var(--text-primary, #111827);\n}\n\n/* Gated state — orthogonal to variant, works with all variants */\n.base[data-gated=\"true\"] {\n opacity: var(--opacity-40, 0.4);\n cursor: not-allowed;\n}\n\n.base[data-gated=\"true\"]::after {\n outline-color: var(--control-edge-color, var(--border-default, #e5e7eb));\n}\n\n/* Editorial density: gated reads like plain disabled (the blessed admin\n builds render gated actions at the 0.5 disabled opacity). */\n:global([data-density=\"editorial\"]) .base[data-gated=\"true\"] {\n opacity: 0.5;\n}\n\n/* Suppress active transform when gated */\n.base[data-gated=\"true\"]:active {\n transform: none;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Sizes\n Default (no data-density attr) rendering is byte-identical to the prior\n canonical values. Under data-density=\"editorial\" (set on any ancestor,\n typically the app root), the editorial density axis re-drives specific\n metrics to the blessed admin values.\n\n Type and rounding are theme hooks (VI-656, VI-663): --button-<size>-font-size,\n -font-weight, -text-transform, -letter-spacing and -radius set one size, and\n the unprefixed --button-font-weight / -text-transform / -letter-spacing /\n -radius set every size. Unset, each size keeps its shipped type size and rounding; case and\n tracking live in visor-base, after the dlg size. */\n.sizeSm {\n --label-box-height: 2rem;\n height: var(--label-box-height);\n padding: var(--_button-padding, 0 var(--spacing-3, 0.75rem));\n font-size: var(--button-sm-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--_button-font-weight, var(--button-sm-font-weight, var(--button-font-weight, var(--font-weight-medium, 500))));\n border-radius: var(--button-sm-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeMd {\n --label-box-height: 2.5rem;\n height: var(--button-md-height, var(--label-box-height));\n padding: var(--_button-padding, var(--button-md-padding, 0 var(--spacing-4, 1rem)));\n line-height: 1;\n font-size: var(--button-md-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--_button-font-weight, var(--button-md-font-weight, var(--button-font-weight, var(--font-weight-medium, 500))));\n border-radius: var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n:global([data-density=\"editorial\"]) .sizeSm {\n font-size: var(--button-sm-font-size, 0.8125rem);\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n --label-box-height: 2.125rem;\n height: var(--label-box-height);\n line-height: normal;\n}\n\n.sizeLg {\n --label-box-height: 3rem;\n height: var(--button-lg-height, var(--label-box-height));\n padding: var(--_button-padding, var(--button-lg-padding, 0 var(--spacing-6, 1.5rem)));\n font-size: var(--button-lg-font-size, var(--font-size-base, 1rem));\n font-weight: var(--_button-font-weight, var(--button-lg-font-weight, var(--button-font-weight, var(--font-weight-medium, 500))));\n border-radius: var(--button-lg-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n/* Dialog-footer button — dlg-btn (Animal dialog substrate, VI-620).\n Compact modal-action metrics measured from the AN prototype (11.5px / 600,\n ~7px 13px padding, 7px radius), normalized onto Visor tokens: font-size-2xs\n (11px), spacing-2/spacing-3 padding (8/12px), radius-lg (8px). Height is\n auto so the compact padding drives the box. Color faces reuse the existing\n variant axis — primary via variant=\"default\", ghost via variant=\"ghost\"\n (refined below to a hairline-outlined, secondary-ink face), danger via\n variant=\"destructive\" (refined below to a subtle-danger face). */\n.sizeDlg {\n height: auto;\n padding: var(--_button-padding, var(--button-dlg-padding, var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem)));\n font-size: var(--button-dlg-font-size, var(--font-size-2xs, 0.6875rem));\n font-weight: var(--_button-font-weight, var(--button-dlg-font-weight, var(--button-font-weight, var(--font-weight-semibold, 600))));\n line-height: 1;\n border-radius: var(--button-dlg-radius, var(--button-radius, var(--radius-lg, 0.5rem)));\n}\n\n/* Icon-only button — a square mark around one glyph (VI-659). The box is the\n glyph plus a hit-target pad on every side, so width always equals height;\n --button-icon-size sets the glyph and --button-icon-pad the pad. A 1em glyph\n (Phosphor's default) takes the size from font-size; a glyph with its own\n width/height attributes is sized by the svg rule. No edge on ghost; on\n outline the edge is the shared ::after one, so --control-edge-width: 0 turns\n it off. */\n.sizeIcon {\n width: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n height: calc(var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem)));\n padding: 0;\n flex-shrink: 0;\n font-size: var(--button-icon-size, 1rem);\n border-radius: var(--button-icon-radius, var(--button-radius, var(--radius-md, 0.375rem)));\n}\n\n.sizeIcon > svg {\n width: var(--button-icon-size, 1rem);\n height: var(--button-icon-size, 1rem);\n flex-shrink: 0;\n}\n\n/* Ghost icon ink — the mark sits beside what it acts on, so it rests quieter\n than a labelled ghost button and comes up to primary ink on hover. :where()\n keeps it at one-class weight, so the held (open / active) ghost rule above\n still wins. */\n:where(.sizeIcon).variantGhost {\n color: var(--button-icon-ghost-color, var(--text-secondary, #6b7280));\n}\n\n@media (hover: hover) {\n :where(.sizeIcon).variantGhost:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n/* Case and tracking are inherited properties, so any unlayered fallback would\n override something: `inherit` beats a layered utility, `revert-layer` drops\n an unlayered consumer rule. In visor-base, the lowest Visor layer (the reset's),\n every consumer rule still wins, and when the hook is unset revert-layer\n leaves the element exactly as if these declarations were absent. */\n@layer visor-base {\n .sizeSm {\n text-transform: var(--button-sm-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-sm-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeMd {\n text-transform: var(--button-md-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-md-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeLg {\n text-transform: var(--button-lg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-lg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n\n .sizeDlg {\n text-transform: var(--button-dlg-text-transform, var(--button-text-transform, revert-layer));\n letter-spacing: var(--button-dlg-letter-spacing, var(--button-letter-spacing, revert-layer));\n }\n}\n\n/* Pill motion and lift (VI-807). The grow on hover and the press both use the\n scale property, apart from the press nudge on transform, so a theme can turn\n on the kit's grow (1.06) and press (0.97) without touching a consumer's own\n transform. The default face can carry a drop shadow that deepens on hover.\n Each falls back to revert-layer in visor-base, so an unbound theme renders\n as if these rules were absent and every consumer rule still wins. A busy or\n gated button holds still. */\n@layer visor-base {\n .variantDefault {\n box-shadow: var(--button-default-shadow, revert-layer);\n }\n\n .variantDefault:disabled {\n box-shadow: none;\n }\n\n @media (hover: hover) {\n .variantDefault:hover {\n box-shadow: var(--button-default-shadow-hover, var(--button-default-shadow, revert-layer));\n }\n\n .base:hover:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-hover-scale, revert-layer);\n }\n }\n\n .base:active:not(:disabled, [aria-busy=\"true\"], [aria-disabled=\"true\"]) {\n scale: var(--button-press-scale, revert-layer);\n }\n}\n\n/* Arrow swap (VI-807): two arrows in a one-arrow window. At rest a right arrow's\n track sits half left, showing its second arrow; on the button's hover or\n keyboard focus it slides right, so the first arrow arrives as the second\n leaves. A left arrow is the mirror. */\n.arrowSwap {\n display: inline-flex;\n flex: none;\n width: 1em;\n height: 1em;\n overflow: hidden;\n}\n\n.arrowTrack {\n display: flex;\n flex: none;\n width: 2em;\n transform: translateX(calc(-50% + 50% * var(--_button-swap, 0)));\n transition: transform var(--button-motion-duration, var(--motion-duration-150, 150ms)) var(--button-motion-easing, var(--motion-easing-default, ease-in-out));\n}\n\n.arrowTrack > svg {\n flex: none;\n width: 1em;\n height: 1em;\n}\n\n.arrowSwap[data-direction=\"left\"] .arrowTrack {\n transform: translateX(calc(-50% * var(--_button-swap, 0)));\n}\n\n/* The button's hover (and its keyboard focus, in the focus-ring rule at the\n top) sets the swap to 1. */\n@media (hover: hover) {\n .base:hover {\n --_button-swap: 1;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .arrowTrack {\n transition: none;\n }\n}\n\n/* dlg ghost — transparent well with a hairline outline + secondary ink\n (AN dlg-btn ghost face: transparent / --ink-60 / 1px --hair). Two-class\n specificity keeps this scoped to the dlg size only. */\n.sizeDlg.variantGhost {\n color: var(--button-ghost-text, var(--text-secondary, #6b7280));\n}\n\n.sizeDlg.variantGhost::after {\n outline-color: var(--control-edge-color, var(--hairline, var(--border-default, #e5e7eb)));\n}\n\n/* dlg danger — subtle-danger face (AN dlg-btn danger face: --red on a faint\n red fill), distinct from the solid `destructive` variant. */\n.sizeDlg.variantDestructive {\n background-color: var(--button-dlg-destructive-bg, var(--surface-error-subtle, color-mix(in srgb, var(--destructive, #ef4444) 8%, transparent)));\n color: var(--button-dlg-destructive-text, var(--text-error, var(--destructive, #b91c1c)));\n}\n\n@media (hover: hover) {\n .sizeDlg.variantDestructive:hover {\n background-color: var(--button-dlg-destructive-bg-hover, color-mix(in srgb, var(--destructive, #ef4444) 14%, transparent));\n }\n}\n\n/* Pending state — orthogonal to variant and size (VI-643).\n The idle children stay in the box at zero opacity so the control keeps its\n width, its height and its accessible name; the busy glyph paints over them\n in an absolutely-positioned overlay. A pending state that reflows has not\n fixed the defect it exists for, which is why nothing here is a leading slot\n that adds width.\n\n Themes tune the two timings via --button-pending-delay and\n --button-pending-min-duration. Neither is declared here on purpose: an\n element-level declaration shadows anything a theme emits on :root (VI-625). */\n.base[data-pending=\"true\"] {\n position: relative;\n cursor: progress;\n}\n\n/* No press dip while the action is in flight — the button is not accepting\n the click, so it must not pretend to. */\n.base[data-pending=\"true\"]:active {\n transform: none;\n transition: none;\n}\n\n/* Geometry holder. Mirrors .base's own flex metrics so wrapping the children\n does not change how they lay out. */\n.pendingLabel {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n opacity: 0;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.pendingOverlay {\n position: absolute;\n inset: 0;\n box-sizing: border-box;\n padding: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-2, 0.5rem);\n pointer-events: none;\n}\n\n/* Clamped, so a pending label longer than the idle one can never widen the\n box it is being held inside. */\n.pendingText {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the button draws the theme's squircle from\n --squircle-radius and --squircle-clip. Each size sets --squircle-r, its\n radius clamped to half its height. Chromium and round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .sizeSm {\n --squircle-r: min(var(--button-sm-radius, var(--button-radius, var(--radius-md, 0.375rem))), calc(var(--label-box-height) / 2));\n }\n\n .sizeMd {\n --squircle-r: min(var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem))), calc(var(--button-md-height, var(--label-box-height)) / 2));\n }\n\n :global([data-density=\"editorial\"]) .sizeMd {\n --squircle-r: min(var(--button-md-radius, var(--button-radius, var(--radius-md, 0.375rem))), calc(var(--label-box-height) / 2));\n }\n\n .sizeLg {\n --squircle-r: min(var(--button-lg-radius, var(--button-radius, var(--radius-md, 0.375rem))), calc(var(--button-lg-height, var(--label-box-height)) / 2));\n }\n\n /* Height is the text plus the default padding and border. */\n .sizeDlg {\n --squircle-r: min(var(--button-dlg-radius, var(--button-radius, var(--radius-lg, 0.5rem))), calc((1lh + 2 * var(--spacing-2, 0.5rem) + 2px) / 2));\n }\n\n .sizeIcon {\n --squircle-r: min(var(--button-icon-radius, var(--button-radius, var(--radius-md, 0.375rem))), calc((var(--button-icon-size, 1rem) + 2 * var(--button-icon-pad, var(--spacing-2, 0.5rem))) / 2));\n }\n\n /* The faces that draw an edge draw it on ::after, as the squircle ring: a\n square outline thick enough to cover the ring's corners, clipped to it. */\n .variantOutline,\n .base[data-gated=\"true\"],\n .sizeDlg.variantGhost {\n --squircle-edge: var(--control-edge-width, 1px);\n }\n\n .variantGlass {\n --squircle-edge: var(--stroke-width-thin, 1px);\n }\n\n .base {\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n .variantOutline::after,\n .base[data-gated=\"true\"]::after,\n .sizeDlg.variantGhost::after {\n --squircle-r: inherit;\n --squircle-edge: inherit;\n border-radius: var(--squircle-ring-radius, var(--squircle-r));\n outline-width: var(--squircle-ring-paint, var(--control-edge-width, 1px));\n outline-offset: calc(-1 * var(--squircle-ring-paint, var(--control-edge-width, 1px)));\n clip-path: var(--squircle-ring, none);\n }\n }\n}\n"
|
|
179
179
|
}
|
|
180
180
|
]
|
|
181
181
|
},
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
{
|
|
330
330
|
"path": "components/ui/select/select.module.css",
|
|
331
331
|
"type": "registry:ui",
|
|
332
|
-
"content": "/* Select Trigger */\n.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n width: fit-content;\n border-radius: var(--radius-md, 0.375rem);\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n /* Match Input's line-height so the trigger's height tracks the text field at\n the same size. Without this the trigger inherited line-height 2.0, rendering\n ~7px taller than a same-size Input. */\n line-height: 1.5;\n white-space: nowrap;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--select-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.trigger:focus-visible {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.trigger[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--control-invalid-ring-color, var(--border-error, #ef4444));\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent));\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb))));\n}\n\n.trigger[data-placeholder] {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Borderless trigger variant (opt-in via <SelectTrigger variant=\"borderless\">).\n *\n * Closed trigger has no resting edge and sits on --field-control-bg — the same\n * shared form-control surface role Input uses — so a borderless Select matches a\n * borderless Input inside an in-dialog form context that sets\n * --field-control-bg: var(--surface-subtle). Default Select is unchanged. The\n * edge is made transparent (rather than removed) so the trigger's box size\n * stays identical to the default trigger and the focus ring keeps its geometry.\n * Declared after the base .trigger so these overrides win the cascade. */\n.triggerBorderless {\n outline-color: transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n /* In-form borderless selects match the Input they sit beside: full width and\n the same md height/padding (the prototype paired select and input controls inside its field rows). */\n width: 100%;\n padding: var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem);\n}\n\n@media (hover: hover) {\n .triggerBorderless:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: transparent;\n }\n}\n\n.triggerBorderless:focus-visible {\n outline-color: transparent;\n box-shadow: 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n:global([data-density=\"editorial\"]) .trigger {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .trigger[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--surface-card)));\n}\n\n:global([data-density=\"editorial\"]) .triggerBorderless {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.triggerSizeSm {\n --label-box-height: 2.25rem; /* VI-684: outer height, for the label correction */\n height: var(--label-box-height);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.triggerSizeMd {\n --label-box-height: var(--select-height, calc(1lh + var(--spacing-3_5, 0.875rem) * 2 + 2px));\n height: var(--select-height, auto);\n padding: var(--select-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--select-radius, var(--radius-sm, 0.5rem));\n}\n\n.triggerSizeLg {\n --label-box-height: calc(1lh + var(--spacing-4_5, 1.125rem) * 2 + 2px);\n height: auto;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n\n.triggerIcon {\n pointer-events: none;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Content */\n.content {\n position: relative;\n z-index: 50;\n max-height: var(--radix-select-content-available-height, 300px);\n min-width: 9rem;\n overflow: hidden;\n
|
|
332
|
+
"content": "/* Select Trigger */\n.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n width: fit-content;\n border-radius: var(--radius-md, 0.375rem);\n /* VI-655: transparent geometry border; the visible resting edge is an inset\n outline from the shared --control-edge-* tokens (as Input does). */\n border: 1px solid transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n /* Match Input's line-height so the trigger's height tracks the text field at\n the same size. Without this the trigger inherited line-height 2.0, rendering\n ~7px taller than a same-size Input. */\n line-height: 1.5;\n white-space: nowrap;\n color: var(--text-primary, #111827);\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--select-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .trigger:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus and invalid draw at --control-state-edge-width, which the edge switch\n does not touch. */\n.trigger:focus-visible {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.trigger[aria-invalid=\"true\"] {\n /* VI-663: ring and halo widths are theme keys; unset they are the state\n edge and the focus ring, as before. */\n outline: var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)) solid var(--control-invalid-ring-color, var(--border-error, #ef4444));\n outline-offset: calc(-1 * var(--control-invalid-ring-width, var(--control-state-edge-width, 1px)));\n box-shadow: 0 0 0 var(--control-invalid-halo-width, var(--focus-ring-width, 2px)) var(--control-invalid-halo-color, color-mix(in srgb, var(--border-error, #ef4444) 15%, transparent));\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb))));\n}\n\n.trigger[data-placeholder] {\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Borderless trigger variant (opt-in via <SelectTrigger variant=\"borderless\">).\n *\n * Closed trigger has no resting edge and sits on --field-control-bg — the same\n * shared form-control surface role Input uses — so a borderless Select matches a\n * borderless Input inside an in-dialog form context that sets\n * --field-control-bg: var(--surface-subtle). Default Select is unchanged. The\n * edge is made transparent (rather than removed) so the trigger's box size\n * stays identical to the default trigger and the focus ring keeps its geometry.\n * Declared after the base .trigger so these overrides win the cascade. */\n.triggerBorderless {\n outline-color: transparent;\n background-color: var(--field-control-bg, var(--select-bg, var(--surface-interactive-default, #f9fafb)));\n /* In-form borderless selects match the Input they sit beside: full width and\n the same md height/padding (the prototype paired select and input controls inside its field rows). */\n width: 100%;\n padding: var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem);\n}\n\n@media (hover: hover) {\n .triggerBorderless:hover:not(:focus-visible):not(:disabled):not([aria-invalid=\"true\"]) {\n outline-color: transparent;\n }\n}\n\n.triggerBorderless:focus-visible {\n outline-color: transparent;\n box-shadow: 0 0 0 var(--control-focus-halo-width, var(--focus-ring-width, 2px)) var(--control-focus-halo-color, color-mix(in srgb, var(--border-focus, #111827) 15%, transparent));\n}\n\n:global([data-density=\"editorial\"]) .trigger {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n:global([data-density=\"editorial\"]) .trigger[aria-invalid=\"true\"] {\n background-color: var(--input-bg-invalid, var(--field-control-bg, var(--surface-card)));\n}\n\n:global([data-density=\"editorial\"]) .triggerBorderless {\n background-color: var(--field-control-bg, var(--surface-card));\n}\n\n.triggerSizeSm {\n --label-box-height: 2.25rem; /* VI-684: outer height, for the label correction */\n height: var(--label-box-height);\n border-radius: var(--radius-sm, 0.25rem);\n}\n\n.triggerSizeMd {\n --label-box-height: var(--select-height, calc(1lh + var(--spacing-3_5, 0.875rem) * 2 + 2px));\n height: var(--select-height, auto);\n padding: var(--select-padding, var(--spacing-3_5, 0.875rem) var(--spacing-4, 1rem));\n font-size: var(--font-size-sm, 0.875rem);\n border-radius: var(--select-radius, var(--radius-sm, 0.5rem));\n}\n\n.triggerSizeLg {\n --label-box-height: calc(1lh + var(--spacing-4_5, 1.125rem) * 2 + 2px);\n height: auto;\n padding: var(--spacing-4_5, 1.125rem) var(--spacing-5, 1.25rem);\n font-size: var(--font-size-base, 1rem);\n border-radius: var(--radius-sm, 0.5rem);\n}\n\n.triggerIcon {\n pointer-events: none;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Content */\n.content {\n position: relative;\n z-index: 50;\n max-height: var(--radix-select-content-available-height, 300px);\n min-width: 9rem;\n overflow: hidden;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n}\n\n/* Select Viewport */\n.viewport {\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n}\n\n.viewportPopper {\n height: var(--radix-select-trigger-height);\n width: 100%;\n min-width: var(--radix-select-trigger-width);\n}\n\n/* Select Label */\n.label {\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Select Item */\n.item {\n position: relative;\n display: flex;\n width: 100%;\n cursor: default;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-8, 2rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n user-select: none;\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemIndicatorWrapper {\n position: absolute;\n right: 0.5rem;\n display: flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n}\n\n.itemIndicatorIcon {\n width: 0.875rem;\n height: 0.875rem;\n pointer-events: none;\n}\n\n/* Select Separator */\n.separator {\n pointer-events: none;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n height: 1px;\n background-color: var(--border-default, #e5e7eb);\n}\n\n/* Scroll Buttons */\n.scrollButton {\n display: flex;\n cursor: default;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-1, 0.25rem);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n}\n\n.scrollButtonIcon {\n width: 1rem;\n height: 1rem;\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The value (or\n placeholder) span's line box is trimmed to the capital-to-baseline band, so\n the flex trigger centres the ink and not the font's ascent/descent.\n padding-block hands back the room the trim took, so the trigger's box is\n unchanged. Without text-box (Firefox) rendering is exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .trigger > span {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the trigger's outer height (--label-box-height, per size\n above). WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .trigger > span {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
|
|
333
333
|
}
|
|
334
334
|
]
|
|
335
335
|
},
|
|
@@ -455,7 +455,7 @@
|
|
|
455
455
|
{
|
|
456
456
|
"path": "components/ui/badge/badge.module.css",
|
|
457
457
|
"type": "registry:ui",
|
|
458
|
-
"content": "/* Badge base — sizing (height, padding, font-size, gap) is driven by the\n * size classes below. Height is intrinsic (padding + line-height) so badges\n * stay correct when text wraps or icon slots are introduced. */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n flex-shrink: 0;\n /* Not hidden (VI-684): a descender or an accent in a short badge is taller than its line box, and a clip cuts it. The badge is fit-content, so there is no overflow to hide. */\n overflow: visible;\n border-radius: var(--badge-radius, var(--radius-full, 9999px));\n border: var(--badge-border, 1px solid transparent);\n line-height: 1;\n /* Typography defaults. Under data-density=\"editorial\" on any ancestor,\n the density rules below override to uppercase/heavier/tracked.\n VI-625: the D3 Tier-2 badge treatment (--badge-text-transform /\n -letter-spacing / -font-size / -font-weight) is bound here. */\n font-family: var(--badge-font-family, inherit);\n font-weight: var(--badge-font-weight, var(--font-weight-medium, 500));\n text-transform: var(--badge-text-transform, none);\n letter-spacing: var(--badge-letter-spacing, normal);\n white-space: nowrap;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Editorial density: uppercase + heavier + tracked. Any ancestor with\n * data-density=\"editorial\" (for example the app root) activates this. */\n:global([data-density=\"editorial\"]) .base {\n /* Theme-invariant: the editorial treatment runs 600 even when a theme maps\n --font-weight-semibold heavier (entr: 700). density-literal */\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n/* Editorial density opt-out: sizeLg is intrinsically a label (never tag),\n * and caseSentence lets sm/md opt out per-usage. Both must win over the\n * editorial .base rule above (same specificity, placed after). */\n:global([data-density=\"editorial\"]) .sizeLg,\n:global([data-density=\"editorial\"]) .caseSentence {\n text-transform: none;\n letter-spacing: 0;\n}\n\n/* uppercase prop — directly sets text-transform so it composes cleanly with\n * the density axis. Specificity (0,2,0), placed after .base, wins over default. */\n.base.uppercase {\n text-transform: uppercase;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Sizes — token-driven padding + font-size + gap on the 4px grid.\n * No --spacing-1.5 token exists, so the 6px step uses\n * calc(--spacing-1 + --spacing-1/2) — mirrors the pattern used in kbd. */\n.sizeSm {\n --label-box-height: 1lh; /* VI-684: outer height, for the label correction (padding-block 0) */\n gap: var(--spacing-1, 0.25rem);\n padding: 0 calc(var(--spacing-1, 0.25rem) + var(--spacing-1, 0.25rem) / 2);\n font-size: var(--font-size-xs, 0.75rem);\n}\n\n/* md — matches canonical rendering (1.25rem total height). Under\n data-density=\"editorial\", font-size steps down to 11px. A theme binding\n --badge-font-size retunes BOTH steps, which is the point: the badge type\n size becomes one dial instead of two. */\n.sizeMd {\n --label-box-height: calc(1lh + var(--spacing-1, 0.25rem)); /* default padding-block is --spacing-1 / 2 twice; re-bind with --badge-md-padding */\n gap: var(--badge-md-gap, var(--spacing-1, 0.25rem));\n padding: var(--badge-md-padding, calc(var(--spacing-1, 0.25rem) / 2) var(--spacing-2, 0.5rem));\n font-size: var(--badge-font-size, var(--font-size-xs, 0.75rem));\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n font-size: var(--badge-font-size, 11px);\n}\n\n.sizeLg {\n --label-box-height: calc(1lh + 2 * var(--spacing-1, 0.25rem));\n gap: calc(var(--spacing-1, 0.25rem) + var(--spacing-1, 0.25rem) / 2);\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n}\n\n/* Sentence case — opt OUT of any uppercase/tracking applied by the density\n * axis or the uppercase prop. The large size always opts out (it is\n * intrinsically a label); the .caseSentence class lets sm/md opt out\n * per-usage. The editorial-density opt-out mirror lives above, after the\n * editorial .base rule, ensuring it wins at equal specificity. */\n.sizeLg,\n.caseSentence {\n text-transform: none;\n letter-spacing: 0;\n}\n\n/* Icon scaling — leading glyphs track the per-size font-size step. */\n.sizeSm > svg {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n.sizeMd > svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n.sizeLg > svg {\n width: 1rem;\n height: 1rem;\n}\n\n/* Variants\n * VI-661: every variant reads its ground and ink through --badge-bg /\n * --badge-ink, falling back to the value it shipped with. Set either on a\n * badge or any ancestor to tint one badge (an on-image scrim, a status tint)\n * without a variant per tint; with neither set nothing changes. */\n.variantDefault {\n background-color: var(--badge-bg, var(--interactive-primary-bg, currentColor));\n color: var(--badge-ink, var(--interactive-primary-text, var(--text-inverse, #f9fafb)));\n border-color: transparent;\n}\n\n.variantSecondary {\n background-color: var(--badge-bg, var(--interactive-secondary-bg, var(--surface-subtle, transparent)));\n color: var(--badge-ink, var(--interactive-secondary-text, var(--text-primary, currentColor)));\n border-color: transparent;\n}\n\n/* Editorial density: secondary surfaces sit on the card tier. Direct value —\n * the editorial design language owns control surfaces, so the theme's\n * --interactive-secondary-bg is deliberately bypassed (matches the blessed\n * overlay, which out-cascaded the palette at :root). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--badge-bg, var(--surface-card, #ffffff));\n}\n\n.variantOutline {\n background-color: var(--badge-bg, transparent);\n color: var(--badge-ink, var(--text-primary, #111827));\n border-color: var(--border-default, #e5e7eb);\n}\n\n/* Tonal variants — canonical surface tokens as plain values. Under\n * data-density=\"editorial\", backgrounds switch to color-mix tints for\n * higher saturation at editorial admin density. Text colors are unchanged. */\n.variantDestructive {\n background-color: var(--badge-bg, var(--surface-error-subtle, transparent));\n color: var(--badge-ink, var(--text-error, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantDestructive {\n background-color: var(--badge-bg, color-mix(in srgb, var(--destructive) 20%, transparent));\n}\n\n.variantSuccess {\n background-color: var(--badge-bg, var(--surface-success-subtle, transparent));\n color: var(--badge-ink, var(--text-success, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantSuccess {\n background-color: var(--badge-bg, color-mix(in srgb, var(--success) 18%, transparent));\n}\n\n.variantWarning {\n background-color: var(--badge-bg, var(--surface-warning-subtle, transparent));\n color: var(--badge-ink, var(--text-warning, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantWarning {\n background-color: var(--badge-bg, color-mix(in srgb, var(--warning) 20%, transparent));\n}\n\n.variantInfo {\n background-color: var(--badge-bg, var(--surface-info-subtle, transparent));\n color: var(--badge-ink, var(--text-info, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantInfo {\n background-color: var(--badge-bg, color-mix(in srgb, var(--info) 18%, transparent));\n}\n\n.variantNeutral {\n background-color: var(--badge-bg, var(--surface-muted, #f3f4f6));\n color: var(--badge-ink, var(--text-secondary, var(--text-primary, #374151)));\n border-color: transparent;\n}\n\n/* Filled variants — step 9 bg + contrast text */\n.variantFilledDestructive {\n background-color: var(--badge-bg, var(--surface-error-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledSuccess {\n background-color: var(--badge-bg, var(--surface-success-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledWarning {\n background-color: var(--badge-bg, var(--surface-warning-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledInfo {\n background-color: var(--badge-bg, var(--surface-info-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n/* filled-neutral — the saturated counterpart to `neutral`. Neutral has no\n * brand `-default` surface, so it uses a fixed neutral-600 fill. Because that\n * fill is dark in BOTH modes, text must stay white (not `--text-inverse`,\n * which flips to a dark value in dark mode). */\n.variantFilledNeutral {\n background-color: var(--badge-bg, var(--color-neutral-600, #4b5563));\n color: var(--badge-ink, var(--color-white, #ffffff));\n border-color: transparent;\n}\n\n/* Icon-only — a circular, fixed-square chip carrying a single centered glyph\n * (for example the filled-success check used by the Roles matrix active cell +\n * legend). Zero padding and a fixed glyph size keep it crisp at any density.\n * The glyph centers via the base flex; per-size svg rules are overridden here. */\n.iconOnly {\n width: 1.375rem;\n height: 1.375rem;\n min-width: 1.375rem;\n padding: 0;\n gap: 0;\n border-radius: var(--radius-full, 9999px);\n}\n\n.iconOnly > svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label's line\n box is trimmed to the capital-to-baseline band, so the flex container centres\n the ink and not the font's ascent/descent. padding-block hands back the room\n the trim took, so the badge's intrinsic height is unchanged. Without text-box\n (Firefox) the span is a plain block and rendering is exactly what it was. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the control's outer height (--label-box-height, set per size\n above; left unset, the correction is simply off). WebKit places the baseline\n exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
|
|
458
|
+
"content": "/* Badge base — sizing (height, padding, font-size, gap) is driven by the\n * size classes below. Height is intrinsic (padding + line-height) so badges\n * stay correct when text wraps or icon slots are introduced. */\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n flex-shrink: 0;\n /* Not hidden (VI-684): a descender or an accent in a short badge is taller than its line box, and a clip cuts it. The badge is fit-content, so there is no overflow to hide. */\n overflow: visible;\n border-radius: var(--badge-radius, var(--radius-full, 9999px));\n border: var(--badge-border, 1px solid transparent);\n line-height: 1;\n /* Typography defaults. Under data-density=\"editorial\" on any ancestor,\n the density rules below override to uppercase/heavier/tracked.\n VI-625: the D3 Tier-2 badge treatment (--badge-text-transform /\n -letter-spacing / -font-size / -font-weight) is bound here. */\n font-family: var(--badge-font-family, inherit);\n font-weight: var(--badge-font-weight, var(--font-weight-medium, 500));\n text-transform: var(--badge-text-transform, none);\n letter-spacing: var(--badge-letter-spacing, normal);\n white-space: nowrap;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Editorial density: uppercase + heavier + tracked. Any ancestor with\n * data-density=\"editorial\" (for example the app root) activates this. */\n:global([data-density=\"editorial\"]) .base {\n /* Theme-invariant: the editorial treatment runs 600 even when a theme maps\n --font-weight-semibold heavier (entr: 700). density-literal */\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n/* Editorial density opt-out: sizeLg is intrinsically a label (never tag),\n * and caseSentence lets sm/md opt out per-usage. Both must win over the\n * editorial .base rule above (same specificity, placed after). */\n:global([data-density=\"editorial\"]) .sizeLg,\n:global([data-density=\"editorial\"]) .caseSentence {\n text-transform: none;\n letter-spacing: 0;\n}\n\n/* uppercase prop — directly sets text-transform so it composes cleanly with\n * the density axis. Specificity (0,2,0), placed after .base, wins over default. */\n.base.uppercase {\n text-transform: uppercase;\n}\n\n.base:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Sizes — token-driven padding + font-size + gap on the 4px grid.\n * No --spacing-1.5 token exists, so the 6px step uses\n * calc(--spacing-1 + --spacing-1/2) — mirrors the pattern used in kbd. */\n.sizeSm {\n --label-box-height: 1lh; /* VI-684: outer height, for the label correction (padding-block 0) */\n gap: var(--spacing-1, 0.25rem);\n padding: 0 calc(var(--spacing-1, 0.25rem) + var(--spacing-1, 0.25rem) / 2);\n font-size: var(--font-size-xs, 0.75rem);\n}\n\n/* md — matches canonical rendering (1.25rem total height). Under\n data-density=\"editorial\", font-size steps down to 11px. A theme binding\n --badge-font-size retunes BOTH steps, which is the point: the badge type\n size becomes one dial instead of two. */\n.sizeMd {\n --label-box-height: calc(1lh + var(--spacing-1, 0.25rem)); /* default padding-block is --spacing-1 / 2 twice; re-bind with --badge-md-padding */\n gap: var(--badge-md-gap, var(--spacing-1, 0.25rem));\n padding: var(--badge-md-padding, calc(var(--spacing-1, 0.25rem) / 2) var(--spacing-2, 0.5rem));\n font-size: var(--badge-font-size, var(--font-size-xs, 0.75rem));\n}\n\n:global([data-density=\"editorial\"]) .sizeMd {\n font-size: var(--badge-font-size, 11px);\n}\n\n.sizeLg {\n --label-box-height: calc(1lh + 2 * var(--spacing-1, 0.25rem));\n gap: calc(var(--spacing-1, 0.25rem) + var(--spacing-1, 0.25rem) / 2);\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n}\n\n/* Sentence case — opt OUT of any uppercase/tracking applied by the density\n * axis or the uppercase prop. The large size always opts out (it is\n * intrinsically a label); the .caseSentence class lets sm/md opt out\n * per-usage. The editorial-density opt-out mirror lives above, after the\n * editorial .base rule, ensuring it wins at equal specificity. */\n.sizeLg,\n.caseSentence {\n text-transform: none;\n letter-spacing: 0;\n}\n\n/* Icon scaling — leading glyphs track the per-size font-size step. */\n.sizeSm > svg {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n.sizeMd > svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n.sizeLg > svg {\n width: 1rem;\n height: 1rem;\n}\n\n/* Variants\n * VI-661: every variant reads its ground and ink through --badge-bg /\n * --badge-ink, falling back to the value it shipped with. Set either on a\n * badge or any ancestor to tint one badge (an on-image scrim, a status tint)\n * without a variant per tint; with neither set nothing changes. */\n.variantDefault {\n background-color: var(--badge-bg, var(--interactive-primary-bg, currentColor));\n color: var(--badge-ink, var(--interactive-primary-text, var(--text-inverse, #f9fafb)));\n border-color: transparent;\n}\n\n.variantSecondary {\n background-color: var(--badge-bg, var(--interactive-secondary-bg, var(--surface-subtle, transparent)));\n color: var(--badge-ink, var(--interactive-secondary-text, var(--text-primary, currentColor)));\n border-color: transparent;\n}\n\n/* Editorial density: secondary surfaces sit on the card tier. Direct value —\n * the editorial design language owns control surfaces, so the theme's\n * --interactive-secondary-bg is deliberately bypassed (matches the blessed\n * overlay, which out-cascaded the palette at :root). */\n:global([data-density=\"editorial\"]) .variantSecondary {\n background-color: var(--badge-bg, var(--surface-card, #ffffff));\n}\n\n.variantOutline {\n background-color: var(--badge-bg, transparent);\n color: var(--badge-ink, var(--text-primary, #111827));\n border-color: var(--border-default, #e5e7eb);\n}\n\n/* Tonal variants — canonical surface tokens as plain values. Under\n * data-density=\"editorial\", backgrounds switch to color-mix tints for\n * higher saturation at editorial admin density. Text colors are unchanged. */\n.variantDestructive {\n background-color: var(--badge-bg, var(--surface-error-subtle, transparent));\n color: var(--badge-ink, var(--text-error, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantDestructive {\n background-color: var(--badge-bg, color-mix(in srgb, var(--destructive) 20%, transparent));\n}\n\n.variantSuccess {\n background-color: var(--badge-bg, var(--surface-success-subtle, transparent));\n color: var(--badge-ink, var(--text-success, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantSuccess {\n background-color: var(--badge-bg, color-mix(in srgb, var(--success) 18%, transparent));\n}\n\n.variantWarning {\n background-color: var(--badge-bg, var(--surface-warning-subtle, transparent));\n color: var(--badge-ink, var(--text-warning, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantWarning {\n background-color: var(--badge-bg, color-mix(in srgb, var(--warning) 20%, transparent));\n}\n\n.variantInfo {\n background-color: var(--badge-bg, var(--surface-info-subtle, transparent));\n color: var(--badge-ink, var(--text-info, currentColor));\n border-color: transparent;\n}\n\n:global([data-density=\"editorial\"]) .variantInfo {\n background-color: var(--badge-bg, color-mix(in srgb, var(--info) 18%, transparent));\n}\n\n.variantNeutral {\n background-color: var(--badge-bg, var(--surface-muted, #f3f4f6));\n color: var(--badge-ink, var(--text-secondary, var(--text-primary, #374151)));\n border-color: transparent;\n}\n\n/* Filled variants — step 9 bg + contrast text */\n.variantFilledDestructive {\n background-color: var(--badge-bg, var(--surface-error-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledSuccess {\n background-color: var(--badge-bg, var(--surface-success-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledWarning {\n background-color: var(--badge-bg, var(--surface-warning-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n.variantFilledInfo {\n background-color: var(--badge-bg, var(--surface-info-default, transparent));\n color: var(--badge-ink, var(--text-inverse, currentColor));\n border-color: transparent;\n}\n\n/* filled-neutral — the saturated counterpart to `neutral`. Neutral has no\n * brand `-default` surface, so it uses a fixed neutral-600 fill. Because that\n * fill is dark in BOTH modes, text must stay white (not `--text-inverse`,\n * which flips to a dark value in dark mode). */\n.variantFilledNeutral {\n background-color: var(--badge-bg, var(--color-neutral-600, #4b5563));\n color: var(--badge-ink, var(--color-white, #ffffff));\n border-color: transparent;\n}\n\n/* Icon-only — a circular, fixed-square chip carrying a single centered glyph\n * (for example the filled-success check used by the Roles matrix active cell +\n * legend). Zero padding and a fixed glyph size keep it crisp at any density.\n * The glyph centers via the base flex; per-size svg rules are overridden here. */\n.iconOnly {\n width: 1.375rem;\n height: 1.375rem;\n min-width: 1.375rem;\n padding: 0;\n gap: 0;\n border-radius: var(--radius-full, 9999px);\n}\n\n.iconOnly > svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label's line\n box is trimmed to the capital-to-baseline band, so the flex container centres\n the ink and not the font's ascent/descent. padding-block hands back the room\n the trim took, so the badge's intrinsic height is unchanged. Without text-box\n (Firefox) the span is a plain block and rendering is exactly what it was. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the control's outer height (--label-box-height, set per size\n above; left unset, the correction is simply off). WebKit places the baseline\n exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the badge draws the theme's squircle from\n --squircle-radius and --squircle-clip, its radius clamped to half its outer\n height (--label-box-height). Chromium and round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .base {\n --squircle-edge: 1px;\n --squircle-r: min(var(--badge-radius, var(--radius-full, 9999px)), calc(var(--label-box-height) / 2));\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n }\n}\n"
|
|
459
459
|
}
|
|
460
460
|
]
|
|
461
461
|
},
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
{
|
|
503
503
|
"path": "components/ui/chip/chip.module.css",
|
|
504
504
|
"type": "registry:ui",
|
|
505
|
-
"content": "/* Chip base */\n.base {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n width: fit-content;\n flex-shrink: 0;\n border-radius: var(--chip-radius, var(--radius-full, 9999px));\n /* VI-655: the border only holds box geometry. The visible edge is drawn on\n ::after (below) so the chip's own outline stays free for the focus ring. */\n border: var(--stroke-width-thin, 1px) solid transparent;\n background-color: var(--chip-bg, var(--surface-card, #ffffff));\n color: var(--chip-text-color, var(--text-primary, #111827));\n font-family: var(--chip-font-family, var(--font-body, inherit));\n font-weight: var(--chip-font-weight, var(--font-weight-medium, 500));\n letter-spacing: var(--chip-letter-spacing, inherit);\n text-transform: var(--chip-text-transform, inherit);\n white-space: nowrap;\n user-select: none;\n transition:\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* The chip's edge: an inset outline over the border box, on the shared\n --control-edge-* tokens, so --control-edge-width: 0 on any ancestor removes\n it with no layout shift. Each variant sets only the colour; the outlined\n variant's colour is the per-component override, --chip-border. */\n.base::after {\n content: \"\";\n position: absolute;\n inset: calc(-1 * var(--stroke-width-thin, 1px));\n border-radius: inherit;\n outline: var(--control-edge-width, var(--stroke-width-thin, 1px)) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, var(--stroke-width-thin, 1px)));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Variant: default (filled/tonal surface) */\n.variantDefault {\n background-color: var(--surface-muted, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.variantDefault::after {\n outline-color: transparent;\n}\n\n/* Variant: outlined */\n.variantOutlined {\n background-color: transparent;\n color: var(--text-primary, #111827);\n}\n\n.variantOutlined::after {\n outline-color: var(--chip-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n}\n\n/* Variant: filled-primary — saturated brand-essence chip treatment.\n * Primary background + primary-text foreground + subtle shadow.\n * 700 weight + slight negative tracking assert \"this IS a brand value\".\n * Use when the chip must carry primary brand prominence — essence chips\n * on the Brand Workbench Elicit canvas, strategy surfaces, brand decks. */\n.variantFilledPrimary {\n background-color: var(--primary, #111827);\n color: var(--primary-text, #f9fafb);\n font-weight: 700;\n letter-spacing: -0.01em;\n box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));\n}\n\n.variantFilledPrimary::after {\n outline-color: transparent;\n}\n\n/* Sizes */\n.sizeSm {\n --label-box-height: var(--chip-sm-height, 1.5rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-sm-padding-x, var(--spacing-2, 0.5rem));\n font-size: var(--chip-sm-font-size, var(--font-size-xs, 0.75rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n.sizeMd {\n --label-box-height: var(--chip-md-height, 2rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-md-padding-x, var(--spacing-3, 0.75rem));\n font-size: var(--chip-md-font-size, var(--font-size-sm, 0.875rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n/* Editorial density: tighter font + gap for md chips. */\n:global([data-density=\"editorial\"]) .sizeMd {\n font-size: var(--font-size-xs);\n gap: var(--spacing-2);\n}\n\n.sizeLg {\n --label-box-height: var(--chip-lg-height, 2.5rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-lg-padding-x, var(--spacing-4, 1rem));\n font-size: var(--chip-lg-font-size, var(--font-size-base, 1rem));\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Sub-parts */\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.leadingIcon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.deleteButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n border: none;\n padding: 0;\n cursor: pointer;\n color: var(--text-secondary, #6b7280);\n border-radius: var(--radius-full, 9999px);\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n width: 1rem;\n height: 1rem;\n}\n\n@media (hover: hover) {\n .deleteButton:hover {\n color: var(--text-primary, #111827);\n background-color: color-mix(in srgb, var(--surface-interactive-hover, #f3f4f6) 60%, transparent);\n }\n}\n\n.deleteButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #6b7280);\n outline-offset: var(--focus-ring-offset, 1px);\n}\n\n.deleteIcon {\n display: block;\n}\n\n/* Count pill (FilterChip only). Under data-density=\"editorial\", it renders\n as a fixed circular semibold pill. */\n.count {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: auto;\n height: auto;\n border-radius: var(--radius-full, 9999px);\n padding: 0 var(--spacing-2, 0.5rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n align-self: baseline;\n}\n\n:global([data-density=\"editorial\"]) .count {\n min-width: 1.25rem;\n height: 1.25rem;\n padding-inline: var(--spacing-1);\n font-weight: var(--font-weight-semibold);\n align-self: center;\n}\n\n.countNeutral {\n background-color: var(--surface-muted, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.countPrimary {\n background-color: var(--surface-accent-subtle, #eff6ff);\n color: var(--text-link, #2563eb);\n}\n\n/* Accent selected state overrides count pill (default behaviour). */\n.selected .count {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-link, #2563eb);\n}\n\n/* Editorial density: selected count uses solid primary pill. */\n:global([data-density=\"editorial\"]) .selected .count {\n background-color: var(--primary);\n color: var(--primary-text);\n}\n\n/* Solid mint count pill — editorial/neutral selected treatment */\n.countSolid {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n/* Trailing icon (FilterChip dropdown caret) — muted, after the count. */\n.trailing {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: var(--text-tertiary, #9ca3af);\n font-size: 0.875rem;\n line-height: 1;\n}\n\n/* Interactive chips (ChoiceChip, FilterChip) */\n.interactive {\n cursor: pointer;\n border: var(--stroke-width-thin, 1px) solid transparent;\n}\n\n.interactive::after {\n outline-color: transparent;\n}\n\nbutton.base,\n.interactive {\n /* Inherit base layout; add button-specific resets */\n text-align: left;\n appearance: none;\n -webkit-appearance: none;\n}\n\n.interactive:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-40, 0.4);\n pointer-events: none;\n}\n\n.interactive:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #6b7280);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n@media (hover: hover) {\n .interactive:hover:not(:disabled):not([data-selected=\"true\"]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n\n .interactive:hover:not(:disabled):not([data-selected=\"true\"])::after {\n outline-color: var(--border-default, #e5e7eb);\n }\n}\n\n.interactive:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n/* Selected state. Under data-density=\"editorial\", switches to neutral-elevated\n treatment (surface-elev bg + transparent border + primary text). */\n.selected {\n background-color: var(--chip-selected-bg, var(--surface-accent-subtle, #eff6ff));\n color: var(--chip-selected-text-color, var(--text-link, #2563eb));\n}\n\n.selected::after {\n outline-color: var(--chip-selected-border-color, var(--surface-accent-default, #3b82f6));\n}\n\n/* Editorial density: neutral-elevated selected treatment.\n --surface-elev is a theme role; the color-mix fallback matches how the\n retired overlay derived it. */\n:global([data-density=\"editorial\"]) .selected {\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n color: var(--text-primary);\n}\n\n:global([data-density=\"editorial\"]) .selected::after {\n outline-color: transparent;\n}\n\n@media (hover: hover) {\n .interactive.selected:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--surface-accent-subtle, #eff6ff) 80%, var(--surface-interactive-hover, #f3f4f6) 20%);\n }\n}\n\n/* Editorial / neutral-elevated selected treatment\n * Uses --surface-card bg + neutral edge instead of accent tint.\n * Compose with .selected to override the accent colours. */\n.selectedNeutral {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n.selectedNeutral::after {\n outline-color: var(--border-strong, #d1d5db);\n}\n\n/* Re-assert selectedNeutral under editorial density: the density .selected rule\n * is (0,2,0) and would otherwise override .selectedNeutral at (0,1,0). */\n:global([data-density=\"editorial\"]) .selectedNeutral {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .selectedNeutral::after {\n outline-color: var(--border-strong, #d1d5db);\n}\n\n.selectedNeutral .count {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n/* Re-assert selectedNeutral count under editorial density: the density\n * .selected .count rule at (0,3,0) would otherwise override at (0,2,0). */\n:global([data-density=\"editorial\"]) .selectedNeutral .count {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n@media (hover: hover) {\n .interactive.selectedNeutral:hover:not(:disabled) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n}\n\n/* FilterChip resting (unselected) surface. Under editorial density, uses\n --surface-elev so the filter row reads as one consistent elevated set. */\n.filterChip[data-selected=\"false\"] {\n background-color: var(--surface-muted, #f3f4f6);\n}\n\n:global([data-density=\"editorial\"]) .filterChip[data-selected=\"false\"] {\n background-color: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label's line\n box is trimmed to the capital-to-baseline band, so the flex container centres\n the ink and not the font's ascent/descent. padding-block hands back the room\n the trim took, so the box is unchanged. The label is overflow: hidden for its\n ellipsis, and that clips against the trimmed line box, so accents above the\n cap height and descenders below the baseline would be cut: the extra\n padding-block, cancelled by the negative margin-block, widens the clip box\n without changing the layout box. Without text-box (Firefox) rendering is\n exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2 + 0.3em);\n margin-block: -0.3em;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
|
|
505
|
+
"content": "/* Chip base */\n.base {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n width: fit-content;\n flex-shrink: 0;\n border-radius: var(--chip-radius, var(--radius-full, 9999px));\n /* VI-655: the border only holds box geometry. The visible edge is drawn on\n ::after (below) so the chip's own outline stays free for the focus ring. */\n border: var(--stroke-width-thin, 1px) solid transparent;\n background-color: var(--chip-bg, var(--surface-card, #ffffff));\n color: var(--chip-text-color, var(--text-primary, #111827));\n font-family: var(--chip-font-family, var(--font-body, inherit));\n font-weight: var(--chip-font-weight, var(--font-weight-medium, 500));\n letter-spacing: var(--chip-letter-spacing, inherit);\n text-transform: var(--chip-text-transform, inherit);\n white-space: nowrap;\n user-select: none;\n transition:\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* The chip's edge: an inset outline over the border box, on the shared\n --control-edge-* tokens, so --control-edge-width: 0 on any ancestor removes\n it with no layout shift. Each variant sets only the colour; the outlined\n variant's colour is the per-component override, --chip-border. */\n.base::after {\n content: \"\";\n position: absolute;\n inset: calc(-1 * var(--stroke-width-thin, 1px));\n border-radius: inherit;\n outline: var(--control-edge-width, var(--stroke-width-thin, 1px)) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, var(--stroke-width-thin, 1px)));\n pointer-events: none;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Variant: default (filled/tonal surface) */\n/* VI-801: the default variant reads the chip's own fill and ink hooks, falling\n back to what it drew before, so a theme binding the chip family's bg and text-color\n reaches the chips most callers render. */\n.variantDefault {\n background-color: var(--chip-bg, var(--surface-muted, #f3f4f6));\n color: var(--chip-text-color, var(--text-primary, #111827));\n}\n\n.variantDefault::after {\n outline-color: transparent;\n}\n\n/* Variant: outlined */\n.variantOutlined {\n background-color: transparent;\n color: var(--text-primary, #111827);\n}\n\n.variantOutlined::after {\n outline-color: var(--chip-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n}\n\n/* Variant: filled-primary — saturated brand-essence chip treatment.\n * Primary background + primary-text foreground + subtle shadow.\n * 700 weight + slight negative tracking assert \"this IS a brand value\".\n * Use when the chip must carry primary brand prominence — essence chips\n * on the Brand Workbench Elicit canvas, strategy surfaces, brand decks. */\n.variantFilledPrimary {\n background-color: var(--primary, #111827);\n color: var(--primary-text, #f9fafb);\n font-weight: 700;\n letter-spacing: -0.01em;\n box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));\n}\n\n.variantFilledPrimary::after {\n outline-color: transparent;\n}\n\n/* Sizes */\n.sizeSm {\n --label-box-height: var(--chip-sm-height, 1.5rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-sm-padding-x, var(--spacing-2, 0.5rem));\n font-size: var(--chip-sm-font-size, var(--font-size-xs, 0.75rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n.sizeMd {\n --label-box-height: var(--chip-md-height, 2rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-md-padding-x, var(--spacing-3, 0.75rem));\n font-size: var(--chip-md-font-size, var(--font-size-sm, 0.875rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n/* Editorial density: tighter font + gap for md chips. */\n:global([data-density=\"editorial\"]) .sizeMd {\n font-size: var(--font-size-xs);\n gap: var(--spacing-2);\n}\n\n.sizeLg {\n --label-box-height: var(--chip-lg-height, 2.5rem);\n height: var(--label-box-height);\n padding: 0 var(--chip-lg-padding-x, var(--spacing-4, 1rem));\n font-size: var(--chip-lg-font-size, var(--font-size-base, 1rem));\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Sub-parts */\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.leadingIcon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.deleteButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n background: transparent;\n border: none;\n padding: 0;\n cursor: pointer;\n color: var(--text-secondary, #6b7280);\n border-radius: var(--radius-full, 9999px);\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n width: 1rem;\n height: 1rem;\n}\n\n@media (hover: hover) {\n .deleteButton:hover {\n color: var(--text-primary, #111827);\n background-color: color-mix(in srgb, var(--surface-interactive-hover, #f3f4f6) 60%, transparent);\n }\n}\n\n.deleteButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #6b7280);\n outline-offset: var(--focus-ring-offset, 1px);\n}\n\n.deleteIcon {\n display: block;\n}\n\n/* Count pill (FilterChip only). Under data-density=\"editorial\", it renders\n as a fixed circular semibold pill. */\n.count {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: auto;\n height: auto;\n border-radius: var(--radius-full, 9999px);\n padding: 0 var(--spacing-2, 0.5rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n align-self: baseline;\n}\n\n:global([data-density=\"editorial\"]) .count {\n min-width: 1.25rem;\n height: 1.25rem;\n padding-inline: var(--spacing-1);\n font-weight: var(--font-weight-semibold);\n align-self: center;\n}\n\n.countNeutral {\n background-color: var(--surface-muted, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.countPrimary {\n background-color: var(--surface-accent-subtle, #eff6ff);\n color: var(--text-link, #2563eb);\n}\n\n/* Accent selected state overrides count pill (default behaviour). */\n.selected .count {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-link, #2563eb);\n}\n\n/* Editorial density: selected count uses solid primary pill. */\n:global([data-density=\"editorial\"]) .selected .count {\n background-color: var(--primary);\n color: var(--primary-text);\n}\n\n/* Solid mint count pill — editorial/neutral selected treatment */\n.countSolid {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n/* Trailing icon (FilterChip dropdown caret) — muted, after the count. */\n.trailing {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: var(--text-tertiary, #9ca3af);\n font-size: 0.875rem;\n line-height: 1;\n}\n\n/* Interactive chips (ChoiceChip, FilterChip) */\n.interactive {\n cursor: pointer;\n border: var(--stroke-width-thin, 1px) solid transparent;\n}\n\n.interactive::after {\n outline-color: transparent;\n}\n\nbutton.base,\n.interactive {\n /* Inherit base layout; add button-specific resets */\n text-align: left;\n appearance: none;\n -webkit-appearance: none;\n}\n\n.interactive:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-40, 0.4);\n pointer-events: none;\n}\n\n.interactive:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #6b7280);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n@media (hover: hover) {\n .interactive:hover:not(:disabled):not([data-selected=\"true\"]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n\n .interactive:hover:not(:disabled):not([data-selected=\"true\"])::after {\n outline-color: var(--border-default, #e5e7eb);\n }\n}\n\n.interactive:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n/* Selected state. Under data-density=\"editorial\", switches to neutral-elevated\n treatment (surface-elev bg + transparent border + primary text). */\n.selected {\n background-color: var(--chip-selected-bg, var(--surface-accent-subtle, #eff6ff));\n color: var(--chip-selected-text-color, var(--text-link, #2563eb));\n}\n\n.selected::after {\n outline-color: var(--chip-selected-border-color, var(--surface-accent-default, #3b82f6));\n}\n\n/* Editorial density: neutral-elevated selected treatment.\n --surface-elev is a theme role; the color-mix fallback matches how the\n retired overlay derived it. */\n:global([data-density=\"editorial\"]) .selected {\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n color: var(--text-primary);\n}\n\n:global([data-density=\"editorial\"]) .selected::after {\n outline-color: transparent;\n}\n\n@media (hover: hover) {\n .interactive.selected:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--surface-accent-subtle, #eff6ff) 80%, var(--surface-interactive-hover, #f3f4f6) 20%);\n }\n}\n\n/* Editorial / neutral-elevated selected treatment\n * Uses --surface-card bg + neutral edge instead of accent tint.\n * Compose with .selected to override the accent colours. */\n.selectedNeutral {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n.selectedNeutral::after {\n outline-color: var(--border-strong, #d1d5db);\n}\n\n/* Re-assert selectedNeutral under editorial density: the density .selected rule\n * is (0,2,0) and would otherwise override .selectedNeutral at (0,1,0). */\n:global([data-density=\"editorial\"]) .selectedNeutral {\n background-color: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .selectedNeutral::after {\n outline-color: var(--border-strong, #d1d5db);\n}\n\n.selectedNeutral .count {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n/* Re-assert selectedNeutral count under editorial density: the density\n * .selected .count rule at (0,3,0) would otherwise override at (0,2,0). */\n:global([data-density=\"editorial\"]) .selectedNeutral .count {\n background-color: var(--surface-success-default, #22c55e);\n color: var(--text-inverse, #ffffff);\n}\n\n@media (hover: hover) {\n .interactive.selectedNeutral:hover:not(:disabled) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n}\n\n/* FilterChip resting (unselected) surface. Under editorial density, uses\n --surface-elev so the filter row reads as one consistent elevated set. */\n.filterChip[data-selected=\"false\"] {\n background-color: var(--surface-muted, #f3f4f6);\n}\n\n:global([data-density=\"editorial\"]) .filterChip[data-selected=\"false\"] {\n background-color: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label's line\n box is trimmed to the capital-to-baseline band, so the flex container centres\n the ink and not the font's ascent/descent. padding-block hands back the room\n the trim took, so the box is unchanged. The label is overflow: hidden for its\n ellipsis, and that clips against the trimmed line box, so accents above the\n cap height and descenders below the baseline would be cut: the extra\n padding-block, cancelled by the negative margin-block, widens the clip box\n without changing the layout box. Without text-box (Firefox) rendering is\n exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2 + 0.3em);\n margin-block: -0.3em;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the chip draws the theme's squircle from\n --squircle-radius and --squircle-clip, its radius clamped to half its outer\n height (--label-box-height). Chromium and round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .base {\n --squircle-edge: var(--control-edge-width, var(--stroke-width-thin, 1px));\n --squircle-r: min(var(--chip-radius, var(--radius-full, 9999px)), calc(var(--label-box-height) / 2));\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n /* The edge on ::after becomes the squircle ring: a square outline thick\n enough to cover the ring's corners, clipped to it. */\n .base::after {\n --squircle-r: inherit;\n --squircle-edge: inherit;\n border-radius: var(--squircle-ring-radius, var(--squircle-r));\n outline-width: var(--squircle-ring-paint, var(--control-edge-width, var(--stroke-width-thin, 1px)));\n outline-offset: calc(-1 * var(--squircle-ring-paint, var(--control-edge-width, var(--stroke-width-thin, 1px))));\n clip-path: var(--squircle-ring, none);\n }\n }\n}\n"
|
|
506
506
|
}
|
|
507
507
|
]
|
|
508
508
|
},
|
|
@@ -711,7 +711,7 @@
|
|
|
711
711
|
{
|
|
712
712
|
"path": "components/ui/alert/alert.module.css",
|
|
713
713
|
"type": "registry:ui",
|
|
714
|
-
"content": "/* Alert base */\n.base {\n position: relative;\n display: grid;\n width: 100%;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-lg, 0.5rem);\n box-shadow: var(--shadow-sm);\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n font-size: var(--font-size-sm, 0.875rem);\n text-align: left;\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--surface-card, transparent);\n color: var(--text-primary, currentColor);\n}\n\n.variantDestructive {\n background-color: var(--surface-error-subtle, transparent);\n color: var(--text-error, currentColor);\n border: 1px solid var(--border-error, currentColor);\n}\n\n.variantSuccess {\n background-color: var(--surface-success-subtle, transparent);\n color: var(--text-success, currentColor);\n border: 1px solid var(--border-success, currentColor);\n}\n\n.variantWarning {\n background-color: var(--surface-warning-subtle, transparent);\n color: var(--text-warning, currentColor);\n border: 1px solid var(--border-warning, currentColor);\n}\n\n.variantInfo {\n background-color: var(--surface-info-subtle, transparent);\n color: var(--text-info, currentColor);\n border: 1px solid var(--border-info, currentColor);\n}\n\n/* AlertTitle */\n.title {\n font-weight: var(--font-weight-semibold, 600);\n line-height: 1.5;\n color: inherit;\n}\n\n/* AlertDescription */\n.description {\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, currentColor);\n line-height: 1.5;\n}\n\n/* AlertActions — right-aligned, gap-aware row for inline action buttons */\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacing-2, 0.5rem);\n flex-wrap: wrap;\n margin-top: var(--spacing-2, 0.5rem);\n}\n\n.variantDestructive .description {\n color: color-mix(in srgb, var(--text-error, currentColor) 90%, transparent);\n}\n\n.variantSuccess .description {\n color: color-mix(in srgb, var(--text-success, currentColor) 90%, transparent);\n}\n\n.variantWarning .description {\n color: color-mix(in srgb, var(--text-warning, currentColor) 90%, transparent);\n}\n\n.variantInfo .description {\n color: color-mix(in srgb, var(--text-info, currentColor) 90%, transparent);\n}\n\n/* AlertLead — a bold lead sentence set inline at the start of the description */\n.lead {\n color: var(--text-primary, currentColor);\n font-weight: var(--alert-lead-font-weight, var(--font-weight-bold, 700));\n}\n\n/* ─────────────────────────────────────────────────────────────────────────────\n appearance=\"soft\" (VI-698) — the inline alert Animal Booking (AN-724) and\n Blacklight (BL-1204) each built locally. A soft tinted fill with no edge and\n no shadow, an unchipped outline icon in the tone's colour, and the body in\n secondary ink: the icon and the fill carry the tone, so a refusal reads calm.\n The edged variant classes are never applied under `soft`, so nothing here\n has to out-specify them. Sizes are `--alert-*` component tokens a theme binds\n in its components block, under alert.\n ───────────────────────────────────────────────────────────────────────────── */\n.soft {\n display: flex;\n align-items: flex-start;\n gap: var(--alert-gap, var(--spacing-3, 0.75rem));\n /* 12px 14px — the approved builds' inset; 14px is spacing-3 plus half a step. */\n padding: var(--alert-soft-padding, var(--spacing-3, 0.75rem) calc(var(--spacing-3, 0.75rem) + var(--spacing-1, 0.25rem) / 2));\n border-radius: var(--alert-radius, var(--radius-lg, 0.5rem));\n box-shadow: none;\n font-size: var(--alert-font-size, var(--font-size-sm, 0.875rem));\n line-height: var(--line-height-normal, 1.5);\n color: var(--text-secondary, currentColor);\n}\n\n.softDestructive {\n background-color: var(--surface-error-soft, var(--surface-error-subtle, transparent));\n}\n\n.softWarning {\n background-color: var(--surface-warning-soft, var(--surface-warning-subtle, transparent));\n}\n\n.softSuccess {\n background-color: var(--surface-success-soft, var(--surface-success-subtle, transparent));\n}\n\n/* The neutral note: a faint wash of the ink colour — white on a dark card, a\n faint grey on a light one. 5% is the approved builds' white wash at 5% alpha,\n mixed toward the ink instead of white so it also reads in light mode. */\n.softNote {\n background-color: color-mix(in srgb, var(--text-primary, #111827) 5%, transparent);\n}\n\n/* The icon: outline, unchipped, in the tone's colour. The SVG's own width is\n the token's fallback; this governs the rendered size so a theme can bind it. */\n.icon {\n flex: none;\n display: inline-flex;\n}\n\n.icon > svg {\n width: var(--alert-icon-size, 2rem);\n height: var(--alert-icon-size, 2rem);\n}\n\n.softNote .icon > svg {\n width: var(--alert-icon-size-note, 1.5rem);\n height: var(--alert-icon-size-note, 1.5rem);\n}\n\n.softDestructive .icon {\n color: var(--text-error, currentColor);\n}\n\n.softWarning .icon {\n color: var(--text-warning, currentColor);\n}\n\n.softSuccess .icon {\n color: var(--text-success, currentColor);\n}\n\n.softNote .icon {\n color: var(--text-secondary, currentColor);\n}\n\n/* At least the icon's height and centred against it, so a one-line message\n sits level with the icon while a longer one starts at its top. */\n.content {\n flex: 1;\n min-width: 0;\n min-height: var(--alert-icon-size, 2rem);\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n.softNote .content {\n min-height: var(--alert-icon-size-note, 1.5rem);\n}\n\n/* Trim the outer margins of whatever sits at the content's edges. MDX wraps\n multi-line children in a paragraph, and prose styles (and the browser\n default) give it a top and bottom margin, which pushes the text below the\n icon and pads the card. Two classes out-specify a prose paragraph rule, so\n this holds inside documentation and marketing prose. Margins between\n paragraphs are kept. */\n.content > :first-child,\n.soft .description > :first-child {\n margin-top: 0;\n}\n\n.content > :last-child,\n.soft .description > :last-child {\n margin-bottom: 0;\n}\n\n.soft .title {\n color: var(--text-primary, currentColor);\n}\n\n.soft .description {\n font-size: inherit;\n line-height: inherit;\n color: var(--text-secondary, currentColor);\n}\n"
|
|
714
|
+
"content": "/* Alert base */\n.base {\n position: relative;\n display: grid;\n width: 100%;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-lg, 0.5rem);\n box-shadow: var(--shadow-sm);\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n font-size: var(--font-size-sm, 0.875rem);\n text-align: left;\n}\n\n/* Variants */\n.variantDefault {\n background-color: var(--surface-card, transparent);\n color: var(--text-primary, currentColor);\n}\n\n.variantDestructive {\n background-color: var(--surface-error-subtle, transparent);\n color: var(--text-error, currentColor);\n border: 1px solid var(--border-error, currentColor);\n}\n\n.variantSuccess {\n background-color: var(--surface-success-subtle, transparent);\n color: var(--text-success, currentColor);\n border: 1px solid var(--border-success, currentColor);\n}\n\n.variantWarning {\n background-color: var(--surface-warning-subtle, transparent);\n color: var(--text-warning, currentColor);\n border: 1px solid var(--border-warning, currentColor);\n}\n\n.variantInfo {\n background-color: var(--surface-info-subtle, transparent);\n color: var(--text-info, currentColor);\n border: 1px solid var(--border-info, currentColor);\n}\n\n/* AlertTitle */\n.title {\n font-weight: var(--font-weight-semibold, 600);\n line-height: 1.5;\n color: inherit;\n}\n\n/* AlertDescription */\n.description {\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, currentColor);\n line-height: 1.5;\n}\n\n/* AlertActions — right-aligned, gap-aware row for inline action buttons */\n.actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacing-2, 0.5rem);\n flex-wrap: wrap;\n margin-top: var(--spacing-2, 0.5rem);\n}\n\n.variantDestructive .description {\n color: color-mix(in srgb, var(--text-error, currentColor) 90%, transparent);\n}\n\n.variantSuccess .description {\n color: color-mix(in srgb, var(--text-success, currentColor) 90%, transparent);\n}\n\n.variantWarning .description {\n color: color-mix(in srgb, var(--text-warning, currentColor) 90%, transparent);\n}\n\n.variantInfo .description {\n color: color-mix(in srgb, var(--text-info, currentColor) 90%, transparent);\n}\n\n/* AlertLead — a bold lead sentence set inline at the start of the description */\n.lead {\n color: var(--text-primary, currentColor);\n font-weight: var(--alert-lead-font-weight, var(--font-weight-bold, 700));\n}\n\n/* ─────────────────────────────────────────────────────────────────────────────\n appearance=\"soft\" (VI-698) — the inline alert Animal Booking (AN-724) and\n Blacklight (BL-1204) each built locally. A soft tinted fill with no edge and\n no shadow, an unchipped outline icon in the tone's colour, and the body in\n secondary ink: the icon and the fill carry the tone, so a refusal reads calm.\n The edged variant classes are never applied under `soft`, so nothing here\n has to out-specify them. Sizes are `--alert-*` component tokens a theme binds\n in its components block, under alert.\n\n Over a photo (VI-799), inside the glass layer's `data-glass=\"on\"` switch, the\n soft alert replaces the kit's Notice: the glass layer's control fill and blur\n (the light field glass the Notice draws, not a card's heavy fill), a full\n hairline outline (never a stripe) and every tone in the glass ink, not red, since\n a tone colour sinks into a warm photo. The icon's shape still carries the tone.\n Off the switch every `--glass-on-*` is unset, so the two `--_` values below are\n invalid and each property falls back to the plain soft look.\n ───────────────────────────────────────────────────────────────────────────── */\n.soft {\n /* The Notice's outline (64% ink) and body (80% ink), its own intentional mixes. */\n --_glass-ring: inset 0 0 0 var(--stroke-width-thin, 1px) color-mix(in srgb, var(--glass-on-ink) 64%, transparent);\n --_glass-body: color-mix(in srgb, var(--glass-on-ink) 80%, transparent);\n display: flex;\n align-items: flex-start;\n gap: var(--alert-gap, var(--spacing-3, 0.75rem));\n /* 12px 14px — the approved builds' inset; 14px is spacing-3 plus half a step. */\n padding: var(--alert-soft-padding, var(--spacing-3, 0.75rem) calc(var(--spacing-3, 0.75rem) + var(--spacing-1, 0.25rem) / 2));\n border-radius: var(--alert-radius, var(--radius-lg, 0.5rem));\n box-shadow: var(--_glass-ring, none);\n /* -webkit- first: Lightning CSS keeps only the last of the pair (VI-788). */\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n font-size: var(--alert-font-size, var(--font-size-sm, 0.875rem));\n line-height: var(--line-height-normal, 1.5);\n color: var(--_glass-body, var(--text-secondary, currentColor));\n}\n\n.softDestructive {\n background-color: var(--glass-on-control-fill, var(--surface-error-soft, var(--surface-error-subtle, transparent)));\n}\n\n.softWarning {\n background-color: var(--glass-on-control-fill, var(--surface-warning-soft, var(--surface-warning-subtle, transparent)));\n}\n\n.softSuccess {\n background-color: var(--glass-on-control-fill, var(--surface-success-soft, var(--surface-success-subtle, transparent)));\n}\n\n/* The neutral note: a faint wash of the ink colour — white on a dark card, a\n faint grey on a light one. 5% is the approved builds' white wash at 5% alpha,\n mixed toward the ink instead of white so it also reads in light mode. */\n.softNote {\n background-color: var(--glass-on-control-fill, color-mix(in srgb, var(--text-primary, #111827) 5%, transparent));\n}\n\n/* The icon: outline, unchipped, in the tone's colour. The SVG's own width is\n the token's fallback; this governs the rendered size so a theme can bind it. */\n.icon {\n flex: none;\n display: inline-flex;\n}\n\n.icon > svg {\n width: var(--alert-icon-size, 2rem);\n height: var(--alert-icon-size, 2rem);\n}\n\n.softNote .icon > svg {\n width: var(--alert-icon-size-note, 1.5rem);\n height: var(--alert-icon-size-note, 1.5rem);\n}\n\n.softDestructive .icon {\n color: var(--glass-on-ink, var(--text-error, currentColor));\n}\n\n.softWarning .icon {\n color: var(--glass-on-ink, var(--text-warning, currentColor));\n}\n\n.softSuccess .icon {\n color: var(--glass-on-ink, var(--text-success, currentColor));\n}\n\n.softNote .icon {\n color: var(--glass-on-ink, var(--text-secondary, currentColor));\n}\n\n/* At least the icon's height and centred against it, so a one-line message\n sits level with the icon while a longer one starts at its top. */\n.content {\n flex: 1;\n min-width: 0;\n min-height: var(--alert-icon-size, 2rem);\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n.softNote .content {\n min-height: var(--alert-icon-size-note, 1.5rem);\n}\n\n/* Over a photo (VI-799) the note draws its icon at the other tones' size, so\n every tone's text starts in one column on the glass. A size can't ride a\n --glass-on-* fallback, so this keys off the switch itself; the off rule\n after it restores the note for a data-glass=\"off\" subtree inside it. */\n:global([data-glass=\"on\"]) .softNote .icon > svg {\n width: var(--alert-icon-size, 2rem);\n height: var(--alert-icon-size, 2rem);\n}\n\n:global([data-glass=\"on\"]) .softNote .content {\n min-height: var(--alert-icon-size, 2rem);\n}\n\n:global([data-glass=\"off\"]) .softNote .icon > svg {\n width: var(--alert-icon-size-note, 1.5rem);\n height: var(--alert-icon-size-note, 1.5rem);\n}\n\n:global([data-glass=\"off\"]) .softNote .content {\n min-height: var(--alert-icon-size-note, 1.5rem);\n}\n\n/* Trim the outer margins of whatever sits at the content's edges. MDX wraps\n multi-line children in a paragraph, and prose styles (and the browser\n default) give it a top and bottom margin, which pushes the text below the\n icon and pads the card. Two classes out-specify a prose paragraph rule, so\n this holds inside documentation and marketing prose. Margins between\n paragraphs are kept. */\n.content > :first-child,\n.soft .description > :first-child {\n margin-top: 0;\n}\n\n.content > :last-child,\n.soft .description > :last-child {\n margin-bottom: 0;\n}\n\n.soft .title,\n.soft .lead {\n color: var(--glass-on-ink, var(--text-primary, currentColor));\n}\n\n.soft .description {\n font-size: inherit;\n line-height: inherit;\n color: var(--_glass-body, var(--text-secondary, currentColor));\n}\n"
|
|
715
715
|
}
|
|
716
716
|
]
|
|
717
717
|
},
|
|
@@ -820,7 +820,7 @@
|
|
|
820
820
|
{
|
|
821
821
|
"path": "components/ui/meter/meter.module.css",
|
|
822
822
|
"type": "registry:ui",
|
|
823
|
-
"content": "/*\n * Meter: use against a limit. The track is the hue's tint, the fill is the\n * hue's ink inset inside it, ticks mark the heads-up and the ceiling.\n * `hue` sets --meter-hue-fill / -fill-strong / -ink from Paper's project\n * hues; without them (or on another theme) the meter falls back to neutrals.\n */\n.root {\n --_fill: var(--meter-hue-fill, var(--surface-muted, #f3f4f6));\n --_fill-strong: var(--meter-hue-fill-strong, var(--surface-interactive-active, #e5e7eb));\n --_ink: var(--meter-hue-ink, var(--text-primary, #111827));\n --_tick: var(--meter-tick, var(--text-primary, #111827));\n --_alert: var(--meter-alert, var(--color-error-500, #ef4444));\n --_hatch: var(--meter-hatch-width, 4px);\n /* Compact (row) geometry from the LO-344 frame: a 10px track, the fill inset 2px, ticks 3px proud. */\n --_track-h: 10px;\n --_track-radius: var(--radius-full, 9999px);\n --_inset-x: 2px;\n --_inset-y: 2px;\n --_tick-out: 3px;\n display: block;\n min-width: 0;\n}\n\n/* Contract geometry from the LO-345 frame: a 30px track, a thinner used bar, ticks 6px proud. */\n.root[data-size=\"contract\"] {\n --_track-h: 30px;\n --_track-radius:
|
|
823
|
+
"content": "/*\n * Meter: use against a limit. The track is the hue's tint, the fill is the\n * hue's ink inset inside it, ticks mark the heads-up and the ceiling.\n * `hue` sets --meter-hue-fill / -fill-strong / -ink from Paper's project\n * hues; without them (or on another theme) the meter falls back to neutrals.\n */\n.root {\n --_fill: var(--meter-hue-fill, var(--surface-muted, #f3f4f6));\n --_fill-strong: var(--meter-hue-fill-strong, var(--surface-interactive-active, #e5e7eb));\n --_ink: var(--meter-hue-ink, var(--text-primary, #111827));\n --_tick: var(--meter-tick, var(--text-primary, #111827));\n --_alert: var(--meter-alert, var(--color-error-500, #ef4444));\n --_hatch: var(--meter-hatch-width, 4px);\n /* Compact (row) geometry from the LO-344 frame: a 10px track, the fill inset 2px, ticks 3px proud. */\n --_track-h: 10px;\n --_track-radius: var(--radius-full, 9999px);\n /* One inset on both axes: the fill nests concentric in the track (VI-838). */\n --_inset-x: 2px;\n --_inset-y: 2px;\n --_tick-out: 3px;\n display: block;\n min-width: 0;\n}\n\n/* Contract geometry from the LO-345 frame: a 30px track, a thinner used bar, ticks 6px proud.\n The track is a pill so the bar, inset 9px all round, nests in it as a pill (VI-838). */\n.root[data-size=\"contract\"] {\n --_track-h: 30px;\n --_track-radius: var(--radius-full, 9999px);\n --_inset-x: 9px;\n --_inset-y: 9px;\n --_tick-out: 6px;\n}\n\n.track {\n position: relative;\n height: var(--_track-h);\n border-radius: var(--_track-radius);\n background: var(--_fill-strong);\n}\n\n/* The contract track is the pale fill; zones carry the strong fill. */\n.root[data-size=\"contract\"] .track {\n background: color-mix(in srgb, var(--_fill) 55%, transparent);\n}\n\n.zone,\n.overflow,\n.fill,\n.tick {\n position: absolute;\n}\n\n.zone {\n top: 0;\n bottom: 0;\n border-radius: var(--_track-radius);\n background: var(--_fill-strong);\n}\n\n.zone[data-variant=\"hatched\"] {\n background: repeating-linear-gradient(\n 135deg,\n var(--_fill-strong) 0 var(--_hatch),\n transparent var(--_hatch) calc(var(--_hatch) * 2)\n );\n}\n\n/* Past the limit: coral stripes for unresolved hours, the one alert case. */\n.overflow {\n top: 0;\n bottom: 0;\n border-radius: 0 var(--_track-radius) var(--_track-radius) 0;\n background: repeating-linear-gradient(\n 135deg,\n var(--_alert) 0 var(--_hatch),\n color-mix(in srgb, var(--_alert) 35%, transparent) var(--_hatch) calc(var(--_hatch) * 2)\n );\n}\n\n/* Billable overage (a retainer past its included hours) stripes in ink, never coral. */\n.overflow[data-variant=\"ink\"] {\n background: repeating-linear-gradient(\n 135deg,\n color-mix(in srgb, var(--_ink) 55%, transparent) 0 var(--_hatch),\n transparent var(--_hatch) calc(var(--_hatch) * 2)\n );\n}\n\n.fill {\n left: var(--_inset-x);\n top: var(--_inset-y);\n bottom: var(--_inset-y);\n /* Concentric: the track radius minus the inset (a pill in the compact pill track). */\n border-radius: max(0px, calc(var(--_track-radius) - var(--_inset-y)));\n background: var(--_ink);\n}\n\n.tick {\n top: calc(var(--_tick-out) * -1);\n bottom: calc(var(--_tick-out) * -1);\n width: 2px;\n border-radius: 2px;\n background: var(--_tick);\n}\n\n/* A ceiling: 3px, set back so it ends inside the track. */\n.tick[data-variant=\"limit\"] {\n width: 3px;\n margin-left: -2px;\n}\n\n/* Mark text under the ticks: two 16px lines, positioned by each mark's value. */\n.marks {\n container-type: inline-size;\n position: relative;\n height: 2.5rem;\n margin-top: var(--spacing-2, 0.5rem);\n font-size: var(--font-size-xs, 0.75rem);\n line-height: 1rem;\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #4b5563);\n}\n\n.markText {\n position: absolute;\n top: 0;\n transform: translateX(-50%);\n text-align: center;\n white-space: nowrap;\n}\n\n.markText[data-align=\"start\"] {\n transform: none;\n text-align: left;\n}\n\n.markText[data-align=\"end\"] {\n transform: translateX(-100%);\n text-align: right;\n}\n\n.markText b {\n display: block;\n color: var(--text-primary, #111827);\n font-weight: var(--font-weight-bold, 700);\n}\n\n@container (max-width: 30rem) {\n .markText[data-hide-narrow] {\n display: none;\n }\n}\n\n.label {\n margin-top: calc(var(--spacing-1, 0.25rem) * 1.5);\n font-size: var(--font-size-xs, 0.75rem);\n line-height: var(--line-height-snug, 1.375);\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #4b5563);\n}\n\n.label strong {\n color: var(--text-primary, #111827);\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Past the heads-up the figure turns heavier in ink, never the alert colour (intentional 800, no token). */\n.root[data-over] .label strong {\n font-weight: 800;\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the track, its zones and the fill draw the\n theme's squircle from --squircle-radius and --squircle-clip, each from its\n radius clamped to half its height. Chromium and round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .track,\n .zone {\n --squircle-r: min(var(--_track-radius), calc(var(--_track-h) / 2));\n }\n\n .fill {\n --squircle-r: min(max(0px, calc(var(--_track-radius) - var(--_inset-y))), calc(var(--_track-h) / 2 - var(--_inset-y)));\n }\n\n .track,\n .zone,\n .fill {\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n }\n}\n"
|
|
824
824
|
}
|
|
825
825
|
]
|
|
826
826
|
},
|
|
@@ -873,6 +873,30 @@
|
|
|
873
873
|
}
|
|
874
874
|
]
|
|
875
875
|
},
|
|
876
|
+
{
|
|
877
|
+
"name": "reach-rings",
|
|
878
|
+
"type": "registry:ui",
|
|
879
|
+
"description": "Concentric rings, the innermost a filled core holding an icon, lit from the centre out to show how far something reaches. Decorative (aria-hidden), in a 148px and a 112px (compact) size.",
|
|
880
|
+
"category": "data-display",
|
|
881
|
+
"dependencies": [
|
|
882
|
+
"@loworbitstudio/visor-core"
|
|
883
|
+
],
|
|
884
|
+
"registryDependencies": [
|
|
885
|
+
"utils"
|
|
886
|
+
],
|
|
887
|
+
"files": [
|
|
888
|
+
{
|
|
889
|
+
"path": "components/ui/reach-rings/reach-rings.tsx",
|
|
890
|
+
"type": "registry:ui",
|
|
891
|
+
"content": "import * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./reach-rings.module.css\"\n\nexport interface ReachRingsProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** How many rings, the filled core included. */\n levels: number\n /**\n * How far the reach goes, from 0 (the core alone) to `levels - 1` (every ring).\n * `value + 1` rings are lit, from the centre out; -1 lights none.\n */\n value: number\n /** The glyph in the core, passed in by the consumer (e.g. a Phosphor icon). */\n icon?: React.ReactNode\n /** `default` is 148px across; `compact` is 112px. */\n size?: \"default\" | \"compact\"\n}\n\n/**\n * Concentric rings that light from the centre out to show how far something\n * reaches. Decorative: the control beside it carries the semantics.\n */\nconst ReachRings = React.forwardRef<HTMLDivElement, ReachRingsProps>(\n ({ className, levels, value, icon, size = \"default\", style, ...props }, ref) => {\n const count = Math.max(1, Math.floor(levels))\n const lit = Math.min(Math.max(Math.floor(value) + 1, 0), count)\n // Outermost first, so each ring paints over the halo of the one outside it.\n const rings = Array.from({ length: count }, (_, i) => count - 1 - i)\n\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n data-slot=\"reach-rings\"\n data-size={size}\n data-lit={lit}\n className={cn(styles.root, className)}\n style={{ \"--_levels\": count, ...style } as React.CSSProperties}\n {...props}\n >\n {rings.map((k) => (\n <span\n key={k}\n data-slot={k === 0 ? \"reach-rings-core\" : \"reach-rings-ring\"}\n data-state={k < lit ? \"on\" : \"off\"}\n className={cn(styles.ring, k === 0 && styles.core)}\n style={{ \"--_k\": k } as React.CSSProperties}\n />\n ))}\n {icon ? (\n <span data-slot=\"reach-rings-icon\" className={styles.icon}>\n {icon}\n </span>\n ) : null}\n </div>\n )\n }\n)\nReachRings.displayName = \"ReachRings\"\n\nexport { ReachRings }\n"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"path": "components/ui/reach-rings/reach-rings.module.css",
|
|
895
|
+
"type": "registry:ui",
|
|
896
|
+
"content": "/* ReachRings (VI-840): concentric rings, the innermost a filled core holding an\n icon, lit from the centre out. Ring --_k counts out from the core (0); its\n inset is the rings outside it times the step, so the core keeps its size and\n the rings share the space between core and edge evenly. */\n.root {\n --_key: var(--reach-rings-key, var(--interactive-primary-bg, var(--primary, #111827)));\n --_size: 148px;\n --_core: 28px;\n --_icon-size: 15px;\n --_step: calc((var(--_size) - var(--_core)) / (2 * max(1, var(--_levels) - 1)));\n position: relative;\n flex-shrink: 0;\n width: var(--_size);\n aspect-ratio: 1;\n}\n\n.root[data-size=\"compact\"] {\n --_size: 112px;\n --_core: 22px;\n --_icon-size: 12px;\n}\n\n.ring {\n position: absolute;\n inset: calc((var(--_levels) - 1 - var(--_k)) * var(--_step));\n border-radius: var(--radius-full, 9999px);\n box-shadow: inset 0 0 0 var(--stroke-width-regular, 1.5px) var(--reach-rings-ring, color-mix(in srgb, var(--text-primary, #111827) 12%, transparent));\n transition: box-shadow var(--motion-duration-500, 500ms) var(--motion-easing-enter, cubic-bezier(0, 0, 0.2, 1)),\n background-color var(--motion-duration-500, 500ms) var(--motion-easing-enter, cubic-bezier(0, 0, 0.2, 1));\n /* Lit in sequence from the centre outward, 70ms apart. */\n transition-delay: calc(var(--_k) * 70ms);\n}\n\n/* A lit ring: a keyed stroke, a soft keyed halo and a 5% keyed wash. */\n.ring[data-state=\"on\"] {\n background-color: color-mix(in srgb, var(--_key) 5%, transparent);\n box-shadow: inset 0 0 0 var(--stroke-width-regular, 1.5px) var(--_key),\n 0 0 18px -4px color-mix(in srgb, var(--_key) 55%, transparent);\n}\n\n/* The lit core is solid key with a stronger glow. */\n.core[data-state=\"on\"] {\n background-color: var(--_key);\n box-shadow: 0 0 22px color-mix(in srgb, var(--_key) 70%, transparent);\n}\n\n.icon {\n position: absolute;\n z-index: 1;\n inset: calc((var(--_size) - var(--_core)) / 2);\n display: grid;\n place-items: center;\n line-height: 0;\n font-size: var(--_icon-size);\n color: var(--reach-rings-glyph, color-mix(in srgb, var(--text-primary, #111827) 50%, transparent));\n}\n\n/* A dark glyph on the lit core. */\n.core[data-state=\"on\"] ~ .icon {\n color: var(--reach-rings-core-ink, var(--interactive-primary-text, #f9fafb));\n}\n\n.icon > svg {\n width: 1em;\n height: 1em;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ring {\n transition: none;\n }\n}\n"
|
|
897
|
+
}
|
|
898
|
+
]
|
|
899
|
+
},
|
|
876
900
|
{
|
|
877
901
|
"name": "segmented-progress",
|
|
878
902
|
"type": "registry:ui",
|
|
@@ -890,12 +914,12 @@
|
|
|
890
914
|
{
|
|
891
915
|
"path": "components/ui/segmented-progress/segmented-progress.tsx",
|
|
892
916
|
"type": "registry:ui",
|
|
893
|
-
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { CheckCircle, WarningCircle } from \"@phosphor-icons/react/dist/ssr\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./segmented-progress.module.css\"\n\nconst segmentedProgressVariants = cva(styles.root, {\n variants: {\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n})\n\nexport type SegmentedProgressStepState = \"done\" | \"current\" | \"pending\" | \"failed\"\n\nexport interface SegmentedProgressStep {\n /** The words under the step's segment. */\n label: React.ReactNode\n /**\n * The step's state. When omitted it follows `value` and `current`, as an\n * unlabelled bar does.\n */\n state?: SegmentedProgressStepState\n}\n\ninterface SegmentedProgressBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"aria-label\">,\n VariantProps<typeof segmentedProgressVariants> {\n /**\n * Optional 0-based index of the in-progress segment.\n * Renders with a primary→muted gradient. Typically equals `value`.\n */\n current?: number\n /** Visual size of each segment. @default \"sm\" */\n size?: \"sm\" | \"md\"\n}\n\nexport interface SegmentedProgressCountProps extends SegmentedProgressBaseProps {\n steps?: undefined\n summary?: undefined\n /** Total number of segments. */\n total: number\n /** Count of completed segments (indices 0..value-1 render done). */\n value: number\n /** Accessible name for the progress bar. Required. */\n \"aria-label\": string\n}\n\nexport interface SegmentedProgressStepsProps extends SegmentedProgressBaseProps {\n /**\n * One entry per step: a segment with its label under it. The bar is then\n * hidden from assistive tech and `summary` is what a screen reader hears.\n */\n steps: SegmentedProgressStep[]\n /**\n * The visually hidden line read in place of the bar. Defaults to\n * \"Step 2 of 3: Bank Details\", naming the failed, current or next step.\n */\n summary?: React.ReactNode\n /** Ignored with `steps`: the step count is `steps.length`. */\n total?: number\n /** Count of steps that default to done when a step sets no `state`. */\n value?: number\n /** Not used with `steps`: `summary` carries the words. */\n \"aria-label\"?: undefined\n}\n\nexport type SegmentedProgressProps = SegmentedProgressCountProps | SegmentedProgressStepsProps\n\nfunction stateAt(i: number, value: number, current?: number): SegmentedProgressStepState {\n return i < value ? \"done\" : i === current ? \"current\" : \"pending\"\n}\n\nconst STATE_CLASS: Record<SegmentedProgressStepState, string> = {\n done: styles.segmentDone,\n current: styles.segmentCurrent,\n pending: styles.segmentPending,\n failed: styles.segmentFailed,\n}\n\nfunction defaultSummary(steps: SegmentedProgressStep[], states: SegmentedProgressStepState[]): React.ReactNode {\n const n = steps.length\n const at = [states.indexOf(\"failed\"), states.indexOf(\"current\"), states.indexOf(\"pending\")].find((i) => i >= 0)\n if (at === undefined) return `All ${n} steps done`\n return (\n <>\n {`Step ${at + 1} of ${n}${states[at] === \"failed\" ? \" failed\" : \"\"}: `}\n {steps[at].label}\n </>\n )\n}\n\nconst SegmentedProgress = React.forwardRef<HTMLDivElement, SegmentedProgressProps>(\n (\n {\n className,\n total,\n value,\n current,\n size = \"sm\",\n steps,\n summary,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n if (steps) {\n const states = steps.map((s, i) => s.state ?? stateAt(i, value ?? 0, current))\n return (\n <div\n ref={ref}\n data-slot=\"segmented-progress\"\n data-size={size}\n data-labelled=\"\"\n className={cn(segmentedProgressVariants({ size }), styles.labelled, className)}\n {...props}\n >\n <span data-slot=\"segmented-progress-summary\" className={styles.summary}>\n {summary ?? defaultSummary(steps, states)}\n </span>\n {steps.map((step, i) => {\n const state = states[i]\n const Icon = state === \"done\" ? CheckCircle : state === \"failed\" ? WarningCircle : null\n return (\n <
|
|
917
|
+
"content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { CheckCircle, WarningCircle } from \"@phosphor-icons/react/dist/ssr\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./segmented-progress.module.css\"\n\nconst segmentedProgressVariants = cva(styles.root, {\n variants: {\n size: {\n sm: styles.sizeSm,\n md: styles.sizeMd,\n },\n },\n defaultVariants: {\n size: \"sm\",\n },\n})\n\nexport type SegmentedProgressStepState = \"done\" | \"current\" | \"pending\" | \"failed\"\n\nexport interface SegmentedProgressStep {\n /** The words under the step's segment. */\n label: React.ReactNode\n /**\n * The step's state. When omitted it follows `value` and `current`, as an\n * unlabelled bar does.\n */\n state?: SegmentedProgressStepState\n /** The step's share of the bar's width, e.g. its slide count. @default 1 */\n weight?: number\n /**\n * Makes the step a button that calls this when pressed, e.g. to jump back to\n * a finished step. Steps without it are not focusable.\n */\n onSelect?: () => void\n /** How much of a current step's segment is filled, 0 to 1. @default 0.55 */\n fill?: number\n}\n\ninterface SegmentedProgressBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"aria-label\">,\n VariantProps<typeof segmentedProgressVariants> {\n /**\n * Optional 0-based index of the in-progress segment.\n * Renders with a primary→muted gradient. Typically equals `value`.\n */\n current?: number\n /** Visual size of each segment. @default \"sm\" */\n size?: \"sm\" | \"md\"\n}\n\nexport interface SegmentedProgressCountProps extends SegmentedProgressBaseProps {\n steps?: undefined\n summary?: undefined\n revealLabels?: undefined\n /** Total number of segments. */\n total: number\n /** Count of completed segments (indices 0..value-1 render done). */\n value: number\n /** Accessible name for the progress bar. Required. */\n \"aria-label\": string\n}\n\nexport interface SegmentedProgressStepsProps extends SegmentedProgressBaseProps {\n /**\n * One entry per step: a segment with its label under it. The bar is then\n * hidden from assistive tech and `summary` is what a screen reader hears.\n */\n steps: SegmentedProgressStep[]\n /**\n * The visually hidden line read in place of the bar. Defaults to\n * \"Step 2 of 3: Bank Details\", naming the failed, current or next step.\n */\n summary?: React.ReactNode\n /**\n * Hides each pending step's label, and fades it in when the step fills.\n * Labels already filled on first render show without animating.\n */\n revealLabels?: boolean\n /** Ignored with `steps`: the step count is `steps.length`. */\n total?: number\n /** Count of steps that default to done when a step sets no `state`. */\n value?: number\n /** Not used with `steps`: `summary` carries the words. */\n \"aria-label\"?: undefined\n}\n\nexport type SegmentedProgressProps = SegmentedProgressCountProps | SegmentedProgressStepsProps\n\nfunction stateAt(i: number, value: number, current?: number): SegmentedProgressStepState {\n return i < value ? \"done\" : i === current ? \"current\" : \"pending\"\n}\n\nconst STATE_CLASS: Record<SegmentedProgressStepState, string> = {\n done: styles.segmentDone,\n current: styles.segmentCurrent,\n pending: styles.segmentPending,\n failed: styles.segmentFailed,\n}\n\nfunction defaultSummary(steps: SegmentedProgressStep[], states: SegmentedProgressStepState[]): React.ReactNode {\n const n = steps.length\n const at = [states.indexOf(\"failed\"), states.indexOf(\"current\"), states.indexOf(\"pending\")].find((i) => i >= 0)\n if (at === undefined) return `All ${n} steps done`\n return (\n <>\n {`Step ${at + 1} of ${n}${states[at] === \"failed\" ? \" failed\" : \"\"}: `}\n {steps[at].label}\n </>\n )\n}\n\nconst SegmentedProgress = React.forwardRef<HTMLDivElement, SegmentedProgressProps>(\n (\n {\n className,\n total,\n value,\n current,\n size = \"sm\",\n steps,\n summary,\n revealLabels,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n if (steps) {\n const states = steps.map((s, i) => s.state ?? stateAt(i, value ?? 0, current))\n return (\n <div\n ref={ref}\n data-slot=\"segmented-progress\"\n data-size={size}\n data-labelled=\"\"\n data-reveal={revealLabels ? \"\" : undefined}\n className={cn(segmentedProgressVariants({ size }), styles.labelled, className)}\n {...props}\n >\n <span data-slot=\"segmented-progress-summary\" className={styles.summary}>\n {summary ?? defaultSummary(steps, states)}\n </span>\n {steps.map((step, i) => {\n const state = states[i]\n const Icon = state === \"done\" ? CheckCircle : state === \"failed\" ? WarningCircle : null\n const Step = step.onSelect ? \"button\" : \"div\"\n const style: Record<string, string | number> = { \"--segmented-progress-index\": i }\n if (step.weight !== undefined) style[\"--segmented-progress-weight\"] = step.weight\n if (step.fill !== undefined) {\n style[\"--segmented-progress-fill-inset\"] = `${(1 - Math.min(Math.max(step.fill, 0), 1)) * 100}%`\n }\n return (\n <Step\n key={i}\n data-slot=\"segmented-progress-step\"\n data-state={state}\n // A button stays in the accessibility tree; every other step is read through the summary.\n {...(step.onSelect\n ? {\n type: \"button\" as const,\n onClick: step.onSelect,\n \"aria-label\": typeof step.label === \"string\" ? `Go to ${step.label}` : undefined,\n }\n : { \"aria-hidden\": true })}\n className={styles.step}\n style={style as React.CSSProperties}\n >\n <span\n data-slot=\"segmented-progress-segment\"\n data-state={state}\n className={cn(styles.segment, STATE_CLASS[state], styles.fill)}\n />\n <span data-slot=\"segmented-progress-label\" className={styles.label}>\n {Icon && <Icon className={styles.labelIcon} />}\n <span className={styles.labelText}>{step.label}</span>\n </span>\n </Step>\n )\n })}\n </div>\n )\n }\n\n const safeTotal = Math.max(total ?? 1, 1)\n const clampedValue = Math.min(Math.max(value ?? 0, 0), safeTotal)\n\n return (\n <div\n ref={ref}\n data-slot=\"segmented-progress\"\n data-size={size}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={safeTotal}\n aria-valuenow={clampedValue}\n aria-label={ariaLabel}\n className={cn(segmentedProgressVariants({ size }), className)}\n {...props}\n >\n {Array.from({ length: safeTotal }, (_, i) => {\n const state = stateAt(i, clampedValue, current)\n return (\n <span\n key={i}\n data-slot=\"segmented-progress-segment\"\n data-state={state}\n className={cn(\n styles.segment,\n state === \"done\" && styles.segmentDone,\n state === \"current\" && styles.segmentCurrent,\n state === \"pending\" && styles.segmentPending\n )}\n />\n )\n })}\n </div>\n )\n }\n)\nSegmentedProgress.displayName = \"SegmentedProgress\"\n\nexport { SegmentedProgress, segmentedProgressVariants }\n"
|
|
894
918
|
},
|
|
895
919
|
{
|
|
896
920
|
"path": "components/ui/segmented-progress/segmented-progress.module.css",
|
|
897
921
|
"type": "registry:ui",
|
|
898
|
-
"content": "/* SegmentedProgress\n *\n * Discrete per-step progress meter: N equal segments in a row, each\n * individually expressing done, current, or pending state.\n *\n * Segment heights (6px sm / 8px md) are component-intrinsic dimensions —\n * no spacing token maps to these values (same precedent as status-dot's 6px).\n * All other spacing, radius, color, and motion values use tokens.\n */\n\n.root {\n display: flex;\n gap: var(--spacing-1, 0.25rem);\n width: 100%;\n}\n\n/* Segment — base pill shape */\n.segment {\n flex: 1;\n border-radius: var(--radius-full, 9999px);\n transition: background var(--motion-duration-150, 150ms)\n var(--motion-easing-default, ease-in-out);\n}\n\n/* State: done — solid primary fill */\n.segment.segmentDone {\n background: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* State: current — gradient from the strong rung into muted (~55%/45% split).\n --button-strong-fill lets a host rebind it; unset it is the primary (VI-713). */\n.segment.segmentCurrent {\n background: linear-gradient(\n 90deg,\n var(--button-strong-fill, var(--interactive-primary-bg, var(--primary, #111827))) 55%,\n var(--surface-muted, #e5e7eb) 55%\n );\n}\n\n/* State: pending — muted surface */\n.segment.segmentPending {\n background: var(--surface-muted, #e5e7eb);\n}\n\n/* Size sm — 6px tall (matches the brand-workbench prototype) */\n.sizeSm .segment {\n height: 6px;\n}\n\n/* Size md — 8px tall */\n.sizeMd .segment {\n height: 8px;\n}\n\n/* ── Labelled steps (VI-713) ────────────────────────────────────────────\n * With `steps`, each segment sits over its label, a step can fail, and the\n * fills draw left to right once on mount. None of this applies to a bar\n * without `steps`, which renders exactly as before. */\n\n.labelled {\n position: relative;\n}\n\n.labelled.sizeMd {\n gap: var(--spacing-2, 0.5rem);\n}\n\n.step {\n display: flex;\n flex: 1
|
|
922
|
+
"content": "/* SegmentedProgress\n *\n * Discrete per-step progress meter: N equal segments in a row, each\n * individually expressing done, current, or pending state.\n *\n * Segment heights (6px sm / 8px md) are component-intrinsic dimensions —\n * no spacing token maps to these values (same precedent as status-dot's 6px).\n * All other spacing, radius, color, and motion values use tokens.\n */\n\n.root {\n display: flex;\n gap: var(--spacing-1, 0.25rem);\n width: 100%;\n}\n\n/* Segment — base pill shape */\n.segment {\n flex: 1;\n border-radius: var(--radius-full, 9999px);\n transition: background var(--motion-duration-150, 150ms)\n var(--motion-easing-default, ease-in-out);\n}\n\n/* State: done — solid primary fill */\n.segment.segmentDone {\n background: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* State: current — gradient from the strong rung into muted (~55%/45% split).\n --button-strong-fill lets a host rebind it; unset it is the primary (VI-713). */\n.segment.segmentCurrent {\n background: linear-gradient(\n 90deg,\n var(--button-strong-fill, var(--interactive-primary-bg, var(--primary, #111827))) 55%,\n var(--surface-muted, #e5e7eb) 55%\n );\n}\n\n/* State: pending — muted surface */\n.segment.segmentPending {\n background: var(--surface-muted, #e5e7eb);\n}\n\n/* Size sm — 6px tall (matches the brand-workbench prototype) */\n.sizeSm .segment {\n height: 6px;\n}\n\n/* Size md — 8px tall */\n.sizeMd .segment {\n height: 8px;\n}\n\n/* ── Labelled steps (VI-713) ────────────────────────────────────────────\n * With `steps`, each segment sits over its label, a step can fail, and the\n * fills draw left to right once on mount. None of this applies to a bar\n * without `steps`, which renders exactly as before. */\n\n.labelled {\n position: relative;\n}\n\n/* Under the glass switch the labels sit on the photo, as the glass controls\n do, so they take the glass layer's control ink (VI-809). Off the switch it\n is unset, so --_glass-ink is too and the labels keep the theme's text inks. */\n.labelled {\n --_glass-ink: var(--glass-on-control-ink);\n}\n\n.labelled.sizeMd {\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* `weight` (VI-809) is the step's share of the width after the gaps. */\n.step {\n display: flex;\n flex: var(--segmented-progress-weight, 1) 1 0%;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n min-width: 0;\n}\n\n/* A step with `onSelect` is a button (VI-809): the whole step, segment and\n label, is the target, so it stays taller than 24px with no padding. */\nbutton.step {\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--radius-sm, 0.25rem);\n background: none;\n color: inherit;\n text-align: start;\n cursor: pointer;\n}\n\nbutton.step:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n@media (hover: hover) {\n button.step:hover .label {\n color: var(--_glass-ink, var(--text-primary, #111827));\n }\n\n button.step:hover .fill.segmentDone::before {\n background: var(--interactive-primary-bg-hover, var(--interactive-primary-bg, var(--primary, #111827)));\n }\n}\n\n/* The track is muted; the fill is a layer clipped to the state's extent, so\n it can draw in from the left. Under data-glass=\"on\" (VI-795) the track is\n the glass layer's fill and blurs the photo behind it; elsewhere it is solid. */\n.segment.fill {\n flex: none;\n position: relative;\n overflow: hidden;\n background: var(--glass-on-fill, var(--surface-muted, #e5e7eb));\n /* Prefixed line first, so Lightning CSS keeps both (VI-788). */\n -webkit-backdrop-filter: var(--glass-on-blur, none);\n backdrop-filter: var(--glass-on-blur, none);\n}\n\n.fill::before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: var(--interactive-primary-bg, var(--primary, #111827));\n clip-path: inset(0 100% 0 0 round var(--radius-full, 9999px));\n transition: clip-path var(--motion-duration-300, 300ms)\n var(--motion-easing-ease-out, ease-out);\n}\n\n.fill.segmentDone::before {\n clip-path: inset(0 round var(--radius-full, 9999px));\n}\n\n.fill.segmentCurrent::before {\n background: var(--button-strong-fill, var(--interactive-primary-bg, var(--primary, #111827)));\n /* `fill` (VI-809) writes the inset; unset it is the 55% the bar always drew. */\n clip-path: inset(0 var(--segmented-progress-fill-inset, 45%) 0 0 round var(--radius-full, 9999px));\n}\n\n.fill.segmentFailed::before {\n background: var(--interactive-destructive-bg, #dc2626);\n clip-path: inset(0 round var(--radius-full, 9999px));\n}\n\n/* Label: 12px under sm, 14px under md. A host rebinds the size hooks (at\n desktop widths, say) without touching the component. */\n.label {\n display: flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n min-width: 0;\n font-size: var(--segmented-progress-sm-label-font-size, var(--font-size-xs, 0.75rem));\n line-height: var(--line-height-tight, 1.25);\n color: var(--_glass-ink, var(--text-tertiary, #9ca3af));\n}\n\n.sizeMd .label {\n font-size: var(--segmented-progress-md-label-font-size, var(--font-size-sm, 0.875rem));\n}\n\n.labelText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Intentional: the glyph draws a touch larger than its label, as in the design. */\n.labelIcon {\n flex: none;\n width: 1.1em;\n height: 1.1em;\n color: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* Over a photo every label takes the glass control ink above (VI-809); a failed one stays red. */\n.step[data-state=\"current\"] .label {\n color: var(--_glass-ink, var(--text-primary, #111827));\n font-weight: var(--font-weight-bold, 700);\n}\n\n.step[data-state=\"done\"] .label {\n color: var(--_glass-ink, var(--text-secondary, #6b7280));\n}\n\n.step[data-state=\"failed\"] .label,\n.step[data-state=\"failed\"] .labelIcon {\n color: var(--text-error, #b91c1c);\n}\n\n.step[data-state=\"failed\"] .label {\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* The words a screen reader hears in place of the bar. */\n.summary {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n/* `revealLabels` (VI-809): a pending label is hidden, and fades, rises and\n sharpens in when its step fills. A transition never runs on mount, so labels\n already filled on first render simply show. */\n.labelled[data-reveal] .step[data-state=\"pending\"] .label {\n opacity: 0;\n translate: 0 var(--spacing-1, 0.25rem);\n /* Intentional: the kit's 6px blur, sharpening as the label arrives. */\n filter: blur(6px);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .labelled[data-reveal] .label {\n transition-property: opacity, translate, filter, color;\n transition-duration: var(--motion-duration-enter, var(--motion-duration-800, 800ms));\n transition-timing-function: var(--motion-easing-enter, var(--motion-easing-ease-out, cubic-bezier(0, 0, 0.2, 1)));\n }\n}\n\n/* Under reduced motion a label switches at once: 0s outright. It sits in\n visor-base beside visor-core's global 0.01ms pin, because an important\n declaration in a layer beats an unlayered one; there this selector outranks `*`. */\n@layer visor-base {\n @media (prefers-reduced-motion: reduce) {\n .labelled[data-reveal] .label {\n transition-duration: 0s !important;\n }\n }\n}\n\n/* Fill once on mount, each segment ~140ms after the one before it. */\n@media (prefers-reduced-motion: no-preference) {\n .fill::before {\n animation: segmented-progress-fill var(--segmented-progress-fill-duration, 600ms)\n var(--motion-easing-ease-out, ease-out) both;\n animation-delay: calc(\n var(--segmented-progress-index, 0) * var(--segmented-progress-fill-stagger, 140ms)\n );\n }\n}\n\n@keyframes segmented-progress-fill {\n from {\n clip-path: inset(0 100% 0 0 round var(--radius-full, 9999px));\n }\n}\n\n/* Respect reduced motion — disable transitions; the fills draw static */\n@media (prefers-reduced-motion: reduce) {\n .segment {\n transition: none;\n }\n\n .fill::before {\n transition: none;\n }\n}\n"
|
|
899
923
|
}
|
|
900
924
|
]
|
|
901
925
|
},
|
|
@@ -921,7 +945,7 @@
|
|
|
921
945
|
{
|
|
922
946
|
"path": "components/ui/dialog/dialog.module.css",
|
|
923
947
|
"type": "registry:ui",
|
|
924
|
-
"content": "/* Dialog overlay\n * Default: 4px backdrop blur. Density axis: editorial uses 2px.\n * Prefixed line first: Lightning CSS (in Next) keeps only the last of the pair when\n * the value holds a var(), so unprefixed-first loses backdrop-filter (VI-788). */\n.overlay {\n position: fixed;\n inset: 0;\n z-index: 50;\n background-color: var(--dialog-overlay-bg, var(--overlay-bg, rgba(0, 0, 0, 0.8)));\n -webkit-backdrop-filter: blur(var(--dialog-overlay-blur, 4px));\n backdrop-filter: blur(var(--dialog-overlay-blur, 4px));\n}\n\n:global([data-density=\"editorial\"]) .overlay {\n -webkit-backdrop-filter: blur(var(--dialog-overlay-blur, 2px));\n backdrop-filter: blur(var(--dialog-overlay-blur, 2px));\n}\n\n.overlay[data-state=\"open\"] {\n animation: fadeIn var(--motion-duration-150, 150ms) var(--motion-easing-enter, ease-out);\n}\n\n.overlay[data-state=\"closed\"] {\n animation: fadeOut var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Dialog content\n * Default: 32rem max-width, radius-lg, surface-page, spacing-6, shadow-xl.\n * Density axis: editorial uses 480px, radius-xl, surface-card, spacing-8, shadow-lg.\n * VI-784: a theme skins it through the --dialog-* hooks; unbound, each falls back to the value above. */\n.content {\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 50;\n width: 100%;\n max-width: var(--dialog-max-width, 32rem);\n transform: translate(-50%, -50%);\n border-radius: var(--dialog-radius, var(--radius-lg, 0.5rem));\n background-color: var(--dialog-bg, var(--surface-page, #ffffff));\n padding: var(--dialog-padding, var(--spacing-6, 1.5rem));\n box-shadow: var(--dialog-shadow, var(--shadow-xl));\n -webkit-backdrop-filter: var(--dialog-backdrop-filter, none);\n backdrop-filter: var(--dialog-backdrop-filter, none);\n transition: opacity var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out), transform var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .content {\n /* Floating modal — opaque. --surface-card may be translucent glass per theme\n * (blackout: rgba(255,255,255,0.04)); over the backdrop it reads see-through.\n * --surface-popover is the opaque floating token (== --surface-card on solid\n * themes, so no visual change there). VI-623. */\n background-color: var(--dialog-bg, var(--surface-popover, var(--surface-page, #ffffff)));\n max-width: var(--dialog-max-width, 480px);\n border-radius: var(--dialog-radius, var(--radius-xl));\n padding: var(--dialog-padding, var(--spacing-8));\n box-shadow: var(--dialog-shadow, var(--shadow-lg));\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Bottom-sheet presentation (VI-667): same content, anchored to the bottom edge.\n * Sized by dvh and the visual viewport so the on-screen keyboard never covers it;\n * the --dialog-* vars are written by DialogContent from the browser's visual viewport API.\n * No border — the sheet reads against the scrim by surface and shadow alone. */\n.presentationSheet {\n top: auto;\n right: 0;\n bottom: var(--dialog-keyboard-inset, 0px);\n left: 0;\n max-width: none;\n max-height: min(85dvh, calc(var(--dialog-viewport-height, 100dvh) - var(--spacing-4, 1rem)));\n overflow-y: auto;\n overscroll-behavior: contain;\n transform: none;\n border-radius: var(--dialog-radius, var(--radius-lg, 0.5rem)) var(--dialog-radius, var(--radius-lg, 0.5rem)) 0 0;\n padding-bottom: calc(var(--spacing-6, 1.5rem) + env(safe-area-inset-bottom, 0px));\n}\n\n:global([data-density=\"editorial\"]) .presentationSheet {\n max-width: none;\n border-radius: var(--dialog-radius, var(--radius-xl)) var(--dialog-radius, var(--radius-xl)) 0 0;\n padding-bottom: calc(var(--spacing-8) + env(safe-area-inset-bottom, 0px));\n}\n\n.presentationSheet[data-state=\"open\"] {\n animation: sheetShow var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n.presentationSheet[data-state=\"closed\"] {\n animation: sheetHide var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Scoped (container) presentation: covers only the container, not the window. */\n.scrim,\n.scoped {\n position: absolute;\n}\n\n.scoped {\n max-height: calc(100% - var(--spacing-8, 2rem));\n overflow-y: auto;\n}\n\n.scoped.presentationSheet {\n bottom: 0;\n max-height: 85%;\n}\n\n/* Drag handle */\n.handle {\n width: 2.5rem;\n height: var(--spacing-1, 0.25rem);\n margin: calc(var(--spacing-3, 0.75rem) * -1) auto var(--spacing-4, 1rem);\n border-radius: var(--radius-full, 9999px);\n background-color: var(--text-tertiary, #9ca3af);\n opacity: var(--opacity-40, 0.4);\n cursor: grab;\n touch-action: none;\n}\n\n/* Close button */\n.closeButton {\n position: absolute;\n top: 1rem;\n right: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-sm, 0.25rem);\n border: none;\n background: transparent;\n cursor: pointer;\n opacity: 0.7;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n padding: var(--spacing-1, 0.25rem);\n color: var(--text-primary, #111827);\n}\n\n.closeButton:hover {\n opacity: 1;\n}\n\n.closeButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.closeIcon {\n width: 1rem;\n height: 1rem;\n}\n\n/* Back action: leading counterpart of the close button */\n.backButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-sm, 0.25rem);\n border: none;\n background: transparent;\n cursor: pointer;\n opacity: 0.7;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n padding: var(--spacing-1, 0.25rem);\n color: var(--text-primary, #111827);\n}\n\n.backButton:hover {\n opacity: 1;\n}\n\n.backButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Header */\n.header {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n margin-bottom: var(--spacing-4, 1rem);\n}\n\n.headerWithBack {\n flex-direction: row;\n align-items: flex-start;\n gap: var(--spacing-2, 0.5rem);\n}\n\n.backSlot {\n flex: none;\n /* Align the 24px control with the first title line (line-height lg ~1.75rem). */\n margin-block: calc(var(--spacing-1, 0.25rem) * 0.5);\n}\n\n.headerBody {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n min-width: 0;\n}\n\n/* Title\n * Default: font-size-lg / semibold. Density axis: editorial uses font-size-2xl / 700. */\n.title {\n font-size: var(--font-size-lg, 1.125rem);\n font-weight: var(--font-weight-semibold, 600);\n color: var(--text-primary, #111827);\n margin: 0;\n}\n\n:global([data-density=\"editorial\"]) .title {\n font-size: var(--font-size-2xl);\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Description\n * Default: text-secondary. Density axis: editorial uses text-tertiary. */\n.description {\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n:global([data-density=\"editorial\"]) .description {\n color: var(--text-tertiary);\n}\n\n/* Footer */\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n padding-top: var(--spacing-3, 0.75rem);\n margin-top: var(--spacing-2, 0.5rem);\n border-top: 1px solid transparent;\n border-image: linear-gradient(var(--hairline, var(--border-subtle, rgba(0, 0, 0, 0.06))), var(--hairline, var(--border-subtle, rgba(0, 0, 0, 0.06)))) 1 / var(--hairline-width, 1px) 0 0 0;\n}\n\n/* Screen reader only */\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 8px));\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n to {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 8px));\n }\n}\n\n@keyframes sheetShow {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n}\n\n@keyframes sheetHide {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n}\n\n/* Reduced motion: the dialog and the sheet appear without moving. */\n@media (prefers-reduced-motion: reduce) {\n .content,\n .presentationSheet,\n .backButton,\n .closeButton {\n transition: none;\n }\n\n .content[data-state=\"open\"],\n .presentationSheet[data-state=\"open\"] {\n animation: fadeIn var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n }\n\n .content[data-state=\"closed\"],\n .presentationSheet[data-state=\"closed\"] {\n animation: fadeOut var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n }\n}\n"
|
|
948
|
+
"content": "/* Dialog overlay\n * Default: 4px backdrop blur. Density axis: editorial uses 2px.\n * Prefixed line first: Lightning CSS (in Next) keeps only the last of the pair when\n * the value holds a var(), so unprefixed-first loses backdrop-filter (VI-788). */\n.overlay {\n position: fixed;\n inset: 0;\n z-index: 50;\n background-color: var(--dialog-overlay-bg, var(--overlay-bg, rgba(0, 0, 0, 0.8)));\n -webkit-backdrop-filter: blur(var(--dialog-overlay-blur, 4px));\n backdrop-filter: blur(var(--dialog-overlay-blur, 4px));\n}\n\n:global([data-density=\"editorial\"]) .overlay {\n -webkit-backdrop-filter: blur(var(--dialog-overlay-blur, 2px));\n backdrop-filter: blur(var(--dialog-overlay-blur, 2px));\n}\n\n.overlay[data-state=\"open\"] {\n animation: fadeIn var(--motion-duration-150, 150ms) var(--motion-easing-enter, ease-out);\n}\n\n.overlay[data-state=\"closed\"] {\n animation: fadeOut var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Dialog content\n * Default: 32rem max-width, radius-lg, surface-page, spacing-6, shadow-xl.\n * Density axis: editorial uses 480px, radius-xl, surface-card, spacing-8, shadow-lg.\n * VI-784: a theme skins it through the --dialog-* hooks; unbound, each falls back to the value above. */\n.content {\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 50;\n width: 100%;\n max-width: var(--dialog-max-width, 32rem);\n transform: translate(-50%, -50%);\n border-radius: var(--dialog-radius, var(--radius-lg, 0.5rem));\n background-color: var(--dialog-bg, var(--surface-page, #ffffff));\n padding: var(--dialog-padding, var(--spacing-6, 1.5rem));\n box-shadow: var(--dialog-shadow, var(--shadow-xl));\n -webkit-backdrop-filter: var(--dialog-backdrop-filter, none);\n backdrop-filter: var(--dialog-backdrop-filter, none);\n transition: opacity var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out), transform var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .content {\n /* Floating modal — opaque. --surface-card may be translucent glass per theme\n * (blackout: rgba(255,255,255,0.04)); over the backdrop it reads see-through.\n * --surface-popover is the opaque floating token (== --surface-card on solid\n * themes, so no visual change there). VI-623. */\n background-color: var(--dialog-bg, var(--surface-popover, var(--surface-page, #ffffff)));\n max-width: var(--dialog-max-width, 480px);\n border-radius: var(--dialog-radius, var(--radius-xl));\n padding: var(--dialog-padding, var(--spacing-8));\n box-shadow: var(--dialog-shadow, var(--shadow-lg));\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Bottom-sheet presentation (VI-667): same content, anchored to the bottom edge.\n * Sized by dvh and the visual viewport so the on-screen keyboard never covers it;\n * the --dialog-* vars are written by DialogContent from the browser's visual viewport API.\n * No border — the sheet reads against the scrim by surface and shadow alone. */\n.presentationSheet {\n top: auto;\n right: 0;\n bottom: var(--dialog-keyboard-inset, 0px);\n left: 0;\n max-width: none;\n max-height: min(85dvh, calc(var(--dialog-viewport-height, 100dvh) - var(--spacing-4, 1rem)));\n overflow-y: auto;\n overscroll-behavior: contain;\n transform: none;\n border-radius: var(--dialog-radius, var(--radius-lg, 0.5rem)) var(--dialog-radius, var(--radius-lg, 0.5rem)) 0 0;\n padding-bottom: calc(var(--spacing-6, 1.5rem) + env(safe-area-inset-bottom, 0px));\n}\n\n:global([data-density=\"editorial\"]) .presentationSheet {\n max-width: none;\n border-radius: var(--dialog-radius, var(--radius-xl)) var(--dialog-radius, var(--radius-xl)) 0 0;\n padding-bottom: calc(var(--spacing-8) + env(safe-area-inset-bottom, 0px));\n}\n\n.presentationSheet[data-state=\"open\"] {\n animation: sheetShow var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n.presentationSheet[data-state=\"closed\"] {\n animation: sheetHide var(--motion-duration-150, 150ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Scoped (container) presentation: covers only the container, not the window. */\n.scrim,\n.scoped {\n position: absolute;\n}\n\n.scoped {\n max-height: calc(100% - var(--spacing-8, 2rem));\n overflow-y: auto;\n}\n\n.scoped.presentationSheet {\n bottom: 0;\n max-height: 85%;\n}\n\n/* Drag handle */\n.handle {\n width: 2.5rem;\n height: var(--spacing-1, 0.25rem);\n margin: calc(var(--spacing-3, 0.75rem) * -1) auto var(--spacing-4, 1rem);\n border-radius: var(--radius-full, 9999px);\n background-color: var(--text-tertiary, #9ca3af);\n opacity: var(--opacity-40, 0.4);\n cursor: grab;\n touch-action: none;\n}\n\n/* Close button */\n.closeButton {\n position: absolute;\n top: 1rem;\n right: 1rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-sm, 0.25rem);\n border: none;\n background: transparent;\n cursor: pointer;\n opacity: 0.7;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n padding: var(--spacing-1, 0.25rem);\n color: var(--text-primary, #111827);\n}\n\n.closeButton:hover {\n opacity: 1;\n}\n\n.closeButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.closeIcon {\n width: 1rem;\n height: 1rem;\n}\n\n/* Back action: leading counterpart of the close button */\n.backButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--radius-sm, 0.25rem);\n border: none;\n background: transparent;\n cursor: pointer;\n opacity: 0.7;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n padding: var(--spacing-1, 0.25rem);\n color: var(--text-primary, #111827);\n}\n\n.backButton:hover {\n opacity: 1;\n}\n\n.backButton:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Header */\n.header {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n margin-bottom: var(--spacing-4, 1rem);\n}\n\n.headerWithBack {\n flex-direction: row;\n align-items: flex-start;\n gap: var(--spacing-2, 0.5rem);\n}\n\n.backSlot {\n flex: none;\n /* Align the 24px control with the first title line (line-height lg ~1.75rem). */\n margin-block: calc(var(--spacing-1, 0.25rem) * 0.5);\n}\n\n.headerBody {\n display: flex;\n flex-direction: column;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n min-width: 0;\n}\n\n/* Title\n * Default: font-size-lg / semibold. Density axis: editorial uses font-size-2xl / 700. */\n.title {\n font-size: var(--font-size-lg, 1.125rem);\n font-weight: var(--font-weight-semibold, 600);\n color: var(--text-primary, #111827);\n margin: 0;\n}\n\n:global([data-density=\"editorial\"]) .title {\n font-size: var(--font-size-2xl);\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Description\n * Default: text-secondary. Density axis: editorial uses text-tertiary. */\n.description {\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n:global([data-density=\"editorial\"]) .description {\n color: var(--text-tertiary);\n}\n\n/* Footer */\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n padding-top: var(--spacing-3, 0.75rem);\n margin-top: var(--spacing-2, 0.5rem);\n border-top: 1px solid transparent;\n border-image: linear-gradient(var(--hairline, var(--border-subtle, rgba(0, 0, 0, 0.06))), var(--hairline, var(--border-subtle, rgba(0, 0, 0, 0.06)))) 1 / var(--hairline-width, 1px) 0 0 0;\n}\n\n/* Screen reader only */\n.srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 8px));\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n to {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 8px));\n }\n}\n\n@keyframes sheetShow {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n}\n\n@keyframes sheetHide {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n}\n\n/* Reduced motion: the dialog and the sheet appear without moving. */\n@media (prefers-reduced-motion: reduce) {\n .content,\n .presentationSheet,\n .backButton,\n .closeButton {\n transition: none;\n }\n\n .content[data-state=\"open\"],\n .presentationSheet[data-state=\"open\"] {\n animation: fadeIn var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n }\n\n .content[data-state=\"closed\"],\n .presentationSheet[data-state=\"closed\"] {\n animation: fadeOut var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n }\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the centred panel draws the theme's squircle\n from --squircle-radius and --squircle-clip. A panel is always taller than\n twice its radius, so the radius needs no clamp. The bottom sheet rounds its\n top corners only and keeps them round. Chromium and round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .content:not(.presentationSheet) {\n --squircle-r: var(--dialog-radius, var(--radius-lg, 0.5rem));\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n :global([data-density=\"editorial\"]) .content:not(.presentationSheet) {\n --squircle-r: var(--dialog-radius, var(--radius-xl));\n }\n }\n}\n"
|
|
925
949
|
}
|
|
926
950
|
]
|
|
927
951
|
},
|
|
@@ -974,7 +998,7 @@
|
|
|
974
998
|
{
|
|
975
999
|
"path": "components/ui/dropdown-menu/dropdown-menu.module.css",
|
|
976
1000
|
"type": "registry:ui",
|
|
977
|
-
"content": "/* Dropdown menu content\n *\n * Density axis: editorial admin values are baked in as a first-class density\n * layer, switched by data-density=\"editorial\" on any ancestor. Default rendering\n * is byte-identical to the pre-refactor canonical fallbacks. Theme-agnostic:\n * editorial values resolve from palette tokens (--surface-elev, --hairline,\n * --text-tertiary, --text-muted, --destructive) — correct on entr AND animal. */\n.content {\n z-index: 50;\n min-width: 12rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 0;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n padding: var(--spacing-1, 0.25rem);\n box-shadow:\n 0 0 #0000,\n var(--shadow-lg);\n}\n\n:global([data-density=\"editorial\"]) .content {\n gap: var(--stroke-width-thin, 1px);\n border-radius: var(--radius-md);\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n padding: calc(var(--spacing-1, 0.25rem) * 1.5);\n box-shadow:\n inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent)),\n var(--shadow-lg);\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Breakout variant — use inside scroll-clipped containers (ex: DataTable rows) */\n.contentBreakout {\n z-index: 200;\n box-shadow: var(--shadow-xl, 0 28px 64px rgba(0, 0, 0, 0.55), 0 8px 16px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.06));\n}\n\n/* Sub content */\n.subContent {\n z-index: 50;\n min-width: 9rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 0;\n border-radius: var(--radius-lg, 0.5rem);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n padding: var(--spacing-1, 0.25rem);\n box-shadow:\n 0 0 #0000,\n var(--shadow-lg);\n}\n\n:global([data-density=\"editorial\"]) .subContent {\n gap: var(--stroke-width-thin, 1px);\n border-radius: var(--radius-md);\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n padding: calc(var(--spacing-1, 0.25rem) * 1.5);\n box-shadow:\n inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent)),\n var(--shadow-lg);\n}\n\n.subContent[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.subContent[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Menu item\n * Default: canonical spacing, radius-md, font-size-sm, interactive-hover bg.\n * Density axis: editorial uses 13px, 8px 10px padding, radius-sm, surface-subtle hover. */\n.item {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-md, 0.375rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .item {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n/* Leading icon — default: inherit item color and 1em size.\n * Density axis: editorial uses text-tertiary color and 16px size. */\n.item > svg {\n flex-shrink: 0;\n color: currentColor;\n width: 1em;\n height: 1em;\n}\n\n:global([data-density=\"editorial\"]) .item > svg {\n color: var(--text-tertiary);\n width: 16px;\n height: 16px;\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .item:focus,\n:global([data-density=\"editorial\"]) .item[data-highlighted] {\n background-color: var(--surface-subtle);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemDestructive {\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n/* Destructive icons track the destructive color, overriding the tertiary tint. */\n.itemDestructive > svg {\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n.itemDestructive:focus,\n.itemDestructive[data-highlighted] {\n background-color: var(--surface-error-subtle, rgba(239, 68, 68, 0.1));\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n:global([data-density=\"editorial\"]) .itemDestructive:focus,\n:global([data-density=\"editorial\"]) .itemDestructive[data-highlighted] {\n background-color: color-mix(in srgb, var(--destructive) 14%, transparent);\n}\n\n.itemInset {\n padding-left: calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem) * 1.5);\n}\n\n/* Checkbox and radio items */\n.checkboxItem,\n.radioItem {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--radius-md, 0.375rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n padding-right: var(--spacing-8, 2rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .checkboxItem,\n:global([data-density=\"editorial\"]) .radioItem {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n padding-right: var(--spacing-8, 2rem);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n.checkboxItem:focus,\n.checkboxItem[data-highlighted],\n.radioItem:focus,\n.radioItem[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .checkboxItem:focus,\n:global([data-density=\"editorial\"]) .checkboxItem[data-highlighted],\n:global([data-density=\"editorial\"]) .radioItem:focus,\n:global([data-density=\"editorial\"]) .radioItem[data-highlighted] {\n background-color: var(--surface-subtle);\n}\n\n.checkboxItem[data-disabled],\n.radioItem[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Item indicator */\n.itemIndicator {\n pointer-events: none;\n position: absolute;\n right: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n}\n\n/* Label\n * Default: canonical 12px / text-secondary / sentence-case.\n * Density axis: editorial uses 11px / uppercase / 0.08em tracking / text-tertiary / 6px 10px 2px padding. */\n.label {\n padding: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: inherit;\n letter-spacing: normal;\n text-transform: none;\n color: var(--text-secondary, #6b7280);\n}\n\n:global([data-density=\"editorial\"]) .label {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--text-tertiary);\n padding: calc(var(--spacing-1, 0.25rem) * 1.5) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n/* Separator\n * Default: spacing-1 margin, border-default color.\n * Density axis: editorial uses 4px 2px margin, hairline color. */\n.separator {\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n\n:global([data-density=\"editorial\"]) .separator {\n /* The 1px box is geometry; the line is an inset shadow whose spread is\n * --hairline-width, so 0 empties the box and nothing moves. */\n background-color: transparent;\n box-shadow: inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent));\n margin: var(--spacing-1, 0.25rem) calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n/* Shortcut\n * Default: 12px / 0.1em tracking / text-secondary.\n * Density axis: editorial uses 11px / 0.04em tracking / text-muted. */\n.shortcut {\n margin-left: auto;\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.1em;\n color: var(--text-secondary, #6b7280);\n}\n\n:global([data-density=\"editorial\"]) .shortcut {\n font-size: 11px;\n color: var(--text-muted);\n letter-spacing: 0.04em;\n}\n\n/* Sub trigger */\n.subTrigger {\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n border-radius: var(--radius-md, 0.375rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .subTrigger {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n.subTrigger > svg:not(.subTriggerIcon) {\n flex-shrink: 0;\n color: currentColor;\n width: 1em;\n height: 1em;\n}\n\n:global([data-density=\"editorial\"]) .subTrigger > svg:not(.subTriggerIcon) {\n color: var(--text-tertiary);\n width: 16px;\n height: 16px;\n}\n\n.subTrigger:focus,\n.subTrigger[data-state=\"open\"] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .subTrigger:focus,\n:global([data-density=\"editorial\"]) .subTrigger[data-state=\"open\"] {\n background-color: var(--surface-subtle);\n}\n\n.subTriggerIcon {\n margin-left: auto;\n width: 1rem;\n height: 1rem;\n color: currentColor;\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n"
|
|
1001
|
+
"content": "/* Dropdown menu content\n *\n * Density axis: editorial admin values are baked in as a first-class density\n * layer, switched by data-density=\"editorial\" on any ancestor. Default rendering\n * is byte-identical to the pre-refactor canonical fallbacks. Theme-agnostic:\n * editorial values resolve from palette tokens (--surface-elev, --hairline,\n * --text-tertiary, --text-muted, --destructive) — correct on entr AND animal. */\n.content {\n z-index: 50;\n min-width: 12rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 0;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow:\n 0 0 #0000,\n var(--shadow-lg);\n}\n\n:global([data-density=\"editorial\"]) .content {\n gap: var(--stroke-width-thin, 1px);\n --_menu-radius: var(--radius-md);\n border-radius: var(--_menu-radius);\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n --_menu-padding: calc(var(--spacing-1, 0.25rem) * 1.5);\n padding: var(--_menu-padding);\n box-shadow:\n inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent)),\n var(--shadow-lg);\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Breakout variant — use inside scroll-clipped containers (ex: DataTable rows) */\n.contentBreakout {\n z-index: 200;\n box-shadow: var(--shadow-xl, 0 28px 64px rgba(0, 0, 0, 0.55), 0 8px 16px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.06));\n}\n\n/* Sub content */\n.subContent {\n z-index: 50;\n min-width: 9rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: 0;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow:\n 0 0 #0000,\n var(--shadow-lg);\n}\n\n:global([data-density=\"editorial\"]) .subContent {\n gap: var(--stroke-width-thin, 1px);\n --_menu-radius: var(--radius-md);\n border-radius: var(--_menu-radius);\n background: var(--surface-elev, color-mix(in srgb, var(--surface-card), var(--surface-muted, var(--surface-card))));\n --_menu-padding: calc(var(--spacing-1, 0.25rem) * 1.5);\n padding: var(--_menu-padding);\n box-shadow:\n inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent)),\n var(--shadow-lg);\n}\n\n.subContent[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.subContent[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Menu item\n * Default: canonical spacing, radius-md, font-size-sm, interactive-hover bg.\n * Density axis: editorial uses 13px, 8px 10px padding, radius-sm, surface-subtle hover. */\n.item {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .item {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n/* Leading icon — default: inherit item color and 1em size.\n * Density axis: editorial uses text-tertiary color and 16px size. */\n.item > svg {\n flex-shrink: 0;\n color: currentColor;\n width: 1em;\n height: 1em;\n}\n\n:global([data-density=\"editorial\"]) .item > svg {\n color: var(--text-tertiary);\n width: 16px;\n height: 16px;\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .item:focus,\n:global([data-density=\"editorial\"]) .item[data-highlighted] {\n background-color: var(--surface-subtle);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemDestructive {\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n/* Destructive icons track the destructive color, overriding the tertiary tint. */\n.itemDestructive > svg {\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n.itemDestructive:focus,\n.itemDestructive[data-highlighted] {\n background-color: var(--surface-error-subtle, rgba(239, 68, 68, 0.1));\n color: var(--text-error, var(--destructive, #ef4444));\n}\n\n:global([data-density=\"editorial\"]) .itemDestructive:focus,\n:global([data-density=\"editorial\"]) .itemDestructive[data-highlighted] {\n background-color: color-mix(in srgb, var(--destructive) 14%, transparent);\n}\n\n.itemInset {\n padding-left: calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem) * 1.5);\n}\n\n/* Checkbox and radio items */\n.checkboxItem,\n.radioItem {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n padding-right: var(--spacing-8, 2rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .checkboxItem,\n:global([data-density=\"editorial\"]) .radioItem {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n padding-right: var(--spacing-8, 2rem);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n.checkboxItem:focus,\n.checkboxItem[data-highlighted],\n.radioItem:focus,\n.radioItem[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .checkboxItem:focus,\n:global([data-density=\"editorial\"]) .checkboxItem[data-highlighted],\n:global([data-density=\"editorial\"]) .radioItem:focus,\n:global([data-density=\"editorial\"]) .radioItem[data-highlighted] {\n background-color: var(--surface-subtle);\n}\n\n.checkboxItem[data-disabled],\n.radioItem[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Item indicator */\n.itemIndicator {\n pointer-events: none;\n position: absolute;\n right: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n}\n\n/* Label\n * Default: canonical 12px / text-secondary / sentence-case.\n * Density axis: editorial uses 11px / uppercase / 0.08em tracking / text-tertiary / 6px 10px 2px padding. */\n.label {\n padding: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: inherit;\n letter-spacing: normal;\n text-transform: none;\n color: var(--text-secondary, #6b7280);\n}\n\n:global([data-density=\"editorial\"]) .label {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--text-tertiary);\n padding: calc(var(--spacing-1, 0.25rem) * 1.5) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n/* Separator\n * Default: spacing-1 margin, border-default color.\n * Density axis: editorial uses 4px 2px margin, hairline color. */\n.separator {\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n\n:global([data-density=\"editorial\"]) .separator {\n /* The 1px box is geometry; the line is an inset shadow whose spread is\n * --hairline-width, so 0 empties the box and nothing moves. */\n background-color: transparent;\n box-shadow: inset 0 0 0 var(--hairline-width, 1px) var(--hairline, var(--border-subtle, transparent));\n margin: var(--spacing-1, 0.25rem) calc(var(--spacing-1, 0.25rem) / 2);\n}\n\n/* Shortcut\n * Default: 12px / 0.1em tracking / text-secondary.\n * Density axis: editorial uses 11px / 0.04em tracking / text-muted. */\n.shortcut {\n margin-left: auto;\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.1em;\n color: var(--text-secondary, #6b7280);\n}\n\n:global([data-density=\"editorial\"]) .shortcut {\n font-size: 11px;\n color: var(--text-muted);\n letter-spacing: 0.04em;\n}\n\n/* Sub trigger */\n.subTrigger {\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n:global([data-density=\"editorial\"]) .subTrigger {\n font-size: 13px;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n gap: var(--spacing-3);\n border-radius: var(--radius-sm);\n}\n\n.subTrigger > svg:not(.subTriggerIcon) {\n flex-shrink: 0;\n color: currentColor;\n width: 1em;\n height: 1em;\n}\n\n:global([data-density=\"editorial\"]) .subTrigger > svg:not(.subTriggerIcon) {\n color: var(--text-tertiary);\n width: 16px;\n height: 16px;\n}\n\n.subTrigger:focus,\n.subTrigger[data-state=\"open\"] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n:global([data-density=\"editorial\"]) .subTrigger:focus,\n:global([data-density=\"editorial\"]) .subTrigger[data-state=\"open\"] {\n background-color: var(--surface-subtle);\n}\n\n.subTriggerIcon {\n margin-left: auto;\n width: 1rem;\n height: 1rem;\n color: currentColor;\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n"
|
|
978
1002
|
}
|
|
979
1003
|
]
|
|
980
1004
|
},
|
|
@@ -1000,7 +1024,7 @@
|
|
|
1000
1024
|
{
|
|
1001
1025
|
"path": "components/ui/tabs/tabs.module.css",
|
|
1002
1026
|
"type": "registry:ui",
|
|
1003
|
-
"content": "/* Tabs root */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Tabs list */\n.list {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n
|
|
1027
|
+
"content": "/* Tabs root */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Tabs list */\n.list {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n --_track-radius: var(--tabs-list-radius, var(--radius-full, 9999px));\n --_track-padding: var(--tabs-list-padding, calc(var(--spacing-1, 0.25rem) * 0.75));\n border-radius: var(--_track-radius);\n /* The trigger's calc(100% - 2px) height leaves 1px above and below it; the\n same 1px at the ends keeps the gap even all the way round (VI-838). */\n padding: var(--_track-padding) calc(var(--_track-padding) + 1px);\n /* Concentric triggers (VI-837): the rail radius minus the vertical gap to the\n trigger, its padding plus the 1px the trigger's calc(100% - 2px) height leaves. */\n --_inner-radius: max(0px, calc(var(--_track-radius) - var(--_track-padding) - 1px));\n color: var(--tabs-list-color, var(--text-secondary, #6b7280));\n height: var(--tabs-list-height, 2.25rem);\n width: fit-content;\n}\n\n.listVariantDefault {\n background-color: var(--tabs-list-bg, var(--surface-muted, #f3f4f6));\n}\n\n.listVariantLine {\n position: relative;\n gap: var(--spacing-2, 0.5rem);\n background-color: transparent;\n border-radius: 0;\n /* No rail around the triggers: they keep a plain rounded focus ring. */\n --_inner-radius: var(--radius-md, 0.375rem);\n /* The border is geometry; the rail rule is painted by border-image at\n --hairline-width, so --hairline-width: 0 removes it with no layout shift.\n A bound --tabs-line-border-bottom (a full border shorthand) is not valid\n as a border-image, so binding it drops the painted rule and draws the\n bound border instead. */\n border-bottom: var(--tabs-line-border-bottom, 1px solid transparent);\n border-image: var(\n --tabs-line-border-bottom,\n linear-gradient(var(--hairline, var(--border-default, #e5e7eb)), var(--hairline, var(--border-default, #e5e7eb))) 1 / 0 0 var(--hairline-width, 1px) 0\n );\n height: auto;\n padding-bottom: 0;\n width: 100%;\n justify-content: flex-start;\n}\n\n/* Line variant: content-width triggers with comfortable padding — the strip\n reads as an underlined rail, not a segmented control. */\n.listVariantLine .trigger {\n flex: 0 0 auto;\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n --label-box-height: calc(1lh + var(--spacing-2, 0.5rem) * 2 + 2px);\n}\n\n/* Tabs trigger */\n.trigger {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n border-radius: var(--tabs-trigger-radius, var(--_inner-radius));\n border: 1px solid transparent;\n padding: var(--tabs-trigger-padding, var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem));\n font-size: var(--tabs-trigger-font-size, var(--font-size-sm, 0.875rem));\n font-weight: var(--tabs-trigger-font-weight, var(--font-weight-medium, 500));\n letter-spacing: var(--tabs-trigger-letter-spacing, inherit);\n text-transform: var(--tabs-trigger-text-transform, inherit);\n white-space: nowrap;\n color: var(--tabs-trigger-color, var(--text-secondary, #6b7280));\n background: transparent;\n cursor: pointer;\n transition: color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out), transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: none;\n flex: 1;\n height: calc(100% - 2px);\n /* VI-684: outer height, for the label correction (list height - list padding - 2px). */\n --label-box-height: calc(var(--tabs-list-height, 2.25rem) - var(--spacing-1, 0.25rem) * 1.5 - 2px);\n}\n\n.trigger:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n@media (hover: hover) {\n .trigger:hover {\n color: var(--text-primary, #111827);\n }\n}\n\n.trigger:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.trigger:disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.trigger[data-state=\"active\"] {\n background-color: var(--tabs-trigger-active-bg, var(--surface-page, #ffffff));\n color: var(--tabs-trigger-active-color, var(--text-primary, #111827));\n box-shadow: var(--tabs-trigger-active-shadow, var(--shadow-sm));\n}\n\n/* Trigger label — wraps children to allow count pill alongside */\n.label {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Bare label text (no count pill) — same block, without the flex sizing of .label. */\n.text {\n display: block;\n white-space: nowrap;\n}\n\n/* Count pill */\n.count {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: var(--radius-full, 9999px);\n padding: 0 var(--spacing-2, 0.5rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n font-variant-numeric: tabular-nums;\n line-height: 1.5;\n vertical-align: baseline;\n}\n\n.countNeutral {\n background-color: var(--surface-muted, #f3f4f6);\n color: var(--text-secondary, #6b7280);\n}\n\n.countPrimary {\n background-color: var(--surface-accent-subtle, #eff6ff);\n color: var(--text-link, #2563eb);\n}\n\n/* Active-state re-tone: regardless of countTone, re-tone to primary on active */\n.trigger[data-state=\"active\"] .count {\n background-color: var(--surface-accent-subtle, #eff6ff);\n color: var(--text-link, #2563eb);\n}\n\n/* Tabs content */\n.content {\n flex: 1;\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n}\n\n.content:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Line variant: active trigger loses shadow/bg, just text color */\n.listVariantLine .trigger[data-state=\"active\"] {\n background-color: transparent;\n box-shadow: none;\n}\n\n/* Animated sliding indicator for line variant */\n.indicator {\n position: absolute;\n bottom: -1px;\n height: var(--tabs-indicator-height, 2px);\n /* Default: text-primary */\n background-color: var(--tabs-indicator-color, var(--text-primary, #111827));\n border-radius: var(--radius-full, 9999px);\n transition: left var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out),\n width var(--motion-duration-normal, 200ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Density axis — editorial: brand primary underline for dark admin surfaces */\n:global([data-density=\"editorial\"]) .indicator {\n background-color: var(--primary);\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label's line\n box is trimmed to the capital-to-baseline band, so the flex container centres\n the ink and not the font's ascent/descent. padding-block hands back the room\n the trim took, so the control's intrinsic box is unchanged. Without text-box\n (Firefox) rendering is exactly what it was. */\n@supports (text-box: trim-both cap alphabetic) {\n .text {\n text-box: trim-both cap alphabetic;\n padding-block: calc((1lh - 1cap) / 2);\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took, from the control's outer height (--label-box-height, set per size\n above; left unset, the correction is simply off). WebKit places the baseline\n exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .text {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n"
|
|
1004
1028
|
}
|
|
1005
1029
|
]
|
|
1006
1030
|
},
|
|
@@ -1129,7 +1153,7 @@
|
|
|
1129
1153
|
{
|
|
1130
1154
|
"path": "components/ui/context-menu/context-menu.module.css",
|
|
1131
1155
|
"type": "registry:ui",
|
|
1132
|
-
"content": "/* Context menu content */\n.content {\n z-index: 50;\n min-width: 12rem;\n overflow: hidden;\n
|
|
1156
|
+
"content": "/* Context menu content */\n.content {\n z-index: 50;\n min-width: 12rem;\n overflow: hidden;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow: var(--shadow-lg);\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Sub content */\n.subContent {\n z-index: 50;\n min-width: 9rem;\n overflow: hidden;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow: var(--shadow-lg);\n}\n\n.subContent[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.subContent[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Menu item */\n.item {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemDestructive {\n color: var(--text-error, #ef4444);\n}\n\n.itemDestructive:focus,\n.itemDestructive[data-highlighted] {\n background-color: var(--surface-error-subtle, rgba(239, 68, 68, 0.1));\n color: var(--text-error, #ef4444);\n}\n\n.itemInset {\n padding-left: calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem) * 1.5);\n}\n\n/* Checkbox and radio items */\n.checkboxItem,\n.radioItem {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n padding-right: var(--spacing-8, 2rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.checkboxItem:focus,\n.checkboxItem[data-highlighted],\n.radioItem:focus,\n.radioItem[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.checkboxItem[data-disabled],\n.radioItem[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Item indicator */\n.itemIndicator {\n pointer-events: none;\n position: absolute;\n right: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n}\n\n/* Label */\n.label {\n padding: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n color: var(--text-secondary, #6b7280);\n}\n\n/* Separator */\n.separator {\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n\n/* Shortcut */\n.shortcut {\n margin-left: auto;\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.1em;\n color: var(--text-secondary, #6b7280);\n}\n\n/* Sub trigger */\n.subTrigger {\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out), color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.subTrigger:focus,\n.subTrigger[data-state=\"open\"] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.subTriggerIcon {\n margin-left: auto;\n width: 1rem;\n height: 1rem;\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n"
|
|
1133
1157
|
}
|
|
1134
1158
|
]
|
|
1135
1159
|
},
|
|
@@ -1412,12 +1436,12 @@
|
|
|
1412
1436
|
{
|
|
1413
1437
|
"path": "components/ui/radio-group/radio-group.tsx",
|
|
1414
1438
|
"type": "registry:ui",
|
|
1415
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { CheckIcon, CircleIcon } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./radio-group.module.css\"\n\nexport type RadioGroupVariant = \"default\" | \"card\"\n\nexport type RadioGroupIndicator = \"check\" | \"dot\"\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /**\n * `default` draws a dot beside a label. `card` draws each item as a card with\n * an icon, a title and a one-line description.\n */\n variant?: RadioGroupVariant\n /**\n * Card variant: `check` (default) draws a check in a filled disc on the chosen\n * card; `dot` draws a ring on every card and a dot inside the chosen one.\n */\n indicator?: RadioGroupIndicator\n}\n\nconst RadioGroupVariantContext = React.createContext<RadioGroupVariant>(\"default\")\nconst CardIndicatorContext = React.createContext<RadioGroupIndicator>(\"check\")\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n RadioGroupProps\n>(({ className, variant = \"default\", indicator = \"check\", ...props }, ref) => {\n return (\n <RadioGroupVariantContext.Provider value={variant}>\n <CardIndicatorContext.Provider value={indicator}>\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-variant={variant}\n data-indicator={variant === \"card\" ? indicator : undefined}\n className={cn(styles.root
|
|
1439
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { CheckIcon, CircleIcon } from \"@phosphor-icons/react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./radio-group.module.css\"\n\nexport type RadioGroupVariant = \"default\" | \"card\" | \"stepped\"\n\nexport type RadioGroupIndicator = \"check\" | \"dot\"\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {\n /**\n * `default` draws a dot beside a label. `card` draws each item as a card with\n * an icon, a title and a one-line description. `stepped` draws one row of\n * equal tiles in a well, each an icon over a short label.\n */\n variant?: RadioGroupVariant\n /**\n * Card variant: `check` (default) draws a check in a filled disc on the chosen\n * card; `dot` draws a ring on every card and a dot inside the chosen one.\n */\n indicator?: RadioGroupIndicator\n /** Stepped variant: `compact` sets the labels a step smaller (10px, from 11px). */\n size?: \"default\" | \"compact\"\n}\n\nconst RadioGroupVariantContext = React.createContext<RadioGroupVariant>(\"default\")\nconst CardIndicatorContext = React.createContext<RadioGroupIndicator>(\"check\")\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n RadioGroupProps\n>(({ className, variant = \"default\", indicator = \"check\", size = \"default\", ...props }, ref) => {\n return (\n <RadioGroupVariantContext.Provider value={variant}>\n <CardIndicatorContext.Provider value={indicator}>\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-variant={variant}\n data-indicator={variant === \"card\" ? indicator : undefined}\n data-size={variant === \"stepped\" ? size : undefined}\n className={cn(\n styles.root,\n variant === \"card\" && styles.rootCard,\n variant === \"stepped\" && styles.rootStepped,\n className\n )}\n ref={ref}\n {...props}\n />\n </CardIndicatorContext.Provider>\n </RadioGroupVariantContext.Provider>\n )\n})\nRadioGroup.displayName = \"RadioGroup\"\n\nexport interface RadioGroupItemProps\n extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, \"title\"> {\n /** Card and stepped variants: the icon or swatch. Decorative, hidden from assistive tech. */\n icon?: React.ReactNode\n /** Card and stepped variants: the option's name. It is the item's accessible name. */\n title?: React.ReactNode\n /** Card variant: one line saying what the option means. It describes the item. */\n description?: React.ReactNode\n}\n\nfunction joinIds(...ids: Array<string | undefined>): string | undefined {\n const joined = ids.filter(Boolean).join(\" \")\n return joined || undefined\n}\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupItemProps\n>(({ className, icon, title, description, children, ...props }, ref) => {\n const variant = React.useContext(RadioGroupVariantContext)\n const indicator = React.useContext(CardIndicatorContext)\n const uid = React.useId()\n const titleId = `${uid}-title`\n const descriptionId = `${uid}-description`\n\n if (variant === \"stepped\") {\n const { \"aria-labelledby\": labelledBy, ...rest } = props\n const hasTitle = title !== undefined && title !== null\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(styles.step, className)}\n aria-labelledby={labelledBy ?? (hasTitle ? titleId : undefined)}\n ref={ref}\n {...rest}\n >\n {icon ? (\n <span data-slot=\"radio-group-step-icon\" className={styles.stepIcon} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n {hasTitle ? (\n <span id={titleId} data-slot=\"radio-group-step-title\" className={styles.stepTitle}>\n {title}\n </span>\n ) : null}\n {children}\n </RadioGroupPrimitive.Item>\n )\n }\n\n if (variant === \"card\") {\n const hasTitle = title !== undefined && title !== null\n const hasDescription = description !== undefined && description !== null\n const {\n \"aria-describedby\": describedBy,\n \"aria-labelledby\": labelledBy,\n ...rest\n } = props\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(styles.card, className)}\n aria-labelledby={labelledBy ?? (hasTitle ? titleId : undefined)}\n aria-describedby={joinIds(hasDescription ? descriptionId : undefined, describedBy)}\n ref={ref}\n {...rest}\n >\n {icon ? (\n <span data-slot=\"radio-group-card-icon\" className={styles.cardIcon} aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n <span className={styles.cardText}>\n {hasTitle ? (\n <span id={titleId} data-slot=\"radio-group-card-title\" className={styles.cardTitle}>\n {title}\n </span>\n ) : null}\n {hasDescription ? (\n <span\n id={descriptionId}\n data-slot=\"radio-group-card-description\"\n className={styles.cardDescription}\n >\n {description}\n </span>\n ) : null}\n {children}\n </span>\n <span\n className={cn(styles.cardMark, indicator === \"dot\" && styles.cardMarkDot)}\n aria-hidden=\"true\"\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={cn(styles.cardIndicator, indicator === \"dot\" && styles.cardIndicatorDot)}\n >\n {indicator === \"dot\" ? null : <CheckIcon weight=\"bold\" className={styles.cardCheck} />}\n </RadioGroupPrimitive.Indicator>\n </span>\n </RadioGroupPrimitive.Item>\n )\n }\n\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(styles.item, className)}\n ref={ref}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={styles.indicator}\n >\n <CircleIcon weight=\"fill\" className={styles.icon} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = \"RadioGroupItem\"\n\nexport { RadioGroup, RadioGroupItem }\n"
|
|
1416
1440
|
},
|
|
1417
1441
|
{
|
|
1418
1442
|
"path": "components/ui/radio-group/radio-group.module.css",
|
|
1419
1443
|
"type": "registry:ui",
|
|
1420
|
-
"content": "/* RadioGroup root */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* RadioGroup item (the button)\n\n VI-668: the border only holds box geometry and is always transparent. The\n visible resting edge is an inset outline on the shared --control-edge-*\n tokens, so --control-edge-width: 0 on any ancestor removes it with no layout\n shift. --radio-border is the per-component colour override. */\n.item {\n position: relative;\n display: flex;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n border: 1px solid transparent;\n background-color: transparent;\n /* With the edge switched off an unchecked dot would vanish, and the dot is\n the control. So it takes a fill whose size is derived from the switch: 0\n while the edge is on, the whole box once the edge width drops to 0. */\n background-image: linear-gradient(var(--radio-edgeless-bg, var(--control-edge-color, var(--border-default, #e5e7eb))), var(--radio-edgeless-bg, var(--control-edge-color, var(--border-default, #e5e7eb))));\n background-size: calc(max(0px, 1px - var(--control-edge-width, 1px)) * 1000);\n background-origin: border-box;\n background-repeat: no-repeat;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--radio-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .item:hover:not(:focus-visible):not(:disabled) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not touch. */\n.item:focus-visible {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.item:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.item[data-state=\"checked\"] {\n outline-color: var(--interactive-primary-bg, var(--primary, #111827));\n background-image: none;\n background-color: var(--interactive-primary-bg, var(--primary, #111827));\n color: var(--interactive-primary-text, #f9fafb);\n}\n\n/* Indicator */\n.indicator {\n display: grid;\n place-content: center;\n color: currentColor;\n}\n\n.icon {\n width: 0.5rem;\n height: 0.5rem;\n}\n\n/* ---------------------------------------------------------------------------\n Card variant (VI-668). Each item is a card: icon, title, one-line\n description and a check mark. The border is geometry only; the resting edge\n is an inset outline on the shared --control-edge-* tokens, so\n --control-edge-width: 0 removes it. The selected card is a lifted fill with a\n light inset edge, never white, and it also carries a check, so selection is\n never colour alone.\n --------------------------------------------------------------------------- */\n.rootCard {\n gap: var(--spacing-3, 0.75rem);\n}\n\n.card {\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n border: 1px solid transparent;\n border-radius: var(--radio-card-radius, var(--radius-lg, 0.5rem));\n background-color: var(--radio-card-bg, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n text-align: left;\n outline: var(--control-edge-width, var(--stroke-width-thin, 1px)) var(--control-edge-style, solid) var(--radio-card-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, var(--stroke-width-thin, 1px)));\n cursor: pointer;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .card:hover:not(:focus-visible):not(:disabled):not([data-state=\"checked\"]) {\n outline-color: var(--border-strong, #d1d5db);\n background-color: var(--radio-card-hover-bg, var(--surface-interactive-hover, var(--surface-muted, #f3f4f6)));\n }\n}\n\n.card:focus-visible {\n outline: var(--control-state-edge-width, var(--stroke-width-thin, 1px)) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, var(--stroke-width-thin, 1px)));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 25%, transparent);\n}\n\n.card[aria-invalid=\"true\"] {\n outline: var(--control-state-edge-width, var(--stroke-width-thin, 1px)) solid var(--border-error, var(--destructive, #dc2626));\n outline-offset: calc(-1 * var(--control-state-edge-width, var(--stroke-width-thin, 1px)));\n}\n\n.card[data-state=\"checked\"] {\n background-color: var(--radio-card-selected-bg, color-mix(in srgb, var(--text-primary, #111827) 10%, var(--radio-card-bg, var(--surface-card, #ffffff))));\n outline-color: var(--radio-card-selected-border, color-mix(in srgb, var(--text-primary, #111827) 40%, transparent));\n}\n\n/* A disabled card stays in place and stays readable: dimmed, not removed. */\n.card:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-60, 0.6);\n}\n\n.cardIcon {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--radio-card-icon-size, 1.5rem);\n height: var(--radio-card-icon-size, 1.5rem);\n color: var(--text-secondary, #6b7280);\n font-size: var(--radio-card-icon-size, 1.5rem);\n}\n\n.card[data-state=\"checked\"] .cardIcon {\n color: var(--text-primary, #111827);\n}\n\n.cardText {\n display: flex;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.cardTitle {\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-semibold, 600);\n line-height: var(--line-height-tight, 1.25);\n color: var(--text-primary, #111827);\n}\n\n.cardDescription {\n font-size: var(--font-size-xs, 0.75rem);\n line-height: var(--line-height-snug, 1.375);\n color: var(--text-secondary, #6b7280);\n}\n\n/* The mark: a ring that holds a check once the card is chosen. */\n.cardMark {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 1.25rem;\n height: 1.25rem;\n border-radius: var(--radius-full, 9999px);\n}\n\n.cardIndicator {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background-color: var(--radio-card-mark-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--radio-card-mark-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.cardCheck {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n/* indicator=\"dot\": a ring on every card, a dot inside the chosen one. */\n.cardMarkDot {\n box-sizing: border-box;\n /* Inset outline, not border (VI-655); padding keeps the dot's room the border gave. */\n padding: var(--stroke-width-regular, 2px);\n outline: var(--stroke-width-regular, 2px) solid\n var(--radio-card-ring, color-mix(in srgb, var(--text-primary, #111827) 30%, transparent));\n outline-offset: calc(-1 * var(--stroke-width-regular, 2px));\n}\n\n.card[data-state=\"checked\"] .cardMarkDot {\n outline-color: var(--radio-card-ring-selected, var(--radio-card-dot, var(--interactive-primary-bg, var(--primary, #111827))));\n}\n\n.cardIndicatorDot {\n width: 50%;\n height: 50%;\n background-color: var(--radio-card-dot, var(--interactive-primary-bg, var(--primary, #111827)));\n}\n"
|
|
1444
|
+
"content": "/* RadioGroup root */\n.root {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* RadioGroup item (the button)\n\n VI-668: the border only holds box geometry and is always transparent. The\n visible resting edge is an inset outline on the shared --control-edge-*\n tokens, so --control-edge-width: 0 on any ancestor removes it with no layout\n shift. --radio-border is the per-component colour override. */\n.item {\n position: relative;\n display: flex;\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n border: 1px solid transparent;\n background-color: transparent;\n /* With the edge switched off an unchecked dot would vanish, and the dot is\n the control. So it takes a fill whose size is derived from the switch: 0\n while the edge is on, the whole box once the edge width drops to 0. */\n background-image: linear-gradient(var(--radio-edgeless-bg, var(--control-edge-color, var(--border-default, #e5e7eb))), var(--radio-edgeless-bg, var(--control-edge-color, var(--border-default, #e5e7eb))));\n background-size: calc(max(0px, 1px - var(--control-edge-width, 1px)) * 1000);\n background-origin: border-box;\n background-repeat: no-repeat;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--radio-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .item:hover:not(:focus-visible):not(:disabled) {\n outline-color: var(--border-strong, #d1d5db);\n }\n}\n\n/* Focus draws at --control-state-edge-width, which the edge switch does not touch. */\n.item:focus-visible {\n outline: var(--control-state-edge-width, 1px) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, 1px));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.item:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.item[data-state=\"checked\"] {\n outline-color: var(--interactive-primary-bg, var(--primary, #111827));\n background-image: none;\n background-color: var(--interactive-primary-bg, var(--primary, #111827));\n color: var(--interactive-primary-text, #f9fafb);\n}\n\n/* Indicator */\n.indicator {\n display: grid;\n place-content: center;\n color: currentColor;\n}\n\n.icon {\n width: 0.5rem;\n height: 0.5rem;\n}\n\n/* ---------------------------------------------------------------------------\n Card variant (VI-668). Each item is a card: icon, title, one-line\n description and a check mark. The border is geometry only; the resting edge\n is an inset outline on the shared --control-edge-* tokens, so\n --control-edge-width: 0 removes it. The selected card is a lifted fill with a\n light inset edge, never white, and it also carries a check, so selection is\n never colour alone.\n --------------------------------------------------------------------------- */\n.rootCard {\n gap: var(--spacing-3, 0.75rem);\n}\n\n.card {\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n gap: var(--spacing-3, 0.75rem);\n padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);\n border: 1px solid transparent;\n border-radius: var(--radio-card-radius, var(--radius-lg, 0.5rem));\n background-color: var(--radio-card-bg, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n text-align: left;\n outline: var(--control-edge-width, var(--stroke-width-thin, 1px)) var(--control-edge-style, solid) var(--radio-card-border, var(--control-edge-color, var(--border-default, #e5e7eb)));\n outline-offset: calc(-1 * var(--control-edge-width, var(--stroke-width-thin, 1px)));\n cursor: pointer;\n transition: outline-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .card:hover:not(:focus-visible):not(:disabled):not([data-state=\"checked\"]) {\n outline-color: var(--border-strong, #d1d5db);\n background-color: var(--radio-card-hover-bg, var(--surface-interactive-hover, var(--surface-muted, #f3f4f6)));\n }\n}\n\n.card:focus-visible {\n outline: var(--control-state-edge-width, var(--stroke-width-thin, 1px)) solid var(--border-focus, #111827);\n outline-offset: calc(-1 * var(--control-state-edge-width, var(--stroke-width-thin, 1px)));\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 25%, transparent);\n}\n\n.card[aria-invalid=\"true\"] {\n outline: var(--control-state-edge-width, var(--stroke-width-thin, 1px)) solid var(--border-error, var(--destructive, #dc2626));\n outline-offset: calc(-1 * var(--control-state-edge-width, var(--stroke-width-thin, 1px)));\n}\n\n.card[data-state=\"checked\"] {\n background-color: var(--radio-card-selected-bg, color-mix(in srgb, var(--text-primary, #111827) 10%, var(--radio-card-bg, var(--surface-card, #ffffff))));\n outline-color: var(--radio-card-selected-border, color-mix(in srgb, var(--text-primary, #111827) 40%, transparent));\n}\n\n/* A disabled card stays in place and stays readable: dimmed, not removed. */\n.card:disabled {\n cursor: not-allowed;\n opacity: var(--opacity-60, 0.6);\n}\n\n.cardIcon {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--radio-card-icon-size, 1.5rem);\n height: var(--radio-card-icon-size, 1.5rem);\n color: var(--text-secondary, #6b7280);\n font-size: var(--radio-card-icon-size, 1.5rem);\n}\n\n.card[data-state=\"checked\"] .cardIcon {\n color: var(--text-primary, #111827);\n}\n\n.cardText {\n display: flex;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.cardTitle {\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-semibold, 600);\n line-height: var(--line-height-tight, 1.25);\n color: var(--text-primary, #111827);\n}\n\n.cardDescription {\n font-size: var(--font-size-xs, 0.75rem);\n line-height: var(--line-height-snug, 1.375);\n color: var(--text-secondary, #6b7280);\n}\n\n/* The mark: a ring that holds a check once the card is chosen. */\n.cardMark {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 1.25rem;\n height: 1.25rem;\n border-radius: var(--radius-full, 9999px);\n}\n\n.cardIndicator {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background-color: var(--radio-card-mark-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--radio-card-mark-text, var(--interactive-primary-text, #f9fafb));\n}\n\n.cardCheck {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n/* indicator=\"dot\": a ring on every card, a dot inside the chosen one. */\n.cardMarkDot {\n box-sizing: border-box;\n /* Inset outline, not border (VI-655); padding keeps the dot's room the border gave. */\n padding: var(--stroke-width-regular, 2px);\n outline: var(--stroke-width-regular, 2px) solid\n var(--radio-card-ring, color-mix(in srgb, var(--text-primary, #111827) 30%, transparent));\n outline-offset: calc(-1 * var(--stroke-width-regular, 2px));\n}\n\n.card[data-state=\"checked\"] .cardMarkDot {\n outline-color: var(--radio-card-ring-selected, var(--radio-card-dot, var(--interactive-primary-bg, var(--primary, #111827))));\n}\n\n.cardIndicatorDot {\n width: 50%;\n height: 50%;\n background-color: var(--radio-card-dot, var(--interactive-primary-bg, var(--primary, #111827)));\n}\n\n/* ---------------------------------------------------------------------------\n Stepped variant (VI-840). One row of equal tiles in a well darker than its\n plane, each an icon over a label of up to two lines. The chosen tile is a\n keyed fill with a keyed hairline and a lit top edge; its icon takes the key\n and its label full ink. Tile corners are concentric with the well's.\n --------------------------------------------------------------------------- */\n.rootStepped {\n --_key: var(--radio-step-key, var(--interactive-primary-bg, var(--primary, #111827)));\n --_well-radius: var(--radio-step-well-radius, var(--radius-xl, 0.75rem));\n --_well-padding: var(--spacing-1, 0.25rem);\n display: grid;\n grid-auto-columns: minmax(0, 1fr);\n grid-auto-flow: column;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n padding: var(--_well-padding);\n border-radius: var(--_well-radius);\n background-color: var(--radio-step-well, color-mix(in srgb, var(--text-primary, #111827) 12%, var(--surface-page, #ffffff)));\n}\n\n.step {\n position: relative;\n display: grid;\n justify-items: center;\n align-content: start;\n gap: calc(var(--spacing-1, 0.25rem) * 1.5);\n min-width: 0;\n padding: var(--spacing-3, 0.75rem) var(--spacing-1, 0.25rem) calc(var(--spacing-1, 0.25rem) * 2.5);\n border: 0;\n border-radius: max(0px, calc(var(--_well-radius) - var(--_well-padding)));\n background-color: transparent;\n color: var(--radio-step-ink, var(--text-tertiary, #9ca3af));\n text-align: center;\n cursor: pointer;\n transition: background-color var(--motion-duration-300, 300ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-300, 300ms) var(--motion-easing-default, ease-in-out);\n}\n\n@media (hover: hover) {\n .step:hover:not(:disabled):not([data-state=\"checked\"]) {\n background-color: color-mix(in srgb, var(--text-primary, #111827) 5%, transparent);\n }\n}\n\n.step:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--_key);\n outline-offset: calc(var(--focus-ring-offset, 2px) / 2);\n}\n\n.step[data-state=\"checked\"] {\n background-color: var(--radio-step-selected-bg, color-mix(in srgb, var(--_key) 12%, var(--surface-elev-2, #f3f4f6)));\n box-shadow: inset 0 var(--stroke-width-thin, 1px) 0 color-mix(in srgb, var(--text-primary, #111827) 8%, transparent),\n inset 0 0 0 var(--stroke-width-thin, 1px) var(--radio-step-selected-border, color-mix(in srgb, var(--_key) 35%, transparent));\n color: var(--text-primary, #111827);\n}\n\n.step:disabled {\n cursor: not-allowed;\n /* The approved 35%; the opacity scale has no step between 20 and 40. */\n opacity: 0.35;\n}\n\n.stepIcon {\n display: inline-flex;\n font-size: var(--radio-step-icon-size, 1.25rem);\n line-height: 0;\n color: var(--radio-step-ink, var(--text-tertiary, #9ca3af));\n transition: color var(--motion-duration-300, 300ms) var(--motion-easing-default, ease-in-out);\n}\n\n.stepIcon > svg {\n width: 1em;\n height: 1em;\n}\n\n.step[data-state=\"checked\"] .stepIcon {\n color: var(--_key);\n}\n\n.stepTitle {\n font-size: var(--font-size-2xs, 0.6875rem);\n line-height: var(--line-height-tight, 1.25);\n}\n\n.rootStepped[data-size=\"compact\"] .stepTitle {\n font-size: 0.625rem;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .step,\n .stepIcon {\n transition: none;\n }\n}\n"
|
|
1421
1445
|
}
|
|
1422
1446
|
]
|
|
1423
1447
|
},
|
|
@@ -1437,12 +1461,12 @@
|
|
|
1437
1461
|
{
|
|
1438
1462
|
"path": "components/ui/billing-slider/billing-slider.tsx",
|
|
1439
1463
|
"type": "registry:ui",
|
|
1440
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./billing-slider.module.css\"\n\nexport interface BillingSliderMark {\n /** Where the notch sits. A mark is not a stop: the thumb passes it freely. */\n value: number\n /** Text before the value in the labels row (\"High\"). */\n label?: React.ReactNode\n /** Past this mark the filled range turns to stripes (the \"past the high\" zone). */\n hatchPast?: boolean\n}\n\nexport interface BillingSliderEvidence {\n /** Confirmed hours: a solid strip along the track's foot, and a full-height tick at its end. */\n value: number\n /** Agent hours counted as evidence: a dotted extension that moves the tick. Leave it off when they don't count. */\n agent?: number\n /** Proposed, unconfirmed hours: a pale extension past the tick, and a dashed tick at its end. */\n proposed?: number\n}\n\nexport interface BillingSliderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"defaultValue\" | \"onChange\"> {\n /** What it bills. Controlled. */\n value: number\n onValueChange: (value: number) => void\n /** Enter, or releasing the thumb after a drag. Arrow keys never commit. */\n onValueCommit?: (value: number) => void\n /** The last saved value. Escape puts the thumb back here. */\n savedValue?: number\n /** The floor. Nothing below it. */\n min: number\n /** The track's end, computed by the caller (as far as the ceiling allows). */\n max: number\n /** Defaults to 0.25 (a quarter hour). Shift + arrows step four times this. */\n step?: number\n /** Notches across the track, with their text in the labels row. */\n marks?: BillingSliderMark[]\n /** What was worked, drawn along the track's foot. */\n evidence?: BillingSliderEvidence\n /** Stripe the gap between the thumb and the evidence tick (money at stake, not decided). */\n gap?: boolean\n /** A Paper project-hue angle (75, 99 … 339). Reads `--paper-hue-<angle>-fill-strong` and `-ink`. */\n hue?: number\n /** `\"md\"` is the 40px row track; `\"lg\"` is the 56px hero track. */\n size?: \"md\" | \"lg\"\n /** `\"saving\"` pulses the thumb. `\"failed\"` is a hook for styling; put `value` back to `savedValue`. */\n status?: \"saving\" | \"failed\"\n disabled?: boolean\n /** Formats a value for the bubble and the labels row. Defaults to the number. */\n formatValue?: (value: number) => string\n /** `aria-valuetext`: the formatted value and its amount (\"Bills 9.5 h, $1,140\"). Defaults to `formatValue`. */\n valueText?: (value: number) => string\n /** Text before the floor's value (\"Low\"). */\n minLabel?: React.ReactNode\n /** Text before the end's value (\"Ceiling allows\"). */\n maxLabel?: React.ReactNode\n}\n\nconst BIG_STEP = 4\n\nconst BillingSlider = React.forwardRef<HTMLDivElement, BillingSliderProps>(\n (\n {\n className,\n style,\n value,\n onValueChange,\n onValueCommit,\n savedValue,\n min,\n max,\n step = 0.25,\n marks = [],\n evidence,\n gap = false,\n hue,\n size = \"md\",\n status,\n disabled = false,\n formatValue = String,\n valueText,\n minLabel,\n maxLabel,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props\n },\n ref\n ) => {\n const span = max - min\n const pct = (v: number) => (span > 0 ? ((Math.min(Math.max(v, min), max) - min) / span) * 100 : 0)\n const at = (from: number, to: number) => ({ left: `${pct(from)}%`, width: `${Math.max(pct(to) - pct(from), 0)}%` })\n // Round to the step from the floor; the 1e6 round trip drops float noise (0.1 + 0.2).\n const snap = (v: number) =>\n Math.min(Math.max(Math.round(Math.round((v - min) / step) * step * 1e6) / 1e6 + min, min), max)\n\n const hatchAt = marks.find((m) => m.hatchPast)?.value\n const fillTo = hatchAt === undefined ? value : Math.min(value, hatchAt)\n const worked = evidence?.value ?? 0\n const evEnd = worked + (evidence?.agent ?? 0)\n const proposedEnd = evEnd + (evidence?.proposed ?? 0)\n const gapTo = Math.min(evEnd, max)\n const showGap = gap && evidence !== undefined && gapTo - value >= step\n\n const ruler: number[] = []\n for (let h = Math.floor(min) + 1; h < max; h++) ruler.push(h)\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLSpanElement>) => {\n if (disabled) return\n const by = e.shiftKey ? step * BIG_STEP : step\n const next: number | undefined = {\n ArrowRight: value + by,\n ArrowUp: value + by,\n ArrowLeft: value - by,\n ArrowDown: value - by,\n PageUp: value + step * BIG_STEP,\n PageDown: value - step * BIG_STEP,\n Home: min,\n End: max,\n }[e.key]\n // preventDefault also skips Radix's own key handling, which would commit on every step.\n if (next !== undefined) {\n e.preventDefault()\n const v = next === max ? max : snap(next)\n if (v !== value) onValueChange(v)\n } else if (e.key === \"Enter\") {\n e.preventDefault()\n onValueCommit?.(value)\n } else if (e.key === \"Escape\" && savedValue !== undefined) {\n e.preventDefault()\n if (savedValue !== value) onValueChange(savedValue)\n }\n }\n\n const hueVars =\n hue === undefined\n ? undefined\n : ({\n \"--billing-slider-hue-fill-strong\": `var(--paper-hue-${hue}-fill-strong)`,\n \"--billing-slider-hue-ink\": `var(--paper-hue-${hue}-ink)`,\n } as React.CSSProperties)\n\n const markLabels = marks.filter((m) => {\n const p = pct(m.value)\n // shortcut: hides a mark's text near either end so it can't collide with the floor or end text; measure the labels if that ever clips.\n return m.label != null && p > 18 && p < 72\n })\n\n return (\n <div\n ref={ref}\n data-slot=\"billing-slider\"\n data-size={size}\n data-status={status}\n data-disabled={disabled ? \"\" : undefined}\n className={cn(styles.root, className)}\n style={{ ...hueVars, ...style }}\n {...props}\n >\n <SliderPrimitive.Root\n className={styles.slider}\n value={[value]}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n onValueChange={([v]) => onValueChange(v)}\n onValueCommit={([v]) => onValueCommit?.(v)}\n onKeyDown={onKeyDown}\n >\n <SliderPrimitive.Track data-slot=\"billing-slider-track\" className={styles.track}>\n <span className={styles.ruler} aria-hidden>\n {ruler.map((h) => (\n <i key={h} style={{ left: `${pct(h)}%` }} />\n ))}\n </span>\n <span data-slot=\"billing-slider-fill\" className={styles.fill} style={{ width: `${pct(fillTo)}%` }} />\n {hatchAt !== undefined && value > hatchAt && (\n <span data-slot=\"billing-slider-past\" className={styles.past} style={at(hatchAt, value)} />\n )}\n {showGap && <span data-slot=\"billing-slider-gap\" className={styles.gap} style={at(value, gapTo)} />}\n {evidence && worked > min && (\n <span data-slot=\"billing-slider-evidence\" className={styles.evidence} style={{ width: `${pct(worked)}%` }} />\n )}\n {evidence?.agent && evEnd > min ? (\n <span data-slot=\"billing-slider-agent\" className={styles.agent} style={at(Math.max(worked, min), evEnd)} />\n ) : null}\n {evidence?.proposed && proposedEnd > min ? (\n <span data-slot=\"billing-slider-proposed\" className={styles.proposed} style={at(Math.max(evEnd, min), proposedEnd)} />\n ) : null}\n {marks.map((m, i) => (\n <span key={i} data-slot=\"billing-slider-mark\" className={styles.mark} style={{ left: `${pct(m.value)}%` }} />\n ))}\n {evidence && evEnd >= min && (\n <span\n data-slot=\"billing-slider-tick\"\n data-out={evEnd > max ? \"\" : undefined}\n className={styles.tick}\n style={{ left: `${pct(evEnd)}%` }}\n />\n )}\n {evidence?.proposed && proposedEnd >= min && proposedEnd <= max ? (\n <span\n data-slot=\"billing-slider-tick\"\n data-variant=\"proposed\"\n className={styles.tick}\n style={{ left: `${pct(proposedEnd)}%` }}\n />\n ) : null}\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb\n data-slot=\"billing-slider-thumb\"\n className={styles.thumb}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-valuetext={(valueText ?? formatValue)(value)}\n >\n <span className={styles.bubble} aria-hidden>\n {formatValue(value)}\n </span>\n </SliderPrimitive.Thumb>\n </SliderPrimitive.Root>\n <div data-slot=\"billing-slider-labels\" className={styles.labels}>\n <span style={{ left: 0 }}>\n {minLabel} <b>{formatValue(min)}</b>\n </span>\n {markLabels.map((m, i) => (\n <span key={i} data-align=\"center\" style={{ left: `${pct(m.value)}%` }}>\n {m.label} <b>{formatValue(m.value)}</b>\n </span>\n ))}\n <span style={{ right: 0 }}>\n {maxLabel} <b>{formatValue(max)}</b>\n </span>\n </div>\n </div>\n )\n }\n)\nBillingSlider.displayName = \"BillingSlider\"\n\nexport { BillingSlider }\n"
|
|
1464
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./billing-slider.module.css\"\n\nexport interface BillingSliderMark {\n /** Where the notch sits. A mark is not a stop: the thumb passes it freely. */\n value: number\n /** Text before the value in the labels row (\"High\"). */\n label?: React.ReactNode\n /** Past this mark the filled range turns to stripes (the \"past the high\" zone). */\n hatchPast?: boolean\n}\n\nexport interface BillingSliderEvidence {\n /** Confirmed hours: a solid strip along the track's foot, and a full-height tick at its end. */\n value: number\n /** Agent hours counted as evidence: a dotted extension that moves the tick. Leave it off when they don't count. */\n agent?: number\n /** Proposed, unconfirmed hours: a pale extension past the tick, and a dashed tick at its end. */\n proposed?: number\n}\n\nexport interface BillingSliderProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"defaultValue\" | \"onChange\"> {\n /** What it bills. Controlled. */\n value: number\n onValueChange: (value: number) => void\n /** Enter, or releasing the thumb after a drag. Arrow keys never commit. */\n onValueCommit?: (value: number) => void\n /** The last saved value. Escape puts the thumb back here. */\n savedValue?: number\n /** The floor. Nothing below it. */\n min: number\n /** The track's end, computed by the caller (as far as the ceiling allows). */\n max: number\n /** Defaults to 0.25 (a quarter hour). Shift + arrows step four times this. */\n step?: number\n /** Notches across the track, with their text in the labels row. */\n marks?: BillingSliderMark[]\n /** What was worked, drawn along the track's foot. */\n evidence?: BillingSliderEvidence\n /** Stripe the gap between the thumb and the evidence tick (money at stake, not decided). */\n gap?: boolean\n /** A Paper project-hue angle (75, 99 … 339). Reads `--paper-hue-<angle>-fill-strong` and `-ink`. */\n hue?: number\n /** `\"md\"` is the 40px row track; `\"lg\"` is the 56px hero track. */\n size?: \"md\" | \"lg\"\n /** `\"saving\"` pulses the thumb. `\"failed\"` is a hook for styling; put `value` back to `savedValue`. */\n status?: \"saving\" | \"failed\"\n disabled?: boolean\n /** Formats a value for the bubble and the labels row. Defaults to the number. */\n formatValue?: (value: number) => string\n /** `aria-valuetext`: the formatted value and its amount (\"Bills 9.5 h, $1,140\"). Defaults to `formatValue`. */\n valueText?: (value: number) => string\n /** Text before the floor's value (\"Low\"). */\n minLabel?: React.ReactNode\n /** Text before the end's value (\"Ceiling allows\"). */\n maxLabel?: React.ReactNode\n}\n\nconst BIG_STEP = 4\n\nconst BillingSlider = React.forwardRef<HTMLDivElement, BillingSliderProps>(\n (\n {\n className,\n style,\n value,\n onValueChange,\n onValueCommit,\n savedValue,\n min,\n max,\n step = 0.25,\n marks = [],\n evidence,\n gap = false,\n hue,\n size = \"md\",\n status,\n disabled = false,\n formatValue = String,\n valueText,\n minLabel,\n maxLabel,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props\n },\n ref\n ) => {\n const span = max - min\n const pct = (v: number) => (span > 0 ? ((Math.min(Math.max(v, min), max) - min) / span) * 100 : 0)\n const at = (from: number, to: number) => ({ left: `${pct(from)}%`, width: `${Math.max(pct(to) - pct(from), 0)}%` })\n // Round to the step from the floor; the 1e6 round trip drops float noise (0.1 + 0.2).\n const snap = (v: number) =>\n Math.min(Math.max(Math.round(Math.round((v - min) / step) * step * 1e6) / 1e6 + min, min), max)\n\n const hatchAt = marks.find((m) => m.hatchPast)?.value\n const fillTo = hatchAt === undefined ? value : Math.min(value, hatchAt)\n const worked = evidence?.value ?? 0\n const evEnd = worked + (evidence?.agent ?? 0)\n const proposedEnd = evEnd + (evidence?.proposed ?? 0)\n const gapTo = Math.min(evEnd, max)\n const showGap = gap && evidence !== undefined && gapTo - value >= step\n\n const ruler: number[] = []\n for (let h = Math.floor(min) + 1; h < max; h++) ruler.push(h)\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLSpanElement>) => {\n if (disabled) return\n const by = e.shiftKey ? step * BIG_STEP : step\n const next: number | undefined = {\n ArrowRight: value + by,\n ArrowUp: value + by,\n ArrowLeft: value - by,\n ArrowDown: value - by,\n PageUp: value + step * BIG_STEP,\n PageDown: value - step * BIG_STEP,\n Home: min,\n End: max,\n }[e.key]\n // preventDefault also skips Radix's own key handling, which would commit on every step.\n if (next !== undefined) {\n e.preventDefault()\n const v = next === max ? max : snap(next)\n if (v !== value) onValueChange(v)\n } else if (e.key === \"Enter\") {\n e.preventDefault()\n onValueCommit?.(value)\n } else if (e.key === \"Escape\" && savedValue !== undefined) {\n e.preventDefault()\n if (savedValue !== value) onValueChange(savedValue)\n }\n }\n\n const hueVars =\n hue === undefined\n ? undefined\n : ({\n \"--billing-slider-hue-fill-strong\": `var(--paper-hue-${hue}-fill-strong)`,\n \"--billing-slider-hue-ink\": `var(--paper-hue-${hue}-ink)`,\n } as React.CSSProperties)\n\n const markLabels = marks.filter((m) => {\n const p = pct(m.value)\n // shortcut: hides a mark's text near either end so it can't collide with the floor or end text; measure the labels if that ever clips.\n return m.label != null && p > 18 && p < 72\n })\n\n return (\n <div\n ref={ref}\n data-slot=\"billing-slider\"\n data-size={size}\n data-status={status}\n data-disabled={disabled ? \"\" : undefined}\n className={cn(styles.root, className)}\n style={{ ...hueVars, ...style }}\n {...props}\n >\n <SliderPrimitive.Root\n className={styles.slider}\n value={[value]}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n onValueChange={([v]) => onValueChange(v)}\n onValueCommit={([v]) => onValueCommit?.(v)}\n onKeyDown={onKeyDown}\n >\n <SliderPrimitive.Track data-slot=\"billing-slider-track\" className={styles.track}>\n <span className={styles.ruler} aria-hidden>\n {ruler.map((h) => (\n <i key={h} style={{ left: `${pct(h)}%` }} />\n ))}\n </span>\n <span className={styles.paint} aria-hidden>\n <span data-slot=\"billing-slider-fill\" className={styles.fill} style={{ width: `${pct(fillTo)}%` }} />\n {hatchAt !== undefined && value > hatchAt && (\n <span data-slot=\"billing-slider-past\" className={styles.past} style={at(hatchAt, value)} />\n )}\n {showGap && <span data-slot=\"billing-slider-gap\" className={styles.gap} style={at(value, gapTo)} />}\n {evidence && worked > min && (\n <span data-slot=\"billing-slider-evidence\" className={styles.evidence} style={{ width: `${pct(worked)}%` }} />\n )}\n {evidence?.agent && evEnd > min ? (\n <span data-slot=\"billing-slider-agent\" className={styles.agent} style={at(Math.max(worked, min), evEnd)} />\n ) : null}\n {evidence?.proposed && proposedEnd > min ? (\n <span data-slot=\"billing-slider-proposed\" className={styles.proposed} style={at(Math.max(evEnd, min), proposedEnd)} />\n ) : null}\n </span>\n {marks.map((m, i) => (\n <span key={i} data-slot=\"billing-slider-mark\" className={styles.mark} style={{ left: `${pct(m.value)}%` }} />\n ))}\n {evidence && evEnd >= min && (\n <span\n data-slot=\"billing-slider-tick\"\n data-out={evEnd > max ? \"\" : undefined}\n className={styles.tick}\n style={{ left: `${pct(evEnd)}%` }}\n />\n )}\n {evidence?.proposed && proposedEnd >= min && proposedEnd <= max ? (\n <span\n data-slot=\"billing-slider-tick\"\n data-variant=\"proposed\"\n className={styles.tick}\n style={{ left: `${pct(proposedEnd)}%` }}\n />\n ) : null}\n </SliderPrimitive.Track>\n <SliderPrimitive.Thumb\n data-slot=\"billing-slider-thumb\"\n className={styles.thumb}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-valuetext={(valueText ?? formatValue)(value)}\n >\n <span className={styles.bubble} aria-hidden>\n {formatValue(value)}\n </span>\n </SliderPrimitive.Thumb>\n </SliderPrimitive.Root>\n <div data-slot=\"billing-slider-labels\" className={styles.labels}>\n <span style={{ left: 0 }}>\n {minLabel} <b>{formatValue(min)}</b>\n </span>\n {markLabels.map((m, i) => (\n <span key={i} data-align=\"center\" style={{ left: `${pct(m.value)}%` }}>\n {m.label} <b>{formatValue(m.value)}</b>\n </span>\n ))}\n <span style={{ right: 0 }}>\n {maxLabel} <b>{formatValue(max)}</b>\n </span>\n </div>\n </div>\n )\n }\n)\nBillingSlider.displayName = \"BillingSlider\"\n\nexport { BillingSlider }\n"
|
|
1441
1465
|
},
|
|
1442
1466
|
{
|
|
1443
1467
|
"path": "components/ui/billing-slider/billing-slider.module.css",
|
|
1444
1468
|
"type": "registry:ui",
|
|
1445
|
-
"content": "/*\n * BillingSlider: how many hours a package bills. The track starts at the floor,\n * fills in the hue's strong fill to the thumb, stripes past the hatch mark,\n * carries the evidence along its foot and ends at the caller's max.\n * `hue` sets --billing-slider-hue-fill-strong / -ink from Paper's project hues;\n * without them (or on another theme) the slider falls back to neutrals.\n * Geometry is the LO-345 frame (the billing slider in the Client Money frames).\n */\n.root {\n --_fill: var(--billing-slider-hue-fill-strong, var(--surface-interactive-active, #e5e7eb));\n --_ink: var(--billing-slider-hue-ink, var(--text-primary, #111827));\n --_gap: var(--billing-slider-gap-color, var(--color-success-600, #16a34a));\n --_hatch: 4px;\n --_rail-h: 40px;\n --_rail-r: 13px;\n --_thumb-w: 26px;\n --_thumb-h: 52px;\n --_grip-inset: 16px;\n --_foot-h: 5px;\n --_ring: 3px;\n display: block;\n min-width: 0;\n font-variant-numeric: tabular-nums;\n}\n\n.root[data-size=\"lg\"] {\n --_rail-h: 56px;\n --_rail-r: 16px;\n --_thumb-w: 30px;\n --_thumb-h: 70px;\n --_grip-inset: 24px;\n --_foot-h: 7px;\n}\n\n.slider {\n position: relative;\n display: flex;\n align-items: center;\n height: var(--_rail-h);\n touch-action: none;\n user-select: none;\n cursor: pointer;\n}\n\n.root[data-disabled] .slider {\n cursor: not-allowed;\n}\n\n.track {\n position: relative;\n flex-grow: 1;\n height: 100%;\n border-radius: var(--_rail-r);\n background: var(--billing-slider-track-bg, color-mix(in srgb, var(--text-primary, #111827) 7%, transparent));\n}\n\n.track > * {\n position: absolute;\n}\n\n/*
|
|
1469
|
+
"content": "/*\n * BillingSlider: how many hours a package bills. The track starts at the floor,\n * fills in the hue's strong fill to the thumb, stripes past the hatch mark,\n * carries the evidence along its foot and ends at the caller's max.\n * `hue` sets --billing-slider-hue-fill-strong / -ink from Paper's project hues;\n * without them (or on another theme) the slider falls back to neutrals.\n * Geometry is the LO-345 frame (the billing slider in the Client Money frames).\n */\n.root {\n --_fill: var(--billing-slider-hue-fill-strong, var(--surface-interactive-active, #e5e7eb));\n --_ink: var(--billing-slider-hue-ink, var(--text-primary, #111827));\n --_gap: var(--billing-slider-gap-color, var(--color-success-600, #16a34a));\n --_hatch: 4px;\n --_rail-h: 40px;\n --_rail-r: 13px;\n --_thumb-w: 26px;\n --_thumb-h: 52px;\n --_grip-inset: 16px;\n --_foot-h: 5px;\n --_ring: 3px;\n display: block;\n min-width: 0;\n font-variant-numeric: tabular-nums;\n}\n\n.root[data-size=\"lg\"] {\n --_rail-h: 56px;\n --_rail-r: 16px;\n --_thumb-w: 30px;\n --_thumb-h: 70px;\n --_grip-inset: 24px;\n --_foot-h: 7px;\n}\n\n.slider {\n position: relative;\n display: flex;\n align-items: center;\n height: var(--_rail-h);\n touch-action: none;\n user-select: none;\n cursor: pointer;\n}\n\n.root[data-disabled] .slider {\n cursor: not-allowed;\n}\n\n.track {\n position: relative;\n flex-grow: 1;\n height: 100%;\n border-radius: var(--_rail-r);\n background: var(--billing-slider-track-bg, color-mix(in srgb, var(--text-primary, #111827) 7%, transparent));\n}\n\n.track > * {\n position: absolute;\n}\n\n/* The ruler (one hairline per whole unit along the top edge) and the colour\n layers each clip to the rail, so they follow its rounded ends (VI-838). */\n.ruler,\n.paint {\n inset: 0;\n border-radius: var(--_rail-r);\n overflow: hidden;\n}\n\n.paint > * {\n position: absolute;\n}\n\n.ruler i {\n position: absolute;\n top: 0;\n width: 1px;\n height: 7px;\n background: color-mix(in srgb, var(--text-primary, #111827) 26%, transparent);\n}\n\n.fill {\n top: 0;\n bottom: 0;\n left: 0;\n border-radius: var(--_rail-r) 0 0 var(--_rail-r);\n background: var(--_fill);\n}\n\n/* Past the hatch mark (the package's high): ink stripes. */\n.past {\n top: 0;\n bottom: 0;\n background: repeating-linear-gradient(\n 135deg,\n color-mix(in srgb, var(--_ink) 55%, transparent) 0 var(--_hatch),\n transparent var(--_hatch) calc(var(--_hatch) * 2)\n );\n}\n\n/* The gap between the thumb and the evidence tick: money at stake. */\n.gap {\n top: 0;\n bottom: 0;\n background: repeating-linear-gradient(\n 135deg,\n var(--_gap) 0 var(--_hatch),\n color-mix(in srgb, var(--_gap) 30%, transparent) var(--_hatch) calc(var(--_hatch) * 2)\n );\n}\n\n/* Evidence along the foot: worked solid, agent dotted, proposed pale. */\n.evidence,\n.agent,\n.proposed {\n bottom: 0;\n height: var(--_foot-h);\n}\n\n.evidence {\n left: 0;\n border-radius: 0 0 0 var(--_rail-r);\n background: var(--_ink);\n}\n\n.agent {\n background: repeating-linear-gradient(90deg, var(--_ink) 0 3px, transparent 3px 5px);\n}\n\n.proposed {\n background: color-mix(in srgb, var(--_ink) 30%, transparent);\n}\n\n/* A mark: a notch across the track, proud of it by 4px. Not a stop. */\n.mark {\n top: -4px;\n bottom: -4px;\n width: 2px;\n margin-left: -1px;\n border-radius: 2px;\n background: color-mix(in srgb, var(--text-primary, #111827) 55%, transparent);\n}\n\n/* The evidence tick, full height. */\n.tick {\n top: 3px;\n bottom: 3px;\n width: 3px;\n margin-left: -1.5px;\n border-radius: 3px;\n background: var(--_ink);\n}\n\n.tick[data-variant=\"proposed\"] {\n width: 0;\n margin-left: -1px;\n border-radius: 0;\n background: none;\n border-left: 2px dashed color-mix(in srgb, var(--_ink) 55%, transparent);\n}\n\n/* Evidence past the end: an arrow at the end instead of a tick. */\n.tick[data-out] {\n top: 50%;\n bottom: auto;\n width: 0;\n height: 0;\n margin: -6px 0 0 -2px;\n border: 6px solid transparent;\n border-left: 8px solid var(--_ink);\n border-radius: 0;\n background: none;\n}\n\n/*\n * The thumb is 2px wide so Radix centres it on the value (it shifts a wide thumb\n * inward by up to half its width to keep it inside the track; at 2px that is 1px).\n * The pill is drawn around it, overhanging the track's ends as the frame does.\n */\n.thumb {\n position: relative;\n display: block;\n width: 2px;\n height: var(--_thumb-h);\n outline: none;\n cursor: grab;\n}\n\n.thumb::before {\n content: \"\";\n position: absolute;\n inset: 0 calc(50% - var(--_thumb-w) / 2);\n border-radius: calc(var(--_thumb-w) / 2);\n background: var(--billing-slider-thumb-bg, var(--surface-popover, #ffffff));\n box-shadow: 0 0 0 var(--_ring) var(--_ink), var(--shadow-md);\n}\n\n/* Two grip lines down the middle of the pill. */\n.thumb::after {\n content: \"\";\n position: absolute;\n top: var(--_grip-inset);\n bottom: var(--_grip-inset);\n left: calc(50% - 4px);\n width: 2px;\n border-radius: 2px;\n background: var(--billing-slider-thumb-grip, color-mix(in srgb, var(--_ink) 45%, transparent));\n box-shadow: 6px 0 0 var(--billing-slider-thumb-grip, color-mix(in srgb, var(--_ink) 45%, transparent));\n}\n\n.slider:active .thumb {\n cursor: grabbing;\n}\n\n.thumb:focus-visible::before {\n box-shadow: 0 0 0 var(--_ring) var(--_ink),\n 0 0 0 calc(var(--_ring) + var(--focus-ring-offset, 2px) + var(--focus-ring-width, 2px)) var(--border-focus, #111827),\n var(--shadow-md);\n}\n\n.root[data-disabled] .thumb {\n cursor: not-allowed;\n}\n\n.root[data-disabled] .thumb::before {\n box-shadow: 0 0 0 var(--_ring) color-mix(in srgb, var(--_ink) 35%, transparent);\n}\n\n.root[data-status=\"saving\"] .thumb::before {\n animation: pulse var(--motion-duration-1000, 1000ms) var(--motion-easing-default, ease-in-out) infinite;\n}\n\n@keyframes pulse {\n 50% {\n box-shadow: 0 0 0 6px color-mix(in srgb, var(--_ink) 30%, transparent), var(--shadow-md);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .root[data-status=\"saving\"] .thumb::before {\n animation: none;\n }\n}\n\n/* The value bubble: shown while the thumb has focus (dragging focuses it). */\n.bubble {\n position: absolute;\n bottom: calc(100% + 8px);\n left: 50%;\n transform: translateX(-50%) scale(0.9);\n opacity: 0;\n padding: calc(var(--spacing-1, 0.25rem) * 1.25) calc(var(--spacing-2, 0.5rem) * 1.25);\n border-radius: 10px;\n background: var(--text-primary, #111827);\n color: var(--surface-page, #ffffff);\n font-size: var(--font-size-xs, 0.75rem);\n line-height: 18px;\n font-weight: var(--font-weight-bold, 700);\n white-space: nowrap;\n pointer-events: none;\n transition: opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.thumb:focus .bubble {\n opacity: 1;\n transform: translateX(-50%) scale(1);\n}\n\n/* Labels under the track: the floor at the left, marks at their place, the end at the right. */\n.labels {\n position: relative;\n height: 18px;\n margin-top: calc(var(--spacing-1, 0.25rem) * 2.25);\n font-size: var(--font-size-xs, 0.75rem);\n line-height: 18px;\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #4b5563);\n}\n\n.labels span {\n position: absolute;\n top: 0;\n white-space: nowrap;\n}\n\n.labels span[data-align=\"center\"] {\n transform: translateX(-50%);\n}\n\n.labels b {\n color: var(--text-primary, #111827);\n font-weight: var(--font-weight-bold, 700);\n}\n"
|
|
1446
1470
|
}
|
|
1447
1471
|
]
|
|
1448
1472
|
},
|
|
@@ -1513,12 +1537,12 @@
|
|
|
1513
1537
|
{
|
|
1514
1538
|
"path": "components/ui/toggle-group/toggle-group.tsx",
|
|
1515
1539
|
"type": "registry:ui",
|
|
1516
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./toggle-group.module.css\"\n\n/* ─── Context ───────────────────────────────────────────────────────── */\n\ntype ToggleGroupContextValue = {\n variant?: \"default\" | \"outline\" | \"option\" | null\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | null\n type?: \"single\" | \"multiple\"\n}\n\nconst ToggleGroupContext = React.createContext<ToggleGroupContextValue>({})\n\n/* ─── Sliding indicator hook ────────────────────────────────────────── */\n\nfunction useSlidingIndicator(\n rootRef: React.RefObject<HTMLElement | null>,\n variant: string | null | undefined,\n) {\n const indicatorRef = React.useRef<HTMLSpanElement>(null)\n\n const updateIndicator = React.useCallback(() => {\n const root = rootRef.current\n const indicator = indicatorRef.current\n if (!root || !indicator || variant !== \"outline\") return\n\n const activeItem = root.querySelector(\n '[data-state=\"on\"]',\n ) as HTMLElement | null\n\n if (!activeItem) {\n indicator.style.opacity = \"0\"\n return\n }\n\n indicator.style.opacity = \"1\"\n indicator.style.width = `${
|
|
1540
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./toggle-group.module.css\"\n\n/* ─── Context ───────────────────────────────────────────────────────── */\n\ntype ToggleGroupContextValue = {\n variant?: \"default\" | \"outline\" | \"option\" | null\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | null\n type?: \"single\" | \"multiple\"\n}\n\nconst ToggleGroupContext = React.createContext<ToggleGroupContextValue>({})\n\n/* ─── Sliding indicator hook ────────────────────────────────────────── */\n\nfunction useSlidingIndicator(\n rootRef: React.RefObject<HTMLElement | null>,\n variant: string | null | undefined,\n) {\n const indicatorRef = React.useRef<HTMLSpanElement>(null)\n\n const updateIndicator = React.useCallback(() => {\n const root = rootRef.current\n const indicator = indicatorRef.current\n if (!root || !indicator || variant !== \"outline\") return\n\n const activeItem = root.querySelector(\n '[data-state=\"on\"]',\n ) as HTMLElement | null\n\n if (!activeItem) {\n indicator.style.opacity = \"0\"\n return\n }\n\n // Fractional px from the rects: offset* round to whole pixels, which leaves the\n // pill up to 1px off one end of the track, an uneven, non-concentric gap (VI-838).\n // Dividing by the scale keeps a transformed (scaled) group in its own units.\n const box = root.getBoundingClientRect()\n const item = activeItem.getBoundingClientRect()\n // offsetWidth is rounded, so under a 1px difference there is no transform.\n const scale = Math.abs(box.width - root.offsetWidth) < 1 ? 1 : box.width / root.offsetWidth || 1\n indicator.style.opacity = \"1\"\n indicator.style.width = `${item.width / scale}px`\n indicator.style.height = `${item.height / scale}px`\n indicator.style.transform = `translate(${(item.left - box.left) / scale - root.clientLeft}px, ${(item.top - box.top) / scale - root.clientTop}px)`\n }, [rootRef, variant])\n\n // Update on mount and whenever children change state\n React.useEffect(() => {\n const root = rootRef.current\n if (!root || variant !== \"outline\") return\n\n // Initial position\n updateIndicator()\n\n // Observe data-state changes on children\n const observer = new MutationObserver(updateIndicator)\n observer.observe(root, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n subtree: true,\n })\n\n // Items change size after mount (web fonts landing, a container resize): follow them.\n const resize = typeof ResizeObserver === \"undefined\" ? null : new ResizeObserver(updateIndicator)\n for (const el of Array.from(root.children)) resize?.observe(el)\n\n return () => {\n observer.disconnect()\n resize?.disconnect()\n }\n }, [rootRef, variant, updateIndicator])\n\n return indicatorRef\n}\n\n/* ─── ToggleGroup ───────────────────────────────────────────────────── */\n\nconst toggleGroupVariants = cva(styles.root, {\n variants: {\n variant: {\n default: styles.variantDefault,\n outline: styles.variantOutline,\n option: styles.variantOption,\n },\n size: {\n xs: styles.sizeXs,\n sm: styles.sizeSm,\n md: styles.sizeMd,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n})\n\nexport type ToggleGroupProps = React.ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof toggleGroupVariants> & {\n /** Option variant: lay the rows out in two columns instead of one. */\n columns?: 1 | 2\n /** Pressing A, B, C… while focus is in the group picks the item at that position. */\n shortcuts?: boolean\n }\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Root>,\n ToggleGroupProps\n>(({ className, variant, size, columns, shortcuts, onKeyDown, ...props }, ref) => {\n const contextValue = React.useMemo(\n () => ({ variant, size, type: props.type }),\n [variant, size, props.type]\n )\n const isOption = variant === \"option\"\n const internalRef = React.useRef<HTMLDivElement>(null)\n // Sliding indicator only works for single-select toggle groups\n const useIndicator = variant === \"outline\" && props.type !== \"multiple\"\n const indicatorRef = useSlidingIndicator(internalRef, useIndicator ? variant : undefined)\n\n // Merge internal ref with forwarded ref\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (internalRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n // Letter shortcuts: the Nth item answers to the Nth letter, matching its key badge.\n const handleShortcut = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event)\n if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return\n const index = /^[a-z]$/i.test(event.key) ? event.key.toLowerCase().charCodeAt(0) - 97 : -1\n const item = internalRef.current?.querySelectorAll<HTMLButtonElement>(\n '[data-slot=\"toggle-group-item\"]',\n )[index]\n if (!item || item.disabled) return\n event.preventDefault()\n item.focus()\n item.click()\n }\n\n return (\n <ToggleGroupContext.Provider value={contextValue}>\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant ?? \"default\"}\n data-size={size ?? \"md\"}\n data-type={props.type ?? \"single\"}\n // Radix renders role=\"group\" with radio items for single-select; a radio\n // item needs a radiogroup parent (VI-690). Multi-select stays a group of\n // pressed buttons. Spread after, so a caller's own role still wins.\n {...(props.type === \"multiple\" ? {} : { role: \"radiogroup\" })}\n data-columns={isOption && columns === 2 ? \"2\" : undefined}\n className={cn(toggleGroupVariants({ variant, size: isOption ? null : size }), className)}\n ref={mergedRef}\n onKeyDown={shortcuts ? handleShortcut : onKeyDown}\n {...props}\n >\n {useIndicator && (\n <span\n ref={indicatorRef}\n className={styles.indicator}\n aria-hidden=\"true\"\n />\n )}\n {props.children}\n </ToggleGroupPrimitive.Root>\n </ToggleGroupContext.Provider>\n )\n})\nToggleGroup.displayName = \"ToggleGroup\"\n\n/* ─── ToggleGroupItem ───────────────────────────────────────────────── */\n\nconst toggleGroupItemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.itemVariantDefault,\n outline: styles.itemVariantOutline,\n option: styles.itemVariantOption,\n },\n size: {\n xs: styles.itemSizeXs,\n sm: styles.itemSizeSm,\n md: styles.itemSizeMd,\n lg: styles.itemSizeLg,\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n})\n\nexport interface ToggleGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof toggleGroupItemVariants> {}\n\n/**\n * Wrap bare text in a block label so the stylesheet can trim its line box to the\n * capital-to-baseline band (see `.label`), centring the capitals in the item\n * whatever the font (VI-684). Elements (icons) pass through.\n */\nfunction wrapLabel(children: React.ReactNode): React.ReactNode {\n return React.Children.map(children, (child) =>\n typeof child === \"string\" || typeof child === \"number\" ? (\n <span className={styles.label} data-slot=\"toggle-group-text\">\n {child}\n </span>\n ) : (\n child\n )\n )\n}\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef<typeof ToggleGroupPrimitive.Item>,\n ToggleGroupItemProps\n>(({ className, variant, size, children, ...props }, ref) => {\n const ctx = React.useContext(ToggleGroupContext)\n const resolvedVariant = variant ?? ctx.variant\n const resolvedSize = size ?? ctx.size\n const isOption = resolvedVariant === \"option\"\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n className={cn(\n toggleGroupItemVariants({ variant: resolvedVariant, size: isOption ? null : resolvedSize }),\n className\n )}\n ref={ref}\n {...props}\n >\n {isOption ? (\n <>\n {/* The letter comes from a CSS counter, so it follows the item's position. */}\n <span className={styles.optionKey} data-slot=\"toggle-group-key\" aria-hidden=\"true\" />\n <span className={styles.optionLabel} data-slot=\"toggle-group-label\">\n {children}\n </span>\n {ctx.type === \"multiple\" && (\n <span className={styles.optionCheck} data-slot=\"toggle-group-check\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M3.5 8.5 6.5 11.5 12.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n )}\n </>\n ) : (\n wrapLabel(children)\n )}\n </ToggleGroupPrimitive.Item>\n )\n})\nToggleGroupItem.displayName = \"ToggleGroupItem\"\n\nexport { ToggleGroup, ToggleGroupItem, toggleGroupVariants, toggleGroupItemVariants }\n"
|
|
1517
1541
|
},
|
|
1518
1542
|
{
|
|
1519
1543
|
"path": "components/ui/toggle-group/toggle-group.module.css",
|
|
1520
1544
|
"type": "registry:ui",
|
|
1521
|
-
"content": "/* ToggleGroup root */\n.root {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.variantDefault {\n /* items have no outer border, rely on item bg */\n}\n\n.variantOutline {\n position: relative;\n border: 1px solid var(--border-default, #e5e7eb);\n gap: 0;\n}\n\n/* The track fill (VI-709). Zero specificity, so a consumer's own class still sets\n the group's background whichever sheet loads last. */\n:where(.variantOutline) {\n background-color: var(--toggle-group-track-bg, transparent);\n}\n\n/* Sliding indicator pill */\n.indicator {\n position: absolute;\n top: 0;\n left: 0;\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n border-radius: var(--radius-md, 0.375rem);\n opacity: 0;\n pointer-events: none;\n z-index: 0;\n transition:\n transform var(--motion-duration-200, 200ms) var(--motion-easing-default, ease-in-out),\n width var(--motion-duration-200, 200ms) var(--motion-easing-default, ease-in-out),\n opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Match indicator radius to item radius per size */\n.sizeXs .indicator { border-radius: var(--toggle-group-xs-item-radius, var(--radius-sm, 0.25rem)); }\n.sizeSm .indicator { border-radius: var(--radius-md, 0.375rem); }\n.sizeMd .indicator { border-radius: var(--radius-md, 0.375rem); }\n.sizeLg .indicator { border-radius: var(--radius-lg, 0.5rem); }\n\n.sizeXs {\n /* inherited by items */\n}\n\n.variantOutline.sizeXs {\n padding: calc(var(--spacing-1, 0.25rem) / 2);\n border-radius: var(--toggle-group-xs-track-radius, var(--radius-md, 0.375rem));\n}\n\n.sizeSm {\n /* inherited by items */\n}\n\n.variantOutline.sizeSm {\n padding: var(--spacing-1, 0.25rem);\n border-radius: var(--radius-lg, 0.5rem);\n}\n\n.sizeMd {\n /* inherited by items */\n}\n\n.variantOutline.sizeMd {\n padding: var(--spacing-1, 0.25rem);\n border-radius: var(--radius-lg, 0.5rem);\n}\n\n.sizeLg {\n /* inherited by items */\n}\n\n.variantOutline.sizeLg {\n padding: var(--spacing-1, 0.25rem);\n border-radius: var(--radius-xl, 0.75rem);\n}\n\n/* ToggleGroup item */\n.item {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--toggle-group-unselected-text, var(--text-primary, #111827));\n background-color: transparent;\n border: none;\n cursor: pointer;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n user-select: none;\n white-space: nowrap;\n}\n\n.item:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n/* A solid ring at the focus ring width, cleared of the item by the focus ring offset\n (VI-690). The translucent halo alone measured 1.4:1 on dark planes (WCAG 2.4.7). */\n.item:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.item:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Default variant items */\n@media (hover: hover) {\n .itemVariantDefault:hover:not(:disabled) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n}\n\n.itemVariantDefault[data-state=\"on\"] {\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--toggle-group-selected-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Outline variant items — indicator provides the active background */\n.itemVariantOutline {\n position: relative;\n z-index: 1;\n}\n\n@media (hover: hover) {\n .itemVariantOutline:hover:not(:disabled):not([data-state=\"on\"]) {\n background-color: color-mix(in srgb, var(--surface-interactive-hover, #f3f4f6) 40%, transparent);\n }\n}\n\n.itemVariantOutline[data-state=\"on\"] {\n background-color: transparent;\n color: var(--toggle-group-selected-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Multiple-select outline — items need their own active bg (no sliding indicator) */\n:global([data-type=\"multiple\"]) .itemVariantOutline[data-state=\"on\"] {\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n}\n\n/* Sizes */\n.itemSizeXs {\n --label-box-height: 1.5rem;\n height: var(--label-box-height);\n padding: 0 var(--toggle-group-xs-padding-x, var(--spacing-2, 0.5rem));\n border-radius: var(--toggle-group-xs-item-radius, var(--radius-sm, 0.25rem));\n font-size: var(--toggle-group-xs-font-size, var(--font-size-xs, 0.75rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n.itemSizeSm {\n --label-box-height: 1.75rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-2, 0.5rem);\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-xs, 0.75rem);\n gap: var(--spacing-1, 0.25rem);\n}\n\n.itemSizeMd {\n --label-box-height: 2.25rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n gap: var(--spacing-2, 0.5rem);\n}\n\n.itemSizeLg {\n --label-box-height: 2.75rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-4, 1rem);\n border-radius: var(--radius-lg, 0.5rem);\n font-size: var(--font-size-base, 1rem);\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label is a\n block span whose line box is trimmed to the capital-to-baseline band, so the\n flex container centres the ink and not the font's ascent/descent. Without\n text-box (Firefox) it is a plain block and rendering is unchanged. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n/* Option variant (VI-787): tap-to-pick rows, each a lettered key, the label and,\n in a multiple group, a check box on the right. Every value is a\n --toggle-group-option-* hook; the fallbacks are Visor's tokens, with the row\n height, key and check sizes and the glass blur taken from Honcho's FormDeck rows. */\n.variantOption {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--toggle-group-option-gap, var(--spacing-2, 0.5rem));\n counter-reset: toggle-group-option;\n}\n\n.variantOption[data-columns=\"2\"] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.itemVariantOption {\n counter-increment: toggle-group-option;\n justify-content: flex-start;\n gap: var(--toggle-group-option-inner-gap, var(--spacing-3_5, 0.875rem));\n width: 100%;\n min-height: var(--toggle-group-option-min-height, 3.375rem);\n padding: var(--toggle-group-option-padding, var(--spacing-2, 0.5rem) var(--spacing-4_5, 1.125rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem));\n border-radius: var(--toggle-group-option-radius, var(--radius-lg, 0.5rem));\n background-color: var(--toggle-group-option-bg, color-mix(in srgb, var(--text-primary, #111827) 9%, transparent));\n -webkit-backdrop-filter: blur(var(--toggle-group-option-blur, 24px));\n backdrop-filter: blur(var(--toggle-group-option-blur, 24px));\n color: var(--toggle-group-option-text, var(--text-primary, #111827));\n font-size: var(--toggle-group-option-font-size, var(--font-size-base, 1rem));\n font-weight: var(--toggle-group-option-font-weight, var(--font-weight-medium, 500));\n text-align: start;\n white-space: normal;\n}\n\n@media (hover: hover) {\n .itemVariantOption:hover:not(:disabled):not([data-state=\"on\"]) {\n background-color: var(--toggle-group-option-hover-bg, color-mix(in srgb, var(--text-primary, #111827) 13%, transparent));\n }\n}\n\n.itemVariantOption[data-state=\"on\"] {\n background-color: var(--toggle-group-option-selected-bg, color-mix(in srgb, var(--text-primary, #111827) 20%, transparent));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--toggle-group-option-selected-ring, color-mix(in srgb, var(--text-primary, #111827) 40%, transparent));\n}\n\n.optionKey {\n flex: none;\n display: grid;\n place-items: center;\n width: var(--toggle-group-option-key-size, 1.75rem);\n height: var(--toggle-group-option-key-size, 1.75rem);\n border-radius: var(--toggle-group-option-key-radius, var(--radius-md, 0.375rem));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--toggle-group-option-key-border, var(--border-default, #e5e7eb));\n color: var(--toggle-group-option-key-text, var(--text-secondary, #4b5563));\n font-size: var(--toggle-group-option-key-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--font-weight-semibold, 600);\n line-height: 1;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.optionKey::before {\n content: counter(toggle-group-option, upper-alpha);\n}\n\n.optionLabel {\n flex: 1;\n min-width: 0;\n}\n\n.optionCheck {\n flex: none;\n display: grid;\n place-items: center;\n width: var(--toggle-group-option-check-size, 1.25rem);\n height: var(--toggle-group-option-check-size, 1.25rem);\n border-radius: var(--toggle-group-option-check-radius, var(--radius-sm, 0.25rem));\n box-shadow: inset 0 0 0 var(--stroke-width-regular, 1.5px) var(--toggle-group-option-check-border, var(--border-strong, #d1d5db));\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.optionCheck svg {\n width: 60%;\n height: 60%;\n opacity: 0;\n}\n\n/* Picked: the key and the check fill with the mark colour. */\n.itemVariantOption[data-state=\"on\"] .optionKey,\n.itemVariantOption[data-state=\"on\"] .optionCheck {\n background-color: var(--toggle-group-option-mark-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--toggle-group-option-mark-text, var(--interactive-primary-text, #f9fafb));\n box-shadow: none;\n}\n\n.itemVariantOption[data-state=\"on\"] .optionCheck svg {\n opacity: 1;\n}\n"
|
|
1545
|
+
"content": "/* ToggleGroup root */\n.root {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.variantDefault {\n /* items have no outer border, rely on item bg */\n}\n\n/* Concentric corners (VI-837): the inner radius is the track radius minus the\n track's padding and border, so item, indicator, hover fill and focus ring\n always nest inside the track. Each size sets the track radius and padding;\n a 999px track gives a pill in a pill. */\n.variantOutline {\n position: relative;\n --_track-border: 1px;\n border: var(--_track-border) solid var(--border-default, #e5e7eb);\n gap: 0;\n padding: var(--_track-padding);\n border-radius: var(--_track-radius);\n --_inner-radius: max(0px, calc(var(--_track-radius) - var(--_track-padding) - var(--_track-border)));\n}\n\n/* The track fill (VI-709). Zero specificity, so a consumer's own class still sets\n the group's background whichever sheet loads last. */\n:where(.variantOutline) {\n background-color: var(--toggle-group-track-bg, transparent);\n}\n\n/* Sliding indicator pill */\n.indicator {\n position: absolute;\n top: 0;\n left: 0;\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n border-radius: var(--radius-md, 0.375rem);\n opacity: 0;\n pointer-events: none;\n z-index: 0;\n transition:\n transform var(--motion-duration-200, 200ms) var(--motion-easing-default, ease-in-out),\n width var(--motion-duration-200, 200ms) var(--motion-easing-default, ease-in-out),\n opacity var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n/* Indicator corners: concentric with the track; xs-item-radius is an override. */\n.variantOutline .indicator { border-radius: var(--_inner-radius); }\n.variantOutline.sizeXs .indicator { border-radius: var(--toggle-group-xs-item-radius, var(--_inner-radius)); }\n\n.sizeXs {\n /* inherited by items */\n}\n\n.variantOutline.sizeXs {\n --_track-padding: calc(var(--spacing-1, 0.25rem) / 2);\n --_track-radius: var(--toggle-group-xs-track-radius, var(--radius-md, 0.375rem));\n}\n\n.sizeSm {\n /* inherited by items */\n}\n\n.variantOutline.sizeSm {\n --_track-padding: var(--spacing-1, 0.25rem);\n --_track-radius: var(--radius-lg, 0.5rem);\n}\n\n.sizeMd {\n /* inherited by items */\n}\n\n.variantOutline.sizeMd {\n --_track-padding: var(--spacing-1, 0.25rem);\n --_track-radius: var(--radius-lg, 0.5rem);\n}\n\n.sizeLg {\n /* inherited by items */\n}\n\n.variantOutline.sizeLg {\n --_track-padding: var(--spacing-1, 0.25rem);\n --_track-radius: var(--radius-xl, 0.75rem);\n}\n\n/* ToggleGroup item */\n.item {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--toggle-group-unselected-text, var(--text-primary, #111827));\n background-color: transparent;\n border: none;\n cursor: pointer;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n user-select: none;\n white-space: nowrap;\n}\n\n.item:active:not(:disabled) {\n transform: translateY(1px);\n transition: none;\n}\n\n/* A solid ring at the focus ring width, cleared of the item by the focus ring offset\n (VI-690). The translucent halo alone measured 1.4:1 on dark planes (WCAG 2.4.7). */\n.item:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.item:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Default variant items */\n@media (hover: hover) {\n .itemVariantDefault:hover:not(:disabled) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n }\n}\n\n.itemVariantDefault[data-state=\"on\"] {\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--toggle-group-selected-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Outline variant items — indicator provides the active background */\n.itemVariantOutline {\n position: relative;\n z-index: 1;\n}\n\n@media (hover: hover) {\n .itemVariantOutline:hover:not(:disabled):not([data-state=\"on\"]) {\n background-color: color-mix(in srgb, var(--surface-interactive-hover, #f3f4f6) 40%, transparent);\n }\n}\n\n.itemVariantOutline[data-state=\"on\"] {\n background-color: transparent;\n color: var(--toggle-group-selected-text, var(--interactive-primary-text, #f9fafb));\n}\n\n/* Multiple-select outline — items need their own active bg (no sliding indicator) */\n:global([data-type=\"multiple\"]) .itemVariantOutline[data-state=\"on\"] {\n background-color: var(--toggle-group-selected-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n}\n\n/* Sizes */\n.itemSizeXs {\n --label-box-height: 1.5rem;\n height: var(--label-box-height);\n padding: 0 var(--toggle-group-xs-padding-x, var(--spacing-2, 0.5rem));\n border-radius: var(--toggle-group-xs-item-radius, var(--radius-sm, 0.25rem));\n font-size: var(--toggle-group-xs-font-size, var(--font-size-xs, 0.75rem));\n gap: var(--spacing-1, 0.25rem);\n}\n\n.itemSizeSm {\n --label-box-height: 1.75rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-2, 0.5rem);\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-xs, 0.75rem);\n gap: var(--spacing-1, 0.25rem);\n}\n\n.itemSizeMd {\n --label-box-height: 2.25rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n font-size: var(--font-size-sm, 0.875rem);\n gap: var(--spacing-2, 0.5rem);\n}\n\n.itemSizeLg {\n --label-box-height: 2.75rem;\n height: var(--label-box-height);\n padding: 0 var(--spacing-4, 1rem);\n border-radius: var(--radius-lg, 0.5rem);\n font-size: var(--font-size-base, 1rem);\n gap: var(--spacing-2, 0.5rem);\n}\n\n/* Outline items sit in the track: concentric corners (VI-837) for the hover fill,\n the multiple-select fill and the focus ring. xs-item-radius stays an override. */\n.itemVariantOutline.item {\n border-radius: var(--_inner-radius);\n}\n\n.itemVariantOutline.itemSizeXs {\n border-radius: var(--toggle-group-xs-item-radius, var(--_inner-radius));\n}\n\n/* Label centring (VI-684, shared spec: the label-centering doc under docs/). The label is a\n block span whose line box is trimmed to the capital-to-baseline band, so the\n flex container centres the ink and not the font's ascent/descent. Without\n text-box (Firefox) it is a plain block and rendering is unchanged. */\n.label {\n display: block;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n/* Option variant (VI-787): tap-to-pick rows, each a lettered key, the label and,\n in a multiple group, a check box on the right. Every value is a\n --toggle-group-option-* hook; the fallbacks are Visor's tokens, with the row\n height, key and check sizes and the glass blur taken from Honcho's FormDeck rows. */\n.variantOption {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--toggle-group-option-gap, var(--spacing-2, 0.5rem));\n counter-reset: toggle-group-option;\n}\n\n.variantOption[data-columns=\"2\"] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.itemVariantOption {\n counter-increment: toggle-group-option;\n justify-content: flex-start;\n gap: var(--toggle-group-option-inner-gap, var(--spacing-3_5, 0.875rem));\n width: 100%;\n min-height: var(--toggle-group-option-min-height, 3.375rem);\n padding: var(--toggle-group-option-padding, var(--spacing-2, 0.5rem) var(--spacing-4_5, 1.125rem) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem));\n border-radius: var(--toggle-group-option-radius, var(--radius-lg, 0.5rem));\n background-color: var(--toggle-group-option-bg, color-mix(in srgb, var(--text-primary, #111827) 9%, transparent));\n -webkit-backdrop-filter: blur(var(--toggle-group-option-blur, 24px));\n backdrop-filter: blur(var(--toggle-group-option-blur, 24px));\n color: var(--toggle-group-option-text, var(--text-primary, #111827));\n font-size: var(--toggle-group-option-font-size, var(--font-size-base, 1rem));\n font-weight: var(--toggle-group-option-font-weight, var(--font-weight-medium, 500));\n text-align: start;\n white-space: normal;\n}\n\n@media (hover: hover) {\n .itemVariantOption:hover:not(:disabled):not([data-state=\"on\"]) {\n background-color: var(--toggle-group-option-hover-bg, color-mix(in srgb, var(--text-primary, #111827) 13%, transparent));\n }\n}\n\n.itemVariantOption[data-state=\"on\"] {\n background-color: var(--toggle-group-option-selected-bg, color-mix(in srgb, var(--text-primary, #111827) 20%, transparent));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--toggle-group-option-selected-ring, color-mix(in srgb, var(--text-primary, #111827) 40%, transparent));\n}\n\n.optionKey {\n flex: none;\n display: grid;\n place-items: center;\n width: var(--toggle-group-option-key-size, 1.75rem);\n height: var(--toggle-group-option-key-size, 1.75rem);\n border-radius: var(--toggle-group-option-key-radius, var(--radius-md, 0.375rem));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--toggle-group-option-key-border, var(--border-default, #e5e7eb));\n color: var(--toggle-group-option-key-text, var(--text-secondary, #4b5563));\n font-size: var(--toggle-group-option-key-font-size, var(--font-size-xs, 0.75rem));\n font-weight: var(--font-weight-semibold, 600);\n line-height: 1;\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.optionKey::before {\n content: counter(toggle-group-option, upper-alpha);\n}\n\n.optionLabel {\n flex: 1;\n min-width: 0;\n}\n\n.optionCheck {\n flex: none;\n display: grid;\n place-items: center;\n width: var(--toggle-group-option-check-size, 1.25rem);\n height: var(--toggle-group-option-check-size, 1.25rem);\n border-radius: var(--toggle-group-option-check-radius, var(--radius-sm, 0.25rem));\n box-shadow: inset 0 0 0 var(--stroke-width-regular, 1.5px) var(--toggle-group-option-check-border, var(--border-strong, #d1d5db));\n transition: background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.optionCheck svg {\n width: 60%;\n height: 60%;\n opacity: 0;\n}\n\n/* Picked: the key and the check fill with the mark colour. */\n.itemVariantOption[data-state=\"on\"] .optionKey,\n.itemVariantOption[data-state=\"on\"] .optionCheck {\n background-color: var(--toggle-group-option-mark-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n color: var(--toggle-group-option-mark-text, var(--interactive-primary-text, #f9fafb));\n box-shadow: none;\n}\n\n.itemVariantOption[data-state=\"on\"] .optionCheck svg {\n opacity: 1;\n}\n\n/* Squircle fallback (VI-839). Where the browser has no corner-shape (Safari)\n and the theme draws squircles, the outline track, the sliding indicator and\n the items draw the theme's squircle from --squircle-radius and\n --squircle-clip. Each sets --squircle-r, its radius clamped to half its\n height; the track's height is its items' plus padding and border, and the\n indicator's is that less the gap on both sides. Chromium and round themes\n skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .variantOutline.sizeXs { --_sq-track-h: calc(1.5rem + 2 * var(--_track-padding) + 2 * var(--_track-border)); }\n .variantOutline.sizeSm { --_sq-track-h: calc(1.75rem + 2 * var(--_track-padding) + 2 * var(--_track-border)); }\n .variantOutline.sizeMd { --_sq-track-h: calc(2.25rem + 2 * var(--_track-padding) + 2 * var(--_track-border)); }\n .variantOutline.sizeLg { --_sq-track-h: calc(2.75rem + 2 * var(--_track-padding) + 2 * var(--_track-border)); }\n\n .variantOutline {\n --squircle-r: min(var(--_track-radius), calc(var(--_sq-track-h) / 2));\n --squircle-edge: var(--_track-border);\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n .variantOutline .indicator {\n --squircle-r: min(var(--_inner-radius), calc(var(--_sq-track-h) / 2 - var(--_track-padding) - var(--_track-border)));\n }\n\n .variantOutline.sizeXs .indicator {\n --squircle-r: min(var(--toggle-group-xs-item-radius, var(--_inner-radius)), calc(var(--_sq-track-h) / 2 - var(--_track-padding) - var(--_track-border)));\n }\n\n .itemVariantOutline.item {\n --squircle-r: min(var(--_inner-radius), calc(var(--label-box-height) / 2));\n }\n\n .itemVariantOutline.itemSizeXs {\n --squircle-r: min(var(--toggle-group-xs-item-radius, var(--_inner-radius)), calc(var(--label-box-height) / 2));\n }\n\n .variantOutline.variantOutline .indicator,\n .itemVariantOutline.itemVariantOutline.item {\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n /* The track's border is redrawn on ::before as the squircle ring. */\n .variantOutline {\n border-color: var(--squircle-edge-off, var(--border-default, #e5e7eb));\n }\n\n .variantOutline::before {\n content: \"\";\n position: absolute;\n inset: calc(-1 * var(--_track-border));\n --squircle-r: inherit;\n --squircle-edge: inherit;\n background-color: var(--border-default, #e5e7eb);\n clip-path: var(--squircle-ring, inset(50%));\n pointer-events: none;\n }\n }\n}\n"
|
|
1522
1546
|
}
|
|
1523
1547
|
]
|
|
1524
1548
|
},
|
|
@@ -1544,7 +1568,7 @@
|
|
|
1544
1568
|
{
|
|
1545
1569
|
"path": "components/ui/segmented-control/segmented-control.module.css",
|
|
1546
1570
|
"type": "registry:ui",
|
|
1547
|
-
"content": "/* SegmentedControl layers on ToggleGroup (outline, single). ToggleGroup owns the\n mechanics, sizes, sliding indicator and label centring; this sheet only\n re-skins the track and indicator and adds the fullWidth layout. ToggleGroup's\n own classes are hashed, so they are reached through the data attributes it\n renders. Specificity here is two classes or a class plus an attribute so the\n re-skin wins whatever order the sheets load in. */\n\n.root[data-variant=\"outline\"] {\n /* VI-655: the border only holds box geometry. The visible resting edge is an\n outline pulled inside the box from the shared --control-edge-* tokens, so\n --control-edge-width: 0 on any ancestor removes it with no layout shift. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n /* The well the active pill sits in: the page nudged 12% toward the ink, so it reads as a well\n in light and dark alike (page-relative, unlike --surface-subtle, which is the page in dark). */\n background-color: var(--segmented-control-track-bg, color-mix(in srgb, var(--text-primary, #111827) 12%, var(--surface-page, #ffffff)));\n}\n\n/* Labels are medium weight, never light. */\n.root [data-slot=\"toggle-group-item\"] {\n font-weight: var(--font-weight-medium, 500);\n}\n\n/* Track corner radius and padding: ToggleGroup's per-size values unless a theme\n binds --segmented-control-radius (a theme that wants 8px, say) or\n --segmented-control-track-padding. Each size carries its own fallback, so an\n unbound theme renders exactly as before. */\n.root[data-variant=\"outline\"][data-size=\"xs\"] {\n border-radius: var(--segmented-control-radius, var(--radius-md, 0.375rem));\n padding: var(--segmented-control-track-padding, calc(var(--spacing-1, 0.25rem) / 2));\n}\n\n.root[data-variant=\"outline\"][data-size=\"sm\"],\n.root[data-variant=\"outline\"][data-size=\"md\"] {\n border-radius: var(--segmented-control-radius, var(--radius-lg, 0.5rem));\n padding: var(--segmented-control-track-padding, var(--spacing-1, 0.25rem));\n}\n\n.root[data-variant=\"outline\"][data-size=\"lg\"] {\n border-radius: var(--segmented-control-radius, var(--radius-xl, 0.75rem));\n padding: var(--segmented-control-track-padding, var(--spacing-1, 0.25rem));\n}\n\n/* Segment size (VI-785): item height, horizontal padding and label size, each\n falling back to ToggleGroup's value for the size, so an unbound theme renders\n exactly as before. Height goes through --label-box-height, which also feeds\n the label's baseline correction. The item radius shapes the hover fill and\n focus ring; the indicator radius shapes the sliding pill. */\n.root[data-size=\"xs\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 1.5rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--toggle-group-xs-padding-x, var(--spacing-2, 0.5rem)));\n font-size: var(--segmented-control-font-size, var(--toggle-group-xs-font-size, var(--font-size-xs, 0.75rem)));\n border-radius: var(--segmented-control-item-radius, var(--toggle-group-xs-item-radius, var(--radius-sm, 0.25rem)));\n}\n\n.root[data-size=\"sm\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 1.75rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-2, 0.5rem));\n font-size: var(--segmented-control-font-size, var(--font-size-xs, 0.75rem));\n border-radius: var(--segmented-control-item-radius, var(--radius-md, 0.375rem));\n}\n\n.root[data-size=\"md\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 2.25rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-3, 0.75rem));\n font-size: var(--segmented-control-font-size, var(--font-size-sm, 0.875rem));\n border-radius: var(--segmented-control-item-radius, var(--radius-md, 0.375rem));\n}\n\n.root[data-size=\"lg\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 2.75rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-4, 1rem));\n font-size: var(--segmented-control-font-size, var(--font-size-base, 1rem));\n border-radius: var(--segmented-control-item-radius, var(--radius-lg, 0.5rem));\n}\n\n.root[data-size=\"xs\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--toggle-group-xs-item-radius, var(--radius-sm, 0.25rem)));\n}\n\n.root[data-size=\"sm\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--radius-md, 0.375rem));\n}\n\n.root[data-size=\"md\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--radius-md, 0.375rem));\n}\n\n.root[data-size=\"lg\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--radius-lg, 0.5rem));\n}\n\n/* The sliding pill. A theme can set a lifted dark fill (and the ink on it).\n Its edge is a state edge: an inset ring at --control-state-edge-width, the\n width focus and invalid use, so `edges: off` leaves it and nothing shifts\n (WCAG 1.4.11: the selected state carries a 3:1 boundary of its own). A theme\n whose fill already clears 3:1 against the well binds the edge to transparent. */\n.root > [aria-hidden=\"true\"] {\n background-color: var(--segmented-control-indicator-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n box-shadow: inset 0 0 0 var(--control-state-edge-width, 1px) var(--segmented-control-indicator-edge, var(--text-primary, #111827));\n}\n\n.root [data-slot=\"toggle-group-item\"]:not([data-state=\"on\"]) {\n color: var(--segmented-control-inactive-text, var(--text-primary, #111827));\n}\n\n.root [data-slot=\"toggle-group-item\"][data-state=\"on\"] {\n color: var(--segmented-control-indicator-text, var(--interactive-primary-text, #f9fafb));\n font-weight: var(--segmented-control-active-weight, var(--font-weight-medium, 500));\n}\n\n/* Focus stays visible with edges off: it draws at the focus ring width, which\n the edge switch does not touch. It sits outside the pill, in the track. */\n.root [data-slot=\"toggle-group-item\"]:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: none;\n}\n\n/* Equal-width segments spanning the container (list-filter treatment). */\n.root.fullWidth {\n display: flex;\n width: 100%;\n}\n\n.root.fullWidth > [data-slot=\"toggle-group-item\"] {\n flex: 1 1 0;\n min-width: 0;\n}\n\n/* The indicator snaps instead of sliding. */\n@media (prefers-reduced-motion: reduce) {\n .root > [aria-hidden=\"true\"] {\n transition: none;\n }\n}\n\n/* Label box (see renderLabel in the component file). The label, trimmed to the capital band\n exactly as ToggleGroup trims its own (the label-centering doc under docs/), and two hidden\n copies of the text share one grid cell, so the cell is as wide as the widest of\n the active-weight and inactive-weight text and the visible label stays centred\n in it. The copies have no height. */\n.labelBox {\n display: inline-grid;\n justify-items: center;\n}\n\n.labelBox > * {\n grid-area: 1 / 1;\n}\n\n.label {\n display: block;\n white-space: nowrap;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n.reserve {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.reserveActive {\n font-weight: var(--segmented-control-active-weight, var(--font-weight-medium, 500));\n}\n\n.reserveInactive {\n font-weight: var(--font-weight-medium, 500);\n}\n"
|
|
1571
|
+
"content": "/* SegmentedControl layers on ToggleGroup (outline, single). ToggleGroup owns the\n mechanics, sizes, sliding indicator and label centring; this sheet only\n re-skins the track and indicator and adds the fullWidth layout. ToggleGroup's\n own classes are hashed, so they are reached through the data attributes it\n renders. Specificity here is two classes or a class plus an attribute so the\n re-skin wins whatever order the sheets load in. */\n\n.root[data-variant=\"outline\"] {\n /* VI-655: the border only holds box geometry. The visible resting edge is an\n outline pulled inside the box from the shared --control-edge-* tokens, so\n --control-edge-width: 0 on any ancestor removes it with no layout shift. */\n border: 1px solid transparent;\n outline: var(--control-edge-width, 1px) var(--control-edge-style, solid) var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--control-edge-width, 1px));\n /* The well the active pill sits in: the page nudged 12% toward the ink, so it reads as a well\n in light and dark alike (page-relative, unlike --surface-subtle, which is the page in dark).\n Glass (VI-803): under data-glass=\"on\" the well blurs the photo and, unbound, takes the glass\n layer's control fill; a theme's own track-bg still wins. With glass off the --glass-on-*\n variables are unset, so there is no blur. */\n background-color: var(--segmented-control-track-bg, var(--glass-on-control-fill, color-mix(in srgb, var(--text-primary, #111827) 12%, var(--surface-page, #ffffff))));\n /* Prefixed line first, so Lightning CSS keeps both (VI-788). */\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n}\n\n/* Labels are medium weight, never light. */\n.root [data-slot=\"toggle-group-item\"] {\n font-weight: var(--font-weight-medium, 500);\n}\n\n/* Track corner radius and padding: ToggleGroup's per-size values unless a theme\n binds --segmented-control-radius (a theme that wants 8px, say) or\n --segmented-control-track-padding. ToggleGroup draws them and derives the\n concentric inner radius from them (VI-837), so the segments and the pill follow. */\n.root[data-variant=\"outline\"][data-size=\"xs\"] {\n --_track-radius: var(--segmented-control-radius, var(--radius-md, 0.375rem));\n --_track-padding: var(--segmented-control-track-padding, calc(var(--spacing-1, 0.25rem) / 2));\n}\n\n.root[data-variant=\"outline\"][data-size=\"sm\"],\n.root[data-variant=\"outline\"][data-size=\"md\"] {\n --_track-radius: var(--segmented-control-radius, var(--radius-lg, 0.5rem));\n --_track-padding: var(--segmented-control-track-padding, var(--spacing-1, 0.25rem));\n}\n\n.root[data-variant=\"outline\"][data-size=\"lg\"] {\n --_track-radius: var(--segmented-control-radius, var(--radius-xl, 0.75rem));\n --_track-padding: var(--segmented-control-track-padding, var(--spacing-1, 0.25rem));\n}\n\n/* Segment size (VI-785): item height, horizontal padding and label size, each\n falling back to ToggleGroup's value for the size, so an unbound theme renders\n exactly as before. Height goes through --label-box-height, which also feeds\n the label's baseline correction. */\n.root[data-size=\"xs\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 1.5rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--toggle-group-xs-padding-x, var(--spacing-2, 0.5rem)));\n font-size: var(--segmented-control-font-size, var(--toggle-group-xs-font-size, var(--font-size-xs, 0.75rem)));\n}\n\n.root[data-size=\"sm\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 1.75rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-2, 0.5rem));\n font-size: var(--segmented-control-font-size, var(--font-size-xs, 0.75rem));\n}\n\n.root[data-size=\"md\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 2.25rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-3, 0.75rem));\n font-size: var(--segmented-control-font-size, var(--font-size-sm, 0.875rem));\n}\n\n.root[data-size=\"lg\"] [data-slot=\"toggle-group-item\"] {\n --label-box-height: var(--segmented-control-item-height, 2.75rem);\n padding-inline: var(--segmented-control-item-padding-x, var(--spacing-4, 1rem));\n font-size: var(--segmented-control-font-size, var(--font-size-base, 1rem));\n}\n\n/* Corners (VI-837): concentric with the track by default, ToggleGroup's derived\n inner radius. The item radius shapes the hover fill and focus ring, the\n indicator radius the sliding pill; bound, each is an explicit override. */\n.root[data-variant=\"outline\"] [data-slot=\"toggle-group-item\"] {\n border-radius: var(--segmented-control-item-radius, var(--_inner-radius));\n}\n\n.root[data-variant=\"outline\"][data-size=\"xs\"] [data-slot=\"toggle-group-item\"] {\n border-radius: var(--segmented-control-item-radius, var(--toggle-group-xs-item-radius, var(--_inner-radius)));\n}\n\n.root[data-variant=\"outline\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--_inner-radius));\n}\n\n.root[data-variant=\"outline\"][data-size=\"xs\"] > [aria-hidden=\"true\"] {\n border-radius: var(--segmented-control-indicator-radius, var(--toggle-group-xs-item-radius, var(--_inner-radius)));\n}\n\n/* The sliding pill. A theme can set a lifted dark fill (and the ink on it).\n Its edge is a state edge: an inset ring at --control-state-edge-width, the\n width focus and invalid use, so `edges: off` leaves it and nothing shifts\n (WCAG 1.4.11: the selected state carries a 3:1 boundary of its own). A theme\n whose fill already clears 3:1 against the well binds the edge to transparent. */\n.root > [aria-hidden=\"true\"] {\n background-color: var(--segmented-control-indicator-bg, var(--interactive-primary-bg, var(--primary, #111827)));\n box-shadow: inset 0 0 0 var(--control-state-edge-width, 1px) var(--segmented-control-indicator-edge, var(--text-primary, #111827));\n}\n\n.root [data-slot=\"toggle-group-item\"]:not([data-state=\"on\"]) {\n color: var(--segmented-control-inactive-text, var(--text-primary, #111827));\n}\n\n.root [data-slot=\"toggle-group-item\"][data-state=\"on\"] {\n color: var(--segmented-control-indicator-text, var(--interactive-primary-text, #f9fafb));\n font-weight: var(--segmented-control-active-weight, var(--font-weight-medium, 500));\n}\n\n/* Focus stays visible with edges off: it draws at the focus ring width, which\n the edge switch does not touch. It sits outside the pill, in the track. */\n.root [data-slot=\"toggle-group-item\"]:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, #111827);\n outline-offset: var(--focus-ring-offset, 2px);\n box-shadow: none;\n}\n\n/* Equal-width segments spanning the container (list-filter treatment). */\n.root.fullWidth {\n display: flex;\n width: 100%;\n}\n\n.root.fullWidth > [data-slot=\"toggle-group-item\"] {\n flex: 1 1 0;\n min-width: 0;\n}\n\n/* The indicator snaps instead of sliding. */\n@media (prefers-reduced-motion: reduce) {\n .root > [aria-hidden=\"true\"] {\n transition: none;\n }\n}\n\n/* Label box (see renderLabel in the component file). The label, trimmed to the capital band\n exactly as ToggleGroup trims its own (the label-centering doc under docs/), and two hidden\n copies of the text share one grid cell, so the cell is as wide as the widest of\n the active-weight and inactive-weight text and the visible label stays centred\n in it. The copies have no height. */\n.labelBox {\n display: inline-grid;\n justify-items: center;\n}\n\n.labelBox > * {\n grid-area: 1 / 1;\n}\n\n.label {\n display: block;\n white-space: nowrap;\n}\n\n@supports (text-box: trim-both cap alphabetic) {\n .label {\n text-box: trim-both cap alphabetic;\n }\n}\n\n/* Blink only: it snaps the baseline to a whole CSS px; this hands back what the\n snap took. WebKit places the baseline exactly, so it is excluded. */\n@supports (text-box: trim-both cap alphabetic) and (not (-apple-pay-button-style: black)) {\n .label {\n transform: translateY(calc((var(--label-box-height) + 1cap) / 2 - round((var(--label-box-height) + 1cap) / 2, 1px)));\n }\n}\n\n.reserve {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.reserveActive {\n font-weight: var(--segmented-control-active-weight, var(--font-weight-medium, 500));\n}\n\n.reserveInactive {\n font-weight: var(--font-weight-medium, 500);\n}\n\n/* Squircle fallback (VI-839). ToggleGroup draws the track, pill and segments\n as the theme's squircle where the browser has no corner-shape (Safari); this\n feeds it the segment height and the indicator and item radius overrides, so\n each --squircle-r stays its radius clamped to half its height. Chromium and\n round themes skip this. */\n@supports not (corner-shape: squircle) {\n @container style(--corner-shape: squircle) {\n .root[data-variant=\"outline\"][data-size=\"xs\"] { --_sq-track-h: calc(var(--segmented-control-item-height, 1.5rem) + 2 * var(--_track-padding) + 2px); }\n .root[data-variant=\"outline\"][data-size=\"sm\"] { --_sq-track-h: calc(var(--segmented-control-item-height, 1.75rem) + 2 * var(--_track-padding) + 2px); }\n .root[data-variant=\"outline\"][data-size=\"md\"] { --_sq-track-h: calc(var(--segmented-control-item-height, 2.25rem) + 2 * var(--_track-padding) + 2px); }\n .root[data-variant=\"outline\"][data-size=\"lg\"] { --_sq-track-h: calc(var(--segmented-control-item-height, 2.75rem) + 2 * var(--_track-padding) + 2px); }\n\n /* The track's edge is the inset outline; the pill's an inset ring. */\n .root[data-variant=\"outline\"] {\n --squircle-edge: var(--control-edge-width, 1px);\n }\n\n .root[data-variant=\"outline\"][data-size] > [aria-hidden=\"true\"] {\n --squircle-edge: var(--control-state-edge-width, 1px);\n }\n\n .root[data-variant=\"outline\"] > [aria-hidden=\"true\"] {\n --squircle-r: min(var(--segmented-control-indicator-radius, var(--_inner-radius)), calc(var(--_sq-track-h) / 2 - var(--_track-padding) - 1px));\n }\n\n .root[data-variant=\"outline\"][data-size=\"xs\"] > [aria-hidden=\"true\"] {\n --squircle-r: min(var(--segmented-control-indicator-radius, var(--toggle-group-xs-item-radius, var(--_inner-radius))), calc(var(--_sq-track-h) / 2 - var(--_track-padding) - 1px));\n }\n\n .root[data-variant=\"outline\"] [data-slot=\"toggle-group-item\"] {\n --squircle-r: min(var(--segmented-control-item-radius, var(--_inner-radius)), calc(var(--label-box-height) / 2));\n }\n\n .root[data-variant=\"outline\"][data-size=\"xs\"] [data-slot=\"toggle-group-item\"] {\n --squircle-r: min(var(--segmented-control-item-radius, var(--toggle-group-xs-item-radius, var(--_inner-radius))), calc(var(--label-box-height) / 2));\n }\n\n .root[data-variant=\"outline\"][data-size] > [aria-hidden=\"true\"],\n .root[data-variant=\"outline\"][data-size] [data-slot=\"toggle-group-item\"] {\n border-radius: var(--squircle-radius, var(--squircle-r));\n clip-path: var(--squircle-clip, none);\n }\n\n /* The track's edge and the pill's ring are redrawn on ::before as squircle\n rings; the element's own edge goes transparent. */\n .root[data-variant=\"outline\"] {\n outline-color: var(--squircle-edge-off, var(--control-edge-color, var(--border-default, #e5e7eb)));\n }\n\n /* An outline in the track's own outline style, not a fill, so anything that\n turns the track's edge off (an edge style of none, Radix's inline\n outline: none on the focus group) turns the ring off too. */\n .root[data-variant=\"outline\"]::before {\n background-color: transparent;\n border-radius: var(--squircle-ring-radius, var(--squircle-r));\n outline-width: var(--squircle-ring-paint, var(--control-edge-width, 1px));\n outline-style: inherit;\n outline-color: var(--control-edge-color, var(--border-default, #e5e7eb));\n outline-offset: calc(-1 * var(--squircle-ring-paint, var(--control-edge-width, 1px)));\n }\n\n .root[data-variant=\"outline\"][data-size] > [aria-hidden=\"true\"] {\n box-shadow: inset 0 0 0 var(--control-state-edge-width, 1px) var(--squircle-edge-off, var(--segmented-control-indicator-edge, var(--text-primary, #111827)));\n }\n\n .root[data-variant=\"outline\"][data-size] > [aria-hidden=\"true\"]::before {\n content: \"\";\n position: absolute;\n inset: 0;\n --squircle-r: inherit;\n --squircle-edge: inherit;\n background-color: var(--segmented-control-indicator-edge, var(--text-primary, #111827));\n clip-path: var(--squircle-ring, inset(50%));\n pointer-events: none;\n }\n }\n}\n"
|
|
1548
1572
|
}
|
|
1549
1573
|
]
|
|
1550
1574
|
},
|
|
@@ -1570,7 +1594,7 @@
|
|
|
1570
1594
|
{
|
|
1571
1595
|
"path": "components/ui/combobox/combobox.module.css",
|
|
1572
1596
|
"type": "registry:ui",
|
|
1573
|
-
"content": "/* Combobox root */\n.root {\n position: relative;\n display: inline-flex;\n flex-direction: column;\n width: fit-content;\n}\n\n/* Input wrapper */\n.inputWrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.input {\n width: 100%;\n height: 2.25rem;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem)) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n border: 1px solid var(--combobox-border, var(--border-default, #e5e7eb));\n background-color: var(--combobox-bg, var(--surface-interactive-default, #f9fafb));\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-primary, #111827);\n transition: border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .input:hover:not(:focus-visible):not(:disabled) {\n border-color: var(--border-strong, #d1d5db);\n }\n}\n\n.input:focus-visible {\n border-color: var(--border-focus, #111827);\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Caret icon */\n.icon {\n position: absolute;\n right: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n pointer-events: none;\n color: var(--text-secondary, #9ca3af);\n transition: transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.iconOpen {\n transform: translateY(-50%) rotate(180deg);\n}\n\n/* Content popover */\n.content {\n z-index: 50;\n min-width: var(--radix-popover-trigger-width, 12rem);\n max-height: 18rem;\n overflow: hidden auto;\n
|
|
1597
|
+
"content": "/* Combobox root */\n.root {\n position: relative;\n display: inline-flex;\n flex-direction: column;\n width: fit-content;\n}\n\n/* Input wrapper */\n.inputWrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n/* Input */\n.input {\n width: 100%;\n height: 2.25rem;\n padding: var(--spacing-2, 0.5rem) calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem)) var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n border-radius: var(--radius-md, 0.375rem);\n border: 1px solid var(--combobox-border, var(--border-default, #e5e7eb));\n background-color: var(--combobox-bg, var(--surface-interactive-default, #f9fafb));\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-primary, #111827);\n transition: border-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n box-shadow var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n outline: none;\n}\n\n.input::placeholder {\n color: var(--text-secondary, #9ca3af);\n}\n\n@media (hover: hover) {\n .input:hover:not(:focus-visible):not(:disabled) {\n border-color: var(--border-strong, #d1d5db);\n }\n}\n\n.input:focus-visible {\n border-color: var(--border-focus, #111827);\n box-shadow: 0 0 0 var(--focus-ring-width, 2px) color-mix(in srgb, var(--border-focus, #111827) 15%, transparent);\n}\n\n.input:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Caret icon */\n.icon {\n position: absolute;\n right: var(--spacing-3, 0.75rem);\n top: 50%;\n transform: translateY(-50%);\n width: 1rem;\n height: 1rem;\n pointer-events: none;\n color: var(--text-secondary, #9ca3af);\n transition: transform var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.iconOpen {\n transform: translateY(-50%) rotate(180deg);\n}\n\n/* Content popover */\n.content {\n z-index: 50;\n min-width: var(--radix-popover-trigger-width, 12rem);\n max-height: 18rem;\n overflow: hidden auto;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n background-color: var(--field-menu-bg, var(--surface-popover, var(--surface-card, #ffffff)));\n color: var(--text-primary, #111827);\n box-shadow: var(--shadow-lg);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n}\n\n/* Listbox */\n.listbox {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/* Item */\n.item {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n /* Concentric with the menu (VI-838): its radius minus its padding. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding)));\n font-size: var(--font-size-sm, 0.875rem);\n cursor: default;\n outline: none;\n user-select: none;\n}\n\n.item:focus:not([data-disabled]),\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .item:hover:not([data-disabled]) {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n cursor: pointer;\n }\n}\n\n.item[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.item[data-selected] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n font-weight: var(--font-weight-medium, 500);\n}\n\n.itemCheck {\n display: inline-flex;\n width: 1rem;\n height: 1rem;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.itemCheckIcon {\n width: 0.875rem;\n height: 0.875rem;\n color: var(--interactive-primary-bg, var(--primary, #111827));\n}\n\n/* Empty */\n.empty {\n list-style: none;\n padding: var(--spacing-4, 1rem) var(--spacing-3, 0.75rem);\n text-align: center;\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, #9ca3af);\n}\n\n/* Group */\n.group {\n list-style: none;\n}\n\n.group ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.groupHeading {\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem) var(--spacing-1, 0.25rem);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #9ca3af);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n/* Separator */\n.separator {\n list-style: none;\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n"
|
|
1574
1598
|
}
|
|
1575
1599
|
]
|
|
1576
1600
|
},
|
|
@@ -1672,7 +1696,7 @@
|
|
|
1672
1696
|
{
|
|
1673
1697
|
"path": "components/ui/menubar/menubar.module.css",
|
|
1674
1698
|
"type": "registry:ui",
|
|
1675
|
-
"content": "/* Menubar root */\n.root {\n display: flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n
|
|
1699
|
+
"content": "/* Menubar root */\n.root {\n display: flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n border: 1px solid var(--border-default, #e5e7eb);\n background-color: var(--surface-card, #ffffff);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n height: 2.5rem;\n}\n\n/* Menubar trigger */\n.trigger {\n display: flex;\n align-items: center;\n /* Fill the bar's height, so the inset matches on both axes (VI-838). */\n align-self: stretch;\n padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n /* Concentric with the menu (VI-838): its radius minus its padding and 1px border. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding) - 1px));\n cursor: default;\n outline: none;\n user-select: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.trigger:focus,\n.trigger[data-state=\"open\"] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n@media (hover: hover) {\n .trigger:hover {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n }\n}\n\n.trigger:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n/* Menu content */\n.content {\n z-index: 50;\n min-width: 12rem;\n overflow: hidden;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n border: 1px solid var(--border-default, #e5e7eb);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow: var(--shadow-lg);\n}\n\n.content[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.content[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Sub content */\n.subContent {\n z-index: 50;\n min-width: 9rem;\n overflow: hidden;\n --_menu-radius: var(--radius-lg, 0.5rem);\n border-radius: var(--_menu-radius);\n border: 1px solid var(--border-default, #e5e7eb);\n background-color: var(--surface-popover, var(--surface-card, #ffffff));\n color: var(--text-primary, #111827);\n --_menu-padding: var(--spacing-1, 0.25rem);\n padding: var(--_menu-padding);\n box-shadow: var(--shadow-lg);\n}\n\n.subContent[data-state=\"open\"] {\n animation: contentShow var(--motion-duration-fast, 100ms) var(--motion-easing-enter, ease-out);\n}\n\n.subContent[data-state=\"closed\"] {\n animation: contentHide var(--motion-duration-fast, 100ms) var(--motion-easing-exit, ease-in);\n}\n\n/* Menu item */\n.item {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding and 1px border. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding) - 1px));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.item:focus,\n.item[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.item[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.itemDestructive {\n color: var(--text-error, #ef4444);\n}\n\n.itemDestructive:focus,\n.itemDestructive[data-highlighted] {\n background-color: var(--surface-error-subtle, rgba(239, 68, 68, 0.1));\n color: var(--text-error, #ef4444);\n}\n\n.itemInset {\n padding-left: calc(var(--spacing-8, 2rem) + var(--spacing-1, 0.25rem) * 1.5);\n}\n\n/* Checkbox and radio items */\n.checkboxItem,\n.radioItem {\n position: relative;\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2);\n /* Concentric with the menu (VI-838): its radius minus its padding and 1px border. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding) - 1px));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n padding-right: var(--spacing-8, 2rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.checkboxItem:focus,\n.checkboxItem[data-highlighted],\n.radioItem:focus,\n.radioItem[data-highlighted] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.checkboxItem[data-disabled],\n.radioItem[data-disabled] {\n pointer-events: none;\n opacity: 0.5;\n}\n\n/* Item indicator */\n.itemIndicator {\n pointer-events: none;\n position: absolute;\n right: 0.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n}\n\n/* Label */\n.label {\n padding: calc(var(--spacing-2, 0.5rem) + var(--spacing-1, 0.25rem) / 2) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-xs, 0.75rem);\n color: var(--text-secondary, #6b7280);\n}\n\n/* Separator */\n.separator {\n height: 1px;\n margin: var(--spacing-1, 0.25rem) calc(-1 * var(--spacing-1, 0.25rem));\n background-color: var(--border-default, #e5e7eb);\n}\n\n/* Shortcut */\n.shortcut {\n margin-left: auto;\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.1em;\n color: var(--text-secondary, #6b7280);\n}\n\n/* Sub trigger */\n.subTrigger {\n display: flex;\n cursor: default;\n user-select: none;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n /* Concentric with the menu (VI-838): its radius minus its padding and 1px border. */\n border-radius: max(0px, calc(var(--_menu-radius) - var(--_menu-padding) - 1px));\n padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);\n font-size: var(--font-size-sm, 0.875rem);\n outline: none;\n transition: background-color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-fast, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.subTrigger:focus,\n.subTrigger[data-state=\"open\"] {\n background-color: var(--surface-interactive-hover, #f3f4f6);\n color: var(--text-primary, #111827);\n}\n\n.subTriggerIcon {\n margin-left: auto;\n width: 1rem;\n height: 1rem;\n}\n\n@keyframes contentShow {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes contentHide {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n}\n"
|
|
1676
1700
|
}
|
|
1677
1701
|
]
|
|
1678
1702
|
},
|
|
@@ -2164,12 +2188,12 @@
|
|
|
2164
2188
|
{
|
|
2165
2189
|
"path": "components/ui/offline-banner/offline-banner.tsx",
|
|
2166
2190
|
"type": "registry:ui",
|
|
2167
|
-
"content": "'use client';\n\nimport * as React from \"react\"\nimport { WifiSlashIcon, ArrowsClockwiseIcon, CheckCircleIcon } from \"@phosphor-icons/react\"\nimport styles from \"./offline-banner.module.css\"\n\n// ─── Network status types ────────────────────────────────────────────────────\n\nexport type NetworkState = \"online\" | \"offline\" | \"reconnecting\" | \"restored\"\n\n// ─── useNetworkStatus hook ───────────────────────────────────────────────────\n\nexport interface UseNetworkStatusOptions {\n /** Called when manual retry check completes (resolve to report online/offline result). */\n onRetry?: () => Promise<boolean>\n /** Duration (ms) to show the \"restored\" state before auto-dismissing. Default: 1500. */\n restoredDisplayDuration?: number\n}\n\nexport interface UseNetworkStatusReturn {\n networkState: NetworkState\n retry: () => void\n}\n\n/**\n * Hook that tracks navigator.onLine and drives the offline banner state machine.\n *\n * States:\n * online → No banner shown (initial state when online)\n * offline → Network lost; banner visible with \"You're offline\" + Retry button\n * reconnecting → Retry pressed; spinner shown, Retry hidden\n * restored → Back online; brief \"Back online\" confirmation, auto-dismisses after 1.5s\n */\nexport function useNetworkStatus(options: UseNetworkStatusOptions = {}): UseNetworkStatusReturn {\n const { onRetry, restoredDisplayDuration = 1500 } = options\n\n const [networkState, setNetworkState] = React.useState<NetworkState>(\n // SSR-safe: default to \"online\" on server; browser will correct on mount\n typeof navigator !== \"undefined\" && !navigator.onLine ? \"offline\" : \"online\"\n )\n\n // Listen to browser online/offline events\n React.useEffect(() => {\n function handleOnline() {\n setNetworkState(\"restored\")\n }\n\n function handleOffline() {\n setNetworkState(\"offline\")\n }\n\n window.addEventListener(\"online\", handleOnline)\n window.addEventListener(\"offline\", handleOffline)\n\n // Sync initial state on mount (in case it changed between server render and mount)\n if (!navigator.onLine) {\n setNetworkState(\"offline\")\n }\n\n return () => {\n window.removeEventListener(\"online\", handleOnline)\n window.removeEventListener(\"offline\", handleOffline)\n }\n }, [])\n\n // Auto-dismiss \"restored\" state after display duration\n React.useEffect(() => {\n if (networkState !== \"restored\") return\n\n const timer = setTimeout(() => {\n setNetworkState(\"online\")\n }, restoredDisplayDuration)\n\n return () => clearTimeout(timer)\n }, [networkState, restoredDisplayDuration])\n\n const retry = React.useCallback(async () => {\n setNetworkState(\"reconnecting\")\n\n if (onRetry) {\n try {\n const isOnline = await onRetry()\n setNetworkState(isOnline ? \"restored\" : \"offline\")\n } catch {\n setNetworkState(\"offline\")\n }\n } else {\n // Default: check navigator.onLine\n if (navigator.onLine) {\n setNetworkState(\"restored\")\n } else {\n // Brief pause to show reconnecting state, then revert to offline\n await new Promise<void>((resolve) => setTimeout(resolve, 800))\n setNetworkState(\"offline\")\n }\n }\n }, [onRetry])\n\n return { networkState, retry }\n}\n\n// ─── OfflineBanner component ─────────────────────────────────────────────────\n\nexport interface OfflineBannerProps {\n /** Current network state. Use with `useNetworkStatus()` or control manually. */\n networkState: NetworkState\n /** Called when the user presses \"Retry\". */\n onRetry?: () => void\n /** Additional className for the banner root. */\n className?: string\n /** Custom label for the offline state. Default: \"You're offline\". */\n offlineLabel?: string\n /** Custom label for the reconnecting state. Default: \"Reconnecting…\". */\n reconnectingLabel?: string\n /** Custom label for the restored state. Default: \"Back online\". */\n restoredLabel?: string\n /** Custom label for the retry button. Default: \"Retry\". */\n retryLabel?: string\n}\n\n/**\n * OfflineBanner — full-width sticky banner for network connectivity loss.\n *\n * Composes the existing Banner pattern: dark surface, inverse text, accent icon.\n * Mounts below the navigation bar using sticky positioning — does not overlay content.\n *\n * Usage:\n * const { networkState, retry } = useNetworkStatus();\n * <OfflineBanner networkState={networkState} onRetry={retry} />\n */\nexport const OfflineBanner = React.forwardRef<HTMLDivElement, OfflineBannerProps>(\n function OfflineBanner(\n {\n networkState,\n onRetry,\n className,\n offlineLabel
|
|
2191
|
+
"content": "'use client';\n\nimport * as React from \"react\"\nimport { WifiSlashIcon, ArrowsClockwiseIcon, CheckCircleIcon } from \"@phosphor-icons/react\"\nimport styles from \"./offline-banner.module.css\"\n\n// ─── Network status types ────────────────────────────────────────────────────\n\nexport type NetworkState = \"online\" | \"offline\" | \"reconnecting\" | \"restored\"\n\n// ─── useNetworkStatus hook ───────────────────────────────────────────────────\n\nexport interface UseNetworkStatusOptions {\n /** Called when manual retry check completes (resolve to report online/offline result). */\n onRetry?: () => Promise<boolean>\n /** Duration (ms) to show the \"restored\" state before auto-dismissing. Default: 1500. */\n restoredDisplayDuration?: number\n}\n\nexport interface UseNetworkStatusReturn {\n networkState: NetworkState\n retry: () => void\n}\n\n/**\n * Hook that tracks navigator.onLine and drives the offline banner state machine.\n *\n * States:\n * online → No banner shown (initial state when online)\n * offline → Network lost; banner visible with \"You're offline\" + Retry button\n * reconnecting → Retry pressed; spinner shown, Retry hidden\n * restored → Back online; brief \"Back online\" confirmation, auto-dismisses after 1.5s\n */\nexport function useNetworkStatus(options: UseNetworkStatusOptions = {}): UseNetworkStatusReturn {\n const { onRetry, restoredDisplayDuration = 1500 } = options\n\n const [networkState, setNetworkState] = React.useState<NetworkState>(\n // SSR-safe: default to \"online\" on server; browser will correct on mount\n typeof navigator !== \"undefined\" && !navigator.onLine ? \"offline\" : \"online\"\n )\n\n // Listen to browser online/offline events\n React.useEffect(() => {\n function handleOnline() {\n setNetworkState(\"restored\")\n }\n\n function handleOffline() {\n setNetworkState(\"offline\")\n }\n\n window.addEventListener(\"online\", handleOnline)\n window.addEventListener(\"offline\", handleOffline)\n\n // Sync initial state on mount (in case it changed between server render and mount)\n if (!navigator.onLine) {\n setNetworkState(\"offline\")\n }\n\n return () => {\n window.removeEventListener(\"online\", handleOnline)\n window.removeEventListener(\"offline\", handleOffline)\n }\n }, [])\n\n // Auto-dismiss \"restored\" state after display duration\n React.useEffect(() => {\n if (networkState !== \"restored\") return\n\n const timer = setTimeout(() => {\n setNetworkState(\"online\")\n }, restoredDisplayDuration)\n\n return () => clearTimeout(timer)\n }, [networkState, restoredDisplayDuration])\n\n const retry = React.useCallback(async () => {\n setNetworkState(\"reconnecting\")\n\n if (onRetry) {\n try {\n const isOnline = await onRetry()\n setNetworkState(isOnline ? \"restored\" : \"offline\")\n } catch {\n setNetworkState(\"offline\")\n }\n } else {\n // Default: check navigator.onLine\n if (navigator.onLine) {\n setNetworkState(\"restored\")\n } else {\n // Brief pause to show reconnecting state, then revert to offline\n await new Promise<void>((resolve) => setTimeout(resolve, 800))\n setNetworkState(\"offline\")\n }\n }\n }, [onRetry])\n\n return { networkState, retry }\n}\n\n// ─── OfflineBanner component ─────────────────────────────────────────────────\n\nexport interface OfflineBannerProps {\n /** Current network state. Use with `useNetworkStatus()` or control manually. */\n networkState: NetworkState\n /** Called when the user presses \"Retry\". */\n onRetry?: () => void\n /** Additional className for the banner root. */\n className?: string\n /** Custom label for the offline state. Default: \"You're offline\". */\n offlineLabel?: string\n /** Custom label for the reconnecting state. Default: \"Reconnecting…\". */\n reconnectingLabel?: string\n /** Custom label for the restored state. Default: \"Back online\". */\n restoredLabel?: string\n /** Custom label for the retry button. Default: \"Retry\". */\n retryLabel?: string\n /**\n * `\"banner\"` (default): the full-width sticky bar. `\"pill\"`: a compact inline\n * pill for a top bar, solid by default and glass inside `data-glass=\"on\"`.\n */\n variant?: \"banner\" | \"pill\"\n /** Shown after the label as `· {detail}`, lighter, e.g. \"saved 9PM\". Read out with the label. */\n detail?: React.ReactNode\n}\n\n/**\n * OfflineBanner — full-width sticky banner for network connectivity loss, or a\n * compact pill (`variant=\"pill\"`) for a top bar.\n *\n * Composes the existing Banner pattern: dark surface, inverse text, accent icon.\n * Mounts below the navigation bar using sticky positioning — does not overlay content.\n *\n * Usage:\n * const { networkState, retry } = useNetworkStatus();\n * <OfflineBanner networkState={networkState} onRetry={retry} />\n */\nexport const OfflineBanner = React.forwardRef<HTMLDivElement, OfflineBannerProps>(\n function OfflineBanner(\n {\n networkState,\n onRetry,\n className,\n offlineLabel,\n reconnectingLabel = \"Reconnecting…\",\n restoredLabel = \"Back online\",\n retryLabel = \"Retry\",\n variant = \"banner\",\n detail,\n },\n ref\n ) {\n // Hidden when online\n if (networkState === \"online\") return null\n\n const isOffline = networkState === \"offline\"\n const isReconnecting = networkState === \"reconnecting\"\n const isRestored = networkState === \"restored\"\n const isPill = variant === \"pill\"\n const label = isRestored\n ? restoredLabel\n : isReconnecting\n ? reconnectingLabel\n : (offlineLabel ?? (isPill ? \"Offline\" : \"You're offline\"))\n\n const bannerClass = [\n isPill ? styles.pill : styles.banner,\n isPill ? undefined : isRestored ? styles.bannerRestored : styles.bannerOffline,\n className,\n ]\n .filter(Boolean)\n .join(\" \")\n\n return (\n <div\n ref={ref}\n data-slot=\"offline-banner\"\n data-state={networkState}\n data-variant={isPill ? \"pill\" : undefined}\n role=\"status\"\n aria-live=\"polite\"\n // With a detail, the live region reads its own text so the detail is announced too.\n aria-label={detail === undefined ? label : undefined}\n className={bannerClass}\n >\n {/* Left: icon or spinner */}\n <span className={styles.iconSlot} aria-hidden=\"true\">\n {isRestored ? (\n <CheckCircleIcon weight=\"fill\" className={styles.iconRestored} />\n ) : isReconnecting ? (\n <span className={styles.spinner} />\n ) : (\n <WifiSlashIcon weight=\"bold\" className={styles.iconOffline} />\n )}\n </span>\n\n {/* Center: status label */}\n <span className={styles.label}>{label}</span>\n {detail !== undefined && (\n <>\n {\" \"}\n <span className={styles.detail}>· {detail}</span>\n </>\n )}\n\n {/* Right: retry button (offline state only) */}\n {isOffline && onRetry && (\n <button\n type=\"button\"\n className={styles.retryBtn}\n onClick={onRetry}\n aria-label={`${retryLabel} — check network connection`}\n >\n <ArrowsClockwiseIcon weight=\"bold\" className={styles.retryIcon} aria-hidden=\"true\" />\n {retryLabel}\n </button>\n )}\n </div>\n )\n }\n)\nOfflineBanner.displayName = \"OfflineBanner\"\n"
|
|
2168
2192
|
},
|
|
2169
2193
|
{
|
|
2170
2194
|
"path": "components/ui/offline-banner/offline-banner.module.css",
|
|
2171
2195
|
"type": "registry:ui",
|
|
2172
|
-
"content": "/* OfflineBanner\n * Full-width sticky banner pinned below the navigation bar.\n * Dark surface (--surface-overlay) with inverse text — authoritative, not alarming.\n * Accent icon (--accent) reads against the dark background.\n *\n * Three rendered states share the same base layout:\n * offline → dark bg, wifi-off icon, \"You're offline\" + Retry button\n * reconnecting → dark bg, spinner replacing icon, \"Reconnecting…\", no Retry\n * restored → success-tinted bg, check icon, \"Back online\" (auto-dismisses)\n */\n\n/* ── Slide-in entrance animation ─────────────────────────────────────────── */\n/* Resting state is opacity:1 (SSR-safe — never gated on JS mount) */\n@keyframes offlineBannerEnter {\n from {\n transform: translateY(-100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n/* ── Shared banner base ──────────────────────────────────────────────────── */\n.banner {\n width: 100%;\n position: sticky;\n top: 0;\n z-index: 40;\n display: flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n padding: 0 var(--spacing-4, 1rem);\n height: 44px;\n animation: offlineBannerEnter var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n/* ── Offline / reconnecting: dark inverse surface ────────────────────────── */\n.bannerOffline {\n background-color: var(--surface-overlay, #111827);\n border-bottom: var(--stroke-width-thin, 1px) solid\n color-mix(in srgb, var(--accent, #0ea5e9) 20%, transparent);\n color: var(--text-inverse, #ffffff);\n}\n\n/* ── Restored: success-tinted surface ───────────────────────────────────── */\n.bannerRestored {\n background-color: var(--surface-success-subtle, #f0fdf4);\n border-bottom: var(--stroke-width-thin, 1px) solid var(--border-success, #22c55e);\n color: var(--text-success, #16a34a);\n}\n\n/* ── Icon slot ───────────────────────────────────────────────────────────── */\n.iconSlot {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.125rem;\n height: 1.125rem;\n}\n\n.iconOffline {\n width: 1.125rem;\n height: 1.125rem;\n color: var(--accent, #0ea5e9);\n}\n\n.iconRestored {\n width: 1.125rem;\n height: 1.125rem;\n color: var(--text-success, #16a34a);\n}\n\n/* ── Spinner (reconnecting state) ────────────────────────────────────────── */\n@keyframes offlineBannerSpin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.spinner {\n display: block;\n width: 1rem;\n height: 1rem;\n border: var(--stroke-width-regular, 2px) solid\n color-mix(in srgb, var(--accent, #0ea5e9) 30%, transparent);\n border-top-color: var(--accent, #0ea5e9);\n border-radius: var(--radius-full, 9999px);\n animation: offlineBannerSpin var(--motion-duration-800, 800ms) var(--motion-easing-linear, linear) infinite;\n flex-shrink: 0;\n}\n\n/* ── Status label ────────────────────────────────────────────────────────── */\n.label {\n flex: 1;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n /* Inherits color from .bannerOffline or .bannerRestored */\n}\n\n/* ── Retry button ────────────────────────────────────────────────────────── */\n.retryBtn {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n margin-left: auto;\n padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border: none;\n border-radius: var(--radius-sm, 0.25rem);\n background: transparent;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-semibold, 600);\n color: var(--accent, #0ea5e9);\n cursor: pointer;\n transition:\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.retryBtn:hover {\n background-color: color-mix(in srgb, var(--accent, #0ea5e9) 10%, transparent);\n}\n\n.retryBtn:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.retryIcon {\n width: 0.875rem;\n height: 0.875rem;\n}\n"
|
|
2196
|
+
"content": "/* OfflineBanner\n * Full-width sticky banner pinned below the navigation bar.\n * Dark surface (--surface-overlay) with inverse text — authoritative, not alarming.\n * Accent icon (--accent) reads against the dark background.\n *\n * Three rendered states share the same base layout:\n * offline → dark bg, wifi-off icon, \"You're offline\" + Retry button\n * reconnecting → dark bg, spinner replacing icon, \"Reconnecting…\", no Retry\n * restored → success-tinted bg, check icon, \"Back online\" (auto-dismisses)\n */\n\n/* ── Slide-in entrance animation ─────────────────────────────────────────── */\n/* Resting state is opacity:1 (SSR-safe — never gated on JS mount) */\n@keyframes offlineBannerEnter {\n from {\n transform: translateY(-100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n/* ── Shared banner base ──────────────────────────────────────────────────── */\n.banner {\n width: 100%;\n position: sticky;\n top: 0;\n z-index: 40;\n display: flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n padding: 0 var(--spacing-4, 1rem);\n height: 44px;\n animation: offlineBannerEnter var(--motion-duration-normal, 200ms) var(--motion-easing-enter, ease-out);\n}\n\n/* ── Offline / reconnecting: dark inverse surface ────────────────────────── */\n.bannerOffline {\n background-color: var(--surface-overlay, #111827);\n border-bottom: var(--stroke-width-thin, 1px) solid\n color-mix(in srgb, var(--accent, #0ea5e9) 20%, transparent);\n color: var(--text-inverse, #ffffff);\n}\n\n/* ── Restored: success-tinted surface ───────────────────────────────────── */\n.bannerRestored {\n background-color: var(--surface-success-subtle, #f0fdf4);\n border-bottom: var(--stroke-width-thin, 1px) solid var(--border-success, #22c55e);\n color: var(--text-success, #16a34a);\n}\n\n/* ── Icon slot ───────────────────────────────────────────────────────────── */\n.iconSlot {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.125rem;\n height: 1.125rem;\n}\n\n.iconOffline {\n width: 1.125rem;\n height: 1.125rem;\n color: var(--accent, #0ea5e9);\n}\n\n.iconRestored {\n width: 1.125rem;\n height: 1.125rem;\n color: var(--text-success, #16a34a);\n}\n\n/* ── Spinner (reconnecting state) ────────────────────────────────────────── */\n@keyframes offlineBannerSpin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.spinner {\n display: block;\n width: 1rem;\n height: 1rem;\n border: var(--stroke-width-regular, 2px) solid\n color-mix(in srgb, var(--accent, #0ea5e9) 30%, transparent);\n border-top-color: var(--accent, #0ea5e9);\n border-radius: var(--radius-full, 9999px);\n animation: offlineBannerSpin var(--motion-duration-800, 800ms) var(--motion-easing-linear, linear) infinite;\n flex-shrink: 0;\n}\n\n/* ── Status label ────────────────────────────────────────────────────────── */\n.label {\n flex: 1;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-medium, 500);\n line-height: 1;\n /* Inherits color from .bannerOffline or .bannerRestored */\n}\n\n/* ── Retry button ────────────────────────────────────────────────────────── */\n.retryBtn {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-1, 0.25rem);\n margin-left: auto;\n padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border: none;\n border-radius: var(--radius-sm, 0.25rem);\n background: transparent;\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: var(--font-weight-semibold, 600);\n color: var(--accent, #0ea5e9);\n cursor: pointer;\n transition:\n background-color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-150, 150ms) var(--motion-easing-default, ease-in-out);\n}\n\n.retryBtn:hover {\n background-color: color-mix(in srgb, var(--accent, #0ea5e9) 10%, transparent);\n}\n\n.retryBtn:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n\n.retryIcon {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* ── Detail, after the label (\"· saved 9PM\") ─────────────────────────────── */\n.detail {\n flex: 1;\n font-size: var(--font-size-sm, 0.875rem);\n line-height: 1;\n opacity: var(--opacity-80, 0.8);\n}\n\n/* The label takes the free space only when no detail follows it. */\n.label:has(+ .detail) {\n flex: none;\n}\n\n/* ── Pill (VI-801): a compact inline status for a top bar ───────────────── */\n/* Solid by default. Inside data-glass=\"on\" it reads the glass layer's shared\n control values (fill, ring, ink, blur), as ThemeToggle and the glass icon\n Button do. One element with no blurred children, so it carries its own blur;\n the prefixed line comes first so Lightning CSS keeps both (VI-788). */\n.pill {\n display: inline-flex;\n align-items: center;\n gap: var(--offline-banner-pill-gap, var(--spacing-2, 0.5rem));\n height: var(--offline-banner-pill-height, 2.5rem);\n padding: 0 var(--offline-banner-pill-padding-x, var(--spacing-4, 1rem));\n border-radius: var(--radius-full, 9999px);\n background-color: var(--glass-on-control-fill, var(--offline-banner-pill-bg, var(--surface-muted, #f3f4f6)));\n box-shadow: inset 0 0 0 var(--stroke-width-thin, 1px) var(--glass-on-control-ring, var(--offline-banner-pill-border, var(--border-default, #e5e7eb)));\n color: var(--glass-on-control-ink, var(--offline-banner-pill-text-color, var(--text-primary, #111827)));\n -webkit-backdrop-filter: var(--glass-on-control-blur, none);\n backdrop-filter: var(--glass-on-control-blur, none);\n font-size: var(--offline-banner-pill-font-size, var(--font-size-sm, 0.875rem));\n white-space: nowrap;\n}\n\n.pill .label {\n flex: none;\n font-size: inherit;\n font-weight: var(--offline-banner-pill-font-weight, var(--font-weight-semibold, 600));\n}\n\n.pill .detail {\n flex: none;\n font-size: inherit;\n font-weight: var(--offline-banner-pill-detail-font-weight, var(--font-weight-medium, 500));\n opacity: var(--offline-banner-pill-detail-opacity, var(--opacity-80, 0.8));\n}\n\n.pill .iconSlot,\n.pill .iconOffline,\n.pill .iconRestored {\n width: var(--offline-banner-pill-icon-size, 1.125rem);\n height: var(--offline-banner-pill-icon-size, 1.125rem);\n}\n\n/* Every state's icon takes the pill's ink. */\n.pill .iconOffline,\n.pill .iconRestored {\n color: inherit;\n}\n\n.pill .spinner {\n border-color: color-mix(in srgb, currentColor 30%, transparent);\n border-top-color: currentColor;\n}\n\n.pill .retryBtn {\n margin-left: 0;\n color: inherit;\n}\n"
|
|
2173
2197
|
}
|
|
2174
2198
|
]
|
|
2175
2199
|
},
|
|
@@ -3236,12 +3260,12 @@
|
|
|
3236
3260
|
{
|
|
3237
3261
|
"path": "components/ui/key-value-list/key-value-list.tsx",
|
|
3238
3262
|
"type": "registry:ui",
|
|
3239
|
-
"content": "import * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./key-value-list.module.css\"\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport interface KeyValueItem {\n /** The term — rendered as `<dt>`. */\n label: React.ReactNode\n /** The value — rendered as `<dd>`. Accepts any node: Badge, AvatarStack,\n * StatHero, ScoreIndicator, or plain text. */\n value: React.ReactNode\n /** Optional secondary text trailing the value (e.g. \"/ 100\", \"142 total\"). */\n hint?: React.ReactNode\n}\n\nexport interface KeyValueListProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n /** The label/value pairs to render. */\n items: KeyValueItem[]\n /** Grid column count. Collapses responsively on narrow viewports. */\n columns?: 1 | 2 | 3 | 4\n /** `stacked` = label above value (facts panel); `horizontal` = label beside\n * value (inspector). */\n orientation?: \"horizontal\" | \"stacked\"\n /** Row density. `editorial` is the admin-ui default. */\n density?: \"compact\" | \"default\" | \"editorial\"\n /** Root element. `dl` (default) renders semantic `<dl>`/`<dt>`/`<dd>`; `div`\n * opts out of definition-list semantics. */\n as?: \"dl\" | \"div\"\n}\n\n// ─── KeyValueList ─────────────────────────────────────────────────────────────\n\nconst KeyValueList = React.forwardRef<HTMLElement, KeyValueListProps>(\n (\n {\n items,\n columns = 1,\n orientation = \"stacked\",\n density = \"editorial\",\n as = \"dl\",\n className,\n ...props\n },\n ref\n ) => {\n const isDl = as === \"dl\"\n const Root = (isDl ? \"dl\" : \"div\") as React.ElementType\n const Term = (isDl ? \"dt\" :
|
|
3263
|
+
"content": "import * as React from \"react\"\nimport { cn } from \"../../../lib/utils\"\nimport styles from \"./key-value-list.module.css\"\n\n// ─── Types ──────────────────────────────────────────────────────────────────\n\nexport interface KeyValueItem {\n /** The term — rendered as `<dt>`. */\n label: React.ReactNode\n /** The value — rendered as `<dd>`. Accepts any node: Badge, AvatarStack,\n * StatHero, ScoreIndicator, or plain text. */\n value: React.ReactNode\n /** Optional secondary text trailing the value (e.g. \"/ 100\", \"142 total\"). */\n hint?: React.ReactNode\n}\n\nexport interface KeyValueListProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n /** The label/value pairs to render. */\n items: KeyValueItem[]\n /** Grid column count. Collapses responsively on narrow viewports. */\n columns?: 1 | 2 | 3 | 4\n /** `stacked` = label above value (facts panel); `horizontal` = label beside\n * value (inspector). */\n orientation?: \"horizontal\" | \"stacked\"\n /** Row density. `editorial` is the admin-ui default. */\n density?: \"compact\" | \"default\" | \"editorial\"\n /** Root element. `dl` (default) renders semantic `<dl>`/`<dt>`/`<dd>`; `div`\n * opts out of definition-list semantics; `span` renders spans throughout, so\n * the list fits inside phrasing content such as a `<button>` tile. */\n as?: \"dl\" | \"div\" | \"span\"\n /** `none` (default) draws no surface. `panel` draws the theme's card surface\n * and border, and turns to glass inside `data-glass=\"on\"`. */\n surface?: \"none\" | \"panel\"\n}\n\n// ─── KeyValueList ─────────────────────────────────────────────────────────────\n\nconst KeyValueList = React.forwardRef<HTMLElement, KeyValueListProps>(\n (\n {\n items,\n columns = 1,\n orientation = \"stacked\",\n density = \"editorial\",\n as = \"dl\",\n surface = \"none\",\n className,\n ...props\n },\n ref\n ) => {\n const isDl = as === \"dl\"\n const Root = (isDl ? \"dl\" : as) as React.ElementType\n const Item = (isDl ? \"div\" : as) as React.ElementType\n const Term = (isDl ? \"dt\" : as) as React.ElementType\n const Desc = (isDl ? \"dd\" : as) as React.ElementType\n\n return (\n <Root\n ref={ref}\n data-slot=\"key-value-list\"\n data-columns={columns}\n data-orientation={orientation}\n data-density={density}\n data-surface={surface === \"panel\" ? \"panel\" : undefined}\n className={cn(styles.root, className)}\n {...props}\n >\n {items.map((item, i) => (\n <Item key={i} data-slot=\"key-value-item\" className={styles.item}>\n <Term data-slot=\"key-value-label\" className={styles.label}>\n {item.label}\n </Term>\n <Desc data-slot=\"key-value-value\" className={styles.value}>\n {item.value}\n {item.hint != null ? (\n <span data-slot=\"key-value-hint\" className={styles.hint}>\n {item.hint}\n </span>\n ) : null}\n </Desc>\n </Item>\n ))}\n </Root>\n )\n }\n)\nKeyValueList.displayName = \"KeyValueList\"\n\nexport { KeyValueList }\n"
|
|
3240
3264
|
},
|
|
3241
3265
|
{
|
|
3242
3266
|
"path": "components/ui/key-value-list/key-value-list.module.css",
|
|
3243
3267
|
"type": "registry:ui",
|
|
3244
|
-
"content": "/* Key-value list — a definition-list display primitive for one record's\n attributes (the \"key facts\" panel). Label/value pairs in a responsive grid.\n Values accept any node: Badge, AvatarStack, StatHero, ScoreIndicator, text. */\n.root {\n display: grid;\n grid-template-columns: 1fr;\n margin: 0;\n}\n\n.root[data-columns=\"2\"] {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.root[data-columns=\"3\"] {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.root[data-columns=\"4\"] {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.item {\n min-width: 0;\n}\n\n/* Label — uppercase eyebrow. */\n.label {\n margin: 0;\n font-size: var(--font-size-xs, 0.6875rem);\n font-weight: var(--font-weight-medium, 500);\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: var(--text-tertiary, #6b7280);\n line-height: 1.4;\n}\n\n/* Value — primary text; resets the native <dd> indent. */\n.value {\n margin: 0;\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: var(--spacing-2, 0.5rem);\n min-width: 0;\n color: var(--text-primary, #111827);\n font-variant-numeric: tabular-nums;\n}\n\n/* Hint — secondary trailing text (\"/ 100\", \"142 total\"). */\n.hint {\n font-size: var(--font-size-sm, 0.8125rem);\n font-weight: var(--font-weight-normal, 400);\n color: var(--text-tertiary, #6b7280);\n}\n\n/* ── Orientation ──────────────────────────────────────────────── */\n/* Stacked (default) — label above value. */\n.root[data-orientation=\"stacked\"] .item {\n display: flex;\n flex-direction: column;\n}\n.root[data-orientation=\"stacked\"] .label {\n margin-bottom: var(--spacing-2, 0.5rem);\n}\n\n/* Horizontal — label beside value. */\n.root[data-orientation=\"horizontal\"] .item {\n display: grid;\n grid-template-columns: minmax(7rem, 0.4fr) 1fr;\n align-items: baseline;\n gap: var(--spacing-4, 1rem);\n}\n.root[data-orientation=\"horizontal\"] .label {\n letter-spacing: 0.06em;\n}\n\n/* ── Density ──────────────────────────────────────────────────── */\n.root[data-density=\"editorial\"] {\n column-gap: var(--spacing-8, 2rem);\n row-gap: var(--spacing-6, 1.5rem);\n}\n.root[data-density=\"editorial\"] .value {\n font-size: var(--font-size-lg, 1.125rem);\n}\n\n.root[data-density=\"default\"] {\n column-gap: var(--spacing-6, 1.5rem);\n row-gap: var(--spacing-4, 1rem);\n}\n.root[data-density=\"default\"] .value {\n font-size: var(--font-size-base, 1rem);\n}\n\n.root[data-density=\"compact\"] {\n column-gap: var(--spacing-4, 1rem);\n row-gap: var(--spacing-3, 0.75rem);\n}\n.root[data-density=\"compact\"] .value {\n font-size: var(--font-size-sm, 0.8125rem);\n}\n.root[data-density=\"compact\"][data-orientation=\"stacked\"] .label {\n margin-bottom: var(--spacing-1, 0.25rem);\n}\n\n/* ── Responsive collapse ──────────────────────────────────────── */\n@media (max-width: 900px) {\n .root[data-columns=\"3\"],\n .root[data-columns=\"4\"] {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@media (max-width: 560px) {\n .root[data-columns=\"2\"],\n .root[data-columns=\"3\"],\n .root[data-columns=\"4\"] {\n grid-template-columns: 1fr;\n }\n}\n"
|
|
3268
|
+
"content": "/* Key-value list — a definition-list display primitive for one record's\n attributes (the \"key facts\" panel). Label/value pairs in a responsive grid.\n Values accept any node: Badge, AvatarStack, StatHero, ScoreIndicator, text.\n Skin hooks (VI-800): --key-value-list-* each fall back to the value shipped\n before them, so an unbound theme renders as it did. Glass (VI-795): only\n surface=\"panel\" reads the glass layer, so a bare list inside a glass tile\n never draws a nested blur. */\n.root {\n display: grid;\n grid-template-columns: 1fr;\n margin: 0;\n}\n\n.root[data-columns=\"2\"] {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.root[data-columns=\"3\"] {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.root[data-columns=\"4\"] {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.item {\n min-width: 0;\n padding: var(--key-value-list-item-padding, 0);\n}\n\n/* The rule between rows, single-column lists only: a multi-column grid would\n draw it inside a row. */\n.root[data-columns=\"1\"] .item + .item {\n border-top: var(--key-value-list-divider, 0);\n}\n\n/* Label — uppercase eyebrow. */\n.label {\n margin: 0;\n padding-top: var(--key-value-list-label-padding-top, 0);\n font-size: var(--key-value-list-label-font-size, var(--font-size-xs, 0.6875rem));\n font-weight: var(--key-value-list-label-font-weight, var(--font-weight-medium, 500));\n letter-spacing: var(--key-value-list-label-letter-spacing, 0.12em);\n text-transform: var(--key-value-list-label-text-transform, uppercase);\n color: var(--key-value-list-label-color, var(--text-tertiary, #6b7280));\n line-height: var(--key-value-list-label-line-height, 1.4);\n}\n\n/* Value — primary text; resets the native <dd> indent. */\n.value {\n margin: 0;\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: var(--spacing-2, 0.5rem);\n min-width: 0;\n color: var(--key-value-list-value-color, var(--text-primary, #111827));\n font-weight: var(--key-value-list-value-font-weight, inherit);\n line-height: var(--key-value-list-value-line-height, inherit);\n text-wrap: var(--key-value-list-value-text-wrap, inherit);\n overflow-wrap: var(--key-value-list-value-overflow-wrap, inherit);\n font-variant-numeric: var(--key-value-list-value-font-variant-numeric, tabular-nums);\n}\n\n/* Hint — secondary trailing text (\"/ 100\", \"142 total\"). */\n.hint {\n font-size: var(--font-size-sm, 0.8125rem);\n font-weight: var(--font-weight-normal, 400);\n color: var(--text-tertiary, #6b7280);\n}\n\n/* ── Orientation ──────────────────────────────────────────────── */\n/* Stacked (default) — label above value. */\n.root[data-orientation=\"stacked\"] .item {\n display: flex;\n flex-direction: column;\n}\n.root[data-orientation=\"stacked\"] .label {\n margin-bottom: var(--spacing-2, 0.5rem);\n}\n\n/* Horizontal — label beside value. */\n.root[data-orientation=\"horizontal\"] .item {\n display: grid;\n grid-template-columns: var(--key-value-list-columns, minmax(7rem, 0.4fr) 1fr);\n align-items: var(--key-value-list-item-align, baseline);\n gap: var(--key-value-list-item-gap, var(--spacing-4, 1rem));\n}\n.root[data-orientation=\"horizontal\"] .label {\n letter-spacing: var(--key-value-list-label-letter-spacing, 0.06em);\n}\n\n/* ── Density ──────────────────────────────────────────────────── */\n.root[data-density=\"editorial\"] {\n column-gap: var(--spacing-8, 2rem);\n row-gap: var(--key-value-list-row-gap, var(--spacing-6, 1.5rem));\n}\n.root[data-density=\"editorial\"] .value {\n font-size: var(--key-value-list-value-font-size, var(--font-size-lg, 1.125rem));\n}\n\n.root[data-density=\"default\"] {\n column-gap: var(--spacing-6, 1.5rem);\n row-gap: var(--key-value-list-row-gap, var(--spacing-4, 1rem));\n}\n.root[data-density=\"default\"] .value {\n font-size: var(--key-value-list-value-font-size, var(--font-size-base, 1rem));\n}\n\n.root[data-density=\"compact\"] {\n column-gap: var(--spacing-4, 1rem);\n row-gap: var(--key-value-list-row-gap, var(--spacing-3, 0.75rem));\n}\n.root[data-density=\"compact\"] .value {\n font-size: var(--key-value-list-value-font-size, var(--font-size-sm, 0.8125rem));\n}\n.root[data-density=\"compact\"][data-orientation=\"stacked\"] .label {\n margin-bottom: var(--spacing-1, 0.25rem);\n}\n\n/* ── Panel surface ────────────────────────────────────────────── */\n/* Off glass: the theme's solid card surface and border, no blur. Under\n data-glass=\"on\": the glass layer's fill and lift, its blur, and a cleared\n border. The list holds no blurred children, so the panel carries its own\n blur. Prefixed line first, so Lightning CSS keeps both (VI-788). */\n.root[data-surface=\"panel\"] {\n padding: var(--key-value-list-panel-padding, var(--spacing-2, 0.5rem) var(--spacing-6, 1.5rem));\n border-radius: var(--key-value-list-panel-radius, var(--radius-lg, 0.5rem));\n border: var(--stroke-width-thin, 1px) solid\n var(--glass-on-clear, var(--key-value-list-panel-border-color, var(--border-default, #e5e7eb)));\n background: linear-gradient(var(--glass-on-lift, transparent) 0 0),\n var(--glass-on-fill, var(--key-value-list-panel-bg, var(--surface-card, #ffffff)));\n -webkit-backdrop-filter: var(--glass-on-blur, none);\n backdrop-filter: var(--glass-on-blur, none);\n}\n\n/* ── Responsive collapse ──────────────────────────────────────── */\n@media (max-width: 900px) {\n .root[data-columns=\"3\"],\n .root[data-columns=\"4\"] {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n@media (max-width: 560px) {\n .root[data-columns=\"2\"],\n .root[data-columns=\"3\"],\n .root[data-columns=\"4\"] {\n grid-template-columns: 1fr;\n }\n}\n"
|
|
3245
3269
|
}
|
|
3246
3270
|
]
|
|
3247
3271
|
},
|
|
@@ -3391,7 +3415,7 @@
|
|
|
3391
3415
|
{
|
|
3392
3416
|
"path": "components/ui/status-dot/status-dot.module.css",
|
|
3393
3417
|
"type": "registry:ui",
|
|
3394
|
-
"content": "/*\n * StatusDot — a 6×6px tone-tinted indicator dot.\n *\n * The dot mirrors StatusBadge's indicator CSS pattern (size, radius, fill\n * sourced from saturated surface tokens) but stands on its own as a\n * reusable primitive that composes inside Badge, ActivityFeed items, and\n * table status cells. Tone colors resolve from the same semantic tokens\n * StatusBadge uses for its leading indicator so the two read as one\n * coherent system across surfaces.\n */\n.dot {\n display: inline-block;\n width: 6px;\n height: 6px;\n flex-shrink: 0;\n border-radius: var(--radius-full, 9999px);\n}\n\n.dot[data-tone=\"mint\"] {\n background-color: var(--surface-success-default, #22c55e);\n}\n\n.dot[data-tone=\"warn\"] {\n background-color: var(--surface-warning-default, #f59e0b);\n}\n\n.dot[data-tone=\"muted\"] {\n background-color: var(--text-tertiary, #6b7280);\n}\n\n.dot[data-tone=\"danger\"] {\n background-color: var(--surface-error-default, #ef4444);\n}\n\n.dot[data-tone=\"info\"] {\n background-color: var(--surface-info-default, #0ea5e9);\n}\n"
|
|
3418
|
+
"content": "/*\n * StatusDot — a 6×6px tone-tinted indicator dot.\n *\n * The dot mirrors StatusBadge's indicator CSS pattern (size, radius, fill\n * sourced from saturated surface tokens) but stands on its own as a\n * reusable primitive that composes inside Badge, ActivityFeed items, and\n * table status cells. Tone colors resolve from the same semantic tokens\n * StatusBadge uses for its leading indicator so the two read as one\n * coherent system across surfaces.\n *\n * VI-801: a theme sets the size through the status-dot family. A caller sets\n * --status-dot-color on the dot (or a wrapper) for a colour outside the five\n * tones, such as a role colour; unset, each tone keeps its token.\n */\n.dot {\n display: inline-block;\n width: var(--status-dot-size, 6px);\n height: var(--status-dot-size, 6px);\n flex-shrink: 0;\n border-radius: var(--radius-full, 9999px);\n /* VI-801: a dot stays a circle when a theme draws squircle corners (VI-796). */\n --corner-shape: round;\n}\n\n.dot[data-tone=\"mint\"] {\n background-color: var(--status-dot-color, var(--surface-success-default, #22c55e));\n}\n\n.dot[data-tone=\"warn\"] {\n background-color: var(--status-dot-color, var(--surface-warning-default, #f59e0b));\n}\n\n.dot[data-tone=\"muted\"] {\n background-color: var(--status-dot-color, var(--text-tertiary, #6b7280));\n}\n\n.dot[data-tone=\"danger\"] {\n background-color: var(--status-dot-color, var(--surface-error-default, #ef4444));\n}\n\n.dot[data-tone=\"info\"] {\n background-color: var(--status-dot-color, var(--surface-info-default, #0ea5e9));\n}\n"
|
|
3395
3419
|
}
|
|
3396
3420
|
]
|
|
3397
3421
|
},
|
|
@@ -3436,7 +3460,7 @@
|
|
|
3436
3460
|
{
|
|
3437
3461
|
"path": "components/ui/theme-switcher/theme-switcher.module.css",
|
|
3438
3462
|
"type": "registry:ui",
|
|
3439
|
-
"content": ".root {\n position: fixed;\n bottom: var(--spacing-3, 0.75rem);\n right: var(--spacing-3, 0.75rem);\n z-index: 1000;\n\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n\n padding: var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border-radius: var(--radius-full, 9999px);\n background: var(--surface-popover, var(--surface-card, #111827));\n color: var(--text-secondary, #4b5563);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n\n font-family: var(--font-body, inherit);\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.04em;\n\n outline: var(--stroke-width-thin, 1px) solid color-mix(in srgb, var(--text-tertiary, #9ca3af) 30%, transparent);\n outline-offset: 0;\n box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n}\n\n.label {\n font-size: var(--font-size-xs, 0.75rem);\n text-transform: uppercase;\n letter-spacing: 0.12em;\n color: var(--text-tertiary, #9ca3af);\n font-weight: var(--font-weight-medium, 500);\n}\n\n.divider {\n display: inline-block;\n width: var(--stroke-width-thin, 1px);\n height: 14px;\n background: color-mix(in srgb, var(--text-tertiary, #9ca3af) 35%, transparent);\n}\n\n.segment {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n padding: calc(var(--spacing-1, 0.25rem) / 2);\n background: color-mix(in srgb, var(--text-tertiary, #9ca3af) 14%, transparent);\n border-radius: var(--radius-
|
|
3463
|
+
"content": ".root {\n position: fixed;\n bottom: var(--spacing-3, 0.75rem);\n right: var(--spacing-3, 0.75rem);\n z-index: 1000;\n\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-2, 0.5rem);\n\n /* The end segment sits as far from the edge as from the top, so it nests concentric (VI-838). */\n padding: var(--spacing-1, 0.25rem) var(--spacing-1, 0.25rem) var(--spacing-1, 0.25rem) var(--spacing-2, 0.5rem);\n border-radius: var(--radius-full, 9999px);\n background: var(--surface-popover, var(--surface-card, #111827));\n color: var(--text-secondary, #4b5563);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n\n font-family: var(--font-body, inherit);\n font-size: var(--font-size-xs, 0.75rem);\n letter-spacing: 0.04em;\n\n outline: var(--stroke-width-thin, 1px) solid color-mix(in srgb, var(--text-tertiary, #9ca3af) 30%, transparent);\n outline-offset: 0;\n box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n}\n\n.label {\n font-size: var(--font-size-xs, 0.75rem);\n text-transform: uppercase;\n letter-spacing: 0.12em;\n color: var(--text-tertiary, #9ca3af);\n font-weight: var(--font-weight-medium, 500);\n}\n\n.divider {\n display: inline-block;\n width: var(--stroke-width-thin, 1px);\n height: 14px;\n background: color-mix(in srgb, var(--text-tertiary, #9ca3af) 35%, transparent);\n}\n\n.segment {\n display: inline-flex;\n align-items: center;\n gap: calc(var(--spacing-1, 0.25rem) / 2);\n --_track-radius: var(--radius-full, 9999px);\n --_track-padding: calc(var(--spacing-1, 0.25rem) / 2);\n padding: var(--_track-padding);\n background: color-mix(in srgb, var(--text-tertiary, #9ca3af) 14%, transparent);\n border-radius: var(--_track-radius);\n /* Concentric options (VI-837): the track radius minus its padding. */\n --_inner-radius: max(0px, calc(var(--_track-radius) - var(--_track-padding)));\n}\n\n.option {\n appearance: none;\n background: transparent;\n border: 0;\n padding: calc(var(--spacing-1, 0.25rem) * 0.75) var(--spacing-2, 0.5rem);\n border-radius: var(--_inner-radius);\n font-size: var(--font-size-xs, 0.75rem);\n font-weight: var(--font-weight-medium, 500);\n color: var(--text-secondary, #4b5563);\n cursor: pointer;\n letter-spacing: 0.02em;\n transition: background-color var(--motion-duration-100, 100ms) var(--motion-easing-default, ease-in-out),\n color var(--motion-duration-100, 100ms) var(--motion-easing-default, ease-in-out);\n}\n\n.option:hover {\n color: var(--text-primary, #111827);\n}\n\n.option[data-active=\"true\"] {\n background: var(--surface-card, #ffffff);\n color: var(--text-primary, #111827);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-tertiary, #9ca3af) 25%, transparent);\n}\n\n.option:focus-visible {\n outline: var(--focus-ring-width, 2px) solid var(--border-focus, currentColor);\n outline-offset: var(--focus-ring-offset, 2px);\n}\n"
|
|
3440
3464
|
}
|
|
3441
3465
|
]
|
|
3442
3466
|
},
|
|
@@ -5637,7 +5661,7 @@
|
|
|
5637
5661
|
{
|
|
5638
5662
|
"path": "components/devtools/source-inspector/visor-component-names.generated.ts",
|
|
5639
5663
|
"type": "registry:devtool",
|
|
5640
|
-
"content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"ArrowSwap\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BillingSlider\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"KanbanBoard\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"LayerChart\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"Meter\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PhotoPicker\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"ProportionBar\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"RecordSection\",\n \"ResizableSplit\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"SpanStrip\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThemeToggle\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
|
|
5664
|
+
"content": "// THIS FILE IS GENERATED BY scripts/generate-visor-component-names.ts.\n// Do not edit by hand. Re-run `npm run generate:component-names` after\n// adding, removing, or renaming a Visor component.\n//\n// Source of truth: registry/registry-{ui,blocks,deck,visual,devtools}.ts\n// Used by: components/devtools/source-inspector/* (VI-311)\n\nexport const VISOR_COMPONENT_NAMES: ReadonlySet<string> = new Set([\n \"AccessibilitySection\",\n \"AccessibilitySlide\",\n \"AccessibilitySpecimen\",\n \"Accordion\",\n \"AccordionContent\",\n \"AccordionItem\",\n \"AccordionTrigger\",\n \"ActionRow\",\n \"ActionRowList\",\n \"ActivityFeed\",\n \"ActivityFeedContext\",\n \"ActivityFeedItem\",\n \"ActivityFeedRoot\",\n \"AdminDashboard\",\n \"AdminDetail\",\n \"AdminDetailDrawer\",\n \"AdminListPage\",\n \"AdminListPageInner\",\n \"AdminSettingsPage\",\n \"AdminShell\",\n \"AdminTabbedEditor\",\n \"AdminWizard\",\n \"Alert\",\n \"AlertActions\",\n \"AlertDescription\",\n \"AlertLead\",\n \"AlertTitle\",\n \"AmbientGlow\",\n \"ArrowSwap\",\n \"Avatar\",\n \"AvatarFallback\",\n \"AvatarImage\",\n \"AvatarStack\",\n \"Badge\",\n \"Banner\",\n \"BannerAction\",\n \"BannerDescription\",\n \"BannerTitle\",\n \"BentoGrid\",\n \"BentoTile\",\n \"BentoTileBody\",\n \"BentoTileDescription\",\n \"BentoTileFigure\",\n \"BentoTileHeadline\",\n \"BentoTileMedia\",\n \"BentoTileMeta\",\n \"BentoTileTitle\",\n \"BillingSlider\",\n \"BottomNav\",\n \"Box\",\n \"Breadcrumb\",\n \"BreadcrumbEllipsis\",\n \"BreadcrumbItem\",\n \"BreadcrumbLink\",\n \"BreadcrumbList\",\n \"BreadcrumbPage\",\n \"BreadcrumbSeparator\",\n \"BrowserFrame\",\n \"BulkActionBar\",\n \"Button\",\n \"ButtonSpecimenSection\",\n \"ButtonSpecimenSlide\",\n \"Calendar\",\n \"Capture\",\n \"Card\",\n \"CardContent\",\n \"CardDescription\",\n \"CardFooter\",\n \"CardGrid\",\n \"CardHeader\",\n \"CardIndicatorContext\",\n \"CardLift\",\n \"CardTitle\",\n \"Carousel\",\n \"CarouselContent\",\n \"CarouselContext\",\n \"CarouselGallery\",\n \"CarouselItem\",\n \"CarouselNext\",\n \"CarouselPrevious\",\n \"ChallengeCard\",\n \"ChallengeCardAction\",\n \"ChallengeCardActions\",\n \"ChallengeCardBody\",\n \"ChallengeCardGate\",\n \"ChallengeCardHeader\",\n \"ChartContainer\",\n \"ChartContext\",\n \"ChartLegend\",\n \"ChartLegendContent\",\n \"ChartStyle\",\n \"ChartTooltip\",\n \"ChartTooltipContent\",\n \"Checkbox\",\n \"CheckGroup\",\n \"CheckRow\",\n \"Chip\",\n \"ChipGroup\",\n \"ChipGroupContext\",\n \"ChipGroupItem\",\n \"ChoiceChip\",\n \"ChromeButton\",\n \"ClosingSlide\",\n \"CodeBlock\",\n \"Collapsible\",\n \"CollapsibleContent\",\n \"CollapsibleTrigger\",\n \"ColorBar\",\n \"ColorPaletteSection\",\n \"ColorPicker\",\n \"ColorPickerSurface\",\n \"ColorSwatch\",\n \"ColorSwatchGrid\",\n \"Column\",\n \"Combobox\",\n \"ComboboxContent\",\n \"ComboboxContext\",\n \"ComboboxEmpty\",\n \"ComboboxGroup\",\n \"ComboboxInput\",\n \"ComboboxItem\",\n \"ComboboxSeparator\",\n \"Command\",\n \"CommandDialog\",\n \"CommandEmpty\",\n \"CommandGroup\",\n \"CommandInput\",\n \"CommandItem\",\n \"CommandList\",\n \"CommandLoading\",\n \"CommandSeparator\",\n \"CommandShortcut\",\n \"ComponentShowcaseContent\",\n \"ComponentShowcaseSection\",\n \"ComponentShowcaseSlide\",\n \"Composer\",\n \"ComposerContext\",\n \"ComposerField\",\n \"ComposerSend\",\n \"ComposerSpacer\",\n \"ComposerToolbar\",\n \"ComposerToolButton\",\n \"ConceptSlide\",\n \"ConfigurationPanel\",\n \"ConfirmDialog\",\n \"ConflictBanner\",\n \"Container\",\n \"ContextMenu\",\n \"ContextMenuCheckboxItem\",\n \"ContextMenuContent\",\n \"ContextMenuGroup\",\n \"ContextMenuItem\",\n \"ContextMenuLabel\",\n \"ContextMenuPortal\",\n \"ContextMenuRadioGroup\",\n \"ContextMenuRadioItem\",\n \"ContextMenuSeparator\",\n \"ContextMenuShortcut\",\n \"ContextMenuSub\",\n \"ContextMenuSubContent\",\n \"ContextMenuSubTrigger\",\n \"ContextMenuTrigger\",\n \"Controls\",\n \"CtaSection\",\n \"DataTable\",\n \"DataTableInner\",\n \"DatePicker\",\n \"DateRangePicker\",\n \"DeckContext\",\n \"DeckFooter\",\n \"DeckLayout\",\n \"DeckProvider\",\n \"DeckRenderer\",\n \"DesignSystemDeck\",\n \"DesignSystemSpecimen\",\n \"Dialog\",\n \"DialogBack\",\n \"DialogClose\",\n \"DialogContent\",\n \"DialogContext\",\n \"DialogDescription\",\n \"DialogField\",\n \"DialogFieldControl\",\n \"DialogFieldLabel\",\n \"DialogFooter\",\n \"DialogForm\",\n \"DialogFormBody\",\n \"DialogFormClose\",\n \"DialogFormContent\",\n \"DialogFormDescription\",\n \"DialogFormFooter\",\n \"DialogFormHeader\",\n \"DialogFormTitle\",\n \"DialogFormTrigger\",\n \"DialogHeader\",\n \"DialogOverlay\",\n \"DialogPortal\",\n \"DialogScrim\",\n \"DialogTitle\",\n \"DialogTrigger\",\n \"DocFrame\",\n \"DocFrameBrand\",\n \"DocNav\",\n \"DocNavGroup\",\n \"DocNavPill\",\n \"DotNav\",\n \"DropdownMenu\",\n \"DropdownMenuCheckboxItem\",\n \"DropdownMenuContent\",\n \"DropdownMenuGroup\",\n \"DropdownMenuItem\",\n \"DropdownMenuLabel\",\n \"DropdownMenuPortal\",\n \"DropdownMenuRadioGroup\",\n \"DropdownMenuRadioItem\",\n \"DropdownMenuSeparator\",\n \"DropdownMenuShortcut\",\n \"DropdownMenuSub\",\n \"DropdownMenuSubContent\",\n \"DropdownMenuSubTrigger\",\n \"DropdownMenuTrigger\",\n \"EditableBlock\",\n \"ElevationCard\",\n \"ElevationSlide\",\n \"EmptyState\",\n \"ErrorPlacard\",\n \"ExportMenu\",\n \"FeaturesGrid\",\n \"FidelityMirror\",\n \"Field\",\n \"FieldDescription\",\n \"FieldError\",\n \"FieldLabel\",\n \"Fieldset\",\n \"FieldsetLegend\",\n \"FileUpload\",\n \"FilterBar\",\n \"FilterChip\",\n \"FontShowcase\",\n \"FontShowcaseGrid\",\n \"Footer\",\n \"FooterSection\",\n \"Form\",\n \"FormError\",\n \"FormErrorDescription\",\n \"FormErrorTitle\",\n \"FormField\",\n \"FormSpecimenSection\",\n \"FormSpecimenSlide\",\n \"FullscreenOverlay\",\n \"FullscreenOverlayContent\",\n \"FullscreenOverlayTrigger\",\n \"GrainOverlay\",\n \"Grid\",\n \"Header\",\n \"Heading\",\n \"HeroGlow\",\n \"HeroSection\",\n \"HeroSlide\",\n \"HoverCard\",\n \"HoverCardContent\",\n \"HoverCardTrigger\",\n \"IconGrid\",\n \"IconGridSection\",\n \"IconSizeRow\",\n \"IconsSlide\",\n \"Image\",\n \"InfographicBar\",\n \"Inline\",\n \"InlineEdit\",\n \"Input\",\n \"KanbanBoard\",\n \"Kbd\",\n \"KeyValueList\",\n \"Label\",\n \"Landing\",\n \"LayerChart\",\n \"Lightbox\",\n \"LightboxContent\",\n \"LightboxContext\",\n \"LightboxTrigger\",\n \"LoginForm\",\n \"Marquee\",\n \"MarqueeBandRenderer\",\n \"MatrixCell\",\n \"MatrixTable\",\n \"MatrixTableInner\",\n \"Menubar\",\n \"MenubarCheckboxItem\",\n \"MenubarContent\",\n \"MenubarGroup\",\n \"MenubarItem\",\n \"MenubarLabel\",\n \"MenubarMenu\",\n \"MenubarRadioGroup\",\n \"MenubarRadioItem\",\n \"MenubarSeparator\",\n \"MenubarShortcut\",\n \"MenubarSub\",\n \"MenubarSubContent\",\n \"MenubarSubTrigger\",\n \"MenubarTrigger\",\n \"Meter\",\n \"MonthCalendar\",\n \"MotionDuration\",\n \"MotionDurationSection\",\n \"MotionEasing\",\n \"MotionEasingSection\",\n \"MotionSlide\",\n \"NameRoster\",\n \"NameRosterItem\",\n \"Navbar\",\n \"NavbarBrand\",\n \"NavbarContent\",\n \"NavbarItem\",\n \"NavbarLink\",\n \"NavbarToggle\",\n \"NumberInput\",\n \"OfflineBanner\",\n \"OpacityBar\",\n \"OpacitySlide\",\n \"OTPInput\",\n \"PageHeader\",\n \"Pagination\",\n \"PaginationContent\",\n \"PaginationEllipsis\",\n \"PaginationItem\",\n \"PaginationLink\",\n \"PaginationNext\",\n \"PaginationPrevious\",\n \"PasswordInput\",\n \"PhoneInput\",\n \"PhotoPicker\",\n \"PlatformChip\",\n \"Popover\",\n \"PopoverAnchor\",\n \"PopoverContent\",\n \"PopoverFooter\",\n \"PopoverSelectionItem\",\n \"PopoverSelectionLabel\",\n \"PopoverSelectionList\",\n \"PopoverTrigger\",\n \"PositionPicker\",\n \"PricingSection\",\n \"ProfileMenu\",\n \"Progress\",\n \"ProportionBar\",\n \"PrototypeReview\",\n \"QuickActions\",\n \"RadioGroup\",\n \"RadioGroupItem\",\n \"RadioGroupVariantContext\",\n \"RadiusScale\",\n \"RadiusSection\",\n \"RadiusSlide\",\n \"ReachRings\",\n \"RecordSection\",\n \"ResizableSplit\",\n \"RightRailList\",\n \"SaveStatus\",\n \"ScoreIndicator\",\n \"ScrollArea\",\n \"ScrollBar\",\n \"SearchInput\",\n \"SectionHeader\",\n \"SectionIntro\",\n \"SectionNav\",\n \"SectionNavItem\",\n \"SegmentedControl\",\n \"SegmentedProgress\",\n \"Select\",\n \"SelectContent\",\n \"SelectGroup\",\n \"SelectionListContext\",\n \"SelectItem\",\n \"SelectLabel\",\n \"SelectScrollDownButton\",\n \"SelectScrollUpButton\",\n \"SelectSeparator\",\n \"SelectTrigger\",\n \"SelectValue\",\n \"SemanticColorGrid\",\n \"SemanticColorItem\",\n \"SemanticTokensSlide\",\n \"SensitivePanel\",\n \"Separator\",\n \"SessionTimeout\",\n \"ShadowSection\",\n \"Sheet\",\n \"SheetClose\",\n \"SheetContent\",\n \"SheetContext\",\n \"SheetDescription\",\n \"SheetFooter\",\n \"SheetHeader\",\n \"SheetOverlay\",\n \"SheetPortal\",\n \"SheetScrim\",\n \"SheetTitle\",\n \"SheetTrigger\",\n \"Sidebar\",\n \"SidebarContent\",\n \"SidebarContext\",\n \"SidebarFooter\",\n \"SidebarGroup\",\n \"SidebarGroupAction\",\n \"SidebarGroupContent\",\n \"SidebarGroupLabel\",\n \"SidebarHeader\",\n \"SidebarInset\",\n \"SidebarMenu\",\n \"SidebarMenuAction\",\n \"SidebarMenuBadge\",\n \"SidebarMenuButton\",\n \"SidebarMenuItem\",\n \"SidebarMenuSub\",\n \"SidebarMenuSubButton\",\n \"SidebarMenuSubItem\",\n \"SidebarProvider\",\n \"SidebarRail\",\n \"SidebarScopeContext\",\n \"SidebarSeparator\",\n \"SidebarTrigger\",\n \"Skeleton\",\n \"SkeletonDetail\",\n \"SkeletonList\",\n \"SkeletonTable\",\n \"Slide\",\n \"SlideHeader\",\n \"Slider\",\n \"SliderControl\",\n \"SlideThemeContext\",\n \"SlideThemeProvider\",\n \"SlowNetworkBar\",\n \"SourceInspector\",\n \"SourceInspectorContext\",\n \"SourceInspectorDevImpl\",\n \"SourceInspectorProvider\",\n \"SourceInspectorRunner\",\n \"SourceInspectorToggle\",\n \"SpacingScale\",\n \"SpacingSection\",\n \"SpacingSlide\",\n \"SpanStrip\",\n \"Sparkline\",\n \"SpecimenCard\",\n \"SpecimenCardFooter\",\n \"Sphere\",\n \"SpherePlayground\",\n \"Spinner\",\n \"SpinnerOrb\",\n \"Stack\",\n \"Stage\",\n \"StatCard\",\n \"StatHero\",\n \"StationSpectrum\",\n \"StatusBadge\",\n \"StatusColorsSlide\",\n \"StatusDot\",\n \"Stepper\",\n \"StepperContext\",\n \"StepperDescription\",\n \"StepperItem\",\n \"StepperSeparator\",\n \"StepperTitle\",\n \"StepperTrigger\",\n \"StepsSection\",\n \"StructuredPrompt\",\n \"StructuredPromptBody\",\n \"StructuredPromptHeader\",\n \"StructuredPromptHint\",\n \"StructuredPromptSlot\",\n \"SuccessLiveRegion\",\n \"SuccessPanel\",\n \"SurfaceRow\",\n \"SurfaceScaleStack\",\n \"SurfaceSection\",\n \"Switch\",\n \"Table\",\n \"TableBody\",\n \"TableCaption\",\n \"TableCell\",\n \"TableFooter\",\n \"TableHead\",\n \"TableHeader\",\n \"TableRow\",\n \"Tabs\",\n \"TabsContent\",\n \"TabsList\",\n \"TabsTrigger\",\n \"TagInput\",\n \"TestimonialAttribution\",\n \"TestimonialSection\",\n \"Text\",\n \"Textarea\",\n \"ThemeArchitectureSlide\",\n \"ThemeColorsSlide\",\n \"ThemeSwitcher\",\n \"ThemeToggle\",\n \"ThinkingOrb\",\n \"Timeline\",\n \"TimelineContent\",\n \"TimelineDescription\",\n \"TimelineIcon\",\n \"TimelineItem\",\n \"TimelineTimestamp\",\n \"TimelineTitle\",\n \"TimePicker\",\n \"TinInput\",\n \"TitleSlide\",\n \"ToastCard\",\n \"ToastCardStack\",\n \"Toaster\",\n \"TOCSlide\",\n \"ToggleButton\",\n \"ToggleDevImpl\",\n \"ToggleGroup\",\n \"ToggleGroupContext\",\n \"ToggleGroupItem\",\n \"Tooltip\",\n \"TooltipContent\",\n \"TooltipProvider\",\n \"TooltipTrigger\",\n \"TypeBodySlide\",\n \"TypeDisplaySlide\",\n \"TypeScaleStack\",\n \"TypeSpecimen\",\n \"TypographySection\",\n \"Vignette\",\n \"WorkspaceSwitcher\",\n])\n"
|
|
5641
5665
|
}
|
|
5642
5666
|
]
|
|
5643
5667
|
},
|