@md-code/components 0.0.1 → 0.0.2

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 (290) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +67 -1
  3. package/dist/avatar.js +3 -3
  4. package/dist/badge.js +18 -18
  5. package/dist/breadcrumbs.js +47 -47
  6. package/dist/button.js +103 -88
  7. package/dist/calendar.js +63 -62
  8. package/dist/caption.js +14 -0
  9. package/dist/card.js +54 -53
  10. package/dist/carousel.js +87 -72
  11. package/dist/central-modal.js +22 -1
  12. package/dist/chip.js +42 -0
  13. package/dist/circle-image.js +12 -12
  14. package/dist/code-preview.js +28 -28
  15. package/dist/code-view-tokenizer.js +35 -0
  16. package/dist/code-view.js +53 -53
  17. package/dist/containers.js +87 -87
  18. package/dist/diff-legend.js +31 -0
  19. package/dist/div-input.js +48 -46
  20. package/dist/empty.js +12 -0
  21. package/dist/filter-bar.js +15 -0
  22. package/dist/form-label.js +11 -11
  23. package/dist/form.js +6 -6
  24. package/dist/full-screen-modal.js +27 -1
  25. package/dist/header.js +14 -14
  26. package/dist/html-editor.js +49 -42
  27. package/dist/icons.js +24 -26
  28. package/dist/input.js +40 -40
  29. package/dist/link.js +25 -25
  30. package/dist/loading.js +161 -66
  31. package/dist/modals.js +130 -1
  32. package/dist/mono-text.js +16 -0
  33. package/dist/nav-tabs.js +33 -0
  34. package/dist/page-header.js +20 -0
  35. package/dist/pagination.js +80 -80
  36. package/dist/progress-bar.js +19 -19
  37. package/dist/radio.js +58 -57
  38. package/dist/report-ui.js +150 -72
  39. package/dist/row.js +15 -0
  40. package/dist/score-panel.js +125 -0
  41. package/dist/score-pills.js +25 -0
  42. package/dist/search-input.js +62 -56
  43. package/dist/select.js +86 -83
  44. package/dist/separator.js +15 -9
  45. package/dist/slider-field.js +34 -0
  46. package/dist/stack.js +16 -0
  47. package/dist/stat-grid.js +10 -0
  48. package/dist/stat.js +24 -0
  49. package/dist/status-label.js +32 -28
  50. package/dist/status-text.js +13 -0
  51. package/dist/submit.js +41 -41
  52. package/dist/subtle-text.js +14 -0
  53. package/dist/surface.js +39 -0
  54. package/dist/switch.js +70 -69
  55. package/dist/table.js +109 -85
  56. package/dist/tabs.js +121 -120
  57. package/dist/text-checkbox.js +48 -48
  58. package/dist/text-link.js +20 -0
  59. package/dist/textarea.js +41 -41
  60. package/dist/textures.js +100 -100
  61. package/dist/toasts.js +48 -48
  62. package/dist/toggle.js +46 -46
  63. package/dist/token-input-field.js +24 -24
  64. package/dist/tooltip.js +61 -59
  65. package/dist/types/atoms/Breadcrumbs/index.d.ts.map +1 -1
  66. package/dist/types/atoms/Breadcrumbs/styles.d.ts.map +1 -1
  67. package/dist/types/atoms/Calendar/index.d.ts +1 -1
  68. package/dist/types/atoms/Calendar/index.d.ts.map +1 -1
  69. package/dist/types/atoms/Calendar/styles.d.ts.map +1 -1
  70. package/dist/types/atoms/Caption/index.d.ts +9 -0
  71. package/dist/types/atoms/Caption/index.d.ts.map +1 -0
  72. package/dist/types/atoms/Caption/styles.d.ts +9 -0
  73. package/dist/types/atoms/Caption/styles.d.ts.map +1 -0
  74. package/dist/types/atoms/CentralModal/index.d.ts.map +1 -1
  75. package/dist/types/atoms/Chip/index.d.ts +39 -0
  76. package/dist/types/atoms/Chip/index.d.ts.map +1 -0
  77. package/dist/types/atoms/Chip/styles.d.ts +19 -0
  78. package/dist/types/atoms/Chip/styles.d.ts.map +1 -0
  79. package/dist/types/atoms/CircleImage/index.d.ts +2 -2
  80. package/dist/types/atoms/CircleImage/index.d.ts.map +1 -1
  81. package/dist/types/atoms/ConditionalWrapper/index.d.ts +1 -1
  82. package/dist/types/atoms/ConditionalWrapper/index.d.ts.map +1 -1
  83. package/dist/types/atoms/Containers/index.d.ts.map +1 -1
  84. package/dist/types/atoms/Containers/styles.d.ts +4 -4
  85. package/dist/types/atoms/Containers/styles.d.ts.map +1 -1
  86. package/dist/types/atoms/DivInput/index.d.ts.map +1 -1
  87. package/dist/types/atoms/Empty/index.d.ts +10 -0
  88. package/dist/types/atoms/Empty/index.d.ts.map +1 -0
  89. package/dist/types/atoms/Empty/styles.d.ts +9 -0
  90. package/dist/types/atoms/Empty/styles.d.ts.map +1 -0
  91. package/dist/types/atoms/Form/Form.d.ts +2 -2
  92. package/dist/types/atoms/Form/Form.d.ts.map +1 -1
  93. package/dist/types/atoms/Form/index.d.ts +10 -10
  94. package/dist/types/atoms/Form/index.d.ts.map +1 -1
  95. package/dist/types/atoms/FormLabel/index.d.ts +1 -1
  96. package/dist/types/atoms/FormLabel/index.d.ts.map +1 -1
  97. package/dist/types/atoms/FullScreenModal/index.d.ts.map +1 -1
  98. package/dist/types/atoms/Header/index.d.ts.map +1 -1
  99. package/dist/types/atoms/Icons/index.d.ts +29 -8
  100. package/dist/types/atoms/Icons/index.d.ts.map +1 -1
  101. package/dist/types/atoms/Input/index.d.ts +1 -1
  102. package/dist/types/atoms/Input/index.d.ts.map +1 -1
  103. package/dist/types/atoms/Input/styles.d.ts +2 -2
  104. package/dist/types/atoms/Input/styles.d.ts.map +1 -1
  105. package/dist/types/atoms/Link/index.d.ts.map +1 -1
  106. package/dist/types/atoms/Link/styles.d.ts.map +1 -1
  107. package/dist/types/atoms/Loading/index.d.ts +10 -4
  108. package/dist/types/atoms/Loading/index.d.ts.map +1 -1
  109. package/dist/types/atoms/Loading/styles.d.ts +4 -2
  110. package/dist/types/atoms/Loading/styles.d.ts.map +1 -1
  111. package/dist/types/atoms/Logo/index.d.ts.map +1 -1
  112. package/dist/types/atoms/MonoText/index.d.ts +23 -0
  113. package/dist/types/atoms/MonoText/index.d.ts.map +1 -0
  114. package/dist/types/atoms/MonoText/styles.d.ts +13 -0
  115. package/dist/types/atoms/MonoText/styles.d.ts.map +1 -0
  116. package/dist/types/atoms/Pagination/index.d.ts.map +1 -1
  117. package/dist/types/atoms/Pagination/styles.d.ts.map +1 -1
  118. package/dist/types/atoms/ProgressBar/index.d.ts +2 -2
  119. package/dist/types/atoms/ProgressBar/index.d.ts.map +1 -1
  120. package/dist/types/atoms/Radio/index.d.ts +2 -2
  121. package/dist/types/atoms/Radio/index.d.ts.map +1 -1
  122. package/dist/types/atoms/Row/index.d.ts +8 -0
  123. package/dist/types/atoms/Row/index.d.ts.map +1 -0
  124. package/dist/types/atoms/Row/styles.d.ts +9 -0
  125. package/dist/types/atoms/Row/styles.d.ts.map +1 -0
  126. package/dist/types/atoms/Separator/index.d.ts +21 -9
  127. package/dist/types/atoms/Separator/index.d.ts.map +1 -1
  128. package/dist/types/atoms/Separator/styles.d.ts +14 -0
  129. package/dist/types/atoms/Separator/styles.d.ts.map +1 -0
  130. package/dist/types/atoms/Stack/index.d.ts +17 -0
  131. package/dist/types/atoms/Stack/index.d.ts.map +1 -0
  132. package/dist/types/atoms/Stack/styles.d.ts +12 -0
  133. package/dist/types/atoms/Stack/styles.d.ts.map +1 -0
  134. package/dist/types/atoms/Stat/index.d.ts +24 -0
  135. package/dist/types/atoms/Stat/index.d.ts.map +1 -0
  136. package/dist/types/atoms/Stat/styles.d.ts +19 -0
  137. package/dist/types/atoms/Stat/styles.d.ts.map +1 -0
  138. package/dist/types/atoms/StatusText/index.d.ts +17 -0
  139. package/dist/types/atoms/StatusText/index.d.ts.map +1 -0
  140. package/dist/types/atoms/StatusText/styles.d.ts +13 -0
  141. package/dist/types/atoms/StatusText/styles.d.ts.map +1 -0
  142. package/dist/types/atoms/Submit/index.d.ts +2 -2
  143. package/dist/types/atoms/Submit/index.d.ts.map +1 -1
  144. package/dist/types/atoms/SubtleText/index.d.ts +17 -0
  145. package/dist/types/atoms/SubtleText/index.d.ts.map +1 -0
  146. package/dist/types/atoms/SubtleText/styles.d.ts +12 -0
  147. package/dist/types/atoms/SubtleText/styles.d.ts.map +1 -0
  148. package/dist/types/atoms/Surface/index.d.ts +34 -0
  149. package/dist/types/atoms/Surface/index.d.ts.map +1 -0
  150. package/dist/types/atoms/Surface/styles.d.ts +27 -0
  151. package/dist/types/atoms/Surface/styles.d.ts.map +1 -0
  152. package/dist/types/atoms/Switch/index.d.ts.map +1 -1
  153. package/dist/types/atoms/Switch/styles.d.ts.map +1 -1
  154. package/dist/types/atoms/Tabs/index.d.ts +1 -1
  155. package/dist/types/atoms/Tabs/index.d.ts.map +1 -1
  156. package/dist/types/atoms/Tabs/styles.d.ts.map +1 -1
  157. package/dist/types/atoms/TextCheckbox/index.d.ts +1 -1
  158. package/dist/types/atoms/TextCheckbox/index.d.ts.map +1 -1
  159. package/dist/types/atoms/TextLink/index.d.ts +22 -0
  160. package/dist/types/atoms/TextLink/index.d.ts.map +1 -0
  161. package/dist/types/atoms/TextLink/styles.d.ts +15 -0
  162. package/dist/types/atoms/TextLink/styles.d.ts.map +1 -0
  163. package/dist/types/atoms/Textarea/index.d.ts +1 -1
  164. package/dist/types/atoms/Textarea/index.d.ts.map +1 -1
  165. package/dist/types/atoms/Toggle/index.d.ts +1 -1
  166. package/dist/types/atoms/Toggle/index.d.ts.map +1 -1
  167. package/dist/types/atoms/Tooltip/index.d.ts.map +1 -1
  168. package/dist/types/atoms/Tooltip/styles.d.ts.map +1 -1
  169. package/dist/types/atoms/Typography/index.d.ts +1 -1
  170. package/dist/types/atoms/Typography/index.d.ts.map +1 -1
  171. package/dist/types/atoms/Typography/styles.d.ts +8 -4
  172. package/dist/types/atoms/Typography/styles.d.ts.map +1 -1
  173. package/dist/types/atoms/Validation/index.d.ts.map +1 -1
  174. package/dist/types/atoms/Validation/styles.d.ts.map +1 -1
  175. package/dist/types/atoms/WideImage/index.d.ts +4 -4
  176. package/dist/types/atoms/WideImage/index.d.ts.map +1 -1
  177. package/dist/types/molecules/Badge/index.d.ts +1 -1
  178. package/dist/types/molecules/Badge/index.d.ts.map +1 -1
  179. package/dist/types/molecules/Button/index.d.ts +1 -1
  180. package/dist/types/molecules/Button/index.d.ts.map +1 -1
  181. package/dist/types/molecules/Button/styles.d.ts +2 -2
  182. package/dist/types/molecules/Button/styles.d.ts.map +1 -1
  183. package/dist/types/molecules/Card/index.d.ts +2 -2
  184. package/dist/types/molecules/Card/index.d.ts.map +1 -1
  185. package/dist/types/molecules/Card/styles.d.ts +1 -1
  186. package/dist/types/molecules/Card/styles.d.ts.map +1 -1
  187. package/dist/types/molecules/Carousel/index.d.ts +1 -1
  188. package/dist/types/molecules/Carousel/index.d.ts.map +1 -1
  189. package/dist/types/molecules/Carousel/styles.d.ts.map +1 -1
  190. package/dist/types/molecules/Carousel/useIsMobile.d.ts +3 -0
  191. package/dist/types/molecules/Carousel/useIsMobile.d.ts.map +1 -0
  192. package/dist/types/molecules/CodeView/highlight.d.ts.map +1 -1
  193. package/dist/types/molecules/CodeView/index.d.ts +5 -5
  194. package/dist/types/molecules/CodeView/index.d.ts.map +1 -1
  195. package/dist/types/molecules/CodeView/styles.d.ts.map +1 -1
  196. package/dist/types/molecules/CodeView/tokenizer.d.ts +21 -0
  197. package/dist/types/molecules/CodeView/tokenizer.d.ts.map +1 -0
  198. package/dist/types/molecules/DiffLegend/index.d.ts +20 -0
  199. package/dist/types/molecules/DiffLegend/index.d.ts.map +1 -0
  200. package/dist/types/molecules/DiffLegend/styles.d.ts +19 -0
  201. package/dist/types/molecules/DiffLegend/styles.d.ts.map +1 -0
  202. package/dist/types/molecules/FilterBar/index.d.ts +20 -0
  203. package/dist/types/molecules/FilterBar/index.d.ts.map +1 -0
  204. package/dist/types/molecules/FilterBar/styles.d.ts +15 -0
  205. package/dist/types/molecules/FilterBar/styles.d.ts.map +1 -0
  206. package/dist/types/molecules/HtmlEditor/index.d.ts.map +1 -1
  207. package/dist/types/molecules/HtmlEditor/styles.d.ts.map +1 -1
  208. package/dist/types/molecules/NavTabs/index.d.ts +24 -0
  209. package/dist/types/molecules/NavTabs/index.d.ts.map +1 -0
  210. package/dist/types/molecules/NavTabs/styles.d.ts +15 -0
  211. package/dist/types/molecules/NavTabs/styles.d.ts.map +1 -0
  212. package/dist/types/molecules/PageHeader/index.d.ts +15 -0
  213. package/dist/types/molecules/PageHeader/index.d.ts.map +1 -0
  214. package/dist/types/molecules/PageHeader/styles.d.ts +13 -0
  215. package/dist/types/molecules/PageHeader/styles.d.ts.map +1 -0
  216. package/dist/types/molecules/ScorePanel/index.d.ts +70 -0
  217. package/dist/types/molecules/ScorePanel/index.d.ts.map +1 -0
  218. package/dist/types/molecules/ScorePanel/styles.d.ts +63 -0
  219. package/dist/types/molecules/ScorePanel/styles.d.ts.map +1 -0
  220. package/dist/types/molecules/ScorePills/index.d.ts +25 -0
  221. package/dist/types/molecules/ScorePills/index.d.ts.map +1 -0
  222. package/dist/types/molecules/ScorePills/styles.d.ts +8 -0
  223. package/dist/types/molecules/ScorePills/styles.d.ts.map +1 -0
  224. package/dist/types/molecules/SearchInput/index.d.ts +2 -2
  225. package/dist/types/molecules/SearchInput/index.d.ts.map +1 -1
  226. package/dist/types/molecules/SearchInput/styles.d.ts +5 -5
  227. package/dist/types/molecules/SearchInput/styles.d.ts.map +1 -1
  228. package/dist/types/molecules/Select/index.d.ts.map +1 -1
  229. package/dist/types/molecules/Select/styles.d.ts.map +1 -1
  230. package/dist/types/molecules/SliderField/index.d.ts +26 -0
  231. package/dist/types/molecules/SliderField/index.d.ts.map +1 -0
  232. package/dist/types/molecules/SliderField/styles.d.ts +20 -0
  233. package/dist/types/molecules/SliderField/styles.d.ts.map +1 -0
  234. package/dist/types/molecules/StatGrid/index.d.ts +12 -0
  235. package/dist/types/molecules/StatGrid/index.d.ts.map +1 -0
  236. package/dist/types/molecules/StatGrid/styles.d.ts +9 -0
  237. package/dist/types/molecules/StatGrid/styles.d.ts.map +1 -0
  238. package/dist/types/molecules/StatusLabel/index.d.ts +1 -1
  239. package/dist/types/molecules/StatusLabel/index.d.ts.map +1 -1
  240. package/dist/types/molecules/StatusLabel/styles.d.ts.map +1 -1
  241. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts +1 -1
  242. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts.map +1 -1
  243. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts +13 -0
  244. package/dist/types/molecules/Table/TableCels/ContentCell.d.ts.map +1 -0
  245. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts +1 -1
  246. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts.map +1 -1
  247. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts +4 -4
  248. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts.map +1 -1
  249. package/dist/types/molecules/Table/TableCels/TextCell.d.ts +3 -3
  250. package/dist/types/molecules/Table/TableCels/TextCell.d.ts.map +1 -1
  251. package/dist/types/molecules/Table/TableCels/index.d.ts +7 -6
  252. package/dist/types/molecules/Table/TableCels/index.d.ts.map +1 -1
  253. package/dist/types/molecules/Table/TableCels/styles.d.ts +25 -2
  254. package/dist/types/molecules/Table/TableCels/styles.d.ts.map +1 -1
  255. package/dist/types/molecules/Table/index.d.ts +16 -5
  256. package/dist/types/molecules/Table/index.d.ts.map +1 -1
  257. package/dist/types/molecules/Table/styles.d.ts +11 -1
  258. package/dist/types/molecules/Table/styles.d.ts.map +1 -1
  259. package/dist/types/molecules/TokenInputField/index.d.ts.map +1 -1
  260. package/dist/types/shared/modals/index.d.ts +4 -4
  261. package/dist/types/shared/modals/index.d.ts.map +1 -1
  262. package/dist/types/shared/modals/styles.d.ts.map +1 -1
  263. package/dist/types/shared/modals/useModal.d.ts.map +1 -1
  264. package/dist/types/shared/report-ui/DecisionPanel.d.ts +1 -1
  265. package/dist/types/shared/report-ui/DecisionPanel.d.ts.map +1 -1
  266. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts.map +1 -1
  267. package/dist/types/shared/report-ui/Pagination.d.ts +13 -0
  268. package/dist/types/shared/report-ui/Pagination.d.ts.map +1 -0
  269. package/dist/types/shared/report-ui/Pagination.styles.d.ts +13 -0
  270. package/dist/types/shared/report-ui/Pagination.styles.d.ts.map +1 -0
  271. package/dist/types/shared/report-ui/Shell.styles.d.ts.map +1 -1
  272. package/dist/types/shared/report-ui/index.d.ts +7 -5
  273. package/dist/types/shared/report-ui/index.d.ts.map +1 -1
  274. package/dist/types/shared/report-ui/ui.d.ts +1 -1
  275. package/dist/types/shared/report-ui/ui.d.ts.map +1 -1
  276. package/dist/types/shared/report-ui/ui.styles.d.ts.map +1 -1
  277. package/dist/types/shared/toasts/index.d.ts +2 -2
  278. package/dist/types/shared/toasts/index.d.ts.map +1 -1
  279. package/dist/types/textures/Cloud/index.d.ts +4 -4
  280. package/dist/types/textures/Cloud/index.d.ts.map +1 -1
  281. package/dist/types/textures/Paper/index.d.ts.map +1 -1
  282. package/dist/types/textures/index.d.ts +3 -3
  283. package/dist/types/textures/index.d.ts.map +1 -1
  284. package/dist/typography.js +71 -70
  285. package/dist/validation.js +15 -15
  286. package/dist/wide-image.js +39 -36
  287. package/package.json +2099 -443
  288. package/dist/CentralModal-ButM9Ggi.js +0 -159
  289. package/dist/dist-DD9Lv2Ja.js +0 -130
  290. package/dist/themes-zS3KQYdw-DIqyzjFD.js +0 -184
