@epilot/zenith-react 0.1.0-next.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +95 -15
  2. package/dist/components/appearance-boundary/appearance-boundary.js +32 -34
  3. package/dist/components/appearance-boundary/appearance-boundary.js.map +1 -1
  4. package/dist/components/badge/badge.js +1 -1
  5. package/dist/components/badge/badge.js.map +1 -1
  6. package/dist/components/breadcrumb/breadcrumb.js +10 -10
  7. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  8. package/dist/components/button/button.js +28 -28
  9. package/dist/components/button/button.js.map +1 -1
  10. package/dist/components/button-group/button-group.js.map +1 -1
  11. package/dist/components/callout/callout.js +13 -13
  12. package/dist/components/callout/callout.js.map +1 -1
  13. package/dist/components/card/card.js.map +1 -1
  14. package/dist/components/checkbox/checkbox.js +13 -13
  15. package/dist/components/checkbox/checkbox.js.map +1 -1
  16. package/dist/components/code-block/code-block.js +6 -6
  17. package/dist/components/code-block/code-block.js.map +1 -1
  18. package/dist/components/code-editor/code-editor.js +1 -1
  19. package/dist/components/code-editor/code-editor.js.map +1 -1
  20. package/dist/components/code-editor/indent.js.map +1 -1
  21. package/dist/components/command/command.js +7 -13
  22. package/dist/components/command/command.js.map +1 -1
  23. package/dist/components/data-table/data-table-body.js +120 -66
  24. package/dist/components/data-table/data-table-body.js.map +1 -1
  25. package/dist/components/data-table/data-table-column-header.js +7 -7
  26. package/dist/components/data-table/data-table-column-header.js.map +1 -1
  27. package/dist/components/data-table/data-table-column-order.js +277 -0
  28. package/dist/components/data-table/data-table-column-order.js.map +1 -0
  29. package/dist/components/data-table/data-table-content.js +72 -58
  30. package/dist/components/data-table/data-table-content.js.map +1 -1
  31. package/dist/components/data-table/data-table-context.js +8 -4
  32. package/dist/components/data-table/data-table-context.js.map +1 -1
  33. package/dist/components/data-table/data-table-footer.js +31 -0
  34. package/dist/components/data-table/data-table-footer.js.map +1 -0
  35. package/dist/components/data-table/data-table-header-draggable.js +151 -0
  36. package/dist/components/data-table/data-table-header-draggable.js.map +1 -0
  37. package/dist/components/data-table/data-table-header.js +130 -57
  38. package/dist/components/data-table/data-table-header.js.map +1 -1
  39. package/dist/components/data-table/data-table-resize-handle.js +137 -0
  40. package/dist/components/data-table/data-table-resize-handle.js.map +1 -0
  41. package/dist/components/data-table/data-table.js +184 -156
  42. package/dist/components/data-table/data-table.js.map +1 -1
  43. package/dist/components/data-table/hooks/use-data-table-virtualizer.js +9 -0
  44. package/dist/components/data-table/hooks/use-data-table-virtualizer.js.map +1 -0
  45. package/dist/components/date-range-picker/date-range-picker.js +197 -195
  46. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  47. package/dist/components/date-time-picker/calendar.js +29 -29
  48. package/dist/components/date-time-picker/calendar.js.map +1 -1
  49. package/dist/components/date-time-picker/time-picker.js +55 -55
  50. package/dist/components/date-time-picker/time-picker.js.map +1 -1
  51. package/dist/components/density-provider/density-provider.js.map +1 -1
  52. package/dist/components/dialog/dialog.js +1 -1
  53. package/dist/components/dialog/dialog.js.map +1 -1
  54. package/dist/components/drawer/drawer.js +5 -5
  55. package/dist/components/drawer/drawer.js.map +1 -1
  56. package/dist/components/dropdown-menu/dropdown-menu.js +36 -36
  57. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  58. package/dist/components/field/field-combobox.js +4 -4
  59. package/dist/components/field/field-combobox.js.map +1 -1
  60. package/dist/components/field/field.js +40 -40
  61. package/dist/components/field/field.js.map +1 -1
  62. package/dist/components/label/label.js +0 -28
  63. package/dist/components/label/label.js.map +1 -1
  64. package/dist/components/list/list.js +42 -52
  65. package/dist/components/list/list.js.map +1 -1
  66. package/dist/components/option-card/option-card.js +27 -25
  67. package/dist/components/option-card/option-card.js.map +1 -1
  68. package/dist/components/pill/pill.js +9 -9
  69. package/dist/components/pill/pill.js.map +1 -1
  70. package/dist/components/radio/radio.js +14 -14
  71. package/dist/components/radio/radio.js.map +1 -1
  72. package/dist/components/scroll-area/scroll-area.js +9 -9
  73. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  74. package/dist/components/segmented-control/segmented-control.js +1 -1
  75. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  76. package/dist/components/select/select.js +11 -11
  77. package/dist/components/select/select.js.map +1 -1
  78. package/dist/components/separator/separator.js.map +1 -1
  79. package/dist/components/skeleton/skeleton.js.map +1 -1
  80. package/dist/components/slot/compose-as-child.js.map +1 -1
  81. package/dist/components/spinner/spinner.js.map +1 -1
  82. package/dist/components/switch/switch.js +11 -11
  83. package/dist/components/switch/switch.js.map +1 -1
  84. package/dist/components/table/table-pagination.js +1 -1
  85. package/dist/components/table/table-pagination.js.map +1 -1
  86. package/dist/components/table/table.js +15 -15
  87. package/dist/components/table/table.js.map +1 -1
  88. package/dist/components/text/text.js +10 -1
  89. package/dist/components/text/text.js.map +1 -1
  90. package/dist/components/toast/toast.js +30 -32
  91. package/dist/components/toast/toast.js.map +1 -1
  92. package/dist/components/toggle/toggle.js +20 -20
  93. package/dist/components/toggle/toggle.js.map +1 -1
  94. package/dist/delivery/index.d.ts +10 -44
  95. package/dist/delivery/index.js +5 -9
  96. package/dist/index.d.ts +1994 -2272
  97. package/dist/index.js +133 -121
  98. package/dist/index.js.map +1 -1
  99. package/dist/lib/clear-button.js.map +1 -1
  100. package/dist/lib/code-highlight.js.map +1 -1
  101. package/dist/lib/code-tokens.js.map +1 -1
  102. package/dist/lib/pagination.js.map +1 -1
  103. package/dist/packages/tokens/dist/delivery/index.js +18 -48
  104. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  105. package/dist/packages/tokens/dist/generated/core.generated.js +18 -0
  106. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -0
  107. package/dist/packages/tokens/dist/generated/palette.generated.js +5 -5
  108. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  109. package/dist/packages/tokens/dist/install.js +9 -9
  110. package/dist/packages/tokens/dist/install.js.map +1 -1
  111. package/dist/styles/document-context.js.map +1 -1
  112. package/dist/styles/make-styles.js.map +1 -1
  113. package/dist/tokens/core.meta.generated.js +2 -2
  114. package/dist/tokens/core.meta.generated.js.map +1 -1
  115. package/dist/tokens/index.d.ts +1029 -1104
  116. package/dist/tokens/index.js +1031 -1106
  117. package/dist/tokens/index.js.map +1 -1
  118. package/dist/tokens/palette.generated.js +2 -2
  119. package/dist/tokens/palette.generated.js.map +1 -1
  120. package/dist/tokens/use-palette-tokens.js.map +1 -1
  121. package/dist/tokens.json +605 -755
  122. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js +385 -340
  123. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js.map +1 -1
  124. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js +344 -229
  125. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -1
  126. package/dist/vendor/.bun/@dnd-kit_utilities@3.2.2_62547eec5a2188e3/vendor/@dnd-kit/utilities/dist/utilities.esm.js +1 -1
  127. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js +36 -0
  128. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js.map +1 -0
  129. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js +450 -0
  130. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js.map +1 -0
  131. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js +50 -0
  132. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js.map +1 -0
  133. package/package.json +5 -4
  134. package/scripts/migration-diagnostics-core.mjs +19 -90
  135. package/scripts/migration-diagnostics.mjs +1 -16
  136. package/scripts/migration-sweep.mjs +2 -12
  137. package/ADOPTING.md +0 -73
  138. package/dist/packages/tokens/dist/delivery/internal.js +0 -181
  139. package/dist/packages/tokens/dist/delivery/internal.js.map +0 -1
  140. package/dist/packages/tokens/dist/generated/core.meta.generated.js +0 -10
  141. package/dist/packages/tokens/dist/generated/core.meta.generated.js.map +0 -1
  142. package/dist/token-assets/core/5cd4072decf5df2a664f0b1d5f2ec250a3309101ded3056c1f87c8bbe3738d50.css +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"field-combobox.js","sources":["../../../src/components/field/field-combobox.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandLoading,\n CommandSeparator,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandInputProps,\n type CommandItemProps,\n type CommandListProps,\n type CommandLoadingProps,\n type CommandSeparatorProps,\n} from \"../command/command\"\nimport { Label, type LabelProps } from \"../label/label\"\nimport {\n Popover,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n type PopoverContentProps,\n type PopoverPortalProps,\n type PopoverProps,\n type PopoverTriggerProps,\n} from \"../popover/popover\"\nimport { useOptionalFieldContext } from \"./field\"\n\nconst CheckIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z\" />\n </svg>\n)\n\nconst ChevronDownIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z\" />\n </svg>\n)\n\nconst XIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z\" />\n </svg>\n)\n\nconst useStyles = makeZenithStyles({\n trigger: {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusLg),\n backgroundColor: \"transparent\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n whiteSpace: \"nowrap\",\n outlineStyle: \"none\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.semFocusRing,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n triggerChevron: {\n width: \"1.5rem\",\n height: \"1.5rem\",\n flexShrink: 0,\n transitionProperty: \"transform\",\n transitionDuration: \"150ms\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n color: tokens.grayA11,\n \"&[data-popup-open], &[data-open]\": {\n transform: \"rotate(180deg)\",\n },\n },\n value: {\n color: tokens.grayA12,\n width: \"100%\",\n textAlign: \"left\",\n flexWrap: \"wrap\",\n display: \"flex\",\n ...shorthands.gap(tokens.spacingElement2),\n position: \"relative\",\n whiteSpace: \"normal\",\n marginRight: \"1.25rem\",\n },\n content: {\n ...shorthands.padding(0),\n },\n command: {\n width: \"100%\",\n ...shorthands.borderRadius(0),\n },\n input: {\n width: \"100%\",\n },\n list: {\n ...shorthands.padding(tokens.spacingElement2),\n },\n item: {\n paddingLeft: tokens.spacingGroup1,\n paddingRight: \"2rem\",\n paddingTop: \"0.375rem\",\n paddingBottom: \"0.375rem\",\n color: tokens.grayA12,\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n cursor: \"default\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusMd),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n outlineStyle: \"none\",\n userSelect: \"none\",\n },\n itemCheckIcon: {\n position: \"absolute\",\n right: tokens.spacingElement2,\n display: \"flex\",\n width: \"1rem\",\n height: \"1rem\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n checkSvg: {\n width: \"1rem\",\n height: \"1rem\",\n color: tokens.grayA12,\n },\n empty: {\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n textAlign: \"center\",\n color: tokens.grayA12,\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n },\n group: {\n ...shorthands.padding(0),\n },\n groupLabel: {\n color: tokens.grayA11,\n fontWeight: tokens.fontWeightSemibold,\n paddingLeft: tokens.spacingElement2,\n paddingRight: tokens.spacingElement2,\n paddingTop: tokens.spacingElement2,\n paddingBottom: tokens.spacingElement2,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n },\n separator: {\n backgroundColor: tokens.semGraySoft,\n pointerEvents: \"none\",\n marginLeft: `calc(-1 * ${tokens.spacingElement1})`,\n marginRight: `calc(-1 * ${tokens.spacingElement1})`,\n marginTop: tokens.spacingElement2,\n marginBottom: tokens.spacingElement2,\n height: \"1px\",\n },\n loading: {\n color: tokens.grayA11,\n paddingLeft: tokens.spacingGroup1,\n paddingRight: tokens.spacingGroup1,\n paddingTop: tokens.spacingElement2,\n paddingBottom: tokens.spacingElement2,\n },\n clear: {\n position: \"absolute\",\n right: \"2.75rem\",\n cursor: \"pointer\",\n minHeight: \"auto\",\n ...shorthands.padding(\"0.125rem\"),\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.borderRadius(\"9999px\"),\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n color: tokens.accentA11,\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.semFocusRing,\n },\n },\n clearSvg: {\n width: \"1.25rem\",\n height: \"1.25rem\",\n },\n clearValue: {\n cursor: \"pointer\",\n \":hover\": {\n opacity: 0.7,\n },\n color: \"currentColor\",\n ...shorthands.borderRadius(\"9999px\"),\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n clearValueSvg: {\n width: \"1rem\",\n height: \"1rem\",\n color: \"currentColor\",\n },\n placeholder: {\n color: tokens.grayA8,\n },\n})\n\nexport type FieldComboboxProps = PopoverProps\n\nexport const FieldCombobox = React.forwardRef<HTMLElement, FieldComboboxProps>(\n function FieldCombobox(props, _ref) {\n return (\n <Popover\n data-slot=\"combobox\"\n {...{ [SLOT_ATTR]: \"combobox\" }}\n {...props}\n />\n )\n }\n)\n\nexport type FieldComboboxTriggerProps = PopoverTriggerProps\n\nexport const FieldComboboxTrigger = React.forwardRef<\n HTMLButtonElement,\n FieldComboboxTriggerProps\n>(function FieldComboboxTrigger(\n { className, children, ...props },\n forwardedRef\n) {\n const styles = useStyles()\n // Optional on purpose: this part is valid standalone and only picks up field wiring\n // when nested inside one. See useOptionalFieldContext.\n const inputRef = useOptionalFieldContext()?.inputRef ?? null\n\n const handleRef = (el: HTMLButtonElement | null) => {\n if (inputRef) {\n inputRef.current = el\n }\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }\n\n return (\n <PopoverTrigger\n ref={handleRef}\n data-slot=\"select-trigger\"\n {...{ [SLOT_ATTR]: \"select-trigger\" }}\n className={mergeClasses(styles.trigger, className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className={styles.triggerChevron} />\n </PopoverTrigger>\n )\n})\n\nexport type FieldComboboxContentProps = PopoverContentProps & {\n container?: PopoverPortalProps[\"container\"]\n}\n\nexport const FieldComboboxContent = React.forwardRef<\n HTMLDivElement,\n FieldComboboxContentProps\n>(function FieldComboboxContent(\n { className, children, container, ...props },\n ref\n) {\n const styles = useStyles()\n\n return (\n <PopoverPortal container={container}>\n <PopoverContent\n ref={ref}\n data-slot=\"combobox-content\"\n {...{ [SLOT_ATTR]: \"combobox-content\" }}\n className={mergeClasses(styles.content, className)}\n {...props}\n >\n <Command\n data-slot=\"combobox-command\"\n {...{ [SLOT_ATTR]: \"combobox-command\" }}\n className={styles.command}\n >\n {children}\n </Command>\n </PopoverContent>\n </PopoverPortal>\n )\n})\n\nexport type FieldComboboxValueProps = React.ComponentProps<\"div\">\n\nexport const FieldComboboxValue = React.forwardRef<\n HTMLDivElement,\n FieldComboboxValueProps\n>(function FieldComboboxValue({ className, children, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"combobox-value\"\n {...{ [SLOT_ATTR]: \"combobox-value\" }}\n className={mergeClasses(styles.value, className)}\n {...props}\n >\n {children}\n </div>\n )\n})\n\nexport type FieldComboboxInputProps = CommandInputProps\n\nexport const FieldComboboxInput = React.forwardRef<\n HTMLInputElement,\n FieldComboboxInputProps\n>(function FieldComboboxInput({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandInput\n ref={ref}\n data-slot=\"combobox-command-input\"\n {...{ [SLOT_ATTR]: \"combobox-command-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxListProps = CommandListProps\n\nexport const FieldComboboxList = React.forwardRef<\n HTMLDivElement,\n FieldComboboxListProps\n>(function FieldComboboxList({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandList\n ref={ref}\n data-slot=\"combobox-command-list\"\n {...{ [SLOT_ATTR]: \"combobox-command-list\" }}\n className={mergeClasses(styles.list, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxItemProps = CommandItemProps\n\nexport const FieldComboboxItem = React.forwardRef<\n HTMLDivElement,\n FieldComboboxItemProps\n>(function FieldComboboxItem({ className, children, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandItem\n ref={ref}\n data-slot=\"combobox-item\"\n {...{ [SLOT_ATTR]: \"combobox-item\" }}\n className={mergeClasses(styles.item, className)}\n {...props}\n >\n {children}\n </CommandItem>\n )\n})\n\nexport type FieldComboboxItemCheckIconProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxItemCheckIcon = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxItemCheckIconProps\n>(function FieldComboboxItemCheckIcon({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n className={mergeClasses(styles.itemCheckIcon, className)}\n {...props}\n >\n <CheckIcon className={styles.checkSvg} />\n </span>\n )\n})\n\nexport type FieldComboboxEmptyProps = CommandEmptyProps\n\nexport const FieldComboboxEmpty = React.forwardRef<\n HTMLDivElement,\n FieldComboboxEmptyProps\n>(function FieldComboboxEmpty({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandEmpty\n ref={ref}\n data-slot=\"combobox-empty\"\n {...{ [SLOT_ATTR]: \"combobox-empty\" }}\n className={mergeClasses(styles.empty, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxGroupProps = CommandGroupProps\n\nexport const FieldComboboxGroup = React.forwardRef<\n HTMLDivElement,\n FieldComboboxGroupProps\n>(function FieldComboboxGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandGroup\n ref={ref}\n data-slot=\"combobox-group\"\n {...{ [SLOT_ATTR]: \"combobox-group\" }}\n className={mergeClasses(styles.group, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxGroupLabelProps = LabelProps\n\nexport const FieldComboboxGroupLabel = React.forwardRef<\n HTMLLabelElement,\n FieldComboboxGroupLabelProps\n>(function FieldComboboxGroupLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <Label\n ref={ref}\n data-slot=\"combobox-group-label\"\n {...{ [SLOT_ATTR]: \"combobox-group-label\" }}\n className={mergeClasses(styles.groupLabel, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxSeparatorProps = CommandSeparatorProps\n\nexport const FieldComboboxSeparator = React.forwardRef<\n HTMLDivElement,\n FieldComboboxSeparatorProps\n>(function FieldComboboxSeparator({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandSeparator\n ref={ref}\n data-slot=\"select-separator\"\n {...{ [SLOT_ATTR]: \"select-separator\" }}\n className={mergeClasses(styles.separator, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxLoadingProps = CommandLoadingProps\n\nexport const FieldComboboxLoading = React.forwardRef<\n HTMLDivElement,\n FieldComboboxLoadingProps\n>(function FieldComboboxLoading({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandLoading\n ref={ref}\n data-slot=\"combobox-command-loading\"\n {...{ [SLOT_ATTR]: \"combobox-command-loading\" }}\n className={mergeClasses(styles.loading, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxClearProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxClear = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxClearProps\n>(function FieldComboboxClear({ className, onClick, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n role=\"button\"\n tabIndex={0}\n className={mergeClasses(styles.clear, className)}\n onPointerDown={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n onClick?.(event)\n }}\n {...props}\n >\n <XIcon className={styles.clearSvg} />\n </span>\n )\n})\n\nexport type FieldComboboxPlaceholderProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxPlaceholder = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxPlaceholderProps\n>(function FieldComboboxPlaceholder({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n className={mergeClasses(styles.placeholder, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxClearValueProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxClearValue = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxClearValueProps\n>(function FieldComboboxClearValue({ className, onClick, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n role=\"button\"\n tabIndex={0}\n className={mergeClasses(styles.clearValue, className)}\n onPointerDown={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n onClick?.(event)\n }}\n {...props}\n >\n <XIcon className={styles.clearValueSvg} />\n </span>\n )\n})\n\nexport {\n FieldCombobox as Combobox,\n FieldComboboxGroup as ComboboxGroup,\n FieldComboboxGroupLabel as ComboboxGroupLabel,\n FieldComboboxValue as ComboboxValue,\n FieldComboboxTrigger as ComboboxTrigger,\n FieldComboboxContent as ComboboxContent,\n FieldComboboxItem as ComboboxItem,\n FieldComboboxItemCheckIcon as ComboboxItemCheckIcon,\n FieldComboboxEmpty as ComboboxEmpty,\n FieldComboboxSeparator as ComboboxSeparator,\n FieldComboboxInput as ComboboxInput,\n FieldComboboxList as ComboboxList,\n FieldComboboxLoading as ComboboxLoading,\n FieldComboboxClear as ComboboxClear,\n FieldComboboxClearValue as ComboboxClearValue,\n FieldComboboxPlaceholder as ComboboxPlaceholder,\n}\n"],"names":["CheckIcon","props","jsx","ChevronDownIcon","XIcon","useStyles","makeZenithStyles","shorthands","tokens.spacingElement2","tokens.radiusLg","tokens.textSm","tokens.leadingSm","tokens.semFocusRing","tokens.grayA11","tokens.grayA12","tokens.spacingGroup1","tokens.radiusMd","tokens.fontWeightSemibold","tokens.textXs","tokens.leadingXs","tokens.semGraySoft","tokens.spacingElement1","tokens.accentA11","tokens.grayA8","FieldCombobox","React","_ref","Popover","SLOT_ATTR","FieldComboboxTrigger","className","children","forwardedRef","styles","inputRef","_a","useOptionalFieldContext","jsxs","PopoverTrigger","el","mergeClasses","FieldComboboxContent","container","ref","PopoverPortal","PopoverContent","Command","FieldComboboxValue","FieldComboboxInput","CommandInput","FieldComboboxList","CommandList","FieldComboboxItem","CommandItem","FieldComboboxItemCheckIcon","FieldComboboxEmpty","CommandEmpty","FieldComboboxGroup","CommandGroup","FieldComboboxGroupLabel","Label","FieldComboboxSeparator","CommandSeparator","FieldComboboxLoading","CommandLoading","FieldComboboxClear","onClick","event","FieldComboboxPlaceholder","FieldComboboxClearValue"],"mappings":";;;;;;;;;AAqCA,MAAMA,IAAY,CAACC,MACjB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,uJAAA,CAAuJ;AAAA,EAAA;AACjK,GAGIC,IAAkB,CAACF,MACvB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;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,gBAAA,GACND,KAAA,QAAAA,EAAUC;AAAA,MACZ;AAAA,MACC,GAAGlE;AAAA,MAEJ,UAAA,gBAAAC,EAACE,GAAA,EAAM,WAAW6B,EAAO,cAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAG9C,CAAC;"}
