@md-code/components 0.0.0-stage → 0.0.1

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 (238) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +11 -2
  3. package/dist/CentralModal-ButM9Ggi.js +159 -0
  4. package/dist/assets/favicon.ico +0 -0
  5. package/dist/assets/logo.png +0 -0
  6. package/dist/atoms/Loading/ouroboros.svg +41 -0
  7. package/dist/atoms/Logo/logo.jpg +0 -0
  8. package/dist/avatar.js +8 -0
  9. package/dist/badge.js +25 -0
  10. package/dist/breadcrumbs.js +60 -0
  11. package/dist/button.js +188 -0
  12. package/dist/calendar.js +100 -0
  13. package/dist/card.js +81 -0
  14. package/dist/carousel.js +110 -0
  15. package/dist/central-modal.js +1 -0
  16. package/dist/circle-image.js +22 -0
  17. package/dist/code-preview.js +38 -0
  18. package/dist/code-view.js +96 -0
  19. package/dist/conditional-wrapper.js +5 -0
  20. package/dist/containers.js +115 -0
  21. package/dist/dist-DD9Lv2Ja.js +130 -0
  22. package/dist/div-input.js +101 -0
  23. package/dist/form-label.js +19 -0
  24. package/dist/form.js +17 -0
  25. package/dist/full-screen-modal.js +1 -0
  26. package/dist/header.js +19 -0
  27. package/dist/html-editor.js +74 -0
  28. package/dist/icons.js +44 -0
  29. package/dist/input.js +62 -0
  30. package/dist/link.js +35 -0
  31. package/dist/loading.js +87 -0
  32. package/dist/logo.js +12 -0
  33. package/dist/modals.js +1 -0
  34. package/dist/molecules/Carousel/arrow.svg +5 -0
  35. package/dist/molecules/Select/arrow_down.svg +3 -0
  36. package/dist/pagination.js +119 -0
  37. package/dist/progress-bar.js +26 -0
  38. package/dist/radio.js +72 -0
  39. package/dist/report-ui.js +280 -0
  40. package/dist/search-input.js +78 -0
  41. package/dist/select.js +161 -0
  42. package/dist/separator.js +10 -0
  43. package/dist/status-label.js +59 -0
  44. package/dist/submit.js +57 -0
  45. package/dist/switch.js +98 -0
  46. package/dist/table.js +108 -0
  47. package/dist/tabs.js +155 -0
  48. package/dist/text-checkbox.js +64 -0
  49. package/dist/textarea.js +56 -0
  50. package/dist/textures/Cloud/clouds.svg +52 -0
  51. package/dist/textures.js +170 -0
  52. package/dist/themes-zS3KQYdw-DIqyzjFD.js +184 -0
  53. package/dist/toasts.js +79 -0
  54. package/dist/toggle.js +66 -0
  55. package/dist/token-input-field.js +56 -0
  56. package/dist/tooltip.js +93 -0
  57. package/dist/types/atoms/Avatar/index.d.ts +6 -0
  58. package/dist/types/atoms/Avatar/index.d.ts.map +1 -0
  59. package/dist/types/atoms/Breadcrumbs/index.d.ts +10 -0
  60. package/dist/types/atoms/Breadcrumbs/index.d.ts.map +1 -0
  61. package/dist/types/atoms/Breadcrumbs/styles.d.ts +95 -0
  62. package/dist/types/atoms/Breadcrumbs/styles.d.ts.map +1 -0
  63. package/dist/types/atoms/Calendar/index.d.ts +4 -0
  64. package/dist/types/atoms/Calendar/index.d.ts.map +1 -0
  65. package/dist/types/atoms/Calendar/styles.d.ts +12 -0
  66. package/dist/types/atoms/Calendar/styles.d.ts.map +1 -0
  67. package/dist/types/atoms/CentralModal/index.d.ts +3 -0
  68. package/dist/types/atoms/CentralModal/index.d.ts.map +1 -0
  69. package/dist/types/atoms/CircleImage/index.d.ts +13 -0
  70. package/dist/types/atoms/CircleImage/index.d.ts.map +1 -0
  71. package/dist/types/atoms/CodePreview/index.d.ts +23 -0
  72. package/dist/types/atoms/CodePreview/index.d.ts.map +1 -0
  73. package/dist/types/atoms/ConditionalWrapper/index.d.ts +8 -0
  74. package/dist/types/atoms/ConditionalWrapper/index.d.ts.map +1 -0
  75. package/dist/types/atoms/Containers/index.d.ts +3 -0
  76. package/dist/types/atoms/Containers/index.d.ts.map +1 -0
  77. package/dist/types/atoms/Containers/styles.d.ts +87 -0
  78. package/dist/types/atoms/Containers/styles.d.ts.map +1 -0
  79. package/dist/types/atoms/DivInput/index.d.ts +18 -0
  80. package/dist/types/atoms/DivInput/index.d.ts.map +1 -0
  81. package/dist/types/atoms/Form/Form.d.ts +15 -0
  82. package/dist/types/atoms/Form/Form.d.ts.map +1 -0
  83. package/dist/types/atoms/Form/index.d.ts +13 -0
  84. package/dist/types/atoms/Form/index.d.ts.map +1 -0
  85. package/dist/types/atoms/FormLabel/index.d.ts +13 -0
  86. package/dist/types/atoms/FormLabel/index.d.ts.map +1 -0
  87. package/dist/types/atoms/FullScreenModal/index.d.ts +3 -0
  88. package/dist/types/atoms/FullScreenModal/index.d.ts.map +1 -0
  89. package/dist/types/atoms/Header/index.d.ts +3 -0
  90. package/dist/types/atoms/Header/index.d.ts.map +1 -0
  91. package/dist/types/atoms/Header/styles.d.ts +18 -0
  92. package/dist/types/atoms/Header/styles.d.ts.map +1 -0
  93. package/dist/types/atoms/Icons/index.d.ts +28 -0
  94. package/dist/types/atoms/Icons/index.d.ts.map +1 -0
  95. package/dist/types/atoms/Input/index.d.ts +3 -0
  96. package/dist/types/atoms/Input/index.d.ts.map +1 -0
  97. package/dist/types/atoms/Input/styles.d.ts +20 -0
  98. package/dist/types/atoms/Input/styles.d.ts.map +1 -0
  99. package/dist/types/atoms/Link/index.d.ts +3 -0
  100. package/dist/types/atoms/Link/index.d.ts.map +1 -0
  101. package/dist/types/atoms/Link/styles.d.ts +133 -0
  102. package/dist/types/atoms/Link/styles.d.ts.map +1 -0
  103. package/dist/types/atoms/Loading/index.d.ts +21 -0
  104. package/dist/types/atoms/Loading/index.d.ts.map +1 -0
  105. package/dist/types/atoms/Loading/styles.d.ts +29 -0
  106. package/dist/types/atoms/Loading/styles.d.ts.map +1 -0
  107. package/dist/types/atoms/Logo/index.d.ts +3 -0
  108. package/dist/types/atoms/Logo/index.d.ts.map +1 -0
  109. package/dist/types/atoms/Pagination/index.d.ts +9 -0
  110. package/dist/types/atoms/Pagination/index.d.ts.map +1 -0
  111. package/dist/types/atoms/Pagination/styles.d.ts +38 -0
  112. package/dist/types/atoms/Pagination/styles.d.ts.map +1 -0
  113. package/dist/types/atoms/ProgressBar/index.d.ts +13 -0
  114. package/dist/types/atoms/ProgressBar/index.d.ts.map +1 -0
  115. package/dist/types/atoms/Radio/index.d.ts +12 -0
  116. package/dist/types/atoms/Radio/index.d.ts.map +1 -0
  117. package/dist/types/atoms/Separator/index.d.ts +12 -0
  118. package/dist/types/atoms/Separator/index.d.ts.map +1 -0
  119. package/dist/types/atoms/Submit/index.d.ts +10 -0
  120. package/dist/types/atoms/Submit/index.d.ts.map +1 -0
  121. package/dist/types/atoms/Switch/index.d.ts +12 -0
  122. package/dist/types/atoms/Switch/index.d.ts.map +1 -0
  123. package/dist/types/atoms/Switch/styles.d.ts +31 -0
  124. package/dist/types/atoms/Switch/styles.d.ts.map +1 -0
  125. package/dist/types/atoms/Tabs/index.d.ts +18 -0
  126. package/dist/types/atoms/Tabs/index.d.ts.map +1 -0
  127. package/dist/types/atoms/Tabs/styles.d.ts +40 -0
  128. package/dist/types/atoms/Tabs/styles.d.ts.map +1 -0
  129. package/dist/types/atoms/TextCheckbox/index.d.ts +9 -0
  130. package/dist/types/atoms/TextCheckbox/index.d.ts.map +1 -0
  131. package/dist/types/atoms/Textarea/index.d.ts +19 -0
  132. package/dist/types/atoms/Textarea/index.d.ts.map +1 -0
  133. package/dist/types/atoms/Toggle/index.d.ts +16 -0
  134. package/dist/types/atoms/Toggle/index.d.ts.map +1 -0
  135. package/dist/types/atoms/Toggle/styles.d.ts +32 -0
  136. package/dist/types/atoms/Toggle/styles.d.ts.map +1 -0
  137. package/dist/types/atoms/Tooltip/index.d.ts +15 -0
  138. package/dist/types/atoms/Tooltip/index.d.ts.map +1 -0
  139. package/dist/types/atoms/Tooltip/styles.d.ts +24 -0
  140. package/dist/types/atoms/Tooltip/styles.d.ts.map +1 -0
  141. package/dist/types/atoms/Typography/index.d.ts +3 -0
  142. package/dist/types/atoms/Typography/index.d.ts.map +1 -0
  143. package/dist/types/atoms/Typography/styles.d.ts +68 -0
  144. package/dist/types/atoms/Typography/styles.d.ts.map +1 -0
  145. package/dist/types/atoms/Validation/index.d.ts +9 -0
  146. package/dist/types/atoms/Validation/index.d.ts.map +1 -0
  147. package/dist/types/atoms/Validation/styles.d.ts +23 -0
  148. package/dist/types/atoms/Validation/styles.d.ts.map +1 -0
  149. package/dist/types/atoms/WideImage/index.d.ts +26 -0
  150. package/dist/types/atoms/WideImage/index.d.ts.map +1 -0
  151. package/dist/types/molecules/Badge/index.d.ts +25 -0
  152. package/dist/types/molecules/Badge/index.d.ts.map +1 -0
  153. package/dist/types/molecules/Button/index.d.ts +31 -0
  154. package/dist/types/molecules/Button/index.d.ts.map +1 -0
  155. package/dist/types/molecules/Button/styles.d.ts +15 -0
  156. package/dist/types/molecules/Button/styles.d.ts.map +1 -0
  157. package/dist/types/molecules/Card/index.d.ts +16 -0
  158. package/dist/types/molecules/Card/index.d.ts.map +1 -0
  159. package/dist/types/molecules/Card/styles.d.ts +70 -0
  160. package/dist/types/molecules/Card/styles.d.ts.map +1 -0
  161. package/dist/types/molecules/Carousel/index.d.ts +13 -0
  162. package/dist/types/molecules/Carousel/index.d.ts.map +1 -0
  163. package/dist/types/molecules/Carousel/styles.d.ts +31 -0
  164. package/dist/types/molecules/Carousel/styles.d.ts.map +1 -0
  165. package/dist/types/molecules/CodeView/highlight.d.ts +11 -0
  166. package/dist/types/molecules/CodeView/highlight.d.ts.map +1 -0
  167. package/dist/types/molecules/CodeView/index.d.ts +58 -0
  168. package/dist/types/molecules/CodeView/index.d.ts.map +1 -0
  169. package/dist/types/molecules/CodeView/styles.d.ts +44 -0
  170. package/dist/types/molecules/CodeView/styles.d.ts.map +1 -0
  171. package/dist/types/molecules/HtmlEditor/index.d.ts +16 -0
  172. package/dist/types/molecules/HtmlEditor/index.d.ts.map +1 -0
  173. package/dist/types/molecules/HtmlEditor/styles.d.ts +12 -0
  174. package/dist/types/molecules/HtmlEditor/styles.d.ts.map +1 -0
  175. package/dist/types/molecules/SearchInput/index.d.ts +11 -0
  176. package/dist/types/molecules/SearchInput/index.d.ts.map +1 -0
  177. package/dist/types/molecules/SearchInput/styles.d.ts +24 -0
  178. package/dist/types/molecules/SearchInput/styles.d.ts.map +1 -0
  179. package/dist/types/molecules/Select/index.d.ts +18 -0
  180. package/dist/types/molecules/Select/index.d.ts.map +1 -0
  181. package/dist/types/molecules/Select/styles.d.ts +51 -0
  182. package/dist/types/molecules/Select/styles.d.ts.map +1 -0
  183. package/dist/types/molecules/StatusLabel/index.d.ts +51 -0
  184. package/dist/types/molecules/StatusLabel/index.d.ts.map +1 -0
  185. package/dist/types/molecules/StatusLabel/styles.d.ts +18 -0
  186. package/dist/types/molecules/StatusLabel/styles.d.ts.map +1 -0
  187. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts +9 -0
  188. package/dist/types/molecules/Table/TableCels/BrandCell.d.ts.map +1 -0
  189. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts +8 -0
  190. package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts.map +1 -0
  191. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts +9 -0
  192. package/dist/types/molecules/Table/TableCels/StatusCell.d.ts.map +1 -0
  193. package/dist/types/molecules/Table/TableCels/TextCell.d.ts +9 -0
  194. package/dist/types/molecules/Table/TableCels/TextCell.d.ts.map +1 -0
  195. package/dist/types/molecules/Table/TableCels/index.d.ts +7 -0
  196. package/dist/types/molecules/Table/TableCels/index.d.ts.map +1 -0
  197. package/dist/types/molecules/Table/TableCels/styles.d.ts +29 -0
  198. package/dist/types/molecules/Table/TableCels/styles.d.ts.map +1 -0
  199. package/dist/types/molecules/Table/index.d.ts +27 -0
  200. package/dist/types/molecules/Table/index.d.ts.map +1 -0
  201. package/dist/types/molecules/Table/styles.d.ts +15 -0
  202. package/dist/types/molecules/Table/styles.d.ts.map +1 -0
  203. package/dist/types/molecules/TokenInputField/index.d.ts +15 -0
  204. package/dist/types/molecules/TokenInputField/index.d.ts.map +1 -0
  205. package/dist/types/molecules/TokenInputField/styles.d.ts +24 -0
  206. package/dist/types/molecules/TokenInputField/styles.d.ts.map +1 -0
  207. package/dist/types/shared/modals/index.d.ts +33 -0
  208. package/dist/types/shared/modals/index.d.ts.map +1 -0
  209. package/dist/types/shared/modals/styles.d.ts +52 -0
  210. package/dist/types/shared/modals/styles.d.ts.map +1 -0
  211. package/dist/types/shared/modals/useModal.d.ts +4 -0
  212. package/dist/types/shared/modals/useModal.d.ts.map +1 -0
  213. package/dist/types/shared/report-ui/DecisionPanel.d.ts +53 -0
  214. package/dist/types/shared/report-ui/DecisionPanel.d.ts.map +1 -0
  215. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts +31 -0
  216. package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts.map +1 -0
  217. package/dist/types/shared/report-ui/Shell.styles.d.ts +26 -0
  218. package/dist/types/shared/report-ui/Shell.styles.d.ts.map +1 -0
  219. package/dist/types/shared/report-ui/index.d.ts +6 -0
  220. package/dist/types/shared/report-ui/index.d.ts.map +1 -0
  221. package/dist/types/shared/report-ui/ui.d.ts +30 -0
  222. package/dist/types/shared/report-ui/ui.d.ts.map +1 -0
  223. package/dist/types/shared/report-ui/ui.styles.d.ts +50 -0
  224. package/dist/types/shared/report-ui/ui.styles.d.ts.map +1 -0
  225. package/dist/types/shared/toasts/index.d.ts +23 -0
  226. package/dist/types/shared/toasts/index.d.ts.map +1 -0
  227. package/dist/types/shared/toasts/styles.d.ts +18 -0
  228. package/dist/types/shared/toasts/styles.d.ts.map +1 -0
  229. package/dist/types/textures/Cloud/index.d.ts +29 -0
  230. package/dist/types/textures/Cloud/index.d.ts.map +1 -0
  231. package/dist/types/textures/Paper/index.d.ts +8 -0
  232. package/dist/types/textures/Paper/index.d.ts.map +1 -0
  233. package/dist/types/textures/index.d.ts +4 -0
  234. package/dist/types/textures/index.d.ts.map +1 -0
  235. package/dist/typography.js +81 -0
  236. package/dist/validation.js +20 -0
  237. package/dist/wide-image.js +94 -0
  238. package/package.json +443 -4
