@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.
- package/LICENSE +202 -0
- package/README.md +67 -1
- package/dist/avatar.js +3 -3
- package/dist/badge.js +18 -18
- package/dist/breadcrumbs.js +47 -47
- package/dist/button.js +103 -88
- package/dist/calendar.js +63 -62
- package/dist/caption.js +14 -0
- package/dist/card.js +54 -53
- package/dist/carousel.js +87 -72
- package/dist/central-modal.js +22 -1
- package/dist/chip.js +42 -0
- package/dist/circle-image.js +12 -12
- package/dist/code-preview.js +28 -28
- package/dist/code-view-tokenizer.js +35 -0
- package/dist/code-view.js +53 -53
- package/dist/containers.js +87 -87
- package/dist/diff-legend.js +31 -0
- package/dist/div-input.js +48 -46
- package/dist/empty.js +12 -0
- package/dist/filter-bar.js +15 -0
- package/dist/form-label.js +11 -11
- package/dist/form.js +6 -6
- package/dist/full-screen-modal.js +27 -1
- package/dist/header.js +14 -14
- package/dist/html-editor.js +49 -42
- package/dist/icons.js +24 -26
- package/dist/input.js +40 -40
- package/dist/link.js +25 -25
- package/dist/loading.js +161 -66
- package/dist/modals.js +130 -1
- package/dist/mono-text.js +16 -0
- package/dist/nav-tabs.js +33 -0
- package/dist/page-header.js +20 -0
- package/dist/pagination.js +80 -80
- package/dist/progress-bar.js +19 -19
- package/dist/radio.js +58 -57
- package/dist/report-ui.js +150 -72
- package/dist/row.js +15 -0
- package/dist/score-panel.js +125 -0
- package/dist/score-pills.js +25 -0
- package/dist/search-input.js +62 -56
- package/dist/select.js +86 -83
- package/dist/separator.js +15 -9
- package/dist/slider-field.js +34 -0
- package/dist/stack.js +16 -0
- package/dist/stat-grid.js +10 -0
- package/dist/stat.js +24 -0
- package/dist/status-label.js +32 -28
- package/dist/status-text.js +13 -0
- package/dist/submit.js +41 -41
- package/dist/subtle-text.js +14 -0
- package/dist/surface.js +39 -0
- package/dist/switch.js +70 -69
- package/dist/table.js +109 -85
- package/dist/tabs.js +121 -120
- package/dist/text-checkbox.js +48 -48
- package/dist/text-link.js +20 -0
- package/dist/textarea.js +41 -41
- package/dist/textures.js +100 -100
- package/dist/toasts.js +48 -48
- package/dist/toggle.js +46 -46
- package/dist/token-input-field.js +24 -24
- package/dist/tooltip.js +61 -59
- package/dist/types/atoms/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/types/atoms/Breadcrumbs/styles.d.ts.map +1 -1
- package/dist/types/atoms/Calendar/index.d.ts +1 -1
- package/dist/types/atoms/Calendar/index.d.ts.map +1 -1
- package/dist/types/atoms/Calendar/styles.d.ts.map +1 -1
- package/dist/types/atoms/Caption/index.d.ts +9 -0
- package/dist/types/atoms/Caption/index.d.ts.map +1 -0
- package/dist/types/atoms/Caption/styles.d.ts +9 -0
- package/dist/types/atoms/Caption/styles.d.ts.map +1 -0
- package/dist/types/atoms/CentralModal/index.d.ts.map +1 -1
- package/dist/types/atoms/Chip/index.d.ts +39 -0
- package/dist/types/atoms/Chip/index.d.ts.map +1 -0
- package/dist/types/atoms/Chip/styles.d.ts +19 -0
- package/dist/types/atoms/Chip/styles.d.ts.map +1 -0
- package/dist/types/atoms/CircleImage/index.d.ts +2 -2
- package/dist/types/atoms/CircleImage/index.d.ts.map +1 -1
- package/dist/types/atoms/ConditionalWrapper/index.d.ts +1 -1
- package/dist/types/atoms/ConditionalWrapper/index.d.ts.map +1 -1
- package/dist/types/atoms/Containers/index.d.ts.map +1 -1
- package/dist/types/atoms/Containers/styles.d.ts +4 -4
- package/dist/types/atoms/Containers/styles.d.ts.map +1 -1
- package/dist/types/atoms/DivInput/index.d.ts.map +1 -1
- package/dist/types/atoms/Empty/index.d.ts +10 -0
- package/dist/types/atoms/Empty/index.d.ts.map +1 -0
- package/dist/types/atoms/Empty/styles.d.ts +9 -0
- package/dist/types/atoms/Empty/styles.d.ts.map +1 -0
- package/dist/types/atoms/Form/Form.d.ts +2 -2
- package/dist/types/atoms/Form/Form.d.ts.map +1 -1
- package/dist/types/atoms/Form/index.d.ts +10 -10
- package/dist/types/atoms/Form/index.d.ts.map +1 -1
- package/dist/types/atoms/FormLabel/index.d.ts +1 -1
- package/dist/types/atoms/FormLabel/index.d.ts.map +1 -1
- package/dist/types/atoms/FullScreenModal/index.d.ts.map +1 -1
- package/dist/types/atoms/Header/index.d.ts.map +1 -1
- package/dist/types/atoms/Icons/index.d.ts +29 -8
- package/dist/types/atoms/Icons/index.d.ts.map +1 -1
- package/dist/types/atoms/Input/index.d.ts +1 -1
- package/dist/types/atoms/Input/index.d.ts.map +1 -1
- package/dist/types/atoms/Input/styles.d.ts +2 -2
- package/dist/types/atoms/Input/styles.d.ts.map +1 -1
- package/dist/types/atoms/Link/index.d.ts.map +1 -1
- package/dist/types/atoms/Link/styles.d.ts.map +1 -1
- package/dist/types/atoms/Loading/index.d.ts +10 -4
- package/dist/types/atoms/Loading/index.d.ts.map +1 -1
- package/dist/types/atoms/Loading/styles.d.ts +4 -2
- package/dist/types/atoms/Loading/styles.d.ts.map +1 -1
- package/dist/types/atoms/Logo/index.d.ts.map +1 -1
- package/dist/types/atoms/MonoText/index.d.ts +23 -0
- package/dist/types/atoms/MonoText/index.d.ts.map +1 -0
- package/dist/types/atoms/MonoText/styles.d.ts +13 -0
- package/dist/types/atoms/MonoText/styles.d.ts.map +1 -0
- package/dist/types/atoms/Pagination/index.d.ts.map +1 -1
- package/dist/types/atoms/Pagination/styles.d.ts.map +1 -1
- package/dist/types/atoms/ProgressBar/index.d.ts +2 -2
- package/dist/types/atoms/ProgressBar/index.d.ts.map +1 -1
- package/dist/types/atoms/Radio/index.d.ts +2 -2
- package/dist/types/atoms/Radio/index.d.ts.map +1 -1
- package/dist/types/atoms/Row/index.d.ts +8 -0
- package/dist/types/atoms/Row/index.d.ts.map +1 -0
- package/dist/types/atoms/Row/styles.d.ts +9 -0
- package/dist/types/atoms/Row/styles.d.ts.map +1 -0
- package/dist/types/atoms/Separator/index.d.ts +21 -9
- package/dist/types/atoms/Separator/index.d.ts.map +1 -1
- package/dist/types/atoms/Separator/styles.d.ts +14 -0
- package/dist/types/atoms/Separator/styles.d.ts.map +1 -0
- package/dist/types/atoms/Stack/index.d.ts +17 -0
- package/dist/types/atoms/Stack/index.d.ts.map +1 -0
- package/dist/types/atoms/Stack/styles.d.ts +12 -0
- package/dist/types/atoms/Stack/styles.d.ts.map +1 -0
- package/dist/types/atoms/Stat/index.d.ts +24 -0
- package/dist/types/atoms/Stat/index.d.ts.map +1 -0
- package/dist/types/atoms/Stat/styles.d.ts +19 -0
- package/dist/types/atoms/Stat/styles.d.ts.map +1 -0
- package/dist/types/atoms/StatusText/index.d.ts +17 -0
- package/dist/types/atoms/StatusText/index.d.ts.map +1 -0
- package/dist/types/atoms/StatusText/styles.d.ts +13 -0
- package/dist/types/atoms/StatusText/styles.d.ts.map +1 -0
- package/dist/types/atoms/Submit/index.d.ts +2 -2
- package/dist/types/atoms/Submit/index.d.ts.map +1 -1
- package/dist/types/atoms/SubtleText/index.d.ts +17 -0
- package/dist/types/atoms/SubtleText/index.d.ts.map +1 -0
- package/dist/types/atoms/SubtleText/styles.d.ts +12 -0
- package/dist/types/atoms/SubtleText/styles.d.ts.map +1 -0
- package/dist/types/atoms/Surface/index.d.ts +34 -0
- package/dist/types/atoms/Surface/index.d.ts.map +1 -0
- package/dist/types/atoms/Surface/styles.d.ts +27 -0
- package/dist/types/atoms/Surface/styles.d.ts.map +1 -0
- package/dist/types/atoms/Switch/index.d.ts.map +1 -1
- package/dist/types/atoms/Switch/styles.d.ts.map +1 -1
- package/dist/types/atoms/Tabs/index.d.ts +1 -1
- package/dist/types/atoms/Tabs/index.d.ts.map +1 -1
- package/dist/types/atoms/Tabs/styles.d.ts.map +1 -1
- package/dist/types/atoms/TextCheckbox/index.d.ts +1 -1
- package/dist/types/atoms/TextCheckbox/index.d.ts.map +1 -1
- package/dist/types/atoms/TextLink/index.d.ts +22 -0
- package/dist/types/atoms/TextLink/index.d.ts.map +1 -0
- package/dist/types/atoms/TextLink/styles.d.ts +15 -0
- package/dist/types/atoms/TextLink/styles.d.ts.map +1 -0
- package/dist/types/atoms/Textarea/index.d.ts +1 -1
- package/dist/types/atoms/Textarea/index.d.ts.map +1 -1
- package/dist/types/atoms/Toggle/index.d.ts +1 -1
- package/dist/types/atoms/Toggle/index.d.ts.map +1 -1
- package/dist/types/atoms/Tooltip/index.d.ts.map +1 -1
- package/dist/types/atoms/Tooltip/styles.d.ts.map +1 -1
- package/dist/types/atoms/Typography/index.d.ts +1 -1
- package/dist/types/atoms/Typography/index.d.ts.map +1 -1
- package/dist/types/atoms/Typography/styles.d.ts +8 -4
- package/dist/types/atoms/Typography/styles.d.ts.map +1 -1
- package/dist/types/atoms/Validation/index.d.ts.map +1 -1
- package/dist/types/atoms/Validation/styles.d.ts.map +1 -1
- package/dist/types/atoms/WideImage/index.d.ts +4 -4
- package/dist/types/atoms/WideImage/index.d.ts.map +1 -1
- package/dist/types/molecules/Badge/index.d.ts +1 -1
- package/dist/types/molecules/Badge/index.d.ts.map +1 -1
- package/dist/types/molecules/Button/index.d.ts +1 -1
- package/dist/types/molecules/Button/index.d.ts.map +1 -1
- package/dist/types/molecules/Button/styles.d.ts +2 -2
- package/dist/types/molecules/Button/styles.d.ts.map +1 -1
- package/dist/types/molecules/Card/index.d.ts +2 -2
- package/dist/types/molecules/Card/index.d.ts.map +1 -1
- package/dist/types/molecules/Card/styles.d.ts +1 -1
- package/dist/types/molecules/Card/styles.d.ts.map +1 -1
- package/dist/types/molecules/Carousel/index.d.ts +1 -1
- package/dist/types/molecules/Carousel/index.d.ts.map +1 -1
- package/dist/types/molecules/Carousel/styles.d.ts.map +1 -1
- package/dist/types/molecules/Carousel/useIsMobile.d.ts +3 -0
- package/dist/types/molecules/Carousel/useIsMobile.d.ts.map +1 -0
- package/dist/types/molecules/CodeView/highlight.d.ts.map +1 -1
- package/dist/types/molecules/CodeView/index.d.ts +5 -5
- package/dist/types/molecules/CodeView/index.d.ts.map +1 -1
- package/dist/types/molecules/CodeView/styles.d.ts.map +1 -1
- package/dist/types/molecules/CodeView/tokenizer.d.ts +21 -0
- package/dist/types/molecules/CodeView/tokenizer.d.ts.map +1 -0
- package/dist/types/molecules/DiffLegend/index.d.ts +20 -0
- package/dist/types/molecules/DiffLegend/index.d.ts.map +1 -0
- package/dist/types/molecules/DiffLegend/styles.d.ts +19 -0
- package/dist/types/molecules/DiffLegend/styles.d.ts.map +1 -0
- package/dist/types/molecules/FilterBar/index.d.ts +20 -0
- package/dist/types/molecules/FilterBar/index.d.ts.map +1 -0
- package/dist/types/molecules/FilterBar/styles.d.ts +15 -0
- package/dist/types/molecules/FilterBar/styles.d.ts.map +1 -0
- package/dist/types/molecules/HtmlEditor/index.d.ts.map +1 -1
- package/dist/types/molecules/HtmlEditor/styles.d.ts.map +1 -1
- package/dist/types/molecules/NavTabs/index.d.ts +24 -0
- package/dist/types/molecules/NavTabs/index.d.ts.map +1 -0
- package/dist/types/molecules/NavTabs/styles.d.ts +15 -0
- package/dist/types/molecules/NavTabs/styles.d.ts.map +1 -0
- package/dist/types/molecules/PageHeader/index.d.ts +15 -0
- package/dist/types/molecules/PageHeader/index.d.ts.map +1 -0
- package/dist/types/molecules/PageHeader/styles.d.ts +13 -0
- package/dist/types/molecules/PageHeader/styles.d.ts.map +1 -0
- package/dist/types/molecules/ScorePanel/index.d.ts +70 -0
- package/dist/types/molecules/ScorePanel/index.d.ts.map +1 -0
- package/dist/types/molecules/ScorePanel/styles.d.ts +63 -0
- package/dist/types/molecules/ScorePanel/styles.d.ts.map +1 -0
- package/dist/types/molecules/ScorePills/index.d.ts +25 -0
- package/dist/types/molecules/ScorePills/index.d.ts.map +1 -0
- package/dist/types/molecules/ScorePills/styles.d.ts +8 -0
- package/dist/types/molecules/ScorePills/styles.d.ts.map +1 -0
- package/dist/types/molecules/SearchInput/index.d.ts +2 -2
- package/dist/types/molecules/SearchInput/index.d.ts.map +1 -1
- package/dist/types/molecules/SearchInput/styles.d.ts +5 -5
- package/dist/types/molecules/SearchInput/styles.d.ts.map +1 -1
- package/dist/types/molecules/Select/index.d.ts.map +1 -1
- package/dist/types/molecules/Select/styles.d.ts.map +1 -1
- package/dist/types/molecules/SliderField/index.d.ts +26 -0
- package/dist/types/molecules/SliderField/index.d.ts.map +1 -0
- package/dist/types/molecules/SliderField/styles.d.ts +20 -0
- package/dist/types/molecules/SliderField/styles.d.ts.map +1 -0
- package/dist/types/molecules/StatGrid/index.d.ts +12 -0
- package/dist/types/molecules/StatGrid/index.d.ts.map +1 -0
- package/dist/types/molecules/StatGrid/styles.d.ts +9 -0
- package/dist/types/molecules/StatGrid/styles.d.ts.map +1 -0
- package/dist/types/molecules/StatusLabel/index.d.ts +1 -1
- package/dist/types/molecules/StatusLabel/index.d.ts.map +1 -1
- package/dist/types/molecules/StatusLabel/styles.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/BrandCell.d.ts +1 -1
- package/dist/types/molecules/Table/TableCels/BrandCell.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/ContentCell.d.ts +13 -0
- package/dist/types/molecules/Table/TableCels/ContentCell.d.ts.map +1 -0
- package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts +1 -1
- package/dist/types/molecules/Table/TableCels/NavigationCell.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/StatusCell.d.ts +4 -4
- package/dist/types/molecules/Table/TableCels/StatusCell.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/TextCell.d.ts +3 -3
- package/dist/types/molecules/Table/TableCels/TextCell.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/index.d.ts +7 -6
- package/dist/types/molecules/Table/TableCels/index.d.ts.map +1 -1
- package/dist/types/molecules/Table/TableCels/styles.d.ts +25 -2
- package/dist/types/molecules/Table/TableCels/styles.d.ts.map +1 -1
- package/dist/types/molecules/Table/index.d.ts +16 -5
- package/dist/types/molecules/Table/index.d.ts.map +1 -1
- package/dist/types/molecules/Table/styles.d.ts +11 -1
- package/dist/types/molecules/Table/styles.d.ts.map +1 -1
- package/dist/types/molecules/TokenInputField/index.d.ts.map +1 -1
- package/dist/types/shared/modals/index.d.ts +4 -4
- package/dist/types/shared/modals/index.d.ts.map +1 -1
- package/dist/types/shared/modals/styles.d.ts.map +1 -1
- package/dist/types/shared/modals/useModal.d.ts.map +1 -1
- package/dist/types/shared/report-ui/DecisionPanel.d.ts +1 -1
- package/dist/types/shared/report-ui/DecisionPanel.d.ts.map +1 -1
- package/dist/types/shared/report-ui/DecisionPanel.styles.d.ts.map +1 -1
- package/dist/types/shared/report-ui/Pagination.d.ts +13 -0
- package/dist/types/shared/report-ui/Pagination.d.ts.map +1 -0
- package/dist/types/shared/report-ui/Pagination.styles.d.ts +13 -0
- package/dist/types/shared/report-ui/Pagination.styles.d.ts.map +1 -0
- package/dist/types/shared/report-ui/Shell.styles.d.ts.map +1 -1
- package/dist/types/shared/report-ui/index.d.ts +7 -5
- package/dist/types/shared/report-ui/index.d.ts.map +1 -1
- package/dist/types/shared/report-ui/ui.d.ts +1 -1
- package/dist/types/shared/report-ui/ui.d.ts.map +1 -1
- package/dist/types/shared/report-ui/ui.styles.d.ts.map +1 -1
- package/dist/types/shared/toasts/index.d.ts +2 -2
- package/dist/types/shared/toasts/index.d.ts.map +1 -1
- package/dist/types/textures/Cloud/index.d.ts +4 -4
- package/dist/types/textures/Cloud/index.d.ts.map +1 -1
- package/dist/types/textures/Paper/index.d.ts.map +1 -1
- package/dist/types/textures/index.d.ts +3 -3
- package/dist/types/textures/index.d.ts.map +1 -1
- package/dist/typography.js +71 -70
- package/dist/validation.js +15 -15
- package/dist/wide-image.js +39 -36
- package/package.json +2099 -443
- package/dist/CentralModal-ButM9Ggi.js +0 -159
- package/dist/dist-DD9Lv2Ja.js +0 -130
- package/dist/themes-zS3KQYdw-DIqyzjFD.js +0 -184
package/dist/button.js
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import {
|
|
2
|
+
import { LucideIcon as e } from "@md-code/components/icons";
|
|
3
|
+
import { Loader as t } from "@md-code/components/loading";
|
|
3
4
|
import n, { css as r } from "styled-components";
|
|
4
|
-
import {
|
|
5
|
-
import { Loader as a } from "@md-code/components/loading";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
// molecules/Button/styles.ts
|
|
7
7
|
var o = n.button`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* Structural anchor for geometry.imprint, which the theme places into ::after. */
|
|
12
|
-
position: relative;
|
|
13
|
-
border: none;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
${({ $fullWidth: e }) => e && r`width: 100%;`}
|
|
16
|
-
height: ${({ theme: e }) => e.elements.form.height};
|
|
17
|
-
${({ $size: e, theme: t }) => e !== "icon" && r`gap: ${t.offsets.betweenElements};`}
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
/* Structural anchor for geometry.imprint, which the theme places into ::after. */
|
|
13
|
+
position: relative;
|
|
14
|
+
border: none;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
${({ $fullWidth: e }) => e && r`
|
|
17
|
+
width: 100%;
|
|
18
|
+
`}
|
|
19
|
+
height: ${({ theme: e }) => e.elements.form.height};
|
|
20
|
+
${({ $size: e, theme: t }) => e !== "icon" && r`
|
|
21
|
+
gap: ${t.offsets.betweenElements};
|
|
22
|
+
`}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
&:disabled {
|
|
25
|
+
opacity: 0.5;
|
|
26
|
+
cursor: not-allowed;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
${(e) => {
|
|
30
|
+
let { theme: t, $tone: n, $weight: i, $size: a } = e, o = r`
|
|
31
|
+
/* empty */
|
|
32
|
+
`, s = n === "active" ? {
|
|
26
33
|
background: t.colors.highlighted,
|
|
27
34
|
content: t.colors.highlightedContent
|
|
28
35
|
} : n === "passive" ? {
|
|
@@ -35,77 +42,79 @@ var o = n.button`
|
|
|
35
42
|
switch (i) {
|
|
36
43
|
case "bold":
|
|
37
44
|
o = r`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
background-color: ${c};
|
|
46
|
+
color: ${l};
|
|
47
|
+
`;
|
|
41
48
|
break;
|
|
42
49
|
case "outline":
|
|
43
50
|
case "hollow":
|
|
44
51
|
o = r`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
border: ${t.border.size} solid ${l};
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
color: ${l};
|
|
55
|
+
`;
|
|
49
56
|
break;
|
|
50
57
|
case "light":
|
|
51
58
|
o = r`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
color: ${l};
|
|
61
|
+
`;
|
|
55
62
|
break;
|
|
56
63
|
case "link":
|
|
57
64
|
o = r`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
background-color: transparent;
|
|
66
|
+
color: ${l};
|
|
67
|
+
text-decoration: underline;
|
|
68
|
+
`;
|
|
62
69
|
break;
|
|
63
70
|
case "none":
|
|
64
71
|
o = r`
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
color: inherit;
|
|
74
|
+
`;
|
|
68
75
|
break;
|
|
69
76
|
default: o = r`
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
background-color: ${c};
|
|
78
|
+
color: ${l};
|
|
79
|
+
`;
|
|
73
80
|
}
|
|
74
|
-
let u = r
|
|
81
|
+
let u = r`
|
|
82
|
+
/* empty */
|
|
83
|
+
`;
|
|
75
84
|
switch (a) {
|
|
76
85
|
case "small":
|
|
77
86
|
u = r`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
padding: ${t.offsets.elementContent};
|
|
88
|
+
font-size: ${t.font.sizes.small};
|
|
89
|
+
`;
|
|
81
90
|
break;
|
|
82
91
|
case "medium":
|
|
83
92
|
u = r`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
padding: ${t.offsets.elementContent};
|
|
94
|
+
font-size: ${t.font.sizes.regular};
|
|
95
|
+
`;
|
|
87
96
|
break;
|
|
88
97
|
case "large":
|
|
89
98
|
u = r`
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
padding: ${t.offsets.section};
|
|
100
|
+
font-size: ${t.font.sizes.regular};
|
|
101
|
+
`;
|
|
93
102
|
break;
|
|
94
103
|
case "icon":
|
|
95
104
|
u = r`
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
padding: ${t.offsets.elementContent};
|
|
106
|
+
width: ${t.elements.icons.width};
|
|
107
|
+
height: ${t.elements.icons.height};
|
|
108
|
+
`;
|
|
100
109
|
break;
|
|
101
110
|
default: u = r`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
padding: ${t.offsets.elementContent};
|
|
112
|
+
font-size: ${t.font.sizes.regular};
|
|
113
|
+
`;
|
|
105
114
|
}
|
|
106
115
|
return r`
|
|
107
|
-
|
|
108
|
-
|
|
116
|
+
${o}
|
|
117
|
+
${u}
|
|
109
118
|
|
|
110
119
|
/*
|
|
111
120
|
* Everything below is read from theme-contract fields only. The Button
|
|
@@ -117,8 +126,9 @@ var o = n.button`
|
|
|
117
126
|
* not a stored scale.
|
|
118
127
|
*/
|
|
119
128
|
border-radius: ${t.border.radius};
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
clip-path: ${t.geometry.shape};
|
|
130
|
+
|
|
131
|
+
/*
|
|
122
132
|
* effects.texture is ONE string per theme (README §4.1, §5.3): a paper/
|
|
123
133
|
* noise theme supplies a url() that is legal only in background-image;
|
|
124
134
|
* a glass theme supplies blur() that is legal only in backdrop-filter.
|
|
@@ -130,17 +140,20 @@ var o = n.button`
|
|
|
130
140
|
* byte-identical to backdrop-filter none). Every theme therefore
|
|
131
141
|
* textures the surface through its own property without a name check.
|
|
132
142
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
background-image: ${t.effects.texture};
|
|
144
|
+
backdrop-filter: ${t.effects.texture};
|
|
145
|
+
box-shadow:
|
|
146
|
+
${t.shadows.section},
|
|
147
|
+
0 0 10px color-mix(in srgb, ${t.colors.highlighted} 20%, transparent);
|
|
148
|
+
font-family: ${t.font.family.text};
|
|
149
|
+
|
|
150
|
+
/* Typographic role comes from the theme (README §4.2, §5.5, §6): viking
|
|
138
151
|
* paints its text uppercase at 700, liquidGlass sentence-case at 400. */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
font-weight: ${t.font.weight.text};
|
|
153
|
+
text-transform: ${t.font.transform.text};
|
|
154
|
+
letter-spacing: ${t.font.spacing};
|
|
142
155
|
|
|
143
|
-
|
|
156
|
+
/*
|
|
144
157
|
* geometry.imprint is theme DATA, not component code (README §5.4, §6):
|
|
145
158
|
* a ready CSS fragment the theme builds from its own silhouette/colour/
|
|
146
159
|
* border values — viking's engraved accent outline, liquidGlass's glass
|
|
@@ -148,28 +161,30 @@ var o = n.button`
|
|
|
148
161
|
* or branches on a theme name, so any theme gets its own imprint for free.
|
|
149
162
|
* The position: relative on the base rule anchors this pseudo-element.
|
|
150
163
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
&::after {
|
|
165
|
+
${t.geometry.imprint}
|
|
166
|
+
}
|
|
154
167
|
|
|
155
|
-
|
|
168
|
+
/*
|
|
156
169
|
* States belong to the theme (README §4.3): the Button only attaches the
|
|
157
170
|
* interaction fragments and owns no motion values of its own.
|
|
158
171
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
&:hover {
|
|
173
|
+
${t.effects.interaction.hover}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&:active {
|
|
177
|
+
${t.effects.interaction.active}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:focus-visible {
|
|
181
|
+
${t.effects.interaction.focus}
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
169
184
|
}}
|
|
170
185
|
`, s = ({ icon: n, iconPosition: r = "left", iconLeft: s, iconRight: c, text: l, isLoading: u = !1, children: d, disabled: f = !1, className: p, size: m = "medium", tone: h = "active", weight: g = "bold", $fullWidth: _ = !1, ...v }) => {
|
|
171
186
|
let y = !!(l || d), b = s || (n && r === "left" ? n : void 0), x = c || (n && r === "right" ? n : void 0);
|
|
172
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ a(o, {
|
|
173
188
|
className: p,
|
|
174
189
|
$tone: h,
|
|
175
190
|
$weight: g,
|
|
@@ -178,10 +193,10 @@ var o = n.button`
|
|
|
178
193
|
disabled: f || u,
|
|
179
194
|
...v,
|
|
180
195
|
children: [
|
|
181
|
-
u && /* @__PURE__ */
|
|
182
|
-
!u && b && /* @__PURE__ */ e
|
|
183
|
-
y && /* @__PURE__ */
|
|
184
|
-
!u && x && /* @__PURE__ */ e
|
|
196
|
+
u && /* @__PURE__ */ i(t, {}),
|
|
197
|
+
!u && b && /* @__PURE__ */ i(e, { name: b }),
|
|
198
|
+
y && /* @__PURE__ */ a("span", { children: [l, d] }),
|
|
199
|
+
!u && x && /* @__PURE__ */ i(e, { name: x })
|
|
185
200
|
]
|
|
186
201
|
});
|
|
187
202
|
};
|
package/dist/calendar.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
2
|
+
import e from "styled-components";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
// atoms/Calendar/styles.ts
|
|
5
|
-
var r =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
var r = e.div`
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: repeat(7, 1fr);
|
|
8
|
+
gap: ${({ theme: e }) => e.offsets.elementContent};
|
|
9
|
+
padding: ${({ theme: e }) => e.offsets.elementContent};
|
|
10
|
+
background: ${({ theme: e }) => e.colors.section};
|
|
11
|
+
|
|
12
|
+
/*
|
|
12
13
|
* effects.texture is one string per theme (README §4.1, §5.3): noise themes
|
|
13
14
|
* supply a url() for background-image, glass themes supply blur() for
|
|
14
15
|
* backdrop-filter. The grid cannot know which theme is active, so it hands
|
|
@@ -17,64 +18,64 @@ var r = n.div`
|
|
|
17
18
|
* none, and url() left in backdrop-filter is visually inert — verified in
|
|
18
19
|
* Chromium). Both themes therefore texture the grid without a name check.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
background-image: ${({ theme: e }) => e.effects.texture};
|
|
22
|
+
backdrop-filter: ${({ theme: e }) => e.effects.texture};
|
|
23
|
+
border: ${({ theme: e }) => e.border.size} solid
|
|
24
|
+
color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
|
|
25
|
+
border-radius: ${({ theme: e }) => e.border.radius};
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
/*
|
|
27
28
|
* A weekday header: a centred label on the section surface, closed by an
|
|
28
29
|
* accent rule. Its family and casing are the theme's text role.
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
.header-cell {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
padding: ${({ theme: e }) => e.offsets.elementContent};
|
|
36
|
+
background-color: ${({ theme: e }) => e.colors.section};
|
|
37
|
+
color: ${({ theme: e }) => e.colors.sectionContent};
|
|
38
|
+
font-family: ${({ theme: e }) => e.font.family.text};
|
|
39
|
+
font-weight: ${({ theme: e }) => e.font.weight.text};
|
|
40
|
+
text-transform: ${({ theme: e }) => e.font.transform.text};
|
|
41
|
+
border-bottom: ${({ theme: e }) => e.border.size} solid ${({ theme: e }) => e.colors.highlighted};
|
|
42
|
+
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
/*
|
|
44
45
|
* A day cell: a square muted-outlined tile on the section surface. The
|
|
45
46
|
* hover state may invert to the accent pair (state selectors are exempt from
|
|
46
47
|
* proper-naming, README §4.3) and carries a derived accent glow (README
|
|
47
48
|
* §5.3). Previous-month days recede through opacity over the content colour.
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
.day-cell {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
width: 100%;
|
|
56
|
+
aspect-ratio: 1;
|
|
57
|
+
padding: ${({ theme: e }) => e.offsets.elementContent};
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: ${({ theme: e }) => e.colors.sectionContent};
|
|
60
|
+
font-family: ${({ theme: e }) => e.font.family.text};
|
|
61
|
+
border: ${({ theme: e }) => e.border.size} solid
|
|
62
|
+
color-mix(in srgb, ${({ theme: e }) => e.colors.sectionContent} 25%, transparent);
|
|
63
|
+
border-radius: ${({ theme: e }) => e.border.radius};
|
|
64
|
+
transition:
|
|
65
|
+
background-color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard},
|
|
66
|
+
color ${({ theme: e }) => e.animation.speed.fast} ${({ theme: e }) => e.animation.easing.standard};
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
&:hover {
|
|
69
|
+
background-color: ${({ theme: e }) => e.colors.highlighted};
|
|
70
|
+
color: ${({ theme: e }) => e.colors.highlightedContent};
|
|
71
|
+
box-shadow: 0 0 ${({ theme: e }) => e.offsets.elementContent}
|
|
72
|
+
color-mix(in srgb, ${({ theme: e }) => e.colors.highlighted} 40%, transparent);
|
|
73
|
+
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
&.prev-month {
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
78
79
|
`, i = (e) => String(e).padStart(2, "0"), a = (e) => `${String(e.getFullYear()).padStart(4, "0")}-${i(e.getMonth() + 1)}-${i(e.getDate())}`, o = () => {
|
|
79
80
|
let e = new Intl.DateTimeFormat("en-US", { weekday: "short" }), t = [];
|
|
80
81
|
for (let n = 0; n < 7; n++) t.push(e.format(new Date(2024, 0, 7 + n)));
|
|
@@ -88,13 +89,13 @@ var r = n.div`
|
|
|
88
89
|
}), n.setDate(n.getDate() + 1);
|
|
89
90
|
return r;
|
|
90
91
|
}, c = () => {
|
|
91
|
-
let
|
|
92
|
-
return /* @__PURE__ */
|
|
92
|
+
let e = o(), i = s();
|
|
93
|
+
return /* @__PURE__ */ n(r, { children: [e.map((e) => /* @__PURE__ */ t("div", {
|
|
93
94
|
className: "header-cell",
|
|
94
|
-
children:
|
|
95
|
-
},
|
|
96
|
-
className:
|
|
97
|
-
children:
|
|
98
|
-
},
|
|
95
|
+
children: e
|
|
96
|
+
}, e)), i.map((e) => /* @__PURE__ */ t("div", {
|
|
97
|
+
className: e.isCurrentMonth ? "day-cell" : "day-cell prev-month",
|
|
98
|
+
children: e.dayOfMonth
|
|
99
|
+
}, e.key))] });
|
|
99
100
|
};
|
|
100
101
|
export { c as default };
|
package/dist/caption.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import e from "styled-components";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
// atoms/Caption/styles.ts
|
|
5
|
+
var n = e.div`
|
|
6
|
+
font-size: calc(${({ theme: e }) => e.font.sizes.small} - ${({ theme: e }) => e.border.size});
|
|
7
|
+
color: ${({ theme: e }) => e.colors.status?.dim?.content ?? e.colors.sectionContent};
|
|
8
|
+
text-transform: uppercase;
|
|
9
|
+
letter-spacing: calc(${({ theme: e }) => e.font.spacing} * 3);
|
|
10
|
+
`, r = ({ children: e, ...r }) => /* @__PURE__ */ t(n, {
|
|
11
|
+
...r,
|
|
12
|
+
children: e
|
|
13
|
+
});
|
|
14
|
+
export { r as Caption };
|
package/dist/card.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlainText as e } from "@md-code/components/typography";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Link as t } from "@md-code/components/link";
|
|
4
|
+
import { withOffsetBottom as n, withOffsetsRight as r } from "@md-code/styles";
|
|
4
5
|
import i from "styled-components";
|
|
5
|
-
import {
|
|
6
|
-
import { Link as o } from "@md-code/components/link";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
// molecules/Card/styles.ts
|
|
8
8
|
var s = i.div`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
margin-right: ${r};
|
|
10
|
+
margin-bottom: ${n};
|
|
11
|
+
background-color: ${({ theme: e }) => e.colors.section};
|
|
12
|
+
|
|
13
|
+
/*
|
|
13
14
|
* effects.texture is one string per theme (README §4.1, §5.3): noise themes
|
|
14
15
|
* supply a url() for background-image, glass themes supply blur() for
|
|
15
16
|
* backdrop-filter. The card cannot know which theme is active, so it hands
|
|
@@ -18,61 +19,61 @@ var s = i.div`
|
|
|
18
19
|
* none, and url() left in backdrop-filter is visually inert — verified in
|
|
19
20
|
* Chromium). Both themes therefore texture the card without a name check.
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
background-image: ${({ theme: e }) => e.effects.texture};
|
|
23
|
+
backdrop-filter: ${({ theme: e }) => e.effects.texture};
|
|
24
|
+
border-radius: ${({ theme: e }) => e.border.radius};
|
|
25
|
+
clip-path: ${({ theme: e }) => e.geometry.shape};
|
|
26
|
+
box-shadow: ${({ theme: e }) => e.shadows.section};
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
transition: all ${({ theme: e }) => e.animation.speed.normal} ${({ theme: e }) => e.animation.easing.standard};
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
justify-content: space-between;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
&:hover {
|
|
34
|
+
${({ theme: e }) => e.effects.interaction.hover}
|
|
35
|
+
}
|
|
35
36
|
`, c = i.img`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: auto;
|
|
39
|
+
object-fit: cover;
|
|
39
40
|
`, l = i.div`
|
|
40
|
-
|
|
41
|
+
padding: ${({ theme: e }) => e.offsets.elementContent};
|
|
41
42
|
`, u = i.h3`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
font-size: ${({ theme: e }) => e.font.sizes.large};
|
|
44
|
+
margin-bottom: ${({ theme: e }) => e.offsets.elementContent};
|
|
45
|
+
font-family: ${({ theme: e }) => e.font.family.text};
|
|
46
|
+
color: ${({ theme: e }) => e.colors.sectionContent};
|
|
46
47
|
`, d = i.p`
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
font-size: ${({ theme: e }) => e.font.sizes.regular};
|
|
49
|
+
color: ${({ theme: e }) => e.colors.sectionContent};
|
|
50
|
+
font-family: ${({ theme: e }) => e.font.family.text};
|
|
51
|
+
line-height: 1.5;
|
|
51
52
|
`, f = i.div`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
`, p = i(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 0 ${({ theme: e }) => e.offsets.elementContent} ${({ theme: e }) => e.offsets.elementContent};
|
|
57
|
+
font-size: ${({ theme: e }) => e.font.sizes.small};
|
|
58
|
+
color: ${({ theme: e }) => e.colors.sectionContent};
|
|
59
|
+
`, p = i(t)`
|
|
60
|
+
font-family: ${({ theme: e }) => e.font.family.text};
|
|
61
|
+
color: ${({ theme: e }) => e.colors.highlighted};
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
cursor: pointer;
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`, m = ({ image:
|
|
65
|
+
&:hover {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
`, m = ({ image: t, title: n, description: r, date: i, link: m, ...h }) => /* @__PURE__ */ o(s, {
|
|
68
69
|
...h,
|
|
69
70
|
children: [
|
|
70
|
-
|
|
71
|
-
src:
|
|
72
|
-
alt:
|
|
71
|
+
t && /* @__PURE__ */ a(c, {
|
|
72
|
+
src: t,
|
|
73
|
+
alt: n
|
|
73
74
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ o(l, { children: [/* @__PURE__ */ a(u, { children: n }), /* @__PURE__ */ a(d, { children: r })] }),
|
|
76
|
+
/* @__PURE__ */ o(f, { children: [/* @__PURE__ */ a(e, { children: i }), /* @__PURE__ */ a(p, {
|
|
76
77
|
href: m,
|
|
77
78
|
children: "Read more →"
|
|
78
79
|
})] })
|