package/dist/submit.js CHANGED
@@ -1,57 +1,57 @@
1
- import { a as e, r as t } from "./dist-DD9Lv2Ja.js";
2
1
  import "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import r from "styled-components";
2
+ import e from "styled-components";
3
+ import { withOffsetBottom as t, withOffsetsRight as n } from "@md-code/styles";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  // atoms/Submit/index.tsx
6
- var i = r.input`
7
- display: block;
8
- ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
9
- height: ${({ theme: e }) => e.elements.form.height};
10
- margin-right: ${t};
11
- margin-bottom: ${e};
12
- padding: ${({ theme: e }) => `${e.offsets.elementContent} calc(${e.offsets.elementContent} * 2)`};
13
- color: ${({ theme: e }) => e.colors.highlightedContent};
14
- font-family: ${({ theme: e }) => e.font.family.text};
15
- font-size: ${({ theme: e }) => e.font.sizes.regular};
16
- font-weight: ${({ theme: e }) => e.font.weight.text};
17
- text-transform: ${({ theme: e }) => e.font.transform.text};
18
- letter-spacing: ${({ theme: e }) => e.font.spacing};
19
- background-color: ${({ theme: e }) => e.colors.highlighted};
6
+ var i = e.input`
7
+ display: block;
8
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
9
+ height: ${({ theme: e }) => e.elements.form.height};
10
+ margin-right: ${n};
11
+ margin-bottom: ${t};
12
+ padding: ${({ theme: e }) => `${e.offsets.elementContent} calc(${e.offsets.elementContent} * 2)`};
13
+ color: ${({ theme: e }) => e.colors.highlightedContent};
14
+ font-family: ${({ theme: e }) => e.font.family.text};
15
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
16
+ font-weight: ${({ theme: e }) => e.font.weight.text};
17
+ text-transform: ${({ theme: e }) => e.font.transform.text};
18
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
19
+ background-color: ${({ theme: e }) => e.colors.highlighted};
20
20
 
