@proyecto-viviana/ui 0.6.1 → 0.6.3

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 (301) hide show
  1. package/README.md +14 -16
  2. package/dist/_chunk/LinkButton.js +9 -9
  3. package/dist/_chunk/LinkButton.js.map +1 -1
  4. package/dist/_chunk/LinkButton.jsx +9 -9
  5. package/dist/_chunk/LinkButton.jsx.map +1 -1
  6. package/dist/_chunk/RangeCalendar.js +7 -7
  7. package/dist/_chunk/RangeCalendar.js.map +1 -1
  8. package/dist/_chunk/RangeCalendar.jsx +7 -7
  9. package/dist/_chunk/RangeCalendar.jsx.map +1 -1
  10. package/dist/_chunk/Tabs.js +2 -2
  11. package/dist/_chunk/Tabs.jsx +2 -2
  12. package/dist/_chunk/breadcrumbs.js +2 -2
  13. package/dist/_chunk/breadcrumbs.js.map +1 -1
  14. package/dist/_chunk/breadcrumbs.jsx +2 -2
  15. package/dist/_chunk/breadcrumbs.jsx.map +1 -1
  16. package/dist/_chunk/button.js +3 -3
  17. package/dist/_chunk/button.jsx +3 -3
  18. package/dist/_chunk/color.js +4 -4
  19. package/dist/_chunk/color.jsx +4 -4
  20. package/dist/_chunk/form.js +5 -7
  21. package/dist/_chunk/form.js.map +1 -1
  22. package/dist/_chunk/form.jsx +5 -8
  23. package/dist/_chunk/form.jsx.map +1 -1
  24. package/dist/_chunk/layout.js +5 -1
  25. package/dist/_chunk/layout.js.map +1 -1
  26. package/dist/_chunk/layout.jsx +5 -1
  27. package/dist/_chunk/layout.jsx.map +1 -1
  28. package/dist/_chunk/list.js +4 -4
  29. package/dist/_chunk/list.jsx +4 -4
  30. package/dist/_chunk/menu.js +1 -1
  31. package/dist/_chunk/menu.js.map +1 -1
  32. package/dist/_chunk/menu.jsx +1 -1
  33. package/dist/_chunk/menu.jsx.map +1 -1
  34. package/dist/_chunk/numberfield.js +2 -2
  35. package/dist/_chunk/numberfield.jsx +2 -2
  36. package/dist/_chunk/s2-action-button-styles.js +8 -8
  37. package/dist/_chunk/s2-action-button-styles.js.map +1 -1
  38. package/dist/_chunk/s2-action-button-styles.jsx +8 -8
  39. package/dist/_chunk/s2-action-button-styles.jsx.map +1 -1
  40. package/dist/_chunk/s2-menu-styles.js +1 -1
  41. package/dist/_chunk/s2-menu-styles.jsx +1 -1
  42. package/dist/_chunk/slider.js +6 -6
  43. package/dist/_chunk/slider.jsx +6 -6
  44. package/dist/_chunk/switch.js +2 -2
  45. package/dist/_chunk/switch.jsx +2 -2
  46. package/dist/_chunk/table.js +3 -3
  47. package/dist/_chunk/table.js.map +1 -1
  48. package/dist/_chunk/table.jsx +3 -3
  49. package/dist/_chunk/table.jsx.map +1 -1
  50. package/dist/_chunk/text.js +1 -1
  51. package/dist/_chunk/text.jsx +1 -1
  52. package/dist/_chunk/textfield.js +4 -4
  53. package/dist/_chunk/textfield.jsx +4 -4
  54. package/dist/_chunk/toast.js +3 -3
  55. package/dist/_chunk/toast.jsx +3 -3
  56. package/dist/actiongroup/index.js +2 -2
  57. package/dist/actiongroup/index.jsx +2 -2
  58. package/dist/badge/index.js +6 -6
  59. package/dist/badge/index.jsx +6 -6
  60. package/dist/breadcrumbs/index.d.ts.map +1 -1
  61. package/dist/calendar/DateField.d.ts.map +1 -1
  62. package/dist/calendar/DateField.js +2 -2
  63. package/dist/calendar/DateField.js.map +1 -1
  64. package/dist/calendar/DateField.jsx +2 -2
  65. package/dist/calendar/DateField.jsx.map +1 -1
  66. package/dist/calendar/DatePicker.d.ts.map +1 -1
  67. package/dist/calendar/DatePicker.js +2 -2
  68. package/dist/calendar/DatePicker.js.map +1 -1
  69. package/dist/calendar/DatePicker.jsx +2 -2
  70. package/dist/calendar/DatePicker.jsx.map +1 -1
  71. package/dist/calendar/DateRangePicker.js +2 -2
  72. package/dist/calendar/DateRangePicker.jsx +2 -2
  73. package/dist/calendar/RangeCalendar.d.ts.map +1 -1
  74. package/dist/calendar/TimeField.d.ts.map +1 -1
  75. package/dist/calendar/TimeField.js +2 -2
  76. package/dist/calendar/TimeField.js.map +1 -1
  77. package/dist/calendar/TimeField.jsx +2 -2
  78. package/dist/calendar/TimeField.jsx.map +1 -1
  79. package/dist/calendar/index.js +5 -5
  80. package/dist/calendar/index.js.map +1 -1
  81. package/dist/calendar/index.jsx +5 -5
  82. package/dist/calendar/index.jsx.map +1 -1
  83. package/dist/checkbox/index.js +3 -3
  84. package/dist/checkbox/index.jsx +3 -3
  85. package/dist/combobox/index.js +2 -2
  86. package/dist/combobox/index.jsx +2 -2
  87. package/dist/dropzone/index.js +1 -1
  88. package/dist/dropzone/index.jsx +1 -1
  89. package/dist/font-faces.css +13 -6
  90. package/dist/form/index.d.ts.map +1 -1
  91. package/dist/icon/pixel-icons/PixelChartIcon.d.ts.map +1 -1
  92. package/dist/icon/pixel-icons/PixelChartIcon.js.map +1 -1
  93. package/dist/icon/pixel-icons/PixelChartIcon.jsx.map +1 -1
  94. package/dist/icon/pixel-icons/PixelCheckIcon.d.ts.map +1 -1
  95. package/dist/icon/pixel-icons/PixelCheckIcon.js.map +1 -1
  96. package/dist/icon/pixel-icons/PixelCheckIcon.jsx.map +1 -1
  97. package/dist/icon/pixel-icons/PixelChevronDownIcon.d.ts.map +1 -1
  98. package/dist/icon/pixel-icons/PixelChevronDownIcon.js.map +1 -1
  99. package/dist/icon/pixel-icons/PixelChevronDownIcon.jsx.map +1 -1
  100. package/dist/icon/pixel-icons/PixelChevronRightIcon.d.ts.map +1 -1
  101. package/dist/icon/pixel-icons/PixelChevronRightIcon.js.map +1 -1
  102. package/dist/icon/pixel-icons/PixelChevronRightIcon.jsx.map +1 -1
  103. package/dist/icon/pixel-icons/PixelClockIcon.d.ts.map +1 -1
  104. package/dist/icon/pixel-icons/PixelClockIcon.js.map +1 -1
  105. package/dist/icon/pixel-icons/PixelClockIcon.jsx.map +1 -1
  106. package/dist/icon/pixel-icons/PixelCodeIcon.d.ts.map +1 -1
  107. package/dist/icon/pixel-icons/PixelCodeIcon.js.map +1 -1
  108. package/dist/icon/pixel-icons/PixelCodeIcon.jsx.map +1 -1
  109. package/dist/icon/pixel-icons/PixelCommunityIcon.d.ts.map +1 -1
  110. package/dist/icon/pixel-icons/PixelCommunityIcon.js.map +1 -1
  111. package/dist/icon/pixel-icons/PixelCommunityIcon.jsx.map +1 -1
  112. package/dist/icon/pixel-icons/PixelCubeIcon.d.ts.map +1 -1
  113. package/dist/icon/pixel-icons/PixelCubeIcon.js.map +1 -1
  114. package/dist/icon/pixel-icons/PixelCubeIcon.jsx.map +1 -1
  115. package/dist/icon/pixel-icons/PixelFlameIcon.d.ts.map +1 -1
  116. package/dist/icon/pixel-icons/PixelFlameIcon.js.map +1 -1
  117. package/dist/icon/pixel-icons/PixelFlameIcon.jsx.map +1 -1
  118. package/dist/icon/pixel-icons/PixelHomeIcon.d.ts.map +1 -1
  119. package/dist/icon/pixel-icons/PixelHomeIcon.js.map +1 -1
  120. package/dist/icon/pixel-icons/PixelHomeIcon.jsx.map +1 -1
  121. package/dist/icon/pixel-icons/PixelLayoutIcon.d.ts.map +1 -1
  122. package/dist/icon/pixel-icons/PixelLayoutIcon.js.map +1 -1
  123. package/dist/icon/pixel-icons/PixelLayoutIcon.jsx.map +1 -1
  124. package/dist/icon/pixel-icons/PixelMessageIcon.d.ts.map +1 -1
  125. package/dist/icon/pixel-icons/PixelMessageIcon.js.map +1 -1
  126. package/dist/icon/pixel-icons/PixelMessageIcon.jsx.map +1 -1
  127. package/dist/icon/pixel-icons/PixelNavCommunityIcon.d.ts.map +1 -1
  128. package/dist/icon/pixel-icons/PixelNavCommunityIcon.js.map +1 -1
  129. package/dist/icon/pixel-icons/PixelNavCommunityIcon.jsx.map +1 -1
  130. package/dist/icon/pixel-icons/PixelNavExploreIcon.d.ts.map +1 -1
  131. package/dist/icon/pixel-icons/PixelNavExploreIcon.js.map +1 -1
  132. package/dist/icon/pixel-icons/PixelNavExploreIcon.jsx.map +1 -1
  133. package/dist/icon/pixel-icons/PixelNavLiveIcon.d.ts.map +1 -1
  134. package/dist/icon/pixel-icons/PixelNavLiveIcon.js.map +1 -1
  135. package/dist/icon/pixel-icons/PixelNavLiveIcon.jsx.map +1 -1
  136. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.d.ts.map +1 -1
  137. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.js.map +1 -1
  138. package/dist/icon/pixel-icons/PixelNavPathwaysIcon.jsx.map +1 -1
  139. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.d.ts.map +1 -1
  140. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.js.map +1 -1
  141. package/dist/icon/pixel-icons/PixelNavPlaygroundIcon.jsx.map +1 -1
  142. package/dist/icon/pixel-icons/PixelNavProjectsIcon.d.ts.map +1 -1
  143. package/dist/icon/pixel-icons/PixelNavProjectsIcon.js.map +1 -1
  144. package/dist/icon/pixel-icons/PixelNavProjectsIcon.jsx.map +1 -1
  145. package/dist/icon/pixel-icons/PixelNavReferenceIcon.d.ts.map +1 -1
  146. package/dist/icon/pixel-icons/PixelNavReferenceIcon.js.map +1 -1
  147. package/dist/icon/pixel-icons/PixelNavReferenceIcon.jsx.map +1 -1
  148. package/dist/icon/pixel-icons/PixelNavSettingsIcon.d.ts.map +1 -1
  149. package/dist/icon/pixel-icons/PixelNavSettingsIcon.js.map +1 -1
  150. package/dist/icon/pixel-icons/PixelNavSettingsIcon.jsx.map +1 -1
  151. package/dist/icon/pixel-icons/PixelNavTopicsIcon.d.ts.map +1 -1
  152. package/dist/icon/pixel-icons/PixelNavTopicsIcon.js.map +1 -1
  153. package/dist/icon/pixel-icons/PixelNavTopicsIcon.jsx.map +1 -1
  154. package/dist/icon/pixel-icons/PixelNotificationIcon.d.ts.map +1 -1
  155. package/dist/icon/pixel-icons/PixelNotificationIcon.js.map +1 -1
  156. package/dist/icon/pixel-icons/PixelNotificationIcon.jsx.map +1 -1
  157. package/dist/icon/pixel-icons/PixelPathwaysIcon.d.ts.map +1 -1
  158. package/dist/icon/pixel-icons/PixelPathwaysIcon.js.map +1 -1
  159. package/dist/icon/pixel-icons/PixelPathwaysIcon.jsx.map +1 -1
  160. package/dist/icon/pixel-icons/PixelPlayIcon.d.ts.map +1 -1
  161. package/dist/icon/pixel-icons/PixelPlayIcon.js.map +1 -1
  162. package/dist/icon/pixel-icons/PixelPlayIcon.jsx.map +1 -1
  163. package/dist/icon/pixel-icons/PixelSearchIcon.d.ts.map +1 -1
  164. package/dist/icon/pixel-icons/PixelSearchIcon.js.map +1 -1
  165. package/dist/icon/pixel-icons/PixelSearchIcon.jsx.map +1 -1
  166. package/dist/icon/pixel-icons/PixelSettingsIcon.d.ts.map +1 -1
  167. package/dist/icon/pixel-icons/PixelSettingsIcon.js.map +1 -1
  168. package/dist/icon/pixel-icons/PixelSettingsIcon.jsx.map +1 -1
  169. package/dist/icon/pixel-icons/PixelSparkleIcon.d.ts.map +1 -1
  170. package/dist/icon/pixel-icons/PixelSparkleIcon.js.map +1 -1
  171. package/dist/icon/pixel-icons/PixelSparkleIcon.jsx.map +1 -1
  172. package/dist/icon/pixel-icons/PixelTopicsIcon.d.ts.map +1 -1
  173. package/dist/icon/pixel-icons/PixelTopicsIcon.js.map +1 -1
  174. package/dist/icon/pixel-icons/PixelTopicsIcon.jsx.map +1 -1
  175. package/dist/icon/pixel-icons/PixelUserIcon.d.ts.map +1 -1
  176. package/dist/icon/pixel-icons/PixelUserIcon.js.map +1 -1
  177. package/dist/icon/pixel-icons/PixelUserIcon.jsx.map +1 -1
  178. package/dist/icon/pixel-icons/PixelZapIcon.d.ts.map +1 -1
  179. package/dist/icon/pixel-icons/PixelZapIcon.js.map +1 -1
  180. package/dist/icon/pixel-icons/PixelZapIcon.jsx.map +1 -1
  181. package/dist/inlinealert/index.js +6 -6
  182. package/dist/inlinealert/index.jsx +6 -6
  183. package/dist/labeledvalue/index.js +1 -1
  184. package/dist/labeledvalue/index.jsx +1 -1
  185. package/dist/layout/Flex.d.ts +2 -0
  186. package/dist/layout/Flex.d.ts.map +1 -1
  187. package/dist/link/index.d.ts.map +1 -1
  188. package/dist/link/index.js +1 -4
  189. package/dist/link/index.js.map +1 -1
  190. package/dist/link/index.jsx +1 -4
  191. package/dist/link/index.jsx.map +1 -1
  192. package/dist/listbox/index.js +3 -3
  193. package/dist/listbox/index.jsx +4 -4
  194. package/dist/menu/index.d.ts.map +1 -1
  195. package/dist/meter/index.d.ts.map +1 -1
  196. package/dist/meter/index.js +2 -2
  197. package/dist/meter/index.js.map +1 -1
  198. package/dist/meter/index.jsx +2 -2
  199. package/dist/meter/index.jsx.map +1 -1
  200. package/dist/notificationbadge/index.js +1 -1
  201. package/dist/notificationbadge/index.jsx +1 -1
  202. package/dist/picker/index.js +3 -3
  203. package/dist/picker/index.jsx +3 -3
  204. package/dist/popover/index.js +1 -1
  205. package/dist/popover/index.jsx +1 -1
  206. package/dist/progress/ProgressCircle.js +2 -2
  207. package/dist/progress/ProgressCircle.js.map +1 -1
  208. package/dist/progress/ProgressCircle.jsx +2 -2
  209. package/dist/progress/ProgressCircle.jsx.map +1 -1
  210. package/dist/progress-bar/index.js +4 -4
  211. package/dist/progress-bar/index.jsx +4 -4
  212. package/dist/radio/index.js +2 -2
  213. package/dist/radio/index.jsx +2 -2
  214. package/dist/searchfield/index.js +2 -2
  215. package/dist/searchfield/index.jsx +2 -2
  216. package/dist/segmentedcontrol/index.js +2 -5
  217. package/dist/segmentedcontrol/index.js.map +1 -1
  218. package/dist/segmentedcontrol/index.jsx +2 -5
  219. package/dist/segmentedcontrol/index.jsx.map +1 -1
  220. package/dist/select/index.js +3 -3
  221. package/dist/select/index.jsx +3 -3
  222. package/dist/selectboxgroup/index.js +1 -1
  223. package/dist/selectboxgroup/index.jsx +1 -1
  224. package/dist/statuslight/index.js +1 -1
  225. package/dist/statuslight/index.jsx +1 -1
  226. package/dist/steplist/index.js +5 -5
  227. package/dist/steplist/index.jsx +5 -5
  228. package/dist/style/glasselated-ramps.d.ts.map +1 -1
  229. package/dist/style/index.js +18 -9
  230. package/dist/style/index.js.map +1 -1
  231. package/dist/style/spectrum-theme.d.ts +7 -7
  232. package/dist/style/spectrum-theme.d.ts.map +1 -1
  233. package/dist/styles.css +1 -1
  234. package/dist/table/index.d.ts.map +1 -1
  235. package/dist/tag-group/index.js +10 -10
  236. package/dist/tag-group/index.js.map +1 -1
  237. package/dist/tag-group/index.jsx +10 -10
  238. package/dist/tag-group/index.jsx.map +1 -1
  239. package/dist/toolbar/index.d.ts.map +1 -1
  240. package/dist/toolbar/index.js.map +1 -1
  241. package/dist/toolbar/index.jsx.map +1 -1
  242. package/dist/tree/index.d.ts.map +1 -1
  243. package/dist/tree/index.js +5 -5
  244. package/dist/tree/index.js.map +1 -1
  245. package/dist/tree/index.jsx +5 -5
  246. package/dist/tree/index.jsx.map +1 -1
  247. package/dist/viviana-tokens.css +39 -12
  248. package/package.json +18 -5
  249. package/src/breadcrumbs/index.tsx +14 -7
  250. package/src/button/s2-action-button-styles.ts +8 -8
  251. package/src/button/s2-button-styles.ts +8 -8
  252. package/src/calendar/DateField.tsx +2 -6
  253. package/src/calendar/DatePicker.tsx +8 -1
  254. package/src/calendar/RangeCalendar.tsx +13 -7
  255. package/src/calendar/TimeField.tsx +2 -6
  256. package/src/calendar/index.tsx +4 -4
  257. package/src/font-faces.css +13 -6
  258. package/src/form/index.tsx +5 -6
  259. package/src/icon/pixel-icons/PixelChartIcon.tsx +4 -1
  260. package/src/icon/pixel-icons/PixelCheckIcon.tsx +4 -1
  261. package/src/icon/pixel-icons/PixelChevronDownIcon.tsx +4 -1
  262. package/src/icon/pixel-icons/PixelChevronRightIcon.tsx +4 -1
  263. package/src/icon/pixel-icons/PixelClockIcon.tsx +4 -1
  264. package/src/icon/pixel-icons/PixelCodeIcon.tsx +4 -1
  265. package/src/icon/pixel-icons/PixelCommunityIcon.tsx +4 -1
  266. package/src/icon/pixel-icons/PixelCubeIcon.tsx +4 -1
  267. package/src/icon/pixel-icons/PixelFlameIcon.tsx +4 -1
  268. package/src/icon/pixel-icons/PixelHomeIcon.tsx +4 -1
  269. package/src/icon/pixel-icons/PixelLayoutIcon.tsx +4 -1
  270. package/src/icon/pixel-icons/PixelMessageIcon.tsx +4 -1
  271. package/src/icon/pixel-icons/PixelNavCommunityIcon.tsx +4 -1
  272. package/src/icon/pixel-icons/PixelNavExploreIcon.tsx +4 -1
  273. package/src/icon/pixel-icons/PixelNavLiveIcon.tsx +4 -1
  274. package/src/icon/pixel-icons/PixelNavPathwaysIcon.tsx +4 -1
  275. package/src/icon/pixel-icons/PixelNavPlaygroundIcon.tsx +4 -1
  276. package/src/icon/pixel-icons/PixelNavProjectsIcon.tsx +4 -1
  277. package/src/icon/pixel-icons/PixelNavReferenceIcon.tsx +4 -1
  278. package/src/icon/pixel-icons/PixelNavSettingsIcon.tsx +4 -1
  279. package/src/icon/pixel-icons/PixelNavTopicsIcon.tsx +4 -1
  280. package/src/icon/pixel-icons/PixelNotificationIcon.tsx +4 -1
  281. package/src/icon/pixel-icons/PixelPathwaysIcon.tsx +4 -1
  282. package/src/icon/pixel-icons/PixelPlayIcon.tsx +4 -1
  283. package/src/icon/pixel-icons/PixelSearchIcon.tsx +4 -1
  284. package/src/icon/pixel-icons/PixelSettingsIcon.tsx +4 -1
  285. package/src/icon/pixel-icons/PixelSparkleIcon.tsx +4 -1
  286. package/src/icon/pixel-icons/PixelTopicsIcon.tsx +4 -1
  287. package/src/icon/pixel-icons/PixelUserIcon.tsx +4 -1
  288. package/src/icon/pixel-icons/PixelZapIcon.tsx +4 -1
  289. package/src/layout/Flex.tsx +7 -0
  290. package/src/link/index.tsx +3 -1
  291. package/src/menu/index.tsx +1 -3
  292. package/src/meter/index.tsx +1 -3
  293. package/src/progress/ProgressCircle.tsx +1 -1
  294. package/src/segmentedcontrol/index.tsx +6 -6
  295. package/src/style/glasselated-ramps.ts +37 -33
  296. package/src/style/spectrum-theme.ts +22 -17
  297. package/src/table/index.tsx +1 -3
  298. package/src/tag-group/index.tsx +8 -8
  299. package/src/toolbar/index.tsx +4 -1
  300. package/src/tree/index.tsx +3 -11
  301. package/src/viviana-tokens.css +39 -12