1
+ {"version":3,"file":"field-combobox.js","sources":["../../../src/components/field/field-combobox.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandLoading,\n CommandSeparator,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandInputProps,\n type CommandItemProps,\n type CommandListProps,\n type CommandLoadingProps,\n type CommandSeparatorProps,\n} from \"../command/command\"\nimport { Label, type LabelProps } from \"../label/label\"\nimport {\n Popover,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n type PopoverContentProps,\n type PopoverPortalProps,\n type PopoverProps,\n type PopoverTriggerProps,\n} from \"../popover/popover\"\nimport { useOptionalFieldContext } from \"./field\"\n\nconst CheckIcon = (props: React.ComponentProps<\"svg\">) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z\" />\n </svg>\n)\n\nconst ChevronDownIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z\" />\n </svg>\n)\n\nconst XIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"24px\"\n viewBox=\"0 -960 960 960\"\n width=\"24px\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z\" />\n </svg>\n)\n\nconst useStyles = makeZenithStyles({\n trigger: {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusLg),\n backgroundColor: \"transparent\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n whiteSpace: \"nowrap\",\n outlineStyle: \"none\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.focusRing,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n triggerChevron: {\n width: \"1.5rem\",\n height: \"1.5rem\",\n flexShrink: 0,\n transitionProperty: \"transform\",\n transitionDuration: \"150ms\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n color: tokens.grayA11,\n \"&[data-popup-open], &[data-open]\": {\n transform: \"rotate(180deg)\",\n },\n },\n value: {\n color: tokens.grayA12,\n width: \"100%\",\n textAlign: \"left\",\n flexWrap: \"wrap\",\n display: \"flex\",\n ...shorthands.gap(tokens.spacingElement2),\n position: \"relative\",\n whiteSpace: \"normal\",\n marginRight: \"1.25rem\",\n },\n content: {\n ...shorthands.padding(0),\n },\n command: {\n width: \"100%\",\n ...shorthands.borderRadius(0),\n },\n input: {\n width: \"100%\",\n },\n list: {\n ...shorthands.padding(tokens.spacingElement2),\n },\n item: {\n paddingLeft: tokens.spacingGroup1,\n paddingRight: \"2rem\",\n paddingTop: \"0.375rem\",\n paddingBottom: \"0.375rem\",\n color: tokens.grayA12,\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n cursor: \"default\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n ...shorthands.borderRadius(tokens.radiusMd),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n outlineStyle: \"none\",\n userSelect: \"none\",\n },\n itemCheckIcon: {\n position: \"absolute\",\n right: tokens.spacingElement2,\n display: \"flex\",\n width: \"1rem\",\n height: \"1rem\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n checkSvg: {\n width: \"1rem\",\n height: \"1rem\",\n color: tokens.grayA12,\n },\n empty: {\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n textAlign: \"center\",\n color: tokens.grayA12,\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n },\n group: {\n ...shorthands.padding(0),\n },\n groupLabel: {\n color: tokens.grayA11,\n fontWeight: tokens.fontWeightSemibold,\n paddingLeft: tokens.spacingElement2,\n paddingRight: tokens.spacingElement2,\n paddingTop: tokens.spacingElement2,\n paddingBottom: tokens.spacingElement2,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n },\n separator: {\n backgroundColor: tokens.graySoft,\n pointerEvents: \"none\",\n marginLeft: `calc(-1 * ${tokens.spacingElement1})`,\n marginRight: `calc(-1 * ${tokens.spacingElement1})`,\n marginTop: tokens.spacingElement2,\n marginBottom: tokens.spacingElement2,\n height: \"1px\",\n },\n loading: {\n color: tokens.grayA11,\n paddingLeft: tokens.spacingGroup1,\n paddingRight: tokens.spacingGroup1,\n paddingTop: tokens.spacingElement2,\n paddingBottom: tokens.spacingElement2,\n },\n clear: {\n position: \"absolute\",\n right: \"2.75rem\",\n cursor: \"pointer\",\n minHeight: \"auto\",\n ...shorthands.padding(\"0.125rem\"),\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.borderRadius(\"9999px\"),\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n color: tokens.accentA11,\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.focusRing,\n },\n },\n clearSvg: {\n width: \"1.25rem\",\n height: \"1.25rem\",\n },\n clearValue: {\n cursor: \"pointer\",\n \":hover\": {\n opacity: 0.7,\n },\n color: \"currentColor\",\n ...shorthands.borderRadius(\"9999px\"),\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n clearValueSvg: {\n width: \"1rem\",\n height: \"1rem\",\n color: \"currentColor\",\n },\n placeholder: {\n color: tokens.grayA8,\n },\n})\n\nexport type FieldComboboxProps = PopoverProps\n\nexport const FieldCombobox = React.forwardRef<HTMLElement, FieldComboboxProps>(\n function FieldCombobox(props, _ref) {\n return (\n <Popover\n data-slot=\"combobox\"\n {...{ [SLOT_ATTR]: \"combobox\" }}\n {...props}\n />\n )\n }\n)\n\nexport type FieldComboboxTriggerProps = PopoverTriggerProps\n\nexport const FieldComboboxTrigger = React.forwardRef<\n HTMLButtonElement,\n FieldComboboxTriggerProps\n>(function FieldComboboxTrigger(\n { className, children, ...props },\n forwardedRef\n) {\n const styles = useStyles()\n // Optional on purpose: this part is valid standalone and only picks up field wiring\n // when nested inside one. See useOptionalFieldContext.\n const inputRef = useOptionalFieldContext()?.inputRef ?? null\n\n const handleRef = (el: HTMLButtonElement | null) => {\n if (inputRef) {\n inputRef.current = el\n }\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }\n\n return (\n <PopoverTrigger\n ref={handleRef}\n data-slot=\"select-trigger\"\n {...{ [SLOT_ATTR]: \"select-trigger\" }}\n className={mergeClasses(styles.trigger, className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className={styles.triggerChevron} />\n </PopoverTrigger>\n )\n})\n\nexport type FieldComboboxContentProps = PopoverContentProps & {\n container?: PopoverPortalProps[\"container\"]\n}\n\nexport const FieldComboboxContent = React.forwardRef<\n HTMLDivElement,\n FieldComboboxContentProps\n>(function FieldComboboxContent(\n { className, children, container, ...props },\n ref\n) {\n const styles = useStyles()\n\n return (\n <PopoverPortal container={container}>\n <PopoverContent\n ref={ref}\n data-slot=\"combobox-content\"\n {...{ [SLOT_ATTR]: \"combobox-content\" }}\n className={mergeClasses(styles.content, className)}\n {...props}\n >\n <Command\n data-slot=\"combobox-command\"\n {...{ [SLOT_ATTR]: \"combobox-command\" }}\n className={styles.command}\n >\n {children}\n </Command>\n </PopoverContent>\n </PopoverPortal>\n )\n})\n\nexport type FieldComboboxValueProps = React.ComponentProps<\"div\">\n\nexport const FieldComboboxValue = React.forwardRef<\n HTMLDivElement,\n FieldComboboxValueProps\n>(function FieldComboboxValue({ className, children, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"combobox-value\"\n {...{ [SLOT_ATTR]: \"combobox-value\" }}\n className={mergeClasses(styles.value, className)}\n {...props}\n >\n {children}\n </div>\n )\n})\n\nexport type FieldComboboxInputProps = CommandInputProps\n\nexport const FieldComboboxInput = React.forwardRef<\n HTMLInputElement,\n FieldComboboxInputProps\n>(function FieldComboboxInput({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandInput\n ref={ref}\n data-slot=\"combobox-command-input\"\n {...{ [SLOT_ATTR]: \"combobox-command-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxListProps = CommandListProps\n\nexport const FieldComboboxList = React.forwardRef<\n HTMLDivElement,\n FieldComboboxListProps\n>(function FieldComboboxList({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandList\n ref={ref}\n data-slot=\"combobox-command-list\"\n {...{ [SLOT_ATTR]: \"combobox-command-list\" }}\n className={mergeClasses(styles.list, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxItemProps = CommandItemProps\n\nexport const FieldComboboxItem = React.forwardRef<\n HTMLDivElement,\n FieldComboboxItemProps\n>(function FieldComboboxItem({ className, children, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandItem\n ref={ref}\n data-slot=\"combobox-item\"\n {...{ [SLOT_ATTR]: \"combobox-item\" }}\n className={mergeClasses(styles.item, className)}\n {...props}\n >\n {children}\n </CommandItem>\n )\n})\n\nexport type FieldComboboxItemCheckIconProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxItemCheckIcon = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxItemCheckIconProps\n>(function FieldComboboxItemCheckIcon({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n className={mergeClasses(styles.itemCheckIcon, className)}\n {...props}\n >\n <CheckIcon className={styles.checkSvg} />\n </span>\n )\n})\n\nexport type FieldComboboxEmptyProps = CommandEmptyProps\n\nexport const FieldComboboxEmpty = React.forwardRef<\n HTMLDivElement,\n FieldComboboxEmptyProps\n>(function FieldComboboxEmpty({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandEmpty\n ref={ref}\n data-slot=\"combobox-empty\"\n {...{ [SLOT_ATTR]: \"combobox-empty\" }}\n className={mergeClasses(styles.empty, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxGroupProps = CommandGroupProps\n\nexport const FieldComboboxGroup = React.forwardRef<\n HTMLDivElement,\n FieldComboboxGroupProps\n>(function FieldComboboxGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandGroup\n ref={ref}\n data-slot=\"combobox-group\"\n {...{ [SLOT_ATTR]: \"combobox-group\" }}\n className={mergeClasses(styles.group, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxGroupLabelProps = LabelProps\n\nexport const FieldComboboxGroupLabel = React.forwardRef<\n HTMLLabelElement,\n FieldComboboxGroupLabelProps\n>(function FieldComboboxGroupLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <Label\n ref={ref}\n data-slot=\"combobox-group-label\"\n {...{ [SLOT_ATTR]: \"combobox-group-label\" }}\n className={mergeClasses(styles.groupLabel, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxSeparatorProps = CommandSeparatorProps\n\nexport const FieldComboboxSeparator = React.forwardRef<\n HTMLDivElement,\n FieldComboboxSeparatorProps\n>(function FieldComboboxSeparator({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandSeparator\n ref={ref}\n data-slot=\"select-separator\"\n {...{ [SLOT_ATTR]: \"select-separator\" }}\n className={mergeClasses(styles.separator, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxLoadingProps = CommandLoadingProps\n\nexport const FieldComboboxLoading = React.forwardRef<\n HTMLDivElement,\n FieldComboboxLoadingProps\n>(function FieldComboboxLoading({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <CommandLoading\n ref={ref}\n data-slot=\"combobox-command-loading\"\n {...{ [SLOT_ATTR]: \"combobox-command-loading\" }}\n className={mergeClasses(styles.loading, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxClearProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxClear = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxClearProps\n>(function FieldComboboxClear({ className, onClick, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n role=\"button\"\n tabIndex={0}\n className={mergeClasses(styles.clear, className)}\n onPointerDown={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n onClick?.(event)\n }}\n {...props}\n >\n <XIcon className={styles.clearSvg} />\n </span>\n )\n})\n\nexport type FieldComboboxPlaceholderProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxPlaceholder = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxPlaceholderProps\n>(function FieldComboboxPlaceholder({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n className={mergeClasses(styles.placeholder, className)}\n {...props}\n />\n )\n})\n\nexport type FieldComboboxClearValueProps = React.ComponentProps<\"span\">\n\nexport const FieldComboboxClearValue = React.forwardRef<\n HTMLSpanElement,\n FieldComboboxClearValueProps\n>(function FieldComboboxClearValue({ className, onClick, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n role=\"button\"\n tabIndex={0}\n className={mergeClasses(styles.clearValue, className)}\n onPointerDown={(event) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onClick={(event) => {\n event.preventDefault()\n event.stopPropagation()\n onClick?.(event)\n }}\n {...props}\n >\n <XIcon className={styles.clearValueSvg} />\n </span>\n )\n})\n\nexport {\n FieldCombobox as Combobox,\n FieldComboboxGroup as ComboboxGroup,\n FieldComboboxGroupLabel as ComboboxGroupLabel,\n FieldComboboxValue as ComboboxValue,\n FieldComboboxTrigger as ComboboxTrigger,\n FieldComboboxContent as ComboboxContent,\n FieldComboboxItem as ComboboxItem,\n FieldComboboxItemCheckIcon as ComboboxItemCheckIcon,\n FieldComboboxEmpty as ComboboxEmpty,\n FieldComboboxSeparator as ComboboxSeparator,\n FieldComboboxInput as ComboboxInput,\n FieldComboboxList as ComboboxList,\n FieldComboboxLoading as ComboboxLoading,\n FieldComboboxClear as ComboboxClear,\n FieldComboboxClearValue as ComboboxClearValue,\n FieldComboboxPlaceholder as ComboboxPlaceholder,\n}\n"],"names":["CheckIcon","props","jsx","ChevronDownIcon","XIcon","useStyles","makeZenithStyles","shorthands","tokens.spacingElement2","tokens.radiusLg","tokens.textSm","tokens.leadingSm","tokens.focusRing","tokens.grayA11","tokens.grayA12","tokens.spacingGroup1","tokens.radiusMd","tokens.fontWeightSemibold","tokens.textXs","tokens.leadingXs","tokens.graySoft","tokens.spacingElement1","tokens.accentA11","tokens.grayA8","FieldCombobox","React","_ref","Popover","SLOT_ATTR","FieldComboboxTrigger","className","children","forwardedRef","styles","inputRef","_a","useOptionalFieldContext","jsxs","PopoverTrigger","el","mergeClasses","FieldComboboxContent","container","ref","PopoverPortal","PopoverContent","Command","FieldComboboxValue","FieldComboboxInput","CommandInput","FieldComboboxList","CommandList","FieldComboboxItem","CommandItem","FieldComboboxItemCheckIcon","FieldComboboxEmpty","CommandEmpty","FieldComboboxGroup","CommandGroup","FieldComboboxGroupLabel","Label","FieldComboboxSeparator","CommandSeparator","FieldComboboxLoading","CommandLoading","FieldComboboxClear","onClick","event","FieldComboboxPlaceholder","FieldComboboxClearValue"],"mappings":";;;;;;;;;AAqCA,MAAMA,IAAY,CAACC,MACjB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,uJAAA,CAAuJ;AAAA,EAAA;AACjK,GAGIC,IAAkB,CAACF,MACvB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,kIAAA,CAAkI;AAAA,EAAA;AAC5I,GAGIE,IAAQ,CAACH,MACb,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,GAAGD;AAAA,IAEJ,UAAA,gBAAAC,EAAC,QAAA,EAAK,G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AAA,EAAM,eAAA,GACNA,EAAM,gBAAA,GACND,KAAA,QAAAA,EAAUC;AAAA,MACZ;AAAA,MACC,GAAGlE;AAAA,MAEJ,UAAA,gBAAAC,EAACE,GAAA,EAAM,WAAW6B,EAAO,SAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAGzC,CAAC,GAIYmC,KAA2B3C,EAAM,WAG5C,SAAkC,EAAE,WAAAK,GAAW,GAAG7B,EAAA,GAAS0C,GAAK;AAChE,QAAMV,IAAS5B,EAAA;AAEf,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAyC;AAAA,MACA,WAAWH,EAAaP,EAAO,aAAaH,CAAS;AAAA,MACpD,GAAG7B;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC,GAIYoE,KAA0B5C,EAAM,WAG3C,SAAiC,EAAE,WAAAK,GAAW,SAAAoC,GAAS,GAAGjE,EAAA,GAAS0C,GAAK;AACxE,QAAMV,IAAS5B,EAAA;AAEf,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAyC;AAAA,MACA,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWH,EAAaP,EAAO,YAAYH,CAAS;AAAA,MACpD,eAAe,CAACqC,MAAU;AACxB,QAAAA,EAAM,eAAA,GACNA,EAAM,gBAAA;AAAA,MACR;AAAA,MACA,SAAS,CAACA,MAAU;AAClB,QAAAA,EAAM,eAAA,GACNA,EAAM,gBAAA,GACND,KAAA,QAAAA,EAAUC;AAAA,MACZ;AAAA,MACC,GAAGlE;AAAA,MAEJ,UAAA,gBAAAC,EAACE,GAAA,EAAM,WAAW6B,EAAO,cAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAG9C,CAAC;"}
@@ -1,9 +1,9 @@
1
- import { jsx as d } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import { mergeClasses as f, SLOT_ATTR as c, shorthands as r } from "@epilot/zenith-runtime/v1";
4
4
  import { makeZenithStyles as W } from "../../styles/make-styles.js";