21
- /*
21
+ /*
22
22
  * One texture string handed to both texture properties (README §4.1, §5.3):
23
23
  * noise lands in background-image, glass blur in backdrop-filter.
24
24
  */
25
- background-image: ${({ theme: e }) => e.effects.texture};
26
- backdrop-filter: ${({ theme: e }) => e.effects.texture};
27
- border: none;
28
- border-radius: ${({ theme: e }) => e.border.radius};
29
- clip-path: ${({ theme: e }) => e.geometry.shape};
30
- box-shadow: ${({ theme: e }) => e.shadows.section};
31
- cursor: pointer;
32
- position: relative;
33
- transition: all ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
25
+ background-image: ${({ theme: e }) => e.effects.texture};
26
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
27
+ border: none;
28
+ border-radius: ${({ theme: e }) => e.border.radius};
29
+ clip-path: ${({ theme: e }) => e.geometry.shape};
30
+ box-shadow: ${({ theme: e }) => e.shadows.section};
31
+ cursor: pointer;
32
+ position: relative;
33
+ transition: all ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
34
34
 
35
- &:hover {
36
- ${({ theme: e }) => e.effects.interaction.hover}
37
- }
35
+ &:hover {
36
+ ${({ theme: e }) => e.effects.interaction.hover}
37
+ }
38
38
 