@@ -0,0 +1,101 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import i from "styled-components";
4
+ // atoms/DivInput/index.tsx
5
+ var a = i.div`
6
+ width: 100%;
7
+ height: ${({ theme: e }) => e.elements.form.height};
8
+ position: relative;
9
+ `, o = i.div`
10
+ position: absolute;
11
+ overflow-x: hidden;
12
+ width: 100%;
13
+ padding: ${({ theme: e }) => e.offsets.elementContent};
14
+ border-radius: ${({ theme: e }) => e.border.radius};
15
+
16
+ /*
17
+ * The same sunken-field treatment as Input/Textarea: no box border, only an
18
+ * underline derived from sectionContent (no disabled pair, README §5.1),
19
+ * the overlay surface and the theme's silhouette/shadow.
20
+ */
21
+ border: none;
22
+ border-bottom: ${({ theme: e }) => e.border.size} solid
23
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
24
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
25
+ font-family: ${({ theme: e }) => e.font.family.text};
26
+ box-sizing: border-box;
27
+ background-color: ${({ theme: e }) => e.colors.overlay};
28
+ /*
29
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
30
+ * supply a url() for background-image, glass themes supply blur() for
31
+ * backdrop-filter. The field cannot know which theme is active, so it hands
32
+ * the value to BOTH properties; each property keeps only the value it
33
+ * understands and ignores the other (blur() in background-image computes to
34
+ * none, and url() left in backdrop-filter is visually inert — verified in
35
+ * Chromium). Both themes therefore texture the field without a name check.
36
+ */
37
+ background-image: ${({ theme: e }) => e.effects.texture};
38
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
39
+ clip-path: ${({ theme: e }) => e.geometry.shape};
40
+ box-shadow: ${({ theme: e }) => e.shadows.section};
41
+ color: ${({ theme: e }) => e.colors.sectionContent};
42
+ outline: none;
43
+ transition: border-color ${({ theme: e }) => e.animation.speed.normal} ${({ theme: e }) => e.animation.easing.standard};
44
+ cursor: text;
45
+ white-space: nowrap;
46
+
47
+ /*
48
+ * Focus is a state (README §4.3): the accent may paint text, caret and the
49
+ * underline. theme.effects.interaction.focus adds the theme's glow.
50
+ */
51
+ ${({ $isFocused: e, theme: t }) => e && `
52
+ ${t.effects.interaction.focus}
53
+ color: ${t.colors.highlighted};
54
+ caret-color: ${t.colors.highlighted};
55
+ border-bottom-color: ${t.colors.highlighted};
56
+ `}
57
+
58
+ /* Стили плейсхолдера */
59
+ &:empty::before {
60
+ content: attr(data-placeholder);
61
+ color: ${({ theme: e }) => e.colors.sectionContent};
62
+ opacity: 0.5;
63
+ }
64
+
65
+ /* Маскировка пароля */
66
+ &.password {
67
+ -webkit-text-security: disc;
68
+ appearance: textfield;
69
+ user-select: text;
70
+ }
71
+ `, s = ({ id: i, value: s = "", type: c = "text", autoFocus: l, onChange: u, onKeyDown: d, placeholder: f, style: p, readOnly: m }) => {
72
+ let [h, g] = n(!1), _ = t(null);
73
+ return e(() => {
74
+ l && _.current && _.current.focus();
75
+ }, [l]), e(() => {
76
+ _.current && _.current.textContent !== s && (_.current.textContent = s || "");
77
+ }, [s]), /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(o, {
78
+ id: i,
79
+ ref: _,
80
+ role: "textbox",
81
+ contentEditable: !m,
82
+ suppressContentEditableWarning: !0,
83
+ "data-placeholder": f,
84
+ spellCheck: !1,
85
+ className: c === "password" ? "password" : "",
86
+ onInput: () => {
87
+ let e = _.current?.textContent || "";
88
+ u && u({ target: { value: e } });
89
+ },
90
+ onFocus: () => {
91
+ g(!0);
92
+ },
93
+ onBlur: () => {
94
+ g(!1);
95
+ },
96
+ onKeyDown: d,
97
+ $isFocused: h,
98
+ style: p
99
+ }) });
100
+ };
101
+ export { s as DivInput };
@@ -0,0 +1,19 @@
1
+ import { a as e, r as t } from "./dist-DD9Lv2Ja.js";
2
+ import n from "styled-components";
3
+ // atoms/FormLabel/index.tsx
4
+ var r = n.label`
5
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
6
+ margin-right: ${t};
7
+ margin-bottom: ${e};
8
+ color: ${({ theme: e }) => e.colors.sectionContent};
9
+
10
+ /*
11
+ * A label is content on the section surface, so it takes the text role
12
+ * explicitly instead of inheriting whatever font an outer shell happens to
13
+ * set (README §4.2).
14
+ */
15
+ font-family: ${({ theme: e }) => e.font.family.text};
16
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
17
+ font-weight: ${({ theme: e }) => e.font.weight.text};
18
+ `;
19
+ export { r as FormLabel };
package/dist/form.js ADDED
@@ -0,0 +1,17 @@
1
+ import { a as e, r as t } from "./dist-DD9Lv2Ja.js";
2
+ import n from "styled-components";
3
+ import { FormLabel as r } from "@md-code/components/form-label";
4
+ import { Input as i } from "@md-code/components/input";
5
+ import { Radio as a } from "@md-code/components/radio";
6
+ import { SearchInput as o } from "@md-code/components/search-input";
7
+ import { Select as s } from "@md-code/components/select";
8
+ import { Submit as c } from "@md-code/components/submit";
9
+ import { Textarea as l } from "@md-code/components/textarea";
10
+ import { TextCheckbox as u } from "@md-code/components/text-checkbox";
11
+ // atoms/Form/Form.tsx
12
+ var d = n.form`
13
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
14
+ margin-right: ${t};
15
+ margin-bottom: ${e};
16
+ `, f = d;
17
+ export { d as Form, r as FormLabel, i as Input, a as Radio, o as SearchInput, s as Select, c as Submit, u as TextCheckbox, l as Textarea, f as default };
@@ -0,0 +1 @@
1
+ export { m as FullScreenModal } from "./CentralModal-ButM9Ggi.js";
package/dist/header.js ADDED
@@ -0,0 +1,19 @@
1
+ import e from "styled-components";
2
+ // atoms/Header/styles.ts
3
+ var t = e.header`
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: ${({ theme: e }) => e.elements.header.height};
9
+ background: ${({ theme: e }) => e.colors.section};
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
14
+ box-shadow: ${({ theme: e }) => e.shadows.section};
15
+ background-image: ${({ theme: e }) => e.effects.texture};
16
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
17
+ z-index: ${({ theme: e, $zIndex: t }) => t ? e.zIndex[t] : e.zIndex.content};
18
+ `;
19
+ export { t as Header };
@@ -0,0 +1,74 @@
1
+ import { t as e } from "./themes-zS3KQYdw-DIqyzjFD.js";
2
+ import { useState as t } from "react";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import a, { ThemeProvider as o, css as s } from "styled-components";
5
+ import { Button as c } from "@md-code/components/button";
6
+ import l from "next/dynamic";
7
+ // molecules/HtmlEditor/styles.ts
8
+ var u = a.div`
9
+ border-radius: ${({ theme: e }) => e.border.radius};
10
+ margin-bottom: ${({ theme: e }) => e.offsets.elementContent};
11
+ overflow: auto;
12
+ ${({ $fullHeight: e, theme: t }) => e ? s`height: 100%;` : s`height: ${t.elements.form.height};`}
13
+ border: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.sectionContent};
14
+ background-color: ${({ theme: e }) => e.colors.section};
15
+ /*
16
+ * effects.texture is one string per theme (README §4.1, §5.3): noise themes
17
+ * supply a url() for background-image, glass themes supply blur() for
18
+ * backdrop-filter. The frame cannot know which theme is active, so it hands
19
+ * the value to BOTH properties; each property keeps only the value it
20
+ * understands and ignores the other (blur() in background-image computes to
21
+ * none, and url() left in backdrop-filter is visually inert — verified in
22
+ * Chromium). Both themes therefore texture the frame without a name check.
23
+ */
24
+ background-image: ${({ theme: e }) => e.effects.texture};
25
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
26
+ box-shadow: ${({ theme: e }) => e.shadows.section};
27
+ /* The editor frame lives inside the code-editor zone theme, whose text
28
+ role IS monospace (there is no code family, README §5.5). */
29
+ font-family: ${({ theme: e }) => e.font.family.text};
30
+
31
+ pre {
32
+ background-color: transparent;
33
+ }
34
+
35
+ /* The code is content on the section surface: section content colour plus
36
+ the theme's content (ink/glow) text-shadow. */
37
+ pre, textarea {
38
+ color: ${({ theme: e }) => e.colors.sectionContent};
39
+ text-shadow: ${({ theme: e }) => e.shadows.content};
40
+ }
41
+
42
+ div {
43
+ line-height: 1.5;
44
+ }
45
+ `, d = l(() => import("@uiw/react-textarea-code-editor"), { ssr: !1 }), f = ({ initialValue: a, onSave: s, fullHeight: l, value: f, setValue: p }) => {
46
+ let [m, h] = t(a || ""), [g, _] = t(!0), v = f ?? m, y = p ?? h;
47
+ return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(o, {
48
+ theme: e,
49
+ children: /* @__PURE__ */ r(u, {
50
+ $fullHeight: l,
51
+ children: /* @__PURE__ */ r(d, {
52
+ language: "html",
53
+ value: v,
54
+ onChange: (e) => {
55
+ y(e.target.value), p || _(e.target.value === a);
56
+ },
57
+ style: {
58
+ fontSize: e.font.sizes.small,
59
+ lineHeight: "1.5",
60
+ backgroundColor: "transparent",
61
+ width: "max-content",
62
+ fontFamily: e.font.family.text
63
+ }
64
+ })
65
+ })
66
+ }), !p && /* @__PURE__ */ r(c, {
67
+ text: "Save changes",
68
+ disabled: g,
69
+ onClick: () => {
70
+ s?.(v), p || _(!0);
71
+ }
72
+ })] });
73
+ };
74
+ export { f as HtmlEditor };
package/dist/icons.js ADDED
@@ -0,0 +1,44 @@
1
+ import "react";
2
+ import * as e from "lucide-react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ // atoms/Icons/index.tsx
5
+ var n = {
6
+ xs: 16,
7
+ sm: 20,
8
+ md: 24,
9
+ lg: 32,
10
+ xl: 40
11
+ }, r = (e) => {
12
+ if (e !== void 0) {
13
+ if (typeof e == "number") return e;
14
+ if (typeof e == "string") {
15
+ if (e in n) return n[e];
16
+ let t = Number(e);
17
+ if (!isNaN(t)) return t;
18
+ }
19
+ }
20
+ }, i = ({ name: n, size: i, color: a, ...o }) => {
21
+ if (!n) return console.warn("No icon name provided to LucideIcon"), null;
22
+ let s = e[n];
23
+ if (!s) return console.warn(`Lucide icon "${n}" not found`), null;
24
+ if (!((e) => {
25
+ if (!e) return !1;
26
+ if (typeof e == "function") return !0;
27
+ if (typeof e == "object" && e) {
28
+ let t = e;
29
+ return t.$$typeof === Symbol.for("react.forward_ref") || t.$$typeof === Symbol.for("react.memo") || t.$$typeof === Symbol.for("react.lazy");
30
+ }
31
+ return !1;
32
+ })(s)) return console.warn(`Lucide export "${n}" is not a valid React component`), null;
33
+ try {
34
+ let { name: e, size: n, color: c, iconPosition: l, ...u } = o;
35
+ return /* @__PURE__ */ t(s, {
36
+ size: r(i),
37
+ color: a,
38
+ ...u
39
+ });
40
+ } catch (e) {
41
+ return console.error(`Error rendering Lucide icon "${n}":`, e), null;
42
+ }
43
+ };
44
+ export { i as LucideIcon, i as default };
package/dist/input.js ADDED
@@ -0,0 +1,62 @@
1
+ import { a as e, r as t } from "./dist-DD9Lv2Ja.js";
2
+ import n from "styled-components";
3
+ // atoms/Input/styles.ts
4
+ var r = n.input`
5
+ display: block;
6
+ ${({ $fullWidth: e }) => e ? "width: 100%;" : ""}
7
+ height: ${({ theme: e }) => e.elements.form.height};
8
+ margin-right: ${t};
9
+ margin-bottom: ${e};
10
+ padding: ${({ theme: e }) => e.offsets.elementContent};
11
+ color: ${({ theme: e }) => e.colors.sectionContent};
12
+ font-family: ${({ theme: e }) => e.font.family.text};
13
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
14
+ font-weight: ${({ theme: e }) => e.font.weight.text};
15
+ background-color: ${({ theme: e }) => e.colors.overlay};
16
+
17
+ /*
18
+ * effects.texture is ONE string per theme (README §4.1, §5.3): noise themes
19
+ * supply a url() for background-image, glass themes a blur() for
20
+ * backdrop-filter. Handing the same value to both properties lets each keep
21
+ * the one it understands, so the input stays theme-agnostic.
22
+ */
23
+ background-image: ${({ theme: e }) => e.effects.texture};
24
+ backdrop-filter: ${({ theme: e }) => e.effects.texture};
25
+
26
+ /*
27
+ * A sunken field draws only an underline, not a full box border: the theme's
28
+ * silhouette clips the surface (viking parchment) and a low-contrast mix of
29
+ * the content colour reads as the carved groove. The contract has no
30
+ * disabled-colour pair any more (README §4.3, §5.1), so the mute is derived
31
+ * from sectionContent — never a stored grey.
32
+ */
33
+ border: none;
34
+ border-bottom: ${({ theme: e }) => e.border.size} solid
35
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
36
+ border-radius: ${({ theme: e }) => e.border.radius};
37
+ clip-path: ${({ theme: e }) => e.geometry.shape};
38
+ box-shadow: ${({ theme: e }) => e.shadows.section};
39
+ transition:
40
+ color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
41
+ border-color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
42
+ box-shadow ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
43
+
44
+ &::placeholder {
45
+ color: ${({ theme: e }) => e.colors.sectionContent};
46
+ opacity: 0.5;
47
+ font-style: italic;
48
+ }
49
+
50
+ /*
51
+ * The focus accent is a STATE (README §4.3), so the accent colour is legal
52
+ * here: text, caret and underline all light up, and the theme supplies the
53
+ * glow fragment (interaction.focus).
54
+ */
55
+ &:focus-visible {
56
+ ${({ theme: e }) => e.effects.interaction.focus}
57
+ color: ${({ theme: e }) => e.colors.highlighted};
58
+ caret-color: ${({ theme: e }) => e.colors.highlighted};
59
+ border-bottom-color: ${({ theme: e }) => e.colors.highlighted};
60
+ }
61
+ `;
62
+ export { r as Input };
package/dist/link.js ADDED
@@ -0,0 +1,35 @@
1
+ import e, { css as t } from "styled-components";
2
+ import n from "next/link";
3
+ // atoms/Link/styles.ts
4
+ var r = t`
5
+ border-bottom: ${({ theme: e }) => e.border.size} dotted
6
+ color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
7
+ `, i = e(n)`
8
+ color: ${({ theme: e }) => e.colors.sectionContent};
9
+ font-family: ${({ theme: e }) => e.font.family.text};
10
+ font-weight: ${({ theme: e }) => e.font.weight.text};
11
+ text-decoration: none;
12
+ ${r}
13
+ border-radius: ${({ theme: e }) => e.border.radius};
14
+ transition:
15
+ color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
16
+ border-color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
17
+
18
+ &:hover {
19
+ color: ${({ theme: e }) => e.colors.highlighted};
20
+ border-bottom-style: solid;
21
+ text-shadow: ${({ theme: e }) => e.shadows.content};
22
+ }
23
+ `, a = e(n)`
24
+ color: ${({ theme: e }) => e.colors.sectionContent};
25
+ font-family: ${({ theme: e }) => e.font.family.text};
26
+ font-weight: ${({ theme: e }) => e.font.weight.text};
27
+ font-size: ${({ theme: e }) => e.font.sizes.small};
28
+ text-decoration: none;
29
+
30
+ &:hover {
31
+ color: ${({ theme: e }) => e.colors.highlighted};
32
+ text-decoration: underline;
33
+ }
34
+ `;
35
+ export { i as Link, a as LinkInForm };
@@ -0,0 +1,87 @@
1
+ import "react";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import t, { css as n, keyframes as r } from "styled-components";
4
+ import i from "next-image-export-optimizer";
5
+ // atoms/Loading/styles.ts
6
+ var a = r`
7
+ from { transform: rotate(0deg); }
8
+ to { transform: rotate(360deg); }
9
+ `, o = r`
10
+ 0% { opacity: 0.9; }
11
+ 100% { opacity: 0; }
12
+ `, s = r`
13
+ 0% { opacity: 0; }
14
+ 100% { opacity: 0.9; }
15
+ `, c = n`
16
+ animation: ${s} ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.linear} forwards;
17
+ `, l = n`
18
+ animation: ${o} ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.linear} forwards;
19
+ `, u = n`
20
+ ${l}
21
+ pointer-events: none;
22
+ `, d = n`
23
+ ${c}
24
+ `, f = t.div`
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ position: absolute;
29
+ inset: 0;
30
+ opacity: 0;
31
+ z-index: ${({ theme: e }) => e.zIndex.animatedElements};
32
+ background: ${({ theme: e }) => e.colors.overlay};
33
+
34
+ ${({ $hidden: e }) => e ? u : d}
35
+ `, p = n`
36
+ width: ${({ theme: e }) => e.elements.icons.width};
37
+ height: ${({ theme: e }) => e.elements.icons.height};
38
+ `, m = n`
39
+ width: calc(${({ theme: e }) => e.elements.icons.width} * 1.5);
40
+ height: calc(${({ theme: e }) => e.elements.icons.height} * 1.5);
41
+ `, h = n`
42
+ width: calc(${({ theme: e }) => e.elements.icons.width} * 3);
43
+ height: calc(${({ theme: e }) => e.elements.icons.height} * 3);
44
+ `, g = t.div`
45
+ display: inline-flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+
49
+ /* The size steps: the shared icon element, scaled for larger spinners. */
50
+ ${({ $size: e }) => {
51
+ switch (e) {
52
+ case "small": return p;
53
+ case "large": return h;
54
+ default: return m;
55
+ }
56
+ }}
57
+
58
+ /*
59
+ * The spinner glyph: a monochrome image, so the accent reaches it as a glow
60
+ * derived from the highlighted colour at a length taken from the rhythm.
61
+ */
62
+ img, svg {
63
+ filter: drop-shadow(
64
+ 0 0 calc(${({ theme: e }) => e.offsets.elementContent} / 2)
65
+ ${({ theme: e }) => e.colors.highlighted}
66
+ );
67
+ animation: ${a} ${({ theme: e }) => e.animation.speed.pulse}
68
+ ${({ theme: e }) => e.animation.easing.linear} infinite;
69
+ }
70
+ `, _ = t(i)`
71
+ width: 100%;
72
+ height: 100%;
73
+ `, v = ({ $size: t = "medium", className: n }) => /* @__PURE__ */ e(g, {
74
+ $size: t,
75
+ className: n,
76
+ children: /* @__PURE__ */ e(_, {
77
+ src: "/ouroboros.svg",
78
+ alt: "Loading...",
79
+ priority: !0,
80
+ width: 100,
81
+ height: 100
82
+ })
83
+ }), y = _, b = ({ hidden: t }) => /* @__PURE__ */ e(f, {
84
+ $hidden: t,
85
+ children: /* @__PURE__ */ e(v, { $size: "large" })
86
+ });
87
+ export { v as Loader, y as LoaderImage, b as Loading };