@@ -111,7 +111,7 @@ const labelStyles = function anonymous(props) {
111
111
  }
112
112
  if (props.isStaticColor) rules += " pl151";
113
113
  else if (props.isDisabled) rules += " pUvnvv151";
114
- else rules += " pUUi0Fe151";
114
+ else rules += " pWQ7V3d151";
115
115
  rules += " plb151";
116
116
  rules += " ri151";
117
117
  return rules;
@@ -155,7 +155,7 @@ const valueStyles = function anonymous(props) {
155
155
  }
156
156
  if (props.isStaticColor) rules += " pl151";
157
157
  else if (props.isDisabled) rules += " pUvnvv151";
158
- else rules += " pUUi0Fe151";
158
+ else rules += " pWQ7V3d151";
159
159
  rules += " plb151";
160
160
  rules += " ri151";
161
161
  rules += " z8bmXs151";
@@ -218,7 +218,7 @@ const fillStyles = function anonymous(props) {
218
218
  rules += " kd151";
219
219
  rules += " jd151";
220
220
  if (props.isStaticColor) rules += " gj151";
221
- else rules += " gdeCgNc151";
221
+ else rules += " gnhAeB151";
222
222
  rules += " glc151";
223
223
  if (props.isIndeterminate) rules += " _0e151";
224
224
  return rules;
@@ -235,7 +235,7 @@ const pendingStyles = function anonymous(props) {
235
235
  rules += " _iNW847b151";
236
236
  rules += " __mrmLYsd151";
237
237
  if (props.isStaticColor) rules += " -lMNcGb-gj151";
238
- else rules += " -lMNcGb-gdeCgNc151";
238
+ else rules += " -lMNcGb-gnhAeB151";
239
239
  rules += " -lMNcGb-lgc151";
240
240
  return rules;
241
241
  };
@@ -140,7 +140,7 @@ const radioGroupLabel = function anonymous(props) {
140
140
  }
141
141
  if (props.isStaticColor) rules += " pl151";
142
142
  else if (props.isDisabled) rules += " pUvnvv151";
143
- else rules += " pUUi0Fe151";
143
+ else rules += " pWQ7V3d151";
144
144
  rules += " plb151";
145
145
  rules += " ri151";
146
146
  return rules;
@@ -230,7 +230,7 @@ const radioGroupHelpText = function anonymous(props) {
230
230
  } else if (props.isInvalid) {
231
231
  rules += " pYjUhNc151";
232
232
  rules += " plQBRyrc151";
233
- } else rules += " pUUi0Fe151";
233
+ } else rules += " pWQ7V3d151";
234
234
  rules += " _qb151";