39
- &:active {
40
- ${({ theme: e }) => e.effects.interaction.active}
41
- }
39
+ &:active {
40
+ ${({ theme: e }) => e.effects.interaction.active}
41
+ }
42
42
 
43
- &:focus-visible {
44
- ${({ theme: e }) => e.effects.interaction.focus}
45
- }
43
+ &:focus-visible {
44
+ ${({ theme: e }) => e.effects.interaction.focus}
45
+ }
46
46
 
47
- &:disabled {
48
- ${({ theme: e }) => e.effects.interaction.disabled}
49
- }
50
- `, a = ({ $offsetBottom: e, $offsetRight: t, $fullWidth: r, ...a }) => /* @__PURE__ */ n(i, {
47
+ &:disabled {
48
+ ${({ theme: e }) => e.effects.interaction.disabled}
49
+ }
50
+ `, a = ({ $offsetBottom: e, $offsetRight: t, $fullWidth: n, ...a }) => /* @__PURE__ */ r(i, {
51
51
  ...a,
52
52
  $offsetBottom: e,
53
53
  $offsetRight: t,
54
- $fullWidth: r,
54
+ $fullWidth: n,
55
55
  type: "submit"
56
56
  });
57
57
  export { a as Submit };
@@ -0,0 +1,14 @@
1
+ import "react";
2
+ import e from "styled-components";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/SubtleText/styles.ts
5
+ var n = e.span`
6
+ color: ${({ theme: e }) => e.colors.status?.faint?.content ?? e.colors.sectionContent};
7
+ font-size: ${({ theme: e }) => e.font.sizes.small};
8
+ ${({ $grow: e }) => e ? "flex: 1 1 0;\n min-width: 0;\n overflow-wrap: anywhere;" : ""}
9
+ `, r = ({ $grow: e, children: r, ...i }) => /* @__PURE__ */ t(n, {
10
+ $grow: e,
11
+ ...i,
12
+ children: r
13
+ });
14
+ export { r as SubtleText };
@@ -0,0 +1,39 @@
1
+ import "react";
2
+ import e, { ThemeProvider as t } from "styled-components";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ // atoms/Surface/styles.ts
5
+ var i = e.section`
6
+ background: ${({ theme: e }) => e.colors.section};
7
+ border: ${({ theme: e }) => e.border.size} solid
8
+ ${({ theme: e }) => e.colors.status?.edge?.background ?? e.colors.highlighted};
9
+ border-radius: ${({ theme: e }) => e.border.radius};
10
+ padding: ${({ theme: e }) => e.offsets.section};
11
+ min-width: 0;
12
+ max-width: 100%;
13
+ ${({ theme: e, $status: t }) => t ? `border-left: calc(${e.border.size} * 3) solid ${e.colors.status?.[t]?.content ?? e.colors.highlighted};` : ""}
14
+ `, a = e.header`
15
+ display: flex;
16
+ align-items: baseline;
17
+ flex-wrap: wrap;
18
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
19
+ margin-bottom: ${({ theme: e }) => e.offsets.betweenElements};
20
+ min-width: 0;
21
+ `, o = e.h2`
22
+ font-size: ${({ theme: e }) => e.font.sizes.large};
23
+ font-weight: ${({ theme: e }) => e.font.weight.title};
24
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
25
+ margin: 0;
26
+ flex: 1 1 auto;
27
+ min-width: 0;
28
+ overflow-wrap: anywhere;
29
+ `, s = ({ heading: e, actions: s, $status: c, theme: l, children: u }) => {
30
+ let d = /* @__PURE__ */ r(i, {
31
+ $status: c,
32
+ children: [e || s ? /* @__PURE__ */ r(a, { children: [e ? /* @__PURE__ */ n(o, { children: e }) : null, s] }) : null, u]
33
+ });
34
+ return l ? /* @__PURE__ */ n(t, {
35
+ theme: l,
36
+ children: d
37
+ }) : d;
38
+ };
39
+ export { s as Surface };
package/dist/switch.js CHANGED
@@ -1,98 +1,99 @@
1
1
  import "react";
