morya-ui 0.4.4 → 0.5.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 (344) hide show
  1. package/CHANGELOG.md +828 -775
  2. package/LICENSE +21 -21
  3. package/README.md +156 -156
  4. package/README.zh-CN.md +156 -156
  5. package/dist/{Button-Bjsth0ct.js → Button-fKkfCnYv.js} +1 -1
  6. package/dist/{Checkbox-Bo26OGHP.js → Checkbox-BXC2mLNd.js} +1 -1
  7. package/dist/DatePicker-DcVjiS5d.js +848 -0
  8. package/dist/{Empty-rMhOPi79.js → Empty-By1qe-ew.js} +1 -1
  9. package/dist/{FlyoutSubmenu-C0id6-Sb.js → FlyoutSubmenu-C1n-fr6i.js} +1 -1
  10. package/dist/{Input-CxSTVp9E.js → Input-D2bee2LU.js} +2 -2
  11. package/dist/InputNumber-DjbXtTzR.js +245 -0
  12. package/dist/{Loading-D_qRwfKv.js → Loading-DE9Iaiao.js} +3 -3
  13. package/dist/Pagination-DpNOb0CS.js +178 -0
  14. package/dist/{Popover-D1uZ1N9Z.js → Popover-Bnz7KNZq.js} +2 -2
  15. package/dist/{ProgressSpinner-hmR23xpi.js → ProgressSpinner-vBXGvQ92.js} +1 -1
  16. package/dist/{Radio-CZAyelC_.js → Radio-BbznzRbr.js} +1 -1
  17. package/dist/{Segmented-BpdO7arR.js → Segmented-CMP3nBAP.js} +1 -1
  18. package/dist/{Select-CySmusHs.js → Select-q4X2ff_M.js} +3 -3
  19. package/dist/{Textarea-DskjTCcz.js → Textarea-DsFOAtPd.js} +2 -2
  20. package/dist/{Tooltip-DSfkflHp.js → Tooltip-5zRVTTVs.js} +2 -2
  21. package/dist/accordion/style.css +1197 -1205
  22. package/dist/affix/style.css +1197 -1205
  23. package/dist/alert/index.js +2 -2
  24. package/dist/alert/style.css +1197 -1205
  25. package/dist/anchor/style.css +1197 -1205
  26. package/dist/auto-complete/index.js +3 -3
  27. package/dist/auto-complete/style.css +1741 -1749
  28. package/dist/avatar/style.css +1310 -1318
  29. package/dist/badge/style.css +1363 -1371
  30. package/dist/block-ui/index.js +1 -1
  31. package/dist/block-ui/style.css +1197 -1205
  32. package/dist/breadcrumb/index.js +1 -1
  33. package/dist/breadcrumb/style.css +1197 -1205
  34. package/dist/button/index.js +1 -1
  35. package/dist/button/style.css +1901 -1909
  36. package/dist/calendar/index.js +3 -3
  37. package/dist/calendar/style.css +2072 -1880
  38. package/dist/card/style.css +1197 -1205
  39. package/dist/carousel/index.js +2 -2
  40. package/dist/carousel/style.css +2200 -2208
  41. package/dist/cascade-select/index.js +3 -3
  42. package/dist/cascade-select/style.css +1901 -1909
  43. package/dist/checkbox/index.js +1 -1
  44. package/dist/checkbox/style.css +1197 -1205
  45. package/dist/chip/index.js +1 -1
  46. package/dist/chip/style.css +1341 -1349
  47. package/dist/color-picker/index.js +676 -0
  48. package/dist/{input-color → color-picker}/style.css +2613 -1289
  49. package/dist/color-picker/style.js +8 -0
  50. package/dist/command-menu/index.js +3 -3
  51. package/dist/command-menu/style.css +1430 -1438
  52. package/dist/components/AutoComplete/styles.css +209 -209
  53. package/dist/components/Avatar/styles.css +113 -113
  54. package/dist/components/Badge/styles.css +164 -164
  55. package/dist/components/Button/styles.css +698 -698
  56. package/dist/components/Carousel/styles.css +302 -302
  57. package/dist/components/CascadeSelect/styles.css +168 -168
  58. package/dist/components/Chip/styles.css +144 -144
  59. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +41 -0
  60. package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -0
  61. package/dist/components/ColorPicker/colorUtils.d.ts +23 -0
  62. package/dist/components/ColorPicker/colorUtils.d.ts.map +1 -0
  63. package/dist/components/ColorPicker/gradientUtils.d.ts +9 -0
  64. package/dist/components/ColorPicker/gradientUtils.d.ts.map +1 -0
  65. package/dist/components/ColorPicker/index.d.ts +3 -0
  66. package/dist/components/ColorPicker/index.d.ts.map +1 -0
  67. package/dist/components/ColorPicker/styles.css +405 -0
  68. package/dist/components/ColorPicker/types.d.ts +60 -0
  69. package/dist/components/ColorPicker/types.d.ts.map +1 -0
  70. package/dist/components/CommandMenu/styles.css +102 -102
  71. package/dist/components/ConfigProvider/styles.css +6 -6
  72. package/dist/components/ConfirmDialog/styles.css +24 -24
  73. package/dist/components/ConfirmPopup/styles.css +35 -35
  74. package/dist/components/ContextMenu/styles.css +138 -138
  75. package/dist/components/DatePicker/DatePicker.vue.d.ts +21 -0
  76. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  77. package/dist/components/DatePicker/styles.css +653 -453
  78. package/dist/components/DatePicker/types.d.ts +20 -2
  79. package/dist/components/DatePicker/types.d.ts.map +1 -1
  80. package/dist/components/Dialog/styles.css +420 -420
  81. package/dist/components/Dock/styles.css +84 -84
  82. package/dist/components/Drawer/styles.css +346 -346
  83. package/dist/components/Dropdown/styles.css +135 -135
  84. package/dist/components/Empty/styles.css +146 -146
  85. package/dist/components/FileUpload/styles.css +359 -359
  86. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  87. package/dist/components/Form/styles.css +125 -125
  88. package/dist/components/Gallery/styles.css +100 -100
  89. package/dist/components/Input/styles.css +392 -392
  90. package/dist/components/InputNumber/styles.css +280 -262
  91. package/dist/components/InputPassword/styles.css +189 -189
  92. package/dist/components/InputTags/styles.css +121 -121
  93. package/dist/components/Layout/styles.css +433 -433
  94. package/dist/components/List/styles.css +229 -229
  95. package/dist/components/Listbox/styles.css +130 -130
  96. package/dist/components/Loading/styles.css +378 -378
  97. package/dist/components/MegaMenu/styles.css +97 -97
  98. package/dist/components/Menu/styles.css +565 -565
  99. package/dist/components/Menubar/styles.css +144 -144
  100. package/dist/components/Message/styles.css +248 -248
  101. package/dist/components/MeterGroup/styles.css +49 -49
  102. package/dist/components/OrderList/OrderList.vue.d.ts +13 -7
  103. package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
  104. package/dist/components/OrderList/styles.css +80 -7
  105. package/dist/components/OrderList/types.d.ts +20 -3
  106. package/dist/components/OrderList/types.d.ts.map +1 -1
  107. package/dist/components/Page/styles.css +430 -430
  108. package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
  109. package/dist/components/Pagination/styles.css +97 -124
  110. package/dist/components/Popover/styles.css +92 -92
  111. package/dist/components/Result/styles.css +146 -146
  112. package/dist/components/Scrollbar/styles.css +131 -131
  113. package/dist/components/Select/styles.css +222 -222
  114. package/dist/components/SelectButton/styles.css +107 -107
  115. package/dist/components/Sidebar/styles.css +74 -74
  116. package/dist/components/Slider/styles.css +211 -211
  117. package/dist/components/SplitButton/styles.css +216 -216
  118. package/dist/components/Status/styles.css +190 -190
  119. package/dist/components/Stepper/styles.css +152 -152
  120. package/dist/components/Switch/styles.css +129 -129
  121. package/dist/components/Table/Table.vue.d.ts +37 -282
  122. package/dist/components/Table/Table.vue.d.ts.map +1 -1
  123. package/dist/components/Table/core/tree.d.ts +4 -0
  124. package/dist/components/Table/core/tree.d.ts.map +1 -1
  125. package/dist/components/Table/core/utils.d.ts +11 -3
  126. package/dist/components/Table/core/utils.d.ts.map +1 -1
  127. package/dist/components/Table/index.d.ts +1 -1
  128. package/dist/components/Table/index.d.ts.map +1 -1
  129. package/dist/components/Table/render/TableColumnSetting.vue.d.ts +25 -0
  130. package/dist/components/Table/render/TableColumnSetting.vue.d.ts.map +1 -0
  131. package/dist/components/Table/render/TableTbody.vue.d.ts +16 -0
  132. package/dist/components/Table/render/TableTbody.vue.d.ts.map +1 -1
  133. package/dist/components/Table/render/TableThead.vue.d.ts +8 -0
  134. package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -1
  135. package/dist/components/Table/state/internal.d.ts +1 -1
  136. package/dist/components/Table/state/internal.d.ts.map +1 -1
  137. package/dist/components/Table/state/usePageItems.d.ts +1 -3
  138. package/dist/components/Table/state/usePageItems.d.ts.map +1 -1
  139. package/dist/components/Table/state/useVirtualRows.d.ts +20 -2
  140. package/dist/components/Table/state/useVirtualRows.d.ts.map +1 -1
  141. package/dist/components/Table/styles.css +95 -0
  142. package/dist/components/Table/types.d.ts +77 -12
  143. package/dist/components/Table/types.d.ts.map +1 -1
  144. package/dist/components/Tabs/styles.css +165 -165
  145. package/dist/components/Terminal/styles.css +75 -75
  146. package/dist/components/Textarea/styles.css +146 -146
  147. package/dist/components/TieredMenu/styles.css +125 -125
  148. package/dist/components/Timeline/styles.css +157 -157
  149. package/dist/components/TreeSelect/styles.css +172 -172
  150. package/dist/components/VirtualScroller/styles.css +27 -27
  151. package/dist/{config-BEpyhJi3.js → config-Cd20zAyW.js} +11 -1
  152. package/dist/config-provider/index.js +1 -1
  153. package/dist/config-provider/style.css +2293 -2301
  154. package/dist/confirm-dialog/index.js +4 -4
  155. package/dist/confirm-dialog/style.css +2339 -2347
  156. package/dist/confirm-popup/index.js +4 -4
  157. package/dist/confirm-popup/style.css +1930 -1938
  158. package/dist/context-menu/index.js +3 -3
  159. package/dist/context-menu/style.css +1466 -1474
  160. package/dist/data-view/index.js +3 -3
  161. package/dist/data-view/style.css +1672 -1707
  162. package/dist/date-picker/index.js +1 -1
  163. package/dist/date-picker/style.css +1982 -1658
  164. package/dist/date-picker/style.js +1 -0
  165. package/dist/descriptions/index.js +1 -1
  166. package/dist/descriptions/style.css +1197 -1205
  167. package/dist/dialog/index.js +4 -4
  168. package/dist/dialog/style.css +2315 -2323
  169. package/dist/divider/style.css +1197 -1205
  170. package/dist/dock/style.css +1281 -1289
  171. package/dist/drawer/index.js +3 -3
  172. package/dist/drawer/style.css +1543 -1551
  173. package/dist/dropdown/index.js +4 -4
  174. package/dist/dropdown/style.css +1463 -1471
  175. package/dist/empty/index.js +1 -1
  176. package/dist/empty/style.css +1343 -1351
  177. package/dist/fieldset/style.css +1197 -1205
  178. package/dist/file-upload/index.js +1 -1
  179. package/dist/file-upload/style.css +1556 -1564
  180. package/dist/flex/index.js +1 -1
  181. package/dist/flex/style.css +1197 -1205
  182. package/dist/float-label/style.css +1197 -1205
  183. package/dist/fluid/style.css +1197 -1205
  184. package/dist/form/index.js +1 -1
  185. package/dist/form/style.css +1324 -1332
  186. package/dist/gallery/index.js +1 -1
  187. package/dist/gallery/style.css +1428 -1436
  188. package/dist/grid/style.css +1197 -1205
  189. package/dist/icon/style.css +1197 -1205
  190. package/dist/icon-field/style.css +1589 -1597
  191. package/dist/image/index.js +1 -1
  192. package/dist/image/style.css +1197 -1205
  193. package/dist/index.d.ts +3 -3
  194. package/dist/index.d.ts.map +1 -1
  195. package/dist/index.js +4792 -3559
  196. package/dist/inplace/style.css +1197 -1205
  197. package/dist/input/index.js +1 -1
  198. package/dist/input/style.css +1714 -1722
  199. package/dist/input-group/style.css +1197 -1205
  200. package/dist/input-number/index.js +2 -245
  201. package/dist/input-number/style.css +1477 -1467
  202. package/dist/input-otp/index.js +2 -2
  203. package/dist/input-otp/style.css +1197 -1205
  204. package/dist/input-password/index.js +2 -2
  205. package/dist/input-password/style.css +1511 -1519
  206. package/dist/input-tags/index.js +2 -2
  207. package/dist/input-tags/style.css +1318 -1326
  208. package/dist/knob/style.css +1197 -1205
  209. package/dist/label/style.css +1197 -1205
  210. package/dist/layout/index.js +1 -1
  211. package/dist/layout/style.css +1761 -1769
  212. package/dist/list/index.js +4 -4
  213. package/dist/list/style.css +2052 -2087
  214. package/dist/listbox/index.js +2 -2
  215. package/dist/listbox/style.css +1489 -1497
  216. package/dist/loading/index.js +1 -1
  217. package/dist/loading/style.css +1577 -1585
  218. package/dist/locale/de-DE.d.ts.map +1 -1
  219. package/dist/locale/en-US.d.ts.map +1 -1
  220. package/dist/locale/es-ES.d.ts.map +1 -1
  221. package/dist/locale/fr-FR.d.ts.map +1 -1
  222. package/dist/locale/ja-JP.d.ts.map +1 -1
  223. package/dist/locale/ko-KR.d.ts.map +1 -1
  224. package/dist/locale/pt-BR.d.ts.map +1 -1
  225. package/dist/locale/ru-RU.d.ts.map +1 -1
  226. package/dist/locale/types.d.ts +18 -0
  227. package/dist/locale/types.d.ts.map +1 -1
  228. package/dist/locale/zh-CN.d.ts.map +1 -1
  229. package/dist/locale/zh-TW.d.ts.map +1 -1
  230. package/dist/{locale-CZddM-tH.js → locale-BcxMPufl.js} +1 -1
  231. package/dist/mega-menu/index.js +3 -3
  232. package/dist/mega-menu/style.css +1294 -1302
  233. package/dist/mentions/index.js +3 -3
  234. package/dist/mentions/style.css +1322 -1330
  235. package/dist/menu/index.js +4 -4
  236. package/dist/menu/style.css +2051 -2059
  237. package/dist/menubar/index.js +4 -4
  238. package/dist/menubar/style.css +1472 -1480
  239. package/dist/message/index.js +3 -3
  240. package/dist/message/style.css +1445 -1453
  241. package/dist/meter-group/style.css +1248 -1256
  242. package/dist/order-list/index.js +191 -101
  243. package/dist/order-list/style.css +1277 -1212
  244. package/dist/page/index.js +3 -3
  245. package/dist/page/style.css +2592 -2600
  246. package/dist/pagination/index.js +1 -1
  247. package/dist/pagination/style.css +1516 -1551
  248. package/dist/panel/index.js +1 -1
  249. package/dist/panel/style.css +1197 -1205
  250. package/dist/pick-list/index.js +1 -1
  251. package/dist/pick-list/style.css +1197 -1205
  252. package/dist/popover/index.js +1 -1
  253. package/dist/popover/style.css +1291 -1299
  254. package/dist/progress-bar/style.css +1197 -1205
  255. package/dist/progress-spinner/index.js +1 -1
  256. package/dist/progress-spinner/style.css +1197 -1205
  257. package/dist/qr-code/index.js +3 -3
  258. package/dist/qr-code/style.css +1895 -1903
  259. package/dist/radio/index.js +1 -1
  260. package/dist/radio/style.css +1197 -1205
  261. package/dist/rating/index.js +2 -2
  262. package/dist/rating/style.css +1197 -1205
  263. package/dist/resolver.js +1 -1
  264. package/dist/result/index.js +1 -1
  265. package/dist/result/style.css +1343 -1351
  266. package/dist/scroll-top/index.js +2 -2
  267. package/dist/scroll-top/style.css +1328 -1336
  268. package/dist/scrollbar/style.css +1330 -1338
  269. package/dist/segmented/index.js +1 -1
  270. package/dist/segmented/style.css +1197 -1205
  271. package/dist/select/index.js +1 -1
  272. package/dist/select/style.css +2107 -2115
  273. package/dist/select-button/index.js +1 -1
  274. package/dist/select-button/style.css +1306 -1314
  275. package/dist/shared/styles/control-affix-icon.css +110 -110
  276. package/dist/shared/styles/control-suffix.css +118 -118
  277. package/dist/shared/styles/select-overlay.css +177 -177
  278. package/dist/sidebar/index.js +1 -1
  279. package/dist/sidebar/style.css +1271 -1279
  280. package/dist/skeleton/style.css +1197 -1205
  281. package/dist/slider/index.js +2 -2
  282. package/dist/slider/style.css +1410 -1418
  283. package/dist/space/index.js +1 -1
  284. package/dist/space/style.css +1197 -1205
  285. package/dist/speed-dial/index.js +3 -3
  286. package/dist/speed-dial/style.css +1197 -1205
  287. package/dist/split-button/index.js +3 -3
  288. package/dist/split-button/style.css +2111 -2119
  289. package/dist/splitter/index.js +1 -1
  290. package/dist/splitter/style.css +1197 -1205
  291. package/dist/statistic/style.css +1197 -1205
  292. package/dist/status/index.js +1 -1
  293. package/dist/status/style.css +1387 -1395
  294. package/dist/stepper/style.css +1349 -1357
  295. package/dist/styles/base.css +795 -804
  296. package/dist/styles.css +1 -1
  297. package/dist/switch/index.js +1 -1
  298. package/dist/switch/style.css +1328 -1336
  299. package/dist/table/index.js +975 -714
  300. package/dist/table/style.css +1899 -1839
  301. package/dist/tabs/index.js +1 -1
  302. package/dist/tabs/style.css +1493 -1501
  303. package/dist/tag/index.js +2 -2
  304. package/dist/tag/style.css +1197 -1205
  305. package/dist/terminal/index.js +1 -1
  306. package/dist/terminal/style.css +1274 -1282
  307. package/dist/textarea/index.js +1 -1
  308. package/dist/textarea/style.css +1468 -1476
  309. package/dist/theme/styles.css +402 -401
  310. package/dist/tiered-menu/index.js +3 -3
  311. package/dist/tiered-menu/style.css +1453 -1461
  312. package/dist/time-picker/index.js +5 -1
  313. package/dist/time-picker/style.css +1852 -1660
  314. package/dist/timeline/style.css +1485 -1493
  315. package/dist/toast/index.js +3 -3
  316. package/dist/toast/style.css +1895 -1903
  317. package/dist/toggle-button/index.js +1 -1
  318. package/dist/toggle-button/style.css +1197 -1205
  319. package/dist/toolbar/style.css +1197 -1205
  320. package/dist/tooltip/index.js +1 -1
  321. package/dist/tooltip/style.css +1197 -1205
  322. package/dist/tour/index.js +3 -3
  323. package/dist/tour/style.css +1895 -1903
  324. package/dist/tree/index.js +2 -2
  325. package/dist/tree/style.css +1197 -1205
  326. package/dist/tree-select/index.js +4 -4
  327. package/dist/tree-select/style.css +1905 -1913
  328. package/dist/typography/index.js +2 -2
  329. package/dist/typography/style.css +1343 -1351
  330. package/dist/{useMotionTransition-DqL_SEML.js → useMotionTransition-DohkfWRB.js} +1 -1
  331. package/dist/virtual-scroller/style.css +1358 -1366
  332. package/dist/watermark/style.css +1197 -1205
  333. package/package.json +8 -8
  334. package/dist/DatePicker-CsMGzCqY.js +0 -630
  335. package/dist/Pagination-CnGOpp0m.js +0 -171
  336. package/dist/components/InputColor/InputColor.vue.d.ts +0 -24
  337. package/dist/components/InputColor/InputColor.vue.d.ts.map +0 -1
  338. package/dist/components/InputColor/index.d.ts +0 -3
  339. package/dist/components/InputColor/index.d.ts.map +0 -1
  340. package/dist/components/InputColor/styles.css +0 -139
  341. package/dist/components/InputColor/types.d.ts +0 -19
  342. package/dist/components/InputColor/types.d.ts.map +0 -1
  343. package/dist/input-color/index.js +0 -118
  344. package/dist/input-color/style.js +0 -3
