@mindtris/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @mindtris/ui
2
+
3
+ Published as **@mindtris/ui** on [npm](https://www.npmjs.com/package/@mindtris/ui).
4
+
5
+ ```bash
6
+ # -----------------------------------------------------------------------------
7
+ # install (npm)
8
+ # -----------------------------------------------------------------------------
9
+ pnpm add @mindtris/ui
10
+
11
+ # -----------------------------------------------------------------------------
12
+ # publish to npm (from pkg/design)
13
+ # -----------------------------------------------------------------------------
14
+ cd pkg/design
15
+ pnpm run build # build dist/ (runs automatically on publish via prepublishOnly)
16
+ npm login # one-time: log in to npmjs.com
17
+ npm publish --access public # first publish; use npm version patch && npm publish for releases
18
+
19
+ # -----------------------------------------------------------------------------
20
+ # install via file link (local dev, e.g. dash)
21
+ # -----------------------------------------------------------------------------
22
+ # In the app: pnpm add file:../mindtris-ui/pkg/design
23
+ # Run `pnpm run build` in pkg/design first so dist/ exists; then the app consumes the built output.
24
+
25
+ # -----------------------------------------------------------------------------
26
+ # tokens (CSS) — MUST import once in app root CSS
27
+ # -----------------------------------------------------------------------------
28
+ # app/globals.css (or app/css/style.css):
29
+ # @import '@mindtris/ui/tokens';
30
+ #
31
+ # then use semantic token classes:
32
+ # bg-background text-foreground border-border bg-card text-muted-foreground
33
+ # bg-primary text-primary-foreground bg-destructive text-destructive-foreground
34
+
35
+
36
+ # -----------------------------------------------------------------------------
37
+ # react usage (UI + theme engine)
38
+ # -----------------------------------------------------------------------------
39
+ # import what you need:
40
+ # import { Button, Input, Label, DatePicker, Container, Page, Section, Toaster, useThemeManager } from '@mindtris/ui'
41
+ #
42
+ # theme apply (runtime; sets CSS vars on <html>):
43
+ # const { applyTheme, applyImportedTheme, applyRadius, isDarkMode } = useThemeManager()
44
+ # applyThemePreset('mindtris-ui', isDarkMode)
45
+
46
+
47
+ # -----------------------------------------------------------------------------
48
+ # package rules (CONTRIBUTING.md summary)
49
+ # -----------------------------------------------------------------------------
50
+ # scope:
51
+ # - UI-only primitives + tokens + theme engine
52
+ # - MUST be usable in >= 2 apps without renaming meaning
53
+ #
54
+ # must NOT exist in pkg/design:
55
+ # - API calls / data fetching
56
+ # - domain terms (Invoice, User, KYC, Transaction, ...)
57
+ # - app routing/nav/permissions/workflows
58
+ #
59
+ # styling:
60
+ # - token-only colors (NO tailwind palette like bg-gray-900, NO hex in components)
61
+ # - prefer semantic classes: bg-card, text-foreground, border-border, ...
62
+ #
63
+ # labels and copy:
64
+ # - sentence case: capitalize only the first letter (e.g. "Full name", not "Full Name")
65
+ # - exception: proper nouns, acronyms (e.g. "API key", "URL")
66
+ #
67
+ # layouts:
68
+ # - components like Sidebar/Header are chrome/slots only; apps provide routes + items
69
+
70
+
71
+ # -----------------------------------------------------------------------------
72
+ # dev checks (in this repo)
73
+ # -----------------------------------------------------------------------------
74
+ cd pkg/design
75
+ pnpm tsc --noEmit -p tsconfig.json
76
+ ```
@@ -0,0 +1,14 @@
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g transform="translate(2, 8) scale(0.47)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M48.3457 0.350734C50.9943 1.38463 52.3187 4.4078 51.2907 7.07171L42.9082 28.6863C41.8802 31.3504 38.8743 32.6836 36.2454 31.6496C33.5956 30.6145 32.2712 27.5925 33.2992 24.9274L41.6618 3.29407C42.6912 0.648793 45.6957 -0.683161 48.3457 0.350734Z" fill="url(#paint0_linear_4002_249)"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.2661 0.350734C17.8941 1.38463 19.2074 4.4078 18.1682 7.07171L9.875 28.6863C8.85556 31.3504 5.87467 32.6836 3.24802 31.6496C0.639721 30.6145 -0.673608 27.5925 0.345829 24.9274L8.64039 3.29407C9.65984 0.648793 12.6394 -0.683161 15.2661 0.350734Z" fill="#6366F1"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M31.8237 0.350734C34.4517 1.38463 35.765 4.4078 34.7258 7.07171L26.4327 28.6863C25.4132 31.3504 22.4322 32.6836 19.8056 31.6496C17.1973 30.6145 15.884 27.5925 16.9035 24.9274L25.1979 3.29407C26.2174 0.648793 29.1969 -0.683161 31.8237 0.350734Z" fill="#6366F1"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.2957 0.350734C12.664 -0.683162 9.67861 0.648794 8.65718 3.29407L0.346501 24.9274C-0.674917 27.5925 0.640963 30.6145 3.25433 31.6496C5.88608 32.6836 8.87277 31.3504 9.8942 28.6863L18.2036 7.07171C19.2448 4.4078 17.9289 1.38463 15.2957 0.350734ZM44.7039 0.350734C42.0721 1.38463 40.7562 4.4078 41.7777 7.07171L50.087 28.6863C51.1282 31.3504 54.1136 32.6836 56.7269 31.6496C59.3587 30.6145 60.6746 27.5925 59.6544 24.9274L51.3241 3.29407C50.3026 0.648794 47.3172 -0.683162 44.7039 0.350734ZM31.8961 0.350734C34.5082 1.38463 35.8239 4.4078 34.8039 7.07171L26.4933 28.6863C25.4718 31.3504 22.4864 32.6836 19.8533 31.6496C17.2216 30.6145 15.9057 27.5925 16.927 24.9274L25.2562 3.29407C26.2775 0.648794 29.2629 -0.683162 31.8961 0.350734Z" fill="#6366F1"/>
7
+ </g>
8
+ <defs>
9
+ <linearGradient id="paint0_linear_4002_249" x1="42.2949" y1="0" x2="42.2949" y2="32" gradientUnits="userSpaceOnUse">
10
+ <stop stop-color="#6366F1"/>
11
+ <stop offset="1" stop-color="#6366F1" stop-opacity="0.32"/>
12
+ </linearGradient>
13
+ </defs>
14
+ </svg>
@@ -0,0 +1,17 @@
1
+ <svg width="60" height="32" viewBox="0 0 60 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_4002_249)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M48.3457 0.350734C50.9943 1.38463 52.3187 4.4078 51.2907 7.07171L42.9082 28.6863C41.8802 31.3504 38.8743 32.6836 36.2454 31.6496C33.5956 30.6145 32.2712 27.5925 33.2992 24.9274L41.6618 3.29407C42.6912 0.648793 45.6957 -0.683161 48.3457 0.350734Z" fill="url(#paint0_linear_4002_249)"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.2661 0.350734C17.8941 1.38463 19.2074 4.4078 18.1682 7.07171L9.875 28.6863C8.85556 31.3504 5.87467 32.6836 3.24802 31.6496C0.639721 30.6145 -0.673608 27.5925 0.345829 24.9274L8.64039 3.29407C9.65984 0.648793 12.6394 -0.683161 15.2661 0.350734Z" fill="#6366F1"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M31.8237 0.350734C34.4517 1.38463 35.765 4.4078 34.7258 7.07171L26.4327 28.6863C25.4132 31.3504 22.4322 32.6836 19.8056 31.6496C17.1973 30.6145 15.884 27.5925 16.9035 24.9274L25.1979 3.29407C26.2174 0.648793 29.1969 -0.683161 31.8237 0.350734Z" fill="#6366F1"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.2957 0.350734C12.664 -0.683162 9.67861 0.648794 8.65718 3.29407L0.346501 24.9274C-0.674917 27.5925 0.640963 30.6145 3.25433 31.6496C5.88608 32.6836 8.87277 31.3504 9.8942 28.6863L18.2036 7.07171C19.2448 4.4078 17.9289 1.38463 15.2957 0.350734ZM44.7039 0.350734C42.0721 1.38463 40.7562 4.4078 41.7777 7.07171L50.087 28.6863C51.1282 31.3504 54.1136 32.6836 56.7269 31.6496C59.3587 30.6145 60.6746 27.5925 59.6544 24.9274L51.3241 3.29407C50.3026 0.648794 47.3172 -0.683162 44.7039 0.350734ZM31.8961 0.350734C34.5082 1.38463 35.8239 4.4078 34.8039 7.07171L26.4933 28.6863C25.4718 31.3504 22.4864 32.6836 19.8533 31.6496C17.2216 30.6145 15.9057 27.5925 16.927 24.9274L25.2562 3.29407C26.2775 0.648794 29.2629 -0.683162 31.8961 0.350734Z" fill="#6366F1"/>
7
+ </g>
8
+ <defs>
9
+ <linearGradient id="paint0_linear_4002_249" x1="42.2949" y1="0" x2="42.2949" y2="32" gradientUnits="userSpaceOnUse">
10
+ <stop stop-color="#6366F1"/>
11
+ <stop offset="1" stop-color="#6366F1" stop-opacity="0.32"/>
12
+ </linearGradient>
13
+ <clipPath id="clip0_4002_249">
14
+ <rect width="60" height="32" fill="white"/>
15
+ </clipPath>
16
+ </defs>
17
+ </svg>
@@ -0,0 +1,22 @@
1
+ <svg width="1614" height="1446" viewBox="0 0 1614 1446" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_36_14" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="179" y="270" width="1435" height="1176">
3
+ <path d="M1588.81 813.722L1276.39 1354.85C1243.93 1411.09 1183.93 1445.72 1119 1445.72H494.173C429.244 1445.72 369.247 1411.07 336.783 1354.85L179.393 1082.23H286.719L417.271 1308.37C433.123 1335.85 462.441 1352.77 494.159 1352.77H1119.01C1150.73 1352.77 1180.05 1335.85 1195.9 1308.37L1508.32 767.232C1524.18 739.767 1524.18 705.929 1508.32 678.464C1492.46 650.986 1463.15 634.067 1431.43 634.067H416.045C380.273 634.067 357.915 595.336 375.807 564.365L532.01 293.781C540.317 279.409 555.662 270.556 572.261 270.556H1040.89C1057.48 270.556 1072.83 279.409 1081.12 293.795L1081.14 293.808C1089.44 308.181 1089.44 325.9 1081.14 340.272L981.689 512.501H874.376L960.411 363.497H599.1L496.559 541.113H1431.42C1496.35 541.113 1556.35 575.751 1588.81 631.974C1621.28 688.21 1621.28 757.486 1588.81 813.722Z" fill="white"/>
4
+ </mask>
5
+ <g mask="url(#mask0_36_14)">
6
+ <path d="M1588.81 813.722L1276.39 1354.85C1243.93 1411.09 1183.93 1445.72 1119 1445.72H494.173C429.244 1445.72 369.247 1411.07 336.783 1354.85L179.393 1082.23H286.719L417.271 1308.37C433.123 1335.85 462.441 1352.77 494.159 1352.77H1119.01C1150.73 1352.77 1180.05 1335.85 1195.9 1308.37L1508.32 767.232C1524.18 739.767 1524.18 705.929 1508.32 678.464C1492.46 650.986 1463.15 634.067 1431.43 634.067H416.045C380.273 634.067 357.915 595.336 375.807 564.365L532.01 293.781C540.317 279.409 555.662 270.556 572.261 270.556H1040.89C1057.48 270.556 1072.83 279.409 1081.12 293.795L1081.14 293.808C1089.44 308.181 1089.44 325.9 1081.14 340.272L981.689 512.501H874.376L960.411 363.497H599.1L496.559 541.113H1431.42C1496.35 541.113 1556.35 575.751 1588.81 631.974C1621.28 688.21 1621.28 757.486 1588.81 813.722Z" fill="url(#paint0_linear_36_14)"/>
7
+ </g>
8
+ <mask id="mask1_36_14" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="1434" height="1176">
9
+ <path d="M24.3485 813.749C-8.11616 757.513 -8.11616 688.237 24.3485 632.001L336.769 90.8745C369.233 34.6381 429.23 0 494.159 0H1118.99C1183.92 0 1243.91 34.6514 1276.38 90.8745L1433.77 363.497H1326.44L1195.89 137.352C1180.04 109.873 1150.72 92.9543 1119 92.9543H494.146C462.428 92.9543 433.11 109.873 417.257 137.352L104.837 678.491C88.9843 705.956 88.9843 739.794 104.837 767.259C120.702 794.737 150.007 811.656 181.725 811.656H1197.11C1232.89 811.656 1255.24 850.387 1237.35 881.358L1081.15 1151.94C1072.84 1166.31 1057.5 1175.17 1040.9 1175.17H572.274C555.675 1175.17 540.33 1166.31 532.037 1151.93C523.731 1137.56 523.731 1119.84 532.037 1105.46L631.484 933.222H738.797L652.763 1082.23H1014.06L1116.6 904.61H181.739C116.809 904.61 56.8131 869.972 24.3485 813.749Z" fill="white"/>
10
+ </mask>
11
+ <g mask="url(#mask1_36_14)">
12
+ <path d="M24.3485 813.749C-8.11616 757.513 -8.11616 688.237 24.3485 632.001L336.769 90.8745C369.233 34.6381 429.23 0 494.159 0H1118.99C1183.92 0 1243.91 34.6514 1276.38 90.8745L1433.77 363.497H1326.44L1195.89 137.352C1180.04 109.873 1150.72 92.9543 1119 92.9543H494.146C462.428 92.9543 433.11 109.873 417.257 137.352L104.837 678.491C88.9843 705.956 88.9843 739.794 104.837 767.259C120.702 794.737 150.007 811.656 181.725 811.656H1197.11C1232.89 811.656 1255.24 850.387 1237.35 881.358L1081.15 1151.94C1072.84 1166.31 1057.5 1175.17 1040.9 1175.17H572.274C555.675 1175.17 540.33 1166.31 532.037 1151.93C523.731 1137.56 523.731 1119.84 532.037 1105.46L631.484 933.222H738.797L652.763 1082.23H1014.06L1116.6 904.61H181.739C116.809 904.61 56.8131 869.972 24.3485 813.749Z" fill="url(#paint1_linear_36_14)"/>
13
+ </g>
14
+ <defs>
15
+ <linearGradient id="paint0_linear_36_14" x1="352.475" y1="1379.3" x2="1348.69" y2="383.088" gradientUnits="userSpaceOnUse">
16
+ <stop offset="1" stop-color="#7C3AED"/>
17
+ </linearGradient>
18
+ <linearGradient id="paint1_linear_36_14" x1="264.467" y1="1062.63" x2="1260.68" y2="66.4148" gradientUnits="userSpaceOnUse">
19
+ <stop offset="1" stop-color="#7C3AED"/>
20
+ </linearGradient>
21
+ </defs>
22
+ </svg>