@meetreeve/ui 0.2.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 +134 -0
- package/dist/index.d.mts +328 -0
- package/dist/index.d.ts +328 -0
- package/dist/index.js +955 -0
- package/dist/index.mjs +910 -0
- package/dist/tokens/index.d.mts +31 -0
- package/dist/tokens/index.d.ts +31 -0
- package/dist/tokens/index.js +47 -0
- package/dist/tokens/index.mjs +21 -0
- package/dist/tokens.css +25 -0
- package/package.json +75 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared minimum-size floors and breakpoints for MindFortress frontends.
|
|
3
|
+
*
|
|
4
|
+
* These are the numbers that keep a header usable under width pressure: a real
|
|
5
|
+
* touch target, and a search field that never gets crushed below a readable
|
|
6
|
+
* width on mobile. Consumers can read them in JS (here) or, for Tailwind v4, as
|
|
7
|
+
* `@theme` custom properties from `@meetreeve/ui/tokens.css`.
|
|
8
|
+
*
|
|
9
|
+
* This module is intentionally free of React / DOM imports so it stays
|
|
10
|
+
* server-safe (no "use client" boundary).
|
|
11
|
+
*/
|
|
12
|
+
declare const MIN_SIZES: {
|
|
13
|
+
/** WCAG 2.5.5 minimum interactive target, px. Applies to BOTH width and height. */
|
|
14
|
+
readonly touchTarget: 44;
|
|
15
|
+
/** Floor width for the always-inline search field on mobile, px. */
|
|
16
|
+
readonly searchInput: 200;
|
|
17
|
+
/** Generic minimum width/height for a secondary control (button, select), px. */
|
|
18
|
+
readonly control: 44;
|
|
19
|
+
/** Max width of the brand wordmark before it truncates, px. */
|
|
20
|
+
readonly wordmarkMaxWidth: 180;
|
|
21
|
+
};
|
|
22
|
+
declare const BREAKPOINTS: {
|
|
23
|
+
/** Tailwind `sm`. */
|
|
24
|
+
readonly sm: 640;
|
|
25
|
+
/** Tailwind `md` — the header switches to its full desktop layout at/above this. */
|
|
26
|
+
readonly md: 768;
|
|
27
|
+
};
|
|
28
|
+
type MinSizeToken = keyof typeof MIN_SIZES;
|
|
29
|
+
type Breakpoint = keyof typeof BREAKPOINTS;
|
|
30
|
+
|
|
31
|
+
export { BREAKPOINTS, type Breakpoint, MIN_SIZES, type MinSizeToken };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared minimum-size floors and breakpoints for MindFortress frontends.
|
|
3
|
+
*
|
|
4
|
+
* These are the numbers that keep a header usable under width pressure: a real
|
|
5
|
+
* touch target, and a search field that never gets crushed below a readable
|
|
6
|
+
* width on mobile. Consumers can read them in JS (here) or, for Tailwind v4, as
|
|
7
|
+
* `@theme` custom properties from `@meetreeve/ui/tokens.css`.
|
|
8
|
+
*
|
|
9
|
+
* This module is intentionally free of React / DOM imports so it stays
|
|
10
|
+
* server-safe (no "use client" boundary).
|
|
11
|
+
*/
|
|
12
|
+
declare const MIN_SIZES: {
|
|
13
|
+
/** WCAG 2.5.5 minimum interactive target, px. Applies to BOTH width and height. */
|
|
14
|
+
readonly touchTarget: 44;
|
|
15
|
+
/** Floor width for the always-inline search field on mobile, px. */
|
|
16
|
+
readonly searchInput: 200;
|
|
17
|
+
/** Generic minimum width/height for a secondary control (button, select), px. */
|
|
18
|
+
readonly control: 44;
|
|
19
|
+
/** Max width of the brand wordmark before it truncates, px. */
|
|
20
|
+
readonly wordmarkMaxWidth: 180;
|
|
21
|
+
};
|
|
22
|
+
declare const BREAKPOINTS: {
|
|
23
|
+
/** Tailwind `sm`. */
|
|
24
|
+
readonly sm: 640;
|
|
25
|
+
/** Tailwind `md` — the header switches to its full desktop layout at/above this. */
|
|
26
|
+
readonly md: 768;
|
|
27
|
+
};
|
|
28
|
+
type MinSizeToken = keyof typeof MIN_SIZES;
|
|
29
|
+
type Breakpoint = keyof typeof BREAKPOINTS;
|
|
30
|
+
|
|
31
|
+
export { BREAKPOINTS, type Breakpoint, MIN_SIZES, type MinSizeToken };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/tokens.ts
|
|
21
|
+
var tokens_exports = {};
|
|
22
|
+
__export(tokens_exports, {
|
|
23
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
24
|
+
MIN_SIZES: () => MIN_SIZES
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(tokens_exports);
|
|
27
|
+
var MIN_SIZES = {
|
|
28
|
+
/** WCAG 2.5.5 minimum interactive target, px. Applies to BOTH width and height. */
|
|
29
|
+
touchTarget: 44,
|
|
30
|
+
/** Floor width for the always-inline search field on mobile, px. */
|
|
31
|
+
searchInput: 200,
|
|
32
|
+
/** Generic minimum width/height for a secondary control (button, select), px. */
|
|
33
|
+
control: 44,
|
|
34
|
+
/** Max width of the brand wordmark before it truncates, px. */
|
|
35
|
+
wordmarkMaxWidth: 180
|
|
36
|
+
};
|
|
37
|
+
var BREAKPOINTS = {
|
|
38
|
+
/** Tailwind `sm`. */
|
|
39
|
+
sm: 640,
|
|
40
|
+
/** Tailwind `md` — the header switches to its full desktop layout at/above this. */
|
|
41
|
+
md: 768
|
|
42
|
+
};
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
BREAKPOINTS,
|
|
46
|
+
MIN_SIZES
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/tokens.ts
|
|
2
|
+
var MIN_SIZES = {
|
|
3
|
+
/** WCAG 2.5.5 minimum interactive target, px. Applies to BOTH width and height. */
|
|
4
|
+
touchTarget: 44,
|
|
5
|
+
/** Floor width for the always-inline search field on mobile, px. */
|
|
6
|
+
searchInput: 200,
|
|
7
|
+
/** Generic minimum width/height for a secondary control (button, select), px. */
|
|
8
|
+
control: 44,
|
|
9
|
+
/** Max width of the brand wordmark before it truncates, px. */
|
|
10
|
+
wordmarkMaxWidth: 180
|
|
11
|
+
};
|
|
12
|
+
var BREAKPOINTS = {
|
|
13
|
+
/** Tailwind `sm`. */
|
|
14
|
+
sm: 640,
|
|
15
|
+
/** Tailwind `md` — the header switches to its full desktop layout at/above this. */
|
|
16
|
+
md: 768
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
BREAKPOINTS,
|
|
20
|
+
MIN_SIZES
|
|
21
|
+
};
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @meetreeve/ui design tokens for Tailwind v4 consumers.
|
|
3
|
+
*
|
|
4
|
+
* Import once, after `@import "tailwindcss";`, in your global stylesheet:
|
|
5
|
+
* @import "@meetreeve/ui/tokens.css";
|
|
6
|
+
*
|
|
7
|
+
* Values mirror MIN_SIZES / BREAKPOINTS in ./tokens.ts. The `--breakpoint-*`
|
|
8
|
+
* entries reaffirm Tailwind's own sm/md defaults so the JS and CSS agree.
|
|
9
|
+
*
|
|
10
|
+
* `@theme static` (not plain `@theme`): Tailwind v4 tree-shakes theme variables
|
|
11
|
+
* that no utility references, but these `--mf-*` tokens are meant to be read
|
|
12
|
+
* DIRECTLY by consumers (e.g. `min-width: var(--mf-min-search-input)`), so they
|
|
13
|
+
* must always emit into the published CSS.
|
|
14
|
+
*/
|
|
15
|
+
@theme static {
|
|
16
|
+
/* Minimum interactive sizes. */
|
|
17
|
+
--mf-min-touch-target: 44px;
|
|
18
|
+
--mf-min-search-input: 200px;
|
|
19
|
+
--mf-min-control: 44px;
|
|
20
|
+
--mf-wordmark-max-width: 180px;
|
|
21
|
+
|
|
22
|
+
/* Breakpoints aligned to Tailwind defaults. */
|
|
23
|
+
--breakpoint-sm: 640px;
|
|
24
|
+
--breakpoint-md: 768px;
|
|
25
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meetreeve/ui",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Shared brand-adaptive UI primitives for MindFortress frontends — min-size tokens, a favicon→logo→monogram BrandGlyph, a responsive header that keeps the search bar usable on mobile, and AppSidebar's viewport-driven auto-collapse ladder.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./tokens": {
|
|
16
|
+
"types": "./dist/tokens/index.d.ts",
|
|
17
|
+
"import": "./dist/tokens/index.mjs",
|
|
18
|
+
"require": "./dist/tokens/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./tokens.css": "./dist/tokens.css"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"**/*.css"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "rm -rf dist && tsup",
|
|
30
|
+
"dev": "tsup --watch",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"prepublishOnly": "npm run build"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"lucide-react": ">=0.400.0",
|
|
40
|
+
"next": ">=14",
|
|
41
|
+
"react": ">=18",
|
|
42
|
+
"react-dom": ">=18",
|
|
43
|
+
"zod": ">=3.24.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/dom": "^10.4.1",
|
|
47
|
+
"@testing-library/react": "^16.3.2",
|
|
48
|
+
"@types/react": "^19",
|
|
49
|
+
"@types/react-dom": "^19",
|
|
50
|
+
"@vitejs/plugin-react": "^5.1.3",
|
|
51
|
+
"jsdom": "^28.0.0",
|
|
52
|
+
"lucide-react": "^0.400.0",
|
|
53
|
+
"next": "16.1.6",
|
|
54
|
+
"react": "19.2.3",
|
|
55
|
+
"react-dom": "19.2.3",
|
|
56
|
+
"tsup": "^8.0.0",
|
|
57
|
+
"typescript": "5.9.3",
|
|
58
|
+
"vitest": "^4.0.18",
|
|
59
|
+
"zod": "^4.4.3"
|
|
60
|
+
},
|
|
61
|
+
"keywords": [
|
|
62
|
+
"react",
|
|
63
|
+
"nextjs",
|
|
64
|
+
"ui",
|
|
65
|
+
"brand",
|
|
66
|
+
"header",
|
|
67
|
+
"meetreeve",
|
|
68
|
+
"design-tokens"
|
|
69
|
+
],
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "git+https://github.com/MindFortressInc/reeve-frontend.git",
|
|
73
|
+
"directory": "packages/ui"
|
|
74
|
+
}
|
|
75
|
+
}
|