2
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
- import n from "styled-components";
2
+ import e from "styled-components";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
4
  // atoms/Switch/styles.ts
5
- var r = n.label`
6
- position: relative;
7
- display: inline-block;
8
- width: calc(${({ theme: e }) => e.elements.form.height} * 0.88);
9
- height: calc(${({ theme: e }) => e.elements.form.height} * 0.48);
10
- cursor: pointer;
11
- background-color: ${({ theme: e }) => e.colors.overlay};
5
+ var r = e.label`
6
+ position: relative;
7
+ display: inline-block;
8
+ width: calc(${({ theme: e }) => e.elements.form.height} * 0.88);
9
+ height: calc(${({ theme: e }) => e.elements.form.height} * 0.48);
10
+ cursor: pointer;
11
+ background-color: ${({ theme: e }) => e.colors.overlay};
12
12
 
13
- /*
13
+ /*
14
14
  * One texture string per theme handed to both texture properties (README
15
15
  * §4.1, §5.3): the track keeps a noise url() or a glass blur(), whichever its
16
16
  * theme supplies, without a name check.
17
17
  */
18
- background-image: ${({ theme: e }) => e.effects.texture};
19
- backdrop-filter: ${({ theme: e }) => e.effects.texture};
20
- /*
18
+ background-image: ${({ theme: e }) => e.effects.texture};
19
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
20
+
21
+ /*
21
22
  * One shared mute for every muted border in the form wave: 25% of the
22
23
  * content colour over the surface matches the legacy disabled outline
23
24
  * (#374b4e on #0b0e0f) without reading a legacy palette token (§5.1).
24
25
  */
