@uplatform/brand 0.1.1 → 0.1.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/README.md +22 -1
- package/dist/affiliation.d.ts +16 -0
- package/dist/affiliation.js +3 -2
- package/dist/ground.d.ts +10 -0
- package/dist/ground.js +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/mark.d.ts +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,11 +52,32 @@ Files for places that cannot run code: `@uplatform/brand/media/motion/<id>-{reve
|
|
|
52
52
|
the outline pattern `patterns/u-outline.svg` (one color — tint it with CSS `mask`), and the iyulab wordmark
|
|
53
53
|
`marks/iyulab-wordmark.svg` / `-reverse.svg` (keep it at least 100 px wide).
|
|
54
54
|
|
|
55
|
+
## TypeScript
|
|
56
|
+
|
|
57
|
+
Importing the package adds both tags to `HTMLElementTagNameMap`, so `document.querySelector('u-mark')` and
|
|
58
|
+
`document.createElement('uplatform-affiliation')` are typed as `UMark` and `UplatformAffiliation`. The attribute values
|
|
59
|
+
are exported as `UMarkAttributes` and `UplatformAffiliationAttributes` — reuse them when you declare the elements for
|
|
60
|
+
your framework (for example React's `JSX.IntrinsicElements`):
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import type { UMarkAttributes } from '@uplatform/brand'
|
|
64
|
+
|
|
65
|
+
declare module 'react' {
|
|
66
|
+
namespace JSX {
|
|
67
|
+
interface IntrinsicElements {
|
|
68
|
+
'u-mark': React.HTMLAttributes<HTMLElement> & UMarkAttributes
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
55
74
|
## Placement rules
|
|
56
75
|
|
|
57
76
|
- Put it in the footer, or in your menu's information area. Where exactly is your product's call.
|
|
58
77
|
- Keep the mark at least 16 px and leave clear space around it equal to the mark's stroke weight.
|
|
59
|
-
- To match your background, set `--uplatform-fg` and `--uplatform-bg` on the element.
|
|
78
|
+
- To match your background, set `--uplatform-fg` and `--uplatform-bg` on the element. Without them the product
|
|
79
|
+
list sits on white (light) or `#14161A` (dark) — the grounds the product colors are tuned for (at least 5.5:1 on
|
|
80
|
+
white, 6.9:1 on `#14161A`). Keep a background of your own near those; don't put the marks on mid gray.
|
|
60
81
|
- For layout only (placement, spacing, sizing), the shadow parts are exposed: `::part(link)`, `::part(toggle)`
|
|
61
82
|
and `::part(list)`. Colors and type stay with the element — nothing else is themable on purpose.
|
|
62
83
|
- It makes no network requests and sets no cookies; the product list is built into the package, so it
|
package/dist/affiliation.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type Theme = 'light' | 'dark';
|
|
1
2
|
export declare class UplatformAffiliation extends HTMLElement {
|
|
2
3
|
#private;
|
|
3
4
|
static observedAttributes: string[];
|
|
@@ -6,3 +7,18 @@ export declare class UplatformAffiliation extends HTMLElement {
|
|
|
6
7
|
attributeChangedCallback(): void;
|
|
7
8
|
}
|
|
8
9
|
export declare function defineAffiliation(registry?: CustomElementRegistry): void;
|
|
10
|
+
/** `<uplatform-affiliation>` 의 속성 값 — 프레임워크별 엘리먼트 선언(JSX 등)이 다시 쓴다. */
|
|
11
|
+
export interface UplatformAffiliationAttributes {
|
|
12
|
+
/** 이 화면의 제품 id — 목록에서 빠진다. 모르는 id 면 아무것도 빼지 않는다. */
|
|
13
|
+
product?: string;
|
|
14
|
+
/** 언어 태그. 주 태그가 `en` 이면(`en` · `en-US` …) 영어, 그 밖은 한국어. */
|
|
15
|
+
lang?: string;
|
|
16
|
+
/** 없으면 OS 설정을 따른다. */
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'uplatform-affiliation': UplatformAffiliation;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/dist/affiliation.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// 제품 UI 안에 놓이지만 그 UI 와 스타일이 서로 새지 않는다. 호스트는 --uplatform-fg · --uplatform-bg 로 대비만 맞춘다.
|
|
3
3
|
import { products, umbrella, HUB } from './products.js';
|
|
4
4
|
import { MARKS } from './generated/marks.js';
|
|
5
|
+
import { GROUND } from './ground.js';
|
|
5
6
|
const TEXT = {
|
|
6
7
|
ko: { toggle: 'U-Platform 제품', solutions: '업무 시스템', system: '시스템 통합', cross: '독립 제품' },
|
|
7
8
|
en: { toggle: 'U-Platform products', solutions: 'Business systems', system: 'System integration', cross: 'Standalone products' },
|
|
@@ -19,9 +20,9 @@ svg { width: 1.25rem; height: 1.25rem; flex: none; }
|
|
|
19
20
|
button { font: inherit; color: inherit; background: none; border: 0; padding: 0.15rem 0.3rem; cursor: pointer; border-radius: 0.25rem; }
|
|
20
21
|
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
|
|
21
22
|
[part="list"] { position: absolute; inset-inline-start: 0; inset-block-end: calc(100% + 0.4rem); min-width: 14rem;
|
|
22
|
-
background: var(--uplatform-bg,
|
|
23
|
+
background: var(--uplatform-bg, ${GROUND.light}); border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
|
23
24
|
border-radius: 0.5rem; padding: 0.5rem; z-index: 10; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
|
|
24
|
-
:host([data-resolved-theme="dark"]) [part="list"] { background: var(--uplatform-bg,
|
|
25
|
+
:host([data-resolved-theme="dark"]) [part="list"] { background: var(--uplatform-bg, ${GROUND.dark}); }
|
|
25
26
|
[part="list"][hidden] { display: none; }
|
|
26
27
|
[role="group"] + [role="group"] { margin-top: 0.5rem; }
|
|
27
28
|
.label { font-size: 0.75em; opacity: 0.7; margin: 0 0 0.25rem; }
|
package/dist/ground.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 키트 «사용 규칙»: 밝은 바탕은 흰색, 어두운 바탕은 `#14161A`(아이콘 바탕 `#1F2937` 은 앱 아이콘 전용). */
|
|
2
|
+
export declare const GROUND: {
|
|
3
|
+
readonly light: '#FFFFFF';
|
|
4
|
+
readonly dark: '#14161A';
|
|
5
|
+
};
|
|
6
|
+
/** 키트 «체계 · 제품 색»: 흰 바탕 5.5:1 이상, 어두운 바탕 6.9:1 이상(WCAG 2.2 대비비). */
|
|
7
|
+
export declare const MARK_CONTRAST_FLOOR: {
|
|
8
|
+
readonly light: 5.5;
|
|
9
|
+
readonly dark: 6.9;
|
|
10
|
+
};
|
package/dist/ground.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// 마크를 놓는 바탕과 제품 색의 대비 하한 — 키트 README 의 규칙을 옮겨 적은 값이다(키트 토큰에 아직 없다).
|
|
2
|
+
/** 키트 «사용 규칙»: 밝은 바탕은 흰색, 어두운 바탕은 `#14161A`(아이콘 바탕 `#1F2937` 은 앱 아이콘 전용). */
|
|
3
|
+
export const GROUND = { light: '#FFFFFF', dark: '#14161A' };
|
|
4
|
+
/** 키트 «체계 · 제품 색»: 흰 바탕 5.5:1 이상, 어두운 바탕 6.9:1 이상(WCAG 2.2 대비비). */
|
|
5
|
+
export const MARK_CONTRAST_FLOOR = { light: 5.5, dark: 6.9 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { products, umbrella, productHref, HUB, type Product } from './products.ts';
|
|
2
|
-
export { UplatformAffiliation, defineAffiliation } from './affiliation.ts';
|
|
3
|
-
export { UMark, defineMark } from './mark.ts';
|
|
2
|
+
export { UplatformAffiliation, defineAffiliation, type UplatformAffiliationAttributes } from './affiliation.ts';
|
|
3
|
+
export { UMark, defineMark, type UMarkAttributes } from './mark.ts';
|
package/dist/mark.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type Theme = 'light' | 'dark';
|
|
1
2
|
export declare class UMark extends HTMLElement {
|
|
2
3
|
#private;
|
|
3
4
|
static observedAttributes: string[];
|
|
@@ -6,3 +7,20 @@ export declare class UMark extends HTMLElement {
|
|
|
6
7
|
attributeChangedCallback(name: string): void;
|
|
7
8
|
}
|
|
8
9
|
export declare function defineMark(registry?: CustomElementRegistry): void;
|
|
10
|
+
/** `<u-mark>` 의 속성 값 — 프레임워크별 엘리먼트 선언(JSX 등)이 다시 쓴다. 모르는 제품이면 아무것도 그리지 않는다. */
|
|
11
|
+
export interface UMarkAttributes {
|
|
12
|
+
/** 제품 id(`u-cmms` …). 없으면 `u-platform`. */
|
|
13
|
+
product?: string;
|
|
14
|
+
/** `reveal` = 한 번 그려 보인다 · `chase` = 로딩 동안 돈다 · 그 밖(없음 · `none`) = 완성된 마크. 움직임 줄이기에서는 늘 완성된 마크. */
|
|
15
|
+
motion?: 'none' | 'reveal' | 'chase';
|
|
16
|
+
/** 없으면 OS 설정을 따른다. */
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
/** `visible` 이면 `reveal` 을 화면에 절반 이상 보일 때 시작한다. */
|
|
19
|
+
play?: 'visible';
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'u-mark': UMark;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uplatform/brand",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "U-Platform affiliation kit — product list, marks, the <uplatform-affiliation> and <u-mark> elements, mark renders and patterns.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|