@@ -1,1908 +1,1900 @@
1
- :root {
2
- /* Default morya palette (--m-* token names) */
3
- --m-color-primary: #1677ff;
4
- --m-color-primary-hover: #4096ff;
5
- --m-color-primary-active: #0958d9;
6
- --m-color-surface: #ffffff;
7
- --m-color-text: rgba(0, 0, 0, 0.88);
8
- --m-color-text-muted: rgba(0, 0, 0, 0.45);
9
- --m-color-border: #d9d9d9;
10
- --m-color-split: #f0f0f0;
11
- --m-color-focus-ring: #1677ff;
12
- /* Soft translucent control-outline ring (primary bg composited over container) */
13
- --m-color-control-outline: rgba(5, 145, 255, 0.1);
14
- --m-color-control-outline-danger: rgba(255, 38, 5, 0.06);
15
- --m-color-control-outline-warning: rgba(255, 215, 5, 0.1);
16
- /* Control sizing: medium control height 32px */
17
- --m-control-height-small: 24px;
18
- --m-control-height-medium: 32px;
19
- --m-control-height-large: 40px;
20
- --m-control-font-small: 14px;
21
- --m-control-font-medium: 14px;
22
- --m-control-font-large: 15px;
23
- --m-control-padding-x-small: 10px;
24
- --m-control-padding-x-medium: 15px;
25
- --m-control-padding-x-large: 16px;
26
-
27
- --m-radius-control: 6px;
28
- --m-border-width: 1px;
29
- --m-focus-outline-width: 2px;
30
- --m-focus-shadow: 0 0 0 var(--m-focus-outline-width) var(--m-color-control-outline);
31
- --m-focus-shadow-danger: 0 0 0 var(--m-focus-outline-width)
32
- var(--m-color-control-outline-danger);
33
- --m-focus-shadow-warning: 0 0 0 var(--m-focus-outline-width)
34
- var(--m-color-control-outline-warning);
35
- --m-color-success: #52c41a;
36
- --m-color-info: #1677ff;
37
- --m-color-warning: #faad14;
38
- --m-color-warn: var(--m-color-warning);
39
- --m-color-help: #9333ea;
40
- --m-color-danger: #ff4d4f;
41
- --m-color-contrast: rgba(0, 0, 0, 0.88);
42
- --m-color-contrast-fg: #ffffff;
43
- --m-color-contrast-hover: #1f1f1f;
44
- --m-color-contrast-active: #141414;
45
- --m-color-on-emphasis: #ffffff;
46
- --m-color-on-primary: var(--m-color-on-emphasis);
47
- --m-overlay-scrim: rgb(0 0 0 / 0.45);
48
- --m-shadow-sm:
49
- 0 1px 2px 0 rgb(0 0 0 / 0.03), 0 1px 6px -1px rgb(0 0 0 / 0.02),
50
- 0 2px 4px 0 rgb(0 0 0 / 0.02);
51
- --m-shadow-md:
52
- 0 6px 16px 0 rgb(0 0 0 / 0.08), 0 3px 6px -4px rgb(0 0 0 / 0.12),
53
- 0 9px 28px 8px rgb(0 0 0 / 0.05);
54
- --m-shadow-lg:
55
- 0 6px 16px 0 rgb(0 0 0 / 0.08), 0 3px 6px -4px rgb(0 0 0 / 0.12),
56
- 0 9px 28px 8px rgb(0 0 0 / 0.05);
57
- --m-shadow-raised:
58
- 0 1px 2px -2px rgb(0 0 0 / 0.16), 0 3px 6px 0 rgb(0 0 0 / 0.12),
59
- 0 5px 12px 4px rgb(0 0 0 / 0.09);
60
- --m-shadow-sticky: 6px 0 16px -8px rgb(0 0 0 / 0.08);
61
- --m-shadow-sticky-end: -6px 0 16px -8px rgb(0 0 0 / 0.08);
62
-
63
- /* Typography scale (component text, not control-height fonts) */
64
- --m-font-size-xs: 0.75rem;
65
- --m-font-size-sm: 0.8125rem;
66
- --m-font-size-md: 0.875rem;
67
- --m-font-size-lg: 1.125rem;
68
- --m-line-height-sm: 1.6667;
69
- --m-line-height-md: 1.5714;
70
- --m-line-height-lg: 1.5;
71
- /* Display scale (page titles, KPI figures) */
72
- --m-font-size-xl: 1.25rem;
73
- --m-font-size-2xl: 1.5rem;
74
- --m-font-size-3xl: 1.75rem;
75
- --m-opacity-disabled: 0.55;
76
- --m-color-text-disabled: rgba(0, 0, 0, 0.25);
77
- --m-color-bg-disabled: rgba(0, 0, 0, 0.04);
78
- --m-font-weight: 400;
79
- --m-font-weight-medium: 500;
80
- --m-font-weight-strong: 600;
81
- /* Layering: override --m-z-base via ConfigProvider / createMoryaUI */
82
- --m-z-base: 1000;
83
- --m-z-overlay: var(--m-z-base);
84
- --m-z-overlay-raised: calc(var(--m-z-base) + 1);
85
- --m-z-dropdown: calc(var(--m-z-base) + 50);
86
- --m-z-tooltip: calc(var(--m-z-base) + 60);
87
- --m-z-toast: calc(var(--m-z-base) + 100);
88
- --m-z-popper: 40;
89
- --m-z-sticky: 10;
90
-
91
- /* Affix hitbox tracks control height so small/compact shells do not overflow */
92
- --m-control-affix-size: calc(
93
- var(--m-control-height-medium) - 2 * var(--m-border-width)
94
- );
95
- --m-control-affix-gap: 2.35rem;
96
- --m-control-affix-padding: 2.5rem;
97
- --m-meter-track-height: var(--m-space-5);
98
- --m-tree-toggler-size: var(--m-checkbox-control-size);
99
- --m-nav-rail-width: 12.5rem;
100
- --m-nav-rail-collapsed-width: 5rem;
101
- --m-layout-header-height: calc(
102
- var(--m-control-height-medium) + 2 * var(--m-space-3)
103
- );
104
- --m-layout-footer-height: calc(
105
- var(--m-control-height-medium) + 2 * var(--m-space-2)
106
- );
107
- --m-space-1: 0.25rem;
108
- --m-space-2: 0.5rem;
109
- --m-space-3: 0.75rem;
110
- --m-space-4: 1rem;
111
- --m-space-5: 1.25rem;
112
- --m-space-6: 1.5rem;
113
- --m-space-8: 2rem;
114
- --m-radius-sm: 0.25rem;
115
- --m-radius-md: 0.5rem;
116
- --m-radius-lg: 0.5rem;
117
- --m-radius-full: 9999px;
118
- --m-radius-pill: var(--m-radius-full);
119
- --m-font-sans:
120
- -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
121
- Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
122
- "Segoe UI Symbol", "Noto Color Emoji";
123
- --m-motion-fast: 150ms;
124
- --m-motion-normal: 250ms;
125
- --m-motion-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
126
- --m-motion-enter: 200ms;
127
- --m-motion-exit: 150ms;
128
- --m-motion-distance: 0.5rem;
129
- --m-motion-spin: 1s;
130
- --m-motion-spin-dash: 1.5s;
131
- --m-motion-spin-fast: 0.8s;
132
- --m-motion-spin-medium: 0.7s;
133
- --m-motion-skeleton: 1.4s;
134
- --m-motion-pulse: 1.2s;
135
- --m-motion-scrollbar-show: 340ms;
136
- --m-motion-scrollbar-hide: 120ms;
137
- --m-motion-loading-aurora: 3s;
138
- --m-motion-loading-bounce: 0.6s;
139
- --m-motion-loading-pulse: 1.8s;
140
- --m-motion-loading-stardust: 1.6s;
141
- --m-motion-loading-circular-rotate: 2s;
142
- --m-dataview-grid-min: 10rem;
143
- --m-tree-indent: 0.7rem;
144
- --m-tree-indent-padding: var(--m-space-3);
145
- --m-layout-trigger-bar-height: 4.5rem;
146
- --m-layout-trigger-bar-offset: 1.75rem;
147
- --m-layout-trigger-bar-width: 2rem;
148
- --m-layout-trigger-bar-top: 2.25rem;
149
- --m-timeline-event-min-height: 4rem;
150
- --m-timeline-marker-size: 1.5rem;
151
- --m-tag-font-size-small: var(--m-font-size-xs);
152
- --m-slider-tooltip-offset: 1.5rem;
153
- --m-slider-tooltip-padding-block: 0.15rem;
154
- --m-slider-tooltip-padding-inline: 0.4rem;
155
- --m-rating-star-size-small: 1rem;
156
- --m-rating-star-size-medium: 1.25rem;
157
- --m-rating-star-size-large: 1.5rem;
158
- --m-rating-star-padding: 0.15rem;
159
- --m-slider-marks-inset: 0.9rem;
160
- --m-slider-marks-side: 0.5rem;
161
- --m-stepper-connector-color: var(--m-color-border);
162
-
163
- /* Table */
164
- --m-color-fill-light: color-mix(in srgb, var(--m-color-text) 6%, var(--m-color-surface));
165
- --m-color-fill-lighter: color-mix(in srgb, var(--m-color-text) 3.5%, var(--m-color-surface));
166
- --m-table-border-color: var(--m-color-split);
167
- --m-table-header-bg: var(--m-color-fill-light);
168
- --m-table-header-text: var(--m-color-text);
169
- --m-table-text: var(--m-color-text);
170
- --m-table-row-bg: var(--m-color-surface);
171
- --m-table-row-hover-bg: var(--m-color-fill-light);
172
- --m-table-row-striped-bg: var(--m-color-fill-lighter);
173
- --m-table-row-current-bg: color-mix(in srgb, var(--m-color-primary) 10%, var(--m-color-surface));
174
- --m-table-row-selected-bg: color-mix(in srgb, var(--m-color-primary) 14%, var(--m-color-surface));
175
- --m-table-expanded-bg: var(--m-color-fill-lighter);
176
- --m-table-font-size: var(--m-font-size-md);
177
- --m-table-row-height: 40px;
178
- --m-table-cell-line-height: 23px;
179
- --m-table-cell-padding-inline: 12px;
180
- }
181
-
182
- :root[data-m-motion="reduced"] {
183
- --m-motion-fast: 80ms;
184
- --m-motion-normal: 120ms;
185
- --m-motion-enter: 100ms;
186
- --m-motion-exit: 80ms;
187
- --m-motion-distance: 0;
188
- /* Looping indicators: keep a short pulse so state is still perceptible */
189
- --m-motion-spin: 0ms;
190
- --m-motion-spin-dash: 0ms;
191
- --m-motion-spin-fast: 0ms;
192
- --m-motion-spin-medium: 0ms;
193
- --m-motion-skeleton: 0ms;
194
- --m-motion-pulse: 0ms;
195
- --m-motion-scrollbar-show: 160ms;
196
- --m-motion-scrollbar-hide: 80ms;
197
- --m-motion-loading-aurora: 0ms;
198
- --m-motion-loading-bounce: 0ms;
199
- --m-motion-loading-pulse: 0ms;
200
- --m-motion-loading-stardust: 0ms;
201
- --m-motion-loading-circular-rotate: 0ms;
202
- }
203
-
204
- :root[data-m-motion="none"] {
205
- --m-motion-fast: 0ms;
206
- --m-motion-normal: 0ms;
207
- --m-motion-enter: 0ms;
208
- --m-motion-exit: 0ms;
209
- --m-motion-distance: 0;
210
- --m-motion-spin: 0ms;
211
- --m-motion-spin-dash: 0ms;
212
- --m-motion-spin-fast: 0ms;
213
- --m-motion-spin-medium: 0ms;
214
- --m-motion-skeleton: 0ms;
215
- --m-motion-pulse: 0ms;
216
- --m-motion-scrollbar-show: 0ms;
217
- --m-motion-scrollbar-hide: 0ms;
218
- --m-motion-loading-aurora: 0ms;
219
- --m-motion-loading-bounce: 0ms;
220
- --m-motion-loading-pulse: 0ms;
221
- --m-motion-loading-stardust: 0ms;
222
- --m-motion-loading-circular-rotate: 0ms;
223
- }
224
-
225
- /*
226
- * Global motion policy (complements per-component rules):
227
- * - `reduced`: keep short paint transitions; stop loops
228
- * and layout/transform size animation.
229
- * - `none`: zero all transition/animation durations.
230
- */
231
-
232
- [data-m-motion="reduced"] *,
233
- [data-m-motion="reduced"] *::before,
234
- [data-m-motion="reduced"] *::after {
235
- animation-duration: 0.01ms !important;
236
- animation-iteration-count: 1 !important;
237
- transition-property: background-color, border-color, color, opacity, box-shadow, outline,
238
- fill, stroke, stroke-dashoffset !important;
239
- }
240
-
241
- [data-m-motion="none"] *,
242
- [data-m-motion="none"] *::before,
243
- [data-m-motion="none"] *::after {
244
- animation-duration: 0.01ms !important;
245
- animation-iteration-count: 1 !important;
246
- transition-duration: 0.01ms !important;
247
- scroll-behavior: auto !important;
248
- }
249
-
250
- /* Off-screen looping indicators (usePauseOffscreen → data-m-anim-paused) */
251
- [data-m-anim-paused],
252
- [data-m-anim-paused]::before,
253
- [data-m-anim-paused]::after,
254
- [data-m-anim-paused] *,
255
- [data-m-anim-paused] *::before,
256
- [data-m-anim-paused] *::after {
257
- animation-play-state: paused !important;
258
- }
259
-
260
- /* Global density: scales spacing + control heights (WD tokens) */
261
- :root,
262
- [data-m-density="comfortable"] {
263
- --m-density-scale: 1;
264
- --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-2));
265
- --m-checkbox-control-size: 1.125rem;
266
- }
267
-
268
- [data-m-density="compact"] {
269
- --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-1));
270
- --m-control-affix-padding: 2.15rem;
271
- --m-control-affix-gap: 2rem;
272
- --m-checkbox-control-size: 1rem;
273
- --m-nav-rail-width: 15rem;
274
- --m-nav-rail-collapsed-width: 4rem;
275
- --m-space-1: 0.2rem;
276
- --m-space-2: 0.4rem;
277
- --m-space-3: 0.6rem;
278
- --m-space-4: 0.85rem;
279
- --m-space-5: 1.05rem;
280
- --m-space-6: 1.25rem;
281
- --m-space-8: 1.7rem;
282
- --m-control-height-small: 24px;
283
- --m-control-height-medium: 28px;
284
- --m-control-height-large: 34px;
285
- --m-control-font-small: 13px;
286
- --m-control-font-medium: 13px;
287
- --m-control-font-large: 14px;
288
- --m-control-padding-x-small: 8px;
289
- --m-control-padding-x-medium: 10px;
290
- --m-control-padding-x-large: 12px;
291
- --m-table-row-height: 36px;
292
- --m-table-cell-line-height: 20px;
293
- --m-table-cell-padding-inline: 10px;
294
- --m-table-font-size: var(--m-font-size-sm);
295
- }
296
-
297
- [data-m-density="spacious"] {
298
- --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-3));
299
- --m-control-affix-padding: 2.85rem;
300
- --m-control-affix-gap: 2.65rem;
301
- --m-checkbox-control-size: 1.25rem;
302
- --m-nav-rail-width: 18rem;
303
- --m-nav-rail-collapsed-width: 5.5rem;
304
- --m-space-1: 0.3rem;
305
- --m-space-2: 0.6rem;
306
- --m-space-3: 0.9rem;
307
- --m-space-4: 1.15rem;
308
- --m-space-5: 1.45rem;
309
- --m-space-6: 1.75rem;
310
- --m-space-8: 2.35rem;
311
- --m-control-height-small: 32px;
312
- --m-control-height-medium: 40px;
313
- --m-control-height-large: 46px;
314
- --m-control-font-small: 14px;
315
- --m-control-font-medium: 15px;
316
- --m-control-font-large: 16px;
317
- --m-control-padding-x-small: 12px;
318
- --m-control-padding-x-medium: 14px;
319
- --m-control-padding-x-large: 16px;
320
- --m-table-row-height: 48px;
321
- --m-table-cell-line-height: 26px;
322
- --m-table-cell-padding-inline: 16px;
323
- --m-table-font-size: 1rem;
324
- }
325
-
326
- [data-m-density="compact"] .m-layout-header {
327
- --m-layout-header-height: 3rem;
328
- }
329
-
330
- [data-m-density="compact"] .m-layout-footer {
331
- --m-layout-footer-height: 2.5rem;
332
- }
333
-
334
- [data-m-density="spacious"] .m-layout-header {
335
- --m-layout-header-height: 4rem;
336
- }
337
-
338
- [data-m-density="spacious"] .m-layout-footer {
339
- --m-layout-footer-height: 3.5rem;
340
- }
341
-
342
- [data-theme="dark"] {
343
- /* Dark theme solids on dark surfaces (readable mid tones) */
344
- --m-color-primary: #1668dc;
345
- --m-color-primary-hover: #3c89e8;
346
- --m-color-primary-active: #1554ad;
347
- --m-color-surface: #141414;
348
- --m-color-text: rgba(255, 255, 255, 0.85);
349
- --m-color-text-muted: rgba(255, 255, 255, 0.45);
350
- --m-color-text-disabled: rgba(255, 255, 255, 0.3);
351
- --m-color-bg-disabled: rgba(255, 255, 255, 0.08);
352
- --m-color-border: #424242;
353
- --m-color-split: #303030;
354
- --m-color-focus-ring: #3c89e8;
355
- /* Dark: getAlphaColor(color*Bg, colorBgContainer) */
356
- --m-color-control-outline: rgba(23, 117, 249, 0.31);
357
- --m-color-control-outline-danger: rgba(249, 75, 78, 0.31);
358
- --m-color-control-outline-warning: rgba(250, 173, 20, 0.3);
359
- --m-focus-shadow: 0 0 0 var(--m-focus-outline-width) var(--m-color-control-outline);
360
- --m-focus-shadow-danger: 0 0 0 var(--m-focus-outline-width)
361
- var(--m-color-control-outline-danger);
362
- --m-focus-shadow-warning: 0 0 0 var(--m-focus-outline-width)
363
- var(--m-color-control-outline-warning);
364
- /* Mid solids: keep ≥~4.5:1 with --m-color-on-emphasis on dark surfaces */
365
- --m-color-success: #49aa19;
366
- --m-color-info: #1668dc;
367
- --m-color-warning: #d89614;
368
- --m-color-warn: var(--m-color-warning);
369
- --m-color-help: #7e22ce;
370
- --m-color-danger: #dc4446;
371
- --m-color-contrast: rgba(255, 255, 255, 0.85);
372
- --m-color-contrast-fg: #141414;
373
- --m-color-contrast-hover: #f5f5f5;
374
- --m-color-contrast-active: #d9d9d9;
375
- --m-overlay-scrim: rgb(0 0 0 / 0.65);
376
- --m-shadow-sm:
377
- 0 1px 2px 0 rgb(0 0 0 / 0.16), 0 1px 6px -1px rgb(0 0 0 / 0.12),
378
- 0 2px 4px 0 rgb(0 0 0 / 0.08);
379
- --m-shadow-md:
380
- 0 6px 16px 0 rgb(0 0 0 / 0.32), 0 3px 6px -4px rgb(0 0 0 / 0.48),
381
- 0 9px 28px 8px rgb(0 0 0 / 0.2);
382
- --m-shadow-lg:
383
- 0 6px 16px 0 rgb(0 0 0 / 0.32), 0 3px 6px -4px rgb(0 0 0 / 0.48),
384
- 0 9px 28px 8px rgb(0 0 0 / 0.2);
385
- --m-shadow-raised:
386
- 0 1px 2px -2px rgb(0 0 0 / 0.64), 0 3px 6px 0 rgb(0 0 0 / 0.48),
387
- 0 5px 12px 4px rgb(0 0 0 / 0.36);
388
- --m-shadow-sticky: 6px 0 16px -8px rgb(0 0 0 / 0.45);
389
- --m-shadow-sticky-end: -6px 0 16px -8px rgb(0 0 0 / 0.45);
390
-
391
- --m-table-border-color: var(--m-color-split);
392
- --m-color-fill-light: color-mix(in srgb, var(--m-color-text) 10%, var(--m-color-surface));
393
- --m-color-fill-lighter: color-mix(in srgb, var(--m-color-text) 6%, var(--m-color-surface));
394
- --m-table-header-bg: var(--m-color-fill-light);
395
- --m-table-row-bg: var(--m-color-surface);
396
- --m-table-row-hover-bg: color-mix(in srgb, var(--m-color-text) 8%, var(--m-color-surface));
397
- --m-table-row-striped-bg: var(--m-color-fill-lighter);
398
- --m-table-row-current-bg: color-mix(in srgb, var(--m-color-primary) 16%, var(--m-color-surface));
399
- --m-table-row-selected-bg: color-mix(in srgb, var(--m-color-primary) 20%, var(--m-color-surface));
400
- --m-table-expanded-bg: var(--m-color-fill-lighter);
401
- }
1
+ :root {
2
+ /* Default morya palette (--m-* token names) */
3
+ --m-color-primary: #1677ff;
4
+ --m-color-primary-hover: #4096ff;
5
+ --m-color-primary-active: #0958d9;
6
+ --m-color-surface: #ffffff;
7
+ --m-color-text: rgba(0, 0, 0, 0.88);
8
+ --m-color-text-muted: rgba(0, 0, 0, 0.45);
9
+ --m-color-border: #d9d9d9;
10
+ --m-color-split: #f0f0f0;
11
+ --m-color-focus-ring: #1677ff;
12
+ /* Soft translucent control-outline ring (primary bg composited over container) */
13
+ --m-color-control-outline: rgba(5, 145, 255, 0.1);
14
+ --m-color-control-outline-danger: rgba(255, 38, 5, 0.06);
15
+ --m-color-control-outline-warning: rgba(255, 215, 5, 0.1);
16
+ /* Control sizing: medium control height 32px */
17
+ --m-control-height-small: 24px;
18
+ --m-control-height-medium: 32px;
19
+ --m-control-height-large: 40px;
20
+ /* Ant Design: small/medium share 14px, large uses 16px */
21
+ --m-control-font-small: 14px;
22
+ --m-control-font-medium: 14px;
23
+ --m-control-font-large: 16px;
24
+ --m-control-padding-x-small: 8px;
25
+ --m-control-padding-x-medium: 12px;
26
+ --m-control-padding-x-large: 16px;
402
27
 
403
- /* Shared tokens consumption, type, focus, and mixed selectors. */
404
-
405
- :root {
406
- /* Shared minimum width for menu-like panels (select/orderlist/picklist) */
407
- --m-menu-min-width: 12rem;
408
- }
409
-
410
- .m-button,
411
- .m-input,
412
- .m-card,
413
- .m-dialog,
414
- .m-drawer,
415
- .m-popover,
416
- .m-accordion,
417
- .m-scrollbar,
418
- .m-panel,
419
- .m-fieldset,
420
- .m-flex,
421
- .m-space,
422
- .m-grid,
423
- .m-layout,
424
- .m-layout-header,
425
- .m-layout-footer,
426
- .m-layout-sider,
427
- .m-splitter,
428
- .m-stepper,
429
- .m-toolbar,
430
- .m-page-content,
431
- .m-page-header,
432
- .m-page-toolbar,
433
- .m-menu,
434
- .m-menubar,
435
- .m-contextmenu,
436
- .m-tieredmenu,
437
- .m-dropdown,
438
- .m-breadcrumb,
439
- .m-tabs,
440
- .m-datepicker,
441
- .m-listbox,
442
- .m-togglebutton,
443
- .m-select,
444
- .m-textarea,
445
- .m-selectbutton,
446
- .m-inputotp,
447
- .m-knob,
448
- .m-autocomplete,
449
- .m-splitbutton,
450
- .m-tree,
451
- .m-timeline,
452
- .m-dataview,
453
- .m-confirmpopup,
454
- .m-scrolltop,
455
- .m-blockui,
456
- .m-inplace,
457
- .m-message,
458
- .m-toast,
459
- .m-tooltip,
460
- .m-empty,
461
- .m-result,
462
- .m-progress-spinner,
463
- .m-cascadeselect,
464
- .m-treeselect,
465
- .m-inputcolor,
466
- .m-inputtags,
467
- .m-label,
468
- .m-speeddial,
469
- .m-orderlist,
470
- .m-picklist,
471
- .m-virtualscroller,
472
- .m-megamenu,
473
- .m-dock,
474
- .m-sidebar,
475
- .m-commandmenu,
476
- .m-fileupload,
477
- .m-carousel,
478
- .m-gallery,
479
- .m-metergroup,
480
- .m-fluid,
481
- .m-terminal {
482
- font-family: var(--m-font-sans);
483
- box-sizing: border-box;
484
- }
485
-
486
- .m-input:disabled,
487
- .m-textarea:disabled,
488
- .m-password__input:disabled,
489
- .m-inputnumber__input:disabled,
490
- .m-inputotp__input:disabled,
491
- .m-inputcolor__text:disabled,
492
- .m-inputcolor__swatch:disabled,
493
- .m-inputtags--disabled {
494
- background-color: var(--m-color-bg-disabled);
495
- color: var(--m-color-text-disabled);
496
- cursor: not-allowed;
497
- opacity: 1;
498
- }
499
-
500
- .m-input-field__control--prefixed .m-input:disabled,
501
- .m-input-field__control--suffixed .m-input:disabled,
502
- .m-input-field__control--clearable .m-input:disabled,
503
- .m-password--disabled .m-password__input,
504
- .m-inputnumber--disabled .m-inputnumber__input,
505
- .m-datepicker--disabled .m-datepicker__input,
506
- .m-icon-field--anchored .m-input:disabled,
507
- .m-icon-field--anchored .m-textarea:disabled {
508
- opacity: 1;
509
- }
510
-
511
- .m-input::placeholder,
512
- .m-textarea::placeholder,
513
- .m-password__input::placeholder,
514
- .m-inputnumber__input::placeholder,
515
- .m-inputtags__input::placeholder,
516
- .m-inputcolor__text::placeholder {
517
- color: var(--m-color-text-muted);
518
- opacity: 1;
519
- }
520
-
521
- .m-input-field__meta,
522
- .m-textarea-field__meta,
523
- .m-password-field__meta {
524
- align-items: baseline;
525
- display: flex;
526
- gap: var(--m-space-2);
527
- justify-content: space-between;
528
- }
529
-
530
- .m-input-field__meta:not(:has(.m-input-field__help)),
531
- .m-textarea-field__meta:not(:has(.m-textarea-field__help)),
532
- .m-password-field__meta:not(:has(.m-password__feedback)) {
533
- justify-content: flex-end;
534
- }
535
-
536
- .m-input-field__count,
537
- .m-textarea-field__count,
538
- .m-password-field__count {
539
- color: var(--m-color-text-muted);
540
- flex: 0 0 auto;
541
- font-size: var(--m-font-size-xs);
542
- margin-left: auto;
543
- }
544
-
545
- .m-dropdown__item--parent {
546
- align-items: center;
547
- display: flex;
548
- justify-content: space-between;
549
- width: 100%;
550
- }
551
-
552
- .m-dropdown__icon,
553
- .m-dropdown__caret,
554
- .m-menu__icon,
555
- .m-menubar__icon {
556
- flex-shrink: 0;
557
- }
558
-
559
- .m-dropdown__submenu-wrap {
560
- position: relative;
561
- }
562
-
563
- .m-dropdown__submenu {
564
- --m-dropdown-submenu-max-height: min(18rem, 45vh);
565
- background: var(--m-color-surface);
566
- border: var(--m-border-width) solid var(--m-color-border);
567
- border-radius: var(--m-radius-md);
568
- box-shadow: var(--m-shadow-md);
569
- max-height: var(--m-dropdown-submenu-max-height);
570
- max-width: calc(100vw - 2 * var(--m-space-4));
571
- min-width: 10rem;
572
- overflow: hidden;
573
- padding: var(--m-space-1);
574
- /* Same as .m-dropdown__menu: size to content instead of being clamped
575
- by the space left of the anchor in the viewport. */
576
- width: max-content;
577
- }
578
-
579
- .m-dropdown__submenu--teleported {
580
- position: fixed;
581
- z-index: var(--m-z-dropdown);
582
- }
583
-
584
- .m-dropdown__submenu-scroll {
585
- max-height: calc(var(--m-dropdown-submenu-max-height) - var(--m-space-2));
586
- min-height: 0;
587
- }
588
-
589
- .m-dropdown__submenu-view {
590
- display: grid;
591
- gap: var(--m-space-1);
592
- }
593
-
594
- .m-fade-enter-active,
595
- .m-fade-leave-active {
596
- transition: opacity var(--m-motion-exit) var(--m-motion-ease);
597
- }
598
-
599
- .m-fade-enter-from,
600
- .m-fade-leave-to {
601
- opacity: 0;
602
- }
603
-
604
- .m-scale-fade-enter-active {
605
- transition:
606
- opacity var(--m-motion-enter) var(--m-motion-ease),
607
- transform var(--m-motion-enter) var(--m-motion-ease);
608
- }
609
-
610
- .m-scale-fade-leave-active {
611
- transition:
612
- opacity var(--m-motion-exit) var(--m-motion-ease),
613
- transform var(--m-motion-exit) var(--m-motion-ease);
614
- }
615
-
616
- .m-scale-fade-enter-from,
617
- .m-scale-fade-leave-to {
618
- opacity: 0;
619
- transform: translateY(calc(var(--m-motion-distance) * -1)) scale(0.96);
620
- }
621
-
622
- .m-slide-fade-enter-active {
623
- transition:
624
- opacity var(--m-motion-enter) var(--m-motion-ease),
625
- transform var(--m-motion-enter) var(--m-motion-ease);
626
- }
627
-
628
- .m-slide-fade-leave-active {
629
- transition:
630
- opacity var(--m-motion-exit) var(--m-motion-ease),
631
- transform var(--m-motion-exit) var(--m-motion-ease);
632
- }
633
-
634
- .m-slide-fade-enter-from,
635
- .m-slide-fade-leave-to {
636
- opacity: 0;
637
- transform: translateY(calc(var(--m-motion-distance) * -1));
638
- }
639
-
640
- /* Generic center zoom (opacity + scale on the transitioning root) */
641
- .m-zoom-enter-active {
642
- transition:
643
- opacity var(--m-motion-enter) var(--m-motion-ease),
644
- transform var(--m-motion-enter) var(--m-motion-ease);
645
- }
646
-
647
- .m-zoom-leave-active {
648
- transition:
649
- opacity var(--m-motion-exit) var(--m-motion-ease),
650
- transform var(--m-motion-exit) var(--m-motion-ease);
651
- }
652
-
653
- .m-zoom-enter-from,
654
- .m-zoom-leave-to {
655
- opacity: 0;
656
- transform: scale(0.95);
657
- }
658
-
659
- .m-slide-up-enter-active,
660
- .m-slide-down-enter-active,
661
- .m-slide-left-enter-active,
662
- .m-slide-right-enter-active {
663
- transition:
664
- opacity var(--m-motion-enter) var(--m-motion-ease),
665
- transform var(--m-motion-enter) var(--m-motion-ease);
666
- }
667
-
668
- .m-slide-up-leave-active,
669
- .m-slide-down-leave-active,
670
- .m-slide-left-leave-active,
671
- .m-slide-right-leave-active {
672
- transition:
673
- opacity var(--m-motion-exit) var(--m-motion-ease),
674
- transform var(--m-motion-exit) var(--m-motion-ease);
675
- }
676
-
677
- .m-slide-up-enter-from,
678
- .m-slide-up-leave-to {
679
- opacity: 0;
680
- transform: translateY(var(--m-motion-distance));
681
- }
682
-
683
- .m-slide-down-enter-from,
684
- .m-slide-down-leave-to {
685
- opacity: 0;
686
- transform: translateY(calc(var(--m-motion-distance) * -1));
687
- }
688
-
689
- .m-slide-left-enter-from,
690
- .m-slide-left-leave-to {
691
- opacity: 0;
692
- transform: translateX(var(--m-motion-distance));
693
- }
694
-
695
- .m-slide-right-enter-from,
696
- .m-slide-right-leave-to {
697
- opacity: 0;
698
- transform: translateX(calc(var(--m-motion-distance) * -1));
699
- }
700
-
701
- [data-m-motion="reduced"] .m-fade-enter-active,
702
- [data-m-motion="reduced"] .m-fade-leave-active,
703
- [data-m-motion="reduced"] .m-scale-fade-enter-active,
704
- [data-m-motion="reduced"] .m-scale-fade-leave-active,
705
- [data-m-motion="reduced"] .m-slide-fade-enter-active,
706
- [data-m-motion="reduced"] .m-slide-fade-leave-active,
707
- [data-m-motion="reduced"] .m-zoom-enter-active,
708
- [data-m-motion="reduced"] .m-zoom-leave-active,
709
- [data-m-motion="reduced"] .m-slide-up-enter-active,
710
- [data-m-motion="reduced"] .m-slide-up-leave-active,
711
- [data-m-motion="reduced"] .m-slide-down-enter-active,
712
- [data-m-motion="reduced"] .m-slide-down-leave-active,
713
- [data-m-motion="reduced"] .m-slide-left-enter-active,
714
- [data-m-motion="reduced"] .m-slide-left-leave-active,
715
- [data-m-motion="reduced"] .m-slide-right-enter-active,
716
- [data-m-motion="reduced"] .m-slide-right-leave-active,
717
- [data-m-motion="none"] .m-fade-enter-active,
718
- [data-m-motion="none"] .m-fade-leave-active,
719
- [data-m-motion="none"] .m-scale-fade-enter-active,
720
- [data-m-motion="none"] .m-scale-fade-leave-active,
721
- [data-m-motion="none"] .m-slide-fade-enter-active,
722
- [data-m-motion="none"] .m-slide-fade-leave-active,
723
- [data-m-motion="none"] .m-zoom-enter-active,
724
- [data-m-motion="none"] .m-zoom-leave-active,
725
- [data-m-motion="none"] .m-slide-up-enter-active,
726
- [data-m-motion="none"] .m-slide-up-leave-active,
727
- [data-m-motion="none"] .m-slide-down-enter-active,
728
- [data-m-motion="none"] .m-slide-down-leave-active,
729
- [data-m-motion="none"] .m-slide-left-enter-active,
730
- [data-m-motion="none"] .m-slide-left-leave-active,
731
- [data-m-motion="none"] .m-slide-right-enter-active,
732
- [data-m-motion="none"] .m-slide-right-leave-active {
733
- transition: none;
734
- }
735
-
736
- [data-m-motion="reduced"] .m-scale-fade-enter-from,
737
- [data-m-motion="reduced"] .m-scale-fade-leave-to,
738
- [data-m-motion="reduced"] .m-slide-fade-enter-from,
739
- [data-m-motion="reduced"] .m-slide-fade-leave-to,
740
- [data-m-motion="reduced"] .m-zoom-enter-from,
741
- [data-m-motion="reduced"] .m-zoom-leave-to,
742
- [data-m-motion="reduced"] .m-slide-up-enter-from,
743
- [data-m-motion="reduced"] .m-slide-up-leave-to,
744
- [data-m-motion="reduced"] .m-slide-down-enter-from,
745
- [data-m-motion="reduced"] .m-slide-down-leave-to,
746
- [data-m-motion="reduced"] .m-slide-left-enter-from,
747
- [data-m-motion="reduced"] .m-slide-left-leave-to,
748
- [data-m-motion="reduced"] .m-slide-right-enter-from,
749
- [data-m-motion="reduced"] .m-slide-right-leave-to,
750
- [data-m-motion="none"] .m-scale-fade-enter-from,
751
- [data-m-motion="none"] .m-scale-fade-leave-to,
752
- [data-m-motion="none"] .m-slide-fade-enter-from,
753
- [data-m-motion="none"] .m-slide-fade-leave-to,
754
- [data-m-motion="none"] .m-zoom-enter-from,
755
- [data-m-motion="none"] .m-zoom-leave-to,
756
- [data-m-motion="none"] .m-slide-up-enter-from,
757
- [data-m-motion="none"] .m-slide-up-leave-to,
758
- [data-m-motion="none"] .m-slide-down-enter-from,
759
- [data-m-motion="none"] .m-slide-down-leave-to,
760
- [data-m-motion="none"] .m-slide-left-enter-from,
761
- [data-m-motion="none"] .m-slide-left-leave-to,
762
- [data-m-motion="none"] .m-slide-right-enter-from,
763
- [data-m-motion="none"] .m-slide-right-leave-to {
764
- transform: none;
765
- }
766
-
767
- /* Shared loading spinner rotation (ProgressSpinner, Switch, ProgressBar, AutoComplete) */
768
- @keyframes m-progress-spinner-rotate {
769
- 100% {
770
- transform: rotate(360deg);
771
- }
772
- }
773
-
774
- .m-checkbox,
775
- .m-radio,
776
- .m-switch {
777
- align-items: center;
778
- color: var(--m-color-text);
779
- cursor: pointer;
780
- display: inline-flex;
781
- font-family: var(--m-font-sans);
782
- gap: var(--m-space-2);
783
- /* 与输入框圆角保持一致,配合 MScrollbar 使用 */
784
- position: relative;
785
- }
786
-
787
- .m-checkbox--disabled,
788
- .m-radio--disabled,
789
- .m-switch--disabled {
790
- color: var(--m-color-text-disabled);
791
- cursor: not-allowed;
792
- opacity: 1;
793
- }
794
-
795
- .m-checkbox--invalid .m-checkbox__control,
796
- .m-radio--invalid .m-radio__control {
797
- border-color: var(--m-color-danger);
798
- }
799
-
800
- .m-checkbox__input,
801
- .m-radio__input,
802
- .m-switch__input {
803
- clip: rect(0, 0, 0, 0);
804
- clip-path: inset(50%);
805
- height: 1px;
806
- margin: -1px;
807
- overflow: hidden;
808
- opacity: 0;
809
- position: absolute;
810
- white-space: nowrap;
811
- width: 1px;
812
- }
813
-
814
- .m-checkbox__control,
815
- .m-radio__control {
816
- align-items: center;
817
- background: var(--m-color-surface);
818
- border: var(--m-border-width) solid var(--m-color-border);
819
- display: inline-flex;
820
- flex: 0 0 auto;
821
- height: var(--m-checkbox-control-size, 1.125rem);
822
- justify-content: center;
823
- transition:
824
- background-color var(--m-motion-fast) var(--m-motion-ease),
825
- border-color var(--m-motion-fast) var(--m-motion-ease),
826
- box-shadow var(--m-motion-fast) var(--m-motion-ease);
827
- width: var(--m-checkbox-control-size, 1.125rem);
828
- }
829
-
830
- .m-checkbox__input:checked + .m-checkbox__control,
831
- .m-radio__input:checked + .m-radio__control {
832
- background: var(--m-color-primary);
833
- border-color: var(--m-color-primary);
834
- }
835
-
836
- .m-checkbox:not(.m-checkbox--disabled):hover .m-checkbox__control,
837
- .m-radio:not(.m-radio--disabled):hover .m-radio__control {
838
- border-color: color-mix(in srgb, var(--m-color-primary) 45%, var(--m-color-border));
839
- }
840
-
841
- .m-checkbox__input:focus-visible + .m-checkbox__control,
842
- .m-radio__input:focus-visible + .m-radio__control,
843
- .m-switch__input:focus-visible + .m-switch__track {
844
- box-shadow: var(--m-focus-shadow);
845
- outline: none;
846
- }
847
-
848
- .m-checkbox__label,
849
- .m-radio__label,
850
- .m-switch__label {
851
- font-size: var(--m-font-size-md);
852
- }
853
-
854
- .m-textarea-field,
855
- .m-select-field {
856
- display: grid;
857
- font-family: var(--m-font-sans);
858
- gap: var(--m-space-2);
859
- max-width: 100%;
860
- min-width: var(--m-menu-min-width);
861
- position: relative;
862
- width: fit-content;
863
- }
864
-
865
- .m-textarea-field--fluid,
866
- .m-select-field--fluid {
867
- width: 100%;
868
- }
869
-
870
- .m-textarea-field__label,
871
- .m-select-field__label {
872
- color: var(--m-color-text);
873
- font-family: var(--m-font-sans);
874
- font-size: var(--m-font-size-md);
875
- font-weight: 500;
876
- }
877
-
878
- .m-textarea-field__help,
879
- .m-select-field__help {
880
- color: var(--m-color-text-muted);
881
- font-size: var(--m-font-size-xs);
882
- }
883
-
884
- .m-textarea-field__help--invalid,
885
- .m-select-field__help--invalid {
886
- color: var(--m-color-danger);
887
- }
888
-
889
- .m-textarea,
890
- .m-select {
891
- background: var(--m-color-surface);
892
- border: var(--m-border-width) solid var(--m-color-border);
893
- border-radius: var(--m-radius-control);
894
- color: var(--m-color-text);
895
- font: inherit;
896
- transition:
897
- border-color var(--m-motion-fast) var(--m-motion-ease),
898
- box-shadow var(--m-motion-fast) var(--m-motion-ease),
899
- background-color var(--m-motion-fast) var(--m-motion-ease);
900
- width: 100%;
901
- }
902
-
903
- .m-textarea--invalid:focus,
904
- .m-textarea--invalid:focus-visible,
905
- .m-select--invalid.m-select--open,
906
- .m-select--invalid:focus,
907
- .m-select--invalid:focus-visible {
908
- border-color: var(--m-color-danger);
909
- box-shadow: var(--m-focus-shadow-danger);
910
- }
911
-
912
- .m-textarea:disabled,
913
- .m-select:disabled,
914
- .m-select--disabled {
915
- background-color: var(--m-color-bg-disabled);
916
- color: var(--m-color-text-disabled);
917
- cursor: not-allowed;
918
- opacity: 1;
919
- }
920
-
921
- .m-inputgroup > .m-input,
922
- .m-inputgroup > .m-input-field,
923
- .m-inputgroup > .m-password-field,
924
- .m-inputgroup > .m-inputnumber-field {
925
- flex: 1 1 auto;
926
- min-width: 0;
927
- }
928
-
929
- .m-inputgroup > .m-input-field,
930
- .m-inputgroup > .m-password-field,
931
- .m-inputgroup > .m-inputnumber-field {
932
- display: flex;
933
- flex-direction: column;
934
- gap: 0;
935
- }
936
-
937
- .m-inputgroup > .m-input,
938
- .m-inputgroup .m-input,
939
- .m-inputgroup .m-password,
940
- .m-inputgroup .m-inputnumber__input-wrap,
941
- .m-inputgroup .m-input-field__control--prefixed,
942
- .m-inputgroup .m-input-field__control--suffixed,
943
- .m-inputgroup .m-input-field__control--clearable {
944
- border-radius: 0;
945
- width: 100%;
946
- }
947
-
948
- .m-inputgroup > :first-child.m-input,
949
- .m-inputgroup > :first-child .m-input,
950
- .m-inputgroup > :first-child .m-password,
951
- .m-inputgroup > :first-child .m-inputnumber__input-wrap,
952
- .m-inputgroup > :first-child .m-input-field__control--prefixed,
953
- .m-inputgroup > :first-child .m-input-field__control--suffixed,
954
- .m-inputgroup > :first-child .m-input-field__control--clearable,
955
- .m-inputgroup > :first-child.m-inputgroup-addon {
956
- border-bottom-left-radius: var(--m-radius-control);
957
- border-top-left-radius: var(--m-radius-control);
958
- }
959
-
960
- .m-inputgroup > :last-child.m-input,
961
- .m-inputgroup > :last-child .m-input,
962
- .m-inputgroup > :last-child .m-password,
963
- .m-inputgroup > :last-child .m-inputnumber__input-wrap,
964
- .m-inputgroup > :last-child .m-input-field__control--prefixed,
965
- .m-inputgroup > :last-child .m-input-field__control--suffixed,
966
- .m-inputgroup > :last-child .m-input-field__control--clearable,
967
- .m-inputgroup > :last-child.m-inputgroup-addon {
968
- border-bottom-right-radius: var(--m-radius-control);
969
- border-top-right-radius: var(--m-radius-control);
970
- }
971
-
972
- .m-inputgroup > .m-inputgroup-addon + .m-input,
973
- .m-inputgroup > .m-inputgroup-addon + .m-input-field .m-input,
974
- .m-inputgroup > .m-input + .m-inputgroup-addon,
975
- .m-inputgroup > .m-input-field + .m-inputgroup-addon {
976
- margin-left: calc(var(--m-border-width) * -1);
977
- }
978
-
979
- .m-layout__scrollbar > .m-scrollbar__wrap {
980
- height: 100%;
981
- overflow-x: hidden;
982
- }
983
-
984
- .m-layout-sider__scrollbar > .m-scrollbar__wrap {
985
- height: 100%;
986
- overflow-x: hidden;
987
- }
988
-
989
- .m-terminal__scrollbar > .m-scrollbar__wrap {
990
- height: 100%;
991
- overflow-x: hidden;
992
- }
993
-
994
- .m-scroll-body.m-scrollbar {
995
- min-height: 0;
996
- min-width: 0;
997
- }
998
-
999
- /* fit-content scroll wrappers: grow with content; max-height only clips when set on the wrapper */
1000
- .m-scrollbar--fit-content.m-scrollbar--fill:not(.m-layout__scrollbar):not(.m-layout-sider__scrollbar):not(.m-scroll-body) {
1001
- width: 100%;
1002
- }
1003
-
1004
- .m-scrollbar--fit-content.m-scrollbar--fill:not(.m-layout__scrollbar):not(.m-layout-sider__scrollbar):not(.m-scroll-body) .m-scrollbar__wrap {
1005
- overflow: auto;
1006
- }
1007
-
1008
- .m-orderlist__btn,
1009
- .m-picklist__btn {
1010
- align-items: center;
1011
- background: var(--m-color-surface);
1012
- border: var(--m-border-width) solid var(--m-color-border);
1013
- border-radius: var(--m-radius-sm);
1014
- color: var(--m-color-text);
1015
- cursor: pointer;
1016
- display: inline-flex;
1017
- font: inherit;
1018
- gap: 0;
1019
- justify-content: center;
1020
- min-height: var(--m-control-height-small, 1.75rem);
1021
- min-width: var(--m-control-affix-size);
1022
- padding: var(--m-space-1) var(--m-space-2);
1023
- }
1024
-
1025
- .m-orderlist__btn:hover:not(:disabled),
1026
- .m-picklist__btn:hover:not(:disabled) {
1027
- border-color: var(--m-color-primary);
1028
- color: var(--m-color-primary);
1029
- }
1030
-
1031
- .m-orderlist__btn:disabled,
1032
- .m-picklist__btn:disabled {
1033
- cursor: not-allowed;
1034
- opacity: var(--m-opacity-disabled);
1035
- }
1036
-
1037
- .m-orderlist__btn:focus-visible,
1038
- .m-picklist__btn:focus-visible {
1039
- border-color: var(--m-color-primary);
1040
- box-shadow: var(--m-focus-shadow);
1041
- outline: none;
1042
- }
1043
-
1044
- .m-picklist__btn .m-icon + .m-icon {
1045
- margin-left: -0.35rem;
1046
- }
1047
-
1048
- .m-orderlist__scrollbar,
1049
- .m-picklist__scrollbar {
1050
- flex: 1;
1051
- max-height: 16rem;
1052
- min-height: 12rem;
1053
- min-width: var(--m-menu-min-width);
1054
- }
1055
-
1056
- .m-orderlist__list,
1057
- .m-picklist__list {
1058
- background: var(--m-color-surface);
1059
- border: var(--m-border-width) solid var(--m-color-border);
1060
- border-radius: var(--m-radius-md);
1061
- padding: var(--m-space-1);
1062
- }
1063
-
1064
- .m-orderlist__options,
1065
- .m-picklist__options {
1066
- list-style: none;
1067
- margin: 0;
1068
- padding: 0;
1069
- }
1070
-
1071
- .m-orderlist__item,
1072
- .m-picklist__item {
1073
- border-radius: var(--m-radius-sm);
1074
- cursor: pointer;
1075
- padding: var(--m-space-2) var(--m-space-3);
1076
- }
1077
-
1078
- .m-orderlist__item:hover,
1079
- .m-picklist__item:hover {
1080
- background: color-mix(in srgb, var(--m-color-primary) 8%, var(--m-color-surface));
1081
- }
1082
-
1083
- .m-orderlist__item:focus-visible,
1084
- .m-picklist__item:focus-visible {
1085
- box-shadow: var(--m-focus-shadow);
1086
- outline: none;
1087
- }
1088
-
1089
- .m-orderlist__item--selected,
1090
- .m-picklist__item--selected {
1091
- background: color-mix(in srgb, var(--m-color-primary) 14%, var(--m-color-surface));
1092
- color: var(--m-color-primary);
1093
- font-weight: 500;
1094
- }
1095
-
1096
- .m-carousel__nav,
1097
- .m-gallery__nav {
1098
- background: var(--m-color-surface);
1099
- border: var(--m-border-width) solid var(--m-color-border);
1100
- border-radius: var(--m-radius-full, 999px);
1101
- color: var(--m-color-text);
1102
- cursor: pointer;
1103
- flex: 0 0 auto;
1104
- font: inherit;
1105
- height: var(--m-control-affix-size);
1106
- width: var(--m-control-affix-size);
1107
- }
1108
-
1109
- .m-carousel__nav:disabled,
1110
- .m-gallery__nav:disabled {
1111
- cursor: not-allowed;
1112
- opacity: var(--m-opacity-disabled);
1113
- }
1114
-
1115
- /* Shared hover/focus for remaining form triggers */
1116
- .m-inputotp__input:hover:not(:disabled):not(:focus),
1117
- .m-cascadeselect:not(.m-cascadeselect--open)
1118
- .m-cascadeselect__trigger:hover:not(:disabled):not(:focus):not(:focus-visible),
1119
- .m-treeselect:not(.m-treeselect--open)
1120
- .m-treeselect__trigger:hover:not(:disabled):not(:focus):not(:focus-visible),
1121
- .m-inputcolor__text:hover:not(:disabled):not(:focus),
1122
- .m-inputtags:hover:not(.m-inputtags--disabled):not(:focus-within),
1123
- .m-togglebutton:hover:not(:disabled):not(.m-togglebutton--checked):not(:focus-visible),
1124
- .m-inplace__display:hover:not(:focus-visible) {
1125
- border-color: var(--m-color-primary-hover);
1126
- }
1127
-
1128
- .m-inputotp__input:focus,
1129
- .m-inputotp__input:focus-visible,
1130
- .m-cascadeselect--open .m-cascadeselect__trigger,
1131
- .m-cascadeselect__trigger:focus,
1132
- .m-cascadeselect__trigger:focus-visible,
1133
- .m-treeselect--open .m-treeselect__trigger,
1134
- .m-treeselect__trigger:focus,
1135
- .m-treeselect__trigger:focus-visible,
1136
- .m-inputcolor__text:focus,
1137
- .m-inputcolor__text:focus-visible,
1138
- .m-inputtags:focus-within,
1139
- .m-togglebutton:focus-visible,
1140
- .m-selectbutton__button:focus-visible,
1141
- .m-splitbutton__main:focus-visible,
1142
- .m-splitbutton__trigger:focus-visible,
1143
- .m-inplace__display:focus-visible,
1144
- .m-pagination__button:focus-visible {
1145
- border-color: var(--m-color-primary);
1146
- box-shadow: var(--m-focus-shadow);
1147
- outline: none;
1148
- }
1149
-
1150
- .m-inputotp--invalid .m-inputotp__input:focus,
1151
- .m-inputotp--invalid .m-inputotp__input:focus-visible,
1152
- .m-inputtags--invalid:focus-within,
1153
- .m-inputcolor--invalid .m-inputcolor__text:focus,
1154
- .m-inputcolor--invalid .m-inputcolor__text:focus-visible {
1155
- border-color: var(--m-color-danger);
1156
- box-shadow: var(--m-focus-shadow-danger);
1157
- }
1158
-
1159
- .m-checkbox-group,
1160
- .m-radio-group {
1161
- display: flex;
1162
- flex-wrap: wrap;
1163
- gap: var(--m-space-3);
1164
- }
1165
-
1166
- .m-checkbox--small .m-checkbox__control,
1167
- .m-radio--small .m-radio__control {
1168
- height: 0.95rem;
1169
- width: 0.95rem;
1170
- }
1171
-
1172
- .m-checkbox--large .m-checkbox__control,
1173
- .m-radio--large .m-radio__control {
1174
- height: 1.35rem;
1175
- width: 1.35rem;
1176
- }
1177
-
1178
- .m-inputnumber__clear,
1179
- .m-autocomplete__clear {
1180
- background: transparent;
1181
- border: 0;
1182
- color: var(--m-color-text-muted);
1183
- cursor: pointer;
1184
- font: inherit;
1185
- line-height: 1;
1186
- }
1187
-
1188
- [data-m-motion="none"] *,
1189
- [data-m-motion="none"] *::before,
1190
- [data-m-motion="none"] *::after {
1191
- animation-duration: 0.01ms !important;
1192
- animation-iteration-count: 1 !important;
1193
- scroll-behavior: auto !important;
1194
- transition-duration: 0.01ms !important;
1195
- }
1196
-
1197
- [data-m-motion="reduced"] .m-progress-spinner,
1198
- [data-m-motion="reduced"] .m-progress-spinner__circle,
1199
- [data-m-motion="reduced"] .m-skeleton,
1200
- [data-m-motion="reduced"] .m-badge--processing,
1201
- [data-m-motion="reduced"] .m-icon--spin,
1202
- [data-m-motion="reduced"] .m-button__spinner,
1203
- [data-m-motion="reduced"] .m-select__loading-icon,
1204
- [data-m-motion="reduced"] .m-switch__loading-icon {
1205
- animation: none !important;
1206
- }
28
+ --m-radius-control: 6px;
29
+ --m-border-width: 1px;
30
+ --m-focus-outline-width: 2px;
31
+ --m-focus-shadow: 0 0 0 var(--m-focus-outline-width) var(--m-color-control-outline);
32
+ --m-focus-shadow-danger: 0 0 0 var(--m-focus-outline-width)
33
+ var(--m-color-control-outline-danger);
34
+ --m-focus-shadow-warning: 0 0 0 var(--m-focus-outline-width)
35
+ var(--m-color-control-outline-warning);
36
+ --m-color-success: #52c41a;
37
+ --m-color-info: #1677ff;
38
+ --m-color-warning: #faad14;
39
+ --m-color-warn: var(--m-color-warning);
40
+ --m-color-help: #9333ea;
41
+ --m-color-danger: #ff4d4f;
42
+ --m-color-contrast: rgba(0, 0, 0, 0.88);
43
+ --m-color-contrast-fg: #ffffff;
44
+ --m-color-contrast-hover: #1f1f1f;
45
+ --m-color-contrast-active: #141414;
46
+ --m-color-on-emphasis: #ffffff;
47
+ --m-color-on-primary: var(--m-color-on-emphasis);
48
+ --m-overlay-scrim: rgb(0 0 0 / 0.45);
49
+ --m-shadow-sm:
50
+ 0 1px 2px 0 rgb(0 0 0 / 0.03), 0 1px 6px -1px rgb(0 0 0 / 0.02),
51
+ 0 2px 4px 0 rgb(0 0 0 / 0.02);
52
+ --m-shadow-md:
53
+ 0 6px 16px 0 rgb(0 0 0 / 0.08), 0 3px 6px -4px rgb(0 0 0 / 0.12),
54
+ 0 9px 28px 8px rgb(0 0 0 / 0.05);
55
+ --m-shadow-lg:
56
+ 0 6px 16px 0 rgb(0 0 0 / 0.08), 0 3px 6px -4px rgb(0 0 0 / 0.12),
57
+ 0 9px 28px 8px rgb(0 0 0 / 0.05);
58
+ --m-shadow-raised:
59
+ 0 1px 2px -2px rgb(0 0 0 / 0.16), 0 3px 6px 0 rgb(0 0 0 / 0.12),
60
+ 0 5px 12px 4px rgb(0 0 0 / 0.09);
61
+ --m-shadow-sticky: 6px 0 16px -8px rgb(0 0 0 / 0.08);
62
+ --m-shadow-sticky-end: -6px 0 16px -8px rgb(0 0 0 / 0.08);
63
+
64
+ /* Typography scale (component text, not control-height fonts) */
65
+ --m-font-size-xs: 0.75rem;
66
+ --m-font-size-sm: 0.8125rem;
67
+ --m-font-size-md: 0.875rem;
68
+ --m-font-size-lg: 1.125rem;
69
+ --m-line-height-sm: 1.6667;
70
+ --m-line-height-md: 1.5714;
71
+ --m-line-height-lg: 1.5;
72
+ /* Display scale (page titles, KPI figures) */
73
+ --m-font-size-xl: 1.25rem;
74
+ --m-font-size-2xl: 1.5rem;
75
+ --m-font-size-3xl: 1.75rem;
76
+ --m-opacity-disabled: 0.55;
77
+ --m-color-text-disabled: rgba(0, 0, 0, 0.25);
78
+ --m-color-bg-disabled: rgba(0, 0, 0, 0.04);
79
+ --m-font-weight: 400;
80
+ --m-font-weight-medium: 500;
81
+ --m-font-weight-strong: 600;
82
+ /* Layering: override --m-z-base via ConfigProvider / createMoryaUI */
83
+ --m-z-base: 1000;
84
+ --m-z-overlay: var(--m-z-base);
85
+ --m-z-overlay-raised: calc(var(--m-z-base) + 1);
86
+ --m-z-dropdown: calc(var(--m-z-base) + 50);
87
+ --m-z-tooltip: calc(var(--m-z-base) + 60);
88
+ --m-z-toast: calc(var(--m-z-base) + 100);
89
+ --m-z-popper: 40;
90
+ --m-z-sticky: 10;
91
+
92
+ /* Affix hitbox tracks control height so small/compact shells do not overflow */
93
+ --m-control-affix-size: calc(
94
+ var(--m-control-height-medium) - 2 * var(--m-border-width)
95
+ );
96
+ --m-control-affix-gap: 2.35rem;
97
+ --m-control-affix-padding: 2.5rem;
98
+ --m-meter-track-height: var(--m-space-5);
99
+ --m-tree-toggler-size: var(--m-checkbox-control-size);
100
+ --m-nav-rail-width: 12.5rem;
101
+ --m-nav-rail-collapsed-width: 5rem;
102
+ --m-layout-header-height: calc(
103
+ var(--m-control-height-medium) + 2 * var(--m-space-3)
104
+ );
105
+ --m-layout-footer-height: calc(
106
+ var(--m-control-height-medium) + 2 * var(--m-space-2)
107
+ );
108
+ --m-space-1: 0.25rem;
109
+ --m-space-2: 0.5rem;
110
+ --m-space-3: 0.75rem;
111
+ --m-space-4: 1rem;
112
+ --m-space-5: 1.25rem;
113
+ --m-space-6: 1.5rem;
114
+ --m-space-8: 2rem;
115
+ --m-radius-sm: 0.25rem;
116
+ --m-radius-md: 0.5rem;
117
+ --m-radius-lg: 0.5rem;
118
+ --m-radius-full: 9999px;
119
+ --m-radius-pill: var(--m-radius-full);
120
+ --m-font-sans:
121
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
122
+ Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
123
+ "Segoe UI Symbol", "Noto Color Emoji";
124
+ --m-motion-fast: 150ms;
125
+ --m-motion-normal: 250ms;
126
+ --m-motion-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
127
+ --m-motion-enter: 200ms;
128
+ --m-motion-exit: 150ms;
129
+ --m-motion-distance: 0.5rem;
130
+ --m-motion-spin: 1s;
131
+ --m-motion-spin-dash: 1.5s;
132
+ --m-motion-spin-fast: 0.8s;
133
+ --m-motion-spin-medium: 0.7s;
134
+ --m-motion-skeleton: 1.4s;
135
+ --m-motion-pulse: 1.2s;
136
+ --m-motion-scrollbar-show: 340ms;
137
+ --m-motion-scrollbar-hide: 120ms;
138
+ --m-motion-loading-aurora: 3s;
139
+ --m-motion-loading-bounce: 0.6s;
140
+ --m-motion-loading-pulse: 1.8s;
141
+ --m-motion-loading-stardust: 1.6s;
142
+ --m-motion-loading-circular-rotate: 2s;
143
+ --m-dataview-grid-min: 10rem;
144
+ --m-tree-indent: 0.7rem;
145
+ --m-tree-indent-padding: var(--m-space-3);
146
+ --m-layout-trigger-bar-height: 4.5rem;
147
+ --m-layout-trigger-bar-offset: 1.75rem;
148
+ --m-layout-trigger-bar-width: 2rem;
149
+ --m-layout-trigger-bar-top: 2.25rem;
150
+ --m-timeline-event-min-height: 4rem;
151
+ --m-timeline-marker-size: 1.5rem;
152
+ --m-tag-font-size-small: var(--m-font-size-xs);
153
+ --m-slider-tooltip-offset: 1.5rem;
154
+ --m-slider-tooltip-padding-block: 0.15rem;
155
+ --m-slider-tooltip-padding-inline: 0.4rem;
156
+ --m-rating-star-size-small: 1rem;
157
+ --m-rating-star-size-medium: 1.25rem;
158
+ --m-rating-star-size-large: 1.5rem;
159
+ --m-rating-star-padding: 0.15rem;
160
+ --m-slider-marks-inset: 0.9rem;
161
+ --m-slider-marks-side: 0.5rem;
162
+ --m-stepper-connector-color: var(--m-color-border);
163
+
164
+ /* Table */
165
+ --m-color-fill-light: color-mix(in srgb, var(--m-color-text) 6%, var(--m-color-surface));
166
+ --m-color-fill-lighter: color-mix(in srgb, var(--m-color-text) 3.5%, var(--m-color-surface));
167
+ --m-table-border-color: var(--m-color-split);
168
+ --m-table-header-bg: var(--m-color-fill-light);
169
+ --m-table-header-text: var(--m-color-text);
170
+ --m-table-text: var(--m-color-text);
171
+ --m-table-row-bg: var(--m-color-surface);
172
+ --m-table-row-hover-bg: var(--m-color-fill-light);
173
+ --m-table-row-striped-bg: var(--m-color-fill-lighter);
174
+ --m-table-row-current-bg: color-mix(in srgb, var(--m-color-primary) 10%, var(--m-color-surface));
175
+ --m-table-row-selected-bg: color-mix(in srgb, var(--m-color-primary) 14%, var(--m-color-surface));
176
+ --m-table-expanded-bg: var(--m-color-fill-lighter);
177
+ --m-table-font-size: var(--m-font-size-md);
178
+ --m-table-row-height: 40px;
179
+ --m-table-cell-line-height: 23px;
180
+ --m-table-cell-padding-inline: 12px;
181
+ }
182
+
183
+ :root[data-m-motion="reduced"] {
184
+ --m-motion-fast: 80ms;
185
+ --m-motion-normal: 120ms;
186
+ --m-motion-enter: 100ms;
187
+ --m-motion-exit: 80ms;
188
+ --m-motion-distance: 0;
189
+ /* Looping indicators: keep a short pulse so state is still perceptible */
190
+ --m-motion-spin: 0ms;
191
+ --m-motion-spin-dash: 0ms;
192
+ --m-motion-spin-fast: 0ms;
193
+ --m-motion-spin-medium: 0ms;
194
+ --m-motion-skeleton: 0ms;
195
+ --m-motion-pulse: 0ms;
196
+ --m-motion-scrollbar-show: 160ms;
197
+ --m-motion-scrollbar-hide: 80ms;
198
+ --m-motion-loading-aurora: 0ms;
199
+ --m-motion-loading-bounce: 0ms;
200
+ --m-motion-loading-pulse: 0ms;
201
+ --m-motion-loading-stardust: 0ms;
202
+ --m-motion-loading-circular-rotate: 0ms;
203
+ }
204
+
205
+ :root[data-m-motion="none"] {
206
+ --m-motion-fast: 0ms;
207
+ --m-motion-normal: 0ms;
208
+ --m-motion-enter: 0ms;
209
+ --m-motion-exit: 0ms;
210
+ --m-motion-distance: 0;
211
+ --m-motion-spin: 0ms;
212
+ --m-motion-spin-dash: 0ms;
213
+ --m-motion-spin-fast: 0ms;
214
+ --m-motion-spin-medium: 0ms;
215
+ --m-motion-skeleton: 0ms;
216
+ --m-motion-pulse: 0ms;
217
+ --m-motion-scrollbar-show: 0ms;
218
+ --m-motion-scrollbar-hide: 0ms;
219
+ --m-motion-loading-aurora: 0ms;
220
+ --m-motion-loading-bounce: 0ms;
221
+ --m-motion-loading-pulse: 0ms;
222
+ --m-motion-loading-stardust: 0ms;
223
+ --m-motion-loading-circular-rotate: 0ms;
224
+ }
225
+
226
+ /*
227
+ * Global motion policy (complements per-component rules):
228
+ * - `reduced`: keep short paint transitions; stop loops
229
+ * and layout/transform size animation.
230
+ * - `none`: zero all transition/animation durations.
231
+ */
232
+
233
+ [data-m-motion="reduced"] *,
234
+ [data-m-motion="reduced"] *::before,
235
+ [data-m-motion="reduced"] *::after {
236
+ animation-duration: 0.01ms !important;
237
+ animation-iteration-count: 1 !important;
238
+ transition-property: background-color, border-color, color, opacity, box-shadow, outline,
239
+ fill, stroke, stroke-dashoffset !important;
240
+ }
241
+
242
+ [data-m-motion="none"] *,
243
+ [data-m-motion="none"] *::before,
244
+ [data-m-motion="none"] *::after {
245
+ animation-duration: 0.01ms !important;
246
+ animation-iteration-count: 1 !important;
247
+ transition-duration: 0.01ms !important;
248
+ scroll-behavior: auto !important;
249
+ }
250
+
251
+ /* Off-screen looping indicators (usePauseOffscreen → data-m-anim-paused) */
252
+ [data-m-anim-paused],
253
+ [data-m-anim-paused]::before,
254
+ [data-m-anim-paused]::after,
255
+ [data-m-anim-paused] *,
256
+ [data-m-anim-paused] *::before,
257
+ [data-m-anim-paused] *::after {
258
+ animation-play-state: paused !important;
259
+ }
260
+
261
+ /* Global density: scales spacing + control heights (WD tokens) */
262
+ :root,
263
+ [data-m-density="comfortable"] {
264
+ --m-density-scale: 1;
265
+ --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-2));
266
+ --m-checkbox-control-size: 1.125rem;
267
+ }
268
+
269
+ [data-m-density="compact"] {
270
+ --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-1));
271
+ --m-control-affix-padding: 2.15rem;
272
+ --m-control-affix-gap: 2rem;
273
+ --m-checkbox-control-size: 1rem;
274
+ --m-nav-rail-width: 15rem;
275
+ --m-nav-rail-collapsed-width: 4rem;
276
+ --m-space-1: 0.2rem;
277
+ --m-space-2: 0.4rem;
278
+ --m-space-3: 0.6rem;
279
+ --m-space-4: 0.85rem;
280
+ --m-space-5: 1.05rem;
281
+ --m-space-6: 1.25rem;
282
+ --m-space-8: 1.7rem;
283
+ --m-control-height-small: 24px;
284
+ --m-control-height-medium: 28px;
285
+ --m-control-height-large: 34px;
286
+ --m-control-font-small: 13px;
287
+ --m-control-font-medium: 13px;
288
+ --m-control-font-large: 14px;
289
+ --m-control-padding-x-small: 8px;
290
+ --m-control-padding-x-medium: 10px;
291
+ --m-control-padding-x-large: 12px;
292
+ --m-table-row-height: 36px;
293
+ --m-table-cell-line-height: 20px;
294
+ --m-table-cell-padding-inline: 10px;
295
+ --m-table-font-size: var(--m-font-size-sm);
296
+ }
297
+
298
+ [data-m-density="spacious"] {
299
+ --m-menu-item-height: calc(var(--m-control-height-medium) + var(--m-space-3));
300
+ --m-control-affix-padding: 2.85rem;
301
+ --m-control-affix-gap: 2.65rem;
302
+ --m-checkbox-control-size: 1.25rem;
303
+ --m-nav-rail-width: 18rem;
304
+ --m-nav-rail-collapsed-width: 5.5rem;
305
+ --m-space-1: 0.3rem;
306
+ --m-space-2: 0.6rem;
307
+ --m-space-3: 0.9rem;
308
+ --m-space-4: 1.15rem;
309
+ --m-space-5: 1.45rem;
310
+ --m-space-6: 1.75rem;
311
+ --m-space-8: 2.35rem;
312
+ --m-control-height-small: 32px;
313
+ --m-control-height-medium: 40px;
314
+ --m-control-height-large: 46px;
315
+ --m-control-font-small: 14px;
316
+ --m-control-font-medium: 15px;
317
+ --m-control-font-large: 16px;
318
+ --m-control-padding-x-small: 12px;
319
+ --m-control-padding-x-medium: 14px;
320
+ --m-control-padding-x-large: 16px;
321
+ --m-table-row-height: 48px;
322
+ --m-table-cell-line-height: 26px;
323
+ --m-table-cell-padding-inline: 16px;
324
+ --m-table-font-size: 1rem;
325
+ }
326
+
327
+ [data-m-density="compact"] .m-layout-header {
328
+ --m-layout-header-height: 3rem;
329
+ }
330
+
331
+ [data-m-density="compact"] .m-layout-footer {
332
+ --m-layout-footer-height: 2.5rem;
333
+ }
334
+
335
+ [data-m-density="spacious"] .m-layout-header {
336
+ --m-layout-header-height: 4rem;
337
+ }
338
+
339
+ [data-m-density="spacious"] .m-layout-footer {
340
+ --m-layout-footer-height: 3.5rem;
341
+ }
342
+
343
+ [data-theme="dark"] {
344
+ /* Dark theme solids on dark surfaces (readable mid tones) */
345
+ --m-color-primary: #1668dc;
346
+ --m-color-primary-hover: #3c89e8;
347
+ --m-color-primary-active: #1554ad;
348
+ --m-color-surface: #141414;
349
+ --m-color-text: rgba(255, 255, 255, 0.85);
350
+ --m-color-text-muted: rgba(255, 255, 255, 0.45);
351
+ --m-color-text-disabled: rgba(255, 255, 255, 0.3);
352
+ --m-color-bg-disabled: rgba(255, 255, 255, 0.08);
353
+ --m-color-border: #424242;
354
+ --m-color-split: #303030;
355
+ --m-color-focus-ring: #3c89e8;
356
+ /* Dark: getAlphaColor(color*Bg, colorBgContainer) */
357
+ --m-color-control-outline: rgba(23, 117, 249, 0.31);
358
+ --m-color-control-outline-danger: rgba(249, 75, 78, 0.31);
359
+ --m-color-control-outline-warning: rgba(250, 173, 20, 0.3);
360
+ --m-focus-shadow: 0 0 0 var(--m-focus-outline-width) var(--m-color-control-outline);
361
+ --m-focus-shadow-danger: 0 0 0 var(--m-focus-outline-width)
362
+ var(--m-color-control-outline-danger);
363
+ --m-focus-shadow-warning: 0 0 0 var(--m-focus-outline-width)
364
+ var(--m-color-control-outline-warning);
365
+ /* Mid solids: keep ≥~4.5:1 with --m-color-on-emphasis on dark surfaces */
366
+ --m-color-success: #49aa19;
367
+ --m-color-info: #1668dc;
368
+ --m-color-warning: #d89614;
369
+ --m-color-warn: var(--m-color-warning);
370
+ --m-color-help: #7e22ce;
371
+ --m-color-danger: #dc4446;
372
+ --m-color-contrast: rgba(255, 255, 255, 0.85);
373
+ --m-color-contrast-fg: #141414;
374
+ --m-color-contrast-hover: #f5f5f5;
375
+ --m-color-contrast-active: #d9d9d9;
376
+ --m-overlay-scrim: rgb(0 0 0 / 0.65);
377
+ --m-shadow-sm:
378
+ 0 1px 2px 0 rgb(0 0 0 / 0.16), 0 1px 6px -1px rgb(0 0 0 / 0.12),
379
+ 0 2px 4px 0 rgb(0 0 0 / 0.08);
380
+ --m-shadow-md:
381
+ 0 6px 16px 0 rgb(0 0 0 / 0.32), 0 3px 6px -4px rgb(0 0 0 / 0.48),
382
+ 0 9px 28px 8px rgb(0 0 0 / 0.2);
383
+ --m-shadow-lg:
384
+ 0 6px 16px 0 rgb(0 0 0 / 0.32), 0 3px 6px -4px rgb(0 0 0 / 0.48),
385
+ 0 9px 28px 8px rgb(0 0 0 / 0.2);
386
+ --m-shadow-raised:
387
+ 0 1px 2px -2px rgb(0 0 0 / 0.64), 0 3px 6px 0 rgb(0 0 0 / 0.48),
388
+ 0 5px 12px 4px rgb(0 0 0 / 0.36);
389
+ --m-shadow-sticky: 6px 0 16px -8px rgb(0 0 0 / 0.45);
390
+ --m-shadow-sticky-end: -6px 0 16px -8px rgb(0 0 0 / 0.45);
391
+
392
+ --m-table-border-color: var(--m-color-split);
393
+ --m-color-fill-light: color-mix(in srgb, var(--m-color-text) 10%, var(--m-color-surface));
394
+ --m-color-fill-lighter: color-mix(in srgb, var(--m-color-text) 6%, var(--m-color-surface));
395
+ --m-table-header-bg: var(--m-color-fill-light);
396
+ --m-table-row-bg: var(--m-color-surface);
397
+ --m-table-row-hover-bg: color-mix(in srgb, var(--m-color-text) 8%, var(--m-color-surface));
398
+ --m-table-row-striped-bg: var(--m-color-fill-lighter);
399
+ --m-table-row-current-bg: color-mix(in srgb, var(--m-color-primary) 16%, var(--m-color-surface));
400
+ --m-table-row-selected-bg: color-mix(in srgb, var(--m-color-primary) 20%, var(--m-color-surface));
401
+ --m-table-expanded-bg: var(--m-color-fill-lighter);
402
+ }
403
+
404
+ /* Shared tokens consumption, type, focus, and mixed selectors. */
405
+
406
+ :root {
407
+ /* Shared minimum width for menu-like panels (select/orderlist/picklist) */
408
+ --m-overlay-menu-min-width: 12rem;
409
+ }
410
+
411
+ .m-button,
412
+ .m-input,
413
+ .m-card,
414
+ .m-dialog,
415
+ .m-drawer,
416
+ .m-popover,
417
+ .m-accordion,
418
+ .m-scrollbar,
419
+ .m-panel,
420
+ .m-fieldset,
421
+ .m-flex,
422
+ .m-space,
423
+ .m-grid,
424
+ .m-layout,
425
+ .m-layout-header,
426
+ .m-layout-footer,
427
+ .m-layout-sider,
428
+ .m-splitter,
429
+ .m-stepper,
430
+ .m-toolbar,
431
+ .m-page-content,
432
+ .m-page-header,
433
+ .m-page-toolbar,
434
+ .m-menu,
435
+ .m-menubar,
436
+ .m-contextmenu,
437
+ .m-tieredmenu,
438
+ .m-dropdown,
439
+ .m-breadcrumb,
440
+ .m-tabs,
441
+ .m-datepicker,
442
+ .m-listbox,
443
+ .m-togglebutton,
444
+ .m-select,
445
+ .m-textarea,
446
+ .m-selectbutton,
447
+ .m-inputotp,
448
+ .m-knob,
449
+ .m-autocomplete,
450
+ .m-splitbutton,
451
+ .m-tree,
452
+ .m-timeline,
453
+ .m-dataview,
454
+ .m-confirmpopup,
455
+ .m-scrolltop,
456
+ .m-blockui,
457
+ .m-inplace,
458
+ .m-message,
459
+ .m-toast,
460
+ .m-tooltip,
461
+ .m-empty,
462
+ .m-result,
463
+ .m-progress-spinner,
464
+ .m-cascadeselect,
465
+ .m-treeselect,
466
+ .m-colorpicker,
467
+ .m-inputtags,
468
+ .m-label,
469
+ .m-speeddial,
470
+ .m-orderlist,
471
+ .m-picklist,
472
+ .m-virtualscroller,
473
+ .m-megamenu,
474
+ .m-dock,
475
+ .m-sidebar,
476
+ .m-commandmenu,
477
+ .m-fileupload,
478
+ .m-carousel,
479
+ .m-gallery,
480
+ .m-metergroup,
481
+ .m-fluid,
482
+ .m-terminal {
483
+ font-family: var(--m-font-sans);
484
+ box-sizing: border-box;
485
+ }
486
+
487
+ .m-input:disabled,
488
+ .m-textarea:disabled,
489
+ .m-password__input:disabled,
490
+ .m-inputnumber__input:disabled,
491
+ .m-inputotp__input:disabled,
492
+ .m-colorpicker__trigger:disabled,
493
+ .m-inputtags--disabled {
494
+ background-color: var(--m-color-bg-disabled);
495
+ color: var(--m-color-text-disabled);
496
+ cursor: not-allowed;
497
+ opacity: 1;
498
+ }
499
+
500
+ .m-input-field__control--prefixed .m-input:disabled,
501
+ .m-input-field__control--suffixed .m-input:disabled,
502
+ .m-input-field__control--clearable .m-input:disabled,
503
+ .m-password--disabled .m-password__input,
504
+ .m-inputnumber--disabled .m-inputnumber__input,
505
+ .m-datepicker--disabled .m-datepicker__input,
506
+ .m-icon-field--anchored .m-input:disabled,
507
+ .m-icon-field--anchored .m-textarea:disabled {
508
+ opacity: 1;
509
+ }
510
+
511
+ .m-input::placeholder,
512
+ .m-textarea::placeholder,
513
+ .m-password__input::placeholder,
514
+ .m-inputnumber__input::placeholder,
515
+ .m-inputtags__input::placeholder {
516
+ color: var(--m-color-text-muted);
517
+ opacity: 1;
518
+ }
519
+
520
+ .m-input-field__meta,
521
+ .m-textarea-field__meta,
522
+ .m-password-field__meta {
523
+ align-items: baseline;
524
+ display: flex;
525
+ gap: var(--m-space-2);
526
+ justify-content: space-between;
527
+ }
528
+
529
+ .m-input-field__meta:not(:has(.m-input-field__help)),
530
+ .m-textarea-field__meta:not(:has(.m-textarea-field__help)),
531
+ .m-password-field__meta:not(:has(.m-password__feedback)) {
532
+ justify-content: flex-end;
533
+ }
534
+
535
+ .m-input-field__count,
536
+ .m-textarea-field__count,
537
+ .m-password-field__count {
538
+ color: var(--m-color-text-muted);
539
+ flex: 0 0 auto;
540
+ font-size: var(--m-font-size-xs);
541
+ margin-left: auto;
542
+ }
543
+
544
+ .m-dropdown__item--parent {
545
+ align-items: center;
546
+ display: flex;
547
+ justify-content: space-between;
548
+ width: 100%;
549
+ }
550
+
551
+ .m-dropdown__icon,
552
+ .m-dropdown__caret,
553
+ .m-menu__icon,
554
+ .m-menubar__icon {
555
+ flex-shrink: 0;
556
+ }
557
+
558
+ .m-dropdown__submenu-wrap {
559
+ position: relative;
560
+ }
561
+
562
+ .m-dropdown__submenu {
563
+ --m-dropdown-submenu-max-height: min(18rem, 45vh);
564
+ background: var(--m-color-surface);
565
+ border: var(--m-border-width) solid var(--m-color-border);
566
+ border-radius: var(--m-radius-md);
567
+ box-shadow: var(--m-shadow-md);
568
+ max-height: var(--m-dropdown-submenu-max-height);
569
+ max-width: calc(100vw - 2 * var(--m-space-4));
570
+ min-width: 10rem;
571
+ overflow: hidden;
572
+ padding: var(--m-space-1);
573
+ /* Same as .m-dropdown__menu: size to content instead of being clamped
574
+ by the space left of the anchor in the viewport. */
575
+ width: max-content;
576
+ }
577
+
578
+ .m-dropdown__submenu--teleported {
579
+ position: fixed;
580
+ z-index: var(--m-z-dropdown);
581
+ }
582
+
583
+ .m-dropdown__submenu-scroll {
584
+ max-height: calc(var(--m-dropdown-submenu-max-height) - var(--m-space-2));
585
+ min-height: 0;
586
+ }
587
+
588
+ .m-dropdown__submenu-view {
589
+ display: grid;
590
+ gap: var(--m-space-1);
591
+ }
592
+
593
+ .m-fade-enter-active,
594
+ .m-fade-leave-active {
595
+ transition: opacity var(--m-motion-exit) var(--m-motion-ease);
596
+ }
597
+
598
+ .m-fade-enter-from,
599
+ .m-fade-leave-to {
600
+ opacity: 0;
601
+ }
602
+
603
+ .m-scale-fade-enter-active {
604
+ transition:
605
+ opacity var(--m-motion-enter) var(--m-motion-ease),
606
+ transform var(--m-motion-enter) var(--m-motion-ease);
607
+ }
608
+
609
+ .m-scale-fade-leave-active {
610
+ transition:
611
+ opacity var(--m-motion-exit) var(--m-motion-ease),
612
+ transform var(--m-motion-exit) var(--m-motion-ease);
613
+ }
614
+
615
+ .m-scale-fade-enter-from,
616
+ .m-scale-fade-leave-to {
617
+ opacity: 0;
618
+ transform: translateY(calc(var(--m-motion-distance) * -1)) scale(0.96);
619
+ }
620
+
621
+ .m-slide-fade-enter-active {
622
+ transition:
623
+ opacity var(--m-motion-enter) var(--m-motion-ease),
624
+ transform var(--m-motion-enter) var(--m-motion-ease);
625
+ }
626
+
627
+ .m-slide-fade-leave-active {
628
+ transition:
629
+ opacity var(--m-motion-exit) var(--m-motion-ease),
630
+ transform var(--m-motion-exit) var(--m-motion-ease);
631
+ }
632
+
633
+ .m-slide-fade-enter-from,
634
+ .m-slide-fade-leave-to {
635
+ opacity: 0;
636
+ transform: translateY(calc(var(--m-motion-distance) * -1));
637
+ }
638
+
639
+ /* Generic center zoom (opacity + scale on the transitioning root) */
640
+ .m-zoom-enter-active {
641
+ transition:
642
+ opacity var(--m-motion-enter) var(--m-motion-ease),
643
+ transform var(--m-motion-enter) var(--m-motion-ease);
644
+ }
645
+
646
+ .m-zoom-leave-active {
647
+ transition:
648
+ opacity var(--m-motion-exit) var(--m-motion-ease),
649
+ transform var(--m-motion-exit) var(--m-motion-ease);
650
+ }
651
+
652
+ .m-zoom-enter-from,
653
+ .m-zoom-leave-to {
654
+ opacity: 0;
655
+ transform: scale(0.95);
656
+ }
657
+
658
+ .m-slide-up-enter-active,
659
+ .m-slide-down-enter-active,
660
+ .m-slide-left-enter-active,
661
+ .m-slide-right-enter-active {
662
+ transition:
663
+ opacity var(--m-motion-enter) var(--m-motion-ease),
664
+ transform var(--m-motion-enter) var(--m-motion-ease);
665
+ }
666
+
667
+ .m-slide-up-leave-active,
668
+ .m-slide-down-leave-active,
669
+ .m-slide-left-leave-active,
670
+ .m-slide-right-leave-active {
671
+ transition:
672
+ opacity var(--m-motion-exit) var(--m-motion-ease),
673
+ transform var(--m-motion-exit) var(--m-motion-ease);
674
+ }
675
+
676
+ .m-slide-up-enter-from,
677
+ .m-slide-up-leave-to {
678
+ opacity: 0;
679
+ transform: translateY(var(--m-motion-distance));
680
+ }
681
+
682
+ .m-slide-down-enter-from,
683
+ .m-slide-down-leave-to {
684
+ opacity: 0;
685
+ transform: translateY(calc(var(--m-motion-distance) * -1));
686
+ }
687
+
688
+ .m-slide-left-enter-from,
689
+ .m-slide-left-leave-to {
690
+ opacity: 0;
691
+ transform: translateX(var(--m-motion-distance));
692
+ }
693
+
694
+ .m-slide-right-enter-from,
695
+ .m-slide-right-leave-to {
696
+ opacity: 0;
697
+ transform: translateX(calc(var(--m-motion-distance) * -1));
698
+ }
699
+
700
+ [data-m-motion="reduced"] .m-fade-enter-active,
701
+ [data-m-motion="reduced"] .m-fade-leave-active,
702
+ [data-m-motion="reduced"] .m-scale-fade-enter-active,
703
+ [data-m-motion="reduced"] .m-scale-fade-leave-active,
704
+ [data-m-motion="reduced"] .m-slide-fade-enter-active,
705
+ [data-m-motion="reduced"] .m-slide-fade-leave-active,
706
+ [data-m-motion="reduced"] .m-zoom-enter-active,
707
+ [data-m-motion="reduced"] .m-zoom-leave-active,
708
+ [data-m-motion="reduced"] .m-slide-up-enter-active,
709
+ [data-m-motion="reduced"] .m-slide-up-leave-active,
710
+ [data-m-motion="reduced"] .m-slide-down-enter-active,
711
+ [data-m-motion="reduced"] .m-slide-down-leave-active,
712
+ [data-m-motion="reduced"] .m-slide-left-enter-active,
713
+ [data-m-motion="reduced"] .m-slide-left-leave-active,
714
+ [data-m-motion="reduced"] .m-slide-right-enter-active,
715
+ [data-m-motion="reduced"] .m-slide-right-leave-active,
716
+ [data-m-motion="none"] .m-fade-enter-active,
717
+ [data-m-motion="none"] .m-fade-leave-active,
718
+ [data-m-motion="none"] .m-scale-fade-enter-active,
719
+ [data-m-motion="none"] .m-scale-fade-leave-active,
720
+ [data-m-motion="none"] .m-slide-fade-enter-active,
721
+ [data-m-motion="none"] .m-slide-fade-leave-active,
722
+ [data-m-motion="none"] .m-zoom-enter-active,
723
+ [data-m-motion="none"] .m-zoom-leave-active,
724
+ [data-m-motion="none"] .m-slide-up-enter-active,
725
+ [data-m-motion="none"] .m-slide-up-leave-active,
726
+ [data-m-motion="none"] .m-slide-down-enter-active,
727
+ [data-m-motion="none"] .m-slide-down-leave-active,
728
+ [data-m-motion="none"] .m-slide-left-enter-active,
729
+ [data-m-motion="none"] .m-slide-left-leave-active,
730
+ [data-m-motion="none"] .m-slide-right-enter-active,
731
+ [data-m-motion="none"] .m-slide-right-leave-active {
732
+ transition: none;
733
+ }
734
+
735
+ [data-m-motion="reduced"] .m-scale-fade-enter-from,
736
+ [data-m-motion="reduced"] .m-scale-fade-leave-to,
737
+ [data-m-motion="reduced"] .m-slide-fade-enter-from,
738
+ [data-m-motion="reduced"] .m-slide-fade-leave-to,
739
+ [data-m-motion="reduced"] .m-zoom-enter-from,
740
+ [data-m-motion="reduced"] .m-zoom-leave-to,
741
+ [data-m-motion="reduced"] .m-slide-up-enter-from,
742
+ [data-m-motion="reduced"] .m-slide-up-leave-to,
743
+ [data-m-motion="reduced"] .m-slide-down-enter-from,
744
+ [data-m-motion="reduced"] .m-slide-down-leave-to,
745
+ [data-m-motion="reduced"] .m-slide-left-enter-from,
746
+ [data-m-motion="reduced"] .m-slide-left-leave-to,
747
+ [data-m-motion="reduced"] .m-slide-right-enter-from,
748
+ [data-m-motion="reduced"] .m-slide-right-leave-to,
749
+ [data-m-motion="none"] .m-scale-fade-enter-from,
750
+ [data-m-motion="none"] .m-scale-fade-leave-to,
751
+ [data-m-motion="none"] .m-slide-fade-enter-from,
752
+ [data-m-motion="none"] .m-slide-fade-leave-to,
753
+ [data-m-motion="none"] .m-zoom-enter-from,
754
+ [data-m-motion="none"] .m-zoom-leave-to,
755
+ [data-m-motion="none"] .m-slide-up-enter-from,
756
+ [data-m-motion="none"] .m-slide-up-leave-to,
757
+ [data-m-motion="none"] .m-slide-down-enter-from,
758
+ [data-m-motion="none"] .m-slide-down-leave-to,
759
+ [data-m-motion="none"] .m-slide-left-enter-from,
760
+ [data-m-motion="none"] .m-slide-left-leave-to,
761
+ [data-m-motion="none"] .m-slide-right-enter-from,
762
+ [data-m-motion="none"] .m-slide-right-leave-to {
763
+ transform: none;
764
+ }
765
+
766
+ /* Shared loading spinner rotation (ProgressSpinner, Switch, ProgressBar, AutoComplete) */
767
+ @keyframes m-progress-spinner-rotate {
768
+ 100% {
769
+ transform: rotate(360deg);
770
+ }
771
+ }
772
+
773
+ .m-checkbox,
774
+ .m-radio,
775
+ .m-switch {
776
+ align-items: center;
777
+ color: var(--m-color-text);
778
+ cursor: pointer;
779
+ display: inline-flex;
780
+ font-family: var(--m-font-sans);
781
+ gap: var(--m-space-2);
782
+ /* 与输入框圆角保持一致,配合 MScrollbar 使用 */
783
+ position: relative;
784
+ }
785
+
786
+ .m-checkbox--disabled,
787
+ .m-radio--disabled,
788
+ .m-switch--disabled {
789
+ color: var(--m-color-text-disabled);
790
+ cursor: not-allowed;
791
+ opacity: 1;
792
+ }
793
+
794
+ .m-checkbox--invalid .m-checkbox__control,
795
+ .m-radio--invalid .m-radio__control {
796
+ border-color: var(--m-color-danger);
797
+ }
798
+
799
+ .m-checkbox__input,
800
+ .m-radio__input,
801
+ .m-switch__input {
802
+ clip: rect(0, 0, 0, 0);
803
+ clip-path: inset(50%);
804
+ height: 1px;
805
+ margin: -1px;
806
+ overflow: hidden;
807
+ opacity: 0;
808
+ position: absolute;
809
+ white-space: nowrap;
810
+ width: 1px;
811
+ }
812
+
813
+ .m-checkbox__control,
814
+ .m-radio__control {
815
+ align-items: center;
816
+ background: var(--m-color-surface);
817
+ border: var(--m-border-width) solid var(--m-color-border);
818
+ display: inline-flex;
819
+ flex: 0 0 auto;
820
+ height: var(--m-checkbox-control-size, 1.125rem);
821
+ justify-content: center;
822
+ transition:
823
+ background-color var(--m-motion-fast) var(--m-motion-ease),
824
+ border-color var(--m-motion-fast) var(--m-motion-ease),
825
+ box-shadow var(--m-motion-fast) var(--m-motion-ease);
826
+ width: var(--m-checkbox-control-size, 1.125rem);
827
+ }
828
+
829
+ .m-checkbox__input:checked + .m-checkbox__control,
830
+ .m-radio__input:checked + .m-radio__control {
831
+ background: var(--m-color-primary);
832
+ border-color: var(--m-color-primary);
833
+ }
834
+
835
+ .m-checkbox:not(.m-checkbox--disabled):hover .m-checkbox__control,
836
+ .m-radio:not(.m-radio--disabled):hover .m-radio__control {
837
+ border-color: color-mix(in srgb, var(--m-color-primary) 45%, var(--m-color-border));
838
+ }
839
+
840
+ .m-checkbox__input:focus-visible + .m-checkbox__control,
841
+ .m-radio__input:focus-visible + .m-radio__control,
842
+ .m-switch__input:focus-visible + .m-switch__track {
843
+ box-shadow: var(--m-focus-shadow);
844
+ outline: none;
845
+ }
846
+
847
+ .m-checkbox__label,
848
+ .m-radio__label,
849
+ .m-switch__label {
850
+ font-size: var(--m-font-size-md);
851
+ }
852
+
853
+ .m-textarea-field,
854
+ .m-select-field {
855
+ display: grid;
856
+ font-family: var(--m-font-sans);
857
+ gap: var(--m-space-2);
858
+ max-width: 100%;
859
+ position: relative;
860
+ }
861
+
862
+ .m-textarea-field--fluid,
863
+ .m-select-field--fluid {
864
+ width: 100%;
865
+ }
866
+
867
+ .m-textarea-field__label,
868
+ .m-select-field__label {
869
+ color: var(--m-color-text);
870
+ font-family: var(--m-font-sans);
871
+ font-size: var(--m-font-size-md);
872
+ font-weight: 500;
873
+ }
874
+
875
+ .m-textarea-field__help,
876
+ .m-select-field__help {
877
+ color: var(--m-color-text-muted);
878
+ font-size: var(--m-font-size-xs);
879
+ }
880
+
881
+ .m-textarea-field__help--invalid,
882
+ .m-select-field__help--invalid {
883
+ color: var(--m-color-danger);
884
+ }
885
+
886
+ .m-textarea,
887
+ .m-select {
888
+ background: var(--m-color-surface);
889
+ border: var(--m-border-width) solid var(--m-color-border);
890
+ border-radius: var(--m-radius-control);
891
+ color: var(--m-color-text);
892
+ font: inherit;
893
+ transition:
894
+ border-color var(--m-motion-fast) var(--m-motion-ease),
895
+ box-shadow var(--m-motion-fast) var(--m-motion-ease),
896
+ background-color var(--m-motion-fast) var(--m-motion-ease);
897
+ width: 100%;
898
+ }
899
+
900
+ .m-textarea--invalid:focus,
901
+ .m-textarea--invalid:focus-visible,
902
+ .m-select--invalid.m-select--open,
903
+ .m-select--invalid:focus,
904
+ .m-select--invalid:focus-visible {
905
+ border-color: var(--m-color-danger);
906
+ box-shadow: var(--m-focus-shadow-danger);
907
+ }
908
+
909
+ .m-textarea:disabled,
910
+ .m-select:disabled,
911
+ .m-select--disabled {
912
+ background-color: var(--m-color-bg-disabled);
913
+ color: var(--m-color-text-disabled);
914
+ cursor: not-allowed;
915
+ opacity: 1;
916
+ }
917
+
918
+ .m-inputgroup > .m-input,
919
+ .m-inputgroup > .m-input-field,
920
+ .m-inputgroup > .m-password-field,
921
+ .m-inputgroup > .m-inputnumber-field {
922
+ flex: 1 1 auto;
923
+ min-width: 0;
924
+ }
925
+
926
+ .m-inputgroup > .m-input-field,
927
+ .m-inputgroup > .m-password-field,
928
+ .m-inputgroup > .m-inputnumber-field {
929
+ display: flex;
930
+ flex-direction: column;
931
+ gap: 0;
932
+ }
933
+
934
+ .m-inputgroup > .m-input,
935
+ .m-inputgroup .m-input,
936
+ .m-inputgroup .m-password,
937
+ .m-inputgroup .m-inputnumber__input-wrap,
938
+ .m-inputgroup .m-input-field__control--prefixed,
939
+ .m-inputgroup .m-input-field__control--suffixed,
940
+ .m-inputgroup .m-input-field__control--clearable {
941
+ border-radius: 0;
942
+ width: 100%;
943
+ }
944
+
945
+ .m-inputgroup > :first-child.m-input,
946
+ .m-inputgroup > :first-child .m-input,
947
+ .m-inputgroup > :first-child .m-password,
948
+ .m-inputgroup > :first-child .m-inputnumber__input-wrap,
949
+ .m-inputgroup > :first-child .m-input-field__control--prefixed,
950
+ .m-inputgroup > :first-child .m-input-field__control--suffixed,
951
+ .m-inputgroup > :first-child .m-input-field__control--clearable,
952
+ .m-inputgroup > :first-child.m-inputgroup-addon {
953
+ border-bottom-left-radius: var(--m-radius-control);
954
+ border-top-left-radius: var(--m-radius-control);
955
+ }
956
+
957
+ .m-inputgroup > :last-child.m-input,
958
+ .m-inputgroup > :last-child .m-input,
959
+ .m-inputgroup > :last-child .m-password,
960
+ .m-inputgroup > :last-child .m-inputnumber__input-wrap,
961
+ .m-inputgroup > :last-child .m-input-field__control--prefixed,
962
+ .m-inputgroup > :last-child .m-input-field__control--suffixed,
963
+ .m-inputgroup > :last-child .m-input-field__control--clearable,
964
+ .m-inputgroup > :last-child.m-inputgroup-addon {
965
+ border-bottom-right-radius: var(--m-radius-control);
966
+ border-top-right-radius: var(--m-radius-control);
967
+ }
968
+
969
+ .m-inputgroup > .m-inputgroup-addon + .m-input,
970
+ .m-inputgroup > .m-inputgroup-addon + .m-input-field .m-input,
971
+ .m-inputgroup > .m-input + .m-inputgroup-addon,
972
+ .m-inputgroup > .m-input-field + .m-inputgroup-addon {
973
+ margin-left: calc(var(--m-border-width) * -1);
974
+ }
975
+
976
+ .m-layout__scrollbar > .m-scrollbar__wrap {
977
+ height: 100%;
978
+ overflow-x: hidden;
979
+ }
980
+
981
+ .m-layout-sider__scrollbar > .m-scrollbar__wrap {
982
+ height: 100%;
983
+ overflow-x: hidden;
984
+ }
985
+
986
+ .m-terminal__scrollbar > .m-scrollbar__wrap {
987
+ height: 100%;
988
+ overflow-x: hidden;
989
+ }
990
+
991
+ .m-scroll-body.m-scrollbar {
992
+ min-height: 0;
993
+ min-width: 0;
994
+ }
995
+
996
+ /* fit-content scroll wrappers: grow with content; max-height only clips when set on the wrapper */
997
+ .m-scrollbar--fit-content.m-scrollbar--fill:not(.m-layout__scrollbar):not(.m-layout-sider__scrollbar):not(.m-scroll-body) {
998
+ width: 100%;
999
+ }
1000
+
1001
+ .m-scrollbar--fit-content.m-scrollbar--fill:not(.m-layout__scrollbar):not(.m-layout-sider__scrollbar):not(.m-scroll-body) .m-scrollbar__wrap {
1002
+ overflow: auto;
1003
+ }
1004
+
1005
+ .m-orderlist__btn,
1006
+ .m-picklist__btn {
1007
+ align-items: center;
1008
+ background: var(--m-color-surface);
1009
+ border: var(--m-border-width) solid var(--m-color-border);
1010
+ border-radius: var(--m-radius-sm);
1011
+ color: var(--m-color-text);
1012
+ cursor: pointer;
1013
+ display: inline-flex;
1014
+ font: inherit;
1015
+ gap: 0;
1016
+ justify-content: center;
1017
+ min-height: var(--m-control-height-small, 1.75rem);
1018
+ min-width: var(--m-control-affix-size);
1019
+ padding: var(--m-space-1) var(--m-space-2);
1020
+ }
1021
+
1022
+ .m-orderlist__btn:hover:not(:disabled),
1023
+ .m-picklist__btn:hover:not(:disabled) {
1024
+ border-color: var(--m-color-primary);
1025
+ color: var(--m-color-primary);
1026
+ }
1027
+
1028
+ .m-orderlist__btn:disabled,
1029
+ .m-picklist__btn:disabled {
1030
+ cursor: not-allowed;
1031
+ opacity: var(--m-opacity-disabled);
1032
+ }
1033
+
1034
+ .m-orderlist__btn:focus-visible,
1035
+ .m-picklist__btn:focus-visible {
1036
+ border-color: var(--m-color-primary);
1037
+ box-shadow: var(--m-focus-shadow);
1038
+ outline: none;
1039
+ }
1040
+
1041
+ .m-picklist__btn .m-icon + .m-icon {
1042
+ margin-left: -0.35rem;
1043
+ }
1044
+
1045
+ .m-orderlist__scrollbar,
1046
+ .m-picklist__scrollbar {
1047
+ flex: 1;
1048
+ max-height: 16rem;
1049
+ min-height: 12rem;
1050
+ min-width: var(--m-overlay-menu-min-width);
1051
+ }
1052
+
1053
+ .m-orderlist__list,
1054
+ .m-picklist__list {
1055
+ background: var(--m-color-surface);
1056
+ border: var(--m-border-width) solid var(--m-color-border);
1057
+ border-radius: var(--m-radius-md);
1058
+ padding: var(--m-space-1);
1059
+ }
1060
+
1061
+ .m-orderlist__options,
1062
+ .m-picklist__options {
1063
+ list-style: none;
1064
+ margin: 0;
1065
+ padding: 0;
1066
+ }
1067
+
1068
+ .m-orderlist__item,
1069
+ .m-picklist__item {
1070
+ border-radius: var(--m-radius-sm);
1071
+ cursor: pointer;
1072
+ padding: var(--m-space-2) var(--m-space-3);
1073
+ }
1074
+
1075
+ .m-orderlist__item:hover,
1076
+ .m-picklist__item:hover {
1077
+ background: color-mix(in srgb, var(--m-color-primary) 8%, var(--m-color-surface));
1078
+ }
1079
+
1080
+ .m-orderlist__item:focus-visible,
1081
+ .m-picklist__item:focus-visible {
1082
+ box-shadow: var(--m-focus-shadow);
1083
+ outline: none;
1084
+ }
1085
+
1086
+ .m-orderlist__item--selected,
1087
+ .m-picklist__item--selected {
1088
+ background: color-mix(in srgb, var(--m-color-primary) 14%, var(--m-color-surface));
1089
+ color: var(--m-color-primary);
1090
+ font-weight: 500;
1091
+ }
1092
+
1093
+ .m-carousel__nav,
1094
+ .m-gallery__nav {
1095
+ background: var(--m-color-surface);
1096
+ border: var(--m-border-width) solid var(--m-color-border);
1097
+ border-radius: var(--m-radius-full, 999px);
1098
+ color: var(--m-color-text);
1099
+ cursor: pointer;
1100
+ flex: 0 0 auto;
1101
+ font: inherit;
1102
+ height: var(--m-control-affix-size);
1103
+ width: var(--m-control-affix-size);
1104
+ }
1105
+
1106
+ .m-carousel__nav:disabled,
1107
+ .m-gallery__nav:disabled {
1108
+ cursor: not-allowed;
1109
+ opacity: var(--m-opacity-disabled);
1110
+ }
1111
+
1112
+ /* Shared hover/focus for remaining form triggers */
1113
+ .m-inputotp__input:hover:not(:disabled):not(:focus),
1114
+ .m-cascadeselect:not(.m-cascadeselect--open)
1115
+ .m-cascadeselect__trigger:hover:not(:disabled):not(:focus):not(:focus-visible),
1116
+ .m-treeselect:not(.m-treeselect--open)
1117
+ .m-treeselect__trigger:hover:not(:disabled):not(:focus):not(:focus-visible),
1118
+ .m-inputtags:hover:not(.m-inputtags--disabled):not(:focus-within),
1119
+ .m-togglebutton:hover:not(:disabled):not(.m-togglebutton--checked):not(:focus-visible),
1120
+ .m-inplace__display:hover:not(:focus-visible) {
1121
+ border-color: var(--m-color-primary-hover);
1122
+ }
1123
+
1124
+ .m-inputotp__input:focus,
1125
+ .m-inputotp__input:focus-visible,
1126
+ .m-cascadeselect--open .m-cascadeselect__trigger,
1127
+ .m-cascadeselect__trigger:focus,
1128
+ .m-cascadeselect__trigger:focus-visible,
1129
+ .m-treeselect--open .m-treeselect__trigger,
1130
+ .m-treeselect__trigger:focus,
1131
+ .m-treeselect__trigger:focus-visible,
1132
+ .m-inputtags:focus-within,
1133
+ .m-togglebutton:focus-visible,
1134
+ .m-selectbutton__button:focus-visible,
1135
+ .m-splitbutton__main:focus-visible,
1136
+ .m-splitbutton__trigger:focus-visible,
1137
+ .m-inplace__display:focus-visible,
1138
+ .m-pagination__button:focus-visible {
1139
+ border-color: var(--m-color-primary);
1140
+ box-shadow: var(--m-focus-shadow);
1141
+ outline: none;
1142
+ }
1143
+
1144
+ .m-inputotp--invalid .m-inputotp__input:focus,
1145
+ .m-inputotp--invalid .m-inputotp__input:focus-visible,
1146
+ .m-inputtags--invalid:focus-within {
1147
+ border-color: var(--m-color-danger);
1148
+ box-shadow: var(--m-focus-shadow-danger);
1149
+ }
1150
+
1151
+ .m-checkbox-group,
1152
+ .m-radio-group {
1153
+ display: flex;
1154
+ flex-wrap: wrap;
1155
+ gap: var(--m-space-3);
1156
+ }
1157
+
1158
+ .m-checkbox--small .m-checkbox__control,
1159
+ .m-radio--small .m-radio__control {
1160
+ height: 0.95rem;
1161
+ width: 0.95rem;
1162
+ }
1163
+
1164
+ .m-checkbox--large .m-checkbox__control,
1165
+ .m-radio--large .m-radio__control {
1166
+ height: 1.35rem;
1167
+ width: 1.35rem;
1168
+ }
1169
+
1170
+ .m-inputnumber__clear,
1171
+ .m-autocomplete__clear {
1172
+ background: transparent;
1173
+ border: 0;
1174
+ color: var(--m-color-text-muted);
1175
+ cursor: pointer;
1176
+ font: inherit;
1177
+ line-height: 1;
1178
+ }
1179
+
1180
+ [data-m-motion="none"] *,
1181
+ [data-m-motion="none"] *::before,
1182
+ [data-m-motion="none"] *::after {
1183
+ animation-duration: 0.01ms !important;
1184
+ animation-iteration-count: 1 !important;
1185
+ scroll-behavior: auto !important;
1186
+ transition-duration: 0.01ms !important;
1187
+ }
1188
+
1189
+ [data-m-motion="reduced"] .m-progress-spinner,
1190
+ [data-m-motion="reduced"] .m-progress-spinner__circle,
1191
+ [data-m-motion="reduced"] .m-skeleton,
1192
+ [data-m-motion="reduced"] .m-badge--processing,
1193
+ [data-m-motion="reduced"] .m-icon--spin,
1194
+ [data-m-motion="reduced"] .m-button__spinner,
1195
+ [data-m-motion="reduced"] .m-select__loading-icon,
1196
+ [data-m-motion="reduced"] .m-switch__loading-icon {
1197
+ animation: none !important;
1198
+ }
1199
+
1200
+ .m-button {
1201
+ /* Geometry */
1202
+ --m-button-radius: var(--m-radius-control);
1203
+ --m-button-border-width: var(--m-border-width);
1204
+ --m-button-gap: var(--m-space-2);
1205
+ --m-button-font-weight: var(--m-font-weight);
1206
+ --m-button-font-size: var(--m-control-font-medium);
1207
+ --m-button-height: var(--m-control-height-medium);
1208
+ --m-button-padding-x: var(--m-button-padding-x-medium);
1209
+ --m-button-padding-x-small: var(--m-control-padding-x-small);
1210
+ --m-button-padding-x-medium: calc(
1211
+ var(--m-control-padding-x-medium) + var(--m-space-1)
1212
+ );
1213
+ --m-button-padding-x-large: calc(
1214
+ var(--m-control-padding-x-large) + var(--m-space-1)
1215
+ );
1216
+ --m-button-padding-x-round-extra: var(--m-space-2);
1217
+
1218
+ /* Icon / spinner */
1219
+ --m-button-icon-size: 1rem;
1220
+ --m-button-icon-size-small: 0.875rem;
1221
+ --m-button-icon-size-large: 1.25rem;
1222
+ --m-button-spinner-size: 0.875rem;
1223
+ --m-button-spinner-border-width: 2px;
1224
+ --m-button-cn-letter-spacing: 0.3em;
1225
+
1226
+ /* Soft fill opacities (theme-adaptive via surface mix) */
1227
+ --m-button-fill-opacity: 10%;
1228
+ --m-button-fill-opacity-hover: 16%;
1229
+ --m-button-fill-opacity-active: 22%;
1230
+ --m-button-fill-opacity-muted: 6%;
1231
+ --m-button-fill-opacity-muted-hover: 10%;
1232
+ --m-button-fill-opacity-muted-active: 14%;
1233
+
1234
+ /* Interaction */
1235
+ --m-button-loading-opacity: 0.72;
1236
+ --m-button-press-scale: 0.97;
1237
+ --m-button-press-duration: 160ms;
1238
+ --m-button-ripple-duration: 560ms;
1239
+ --m-button-ripple-opacity-start: 0.42;
1240
+ --m-button-ripple-opacity-mid: 0.22;
1241
+ --m-button-ghost-hover-opacity: 80%;
1242
+
1243
+ /* Color axis defaults (overridden by --color-*) */
1244
+ --m-button-color-base: var(--m-color-primary);
1245
+ --m-button-color-hover: var(--m-color-primary-hover);
1246
+ --m-button-color-active: var(--m-color-primary-active);
1247
+ --m-button-color-light: color-mix(
1248
+ in srgb,
1249
+ var(--m-button-color-base) var(--m-button-fill-opacity),
1250
+ var(--m-color-surface)
1251
+ );
1252
+ --m-button-color-light-hover: color-mix(
1253
+ in srgb,
1254
+ var(--m-button-color-base) var(--m-button-fill-opacity-hover),
1255
+ var(--m-color-surface)
1256
+ );
1257
+ --m-button-color-light-active: color-mix(
1258
+ in srgb,
1259
+ var(--m-button-color-base) var(--m-button-fill-opacity-active),
1260
+ var(--m-color-surface)
1261
+ );
1262
+ --m-button-on-color: var(--m-color-on-emphasis);
1263
+
1264
+ /* Variant surface vars */
1265
+ --m-button-bg: var(--m-color-surface);
1266
+ --m-button-fg: var(--m-color-text);
1267
+ --m-button-border: var(--m-color-border);
1268
+ --m-button-hover-bg: var(--m-button-bg);
1269
+ --m-button-hover-fg: var(--m-button-fg);
1270
+ --m-button-hover-border: var(--m-button-border);
1271
+ --m-button-active-bg: var(--m-button-bg);
1272
+ --m-button-border-style: solid;
1273
+
1274
+ --m-button-active-fg: var(--m-button-fg);
1275
+ --m-button-active-border: var(--m-button-border);
1276
+
1277
+ align-items: center;
1278
+ background: var(--m-button-bg);
1279
+ border: var(--m-button-border-width) var(--m-button-border-style)
1280
+ var(--m-button-border);
1281
+ border-radius: var(--m-button-radius);
1282
+ color: var(--m-button-fg);
1283
+ cursor: pointer;
1284
+ display: inline-flex;
1285
+ flex-direction: row;
1286
+ font-family: var(--m-font-sans);
1287
+ font-size: var(--m-button-font-size);
1288
+ font-weight: var(--m-button-font-weight);
1289
+ gap: var(--m-button-gap);
1290
+ justify-content: center;
1291
+ line-height: 1;
1292
+ min-height: var(--m-button-height);
1293
+ padding: 0 var(--m-button-padding-x);
1294
+ position: relative;
1295
+ text-decoration: none;
1296
+ touch-action: manipulation;
1297
+ transition:
1298
+ background-color var(--m-motion-fast) var(--m-motion-ease),
1299
+ border-color var(--m-motion-fast) var(--m-motion-ease),
1300
+ color var(--m-motion-fast) var(--m-motion-ease),
1301
+ box-shadow var(--m-motion-fast) var(--m-motion-ease),
1302
+ opacity var(--m-motion-fast) var(--m-motion-ease),
1303
+ transform var(--m-button-press-duration) var(--m-motion-ease);
1304
+ user-select: none;
1305
+ vertical-align: middle;
1306
+ white-space: nowrap;
1307
+ }
1308
+
1309
+ @media (hover: hover) and (pointer: fine) {
1310
+ .m-button:hover:not(:disabled):not(.m-button--disabled) {
1311
+ background: var(--m-button-hover-bg);
1312
+ border-color: var(--m-button-hover-border);
1313
+ color: var(--m-button-hover-fg);
1314
+ }
1315
+ }
1316
+
1317
+ .m-button:active:not(:disabled):not(.m-button--disabled):not(.m-button--loading) {
1318
+ background: var(--m-button-active-bg);
1319
+ border-color: var(--m-button-active-border);
1320
+ color: var(--m-button-active-fg);
1321
+ }
1322
+
1323
+ .m-button--press:active:not(:disabled):not(.m-button--disabled) {
1324
+ transform: scale(var(--m-button-press-scale));
1325
+ }
1326
+
1327
+ .m-button:focus {
1328
+ outline: none;
1329
+ }
1330
+
1331
+ .m-button:focus-visible {
1332
+ box-shadow: var(--m-focus-shadow);
1333
+ outline: none;
1334
+ }
1335
+
1336
+ .m-button:disabled,
1337
+ .m-button--disabled {
1338
+ background: var(--m-color-bg-disabled);
1339
+ border-color: var(--m-color-border);
1340
+ color: var(--m-color-text-disabled);
1341
+ cursor: not-allowed;
1342
+ opacity: 1;
1343
+ }
1344
+
1345
+ .m-button--variant-text:disabled,
1346
+ .m-button--variant-link:disabled,
1347
+ .m-button--variant-text.m-button--disabled,
1348
+ .m-button--variant-link.m-button--disabled,
1349
+ .m-button--ghost:disabled,
1350
+ .m-button--ghost.m-button--disabled {
1351
+ background: transparent;
1352
+ border-color: transparent;
1353
+ }
1354
+
1355
+ /* ---------- Color axis ---------- */
1356
+
1357
+ .m-button--color-default {
1358
+ --m-button-color-base: var(--m-color-text);
1359
+ --m-button-color-hover: var(--m-color-primary-hover);
1360
+ --m-button-color-active: var(--m-color-primary-active);
1361
+ --m-button-color-light: color-mix(
1362
+ in srgb,
1363
+ var(--m-color-text) var(--m-button-fill-opacity-muted),
1364
+ var(--m-color-surface)
1365
+ );
1366
+ --m-button-color-light-hover: color-mix(
1367
+ in srgb,
1368
+ var(--m-color-text) var(--m-button-fill-opacity-muted-hover),
1369
+ var(--m-color-surface)
1370
+ );
1371
+ --m-button-color-light-active: color-mix(
1372
+ in srgb,
1373
+ var(--m-color-text) var(--m-button-fill-opacity-muted-active),
1374
+ var(--m-color-surface)
1375
+ );
1376
+ --m-button-on-color: var(--m-color-contrast-fg);
1377
+ --m-button-solid-bg: var(--m-color-contrast);
1378
+ --m-button-solid-bg-hover: var(--m-color-contrast-hover);
1379
+ --m-button-solid-bg-active: var(--m-color-contrast-active);
1380
+ --m-button-outlined-border: var(--m-color-border);
1381
+ --m-button-outlined-fg: var(--m-color-text);
1382
+ --m-button-outlined-hover-border: var(--m-color-primary-hover);
1383
+ --m-button-outlined-hover-fg: var(--m-color-primary-hover);
1384
+ --m-button-outlined-bg: var(--m-color-surface);
1385
+ /* Match ant default outlined/dashed: keep surface bg, only shift border/text. */
1386
+ --m-button-outlined-hover-bg: var(--m-color-surface);
1387
+ --m-button-outlined-active-bg: var(--m-color-surface);
1388
+ }
1389
+
1390
+ .m-button--color-primary {
1391
+ --m-button-color-base: var(--m-color-primary);
1392
+ --m-button-color-hover: var(--m-color-primary-hover);
1393
+ --m-button-color-active: var(--m-color-primary-active);
1394
+ --m-button-solid-bg: var(--m-color-primary);
1395
+ --m-button-solid-bg-hover: var(--m-color-primary-hover);
1396
+ --m-button-solid-bg-active: var(--m-color-primary-active);
1397
+ --m-button-outlined-border: var(--m-color-primary);
1398
+ --m-button-outlined-fg: var(--m-color-primary);
1399
+ --m-button-outlined-hover-border: var(--m-color-primary-hover);
1400
+ --m-button-outlined-hover-fg: var(--m-color-primary-hover);
1401
+ --m-button-outlined-bg: var(--m-color-surface);
1402
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1403
+ }
1404
+
1405
+ .m-button--color-danger {
1406
+ --m-button-color-base: var(--m-color-danger);
1407
+ --m-button-color-hover: color-mix(
1408
+ in srgb,
1409
+ var(--m-color-danger) 88%,
1410
+ var(--m-color-text)
1411
+ );
1412
+ --m-button-color-active: color-mix(
1413
+ in srgb,
1414
+ var(--m-color-danger) 76%,
1415
+ var(--m-color-text)
1416
+ );
1417
+ --m-button-solid-bg: var(--m-color-danger);
1418
+ --m-button-solid-bg-hover: var(--m-button-color-hover);
1419
+ --m-button-solid-bg-active: var(--m-button-color-active);
1420
+ --m-button-outlined-border: var(--m-color-danger);
1421
+ --m-button-outlined-fg: var(--m-color-danger);
1422
+ --m-button-outlined-hover-border: var(--m-button-color-hover);
1423
+ --m-button-outlined-hover-fg: var(--m-button-color-hover);
1424
+ --m-button-outlined-bg: var(--m-color-surface);
1425
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1426
+ }
1427
+
1428
+ .m-button--color-success {
1429
+ --m-button-color-base: var(--m-color-success);
1430
+ --m-button-color-hover: color-mix(
1431
+ in srgb,
1432
+ var(--m-color-success) 88%,
1433
+ var(--m-color-text)
1434
+ );
1435
+ --m-button-color-active: color-mix(
1436
+ in srgb,
1437
+ var(--m-color-success) 76%,
1438
+ var(--m-color-text)
1439
+ );
1440
+ --m-button-solid-bg: var(--m-color-success);
1441
+ --m-button-solid-bg-hover: var(--m-button-color-hover);
1442
+ --m-button-solid-bg-active: var(--m-button-color-active);
1443
+ --m-button-outlined-border: var(--m-color-success);
1444
+ --m-button-outlined-fg: var(--m-color-success);
1445
+ --m-button-outlined-hover-border: var(--m-button-color-hover);
1446
+ --m-button-outlined-hover-fg: var(--m-button-color-hover);
1447
+ --m-button-outlined-bg: var(--m-color-surface);
1448
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1449
+ }
1450
+
1451
+ .m-button--color-info {
1452
+ --m-button-color-base: var(--m-color-info);
1453
+ --m-button-color-hover: color-mix(
1454
+ in srgb,
1455
+ var(--m-color-info) 88%,
1456
+ var(--m-color-text)
1457
+ );
1458
+ --m-button-color-active: color-mix(
1459
+ in srgb,
1460
+ var(--m-color-info) 76%,
1461
+ var(--m-color-text)
1462
+ );
1463
+ --m-button-solid-bg: var(--m-color-info);
1464
+ --m-button-solid-bg-hover: var(--m-button-color-hover);
1465
+ --m-button-solid-bg-active: var(--m-button-color-active);
1466
+ --m-button-outlined-border: var(--m-color-info);
1467
+ --m-button-outlined-fg: var(--m-color-info);
1468
+ --m-button-outlined-hover-border: var(--m-button-color-hover);
1469
+ --m-button-outlined-hover-fg: var(--m-button-color-hover);
1470
+ --m-button-outlined-bg: var(--m-color-surface);
1471
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1472
+ }
1473
+
1474
+ .m-button--color-warning {
1475
+ --m-button-color-base: var(--m-color-warn);
1476
+ --m-button-color-hover: color-mix(
1477
+ in srgb,
1478
+ var(--m-color-warn) 88%,
1479
+ var(--m-color-text)
1480
+ );
1481
+ --m-button-color-active: color-mix(
1482
+ in srgb,
1483
+ var(--m-color-warn) 76%,
1484
+ var(--m-color-text)
1485
+ );
1486
+ --m-button-solid-bg: var(--m-color-warn);
1487
+ --m-button-solid-bg-hover: var(--m-button-color-hover);
1488
+ --m-button-solid-bg-active: var(--m-button-color-active);
1489
+ --m-button-outlined-border: var(--m-color-warn);
1490
+ --m-button-outlined-fg: var(--m-color-warn);
1491
+ --m-button-outlined-hover-border: var(--m-button-color-hover);
1492
+ --m-button-outlined-hover-fg: var(--m-button-color-hover);
1493
+ --m-button-outlined-bg: var(--m-color-surface);
1494
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1495
+ }
1496
+
1497
+ .m-button--color-help {
1498
+ --m-button-color-base: var(--m-color-help);
1499
+ --m-button-color-hover: color-mix(
1500
+ in srgb,
1501
+ var(--m-color-help) 88%,
1502
+ var(--m-color-text)
1503
+ );
1504
+ --m-button-color-active: color-mix(
1505
+ in srgb,
1506
+ var(--m-color-help) 76%,
1507
+ var(--m-color-text)
1508
+ );
1509
+ --m-button-solid-bg: var(--m-color-help);
1510
+ --m-button-solid-bg-hover: var(--m-button-color-hover);
1511
+ --m-button-solid-bg-active: var(--m-button-color-active);
1512
+ --m-button-outlined-border: var(--m-color-help);
1513
+ --m-button-outlined-fg: var(--m-color-help);
1514
+ --m-button-outlined-hover-border: var(--m-button-color-hover);
1515
+ --m-button-outlined-hover-fg: var(--m-button-color-hover);
1516
+ --m-button-outlined-bg: var(--m-color-surface);
1517
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1518
+ }
1519
+
1520
+ .m-button--color-contrast {
1521
+ --m-button-color-base: var(--m-color-contrast);
1522
+ --m-button-color-hover: var(--m-color-contrast-hover);
1523
+ --m-button-color-active: var(--m-color-contrast-active);
1524
+ --m-button-on-color: var(--m-color-contrast-fg);
1525
+ --m-button-solid-bg: var(--m-color-contrast);
1526
+ --m-button-solid-bg-hover: var(--m-color-contrast-hover);
1527
+ --m-button-solid-bg-active: var(--m-color-contrast-active);
1528
+ --m-button-outlined-border: var(--m-color-contrast);
1529
+ --m-button-outlined-fg: var(--m-color-contrast);
1530
+ --m-button-outlined-hover-border: var(--m-color-contrast-hover);
1531
+ --m-button-outlined-hover-fg: var(--m-color-contrast-hover);
1532
+ --m-button-outlined-bg: var(--m-color-surface);
1533
+ --m-button-outlined-hover-bg: var(--m-button-color-light);
1534
+ }
1535
+
1536
+ .m-button--color-link {
1537
+ --m-button-color-base: var(--m-color-primary);
1538
+ --m-button-color-hover: var(--m-color-primary-hover);
1539
+ --m-button-color-active: var(--m-color-primary-active);
1540
+ }
1541
+
1542
+ /* ---------- Variant axis ---------- */
1543
+
1544
+ .m-button--variant-solid {
1545
+ --m-button-bg: var(--m-button-solid-bg, var(--m-button-color-base));
1546
+ --m-button-fg: var(--m-button-on-color);
1547
+ --m-button-border: transparent;
1548
+ --m-button-hover-bg: var(
1549
+ --m-button-solid-bg-hover,
1550
+ var(--m-button-color-hover)
1551
+ );
1552
+ --m-button-hover-fg: var(--m-button-on-color);
1553
+ --m-button-hover-border: transparent;
1554
+ --m-button-active-bg: var(
1555
+ --m-button-solid-bg-active,
1556
+ var(--m-button-color-active)
1557
+ );
1558
+ --m-button-active-fg: var(--m-button-on-color);
1559
+ --m-button-active-border: transparent;
1560
+ }
1561
+
1562
+ .m-button--variant-outlined,
1563
+ .m-button--variant-dashed {
1564
+ --m-button-bg: var(--m-button-outlined-bg, var(--m-color-surface));
1565
+ --m-button-fg: var(--m-button-outlined-fg, var(--m-button-color-base));
1566
+ --m-button-border: var(
1567
+ --m-button-outlined-border,
1568
+ var(--m-button-color-base)
1569
+ );
1570
+ --m-button-hover-bg: var(
1571
+ --m-button-outlined-hover-bg,
1572
+ var(--m-button-color-light)
1573
+ );
1574
+ --m-button-hover-fg: var(
1575
+ --m-button-outlined-hover-fg,
1576
+ var(--m-button-color-hover)
1577
+ );
1578
+ --m-button-hover-border: var(
1579
+ --m-button-outlined-hover-border,
1580
+ var(--m-button-color-hover)
1581
+ );
1582
+ --m-button-active-bg: var(
1583
+ --m-button-outlined-active-bg,
1584
+ var(--m-button-color-light-active, var(--m-button-color-light))
1585
+ );
1586
+ --m-button-active-fg: var(
1587
+ --m-button-color-active,
1588
+ var(--m-button-hover-fg)
1589
+ );
1590
+ --m-button-active-border: var(
1591
+ --m-button-color-active,
1592
+ var(--m-button-hover-border)
1593
+ );
1594
+ }
1595
+
1596
+ .m-button--variant-dashed {
1597
+ --m-button-border-style: dashed;
1598
+ }
1599
+
1600
+ .m-button--variant-filled {
1601
+ --m-button-bg: var(--m-button-color-light);
1602
+ --m-button-fg: var(--m-button-color-base);
1603
+ --m-button-border: transparent;
1604
+ --m-button-hover-bg: var(--m-button-color-light-hover);
1605
+ --m-button-hover-fg: var(--m-button-color-base);
1606
+ --m-button-hover-border: transparent;
1607
+ --m-button-active-bg: var(--m-button-color-light-active);
1608
+ --m-button-active-fg: var(--m-button-color-base);
1609
+ --m-button-active-border: transparent;
1610
+ }
1611
+
1612
+ .m-button--variant-text,
1613
+ .m-button--variant-link {
1614
+ --m-button-bg: transparent;
1615
+ --m-button-fg: var(--m-button-color-base);
1616
+ --m-button-border: transparent;
1617
+ --m-button-hover-fg: var(--m-button-color-hover);
1618
+ --m-button-hover-border: transparent;
1619
+ --m-button-active-bg: transparent;
1620
+ --m-button-active-fg: var(--m-button-color-active, var(--m-button-color-hover));
1621
+ --m-button-active-border: transparent;
1622
+ }
1623
+
1624
+ .m-button--variant-text {
1625
+ --m-button-hover-bg: var(--m-button-color-light);
1626
+ --m-button-active-bg: var(--m-button-color-light-active);
1627
+ }
1628
+
1629
+ .m-button--variant-link {
1630
+ --m-button-hover-bg: transparent;
1631
+ --m-button-height: auto;
1632
+ height: auto;
1633
+ min-height: 0;
1634
+ padding: 0;
1635
+ }
1636
+
1637
+ .m-button--variant-link:hover:not(:disabled):not(.m-button--disabled) {
1638
+ text-decoration: underline;
1639
+ }
1640
+
1641
+ .m-button--color-default.m-button--variant-text {
1642
+ --m-button-color-base: var(--m-color-text);
1643
+ --m-button-color-hover: var(--m-color-text);
1644
+ --m-button-hover-bg: var(--m-button-color-light);
1645
+ --m-button-active-bg: var(--m-button-color-light-hover);
1646
+ }
1647
+
1648
+ .m-button--color-default.m-button--variant-filled {
1649
+ --m-button-color-base: var(--m-color-text);
1650
+ }
1651
+
1652
+ .m-button--color-link.m-button--variant-link {
1653
+ --m-button-color-base: var(--m-color-primary);
1654
+ --m-button-color-hover: var(--m-color-primary-hover);
1655
+ }
1656
+
1657
+ /* Ghost: transparent fill on bordered variants */
1658
+ .m-button--ghost {
1659
+ --m-button-bg: transparent;
1660
+ --m-button-hover-bg: transparent;
1661
+ --m-button-active-bg: transparent;
1662
+ }
1663
+
1664
+ .m-button--ghost.m-button--variant-solid,
1665
+ .m-button--ghost.m-button--variant-outlined,
1666
+ .m-button--ghost.m-button--variant-dashed {
1667
+ --m-button-fg: var(--m-button-color-base);
1668
+ --m-button-border: var(--m-button-color-base);
1669
+ --m-button-hover-fg: var(--m-button-color-hover);
1670
+ --m-button-hover-border: var(--m-button-color-hover);
1671
+ --m-button-active-fg: var(--m-button-color-active, var(--m-button-color-hover));
1672
+ --m-button-active-border: var(--m-button-color-active, var(--m-button-color-hover));
1673
+ }
1674
+ .m-button--ghost.m-button--color-default {
1675
+ --m-button-color-base: var(--m-color-on-emphasis);
1676
+ --m-button-color-hover: color-mix(
1677
+ in srgb,
1678
+ var(--m-color-on-emphasis) var(--m-button-ghost-hover-opacity),
1679
+ transparent
1680
+ );
1681
+ --m-button-fg: var(--m-color-on-emphasis);
1682
+ --m-button-border: var(--m-color-on-emphasis);
1683
+ --m-button-hover-fg: var(--m-button-color-hover);
1684
+ --m-button-hover-border: var(--m-button-color-hover);
1685
+ }
1686
+
1687
+ /* ---------- Size / shape / layout ---------- */
1688
+
1689
+ .m-button--small {
1690
+ --m-button-icon-size: var(--m-button-icon-size-small);
1691
+ --m-button-font-size: var(--m-control-font-small);
1692
+ --m-button-height: var(--m-control-height-small);
1693
+ --m-button-padding-x: var(--m-button-padding-x-small);
1694
+ }
1695
+
1696
+ .m-button--large {
1697
+ --m-button-icon-size: var(--m-button-icon-size-large);
1698
+ --m-button-font-size: var(--m-control-font-large);
1699
+ --m-button-height: var(--m-control-height-large);
1700
+ --m-button-padding-x: var(--m-button-padding-x-large);
1701
+ }
1702
+
1703
+ .m-button--block {
1704
+ display: flex;
1705
+ width: 100%;
1706
+ }
1707
+
1708
+ .m-button--shape-round {
1709
+ --m-button-radius: var(--m-radius-full);
1710
+ padding-inline: calc(
1711
+ var(--m-button-padding-x) + var(--m-button-padding-x-round-extra)
1712
+ );
1713
+ }
1714
+
1715
+ .m-button--shape-circle {
1716
+ --m-button-radius: var(--m-radius-full);
1717
+ min-width: var(--m-button-height);
1718
+ padding-inline: 0;
1719
+ width: var(--m-button-height);
1720
+ }
1721
+
1722
+ .m-button--shape-square {
1723
+ --m-button-radius: 0;
1724
+ }
1725
+
1726
+ .m-button--icon-only {
1727
+ gap: 0;
1728
+ min-width: var(--m-button-height);
1729
+ padding: 0;
1730
+ width: var(--m-button-height);
1731
+ }
1732
+
1733
+ .m-button--icon-end {
1734
+ flex-direction: row-reverse;
1735
+ }
1736
+
1737
+ .m-button--two-chinese-chars > .m-button__label {
1738
+ letter-spacing: var(--m-button-cn-letter-spacing);
1739
+ margin-inline-end: calc(var(--m-button-cn-letter-spacing) * -1);
1740
+ }
1741
+
1742
+ .m-button--loading {
1743
+ cursor: default;
1744
+ opacity: var(--m-button-loading-opacity);
1745
+ pointer-events: none;
1746
+ }
1747
+
1748
+ /* ---------- Parts ---------- */
1749
+
1750
+ .m-button__icon,
1751
+ .m-button__label {
1752
+ align-items: center;
1753
+ display: inline-flex;
1754
+ justify-content: center;
1755
+ }
1756
+
1757
+ .m-button__icon,
1758
+ .m-button__label {
1759
+ position: relative;
1760
+ z-index: 1;
1761
+ }
1762
+
1763
+ .m-button__ripple {
1764
+ border-radius: inherit;
1765
+ inset: 0;
1766
+ overflow: hidden;
1767
+ pointer-events: none;
1768
+ position: absolute;
1769
+ z-index: 0;
1770
+ }
1771
+
1772
+ .m-button__ripple-wave {
1773
+ background: currentColor;
1774
+ border-radius: var(--m-radius-full);
1775
+ opacity: 0;
1776
+ pointer-events: none;
1777
+ position: absolute;
1778
+ transform: scale(0);
1779
+ will-change: transform, opacity;
1780
+ }
1781
+
1782
+ .m-button__ripple-wave--fallback {
1783
+ animation: m-button-ripple var(--m-button-ripple-duration)
1784
+ var(--m-motion-ease) forwards;
1785
+ }
1786
+
1787
+ @keyframes m-button-ripple {
1788
+ 0% {
1789
+ opacity: var(--m-button-ripple-opacity-start);
1790
+ transform: scale(0);
1791
+ }
1792
+ 55% {
1793
+ opacity: var(--m-button-ripple-opacity-mid);
1794
+ transform: scale(0.55);
1795
+ }
1796
+ 100% {
1797
+ opacity: 0;
1798
+ transform: scale(1);
1799
+ }
1800
+ }
1801
+
1802
+ .m-button__icon {
1803
+ flex: 0 0 auto;
1804
+ height: var(--m-button-icon-size);
1805
+ line-height: 0;
1806
+ width: var(--m-button-icon-size);
1807
+ }
1808
+
1809
+ .m-button__icon :is(.m-icon, .m-button__icon-graphic, svg) {
1810
+ display: block;
1811
+ flex-shrink: 0;
1812
+ height: 100%;
1813
+ width: 100%;
1814
+ }
1815
+
1816
+ .m-button__icon .m-icon {
1817
+ max-height: 100%;
1818
+ max-width: 100%;
1819
+ }
1820
+
1821
+ .m-button__spinner {
1822
+ animation: m-button-spin var(--m-motion-spin-fast) linear infinite;
1823
+ border: var(--m-button-spinner-border-width) solid currentColor;
1824
+ border-radius: var(--m-radius-full);
1825
+ border-right-color: transparent;
1826
+ height: var(--m-button-spinner-size);
1827
+ width: var(--m-button-spinner-size);
1828
+ }
1207
1829
 