235
235
  rules += " TgOnRt151";
236
236
  rules += " -_8sjo0b-t5ZbAob151";
@@ -134,7 +134,7 @@ const radioGroupLabel = function anonymous(props) {
134
134
  }
135
135
  if (props.isStaticColor) rules += " pl151";
136
136
  else if (props.isDisabled) rules += " pUvnvv151";
137
- else rules += " pUUi0Fe151";
137
+ else rules += " pWQ7V3d151";
138
138
  rules += " plb151";
139
139
  rules += " ri151";
140
140
  return rules;
@@ -224,7 +224,7 @@ const radioGroupHelpText = function anonymous(props) {
224
224
  } else if (props.isInvalid) {
225
225
  rules += " pYjUhNc151";
226
226
  rules += " plQBRyrc151";
227
- } else rules += " pUUi0Fe151";
227
+ } else rules += " pWQ7V3d151";
228
228
  rules += " _qb151";
229
229
  rules += " TgOnRt151";
230
230
  rules += " -_8sjo0b-t5ZbAob151";
@@ -152,7 +152,7 @@ const searchFieldLabel = function anonymous(props) {
152
152
  }
153
153
  if (props.isStaticColor) rules += " pl151";
154
154
  else if (props.isDisabled) rules += " pUvnvv151";
155
- else rules += " pUUi0Fe151";
155
+ else rules += " pWQ7V3d151";
156
156
  rules += " plb151";
157
157
  rules += " ri151";
158
158
  return rules;
@@ -390,7 +390,7 @@ const helpTextStyles = function anonymous(props) {
390
390
  } else if (props.isInvalid) {
391
391
  rules += " pYjUhNc151";
392
392
  rules += " plQBRyrc151";
393
- } else rules += " pUUi0Fe151";
393
+ } else rules += " pWQ7V3d151";
394
394
  rules += " -_8sjo0b-t5ZbAob151";
395
395
  rules += " _qb151";
396
396
  rules += " TgOnRt151";
@@ -144,7 +144,7 @@ const searchFieldLabel = function anonymous(props) {
144
144
  }
145
145
  if (props.isStaticColor) rules += " pl151";
146
146
  else if (props.isDisabled) rules += " pUvnvv151";
147
- else rules += " pUUi0Fe151";
147
+ else rules += " pWQ7V3d151";
148
148
  rules += " plb151";
149
149
  rules += " ri151";
150
150
  return rules;
@@ -382,7 +382,7 @@ const helpTextStyles = function anonymous(props) {
382
382
  } else if (props.isInvalid) {
383
383
  rules += " pYjUhNc151";
384
384
  rules += " plQBRyrc151";
385
- } else rules += " pUUi0Fe151";
385
+ } else rules += " pWQ7V3d151";
386
386
  rules += " -_8sjo0b-t5ZbAob151";
387
387
  rules += " _qb151";
388
388
  rules += " TgOnRt151";
@@ -56,14 +56,11 @@ const segmentedControlItem = function anonymous(props) {
56
56
  rules += " _FnuYUweb151";
57
57
  }
58
58
  if (props.isDisabled) rules += " pUvnvv151";
59
- else if (props.isSelected) if (props.isPressed) rules += " pOzYCcc151";
60
- else if (props.isFocusVisible) rules += " pOzYCcc151";
61
- else if (props.isHovered) rules += " pOzYCcc151";
62
- else rules += " p5dxOg151";
59
+ else if (props.isSelected) rules += " p9ck5ue151";
63
60
  else if (props.isPressed) rules += " pQKeKoe151";
64
61
  else if (props.isFocusVisible) rules += " pQKeKoe151";
65
62
  else if (props.isHovered) rules += " pQKeKoe151";
66
- else rules += " pUUi0Fe151";
63
+ else rules += " pWQ7V3d151";
67
64
  rules += " sd151";
68
65
  rules += " eb151";