5
- import { fontWeightNormal as b, leadingSm as v, textSm as C, grayA11 as H, grayA8 as G, grayA12 as x, fieldInputHeight as P, leadingXs as D, textXs as F, semErrorOnSoft as N, errorA4 as V, semErrorSoft as L, grayA3 as E, accentA4 as X, accentA3 as $, grayA4 as j, semFocusRing as M, fieldPaddingX as I, fieldPaddingY as k, spacingElement2 as S, spacingElement1 as z, fieldSetGap as Y, radiusLg as q } from "../../tokens/index.js";
6
- const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createContext(null), A = () => {
5
+ import { fontWeightNormal as b, leadingSm as v, textSm as C, grayA11 as H, grayA8 as G, grayA12 as x, fieldInputHeight as P, leadingXs as D, textXs as F, errorOnSoft as N, errorA4 as V, errorSoft as L, grayA3 as I, accentA4 as X, accentA3 as $, grayA4 as j, focusRing as M, fieldPaddingX as k, fieldPaddingY as A, spacingElement2 as S, spacingElement1 as z, fieldSetGap as Y, radiusLg as q } from "../../tokens/index.js";
6
+ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createContext(null), E = () => {
7
7
  const l = a.useContext(R);
8
8
  if (!l)
9
9
  throw new Error("FieldInput must be used within a Field component");
@@ -19,10 +19,10 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
19
19
  // is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by
20
20
  // reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases
21
21
  // spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).
22
- paddingTop: k,
23
- paddingBottom: k,
24
- paddingLeft: I,
25
- paddingRight: I,
22
+ paddingTop: A,
23
+ paddingBottom: A,
24
+ paddingLeft: k,
25
+ paddingRight: k,
26
26
  ...r.gap(z),
27
27
  ...r.borderRadius(q),
28
28
  transitionProperty: "all",
@@ -59,7 +59,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
59
59
  }
60
60
  },
