@42-central/ui-react 0.27.0 → 0.29.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 (180) hide show
  1. package/dist/{chunk-5H5YOPCF.js → chunk-2RQLPN4U.js} +6 -6
  2. package/dist/{chunk-5H5YOPCF.js.map → chunk-2RQLPN4U.js.map} +1 -1
  3. package/dist/{chunk-SOUDKESO.js → chunk-37HYN7PC.js} +3 -3
  4. package/dist/{chunk-SOUDKESO.js.map → chunk-37HYN7PC.js.map} +1 -1
  5. package/dist/{chunk-OVT2KZHY.js → chunk-3KARNPW4.js} +3 -3
  6. package/dist/{chunk-OVT2KZHY.js.map → chunk-3KARNPW4.js.map} +1 -1
  7. package/dist/{chunk-Y2G47ARQ.js → chunk-5EOMSWNO.js} +5 -5
  8. package/dist/{chunk-Y2G47ARQ.js.map → chunk-5EOMSWNO.js.map} +1 -1
  9. package/dist/chunk-6B2GNPJP.js +43 -0
  10. package/dist/chunk-6B2GNPJP.js.map +1 -0
  11. package/dist/{chunk-MCRTAUSZ.js → chunk-7FPSQBWB.js} +3 -3
  12. package/dist/{chunk-MCRTAUSZ.js.map → chunk-7FPSQBWB.js.map} +1 -1
  13. package/dist/{chunk-6IRMKF5T.js → chunk-B4GNSSHU.js} +4 -4
  14. package/dist/{chunk-6IRMKF5T.js.map → chunk-B4GNSSHU.js.map} +1 -1
  15. package/dist/{chunk-BMEJBY6H.js → chunk-B5YHYI7E.js} +22 -27
  16. package/dist/chunk-B5YHYI7E.js.map +1 -0
  17. package/dist/{chunk-WERJ44ZN.js → chunk-DTFSCR3U.js} +3 -3
  18. package/dist/{chunk-WERJ44ZN.js.map → chunk-DTFSCR3U.js.map} +1 -1
  19. package/dist/{chunk-PFZMB3US.js → chunk-FQJNQW3G.js} +3 -3
  20. package/dist/{chunk-PFZMB3US.js.map → chunk-FQJNQW3G.js.map} +1 -1
  21. package/dist/{chunk-X3YIHN2U.js → chunk-FSPS7TVD.js} +5 -5
  22. package/dist/{chunk-X3YIHN2U.js.map → chunk-FSPS7TVD.js.map} +1 -1
  23. package/dist/{chunk-7OGZT7U2.js → chunk-G3AD3NJG.js} +3 -3
  24. package/dist/{chunk-7OGZT7U2.js.map → chunk-G3AD3NJG.js.map} +1 -1
  25. package/dist/{chunk-MNYY7UU2.js → chunk-GEZYGBXY.js} +6 -6
  26. package/dist/{chunk-MNYY7UU2.js.map → chunk-GEZYGBXY.js.map} +1 -1
  27. package/dist/{chunk-ULF5LOBS.js → chunk-HMNXNKDA.js} +3 -3
  28. package/dist/{chunk-ULF5LOBS.js.map → chunk-HMNXNKDA.js.map} +1 -1
  29. package/dist/{chunk-NF2PBGD3.js → chunk-IANYMDKH.js} +3 -3
  30. package/dist/{chunk-NF2PBGD3.js.map → chunk-IANYMDKH.js.map} +1 -1
  31. package/dist/{chunk-QEMXXQQO.js → chunk-JKFPRQB2.js} +3 -3
  32. package/dist/{chunk-QEMXXQQO.js.map → chunk-JKFPRQB2.js.map} +1 -1
  33. package/dist/{chunk-ZVECQBGG.js → chunk-KNGSO7A3.js} +41 -13
  34. package/dist/chunk-KNGSO7A3.js.map +1 -0
  35. package/dist/{chunk-L24N5EON.js → chunk-MQHD3EJE.js} +3 -3
  36. package/dist/{chunk-L24N5EON.js.map → chunk-MQHD3EJE.js.map} +1 -1
  37. package/dist/{chunk-IUK7OJXZ.js → chunk-OBSZ4NE2.js} +5 -4
  38. package/dist/chunk-OBSZ4NE2.js.map +1 -0
  39. package/dist/{chunk-DJ72KP32.js → chunk-OXR7BXZA.js} +3 -3
  40. package/dist/{chunk-DJ72KP32.js.map → chunk-OXR7BXZA.js.map} +1 -1
  41. package/dist/{chunk-LIZWCWED.js → chunk-PQZSTI3R.js} +3 -3
  42. package/dist/{chunk-LIZWCWED.js.map → chunk-PQZSTI3R.js.map} +1 -1
  43. package/dist/{chunk-LKFHUDEW.js → chunk-QVOBLRCM.js} +3 -3
  44. package/dist/{chunk-LKFHUDEW.js.map → chunk-QVOBLRCM.js.map} +1 -1
  45. package/dist/{chunk-E52Z2FKU.js → chunk-S5CQRCTF.js} +5 -5
  46. package/dist/{chunk-E52Z2FKU.js.map → chunk-S5CQRCTF.js.map} +1 -1
  47. package/dist/{chunk-SCXXJDKQ.js → chunk-SP6LCCTZ.js} +21 -28
  48. package/dist/chunk-SP6LCCTZ.js.map +1 -0
  49. package/dist/{chunk-BGDVUC3B.js → chunk-TUP7WXQE.js} +3 -3
  50. package/dist/{chunk-BGDVUC3B.js.map → chunk-TUP7WXQE.js.map} +1 -1
  51. package/dist/{chunk-4D2V4JE4.js → chunk-V2QZG4IT.js} +4 -4
  52. package/dist/{chunk-4D2V4JE4.js.map → chunk-V2QZG4IT.js.map} +1 -1
  53. package/dist/{chunk-D2QIPQ74.js → chunk-W3XX7BYT.js} +2 -2
  54. package/dist/chunk-W3XX7BYT.js.map +1 -0
  55. package/dist/{chunk-F374BNL4.js → chunk-YVTM2KRR.js} +12 -8
  56. package/dist/chunk-YVTM2KRR.js.map +1 -0
  57. package/dist/colors.css +328 -0
  58. package/dist/components/action-icon/action-icon.d.ts +6 -5
  59. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  60. package/dist/components/action-icon/index.js +3 -2
  61. package/dist/components/alert/index.js +3 -3
  62. package/dist/components/ambient-background/index.js +1 -1
  63. package/dist/components/app-shell/index.js +6 -5
  64. package/dist/components/app-shell/index.js.map +1 -1
  65. package/dist/components/avatar/index.js +2 -2
  66. package/dist/components/badge/badge.d.ts +1 -1
  67. package/dist/components/badge/badge.d.ts.map +1 -1
  68. package/dist/components/badge/index.js +2 -1
  69. package/dist/components/button/button.d.ts +11 -9
  70. package/dist/components/button/button.d.ts.map +1 -1
  71. package/dist/components/button/index.js +3 -2
  72. package/dist/components/button-multi-select/index.js +4 -3
  73. package/dist/components/button-multi-select/index.js.map +1 -1
  74. package/dist/components/button-select/index.js +4 -3
  75. package/dist/components/button-select/index.js.map +1 -1
  76. package/dist/components/calendar/index.js +6 -5
  77. package/dist/components/calendar-heatmap/index.js +2 -2
  78. package/dist/components/camera/index.js +8 -7
  79. package/dist/components/carousel/index.js +2 -2
  80. package/dist/components/clipboard/index.js +3 -2
  81. package/dist/components/clipboard/index.js.map +1 -1
  82. package/dist/components/code-block/index.js +1 -1
  83. package/dist/components/code-block/static.js.map +1 -1
  84. package/dist/components/compare/index.js +2 -2
  85. package/dist/components/data-table/index.js +16 -15
  86. package/dist/components/data-table/index.js.map +1 -1
  87. package/dist/components/date-picker/index.js +11 -10
  88. package/dist/components/date-picker/index.js.map +1 -1
  89. package/dist/components/download-button/index.js +4 -3
  90. package/dist/components/drawer/index.js +6 -5
  91. package/dist/components/file-item/index.js +7 -6
  92. package/dist/components/file-preview/index.js +7 -6
  93. package/dist/components/file-preview/index.js.map +1 -1
  94. package/dist/components/file-trigger/index.js +4 -3
  95. package/dist/components/file-upload/index.js +7 -6
  96. package/dist/components/file-upload/index.js.map +1 -1
  97. package/dist/components/gallery/index.js +2 -2
  98. package/dist/components/image-cropper/index.js +7 -6
  99. package/dist/components/indicator/index.js +1 -1
  100. package/dist/components/kbd/index.js +3 -3
  101. package/dist/components/lightbox/index.js +9 -8
  102. package/dist/components/lightbox/index.js.map +1 -1
  103. package/dist/components/menu/index.js +2 -2
  104. package/dist/components/modal/index.js +6 -5
  105. package/dist/components/multi-select/index.js +3 -3
  106. package/dist/components/notification/index.js +3 -3
  107. package/dist/components/overlays/index.js +8 -7
  108. package/dist/components/overlays/index.js.map +1 -1
  109. package/dist/components/password-input/index.js +1 -1
  110. package/dist/components/phone-input/flag.d.ts +9 -0
  111. package/dist/components/phone-input/flag.d.ts.map +1 -0
  112. package/dist/components/phone-input/index.d.ts +4 -0
  113. package/dist/components/phone-input/index.d.ts.map +1 -0
  114. package/dist/components/phone-input/index.js +503 -0
  115. package/dist/components/phone-input/index.js.map +1 -0
  116. package/dist/components/phone-input/phone-input.d.ts +125 -0
  117. package/dist/components/phone-input/phone-input.d.ts.map +1 -0
  118. package/dist/components/phone-input/phone.d.ts +117 -0
  119. package/dist/components/phone-input/phone.d.ts.map +1 -0
  120. package/dist/components/photo-capture/index.js +11 -10
  121. package/dist/components/photo-capture/index.js.map +1 -1
  122. package/dist/components/pills-input/index.js +3 -3
  123. package/dist/components/schedule/index.js +7 -6
  124. package/dist/components/schedule/index.js.map +1 -1
  125. package/dist/components/segment-group/index.js +3 -3
  126. package/dist/components/spinner/index.js +1 -1
  127. package/dist/components/spinner/spinner.d.ts +1 -1
  128. package/dist/components/spinner/spinner.d.ts.map +1 -1
  129. package/dist/components/spotlight/index.js +8 -7
  130. package/dist/components/spotlight/index.js.map +1 -1
  131. package/dist/components/tabs/index.js +3 -3
  132. package/dist/components/tags-input/index.js +3 -3
  133. package/dist/components/theme-icon/index.js +1 -1
  134. package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
  135. package/dist/components/time-input/index.js +4 -4
  136. package/dist/components/timeline/index.d.ts +1 -1
  137. package/dist/components/timeline/index.d.ts.map +1 -1
  138. package/dist/components/timeline/index.js +40 -11
  139. package/dist/components/timeline/index.js.map +1 -1
  140. package/dist/components/timeline/timeline.d.ts +8 -3
  141. package/dist/components/timeline/timeline.d.ts.map +1 -1
  142. package/dist/components/tree-multi-select/index.js +3 -3
  143. package/dist/index.js +4 -4
  144. package/dist/lib/button-colors.d.ts +25 -0
  145. package/dist/lib/button-colors.d.ts.map +1 -0
  146. package/dist/lib/dev-warn.d.ts +1 -0
  147. package/dist/lib/dev-warn.d.ts.map +1 -1
  148. package/dist/lib/intl.d.ts +5 -0
  149. package/dist/lib/intl.d.ts.map +1 -1
  150. package/package.json +3 -1
  151. package/src/as-child.contract.test.tsx +2 -0
  152. package/src/colors.css +328 -0
  153. package/src/components/action-icon/action-icon.test.tsx +22 -0
  154. package/src/components/action-icon/action-icon.tsx +24 -28
  155. package/src/components/badge/badge.test.tsx +53 -10
  156. package/src/components/badge/badge.tsx +64 -11
  157. package/src/components/button/button.test.tsx +41 -5
  158. package/src/components/button/button.tsx +28 -33
  159. package/src/components/phone-input/flag.tsx +86 -0
  160. package/src/components/phone-input/index.ts +14 -0
  161. package/src/components/phone-input/phone-input.test.tsx +285 -0
  162. package/src/components/phone-input/phone-input.tsx +527 -0
  163. package/src/components/phone-input/phone.test.ts +187 -0
  164. package/src/components/phone-input/phone.ts +298 -0
  165. package/src/components/spinner/spinner.tsx +3 -3
  166. package/src/components/theme-icon/theme-icon.test.tsx +7 -0
  167. package/src/components/theme-icon/theme-icon.tsx +10 -6
  168. package/src/components/timeline/index.ts +1 -0
  169. package/src/components/timeline/timeline.test.tsx +105 -4
  170. package/src/components/timeline/timeline.tsx +46 -11
  171. package/src/lib/button-colors.ts +55 -0
  172. package/src/lib/dev-warn.ts +1 -1
  173. package/src/lib/intl-direction.test.tsx +23 -0
  174. package/src/lib/intl.tsx +8 -2
  175. package/dist/chunk-BMEJBY6H.js.map +0 -1
  176. package/dist/chunk-D2QIPQ74.js.map +0 -1
  177. package/dist/chunk-F374BNL4.js.map +0 -1
  178. package/dist/chunk-IUK7OJXZ.js.map +0 -1
  179. package/dist/chunk-SCXXJDKQ.js.map +0 -1
  180. package/dist/chunk-ZVECQBGG.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/overlays/dialog-parts.tsx"],"names":[],"mappings":";;;;;;;;;;AAqCO,IAAM,cAAA,GAAuC;AAAA,EAClD,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,MAAA;AAAA,EACJ,EAAA,EAAI,SAAA;AAAA,EACJ,EAAA,EAAI,QAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAEA,IAAM,OAAA,GAAU;AAAA,EACd,KAAA,EAAO;AAAA,IACL,MAAA,EACE,sGAAA;AAAA,IACF,IAAA,EAAM,qDAAA;AAAA,IACN,MAAA,EACE,0FAAA;AAAA,IACF,SAAA,EAAW;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EACE,+FAAA;AAAA,IACF,IAAA,EAAM,sDAAA;AAAA,IACN,MAAA,EACE,4FAAA;AAAA,IACF,SAAA,EAAW;AAAA;AAEf,CAAA;AAKA,IAAM,aAAA,GAAmD;AAAA,EACvD,KAAA,kBAAO,GAAA,CAAC,KAAA,EAAA,EAAM,SAAA,EAAW,UAAA,EAAY;AACvC,CAAA;AAGA,IAAM,YAAA,GAAe,cAAc,aAAa,CAAA;AAKzC,IAAM,sBAAsB,CAAC;AAAA,EAClC,KAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,qBAKE,GAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAO,UAAA,CAAW,aAAA,EAAe,KAAK,CAAA,EAClD,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,MAAA,EAAS,QAAA,EAAS,CAAA,EACjD;AAeK,IAAM,iBAAA,GAAoB,CAC/B,OAAA,EACA,eAAA,KACG;AACH,EAAA,MAAM,MAAA,GAAS,QAAQ,OAAO,CAAA;AAE9B,EAAA,MAAM,eAAe,CAAC;AAAA,IACpB,QAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA,EAAc,SAAA;AAAA,IACd,MAAA;AAAA,IACA,OAAA;AAAA,IACA,GAAG;AAAA,GACL,KAA+B;AAC7B,IAAA,MAAM,KAAA,GAAQ,WAAW,YAAY,CAAA;AACrC,IAAA,OAAO,OAAA;AAAA;AAAA;AAAA,sBAGL,GAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAO,IAAA;AAAA,UACP,YAAA,EAAY,SAAA;AAAA,UACZ,SAAA;AAAA,UACC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,UAClC,GAAG,IAAA;AAAA,UAEH;AAAA;AAAA;AACH,wBAEA,GAAA,CAAC,eAAA,EAAA,EAAgB,OAAA,EAAO,IAAA,EAAE,GAAG,IAAA,EAC3B,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,QAAA;AAAA,QACR,KAAA,EAAM,SAAA;AAAA,QACN,MAAM,MAAA,CAAO,SAAA;AAAA,QACb,cAAY,SAAA,IAAa,OAAA;AAAA,QACzB,SAAA;AAAA,QACA,MAAA;AAAA,QAEC,sBAAY,KAAA,CAAM;AAAA;AAAA,KACrB,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,MAAM,MAAA,GAAS,CAAC,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,IAAA,EAAK,qBAC3C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,OAAO,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,CAAM,EAAE,eAAe,MAAA,EAAQ,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAGhG,EAAA,MAAM,IAAA,GAAO,CAAC,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,IAAA,EAAK,qBACzC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,OAAO,IAAA,EAAM,SAAS,CAAA,EAAI,GAAG,KAAA,CAAM,EAAE,eAAe,MAAA,EAAQ,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAG9F,EAAA,MAAM,MAAA,GAAS,CAAC,EAAE,SAAA,EAAW,MAAA,EAAQ,GAAG,IAAA,EAAK,qBAC3C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,OAAO,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,CAAM,EAAE,eAAe,MAAA,EAAQ,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAGhG,EAAA,OAAO,EAAE,YAAA,EAAc,MAAA,EAAQ,IAAA,EAAM,MAAA,EAAO;AAC9C;AAIA,IAAM,iBAAA,GAAoB,CAAC,IAAA,KACzB,CAAC,CAAC,IAAA,CAAK,YAAA,CAAa,YAAY,CAAA,EAAG,IAAA,EAAK,IAAA,CACvC,IAAA,CAAK,YAAA,CAAa,iBAAiB,CAAA,IAAK,EAAA,EACtC,KAAA,CAAM,KAAK,CAAA,CACX,IAAA,CAAK,CAAC,EAAA,KAAO,EAAA,KAAO,EAAA,IAAM,IAAA,CAAK,aAAA,CAAc,cAAA,CAAe,EAAE,MAAM,IAAI,CAAA;AActE,IAAM,kBAAA,GAAqB,CAAC,SAAA,KAAkC;AACnE,EAAA,MAAM,MAAA,GAAS,OAAO,KAAK,CAAA;AAC3B,EAAA,OAAO,WAAA;AAAA,IACL,CAAC,IAAA,KAA6B;AAC5B,MAAA,IAAI,CAAC,IAAA,IAAQ,MAAA,CAAO,OAAA,EAAS;AAG7B,MAAA,qBAAA,CAAsB,MAAM;AAC1B,QAAA,IAAI,OAAO,OAAA,IAAW,CAAC,KAAK,WAAA,IAAe,iBAAA,CAAkB,IAAI,CAAA,EAAG;AACpE,QAAA,MAAA,CAAO,OAAA,GAAU,IAAA;AACjB,QAAA,OAAA;AAAA,UACE,CAAA,CAAA,EAAI,SAAS,CAAA,mHAAA,EACwC,SAAS,CAAA,wEAAA;AAAA,SAEhE;AAAA,MACF,CAAC,CAAA;AAAA,IACH,CAAA;AAAA,IACA,CAAC,SAAS;AAAA,GACZ;AACF","file":"chunk-4D2V4JE4.js","sourcesContent":["\"use client\"\n\nimport type { HTMLArkProps } from \"@ark-ui/react/factory\"\nimport { XIcon } from \"lucide-react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type JSXElementConstructor,\n type ReactNode,\n useCallback,\n useContext,\n useRef,\n} from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { devWarn } from \"../../lib/dev-warn\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { OverlayLayerProvider, type OverlayLayers } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\n\n/**\n * Internal parts shared by `Modal` and `Drawer`, which are the same dialog\n * chrome over two Ark machines. Not re-exported from the overlays barrel: the\n * public parts stay `Modal.*` / `Drawer.*`.\n *\n * The two surfaces differ only by their padding variable (`--modal-px` vs\n * `--drawer-px`), the close button's size, and Modal's header floor. Tailwind\n * only generates classes it finds written out in full, so each surface keeps\n * its literal class strings in one lookup instead of interpolating the var.\n */\n\nexport type DialogSurface = \"modal\" | \"drawer\"\n\n/** The `padding` token → the CSS length both surfaces set as their padding\n * variable (`--modal-px` / `--drawer-px`); the vertical rhythm derives from it. */\nexport const DIALOG_PADDING: Record<Size, string> = {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n}\n\nconst SURFACE = {\n modal: {\n header:\n \"flex items-start min-h-15 justify-between gap-4 px-(--modal-px,1.25rem) pt-(--modal-px,1.25rem) pb-3\",\n body: \"flex-1 overflow-y-auto px-(--modal-px,1.25rem) py-1\",\n footer:\n \"flex items-center justify-end gap-2 px-(--modal-px,1.25rem) pb-(--modal-px,1.25rem) pt-4\",\n closeSize: \"xs\",\n },\n drawer: {\n header:\n \"flex items-start justify-between gap-4 px-(--drawer-px,1.25rem) pt-(--drawer-px,1.25rem) pb-3\",\n body: \"flex-1 overflow-y-auto px-(--drawer-px,1.25rem) py-1\",\n footer:\n \"flex items-center justify-end gap-2 px-(--drawer-px,1.25rem) pb-(--drawer-px,1.25rem) pt-4\",\n closeSize: \"sm\",\n },\n} as const\n\nexport type DialogIconSlot = \"close\"\nexport type DialogIcons = IconMap<DialogIconSlot>\n\nconst DEFAULT_ICONS: Record<DialogIconSlot, ReactNode> = {\n close: <XIcon className={iconStroke} />,\n}\n\n/** The root's resolved icons, for the close trigger. */\nconst IconsContext = createContext(DEFAULT_ICONS)\n\n/** What both roots wrap their children in: the resolved `icons` and the\n * nested-layer set from `useLayerGuard`, so a picker opened inside the dialog\n * closes on its own outside click without closing the dialog under it. */\nexport const DialogRootProviders = ({\n icons,\n layers,\n children,\n}: {\n icons?: DialogIcons\n layers: OverlayLayers\n children?: ReactNode\n}) => (\n <IconsContext value={mergeIcons(DEFAULT_ICONS, icons)}>\n <OverlayLayerProvider value={layers}>{children}</OverlayLayerProvider>\n </IconsContext>\n)\n\nexport type DialogCloseTriggerProps = HTMLArkProps<\"button\"> &\n WithTestId & {\n \"aria-label\"?: string\n }\n\nexport type DialogSectionProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/**\n * Builds a surface's close trigger, header, body and footer. `ArkCloseTrigger`\n * is that machine's own `CloseTrigger` (Dialog's or Drawer's), since each\n * reads its own Ark context.\n */\nexport const createDialogParts = (\n surface: DialogSurface,\n ArkCloseTrigger: JSXElementConstructor<HTMLArkProps<\"button\">>,\n) => {\n const styles = SURFACE[surface]\n\n const CloseTrigger = ({\n children,\n className,\n \"aria-label\": ariaLabel,\n testId,\n asChild,\n ...rest\n }: DialogCloseTriggerProps) => {\n const icons = useContext(IconsContext)\n return asChild ? (\n // The consumer's element (a \"Cancel\" button, say) replaces the kit's icon\n // button outright, rather than nesting inside it.\n <ArkCloseTrigger\n asChild\n aria-label={ariaLabel}\n className={className}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </ArkCloseTrigger>\n ) : (\n <ArkCloseTrigger asChild {...rest}>\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size={styles.closeSize}\n aria-label={ariaLabel ?? \"Close\"}\n className={className}\n testId={testId}\n >\n {children ?? icons.close}\n </ActionIcon>\n </ArkCloseTrigger>\n )\n }\n\n const Header = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.header, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n const Body = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.body, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n const Footer = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.footer, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n return { CloseTrigger, Header, Body, Footer }\n}\n\n/** True when `node` has an `aria-label`, or an `aria-labelledby` naming an\n * element that is actually in the document. */\nconst hasAccessibleName = (node: HTMLElement) =>\n !!node.getAttribute(\"aria-label\")?.trim() ||\n (node.getAttribute(\"aria-labelledby\") ?? \"\")\n .split(/\\s+/)\n .some((id) => id !== \"\" && node.ownerDocument.getElementById(id) !== null)\n\n/**\n * A ref for a dialog's content that warns, in development, when the open\n * dialog has no accessible name: no `title`, no composed `Title` part, no\n * `aria-label` or `aria-labelledby`.\n *\n * It reads the DOM rather than the props because a composed `Modal.Title` /\n * `Drawer.Title` names the dialog without any prop saying so. Ark points the\n * content's `aria-labelledby` at the title's id before it knows whether a\n * title exists, then drops it a frame after opening once it finds none; so\n * the check waits that same frame and asks whether the id resolves, which\n * covers every way of naming the dialog. Warns once per instance.\n */\nexport const useDialogNameCheck = (component: \"Modal\" | \"Drawer\") => {\n const warned = useRef(false)\n return useCallback(\n (node: HTMLElement | null) => {\n if (!node || warned.current) return\n // Ark composes this ref without forwarding a cleanup, so a frame that\n // lands after the content unmounts is caught by `isConnected` instead.\n requestAnimationFrame(() => {\n if (warned.current || !node.isConnected || hasAccessibleName(node)) return\n warned.current = true\n devWarn(\n `[${component}] This dialog has no accessible name, so a screen reader announces ` +\n `it as just \"dialog\". Pass \\`title\\`, render a \\`${component}.Title\\` inside it, ` +\n \"or give it an `aria-label` or `aria-labelledby`.\",\n )\n })\n },\n [component],\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/overlays/dialog-parts.tsx"],"names":[],"mappings":"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","file":"chunk-V2QZG4IT.js","sourcesContent":["\"use client\"\n\nimport type { HTMLArkProps } from \"@ark-ui/react/factory\"\nimport { XIcon } from \"lucide-react\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type JSXElementConstructor,\n type ReactNode,\n useCallback,\n useContext,\n useRef,\n} from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { devWarn } from \"../../lib/dev-warn\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { OverlayLayerProvider, type OverlayLayers } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\n\n/**\n * Internal parts shared by `Modal` and `Drawer`, which are the same dialog\n * chrome over two Ark machines. Not re-exported from the overlays barrel: the\n * public parts stay `Modal.*` / `Drawer.*`.\n *\n * The two surfaces differ only by their padding variable (`--modal-px` vs\n * `--drawer-px`), the close button's size, and Modal's header floor. Tailwind\n * only generates classes it finds written out in full, so each surface keeps\n * its literal class strings in one lookup instead of interpolating the var.\n */\n\nexport type DialogSurface = \"modal\" | \"drawer\"\n\n/** The `padding` token → the CSS length both surfaces set as their padding\n * variable (`--modal-px` / `--drawer-px`); the vertical rhythm derives from it. */\nexport const DIALOG_PADDING: Record<Size, string> = {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n}\n\nconst SURFACE = {\n modal: {\n header:\n \"flex items-start min-h-15 justify-between gap-4 px-(--modal-px,1.25rem) pt-(--modal-px,1.25rem) pb-3\",\n body: \"flex-1 overflow-y-auto px-(--modal-px,1.25rem) py-1\",\n footer:\n \"flex items-center justify-end gap-2 px-(--modal-px,1.25rem) pb-(--modal-px,1.25rem) pt-4\",\n closeSize: \"xs\",\n },\n drawer: {\n header:\n \"flex items-start justify-between gap-4 px-(--drawer-px,1.25rem) pt-(--drawer-px,1.25rem) pb-3\",\n body: \"flex-1 overflow-y-auto px-(--drawer-px,1.25rem) py-1\",\n footer:\n \"flex items-center justify-end gap-2 px-(--drawer-px,1.25rem) pb-(--drawer-px,1.25rem) pt-4\",\n closeSize: \"sm\",\n },\n} as const\n\nexport type DialogIconSlot = \"close\"\nexport type DialogIcons = IconMap<DialogIconSlot>\n\nconst DEFAULT_ICONS: Record<DialogIconSlot, ReactNode> = {\n close: <XIcon className={iconStroke} />,\n}\n\n/** The root's resolved icons, for the close trigger. */\nconst IconsContext = createContext(DEFAULT_ICONS)\n\n/** What both roots wrap their children in: the resolved `icons` and the\n * nested-layer set from `useLayerGuard`, so a picker opened inside the dialog\n * closes on its own outside click without closing the dialog under it. */\nexport const DialogRootProviders = ({\n icons,\n layers,\n children,\n}: {\n icons?: DialogIcons\n layers: OverlayLayers\n children?: ReactNode\n}) => (\n <IconsContext value={mergeIcons(DEFAULT_ICONS, icons)}>\n <OverlayLayerProvider value={layers}>{children}</OverlayLayerProvider>\n </IconsContext>\n)\n\nexport type DialogCloseTriggerProps = HTMLArkProps<\"button\"> &\n WithTestId & {\n \"aria-label\"?: string\n }\n\nexport type DialogSectionProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/**\n * Builds a surface's close trigger, header, body and footer. `ArkCloseTrigger`\n * is that machine's own `CloseTrigger` (Dialog's or Drawer's), since each\n * reads its own Ark context.\n */\nexport const createDialogParts = (\n surface: DialogSurface,\n ArkCloseTrigger: JSXElementConstructor<HTMLArkProps<\"button\">>,\n) => {\n const styles = SURFACE[surface]\n\n const CloseTrigger = ({\n children,\n className,\n \"aria-label\": ariaLabel,\n testId,\n asChild,\n ...rest\n }: DialogCloseTriggerProps) => {\n const icons = useContext(IconsContext)\n return asChild ? (\n // The consumer's element (a \"Cancel\" button, say) replaces the kit's icon\n // button outright, rather than nesting inside it.\n <ArkCloseTrigger\n asChild\n aria-label={ariaLabel}\n className={className}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </ArkCloseTrigger>\n ) : (\n <ArkCloseTrigger asChild {...rest}>\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size={styles.closeSize}\n aria-label={ariaLabel ?? \"Close\"}\n className={className}\n testId={testId}\n >\n {children ?? icons.close}\n </ActionIcon>\n </ArkCloseTrigger>\n )\n }\n\n const Header = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.header, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n const Body = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.body, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n const Footer = ({ className, testId, ...rest }: DialogSectionProps) => (\n <div className={cn(styles.footer, className)} {...props({ \"data-testid\": testId })} {...rest} />\n )\n\n return { CloseTrigger, Header, Body, Footer }\n}\n\n/** True when `node` has an `aria-label`, or an `aria-labelledby` naming an\n * element that is actually in the document. */\nconst hasAccessibleName = (node: HTMLElement) =>\n !!node.getAttribute(\"aria-label\")?.trim() ||\n (node.getAttribute(\"aria-labelledby\") ?? \"\")\n .split(/\\s+/)\n .some((id) => id !== \"\" && node.ownerDocument.getElementById(id) !== null)\n\n/**\n * A ref for a dialog's content that warns, in development, when the open\n * dialog has no accessible name: no `title`, no composed `Title` part, no\n * `aria-label` or `aria-labelledby`.\n *\n * It reads the DOM rather than the props because a composed `Modal.Title` /\n * `Drawer.Title` names the dialog without any prop saying so. Ark points the\n * content's `aria-labelledby` at the title's id before it knows whether a\n * title exists, then drops it a frame after opening once it finds none; so\n * the check waits that same frame and asks whether the id resolves, which\n * covers every way of naming the dialog. Warns once per instance.\n */\nexport const useDialogNameCheck = (component: \"Modal\" | \"Drawer\") => {\n const warned = useRef(false)\n return useCallback(\n (node: HTMLElement | null) => {\n if (!node || warned.current) return\n // Ark composes this ref without forwarding a cleanup, so a frame that\n // lands after the content unmounts is caught by `isConnected` instead.\n requestAnimationFrame(() => {\n if (warned.current || !node.isConnected || hasAccessibleName(node)) return\n warned.current = true\n devWarn(\n `[${component}] This dialog has no accessible name, so a screen reader announces ` +\n `it as just \"dialog\". Pass \\`title\\`, render a \\`${component}.Title\\` inside it, ` +\n \"or give it an `aria-label` or `aria-labelledby`.\",\n )\n })\n },\n [component],\n )\n}\n"]}