69
66
  rules += " _oa151";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/segmentedcontrol/index.tsx"],"sourcesContent":["import {\n children as resolveChildren,\n createContext,\n type JSX,\n mergeProps,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport {\n SelectionIndicator,\n SharedElementTransition,\n ToggleButton as HeadlessToggleButton,\n ToggleButtonGroup as HeadlessToggleButtonGroup,\n useToggleButtonGroupStateContext,\n type ToggleButtonProps as HeadlessToggleButtonProps,\n type ToggleButtonGroupProps as HeadlessToggleButtonGroupProps,\n type ToggleButtonRenderProps,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key } from \"@proyecto-viviana/solid-stately\";\nimport type { StyleString } from \"../style\";\nimport { baseColor, fontRelative, focusRing, style } from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { control } from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { IconContext } from \"../icon/spectrum-icon\";\nimport { centerBaseline } from \"../icon/center-baseline\";\nimport { useProviderProps } from \"../provider\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\n\nexport interface SegmentedControlProps extends Omit<\n HeadlessToggleButtonGroupProps,\n | \"children\"\n | \"class\"\n | \"style\"\n | \"selectionMode\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"orientation\"\n | \"slot\"\n | \"ref\"\n> {\n /** The content to display in the segmented control. */\n children?: JSX.Element;\n /** Whether the items should divide the container width equally. */\n isJustified?: boolean;\n /** The id of the currently selected item. */\n selectedKey?: Key | null;\n /** The id of the initially selected item. */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (id: Key) => void;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the underlying radiogroup element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SegmentedControlItemProps extends Omit<\n HeadlessToggleButtonProps,\n \"children\" | \"class\" | \"style\" | \"isSelected\" | \"defaultSelected\" | \"onChange\"\n> {\n /** The id of the item, matching the value used in SegmentedControl's selectedKey prop. */\n id: Key;\n /** The content to display in the segmented control item. */\n children?: JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n}\n\nexport const SegmentedControlContext =\n createContext<SpectrumContextValue<SegmentedControlProps>>(null);\n\ninterface InternalSegmentedControlContextValue {\n register?: (id: Key) => void;\n isJustified?: boolean;\n}\n\nconst InternalSegmentedControlContext = createContext<InternalSegmentedControlContextValue>({});\n\nconst segmentedControl = style({\n display: \"flex\",\n gap: 4,\n /* No track. The register's segmented control is bare mono labels in a flex row —\n `day / [week] / month` — with no background, border or radius of their own\n (TerminalGlassLab.tsx:443-459, SEGMENTS at :21-25). What was here instead was two\n raw light-dark() literals, rgb(233,233,233) / rgb(44,44,44), which answer to no\n token in either scheme and so could not follow a theme flip. The radius goes with\n the fill: with nothing painted there is no corner to round. */\n width: \"fit\",\n});\n\nconst segmentedControlItem = style<ToggleButtonRenderProps & { isJustified?: boolean }>({\n ...focusRing(),\n ...control({ shape: \"default\", icon: true, rim: false }),\n justifyContent: \"center\",\n position: \"relative\",\n borderStyle: \"none\",\n backgroundColor: \"transparent\",\n /* With the plate gone, ink is the ONLY selection signal — which is how the register\n does it: the selected segment is `var(--accent-primary)` and its siblings are\n `var(--text-tertiary)` (TerminalGlassLab.tsx:21-25). neutral-subdued vs neutral was\n too small a step to carry selection on its own. `accent` is the semantic ink stop,\n the same one link/picker/combobox use; it refs accent-color-900, which this library\n re-points at the brand blue ramp (glasselated-ramps.ts). */\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: baseColor(\"accent\"),\n isDisabled: \"disabled\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n flexGrow: {\n isJustified: 1,\n },\n flexBasis: {\n isJustified: 0,\n },\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n userSelect: \"none\",\n forcedColorAdjust: \"none\",\n zIndex: {\n default: 1,\n isSelected: 0,\n },\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\n/* No type parameter, and not called as a function below: every condition in this object is\n static (`forcedColors`), so the macro bakes it to a plain class string rather than to a\n selector function. Invoking it throws \"selectionIndicator is not a function\" at render.\n Re-adding a runtime-prop condition here means restoring the call form at the usage site. */\nconst selectionIndicator = style({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"full\",\n height: \"full\",\n contain: \"strict\",\n transition: {\n default: \"[translate,width]\",\n \"@media (prefers-reduced-motion: reduce)\": \"none\",\n },\n transitionDuration: 200,\n transitionTimingFunction: \"out\",\n boxSizing: \"border-box\",\n /* The indicator paints nothing in either scheme: the register signals selection with\n ink, not with a bordered plate (TerminalGlassLab.tsx:443-459). The element is kept\n rather than deleted because it carries the translate/width transition above and,\n in forced-colors mode, is still the only surface available to mark the selection —\n that branch is preserved on both maps. Radius drops from `card` (12px, a container\n value) to `control` (5px), which is what `control()` gives the item itself, so the\n forced-colors mark traces the segment instead of overshooting it.\n `isDisabled` is dropped from both maps deliberately: over a transparent resting\n state a disabled-only border/fill would appear out of nowhere; the disabled label\n colour on the item above is the surviving signal. */\n borderStyle: \"solid\",\n borderWidth: 1,\n borderColor: {\n default: \"transparent\",\n forcedColors: \"ButtonText\",\n },\n borderRadius: \"control\",\n backgroundColor: {\n default: \"transparent\",\n forcedColors: \"Highlight\",\n },\n pointerEvents: \"none\",\n});\n\nconst itemContent = style({\n position: \"relative\",\n zIndex: 1,\n display: \"flex\",\n gap: \"text-to-visual\",\n alignItems: \"center\",\n minWidth: 0,\n transition: \"default\",\n});\n\nconst itemText = style({\n order: 1,\n truncate: true,\n});\n\n/**\n * A SegmentedControl is a mutually exclusive group of buttons used for view switching.\n */\nexport function SegmentedControl(props: SegmentedControlProps): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(useContext(SegmentedControlContext), props.slot);\n const merged = mergeProps(providerProps, contextProps ?? {}, props);\n const [local, headlessProps] = splitProps(merged, [\n \"children\",\n \"isJustified\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"onSelectionChange\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n ]);\n\n const selectedKeys = () => (local.selectedKey != null ? [local.selectedKey] : undefined);\n const defaultSelectedKeys = () =>\n local.defaultSelectedKey != null ? [local.defaultSelectedKey] : undefined;\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const className = () =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(segmentedControl.toString() as StyleString, mergedStyles()),\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <HeadlessToggleButtonGroup\n {...headlessProps}\n selectionMode=\"single\"\n disallowEmptySelection\n orientation=\"horizontal\"\n selectedKeys={selectedKeys()}\n defaultSelectedKeys={defaultSelectedKeys()}\n onSelectionChange={(keys) => {\n const firstKey = keys.values().next().value;\n if (firstKey != null) {\n local.onSelectionChange?.(firstKey);\n }\n }}\n ref={(element) => assignRef(element)}\n slot={local.slot ?? undefined}\n class={className()}\n style={mergedUnsafeStyle()}\n data-justified={local.isJustified ? \"true\" : undefined}\n data-disabled={headlessProps.isDisabled ? \"true\" : undefined}\n >\n {() => (\n <SharedElementTransition>\n <DefaultSelectionTracker\n defaultSelectedKey={local.defaultSelectedKey}\n selectedKey={local.selectedKey}\n isJustified={local.isJustified}\n >\n {local.children}\n </DefaultSelectionTracker>\n </SharedElementTransition>\n )}\n </HeadlessToggleButtonGroup>\n );\n}\n\nfunction DefaultSelectionTracker(props: {\n children?: JSX.Element;\n defaultSelectedKey?: Key;\n selectedKey?: Key | null;\n isJustified?: boolean;\n}): JSX.Element {\n const state = useToggleButtonGroupStateContext();\n let isRegistered = props.defaultSelectedKey != null || props.selectedKey != null;\n\n const contextValue: InternalSegmentedControlContextValue = {\n register(id: Key) {\n if (!state || isRegistered) {\n return;\n }\n isRegistered = true;\n state.toggleKey(id);\n },\n get isJustified() {\n return props.isJustified;\n },\n };\n\n return (\n <InternalSegmentedControlContext.Provider value={contextValue}>\n {props.children}\n </InternalSegmentedControlContext.Provider>\n );\n}\n\n/**\n * A SegmentedControlItem represents an option within a SegmentedControl.\n */\nexport function SegmentedControlItem(props: SegmentedControlItemProps): JSX.Element {\n const context = useContext(InternalSegmentedControlContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"id\",\n ]);\n let buttonElement: HTMLButtonElement | undefined;\n\n onMount(() => context.register?.(local.id));\n\n const getClassName = (renderProps: ToggleButtonRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n segmentedControlItem({\n ...renderProps,\n isJustified: context.isJustified,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n\n const getStyle = (renderProps: ToggleButtonRenderProps): JSX.CSSProperties => {\n const style = { ...(local.UNSAFE_style ?? {}) } as JSX.CSSProperties;\n const styleRecord = style as Record<string, string | number | undefined>;\n const willChange = styleRecord[\"will-change\"] ?? \"\";\n styleRecord[\"will-change\"] = `${willChange} transform`.trim();\n\n if (renderProps.isPressed && buttonElement) {\n const { width, height } = buttonElement.getBoundingClientRect();\n const perspective = Math.max(height, width / 3, 24);\n const transform = style.transform ?? \"\";\n style.transform = `${transform} perspective(${perspective}px) translate3d(0, 0, -2px)`.trim();\n }\n\n return style;\n };\n\n function SegmentContent(renderProps: ToggleButtonRenderProps) {\n const resolvedChildren = resolveChildren(() => local.children);\n const content = () => resolvedChildren();\n const iconContextValue = {\n slot: \"icon\",\n render: centerBaseline({ slot: \"icon\", styles: style({ order: 0, flexShrink: 0 }) }),\n styles: style({\n size: fontRelative(20),\n flexShrink: 0,\n }),\n };\n\n return (\n <>\n <SelectionIndicator isSelected={renderProps.isSelected} class={selectionIndicator} />\n <IconContext.Provider value={iconContextValue}>\n <span class={itemContent}>\n {typeof content() === \"string\" ? (\n <span class={itemText} data-rsp-slot=\"text\">\n {content()}\n </span>\n ) : (\n content()\n )}\n </span>\n </IconContext.Provider>\n </>\n );\n }\n\n return (\n <HeadlessToggleButton\n {...headlessProps}\n id={local.id}\n ref={(element: HTMLButtonElement) => {\n buttonElement = element;\n }}\n class={getClassName}\n style={getStyle}\n data-segmented-control-item=\"\"\n >\n {(renderProps) => <SegmentContent {...renderProps} />}\n </HeadlessToggleButton>\n );\n}\n"],"mappings":";;;;;;;;;;;AA2FA,MAAa,0BACX,cAA2D,IAAA;AAO7D,MAAM,kCAAkC,cAAoD,CAAC,CAAA;AAE7F,MAAM,mBAAA;AAYN,MAAM,uBAAA,SAAA,UAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CN,MAAM,qBAAA;;;;AAwDN,SAAgB,iBAAiB,OAAmC;CAClE,MAAM,gBAAgB,iBAAiB,KAAA;CACvC,MAAM,eAAe,uBAAuB,WAAW,uBAAA,GAA0B,MAAM,IAAI;CAE3F,MAAM,CAAC,OAAO,iBAAiB,WADhB,aAAW,eAAe,gBAAgB,CAAC,GAAG,KACnB,GAAQ;EAChD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAA,CACD;CAED,MAAM,qBAAsB,MAAM,eAAe,OAAO,CAAC,MAAM,WAAW,IAAI,KAAA;CAC9E,MAAM,4BACJ,MAAM,sBAAsB,OAAO,CAAC,MAAM,kBAAkB,IAAI,KAAA;CAClE,MAAM,qBAAqB,mBAAmB,cAAc,QAAQ,MAAM,MAAM;CAChF,MAAM,0BACJ,wBAAwB,cAAc,cAAc,MAAM,YAAY;CACxE,MAAM,YAAY,iBACf,cAA2D,KAC5D,MAAM,GAAG;CAEX,MAAM,kBACJ;EACE,cAAc;EACd,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AAA,eAAA,MAAA;IAAA,OAAA,aAAA;KAAA,IAAA,MAAA,WAExB,OAAO,QAAA,MAAc,QAAA;KAAA,aAArB,IAAA,WAAA;MAAA,IAAA,QAAA,eAAA,OAAA;MAAA,OAAA,OAEI,OAAA;MAAA,OAAA;KAAA,GAAA,IAGH,QAAA;IACF,GAAA,CAAA;IAAA,OAAA;GAAA;EAAA,CAAA,CAAA;CAKV;CAEA,OAAA,gBACG,cAAA,WACK,eAAa;EAAA,IACjB,KAAA;GAAA,OAAI,MAAM;EAAE;EAAA,MACN,YAAS;GACb,gBAAgB;EAClB;EAAA,SACO;EACP,OAAO;EAAA,+BAAA;EAAA,WAGL,gBAAA,gBAAiB,gBAAmB,WAAW;CAAA,CAAA,CAAA;AAGvD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/segmentedcontrol/index.tsx"],"sourcesContent":["import {\n children as resolveChildren,\n createContext,\n type JSX,\n mergeProps,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport {\n SelectionIndicator,\n SharedElementTransition,\n ToggleButton as HeadlessToggleButton,\n ToggleButtonGroup as HeadlessToggleButtonGroup,\n useToggleButtonGroupStateContext,\n type ToggleButtonProps as HeadlessToggleButtonProps,\n type ToggleButtonGroupProps as HeadlessToggleButtonGroupProps,\n type ToggleButtonRenderProps,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key } from \"@proyecto-viviana/solid-stately\";\nimport type { StyleString } from \"../style\";\nimport { baseColor, fontRelative, focusRing, style } from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { control } from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { IconContext } from \"../icon/spectrum-icon\";\nimport { centerBaseline } from \"../icon/center-baseline\";\nimport { useProviderProps } from \"../provider\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\n\nexport interface SegmentedControlProps extends Omit<\n HeadlessToggleButtonGroupProps,\n | \"children\"\n | \"class\"\n | \"style\"\n | \"selectionMode\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"orientation\"\n | \"slot\"\n | \"ref\"\n> {\n /** The content to display in the segmented control. */\n children?: JSX.Element;\n /** Whether the items should divide the container width equally. */\n isJustified?: boolean;\n /** The id of the currently selected item. */\n selectedKey?: Key | null;\n /** The id of the initially selected item. */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (id: Key) => void;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the underlying radiogroup element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SegmentedControlItemProps extends Omit<\n HeadlessToggleButtonProps,\n \"children\" | \"class\" | \"style\" | \"isSelected\" | \"defaultSelected\" | \"onChange\"\n> {\n /** The id of the item, matching the value used in SegmentedControl's selectedKey prop. */\n id: Key;\n /** The content to display in the segmented control item. */\n children?: JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n}\n\nexport const SegmentedControlContext =\n createContext<SpectrumContextValue<SegmentedControlProps>>(null);\n\ninterface InternalSegmentedControlContextValue {\n register?: (id: Key) => void;\n isJustified?: boolean;\n}\n\nconst InternalSegmentedControlContext = createContext<InternalSegmentedControlContextValue>({});\n\nconst segmentedControl = style({\n display: \"flex\",\n gap: 4,\n /* No track. The register's segmented control is bare mono labels in a flex row —\n `day / [week] / month` — with no background, border or radius of their own\n (TerminalGlassLab.tsx:443-459, SEGMENTS at :21-25). What was here instead was two\n raw light-dark() literals, rgb(233,233,233) / rgb(44,44,44), which answer to no\n token in either scheme and so could not follow a theme flip. The radius goes with\n the fill: with nothing painted there is no corner to round. */\n width: \"fit\",\n});\n\nconst segmentedControlItem = style<ToggleButtonRenderProps & { isJustified?: boolean }>({\n ...focusRing(),\n ...control({ shape: \"default\", icon: true, rim: false }),\n justifyContent: \"center\",\n position: \"relative\",\n borderStyle: \"none\",\n backgroundColor: \"transparent\",\n /* With the plate gone, ink is the ONLY selection signal — which is how the register\n does it: the selected segment is accent ink and its siblings are secondary ink\n (TerminalGlassLab.tsx:21-25). The decorative `--accent-primary` is only 2.98:1 on\n the daylight panel, so text consumes the scheme-specific `--text-link` role instead:\n it preserves the blue selection signal while meeting AA on every published surface.\n `viviana-tokens.css` owns the actual register values for both schemes. */\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: \"[var(--text-link)]\",\n isDisabled: \"disabled\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n flexGrow: {\n isJustified: 1,\n },\n flexBasis: {\n isJustified: 0,\n },\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n userSelect: \"none\",\n forcedColorAdjust: \"none\",\n zIndex: {\n default: 1,\n isSelected: 0,\n },\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\n/* No type parameter, and not called as a function below: every condition in this object is\n static (`forcedColors`), so the macro bakes it to a plain class string rather than to a\n selector function. Invoking it throws \"selectionIndicator is not a function\" at render.\n Re-adding a runtime-prop condition here means restoring the call form at the usage site. */\nconst selectionIndicator = style({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"full\",\n height: \"full\",\n contain: \"strict\",\n transition: {\n default: \"[translate,width]\",\n \"@media (prefers-reduced-motion: reduce)\": \"none\",\n },\n transitionDuration: 200,\n transitionTimingFunction: \"out\",\n boxSizing: \"border-box\",\n /* The indicator paints nothing in either scheme: the register signals selection with\n ink, not with a bordered plate (TerminalGlassLab.tsx:443-459). The element is kept\n rather than deleted because it carries the translate/width transition above and,\n in forced-colors mode, is still the only surface available to mark the selection —\n that branch is preserved on both maps. Radius drops from `card` (12px, a container\n value) to `control` (5px), which is what `control()` gives the item itself, so the\n forced-colors mark traces the segment instead of overshooting it.\n `isDisabled` is dropped from both maps deliberately: over a transparent resting\n state a disabled-only border/fill would appear out of nowhere; the disabled label\n colour on the item above is the surviving signal. */\n borderStyle: \"solid\",\n borderWidth: 1,\n borderColor: {\n default: \"transparent\",\n forcedColors: \"ButtonText\",\n },\n borderRadius: \"control\",\n backgroundColor: {\n default: \"transparent\",\n forcedColors: \"Highlight\",\n },\n pointerEvents: \"none\",\n});\n\nconst itemContent = style({\n position: \"relative\",\n zIndex: 1,\n display: \"flex\",\n gap: \"text-to-visual\",\n alignItems: \"center\",\n minWidth: 0,\n transition: \"default\",\n});\n\nconst itemText = style({\n order: 1,\n truncate: true,\n});\n\n/**\n * A SegmentedControl is a mutually exclusive group of buttons used for view switching.\n */\nexport function SegmentedControl(props: SegmentedControlProps): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(useContext(SegmentedControlContext), props.slot);\n const merged = mergeProps(providerProps, contextProps ?? {}, props);\n const [local, headlessProps] = splitProps(merged, [\n \"children\",\n \"isJustified\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"onSelectionChange\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n ]);\n\n const selectedKeys = () => (local.selectedKey != null ? [local.selectedKey] : undefined);\n const defaultSelectedKeys = () =>\n local.defaultSelectedKey != null ? [local.defaultSelectedKey] : undefined;\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const className = () =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(segmentedControl.toString() as StyleString, mergedStyles()),\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <HeadlessToggleButtonGroup\n {...headlessProps}\n selectionMode=\"single\"\n disallowEmptySelection\n orientation=\"horizontal\"\n selectedKeys={selectedKeys()}\n defaultSelectedKeys={defaultSelectedKeys()}\n onSelectionChange={(keys) => {\n const firstKey = keys.values().next().value;\n if (firstKey != null) {\n local.onSelectionChange?.(firstKey);\n }\n }}\n ref={(element) => assignRef(element)}\n slot={local.slot ?? undefined}\n class={className()}\n style={mergedUnsafeStyle()}\n data-justified={local.isJustified ? \"true\" : undefined}\n data-disabled={headlessProps.isDisabled ? \"true\" : undefined}\n >\n {() => (\n <SharedElementTransition>\n <DefaultSelectionTracker\n defaultSelectedKey={local.defaultSelectedKey}\n selectedKey={local.selectedKey}\n isJustified={local.isJustified}\n >\n {local.children}\n </DefaultSelectionTracker>\n </SharedElementTransition>\n )}\n </HeadlessToggleButtonGroup>\n );\n}\n\nfunction DefaultSelectionTracker(props: {\n children?: JSX.Element;\n defaultSelectedKey?: Key;\n selectedKey?: Key | null;\n isJustified?: boolean;\n}): JSX.Element {\n const state = useToggleButtonGroupStateContext();\n let isRegistered = props.defaultSelectedKey != null || props.selectedKey != null;\n\n const contextValue: InternalSegmentedControlContextValue = {\n register(id: Key) {\n if (!state || isRegistered) {\n return;\n }\n isRegistered = true;\n state.toggleKey(id);\n },\n get isJustified() {\n return props.isJustified;\n },\n };\n\n return (\n <InternalSegmentedControlContext.Provider value={contextValue}>\n {props.children}\n </InternalSegmentedControlContext.Provider>\n );\n}\n\n/**\n * A SegmentedControlItem represents an option within a SegmentedControl.\n */\nexport function SegmentedControlItem(props: SegmentedControlItemProps): JSX.Element {\n const context = useContext(InternalSegmentedControlContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"id\",\n ]);\n let buttonElement: HTMLButtonElement | undefined;\n\n onMount(() => context.register?.(local.id));\n\n const getClassName = (renderProps: ToggleButtonRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n segmentedControlItem({\n ...renderProps,\n isJustified: context.isJustified,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n\n const getStyle = (renderProps: ToggleButtonRenderProps): JSX.CSSProperties => {\n const style = { ...(local.UNSAFE_style ?? {}) } as JSX.CSSProperties;\n const styleRecord = style as Record<string, string | number | undefined>;\n const willChange = styleRecord[\"will-change\"] ?? \"\";\n styleRecord[\"will-change\"] = `${willChange} transform`.trim();\n\n if (renderProps.isPressed && buttonElement) {\n const { width, height } = buttonElement.getBoundingClientRect();\n const perspective = Math.max(height, width / 3, 24);\n const transform = style.transform ?? \"\";\n style.transform = `${transform} perspective(${perspective}px) translate3d(0, 0, -2px)`.trim();\n }\n\n return style;\n };\n\n function SegmentContent(renderProps: ToggleButtonRenderProps) {\n const resolvedChildren = resolveChildren(() => local.children);\n const content = () => resolvedChildren();\n const iconContextValue = {\n slot: \"icon\",\n render: centerBaseline({ slot: \"icon\", styles: style({ order: 0, flexShrink: 0 }) }),\n styles: style({\n size: fontRelative(20),\n flexShrink: 0,\n }),\n };\n\n return (\n <>\n <SelectionIndicator isSelected={renderProps.isSelected} class={selectionIndicator} />\n <IconContext.Provider value={iconContextValue}>\n <span class={itemContent}>\n {typeof content() === \"string\" ? (\n <span class={itemText} data-rsp-slot=\"text\">\n {content()}\n </span>\n ) : (\n content()\n )}\n </span>\n </IconContext.Provider>\n </>\n );\n }\n\n return (\n <HeadlessToggleButton\n {...headlessProps}\n id={local.id}\n ref={(element: HTMLButtonElement) => {\n buttonElement = element;\n }}\n class={getClassName}\n style={getStyle}\n data-segmented-control-item=\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cAAA,WACK,eAAa;EAAA,IACjB,KAAA;GAAA,OAAI,MAAM;EAAE;EAAA,MACN,YAAS;GACb,gBAAgB;EAClB;EAAA,SACO;EACP,OAAO;EAAA,+BAAA;EAAA,WAGL,gBAAA,gBAAiB,gBAAmB,WAAW;CAAA,CAAA,CAAA;AAGvD"}
