@net-advantage/jo-ui-logo 1.1.7 → 1.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 +10 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +32 -41
- package/dist/logo.model.d.ts +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
JourneyOf wordmark. `journey` uses Inter. The accent `of..` uses Caveat. A dotted curve sits under the word.
|
|
4
4
|
|
|
5
|
-
The logo follows a strict MVVM split. The model owns defaults
|
|
5
|
+
The logo follows a strict MVVM split. The model owns defaults. The view-model projects presentation values. The view only renders the view-model. Inter and Caveat are self-hosted by `@net-advantage/jo-ui-theme`.
|
|
6
6
|
|
|
7
7
|
## MVVM
|
|
8
8
|
|
|
9
9
|
```mermaid
|
|
10
10
|
flowchart LR
|
|
11
11
|
Props["LogoProps"] --> ViewModel["useLogoViewModel"]
|
|
12
|
-
Model["logo.model.ts<br/>defaults and
|
|
12
|
+
Model["logo.model.ts<br/>defaults and class name"] --> ViewModel
|
|
13
13
|
ViewModel --> View["Logo.tsx"]
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
| Layer | File | Responsibility |
|
|
17
17
|
| --- | --- | --- |
|
|
18
18
|
| Contract | [logo.types.ts](src/logo.types.ts) | Props and view-model |
|
|
19
|
-
| Model | [logo.model.ts](src/logo.model.ts) | Default colors, curve size, class name
|
|
20
|
-
| View-model | [logo.view-model.ts](src/logo.view-model.ts) | Project colors, curve size, width, and font families
|
|
19
|
+
| Model | [logo.model.ts](src/logo.model.ts) | Default colors, curve size, and class name |
|
|
20
|
+
| View-model | [logo.view-model.ts](src/logo.view-model.ts) | Project colors, curve size, width, and font families |
|
|
21
21
|
| View | [Logo.tsx](src/Logo.tsx) | Render the wordmark and dotted curve |
|
|
22
22
|
|
|
23
23
|
## Models
|
|
@@ -26,7 +26,6 @@ flowchart LR
|
|
|
26
26
|
flowchart TD
|
|
27
27
|
Defaults["LOGO_DEFAULTS"] --> ViewModel["LogoViewModel"]
|
|
28
28
|
Props["LogoProps"] --> ViewModel
|
|
29
|
-
Font["LOGO_FONT_HREF"] --> Link["font stylesheet link"]
|
|
30
29
|
ViewModel --> Word["journey"]
|
|
31
30
|
ViewModel --> Accent["of.."]
|
|
32
31
|
ViewModel --> Curve["dotted curve"]
|
|
@@ -35,7 +34,7 @@ flowchart TD
|
|
|
35
34
|
- `primaryColor` colors `journey` and the curve's end dot. It defaults to `#14224a`.
|
|
36
35
|
- `accentColor` colors `of..` and the curve. It defaults to `#6495ed`.
|
|
37
36
|
- `curveWidth` defaults to `80`. `curveHeight` defaults to `10`.
|
|
38
|
-
-
|
|
37
|
+
- Font families stay `Inter` and `Caveat`. Load them with `import '@net-advantage/jo-ui-theme/style.css'`. The logo does not request Google Fonts.
|
|
39
38
|
|
|
40
39
|
## Structure
|
|
41
40
|
|
|
@@ -43,11 +42,13 @@ flowchart TD
|
|
|
43
42
|
|
|
44
43
|
## Fonts
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
Inter (including weight 800) and Caveat 600 ship in `@net-advantage/jo-ui-theme`. Import that stylesheet once:
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
```ts
|
|
48
|
+
import '@net-advantage/jo-ui-theme/style.css';
|
|
49
|
+
```
|
|
49
50
|
|
|
50
|
-
The
|
|
51
|
+
The faces use `font-display: swap` and are licensed under the SIL Open Font License. The logo package does not add a Google Fonts `<link>` or CSS `@import`.
|
|
51
52
|
|
|
52
53
|
## Props
|
|
53
54
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);let t=require("react");var n
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);let t=require("react");var n={primaryColor:`#14224a`,accentColor:`#6495ed`,curveWidth:80,curveHeight:10};function r(e){return[`jo-ui-logo`,e??``].filter(Boolean).join(` `)}function i(e){return e===void 0?null:{width:e}}function a(e){let{className:a,primaryColor:o=n.primaryColor,accentColor:s=n.accentColor,width:c,curveWidth:l=n.curveWidth,curveHeight:u=n.curveHeight,rootProps:d}=e;return(0,t.useMemo)(()=>({className:r(a),primaryColor:o,accentColor:s,curveWidth:l,curveHeight:u,widthStyle:i(c),mainFontFamily:`Inter, 'Segoe UI', system-ui, sans-serif`,accentFontFamily:`'Caveat', cursive`,rootProps:d}),[s,a,u,l,o,d,c])}var o=e((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),s=e(((e,t)=>{t.exports=o()}))();function c(e){let t=a(e);return(0,s.jsxs)(`div`,{...t.rootProps,className:t.className,style:t.widthStyle??void 0,"aria-label":`JourneyOf`,children:[(0,s.jsxs)(`p`,{children:[(0,s.jsx)(`span`,{style:{fontFamily:t.mainFontFamily,fontWeight:800,fontSize:22,color:t.primaryColor},children:`journey`}),(0,s.jsx)(`span`,{style:{fontFamily:t.accentFontFamily,fontWeight:600,fontSize:24,color:t.accentColor},children:`of..`})]}),(0,s.jsxs)(`svg`,{width:t.curveWidth,height:t.curveHeight,viewBox:`0 0 100 15`,"aria-hidden":`true`,focusable:`false`,children:[(0,s.jsx)(`path`,{d:`M2 4 C 16 11, 31 -1, 45 7 S 74 13, 90 3`,fill:`none`,stroke:t.accentColor,strokeWidth:`2.2`,strokeLinecap:`round`,strokeDasharray:`0.2 6`,opacity:`0.9`}),(0,s.jsx)(`circle`,{cx:`2`,cy:`4`,r:`2.2`,fill:t.accentColor}),(0,s.jsx)(`circle`,{cx:`90`,cy:`3`,r:`2.2`,fill:t.primaryColor})]})]})}exports.Logo=c;
|
package/dist/index.js
CHANGED
|
@@ -1,54 +1,45 @@
|
|
|
1
1
|
import "./jo-ui-logo.css";
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
|
-
var
|
|
4
|
+
var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = {
|
|
5
5
|
primaryColor: "#14224a",
|
|
6
6
|
accentColor: "#6495ed",
|
|
7
7
|
curveWidth: 80,
|
|
8
8
|
curveHeight: 10
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function r(e) {
|
|
11
11
|
return ["jo-ui-logo", e ?? ""].filter(Boolean).join(" ");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function i(e) {
|
|
14
14
|
return e === void 0 ? null : { width: e };
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/logo.view-model.ts
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return e(() => {
|
|
28
|
-
s();
|
|
29
|
-
}, []), t(() => ({
|
|
30
|
-
className: a(r),
|
|
31
|
-
primaryColor: c,
|
|
32
|
-
accentColor: l,
|
|
33
|
-
curveWidth: d,
|
|
34
|
-
curveHeight: f,
|
|
35
|
-
widthStyle: o(u),
|
|
18
|
+
function a(t) {
|
|
19
|
+
let { className: a, primaryColor: o = n.primaryColor, accentColor: s = n.accentColor, width: c, curveWidth: l = n.curveWidth, curveHeight: u = n.curveHeight, rootProps: d } = t;
|
|
20
|
+
return e(() => ({
|
|
21
|
+
className: r(a),
|
|
22
|
+
primaryColor: o,
|
|
23
|
+
accentColor: s,
|
|
24
|
+
curveWidth: l,
|
|
25
|
+
curveHeight: u,
|
|
26
|
+
widthStyle: i(c),
|
|
36
27
|
mainFontFamily: "Inter, 'Segoe UI', system-ui, sans-serif",
|
|
37
28
|
accentFontFamily: "'Caveat', cursive",
|
|
38
|
-
rootProps:
|
|
29
|
+
rootProps: d
|
|
39
30
|
}), [
|
|
31
|
+
s,
|
|
32
|
+
a,
|
|
33
|
+
u,
|
|
40
34
|
l,
|
|
41
|
-
|
|
42
|
-
f,
|
|
35
|
+
o,
|
|
43
36
|
d,
|
|
44
|
-
c
|
|
45
|
-
p,
|
|
46
|
-
u
|
|
37
|
+
c
|
|
47
38
|
]);
|
|
48
39
|
}
|
|
49
40
|
//#endregion
|
|
50
41
|
//#region ../../node_modules/.pnpm/react@19.3.0/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
51
|
-
var
|
|
42
|
+
var o = /* @__PURE__ */ t(((e) => {
|
|
52
43
|
var t = Symbol.for("react.transitional.element");
|
|
53
44
|
function n(e, n, r) {
|
|
54
45
|
var i = null;
|
|
@@ -63,17 +54,17 @@ var l = /* @__PURE__ */ n(((e) => {
|
|
|
63
54
|
};
|
|
64
55
|
}
|
|
65
56
|
e.jsx = n, e.jsxs = n;
|
|
66
|
-
})),
|
|
67
|
-
t.exports =
|
|
57
|
+
})), s = (/* @__PURE__ */ t(((e, t) => {
|
|
58
|
+
t.exports = o();
|
|
68
59
|
})))();
|
|
69
|
-
function
|
|
70
|
-
let t =
|
|
71
|
-
return /* @__PURE__ */ (0,
|
|
60
|
+
function c(e) {
|
|
61
|
+
let t = a(e);
|
|
62
|
+
return /* @__PURE__ */ (0, s.jsxs)("div", {
|
|
72
63
|
...t.rootProps,
|
|
73
64
|
className: t.className,
|
|
74
65
|
style: t.widthStyle ?? void 0,
|
|
75
66
|
"aria-label": "JourneyOf",
|
|
76
|
-
children: [/* @__PURE__ */ (0,
|
|
67
|
+
children: [/* @__PURE__ */ (0, s.jsxs)("p", { children: [/* @__PURE__ */ (0, s.jsx)("span", {
|
|
77
68
|
style: {
|
|
78
69
|
fontFamily: t.mainFontFamily,
|
|
79
70
|
fontWeight: 800,
|
|
@@ -81,7 +72,7 @@ function d(e) {
|
|
|
81
72
|
color: t.primaryColor
|
|
82
73
|
},
|
|
83
74
|
children: "journey"
|
|
84
|
-
}), /* @__PURE__ */ (0,
|
|
75
|
+
}), /* @__PURE__ */ (0, s.jsx)("span", {
|
|
85
76
|
style: {
|
|
86
77
|
fontFamily: t.accentFontFamily,
|
|
87
78
|
fontWeight: 600,
|
|
@@ -89,14 +80,14 @@ function d(e) {
|
|
|
89
80
|
color: t.accentColor
|
|
90
81
|
},
|
|
91
82
|
children: "of.."
|
|
92
|
-
})] }), /* @__PURE__ */ (0,
|
|
83
|
+
})] }), /* @__PURE__ */ (0, s.jsxs)("svg", {
|
|
93
84
|
width: t.curveWidth,
|
|
94
85
|
height: t.curveHeight,
|
|
95
86
|
viewBox: "0 0 100 15",
|
|
96
87
|
"aria-hidden": "true",
|
|
97
88
|
focusable: "false",
|
|
98
89
|
children: [
|
|
99
|
-
/* @__PURE__ */ (0,
|
|
90
|
+
/* @__PURE__ */ (0, s.jsx)("path", {
|
|
100
91
|
d: "M2 4 C 16 11, 31 -1, 45 7 S 74 13, 90 3",
|
|
101
92
|
fill: "none",
|
|
102
93
|
stroke: t.accentColor,
|
|
@@ -105,13 +96,13 @@ function d(e) {
|
|
|
105
96
|
strokeDasharray: "0.2 6",
|
|
106
97
|
opacity: "0.9"
|
|
107
98
|
}),
|
|
108
|
-
/* @__PURE__ */ (0,
|
|
99
|
+
/* @__PURE__ */ (0, s.jsx)("circle", {
|
|
109
100
|
cx: "2",
|
|
110
101
|
cy: "4",
|
|
111
102
|
r: "2.2",
|
|
112
103
|
fill: t.accentColor
|
|
113
104
|
}),
|
|
114
|
-
/* @__PURE__ */ (0,
|
|
105
|
+
/* @__PURE__ */ (0, s.jsx)("circle", {
|
|
115
106
|
cx: "90",
|
|
116
107
|
cy: "3",
|
|
117
108
|
r: "2.2",
|
|
@@ -122,4 +113,4 @@ function d(e) {
|
|
|
122
113
|
});
|
|
123
114
|
}
|
|
124
115
|
//#endregion
|
|
125
|
-
export {
|
|
116
|
+
export { c as Logo };
|
package/dist/logo.model.d.ts
CHANGED