25
- border: ${({ theme: e }) => e.border.size} solid
26
- color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
27
- border-radius: ${({ theme: e }) => e.border.radius};
28
- clip-path: ${({ theme: e }) => e.geometry.shape};
29
- transition: background-color ${({ theme: e }) => e.animation.speed.slow} ${({ theme: e }) => e.animation.easing.standard};
26
+ border: ${({ theme: e }) => e.border.size} solid
27
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
28
+ border-radius: ${({ theme: e }) => e.border.radius};
29
+ clip-path: ${({ theme: e }) => e.geometry.shape};
30
+ transition: background-color ${({ theme: e }) => e.animation.speed.slow}
31
+ ${({ theme: e }) => e.animation.easing.standard};
30
32
 
31
- &:hover {
32
- ${({ theme: e }) => e.effects.interaction.hover}
33
- }
34
- `, i = n.input`
35
- opacity: 0;
36
- width: 0;
37
- height: 0;
33
+ &:hover {
34
+ ${({ theme: e }) => e.effects.interaction.hover}
35
+ }
36
+ `, i = e.input`
37
+ opacity: 0;
38
+ width: 0;
39
+ height: 0;
38
40
 
39
- &:checked + .switch-slider {
40
- background-color: ${({ theme: e }) => e.colors.highlighted};
41
- }
41
+ &:checked + .switch-slider {
42
+ background-color: ${({ theme: e }) => e.colors.highlighted};
43
+ }
42
44
 
43
- &:focus + .switch-slider {
44
- box-shadow: ${({ theme: e }) => e.shadows.section};
45
- }
45
+ &:focus + .switch-slider {
46
+ box-shadow: ${({ theme: e }) => e.shadows.section};
47
+ }
46
48
 
47
- &:checked + .switch-slider::before {
48
- transform: translateX(
49
- calc(${({ theme: e }) => e.elements.form.height} * 0.4)
50
- );
51
- }
52
- `, a = n.span`
53
- position: absolute;
54
- inset: 0;
55
- background-color: transparent;
56
- transition: background-color ${({ theme: e }) => e.animation.speed.slow} ${({ theme: e }) => e.animation.easing.standard};
57
- border-radius: ${({ theme: e }) => e.border.radius};
49
+ &:checked + .switch-slider::before {
50
+ transform: translateX(calc(${({ theme: e }) => e.elements.form.height} * 0.4));
51
+ }
52
+ `, a = e.span`
53
+ position: absolute;
54
+ inset: 0;
55
+ background-color: transparent;
56
+ transition: background-color ${({ theme: e }) => e.animation.speed.slow}
57
+ ${({ theme: e }) => e.animation.easing.standard};
58
+ border-radius: ${({ theme: e }) => e.border.radius};
58
59
 