@@ -53,14 +53,11 @@ const segmentedControlItem = function anonymous(props) {
53
53
  rules += " _FnuYUweb151";
54
54
  }
55
55
  if (props.isDisabled) rules += " pUvnvv151";
56
- else if (props.isSelected) if (props.isPressed) rules += " pOzYCcc151";
57
- else if (props.isFocusVisible) rules += " pOzYCcc151";
58
- else if (props.isHovered) rules += " pOzYCcc151";
59
- else rules += " p5dxOg151";
56
+ else if (props.isSelected) rules += " p9ck5ue151";
60
57
  else if (props.isPressed) rules += " pQKeKoe151";
61
58
  else if (props.isFocusVisible) rules += " pQKeKoe151";
62
59
  else if (props.isHovered) rules += " pQKeKoe151";
63
- else rules += " pUUi0Fe151";
60
+ else rules += " pWQ7V3d151";
64
61
  rules += " sd151";
65
62
  rules += " eb151";
66
63
  rules += " _oa151";
@@ -1 +1 @@
1
- {"version":3,"file":"index.jsx","names":[],"sources":["../../src/segmentedcontrol/index.tsx"],"sourcesContent":["import {\n children as resolveChildren,\n createContext,\n type JSX,\n mergeProps,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport {\n SelectionIndicator,\n SharedElementTransition,\n ToggleButton as HeadlessToggleButton,\n ToggleButtonGroup as HeadlessToggleButtonGroup,\n useToggleButtonGroupStateContext,\n type ToggleButtonProps as HeadlessToggleButtonProps,\n type ToggleButtonGroupProps as HeadlessToggleButtonGroupProps,\n type ToggleButtonRenderProps,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key } from \"@proyecto-viviana/solid-stately\";\nimport type { StyleString } from \"../style\";\nimport { baseColor, fontRelative, focusRing, style } from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { control } from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { IconContext } from \"../icon/spectrum-icon\";\nimport { centerBaseline } from \"../icon/center-baseline\";\nimport { useProviderProps } from \"../provider\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\n\nexport interface SegmentedControlProps extends Omit<\n HeadlessToggleButtonGroupProps,\n | \"children\"\n | \"class\"\n | \"style\"\n | \"selectionMode\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"orientation\"\n | \"slot\"\n | \"ref\"\n> {\n /** The content to display in the segmented control. */\n children?: JSX.Element;\n /** Whether the items should divide the container width equally. */\n isJustified?: boolean;\n /** The id of the currently selected item. */\n selectedKey?: Key | null;\n /** The id of the initially selected item. */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (id: Key) => void;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the underlying radiogroup element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SegmentedControlItemProps extends Omit<\n HeadlessToggleButtonProps,\n \"children\" | \"class\" | \"style\" | \"isSelected\" | \"defaultSelected\" | \"onChange\"\n> {\n /** The id of the item, matching the value used in SegmentedControl's selectedKey prop. */\n id: Key;\n /** The content to display in the segmented control item. */\n children?: JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n}\n\nexport const SegmentedControlContext =\n createContext<SpectrumContextValue<SegmentedControlProps>>(null);\n\ninterface InternalSegmentedControlContextValue {\n register?: (id: Key) => void;\n isJustified?: boolean;\n}\n\nconst InternalSegmentedControlContext = createContext<InternalSegmentedControlContextValue>({});\n\nconst segmentedControl = style({\n display: \"flex\",\n gap: 4,\n /* No track. The register's segmented control is bare mono labels in a flex row —\n `day / [week] / month` — with no background, border or radius of their own\n (TerminalGlassLab.tsx:443-459, SEGMENTS at :21-25). What was here instead was two\n raw light-dark() literals, rgb(233,233,233) / rgb(44,44,44), which answer to no\n token in either scheme and so could not follow a theme flip. The radius goes with\n the fill: with nothing painted there is no corner to round. */\n width: \"fit\",\n});\n\nconst segmentedControlItem = style<ToggleButtonRenderProps & { isJustified?: boolean }>({\n ...focusRing(),\n ...control({ shape: \"default\", icon: true, rim: false }),\n justifyContent: \"center\",\n position: \"relative\",\n borderStyle: \"none\",\n backgroundColor: \"transparent\",\n /* With the plate gone, ink is the ONLY selection signal — which is how the register\n does it: the selected segment is `var(--accent-primary)` and its siblings are\n `var(--text-tertiary)` (TerminalGlassLab.tsx:21-25). neutral-subdued vs neutral was\n too small a step to carry selection on its own. `accent` is the semantic ink stop,\n the same one link/picker/combobox use; it refs accent-color-900, which this library\n re-points at the brand blue ramp (glasselated-ramps.ts). */\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: baseColor(\"accent\"),\n isDisabled: \"disabled\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n flexGrow: {\n isJustified: 1,\n },\n flexBasis: {\n isJustified: 0,\n },\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n userSelect: \"none\",\n forcedColorAdjust: \"none\",\n zIndex: {\n default: 1,\n isSelected: 0,\n },\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\n/* No type parameter, and not called as a function below: every condition in this object is\n static (`forcedColors`), so the macro bakes it to a plain class string rather than to a\n selector function. Invoking it throws \"selectionIndicator is not a function\" at render.\n Re-adding a runtime-prop condition here means restoring the call form at the usage site. */\nconst selectionIndicator = style({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"full\",\n height: \"full\",\n contain: \"strict\",\n transition: {\n default: \"[translate,width]\",\n \"@media (prefers-reduced-motion: reduce)\": \"none\",\n },\n transitionDuration: 200,\n transitionTimingFunction: \"out\",\n boxSizing: \"border-box\",\n /* The indicator paints nothing in either scheme: the register signals selection with\n ink, not with a bordered plate (TerminalGlassLab.tsx:443-459). The element is kept\n rather than deleted because it carries the translate/width transition above and,\n in forced-colors mode, is still the only surface available to mark the selection —\n that branch is preserved on both maps. Radius drops from `card` (12px, a container\n value) to `control` (5px), which is what `control()` gives the item itself, so the\n forced-colors mark traces the segment instead of overshooting it.\n `isDisabled` is dropped from both maps deliberately: over a transparent resting\n state a disabled-only border/fill would appear out of nowhere; the disabled label\n colour on the item above is the surviving signal. */\n borderStyle: \"solid\",\n borderWidth: 1,\n borderColor: {\n default: \"transparent\",\n forcedColors: \"ButtonText\",\n },\n borderRadius: \"control\",\n backgroundColor: {\n default: \"transparent\",\n forcedColors: \"Highlight\",\n },\n pointerEvents: \"none\",\n});\n\nconst itemContent = style({\n position: \"relative\",\n zIndex: 1,\n display: \"flex\",\n gap: \"text-to-visual\",\n alignItems: \"center\",\n minWidth: 0,\n transition: \"default\",\n});\n\nconst itemText = style({\n order: 1,\n truncate: true,\n});\n\n/**\n * A SegmentedControl is a mutually exclusive group of buttons used for view switching.\n */\nexport function SegmentedControl(props: SegmentedControlProps): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(useContext(SegmentedControlContext), props.slot);\n const merged = mergeProps(providerProps, contextProps ?? {}, props);\n const [local, headlessProps] = splitProps(merged, [\n \"children\",\n \"isJustified\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"onSelectionChange\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n ]);\n\n const selectedKeys = () => (local.selectedKey != null ? [local.selectedKey] : undefined);\n const defaultSelectedKeys = () =>\n local.defaultSelectedKey != null ? [local.defaultSelectedKey] : undefined;\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const className = () =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(segmentedControl.toString() as StyleString, mergedStyles()),\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <HeadlessToggleButtonGroup\n {...headlessProps}\n selectionMode=\"single\"\n disallowEmptySelection\n orientation=\"horizontal\"\n selectedKeys={selectedKeys()}\n defaultSelectedKeys={defaultSelectedKeys()}\n onSelectionChange={(keys) => {\n const firstKey = keys.values().next().value;\n if (firstKey != null) {\n local.onSelectionChange?.(firstKey);\n }\n }}\n ref={(element) => assignRef(element)}\n slot={local.slot ?? undefined}\n class={className()}\n style={mergedUnsafeStyle()}\n data-justified={local.isJustified ? \"true\" : undefined}\n data-disabled={headlessProps.isDisabled ? \"true\" : undefined}\n >\n {() => (\n <SharedElementTransition>\n <DefaultSelectionTracker\n defaultSelectedKey={local.defaultSelectedKey}\n selectedKey={local.selectedKey}\n isJustified={local.isJustified}\n >\n {local.children}\n </DefaultSelectionTracker>\n </SharedElementTransition>\n )}\n </HeadlessToggleButtonGroup>\n );\n}\n\nfunction DefaultSelectionTracker(props: {\n children?: JSX.Element;\n defaultSelectedKey?: Key;\n selectedKey?: Key | null;\n isJustified?: boolean;\n}): JSX.Element {\n const state = useToggleButtonGroupStateContext();\n let isRegistered = props.defaultSelectedKey != null || props.selectedKey != null;\n\n const contextValue: InternalSegmentedControlContextValue = {\n register(id: Key) {\n if (!state || isRegistered) {\n return;\n }\n isRegistered = true;\n state.toggleKey(id);\n },\n get isJustified() {\n return props.isJustified;\n },\n };\n\n return (\n <InternalSegmentedControlContext.Provider value={contextValue}>\n {props.children}\n </InternalSegmentedControlContext.Provider>\n );\n}\n\n/**\n * A SegmentedControlItem represents an option within a SegmentedControl.\n */\nexport function SegmentedControlItem(props: SegmentedControlItemProps): JSX.Element {\n const context = useContext(InternalSegmentedControlContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"id\",\n ]);\n let buttonElement: HTMLButtonElement | undefined;\n\n onMount(() => context.register?.(local.id));\n\n const getClassName = (renderProps: ToggleButtonRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n segmentedControlItem({\n ...renderProps,\n isJustified: context.isJustified,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n\n const getStyle = (renderProps: ToggleButtonRenderProps): JSX.CSSProperties => {\n const style = { ...(local.UNSAFE_style ?? {}) } as JSX.CSSProperties;\n const styleRecord = style as Record<string, string | number | undefined>;\n const willChange = styleRecord[\"will-change\"] ?? \"\";\n styleRecord[\"will-change\"] = `${willChange} transform`.trim();\n\n if (renderProps.isPressed && buttonElement) {\n const { width, height } = buttonElement.getBoundingClientRect();\n const perspective = Math.max(height, width / 3, 24);\n const transform = style.transform ?? \"\";\n style.transform = `${transform} perspective(${perspective}px) translate3d(0, 0, -2px)`.trim();\n }\n\n return style;\n };\n\n function SegmentContent(renderProps: ToggleButtonRenderProps) {\n const resolvedChildren = resolveChildren(() => local.children);\n const content = () => resolvedChildren();\n const iconContextValue = {\n slot: \"icon\",\n render: centerBaseline({ slot: \"icon\", styles: style({ order: 0, flexShrink: 0 }) }),\n styles: style({\n size: fontRelative(20),\n flexShrink: 0,\n }),\n };\n\n return (\n <>\n <SelectionIndicator isSelected={renderProps.isSelected} class={selectionIndicator} />\n <IconContext.Provider value={iconContextValue}>\n <span class={itemContent}>\n {typeof content() === \"string\" ? (\n <span class={itemText} data-rsp-slot=\"text\">\n {content()}\n </span>\n ) : (\n content()\n )}\n </span>\n </IconContext.Provider>\n </>\n );\n }\n\n return (\n <HeadlessToggleButton\n {...headlessProps}\n id={local.id}\n ref={(element: HTMLButtonElement) => {\n buttonElement = element;\n }}\n class={getClassName}\n style={getStyle}\n data-segmented-control-item=\"\"\n >\n {(renderProps) => <SegmentContent {...renderProps} />}\n </HeadlessToggleButton>\n );\n}\n"],"mappings":";;;;;;;;AA8BA,MAAE,0BAAkB,cAAA,IAAA;;AAMpB,MAAM,mBAAW;AACjB,MAAE,uBAAA,SAA8B,UAAA,OAAA;CAC5B,IAAC,QAAQ;CACT,IAAC,MAAK,gBACL,SAAK;MAEL,SAAY;CAEb,SAAC;CACD,SAAC;CACD,SAAK;CACL,SAAI;CACN,SAAA;CACE,IAAE,MAAI,SAAW,MAAQ;EAC3B,SAAe;EACX,SAAW;CACf,OAAA,IAAa,MAAC,SAAO,KAAA;EACjB,SAAU;EACd,SAAc;CACZ,OAAM,IAAK,MAAK,SAAU,KAAA;EAC5B,SAAA;EACI,SAAQ;CACZ,OAAA,IAAA,MAAmB,SAAS,MAAK;EAC7B,SAAS;EACP,SAAG;CACP,OAAE;EACJ,SAAA;EACI,SAAW;CACf;CACE,SAAE;CACJ,SAAQ;CACN,IAAE,MAAK,SAAU,MAAQ;EACrB,SAAS;EACX,SAAW;CACf,OAAM,IAAO,MAAC,SAAc,KAAC;EAC/B,SAAA;;CAEA,OAAO,IAAA,MAAU,SAAA,KAAA;EACf,SAAA;EACC,SAAa;CACd,OAAA,IAAA,MAAA,SAAA,MAAA;EACI,SAAU;EACV,SAAG;CACL,OAAM;EACR,SAAe;EACX,SAAS;CACb;CACE,IAAE,MAAA,YACJ,SAAA;MACI,IAAA,MAAW,YACf,IAAA,MAAe,WACX,SAAS;MACL,IAAM,MAAA,gBAChB,SAAA;2BAEY,SAAC;;MAKX,IAAA,MAAc,WAChB,SAAA;gCAEM,S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":["import {\n children as resolveChildren,\n createContext,\n type JSX,\n mergeProps,\n onMount,\n splitProps,\n useContext,\n} from \"solid-js\";\nimport {\n SelectionIndicator,\n SharedElementTransition,\n ToggleButton as HeadlessToggleButton,\n ToggleButtonGroup as HeadlessToggleButtonGroup,\n useToggleButtonGroupStateContext,\n type ToggleButtonProps as HeadlessToggleButtonProps,\n type ToggleButtonGroupProps as HeadlessToggleButtonGroupProps,\n type ToggleButtonRenderProps,\n} from \"@proyecto-viviana/solidaria-components\";\nimport type { Key } from \"@proyecto-viviana/solid-stately\";\nimport type { StyleString } from \"../style\";\nimport { baseColor, fontRelative, focusRing, style } from \"../style\" with { type: \"macro\" };\nimport { mergeStyles } from \"../style/runtime\";\nimport { control } from \"../s2-internal/style-utils\" with { type: \"macro\" };\nimport { IconContext } from \"../icon/spectrum-icon\";\nimport { centerBaseline } from \"../icon/center-baseline\";\nimport { useProviderProps } from \"../provider\";\nimport {\n getSlottedContextProps,\n mergeContextRefs,\n mergeContextStyles,\n mergeContextUnsafeStyle,\n type RefLike,\n type SpectrumContextValue,\n} from \"../button/spectrum-context\";\n\nexport interface SegmentedControlProps extends Omit<\n HeadlessToggleButtonGroupProps,\n | \"children\"\n | \"class\"\n | \"style\"\n | \"selectionMode\"\n | \"selectedKeys\"\n | \"defaultSelectedKeys\"\n | \"onSelectionChange\"\n | \"orientation\"\n | \"slot\"\n | \"ref\"\n> {\n /** The content to display in the segmented control. */\n children?: JSX.Element;\n /** Whether the items should divide the container width equally. */\n isJustified?: boolean;\n /** The id of the currently selected item. */\n selectedKey?: Key | null;\n /** The id of the initially selected item. */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (id: Key) => void;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n /** Slot name when used in a Spectrum context. */\n slot?: string | null;\n /** Ref for the underlying radiogroup element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface SegmentedControlItemProps extends Omit<\n HeadlessToggleButtonProps,\n \"children\" | \"class\" | \"style\" | \"isSelected\" | \"defaultSelected\" | \"onChange\"\n> {\n /** The id of the item, matching the value used in SegmentedControl's selectedKey prop. */\n id: Key;\n /** The content to display in the segmented control item. */\n children?: JSX.Element;\n /** Spectrum-defined generated classes. */\n styles?: StyleString;\n /** Additional CSS class name. Use only as a last resort. */\n UNSAFE_className?: string;\n /** Additional inline styles. Use only as a last resort. */\n UNSAFE_style?: JSX.CSSProperties;\n /** Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. */\n class?: string;\n}\n\nexport const SegmentedControlContext =\n createContext<SpectrumContextValue<SegmentedControlProps>>(null);\n\ninterface InternalSegmentedControlContextValue {\n register?: (id: Key) => void;\n isJustified?: boolean;\n}\n\nconst InternalSegmentedControlContext = createContext<InternalSegmentedControlContextValue>({});\n\nconst segmentedControl = style({\n display: \"flex\",\n gap: 4,\n /* No track. The register's segmented control is bare mono labels in a flex row —\n `day / [week] / month` — with no background, border or radius of their own\n (TerminalGlassLab.tsx:443-459, SEGMENTS at :21-25). What was here instead was two\n raw light-dark() literals, rgb(233,233,233) / rgb(44,44,44), which answer to no\n token in either scheme and so could not follow a theme flip. The radius goes with\n the fill: with nothing painted there is no corner to round. */\n width: \"fit\",\n});\n\nconst segmentedControlItem = style<ToggleButtonRenderProps & { isJustified?: boolean }>({\n ...focusRing(),\n ...control({ shape: \"default\", icon: true, rim: false }),\n justifyContent: \"center\",\n position: \"relative\",\n borderStyle: \"none\",\n backgroundColor: \"transparent\",\n /* With the plate gone, ink is the ONLY selection signal — which is how the register\n does it: the selected segment is accent ink and its siblings are secondary ink\n (TerminalGlassLab.tsx:21-25). The decorative `--accent-primary` is only 2.98:1 on\n the daylight panel, so text consumes the scheme-specific `--text-link` role instead:\n it preserves the blue selection signal while meeting AA on every published surface.\n `viviana-tokens.css` owns the actual register values for both schemes. */\n color: {\n default: baseColor(\"neutral-subdued\"),\n isSelected: \"[var(--text-link)]\",\n isDisabled: \"disabled\",\n },\n cursor: {\n default: \"default\",\n isDisabled: \"not-allowed\",\n },\n flexGrow: {\n isJustified: 1,\n },\n flexBasis: {\n isJustified: 0,\n },\n flexShrink: 0,\n whiteSpace: \"nowrap\",\n userSelect: \"none\",\n forcedColorAdjust: \"none\",\n zIndex: {\n default: 1,\n isSelected: 0,\n },\n \"--iconPrimary\": {\n type: \"fill\",\n value: \"currentColor\",\n },\n});\n\n/* No type parameter, and not called as a function below: every condition in this object is\n static (`forcedColors`), so the macro bakes it to a plain class string rather than to a\n selector function. Invoking it throws \"selectionIndicator is not a function\" at render.\n Re-adding a runtime-prop condition here means restoring the call form at the usage site. */\nconst selectionIndicator = style({\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"full\",\n height: \"full\",\n contain: \"strict\",\n transition: {\n default: \"[translate,width]\",\n \"@media (prefers-reduced-motion: reduce)\": \"none\",\n },\n transitionDuration: 200,\n transitionTimingFunction: \"out\",\n boxSizing: \"border-box\",\n /* The indicator paints nothing in either scheme: the register signals selection with\n ink, not with a bordered plate (TerminalGlassLab.tsx:443-459). The element is kept\n rather than deleted because it carries the translate/width transition above and,\n in forced-colors mode, is still the only surface available to mark the selection —\n that branch is preserved on both maps. Radius drops from `card` (12px, a container\n value) to `control` (5px), which is what `control()` gives the item itself, so the\n forced-colors mark traces the segment instead of overshooting it.\n `isDisabled` is dropped from both maps deliberately: over a transparent resting\n state a disabled-only border/fill would appear out of nowhere; the disabled label\n colour on the item above is the surviving signal. */\n borderStyle: \"solid\",\n borderWidth: 1,\n borderColor: {\n default: \"transparent\",\n forcedColors: \"ButtonText\",\n },\n borderRadius: \"control\",\n backgroundColor: {\n default: \"transparent\",\n forcedColors: \"Highlight\",\n },\n pointerEvents: \"none\",\n});\n\nconst itemContent = style({\n position: \"relative\",\n zIndex: 1,\n display: \"flex\",\n gap: \"text-to-visual\",\n alignItems: \"center\",\n minWidth: 0,\n transition: \"default\",\n});\n\nconst itemText = style({\n order: 1,\n truncate: true,\n});\n\n/**\n * A SegmentedControl is a mutually exclusive group of buttons used for view switching.\n */\nexport function SegmentedControl(props: SegmentedControlProps): JSX.Element {\n const providerProps = useProviderProps(props);\n const contextProps = getSlottedContextProps(useContext(SegmentedControlContext), props.slot);\n const merged = mergeProps(providerProps, contextProps ?? {}, props);\n const [local, headlessProps] = splitProps(merged, [\n \"children\",\n \"isJustified\",\n \"selectedKey\",\n \"defaultSelectedKey\",\n \"onSelectionChange\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"slot\",\n \"ref\",\n ]);\n\n const selectedKeys = () => (local.selectedKey != null ? [local.selectedKey] : undefined);\n const defaultSelectedKeys = () =>\n local.defaultSelectedKey != null ? [local.defaultSelectedKey] : undefined;\n const mergedStyles = () => mergeContextStyles(contextProps?.styles, props.styles);\n const mergedUnsafeStyle = () =>\n mergeContextUnsafeStyle(contextProps?.UNSAFE_style, props.UNSAFE_style);\n const assignRef = mergeContextRefs(\n (contextProps as { ref?: RefLike<HTMLDivElement> } | null)?.ref,\n props.ref,\n );\n const className = () =>\n [\n contextProps?.UNSAFE_className,\n props.UNSAFE_className,\n props.class,\n mergeStyles(segmentedControl.toString() as StyleString, mergedStyles()),\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <HeadlessToggleButtonGroup\n {...headlessProps}\n selectionMode=\"single\"\n disallowEmptySelection\n orientation=\"horizontal\"\n selectedKeys={selectedKeys()}\n defaultSelectedKeys={defaultSelectedKeys()}\n onSelectionChange={(keys) => {\n const firstKey = keys.values().next().value;\n if (firstKey != null) {\n local.onSelectionChange?.(firstKey);\n }\n }}\n ref={(element) => assignRef(element)}\n slot={local.slot ?? undefined}\n class={className()}\n style={mergedUnsafeStyle()}\n data-justified={local.isJustified ? \"true\" : undefined}\n data-disabled={headlessProps.isDisabled ? \"true\" : undefined}\n >\n {() => (\n <SharedElementTransition>\n <DefaultSelectionTracker\n defaultSelectedKey={local.defaultSelectedKey}\n selectedKey={local.selectedKey}\n isJustified={local.isJustified}\n >\n {local.children}\n </DefaultSelectionTracker>\n </SharedElementTransition>\n )}\n </HeadlessToggleButtonGroup>\n );\n}\n\nfunction DefaultSelectionTracker(props: {\n children?: JSX.Element;\n defaultSelectedKey?: Key;\n selectedKey?: Key | null;\n isJustified?: boolean;\n}): JSX.Element {\n const state = useToggleButtonGroupStateContext();\n let isRegistered = props.defaultSelectedKey != null || props.selectedKey != null;\n\n const contextValue: InternalSegmentedControlContextValue = {\n register(id: Key) {\n if (!state || isRegistered) {\n return;\n }\n isRegistered = true;\n state.toggleKey(id);\n },\n get isJustified() {\n return props.isJustified;\n },\n };\n\n return (\n <InternalSegmentedControlContext.Provider value={contextValue}>\n {props.children}\n </InternalSegmentedControlContext.Provider>\n );\n}\n\n/**\n * A SegmentedControlItem represents an option within a SegmentedControl.\n */\nexport function SegmentedControlItem(props: SegmentedControlItemProps): JSX.Element {\n const context = useContext(InternalSegmentedControlContext);\n const [local, headlessProps] = splitProps(props, [\n \"children\",\n \"styles\",\n \"UNSAFE_className\",\n \"UNSAFE_style\",\n \"class\",\n \"id\",\n ]);\n let buttonElement: HTMLButtonElement | undefined;\n\n onMount(() => context.register?.(local.id));\n\n const getClassName = (renderProps: ToggleButtonRenderProps): string =>\n [\n local.UNSAFE_className,\n local.class,\n mergeStyles(\n segmentedControlItem({\n ...renderProps,\n isJustified: context.isJustified,\n }),\n local.styles,\n ),\n ]\n .filter(Boolean)\n .join(\" \");\n\n const getStyle = (renderProps: ToggleButtonRenderProps): JSX.CSSProperties => {\n const style = { ...(local.UNSAFE_style ?? {}) } as JSX.CSSProperties;\n const styleRecord = style as Record<string, string | number | undefined>;\n const willChange = styleRecord[\"will-change\"] ?? \"\";\n styleRecord[\"will-change\"] = `${willChange} transform`.trim();\n\n if (renderProps.isPressed && buttonElement) {\n const { width, height } = buttonElement.getBoundingClientRect();\n const perspective = Math.max(height, width / 3, 24);\n const transform = style.transform ?? \"\";\n style.transform = `${transform} perspective(${perspective}px) translate3d(0, 0, -2px)`.trim();\n }\n\n return style;\n };\n\n function SegmentContent(renderProps: ToggleButtonRenderProps) {\n const resolvedChildren = resolveChildren(() => local.children);\n const content = () => resolvedChildren();\n const iconContextValue = {\n slot: \"icon\",\n render: centerBaseline({ slot: \"icon\", styles: style({ order: 0, flexShrink: 0 }) }),\n styles: style({\n size: fontRelative(20),\n flexShrink: 0,\n }),\n };\n\n return (\n <>\n <SelectionIndicator isSelected={renderProps.isSelected} class={selectionIndicator} />\n <IconContext.Provider value={iconContextValue}>\n <span class={itemContent}>\n {typeof content() === \"string\" ? (\n <span class={itemText} data-rsp-slot=\"text\">\n {content()}\n </span>\n ) : (\n content()\n )}\n </span>\n </IconContext.Provider>\n </>\n );\n }\n\n return (\n <HeadlessToggleButton\n {...headlessProps}\n id={local.id}\n ref={(element: HTMLButtonElement) => {\n buttonElement = element;\n }}\n class={getClassName}\n style={getStyle}\n data-segmented-control-item=\"\"\n >\n {(renderProps) => <SegmentContent {...renderProps} />}\n </HeadlessToggleButton>\n );\n}\n"],"mappings":";;;;;;;;AA8BA,MAAE,0BAAkB,cAAA,IAAA;;AAMpB,MAAM,mBAAW;AACjB,MAAE,uBAAA,SAA8B,UAAA,OAAA;CAC5B,IAAC,QAAQ;CACT,IAAC,MAAK,gBACL,SAAK;MAEL,SAAY;CAEb,SAAC;CACD,SAAC;CACD,SAAK;CACL,SAAI;CACN,SAAA;CACE,IAAE,MAAI,SAAW,MAAQ;EAC3B,SAAe;EACX,SAAW;CACf,OAAA,IAAa,MAAC,SAAO,KAAA;EACjB,SAAU;EACd,SAAc;CACZ,OAAM,IAAK,MAAK,SAAU,KAAA;EAC5B,SAAA;EACI,SAAQ;CACZ,OAAA,IAAA,MAAmB,SAAS,MAAK;EAC7B,SAAS;EACP,SAAG;CACP,OAAE;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A;UACxB,CAAA,KAAc,OAAO,aAAA;aACf,OAAQ,QAAA,MAAA,WAAA,CAAA,KAAA,OAAA,UAAA,qBAAA;iBACA,QAAA,EAAA;cACV,EAAA,QAAoB,QAAC,EAAA;;QAEnB,EAAA,YAAc,SAAA;MAClB;CACA;CACA,OAAI,CAAA,iBAAM,eAAA,IAAA,MAAA,IAAA,MAAA,YAAA;EACR,gBAAA;CACF,GAAE,OAAA,cAAmB,OAAA,UAAA,+BAAA;QACnB,gBAAgB,CAAA,mBAAG,gBAAA;IACrB,EAAC;AACL"}
@@ -5,7 +5,7 @@ import { className, createComponent, effect, getNextElement, insert, memo, merge
5
5
  import { Show, createContext, createUniqueId, splitProps, useContext } from "solid-js";
6
6
  import { Select as Select$1, SelectListBox as SelectListBox$1, SelectOption as SelectOption$1, SelectTrigger as SelectTrigger$1, SelectValue as SelectValue$1 } from "@proyecto-viviana/solidaria-components";
7
7
  //#region src/select/index.tsx
8
- var _tmpl$ = /*#__PURE__*/ template(`<span>`), _tmpl$2 = /*#__PURE__*/ template(`<span class=" uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pUUi0Fe151">`), _tmpl$3 = /*#__PURE__*/ template(`<span class=" uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pYjUhNc151">`), _tmpl$4 = /*#__PURE__*/ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M19 9l-7 7-7-7">`), _tmpl$5 = /*#__PURE__*/ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M5 13l4 4L19 7">`);
8
+ var _tmpl$ = /*#__PURE__*/ template(`<span>`), _tmpl$2 = /*#__PURE__*/ template(`<span class=" uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pWQ7V3d151">`), _tmpl$3 = /*#__PURE__*/ template(`<span class=" uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pYjUhNc151">`), _tmpl$4 = /*#__PURE__*/ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M19 9l-7 7-7-7">`), _tmpl$5 = /*#__PURE__*/ template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M5 13l4 4L19 7">`);
9
9
  const SelectSizeContext = createContext("md");