@@ -76,5 +76,5 @@ var Spinner = ({
76
76
  };
77
77
 
78
78
  export { Spinner };
79
- //# sourceMappingURL=chunk-D2QIPQ74.js.map
80
- //# sourceMappingURL=chunk-D2QIPQ74.js.map
79
+ //# sourceMappingURL=chunk-W3XX7BYT.js.map
80
+ //# sourceMappingURL=chunk-W3XX7BYT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/spinner/spinner.tsx"],"names":[],"mappings":";;;;;AA0CA,IAAM,YAAA,GAAqC;AAAA,EACzC,EAAA,EAAI,QAAA;AAAA,EACJ,EAAA,EAAI,QAAA;AAAA,EACJ,EAAA,EAAI,QAAA;AAAA,EACJ,EAAA,EAAI,QAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAgCO,IAAM,UAAU,CAAC;AAAA,EACtB,SAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA,GAAQ,SAAA;AAAA,EACR,SAAA,GAAY,KAAA;AAAA,EACZ,MAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAoB;AAClB,EAAA,MAAM,aAAa,KAAA,KAAU,IAAA;AAI7B,EAAA,MAAM,SAAA,GAAY,KAAA,KAAU,MAAA,IAAa,KAAA,KAAU,kBAAkB,KAAA,KAAU,SAAA;AAC/E,EAAA,uBACE,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MAGE,GAAI,UAAA,GAAa,EAAE,aAAA,EAAe,IAAA,KAAS,EAAE,IAAA,EAAM,QAAA,EAAU,YAAA,EAAc,KAAA,EAAM;AAAA,MAClF,YAAA,EAAY,YAAY,KAAA,GAAQ,MAAA;AAAA,MAChC,SAAA,EAAW,EAAA;AAAA;AAAA;AAAA,QAGT,sFAAA;AAAA,QACA,sDAAA;AAAA,QACA,IAAA,IAAQ,aAAa,IAAI,CAAA;AAAA,QACzB,SAAA,IAAa,kBAAA;AAAA,QACb,KAAA,KAAU,aAAa,kBAAA,CAAmB,OAAA;AAAA,QAC1C;AAAA,OACF;AAAA,MACC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,IAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,4BAAA;AAAA,YACN,KAAA,EAAM,IAAA;AAAA,YACN,MAAA,EAAO,IAAA;AAAA,YACP,OAAA,EAAQ,WAAA;AAAA,YACR,IAAA,EAAK,MAAA;AAAA,YACL,MAAA,EAAO,cAAA;AAAA,YACP,aAAA,EAAc,OAAA;AAAA,YACd,cAAA,EAAe,OAAA;AAAA,YACf,aAAA,EAAW,IAAA;AAAA,YAGX,SAAA,EAAW,EAAA,CAAG,OAAA,EAAS,IAAA,IAAQ,WAAW,CAAA;AAAA,YAEzC,QAAA,EAAA;AAAA,cAAA,SAAA,oBAAa,GAAA,CAAC,QAAA,EAAA,EAAO,EAAA,EAAG,IAAA,EAAK,EAAA,EAAG,IAAA,EAAK,CAAA,EAAE,IAAA,EAAK,WAAA,EAAa,CAAA,EAAG,SAAA,EAAU,YAAA,EAAa,CAAA;AAAA,8BACpF,GAAA;AAAA,gBAAC,QAAA;AAAA,gBAAA;AAAA,kBACC,EAAA,EAAG,IAAA;AAAA,kBACH,EAAA,EAAG,IAAA;AAAA,kBACH,CAAA,EAAE,IAAA;AAAA,kBACF,WAAA,EAAa,CAAA;AAAA,kBACb,eAAA,EAAgB,OAAA;AAAA,kBAChB,aAAA,EAAc,OAAA;AAAA,kBACd,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AAAA,SACF;AAAA,QACC,CAAC,UAAA,oBAAc,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAW,QAAA,EAAA,KAAA,EAAM;AAAA;AAAA;AAAA,GACnD;AAEJ","file":"chunk-W3XX7BYT.js","sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * Spinner — inline activity indicator.\n *\n * Pure React Server Component. The SVG strokes use `currentColor`, so when\n * `color` is omitted the spinner inherits its parent's text color — that's\n * how Button/ActionIcon embed it without extra plumbing. Pass a palette\n * `color` to route through the `data-color` + slot-var system and emit a\n * palette stroke regardless of the surrounding text color.\n *\n * Two non-palette `color` values round out the prop:\n * - `\"currentColor\"` — the explicit, named form of the omit-color behavior\n * (inherit the surrounding text color); handy when a call site wants to\n * state the intent rather than rely on the absence of a prop.\n * - `\"default\"` — the neutral high-contrast stroke that matches Button's\n * `default` variant. Like that variant, it sidesteps the slot vars and\n * paints the primitives behind Figma's `Text/text-primary` (`brand-950` / `white`).\n *\n * Sizing follows the same logic: omit `size` to inherit from a parent's\n * svg size rule (Button's `[:where(&)_svg]:size-*`), or set it explicitly for\n * standalone use.\n *\n * Accessibility: a standalone spinner is a `role=\"status\"` live region holding\n * visually hidden \"Loading\" text (the `label`), so it is announced as a status\n * rather than read as a picture. Inside containers that already broadcast a\n * busy state (`aria-busy=\"true\"` on Button/ActionIcon), pass `label={null}` to\n * make it decorative (`aria-hidden`) and avoid double announcements.\n *\n * The rotation lives on the root, so `className` (e.g. Button's\n * `[animation-play-state:paused]`) reaches the animated element. Under\n * `prefers-reduced-motion` it stops and the arc rests in place, the same rule\n * the kit applies to `Progress`/`CircularProgress`'s indeterminate loops.\n */\n\n/** One size scale for the root; the ring fills it. */\nconst SPINNER_SIZE: Record<Size, string> = {\n xs: \"size-3\",\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n xl: \"size-8\",\n}\n\nexport type SpinnerSize = Size\n\n/**\n * The spinner's `color` accepts the shared palette plus two non-palette\n * tokens: `\"currentColor\"` (explicit inherit) and `\"default\"` (neutral\n * high-contrast stroke matching Button's `default` variant).\n */\nexport type SpinnerColor = Color | \"currentColor\" | \"default\"\n\nexport type SpinnerProps = Omit<ComponentPropsWithoutRef<\"span\">, \"color\" | \"children\"> &\n WithTestId & {\n /** Explicit size; omit to inherit from a parent's svg size rule. */\n size?: SpinnerSize\n /**\n * Stroke color. Omit (or pass `\"currentColor\"`) to inherit the surrounding\n * text color; pass a palette name to route through the slot vars; pass\n * `\"default\"` for the neutral high-contrast stroke that matches Button's\n * `default` variant.\n */\n color?: SpinnerColor\n /**\n * Status text announced by assistive tech. Defaults to `\"Loading\"`. Set to\n * `null` for a purely decorative spinner (e.g. inside a button that already\n * has `aria-busy`).\n */\n label?: string | null\n /** Draws a faint full ring under the spinning arc, so the arc reads as moving around a track. */\n withTrack?: boolean\n }\n\nexport const Spinner = ({\n className,\n size,\n color,\n label = \"Loading\",\n withTrack = false,\n testId,\n ...rest\n}: SpinnerProps) => {\n const decorative = label === null\n // Only real palette names drive the slot-var system. `\"currentColor\"` and\n // `\"default\"` are handled with literal classes below, so they neither emit a\n // `data-color` nor reach for `--c-solid`.\n const isPalette = color !== undefined && color !== \"currentColor\" && color !== \"default\"\n return (\n <span\n // A status, not a picture: the label is live text, read when the spinner\n // appears. Decorative spinners leave the tree entirely.\n {...(decorative ? { \"aria-hidden\": true } : { role: \"status\", \"aria-label\": label })}\n data-color={isPalette ? color : undefined}\n className={cn(\n // `relative` contains the sr-only label, so it can't escape a scroller.\n // `w-fit`: the root is what spins, so it must hug the ring, never a whole row.\n \"relative flex w-fit shrink-0 items-center justify-center aspect-square origin-center\",\n \"animate-spin motion-reduce:animate-none text-current\",\n size && SPINNER_SIZE[size],\n isPalette && \"text-(--c-solid)\",\n color === \"default\" && TEXT_COLOR_CLASSES.primary,\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n // Sized: fill the root. Unsized: keep the 24px intrinsic size, or a parent's\n // svg size rule (Button's), which the root then hugs.\n className={cn(\"block\", size && \"size-full\")}\n >\n {withTrack && <circle cx=\"12\" cy=\"12\" r=\"10\" strokeWidth={1} className=\"opacity-20\" />}\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n strokeWidth={2}\n strokeDasharray=\"42 20\"\n strokeLinecap=\"round\"\n className=\"opacity-90\"\n />\n </svg>\n {!decorative && <span className=\"sr-only\">{label}</span>}\n </span>\n )\n}\n"]}
@@ -10,7 +10,11 @@ var themeIconVariants = cva(
10
10
  "inline-flex items-center justify-center",
11
11
  "aspect-square shrink-0 select-none",
12
12
  "rounded-lg border",
13
- "[&_svg]:shrink-0 [&_svg]:pointer-events-none",
13
+ // Every svg rule is `[:where(&)_svg]`: zero class specificity, so a size
14
+ // class on the icon itself (`<Star className="size-5" />`) or a nested
15
+ // component's own svg rule wins whatever the CSS order. Lucide's `size`
16
+ // prop is only an HTML attribute and still loses. Same fix as Input (#427).
17
+ "[:where(&)_svg]:shrink-0 [:where(&)_svg]:pointer-events-none",
14
18
  // Inert on the default non-focusable <div>; applies once `asChild`
15
19
  // renders ThemeIcon onto a real <a>/<button>. See `focusStyles`.
16
20
  focusStyles()
@@ -81,11 +85,11 @@ var themeIconVariants = cva(
81
85
  // a 28/32/36/40/48px tile — under half the tile, so the tile reads as a
82
86
  // frame around the icon, not as the icon's own padding.
83
87
  size: {
84
- xs: "h-7 [&_svg]:size-3",
85
- sm: "h-8 [&_svg]:size-3.5",
86
- md: "h-9 [&_svg]:size-4",
87
- lg: "h-10 [&_svg]:size-4.5",
88
- xl: "h-12 [&_svg]:size-5.5"
88
+ xs: "h-7 [:where(&)_svg]:size-3",
89
+ sm: "h-8 [:where(&)_svg]:size-3.5",
90
+ md: "h-9 [:where(&)_svg]:size-4",
91
+ lg: "h-10 [:where(&)_svg]:size-4.5",
92
+ xl: "h-12 [:where(&)_svg]:size-5.5"
89
93
  },
90
94
  radius: {
91
95
  xs: "rounded-xs",
@@ -125,5 +129,5 @@ var ThemeIcon = ({
125
129
  );
126
130
 
127
131
  export { ThemeIcon };
128
- //# sourceMappingURL=chunk-F374BNL4.js.map
129
- //# sourceMappingURL=chunk-F374BNL4.js.map
132
+ //# sourceMappingURL=chunk-YVTM2KRR.js.map
133
+ //# sourceMappingURL=chunk-YVTM2KRR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/theme-icon/theme-icon.tsx"],"names":[],"mappings":";;;;;;;AAuBA,IAAM,iBAAA,GAAoB,GAAA;AAAA,EACxB;AAAA,IACE,yCAAA;AAAA,IACA,oCAAA;AAAA,IACA,mBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,8DAAA;AAAA;AAAA;AAAA,IAGA,WAAA;AAAY,GACd;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAYP,MAAA,EACE,6FAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAiBF,KAAA,EAAO;AAAA,UACL,qEAAA;AAAA,UACA,oJAAA;AAAA,UACA,6JAAA;AAAA,UACA;AAAA,SACF;AAAA;AAAA;AAAA;AAAA;AAAA,QAKA,OAAA,EAAS;AAAA,UACP,gGAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,MAAA,EAAQ;AAAA,UACN,gGAAA;AAAA,UACA;AAAA,SACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASA,OAAA,EAAS;AAAA,UACP,kDAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA;AAAA;AAAA;AAAA,MAIA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,4BAAA;AAAA,QACJ,EAAA,EAAI,8BAAA;AAAA,QACJ,EAAA,EAAI,4BAAA;AAAA,QACJ,EAAA,EAAI,+BAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAQ;AAAA;AACV;AAEJ,CAAA;AAaO,IAAM,YAAY,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,GAAA;AAAA,EAAC,GAAA,CAAI,GAAA;AAAA,EAAJ;AAAA,IACC,OAAA;AAAA,IACA,YAAA,EAAY,KAAA;AAAA,IACZ,gBAAc,OAAA,IAAW,SAAA;AAAA,IACzB,SAAA,EAAW,GAAG,iBAAA,CAAkB,EAAE,SAAS,IAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,SAAS,CAAA;AAAA,IACpE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN","file":"chunk-YVTM2KRR.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * ThemeIcon — square, non-interactive icon-display box. Visually related to\n * `ActionIcon` (same size/radius scales) but deliberately **not** its\n * (variant × color) look: every variant here is a muted, low-saturation\n * surface — just enough contrast to read as \"raised above the page,\" never\n * a vivid CTA-style fill. There's no hover state and no cursor affordance,\n * because this is a display, not a control.\n *\n * `asChild` renders the single child as the root, so it composes on top of\n * an interactive element (e.g. wrap a `Link`) when the icon itself needs to\n * be clickable. The kit's focus ring (`focusStyles`) rides along for that\n * case and stays inert on the default `<div>` — but reach for `ActionIcon`\n * when an interactive icon is the common case, since it also supplies the\n * `aria-label`, disabled and loading handling a real trigger needs.\n */\nconst themeIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"aspect-square shrink-0 select-none\",\n \"rounded-lg border\",\n // Every svg rule is `[:where(&)_svg]`: zero class specificity, so a size\n // class on the icon itself (`<Star className=\"size-5\" />`) or a nested\n // component's own svg rule wins whatever the CSS order. Lucide's `size`\n // prop is only an HTML attribute and still loses. Same fix as Input (#427).\n \"[:where(&)_svg]:shrink-0 [:where(&)_svg]:pointer-events-none\",\n // Inert on the default non-focusable <div>; applies once `asChild`\n // renders ThemeIcon onto a real <a>/<button>. See `focusStyles`.\n focusStyles(),\n ],\n {\n variants: {\n variant: {\n // A translucent wash of `--c-solid` (not the opaque token) so the\n // fill blends with whatever surface it sits on instead of reading\n // as a painted CTA block. The border mixes in black on top of that\n // same var — a fixed darkening, not another opacity step of it —\n // so it reads as a recessed edge in both themes; some colors (neutral\n // in particular) have a dark-mode `--c-solid` that's lighter than\n // its own soft/text steps, which would flip a same-var-opacity\n // border the wrong way. This is the ThemeIcon-specific reading of\n // \"filled\": raised, not loud. Button/Badge/ActionIcon's `filled`\n // (opaque bg-(--c-solid)) would look like a button here —\n // intentionally not reused.\n filled:\n \"bg-(--c-solid)/15 text-(--c-text) border-[color-mix(in_oklab,var(--c-solid)_35%,black_65%)]\",\n // `light`, `outline` and `subtle` paint through two local properties,\n // `--theme-icon-fill` and `--theme-icon-glyph`, and only the\n // properties change per theme and palette. The `bg-*`/`text-*` stay\n // plain utilities, so a caller's `className` colour replaces them\n // through `cn`: a `dark:` or `data-color` text class would outrank it.\n //\n // Figma tints a hued tile with its solid shade at 30%\n // (`bg-<hue>-secondary`), as Badge's `light` does: `--c-soft` is the\n // -50/-950 end of the scale and fades into the page in both themes.\n // The dark glyph is that solid shade (`fg-<hue>-primary`); the light\n // theme draws it in the palette's text step instead, as Badge does,\n // since a -500 glyph on its own tint over white falls under 3:1 for\n // yellow, orange and green. Neutral (also the no-`color` default,\n // which resolves to the neutral mirror on :root) fills with the\n // black/white-16 overlay its own `--c-soft` already is, and draws its\n // glyph in the solid black/white.\n light: [\n \"bg-(--theme-icon-fill) text-(--theme-icon-glyph) border-transparent\",\n \"[--theme-icon-fill:color-mix(in_oklab,var(--c-solid)_30%,transparent)] [--theme-icon-glyph:var(--c-text)] dark:[--theme-icon-glyph:var(--c-solid)]\",\n \"not-data-color:[--theme-icon-fill:var(--c-soft)] data-[color=neutral]:[--theme-icon-fill:var(--c-soft)] data-[color=gray]:[--theme-icon-fill:var(--c-soft)]\",\n \"not-data-color:[--theme-icon-glyph:var(--c-solid)] data-[color=neutral]:[--theme-icon-glyph:var(--c-solid)] data-[color=gray]:[--theme-icon-glyph:var(--c-solid)]\",\n ],\n // A hued glyph takes the palette's text step (Figma `fg-<hue>-secondary`,\n // the -300). Neutral's text step is the 80% secondary white, but Figma\n // draws its glyph in `fg-primary` — full white, which is neutral's\n // solid shade (black in the light theme).\n outline: [\n \"bg-transparent text-(--theme-icon-glyph) border-(--c-solid) [--theme-icon-glyph:var(--c-text)]\",\n \"not-data-color:[--theme-icon-glyph:var(--c-solid)] data-[color=neutral]:[--theme-icon-glyph:var(--c-solid)] data-[color=gray]:[--theme-icon-glyph:var(--c-solid)]\",\n ],\n subtle: [\n \"bg-transparent text-(--theme-icon-glyph) border-transparent [--theme-icon-glyph:var(--c-text)]\",\n \"not-data-color:[--theme-icon-glyph:var(--c-solid)] data-[color=neutral]:[--theme-icon-glyph:var(--c-solid)] data-[color=gray]:[--theme-icon-glyph:var(--c-solid)]\",\n ],\n // Palette-independent neutral surface. Unlike ActionIcon's\n // high-contrast inverted `default` (a black/white button look),\n // this stays a muted card in both themes. It sits on the kit's\n // translucent surface (the quiet `bg-black/3 dark:bg-white/4` fill\n // `Kbd` and `Card` share, edged with Figma's `border-secondary`,\n // `dark:border-white/16`) rather than an opaque gray step, so the tile\n // reads on whatever surface hosts it. Light mode darkens because a\n // bare `bg-white/4` vanishes on a near-white page.\n default: [\n \"bg-black/3 text-brand-900/70 border-brand-900/20\",\n \"dark:bg-white/4 dark:text-white/80 dark:border-white/16\",\n ],\n },\n // Figma (ThemeIcon, node 17583-16687): the glyph is 12/14/16/18/22px in\n // a 28/32/36/40/48px tile — under half the tile, so the tile reads as a\n // frame around the icon, not as the icon's own padding.\n size: {\n xs: \"h-7 [:where(&)_svg]:size-3\",\n sm: \"h-8 [:where(&)_svg]:size-3.5\",\n md: \"h-9 [:where(&)_svg]:size-4\",\n lg: \"h-10 [:where(&)_svg]:size-4.5\",\n xl: \"h-12 [:where(&)_svg]:size-5.5\",\n },\n radius: {\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n radius: \"md\",\n },\n },\n)\n\nexport type ThemeIconVariant = NonNullable<VariantProps<typeof themeIconVariants>[\"variant\"]>\nexport type ThemeIconSize = NonNullable<VariantProps<typeof themeIconVariants>[\"size\"]>\nexport type ThemeIconRadius = NonNullable<VariantProps<typeof themeIconVariants>[\"radius\"]>\n\nexport type ThemeIconProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof themeIconVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n }\n\nexport const ThemeIcon = ({\n className,\n variant,\n size,\n radius,\n color,\n asChild,\n testId,\n ...rest\n}: ThemeIconProps) => (\n <ark.div\n asChild={asChild}\n data-color={color}\n data-variant={variant ?? \"default\"}\n className={cn(themeIconVariants({ variant, size, radius }), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n"]}
package/dist/colors.css CHANGED
@@ -65,6 +65,35 @@
65
65
  --c-on-solid-disabled: color-mix(in oklab, var(--color-black) 55%, transparent);
66
66
  --c-soft-disabled: color-mix(in oklab, var(--color-black) 4%, transparent);
67
67
  --c-text-disabled: color-mix(in oklab, var(--color-black) 38%, transparent);
68
+
69
+ /* Button-family slots (see the --btn-* note below). */
70
+ --btn-solid: var(--color-brand-950);
71
+ --btn-solid-hover: var(--color-brand-800);
72
+ --btn-on-solid: var(--color-white);
73
+ --btn-light-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
74
+ --btn-light-border: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
75
+ --btn-light-text: var(--color-brand-900);
76
+ --btn-light-hover-bg: color-mix(in oklab, var(--color-white) 50%, transparent);
77
+ --btn-light-hover-border: color-mix(in oklab, var(--color-brand-900) 30%, transparent);
78
+ --btn-light-hover-text: var(--color-brand-950);
79
+ /* Figma fills the neutral outline with the page colour; the kit keeps it
80
+ transparent like every other outline (decided 2026-11-17). */
81
+ --btn-outline-border: color-mix(in oklab, var(--color-brand-900) 30%, transparent);
82
+ --btn-outline-text: var(--color-brand-900);
83
+ --btn-outline-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
84
+ --btn-outline-hover-border: var(--color-brand-950);
85
+ --btn-outline-hover-text: var(--color-brand-950);
86
+ --btn-subtle-text: var(--color-brand-900);
87
+ --btn-subtle-hover-bg: color-mix(in oklab, var(--color-brand-900) 8%, transparent);
88
+ --btn-subtle-hover-text: var(--color-brand-950);
89
+ --btn-link-text: var(--color-brand-950);
90
+ --btn-link-hover: color-mix(in oklab, var(--color-brand-900) 40%, transparent);
91
+ /* Figma's neutral disabled fill is a brand tint, not a navy one. */
92
+ --btn-disabled-bg: color-mix(in oklab, var(--color-brand-500) 10%, transparent);
93
+ --btn-disabled-border: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
94
+ --btn-disabled-text: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
95
+ --btn-light-disabled-bg: transparent;
96
+ --btn-light-disabled-border: color-mix(in oklab, var(--color-brand-900) 10%, transparent);
68
97
  }
69
98
  [data-theme="dark"] {
70
99
  --c-solid: var(--color-white);
@@ -82,6 +111,102 @@
82
111
  --c-on-solid-disabled: color-mix(in oklab, var(--color-white) 50%, transparent);
83
112
  --c-soft-disabled: color-mix(in oklab, var(--color-white) 8%, transparent);
84
113
  --c-text-disabled: color-mix(in oklab, var(--color-white) 35%, transparent);
114
+
115
+ /* Button-family slots (see the --btn-* note below). */
116
+ --btn-solid: var(--color-white);
117
+ /* Figma bg-inverse-hover; no kit primitive carries this value. */
118
+ --btn-solid-hover: #d5d7da;
119
+ --btn-on-solid: var(--color-brand-950);
120
+ --btn-light-bg: color-mix(in oklab, var(--color-white) 4%, transparent);
121
+ --btn-light-border: color-mix(in oklab, var(--color-white) 16%, transparent);
122
+ --btn-light-text: color-mix(in oklab, var(--color-white) 80%, transparent);
123
+ --btn-light-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
124
+ --btn-light-hover-border: color-mix(in oklab, var(--color-white) 35%, transparent);
125
+ --btn-light-hover-text: var(--color-white);
126
+ --btn-outline-border: color-mix(in oklab, var(--color-white) 35%, transparent);
127
+ --btn-outline-text: color-mix(in oklab, var(--color-white) 80%, transparent);
128
+ --btn-outline-hover-bg: color-mix(in oklab, var(--color-white) 4%, transparent);
129
+ --btn-outline-hover-border: var(--color-white);
130
+ --btn-outline-hover-text: var(--color-white);
131
+ --btn-subtle-text: color-mix(in oklab, var(--color-white) 80%, transparent);
132
+ --btn-subtle-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
133
+ --btn-subtle-hover-text: var(--color-white);
134
+ --btn-link-text: var(--color-white);
135
+ --btn-link-hover: color-mix(in oklab, var(--color-white) 35%, transparent);
136
+ --btn-disabled-bg: color-mix(in oklab, var(--color-white) 8%, transparent);
137
+ --btn-disabled-border: color-mix(in oklab, var(--color-white) 16%, transparent);
138
+ --btn-disabled-text: color-mix(in oklab, var(--color-white) 16%, transparent);
139
+ --btn-light-disabled-bg: transparent;
140
+ --btn-light-disabled-border: color-mix(in oklab, var(--color-white) 8%, transparent);
141
+ }
142
+
143
+ /**
144
+ * Button-family slots (--btn-*), read by Button and ActionIcon only.
145
+ *
146
+ * They copy the 42 UI Kit V3 Figma `Buttons/Button` set (node 14581:1078),
147
+ * light and dark modes, so they are deliberately separate from the shared
148
+ * --c-* slots above: those feed ~40 other components and keep their own
149
+ * recipe. Figma draws brand, neutral ("gray" in Figma), red, green and
150
+ * orange; the other palettes follow brand's pattern on their own scale.
151
+ *
152
+ * Three layers, later ones winning:
153
+ * 1. `[data-color]` derives every translucent slot from --btn-tint (the
154
+ * palette's 500): light fill/border at 30%, outline border at 30%
155
+ * (the full fill colour on hover), subtle hover at 20%, disabled at
156
+ * 10/20/60% (30% in dark).
157
+ * 2. Each palette sets the steps that come from its scale: filled hover,
158
+ * light-variant text and its hover, the outline/subtle/link text, the
159
+ * outline hover text and the link hover.
160
+ * 3. Figma's per-colour departures from that pattern, copied on purpose
161
+ * (decided 2026-11-17): red tints are built on #f04438 rather than
162
+ * red-500; orange's filled hover is 700. (Figma also swapped text
163
+ * steps for red and green; both now follow the other palettes.)
164
+ *
165
+ * Deliberate departures from Figma (decided 2026-11-17): the coloured
166
+ * hovers step up the way neutral's do, with one strength for every palette.
167
+ * Light: fill 30% → 50%, border 30% → 60%. Outline: border 30% → the full
168
+ * fill colour, plus a 10% tint. Subtle: a 20% tint (Figma's 50% dropped
169
+ * hover text under 4.5:1 in dark). All three brighten the text one step in
170
+ * dark (and to 950 in light where it isn't already). Neutral's subtle hover
171
+ * is a quiet tint too: white 16% in dark, navy 8% in light.
172
+ *
173
+ * Neutral (also the `:root` default, like --c-*) has no tint: its slots are
174
+ * Figma's white and brand-navy alphas, set in full.
175
+ */
176
+ [data-color] {
177
+ --btn-tint: var(--c-solid);
178
+ --btn-solid: var(--c-solid);
179
+ --btn-on-solid: var(--c-on-solid);
180
+ /* Scale-step fallbacks for a palette with no block below (`custom`, or any
181
+ consumer-defined name): reuse its --c-* steps. */
182
+ --btn-solid-hover: var(--c-solid-hover);
183
+ --btn-light-text: var(--c-text);
184
+ --btn-light-hover-bg: color-mix(in oklab, var(--btn-tint) 50%, transparent);
185
+ --btn-text: var(--c-text);
186
+ --btn-link-hover: var(--c-solid-hover);
187
+ --btn-light-bg: color-mix(in oklab, var(--btn-tint) 30%, transparent);
188
+ --btn-light-border: color-mix(in oklab, var(--btn-tint) 30%, transparent);
189
+ --btn-light-hover-border: color-mix(in oklab, var(--btn-tint) 60%, transparent);
190
+ --btn-light-hover-text: var(--btn-light-text);
191
+ --btn-outline-border: color-mix(in oklab, var(--btn-tint) 30%, transparent);
192
+ --btn-outline-text: var(--btn-text);
193
+ /* Figma's colored outline hover has no fill; the kit adds subtle's 10% tint
194
+ so the hover reads (decided 2026-11-17). */
195
+ --btn-outline-hover-bg: color-mix(in oklab, var(--btn-tint) 10%, transparent);
196
+ --btn-outline-hover-border: var(--btn-solid);
197
+ --btn-outline-hover-text: var(--btn-text);
198
+ --btn-subtle-text: var(--btn-text);
199
+ --btn-subtle-hover-bg: color-mix(in oklab, var(--btn-tint) 20%, transparent);
200
+ --btn-subtle-hover-text: var(--btn-outline-hover-text);
201
+ --btn-link-text: var(--btn-text);
202
+ --btn-disabled-bg: color-mix(in oklab, var(--btn-tint) 10%, transparent);
203
+ --btn-disabled-border: color-mix(in oklab, var(--btn-tint) 20%, transparent);
204
+ --btn-disabled-text: color-mix(in oklab, var(--btn-tint) 60%, transparent);
205
+ --btn-light-disabled-bg: var(--btn-disabled-bg);
206
+ --btn-light-disabled-border: var(--btn-disabled-border);
207
+ }
208
+ [data-theme="dark"] [data-color] {
209
+ --btn-disabled-text: color-mix(in oklab, var(--btn-tint) 30%, transparent);
85
210
  }
86
211
 
87
212
  [data-color="brand"] {
@@ -91,6 +216,13 @@
91
216
  --c-soft: var(--color-brand-50);
92
217
  --c-soft-hover: var(--color-brand-100);
93
218
  --c-text: var(--color-brand-700);
219
+
220
+ /* Button-family slots (see the --btn-* note below). */
221
+ --btn-solid-hover: var(--color-brand-600);
222
+ --btn-light-text: var(--color-brand-950);
223
+ --btn-text: var(--color-brand-900);
224
+ --btn-outline-hover-text: var(--color-brand-950);
225
+ --btn-link-hover: var(--color-brand-950);
94
226
  }
95
227
  [data-theme="dark"] [data-color="brand"] {
96
228
  --c-solid: var(--color-brand-500);
@@ -99,6 +231,13 @@
99
231
  --c-soft: var(--color-brand-950);
100
232
  --c-soft-hover: var(--color-brand-900);
101
233
  --c-text: var(--color-brand-300);
234
+
235
+ /* Button-family slots (see the --btn-* note below). */
236
+ --btn-light-text: var(--color-brand-300);
237
+ --btn-light-hover-text: var(--color-brand-200);
238
+ --btn-text: var(--color-brand-500);
239
+ --btn-outline-hover-text: var(--color-brand-400);
240
+ --btn-link-hover: var(--color-brand-700);
102
241
  }
103
242
 
104
243
  [data-color="red"] {
@@ -108,6 +247,15 @@
108
247
  --c-soft: var(--color-red-50);
109
248
  --c-soft-hover: var(--color-red-100);
110
249
  --c-text: var(--color-red-700);
250
+
251
+ /* Button-family slots (see the --btn-* note below). */
252
+ /* Figma's error tints use #f04438; its fill is the kit's red-500 #ff4e41. */
253
+ --btn-tint: #f04438;
254
+ --btn-solid-hover: var(--color-red-600);
255
+ --btn-light-text: var(--color-red-950);
256
+ --btn-text: var(--color-red-900);
257
+ --btn-outline-hover-text: var(--color-red-950);
258
+ --btn-link-hover: var(--color-red-950);
111
259
  }
112
260
  [data-theme="dark"] [data-color="red"] {
113
261
  --c-solid: var(--color-red-500);
@@ -116,6 +264,13 @@
116
264
  --c-soft: var(--color-red-950);
117
265
  --c-soft-hover: var(--color-red-900);
118
266
  --c-text: var(--color-red-300);
267
+
268
+ /* Button-family slots (see the --btn-* note below). */
269
+ --btn-light-text: var(--color-red-300);
270
+ --btn-light-hover-text: var(--color-red-200);
271
+ --btn-text: var(--color-red-500);
272
+ --btn-outline-hover-text: var(--color-red-400);
273
+ --btn-link-hover: var(--color-red-700);
119
274
  }
120
275
 
121
276
  [data-color="orange"] {
@@ -125,6 +280,13 @@
125
280
  --c-soft: var(--color-orange-50);
126
281
  --c-soft-hover: var(--color-orange-100);
127
282
  --c-text: var(--color-orange-700);
283
+
284
+ /* Button-family slots (see the --btn-* note below). */
285
+ --btn-solid-hover: var(--color-orange-700);
286
+ --btn-light-text: var(--color-orange-950);
287
+ --btn-text: var(--color-orange-900);
288
+ --btn-outline-hover-text: var(--color-orange-950);
289
+ --btn-link-hover: var(--color-orange-950);
128
290
  }
129
291
  [data-theme="dark"] [data-color="orange"] {
130
292
  --c-solid: var(--color-orange-500);
@@ -133,6 +295,13 @@
133
295
  --c-soft: var(--color-orange-950);
134
296
  --c-soft-hover: var(--color-orange-900);
135
297
  --c-text: var(--color-orange-300);
298
+
299
+ /* Button-family slots (see the --btn-* note below). */
300
+ --btn-light-text: var(--color-orange-300);
301
+ --btn-light-hover-text: var(--color-orange-200);
302
+ --btn-text: var(--color-orange-500);
303
+ --btn-outline-hover-text: var(--color-orange-400);
304
+ --btn-link-hover: var(--color-orange-700);
136
305
  }
137
306
 
138
307
  [data-color="yellow"] {
@@ -142,6 +311,15 @@
142
311
  --c-soft: var(--color-yellow-50);
143
312
  --c-soft-hover: var(--color-yellow-100);
144
313
  --c-text: var(--color-yellow-700);
314
+
315
+ /* Button-family slots (see the --btn-* note below). */
316
+ /* Not drawn in Figma: brand's pattern on each palette's own scale. Yellow's
317
+ fill is its 400, so its hover is one step down too. */
318
+ --btn-solid-hover: var(--color-yellow-500);
319
+ --btn-light-text: var(--color-yellow-950);
320
+ --btn-text: var(--color-yellow-900);
321
+ --btn-outline-hover-text: var(--color-yellow-950);
322
+ --btn-link-hover: var(--color-yellow-950);
145
323
  }
146
324
  [data-theme="dark"] [data-color="yellow"] {
147
325
  --c-solid: var(--color-yellow-400);
@@ -150,6 +328,16 @@
150
328
  --c-soft: var(--color-yellow-950);
151
329
  --c-soft-hover: var(--color-yellow-900);
152
330
  --c-text: var(--color-yellow-300);
331
+
332
+ /* Button-family slots (see the --btn-* note below). */
333
+ /* Yellow is far brighter than other palettes at the same step, so its text
334
+ sits one to two steps lower to match their contrast on #030d20: 600 is 6.3:1
335
+ (others' 500: 5.7–7.0:1), 400 is 12.1:1 (others' 300: 10.7–12.2:1). */
336
+ --btn-light-text: var(--color-yellow-400);
337
+ --btn-light-hover-text: var(--color-yellow-300);
338
+ --btn-text: var(--color-yellow-600);
339
+ --btn-outline-hover-text: var(--color-yellow-500);
340
+ --btn-link-hover: var(--color-yellow-700);
153
341
  }
154
342
 
155
343
  [data-color="green"] {
@@ -159,6 +347,13 @@
159
347
  --c-soft: var(--color-green-50);
160
348
  --c-soft-hover: var(--color-green-100);
161
349
  --c-text: var(--color-green-700);
350
+
351
+ /* Button-family slots (see the --btn-* note below). */
352
+ --btn-solid-hover: var(--color-green-600);
353
+ --btn-light-text: var(--color-green-950);
354
+ --btn-text: var(--color-green-900);
355
+ --btn-outline-hover-text: var(--color-green-950);
356
+ --btn-link-hover: var(--color-green-950);
162
357
  }
163
358
  [data-theme="dark"] [data-color="green"] {
164
359
  --c-solid: var(--color-green-500);
@@ -167,6 +362,13 @@
167
362
  --c-soft: var(--color-green-950);
168
363
  --c-soft-hover: var(--color-green-900);
169
364
  --c-text: var(--color-green-300);
365
+
366
+ /* Button-family slots (see the --btn-* note below). */
367
+ --btn-light-text: var(--color-green-300);
368
+ --btn-light-hover-text: var(--color-green-200);
369
+ --btn-text: var(--color-green-500);
370
+ --btn-outline-hover-text: var(--color-green-400);
371
+ --btn-link-hover: var(--color-green-700);
170
372
  }
171
373
 
172
374
  [data-color="teal"] {
@@ -176,6 +378,13 @@
176
378
  --c-soft: var(--color-teal-50);
177
379
  --c-soft-hover: var(--color-teal-100);
178
380
  --c-text: var(--color-teal-700);
381
+
382
+ /* Button-family slots (see the --btn-* note below). */
383
+ --btn-solid-hover: var(--color-teal-600);
384
+ --btn-light-text: var(--color-teal-950);
385
+ --btn-text: var(--color-teal-900);
386
+ --btn-outline-hover-text: var(--color-teal-950);
387
+ --btn-link-hover: var(--color-teal-950);
179
388
  }
180
389
  [data-theme="dark"] [data-color="teal"] {
181
390
  --c-solid: var(--color-teal-500);
@@ -184,6 +393,13 @@
184
393
  --c-soft: var(--color-teal-950);
185
394
  --c-soft-hover: var(--color-teal-900);
186
395
  --c-text: var(--color-teal-300);
396
+
397
+ /* Button-family slots (see the --btn-* note below). */
398
+ --btn-light-text: var(--color-teal-300);
399
+ --btn-light-hover-text: var(--color-teal-200);
400
+ --btn-text: var(--color-teal-500);
401
+ --btn-outline-hover-text: var(--color-teal-400);
402
+ --btn-link-hover: var(--color-teal-700);
187
403
  }
188
404
 
189
405
  [data-color="cyan"] {
@@ -193,6 +409,13 @@
193
409
  --c-soft: var(--color-cyan-50);
194
410
  --c-soft-hover: var(--color-cyan-100);
195
411
  --c-text: var(--color-cyan-700);
412
+
413
+ /* Button-family slots (see the --btn-* note below). */
414
+ --btn-solid-hover: var(--color-cyan-600);
415
+ --btn-light-text: var(--color-cyan-950);
416
+ --btn-text: var(--color-cyan-900);
417
+ --btn-outline-hover-text: var(--color-cyan-950);
418
+ --btn-link-hover: var(--color-cyan-950);
196
419
  }
197
420
  [data-theme="dark"] [data-color="cyan"] {
198
421
  --c-solid: var(--color-cyan-500);
@@ -201,6 +424,13 @@
201
424
  --c-soft: var(--color-cyan-950);
202
425
  --c-soft-hover: var(--color-cyan-900);
203
426
  --c-text: var(--color-cyan-300);
427
+
428
+ /* Button-family slots (see the --btn-* note below). */
429
+ --btn-light-text: var(--color-cyan-300);
430
+ --btn-light-hover-text: var(--color-cyan-200);
431
+ --btn-text: var(--color-cyan-500);
432
+ --btn-outline-hover-text: var(--color-cyan-400);
433
+ --btn-link-hover: var(--color-cyan-700);
204
434
  }
205
435
 
206
436
  [data-color="blue"] {
@@ -210,6 +440,13 @@
210
440
  --c-soft: var(--color-blue-50);
211
441
  --c-soft-hover: var(--color-blue-100);
212
442
  --c-text: var(--color-blue-700);
443
+
444
+ /* Button-family slots (see the --btn-* note below). */
445
+ --btn-solid-hover: var(--color-blue-600);
446
+ --btn-light-text: var(--color-blue-950);
447
+ --btn-text: var(--color-blue-900);
448
+ --btn-outline-hover-text: var(--color-blue-950);
449
+ --btn-link-hover: var(--color-blue-950);
213
450
  }
214
451
  [data-theme="dark"] [data-color="blue"] {
215
452
  --c-solid: var(--color-blue-500);
@@ -218,6 +455,13 @@
218
455
  --c-soft: var(--color-blue-950);
219
456
  --c-soft-hover: var(--color-blue-900);
220
457
  --c-text: var(--color-blue-300);
458
+
459
+ /* Button-family slots (see the --btn-* note below). */
460
+ --btn-light-text: var(--color-blue-300);
461
+ --btn-light-hover-text: var(--color-blue-200);
462
+ --btn-text: var(--color-blue-500);
463
+ --btn-outline-hover-text: var(--color-blue-400);
464
+ --btn-link-hover: var(--color-blue-700);
221
465
  }
222
466
 
223
467
  [data-color="purple"] {
@@ -230,6 +474,13 @@
230
474
  --c-soft: var(--color-purple-50);
231
475
  --c-soft-hover: var(--color-purple-100);
232
476
  --c-text: var(--color-purple-700);
477
+
478
+ /* Button-family slots (see the --btn-* note below). */
479
+ --btn-solid-hover: var(--color-purple-600);
480
+ --btn-light-text: var(--color-purple-950);
481
+ --btn-text: var(--color-purple-900);
482
+ --btn-outline-hover-text: var(--color-purple-950);
483
+ --btn-link-hover: var(--color-purple-950);
233
484
  }
234
485
  [data-theme="dark"] [data-color="purple"] {
235
486
  --c-solid: var(--color-purple-500);
@@ -238,6 +489,13 @@
238
489
  --c-soft: var(--color-purple-950);
239
490
  --c-soft-hover: var(--color-purple-900);
240
491
  --c-text: var(--color-purple-300);
492
+
493
+ /* Button-family slots (see the --btn-* note below). */
494
+ --btn-light-text: var(--color-purple-300);
495
+ --btn-light-hover-text: var(--color-purple-200);
496
+ --btn-text: var(--color-purple-500);
497
+ --btn-outline-hover-text: var(--color-purple-400);
498
+ --btn-link-hover: var(--color-purple-700);
241
499
  }
242
500
 
243
501
  [data-color="pink"] {
@@ -247,6 +505,13 @@
247
505
  --c-soft: var(--color-pink-50);
248
506
  --c-soft-hover: var(--color-pink-100);
249
507
  --c-text: var(--color-pink-700);
508
+
509
+ /* Button-family slots (see the --btn-* note below). */
510
+ --btn-solid-hover: var(--color-pink-600);
511
+ --btn-light-text: var(--color-pink-950);
512
+ --btn-text: var(--color-pink-900);
513
+ --btn-outline-hover-text: var(--color-pink-950);
514
+ --btn-link-hover: var(--color-pink-950);
250
515
  }
251
516
  [data-theme="dark"] [data-color="pink"] {
252
517
  --c-solid: var(--color-pink-500);
@@ -255,6 +520,13 @@
255
520
  --c-soft: var(--color-pink-950);
256
521
  --c-soft-hover: var(--color-pink-900);
257
522
  --c-text: var(--color-pink-300);
523
+
524
+ /* Button-family slots (see the --btn-* note below). */
525
+ --btn-light-text: var(--color-pink-300);
526
+ --btn-light-hover-text: var(--color-pink-200);
527
+ --btn-text: var(--color-pink-500);
528
+ --btn-outline-hover-text: var(--color-pink-400);
529
+ --btn-link-hover: var(--color-pink-700);
258
530
  }
259
531
 
260
532
  /* `gray` is a deprecated alias of `neutral`: the former mid-gray palette was
@@ -281,6 +553,35 @@
281
553
  --c-soft-hover: color-mix(in oklab, var(--color-black) 35%, transparent);
282
554
  /* Figma Text/text-secondary: Brand/900-alpha70. */
283
555
  --c-text: color-mix(in oklab, var(--color-brand-900) 70%, transparent);
556
+
557
+ /* Button-family slots (see the --btn-* note below). */
558
+ --btn-solid: var(--color-brand-950);
559
+ --btn-solid-hover: var(--color-brand-800);
560
+ --btn-on-solid: var(--color-white);
561
+ --btn-light-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
562
+ --btn-light-border: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
563
+ --btn-light-text: var(--color-brand-900);
564
+ --btn-light-hover-bg: color-mix(in oklab, var(--color-white) 50%, transparent);
565
+ --btn-light-hover-border: color-mix(in oklab, var(--color-brand-900) 30%, transparent);
566
+ --btn-light-hover-text: var(--color-brand-950);
567
+ /* Figma fills the neutral outline with the page colour; the kit keeps it
568
+ transparent like every other outline (decided 2026-11-17). */
569
+ --btn-outline-border: color-mix(in oklab, var(--color-brand-900) 30%, transparent);
570
+ --btn-outline-text: var(--color-brand-900);
571
+ --btn-outline-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
572
+ --btn-outline-hover-border: var(--color-brand-950);
573
+ --btn-outline-hover-text: var(--color-brand-950);
574
+ --btn-subtle-text: var(--color-brand-900);
575
+ --btn-subtle-hover-bg: color-mix(in oklab, var(--color-brand-900) 8%, transparent);
576
+ --btn-subtle-hover-text: var(--color-brand-950);
577
+ --btn-link-text: var(--color-brand-950);
578
+ --btn-link-hover: color-mix(in oklab, var(--color-brand-900) 40%, transparent);
579
+ /* Figma's neutral disabled fill is a brand tint, not a navy one. */
580
+ --btn-disabled-bg: color-mix(in oklab, var(--color-brand-500) 10%, transparent);
581
+ --btn-disabled-border: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
582
+ --btn-disabled-text: color-mix(in oklab, var(--color-brand-900) 20%, transparent);
583
+ --btn-light-disabled-bg: transparent;
584
+ --btn-light-disabled-border: color-mix(in oklab, var(--color-brand-900) 10%, transparent);
284
585
  }
285
586
  [data-theme="dark"] [data-color="neutral"],
286
587
  [data-theme="dark"] [data-color="gray"] {
@@ -292,4 +593,31 @@
292
593
  --c-soft-hover: color-mix(in oklab, var(--color-white) 35%, transparent);
293
594
  /* Figma Text/text-secondary: White Alpha/300 (white 80%). */
294
595
  --c-text: color-mix(in oklab, var(--color-white) 80%, transparent);
596
+
597
+ /* Button-family slots (see the --btn-* note below). */
598
+ --btn-solid: var(--color-white);
599
+ /* Figma bg-inverse-hover; no kit primitive carries this value. */
600
+ --btn-solid-hover: #d5d7da;
601
+ --btn-on-solid: var(--color-brand-950);
602
+ --btn-light-bg: color-mix(in oklab, var(--color-white) 4%, transparent);
603
+ --btn-light-border: color-mix(in oklab, var(--color-white) 16%, transparent);
604
+ --btn-light-text: color-mix(in oklab, var(--color-white) 80%, transparent);
605
+ --btn-light-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
606
+ --btn-light-hover-border: color-mix(in oklab, var(--color-white) 35%, transparent);
607
+ --btn-light-hover-text: var(--color-white);
608
+ --btn-outline-border: color-mix(in oklab, var(--color-white) 35%, transparent);
609
+ --btn-outline-text: color-mix(in oklab, var(--color-white) 80%, transparent);
610
+ --btn-outline-hover-bg: color-mix(in oklab, var(--color-white) 4%, transparent);
611
+ --btn-outline-hover-border: var(--color-white);
612
+ --btn-outline-hover-text: var(--color-white);
613
+ --btn-subtle-text: color-mix(in oklab, var(--color-white) 80%, transparent);
614
+ --btn-subtle-hover-bg: color-mix(in oklab, var(--color-white) 16%, transparent);
615
+ --btn-subtle-hover-text: var(--color-white);
616
+ --btn-link-text: var(--color-white);
617
+ --btn-link-hover: color-mix(in oklab, var(--color-white) 35%, transparent);
618
+ --btn-disabled-bg: color-mix(in oklab, var(--color-white) 8%, transparent);
619
+ --btn-disabled-border: color-mix(in oklab, var(--color-white) 16%, transparent);
620
+ --btn-disabled-text: color-mix(in oklab, var(--color-white) 16%, transparent);
621
+ --btn-light-disabled-bg: transparent;
622
+ --btn-light-disabled-border: color-mix(in oklab, var(--color-white) 8%, transparent);
295
623
  }
@@ -7,9 +7,10 @@ import type { WithTestId } from "../../lib/test-id";
7
7
  *
8
8
  * Same (variant × color) model as `Button`:
9
9
  * - `variant` picks the shape (filled / light / outline / subtle / default)
10
- * - `color` picks the palette (brand / gray / red / …)
11
- * - Color is delivered via `data-color` + the slot vars in `colors.css`,
12
- * so dark mode shade-shifts happen at the CSS layer.
10
+ * - `color` picks the palette (brand / neutral / red / …)
11
+ * - filled / light / outline / subtle share Button's colour classes
12
+ * (`lib/button-colors.ts`, the `--btn-*` slots in `colors.css`): Figma's
13
+ * ActionIcon is an instance of its Button set.
13
14
  *
14
15
  * What's specific to ActionIcon:
15
16
  * - Forced 1:1 aspect ratio.
@@ -24,8 +25,8 @@ import type { WithTestId } from "../../lib/test-id";
24
25
  * *that* element's own children (`withAsChildContent`, `lib/as-child.ts`)
25
26
  * rather than the element itself. The `onClick` guard (`preventWhileLoading`)
26
27
  * goes on the same clone, since `disabled` doesn't do anything on an
27
- * arbitrary `asChild` element (e.g. an `<a>`) — same reason the `opacity-50`
28
- * dimming and `pointer-events-none` blocking are keyed off `data-loading`
28
+ * arbitrary `asChild` element (e.g. an `<a>`) — same reason the loading
29
+ * `opacity-50` dimming and `pointer-events-none` blocking are keyed off `data-loading`
29
30
  * rather than `:disabled` (see `Button`'s note on this).
30
31
  */
31
32
  declare const actionIconVariants: (props?: ({