59
- /* The Knob */
60
- &::before {
61
- position: absolute;
62
- content: "";
63
- height: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
64
- width: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
65
- left: ${({ theme: e }) => e.offsets.elementContent};
66
- bottom: ${({ theme: e }) => e.offsets.elementContent};
67
- background-color: ${({ theme: e }) => e.colors.sectionContent};
68
- transition: transform ${({ theme: e }) => e.animation.speed.slow} ${({ theme: e }) => e.animation.easing.standard};
69
- border-radius: 50%;
70
- }
71
- `, o = n.div`
72
- display: flex;
73
- align-items: center;
74
- gap: ${({ theme: e }) => e.offsets.betweenElements};
75
- `, s = n.span`
76
- font-family: ${({ theme: e }) => e.font.family.text};
77
- font-size: ${({ theme: e }) => e.font.sizes.regular};
78
- color: ${({ theme: e }) => e.colors.sectionContent};
79
- `, c = ({ checked: n, onChange: c, leftLabel: l, rightLabel: u, size: d = "default", className: f }) => /* @__PURE__ */ t(o, {
60
+ /* The Knob */
61
+ &::before {
62
+ position: absolute;
63
+ content: "";
64
+ height: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
65
+ width: calc(${({ theme: e }) => e.elements.form.height} * 0.4);
66
+ left: ${({ theme: e }) => e.offsets.elementContent};
67
+ bottom: ${({ theme: e }) => e.offsets.elementContent};
68
+ background-color: ${({ theme: e }) => e.colors.sectionContent};
69
+ transition: transform ${({ theme: e }) => e.animation.speed.slow} ${({ theme: e }) => e.animation.easing.standard};
70
+ border-radius: 50%;
71
+ }
72
+ `, o = e.div`
73
+ display: flex;
74
+ align-items: center;
75
+ gap: ${({ theme: e }) => e.offsets.betweenElements};
76
+ `, s = e.span`
77
+ font-family: ${({ theme: e }) => e.font.family.text};
78
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
79
+ color: ${({ theme: e }) => e.colors.sectionContent};
80
+ `, c = ({ checked: e, onChange: c, leftLabel: l, rightLabel: u, size: d = "default", className: f }) => /* @__PURE__ */ n(o, {
80
81
  className: f,
81
82
  children: [
82
- l && /* @__PURE__ */ e(s, { children: l }),
83
- /* @__PURE__ */ t(r, {
83
+ l && /* @__PURE__ */ t(s, { children: l }),
84
+ /* @__PURE__ */ n(r, {
84
85
  $size: d,
85
- children: [/* @__PURE__ */ e(i, {
86
+ children: [/* @__PURE__ */ t(i, {
86
87
  type: "checkbox",
87
- checked: n,
88
+ checked: e,
88
89
  onChange: (e) => c(e.target.checked),
89
90
  $size: d
90
- }), /* @__PURE__ */ e(a, {
91
+ }), /* @__PURE__ */ t(a, {
91
92
  className: "switch-slider",
92
93
  $size: d
93
94
  })]
94
95
  }),
95
- u && /* @__PURE__ */ e(s, { children: u })
96
+ u && /* @__PURE__ */ t(s, { children: u })
96
97
  ]
97
98
  });
98
99
  export { c as Switch };
package/dist/table.js CHANGED
@@ -1,46 +1,59 @@
1
1
  import "react";
2
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { Select as e } from "@md-code/components/select";
3
+ import { Pagination as t } from "@md-code/components/pagination";
3
4
  import n from "styled-components";
4
- import { Select as r } from "@md-code/components/select";
5
- import { SubTitle as i } from "@md-code/components/typography";
6
- import { Pagination as a } from "@md-code/components/pagination";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
6
  // molecules/Table/TableCels/styles.ts
8
- var o = n.div`
9
- padding: ${({ theme: e }) => e.offsets.elementContent};
10
- display: flex;
11
- align-items: center;
12
- justify-content: ${({ $align: e }) => e === "center" ? "center" : e === "right" ? "flex-end" : "flex-start"};
13
- color: inherit;
7
+ var a = n.div`
8
+ padding: ${({ theme: e }) => e.offsets.elementContent};
9
+ font-size: inherit;
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: ${({ $align: e }) => e === "center" ? "center" : e === "right" ? "flex-end" : "flex-start"};
13
+ color: inherit;
14
+ grid-column: ${({ $spanAll: e }) => e ? "1 / -1" : "auto"};
14
15
 
15
- a {
16
- color: inherit;
17
- text-decoration: underline;
18
- opacity: 0.8;
16
+ a {
17
+ text-decoration: underline;
18
+ }
19
19
 
20
- &:hover {
21
- opacity: 1;
22
- }
23
- }
24
- `, s = n.th`
25
- padding: ${({ theme: e }) => e.offsets.elementContent};
26
- text-align: ${({ $align: e }) => e || "left"};
27
- font-weight: 600;
28
- color: ${({ theme: e }) => e.colors.sectionContent};
29
- border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
20
+ /*
21
+ * The dense row (a grid carrying the data-size attribute set to "small"): the
22
+ * cell's text takes the zone's regular step instead of the page's body size,
23
+ * which is what makes a long list dense without touching any other screen's
24
+ * cells. The attribute is the whole contract between a grid and its cells —
25
+ * the cell names no grid, so a cell outside such a grid stays as it is.
26
+ */
27
+ [data-size="small"] & {
28
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
29
+ }
30
+ `, o = n.th`
31
+ padding: ${({ theme: e }) => e.offsets.elementContent};
32
+ text-align: ${({ $align: e }) => e || "left"};
33
+ font-weight: ${({ theme: e }) => e.font.weight.text};
34
+ color: ${({ theme: e }) => e.colors.sectionContent};
35
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
36
+ `, s = n(o)`
37
+ position: sticky;
38
+ top: 0;
39
+ z-index: ${({ theme: e }) => e.zIndex.overlay};
30
40
  `;
31
- n(o)`
32
- white-space: nowrap;
33
- overflow: hidden;
34
- text-overflow: ellipsis;
35
- display: block;
41
+ n(a)`
42
+ white-space: nowrap;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ display: block;
36
46
  `;
37
47
  // molecules/Table/styles.ts
38
48
  var c = n.div`
39
- display: grid;
40
- grid-template-columns: ${({ $colsTemplate: e }) => e};
41
- width: 100%;
42
- background-color: ${({ theme: e }) => e.colors.section};
43
- /*
49
+ overflow-x: auto;
50
+ `, l = n.div`
51
+ display: grid;
52
+ grid-template-columns: ${({ $colsTemplate: e }) => e};
53
+ width: 100%;
54
+ background-color: ${({ theme: e }) => e.colors.section};
55
+
56
+ /*
44
57
  * effects.texture is one string per theme (README §4.1, §5.3): noise themes
45
58
  * supply a url() for background-image, glass themes supply blur() for
46
59
  * backdrop-filter. The grid cannot know which theme is active, so it hands
@@ -49,60 +62,71 @@ var c = n.div`
49
62
  * none, and url() left in backdrop-filter is visually inert — verified in
50
63
  * Chromium). Both themes therefore texture the grid without a name check.
51
64
  */
52
- background-image: ${({ theme: e }) => e.effects.texture};
53
- backdrop-filter: ${({ theme: e }) => e.effects.texture};
54
- border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
55
- border-radius: ${({ theme: e }) => e.border.radius};
56
- box-shadow: ${({ theme: e }) => e.shadows.section};
57
- overflow: hidden;
65
+ background-image: ${({ theme: e }) => e.effects.texture};
66
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
67
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
68
+ border-radius: ${({ theme: e }) => e.border.radius};
69
+ box-shadow: ${({ theme: e }) => e.shadows.section};
70
+ /* clip keeps the radius a clipping shape without making the grid a scroll
71
+ container, so a sticky header still rides the page scroll. */
72
+ overflow: clip;
58
73
 
59
- /* The header sits on the same section surface; a content-colour underline
74
+ /* The header sits on the same section surface; a content-colour underline
60
75
  separates it from the body (В1, В3). */
61
- .header-cell {
62
- background-color: ${({ theme: e }) => e.colors.section};
63
- color: ${({ theme: e }) => e.colors.sectionContent};
64
- font-family: ${({ theme: e }) => e.font.family.title};
65
- font-weight: 600;
66
- text-transform: uppercase;
67
- font-size: ${({ theme: e }) => e.font.sizes.small};
68
- letter-spacing: ${({ theme: e }) => e.font.spacing};
69
- border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
70
- padding: ${({ theme: e }) => e.offsets.elementContent};
71
- }
76
+ .header-cell {
77
+ background-color: ${({ theme: e }) => e.colors.section};
78
+ color: ${({ theme: e }) => e.colors.sectionContent};
79
+ font-family: ${({ theme: e }) => e.font.family.title};
80
+ font-weight: ${({ theme: e }) => e.font.weight.text};
81
+ text-transform: uppercase;
82
+ font-size: ${({ theme: e }) => e.font.sizes.small};
83
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
84
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
85
+ padding: ${({ theme: e }) => e.offsets.elementContent};
86
+ }
72
87
 
73
- /* Each body row is separated by a content-colour rule; hover dims it with
88
+ /* Each body row is separated by a content-colour rule; hover dims it with
74
89
  the overlay layer. */
75
- & > div:not(.header-cell) {
76
- border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
77
- transition: background ${({ theme: e }) => e.animation.speed.normal} ${({ theme: e }) => e.animation.easing.standard};
78
- }
90
+ & > div:not(.header-cell) {
91
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
92
+ transition: background ${({ theme: e }) => e.animation.speed.normal}
93
+ ${({ theme: e }) => e.animation.easing.standard};
94
+ }
79
95
 
80
- & > div:not(.header-cell):hover {
81
- background-color: ${({ theme: e }) => e.colors.overlay};
82
- }
83
- `, l = n.div`
84
- display: flex;
85
- justify-content: flex-end;
86
- padding: ${({ theme: e }) => e.offsets.elementContent} 0;
87
- gap: ${({ theme: e }) => e.offsets.elementContent};
88
- align-items: center;
89
- `, u = ({ children: n, headerCols: o, colsTemplate: u, pagination: d, rowsPerPage: f }) => /* @__PURE__ */ t("div", { children: [/* @__PURE__ */ t(c, {
90
- $colsTemplate: u,
91
- children: [o?.map(({ text: n, sort: r = () => {}, isSortable: a, align: o }) => /* @__PURE__ */ t(s, {
92
- onClick: r,
93
- $align: o,
94
- className: "header-cell",
95
- children: [/* @__PURE__ */ e(i, { children: n }), a && "⟠"]
96
- }, n)), n]
97
- }), (d || f) && /* @__PURE__ */ t(l, { children: [d && /* @__PURE__ */ e(a, {
98
- totalPages: d.totalPages,
99
- currentPage: d.current,
100
- onPageChange: (e) => d.changePage(e)
101
- }), f && /* @__PURE__ */ e(r, {
102
- value: f.options[0],
103
- options: f.options,
104
- onChange: (e) => {
105
- e && f?.changeElementsPerPage(Number(e.value));
96
+ & > div:not(.header-cell):hover {
97
+ background-color: ${({ theme: e }) => e.colors.overlay};
106
98
  }
107
- })] })] });
108
- export { u as default };
99
+ `, u = n.div`
100
+ display: flex;
101
+ justify-content: flex-end;
102
+ padding: ${({ theme: e }) => e.offsets.elementContent} 0;
103
+ gap: ${({ theme: e }) => e.offsets.elementContent};
104
+ align-items: center;
105
+ `, d = ({ children: e, align: t, $spanAll: n }) => /* @__PURE__ */ r(a, {
106
+ $align: t,
107
+ $spanAll: n,
108
+ children: e
109
+ }), f = ({ children: n, headerCols: a, colsTemplate: d, pagination: f, rowsPerPage: p, scroll: m = !1, stickyHeader: h = !1, size: g = "regular" }) => {
110
+ let _ = (e) => {
111
+ e && p?.changeElementsPerPage(Number(e.value));
112
+ }, v = h ? s : o, y = /* @__PURE__ */ i(l, {
113
+ $colsTemplate: d,
114
+ "data-size": g,
115
+ children: [a?.map(({ text: e, sort: t = () => {}, isSortable: n, align: r }) => /* @__PURE__ */ i(v, {
116
+ onClick: t,
117
+ $align: r,
118
+ className: "header-cell",
119
+ children: [e, n && "⟠"]
120
+ }, e)), n]
121
+ });
122
+ return /* @__PURE__ */ i("div", { children: [m ? /* @__PURE__ */ r(c, { children: y }) : y, (f || p) && /* @__PURE__ */ i(u, { children: [f && /* @__PURE__ */ r(t, {
123
+ totalPages: f.totalPages,
124
+ currentPage: f.current,
125
+ onPageChange: (e) => f.changePage(e)
126
+ }), p && /* @__PURE__ */ r(e, {
127
+ value: p.options[0],
128
+ options: p.options,
129
+ onChange: _
130
+ })] })] });
131
+ };
132
+ export { d as ContentCell, f as default };