1208
- .m-button {
1209
- /* Geometry */
1210
- --m-button-radius: var(--m-radius-control);
1211
- --m-button-border-width: var(--m-border-width);
1212
- --m-button-gap: var(--m-space-2);
1213
- --m-button-font-weight: var(--m-font-weight);
1214
- --m-button-font-size: var(--m-control-font-medium);
1215
- --m-button-height: var(--m-control-height-medium);
1216
- --m-button-padding-x: var(--m-button-padding-x-medium);
1217
- --m-button-padding-x-small: var(--m-control-padding-x-small);
1218
- --m-button-padding-x-medium: calc(
1219
- var(--m-control-padding-x-medium) + var(--m-space-1)
1220
- );
1221
- --m-button-padding-x-large: calc(
1222
- var(--m-control-padding-x-large) + var(--m-space-1)
1223
- );
1224
- --m-button-padding-x-round-extra: var(--m-space-2);
1225
-
1226
- /* Icon / spinner */
1227
- --m-button-icon-size: 1rem;
1228
- --m-button-icon-size-small: 0.875rem;
1229
- --m-button-icon-size-large: 1.25rem;
1230
- --m-button-spinner-size: 0.875rem;
1231
- --m-button-spinner-border-width: 2px;
1232
- --m-button-cn-letter-spacing: 0.3em;
1233
-
1234
- /* Soft fill opacities (theme-adaptive via surface mix) */
1235
- --m-button-fill-opacity: 10%;
1236
- --m-button-fill-opacity-hover: 16%;
1237
- --m-button-fill-opacity-active: 22%;
1238
- --m-button-fill-opacity-muted: 6%;
1239
- --m-button-fill-opacity-muted-hover: 10%;
1240
- --m-button-fill-opacity-muted-active: 14%;
1241
-
1242
- /* Interaction */
1243
- --m-button-loading-opacity: 0.72;
1244
- --m-button-press-scale: 0.97;
1245
- --m-button-press-duration: 160ms;
1246
- --m-button-ripple-duration: 560ms;
1247
- --m-button-ripple-opacity-start: 0.42;
1248
- --m-button-ripple-opacity-mid: 0.22;
1249
- --m-button-ghost-hover-opacity: 80%;
1250
-
1251
- /* Color axis defaults (overridden by --color-*) */
1252
- --m-button-color-base: var(--m-color-primary);
1253
- --m-button-color-hover: var(--m-color-primary-hover);
1254
- --m-button-color-active: var(--m-color-primary-active);
1255
- --m-button-color-light: color-mix(
1256
- in srgb,
1257
- var(--m-button-color-base) var(--m-button-fill-opacity),
1258
- var(--m-color-surface)
1259
- );
1260
- --m-button-color-light-hover: color-mix(
1261
- in srgb,
1262
- var(--m-button-color-base) var(--m-button-fill-opacity-hover),
1263
- var(--m-color-surface)
1264
- );
1265
- --m-button-color-light-active: color-mix(
1266
- in srgb,
1267
- var(--m-button-color-base) var(--m-button-fill-opacity-active),
1268
- var(--m-color-surface)
1269
- );
1270
- --m-button-on-color: var(--m-color-on-emphasis);
1271
-
1272
- /* Variant surface vars */
1273
- --m-button-bg: var(--m-color-surface);
1274
- --m-button-fg: var(--m-color-text);
1275
- --m-button-border: var(--m-color-border);
1276
- --m-button-hover-bg: var(--m-button-bg);
1277
- --m-button-hover-fg: var(--m-button-fg);
1278
- --m-button-hover-border: var(--m-button-border);
1279
- --m-button-active-bg: var(--m-button-bg);
1280
- --m-button-border-style: solid;
1281
-
1282
- --m-button-active-fg: var(--m-button-fg);
1283
- --m-button-active-border: var(--m-button-border);
1284
-
1285
- align-items: center;
1286
- background: var(--m-button-bg);
1287
- border: var(--m-button-border-width) var(--m-button-border-style)
1288
- var(--m-button-border);
1289
- border-radius: var(--m-button-radius);
1290
- color: var(--m-button-fg);
1291
- cursor: pointer;
1292
- display: inline-flex;
1293
- flex-direction: row;
1294
- font-family: var(--m-font-sans);
1295
- font-size: var(--m-button-font-size);
1296
- font-weight: var(--m-button-font-weight);
1297
- gap: var(--m-button-gap);
1298
- justify-content: center;
1299
- line-height: 1;
1300
- min-height: var(--m-button-height);
1301
- padding: 0 var(--m-button-padding-x);
1302
- position: relative;
1303
- text-decoration: none;
1304
- touch-action: manipulation;
1305
- transition:
1306
- background-color var(--m-motion-fast) var(--m-motion-ease),
1307
- border-color var(--m-motion-fast) var(--m-motion-ease),
1308
- color var(--m-motion-fast) var(--m-motion-ease),
1309
- box-shadow var(--m-motion-fast) var(--m-motion-ease),
1310
- opacity var(--m-motion-fast) var(--m-motion-ease),
1311
- transform var(--m-button-press-duration) var(--m-motion-ease);
1312
- user-select: none;
1313
- vertical-align: middle;
1314
- white-space: nowrap;
1315
- }
1316
-
1317
- @media (hover: hover) and (pointer: fine) {
1318
- .m-button:hover:not(:disabled):not(.m-button--disabled) {
1319
- background: var(--m-button-hover-bg);
1320
- border-color: var(--m-button-hover-border);
1321
- color: var(--m-button-hover-fg);
1322
- }
1323
- }
1324
-
1325
- .m-button:active:not(:disabled):not(.m-button--disabled):not(.m-button--loading) {
1326
- background: var(--m-button-active-bg);
1327
- border-color: var(--m-button-active-border);
1328
- color: var(--m-button-active-fg);
1329
- }
1330
-
1331
- .m-button--press:active:not(:disabled):not(.m-button--disabled) {
1332
- transform: scale(var(--m-button-press-scale));
1333
- }
1334
-
1335
- .m-button:focus {
1336
- outline: none;
1337
- }
1338
-
1339
- .m-button:focus-visible {
1340
- box-shadow: var(--m-focus-shadow);
1341
- outline: none;
1342
- }
1343
-
1344
- .m-button:disabled,
1345
- .m-button--disabled {
1346
- background: var(--m-color-bg-disabled);
1347
- border-color: var(--m-color-border);
1348
- color: var(--m-color-text-disabled);
1349
- cursor: not-allowed;
1350
- opacity: 1;
1351
- }
1352
-
1353
- .m-button--variant-text:disabled,
1354
- .m-button--variant-link:disabled,
1355
- .m-button--variant-text.m-button--disabled,
1356
- .m-button--variant-link.m-button--disabled,
1357
- .m-button--ghost:disabled,
1358
- .m-button--ghost.m-button--disabled {
1359
- background: transparent;
1360
- border-color: transparent;
1361
- }
1362
-
1363
- /* ---------- Color axis ---------- */
1364
-
1365
- .m-button--color-default {
1366
- --m-button-color-base: var(--m-color-text);
1367
- --m-button-color-hover: var(--m-color-primary-hover);
1368
- --m-button-color-active: var(--m-color-primary-active);
1369
- --m-button-color-light: color-mix(
1370
- in srgb,
1371
- var(--m-color-text) var(--m-button-fill-opacity-muted),
1372
- var(--m-color-surface)
1373
- );
1374
- --m-button-color-light-hover: color-mix(
1375
- in srgb,
1376
- var(--m-color-text) var(--m-button-fill-opacity-muted-hover),
1377
- var(--m-color-surface)
1378
- );
1379
- --m-button-color-light-active: color-mix(
1380
- in srgb,
1381
- var(--m-color-text) var(--m-button-fill-opacity-muted-active),
1382
- var(--m-color-surface)
1383
- );
1384
- --m-button-on-color: var(--m-color-contrast-fg);
1385
- --m-button-solid-bg: var(--m-color-contrast);
1386
- --m-button-solid-bg-hover: var(--m-color-contrast-hover);
1387
- --m-button-solid-bg-active: var(--m-color-contrast-active);
1388
- --m-button-outlined-border: var(--m-color-border);
1389
- --m-button-outlined-fg: var(--m-color-text);
1390
- --m-button-outlined-hover-border: var(--m-color-primary-hover);
1391
- --m-button-outlined-hover-fg: var(--m-color-primary-hover);
1392
- --m-button-outlined-bg: var(--m-color-surface);
1393
- /* Match ant default outlined/dashed: keep surface bg, only shift border/text. */
1394
- --m-button-outlined-hover-bg: var(--m-color-surface);
1395
- --m-button-outlined-active-bg: var(--m-color-surface);
1396
- }
1397
-
1398
- .m-button--color-primary {
1399
- --m-button-color-base: var(--m-color-primary);
1400
- --m-button-color-hover: var(--m-color-primary-hover);
1401
- --m-button-color-active: var(--m-color-primary-active);
1402
- --m-button-solid-bg: var(--m-color-primary);
1403
- --m-button-solid-bg-hover: var(--m-color-primary-hover);
1404
- --m-button-solid-bg-active: var(--m-color-primary-active);
1405
- --m-button-outlined-border: var(--m-color-primary);
1406
- --m-button-outlined-fg: var(--m-color-primary);
1407
- --m-button-outlined-hover-border: var(--m-color-primary-hover);
1408
- --m-button-outlined-hover-fg: var(--m-color-primary-hover);
1409
- --m-button-outlined-bg: var(--m-color-surface);
1410
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1411
- }
1412
-
1413
- .m-button--color-danger {
1414
- --m-button-color-base: var(--m-color-danger);
1415
- --m-button-color-hover: color-mix(
1416
- in srgb,
1417
- var(--m-color-danger) 88%,
1418
- var(--m-color-text)
1419
- );
1420
- --m-button-color-active: color-mix(
1421
- in srgb,
1422
- var(--m-color-danger) 76%,
1423
- var(--m-color-text)
1424
- );
1425
- --m-button-solid-bg: var(--m-color-danger);
1426
- --m-button-solid-bg-hover: var(--m-button-color-hover);
1427
- --m-button-solid-bg-active: var(--m-button-color-active);
1428
- --m-button-outlined-border: var(--m-color-danger);
1429
- --m-button-outlined-fg: var(--m-color-danger);
1430
- --m-button-outlined-hover-border: var(--m-button-color-hover);
1431
- --m-button-outlined-hover-fg: var(--m-button-color-hover);
1432
- --m-button-outlined-bg: var(--m-color-surface);
1433
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1434
- }
1435
-
1436
- .m-button--color-success {
1437
- --m-button-color-base: var(--m-color-success);
1438
- --m-button-color-hover: color-mix(
1439
- in srgb,
1440
- var(--m-color-success) 88%,
1441
- var(--m-color-text)
1442
- );
1443
- --m-button-color-active: color-mix(
1444
- in srgb,
1445
- var(--m-color-success) 76%,
1446
- var(--m-color-text)
1447
- );
1448
- --m-button-solid-bg: var(--m-color-success);
1449
- --m-button-solid-bg-hover: var(--m-button-color-hover);
1450
- --m-button-solid-bg-active: var(--m-button-color-active);
1451
- --m-button-outlined-border: var(--m-color-success);
1452
- --m-button-outlined-fg: var(--m-color-success);
1453
- --m-button-outlined-hover-border: var(--m-button-color-hover);
1454
- --m-button-outlined-hover-fg: var(--m-button-color-hover);
1455
- --m-button-outlined-bg: var(--m-color-surface);
1456
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1457
- }
1458
-
1459
- .m-button--color-info {
1460
- --m-button-color-base: var(--m-color-info);
1461
- --m-button-color-hover: color-mix(
1462
- in srgb,
1463
- var(--m-color-info) 88%,
1464
- var(--m-color-text)
1465
- );
1466
- --m-button-color-active: color-mix(
1467
- in srgb,
1468
- var(--m-color-info) 76%,
1469
- var(--m-color-text)
1470
- );
1471
- --m-button-solid-bg: var(--m-color-info);
1472
- --m-button-solid-bg-hover: var(--m-button-color-hover);
1473
- --m-button-solid-bg-active: var(--m-button-color-active);
1474
- --m-button-outlined-border: var(--m-color-info);
1475
- --m-button-outlined-fg: var(--m-color-info);
1476
- --m-button-outlined-hover-border: var(--m-button-color-hover);
1477
- --m-button-outlined-hover-fg: var(--m-button-color-hover);
1478
- --m-button-outlined-bg: var(--m-color-surface);
1479
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1480
- }
1481
-
1482
- .m-button--color-warning {
1483
- --m-button-color-base: var(--m-color-warn);
1484
- --m-button-color-hover: color-mix(
1485
- in srgb,
1486
- var(--m-color-warn) 88%,
1487
- var(--m-color-text)
1488
- );
1489
- --m-button-color-active: color-mix(
1490
- in srgb,
1491
- var(--m-color-warn) 76%,
1492
- var(--m-color-text)
1493
- );
1494
- --m-button-solid-bg: var(--m-color-warn);
1495
- --m-button-solid-bg-hover: var(--m-button-color-hover);
1496
- --m-button-solid-bg-active: var(--m-button-color-active);
1497
- --m-button-outlined-border: var(--m-color-warn);
1498
- --m-button-outlined-fg: var(--m-color-warn);
1499
- --m-button-outlined-hover-border: var(--m-button-color-hover);
1500
- --m-button-outlined-hover-fg: var(--m-button-color-hover);
1501
- --m-button-outlined-bg: var(--m-color-surface);
1502
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1503
- }
1504
-
1505
- .m-button--color-help {
1506
- --m-button-color-base: var(--m-color-help);
1507
- --m-button-color-hover: color-mix(
1508
- in srgb,
1509
- var(--m-color-help) 88%,
1510
- var(--m-color-text)
1511
- );
1512
- --m-button-color-active: color-mix(
1513
- in srgb,
1514
- var(--m-color-help) 76%,
1515
- var(--m-color-text)
1516
- );
1517
- --m-button-solid-bg: var(--m-color-help);
1518
- --m-button-solid-bg-hover: var(--m-button-color-hover);
1519
- --m-button-solid-bg-active: var(--m-button-color-active);
1520
- --m-button-outlined-border: var(--m-color-help);
1521
- --m-button-outlined-fg: var(--m-color-help);
1522
- --m-button-outlined-hover-border: var(--m-button-color-hover);
1523
- --m-button-outlined-hover-fg: var(--m-button-color-hover);
1524
- --m-button-outlined-bg: var(--m-color-surface);
1525
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1526
- }
1527
-
1528
- .m-button--color-contrast {
1529
- --m-button-color-base: var(--m-color-contrast);
1530
- --m-button-color-hover: var(--m-color-contrast-hover);
1531
- --m-button-color-active: var(--m-color-contrast-active);
1532
- --m-button-on-color: var(--m-color-contrast-fg);
1533
- --m-button-solid-bg: var(--m-color-contrast);
1534
- --m-button-solid-bg-hover: var(--m-color-contrast-hover);
1535
- --m-button-solid-bg-active: var(--m-color-contrast-active);
1536
- --m-button-outlined-border: var(--m-color-contrast);
1537
- --m-button-outlined-fg: var(--m-color-contrast);
1538
- --m-button-outlined-hover-border: var(--m-color-contrast-hover);
1539
- --m-button-outlined-hover-fg: var(--m-color-contrast-hover);
1540
- --m-button-outlined-bg: var(--m-color-surface);
1541
- --m-button-outlined-hover-bg: var(--m-button-color-light);
1542
- }
1543
-
1544
- .m-button--color-link {
1545
- --m-button-color-base: var(--m-color-primary);
1546
- --m-button-color-hover: var(--m-color-primary-hover);
1547
- --m-button-color-active: var(--m-color-primary-active);
1548
- }
1549
-
1550
- /* ---------- Variant axis ---------- */
1551
-
1552
- .m-button--variant-solid {
1553
- --m-button-bg: var(--m-button-solid-bg, var(--m-button-color-base));
1554
- --m-button-fg: var(--m-button-on-color);
1555
- --m-button-border: transparent;
1556
- --m-button-hover-bg: var(
1557
- --m-button-solid-bg-hover,
1558
- var(--m-button-color-hover)
1559
- );
1560
- --m-button-hover-fg: var(--m-button-on-color);
1561
- --m-button-hover-border: transparent;
1562
- --m-button-active-bg: var(
1563
- --m-button-solid-bg-active,
1564
- var(--m-button-color-active)
1565
- );
1566
- --m-button-active-fg: var(--m-button-on-color);
1567
- --m-button-active-border: transparent;
1568
- }
1569
-
1570
- .m-button--variant-outlined,
1571
- .m-button--variant-dashed {
1572
- --m-button-bg: var(--m-button-outlined-bg, var(--m-color-surface));
1573
- --m-button-fg: var(--m-button-outlined-fg, var(--m-button-color-base));
1574
- --m-button-border: var(
1575
- --m-button-outlined-border,
1576
- var(--m-button-color-base)
1577
- );
1578
- --m-button-hover-bg: var(
1579
- --m-button-outlined-hover-bg,
1580
- var(--m-button-color-light)
1581
- );
1582
- --m-button-hover-fg: var(
1583
- --m-button-outlined-hover-fg,
1584
- var(--m-button-color-hover)
1585
- );
1586
- --m-button-hover-border: var(
1587
- --m-button-outlined-hover-border,
1588
- var(--m-button-color-hover)
1589
- );
1590
- --m-button-active-bg: var(
1591
- --m-button-outlined-active-bg,
1592
- var(--m-button-color-light-active, var(--m-button-color-light))
1593
- );
1594
- --m-button-active-fg: var(
1595
- --m-button-color-active,
1596
- var(--m-button-hover-fg)
1597
- );
1598
- --m-button-active-border: var(
1599
- --m-button-color-active,
1600
- var(--m-button-hover-border)
1601
- );
1602
- }
1603
-
1604
- .m-button--variant-dashed {
1605
- --m-button-border-style: dashed;
1606
- }
1607
-
1608
- .m-button--variant-filled {
1609
- --m-button-bg: var(--m-button-color-light);
1610
- --m-button-fg: var(--m-button-color-base);
1611
- --m-button-border: transparent;
1612
- --m-button-hover-bg: var(--m-button-color-light-hover);
1613
- --m-button-hover-fg: var(--m-button-color-base);
1614
- --m-button-hover-border: transparent;
1615
- --m-button-active-bg: var(--m-button-color-light-active);
1616
- --m-button-active-fg: var(--m-button-color-base);
1617
- --m-button-active-border: transparent;
1618
- }
1619
-
1620
- .m-button--variant-text,
1621
- .m-button--variant-link {
1622
- --m-button-bg: transparent;
1623
- --m-button-fg: var(--m-button-color-base);
1624
- --m-button-border: transparent;
1625
- --m-button-hover-fg: var(--m-button-color-hover);
1626
- --m-button-hover-border: transparent;
1627
- --m-button-active-bg: transparent;
1628
- --m-button-active-fg: var(--m-button-color-active, var(--m-button-color-hover));
1629
- --m-button-active-border: transparent;
1630
- }
1631
-
1632
- .m-button--variant-text {
1633
- --m-button-hover-bg: var(--m-button-color-light);
1634
- --m-button-active-bg: var(--m-button-color-light-active);
1635
- }
1636
-
1637
- .m-button--variant-link {
1638
- --m-button-hover-bg: transparent;
1639
- --m-button-height: auto;
1640
- height: auto;
1641
- min-height: 0;
1642
- padding: 0;
1643
- }
1644
-
1645
- .m-button--variant-link:hover:not(:disabled):not(.m-button--disabled) {
1646
- text-decoration: underline;
1647
- }
1648
-
1649
- .m-button--color-default.m-button--variant-text {
1650
- --m-button-color-base: var(--m-color-text);
1651
- --m-button-color-hover: var(--m-color-text);
1652
- --m-button-hover-bg: var(--m-button-color-light);
1653
- --m-button-active-bg: var(--m-button-color-light-hover);
1654
- }
1655
-
1656
- .m-button--color-default.m-button--variant-filled {
1657
- --m-button-color-base: var(--m-color-text);
1658
- }
1659
-
1660
- .m-button--color-link.m-button--variant-link {
1661
- --m-button-color-base: var(--m-color-primary);
1662
- --m-button-color-hover: var(--m-color-primary-hover);
1663
- }
1664
-
1665
- /* Ghost: transparent fill on bordered variants */
1666
- .m-button--ghost {
1667
- --m-button-bg: transparent;
1668
- --m-button-hover-bg: transparent;
1669
- --m-button-active-bg: transparent;
1670
- }
1671
-
1672
- .m-button--ghost.m-button--variant-solid,
1673
- .m-button--ghost.m-button--variant-outlined,
1674
- .m-button--ghost.m-button--variant-dashed {
1675
- --m-button-fg: var(--m-button-color-base);
1676
- --m-button-border: var(--m-button-color-base);
1677
- --m-button-hover-fg: var(--m-button-color-hover);
1678
- --m-button-hover-border: var(--m-button-color-hover);
1679
- --m-button-active-fg: var(--m-button-color-active, var(--m-button-color-hover));
1680
- --m-button-active-border: var(--m-button-color-active, var(--m-button-color-hover));
1681
- }
1682
- .m-button--ghost.m-button--color-default {
1683
- --m-button-color-base: var(--m-color-on-emphasis);
1684
- --m-button-color-hover: color-mix(
1685
- in srgb,
1686
- var(--m-color-on-emphasis) var(--m-button-ghost-hover-opacity),
1687
- transparent
1688
- );
1689
- --m-button-fg: var(--m-color-on-emphasis);
1690
- --m-button-border: var(--m-color-on-emphasis);
1691
- --m-button-hover-fg: var(--m-button-color-hover);
1692
- --m-button-hover-border: var(--m-button-color-hover);
1693
- }
1694
-
1695
- /* ---------- Size / shape / layout ---------- */
1696
-
1697
- .m-button--small {
1698
- --m-button-icon-size: var(--m-button-icon-size-small);
1699
- --m-button-font-size: var(--m-control-font-small);
1700
- --m-button-height: var(--m-control-height-small);
1701
- --m-button-padding-x: var(--m-button-padding-x-small);
1702
- }
1703
-
1704
- .m-button--large {
1705
- --m-button-icon-size: var(--m-button-icon-size-large);
1706
- --m-button-font-size: var(--m-control-font-large);
1707
- --m-button-height: var(--m-control-height-large);
1708
- --m-button-padding-x: var(--m-button-padding-x-large);
1709
- }
1710
-
1711
- .m-button--block {
1712
- display: flex;
1713
- width: 100%;
1714
- }
1715
-
1716
- .m-button--shape-round {
1717
- --m-button-radius: var(--m-radius-full);
1718
- padding-inline: calc(
1719
- var(--m-button-padding-x) + var(--m-button-padding-x-round-extra)
1720
- );
1721
- }
1722
-
1723
- .m-button--shape-circle {
1724
- --m-button-radius: var(--m-radius-full);
1725
- min-width: var(--m-button-height);
1726
- padding-inline: 0;
1727
- width: var(--m-button-height);
1728
- }
1729
-
1730
- .m-button--shape-square {
1731
- --m-button-radius: 0;
1732
- }
1733
-
1734
- .m-button--icon-only {
1735
- gap: 0;
1736
- min-width: var(--m-button-height);
1737
- padding: 0;
1738
- width: var(--m-button-height);
1739
- }
1740
-
1741
- .m-button--icon-end {
1742
- flex-direction: row-reverse;
1743
- }
1744
-
1745
- .m-button--two-chinese-chars > .m-button__label {
1746
- letter-spacing: var(--m-button-cn-letter-spacing);
1747
- margin-inline-end: calc(var(--m-button-cn-letter-spacing) * -1);
1748
- }
1749
-
1750
- .m-button--loading {
1751
- cursor: default;
1752
- opacity: var(--m-button-loading-opacity);
1753
- pointer-events: none;
1754
- }
1755
-
1756
- /* ---------- Parts ---------- */
1757
-
1758
- .m-button__icon,
1759
- .m-button__label {
1760
- align-items: center;
1761
- display: inline-flex;
1762
- justify-content: center;
1763
- }
1764
-
1765
- .m-button__icon,
1766
- .m-button__label {
1767
- position: relative;
1768
- z-index: 1;
1769
- }
1770
-
1771
- .m-button__ripple {
1772
- border-radius: inherit;
1773
- inset: 0;
1774
- overflow: hidden;
1775
- pointer-events: none;
1776
- position: absolute;
1777
- z-index: 0;
1778
- }
1779
-
1780
- .m-button__ripple-wave {
1781
- background: currentColor;
1782
- border-radius: var(--m-radius-full);
1783
- opacity: 0;
1784
- pointer-events: none;
1785
- position: absolute;
1786
- transform: scale(0);
1787
- will-change: transform, opacity;
1788
- }
1789
-
1790
- .m-button__ripple-wave--fallback {
1791
- animation: m-button-ripple var(--m-button-ripple-duration)
1792
- var(--m-motion-ease) forwards;
1793
- }
1794
-
1795
- @keyframes m-button-ripple {
1796
- 0% {
1797
- opacity: var(--m-button-ripple-opacity-start);
1798
- transform: scale(0);
1799
- }
1800
- 55% {
1801
- opacity: var(--m-button-ripple-opacity-mid);
1802
- transform: scale(0.55);
1803
- }
1804
- 100% {
1805
- opacity: 0;
1806
- transform: scale(1);
1807
- }
1808
- }
1809
-
1810
- .m-button__icon {
1811
- flex: 0 0 auto;
1812
- height: var(--m-button-icon-size);
1813
- line-height: 0;
1814
- width: var(--m-button-icon-size);
1815
- }
1816
-
1817
- .m-button__icon :is(.m-icon, .m-button__icon-graphic, svg) {
1818
- display: block;
1819
- flex-shrink: 0;
1820
- height: 100%;
1821
- width: 100%;
1822
- }
1823
-
1824
- .m-button__icon .m-icon {
1825
- max-height: 100%;
1826
- max-width: 100%;
1827
- }
1828
-
1829
- .m-button__spinner {
1830
- animation: m-button-spin var(--m-motion-spin-fast) linear infinite;
1831
- border: var(--m-button-spinner-border-width) solid currentColor;
1832
- border-radius: var(--m-radius-full);
1833
- border-right-color: transparent;
1834
- height: var(--m-button-spinner-size);
1835
- width: var(--m-button-spinner-size);
1836
- }
1837
-
1838
- @keyframes m-button-spin {
1839
- to {
1840
- transform: rotate(360deg);
1841
- }
1842
- }
1843
-
1844
- @media (prefers-reduced-motion: reduce) {
1845
- .m-button {
1846
- --m-button-ripple-duration: 0ms;
1847
- transition-duration: 0ms;
1848
- }
1849
-
1850
- .m-button__spinner {
1851
- animation-duration: 0ms;
1852
- }
1853
- }
1854
-
1855
- :root[data-m-motion='reduced'] .m-button {
1856
- --m-button-ripple-duration: 280ms;
1857
- --m-button-press-duration: 120ms;
1858
- }
1859
-
1860
- :root[data-m-motion='none'] .m-button {
1861
- --m-button-ripple-duration: 0ms;
1862
- --m-button-press-duration: 0ms;
1863
- }
1864
-
1865
- /* ---------- Group ---------- */
1866
-
1867
- .m-button-group {
1868
- display: inline-flex;
1869
- vertical-align: middle;
1870
- }
1871
-
1872
- .m-button-group--block {
1873
- display: flex;
1874
- width: 100%;
1875
- }
1876
-
1877
- .m-button-group--block > .m-button {
1878
- flex: 1;
1879
- }
1880
-
1881
- .m-button-group > .m-button {
1882
- border-radius: 0;
1883
- margin: 0;
1884
- }
1885
-
1886
- .m-button-group > .m-button + .m-button {
1887
- margin-inline-start: calc(var(--m-border-width) * -1);
1888
- }
1889
-
1890
- .m-button-group > .m-button:hover,
1891
- .m-button-group > .m-button:focus-visible,
1892
- .m-button-group > .m-button:active {
1893
- position: relative;
1894
- z-index: 1;
1895
- }
1896
-
1897
- .m-button-group > .m-button:first-child {
1898
- border-end-start-radius: var(--m-radius-control);
1899
- border-start-start-radius: var(--m-radius-control);
1900
- }
1901
-
1902
- .m-button-group > .m-button:last-child {
1903
- border-end-end-radius: var(--m-radius-control);
1904
- border-start-end-radius: var(--m-radius-control);
1905
- }
1830
+ @keyframes m-button-spin {
1831
+ to {
1832
+ transform: rotate(360deg);
1833
+ }
1834
+ }
1835
+
1836
+ @media (prefers-reduced-motion: reduce) {
1837
+ .m-button {
1838
+ --m-button-ripple-duration: 0ms;
1839
+ transition-duration: 0ms;
1840
+ }
1841
+
1842
+ .m-button__spinner {
1843
+ animation-duration: 0ms;
1844
+ }
1845
+ }
1846
+
1847
+ :root[data-m-motion='reduced'] .m-button {
1848
+ --m-button-ripple-duration: 280ms;
1849
+ --m-button-press-duration: 120ms;
1850
+ }
1851
+
1852
+ :root[data-m-motion='none'] .m-button {
1853
+ --m-button-ripple-duration: 0ms;
1854
+ --m-button-press-duration: 0ms;
1855
+ }
1856
+
1857
+ /* ---------- Group ---------- */
1858
+
1859
+ .m-button-group {
1860
+ display: inline-flex;
1861
+ vertical-align: middle;
1862
+ }
1863
+
1864
+ .m-button-group--block {
1865
+ display: flex;
1866
+ width: 100%;
1867
+ }
1868
+
1869
+ .m-button-group--block > .m-button {
1870
+ flex: 1;
1871
+ }
1872
+
1873
+ .m-button-group > .m-button {
1874
+ border-radius: 0;
1875
+ margin: 0;
1876
+ }
1877
+
1878
+ .m-button-group > .m-button + .m-button {
1879
+ margin-inline-start: calc(var(--m-border-width) * -1);
1880
+ }
1881
+
1882
+ .m-button-group > .m-button:hover,
1883
+ .m-button-group > .m-button:focus-visible,
1884
+ .m-button-group > .m-button:active {
1885
+ position: relative;
1886
+ z-index: 1;
1887
+ }
1888
+
1889
+ .m-button-group > .m-button:first-child {
1890
+ border-end-start-radius: var(--m-radius-control);
1891
+ border-start-start-radius: var(--m-radius-control);
1892
+ }
1893
+
1894
+ .m-button-group > .m-button:last-child {
1895
+ border-end-end-radius: var(--m-radius-control);
1896
+ border-start-end-radius: var(--m-radius-control);
1897
+ }
1906
1898
 