61
61
  rootDefault: {
62
- backgroundColor: E,
62
+ backgroundColor: I,
63
63
  ":hover": {
64
64
  backgroundColor: j
65
65
  }
@@ -71,7 +71,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
71
71
  }
72
72
  },
73
73
  rootReadonly: {
74
- backgroundColor: E
74
+ backgroundColor: I
75
75
  },
76
76
  rootDestructive: {
77
77
  backgroundColor: L,
@@ -258,14 +258,14 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
258
258
  children: t,
259
259
  onFocusCapture: o,
260
260
  onBlurCapture: n,
261
- ...s
261
+ ...d
262
262
  }, m) {
263
263
  const u = p(), h = a.useRef(null), [g, y] = a.useState(!1), T = (w) => {
264
264
  y(!0), o == null || o(w);
265
265
  }, O = (w) => {
266
266
  y(!1), n == null || n(w);
267
267
  }, B = e === "highlight" ? u.rootHighlight : e === "readonly" ? u.rootReadonly : e === "destructive" ? u.rootDestructive : u.rootDefault;
268
- return /* @__PURE__ */ d(R.Provider, { value: { inputRef: h }, children: /* @__PURE__ */ d(
268
+ return /* @__PURE__ */ s(R.Provider, { value: { inputRef: h }, children: /* @__PURE__ */ s(
269
269
  U,
270
270
  {
271
271
  ref: m,
@@ -276,7 +276,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
276
276
  className: f(u.root, B, i),
277
277
  onFocusCapture: T,
278
278
  onBlurCapture: O,
279
- ...s,
279
+ ...d,
280
280
  children: t
281
281
  }
282
282
  ) });
@@ -284,7 +284,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
284
284
  ), re = a.forwardRef(
285
285
  function({ className: i, ...e }, t) {
286
286
  const o = p();
287
- return /* @__PURE__ */ d(
287
+ return /* @__PURE__ */ s(
288
288
  "fieldset",
289
289
  {
290
290
  ref: t,
@@ -298,7 +298,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
298
298
  ), ae = a.forwardRef(
299
299
  function({ className: i, direction: e = "column", ...t }, o) {
300
300
  const n = p();
301
- return /* @__PURE__ */ d(
301
+ return /* @__PURE__ */ s(
302
302
  "div",
303
303
  {
304
304
  ref: o,
@@ -313,10 +313,10 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
313
313
  }
314
314
  );
315
315
  }
316
- ), se = a.forwardRef(
316
+ ), de = a.forwardRef(
317
317
  function({ className: i, ...e }, t) {
318
318
  const o = p();
319
- return /* @__PURE__ */ d(
319
+ return /* @__PURE__ */ s(
320
320
  "div",
321
321
  {
322
322
  ref: t,
@@ -327,10 +327,10 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
327
327
  }
328
328
  );
329
329
  }
330
- ), de = a.forwardRef(
330
+ ), se = a.forwardRef(
331
331
  function({ className: i, ...e }, t) {
332
332
  const o = p();
333
- return /* @__PURE__ */ d(
333
+ return /* @__PURE__ */ s(
334
334
  Z,
335
335
  {
336
336
  ref: t,
@@ -343,7 +343,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
343
343
  }
344
344
  ), ce = a.forwardRef(function({ className: i, showOnHover: e = !0, ...t }, o) {
345
345
  const n = p();
346
- return /* @__PURE__ */ d(
346
+ return /* @__PURE__ */ s(
347
347
  "div",
348
348
  {
349
349
  ref: o,
@@ -360,20 +360,20 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
360
360
  }), ue = ({
361
361
  variant: l = "default"
362
362
  } = {}) => l, fe = a.forwardRef(function({ className: i, variant: e = "default", ...t }, o) {
363
- const n = p(), s = e === "helper" ? n.descriptionHelper : n.descriptionDefault;
364
- return /* @__PURE__ */ d(
363
+ const n = p(), d = e === "helper" ? n.descriptionHelper : n.descriptionDefault;
364
+ return /* @__PURE__ */ s(
365
365
  J,
366
366
  {
367
367
  ref: o,
368
368
  "data-slot": "field-description",
369
369
  [c]: "field-description",
370
- className: f(n.description, s, i),
370
+ className: f(n.description, d, i),
371
371
  ...t
372
372
  }
373
373
  );
374
374
  }), pe = a.forwardRef(
375
375
  function({ className: i, children: e, errors: t, ...o }, n) {
376
- const s = p(), m = a.useMemo(() => {
376
+ const d = p(), m = a.useMemo(() => {
377
377
  var h;
378
378
  if (e)
379
379
  return e;
@@ -382,18 +382,18 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
382
382
  const u = [
383
383
  ...new Map(t.map((g) => [g == null ? void 0 : g.message, g])).values()
384
384
  ];
385
- return u.length === 1 ? (h = u[0]) == null ? void 0 : h.message : /* @__PURE__ */ d("ul", { className: s.errorList, children: u.map(
386
- (g, y) => (g == null ? void 0 : g.message) && /* @__PURE__ */ d("li", { className: s.errorListItem, children: g.message }, y)
385
+ return u.length === 1 ? (h = u[0]) == null ? void 0 : h.message : /* @__PURE__ */ s("ul", { className: d.errorList, children: u.map(
386
+ (g, y) => (g == null ? void 0 : g.message) && /* @__PURE__ */ s("li", { className: d.errorListItem, children: g.message }, y)
387
387
  ) });
388
- }, [e, t, s.errorList, s.errorListItem]);
389
- return m ? /* @__PURE__ */ d(
388
+ }, [e, t, d.errorList, d.errorListItem]);
389
+ return m ? /* @__PURE__ */ s(
390
390
  K,
391
391
  {
392
392
  ref: n,
393
393
  role: "alert",
394
394
  "data-slot": "field-error",
395
395
  [c]: "field-error",
396
- className: f(s.error, i),
396
+ className: f(d.error, i),
397
397
  ...o,
398
398
  children: m
399
399
  }
@@ -401,12 +401,12 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
401
401
  }
402
402
  ), ge = a.forwardRef(
403
403
  function({ className: i, ...e }, t) {
404
- const o = p(), { inputRef: n } = A();
405
- return /* @__PURE__ */ d(
404
+ const o = p(), { inputRef: n } = E();
405
+ return /* @__PURE__ */ s(
406
406
  _,
407
407
  {
408
- ref: (s) => {
409
- n.current = s, typeof t == "function" ? t(s) : t && (t.current = s);
408
+ ref: (d) => {
409
+ n.current = d, typeof t == "function" ? t(d) : t && (t.current = d);
410
410
  },
411
411
  "data-readonly": e.readOnly,
412
412
  "data-slot": "field-input",
@@ -418,7 +418,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
418
418
  }
419
419
  ), me = a.forwardRef(function({ className: i, ...e }, t) {
420
420
  const o = p();
421
- return /* @__PURE__ */ d(
421
+ return /* @__PURE__ */ s(
422
422
  "div",
423
423
  {
424
424
  ref: t,
@@ -429,13 +429,13 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
429
429
  }
430
430
  );
431
431
  }), he = a.forwardRef(function({ className: i, resize: e = "none", ...t }, o) {
432
- const n = p(), { inputRef: s } = A(), m = e === "vertical" ? n.resizeVertical : e === "horizontal" ? n.resizeHorizontal : n.resizeNone;
433
- return /* @__PURE__ */ d(
432
+ const n = p(), { inputRef: d } = E(), m = e === "vertical" ? n.resizeVertical : e === "horizontal" ? n.resizeHorizontal : n.resizeNone;
433
+ return /* @__PURE__ */ s(
434
434
  "textarea",
435
435
  {
436
436
  ...t,
437
437
  ref: (u) => {
438
- s.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
438
+ d.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
439
439
  },
440
440
  "data-readonly": t.readOnly,
441
441
  "data-slot": "field-textarea",
@@ -448,7 +448,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
448
448
  align: l = "start"
449
449
  } = {}) => l, be = a.forwardRef(function({ className: i, align: e = "start", ...t }, o) {
450
450
  const n = p();
451
- return /* @__PURE__ */ d(
451
+ return /* @__PURE__ */ s(
452
452
  "div",
453
453
  {
454
454
  ref: o,
@@ -467,21 +467,21 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
467
467
  });
468
468
  export {
469
469
  le as Field,
470
- se as FieldContent,
470
+ de as FieldContent,
471
471
  fe as FieldDescription,
472
472
  pe as FieldError,
473
473
  ae as FieldGroup,
474
474
  be as FieldGroupAddon,
475
475
  ge as FieldInput,
476
476
  me as FieldInputGroup,
477
- de as FieldLabel,
477
+ se as FieldLabel,
478
478
  ce as FieldLabelContent,
479
479
  re as FieldSet,
480
480
  he as FieldTextarea,
481
481
  ue as fieldDescriptionVariants,
482
482
  ie as fieldVariants,
483
483
  ye as inputGroupAddonVariants,
484
- A as useFieldContext,
484
+ E as useFieldContext,
485
485
  ne as useOptionalFieldContext
486
486
  };
487
487
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Plain elements, not a primitive.\n *\n * v1's Field uses no Radix primitive at all — it is a custom implementation with its own context,\n * and v2 already had the same context (`FieldContext`, carrying `inputRef`). Base UI's Field parts\n * were only supplying the elements, and these are the elements they rendered: Root a div, Label a\n * label, Control an input, Description a p, Error a div. Substituting them is element-identical, so\n * nothing moves visually.\n *\n * **What is genuinely lost:** Base UI's Field also wired label-to-control association and\n * `aria-describedby` automatically. v1 does not do that either — its context carries only `inputRef`\n * — so this matches production rather than regressing against it, but it is a real accessibility\n * affordance that Base UI gave for free and is worth revisiting on its own terms.\n */\nconst FieldRootBase = \"div\" as const\nconst FieldLabelBase = \"label\" as const\nconst FieldControlBase = \"input\" as const\nconst FieldDescriptionBase = \"p\" as const\nconst FieldErrorBase = \"div\" as const\n\nexport type FieldInputRef =\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | HTMLButtonElement\n | null\n\nexport interface FieldContextValue {\n inputRef: React.RefObject<FieldInputRef>\n}\n\nconst FieldContext = React.createContext<FieldContextValue | null>(null)\n\nexport const useFieldContext = () => {\n const context = React.useContext(FieldContext)\n if (!context) {\n throw new Error(\"FieldInput must be used within a Field component\")\n }\n return context\n}\n\n/**\n * Field context when there is one, `null` otherwise — for parts that work both inside and outside a\n * Field.\n *\n * `useFieldContext` throws by design, which is right for FieldInput (it is meaningless on its own)\n * and wrong for SelectTrigger and the combobox trigger, which are legitimate standalone components\n * that merely pick up field wiring when nested. Those were calling the throwing hook inside a\n * try/catch, i.e. using an exception for control flow on every render of a perfectly valid tree.\n */\nexport const useOptionalFieldContext = (): FieldContextValue | null =>\n React.useContext(FieldContext)\n\nexport type FieldVariant = \"default\" | \"highlight\" | \"readonly\" | \"destructive\"\n\nconst useStyles = makeZenithStyles({\n root: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3, WP9B1-ACCEPTANCE-WP9B2A): normal resolves to the same\n // spacingElement2/spacingElement3 values this used before binding — `spacingGroup1` (0.5rem)\n // is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by\n // reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases\n // spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).\n paddingTop: tokens.fieldPaddingY,\n paddingBottom: tokens.fieldPaddingY,\n paddingLeft: tokens.fieldPaddingX,\n paddingRight: tokens.fieldPaddingX,\n ...shorthands.gap(tokens.spacingElement1),\n ...shorthands.borderRadius(tokens.radiusLg),\n transitionProperty: \"all\",\n transitionDuration: \"75ms\",\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"none\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineStyle: \"solid\",\n outlineColor: tokens.semFocusRing,\n },\n \"&[data-invalid]\": {\n backgroundColor: tokens.semErrorSoft,\n },\n\n // Label's disabled styling, declared here because Field owns the elements these selectors are\n // rooted at. On Label they were written as \"[data-disabled] &\", \":disabled ~ &\" and\n // \"[data-disabled] ~ &\"; Griffel does not substitute `&` in that position and emits\n // `.hash<selector> .hash`, which never matches, so a label in a disabled field never dimmed.\n // See src/ancestor-selector.test.ts.\n [`&[data-disabled] [${SLOT_ATTR}=\"label\"]`]: {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n [`& :disabled ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n [`& [data-disabled] ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n rootDefault: {\n backgroundColor: tokens.grayA3,\n \":hover\": {\n backgroundColor: tokens.grayA4,\n },\n },\n rootHighlight: {\n backgroundColor: tokens.accentA3,\n \":hover\": {\n backgroundColor: tokens.accentA4,\n },\n },\n rootReadonly: {\n backgroundColor: tokens.grayA3,\n },\n rootDestructive: {\n backgroundColor: tokens.semErrorSoft,\n \":hover\": {\n backgroundColor: tokens.errorA4,\n },\n },\n fieldSet: {\n display: \"flex\",\n flexDirection: \"column\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same spacingLayout2 (32px)\n // this used before binding.\n ...shorthands.gap(tokens.fieldSetGap),\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n fieldGroup: {\n display: \"flex\",\n width: \"100%\",\n ...shorthands.gap(tokens.spacingElement2),\n },\n fieldGroupColumn: {\n flexDirection: \"column\",\n },\n fieldGroupRow: {\n flexDirection: \"row\",\n },\n fieldContent: {\n display: \"flex\",\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(tokens.spacingElement2),\n lineHeight: \"1.375\",\n },\n label: {\n minHeight: \"1rem\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n display: \"flex\",\n width: \"fit-content\",\n ...shorthands.gap(tokens.spacingElement2),\n cursor: \"default\",\n color: tokens.grayA12,\n \"&[data-disabled]\": {\n opacity: 0.5,\n },\n },\n labelContent: {\n display: \"inline-flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n transitionProperty: \"opacity\",\n transitionDuration: \"150ms\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n },\n labelContentHover: {\n width: 0,\n height: 0,\n overflowX: \"visible\",\n overflowY: \"visible\",\n opacity: 0,\n pointerEvents: \"none\",\n },\n description: {\n fontSize: tokens.textXs,\n lineHeight: \"1.5\",\n fontWeight: tokens.fontWeightNormal,\n ...shorthands.margin(0),\n \"& a\": {\n textDecorationLine: \"underline\",\n textUnderlineOffset: \"4px\",\n },\n },\n descriptionDefault: {\n color: tokens.grayA12,\n },\n descriptionHelper: {\n color: tokens.grayA11,\n },\n error: {\n color: tokens.semErrorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n },\n errorList: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.margin(0),\n paddingLeft: \"1.25rem\",\n listStyleType: \"disc\",\n },\n errorListItem: {\n color: tokens.semErrorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n marginTop: \"0.25rem\",\n marginBottom: \"0.25rem\",\n },\n input: {\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same \"1.5rem\" this used before\n // binding. FieldComboboxInput (field-combobox.tsx) has its OWN separate makeZenithStyles call\n // and its own unrelated \"input\" key (width: \"100%\" only, no height) — this binding does not\n // reach it; review corrected an earlier claim that it did.\n height: tokens.fieldInputHeight,\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n inputGroup: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n width: \"100%\",\n },\n textarea: {\n width: \"100%\",\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n resizeNone: {\n resize: \"none\",\n },\n resizeVertical: {\n resize: \"vertical\",\n },\n resizeHorizontal: {\n resize: \"horizontal\",\n },\n addon: {\n color: tokens.grayA11,\n display: \"flex\",\n height: \"auto\",\n cursor: \"text\",\n whiteSpace: \"nowrap\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightNormal,\n userSelect: \"none\",\n },\n addonStart: {\n order: -1,\n },\n addonEnd: {\n order: 1,\n },\n})\n\n// fieldVariants helper for v1 API compatibility\nexport const fieldVariants = ({\n variant = \"default\",\n}: { variant?: FieldVariant } = {}) => {\n return variant\n}\n\nexport type FieldProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n variant?: FieldVariant\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(\n {\n className,\n variant = \"default\",\n children,\n onFocusCapture,\n onBlurCapture,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const inputRef = React.useRef<FieldInputRef>(null)\n const [isFocused, setIsFocused] = React.useState(false)\n\n const handleFocusCapture: React.ComponentProps<\"div\">[\"onFocusCapture\"] = (\n event\n ) => {\n setIsFocused(true)\n onFocusCapture?.(event)\n }\n\n const handleBlurCapture: React.ComponentProps<\"div\">[\"onBlurCapture\"] = (\n event\n ) => {\n setIsFocused(false)\n onBlurCapture?.(event)\n }\n\n const variantStyle =\n variant === \"highlight\"\n ? styles.rootHighlight\n : variant === \"readonly\"\n ? styles.rootReadonly\n : variant === \"destructive\"\n ? styles.rootDestructive\n : styles.rootDefault\n\n return (\n <FieldContext.Provider value={{ inputRef }}>\n <FieldRootBase\n ref={ref}\n role=\"group\"\n data-slot=\"field\"\n {...{ [SLOT_ATTR]: \"field\" }}\n data-focused={isFocused ? \"true\" : \"false\"}\n className={mergeClasses(styles.root, variantStyle, className)}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n {...props}\n >\n {children}\n </FieldRootBase>\n </FieldContext.Provider>\n )\n }\n)\n\nexport type FieldSetProps = React.ComponentProps<\"fieldset\">\n\nexport const FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\n function FieldSet({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <fieldset\n ref={ref}\n data-slot=\"field-set\"\n {...{ [SLOT_ATTR]: \"field-set\" }}\n className={mergeClasses(styles.fieldSet, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldGroupProps = React.ComponentProps<\"div\"> & {\n direction?: \"column\" | \"row\"\n}\n\nexport const FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\n function FieldGroup({ className, direction = \"column\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n {...{ [SLOT_ATTR]: \"field-group\" }}\n className={mergeClasses(\n styles.fieldGroup,\n direction === \"row\" ? styles.fieldGroupRow : styles.fieldGroupColumn,\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport type FieldContentProps = React.ComponentProps<\"div\">\n\nexport const FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\n function FieldContent({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-content\"\n {...{ [SLOT_ATTR]: \"field-content\" }}\n className={mergeClasses(styles.fieldContent, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelProps = Omit<\n React.ComponentProps<\"label\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\n function FieldLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <FieldLabelBase\n ref={ref}\n data-slot=\"field-label\"\n {...{ [SLOT_ATTR]: \"field-label\" }}\n className={mergeClasses(styles.label, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelContentProps = React.ComponentProps<\"div\"> & {\n showOnHover?: boolean\n}\n\nexport const FieldLabelContent = React.forwardRef<\n HTMLDivElement,\n FieldLabelContentProps\n>(function FieldLabelContent({ className, showOnHover = true, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-label-content\"\n {...{ [SLOT_ATTR]: \"field-label-content\" }}\n className={mergeClasses(\n styles.labelContent,\n showOnHover && styles.labelContentHover,\n className\n )}\n {...props}\n />\n )\n})\n\nexport type FieldDescriptionVariant = \"default\" | \"helper\"\n\nexport const fieldDescriptionVariants = ({\n variant = \"default\",\n}: { variant?: FieldDescriptionVariant } = {}) => {\n return variant\n}\n\nexport type FieldDescriptionProps = Omit<\n React.ComponentProps<\"p\">,\n \"className\"\n> & {\n className?: string\n variant?: FieldDescriptionVariant\n}\n\nexport const FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n FieldDescriptionProps\n>(function FieldDescription({ className, variant = \"default\", ...props }, ref) {\n const styles = useStyles()\n\n const variantStyle =\n variant === \"helper\" ? styles.descriptionHelper : styles.descriptionDefault\n\n return (\n <FieldDescriptionBase\n ref={ref}\n data-slot=\"field-description\"\n {...{ [SLOT_ATTR]: \"field-description\" }}\n className={mergeClasses(styles.description, variantStyle, className)}\n {...props}\n />\n )\n})\n\nexport type FieldErrorProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n errors?: Array<{ message?: string } | undefined>\n}\n\nexport const FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\n function FieldError({ className, children, errors, ...props }, ref) {\n const styles = useStyles()\n\n const content = React.useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className={styles.errorList}>\n {uniqueErrors.map(\n (error, index) =>\n error?.message && (\n <li className={styles.errorListItem} key={index}>\n {error.message}\n </li>\n )\n )}\n </ul>\n )\n }, [children, errors, styles.errorList, styles.errorListItem])\n\n if (!content) {\n return null\n }\n\n return (\n <FieldErrorBase\n ref={ref}\n role=\"alert\"\n data-slot=\"field-error\"\n {...{ [SLOT_ATTR]: \"field-error\" }}\n className={mergeClasses(styles.error, className)}\n {...props}\n >\n {content}\n </FieldErrorBase>\n )\n }\n)\n\nexport type FieldInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldInput = React.forwardRef<HTMLInputElement, FieldInputProps>(\n function FieldInput({ className, ...props }, forwardedRef) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n return (\n <FieldControlBase\n ref={(el: HTMLElement | null) => {\n inputRef.current = el as HTMLInputElement | null\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el as HTMLInputElement)\n } else if (forwardedRef) {\n forwardedRef.current = el as HTMLInputElement | null\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-input\"\n {...{ [SLOT_ATTR]: \"field-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldInputGroupProps = React.ComponentProps<\"div\">\n\nexport const FieldInputGroup = React.forwardRef<\n HTMLDivElement,\n FieldInputGroupProps\n>(function FieldInputGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-input-group\"\n {...{ [SLOT_ATTR]: \"field-input-group\" }}\n className={mergeClasses(styles.inputGroup, className)}\n {...props}\n />\n )\n})\n\nexport type FieldTextareaResize = \"none\" | \"vertical\" | \"horizontal\"\n\nexport type FieldTextareaProps = React.ComponentProps<\"textarea\"> & {\n resize?: FieldTextareaResize\n}\n\nexport const FieldTextarea = React.forwardRef<\n HTMLTextAreaElement,\n FieldTextareaProps\n>(function FieldTextarea(\n { className, resize = \"none\", ...props },\n forwardedRef\n) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n const resizeStyle =\n resize === \"vertical\"\n ? styles.resizeVertical\n : resize === \"horizontal\"\n ? styles.resizeHorizontal\n : styles.resizeNone\n\n return (\n <textarea\n {...props}\n ref={(el: HTMLTextAreaElement | null) => {\n inputRef.current = el\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-textarea\"\n {...{ [SLOT_ATTR]: \"field-textarea\" }}\n data-resize={resize}\n className={mergeClasses(styles.textarea, resizeStyle, className)}\n />\n )\n})\n\nexport type FieldGroupAddonAlign = \"start\" | \"end\"\n\nexport const inputGroupAddonVariants = ({\n align = \"start\",\n}: { align?: FieldGroupAddonAlign } = {}) => {\n return align\n}\n\nexport type FieldGroupAddonProps = React.ComponentProps<\"div\"> & {\n align?: FieldGroupAddonAlign\n}\n\nexport const FieldGroupAddon = React.forwardRef<\n HTMLDivElement,\n FieldGroupAddonProps\n>(function FieldGroupAddon({ className, align = \"start\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"input-group-addon\"\n {...{ [SLOT_ATTR]: \"input-group-addon\" }}\n data-align={align}\n className={mergeClasses(\n styles.addon,\n align === \"end\" ? styles.addonEnd : styles.addonStart,\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["FieldRootBase","FieldLabelBase","FieldControlBase","FieldDescriptionBase","FieldErrorBase","FieldContext","React","useFieldContext","context","useOptionalFieldContext","useStyles","makeZenithStyles","tokens.fieldPaddingY","tokens.fieldPaddingX","shorthands","tokens.spacingElement1","tokens.radiusLg","tokens.semFocusRing","tokens.semErrorSoft","SLOT_ATTR","tokens.grayA3","tokens.grayA4","tokens.accentA3","tokens.accentA4","tokens.errorA4","tokens.fieldSetGap","tokens.spacingElement2","tokens.textXs","tokens.leadingXs","tokens.grayA12","tokens.fontWeightNormal","tokens.grayA11","tokens.semErrorOnSoft","tokens.fieldInputHeight","tokens.textSm","tokens.leadingSm","tokens.grayA8","fieldVariants","variant","Field","className","children","onFocusCapture","onBlurCapture","props","ref","styles","inputRef","isFocused","setIsFocused","handleFocusCapture","event","handleBlurCapture","variantStyle","jsx","mergeClasses","FieldSet","FieldGroup","direction","FieldContent","FieldLabel","FieldLabelContent","showOnHover","fieldDescriptionVariants","FieldDescription","FieldError","errors","content","uniqueErrors","error","_a","index","FieldInput","forwardedRef","el","FieldInputGroup","FieldTextarea","resize","resizeStyle","inputGroupAddonVariants","align","FieldGroupAddon"],"mappings":";;;;;AAsBA,MAAMA,IAAgB,OAChBC,IAAiB,SACjBC,IAAmB,SACnBC,IAAuB,KACvBC,IAAiB,OAajBC,IAAeC,EAAM,cAAwC,IAAI,GAE1DC,IAAkB,MAAM;AACnC,QAAMC,IAAUF,EAAM,WAAWD,CAAY;AAC7C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAWaC,KAA0B,MACrCH,EAAM,WAAWD,CAAY,GAIzBK,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMP,YAAYC;AAAAA,IACZ,eAAeA;AAAAA,IACf,aAAaC;AAAAA,IACb,cAAcA;AAAAA,IACd,GAAGC,EAAW,IAAIC,CAAsB;AAAA,IACxC,GAAGD,EAAW,aAAaE,CAAe;AAAA,IAC1C,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,IACpB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd,2CAA2C;AAAA,MACzC,oBAAoB;AAAA,IAAA;AAAA,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C,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrE,CAAC,GAIYuC,KAA0B,CAAC;AAAA,EACtC,OAAAC,IAAQ;AACV,IAAsC,OAC7BA,GAOIC,KAAkB3E,EAAM,WAGnC,SAAyB,EAAE,WAAAkC,GAAW,OAAAwC,IAAQ,SAAS,GAAGpC,EAAA,GAASC,GAAK;AACxE,QAAMC,IAASpC,EAAA;AAEf,SACE,gBAAA4C;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAT;AAAA,MACA,MAAK;AAAA,MACL,aAAU;AAAA,MACJ,CAAC1B,CAAS,GAAG;AAAA,MACnB,cAAY6D;AAAA,MACZ,WAAWzB;AAAA,QACTT,EAAO;AAAA,QACPkC,MAAU,QAAQlC,EAAO,WAAWA,EAAO;AAAA,QAC3CN;AAAA,MAAA;AAAA,MAED,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
1
+ {"version":3,"file":"field.js","sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Plain elements, not a primitive. v1's Field uses no Radix primitive at all — it is a custom\n * implementation with its own context, and v2 already had the same context (`FieldContext`,\n * carrying `inputRef`).\n */\nconst FieldRootBase = \"div\" as const\nconst FieldLabelBase = \"label\" as const\nconst FieldControlBase = \"input\" as const\nconst FieldDescriptionBase = \"p\" as const\nconst FieldErrorBase = \"div\" as const\n\nexport type FieldInputRef =\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | HTMLButtonElement\n | null\n\nexport interface FieldContextValue {\n inputRef: React.RefObject<FieldInputRef>\n}\n\nconst FieldContext = React.createContext<FieldContextValue | null>(null)\n\nexport const useFieldContext = () => {\n const context = React.useContext(FieldContext)\n if (!context) {\n throw new Error(\"FieldInput must be used within a Field component\")\n }\n return context\n}\n\n/**\n * Field context when there is one, `null` otherwise — for parts that work both inside and outside\n * a Field.\n */\nexport const useOptionalFieldContext = (): FieldContextValue | null =>\n React.useContext(FieldContext)\n\nexport type FieldVariant = \"default\" | \"highlight\" | \"readonly\" | \"destructive\"\n\nconst useStyles = makeZenithStyles({\n root: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3, WP9B1-ACCEPTANCE-WP9B2A): normal resolves to the same\n // spacingElement2/spacingElement3 values this used before binding — `spacingGroup1` (0.5rem)\n // is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by\n // reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases\n // spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).\n paddingTop: tokens.fieldPaddingY,\n paddingBottom: tokens.fieldPaddingY,\n paddingLeft: tokens.fieldPaddingX,\n paddingRight: tokens.fieldPaddingX,\n ...shorthands.gap(tokens.spacingElement1),\n ...shorthands.borderRadius(tokens.radiusLg),\n transitionProperty: \"all\",\n transitionDuration: \"75ms\",\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"none\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineStyle: \"solid\",\n outlineColor: tokens.focusRing,\n },\n \"&[data-invalid]\": {\n backgroundColor: tokens.errorSoft,\n },\n\n // Label's disabled styling, declared here because Field owns the elements these selectors are\n // rooted at. On Label they were written as \"[data-disabled] &\", \":disabled ~ &\" and\n // \"[data-disabled] ~ &\"; Griffel does not substitute `&` in that position and emits\n // `.hash<selector> .hash`, which never matches, so a label in a disabled field never dimmed.\n // See src/ancestor-selector.test.ts.\n [`&[data-disabled] [${SLOT_ATTR}=\"label\"]`]: {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n [`& :disabled ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n [`& [data-disabled] ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n rootDefault: {\n backgroundColor: tokens.grayA3,\n \":hover\": {\n backgroundColor: tokens.grayA4,\n },\n },\n rootHighlight: {\n backgroundColor: tokens.accentA3,\n \":hover\": {\n backgroundColor: tokens.accentA4,\n },\n },\n rootReadonly: {\n backgroundColor: tokens.grayA3,\n },\n rootDestructive: {\n backgroundColor: tokens.errorSoft,\n \":hover\": {\n backgroundColor: tokens.errorA4,\n },\n },\n fieldSet: {\n display: \"flex\",\n flexDirection: \"column\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same spacingLayout2 (32px)\n // this used before binding.\n ...shorthands.gap(tokens.fieldSetGap),\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n fieldGroup: {\n display: \"flex\",\n width: \"100%\",\n ...shorthands.gap(tokens.spacingElement2),\n },\n fieldGroupColumn: {\n flexDirection: \"column\",\n },\n fieldGroupRow: {\n flexDirection: \"row\",\n },\n fieldContent: {\n display: \"flex\",\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(tokens.spacingElement2),\n lineHeight: \"1.375\",\n },\n label: {\n minHeight: \"1rem\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n display: \"flex\",\n width: \"fit-content\",\n ...shorthands.gap(tokens.spacingElement2),\n cursor: \"default\",\n color: tokens.grayA12,\n \"&[data-disabled]\": {\n opacity: 0.5,\n },\n },\n labelContent: {\n display: \"inline-flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n transitionProperty: \"opacity\",\n transitionDuration: \"150ms\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n },\n labelContentHover: {\n width: 0,\n height: 0,\n overflowX: \"visible\",\n overflowY: \"visible\",\n opacity: 0,\n pointerEvents: \"none\",\n },\n description: {\n fontSize: tokens.textXs,\n lineHeight: \"1.5\",\n fontWeight: tokens.fontWeightNormal,\n ...shorthands.margin(0),\n \"& a\": {\n textDecorationLine: \"underline\",\n textUnderlineOffset: \"4px\",\n },\n },\n descriptionDefault: {\n color: tokens.grayA12,\n },\n descriptionHelper: {\n color: tokens.grayA11,\n },\n error: {\n color: tokens.errorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n },\n errorList: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.margin(0),\n paddingLeft: \"1.25rem\",\n listStyleType: \"disc\",\n },\n errorListItem: {\n color: tokens.errorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n marginTop: \"0.25rem\",\n marginBottom: \"0.25rem\",\n },\n input: {\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same \"1.5rem\" this used before\n // binding. FieldComboboxInput (field-combobox.tsx) has its OWN separate makeZenithStyles call\n // and its own unrelated \"input\" key (width: \"100%\" only, no height) — this binding does not\n // reach it; review corrected an earlier claim that it did.\n height: tokens.fieldInputHeight,\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n inputGroup: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n width: \"100%\",\n },\n textarea: {\n width: \"100%\",\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n resizeNone: {\n resize: \"none\",\n },\n resizeVertical: {\n resize: \"vertical\",\n },\n resizeHorizontal: {\n resize: \"horizontal\",\n },\n addon: {\n color: tokens.grayA11,\n display: \"flex\",\n height: \"auto\",\n cursor: \"text\",\n whiteSpace: \"nowrap\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightNormal,\n userSelect: \"none\",\n },\n addonStart: {\n order: -1,\n },\n addonEnd: {\n order: 1,\n },\n})\n\n// fieldVariants helper for v1 API compatibility\nexport const fieldVariants = ({\n variant = \"default\",\n}: { variant?: FieldVariant } = {}) => {\n return variant\n}\n\nexport type FieldProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n variant?: FieldVariant\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(\n {\n className,\n variant = \"default\",\n children,\n onFocusCapture,\n onBlurCapture,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const inputRef = React.useRef<FieldInputRef>(null)\n const [isFocused, setIsFocused] = React.useState(false)\n\n const handleFocusCapture: React.ComponentProps<\"div\">[\"onFocusCapture\"] = (\n event\n ) => {\n setIsFocused(true)\n onFocusCapture?.(event)\n }\n\n const handleBlurCapture: React.ComponentProps<\"div\">[\"onBlurCapture\"] = (\n event\n ) => {\n setIsFocused(false)\n onBlurCapture?.(event)\n }\n\n const variantStyle =\n variant === \"highlight\"\n ? styles.rootHighlight\n : variant === \"readonly\"\n ? styles.rootReadonly\n : variant === \"destructive\"\n ? styles.rootDestructive\n : styles.rootDefault\n\n return (\n <FieldContext.Provider value={{ inputRef }}>\n <FieldRootBase\n ref={ref}\n role=\"group\"\n data-slot=\"field\"\n {...{ [SLOT_ATTR]: \"field\" }}\n data-focused={isFocused ? \"true\" : \"false\"}\n className={mergeClasses(styles.root, variantStyle, className)}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n {...props}\n >\n {children}\n </FieldRootBase>\n </FieldContext.Provider>\n )\n }\n)\n\nexport type FieldSetProps = React.ComponentProps<\"fieldset\">\n\nexport const FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\n function FieldSet({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <fieldset\n ref={ref}\n data-slot=\"field-set\"\n {...{ [SLOT_ATTR]: \"field-set\" }}\n className={mergeClasses(styles.fieldSet, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldGroupProps = React.ComponentProps<\"div\"> & {\n direction?: \"column\" | \"row\"\n}\n\nexport const FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\n function FieldGroup({ className, direction = \"column\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n {...{ [SLOT_ATTR]: \"field-group\" }}\n className={mergeClasses(\n styles.fieldGroup,\n direction === \"row\" ? styles.fieldGroupRow : styles.fieldGroupColumn,\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport type FieldContentProps = React.ComponentProps<\"div\">\n\nexport const FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\n function FieldContent({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-content\"\n {...{ [SLOT_ATTR]: \"field-content\" }}\n className={mergeClasses(styles.fieldContent, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelProps = Omit<\n React.ComponentProps<\"label\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\n function FieldLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <FieldLabelBase\n ref={ref}\n data-slot=\"field-label\"\n {...{ [SLOT_ATTR]: \"field-label\" }}\n className={mergeClasses(styles.label, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelContentProps = React.ComponentProps<\"div\"> & {\n showOnHover?: boolean\n}\n\nexport const FieldLabelContent = React.forwardRef<\n HTMLDivElement,\n FieldLabelContentProps\n>(function FieldLabelContent({ className, showOnHover = true, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-label-content\"\n {...{ [SLOT_ATTR]: \"field-label-content\" }}\n className={mergeClasses(\n styles.labelContent,\n showOnHover && styles.labelContentHover,\n className\n )}\n {...props}\n />\n )\n})\n\nexport type FieldDescriptionVariant = \"default\" | \"helper\"\n\nexport const fieldDescriptionVariants = ({\n variant = \"default\",\n}: { variant?: FieldDescriptionVariant } = {}) => {\n return variant\n}\n\nexport type FieldDescriptionProps = Omit<\n React.ComponentProps<\"p\">,\n \"className\"\n> & {\n className?: string\n variant?: FieldDescriptionVariant\n}\n\nexport const FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n FieldDescriptionProps\n>(function FieldDescription({ className, variant = \"default\", ...props }, ref) {\n const styles = useStyles()\n\n const variantStyle =\n variant === \"helper\" ? styles.descriptionHelper : styles.descriptionDefault\n\n return (\n <FieldDescriptionBase\n ref={ref}\n data-slot=\"field-description\"\n {...{ [SLOT_ATTR]: \"field-description\" }}\n className={mergeClasses(styles.description, variantStyle, className)}\n {...props}\n />\n )\n})\n\nexport type FieldErrorProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n errors?: Array<{ message?: string } | undefined>\n}\n\nexport const FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\n function FieldError({ className, children, errors, ...props }, ref) {\n const styles = useStyles()\n\n const content = React.useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className={styles.errorList}>\n {uniqueErrors.map(\n (error, index) =>\n error?.message && (\n <li className={styles.errorListItem} key={index}>\n {error.message}\n </li>\n )\n )}\n </ul>\n )\n }, [children, errors, styles.errorList, styles.errorListItem])\n\n if (!content) {\n return null\n }\n\n return (\n <FieldErrorBase\n ref={ref}\n role=\"alert\"\n data-slot=\"field-error\"\n {...{ [SLOT_ATTR]: \"field-error\" }}\n className={mergeClasses(styles.error, className)}\n {...props}\n >\n {content}\n </FieldErrorBase>\n )\n }\n)\n\nexport type FieldInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldInput = React.forwardRef<HTMLInputElement, FieldInputProps>(\n function FieldInput({ className, ...props }, forwardedRef) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n return (\n <FieldControlBase\n ref={(el: HTMLElement | null) => {\n inputRef.current = el as HTMLInputElement | null\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el as HTMLInputElement)\n } else if (forwardedRef) {\n forwardedRef.current = el as HTMLInputElement | null\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-input\"\n {...{ [SLOT_ATTR]: \"field-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldInputGroupProps = React.ComponentProps<\"div\">\n\nexport const FieldInputGroup = React.forwardRef<\n HTMLDivElement,\n FieldInputGroupProps\n>(function FieldInputGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-input-group\"\n {...{ [SLOT_ATTR]: \"field-input-group\" }}\n className={mergeClasses(styles.inputGroup, className)}\n {...props}\n />\n )\n})\n\nexport type FieldTextareaResize = \"none\" | \"vertical\" | \"horizontal\"\n\nexport type FieldTextareaProps = React.ComponentProps<\"textarea\"> & {\n resize?: FieldTextareaResize\n}\n\nexport const FieldTextarea = React.forwardRef<\n HTMLTextAreaElement,\n FieldTextareaProps\n>(function FieldTextarea(\n { className, resize = \"none\", ...props },\n forwardedRef\n) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n const resizeStyle =\n resize === \"vertical\"\n ? styles.resizeVertical\n : resize === \"horizontal\"\n ? styles.resizeHorizontal\n : styles.resizeNone\n\n return (\n <textarea\n {...props}\n ref={(el: HTMLTextAreaElement | null) => {\n inputRef.current = el\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-textarea\"\n {...{ [SLOT_ATTR]: \"field-textarea\" }}\n data-resize={resize}\n className={mergeClasses(styles.textarea, resizeStyle, className)}\n />\n )\n})\n\nexport type FieldGroupAddonAlign = \"start\" | \"end\"\n\nexport const inputGroupAddonVariants = ({\n align = \"start\",\n}: { align?: FieldGroupAddonAlign } = {}) => {\n return align\n}\n\nexport type FieldGroupAddonProps = React.ComponentProps<\"div\"> & {\n align?: FieldGroupAddonAlign\n}\n\nexport const FieldGroupAddon = React.forwardRef<\n HTMLDivElement,\n FieldGroupAddonProps\n>(function FieldGroupAddon({ className, align = \"start\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"input-group-addon\"\n {...{ [SLOT_ATTR]: \"input-group-addon\" }}\n data-align={align}\n className={mergeClasses(\n styles.addon,\n align === \"end\" ? styles.addonEnd : styles.addonStart,\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["FieldRootBase","FieldLabelBase","FieldControlBase","FieldDescriptionBase","FieldErrorBase","FieldContext","React","useFieldContext","context","useOptionalFieldContext","useStyles","makeZenithStyles","tokens.fieldPaddingY","tokens.fieldPaddingX","shorthands","tokens.spacingElement1","tokens.radiusLg","tokens.focusRing","tokens.errorSoft","SLOT_ATTR","tokens.grayA3","tokens.grayA4","tokens.accentA3","tokens.accentA4","tokens.errorA4","tokens.fieldSetGap","tokens.spacingElement2","tokens.textXs","tokens.leadingXs","tokens.grayA12","tokens.fontWeightNormal","tokens.grayA11","tokens.errorOnSoft","tokens.fieldInputHeight","tokens.textSm","tokens.leadingSm","tokens.grayA8","fieldVariants","variant","Field","className","children","onFocusCapture","onBlurCapture","props","ref","styles","inputRef","isFocused","setIsFocused","handleFocusCapture","event","handleBlurCapture","variantStyle","jsx","mergeClasses","FieldSet","FieldGroup","direction","FieldContent","FieldLabel","FieldLabelContent","showOnHover","fieldDescriptionVariants","FieldDescription","FieldError","errors","content","uniqueErrors","error","_a","index","FieldInput","forwardedRef","el","FieldInputGroup","FieldTextarea","resize","resizeStyle","inputGroupAddonVariants","align","FieldGroupAddon"],"mappings":";;;;;AAaA,MAAMA,IAAgB,OAChBC,IAAiB,SACjBC,IAAmB,SACnBC,IAAuB,KACvBC,IAAiB,OAajBC,IAAeC,EAAM,cAAwC,IAAI,GAE1DC,IAAkB,MAAM;AACnC,QAAMC,IAAUF,EAAM,WAAWD,CAAY;AAC7C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAMaC,KAA0B,MACrCH,EAAM,WAAWD,CAAY,GAIzBK,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMP,YAAYC;AAAAA,IACZ,eAAeA;AAAAA,IACf,aAAaC;AAAAA,IACb,cAAcA;AAAAA,IACd,GAAGC,EAAW,IAAIC,CAAsB;AAAA,IACxC,GAAGD,EAAW,aAAaE,CAAe;AAAA,IAC1C,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,IACpB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd,2CAA2C;AAAA,MACzC,oBAAoB;AAAA,IAAA;AAAA,IAEtB,iDAAiD;AAAA,MAC/C,cAAc;AAAA,MACd,cAAcC;AAAAA,IAAO;AAAA,IAEvB,mBAAmB;AAAA,MACjB,iBAAiBC;AAAAA,IAAO;AAAA;AAAA;AAAA;A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C,SAAyB,EAAE,WAAAkC,GAAW,OAAAwC,IAAQ,SAAS,GAAGpC,EAAA,GAASC,GAAK;AACxE,QAAMC,IAASpC,EAAA;AAEf,SACE,gBAAA4C;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAT;AAAA,MACA,MAAK;AAAA,MACL,aAAU;AAAA,MACJ,CAAC1B,CAAS,GAAG;AAAA,MACnB,cAAY6D;AAAA,MACZ,WAAWzB;AAAA,QACTT,EAAO;AAAA,QACPkC,MAAU,QAAQlC,EAAO,WAAWA,EAAO;AAAA,QAC3CN;AAAA,MAAA;AAAA,MAED,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
@@ -10,40 +10,12 @@ const A = g({
10
10
  ...f.gap(z),
11
11
  // The leading lives on the size slots below, and which value it takes is a decided question --
12
12
  // see DECISIONS.md D9 and the label specimens in vr/specimens that pin it.
13
- //
14
- // v1's source string is `text-sm leading-none`, and `leading-none` never reaches the DOM: v1's
15
- // cn() runs tailwind-merge, which treats the later `text-sm` as also owning line-height (true in
16
- // Tailwind v3) and drops it. So the class that actually ships is `.volt-text-sm`, and what v1
17
- // DECLARES for a label is text-sm's own leading -- 1.25rem at the base size, not 1.
18
- //
19
- // v1 never renders that either. `.volt-text-sm` reads
20
- // line-height: var(--volt-leading, var(--text-sm--line-height))
21
- // and neither name resolves in the shipped sheet: the prefixer rewrote the DEFINITION to
22
- // --volt-text-sm--line-height and left this REFERENCE unprefixed, so the declaration is invalid
23
- // and falls back to inherited -- 1.5 under root-config's Tailwind preflight, i.e. 21px at 14px.
24
- //
25
- // v2 renders the declared intent: `lineHeight: tokens.leadingSm` at size `base`, paired with the
26
- // size the same way every other text slot in this package now is. Against what broken v1 renders
27
- // that is 2px shorter per line at `sm`, 1px shorter at `base` and identical at `lg` -- small, but
28
- // a real re-measure for a form, which is why D9 exists. The VR harness compares against
29
- // v1-as-DECLARED via one documented shim on the v1 arm.
30
- //
31
- // Two v1 bugs compound here -- the unprefixed prefixer reference and the tailwind-merge drop --
32
- // and both belong in a STABLE360 ticket against v1. When v1 is fixed, delete the VR shim (see
33
- // vr/run.mjs V1_DECLARED_LEADING_SHIM); vr/v1-leading-references.test.ts fails on purpose to
34
- // force that, so the decision gets revisited together with the fix rather than silently.
35
13
  fontWeight: u,
36
14
  "&[for]": {
37
15
  cursor: "pointer"
38
16
  },
39
17
  // The disabled-by-ANCESTOR and disabled-by-SIBLING rules are not here; they live on Field,
40
18
  // which owns the elements those selectors are rooted at. See field.tsx.
41
- //
42
- // v1 expresses them with Tailwind's `group-data-[disabled=true]:` and `peer-disabled:`, which
43
- // work only because Tailwind emits GLOBAL utility classes that can be rooted anywhere. Scoped
44
- // atomic CSS cannot: a rule has to be declared by the component that owns the element the
45
- // selector starts from. That is a real capability difference, and the consequence is recorded in
46
- // field.tsx — a Label used OUTSIDE a Field, next to a disabled input, will not dim.
47
19
  "&[data-disabled]": {
48
20
  pointerEvents: "none",
49
21
  opacity: 0.5
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Label — a native `<label>` element styled with Griffel atoms.\n *\n * Base UI has no Label primitive; v1 wrapped `@radix-ui/react-label`, which only added an\n * `onMouseDown` handler preventing text selection on double click while wrapping a `<label>`\n * to wire `htmlFor`. A native `<label>` natively associates with form controls via `htmlFor` or\n * nesting, so we render a native `<label>` directly with no Base UI or Radix dependency.\n *\n * Variants: `primary` (`gray-a12`) and `destructive` (`error-a12`), both from the core token\n * sheet so no palette install is required.\n *\n * Sizes: `sm` (`text-xs`), `base` (`text-sm`), and `lg` (`text-base`).\n */\n\nexport type LabelVariant = \"primary\" | \"destructive\"\nexport type LabelSize = \"sm\" | \"base\" | \"lg\"\n\nconst useStyles = makeZenithStyles({\n root: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n // The leading lives on the size slots below, and which value it takes is a decided question --\n // see DECISIONS.md D9 and the label specimens in vr/specimens that pin it.\n //\n // v1's source string is `text-sm leading-none`, and `leading-none` never reaches the DOM: v1's\n // cn() runs tailwind-merge, which treats the later `text-sm` as also owning line-height (true in\n // Tailwind v3) and drops it. So the class that actually ships is `.volt-text-sm`, and what v1\n // DECLARES for a label is text-sm's own leading -- 1.25rem at the base size, not 1.\n //\n // v1 never renders that either. `.volt-text-sm` reads\n // line-height: var(--volt-leading, var(--text-sm--line-height))\n // and neither name resolves in the shipped sheet: the prefixer rewrote the DEFINITION to\n // --volt-text-sm--line-height and left this REFERENCE unprefixed, so the declaration is invalid\n // and falls back to inherited -- 1.5 under root-config's Tailwind preflight, i.e. 21px at 14px.\n //\n // v2 renders the declared intent: `lineHeight: tokens.leadingSm` at size `base`, paired with the\n // size the same way every other text slot in this package now is. Against what broken v1 renders\n // that is 2px shorter per line at `sm`, 1px shorter at `base` and identical at `lg` -- small, but\n // a real re-measure for a form, which is why D9 exists. The VR harness compares against\n // v1-as-DECLARED via one documented shim on the v1 arm.\n //\n // Two v1 bugs compound here -- the unprefixed prefixer reference and the tailwind-merge drop --\n // and both belong in a STABLE360 ticket against v1. When v1 is fixed, delete the VR shim (see\n // vr/run.mjs V1_DECLARED_LEADING_SHIM); vr/v1-leading-references.test.ts fails on purpose to\n // force that, so the decision gets revisited together with the fix rather than silently.\n fontWeight: tokens.fontWeightNormal,\n \"&[for]\": {\n cursor: \"pointer\",\n },\n // The disabled-by-ANCESTOR and disabled-by-SIBLING rules are not here; they live on Field,\n // which owns the elements those selectors are rooted at. See field.tsx.\n //\n // v1 expresses them with Tailwind's `group-data-[disabled=true]:` and `peer-disabled:`, which\n // work only because Tailwind emits GLOBAL utility classes that can be rooted anywhere. Scoped\n // atomic CSS cannot: a rule has to be declared by the component that owns the element the\n // selector starts from. That is a real capability difference, and the consequence is recorded in\n // field.tsx — a Label used OUTSIDE a Field, next to a disabled input, will not dim.\n \"&[data-disabled]\": {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n },\n // Variants\n primary: {\n color: tokens.grayA12,\n },\n destructive: {\n color: tokens.errorA12,\n },\n // Sizes\n sm: {\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n },\n base: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n },\n lg: {\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n },\n})\n\nexport type LabelProps = React.ComponentProps<\"label\"> & {\n variant?: LabelVariant\n size?: LabelSize\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n function Label(\n { variant = \"primary\", size = \"base\", className, ...props },\n ref\n ) {\n const styles = useStyles()\n\n return (\n <label\n ref={ref}\n data-slot=\"label\"\n {...{ [SLOT_ATTR]: \"label\" }}\n className={mergeClasses(\n styles.root,\n styles[variant],\n styles[size],\n className\n )}\n {...props}\n />\n )\n }\n)\n"],"names":["useStyles","makeZenithStyles","shorthands","tokens.spacingElement2","tokens.fontWeightNormal","tokens.grayA12","tokens.errorA12","tokens.textXs","tokens.leadingXs","tokens.textSm","tokens.leadingSm","tokens.textBase","tokens.leadingBase","Label","React","variant","size","className","props","ref","styles","jsx","SLOT_ATTR","mergeClasses"],"mappings":";;;;;AAyBA,MAAMA,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,GAAGC,EAAW,IAAIC,CAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAyBxC,YAAYC;AAAAA,IACZ,UAAU;AAAA,MACR,QAAQ;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUV,oBAAoB;AAAA,MAClB,eAAe;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAAA;AAAA,EAGF,SAAS;AAAA,IACP,OAAOC;AAAAA,EAAO;AAAA,EAEhB,aAAa;AAAA,IACX,OAAOC;AAAAA,EAAO;AAAA;AAAA,EAGhB,IAAI;AAAA,IACF,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAAA,EAErB,MAAM;AAAA,IACJ,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAAA,EAErB,IAAI;AAAA,IACF,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAEvB,CAAC,GAOYC,IAAQC,EAAM;AAAA,EACzB,SACE,EAAE,SAAAC,IAAU,WAAW,MAAAC,IAAO,QAAQ,WAAAC,GAAW,GAAGC,EAAA,GACpDC,GACA;AACA,UAAMC,IAASpB,EAAA;AAEf,WACE,gBAAAqB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,aAAU;AAAA,QACJ,CAACG,CAAS,GAAG;AAAA,QACnB,WAAWC;AAAA,UACTH,EAAO;AAAA,UACPA,EAAOL,CAAO;AAAA,UACdK,EAAOJ,CAAI;AAAA,UACXC;AAAA,QAAA;AAAA,QAED,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}
1
+ {"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/** Label — a native `<label>` element styled with Griffel atoms. */\n\nexport type LabelVariant = \"primary\" | \"destructive\"\nexport type LabelSize = \"sm\" | \"base\" | \"lg\"\n\nconst useStyles = makeZenithStyles({\n root: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n // The leading lives on the size slots below, and which value it takes is a decided question --\n // see DECISIONS.md D9 and the label specimens in vr/specimens that pin it.\n fontWeight: tokens.fontWeightNormal,\n \"&[for]\": {\n cursor: \"pointer\",\n },\n // The disabled-by-ANCESTOR and disabled-by-SIBLING rules are not here; they live on Field,\n // which owns the elements those selectors are rooted at. See field.tsx.\n \"&[data-disabled]\": {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n },\n // Variants\n primary: {\n color: tokens.grayA12,\n },\n destructive: {\n color: tokens.errorA12,\n },\n // Sizes\n sm: {\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n },\n base: {\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n },\n lg: {\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n },\n})\n\nexport type LabelProps = React.ComponentProps<\"label\"> & {\n variant?: LabelVariant\n size?: LabelSize\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n function Label(\n { variant = \"primary\", size = \"base\", className, ...props },\n ref\n ) {\n const styles = useStyles()\n\n return (\n <label\n ref={ref}\n data-slot=\"label\"\n {...{ [SLOT_ATTR]: \"label\" }}\n className={mergeClasses(\n styles.root,\n styles[variant],\n styles[size],\n className\n )}\n {...props}\n />\n )\n }\n)\n"],"names":["useStyles","makeZenithStyles","shorthands","tokens.spacingElement2","tokens.fontWeightNormal","tokens.grayA12","tokens.errorA12","tokens.textXs","tokens.leadingXs","tokens.textSm","tokens.leadingSm","tokens.textBase","tokens.leadingBase","Label","React","variant","size","className","props","ref","styles","jsx","SLOT_ATTR","mergeClasses"],"mappings":";;;;;AAaA,MAAMA,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,GAAGC,EAAW,IAAIC,CAAsB;AAAA;AAAA;AAAA,IAGxC,YAAYC;AAAAA,IACZ,UAAU;AAAA,MACR,QAAQ;AAAA,IAAA;AAAA;AAAA;AAAA,IAIV,oBAAoB;AAAA,MAClB,eAAe;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAAA;AAAA,EAGF,SAAS;AAAA,IACP,OAAOC;AAAAA,EAAO;AAAA,EAEhB,aAAa;AAAA,IACX,OAAOC;AAAAA,EAAO;AAAA;AAAA,EAGhB,IAAI;AAAA,IACF,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAAA,EAErB,MAAM;AAAA,IACJ,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAAA,EAErB,IAAI;AAAA,IACF,UAAUC;AAAAA,IACV,YAAYC;AAAAA,EAAO;AAEvB,CAAC,GAOYC,IAAQC,EAAM;AAAA,EACzB,SACE,EAAE,SAAAC,IAAU,WAAW,MAAAC,IAAO,QAAQ,WAAAC,GAAW,GAAGC,EAAA,GACpDC,GACA;AACA,UAAMC,IAASpB,EAAA;AAEf,WACE,gBAAAqB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,aAAU;AAAA,QACJ,CAACG,CAAS,GAAG;AAAA,QACnB,WAAWC;AAAA,UACTH,EAAO;AAAA,UACPA,EAAOL,CAAO;AAAA,UACdK,EAAOJ,CAAI;AAAA,UACXC;AAAA,QAAA;AAAA,QAED,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}