10
10
  const rootStyles = function anonymous(props) {
11
11
  let rules = " ";
@@ -156,7 +156,7 @@ const valueStyles = function anonymous(props) {
156
156
  rules += " _Yb151";
157
157
  rules += " _7c151";
158
158
  if (props.isSelected) rules += " pHKLAu151";
159
- else rules += " pUUi0Fe151";
159
+ else rules += " pWQ7V3d151";
160
160
  return rules;
161
161
  };
162
162
  const listBoxStyles = " _Pa151 _9O3Ky151 Js151 Za151 oY4qurc151 nY4qurc151 kY4qurc151 jY4qurc151 _kb151 hb151 mb151 lb151 _jf151 ifbAdGe151 g9ORGnd151 Tp151 Qp151 _nfRoCnb151 KDvO7ld151 _Na151 Pa151";
@@ -213,7 +213,7 @@ const optionStyles = function anonymous(props) {
213
213
  else if (props.isSelected) rules += " p5dxOg151";
214
214
  else if (props.isFocused) rules += " pHKLAu151";
215
215
  else if (props.isHovered) rules += " pHKLAu151";
216
- else rules += " pUUi0Fe151";
216
+ else rules += " pWQ7V3d151";
217
217
  if (props.size === "lg") rules += " Sg151";
218
218
  else if (props.size === "md") rules += " Sf151";
219
219
  else if (props.size === "sm") rules += " Se151";
@@ -44,7 +44,7 @@ const labelStyles = function anonymous(props) {
44
44
  rules += " pHKLAu151";
45
45
  return rules;
46
46
  };
47
- const descriptionStyles = " uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pUUi0Fe151";
47
+ const descriptionStyles = " uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pWQ7V3d151";
48
48
  const errorStyles = " uxe7h4151 -_6BNtrc-b151 vx151 xb151 _xa151 _Fd151 _FnuYUweb151 pYjUhNc151";
49
49
  const triggerStyles = function anonymous(props) {
50
50
  let rules = " ";
@@ -154,7 +154,7 @@ const valueStyles = function anonymous(props) {
154
154
  rules += " _Yb151";
155
155
  rules += " _7c151";
156
156
  if (props.isSelected) rules += " pHKLAu151";
157
- else rules += " pUUi0Fe151";
157
+ else rules += " pWQ7V3d151";
158
158
  return rules;
159
159
  };
160
160
  const listBoxStyles = " _Pa151 _9O3Ky151 Js151 Za151 oY4qurc151 nY4qurc151 kY4qurc151 jY4qurc151 _kb151 hb151 mb151 lb151 _jf151 ifbAdGe151 g9ORGnd151 Tp151 Qp151 _nfRoCnb151 KDvO7ld151 _Na151 Pa151";
@@ -211,7 +211,7 @@ const optionStyles = function anonymous(props) {
211
211
  else if (props.isSelected) rules += " p5dxOg151";
212
212
  else if (props.isFocused) rules += " pHKLAu151";
213
213
  else if (props.isHovered) rules += " pHKLAu151";
214
- else rules += " pUUi0Fe151";
214
+ else rules += " pWQ7V3d151";
215
215
  if (props.size === "lg") rules += " Sg151";
216
216
  else if (props.size === "md") rules += " Sf151";
217
217
  else if (props.size === "sm") rules += " Se151";
@@ -86,7 +86,7 @@ const selectBoxStyles = function anonymous(props) {
86
86
  rules += " mb151";
87
87
  rules += " lb151";
88
88
  if (props.isDisabled) rules += " iA151";
89
- else if (props.isSelected) rules += " iI9Ko6c151";
89
+ else if (props.isSelected) rules += " i14vytc151";
90
90
  else if (props.isHovered) rules += " ivsWZX151";
91
91
  else rules += " irHHOgb151";
92
92
  if (props.isDisabled) rules += " gkDWoNd151";
@@ -84,7 +84,7 @@ const selectBoxStyles = function anonymous(props) {
84
84
  rules += " mb151";
85
85
  rules += " lb151";
86
86
  if (props.isDisabled) rules += " iA151";
87
- else if (props.isSelected) rules += " iI9Ko6c151";
87
+ else if (props.isSelected) rules += " i14vytc151";
88
88
  else if (props.isHovered) rules += " ivsWZX151";
89
89
  else rules += " irHHOgb151";
90
90
  if (props.isDisabled) rules += " gkDWoNd151";
@@ -122,7 +122,7 @@ const lightStyles = function anonymous(props) {
122
122
  else if (props.variant === "negative") rules += " tQQET4151";
123
123
  else if (props.variant === "notice") rules += " tz7uc2d151";
124
124
  else if (props.variant === "positive") rules += " tRDRLjb151";
125
- else if (props.variant === "neutral") rules += " tEQPy3c151";
125
+ else if (props.variant === "neutral") rules += " tejacpe151";
126
126
  else if (props.variant === "informative") rules += " tbUYvEb151";
127
127
  rules += " _Ne151";
128
128
  rules += " Pe151";
@@ -120,7 +120,7 @@ const lightStyles = function anonymous(props) {
120
120
  else if (props.variant === "negative") rules += " tQQET4151";
121
121
  else if (props.variant === "notice") rules += " tz7uc2d151";
122
122
  else if (props.variant === "positive") rules += " tRDRLjb151";
123
- else if (props.variant === "neutral") rules += " tEQPy3c151";
123
+ else if (props.variant === "neutral") rules += " tejacpe151";
124
124
  else if (props.variant === "informative") rules += " tbUYvEb151";
125
125
  rules += " _Ne151";
126
126
  rules += " Pe151";
@@ -94,9 +94,9 @@ const indicatorStyles = function anonymous(props) {
94
94
  if (props.isSelected) rules += " px151";
95
95
  else if (props.isCompleted) rules += " px151";
96
96
  else if (props.isDisabled) rules += " pUvnvv151";
97
- else rules += " pUUi0Fe151";
98
- if (props.isSelected) rules += " gdeCgNc151";
99
- else if (props.isCompleted) rules += " gfkXLC151";
97
+ else rules += " pWQ7V3d151";
98
+ if (props.isSelected) rules += " gnhAeB151";
99
+ else if (props.isCompleted) rules += " g4izmob151";
100
100
  else if (props.isDisabled) rules += " gkDWoNd151";
101
101
  else rules += " g9ORGnd151";
102
102
  if (props.isSelected) rules += " iA151";
@@ -143,7 +143,7 @@ const labelStyles = function anonymous(props) {
143
143
  if (props.isSelected) rules += " pHKLAu151";
144
144
  else if (props.isCompleted) rules += " pHKLAu151";
145
145
  else if (props.isDisabled) rules += " pUvnvv151";
146
- else rules += " pUUi0Fe151";
146
+ else rules += " pWQ7V3d151";
147
147
  return rules;
148
148
  };
149
149
  const connectorStyles = function anonymous(props) {
@@ -156,7 +156,7 @@ const connectorStyles = function anonymous(props) {
156
156
  rules += " Yd151";
157
157
  rules += " Xb151";
158
158
  rules += " _2b151";
159
- if (props.isCompleted) rules += " gfkXLC151";
159
+ if (props.isCompleted) rules += " g4izmob151";
160
160
  else rules += " gfbAdGe151";
161
161
  return rules;
162
162
  };
@@ -93,9 +93,9 @@ const indicatorStyles = function anonymous(props) {
93
93
  if (props.isSelected) rules += " px151";
94
94
  else if (props.isCompleted) rules += " px151";
95
95
  else if (props.isDisabled) rules += " pUvnvv151";
96
- else rules += " pUUi0Fe151";
97
- if (props.isSelected) rules += " gdeCgNc151";
98
- else if (props.isCompleted) rules += " gfkXLC151";
96
+ else rules += " pWQ7V3d151";
97
+ if (props.isSelected) rules += " gnhAeB151";
98
+ else if (props.isCompleted) rules += " g4izmob151";
99
99
  else if (props.isDisabled) rules += " gkDWoNd151";
100
100
  else rules += " g9ORGnd151";
101
101
  if (props.isSelected) rules += " iA151";
@@ -142,7 +142,7 @@ const labelStyles = function anonymous(props) {
142
142
  if (props.isSelected) rules += " pHKLAu151";
143
143
  else if (props.isCompleted) rules += " pHKLAu151";
144
144
  else if (props.isDisabled) rules += " pUvnvv151";
145
- else rules += " pUUi0Fe151";
145
+ else rules += " pWQ7V3d151";
146
146
  return rules;
147
147
  };
148
148
  const connectorStyles = function anonymous(props) {
@@ -155,7 +155,7 @@ const connectorStyles = function anonymous(props) {
155
155
  rules += " Yd151";
156
156
  rules += " Xb151";
157
157
  rules += " _2b151";
158
- if (props.isCompleted) rules += " gfkXLC151";
158
+ if (props.isCompleted) rules += " g4izmob151";
159
159
  else rules += " gfbAdGe151";
160
160
  return rules;
161
161
  };
@@ -1 +1 @@
1
- {"version":3,"file":"glasselated-ramps.d.ts","sourceRoot":"","sources":["../../src/style/glasselated-ramps.ts"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA4P3C,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAO9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAOvD,CAAC"}
1
+ {"version":3,"file":"glasselated-ramps.d.ts","sourceRoot":"","sources":["../../src/style/glasselated-ramps.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAoQ3C,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAQ9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAOvD,CAAC"}
@@ -36502,7 +36502,7 @@ const RAMPS = {
36502
36502
  200: ["#dbe3ed", "#555c64"],
36503
36503
  300: ["#c4d0de", "#67717d"],
36504
36504
  400: ["#94a3b8", "#7c8794"],
36505
- 500: ["#64748b", "#9aa0a8"],
36505
+ 500: ["#556478", "#a0a6ae"],
36506
36506
  600: ["#465569", "#a8b2c0"],
36507
36507
  700: ["#33455c", "#b9c4d6"],
36508
36508
  800: ["#17212e", "#f2f3f5"],
@@ -36516,7 +36516,7 @@ const RAMPS = {
36516
36516
  400: ["#bfd9fe", "#2d415d"],
36517
36517
  500: ["#9cc4fc", "#2f507f"],
36518
36518
  600: ["#7bb0fa", "#2e5fa1"],
36519
- 700: ["#5c9ff9", "#407fc1"],
36519
+ 700: ["#5c9ff9", "#3670ae"],
36520
36520
  800: ["#398dfa", "#267ce7"],
36521
36521
  900: ["#2e90fa", "#2e90fa"],
36522
36522
  1e3: ["#0e64c8", "#569eff"],
@@ -36605,6 +36605,11 @@ const SEMANTIC_OVERRIDES = {
36605
36605
  notice: RAMPS.amber
36606
36606
  };
36607
36607
  const glasselatedCreateColors = {
36608
+ "interactive-fill": {
36609
+ type: "color",
36610
+ light: "#135fc0",
36611
+ dark: "#3670ae"
36612
+ },
36608
36613
  "create-bg": {
36609
36614
  type: "color",
36610
36615
  light: "#ffedb0",
@@ -37132,20 +37137,24 @@ const style = createTheme({
37132
37137
  }),
37133
37138
  backgroundColor: new SpectrumColorProperty("backgroundColor", {
37134
37139
  ...baseColors,
37135
- accent: {
37136
- type: "ref",
37137
- light: "accent-900",
37138
- dark: "accent-700"
37139
- },
37140
+ accent: baseColors["interactive-fill"],
37140
37141
  "accent-subtle": weirdColorToken("accent-subtle-background-color-default"),
37141
37142
  neutral: colorToken("neutral-background-color-default"),
37142
37143
  "neutral-subdued": weirdColorToken("neutral-subdued-background-color-default"),
37143
37144
  "neutral-subtle": weirdColorToken("neutral-subtle-background-color-default"),
37144
- negative: weirdColorToken("negative-background-color-default"),
37145
+ negative: {
37146
+ type: "ref",
37147
+ light: "negative-900",
37148
+ dark: "negative-700"
37149
+ },
37145
37150
  "negative-subtle": weirdColorToken("negative-subtle-background-color-default"),
37146
37151
  informative: weirdColorToken("informative-background-color-default"),
37147
37152
  "informative-subtle": weirdColorToken("informative-subtle-background-color-default"),
37148
- positive: weirdColorToken("positive-background-color-default"),
37153
+ positive: {
37154
+ type: "ref",
37155
+ light: "positive-900",
37156
+ dark: "positive-700"
37157
+ },
37149
37158
  "positive-subtle": weirdColorToken("positive-subtle-background-color-default"),
37150
37159
  notice: weirdColorToken("notice-background-color-default"),
37151
37160
  "notice-subtle": weirdColorToken("notice-subtle-background-color-default"),