1907
1899
  .m-icon {
1908
1900
  color: currentColor;
@@ -1953,219 +1945,219 @@
1953
1945
  animation: none;
1954
1946
  }
1955
1947
 
1956
- /* --- Primitive: SplitButton --- */
1957
- .m-splitbutton {
1958
- --m-button-padding-x-medium: calc(
1959
- var(--m-control-padding-x-medium) + var(--m-space-1)
1960
- );
1961
- --m-splitbutton-icon-size: 1rem;
1962
- display: inline-flex;
1963
- position: relative;
1964
- vertical-align: middle;
1965
- }
1966
-
1967
- .m-splitbutton__main,
1968
- .m-splitbutton__trigger {
1969
- align-items: center;
1970
- background: var(--m-color-primary);
1971
- border: var(--m-border-width) solid var(--m-color-primary);
1972
- color: var(--m-color-on-emphasis);
1973
- cursor: pointer;
1974
- display: inline-flex;
1975
- font: inherit;
1976
- font-family: var(--m-font-sans);
1977
- font-size: var(--m-control-font-medium);
1978
- font-weight: 500;
1979
- gap: var(--m-space-2);
1980
- min-height: var(--m-control-height-medium);
1981
- padding: 0 var(--m-button-padding-x-medium);
1982
- transition:
1983
- background-color var(--m-motion-fast) var(--m-motion-ease),
1984
- border-color var(--m-motion-fast) var(--m-motion-ease),
1985
- color var(--m-motion-fast) var(--m-motion-ease),
1986
- box-shadow var(--m-motion-fast) var(--m-motion-ease);
1987
- }
1988
-
1989
- .m-splitbutton__main {
1990
- border-bottom-left-radius: var(--m-radius-control);
1991
- border-top-left-radius: var(--m-radius-control);
1992
- }
1993
-
1994
- .m-splitbutton__trigger {
1995
- border-bottom-right-radius: var(--m-radius-control);
1996
- border-left: var(--m-border-width) solid
1997
- color-mix(
1998
- in srgb,
1999
- var(--m-color-on-emphasis) 35%,
2000
- var(--m-color-primary)
2001
- );
2002
- border-top-right-radius: var(--m-radius-control);
2003
- padding: 0 var(--m-control-padding-x-medium);
2004
- }
2005
-
2006
- .m-splitbutton__main:hover:not(:disabled),
2007
- .m-splitbutton__trigger:hover:not(:disabled) {
2008
- background: var(--m-color-primary-hover);
2009
- border-color: var(--m-color-primary-hover);
2010
- }
2011
-
2012
- .m-splitbutton--outlined .m-splitbutton__main:hover:not(:disabled),
2013
- .m-splitbutton--outlined .m-splitbutton__trigger:hover:not(:disabled) {
2014
- background: color-mix(
2015
- in srgb,
2016
- var(--m-color-primary) 10%,
2017
- transparent
2018
- );
2019
- border-color: var(--m-color-primary);
2020
- }
2021
-
2022
- .m-splitbutton--secondary .m-splitbutton__main:hover:not(:disabled),
2023
- .m-splitbutton--secondary .m-splitbutton__trigger:hover:not(:disabled) {
2024
- background: color-mix(
2025
- in srgb,
2026
- var(--m-color-text-muted) 24%,
2027
- var(--m-color-surface)
2028
- );
2029
- border-color: var(--m-color-border);
2030
- }
2031
-
2032
- .m-splitbutton--danger .m-splitbutton__main:hover:not(:disabled),
2033
- .m-splitbutton--danger .m-splitbutton__trigger:hover:not(:disabled) {
2034
- background: color-mix(in srgb, var(--m-color-danger) 85%, black);
2035
- border-color: color-mix(in srgb, var(--m-color-danger) 85%, black);
2036
- }
2037
-
2038
- .m-splitbutton__main:focus-visible,
2039
- .m-splitbutton__trigger:focus-visible {
2040
- box-shadow: var(--m-focus-shadow);
2041
- outline: none;
2042
- }
2043
-
2044
- .m-splitbutton--outlined .m-splitbutton__main,
2045
- .m-splitbutton--outlined .m-splitbutton__trigger {
2046
- background: transparent;
2047
- color: var(--m-color-primary);
2048
- }
2049
-
2050
- .m-splitbutton--outlined .m-splitbutton__trigger {
2051
- border-left-color: var(--m-color-primary);
2052
- }
2053
-
2054
- .m-splitbutton--secondary .m-splitbutton__main,
2055
- .m-splitbutton--secondary .m-splitbutton__trigger {
2056
- background: color-mix(
2057
- in srgb,
2058
- var(--m-color-text-muted) 16%,
2059
- var(--m-color-surface)
2060
- );
2061
- border-color: var(--m-color-border);
2062
- color: var(--m-color-text);
2063
- }
2064
-
2065
- .m-splitbutton--danger .m-splitbutton__main,
2066
- .m-splitbutton--danger .m-splitbutton__trigger {
2067
- background: var(--m-color-danger);
2068
- border-color: var(--m-color-danger);
2069
- }
2070
-
2071
- .m-splitbutton--small .m-splitbutton__main,
2072
- .m-splitbutton--small .m-splitbutton__trigger {
2073
- --m-splitbutton-icon-size: 0.875rem;
2074
- min-height: var(--m-control-height-small);
2075
- font-size: var(--m-control-font-small);
2076
- }
2077
-
2078
- .m-splitbutton--large .m-splitbutton__main,
2079
- .m-splitbutton--large .m-splitbutton__trigger {
2080
- --m-splitbutton-icon-size: 1.125rem;
2081
- min-height: var(--m-control-height-large);
2082
- font-size: var(--m-control-font-large);
2083
- }
2084
-
2085
- .m-splitbutton__icon {
2086
- align-items: center;
2087
- display: inline-flex;
2088
- flex-shrink: 0;
2089
- height: var(--m-splitbutton-icon-size);
2090
- justify-content: center;
2091
- line-height: 0;
2092
- width: var(--m-splitbutton-icon-size);
2093
- }
2094
-
2095
- .m-splitbutton__icon :is(.m-icon, svg) {
2096
- display: block;
2097
- height: 100%;
2098
- width: 100%;
2099
- }
2100
-
2101
- .m-splitbutton__trigger :is(.m-icon, svg) {
2102
- display: block;
2103
- height: var(--m-splitbutton-icon-size);
2104
- width: var(--m-splitbutton-icon-size);
2105
- }
2106
-
2107
- .m-splitbutton--disabled {
2108
- cursor: not-allowed;
2109
- opacity: var(--m-opacity-disabled);
2110
- pointer-events: none;
2111
- }
2112
-
2113
- .m-splitbutton__item:focus-visible {
2114
- box-shadow: var(--m-focus-shadow);
2115
- outline: none;
2116
- }
2117
-
2118
- .m-splitbutton__menu {
2119
- background: var(--m-color-surface);
2120
- border: var(--m-border-width) solid var(--m-color-border);
2121
- border-radius: var(--m-radius-md);
2122
- box-shadow: var(--m-shadow-md);
2123
- list-style: none;
2124
- margin: var(--m-space-1) 0 0;
2125
- max-width: calc(100vw - 2 * var(--m-space-4));
2126
- min-width: 100%;
2127
- padding: var(--m-space-1);
2128
- position: absolute;
2129
- right: 0;
2130
- top: 100%;
2131
- transform-origin: top right;
2132
- /* Grow with the content: shrink-to-fit would clamp to the button width
2133
- (the containing block) when not teleported. Teleported mode overrides
2134
- min-width with the inline button width. */
2135
- width: max-content;
2136
- z-index: var(--m-z-popper);
2137
- }
2138
-
2139
- .m-splitbutton__menu--teleported {
2140
- margin: 0;
2141
- position: fixed;
2142
- right: auto;
2143
- top: auto;
2144
- z-index: var(--m-z-dropdown);
2145
- }
2146
-
2147
- .m-splitbutton__item {
2148
- background: transparent;
2149
- border: 0;
2150
- border-radius: var(--m-radius-sm);
2151
- color: var(--m-color-text);
2152
- cursor: pointer;
2153
- display: block;
2154
- font: inherit;
2155
- padding: var(--m-space-2) var(--m-space-3);
2156
- text-align: start;
2157
- width: 100%;
2158
- }
2159
-
2160
- .m-splitbutton__item:hover:not(:disabled) {
2161
- background: color-mix(
2162
- in srgb,
2163
- var(--m-color-primary) 10%,
2164
- var(--m-color-surface)
2165
- );
2166
- }
2167
-
2168
- .m-splitbutton__item:disabled {
2169
- cursor: not-allowed;
2170
- opacity: var(--m-opacity-disabled);
2171
- }
1948
+ /* --- Primitive: SplitButton --- */
1949
+ .m-splitbutton {
1950
+ --m-button-padding-x-medium: calc(
1951
+ var(--m-control-padding-x-medium) + var(--m-space-1)
1952
+ );
1953
+ --m-splitbutton-icon-size: 1rem;
1954
+ display: inline-flex;
1955
+ position: relative;
1956
+ vertical-align: middle;
1957
+ }
1958
+
1959
+ .m-splitbutton__main,
1960
+ .m-splitbutton__trigger {
1961
+ align-items: center;
1962
+ background: var(--m-color-primary);
1963
+ border: var(--m-border-width) solid var(--m-color-primary);
1964
+ color: var(--m-color-on-emphasis);
1965
+ cursor: pointer;
1966
+ display: inline-flex;
1967
+ font: inherit;
1968
+ font-family: var(--m-font-sans);
1969
+ font-size: var(--m-control-font-medium);
1970
+ font-weight: 500;
1971
+ gap: var(--m-space-2);
1972
+ min-height: var(--m-control-height-medium);
1973
+ padding: 0 var(--m-button-padding-x-medium);
1974
+ transition:
1975
+ background-color var(--m-motion-fast) var(--m-motion-ease),
1976
+ border-color var(--m-motion-fast) var(--m-motion-ease),
1977
+ color var(--m-motion-fast) var(--m-motion-ease),
1978
+ box-shadow var(--m-motion-fast) var(--m-motion-ease);
1979
+ }
1980
+
1981
+ .m-splitbutton__main {
1982
+ border-bottom-left-radius: var(--m-radius-control);
1983
+ border-top-left-radius: var(--m-radius-control);
1984
+ }
1985
+
1986
+ .m-splitbutton__trigger {
1987
+ border-bottom-right-radius: var(--m-radius-control);
1988
+ border-left: var(--m-border-width) solid
1989
+ color-mix(
1990
+ in srgb,
1991
+ var(--m-color-on-emphasis) 35%,
1992
+ var(--m-color-primary)
1993
+ );
1994
+ border-top-right-radius: var(--m-radius-control);
1995
+ padding: 0 var(--m-control-padding-x-medium);
1996
+ }
1997
+
1998
+ .m-splitbutton__main:hover:not(:disabled),
1999
+ .m-splitbutton__trigger:hover:not(:disabled) {
2000
+ background: var(--m-color-primary-hover);
2001
+ border-color: var(--m-color-primary-hover);
2002
+ }
2003
+
2004
+ .m-splitbutton--outlined .m-splitbutton__main:hover:not(:disabled),
2005
+ .m-splitbutton--outlined .m-splitbutton__trigger:hover:not(:disabled) {
2006
+ background: color-mix(
2007
+ in srgb,
2008
+ var(--m-color-primary) 10%,
2009
+ transparent
2010
+ );
2011
+ border-color: var(--m-color-primary);
2012
+ }
2013
+
2014
+ .m-splitbutton--secondary .m-splitbutton__main:hover:not(:disabled),
2015
+ .m-splitbutton--secondary .m-splitbutton__trigger:hover:not(:disabled) {
2016
+ background: color-mix(
2017
+ in srgb,
2018
+ var(--m-color-text-muted) 24%,
2019
+ var(--m-color-surface)
2020
+ );
2021
+ border-color: var(--m-color-border);
2022
+ }
2023
+
2024
+ .m-splitbutton--danger .m-splitbutton__main:hover:not(:disabled),
2025
+ .m-splitbutton--danger .m-splitbutton__trigger:hover:not(:disabled) {
2026
+ background: color-mix(in srgb, var(--m-color-danger) 85%, black);
2027
+ border-color: color-mix(in srgb, var(--m-color-danger) 85%, black);
2028
+ }
2029
+
2030
+ .m-splitbutton__main:focus-visible,
2031
+ .m-splitbutton__trigger:focus-visible {
2032
+ box-shadow: var(--m-focus-shadow);
2033
+ outline: none;
2034
+ }
2035
+
2036
+ .m-splitbutton--outlined .m-splitbutton__main,
2037
+ .m-splitbutton--outlined .m-splitbutton__trigger {
2038
+ background: transparent;
2039
+ color: var(--m-color-primary);
2040
+ }
2041
+
2042
+ .m-splitbutton--outlined .m-splitbutton__trigger {
2043
+ border-left-color: var(--m-color-primary);
2044
+ }
2045
+
2046
+ .m-splitbutton--secondary .m-splitbutton__main,
2047
+ .m-splitbutton--secondary .m-splitbutton__trigger {
2048
+ background: color-mix(
2049
+ in srgb,
2050
+ var(--m-color-text-muted) 16%,
2051
+ var(--m-color-surface)
2052
+ );
2053
+ border-color: var(--m-color-border);
2054
+ color: var(--m-color-text);
2055
+ }
2056
+
2057
+ .m-splitbutton--danger .m-splitbutton__main,
2058
+ .m-splitbutton--danger .m-splitbutton__trigger {
2059
+ background: var(--m-color-danger);
2060
+ border-color: var(--m-color-danger);
2061
+ }
2062
+
2063
+ .m-splitbutton--small .m-splitbutton__main,
2064
+ .m-splitbutton--small .m-splitbutton__trigger {
2065
+ --m-splitbutton-icon-size: 0.875rem;
2066
+ min-height: var(--m-control-height-small);
2067
+ font-size: var(--m-control-font-small);
2068
+ }
2069
+
2070
+ .m-splitbutton--large .m-splitbutton__main,
2071
+ .m-splitbutton--large .m-splitbutton__trigger {
2072
+ --m-splitbutton-icon-size: 1.125rem;
2073
+ min-height: var(--m-control-height-large);
2074
+ font-size: var(--m-control-font-large);
2075
+ }
2076
+
2077
+ .m-splitbutton__icon {
2078
+ align-items: center;
2079
+ display: inline-flex;
2080
+ flex-shrink: 0;
2081
+ height: var(--m-splitbutton-icon-size);
2082
+ justify-content: center;
2083
+ line-height: 0;
2084
+ width: var(--m-splitbutton-icon-size);
2085
+ }
2086
+
2087
+ .m-splitbutton__icon :is(.m-icon, svg) {
2088
+ display: block;
2089
+ height: 100%;
2090
+ width: 100%;
2091
+ }
2092
+
2093
+ .m-splitbutton__trigger :is(.m-icon, svg) {
2094
+ display: block;
2095
+ height: var(--m-splitbutton-icon-size);
2096
+ width: var(--m-splitbutton-icon-size);
2097
+ }
2098
+
2099
+ .m-splitbutton--disabled {
2100
+ cursor: not-allowed;
2101
+ opacity: var(--m-opacity-disabled);
2102
+ pointer-events: none;
2103
+ }
2104
+
2105
+ .m-splitbutton__item:focus-visible {
2106
+ box-shadow: var(--m-focus-shadow);
2107
+ outline: none;
2108
+ }
2109
+
2110
+ .m-splitbutton__menu {
2111
+ background: var(--m-color-surface);
2112
+ border: var(--m-border-width) solid var(--m-color-border);
2113
+ border-radius: var(--m-radius-md);
2114
+ box-shadow: var(--m-shadow-md);
2115
+ list-style: none;
2116
+ margin: var(--m-space-1) 0 0;
2117
+ max-width: calc(100vw - 2 * var(--m-space-4));
2118
+ min-width: 100%;
2119
+ padding: var(--m-space-1);
2120
+ position: absolute;
2121
+ right: 0;
2122
+ top: 100%;
2123
+ transform-origin: top right;
2124
+ /* Grow with the content: shrink-to-fit would clamp to the button width
2125
+ (the containing block) when not teleported. Teleported mode overrides
2126
+ min-width with the inline button width. */
2127
+ width: max-content;
2128
+ z-index: var(--m-z-popper);
2129
+ }
2130
+
2131
+ .m-splitbutton__menu--teleported {
2132
+ margin: 0;
2133
+ position: fixed;
2134
+ right: auto;
2135
+ top: auto;
2136
+ z-index: var(--m-z-dropdown);
2137
+ }
2138
+
2139
+ .m-splitbutton__item {
2140
+ background: transparent;
2141
+ border: 0;
2142
+ border-radius: var(--m-radius-sm);
2143
+ color: var(--m-color-text);
2144
+ cursor: pointer;
2145
+ display: block;
2146
+ font: inherit;
2147
+ padding: var(--m-space-2) var(--m-space-3);
2148
+ text-align: start;
2149
+ width: 100%;
2150
+ }
2151
+
2152
+ .m-splitbutton__item:hover:not(:disabled) {
2153
+ background: color-mix(
2154
+ in srgb,
2155
+ var(--m-color-primary) 10%,
2156
+ var(--m-color-surface)
2157
+ );
2158
+ }
2159
+
2160
+ .m-splitbutton__item:disabled {
2161
+ cursor: not-allowed;
2162
+ opacity: var(--m-opacity-disabled);
2163
+ }